From d9a4dc24333b96791249c24724753aaa89f5a33c Mon Sep 17 00:00:00 2001 From: AngeloR Date: Mon, 18 Aug 2025 01:34:25 -0400 Subject: [PATCH] feat: shift+enter while editing adds a new line to the node instead of creating a node, shift+enter adds a new line, allowing for multi-line nodes. --- public/assets/bundle.js | 2 +- src/keyboard-shortcuts/escape-editing.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/assets/bundle.js b/public/assets/bundle.js index f9718e7..e860193 100644 --- a/public/assets/bundle.js +++ b/public/assets/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e,t,n={23:(e,t,n)=>{"use strict";function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.r(t),n.d(t,{Hooks:()=>fe,Lexer:()=>ae,Marked:()=>de,Parser:()=>ce,Renderer:()=>ue,TextRenderer:()=>le,Tokenizer:()=>se,defaults:()=>i,getDefaults:()=>r,lexer:()=>ke,marked:()=>pe,options:()=>me,parse:()=>we,parseInline:()=>be,parser:()=>_e,setOptions:()=>ge,use:()=>ye,walkTokens:()=>ve});var i={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function o(e){i=e}var s={exec:()=>null};function a(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(u.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var u={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,d=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),h=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),p=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,m=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),v="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",b=/|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",b).replace("tag",v).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),k={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:l,html:w,lheading:d,list:y,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:_,table:s,text:/^[^\n]+/},x=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),S={...k,lheading:h,table:x,paragraph:a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex()},O={...k,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",b).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(p).replace("hr",l).replace("heading"," *#{1,6} *[^\n]").replace("lheading",d).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,N=/[^\s\p{P}\p{S}]/u,M=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),E=/(?!~)[\p{P}\p{S}]/u,L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,I=a(L,"u").replace(/punct/g,C).getRegex(),A=a(L,"u").replace(/punct/g,E).getRegex(),$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",R=a($,"gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,D).replace(/punct/g,C).getRegex(),j=a($,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,E).getRegex(),P=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,D).replace(/punct/g,C).getRegex(),U=a(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),z=a(/^<(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(),F=a(b).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=a("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",F).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),K=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",K).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W=a(/^!?\[(label)\]\[(ref)\]/).replace("label",K).replace("ref",m).getRegex(),q=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",m).getRegex(),Z={_backpedal:s,anyPunctuation:U,autolink:z,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,br:T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:I,emStrongRDelimAst:R,emStrongRDelimUnd:P,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:q,punctuation:M,reflink:W,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",W).replace("nolink",q).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ee=e=>X[e];function te(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,ee)}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,ee);return e}function ne(e){try{e=encodeURI(e).replace(u.percentDecode,"%")}catch{return null}return e}function re(e,t){let n=e.replace(u.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(u.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ie(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ie(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ie(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ie(t[0],"\n").split("\n"),n="",r="",i=[];for(;e.length>0;){let t,o=!1,s=[];for(t=0;t1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;e;){let n=!1,r="",a="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let u=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),l=e.split("\n",1)[0],c=!u.trim(),f=0;if(this.options.pedantic?(f=2,a=u.trimStart()):c?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,a=u.slice(f),f+=t[1].length),c&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(f),n=this.rules.other.hrRegex(f),i=this.rules.other.fencesBeginRegex(f),o=this.rules.other.headingBeginRegex(f),s=this.rules.other.htmlBeginRegex(f);for(;e;){let d,h=e.split("\n",1)[0];if(l=h,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),d=l):d=l.replace(this.rules.other.tabCharGlobal," "),i.test(l)||o.test(l)||s.test(l)||t.test(l)||n.test(l))break;if(d.search(this.rules.other.nonSpaceChar)>=f||!l.trim())a+="\n"+d.slice(f);else{if(c||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(u)||o.test(u)||n.test(u))break;a+="\n"+l}!c&&!l.trim()&&(c=!0),r+=h+"\n",e=e.substring(h.length+1),u=d.slice(f)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let d,h=null;this.options.gfm&&(h=this.rules.other.listIsTask.exec(a),h&&(d="[ ] "!==h[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!h,checked:d,loose:!1,text:a,tokens:[]}),i.raw+=r}let a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){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){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ie(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),oe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return oe(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,o=[...r[0]].length-1,s=o,a=0,u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);null!=(r=u.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){s+=i;continue}if((r[5]||r[6])&&o%3&&!((o+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);let t=[...r[0]][0].length,u=e.slice(0,o+r.index+t+i);if(Math.min(o,i)%2){let e=u.slice(1,-1);return{type:"em",raw:u,text:e,tokens:this.lexer.inlineTokens(e)}}let l=u.slice(2,-2);return{type:"strong",raw:u,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ae=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:u,block:Y.normal,inline:Q.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=Q.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=Q.breaks:t.inline=Q.gfm),this.tokenizer.rules=t}static get rules(){return{block:Y,inline:Q}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(u.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=t.at(-1);n&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;let n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},ue=class{options;parser;constructor(e){this.options=e||i}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(u.notSpaceStart)?.[0],i=e.replace(u.endingNewline,"")+"\n";return r?'
'+(n?i:te(i,!0))+"
\n":"
"+(n?i:te(i,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+te(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${te(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ne(e);if(null===i)return r;let o='
    ",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ne(e);if(null===i)return te(n);let o=`${n}{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new ue(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new se(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new fe;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=e.hooks[r],o=t[r];fe.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>o.call(t,e));let n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ae.lex(e,t??this.defaults)}parser(e,t){return ce.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(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"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let s=i.hooks?i.hooks.provideLexer():e?ae.lex:ae.lexInline,a=i.hooks?i.hooks.provideParser():e?ce.parse:ce.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>a(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let e=s(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=a(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="

    An error occurred:

    "+te(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},he=new de;function pe(e,t){return he.parse(e,t)}pe.options=pe.setOptions=function(e){return he.setOptions(e),pe.defaults=he.defaults,o(pe.defaults),pe},pe.getDefaults=r,pe.defaults=i,pe.use=function(...e){return he.use(...e),pe.defaults=he.defaults,o(pe.defaults),pe},pe.walkTokens=function(e,t){return he.walkTokens(e,t)},pe.parseInline=he.parseInline,pe.Parser=ce,pe.parser=ce.parse,pe.Renderer=ue,pe.TextRenderer=le,pe.Lexer=ae,pe.lexer=ae.lex,pe.Tokenizer=se,pe.Hooks=fe,pe.parse=pe;var me=pe.options,ge=pe.setOptions,ye=pe.use,ve=pe.walkTokens,be=pe.parseInline,we=pe,_e=ce.parse,ke=ae.lex},182:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var r=n(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return r.default}});var i=n(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return i.default}});var o=n(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=n(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var a=n(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return a.default}});var u=n(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return u.default}});var l=n(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return l.default}});var c=n(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return c.default}});var f=n(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return f.default}});var d=n(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var h=n(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return h.default}});var p=n(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return p.default}});var m=n(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=n(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[3])<<4|n[4]>>4&15,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|15&n[6],n[7],(15&n[1])<<4|(240&n[2])>>4,(15&n[2])<<4|(240&n[3])>>4,16|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentNode=void 0;class n{constructor(e,t){this.id=e,this.content=t||"",this.created=Date.now(),this.type="text",this.archived=!1,this.deleted=!1}static Create(e){const t=new n(e.id,e.content);return t.type="text",t.created=e.created,t.lastUpdated=e.lastUpdated,t.archived=e.archived,t.archiveDate=e.archiveDate,t.deleted=e.deleted,t.deletedDate=e.deletedDate,t}setContent(e){this.content=e,this.lastUpdated=Date.now()}isArchived(){return!0===this.archived}isDeleted(){return!0===this.deleted}toggleArchiveStatus(){this.isArchived()?this.unarchive():this.archive()}unarchive(){this.archived=!1,this.archiveDate=null}archive(){this.archived=!0,this.archiveDate=Date.now()}undelete(){this.deleted=!1,this.deletedDate=null}delete(){this.deleted=!0,this.deletedDate=Date.now()}toJson(){return{id:this.id,created:this.created,lastUpdated:this.lastUpdated,type:this.type,content:this.content,archived:this.archived,archiveDate:this.archiveDate,deleted:this.deleted,deletedDate:this.deletedDate}}}t.ContentNode=n},338:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,n,i,o,s){return r((a=r(r(t,e),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function u(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let n=0;n<4*e.length;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}(function(e,t){const i=new Uint32Array(n(t)).fill(0);i.set(e),i[t>>5]|=128<>2]|=(255&e[n])<f.ContentNode.Create(e)),e=>e.id)}isTreeRoot(e){return this.data.id===e}findNodeInTree(e,t,n,r=!1){let i=r;i||u.each(e.children,(r,o)=>{if(r.id===t)return n(r,e),i=!0,!1;r.children&&this.findNodeInTree(r,t,n,i)})}fold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!0})}unfold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!1})}flattenOutlineTreeChildren(e){return e.children.map(e=>e.id)}liftNodeToParent(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{t=e,this.findNodeInTree(this.data.tree,i.id,(e,i)=>{if(r)return;n=i,r=!0;const o=i.children.map(e=>e.id),s=e.children.map(e=>e.id).indexOf(t.id),a=o.indexOf(e.id);e.children.splice(s,1),i.children.splice(a+1,0,t)})}),{targetNode:t,parentNode:n}}lowerNodeToChild(e){let t,n,r,i=!1;return this.findNodeInTree(this.data.tree,e,(e,o)=>{if(i)return;i=!0,t=e;let s=o.children.map(e=>e.id);if(1===s.length)return;const a=s.indexOf(t.id),u=a-1;o.children[u].children.splice(0,0,t),o.children.splice(a,1),n=o.children[u],r=o}),{targetNode:t,newParentNode:n,oldParentNode:r}}swapNodeWithNextSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id),o=i.indexOf(t.id);o!==i.length-1&&(n.children.splice(o,1),n.children.splice(o+1,0,t))}),{targetNode:t,parentNode:n}}swapNodeWithPreviousSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id).indexOf(t.id);0!==i&&(n.children.splice(i,1),n.children.splice(i-1,0,t))}),{targetNode:t,parentNode:n}}createSiblingNode(e,t){const n=t||new f.ContentNode((0,l.v4)());let r;return this.data.contentNodes[n.id]=n,this.findNodeInTree(this.data.tree,e,(t,i)=>{const o=i.children.map(e=>e.id).indexOf(e);i.children.splice(o+1,0,{id:n.id,collapsed:!1,children:[]}),r=i}),{node:n,parentNode:r}}createChildNode(e,t){const n=t?this.data.contentNodes[t]:new f.ContentNode((0,l.v4)());let r;return t||(this.data.contentNodes[n.id]=n),this.findNodeInTree(this.data.tree,e,(e,t)=>{e.children.unshift({id:n.id,children:[],collapsed:!1}),r=e}),{node:n,parentNode:r}}removeNode(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{if(r)return;r=!0,t=e,n=i;let o=n.children.map(e=>e.id).indexOf(e.id);n.children.splice(o,1)}),{removedNode:t,parentNode:n}}updateContent(e,t){if(!this.data.contentNodes[e])throw new Error("Invalid node");this.data.contentNodes[e].content=t}getContentNode(e){if(!this.data.contentNodes[e])throw new Error(`Invalid Node ${e}`);return this.data.contentNodes[e]}renderContent(e){return a(this,void 0,void 0,function*(){let t,n=this.getContentNode(e);if("text"===n.type){t=yield c.marked.parse(n.content);const e=h.DateTime.now(),r=(0,p.FindDate)(n.content);r.length&&r.forEach(t=>{e.startOf("day").toMillis()>t.toMillis()||(this.dates[t.toISODate()]||(this.dates[t.toISODate()]={}),this.dates[t.toISODate()][n.id]||(this.dates[t.toISODate()][n.id]={date:t,nodeId:n.id}))})}else t=n.content;return t})}renderDates(){let e=u.sortBy(Object.keys(this.dates).map(e=>h.DateTime.fromISO(e)),e=>e.toSeconds()).map(e=>`
  • ${e.toLocaleString({weekday:"long",day:"2-digit",month:"short"})}\n
    \n
      \n ${u.map(this.dates[e.toISODate()],e=>`
    1. \n ${c.marked.parse(this.getContentNode(e.nodeId).content.substr(0,100))}\n
    2. `).join("\n")}\n
    \n
  • `).join("\n");(0,m.$)("#dates").innerHTML=`
      ${e}
    `}renderNode(e){return a(this,void 0,void 0,function*(){if(e.id===this.data.id)return yield this.render();const t=this.data.contentNodes[e.id],n=e.collapsed?"collapsed":"expanded",r=t.isArchived()?"strikethrough":"",i=e.children.length?yield Promise.all(e.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)}))):[];let o=`
    \n
    \n ${yield this.renderContent(e.id)}\n
    \n ${i.join("\n")}\n
    `;return this.renderDates(),o})}render(){return a(this,void 0,void 0,function*(){return(yield Promise.all(this.data.tree.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)})))).join("\n")})}}},587:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.sidebarToggle=void 0;const i=n(876);t.sidebarToggle={context:"navigation",keys:["ctrl + ;"],description:"Toggle visibility of sidebar",action:e=>r(void 0,void 0,void 0,function*(){(0,i.$)("#sidebar").classList.toggle("hidden")})}},591:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(338),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(48,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},717:(e,t,n)=>{"use strict";var r,i,o,s,a,u=n(1889);const l="__TAURI_TO_IPC_KEY__";function c(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class f{constructor(e){r.set(this,void 0),i.set(this,0),o.set(this,[]),s.set(this,void 0),u.__classPrivateFieldSet(this,r,e||(()=>{}),"f"),this.id=c(e=>{const t=e.index;if("end"in e)return void(t==u.__classPrivateFieldGet(this,i,"f")?this.cleanupCallback():u.__classPrivateFieldSet(this,s,t,"f"));const n=e.message;if(t==u.__classPrivateFieldGet(this,i,"f")){for(u.__classPrivateFieldGet(this,r,"f").call(this,n),u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f");u.__classPrivateFieldGet(this,i,"f")in u.__classPrivateFieldGet(this,o,"f");){const e=u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")];u.__classPrivateFieldGet(this,r,"f").call(this,e),delete u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")],u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f")}u.__classPrivateFieldGet(this,i,"f")===u.__classPrivateFieldGet(this,s,"f")&&this.cleanupCallback()}else u.__classPrivateFieldGet(this,o,"f")[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){u.__classPrivateFieldSet(this,r,e,"f")}get onmessage(){return u.__classPrivateFieldGet(this,r,"f")}[(r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class d{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function h(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}a=new WeakMap,t.Channel=f,t.PluginListener=d,t.Resource=class{get rid(){return u.__classPrivateFieldGet(this,a,"f")}constructor(e){a.set(this,void 0),u.__classPrivateFieldSet(this,a,e,"f")}async close(){return h("plugin:resources|close",{rid:this.rid})}},t.SERIALIZE_TO_IPC_FN=l,t.addPluginListener=async function(e,t,n){const r=new f(n);return h(`plugin:${e}|registerListener`,{event:t,handler:r}).then(()=>new d(e,t,r.id))},t.checkPermissions=async function(e){return h(`plugin:${e}|check_permissions`)},t.convertFileSrc=function(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)},t.invoke=h,t.isTauri=function(){return!!(globalThis||window).isTauri},t.requestPermissions=async function(e){return h(`plugin:${e}|request_permissions`)},t.transformCallback=c},763:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;const o=n(1730),s=n(2543),a=i(n(935)),u=n(876);t.Search=class{constructor(){this.state="notready",this.bindEvents()}createIndex(e){return r(this,void 0,void 0,function*(){this.schema=e,this.state="notready",this.db=yield(0,o.create)({schema:e}),this.state="ready"})}bindEvents(){a.default.withContext("search",()=>{a.default.bind("escape",e=>{document.querySelector(".modal").remove(),a.default.setContext("navigation"),console.log("switch to navigation context")}),a.default.bind("down",e=>{e.preventDefault(),document.getElementById("search-query").blur();const t=document.querySelector(".search-result.selected");t.nextElementSibling&&(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected"),(0,u.isVisible)(t.nextElementSibling)||t.nextElementSibling.scrollIntoView())}),a.default.bind("up",e=>{e.preventDefault();const t=document.querySelector(".search-result.selected");t.previousElementSibling&&(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected"),(0,u.isVisible)(t.previousElementSibling)||t.previousElementSibling.scrollIntoView())}),a.default.bind("enter",e=>{const t=document.querySelector(".search-result.selected").getAttribute("data-id");document.querySelector(".modal").remove(),a.default.setContext("navigation"),this.onTermSelection&&this.onTermSelection(t)})}),a.default.withContext("navigation",()=>{a.default.bind("shift + f",e=>{e.preventDefault(),e.stopPropagation(),document.querySelector("body").innerHTML+='\n\n';const t=document.getElementById("search-query");t.focus(),t.addEventListener("keyup",this.debounceSearch.bind(this)),a.default.setContext("search")})})}debounceSearch(e){this.debounce&&clearInterval(this.debounce);const t=e.target.value.toString().trim();t.length&&(this.debounce=setTimeout(()=>{this.displaySearch(t,e)},100))}displaySearch(e,t){return r(this,void 0,void 0,function*(){if(!this.state)return;const t=yield this.search(e),n=document.getElementById("search-results");if(0===t.hits.length)return void(n.innerHTML="
  • No Results
  • ");const r=t.hits.map((e,t)=>{const n=e.document.content.toString(),r=n.substring(0,100);return`\n
  • ${r}${n.length>r.length?"...":""}
  • \n `});n.innerHTML=r.join("\n")})}indexDoc(e){return(0,o.insert)(this.db,e)}indexBatch(e){return(0,o.insertBatch)(this.db,(0,s.map)(e,e=>e.toJson()))}search(e){return(0,o.search)(this.db,{term:e.trim(),properties:["content"]})}replace(e){return r(this,void 0,void 0,function*(){yield(0,o.remove)(this.db,e.id),yield(0,o.insert)(this.db,e.toJson())})}reset(){return this.createIndex(this.schema)}}},876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVisible=function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},t.$=function(e,t){return(t||document).querySelector(e)},t.$$=function(e,t){return Array.from((t||document).querySelectorAll(e))}},935:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&s.splice(l,1)}if(0!==s.length)return!1}return!0}},{key:"_checkSubCombo",value:function(e,t,r){e=e.slice(0),r=r.slice(t);for(var i=t,o=0;o-1&&(e.splice(o,1),o-=1,u>i&&(i=u),0===e.length))return i}return-1}}]),n}();a.comboDeliminator=">",a.keyDeliminator="+",a.parseComboStr=function(e){for(var t=a._splitStr(e,a.comboDeliminator),n=[],r=0;r0&&n[s]===r&&"\\"!==n[s-1]&&(o.push(i.trim()),i="",s+=1),i+=n[s];return i&&o.push(i.trim()),o};var u=function(){function e(n){t(this,e),this.localeName=n,this.activeTargetKeys=[],this.pressedKeys=[],this._appliedMacros=[],this._keyMap={},this._killKeyCodes=[],this._macros=[]}return i(e,[{key:"bindKeyCode",value:function(e,t){"string"==typeof t&&(t=[t]),this._keyMap[e]=t}},{key:"bindMacro",value:function(e,t){"string"==typeof t&&(t=[t]);var n=null;"function"==typeof t&&(n=t,t=null);var r={keyCombo:new a(e),keyNames:t,handler:n};this._macros.push(r)}},{key:"getKeyCodes",value:function(e){var t=[];for(var n in this._keyMap)this._keyMap[n].indexOf(e)>-1&&t.push(0|n);return t}},{key:"getKeyNames",value:function(e){return this._keyMap[e]||[]}},{key:"setKillKey",value:function(e){if("string"!=typeof e)this._killKeyCodes.push(e);else for(var t=this.getKeyCodes(e),n=0;n-1&&this.pressedKeys.splice(o,1)}this.activeTargetKeys.length=0,this._clearMacros()}}},{key:"_applyMacros",value:function(){for(var e=this._macros.slice(0),t=0;t-1&&this.pressedKeys.splice(r,1)}t.handler&&(t.keyNames=null),this._appliedMacros.splice(e,1),e-=1}}}}]),e}(),l=function(){function r(e,n,i,o){t(this,r),this._locale=null,this._currentContext="",this._contexts={},this._listeners=[],this._appliedListeners=[],this._locales={},this._targetElement=null,this._targetWindow=null,this._targetPlatform="",this._targetUserAgent="",this._isModernBrowser=!1,this._targetKeyDownBinding=null,this._targetKeyUpBinding=null,this._targetResetBinding=null,this._paused=!1,this._contexts.global={listeners:this._listeners,targetWindow:e,targetElement:n,targetPlatform:i,targetUserAgent:o},this.setContext("global")}return i(r,[{key:"setLocale",value:function(e,t){var n=null;return"string"==typeof e?t?t(n=new u(e),this._targetPlatform,this._targetUserAgent):n=this._locales[e]||null:e=(n=e)._localeName,this._locale=n,this._locales[e]=n,n&&(this._locale.pressedKeys=n.pressedKeys),this}},{key:"getLocale",value:function(e){return e||(e=this._locale.localeName),this._locales[e]||null}},{key:"bind",value:function(t,n,r,i){if(null!==t&&"function"!=typeof t||(i=r,r=n,n=t,t=null),t&&"object"===e(t)&&"number"==typeof t.length){for(var o=0;o"]),e.bindMacro("shift + /",["questionmark","?"]),t.match("Mac")?e.bindMacro("command",["mod","modifier"]):e.bindMacro("ctrl",["mod","modifier"]);for(var r=65;r<=90;r+=1){var i=String.fromCharCode(r+32),o=String.fromCharCode(r);e.bindKeyCode(r,i),e.bindMacro("shift + "+i,o),e.bindMacro("capslock + "+i,o)}var s,a,u=n.match("Firefox")?59:186,l=n.match("Firefox")?173:189,c=n.match("Firefox")?61:187;t.match("Mac")&&(n.match("Safari")||n.match("Chrome"))?(s=91,a=93):t.match("Mac")&&n.match("Opera")?(s=17,a=17):t.match("Mac")&&n.match("Firefox")&&(s=224,a=224),e.bindKeyCode(u,["semicolon",";"]),e.bindKeyCode(l,["dash","-"]),e.bindKeyCode(c,["equal","equalsign","="]),e.bindKeyCode(s,["command","windows","win","super","leftcommand","leftwindows","leftwin","leftsuper"]),e.bindKeyCode(a,["command","windows","win","super","rightcommand","rightwindows","rightwin","rightsuper"]),e.setKillKey("command")}),c.Keyboard=l,c.Locale=u,c.KeyCombo=a,c}()},1031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.slugify=function(e){return e.toLowerCase().split(" ").join("_")}},1062:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.l=void 0,t.l={context:"navigation",keys:["l"],description:"Move the cursor to the first child element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e;if(!t.shiftKey){if(n.isNodeCollapsed())return;const e=n.get().querySelector(".node");e&&n.set(`#id-${e.getAttribute("data-id")}`)}})}},1169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends n{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class o extends n{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class s extends n{}class a extends n{constructor(e){super(`Invalid unit ${e}`)}}class u extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const c="numeric",f="short",d="long",h={year:c,month:c,day:c},p={year:c,month:f,day:c},m={year:c,month:f,day:c,weekday:f},g={year:c,month:d,day:c},y={year:c,month:d,day:c,weekday:d},v={hour:c,minute:c},b={hour:c,minute:c,second:c},w={hour:c,minute:c,second:c,timeZoneName:f},_={hour:c,minute:c,second:c,timeZoneName:d},k={hour:c,minute:c,hourCycle:"h23"},x={hour:c,minute:c,second:c,hourCycle:"h23"},S={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:f},O={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:d},T={year:c,month:c,day:c,hour:c,minute:c},C={year:c,month:c,day:c,hour:c,minute:c,second:c},D={year:c,month:f,day:c,hour:c,minute:c},N={year:c,month:f,day:c,hour:c,minute:c,second:c},M={year:c,month:f,day:c,weekday:f,hour:c,minute:c},E={year:c,month:d,day:c,hour:c,minute:c,timeZoneName:f},L={year:c,month:d,day:c,hour:c,minute:c,second:c,timeZoneName:f},I={year:c,month:d,day:c,weekday:d,hour:c,minute:c,timeZoneName:d},A={year:c,month:d,day:c,weekday:d,hour:c,minute:c,second:c,timeZoneName:d};class ${get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(e,t){throw new l}formatOffset(e,t){throw new l}offset(e){throw new l}equals(e){throw new l}get isValid(){throw new l}}let R=null;class j extends ${static get instance(){return null===R&&(R=new j),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const P=new Map,U={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},z=new Map;class F extends ${static create(e){let t=z.get(e);return void 0===t&&z.set(e,t=new F(e)),t}static resetCache(){z.clear(),P.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n,this.name)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=P.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),P.set(e,t)),t}(this.name);let[r,i,o,s,a,u,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e=0?f:1e3+f,(Xe({year:r,month:i,day:o,hour:24===a?0:a,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let B={};const K=new Map;function V(e,t={}){const n=JSON.stringify([e,t]);let r=K.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),K.set(n,r)),r}const W=new Map,q=new Map;let Z=null;const H=new Map;function G(e){let t=H.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),H.set(e,t)),t}const J=new Map;function Y(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=W.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),W.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return We(this.floor?Math.floor(e):Ge(e,3),this.padTo)}}class X{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=V(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ee{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ue()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=q.get(i);return void 0===o&&(o=new Intl.RelativeTimeFormat(e,t),q.set(i,o)),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),u=1===a,l=i[e],c=r?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const te={firstDay:1,minimalDays:4,weekend:[6,7]};class ne{static fromOpts(e){return ne.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const o=e||we.defaultLocale,s=o||(i?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=t||we.defaultNumberingSystem,u=n||we.defaultOutputCalendar,l=Ke(r)||we.defaultWeekSettings;return new ne(s,a,u,l,o)}static resetCache(){Z=null,K.clear(),W.clear(),q.clear(),H.clear(),J.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ne.create(e,t,n,r)}constructor(e,t,n,r,i){const[o,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=V(e).resolvedOptions(),r=e}catch(i){const o=e.substring(0,n);t=V(o).resolvedOptions(),r=o}const{numberingSystem:i,calendar:o}=t;return[r,i,o]}}(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===G(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ne.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Y(this,e,dt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=mr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Y(this,e,gt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=mr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Y(this,void 0,()=>yt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[mr.utc(2016,11,13,9),mr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Y(this,e,_t,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[mr.utc(-40,1,1),mr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new X(e,this.intl,t)}relFormatter(e={}){return new ee(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=B[n];return r||(r=new Intl.ListFormat(e,t),B[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||G(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ze()?function(e){let t=J.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...te,...t}),J.set(e,t)}return t}(this.locale):te}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let re=null;class ie extends ${static get utcInstance(){return null===re&&(re=new ie(0)),re}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${at(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${at(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return at(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class oe extends ${constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function se(e,t){if(Re(e)||null===e)return t;if(e instanceof $)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?j.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||F.create(e)}return je(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new oe(e)}const ae={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ue={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},le=ae.hanidec.replace(/[\[|\]]/g,"").split(""),ce=new Map;function fe({numberingSystem:e},t=""){const n=e||"latn";let r=ce.get(n);void 0===r&&(r=new Map,ce.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${ae[n]}${t}`),r.set(t,i)),i}let de,he=()=>Date.now(),pe="system",me=null,ge=null,ye=null,ve=60,be=null;class we{static get now(){return he}static set now(e){he=e}static set defaultZone(e){pe=e}static get defaultZone(){return se(pe,j.instance)}static get defaultLocale(){return me}static set defaultLocale(e){me=e}static get defaultNumberingSystem(){return ge}static set defaultNumberingSystem(e){ge=e}static get defaultOutputCalendar(){return ye}static set defaultOutputCalendar(e){ye=e}static get defaultWeekSettings(){return be}static set defaultWeekSettings(e){be=Ke(e)}static get twoDigitCutoffYear(){return ve}static set twoDigitCutoffYear(e){ve=e%100}static get throwOnInvalid(){return de}static set throwOnInvalid(e){de=e}static resetCaches(){ne.resetCache(),F.resetCache(),mr.resetCache(),ce.clear()}}class _e{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ke=[0,31,59,90,120,151,181,212,243,273,304,334],xe=[0,31,60,91,121,152,182,213,244,274,305,335];function Se(e,t){return new _e("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Oe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function Te(e,t,n){return n+(Je(e)?xe:ke)[t-1]}function Ce(e,t){const n=Je(e)?xe:ke,r=n.findIndex(e=>ett(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...ut(e)}}function Me(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:o}=e,s=De(Oe(r,1,t),n),a=Ye(r);let u,l=7*i+o-s-7+t;l<1?(u=r-1,l+=Ye(u)):l>a?(u=r+1,l-=Ye(r)):u=r;const{month:c,day:f}=Ce(u,l);return{year:u,month:c,day:f,...ut(e)}}function Ee(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Te(t,n,r),...ut(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:i}=Ce(t,n);return{year:t,month:r,day:i,...ut(e)}}function Ie(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new s("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ae(e){const t=Pe(e.year),n=Ve(e.month,1,12),r=Ve(e.day,1,Qe(e.year,e.month));return t?n?!r&&Se("day",e.day):Se("month",e.month):Se("year",e.year)}function $e(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=Ve(t,0,23)||24===t&&0===n&&0===r&&0===i,s=Ve(n,0,59),a=Ve(r,0,59),u=Ve(i,0,999);return o?s?a?!u&&Se("millisecond",i):Se("second",r):Se("minute",n):Se("hour",t)}function Re(e){return void 0===e}function je(e){return"number"==typeof e}function Pe(e){return"number"==typeof e&&e%1==0}function Ue(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Fe(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function Be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ke(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!Ve(e.firstDay,1,7)||!Ve(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ve(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ve(e,t,n){return Pe(e)&&e>=t&&e<=n}function We(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qe(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Ze(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function He(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ge(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Je(e){return e%4==0&&(e%100!=0||e%400==0)}function Ye(e){return Je(e)?366:365}function Qe(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?Je(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Xe(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function et(e,t,n){return-De(Oe(e,1,t),n)+t-1}function tt(e,t=4,n=1){const r=et(e,t,n),i=et(e+1,t,n);return(Ye(e)-r+i)/7}function nt(e){return e>99?e:e>we.twoDigitCutoffYear?1900+e:2e3+e}function rt(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ot(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function st(e,t){const n={};for(const r in e)if(Be(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=ot(i)}return n}function at(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${We(n,2)}:${We(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${We(n,2)}${We(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const lt=["January","February","March","April","May","June","July","August","September","October","November","December"],ct=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=["J","F","M","A","M","J","J","A","S","O","N","D"];function dt(e){switch(e){case"narrow":return[...ft];case"short":return[...ct];case"long":return[...lt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ht=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],mt=["M","T","W","T","F","S","S"];function gt(e){switch(e){case"narrow":return[...mt];case"short":return[...pt];case"long":return[...ht];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const yt=["AM","PM"],vt=["Before Christ","Anno Domini"],bt=["BC","AD"],wt=["B","A"];function _t(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...vt];default:return null}}function kt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const xt={D:h,DD:p,DDD:g,DDDD:y,t:v,tt:b,ttt:w,tttt:_,T:k,TT:x,TTT:S,TTTT:O,f:T,ff:D,fff:E,ffff:I,F:C,FF:N,FFF:L,FFFF:A};class St{static create(e,t={}){return new St(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let o=0;o0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return xt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return We(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,r)=>n?function(e,t){return dt(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),a=(t,r)=>n?function(e,t){return gt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=St.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?function(e,t){return _t(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return kt(St.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return yt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=St.parseFormat(t),o=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),s=e.shiftTo(...o.map(r).filter(e=>e));return kt(i,((e,t)=>i=>{const o=r(i);if(o){const r=t.isNegativeDuration&&o!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&o!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(o)*r,i.length,s)}return i})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const Ot=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Tt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ct(...e){return t=>e.reduce(([e,n,r],i)=>{const[o,s,a]=i(t,r);return[{...e,...o},s||n,a]},[{},null,1]).slice(0,2)}function Dt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Nt(...e){return(t,n)=>{const r={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:d(Ze(n)),months:d(Ze(r)),weeks:d(Ze(i)),days:d(Ze(o)),hours:d(Ze(s)),minutes:d(Ze(a)),seconds:d(Ze(u),"-0"===u),milliseconds:d(He(l),f)}]}const Wt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function qt(e,t,n,r,i,o,s){const a={year:2===t.length?nt(qe(t)):qe(t),month:ct.indexOf(n)+1,day:qe(r),hour:qe(i),minute:qe(o)};return s&&(a.second=qe(s)),e&&(a.weekday=e.length>3?ht.indexOf(e)+1:pt.indexOf(e)+1),a}const Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ht(e){const[,t,n,r,i,o,s,a,u,l,c,f]=e,d=qt(t,i,r,n,o,s,a);let h;return h=u?Wt[u]:l?0:it(c,f),[d,new ie(h)]}const Gt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Jt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Yt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,i,r,n,o,s,a),ie.utcInstance]}function Xt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,a,n,r,i,o,s),ie.utcInstance]}const en=Tt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,It),tn=Tt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,It),nn=Tt(/(\d{4})-?(\d{3})/,It),rn=Tt(Lt),on=Ct(function(e,t){return[{year:Pt(e,t),month:Pt(e,t+1,1),day:Pt(e,t+2,1)},null,t+3]},Ut,zt,Ft),sn=Ct(At,Ut,zt,Ft),an=Ct($t,Ut,zt,Ft),un=Ct(Ut,zt,Ft),ln=Ct(Ut),cn=Tt(/(\d{4})-(\d\d)-(\d\d)/,jt),fn=Tt(Rt),dn=Ct(Ut,zt,Ft),hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},gn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vn=yn.slice(0).reverse();function bn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new xn(r)}function wn(e,t){var n;let r=null!=(n=t.milliseconds)?n:0;for(const n of vn.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function _n(e,t){const n=wn(e,t)<0?-1:1;yn.reduceRight((r,i)=>{if(Re(t[i]))return r;if(r){const o=t[r]*n,s=e[i][r],a=Math.floor(o/s);t[i]+=a*n,t[r]-=a*s*n}return i},null),yn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function kn(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class xn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?gn:mn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ne.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return xn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new xn({values:st(e,xn.normalizeUnit),loc:ne.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(je(e))return xn.fromMillis(e);if(xn.isDuration(e))return e;if("object"==typeof e)return xn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Dt(e,[Kt,Vt])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Dt(e,[Bt,ln])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new o(n);return new xn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?St.create(this.loc,n).formatDurationFromString(this,e):hn}toHuman(e={}){if(!this.isValid)return hn;const t=!1!==e.showZeros,n=yn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ge(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},mr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e),n={};for(const e of yn)(Be(t.values,e)||Be(this.values,e))&&(n[e]=t.get(e)+this.get(e));return bn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ot(e(this.values[n],n));return bn(this,{values:t},!0)}get(e){return this[xn.normalizeUnit(e)]}set(e){return this.isValid?bn(this,{values:{...this.values,...st(e,xn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return bn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return _n(this.matrix,e),bn(this,{values:e},!0)}rescale(){return this.isValid?bn(this,{values:kn(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>xn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const o of yn)if(e.indexOf(o)>=0){i=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;je(r[o])&&(e+=r[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3}else je(r[o])&&(n[o]=r[o]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return _n(this.matrix,t),bn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return bn(this,{values:e},!0)}removeZeros(){return this.isValid?bn(this,{values:kn(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of yn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Sn="Invalid Interval";class On{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new i(n);return new On({invalid:n})}static fromDateTimes(e,t){const n=gr(e),r=gr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?On.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(gr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r+this.e?this.e:e;n.push(On.fromDateTimes(r,o)),r=o,i+=1}return n}splitBy(e){const t=xn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const o=[];for(;re*i));n=+e>+this.e?this.e:e,o.push(On.fromDateTimes(r,n)),r=n,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:On.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return On.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),o=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(On.fromDateTimes(t,e.time)),t=null);return On.merge(r)}difference(...e){return On.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Sn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=h,t={}){return this.isValid?St.create(this.s.loc.clone(t),e).formatInterval(this):Sn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Sn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Sn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Sn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Sn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xn.invalid(this.invalidReason)}mapEndpoints(e){return On.fromDateTimes(e(this.s),e(this.e))}}class Tn{static hasDST(e=we.defaultZone){const t=mr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return se(e,we.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ne.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ne.create(t,null,"gregory").eras(e)}static features(){return{relative:Ue(),localeWeek:ze()}}}function Cn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(xn.fromMillis(r).as("days"))}function Dn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Nn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Nn,"g");function En(e){return e.replace(/\./g,"\\.?").replace(Mn,Nn)}function Ln(e){return e.replace(/\./g,"").replace(Mn," ").toLowerCase()}function In(e,t){return null===e?null:{regex:RegExp(e.map(En).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function An(e,t){return{regex:e,deser:([,e,t])=>it(e,t),groups:t}}function $n(e){return{regex:e,deser:([e])=>e}}const Rn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let jn=null;function Pn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Fn(St.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Un{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Pn(St.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=fe(t),r=fe(t,"{2}"),i=fe(t,"{3}"),o=fe(t,"{4}"),s=fe(t,"{6}"),a=fe(t,"{1,2}"),u=fe(t,"{1,3}"),l=fe(t,"{1,6}"),c=fe(t,"{1,9}"),f=fe(t,"{2,4}"),d=fe(t,"{4,6}"),h=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return h(p);switch(p.val){case"G":return In(t.eras("short"),0);case"GG":return In(t.eras("long"),0);case"y":return Dn(l);case"yy":case"kk":return Dn(f,nt);case"yyyy":case"kkkk":return Dn(o);case"yyyyy":return Dn(d);case"yyyyyy":return Dn(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Dn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Dn(r);case"MMM":return In(t.months("short",!0),1);case"MMMM":return In(t.months("long",!0),1);case"LLL":return In(t.months("short",!1),1);case"LLLL":return In(t.months("long",!1),1);case"o":case"S":return Dn(u);case"ooo":case"SSS":return Dn(i);case"u":return $n(c);case"uu":return $n(a);case"uuu":case"E":case"c":return Dn(n);case"a":return In(t.meridiems(),0);case"EEE":return In(t.weekdays("short",!1),1);case"EEEE":return In(t.weekdays("long",!1),1);case"ccc":return In(t.weekdays("short",!0),1);case"cccc":return In(t.weekdays("long",!0),1);case"Z":case"ZZ":return An(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return An(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return h(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(Be(n,i)){const o=n[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,o]=n?function(e){let t,n=null;return Re(e.z)||(n=F.create(e.z)),Re(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Re(e.u)||(e.S=He(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(Be(n,"a")&&Be(n,"H"))throw new s("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function zn(e,t,n){return new Un(e,n).explainFromTokens(t)}function Fn(e,t){if(!e)return null;const n=St.create(t,e).dtFormatter((jn||(jn=mr.fromMillis(1555555555555)),jn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const o=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Rn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(t,e,i))}const Bn="Invalid DateTime",Kn=864e13;function Vn(e){return new _e("unsupported zone",`the zone "${e.name}" is not supported`)}function Wn(e){return null===e.weekData&&(e.weekData=Ne(e.c)),e.weekData}function qn(e){return null===e.localWeekData&&(e.localWeekData=Ne(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Zn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new mr({...n,...t,old:n})}function Hn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Gn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Jn(e,t,n){return Hn(Xe(e),t,n)}function Yn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:r,month:i,day:Math.min(e.c.day,Qe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Xe(o);let[u,l]=Hn(a,n,e.zone);return 0!==s&&(u+=s,l=e.zone.offset(u)),{ts:u,o:l}}function Qn(e,t,n,r,i,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,i=mr.fromObject(e,{...n,zone:r,specificOffset:o});return s?i:i.setZone(a)}return mr.invalid(new _e("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Xn(e,t,n=!0){return e.isValid?St.create(ne.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=We(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=We(e.c.month),"month"===n)return i;i+="-"}else if(i+=We(e.c.month),"month"===n)return i;return i+=We(e.c.day),i}function tr(e,t,n,r,i,o,s){let a=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(s){case"day":case"month":case"year":break;default:if(u+=We(e.c.hour),"hour"===s)break;if(t){if(u+=":",u+=We(e.c.minute),"minute"===s)break;a&&(u+=":",u+=We(e.c.second))}else{if(u+=We(e.c.minute),"minute"===s)break;a&&(u+=We(e.c.second))}if("second"===s)break;!a||r&&0===e.c.millisecond||(u+=".",u+=We(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!o?u+="Z":e.o<0?(u+="-",u+=We(Math.trunc(-e.o/60)),u+=":",u+=We(Math.trunc(-e.o%60))):(u+="+",u+=We(Math.trunc(e.o/60)),u+=":",u+=We(Math.trunc(e.o%60)))),o&&(u+="["+e.zone.ianaName+"]"),u}const nr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},or=["year","month","day","hour","minute","second","millisecond"],sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ar=["year","ordinal","hour","minute","second","millisecond"];function ur(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new a(e);return t}function lr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ur(e)}}function cr(e,t){const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t);let i,o;if(Re(e.year))i=we.now();else{for(const t of or)Re(e[t])&&(e[t]=nr[t]);const t=Ae(e)||$e(e);if(t)return mr.invalid(t);const r=function(e){if(void 0===hr&&(hr=we.now()),"iana"!==e.type)return e.offset(hr);const t=e.name;let n=pr.get(t);return void 0===n&&(n=e.offset(hr),pr.set(t,n)),n}(n);[i,o]=Jn(e,r,n)}return new mr({ts:i,zone:n,loc:r,o})}function fr(e,t,n){const r=!!Re(n.round)||n.round,i=Re(n.rounding)?"trunc":n.rounding,o=(e,o)=>(e=Ge(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,o)),s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return o(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return o(t,e)}return o(e>t?-0:0,n.units[n.units.length-1])}function dr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let hr;const pr=new Map;class mr{constructor(e){const t=e.zone||we.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Vn(t));this.ts=Re(e.ts)?we.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=je(e.o)&&!e.old?e.o:t.offset(this.ts);r=Gn(this.ts,o),n=Number.isNaN(r.year)?new _e("invalid input"):null,r=n?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||ne.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new mr({})}static local(){const[e,t]=dr(arguments),[n,r,i,o,s,a,u]=t;return cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static utc(){const[e,t]=dr(arguments),[n,r,i,o,s,a,u]=t;return e.zone=ie.utcInstance,cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return mr.invalid("invalid input");const i=se(t.zone,we.defaultZone);return i.isValid?new mr({ts:n,zone:i,loc:ne.fromObject(t)}):mr.invalid(Vn(i))}static fromMillis(e,t={}){if(je(e))return e<-Kn||e>Kn?mr.invalid("Timestamp out of range"):new mr({ts:e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(je(e))return new mr({ts:1e3*e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t),i=st(e,lr),{minDaysInFirstWeek:o,startOfWeek:a}=Ie(i,r),u=we.now(),l=Re(t.specificOffset)?n.offset(u):t.specificOffset,c=!Re(i.ordinal),f=!Re(i.year),d=!Re(i.month)||!Re(i.day),h=f||d,p=i.weekYear||i.weekNumber;if((h||c)&&p)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new s("Can't mix ordinal dates with month/day");const m=p||i.weekday&&!h;let g,y,v=Gn(u,l);m?(g=sr,y=rr,v=Ne(v,o,a)):c?(g=ar,y=ir,v=Ee(v)):(g=or,y=nr);let b=!1;for(const e of g)Re(i[e])?i[e]=b?y[e]:v[e]:b=!0;const w=m?function(e,t=4,n=1){const r=Pe(e.weekYear),i=Ve(e.weekNumber,1,tt(e.weekYear,t,n)),o=Ve(e.weekday,1,7);return r?i?!o&&Se("weekday",e.weekday):Se("week",e.weekNumber):Se("weekYear",e.weekYear)}(i,o,a):c?function(e){const t=Pe(e.year),n=Ve(e.ordinal,1,Ye(e.year));return t?!n&&Se("ordinal",e.ordinal):Se("year",e.year)}(i):Ae(i),_=w||$e(i);if(_)return mr.invalid(_);const k=m?Me(i,o,a):c?Le(i):i,[x,S]=Jn(k,l,n),O=new mr({ts:x,zone:n,o:S,loc:r});return i.weekday&&h&&e.weekday!==O.weekday?mr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${O.toISO()}`):O.isValid?O:mr.invalid(O.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Dt(e,[en,on],[tn,sn],[nn,an],[rn,un])}(e);return Qn(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Dt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Zt,Ht])}(e);return Qn(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Dt(e,[Gt,Qt],[Jt,Qt],[Yt,Xt])}(e);return Qn(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[s,a,l,c]=function(e,t,n){const{result:r,zone:i,specificOffset:o,invalidReason:s}=zn(e,t,n);return[r,i,o,s]}(o,e,t);return c?mr.invalid(c):Qn(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return mr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Dt(e,[cn,on],[fn,dn])}(e);return Qn(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new r(n);return new mr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Fn(e,ne.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Pn(St.parseFormat(e),ne.fromObject(t)).map(e=>e.val).join("")}static resetCache(){hr=void 0,pr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wn(this).weekYear:NaN}get weekNumber(){return this.isValid?Wn(this).weekNumber:NaN}get weekday(){return this.isValid?Wn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qn(this).weekday:NaN}get localWeekNumber(){return this.isValid?qn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qn(this).weekYear:NaN}get ordinal(){return this.isValid?Ee(this.c).ordinal:NaN}get monthShort(){return this.isValid?Tn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Tn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Tn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Tn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Xe(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),o=this.zone.offset(n-r*t),s=this.zone.offset(n-i*t);if(o===s)return[this];const a=n-o*t,u=n-s*t,l=Gn(a,o),c=Gn(u,s);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:u})]:[this]}get isInLeapYear(){return Je(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Ye(this.year):NaN}get weeksInWeekYear(){return this.isValid?tt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?tt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=St.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(we.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=se(e,we.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Jn(n,t,e)}return Zn(this,{ts:r,zone:e})}return mr.invalid(Vn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=st(e,lr),{minDaysInFirstWeek:n,startOfWeek:r}=Ie(t,this.loc),i=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),o=!Re(t.ordinal),a=!Re(t.year),u=!Re(t.month)||!Re(t.day),l=a||u,c=t.weekYear||t.weekNumber;if((l||o)&&c)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new s("Can't mix ordinal dates with month/day");let f;i?f=Me({...Ne(this.c,n,r),...t},n,r):Re(t.ordinal)?(f={...this.toObject(),...t},Re(t.day)&&(f.day=Math.min(Qe(f.year,f.month),f.day))):f=Le({...Ee(this.c),...t});const[d,h]=Jn(f,this.o,this.zone);return Zn(this,{ts:d,o:h})}plus(e){return this.isValid?Zn(this,Yn(this,xn.fromDurationLike(e))):this}minus(e){return this.isValid?Zn(this,Yn(this,xn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=xn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t=3&&(a+="T"),a+=tr(this,s,t,n,r,i,o),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?er(this,"extended"===e,ur(t)):null}toISOWeekDate(){return Xn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended",precision:s="milliseconds"}={}){return this.isValid?(s=ur(s),(r&&or.indexOf(s)>=3?"T":"")+tr(this,"extended"===o,t,e,n,i,s)):null}toRFC2822(){return Xn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?er(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Xn(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Bn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return xn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(a=t,Array.isArray(a)?a:[a]).map(xn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=function(e,t,n,r){let[i,o,s,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Cn(e,t);return(n-n%7)/7}],["days",Cn]],i={},o=e;let s,a;for(const[u,l]of r)n.indexOf(u)>=0&&(s=u,i[u]=l(e,t),a=o.plus(i),a>t?(i[u]--,(e=o.plus(i))>t&&(a=e,i[u]--,e=o.plus(i))):e=a);return[e,i,a,s]}(e,t,n);const u=t-i,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(s0?xn.fromMillis(u,r).shiftTo(...l).plus(c):c}(o?this:e,o?e:this,i,r);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(mr.now(),e,t)}until(e){return this.isValid?On.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||mr.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(mr.isDateTime))throw new u("max requires all arguments be DateTimes");return Fe(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return zn(ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return mr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=ne.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Un(i,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?mr.invalid(c):Qn(s,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return h}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return g}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return v}static get TIME_WITH_SECONDS(){return b}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return _}static get TIME_24_SIMPLE(){return k}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return O}static get DATETIME_SHORT(){return T}static get DATETIME_SHORT_WITH_SECONDS(){return C}static get DATETIME_MED(){return D}static get DATETIME_MED_WITH_SECONDS(){return N}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return E}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return A}}function gr(e){if(mr.isDateTime(e))return e;if(e&&e.valueOf&&je(e.valueOf()))return mr.fromJSDate(e);if(e&&"object"==typeof e)return mr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=mr,t.Duration=xn,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=Tn,t.Interval=On,t.InvalidZone=oe,t.Settings=we,t.SystemZone=j,t.VERSION="3.7.1",t.Zone=$},1238:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeEditing=void 0;const o=i(n(935));t.escapeEditing={context:"editing",keys:["esc","enter"],description:'Stop editing the current node and return to "navigation" mode',action:e=>r(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,api:r,search:i}=e;t.get().classList.remove("hidden-cursor");const s=t.get().querySelector(".nodeContent");s.contentEditable="false",s.blur(),o.default.setContext("navigation"),n.updateContent(t.getIdOfNode(),s.innerHTML.trim()),s.innerHTML=yield n.renderContent(t.getIdOfNode()),n.renderDates(),r.saveContentNode(n.getContentNode(t.getIdOfNode()))})}},1425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),n??=0,r??=16383&(e[8]<<8|e[9]),i??=e.slice(10,16);const a=(1e4*(268435455&(t+=122192928e5))+n)%4294967296;o[s++]=a>>>24&255,o[s++]=a>>>16&255,o[s++]=a>>>8&255,o[s++]=255&a;const u=t/4294967296*1e4&268435455;o[s++]=u>>>8&255,o[s++]=255&u,o[s++]=u>>>24&15|16,o[s++]=u>>>16&255,o[s++]=r>>>8|128,o[s++]=255&r;for(let e=0;e<6;++e)o[s++]=i[e];return o}t.updateV1State=s,t.default=function(e,t,n){let u;const l=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.nsecs,l?void 0:o.clockseq,l?void 0:o.node,t,n)}return t??(0,i.unsafeStringify)(u)}},1730:(e,t,n)=>{"use strict";let r,i,o,s,a,u,l,c,f,d;async function h(...e){if(!r){const e=await Promise.all([n.e(269),n.e(915)]).then(n.bind(n,9915));r=e.create}return r(...e)}async function p(...e){if(!i){const e=await n.e(164).then(n.bind(n,1164));i=e.insert}return i(...e)}async function m(...e){if(!o){const e=await n.e(164).then(n.bind(n,1164));o=e.insertWithHooks}return o(...e)}async function g(...e){if(!s){const e=await n.e(164).then(n.bind(n,1164));s=e.insertBatch}return s(...e)}async function y(...e){if(!a){const e=await Promise.all([n.e(269),n.e(903)]).then(n.bind(n,6903));a=e.remove}return a(...e)}async function v(...e){if(!u){const e=await Promise.all([n.e(269),n.e(753)]).then(n.bind(n,1753));u=e.search}return u(...e)}async function b(...e){if(!l){const e=await n.e(366).then(n.bind(n,9366));l=e.save}return l(...e)}async function w(...e){if(!c){const e=await n.e(379).then(n.bind(n,1379));c=e.load}return c(...e)}async function _(...e){if(!f){const e=await n.e(572).then(n.bind(n,2572));f=e.count}return f(...e)}async function k(...e){if(!d){const e=await n.e(572).then(n.bind(n,2572));d=e.getByID}return d(...e)}function x(e){Promise.all([n.e(269),n.e(753),n.e(550)]).then(n.bind(n,9550)).then(t=>setTimeout(()=>e(void 0,t),1)).catch(t=>setTimeout(()=>e(t),1))}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{create:()=>h,insert:()=>p,insertWithHooks:()=>m,insertBatch:()=>g,remove:()=>y,search:()=>v,save:()=>b,load:()=>w,count:()=>_,getByID:()=>k,requireLyra:()=>x})},1760:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0,t.z={context:"navigation",keys:["z"],description:"hide all children node of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,api:n,outline:r}=e;t.isNodeExpanded()?(t.collapse(),r.fold(t.getIdOfNode())):t.isNodeCollapsed()&&(t.expand(),r.unfold(t.getIdOfNode())),n.save(r)})}},1797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},1889:(e,t)=>{"use strict";"function"==typeof SuppressedError&&SuppressedError,t.__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},t.__classPrivateFieldSet=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},2195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindDate=function(e){let t=[];for(let n=0,o=i.length;n{t.push(r.DateTime.fromISO(e.trim()))});break}catch(e){}}return t};const r=n(1169),i=[/[0-9]{4}-[0-9]{2}-[0-9]{2}/gi]},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},2291:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0});const r=new Uint8Array(16);t.default=function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(r)}},2341:(e,t,n)=>{"use strict";var r,i=n(717);t.BaseDirectory=void 0,(r=t.BaseDirectory||(t.BaseDirectory={}))[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",t.appCacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppCache})},t.appConfigDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppConfig})},t.appDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppData})},t.appLocalDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLocalData})},t.appLogDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLog})},t.audioDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Audio})},t.basename=async function(e,t){return i.invoke("plugin:path|basename",{path:e,ext:t})},t.cacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Cache})},t.configDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Config})},t.dataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Data})},t.delimiter=function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},t.desktopDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Desktop})},t.dirname=async function(e){return i.invoke("plugin:path|dirname",{path:e})},t.documentDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Document})},t.downloadDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Download})},t.executableDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Executable})},t.extname=async function(e){return i.invoke("plugin:path|extname",{path:e})},t.fontDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Font})},t.homeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Home})},t.isAbsolute=async function(e){return i.invoke("plugin:path|is_absolute",{path:e})},t.join=async function(...e){return i.invoke("plugin:path|join",{paths:e})},t.localDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.LocalData})},t.normalize=async function(e){return i.invoke("plugin:path|normalize",{path:e})},t.pictureDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Picture})},t.publicDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Public})},t.resolve=async function(...e){return i.invoke("plugin:path|resolve",{paths:e})},t.resolveResource=async function(e){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource,path:e})},t.resourceDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource})},t.runtimeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Runtime})},t.sep=function(){return window.__TAURI_INTERNALS__.plugins.path.sep},t.tempDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Temp})},t.templateDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Template})},t.videoDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Video})}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",O="[object Promise]",T="[object RegExp]",C="[object Set]",D="[object String]",N="[object Symbol]",M="[object WeakMap]",E="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",A="[object Float64Array]",$="[object Int8Array]",R="[object Int16Array]",j="[object Int32Array]",P="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",F="[object Uint32Array]",B=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Z=RegExp(W.source),H=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="["+_e+"]",Ne="["+Ce+"]",Me="["+ke+"]",Ee="\\d+",Le="["+xe+"]",Ie="["+Se+"]",Ae="[^"+_e+Ce+Ee+xe+Se+Oe+"]",$e="\\ud83c[\\udffb-\\udfff]",Re="[^"+_e+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Oe+"]",ze="\\u200d",Fe="(?:"+Ie+"|"+Ae+")",Be="(?:"+Ue+"|"+Ae+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Me+"|"+$e+")?",qe="["+Te+"]?",Ze=qe+We+"(?:"+ze+"(?:"+[Re,je,Pe].join("|")+")"+qe+We+")*",He="(?:"+[Le,je,Pe].join("|")+")"+Ze,Ge="(?:"+[Re+Me+"?",Me,je,Pe,De].join("|")+")",Je=RegExp("['’]","g"),Ye=RegExp(Me,"g"),Qe=RegExp($e+"(?="+$e+")|"+Ge+Ze,"g"),Xe=RegExp([Ue+"?"+Ie+"+"+Ke+"(?="+[Ne,Ue,"$"].join("|")+")",Be+"+"+Ve+"(?="+[Ne,Ue+Fe,"$"].join("|")+")",Ue+"?"+Fe+"+"+Ke,Ue+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,He].join("|"),"g"),et=RegExp("["+ze+_e+ke+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[I]=it[A]=it[$]=it[R]=it[j]=it[P]=it[U]=it[z]=it[F]=!0,it[m]=it[g]=it[E]=it[y]=it[L]=it[v]=it[b]=it[w]=it[k]=it[x]=it[S]=it[T]=it[C]=it[D]=it[M]=!1;var ot={};ot[m]=ot[g]=ot[E]=ot[L]=ot[y]=ot[v]=ot[I]=ot[A]=ot[$]=ot[R]=ot[j]=ot[k]=ot[x]=ot[S]=ot[T]=ot[C]=ot[D]=ot[N]=ot[P]=ot[U]=ot[z]=ot[F]=!0,ot[b]=ot[w]=ot[M]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),dt=t&&!t.nodeType&&t,ht=dt&&e&&!e.nodeType&&e,pt=ht&&ht.exports===dt,mt=pt&<.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,kt=gt&>.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Mt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var en=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,ie=t.Date,_e=t.Error,ke=t.Function,xe=t.Math,Se=t.Object,Oe=t.RegExp,Te=t.String,Ce=t.TypeError,De=r.prototype,Ne=ke.prototype,Me=Se.prototype,Ee=t["__core-js_shared__"],Le=Ne.toString,Ie=Me.hasOwnProperty,Ae=0,$e=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Me.toString,je=Le.call(Se),Pe=ft._,Ue=Oe("^"+Le.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=pt?t.Buffer:i,Fe=t.Symbol,Be=t.Uint8Array,Ke=ze?ze.allocUnsafe:i,Ve=sn(Se.getPrototypeOf,Se),We=Se.create,qe=Me.propertyIsEnumerable,Ze=De.splice,He=Fe?Fe.isConcatSpreadable:i,Ge=Fe?Fe.iterator:i,Qe=Fe?Fe.toStringTag:i,et=function(){try{var e=uo(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ft.Date.now&&ie.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,dt=xe.ceil,ht=xe.floor,mt=Se.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Rt=t.isFinite,Vt=De.join,mn=sn(Se.keys,Se),gn=xe.max,yn=xe.min,vn=ie.now,bn=t.parseInt,wn=xe.random,_n=De.reverse,kn=uo(t,"DataView"),xn=uo(t,"Map"),Sn=uo(t,"Promise"),On=uo(t,"Set"),Tn=uo(t,"WeakMap"),Cn=uo(Se,"create"),Dn=Tn&&new Tn,Nn={},Mn=jo(kn),En=jo(xn),Ln=jo(Sn),In=jo(On),An=jo(Tn),$n=Fe?Fe.prototype:i,Rn=$n?$n.valueOf:i,jn=$n?$n.toString:i;function Pn(e){if(ea(e)&&!Ks(e)&&!(e instanceof Bn)){if(e instanceof Fn)return e;if(Ie.call(e,"__wrapped__"))return Po(e)}return new Fn(e)}var Un=function(){function e(){}return function(t){if(!Xs(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Bn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sr(e,t,n,r,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!Xs(e))return e;var f=Ks(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ti(e,a)}else{var d=fo(e),h=d==w||d==_;if(Zs(e))return wi(e,u);if(d==S||d==m||h&&!o){if(a=l||h?{}:po(e),!u)return l?function(e,t){return Ci(e,co(e),t)}(e,function(e,t){return e&&Ci(t,Ea(t),e)}(a,e)):function(e,t){return Ci(e,lo(e),t)}(e,nr(a,e))}else{if(!ot[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case E:return _i(e);case y:case v:return new i(+e);case L:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case A:case $:case R:case j:case P:case U:case z:case F:return ki(e,n);case k:return new i;case x:case D:return new i(e);case T:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new i;case N:return r=e,Rn?Se(Rn.call(r)):{}}}(e,d,u)}}s||(s=new Zn);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach(function(r){a.add(sr(r,t,n,r,e,s))}):ta(e)&&e.forEach(function(r,i){a.set(i,sr(r,t,n,i,e,s))});var g=f?i:(c?l?to:eo:l?Ea:Ma)(e);return Ot(g||e,function(r,i){g&&(r=e[i=r]),Xn(a,i,sr(r,t,n,i,e,s))}),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ce(o);return Do(function(){e.apply(i,n)},t)}function lr(e,t,n,r){var i=-1,o=Nt,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Et(t,Gt(n))),r?(o=Mt,s=!1):t.length>=200&&(o=Yt,s=!1,t=new qn(t));e:for(;++i-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(xn||Vn),string:new Kn}},Wn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return so(this,e).get(e)},Wn.prototype.has=function(e){return so(this,e).has(e)},Wn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var cr=Mi(vr),fr=Mi(br,!0);function dr(e,t){var n=!0;return cr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function hr(e,t,n){for(var r=-1,o=e.length;++r0&&n(a)?t>1?mr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var gr=Ei(),yr=Ei(!0);function vr(e,t){return e&&gr(e,t,Ma)}function br(e,t){return e&&yr(e,t,Ma)}function wr(e,t){return Dt(t,function(t){return Js(e[t])})}function _r(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&nt}function Or(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Se(e)}function Cr(e,t,n){for(var o=n?Mt:Nt,s=e[0].length,a=e.length,u=a,l=r(a),c=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Et(d,Gt(t))),c=yn(d.length,c),l[u]=!n&&(t||s>=120&&d.length>=120)?new qn(u&&d):i}d=e[0];var h=-1,p=l[0];e:for(;++h=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(i)}function Br(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)a!==e&&Ze.call(a,u,1),Ze.call(e,u,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;go(i)?Ze.call(e,i,1):ui(e,i)}}return e}function Wr(e,t){return e+ht(wn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return No(So(e,t,nu),e+"")}function Hr(e){return Gn(Ua(e))}function Gr(e,t){var n=Ua(e);return Lo(n,or(t,0,n.length))}function Jr(e,t,n,r){if(!Xs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,u=e;null!=u&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i>>1,s=e[o];null!==s&&!aa(s)&&(n?s<=t:s=200){var l=t?null:qi(e);if(l)return un(l);s=!1,i=Yt,u=new qn}else u=t?[]:a;e:for(;++r=r?e:ei(e,t,n)}var bi=st||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function ki(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,l=t==t,c=aa(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!c&&e1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Se(t);++r-1?o[s?t[a]:a]:i}}function Ri(e){return Xi(function(t){var n=t.length,r=n,s=Fn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ce(o);if(s&&!u&&"wrapper"==ro(a))var u=new Fn([],!0)}for(r=u?r:n;++r1&&w.reverse(),h&&fu))return!1;var c=s.get(e),f=s.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(p,function(n){var r="_."+n[0];t&n[1]&&!Nt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Eo(e){var t=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)});function fs(e){var t=Pn(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var hs=Xi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Bn&&go(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ds,args:[o],thisArg:i}),new Fn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),ps=Di(function(e,t,n){Ie.call(e,n)?++e[n]:rr(e,n,1)}),ms=$i(Bo),gs=$i(Ko);function ys(e,t){return(Ks(e)?Ot:cr)(e,oo(t,3))}function vs(e,t){return(Ks(e)?Tt:fr)(e,oo(t,3))}var bs=Di(function(e,t,n){Ie.call(e,n)?e[n].push(t):rr(e,n,[t])}),ws=Zr(function(e,t,n){var i=-1,o="function"==typeof t,s=Ws(e)?r(e.length):[];return cr(e,function(e){s[++i]=o?xt(t,e,n):Dr(e,t,n)}),s}),_s=Di(function(e,t,n){rr(e,n,t)});function ks(e,t){return(Ks(e)?Et:Rr)(e,oo(t,3))}var xs=Di(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ss=Zr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Fr(e,mr(t,1),[])}),Os=lt||function(){return ft.Date.now()};function Ts(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Hi(e,l,i,i,i,i,t)}function Cs(e,t){var n;if("function"!=typeof t)throw new Ce(o);return e=ha(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ds=Zr(function(e,t,n){var r=1;if(n.length){var i=an(n,io(Ds));r|=u}return Hi(e,r,t,n,i)}),Ns=Zr(function(e,t,n){var r=3;if(n.length){var i=an(n,io(Ns));r|=u}return Hi(t,r,e,n,i)});function Ms(e,t,n){var r,s,a,u,l,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ce(o);function m(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function g(e){var n=e-c;return c===i||n>=t||n<0||h&&e-f>=a}function y(){var e=Os();if(g(e))return v(e);l=Do(y,function(e){var n=t-(e-c);return h?yn(n,a-(e-f)):n}(e))}function v(e){return l=i,p&&r?m(e):(r=s=i,u)}function b(){var e=Os(),n=g(e);if(r=arguments,s=this,c=e,n){if(l===i)return function(e){return f=e,l=Do(y,t),d?m(e):u}(c);if(h)return bi(l),l=Do(y,t),m(c)}return l===i&&(l=Do(y,t)),u}return t=ma(t)||0,Xs(n)&&(d=!!n.leading,a=(h="maxWait"in n)?gn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==i&&bi(l),f=0,r=c=s=l=i},b.flush=function(){return l===i?u:v(Os())},b}var Es=Zr(function(e,t){return ur(e,1,t)}),Ls=Zr(function(e,t,n){return ur(e,ma(t)||0,n)});function Is(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Is.Cache||Wn),n}function As(e){if("function"!=typeof e)throw new Ce(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Is.Cache=Wn;var $s=yi(function(e,t){var n=(t=1==t.length&&Ks(t[0])?Et(t[0],Gt(oo())):Et(mr(t,1),Gt(oo()))).length;return Zr(function(r){for(var i=-1,o=yn(r.length,n);++i=t}),Bs=Nr(function(){return arguments}())?Nr:function(e){return ea(e)&&Ie.call(e,"callee")&&!qe.call(e,"callee")},Ks=r.isArray,Vs=yt?Gt(yt):function(e){return ea(e)&&xr(e)==E};function Ws(e){return null!=e&&Qs(e.length)&&!Js(e)}function qs(e){return ea(e)&&Ws(e)}var Zs=gt||mu,Hs=vt?Gt(vt):function(e){return ea(e)&&xr(e)==v};function Gs(e){if(!ea(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Js(e){if(!Xs(e))return!1;var t=xr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ys(e){return"number"==typeof e&&e==ha(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=bt?Gt(bt):function(e){return ea(e)&&fo(e)==k};function na(e){return"number"==typeof e||ea(e)&&xr(e)==x}function ra(e){if(!ea(e)||xr(e)!=S)return!1;var t=Ve(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==je}var ia=wt?Gt(wt):function(e){return ea(e)&&xr(e)==T},oa=_t?Gt(_t):function(e){return ea(e)&&fo(e)==C};function sa(e){return"string"==typeof e||!Ks(e)&&ea(e)&&xr(e)==D}function aa(e){return"symbol"==typeof e||ea(e)&&xr(e)==N}var ua=kt?Gt(kt):function(e){return ea(e)&&Qs(e.length)&&!!it[xr(e)]},la=Ki($r),ca=Ki(function(e,t){return e<=t});function fa(e){if(!e)return[];if(Ws(e))return sa(e)?fn(e):Ti(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=fo(e);return(t==k?on:t==C?un:Ua)(e)}function da(e){return e?(e=ma(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=da(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?or(ha(e),0,h):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return d;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):he.test(e)?d:+e}function ga(e){return Ci(e,Ea(e))}function ya(e){return null==e?"":si(e)}var va=Ni(function(e,t){if(_o(t)||Ws(t))Ci(t,Ma(t),e);else for(var n in t)Ie.call(t,n)&&Xn(e,n,t[n])}),ba=Ni(function(e,t){Ci(t,Ea(t),e)}),wa=Ni(function(e,t,n,r){Ci(t,Ea(t),e,r)}),_a=Ni(function(e,t,n,r){Ci(t,Ma(t),e,r)}),ka=Xi(ir),xa=Zr(function(e,t){e=Se(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(r=1);++n1),t}),Ci(e,to(e),n),r&&(n=sr(n,7,Yi));for(var i=t.length;i--;)ui(n,t[i]);return n}),$a=Xi(function(e,t){return null==e?{}:function(e,t){return Br(e,t,function(t,n){return Ta(e,n)})}(e,t)});function Ra(e,t){if(null==e)return{};var n=Et(to(e),function(e){return[e]});return t=oo(t),Br(e,n,function(e,n){return t(e,n[0])})}var ja=Zi(Ma),Pa=Zi(Ea);function Ua(e){return null==e?[]:Jt(e,Ma(e))}var za=Ii(function(e,t,n){return t=t.toLowerCase(),e+(n?Fa(t):t)});function Fa(e){return Ga(ya(e).toLowerCase())}function Ba(e){return(e=ya(e))&&e.replace(ve,en).replace(Ye,"")}var Ka=Ii(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Va=Ii(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Wa=Li("toLowerCase"),qa=Ii(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Za=Ii(function(e,t,n){return e+(n?" ":"")+Ga(t)}),Ha=Ii(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ga=Li("toUpperCase");function Ja(e,t,n){return e=ya(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ya=Zr(function(e,t){try{return xt(e,i,t)}catch(e){return Gs(e)?e:new _e(e)}}),Qa=Xi(function(e,t){return Ot(t,function(t){t=Ro(t),rr(e,t,Ds(e[t],e))}),e});function Xa(e){return function(){return e}}var eu=Ri(),tu=Ri(!0);function nu(e){return e}function ru(e){return Ir("function"==typeof e?e:sr(e,1))}var iu=Zr(function(e,t){return function(n){return Dr(n,e,t)}}),ou=Zr(function(e,t){return function(n){return Dr(e,n,t)}});function su(e,t,n){var r=Ma(t),i=wr(t,r);null!=n||Xs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Ma(t)));var o=!(Xs(n)&&"chain"in n&&!n.chain),s=Js(e);return Ot(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function au(){}var uu=zi(Et),lu=zi(Ct),cu=zi($t);function fu(e){return vo(e)?Kt(Ro(e)):function(e){return function(t){return _r(t,e)}}(e)}var du=Bi(),hu=Bi(!0);function pu(){return[]}function mu(){return!1}var gu,yu=Ui(function(e,t){return e+t},0),vu=Wi("ceil"),bu=Ui(function(e,t){return e/t},1),wu=Wi("floor"),_u=Ui(function(e,t){return e*t},1),ku=Wi("round"),xu=Ui(function(e,t){return e-t},0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Ce(o);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Ts,Pn.assign=va,Pn.assignIn=ba,Pn.assignInWith=wa,Pn.assignWith=_a,Pn.at=ka,Pn.before=Cs,Pn.bind=Ds,Pn.bindAll=Qa,Pn.bindKey=Ns,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ks(e)?e:[e]},Pn.chain=fs,Pn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===i)?1:gn(ha(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(dt(o/t));so?0:o+n),(r=r===i||r>o?o:ha(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&rn(e)?vi(fn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Ce(o);return t=null==t?0:gn(ha(t),0),Zr(function(n){var r=n[t],i=vi(n,0,t);return r&&Lt(i,r),xt(e,this,i)})},Pn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:ha(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:ha(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?ci(e,oo(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ce(o);return Xs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ms(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=ds,Pn.toArray=fa,Pn.toPairs=ja,Pn.toPairsIn=Pa,Pn.toPath=function(e){return Ks(e)?Et(e,Ro):aa(e)?[e]:Ti($o(ya(e)))},Pn.toPlainObject=ga,Pn.transform=function(e,t,n){var r=Ks(e),i=r||Zs(e)||ua(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Xs(e)&&Js(o)?Un(Ve(e)):{}}return(i?Ot:vr)(e,function(e,r,i){return t(n,e,r,i)}),n},Pn.unary=function(e){return Ts(e,1)},Pn.union=es,Pn.unionBy=ts,Pn.unionWith=ns,Pn.uniq=function(e){return e&&e.length?ai(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Pn.unset=function(e,t){return null==e||ui(e,t)},Pn.unzip=rs,Pn.unzipWith=is,Pn.update=function(e,t,n){return null==e?e:li(e,t,mi(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,mi(n),r)},Pn.values=Ua,Pn.valuesIn=function(e){return null==e?[]:Jt(e,Ea(e))},Pn.without=os,Pn.words=Ja,Pn.wrap=function(e,t){return Rs(mi(t),e)},Pn.xor=ss,Pn.xorBy=as,Pn.xorWith=us,Pn.zip=ls,Pn.zipObject=function(e,t){return hi(e||[],t||[],Xn)},Pn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jr)},Pn.zipWith=cs,Pn.entries=ja,Pn.entriesIn=Pa,Pn.extend=ba,Pn.extendWith=wa,su(Pn,Pn),Pn.add=yu,Pn.attempt=Ya,Pn.camelCase=za,Pn.capitalize=Fa,Pn.ceil=vu,Pn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),or(ma(e),t,n)},Pn.clone=function(e){return sr(e,4)},Pn.cloneDeep=function(e){return sr(e,5)},Pn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Pn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Pn.conformsTo=function(e,t){return null==t||ar(e,t,Ma(t))},Pn.deburr=Ba,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=bu,Pn.endsWith=function(e,t,n){e=ya(e),t=si(t);var r=e.length,o=n=n===i?r:or(ha(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Us,Pn.escape=function(e){return(e=ya(e))&&H.test(e)?e.replace(q,tn):e},Pn.escapeRegExp=function(e){return(e=ya(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Pn.every=function(e,t,n){var r=Ks(e)?Ct:dr;return n&&yo(e,t,n)&&(t=i),r(e,oo(t,3))},Pn.find=ms,Pn.findIndex=Bo,Pn.findKey=function(e,t){return jt(e,oo(t,3),vr)},Pn.findLast=gs,Pn.findLastIndex=Ko,Pn.findLastKey=function(e,t){return jt(e,oo(t,3),br)},Pn.floor=wu,Pn.forEach=ys,Pn.forEachRight=vs,Pn.forIn=function(e,t){return null==e?e:gr(e,oo(t,3),Ea)},Pn.forInRight=function(e,t){return null==e?e:yr(e,oo(t,3),Ea)},Pn.forOwn=function(e,t){return e&&vr(e,oo(t,3))},Pn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Pn.get=Oa,Pn.gt=zs,Pn.gte=Fs,Pn.has=function(e,t){return null!=e&&ho(e,t,Or)},Pn.hasIn=Ta,Pn.head=Wo,Pn.identity=nu,Pn.includes=function(e,t,n,r){e=Ws(e)?e:Ua(e),n=n&&!r?ha(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),sa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ha(n);return i<0&&(i=gn(r+i,0)),Ut(e,t,i)},Pn.inRange=function(e,t,n){return t=da(t),n===i?(n=t,t=0):n=da(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=f},Pn.isSet=oa,Pn.isString=sa,Pn.isSymbol=aa,Pn.isTypedArray=ua,Pn.isUndefined=function(e){return e===i},Pn.isWeakMap=function(e){return ea(e)&&fo(e)==M},Pn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==xr(e)},Pn.join=function(e,t){return null==e?"":Vt.call(e,t)},Pn.kebabCase=Ka,Pn.last=Go,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ha(n))<0?gn(r+o,0):yn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Pn.lowerCase=Va,Pn.lowerFirst=Wa,Pn.lt=la,Pn.lte=ca,Pn.max=function(e){return e&&e.length?hr(e,nu,Sr):i},Pn.maxBy=function(e,t){return e&&e.length?hr(e,oo(t,2),Sr):i},Pn.mean=function(e){return Bt(e,nu)},Pn.meanBy=function(e,t){return Bt(e,oo(t,2))},Pn.min=function(e){return e&&e.length?hr(e,nu,$r):i},Pn.minBy=function(e,t){return e&&e.length?hr(e,oo(t,2),$r):i},Pn.stubArray=pu,Pn.stubFalse=mu,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=_u,Pn.nth=function(e,t){return e&&e.length?zr(e,ha(t)):i},Pn.noConflict=function(){return ft._===this&&(ft._=Pe),this},Pn.noop=au,Pn.now=Os,Pn.pad=function(e,t,n){e=ya(e);var r=(t=ha(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Fi(ht(i),n)+e+Fi(dt(i),n)},Pn.padEnd=function(e,t,n){e=ya(e);var r=(t=ha(t))?cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return yn(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wr(e,t)},Pn.reduce=function(e,t,n){var r=Ks(e)?It:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,cr)},Pn.reduceRight=function(e,t,n){var r=Ks(e)?At:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,fr)},Pn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===i)?1:ha(t),qr(ya(e),t)},Pn.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++rf)return[];var n=h,r=yn(e,h);t=oo(t),e-=h;for(var i=Zt(r,t);++n=s)return e;var u=n-cn(r);if(u<1)return r;var l=a?vi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(a&&(u+=l.length-u),ia(o)){if(e.slice(u).search(o)){var c,f=l;for(o.global||(o=Oe(o.source,ya(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var d=c.index;l=l.slice(0,d===i?u:d)}}else if(e.indexOf(si(o),u)!=u){var h=l.lastIndexOf(o);h>-1&&(l=l.slice(0,h))}return l+r},Pn.unescape=function(e){return(e=ya(e))&&Z.test(e)?e.replace(W,hn):e},Pn.uniqueId=function(e){var t=++Ae;return ya(e)+t},Pn.upperCase=Ha,Pn.upperFirst=Ga,Pn.each=ys,Pn.eachRight=vs,Pn.first=Wo,su(Pn,(gu={},vr(Pn,function(e,t){Ie.call(Pn.prototype,t)||(gu[t]=e)}),gu),{chain:!1}),Pn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Pn[e].placeholder=Pn}),Ot(["drop","take"],function(e,t){Bn.prototype[e]=function(n){n=n===i?1:gn(ha(n),0);var r=this.__filtered__&&!t?new Bn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Bn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ot(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Bn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ot(["head","last"],function(e,t){var n="take"+(t?"Right":"");Bn.prototype[e]=function(){return this[n](1).value()[0]}}),Ot(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Bn.prototype[e]=function(){return this.__filtered__?new Bn(this):this[n](1)}}),Bn.prototype.compact=function(){return this.filter(nu)},Bn.prototype.find=function(e){return this.filter(e).head()},Bn.prototype.findLast=function(e){return this.reverse().find(e)},Bn.prototype.invokeMap=Zr(function(e,t){return"function"==typeof e?new Bn(this):this.map(function(n){return Dr(n,e,t)})}),Bn.prototype.reject=function(e){return this.filter(As(oo(e)))},Bn.prototype.slice=function(e,t){e=ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Bn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},Bn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Bn.prototype.toArray=function(){return this.take(h)},vr(Bn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Bn,l=a[0],c=u||Ks(t),f=function(e){var t=o.apply(Pn,Lt([e],a));return r&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,m=u&&!h;if(!s&&c){t=m?t:new Bn(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[f],thisArg:i}),new Fn(g,d)}return p&&m?e.apply(this,a):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ks(i)?i:[],e)}return this[n](function(n){return t.apply(Ks(n)?n:[],e)})}}),vr(Bn.prototype,function(e,t){var n=Pn[t];if(n){var r=n.name+"";Ie.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}}),Nn[ji(i,2).name]=[{name:"wrapper",func:i}],Bn.prototype.clone=function(){var e=new Bn(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Bn.prototype.reverse=function(){if(this.__filtered__){var e=new Bn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Bn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ks(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Po(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Bn){var t=e;return this.__actions__.length&&(t=new Bn(this)),(t=t.reverse()).__actions__.push({func:ds,args:[Xo],thisArg:i}),new Fn(t,this.__chain__)}return this.thru(Xo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Ge&&(Pn.prototype[Ge]=function(){return this}),Pn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},2829:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,a=Math.ceil(s/16),u=new Array(a);for(let t=0;t>>0;f=c,c=l,l=r(a,30)>>>0,a=s,s=u}i[0]=i[0]+s>>>0,i[1]=i[1]+a>>>0,i[2]=i[2]+l>>>0,i[3]=i[3]+c>>>0,i[4]=i[4]+f>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}},2988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const r=n(1797),i=n(6011);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;nn(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,api:r,e:i}=e,o=t.get().previousElementSibling;if(o&&!o.classList.contains("nodeContent")&&i.shiftKey){const e=n.swapNodeWithPreviousSibling(t.getIdOfNode()),i=yield n.renderNode(e.parentNode);n.isTreeRoot(e.parentNode.id)?t.get().parentElement.innerHTML=i:t.get().parentElement.outerHTML=i,t.set(`#id-${e.targetNode.id}`),r.save(n)}})}},3298:(e,t,n)=>{"use strict";var r,i=n(2341),o=n(717);function s(e){return{isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink,size:e.size,mtime:null!==e.mtime?new Date(e.mtime):null,atime:null!==e.atime?new Date(e.atime):null,birthtime:null!==e.birthtime?new Date(e.birthtime):null,readonly:e.readonly,fileAttributes:e.fileAttributes,dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,blksize:e.blksize,blocks:e.blocks}}t.SeekMode=void 0,(r=t.SeekMode||(t.SeekMode={}))[r.Start=0]="Start",r[r.Current=1]="Current",r[r.End=2]="End";class a extends o.Resource{async read(e){if(0===e.byteLength)return 0;const t=await o.invoke("plugin:fs|read",{rid:this.rid,len:e.byteLength}),n=function(e){const t=new Uint8ClampedArray(e),n=t.byteLength;let r=0;for(let e=0;ee instanceof URL?e.toString():e),options:n,onEvent:i}),a=new l(s);return()=>{a.close()}}Object.defineProperty(t,"BaseDirectory",{enumerable:!0,get:function(){return i.BaseDirectory}}),t.FileHandle=a,t.copyFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|copy_file",{fromPath:e instanceof URL?e.toString():e,toPath:t instanceof URL?t.toString():t,options:n})},t.create=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|create",{path:e instanceof URL?e.toString():e,options:t});return new a(n)},t.exists=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|exists",{path:e instanceof URL?e.toString():e,options:t})},t.lstat=async function(e,t){return s(await o.invoke("plugin:fs|lstat",{path:e instanceof URL?e.toString():e,options:t}))},t.mkdir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|mkdir",{path:e instanceof URL?e.toString():e,options:t})},t.open=u,t.readDir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|read_dir",{path:e instanceof URL?e.toString():e,options:t})},t.readFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_file",{path:e instanceof URL?e.toString():e,options:t});return n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)},t.readTextFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_text_file",{path:e instanceof URL?e.toString():e,options:t}),r=n instanceof ArrayBuffer?n:Uint8Array.from(n);return(new TextDecoder).decode(r)},t.readTextFileLines=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=e instanceof URL?e.toString():e;return await Promise.resolve({path:n,rid:null,async next(){null===this.rid&&(this.rid=await o.invoke("plugin:fs|read_text_file_lines",{path:n,options:t}));const e=await o.invoke("plugin:fs|read_text_file_lines_next",{rid:this.rid}),r=e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e),i=1===r[r.byteLength-1];return i?(this.rid=null,{value:null,done:i}):{value:(new TextDecoder).decode(r.slice(0,r.byteLength)),done:i}},[Symbol.asyncIterator](){return this}})},t.remove=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|remove",{path:e instanceof URL?e.toString():e,options:t})},t.rename=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|rename",{oldPath:e instanceof URL?e.toString():e,newPath:t instanceof URL?t.toString():t,options:n})},t.size=async function(e){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|size",{path:e instanceof URL?e.toString():e})},t.stat=async function(e,t){return s(await o.invoke("plugin:fs|stat",{path:e instanceof URL?e.toString():e,options:t}))},t.truncate=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|truncate",{path:e instanceof URL?e.toString():e,len:t,options:n})},t.watch=async function(e,t,n){return await c(e,t,{delayMs:2e3,...n})},t.watchImmediate=async function(e,t,n){return await c(e,t,{...n,delayMs:void 0})},t.writeFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");if(t instanceof ReadableStream){const r=await u(e,{create:!0,...n}),i=t.getReader();try{for(;;){const{done:e,value:t}=await i.read();if(e)break;await r.write(t)}}finally{i.releaseLock(),await r.close()}}else await o.invoke("plugin:fs|write_file",t,{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})},t.writeTextFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const r=new TextEncoder;await o.invoke("plugin:fs|write_text_file",r.encode(t),{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})}},3417:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lift=void 0,t.lift={context:"navigation",keys:["shift + h"],description:"Lift the current node to be a sibling of the parent node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;if(t.shiftKey){if(r.data.tree.children.map(e=>e.id).includes(n.getIdOfNode()))return;const e=r.liftNodeToParent(n.getIdOfNode()),t=yield r.renderNode(e.parentNode);r.isTreeRoot(e.parentNode.id)?n.get().parentElement.parentElement.innerHTML=t:n.get().parentElement.parentElement.outerHTML=t,n.set(`#id-${e.targetNode.id}`),i.save(r)}})}},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},3727:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lower=void 0,t.lower={context:"navigation",keys:["shift + l"],description:"Lower the current node to be a child of the previous sibling node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey){const e=n.lowerNodeToChild(r.getIdOfNode()),t=yield n.renderNode(e.oldParentNode);n.isTreeRoot(e.oldParentNode.id)?r.get().parentElement.innerHTML=t:r.get().parentElement.outerHTML=t,r.set(`#id-${e.targetNode.id}`),i.save(n)}})}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:n}},3985:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{f.default.withContext(e.context,()=>{f.default.bind(e.keys,t=>a(void 0,void 0,void 0,function*(){e.action({e:t,outline:_,cursor:k,api:x,search:S})}))})}),f.default.withContext("navigation",()=>{f.default.bind("ctrl + o",e=>a(void 0,void 0,void 0,function*(){const e=yield(0,m.openOutlineSelector)();if(!e.filename||!e.filename.length)return;const t=yield x.loadOutline(e.filename.split(".json")[0]);_=new l.Outline(t),O().innerHTML=yield _.render(),k.resetCursor(),yield S.reset(),yield S.indexBatch(_.data.contentNodes),document.getElementById("outlineName").innerHTML=_.data.name})),f.default.bind("ctrl + n",e=>a(void 0,void 0,void 0,function*(){C()}))}),S.onTermSelection=e=>{T(document.getElementById(`id-${e}`).parentElement),k.set(`#id-${e}`),x.save(_)},function(){a(this,void 0,void 0,function*(){yield x.createDirStructureIfNotExists();const e=(0,m.loadOutlineModal)();e.on("createOutline",()=>{C(),e.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",t=>a(this,void 0,void 0,function*(){try{yield x.renameOutline(_.data.name,t),_.data.name=t,yield x.saveOutline(_),document.getElementById("outlineName").innerHTML=_.data.name,e.remove()}catch(e){console.log(e)}}))}),e.on("loadOutline",t=>a(this,void 0,void 0,function*(){const n=yield x.loadOutline(t.split(".json")[0]);_=new l.Outline(n),O().innerHTML=yield _.render(),k.resetCursor(),document.getElementById("outlineName").innerHTML=_.data.name,f.default.setContext("navigation"),e.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",(e,t)=>a(this,void 0,void 0,function*(){try{yield x.renameOutline(_.data.name,e),_.data.name=e,yield x.saveOutline(_),document.getElementById("outlineName").innerHTML=_.data.name,t.remove()}catch(e){console.log(e)}})),S.createIndex({id:"string",content:"string"}).then(()=>a(this,void 0,void 0,function*(){yield S.indexBatch(_.data.contentNodes)}))})),e.show(),D()})}()},4161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllShortcuts=void 0;const r=n(587),i=n(9168),o=n(7167),s=n(1062),a=n(7802),u=n(1760),l=n(9342),c=n(6801),f=n(4488),d=n(5457),h=n(6656),p=n(6279),m=n(3417),g=n(3727),y=n(2993),v=n(7100),b=n(1238);t.AllShortcuts=[r.sidebarToggle,i.j,o.k,s.l,a.h,u.z,l.$,c.i,f.archive,d.tab,h.enter,p.d,m.lift,g.lower,y.swapUp,v.swapDown,b.escapeEditing]},4299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function a(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else r=new Uint8Array(16),i=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=255&t,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|3&e[10],r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}t.updateV7State=s,t.default=function(e,t,n){let u;if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.seq,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.seq,t,n)}return t??(0,i.unsafeStringify)(u)}},4300:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s!e.isDirectory)})}loadOutline(e){return a(this,void 0,void 0,function*(){const t=yield f.readTextFile(`outliner/${(0,l.slugify)(e)}.json`,{baseDir:f.BaseDirectory.AppLocalData}),n=JSON.parse(t),r=c.uniq(JSON.stringify(n.tree).match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi));r.shift();const i=yield Promise.allSettled(c.map(r,e=>f.readTextFile(`outliner/contentNodes/${e}.json`,{baseDir:f.BaseDirectory.AppLocalData})));return{id:n.id,version:n.version,created:n.created,name:n.name,tree:n.tree,contentNodes:c.keyBy(c.map(i,e=>{if("fulfilled"===e.status)return u.ContentNode.Create(JSON.parse(e.value));console.log("rejected node",e.reason)}),e=>e.id)}})}saveOutline(e){return a(this,void 0,void 0,function*(){yield f.writeTextFile(`outliner/${(0,l.slugify)(e.data.name)}.json`,JSON.stringify({id:e.data.id,version:e.data.version,created:e.data.created,name:e.data.name,tree:e.data.tree}),{baseDir:f.BaseDirectory.AppLocalData})})}renameOutline(e,t){return a(this,void 0,void 0,function*(){if(t.length&&e!==t)return f.rename(`outliner/${(0,l.slugify)(e)}.json`,`outliner/${(0,l.slugify)(t)}.json`,{oldPathBaseDir:f.BaseDirectory.AppLocalData,newPathBaseDir:f.BaseDirectory.AppLocalData})})}saveContentNode(e){return a(this,void 0,void 0,function*(){try{yield f.writeTextFile(`outliner/contentNodes/${e.id}.json`,JSON.stringify(e.toJson()),{baseDir:f.BaseDirectory.AppLocalData})}catch(e){console.error(e)}})}save(e){this.state.has("saveTimeout")||this.state.set("saveTimeout",setTimeout(()=>a(this,void 0,void 0,function*(){yield this.saveOutline(e),this.state.delete("saveTimeout")}),2e3))}}},4488:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.archive=void 0,t.archive={context:"navigation",keys:["shift + x"],description:'Mark a node and all its children as "archived"',action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;t.preventDefault(),r.get().classList.toggle("strikethrough"),n.getContentNode(r.getIdOfNode()).toggleArchiveStatus(),i.saveContentNode(n.getContentNode(r.getIdOfNode())),i.save(n)})}},4557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(2829),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(80,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},5191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEventEmitter=void 0,t.CustomEventEmitter=class{constructor(){this.eventMap={}}on(e,t){this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t)}emit(e,t){this.eventMap[e]&&this.eventMap[e].forEach(e=>{e.apply(null,t)})}}},5444:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;const r=n(876);t.Cursor=class{constructor(){}resetCursor(){this.set(".node")}get(){return document.querySelector(".cursor")}getIdOfNode(){return this.get().getAttribute("data-id")}unset(){const e=this.get();e&&e.classList.remove("cursor")}set(e){this.unset();const t=document.querySelector(e);t&&(t.classList.add("cursor"),(0,r.isVisible)(t)||t.scrollIntoView(!0))}collapse(){this.get().classList.remove("expanded"),this.get().classList.add("collapsed")}expand(){this.get().classList.remove("collapsed"),this.get().classList.add("expanded")}isNodeCollapsed(){return this.get().classList.contains("collapsed")}isNodeExpanded(){return this.get().classList.contains("expanded")}}},5457:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.tab=void 0,t.tab={context:"navigation",keys:["tab"],description:"Add a new node as the child of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;t.preventDefault();const o=r.createChildNode(n.getIdOfNode()),s=yield r.renderNode(o.parentNode);n.get().outerHTML=s,n.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(r)})}},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const r=n(9746),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function o(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const n=o(e,t);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},6279:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.d=void 0,t.d={context:"navigation",keys:["shift + d"],description:"Delete the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(!t.shiftKey)return;const o=n.removeNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode),a=r.get().previousElementSibling,u=r.get().nextElementSibling;n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,a&&a.getAttribute("data-id")?r.set(`#id-${a.getAttribute("data-id")}`):u&&u.getAttribute("data-id")?r.set(`#id-${u.getAttribute("data-id")}`):r.set(`#id-${o.parentNode.id}`),i.save(n)})}},6356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6011),i=n(1425),o=n(6568);t.default=function(e,t,n){e??={},n??=0;let s=(0,i.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[n+e]=s[e];return t}return(0,r.unsafeStringify)(s)}},6568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[6])<<4|n[7]>>4&15,(15&n[7])<<4|(240&n[4])>>4,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,(15&n[1])<<4|(240&n[2])>>4,96|15&n[2],n[3],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},6656:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.enter=void 0,t.enter={context:"navigation",keys:["enter"],description:"Add a new node as the sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey)return;t.preventDefault(),t.preventRepeat();const o=n.createSiblingNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode);n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,r.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(n)})}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},6759:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.help=void 0;const i=n(9492);t.help={context:"navigation",keys:["shift + /"],description:"Display help modal",action:e=>r(void 0,void 0,void 0,function*(){i.helpModal.show()})}},6801:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.i=void 0;const o=i(n(935));t.i={context:"navigation",keys:["i"],description:'Enter "edit" mode and place the cursor at the start of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r}=e;t.preventDefault(),n.get().classList.add("hidden-cursor");const i=n.get().querySelector(".nodeContent");i.innerHTML=r.data.contentNodes[n.getIdOfNode()].content,i.contentEditable="true",i.focus(),o.default.setContext("editing")})}},6928:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.link=function(e){return`
    ${e.text}`}},7100:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.swapDown=void 0,t.swapDown={context:"navigation",keys:["shift + j"],description:"Swap the current node with the next sibling node",action:e=>n(void 0,void 0,void 0,function*(){if(e.cursor.get().nextElementSibling&&e.e.shiftKey){const t=e.outline.swapNodeWithNextSibling(e.cursor.getIdOfNode()),n=yield e.outline.renderNode(t.parentNode);e.outline.isTreeRoot(t.parentNode.id)?e.cursor.get().parentElement.innerHTML=n:e.cursor.get().parentElement.outerHTML=n,e.cursor.set(`#id-${t.targetNode.id}`),e.api.save(e.outline)}})}},7167:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.k=void 0,t.k={context:"navigation",keys:["k"],description:"Move the cursor to the previous sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,e:n}=e,r=t.get().previousElementSibling;r&&!r.classList.contains("nodeContent")&&(n.shiftKey||t.set(`#id-${r.getAttribute("data-id")}`))})}},7670:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.bindOutlineRenamer=function(){const e=s();return(0,i.$)("#outlineName").addEventListener("click",t=>{e.show(),(0,i.$)("#outline-renamer").addEventListener("submit",t=>r(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=(0,i.$)("#new-outline-name").value;e.emit("attemptedRename",[n,e])}))}),e},t.renameOutline=s;const i=n(876),o=n(8013);function s(){return new o.Modal({title:"Rename Outline",escapeExitable:!0},`\n
    \n \n \n
    \n `)}},7802:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.h=void 0,t.h={context:"navigation",keys:["h"],description:"Move the cursor to the parent element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e,r=n.get().parentElement;r&&r.classList.contains("node")&&(t.shiftKey||n.set(`#id-${r.getAttribute("data-id")}`))})}},8013:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const i=n(1031),o=n(182),s=n(5191),a=r(n(935));class u extends s.CustomEventEmitter{constructor(e,t=""){super(),this.options=e,this.content=t,this.name=(0,i.slugify)(this.options.name||this.options.title),this.id=`id-${(0,o.v4)()}`,this.options.escapeExitable&&!this.options.keyboardContext&&(this.options.keyboardContext=(0,i.slugify)(this.options.title)+"kbd-context"),this.options.keyboardContext&&this.options.escapeExitable&&this.makeExitable()}makeExitable(){a.default.withContext(this.options.keyboardContext,()=>{a.default.bind("escape",e=>{this.remove()})})}renderModalTitle(){return this.options.title?`

    ${this.options.title}

    `:""}renderModalContent(){return this.content}renderModal(){return`\n \n `}updateRender(){document.getElementById(this.id).innerHTML=``,this.emit("updated")}isShown(){const e=document.getElementById(this.id);return e&&!e.classList.contains("hidden")}show(){this.isShown()?this.updateRender():(document.querySelector("body").innerHTML+=this.renderModal(),this.options.keyboardContext&&(a.default.setContext(this.options.keyboardContext),this.options.escapeExitable),this.emit("rendered"))}remove(){document.getElementById(this.id).remove(),this.emit("removed"),a.default.setContext("navigation")}}t.Modal=u},8286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3779),i=n(2291),o=n(6011);t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,i.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},8436:e=>{"use strict";e.exports=JSON.parse('{"id":"e067419a-85c3-422d-b8c4-41690be44500","version":"0.0.1","name":"Sample","created":1674409747467,"tree":{"id":"e067419a-85c3-422d-b8c4-41690be44500","collapsed":false,"children":[{"id":"e067419a-85c3-422d-b8c4-41690be4450d","collapsed":false,"children":[]}]},"contentNodes":{"e067419a-85c3-422d-b8c4-41690be4450d":{"id":"e067419a-85c3-422d-b8c4-41690be4450d","created":1674409747467,"lastUpdated":null,"type":"text","content":"**Welcome to my Outliner**
    ","archived":false,"archivedDate":null,"deleted":false,"deletedDate":null}}}')},8729:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{document.getElementById("create-outline").addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.emit("createOutline",[t])}),document.getElementById("open-outline-selector").addEventListener("click",t=>a(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=yield d();n&&e.emit("loadOutline",[n.filename])}))}),e};const u=s(n(9403)),l=s(n(2341)),c=n(8013),f='\n

    To begin, either create a new outline or open an existing one.

    \n\n';function d(){return a(this,void 0,void 0,function*(){const e=yield u.open({multiple:!1,defaultPath:yield l.join(yield l.appLocalDataDir(),"outliner"),directory:!1,title:"Select Outline",filters:[{name:"JSON",extensions:["json"]}]});return e?{filename:yield l.basename(e.toString()),fqp:e}:{filename:null,fqp:null}})}},9168:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.j=void 0,t.j={context:"navigation",keys:["j"],description:"Move the cursor to the next sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const t=e.cursor.get().nextElementSibling;t&&(e.e.shiftKey||e.cursor.set(`#id-${t.getAttribute("data-id")}`))})}},9342:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.$=void 0;const o=i(n(935));t.$={context:"navigation",keys:["shift + 4"],description:'Enter "Edit" mode and place the cursor at the end of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,e:r}=e;r.preventDefault(),t.get().classList.add("hidden-cursor");const i=t.get().querySelector(".nodeContent");i.innerHTML=n.data.contentNodes[t.getIdOfNode()].content,i.contentEditable="true";const s=document.createRange();s.selectNodeContents(i),s.collapse(!1);const a=window.getSelection();a.removeAllRanges(),a.addRange(s),i.focus(),o.default.setContext("editing")})}},9403:(e,t,n)=>{"use strict";var r=n(717);t.ask=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|ask",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,yesButtonLabel:n?.okLabel?.toString(),noButtonLabel:n?.cancelLabel?.toString()})},t.confirm=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|confirm",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString(),cancelButtonLabel:n?.cancelLabel?.toString()})},t.message=async function(e,t){const n="string"==typeof t?{title:t}:t;await r.invoke("plugin:dialog|message",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString()})},t.open=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|open",{options:e})},t.save=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|save",{options:e})}},9492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.helpModal=void 0;const r=n(2543),i=n(8013),o=n(4161),s=`\n

    Daily Backup: The daily backup system lets you mash the "Daily Backup" button as much as you'd like.. but will only save the last time you clicked on it. You can only click it once and hour. Your content will always be saved in local-storage as well, but its always good to have a backup system.

    \n \n \n \n \n \n \n \n \n ${(0,r.map)(o.AllShortcuts,e=>`\n \n \n \n \n `).join("\n")}\n \n
    KeyAction
    \n ${e.keys.map(e=>`${e}`).join(" or ")}\n \n ${e.description}\n
    \n`;t.helpModal=new i.Modal({title:"Help",keyboardContext:"help",escapeExitable:!0},s)},9746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6697);t.default=function(e){return"string"==typeof e&&r.default.test(e)}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((t,n)=>(i.f[n](e,t),t),[])),i.u=e=>e+".bundle.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="outline-browser:",i.l=(n,r,o,s)=>{if(e[n])e[n].push(r);else{var a,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(h);var i=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(r)),t)return t(r)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),u&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={792:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=o);var s=i.p+i.u(t),a=new Error;i.l(s,n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[s,a,u]=n,l=0;if(s.some(t=>0!==e[t])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);u&&u(i)}for(t&&t(n);l{var e,t,n={23:(e,t,n)=>{"use strict";function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.r(t),n.d(t,{Hooks:()=>fe,Lexer:()=>ae,Marked:()=>de,Parser:()=>ce,Renderer:()=>ue,TextRenderer:()=>le,Tokenizer:()=>se,defaults:()=>i,getDefaults:()=>r,lexer:()=>ke,marked:()=>pe,options:()=>me,parse:()=>we,parseInline:()=>be,parser:()=>_e,setOptions:()=>ge,use:()=>ye,walkTokens:()=>ve});var i={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function o(e){i=e}var s={exec:()=>null};function a(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(u.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var u={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,d=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),h=a(f).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),p=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,m=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),v="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",b=/|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",b).replace("tag",v).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_=a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),k={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:l,html:w,lheading:d,list:y,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:_,table:s,text:/^[^\n]+/},x=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex(),S={...k,lheading:h,table:x,paragraph:a(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",v).getRegex()},O={...k,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",b).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(p).replace("hr",l).replace("heading"," *#{1,6} *[^\n]").replace("lheading",d).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,N=/[^\s\p{P}\p{S}]/u,M=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),E=/(?!~)[\p{P}\p{S}]/u,L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,I=a(L,"u").replace(/punct/g,C).getRegex(),A=a(L,"u").replace(/punct/g,E).getRegex(),$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",R=a($,"gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,D).replace(/punct/g,C).getRegex(),j=a($,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,E).getRegex(),P=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,D).replace(/punct/g,C).getRegex(),U=a(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),z=a(/^<(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(),F=a(b).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=a("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",F).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),K=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",K).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W=a(/^!?\[(label)\]\[(ref)\]/).replace("label",K).replace("ref",m).getRegex(),q=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",m).getRegex(),Z={_backpedal:s,anyPunctuation:U,autolink:z,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,br:T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:I,emStrongRDelimAst:R,emStrongRDelimUnd:P,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:q,punctuation:M,reflink:W,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",W).replace("nolink",q).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ee=e=>X[e];function te(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,ee)}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,ee);return e}function ne(e){try{e=encodeURI(e).replace(u.percentDecode,"%")}catch{return null}return e}function re(e,t){let n=e.replace(u.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(u.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ie(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ie(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ie(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ie(t[0],"\n").split("\n"),n="",r="",i=[];for(;e.length>0;){let t,o=!1,s=[];for(t=0;t1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;e;){let n=!1,r="",a="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let u=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),l=e.split("\n",1)[0],c=!u.trim(),f=0;if(this.options.pedantic?(f=2,a=u.trimStart()):c?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,a=u.slice(f),f+=t[1].length),c&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(f),n=this.rules.other.hrRegex(f),i=this.rules.other.fencesBeginRegex(f),o=this.rules.other.headingBeginRegex(f),s=this.rules.other.htmlBeginRegex(f);for(;e;){let d,h=e.split("\n",1)[0];if(l=h,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),d=l):d=l.replace(this.rules.other.tabCharGlobal," "),i.test(l)||o.test(l)||s.test(l)||t.test(l)||n.test(l))break;if(d.search(this.rules.other.nonSpaceChar)>=f||!l.trim())a+="\n"+d.slice(f);else{if(c||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(u)||o.test(u)||n.test(u))break;a+="\n"+l}!c&&!l.trim()&&(c=!0),r+=h+"\n",e=e.substring(h.length+1),u=d.slice(f)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let d,h=null;this.options.gfm&&(h=this.rules.other.listIsTask.exec(a),h&&(d="[ ] "!==h[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!h,checked:d,loose:!1,text:a,tokens:[]}),i.raw+=r}let a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){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){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ie(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),oe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return oe(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,o=[...r[0]].length-1,s=o,a=0,u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);null!=(r=u.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){s+=i;continue}if((r[5]||r[6])&&o%3&&!((o+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);let t=[...r[0]][0].length,u=e.slice(0,o+r.index+t+i);if(Math.min(o,i)%2){let e=u.slice(1,-1);return{type:"em",raw:u,text:e,tokens:this.lexer.inlineTokens(e)}}let l=u.slice(2,-2);return{type:"strong",raw:u,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ae=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:u,block:Y.normal,inline:Q.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=Q.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=Q.breaks:t.inline=Q.gfm),this.tokenizer.rules=t}static get rules(){return{block:Y,inline:Q}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(u.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=t.at(-1);n&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;let n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},ue=class{options;parser;constructor(e){this.options=e||i}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(u.notSpaceStart)?.[0],i=e.replace(u.endingNewline,"")+"\n";return r?'
    '+(n?i:te(i,!0))+"
    \n":"
    "+(n?i:te(i,!0))+"
    \n"}blockquote({tokens:e}){return`
    \n${this.parser.parse(e)}
    \n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
    \n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+te(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${te(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ne(e);if(null===i)return r;let o='
    ",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ne(e);if(null===i)return te(n);let o=`${n}{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new ue(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new se(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new fe;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=e.hooks[r],o=t[r];fe.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>o.call(t,e));let n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ae.lex(e,t??this.defaults)}parser(e,t){return ce.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(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"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let s=i.hooks?i.hooks.provideLexer():e?ae.lex:ae.lexInline,a=i.hooks?i.hooks.provideParser():e?ce.parse:ce.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>a(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let e=s(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=a(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="

    An error occurred:

    "+te(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},he=new de;function pe(e,t){return he.parse(e,t)}pe.options=pe.setOptions=function(e){return he.setOptions(e),pe.defaults=he.defaults,o(pe.defaults),pe},pe.getDefaults=r,pe.defaults=i,pe.use=function(...e){return he.use(...e),pe.defaults=he.defaults,o(pe.defaults),pe},pe.walkTokens=function(e,t){return he.walkTokens(e,t)},pe.parseInline=he.parseInline,pe.Parser=ce,pe.parser=ce.parse,pe.Renderer=ue,pe.TextRenderer=le,pe.Lexer=ae,pe.lexer=ae.lex,pe.Tokenizer=se,pe.Hooks=fe,pe.parse=pe;var me=pe.options,ge=pe.setOptions,ye=pe.use,ve=pe.walkTokens,be=pe.parseInline,we=pe,_e=ce.parse,ke=ae.lex},182:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.validate=t.v7=t.v6ToV1=t.v6=t.v5=t.v4=t.v3=t.v1ToV6=t.v1=t.stringify=t.parse=t.NIL=t.MAX=void 0;var r=n(2196);Object.defineProperty(t,"MAX",{enumerable:!0,get:function(){return r.default}});var i=n(3465);Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return i.default}});var o=n(1797);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.default}});var s=n(6011);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}});var a=n(1425);Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return a.default}});var u=n(6568);Object.defineProperty(t,"v1ToV6",{enumerable:!0,get:function(){return u.default}});var l=n(591);Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return l.default}});var c=n(8286);Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return c.default}});var f=n(4557);Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return f.default}});var d=n(6356);Object.defineProperty(t,"v6",{enumerable:!0,get:function(){return d.default}});var h=n(268);Object.defineProperty(t,"v6ToV1",{enumerable:!0,get:function(){return h.default}});var p=n(4299);Object.defineProperty(t,"v7",{enumerable:!0,get:function(){return p.default}});var m=n(9746);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return m.default}});var g=n(2770);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return g.default}})},268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[3])<<4|n[4]>>4&15,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|15&n[6],n[7],(15&n[1])<<4|(240&n[2])>>4,(15&n[2])<<4|(240&n[3])>>4,16|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentNode=void 0;class n{constructor(e,t){this.id=e,this.content=t||"",this.created=Date.now(),this.type="text",this.archived=!1,this.deleted=!1}static Create(e){const t=new n(e.id,e.content);return t.type="text",t.created=e.created,t.lastUpdated=e.lastUpdated,t.archived=e.archived,t.archiveDate=e.archiveDate,t.deleted=e.deleted,t.deletedDate=e.deletedDate,t}setContent(e){this.content=e,this.lastUpdated=Date.now()}isArchived(){return!0===this.archived}isDeleted(){return!0===this.deleted}toggleArchiveStatus(){this.isArchived()?this.unarchive():this.archive()}unarchive(){this.archived=!1,this.archiveDate=null}archive(){this.archived=!0,this.archiveDate=Date.now()}undelete(){this.deleted=!1,this.deletedDate=null}delete(){this.deleted=!0,this.deletedDate=Date.now()}toJson(){return{id:this.id,created:this.created,lastUpdated:this.lastUpdated,type:this.type,content:this.content,archived:this.archived,archiveDate:this.archiveDate,deleted:this.deleted,deletedDate:this.deletedDate}}}t.ContentNode=n},338:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,n,i,o,s){return r((a=r(r(t,e),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function u(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){const t=new Uint8Array(4*e.length);for(let n=0;n<4*e.length;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}(function(e,t){const i=new Uint32Array(n(t)).fill(0);i.set(e),i[t>>5]|=128<>2]|=(255&e[n])<f.ContentNode.Create(e)),e=>e.id)}isTreeRoot(e){return this.data.id===e}findNodeInTree(e,t,n,r=!1){let i=r;i||u.each(e.children,(r,o)=>{if(r.id===t)return n(r,e),i=!0,!1;r.children&&this.findNodeInTree(r,t,n,i)})}fold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!0})}unfold(e){this.findNodeInTree(this.data.tree,e,e=>{e.collapsed=!1})}flattenOutlineTreeChildren(e){return e.children.map(e=>e.id)}liftNodeToParent(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{t=e,this.findNodeInTree(this.data.tree,i.id,(e,i)=>{if(r)return;n=i,r=!0;const o=i.children.map(e=>e.id),s=e.children.map(e=>e.id).indexOf(t.id),a=o.indexOf(e.id);e.children.splice(s,1),i.children.splice(a+1,0,t)})}),{targetNode:t,parentNode:n}}lowerNodeToChild(e){let t,n,r,i=!1;return this.findNodeInTree(this.data.tree,e,(e,o)=>{if(i)return;i=!0,t=e;let s=o.children.map(e=>e.id);if(1===s.length)return;const a=s.indexOf(t.id),u=a-1;o.children[u].children.splice(0,0,t),o.children.splice(a,1),n=o.children[u],r=o}),{targetNode:t,newParentNode:n,oldParentNode:r}}swapNodeWithNextSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id),o=i.indexOf(t.id);o!==i.length-1&&(n.children.splice(o,1),n.children.splice(o+1,0,t))}),{targetNode:t,parentNode:n}}swapNodeWithPreviousSibling(e){let t,n;return this.findNodeInTree(this.data.tree,e,(e,r)=>{t=e,n=r;const i=n.children.map(e=>e.id).indexOf(t.id);0!==i&&(n.children.splice(i,1),n.children.splice(i-1,0,t))}),{targetNode:t,parentNode:n}}createSiblingNode(e,t){const n=t||new f.ContentNode((0,l.v4)());let r;return this.data.contentNodes[n.id]=n,this.findNodeInTree(this.data.tree,e,(t,i)=>{const o=i.children.map(e=>e.id).indexOf(e);i.children.splice(o+1,0,{id:n.id,collapsed:!1,children:[]}),r=i}),{node:n,parentNode:r}}createChildNode(e,t){const n=t?this.data.contentNodes[t]:new f.ContentNode((0,l.v4)());let r;return t||(this.data.contentNodes[n.id]=n),this.findNodeInTree(this.data.tree,e,(e,t)=>{e.children.unshift({id:n.id,children:[],collapsed:!1}),r=e}),{node:n,parentNode:r}}removeNode(e){let t,n,r=!1;return this.findNodeInTree(this.data.tree,e,(e,i)=>{if(r)return;r=!0,t=e,n=i;let o=n.children.map(e=>e.id).indexOf(e.id);n.children.splice(o,1)}),{removedNode:t,parentNode:n}}updateContent(e,t){if(!this.data.contentNodes[e])throw new Error("Invalid node");this.data.contentNodes[e].content=t}getContentNode(e){if(!this.data.contentNodes[e])throw new Error(`Invalid Node ${e}`);return this.data.contentNodes[e]}renderContent(e){return a(this,void 0,void 0,function*(){let t,n=this.getContentNode(e);if("text"===n.type){t=yield c.marked.parse(n.content);const e=h.DateTime.now(),r=(0,p.FindDate)(n.content);r.length&&r.forEach(t=>{e.startOf("day").toMillis()>t.toMillis()||(this.dates[t.toISODate()]||(this.dates[t.toISODate()]={}),this.dates[t.toISODate()][n.id]||(this.dates[t.toISODate()][n.id]={date:t,nodeId:n.id}))})}else t=n.content;return t})}renderDates(){let e=u.sortBy(Object.keys(this.dates).map(e=>h.DateTime.fromISO(e)),e=>e.toSeconds()).map(e=>`
  • ${e.toLocaleString({weekday:"long",day:"2-digit",month:"short"})}\n
    \n
      \n ${u.map(this.dates[e.toISODate()],e=>`
    1. \n ${c.marked.parse(this.getContentNode(e.nodeId).content.substr(0,100))}\n
    2. `).join("\n")}\n
    \n
  • `).join("\n");(0,m.$)("#dates").innerHTML=`
      ${e}
    `}renderNode(e){return a(this,void 0,void 0,function*(){if(e.id===this.data.id)return yield this.render();const t=this.data.contentNodes[e.id],n=e.collapsed?"collapsed":"expanded",r=t.isArchived()?"strikethrough":"",i=e.children.length?yield Promise.all(e.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)}))):[];let o=`
    \n
    \n ${yield this.renderContent(e.id)}\n
    \n ${i.join("\n")}\n
    `;return this.renderDates(),o})}render(){return a(this,void 0,void 0,function*(){return(yield Promise.all(this.data.tree.children.map(e=>a(this,void 0,void 0,function*(){return this.renderNode(e)})))).join("\n")})}}},587:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.sidebarToggle=void 0;const i=n(876);t.sidebarToggle={context:"navigation",keys:["ctrl + ;"],description:"Toggle visibility of sidebar",action:e=>r(void 0,void 0,void 0,function*(){(0,i.$)("#sidebar").classList.toggle("hidden")})}},591:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(338),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(48,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},717:(e,t,n)=>{"use strict";var r,i,o,s,a,u=n(1889);const l="__TAURI_TO_IPC_KEY__";function c(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class f{constructor(e){r.set(this,void 0),i.set(this,0),o.set(this,[]),s.set(this,void 0),u.__classPrivateFieldSet(this,r,e||(()=>{}),"f"),this.id=c(e=>{const t=e.index;if("end"in e)return void(t==u.__classPrivateFieldGet(this,i,"f")?this.cleanupCallback():u.__classPrivateFieldSet(this,s,t,"f"));const n=e.message;if(t==u.__classPrivateFieldGet(this,i,"f")){for(u.__classPrivateFieldGet(this,r,"f").call(this,n),u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f");u.__classPrivateFieldGet(this,i,"f")in u.__classPrivateFieldGet(this,o,"f");){const e=u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")];u.__classPrivateFieldGet(this,r,"f").call(this,e),delete u.__classPrivateFieldGet(this,o,"f")[u.__classPrivateFieldGet(this,i,"f")],u.__classPrivateFieldSet(this,i,u.__classPrivateFieldGet(this,i,"f")+1,"f")}u.__classPrivateFieldGet(this,i,"f")===u.__classPrivateFieldGet(this,s,"f")&&this.cleanupCallback()}else u.__classPrivateFieldGet(this,o,"f")[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){u.__classPrivateFieldSet(this,r,e,"f")}get onmessage(){return u.__classPrivateFieldGet(this,r,"f")}[(r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class d{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function h(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}a=new WeakMap,t.Channel=f,t.PluginListener=d,t.Resource=class{get rid(){return u.__classPrivateFieldGet(this,a,"f")}constructor(e){a.set(this,void 0),u.__classPrivateFieldSet(this,a,e,"f")}async close(){return h("plugin:resources|close",{rid:this.rid})}},t.SERIALIZE_TO_IPC_FN=l,t.addPluginListener=async function(e,t,n){const r=new f(n);return h(`plugin:${e}|registerListener`,{event:t,handler:r}).then(()=>new d(e,t,r.id))},t.checkPermissions=async function(e){return h(`plugin:${e}|check_permissions`)},t.convertFileSrc=function(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)},t.invoke=h,t.isTauri=function(){return!!(globalThis||window).isTauri},t.requestPermissions=async function(e){return h(`plugin:${e}|request_permissions`)},t.transformCallback=c},763:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;const o=n(1730),s=n(2543),a=i(n(935)),u=n(876);t.Search=class{constructor(){this.state="notready",this.bindEvents()}createIndex(e){return r(this,void 0,void 0,function*(){this.schema=e,this.state="notready",this.db=yield(0,o.create)({schema:e}),this.state="ready"})}bindEvents(){a.default.withContext("search",()=>{a.default.bind("escape",e=>{document.querySelector(".modal").remove(),a.default.setContext("navigation"),console.log("switch to navigation context")}),a.default.bind("down",e=>{e.preventDefault(),document.getElementById("search-query").blur();const t=document.querySelector(".search-result.selected");t.nextElementSibling&&(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected"),(0,u.isVisible)(t.nextElementSibling)||t.nextElementSibling.scrollIntoView())}),a.default.bind("up",e=>{e.preventDefault();const t=document.querySelector(".search-result.selected");t.previousElementSibling&&(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected"),(0,u.isVisible)(t.previousElementSibling)||t.previousElementSibling.scrollIntoView())}),a.default.bind("enter",e=>{const t=document.querySelector(".search-result.selected").getAttribute("data-id");document.querySelector(".modal").remove(),a.default.setContext("navigation"),this.onTermSelection&&this.onTermSelection(t)})}),a.default.withContext("navigation",()=>{a.default.bind("shift + f",e=>{e.preventDefault(),e.stopPropagation(),document.querySelector("body").innerHTML+='\n\n';const t=document.getElementById("search-query");t.focus(),t.addEventListener("keyup",this.debounceSearch.bind(this)),a.default.setContext("search")})})}debounceSearch(e){this.debounce&&clearInterval(this.debounce);const t=e.target.value.toString().trim();t.length&&(this.debounce=setTimeout(()=>{this.displaySearch(t,e)},100))}displaySearch(e,t){return r(this,void 0,void 0,function*(){if(!this.state)return;const t=yield this.search(e),n=document.getElementById("search-results");if(0===t.hits.length)return void(n.innerHTML="
  • No Results
  • ");const r=t.hits.map((e,t)=>{const n=e.document.content.toString(),r=n.substring(0,100);return`\n
  • ${r}${n.length>r.length?"...":""}
  • \n `});n.innerHTML=r.join("\n")})}indexDoc(e){return(0,o.insert)(this.db,e)}indexBatch(e){return(0,o.insertBatch)(this.db,(0,s.map)(e,e=>e.toJson()))}search(e){return(0,o.search)(this.db,{term:e.trim(),properties:["content"]})}replace(e){return r(this,void 0,void 0,function*(){yield(0,o.remove)(this.db,e.id),yield(0,o.insert)(this.db,e.toJson())})}reset(){return this.createIndex(this.schema)}}},876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVisible=function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},t.$=function(e,t){return(t||document).querySelector(e)},t.$$=function(e,t){return Array.from((t||document).querySelectorAll(e))}},935:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&s.splice(l,1)}if(0!==s.length)return!1}return!0}},{key:"_checkSubCombo",value:function(e,t,r){e=e.slice(0),r=r.slice(t);for(var i=t,o=0;o-1&&(e.splice(o,1),o-=1,u>i&&(i=u),0===e.length))return i}return-1}}]),n}();a.comboDeliminator=">",a.keyDeliminator="+",a.parseComboStr=function(e){for(var t=a._splitStr(e,a.comboDeliminator),n=[],r=0;r0&&n[s]===r&&"\\"!==n[s-1]&&(o.push(i.trim()),i="",s+=1),i+=n[s];return i&&o.push(i.trim()),o};var u=function(){function e(n){t(this,e),this.localeName=n,this.activeTargetKeys=[],this.pressedKeys=[],this._appliedMacros=[],this._keyMap={},this._killKeyCodes=[],this._macros=[]}return i(e,[{key:"bindKeyCode",value:function(e,t){"string"==typeof t&&(t=[t]),this._keyMap[e]=t}},{key:"bindMacro",value:function(e,t){"string"==typeof t&&(t=[t]);var n=null;"function"==typeof t&&(n=t,t=null);var r={keyCombo:new a(e),keyNames:t,handler:n};this._macros.push(r)}},{key:"getKeyCodes",value:function(e){var t=[];for(var n in this._keyMap)this._keyMap[n].indexOf(e)>-1&&t.push(0|n);return t}},{key:"getKeyNames",value:function(e){return this._keyMap[e]||[]}},{key:"setKillKey",value:function(e){if("string"!=typeof e)this._killKeyCodes.push(e);else for(var t=this.getKeyCodes(e),n=0;n-1&&this.pressedKeys.splice(o,1)}this.activeTargetKeys.length=0,this._clearMacros()}}},{key:"_applyMacros",value:function(){for(var e=this._macros.slice(0),t=0;t-1&&this.pressedKeys.splice(r,1)}t.handler&&(t.keyNames=null),this._appliedMacros.splice(e,1),e-=1}}}}]),e}(),l=function(){function r(e,n,i,o){t(this,r),this._locale=null,this._currentContext="",this._contexts={},this._listeners=[],this._appliedListeners=[],this._locales={},this._targetElement=null,this._targetWindow=null,this._targetPlatform="",this._targetUserAgent="",this._isModernBrowser=!1,this._targetKeyDownBinding=null,this._targetKeyUpBinding=null,this._targetResetBinding=null,this._paused=!1,this._contexts.global={listeners:this._listeners,targetWindow:e,targetElement:n,targetPlatform:i,targetUserAgent:o},this.setContext("global")}return i(r,[{key:"setLocale",value:function(e,t){var n=null;return"string"==typeof e?t?t(n=new u(e),this._targetPlatform,this._targetUserAgent):n=this._locales[e]||null:e=(n=e)._localeName,this._locale=n,this._locales[e]=n,n&&(this._locale.pressedKeys=n.pressedKeys),this}},{key:"getLocale",value:function(e){return e||(e=this._locale.localeName),this._locales[e]||null}},{key:"bind",value:function(t,n,r,i){if(null!==t&&"function"!=typeof t||(i=r,r=n,n=t,t=null),t&&"object"===e(t)&&"number"==typeof t.length){for(var o=0;o"]),e.bindMacro("shift + /",["questionmark","?"]),t.match("Mac")?e.bindMacro("command",["mod","modifier"]):e.bindMacro("ctrl",["mod","modifier"]);for(var r=65;r<=90;r+=1){var i=String.fromCharCode(r+32),o=String.fromCharCode(r);e.bindKeyCode(r,i),e.bindMacro("shift + "+i,o),e.bindMacro("capslock + "+i,o)}var s,a,u=n.match("Firefox")?59:186,l=n.match("Firefox")?173:189,c=n.match("Firefox")?61:187;t.match("Mac")&&(n.match("Safari")||n.match("Chrome"))?(s=91,a=93):t.match("Mac")&&n.match("Opera")?(s=17,a=17):t.match("Mac")&&n.match("Firefox")&&(s=224,a=224),e.bindKeyCode(u,["semicolon",";"]),e.bindKeyCode(l,["dash","-"]),e.bindKeyCode(c,["equal","equalsign","="]),e.bindKeyCode(s,["command","windows","win","super","leftcommand","leftwindows","leftwin","leftsuper"]),e.bindKeyCode(a,["command","windows","win","super","rightcommand","rightwindows","rightwin","rightsuper"]),e.setKillKey("command")}),c.Keyboard=l,c.Locale=u,c.KeyCombo=a,c}()},1031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.slugify=function(e){return e.toLowerCase().split(" ").join("_")}},1062:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.l=void 0,t.l={context:"navigation",keys:["l"],description:"Move the cursor to the first child element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e;if(!t.shiftKey){if(n.isNodeCollapsed())return;const e=n.get().querySelector(".node");e&&n.set(`#id-${e.getAttribute("data-id")}`)}})}},1169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends n{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class o extends n{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class s extends n{}class a extends n{constructor(e){super(`Invalid unit ${e}`)}}class u extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const c="numeric",f="short",d="long",h={year:c,month:c,day:c},p={year:c,month:f,day:c},m={year:c,month:f,day:c,weekday:f},g={year:c,month:d,day:c},y={year:c,month:d,day:c,weekday:d},v={hour:c,minute:c},b={hour:c,minute:c,second:c},w={hour:c,minute:c,second:c,timeZoneName:f},_={hour:c,minute:c,second:c,timeZoneName:d},k={hour:c,minute:c,hourCycle:"h23"},x={hour:c,minute:c,second:c,hourCycle:"h23"},S={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:f},O={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:d},T={year:c,month:c,day:c,hour:c,minute:c},C={year:c,month:c,day:c,hour:c,minute:c,second:c},D={year:c,month:f,day:c,hour:c,minute:c},N={year:c,month:f,day:c,hour:c,minute:c,second:c},M={year:c,month:f,day:c,weekday:f,hour:c,minute:c},E={year:c,month:d,day:c,hour:c,minute:c,timeZoneName:f},L={year:c,month:d,day:c,hour:c,minute:c,second:c,timeZoneName:f},I={year:c,month:d,day:c,weekday:d,hour:c,minute:c,timeZoneName:d},A={year:c,month:d,day:c,weekday:d,hour:c,minute:c,second:c,timeZoneName:d};class ${get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(e,t){throw new l}formatOffset(e,t){throw new l}offset(e){throw new l}equals(e){throw new l}get isValid(){throw new l}}let R=null;class j extends ${static get instance(){return null===R&&(R=new j),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const P=new Map,U={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},z=new Map;class F extends ${static create(e){let t=z.get(e);return void 0===t&&z.set(e,t=new F(e)),t}static resetCache(){z.clear(),P.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n,this.name)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=P.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),P.set(e,t)),t}(this.name);let[r,i,o,s,a,u,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e=0?f:1e3+f,(Xe({year:r,month:i,day:o,hour:24===a?0:a,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let B={};const K=new Map;function V(e,t={}){const n=JSON.stringify([e,t]);let r=K.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),K.set(n,r)),r}const W=new Map,q=new Map;let Z=null;const H=new Map;function G(e){let t=H.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),H.set(e,t)),t}const J=new Map;function Y(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=W.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),W.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return We(this.floor?Math.floor(e):Ge(e,3),this.padTo)}}class X{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=V(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ee{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ue()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=q.get(i);return void 0===o&&(o=new Intl.RelativeTimeFormat(e,t),q.set(i,o)),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),u=1===a,l=i[e],c=r?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const te={firstDay:1,minimalDays:4,weekend:[6,7]};class ne{static fromOpts(e){return ne.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const o=e||we.defaultLocale,s=o||(i?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=t||we.defaultNumberingSystem,u=n||we.defaultOutputCalendar,l=Ke(r)||we.defaultWeekSettings;return new ne(s,a,u,l,o)}static resetCache(){Z=null,K.clear(),W.clear(),q.clear(),H.clear(),J.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ne.create(e,t,n,r)}constructor(e,t,n,r,i){const[o,s,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=V(e).resolvedOptions(),r=e}catch(i){const o=e.substring(0,n);t=V(o).resolvedOptions(),r=o}const{numberingSystem:i,calendar:o}=t;return[r,i,o]}}(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===G(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ne.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Y(this,e,dt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=mr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Y(this,e,gt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=mr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Y(this,void 0,()=>yt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[mr.utc(2016,11,13,9),mr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Y(this,e,_t,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[mr.utc(-40,1,1),mr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new X(e,this.intl,t)}relFormatter(e={}){return new ee(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=B[n];return r||(r=new Intl.ListFormat(e,t),B[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||G(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ze()?function(e){let t=J.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...te,...t}),J.set(e,t)}return t}(this.locale):te}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let re=null;class ie extends ${static get utcInstance(){return null===re&&(re=new ie(0)),re}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${at(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${at(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return at(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class oe extends ${constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function se(e,t){if(Re(e)||null===e)return t;if(e instanceof $)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?j.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||F.create(e)}return je(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new oe(e)}const ae={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ue={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},le=ae.hanidec.replace(/[\[|\]]/g,"").split(""),ce=new Map;function fe({numberingSystem:e},t=""){const n=e||"latn";let r=ce.get(n);void 0===r&&(r=new Map,ce.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${ae[n]}${t}`),r.set(t,i)),i}let de,he=()=>Date.now(),pe="system",me=null,ge=null,ye=null,ve=60,be=null;class we{static get now(){return he}static set now(e){he=e}static set defaultZone(e){pe=e}static get defaultZone(){return se(pe,j.instance)}static get defaultLocale(){return me}static set defaultLocale(e){me=e}static get defaultNumberingSystem(){return ge}static set defaultNumberingSystem(e){ge=e}static get defaultOutputCalendar(){return ye}static set defaultOutputCalendar(e){ye=e}static get defaultWeekSettings(){return be}static set defaultWeekSettings(e){be=Ke(e)}static get twoDigitCutoffYear(){return ve}static set twoDigitCutoffYear(e){ve=e%100}static get throwOnInvalid(){return de}static set throwOnInvalid(e){de=e}static resetCaches(){ne.resetCache(),F.resetCache(),mr.resetCache(),ce.clear()}}class _e{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ke=[0,31,59,90,120,151,181,212,243,273,304,334],xe=[0,31,60,91,121,152,182,213,244,274,305,335];function Se(e,t){return new _e("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Oe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function Te(e,t,n){return n+(Je(e)?xe:ke)[t-1]}function Ce(e,t){const n=Je(e)?xe:ke,r=n.findIndex(e=>ett(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...ut(e)}}function Me(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:o}=e,s=De(Oe(r,1,t),n),a=Ye(r);let u,l=7*i+o-s-7+t;l<1?(u=r-1,l+=Ye(u)):l>a?(u=r+1,l-=Ye(r)):u=r;const{month:c,day:f}=Ce(u,l);return{year:u,month:c,day:f,...ut(e)}}function Ee(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Te(t,n,r),...ut(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:i}=Ce(t,n);return{year:t,month:r,day:i,...ut(e)}}function Ie(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new s("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ae(e){const t=Pe(e.year),n=Ve(e.month,1,12),r=Ve(e.day,1,Qe(e.year,e.month));return t?n?!r&&Se("day",e.day):Se("month",e.month):Se("year",e.year)}function $e(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=Ve(t,0,23)||24===t&&0===n&&0===r&&0===i,s=Ve(n,0,59),a=Ve(r,0,59),u=Ve(i,0,999);return o?s?a?!u&&Se("millisecond",i):Se("second",r):Se("minute",n):Se("hour",t)}function Re(e){return void 0===e}function je(e){return"number"==typeof e}function Pe(e){return"number"==typeof e&&e%1==0}function Ue(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ze(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Fe(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function Be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ke(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!Ve(e.firstDay,1,7)||!Ve(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ve(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ve(e,t,n){return Pe(e)&&e>=t&&e<=n}function We(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qe(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Ze(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function He(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ge(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Je(e){return e%4==0&&(e%100!=0||e%400==0)}function Ye(e){return Je(e)?366:365}function Qe(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?Je(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Xe(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function et(e,t,n){return-De(Oe(e,1,t),n)+t-1}function tt(e,t=4,n=1){const r=et(e,t,n),i=et(e+1,t,n);return(Ye(e)-r+i)/7}function nt(e){return e>99?e:e>we.twoDigitCutoffYear?1900+e:2e3+e}function rt(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ot(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function st(e,t){const n={};for(const r in e)if(Be(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=ot(i)}return n}function at(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${We(n,2)}:${We(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${We(n,2)}${We(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const lt=["January","February","March","April","May","June","July","August","September","October","November","December"],ct=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=["J","F","M","A","M","J","J","A","S","O","N","D"];function dt(e){switch(e){case"narrow":return[...ft];case"short":return[...ct];case"long":return[...lt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ht=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],mt=["M","T","W","T","F","S","S"];function gt(e){switch(e){case"narrow":return[...mt];case"short":return[...pt];case"long":return[...ht];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const yt=["AM","PM"],vt=["Before Christ","Anno Domini"],bt=["BC","AD"],wt=["B","A"];function _t(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...vt];default:return null}}function kt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const xt={D:h,DD:p,DDD:g,DDDD:y,t:v,tt:b,ttt:w,tttt:_,T:k,TT:x,TTT:S,TTTT:O,f:T,ff:D,fff:E,ffff:I,F:C,FF:N,FFF:L,FFFF:A};class St{static create(e,t={}){return new St(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let o=0;o0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return xt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return We(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,r)=>n?function(e,t){return dt(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),a=(t,r)=>n?function(e,t){return gt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=St.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?function(e,t){return _t(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return kt(St.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return yt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=St.parseFormat(t),o=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),s=e.shiftTo(...o.map(r).filter(e=>e));return kt(i,((e,t)=>i=>{const o=r(i);if(o){const r=t.isNegativeDuration&&o!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&o!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(o)*r,i.length,s)}return i})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const Ot=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Tt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ct(...e){return t=>e.reduce(([e,n,r],i)=>{const[o,s,a]=i(t,r);return[{...e,...o},s||n,a]},[{},null,1]).slice(0,2)}function Dt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Nt(...e){return(t,n)=>{const r={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:d(Ze(n)),months:d(Ze(r)),weeks:d(Ze(i)),days:d(Ze(o)),hours:d(Ze(s)),minutes:d(Ze(a)),seconds:d(Ze(u),"-0"===u),milliseconds:d(He(l),f)}]}const Wt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function qt(e,t,n,r,i,o,s){const a={year:2===t.length?nt(qe(t)):qe(t),month:ct.indexOf(n)+1,day:qe(r),hour:qe(i),minute:qe(o)};return s&&(a.second=qe(s)),e&&(a.weekday=e.length>3?ht.indexOf(e)+1:pt.indexOf(e)+1),a}const Zt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ht(e){const[,t,n,r,i,o,s,a,u,l,c,f]=e,d=qt(t,i,r,n,o,s,a);let h;return h=u?Wt[u]:l?0:it(c,f),[d,new ie(h)]}const Gt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Jt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Yt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,i,r,n,o,s,a),ie.utcInstance]}function Xt(e){const[,t,n,r,i,o,s,a]=e;return[qt(t,a,n,r,i,o,s),ie.utcInstance]}const en=Tt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,It),tn=Tt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,It),nn=Tt(/(\d{4})-?(\d{3})/,It),rn=Tt(Lt),on=Ct(function(e,t){return[{year:Pt(e,t),month:Pt(e,t+1,1),day:Pt(e,t+2,1)},null,t+3]},Ut,zt,Ft),sn=Ct(At,Ut,zt,Ft),an=Ct($t,Ut,zt,Ft),un=Ct(Ut,zt,Ft),ln=Ct(Ut),cn=Tt(/(\d{4})-(\d\d)-(\d\d)/,jt),fn=Tt(Rt),dn=Ct(Ut,zt,Ft),hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},gn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vn=yn.slice(0).reverse();function bn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new xn(r)}function wn(e,t){var n;let r=null!=(n=t.milliseconds)?n:0;for(const n of vn.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function _n(e,t){const n=wn(e,t)<0?-1:1;yn.reduceRight((r,i)=>{if(Re(t[i]))return r;if(r){const o=t[r]*n,s=e[i][r],a=Math.floor(o/s);t[i]+=a*n,t[r]-=a*s*n}return i},null),yn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function kn(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class xn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?gn:mn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ne.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return xn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new xn({values:st(e,xn.normalizeUnit),loc:ne.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(je(e))return xn.fromMillis(e);if(xn.isDuration(e))return e;if("object"==typeof e)return xn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Dt(e,[Kt,Vt])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Dt(e,[Bt,ln])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new o(n);return new xn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?St.create(this.loc,n).formatDurationFromString(this,e):hn}toHuman(e={}){if(!this.isValid)return hn;const t=!1!==e.showZeros,n=yn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ge(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},mr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e),n={};for(const e of yn)(Be(t.values,e)||Be(this.values,e))&&(n[e]=t.get(e)+this.get(e));return bn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ot(e(this.values[n],n));return bn(this,{values:t},!0)}get(e){return this[xn.normalizeUnit(e)]}set(e){return this.isValid?bn(this,{values:{...this.values,...st(e,xn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return bn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return _n(this.matrix,e),bn(this,{values:e},!0)}rescale(){return this.isValid?bn(this,{values:kn(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>xn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const o of yn)if(e.indexOf(o)>=0){i=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;je(r[o])&&(e+=r[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3}else je(r[o])&&(n[o]=r[o]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return _n(this.matrix,t),bn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return bn(this,{values:e},!0)}removeZeros(){return this.isValid?bn(this,{values:kn(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of yn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Sn="Invalid Interval";class On{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new i(n);return new On({invalid:n})}static fromDateTimes(e,t){const n=gr(e),r=gr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?On.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(gr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r+this.e?this.e:e;n.push(On.fromDateTimes(r,o)),r=o,i+=1}return n}splitBy(e){const t=xn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const o=[];for(;re*i));n=+e>+this.e?this.e:e,o.push(On.fromDateTimes(r,n)),r=n,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:On.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return On.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),o=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(On.fromDateTimes(t,e.time)),t=null);return On.merge(r)}difference(...e){return On.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Sn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=h,t={}){return this.isValid?St.create(this.s.loc.clone(t),e).formatInterval(this):Sn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Sn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Sn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Sn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Sn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xn.invalid(this.invalidReason)}mapEndpoints(e){return On.fromDateTimes(e(this.s),e(this.e))}}class Tn{static hasDST(e=we.defaultZone){const t=mr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return se(e,we.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ne.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ne.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ne.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ne.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ne.create(t,null,"gregory").eras(e)}static features(){return{relative:Ue(),localeWeek:ze()}}}function Cn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(xn.fromMillis(r).as("days"))}function Dn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Nn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Nn,"g");function En(e){return e.replace(/\./g,"\\.?").replace(Mn,Nn)}function Ln(e){return e.replace(/\./g,"").replace(Mn," ").toLowerCase()}function In(e,t){return null===e?null:{regex:RegExp(e.map(En).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function An(e,t){return{regex:e,deser:([,e,t])=>it(e,t),groups:t}}function $n(e){return{regex:e,deser:([e])=>e}}const Rn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let jn=null;function Pn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Fn(St.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Un{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Pn(St.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=fe(t),r=fe(t,"{2}"),i=fe(t,"{3}"),o=fe(t,"{4}"),s=fe(t,"{6}"),a=fe(t,"{1,2}"),u=fe(t,"{1,3}"),l=fe(t,"{1,6}"),c=fe(t,"{1,9}"),f=fe(t,"{2,4}"),d=fe(t,"{4,6}"),h=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return h(p);switch(p.val){case"G":return In(t.eras("short"),0);case"GG":return In(t.eras("long"),0);case"y":return Dn(l);case"yy":case"kk":return Dn(f,nt);case"yyyy":case"kkkk":return Dn(o);case"yyyyy":return Dn(d);case"yyyyyy":return Dn(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Dn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Dn(r);case"MMM":return In(t.months("short",!0),1);case"MMMM":return In(t.months("long",!0),1);case"LLL":return In(t.months("short",!1),1);case"LLLL":return In(t.months("long",!1),1);case"o":case"S":return Dn(u);case"ooo":case"SSS":return Dn(i);case"u":return $n(c);case"uu":return $n(a);case"uuu":case"E":case"c":return Dn(n);case"a":return In(t.meridiems(),0);case"EEE":return In(t.weekdays("short",!1),1);case"EEEE":return In(t.weekdays("long",!1),1);case"ccc":return In(t.weekdays("short",!0),1);case"cccc":return In(t.weekdays("long",!0),1);case"Z":case"ZZ":return An(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return An(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return h(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(Be(n,i)){const o=n[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,o]=n?function(e){let t,n=null;return Re(e.z)||(n=F.create(e.z)),Re(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Re(e.u)||(e.S=He(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(Be(n,"a")&&Be(n,"H"))throw new s("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function zn(e,t,n){return new Un(e,n).explainFromTokens(t)}function Fn(e,t){if(!e)return null;const n=St.create(t,e).dtFormatter((jn||(jn=mr.fromMillis(1555555555555)),jn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const o=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Rn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(t,e,i))}const Bn="Invalid DateTime",Kn=864e13;function Vn(e){return new _e("unsupported zone",`the zone "${e.name}" is not supported`)}function Wn(e){return null===e.weekData&&(e.weekData=Ne(e.c)),e.weekData}function qn(e){return null===e.localWeekData&&(e.localWeekData=Ne(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Zn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new mr({...n,...t,old:n})}function Hn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const o=n.offset(r);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Gn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Jn(e,t,n){return Hn(Xe(e),t,n)}function Yn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:r,month:i,day:Math.min(e.c.day,Qe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Xe(o);let[u,l]=Hn(a,n,e.zone);return 0!==s&&(u+=s,l=e.zone.offset(u)),{ts:u,o:l}}function Qn(e,t,n,r,i,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,i=mr.fromObject(e,{...n,zone:r,specificOffset:o});return s?i:i.setZone(a)}return mr.invalid(new _e("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Xn(e,t,n=!0){return e.isValid?St.create(ne.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=We(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=We(e.c.month),"month"===n)return i;i+="-"}else if(i+=We(e.c.month),"month"===n)return i;return i+=We(e.c.day),i}function tr(e,t,n,r,i,o,s){let a=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(s){case"day":case"month":case"year":break;default:if(u+=We(e.c.hour),"hour"===s)break;if(t){if(u+=":",u+=We(e.c.minute),"minute"===s)break;a&&(u+=":",u+=We(e.c.second))}else{if(u+=We(e.c.minute),"minute"===s)break;a&&(u+=We(e.c.second))}if("second"===s)break;!a||r&&0===e.c.millisecond||(u+=".",u+=We(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!o?u+="Z":e.o<0?(u+="-",u+=We(Math.trunc(-e.o/60)),u+=":",u+=We(Math.trunc(-e.o%60))):(u+="+",u+=We(Math.trunc(e.o/60)),u+=":",u+=We(Math.trunc(e.o%60)))),o&&(u+="["+e.zone.ianaName+"]"),u}const nr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},or=["year","month","day","hour","minute","second","millisecond"],sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ar=["year","ordinal","hour","minute","second","millisecond"];function ur(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new a(e);return t}function lr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ur(e)}}function cr(e,t){const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t);let i,o;if(Re(e.year))i=we.now();else{for(const t of or)Re(e[t])&&(e[t]=nr[t]);const t=Ae(e)||$e(e);if(t)return mr.invalid(t);const r=function(e){if(void 0===hr&&(hr=we.now()),"iana"!==e.type)return e.offset(hr);const t=e.name;let n=pr.get(t);return void 0===n&&(n=e.offset(hr),pr.set(t,n)),n}(n);[i,o]=Jn(e,r,n)}return new mr({ts:i,zone:n,loc:r,o})}function fr(e,t,n){const r=!!Re(n.round)||n.round,i=Re(n.rounding)?"trunc":n.rounding,o=(e,o)=>(e=Ge(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,o)),s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return o(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return o(t,e)}return o(e>t?-0:0,n.units[n.units.length-1])}function dr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let hr;const pr=new Map;class mr{constructor(e){const t=e.zone||we.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Vn(t));this.ts=Re(e.ts)?we.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=je(e.o)&&!e.old?e.o:t.offset(this.ts);r=Gn(this.ts,o),n=Number.isNaN(r.year)?new _e("invalid input"):null,r=n?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||ne.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new mr({})}static local(){const[e,t]=dr(arguments),[n,r,i,o,s,a,u]=t;return cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static utc(){const[e,t]=dr(arguments),[n,r,i,o,s,a,u]=t;return e.zone=ie.utcInstance,cr({year:n,month:r,day:i,hour:o,minute:s,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return mr.invalid("invalid input");const i=se(t.zone,we.defaultZone);return i.isValid?new mr({ts:n,zone:i,loc:ne.fromObject(t)}):mr.invalid(Vn(i))}static fromMillis(e,t={}){if(je(e))return e<-Kn||e>Kn?mr.invalid("Timestamp out of range"):new mr({ts:e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(je(e))return new mr({ts:1e3*e,zone:se(t.zone,we.defaultZone),loc:ne.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=se(t.zone,we.defaultZone);if(!n.isValid)return mr.invalid(Vn(n));const r=ne.fromObject(t),i=st(e,lr),{minDaysInFirstWeek:o,startOfWeek:a}=Ie(i,r),u=we.now(),l=Re(t.specificOffset)?n.offset(u):t.specificOffset,c=!Re(i.ordinal),f=!Re(i.year),d=!Re(i.month)||!Re(i.day),h=f||d,p=i.weekYear||i.weekNumber;if((h||c)&&p)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new s("Can't mix ordinal dates with month/day");const m=p||i.weekday&&!h;let g,y,v=Gn(u,l);m?(g=sr,y=rr,v=Ne(v,o,a)):c?(g=ar,y=ir,v=Ee(v)):(g=or,y=nr);let b=!1;for(const e of g)Re(i[e])?i[e]=b?y[e]:v[e]:b=!0;const w=m?function(e,t=4,n=1){const r=Pe(e.weekYear),i=Ve(e.weekNumber,1,tt(e.weekYear,t,n)),o=Ve(e.weekday,1,7);return r?i?!o&&Se("weekday",e.weekday):Se("week",e.weekNumber):Se("weekYear",e.weekYear)}(i,o,a):c?function(e){const t=Pe(e.year),n=Ve(e.ordinal,1,Ye(e.year));return t?!n&&Se("ordinal",e.ordinal):Se("year",e.year)}(i):Ae(i),_=w||$e(i);if(_)return mr.invalid(_);const k=m?Me(i,o,a):c?Le(i):i,[x,S]=Jn(k,l,n),O=new mr({ts:x,zone:n,o:S,loc:r});return i.weekday&&h&&e.weekday!==O.weekday?mr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${O.toISO()}`):O.isValid?O:mr.invalid(O.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Dt(e,[en,on],[tn,sn],[nn,an],[rn,un])}(e);return Qn(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Dt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Zt,Ht])}(e);return Qn(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Dt(e,[Gt,Qt],[Jt,Qt],[Yt,Xt])}(e);return Qn(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[s,a,l,c]=function(e,t,n){const{result:r,zone:i,specificOffset:o,invalidReason:s}=zn(e,t,n);return[r,i,o,s]}(o,e,t);return c?mr.invalid(c):Qn(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return mr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Dt(e,[cn,on],[fn,dn])}(e);return Qn(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof _e?e:new _e(e,t);if(we.throwOnInvalid)throw new r(n);return new mr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Fn(e,ne.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Pn(St.parseFormat(e),ne.fromObject(t)).map(e=>e.val).join("")}static resetCache(){hr=void 0,pr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wn(this).weekYear:NaN}get weekNumber(){return this.isValid?Wn(this).weekNumber:NaN}get weekday(){return this.isValid?Wn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qn(this).weekday:NaN}get localWeekNumber(){return this.isValid?qn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qn(this).weekYear:NaN}get ordinal(){return this.isValid?Ee(this.c).ordinal:NaN}get monthShort(){return this.isValid?Tn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Tn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Tn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Tn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Xe(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),o=this.zone.offset(n-r*t),s=this.zone.offset(n-i*t);if(o===s)return[this];const a=n-o*t,u=n-s*t,l=Gn(a,o),c=Gn(u,s);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:u})]:[this]}get isInLeapYear(){return Je(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Ye(this.year):NaN}get weeksInWeekYear(){return this.isValid?tt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?tt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=St.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(we.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=se(e,we.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Jn(n,t,e)}return Zn(this,{ts:r,zone:e})}return mr.invalid(Vn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=st(e,lr),{minDaysInFirstWeek:n,startOfWeek:r}=Ie(t,this.loc),i=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),o=!Re(t.ordinal),a=!Re(t.year),u=!Re(t.month)||!Re(t.day),l=a||u,c=t.weekYear||t.weekNumber;if((l||o)&&c)throw new s("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new s("Can't mix ordinal dates with month/day");let f;i?f=Me({...Ne(this.c,n,r),...t},n,r):Re(t.ordinal)?(f={...this.toObject(),...t},Re(t.day)&&(f.day=Math.min(Qe(f.year,f.month),f.day))):f=Le({...Ee(this.c),...t});const[d,h]=Jn(f,this.o,this.zone);return Zn(this,{ts:d,o:h})}plus(e){return this.isValid?Zn(this,Yn(this,xn.fromDurationLike(e))):this}minus(e){return this.isValid?Zn(this,Yn(this,xn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=xn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t=3&&(a+="T"),a+=tr(this,s,t,n,r,i,o),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?er(this,"extended"===e,ur(t)):null}toISOWeekDate(){return Xn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended",precision:s="milliseconds"}={}){return this.isValid?(s=ur(s),(r&&or.indexOf(s)>=3?"T":"")+tr(this,"extended"===o,t,e,n,i,s)):null}toRFC2822(){return Xn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?er(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Xn(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Bn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return xn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(a=t,Array.isArray(a)?a:[a]).map(xn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=function(e,t,n,r){let[i,o,s,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Cn(e,t);return(n-n%7)/7}],["days",Cn]],i={},o=e;let s,a;for(const[u,l]of r)n.indexOf(u)>=0&&(s=u,i[u]=l(e,t),a=o.plus(i),a>t?(i[u]--,(e=o.plus(i))>t&&(a=e,i[u]--,e=o.plus(i))):e=a);return[e,i,a,s]}(e,t,n);const u=t-i,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(s0?xn.fromMillis(u,r).shiftTo(...l).plus(c):c}(o?this:e,o?e:this,i,r);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(mr.now(),e,t)}until(e){return this.isValid?On.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||mr.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(mr.isDateTime))throw new u("max requires all arguments be DateTimes");return Fe(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return zn(ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return mr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=ne.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Un(i,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,o=ne.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?mr.invalid(c):Qn(s,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return h}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return g}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return v}static get TIME_WITH_SECONDS(){return b}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return _}static get TIME_24_SIMPLE(){return k}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return O}static get DATETIME_SHORT(){return T}static get DATETIME_SHORT_WITH_SECONDS(){return C}static get DATETIME_MED(){return D}static get DATETIME_MED_WITH_SECONDS(){return N}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return E}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return A}}function gr(e){if(mr.isDateTime(e))return e;if(e&&e.valueOf&&je(e.valueOf()))return mr.fromJSDate(e);if(e&&"object"==typeof e)return mr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=mr,t.Duration=xn,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=Tn,t.Interval=On,t.InvalidZone=oe,t.Settings=we,t.SystemZone=j,t.VERSION="3.7.1",t.Zone=$},1238:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeEditing=void 0;const o=i(n(935));t.escapeEditing={context:"editing",keys:["esc","enter"],description:'Stop editing the current node and return to "navigation" mode',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i,search:s}=e;if(t.shiftKey&&"Enter"===t.key)return;n.get().classList.remove("hidden-cursor");const a=n.get().querySelector(".nodeContent");a.contentEditable="false",a.blur(),o.default.setContext("navigation"),r.updateContent(n.getIdOfNode(),a.innerHTML.trim()),a.innerHTML=yield r.renderContent(n.getIdOfNode()),r.renderDates(),i.saveContentNode(r.getContentNode(n.getIdOfNode()))})}},1425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV1State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t= 16");if(o){if(s<0||s+16>o.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else o=new Uint8Array(16),s=0;t??=Date.now(),n??=0,r??=16383&(e[8]<<8|e[9]),i??=e.slice(10,16);const a=(1e4*(268435455&(t+=122192928e5))+n)%4294967296;o[s++]=a>>>24&255,o[s++]=a>>>16&255,o[s++]=a>>>8&255,o[s++]=255&a;const u=t/4294967296*1e4&268435455;o[s++]=u>>>8&255,o[s++]=255&u,o[s++]=u>>>24&15|16,o[s++]=u>>>16&255,o[s++]=r>>>8|128,o[s++]=255&r;for(let e=0;e<6;++e)o[s++]=i[e];return o}t.updateV1State=s,t.default=function(e,t,n){let u;const l=e?._v6??!1;if(e){const t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.nsecs,l?void 0:o.clockseq,l?void 0:o.node,t,n)}return t??(0,i.unsafeStringify)(u)}},1730:(e,t,n)=>{"use strict";let r,i,o,s,a,u,l,c,f,d;async function h(...e){if(!r){const e=await Promise.all([n.e(269),n.e(915)]).then(n.bind(n,9915));r=e.create}return r(...e)}async function p(...e){if(!i){const e=await n.e(164).then(n.bind(n,1164));i=e.insert}return i(...e)}async function m(...e){if(!o){const e=await n.e(164).then(n.bind(n,1164));o=e.insertWithHooks}return o(...e)}async function g(...e){if(!s){const e=await n.e(164).then(n.bind(n,1164));s=e.insertBatch}return s(...e)}async function y(...e){if(!a){const e=await Promise.all([n.e(269),n.e(903)]).then(n.bind(n,6903));a=e.remove}return a(...e)}async function v(...e){if(!u){const e=await Promise.all([n.e(269),n.e(753)]).then(n.bind(n,1753));u=e.search}return u(...e)}async function b(...e){if(!l){const e=await n.e(366).then(n.bind(n,9366));l=e.save}return l(...e)}async function w(...e){if(!c){const e=await n.e(379).then(n.bind(n,1379));c=e.load}return c(...e)}async function _(...e){if(!f){const e=await n.e(572).then(n.bind(n,2572));f=e.count}return f(...e)}async function k(...e){if(!d){const e=await n.e(572).then(n.bind(n,2572));d=e.getByID}return d(...e)}function x(e){Promise.all([n.e(269),n.e(753),n.e(550)]).then(n.bind(n,9550)).then(t=>setTimeout(()=>e(void 0,t),1)).catch(t=>setTimeout(()=>e(t),1))}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{create:()=>h,insert:()=>p,insertWithHooks:()=>m,insertBatch:()=>g,remove:()=>y,search:()=>v,save:()=>b,load:()=>w,count:()=>_,getByID:()=>k,requireLyra:()=>x})},1760:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0,t.z={context:"navigation",keys:["z"],description:"hide all children node of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,api:n,outline:r}=e;t.isNodeExpanded()?(t.collapse(),r.fold(t.getIdOfNode())):t.isNodeCollapsed()&&(t.expand(),r.unfold(t.getIdOfNode())),n.save(r)})}},1797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},1889:(e,t)=>{"use strict";"function"==typeof SuppressedError&&SuppressedError,t.__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},t.__classPrivateFieldSet=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},2195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindDate=function(e){let t=[];for(let n=0,o=i.length;n{t.push(r.DateTime.fromISO(e.trim()))});break}catch(e){}}return t};const r=n(1169),i=[/[0-9]{4}-[0-9]{2}-[0-9]{2}/gi]},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},2291:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0});const r=new Uint8Array(16);t.default=function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(r)}},2341:(e,t,n)=>{"use strict";var r,i=n(717);t.BaseDirectory=void 0,(r=t.BaseDirectory||(t.BaseDirectory={}))[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",t.appCacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppCache})},t.appConfigDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppConfig})},t.appDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppData})},t.appLocalDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLocalData})},t.appLogDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.AppLog})},t.audioDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Audio})},t.basename=async function(e,t){return i.invoke("plugin:path|basename",{path:e,ext:t})},t.cacheDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Cache})},t.configDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Config})},t.dataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Data})},t.delimiter=function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},t.desktopDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Desktop})},t.dirname=async function(e){return i.invoke("plugin:path|dirname",{path:e})},t.documentDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Document})},t.downloadDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Download})},t.executableDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Executable})},t.extname=async function(e){return i.invoke("plugin:path|extname",{path:e})},t.fontDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Font})},t.homeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Home})},t.isAbsolute=async function(e){return i.invoke("plugin:path|is_absolute",{path:e})},t.join=async function(...e){return i.invoke("plugin:path|join",{paths:e})},t.localDataDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.LocalData})},t.normalize=async function(e){return i.invoke("plugin:path|normalize",{path:e})},t.pictureDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Picture})},t.publicDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Public})},t.resolve=async function(...e){return i.invoke("plugin:path|resolve",{paths:e})},t.resolveResource=async function(e){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource,path:e})},t.resourceDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Resource})},t.runtimeDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Runtime})},t.sep=function(){return window.__TAURI_INTERNALS__.plugins.path.sep},t.tempDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Temp})},t.templateDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Template})},t.videoDir=async function(){return i.invoke("plugin:path|resolve_directory",{directory:t.BaseDirectory.Video})}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",O="[object Promise]",T="[object RegExp]",C="[object Set]",D="[object String]",N="[object Symbol]",M="[object WeakMap]",E="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",A="[object Float64Array]",$="[object Int8Array]",R="[object Int16Array]",j="[object Int32Array]",P="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",F="[object Uint32Array]",B=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Z=RegExp(W.source),H=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="["+_e+"]",Ne="["+Ce+"]",Me="["+ke+"]",Ee="\\d+",Le="["+xe+"]",Ie="["+Se+"]",Ae="[^"+_e+Ce+Ee+xe+Se+Oe+"]",$e="\\ud83c[\\udffb-\\udfff]",Re="[^"+_e+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Oe+"]",ze="\\u200d",Fe="(?:"+Ie+"|"+Ae+")",Be="(?:"+Ue+"|"+Ae+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Me+"|"+$e+")?",qe="["+Te+"]?",Ze=qe+We+"(?:"+ze+"(?:"+[Re,je,Pe].join("|")+")"+qe+We+")*",He="(?:"+[Le,je,Pe].join("|")+")"+Ze,Ge="(?:"+[Re+Me+"?",Me,je,Pe,De].join("|")+")",Je=RegExp("['’]","g"),Ye=RegExp(Me,"g"),Qe=RegExp($e+"(?="+$e+")|"+Ge+Ze,"g"),Xe=RegExp([Ue+"?"+Ie+"+"+Ke+"(?="+[Ne,Ue,"$"].join("|")+")",Be+"+"+Ve+"(?="+[Ne,Ue+Fe,"$"].join("|")+")",Ue+"?"+Fe+"+"+Ke,Ue+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,He].join("|"),"g"),et=RegExp("["+ze+_e+ke+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[I]=it[A]=it[$]=it[R]=it[j]=it[P]=it[U]=it[z]=it[F]=!0,it[m]=it[g]=it[E]=it[y]=it[L]=it[v]=it[b]=it[w]=it[k]=it[x]=it[S]=it[T]=it[C]=it[D]=it[M]=!1;var ot={};ot[m]=ot[g]=ot[E]=ot[L]=ot[y]=ot[v]=ot[I]=ot[A]=ot[$]=ot[R]=ot[j]=ot[k]=ot[x]=ot[S]=ot[T]=ot[C]=ot[D]=ot[N]=ot[P]=ot[U]=ot[z]=ot[F]=!0,ot[b]=ot[w]=ot[M]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ct||Function("return this")(),dt=t&&!t.nodeType&&t,ht=dt&&e&&!e.nodeType&&e,pt=ht&&ht.exports===dt,mt=pt&<.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,kt=gt&>.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Mt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var en=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,ie=t.Date,_e=t.Error,ke=t.Function,xe=t.Math,Se=t.Object,Oe=t.RegExp,Te=t.String,Ce=t.TypeError,De=r.prototype,Ne=ke.prototype,Me=Se.prototype,Ee=t["__core-js_shared__"],Le=Ne.toString,Ie=Me.hasOwnProperty,Ae=0,$e=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Me.toString,je=Le.call(Se),Pe=ft._,Ue=Oe("^"+Le.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=pt?t.Buffer:i,Fe=t.Symbol,Be=t.Uint8Array,Ke=ze?ze.allocUnsafe:i,Ve=sn(Se.getPrototypeOf,Se),We=Se.create,qe=Me.propertyIsEnumerable,Ze=De.splice,He=Fe?Fe.isConcatSpreadable:i,Ge=Fe?Fe.iterator:i,Qe=Fe?Fe.toStringTag:i,et=function(){try{var e=uo(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==ft.Date.now&&ie.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,dt=xe.ceil,ht=xe.floor,mt=Se.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Rt=t.isFinite,Vt=De.join,mn=sn(Se.keys,Se),gn=xe.max,yn=xe.min,vn=ie.now,bn=t.parseInt,wn=xe.random,_n=De.reverse,kn=uo(t,"DataView"),xn=uo(t,"Map"),Sn=uo(t,"Promise"),On=uo(t,"Set"),Tn=uo(t,"WeakMap"),Cn=uo(Se,"create"),Dn=Tn&&new Tn,Nn={},Mn=jo(kn),En=jo(xn),Ln=jo(Sn),In=jo(On),An=jo(Tn),$n=Fe?Fe.prototype:i,Rn=$n?$n.valueOf:i,jn=$n?$n.toString:i;function Pn(e){if(ea(e)&&!Ks(e)&&!(e instanceof Bn)){if(e instanceof Fn)return e;if(Ie.call(e,"__wrapped__"))return Po(e)}return new Fn(e)}var Un=function(){function e(){}return function(t){if(!Xs(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Bn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sr(e,t,n,r,o,s){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!Xs(e))return e;var f=Ks(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ti(e,a)}else{var d=fo(e),h=d==w||d==_;if(Zs(e))return wi(e,u);if(d==S||d==m||h&&!o){if(a=l||h?{}:po(e),!u)return l?function(e,t){return Ci(e,co(e),t)}(e,function(e,t){return e&&Ci(t,Ea(t),e)}(a,e)):function(e,t){return Ci(e,lo(e),t)}(e,nr(a,e))}else{if(!ot[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case E:return _i(e);case y:case v:return new i(+e);case L:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case A:case $:case R:case j:case P:case U:case z:case F:return ki(e,n);case k:return new i;case x:case D:return new i(e);case T:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new i;case N:return r=e,Rn?Se(Rn.call(r)):{}}}(e,d,u)}}s||(s=new Zn);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach(function(r){a.add(sr(r,t,n,r,e,s))}):ta(e)&&e.forEach(function(r,i){a.set(i,sr(r,t,n,i,e,s))});var g=f?i:(c?l?to:eo:l?Ea:Ma)(e);return Ot(g||e,function(r,i){g&&(r=e[i=r]),Xn(a,i,sr(r,t,n,i,e,s))}),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ce(o);return Do(function(){e.apply(i,n)},t)}function lr(e,t,n,r){var i=-1,o=Nt,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Et(t,Gt(n))),r?(o=Mt,s=!1):t.length>=200&&(o=Yt,s=!1,t=new qn(t));e:for(;++i-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(xn||Vn),string:new Kn}},Wn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return so(this,e).get(e)},Wn.prototype.has=function(e){return so(this,e).has(e)},Wn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var cr=Mi(vr),fr=Mi(br,!0);function dr(e,t){var n=!0;return cr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function hr(e,t,n){for(var r=-1,o=e.length;++r0&&n(a)?t>1?mr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var gr=Ei(),yr=Ei(!0);function vr(e,t){return e&&gr(e,t,Ma)}function br(e,t){return e&&yr(e,t,Ma)}function wr(e,t){return Dt(t,function(t){return Js(e[t])})}function _r(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&nt}function Or(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Se(e)}function Cr(e,t,n){for(var o=n?Mt:Nt,s=e[0].length,a=e.length,u=a,l=r(a),c=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Et(d,Gt(t))),c=yn(d.length,c),l[u]=!n&&(t||s>=120&&d.length>=120)?new qn(u&&d):i}d=e[0];var h=-1,p=l[0];e:for(;++h=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(i)}function Br(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)a!==e&&Ze.call(a,u,1),Ze.call(e,u,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;go(i)?Ze.call(e,i,1):ui(e,i)}}return e}function Wr(e,t){return e+ht(wn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return No(So(e,t,nu),e+"")}function Hr(e){return Gn(Ua(e))}function Gr(e,t){var n=Ua(e);return Lo(n,or(t,0,n.length))}function Jr(e,t,n,r){if(!Xs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,u=e;null!=u&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i>>1,s=e[o];null!==s&&!aa(s)&&(n?s<=t:s=200){var l=t?null:qi(e);if(l)return un(l);s=!1,i=Yt,u=new qn}else u=t?[]:a;e:for(;++r=r?e:ei(e,t,n)}var bi=st||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function ki(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,l=t==t,c=aa(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!c&&e1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Se(t);++r-1?o[s?t[a]:a]:i}}function Ri(e){return Xi(function(t){var n=t.length,r=n,s=Fn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ce(o);if(s&&!u&&"wrapper"==ro(a))var u=new Fn([],!0)}for(r=u?r:n;++r1&&w.reverse(),h&&fu))return!1;var c=s.get(e),f=s.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(p,function(n){var r="_."+n[0];t&n[1]&&!Nt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Eo(e){var t=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)});function fs(e){var t=Pn(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var hs=Xi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Bn&&go(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ds,args:[o],thisArg:i}),new Fn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),ps=Di(function(e,t,n){Ie.call(e,n)?++e[n]:rr(e,n,1)}),ms=$i(Bo),gs=$i(Ko);function ys(e,t){return(Ks(e)?Ot:cr)(e,oo(t,3))}function vs(e,t){return(Ks(e)?Tt:fr)(e,oo(t,3))}var bs=Di(function(e,t,n){Ie.call(e,n)?e[n].push(t):rr(e,n,[t])}),ws=Zr(function(e,t,n){var i=-1,o="function"==typeof t,s=Ws(e)?r(e.length):[];return cr(e,function(e){s[++i]=o?xt(t,e,n):Dr(e,t,n)}),s}),_s=Di(function(e,t,n){rr(e,n,t)});function ks(e,t){return(Ks(e)?Et:Rr)(e,oo(t,3))}var xs=Di(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ss=Zr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Fr(e,mr(t,1),[])}),Os=lt||function(){return ft.Date.now()};function Ts(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Hi(e,l,i,i,i,i,t)}function Cs(e,t){var n;if("function"!=typeof t)throw new Ce(o);return e=ha(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ds=Zr(function(e,t,n){var r=1;if(n.length){var i=an(n,io(Ds));r|=u}return Hi(e,r,t,n,i)}),Ns=Zr(function(e,t,n){var r=3;if(n.length){var i=an(n,io(Ns));r|=u}return Hi(t,r,e,n,i)});function Ms(e,t,n){var r,s,a,u,l,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ce(o);function m(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function g(e){var n=e-c;return c===i||n>=t||n<0||h&&e-f>=a}function y(){var e=Os();if(g(e))return v(e);l=Do(y,function(e){var n=t-(e-c);return h?yn(n,a-(e-f)):n}(e))}function v(e){return l=i,p&&r?m(e):(r=s=i,u)}function b(){var e=Os(),n=g(e);if(r=arguments,s=this,c=e,n){if(l===i)return function(e){return f=e,l=Do(y,t),d?m(e):u}(c);if(h)return bi(l),l=Do(y,t),m(c)}return l===i&&(l=Do(y,t)),u}return t=ma(t)||0,Xs(n)&&(d=!!n.leading,a=(h="maxWait"in n)?gn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==i&&bi(l),f=0,r=c=s=l=i},b.flush=function(){return l===i?u:v(Os())},b}var Es=Zr(function(e,t){return ur(e,1,t)}),Ls=Zr(function(e,t,n){return ur(e,ma(t)||0,n)});function Is(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Is.Cache||Wn),n}function As(e){if("function"!=typeof e)throw new Ce(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Is.Cache=Wn;var $s=yi(function(e,t){var n=(t=1==t.length&&Ks(t[0])?Et(t[0],Gt(oo())):Et(mr(t,1),Gt(oo()))).length;return Zr(function(r){for(var i=-1,o=yn(r.length,n);++i=t}),Bs=Nr(function(){return arguments}())?Nr:function(e){return ea(e)&&Ie.call(e,"callee")&&!qe.call(e,"callee")},Ks=r.isArray,Vs=yt?Gt(yt):function(e){return ea(e)&&xr(e)==E};function Ws(e){return null!=e&&Qs(e.length)&&!Js(e)}function qs(e){return ea(e)&&Ws(e)}var Zs=gt||mu,Hs=vt?Gt(vt):function(e){return ea(e)&&xr(e)==v};function Gs(e){if(!ea(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Js(e){if(!Xs(e))return!1;var t=xr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ys(e){return"number"==typeof e&&e==ha(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Xs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=bt?Gt(bt):function(e){return ea(e)&&fo(e)==k};function na(e){return"number"==typeof e||ea(e)&&xr(e)==x}function ra(e){if(!ea(e)||xr(e)!=S)return!1;var t=Ve(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==je}var ia=wt?Gt(wt):function(e){return ea(e)&&xr(e)==T},oa=_t?Gt(_t):function(e){return ea(e)&&fo(e)==C};function sa(e){return"string"==typeof e||!Ks(e)&&ea(e)&&xr(e)==D}function aa(e){return"symbol"==typeof e||ea(e)&&xr(e)==N}var ua=kt?Gt(kt):function(e){return ea(e)&&Qs(e.length)&&!!it[xr(e)]},la=Ki($r),ca=Ki(function(e,t){return e<=t});function fa(e){if(!e)return[];if(Ws(e))return sa(e)?fn(e):Ti(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=fo(e);return(t==k?on:t==C?un:Ua)(e)}function da(e){return e?(e=ma(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=da(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?or(ha(e),0,h):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return d;if(Xs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):he.test(e)?d:+e}function ga(e){return Ci(e,Ea(e))}function ya(e){return null==e?"":si(e)}var va=Ni(function(e,t){if(_o(t)||Ws(t))Ci(t,Ma(t),e);else for(var n in t)Ie.call(t,n)&&Xn(e,n,t[n])}),ba=Ni(function(e,t){Ci(t,Ea(t),e)}),wa=Ni(function(e,t,n,r){Ci(t,Ea(t),e,r)}),_a=Ni(function(e,t,n,r){Ci(t,Ma(t),e,r)}),ka=Xi(ir),xa=Zr(function(e,t){e=Se(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(r=1);++n1),t}),Ci(e,to(e),n),r&&(n=sr(n,7,Yi));for(var i=t.length;i--;)ui(n,t[i]);return n}),$a=Xi(function(e,t){return null==e?{}:function(e,t){return Br(e,t,function(t,n){return Ta(e,n)})}(e,t)});function Ra(e,t){if(null==e)return{};var n=Et(to(e),function(e){return[e]});return t=oo(t),Br(e,n,function(e,n){return t(e,n[0])})}var ja=Zi(Ma),Pa=Zi(Ea);function Ua(e){return null==e?[]:Jt(e,Ma(e))}var za=Ii(function(e,t,n){return t=t.toLowerCase(),e+(n?Fa(t):t)});function Fa(e){return Ga(ya(e).toLowerCase())}function Ba(e){return(e=ya(e))&&e.replace(ve,en).replace(Ye,"")}var Ka=Ii(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Va=Ii(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Wa=Li("toLowerCase"),qa=Ii(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Za=Ii(function(e,t,n){return e+(n?" ":"")+Ga(t)}),Ha=Ii(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ga=Li("toUpperCase");function Ja(e,t,n){return e=ya(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ya=Zr(function(e,t){try{return xt(e,i,t)}catch(e){return Gs(e)?e:new _e(e)}}),Qa=Xi(function(e,t){return Ot(t,function(t){t=Ro(t),rr(e,t,Ds(e[t],e))}),e});function Xa(e){return function(){return e}}var eu=Ri(),tu=Ri(!0);function nu(e){return e}function ru(e){return Ir("function"==typeof e?e:sr(e,1))}var iu=Zr(function(e,t){return function(n){return Dr(n,e,t)}}),ou=Zr(function(e,t){return function(n){return Dr(e,n,t)}});function su(e,t,n){var r=Ma(t),i=wr(t,r);null!=n||Xs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Ma(t)));var o=!(Xs(n)&&"chain"in n&&!n.chain),s=Js(e);return Ot(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function au(){}var uu=zi(Et),lu=zi(Ct),cu=zi($t);function fu(e){return vo(e)?Kt(Ro(e)):function(e){return function(t){return _r(t,e)}}(e)}var du=Bi(),hu=Bi(!0);function pu(){return[]}function mu(){return!1}var gu,yu=Ui(function(e,t){return e+t},0),vu=Wi("ceil"),bu=Ui(function(e,t){return e/t},1),wu=Wi("floor"),_u=Ui(function(e,t){return e*t},1),ku=Wi("round"),xu=Ui(function(e,t){return e-t},0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Ce(o);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Ts,Pn.assign=va,Pn.assignIn=ba,Pn.assignInWith=wa,Pn.assignWith=_a,Pn.at=ka,Pn.before=Cs,Pn.bind=Ds,Pn.bindAll=Qa,Pn.bindKey=Ns,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ks(e)?e:[e]},Pn.chain=fs,Pn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===i)?1:gn(ha(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(dt(o/t));so?0:o+n),(r=r===i||r>o?o:ha(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&rn(e)?vi(fn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Ce(o);return t=null==t?0:gn(ha(t),0),Zr(function(n){var r=n[t],i=vi(n,0,t);return r&&Lt(i,r),xt(e,this,i)})},Pn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:ha(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:ha(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?ci(e,oo(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ce(o);return Xs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ms(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=ds,Pn.toArray=fa,Pn.toPairs=ja,Pn.toPairsIn=Pa,Pn.toPath=function(e){return Ks(e)?Et(e,Ro):aa(e)?[e]:Ti($o(ya(e)))},Pn.toPlainObject=ga,Pn.transform=function(e,t,n){var r=Ks(e),i=r||Zs(e)||ua(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Xs(e)&&Js(o)?Un(Ve(e)):{}}return(i?Ot:vr)(e,function(e,r,i){return t(n,e,r,i)}),n},Pn.unary=function(e){return Ts(e,1)},Pn.union=es,Pn.unionBy=ts,Pn.unionWith=ns,Pn.uniq=function(e){return e&&e.length?ai(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Pn.unset=function(e,t){return null==e||ui(e,t)},Pn.unzip=rs,Pn.unzipWith=is,Pn.update=function(e,t,n){return null==e?e:li(e,t,mi(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,mi(n),r)},Pn.values=Ua,Pn.valuesIn=function(e){return null==e?[]:Jt(e,Ea(e))},Pn.without=os,Pn.words=Ja,Pn.wrap=function(e,t){return Rs(mi(t),e)},Pn.xor=ss,Pn.xorBy=as,Pn.xorWith=us,Pn.zip=ls,Pn.zipObject=function(e,t){return hi(e||[],t||[],Xn)},Pn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jr)},Pn.zipWith=cs,Pn.entries=ja,Pn.entriesIn=Pa,Pn.extend=ba,Pn.extendWith=wa,su(Pn,Pn),Pn.add=yu,Pn.attempt=Ya,Pn.camelCase=za,Pn.capitalize=Fa,Pn.ceil=vu,Pn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),or(ma(e),t,n)},Pn.clone=function(e){return sr(e,4)},Pn.cloneDeep=function(e){return sr(e,5)},Pn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Pn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Pn.conformsTo=function(e,t){return null==t||ar(e,t,Ma(t))},Pn.deburr=Ba,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=bu,Pn.endsWith=function(e,t,n){e=ya(e),t=si(t);var r=e.length,o=n=n===i?r:or(ha(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Us,Pn.escape=function(e){return(e=ya(e))&&H.test(e)?e.replace(q,tn):e},Pn.escapeRegExp=function(e){return(e=ya(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Pn.every=function(e,t,n){var r=Ks(e)?Ct:dr;return n&&yo(e,t,n)&&(t=i),r(e,oo(t,3))},Pn.find=ms,Pn.findIndex=Bo,Pn.findKey=function(e,t){return jt(e,oo(t,3),vr)},Pn.findLast=gs,Pn.findLastIndex=Ko,Pn.findLastKey=function(e,t){return jt(e,oo(t,3),br)},Pn.floor=wu,Pn.forEach=ys,Pn.forEachRight=vs,Pn.forIn=function(e,t){return null==e?e:gr(e,oo(t,3),Ea)},Pn.forInRight=function(e,t){return null==e?e:yr(e,oo(t,3),Ea)},Pn.forOwn=function(e,t){return e&&vr(e,oo(t,3))},Pn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Pn.get=Oa,Pn.gt=zs,Pn.gte=Fs,Pn.has=function(e,t){return null!=e&&ho(e,t,Or)},Pn.hasIn=Ta,Pn.head=Wo,Pn.identity=nu,Pn.includes=function(e,t,n,r){e=Ws(e)?e:Ua(e),n=n&&!r?ha(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),sa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ha(n);return i<0&&(i=gn(r+i,0)),Ut(e,t,i)},Pn.inRange=function(e,t,n){return t=da(t),n===i?(n=t,t=0):n=da(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=f},Pn.isSet=oa,Pn.isString=sa,Pn.isSymbol=aa,Pn.isTypedArray=ua,Pn.isUndefined=function(e){return e===i},Pn.isWeakMap=function(e){return ea(e)&&fo(e)==M},Pn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==xr(e)},Pn.join=function(e,t){return null==e?"":Vt.call(e,t)},Pn.kebabCase=Ka,Pn.last=Go,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ha(n))<0?gn(r+o,0):yn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Pn.lowerCase=Va,Pn.lowerFirst=Wa,Pn.lt=la,Pn.lte=ca,Pn.max=function(e){return e&&e.length?hr(e,nu,Sr):i},Pn.maxBy=function(e,t){return e&&e.length?hr(e,oo(t,2),Sr):i},Pn.mean=function(e){return Bt(e,nu)},Pn.meanBy=function(e,t){return Bt(e,oo(t,2))},Pn.min=function(e){return e&&e.length?hr(e,nu,$r):i},Pn.minBy=function(e,t){return e&&e.length?hr(e,oo(t,2),$r):i},Pn.stubArray=pu,Pn.stubFalse=mu,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=_u,Pn.nth=function(e,t){return e&&e.length?zr(e,ha(t)):i},Pn.noConflict=function(){return ft._===this&&(ft._=Pe),this},Pn.noop=au,Pn.now=Os,Pn.pad=function(e,t,n){e=ya(e);var r=(t=ha(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Fi(ht(i),n)+e+Fi(dt(i),n)},Pn.padEnd=function(e,t,n){e=ya(e);var r=(t=ha(t))?cn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return yn(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wr(e,t)},Pn.reduce=function(e,t,n){var r=Ks(e)?It:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,cr)},Pn.reduceRight=function(e,t,n){var r=Ks(e)?At:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,fr)},Pn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===i)?1:ha(t),qr(ya(e),t)},Pn.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++rf)return[];var n=h,r=yn(e,h);t=oo(t),e-=h;for(var i=Zt(r,t);++n=s)return e;var u=n-cn(r);if(u<1)return r;var l=a?vi(a,0,u).join(""):e.slice(0,u);if(o===i)return l+r;if(a&&(u+=l.length-u),ia(o)){if(e.slice(u).search(o)){var c,f=l;for(o.global||(o=Oe(o.source,ya(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var d=c.index;l=l.slice(0,d===i?u:d)}}else if(e.indexOf(si(o),u)!=u){var h=l.lastIndexOf(o);h>-1&&(l=l.slice(0,h))}return l+r},Pn.unescape=function(e){return(e=ya(e))&&Z.test(e)?e.replace(W,hn):e},Pn.uniqueId=function(e){var t=++Ae;return ya(e)+t},Pn.upperCase=Ha,Pn.upperFirst=Ga,Pn.each=ys,Pn.eachRight=vs,Pn.first=Wo,su(Pn,(gu={},vr(Pn,function(e,t){Ie.call(Pn.prototype,t)||(gu[t]=e)}),gu),{chain:!1}),Pn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Pn[e].placeholder=Pn}),Ot(["drop","take"],function(e,t){Bn.prototype[e]=function(n){n=n===i?1:gn(ha(n),0);var r=this.__filtered__&&!t?new Bn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Bn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ot(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Bn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ot(["head","last"],function(e,t){var n="take"+(t?"Right":"");Bn.prototype[e]=function(){return this[n](1).value()[0]}}),Ot(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Bn.prototype[e]=function(){return this.__filtered__?new Bn(this):this[n](1)}}),Bn.prototype.compact=function(){return this.filter(nu)},Bn.prototype.find=function(e){return this.filter(e).head()},Bn.prototype.findLast=function(e){return this.reverse().find(e)},Bn.prototype.invokeMap=Zr(function(e,t){return"function"==typeof e?new Bn(this):this.map(function(n){return Dr(n,e,t)})}),Bn.prototype.reject=function(e){return this.filter(As(oo(e)))},Bn.prototype.slice=function(e,t){e=ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Bn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},Bn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Bn.prototype.toArray=function(){return this.take(h)},vr(Bn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Bn,l=a[0],c=u||Ks(t),f=function(e){var t=o.apply(Pn,Lt([e],a));return r&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,m=u&&!h;if(!s&&c){t=m?t:new Bn(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[f],thisArg:i}),new Fn(g,d)}return p&&m?e.apply(this,a):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ks(i)?i:[],e)}return this[n](function(n){return t.apply(Ks(n)?n:[],e)})}}),vr(Bn.prototype,function(e,t){var n=Pn[t];if(n){var r=n.name+"";Ie.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}}),Nn[ji(i,2).name]=[{name:"wrapper",func:i}],Bn.prototype.clone=function(){var e=new Bn(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Bn.prototype.reverse=function(){if(this.__filtered__){var e=new Bn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Bn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ks(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Po(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Bn){var t=e;return this.__actions__.length&&(t=new Bn(this)),(t=t.reverse()).__actions__.push({func:ds,args:[Xo],thisArg:i}),new Fn(t,this.__chain__)}return this.thru(Xo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Ge&&(Pn.prototype[Ge]=function(){return this}),Pn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9746);t.default=function(e){if(!(0,r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},2829:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;const s=(e=o).length/4+2,a=Math.ceil(s/16),u=new Array(a);for(let t=0;t>>0;f=c,c=l,l=r(a,30)>>>0,a=s,s=u}i[0]=i[0]+s>>>0,i[1]=i[1]+a>>>0,i[2]=i[2]+l>>>0,i[3]=i[3]+c>>>0,i[4]=i[4]+f>>>0}return Uint8Array.of(i[0]>>24,i[0]>>16,i[0]>>8,i[0],i[1]>>24,i[1]>>16,i[1]>>8,i[1],i[2]>>24,i[2]>>16,i[2]>>8,i[2],i[3]>>24,i[3]>>16,i[3]>>8,i[3],i[4]>>24,i[4]>>16,i[4]>>8,i[4])}},2988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=t.stringToBytes=void 0;const r=n(1797),i=n(6011);function o(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;nn(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,api:r,e:i}=e,o=t.get().previousElementSibling;if(o&&!o.classList.contains("nodeContent")&&i.shiftKey){const e=n.swapNodeWithPreviousSibling(t.getIdOfNode()),i=yield n.renderNode(e.parentNode);n.isTreeRoot(e.parentNode.id)?t.get().parentElement.innerHTML=i:t.get().parentElement.outerHTML=i,t.set(`#id-${e.targetNode.id}`),r.save(n)}})}},3298:(e,t,n)=>{"use strict";var r,i=n(2341),o=n(717);function s(e){return{isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink,size:e.size,mtime:null!==e.mtime?new Date(e.mtime):null,atime:null!==e.atime?new Date(e.atime):null,birthtime:null!==e.birthtime?new Date(e.birthtime):null,readonly:e.readonly,fileAttributes:e.fileAttributes,dev:e.dev,ino:e.ino,mode:e.mode,nlink:e.nlink,uid:e.uid,gid:e.gid,rdev:e.rdev,blksize:e.blksize,blocks:e.blocks}}t.SeekMode=void 0,(r=t.SeekMode||(t.SeekMode={}))[r.Start=0]="Start",r[r.Current=1]="Current",r[r.End=2]="End";class a extends o.Resource{async read(e){if(0===e.byteLength)return 0;const t=await o.invoke("plugin:fs|read",{rid:this.rid,len:e.byteLength}),n=function(e){const t=new Uint8ClampedArray(e),n=t.byteLength;let r=0;for(let e=0;ee instanceof URL?e.toString():e),options:n,onEvent:i}),a=new l(s);return()=>{a.close()}}Object.defineProperty(t,"BaseDirectory",{enumerable:!0,get:function(){return i.BaseDirectory}}),t.FileHandle=a,t.copyFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|copy_file",{fromPath:e instanceof URL?e.toString():e,toPath:t instanceof URL?t.toString():t,options:n})},t.create=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|create",{path:e instanceof URL?e.toString():e,options:t});return new a(n)},t.exists=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|exists",{path:e instanceof URL?e.toString():e,options:t})},t.lstat=async function(e,t){return s(await o.invoke("plugin:fs|lstat",{path:e instanceof URL?e.toString():e,options:t}))},t.mkdir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|mkdir",{path:e instanceof URL?e.toString():e,options:t})},t.open=u,t.readDir=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|read_dir",{path:e instanceof URL?e.toString():e,options:t})},t.readFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_file",{path:e instanceof URL?e.toString():e,options:t});return n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)},t.readTextFile=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=await o.invoke("plugin:fs|read_text_file",{path:e instanceof URL?e.toString():e,options:t}),r=n instanceof ArrayBuffer?n:Uint8Array.from(n);return(new TextDecoder).decode(r)},t.readTextFileLines=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const n=e instanceof URL?e.toString():e;return await Promise.resolve({path:n,rid:null,async next(){null===this.rid&&(this.rid=await o.invoke("plugin:fs|read_text_file_lines",{path:n,options:t}));const e=await o.invoke("plugin:fs|read_text_file_lines_next",{rid:this.rid}),r=e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e),i=1===r[r.byteLength-1];return i?(this.rid=null,{value:null,done:i}):{value:(new TextDecoder).decode(r.slice(0,r.byteLength)),done:i}},[Symbol.asyncIterator](){return this}})},t.remove=async function(e,t){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|remove",{path:e instanceof URL?e.toString():e,options:t})},t.rename=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol||t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|rename",{oldPath:e instanceof URL?e.toString():e,newPath:t instanceof URL?t.toString():t,options:n})},t.size=async function(e){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return await o.invoke("plugin:fs|size",{path:e instanceof URL?e.toString():e})},t.stat=async function(e,t){return s(await o.invoke("plugin:fs|stat",{path:e instanceof URL?e.toString():e,options:t}))},t.truncate=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await o.invoke("plugin:fs|truncate",{path:e instanceof URL?e.toString():e,len:t,options:n})},t.watch=async function(e,t,n){return await c(e,t,{delayMs:2e3,...n})},t.watchImmediate=async function(e,t,n){return await c(e,t,{...n,delayMs:void 0})},t.writeFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");if(t instanceof ReadableStream){const r=await u(e,{create:!0,...n}),i=t.getReader();try{for(;;){const{done:e,value:t}=await i.read();if(e)break;await r.write(t)}}finally{i.releaseLock(),await r.close()}}else await o.invoke("plugin:fs|write_file",t,{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})},t.writeTextFile=async function(e,t,n){if(e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");const r=new TextEncoder;await o.invoke("plugin:fs|write_text_file",r.encode(t),{headers:{path:encodeURIComponent(e instanceof URL?e.toString():e),options:JSON.stringify(n)}})}},3417:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lift=void 0,t.lift={context:"navigation",keys:["shift + h"],description:"Lift the current node to be a sibling of the parent node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;if(t.shiftKey){if(r.data.tree.children.map(e=>e.id).includes(n.getIdOfNode()))return;const e=r.liftNodeToParent(n.getIdOfNode()),t=yield r.renderNode(e.parentNode);r.isTreeRoot(e.parentNode.id)?n.get().parentElement.parentElement.innerHTML=t:n.get().parentElement.parentElement.outerHTML=t,n.set(`#id-${e.targetNode.id}`),i.save(r)}})}},3465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="00000000-0000-0000-0000-000000000000"},3727:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lower=void 0,t.lower={context:"navigation",keys:["shift + l"],description:"Lower the current node to be a child of the previous sibling node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey){const e=n.lowerNodeToChild(r.getIdOfNode()),t=yield n.renderNode(e.oldParentNode);n.isTreeRoot(e.oldParentNode.id)?r.get().parentElement.innerHTML=t:r.get().parentElement.outerHTML=t,r.set(`#id-${e.targetNode.id}`),i.save(n)}})}},3779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);t.default={randomUUID:n}},3985:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{f.default.withContext(e.context,()=>{f.default.bind(e.keys,t=>a(void 0,void 0,void 0,function*(){e.action({e:t,outline:_,cursor:k,api:x,search:S})}))})}),f.default.withContext("navigation",()=>{f.default.bind("ctrl + o",e=>a(void 0,void 0,void 0,function*(){const e=yield(0,m.openOutlineSelector)();if(!e.filename||!e.filename.length)return;const t=yield x.loadOutline(e.filename.split(".json")[0]);_=new l.Outline(t),O().innerHTML=yield _.render(),k.resetCursor(),yield S.reset(),yield S.indexBatch(_.data.contentNodes),document.getElementById("outlineName").innerHTML=_.data.name})),f.default.bind("ctrl + n",e=>a(void 0,void 0,void 0,function*(){C()}))}),S.onTermSelection=e=>{T(document.getElementById(`id-${e}`).parentElement),k.set(`#id-${e}`),x.save(_)},function(){a(this,void 0,void 0,function*(){yield x.createDirStructureIfNotExists();const e=(0,m.loadOutlineModal)();e.on("createOutline",()=>{C(),e.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",t=>a(this,void 0,void 0,function*(){try{yield x.renameOutline(_.data.name,t),_.data.name=t,yield x.saveOutline(_),document.getElementById("outlineName").innerHTML=_.data.name,e.remove()}catch(e){console.log(e)}}))}),e.on("loadOutline",t=>a(this,void 0,void 0,function*(){const n=yield x.loadOutline(t.split(".json")[0]);_=new l.Outline(n),O().innerHTML=yield _.render(),k.resetCursor(),document.getElementById("outlineName").innerHTML=_.data.name,f.default.setContext("navigation"),e.remove(),(0,g.bindOutlineRenamer)().on("attemptedRename",(e,t)=>a(this,void 0,void 0,function*(){try{yield x.renameOutline(_.data.name,e),_.data.name=e,yield x.saveOutline(_),document.getElementById("outlineName").innerHTML=_.data.name,t.remove()}catch(e){console.log(e)}})),S.createIndex({id:"string",content:"string"}).then(()=>a(this,void 0,void 0,function*(){yield S.indexBatch(_.data.contentNodes)}))})),e.show(),D()})}()},4161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllShortcuts=void 0;const r=n(587),i=n(9168),o=n(7167),s=n(1062),a=n(7802),u=n(1760),l=n(9342),c=n(6801),f=n(4488),d=n(5457),h=n(6656),p=n(6279),m=n(3417),g=n(3727),y=n(2993),v=n(7100),b=n(1238);t.AllShortcuts=[r.sidebarToggle,i.j,o.k,s.l,a.h,u.z,l.$,c.i,f.archive,d.tab,h.enter,p.d,m.lift,g.lower,y.swapUp,v.swapDown,b.escapeEditing]},4299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateV7State=void 0;const r=n(2291),i=n(6011),o={};function s(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function a(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else r=new Uint8Array(16),i=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=255&t,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|3&e[10],r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}t.updateV7State=s,t.default=function(e,t,n){let u;if(e)u=a(e.random??e.rng?.()??(0,r.default)(),e.msecs,e.seq,t,n);else{const e=Date.now(),i=(0,r.default)();s(o,e,i),u=a(i,o.msecs,o.seq,t,n)}return t??(0,i.unsafeStringify)(u)}},4300:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s!e.isDirectory)})}loadOutline(e){return a(this,void 0,void 0,function*(){const t=yield f.readTextFile(`outliner/${(0,l.slugify)(e)}.json`,{baseDir:f.BaseDirectory.AppLocalData}),n=JSON.parse(t),r=c.uniq(JSON.stringify(n.tree).match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi));r.shift();const i=yield Promise.allSettled(c.map(r,e=>f.readTextFile(`outliner/contentNodes/${e}.json`,{baseDir:f.BaseDirectory.AppLocalData})));return{id:n.id,version:n.version,created:n.created,name:n.name,tree:n.tree,contentNodes:c.keyBy(c.map(i,e=>{if("fulfilled"===e.status)return u.ContentNode.Create(JSON.parse(e.value));console.log("rejected node",e.reason)}),e=>e.id)}})}saveOutline(e){return a(this,void 0,void 0,function*(){yield f.writeTextFile(`outliner/${(0,l.slugify)(e.data.name)}.json`,JSON.stringify({id:e.data.id,version:e.data.version,created:e.data.created,name:e.data.name,tree:e.data.tree}),{baseDir:f.BaseDirectory.AppLocalData})})}renameOutline(e,t){return a(this,void 0,void 0,function*(){if(t.length&&e!==t)return f.rename(`outliner/${(0,l.slugify)(e)}.json`,`outliner/${(0,l.slugify)(t)}.json`,{oldPathBaseDir:f.BaseDirectory.AppLocalData,newPathBaseDir:f.BaseDirectory.AppLocalData})})}saveContentNode(e){return a(this,void 0,void 0,function*(){try{yield f.writeTextFile(`outliner/contentNodes/${e.id}.json`,JSON.stringify(e.toJson()),{baseDir:f.BaseDirectory.AppLocalData})}catch(e){console.error(e)}})}save(e){this.state.has("saveTimeout")||this.state.set("saveTimeout",setTimeout(()=>a(this,void 0,void 0,function*(){yield this.saveOutline(e),this.state.delete("saveTimeout")}),2e3))}}},4488:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.archive=void 0,t.archive={context:"navigation",keys:["shift + x"],description:'Mark a node and all its children as "archived"',action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;t.preventDefault(),r.get().classList.toggle("strikethrough"),n.getContentNode(r.getIdOfNode()).toggleArchiveStatus(),i.saveContentNode(n.getContentNode(r.getIdOfNode())),i.save(n)})}},4557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0;const r=n(2829),i=n(2988);var o=n(2988);function s(e,t,n,o){return(0,i.default)(80,r.default,e,t,n,o)}Object.defineProperty(t,"DNS",{enumerable:!0,get:function(){return o.DNS}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return o.URL}}),s.DNS=i.DNS,s.URL=i.URL,t.default=s},5191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEventEmitter=void 0,t.CustomEventEmitter=class{constructor(){this.eventMap={}}on(e,t){this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t)}emit(e,t){this.eventMap[e]&&this.eventMap[e].forEach(e=>{e.apply(null,t)})}}},5444:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;const r=n(876);t.Cursor=class{constructor(){}resetCursor(){this.set(".node")}get(){return document.querySelector(".cursor")}getIdOfNode(){return this.get().getAttribute("data-id")}unset(){const e=this.get();e&&e.classList.remove("cursor")}set(e){this.unset();const t=document.querySelector(e);t&&(t.classList.add("cursor"),(0,r.isVisible)(t)||t.scrollIntoView(!0))}collapse(){this.get().classList.remove("expanded"),this.get().classList.add("collapsed")}expand(){this.get().classList.remove("collapsed"),this.get().classList.add("expanded")}isNodeCollapsed(){return this.get().classList.contains("collapsed")}isNodeExpanded(){return this.get().classList.contains("expanded")}}},5457:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.tab=void 0,t.tab={context:"navigation",keys:["tab"],description:"Add a new node as the child of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r,api:i}=e;t.preventDefault();const o=r.createChildNode(n.getIdOfNode()),s=yield r.renderNode(o.parentNode);n.get().outerHTML=s,n.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(r)})}},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeStringify=void 0;const r=n(9746),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function o(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.unsafeStringify=o,t.default=function(e,t=0){const n=o(e,t);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},6279:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.d=void 0,t.d={context:"navigation",keys:["shift + d"],description:"Delete the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(!t.shiftKey)return;const o=n.removeNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode),a=r.get().previousElementSibling,u=r.get().nextElementSibling;n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,a&&a.getAttribute("data-id")?r.set(`#id-${a.getAttribute("data-id")}`):u&&u.getAttribute("data-id")?r.set(`#id-${u.getAttribute("data-id")}`):r.set(`#id-${o.parentNode.id}`),i.save(n)})}},6356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6011),i=n(1425),o=n(6568);t.default=function(e,t,n){e??={},n??=0;let s=(0,i.default)({...e,_v6:!0},new Uint8Array(16));if(s=(0,o.default)(s),t){for(let e=0;e<16;e++)t[n+e]=s[e];return t}return(0,r.unsafeStringify)(s)}},6568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1797),i=n(6011);t.default=function(e){const t=(n="string"==typeof e?(0,r.default)(e):e,Uint8Array.of((15&n[6])<<4|n[7]>>4&15,(15&n[7])<<4|(240&n[4])>>4,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,(15&n[1])<<4|(240&n[2])>>4,96|15&n[2],n[3],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]));var n;return"string"==typeof e?(0,i.unsafeStringify)(t):t}},6656:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.enter=void 0,t.enter={context:"navigation",keys:["enter"],description:"Add a new node as the sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,outline:n,cursor:r,api:i}=e;if(t.shiftKey)return;t.preventDefault(),t.preventRepeat();const o=n.createSiblingNode(r.getIdOfNode()),s=yield n.renderNode(o.parentNode);n.isTreeRoot(o.parentNode.id)?r.get().parentElement.innerHTML=s:r.get().parentElement.outerHTML=s,r.set(`#id-${o.node.id}`),i.saveContentNode(o.node),i.save(n)})}},6697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},6759:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.help=void 0;const i=n(9492);t.help={context:"navigation",keys:["shift + /"],description:"Display help modal",action:e=>r(void 0,void 0,void 0,function*(){i.helpModal.show()})}},6801:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.i=void 0;const o=i(n(935));t.i={context:"navigation",keys:["i"],description:'Enter "edit" mode and place the cursor at the start of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{e:t,cursor:n,outline:r}=e;t.preventDefault(),n.get().classList.add("hidden-cursor");const i=n.get().querySelector(".nodeContent");i.innerHTML=r.data.contentNodes[n.getIdOfNode()].content,i.contentEditable="true",i.focus(),o.default.setContext("editing")})}},6928:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.link=function(e){return`
    ${e.text}`}},7100:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.swapDown=void 0,t.swapDown={context:"navigation",keys:["shift + j"],description:"Swap the current node with the next sibling node",action:e=>n(void 0,void 0,void 0,function*(){if(e.cursor.get().nextElementSibling&&e.e.shiftKey){const t=e.outline.swapNodeWithNextSibling(e.cursor.getIdOfNode()),n=yield e.outline.renderNode(t.parentNode);e.outline.isTreeRoot(t.parentNode.id)?e.cursor.get().parentElement.innerHTML=n:e.cursor.get().parentElement.outerHTML=n,e.cursor.set(`#id-${t.targetNode.id}`),e.api.save(e.outline)}})}},7167:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.k=void 0,t.k={context:"navigation",keys:["k"],description:"Move the cursor to the previous sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{cursor:t,e:n}=e,r=t.get().previousElementSibling;r&&!r.classList.contains("nodeContent")&&(n.shiftKey||t.set(`#id-${r.getAttribute("data-id")}`))})}},7670:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.bindOutlineRenamer=function(){const e=s();return(0,i.$)("#outlineName").addEventListener("click",t=>{e.show(),(0,i.$)("#outline-renamer").addEventListener("submit",t=>r(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=(0,i.$)("#new-outline-name").value;e.emit("attemptedRename",[n,e])}))}),e},t.renameOutline=s;const i=n(876),o=n(8013);function s(){return new o.Modal({title:"Rename Outline",escapeExitable:!0},`\n
    \n \n \n
    \n `)}},7802:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.h=void 0,t.h={context:"navigation",keys:["h"],description:"Move the cursor to the parent element of the current node",action:e=>n(void 0,void 0,void 0,function*(){const{e:t,cursor:n}=e,r=n.get().parentElement;r&&r.classList.contains("node")&&(t.shiftKey||n.set(`#id-${r.getAttribute("data-id")}`))})}},8013:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const i=n(1031),o=n(182),s=n(5191),a=r(n(935));class u extends s.CustomEventEmitter{constructor(e,t=""){super(),this.options=e,this.content=t,this.name=(0,i.slugify)(this.options.name||this.options.title),this.id=`id-${(0,o.v4)()}`,this.options.escapeExitable&&!this.options.keyboardContext&&(this.options.keyboardContext=(0,i.slugify)(this.options.title)+"kbd-context"),this.options.keyboardContext&&this.options.escapeExitable&&this.makeExitable()}makeExitable(){a.default.withContext(this.options.keyboardContext,()=>{a.default.bind("escape",e=>{this.remove()})})}renderModalTitle(){return this.options.title?`

    ${this.options.title}

    `:""}renderModalContent(){return this.content}renderModal(){return`\n \n `}updateRender(){document.getElementById(this.id).innerHTML=``,this.emit("updated")}isShown(){const e=document.getElementById(this.id);return e&&!e.classList.contains("hidden")}show(){this.isShown()?this.updateRender():(document.querySelector("body").innerHTML+=this.renderModal(),this.options.keyboardContext&&(a.default.setContext(this.options.keyboardContext),this.options.escapeExitable),this.emit("rendered"))}remove(){document.getElementById(this.id).remove(),this.emit("removed"),a.default.setContext("navigation")}}t.Modal=u},8286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3779),i=n(2291),o=n(6011);t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,i.default)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return(0,o.unsafeStringify)(s)}},8436:e=>{"use strict";e.exports=JSON.parse('{"id":"e067419a-85c3-422d-b8c4-41690be44500","version":"0.0.1","name":"Sample","created":1674409747467,"tree":{"id":"e067419a-85c3-422d-b8c4-41690be44500","collapsed":false,"children":[{"id":"e067419a-85c3-422d-b8c4-41690be4450d","collapsed":false,"children":[]}]},"contentNodes":{"e067419a-85c3-422d-b8c4-41690be4450d":{"id":"e067419a-85c3-422d-b8c4-41690be4450d","created":1674409747467,"lastUpdated":null,"type":"text","content":"**Welcome to my Outliner**
    ","archived":false,"archivedDate":null,"deleted":false,"deletedDate":null}}}')},8729:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s{document.getElementById("create-outline").addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.emit("createOutline",[t])}),document.getElementById("open-outline-selector").addEventListener("click",t=>a(this,void 0,void 0,function*(){t.preventDefault(),t.stopPropagation();const n=yield d();n&&e.emit("loadOutline",[n.filename])}))}),e};const u=s(n(9403)),l=s(n(2341)),c=n(8013),f='\n

    To begin, either create a new outline or open an existing one.

    \n\n';function d(){return a(this,void 0,void 0,function*(){const e=yield u.open({multiple:!1,defaultPath:yield l.join(yield l.appLocalDataDir(),"outliner"),directory:!1,title:"Select Outline",filters:[{name:"JSON",extensions:["json"]}]});return e?{filename:yield l.basename(e.toString()),fqp:e}:{filename:null,fqp:null}})}},9168:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.j=void 0,t.j={context:"navigation",keys:["j"],description:"Move the cursor to the next sibling of the current node",action:e=>n(void 0,void 0,void 0,function*(){const t=e.cursor.get().nextElementSibling;t&&(e.e.shiftKey||e.cursor.set(`#id-${t.getAttribute("data-id")}`))})}},9342:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.$=void 0;const o=i(n(935));t.$={context:"navigation",keys:["shift + 4"],description:'Enter "Edit" mode and place the cursor at the end of the editable content',action:e=>r(void 0,void 0,void 0,function*(){const{cursor:t,outline:n,e:r}=e;r.preventDefault(),t.get().classList.add("hidden-cursor");const i=t.get().querySelector(".nodeContent");i.innerHTML=n.data.contentNodes[t.getIdOfNode()].content,i.contentEditable="true";const s=document.createRange();s.selectNodeContents(i),s.collapse(!1);const a=window.getSelection();a.removeAllRanges(),a.addRange(s),i.focus(),o.default.setContext("editing")})}},9403:(e,t,n)=>{"use strict";var r=n(717);t.ask=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|ask",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,yesButtonLabel:n?.okLabel?.toString(),noButtonLabel:n?.cancelLabel?.toString()})},t.confirm=async function(e,t){const n="string"==typeof t?{title:t}:t;return await r.invoke("plugin:dialog|confirm",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString(),cancelButtonLabel:n?.cancelLabel?.toString()})},t.message=async function(e,t){const n="string"==typeof t?{title:t}:t;await r.invoke("plugin:dialog|message",{message:e.toString(),title:n?.title?.toString(),kind:n?.kind,okButtonLabel:n?.okLabel?.toString()})},t.open=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|open",{options:e})},t.save=async function(e={}){return"object"==typeof e&&Object.freeze(e),await r.invoke("plugin:dialog|save",{options:e})}},9492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.helpModal=void 0;const r=n(2543),i=n(8013),o=n(4161),s=`\n

    Daily Backup: The daily backup system lets you mash the "Daily Backup" button as much as you'd like.. but will only save the last time you clicked on it. You can only click it once and hour. Your content will always be saved in local-storage as well, but its always good to have a backup system.

    \n \n \n \n \n \n \n \n \n ${(0,r.map)(o.AllShortcuts,e=>`\n \n \n \n \n `).join("\n")}\n \n
    KeyAction
    \n ${e.keys.map(e=>`${e}`).join(" or ")}\n \n ${e.description}\n
    \n`;t.helpModal=new i.Modal({title:"Help",keyboardContext:"help",escapeExitable:!0},s)},9746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6697);t.default=function(e){return"string"==typeof e&&r.default.test(e)}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((t,n)=>(i.f[n](e,t),t),[])),i.u=e=>e+".bundle.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="outline-browser:",i.l=(n,r,o,s)=>{if(e[n])e[n].push(r);else{var a,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(h);var i=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(r)),t)return t(r)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),u&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={792:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=o);var s=i.p+i.u(t),a=new Error;i.l(s,n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[s,a,u]=n,l=0;if(s.some(t=>0!==e[t])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);u&&u(i)}for(t&&t(n);l { - const { cursor, outline, api, search } = args; + const { e, cursor, outline, api, search } = args; + // if you press shift+enter, don't do anything + if (e.shiftKey && e.key === 'Enter') { + return; + } + cursor.get().classList.remove('hidden-cursor'); const contentNode = cursor.get().querySelector('.nodeContent') as HTMLElement;