@burger-editor/client 4.0.0-alpha.57 → 4.0.0-alpha.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +342 -426
- package/dist/client.js.map +1 -1
- package/package.json +7 -7
package/dist/client.js
CHANGED
|
@@ -379,8 +379,8 @@ function kebabCase(str) {
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
/**
|
|
382
|
-
* marked v17.0.
|
|
383
|
-
* Copyright (c) 2018-
|
|
382
|
+
* marked v17.0.2 - a markdown parser
|
|
383
|
+
* Copyright (c) 2018-2026, MarkedJS. (MIT License)
|
|
384
384
|
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
385
385
|
* https://github.com/markedjs/marked
|
|
386
386
|
*/
|
|
@@ -390,32 +390,32 @@ function kebabCase(str) {
|
|
|
390
390
|
* The code in this file is generated from files in ./src/
|
|
391
391
|
*/
|
|
392
392
|
|
|
393
|
-
function
|
|
394
|
-
]`).replace("lheading",se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},
|
|
393
|
+
function M(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var T=M();function H(u){T=u;}var _={exec:()=>null};function k(u,e=""){let t=typeof u=="string"?u:u.source,n={replace:(r,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(m.caret,"$1"),t=t.replace(r,s),n},getRegex:()=>new RegExp(t,e)};return n}var Re=(()=>{try{return !!new RegExp("(?<=1)(?<!1)")}catch{return false}})(),m={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,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+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}#`),htmlBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}>`)},Te=/^(?:[ \t]*(?:\n|$))+/,Oe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,we=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,I=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ye=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,N=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,se=k(re).replace(/bull/g,N).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(),Pe=k(re).replace(/bull/g,N).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(),Q=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Se=/^[^\n]+/,F=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$e=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",F).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_e=k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,N).getRegex(),q="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",j=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Le=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",j).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie$2=k(Q).replace("hr",I).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),Me=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ie$2).getRegex(),U={blockquote:Me,code:Oe,def:$e,fences:we,heading:ye,hr:I,html:Le,lheading:se,list:_e,newline:Te,paragraph:ie$2,table:_,text:Se},te=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",I).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),ze={...U,lheading:Pe,table:te,paragraph:k(Q).replace("hr",I).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",te).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()},Ce={...U,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(Q).replace("hr",I).replace("heading",` *#{1,6} *[^
|
|
394
|
+
]`).replace("lheading",se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ae=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ie=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oe=/^( {2,}|\\)\n(?!\s*$)/,Ee=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,v=/[\p{P}\p{S}]/u,K=/[\s\p{P}\p{S}]/u,ae=/[^\s\p{P}\p{S}]/u,Be=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,K).getRegex(),le=/(?!~)[\p{P}\p{S}]/u,De=/(?!~)[\s\p{P}\p{S}]/u,qe=/(?:[^\s\p{P}\p{S}]|~)/u,ue=/(?![*_])[\p{P}\p{S}]/u,ve=/(?![*_])[\s\p{P}\p{S}]/u,Ge=/(?:[^\s\p{P}\p{S}]|[*_])/u,He=k(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Re?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ze=k(pe,"u").replace(/punct/g,v).getRegex(),Ne=k(pe,"u").replace(/punct/g,le).getRegex(),ce="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qe=k(ce,"gu").replace(/notPunctSpace/g,ae).replace(/punctSpace/g,K).replace(/punct/g,v).getRegex(),Fe=k(ce,"gu").replace(/notPunctSpace/g,qe).replace(/punctSpace/g,De).replace(/punct/g,le).getRegex(),je=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ae).replace(/punctSpace/g,K).replace(/punct/g,v).getRegex(),Ue=k(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ue).getRegex(),Ke="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",We=k(Ke,"gu").replace(/notPunctSpace/g,Ge).replace(/punctSpace/g,ve).replace(/punct/g,ue).getRegex(),Xe=k(/\\(punct)/,"gu").replace(/punct/g,v).getRegex(),Je=k(/^<(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(),Ve=k(j).replace("(?:-->|$)","-->").getRegex(),Ye=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ve).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,et=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),he=k(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",F).getRegex(),ke=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",F).getRegex(),tt$1=k("reflink|nolink(?!\\()","g").replace("reflink",he).replace("nolink",ke).getRegex(),ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W={_backpedal:_,anyPunctuation:Xe,autolink:Je,blockSkip:He,br:oe,code:Ie,del:_,delLDelim:_,delRDelim:_,emStrongLDelim:Ze,emStrongRDelimAst:Qe,emStrongRDelimUnd:je,escape:Ae,link:et,nolink:ke,punctuation:Be,reflink:he,reflinkSearch:tt$1,tag:Ye,text:Ee,url:_},nt={...W,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()},Z={...W,emStrongRDelimAst:Fe,emStrongLDelim:Ne,delLDelim:Ue,delRDelim:We,url:k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ne).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ne).getRegex()},rt={...Z,br:k(oe).replace("{2,}","*").getRegex(),text:k(Z.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},E={normal:U,gfm:ze,pedantic:Ce},z={normal:W,gfm:Z,breaks:rt,pedantic:nt};var st={"&":"&","<":"<",">":">",'"':""","'":"'"},de=u=>st[u];function O(u,e){if(e){if(m.escapeTest.test(u))return u.replace(m.escapeReplace,de)}else if(m.escapeTestNoEncode.test(u))return u.replace(m.escapeReplaceNoEncode,de);return u}function X(u){try{u=encodeURI(u).replace(m.percentDecode,"%");}catch{return null}return u}function J(u,e){let t=u.replace(m.findPipe,(i,s,a)=>{let o=false,l=s;for(;--l>=0&&a[l]==="\\";)o=!o;return o?"|":" |"}),n=t.split(m.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(m.slashPipe,"|");return n}function C(u,e,t){let n=u.length;if(n===0)return "";let r=0;for(;r<n;){let i=u.charAt(n-r-1);if(i===e&&true)r++;else break}return u.slice(0,n-r)}function ge(u,e){if(u.indexOf(e[1])===-1)return -1;let t=0;for(let n=0;n<u.length;n++)if(u[n]==="\\")n++;else if(u[n]===e[0])t++;else if(u[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function fe(u,e=0){let t=e,n="";for(let r of u)if(r===" "){let i=4-t%4;n+=" ".repeat(i),t+=i;}else n+=r,t++;return n}function me(u,e,t,n,r){let i=e.href,s=e.title||null,a=u[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=true;let o={type:u[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:s,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=false,o}function it(u,e,t){let n=u.match(t.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`
|
|
395
395
|
`).map(i=>{let s=i.match(t.other.beginningSpace);if(s===null)return i;let[a]=s;return a.length>=r.length?i.slice(r.length):i}).join(`
|
|
396
|
-
`)}var
|
|
397
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=
|
|
398
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=
|
|
396
|
+
`)}var w=class{options;rules;lexer;constructor(e){this.options=e||T;}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return {type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return {type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:C(n,`
|
|
397
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=it(n,t[3]||"",this.rules);return {type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=C(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim());}return {type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return {type:"hr",raw:C(t[0],`
|
|
398
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=C(t[0],`
|
|
399
399
|
`).split(`
|
|
400
400
|
`),r="",i="",s=[];for(;n.length>0;){let a=false,o=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),a=true;else if(!a)o.push(n[l]);else break;n=n.slice(l);let p=o.join(`
|
|
401
401
|
`),c=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
402
402
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
403
403
|
${p}`:p,i=i?`${i}
|
|
404
|
-
${c}`:c;let
|
|
404
|
+
${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=true,this.lexer.blockTokens(c,s,true),this.lexer.state.top=d,n.length===0)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let R=h,f=R.raw+`
|
|
405
405
|
`+n.join(`
|
|
406
|
-
`),
|
|
406
|
+
`),S=this.blockquote(f);s[s.length-1]=S,r=r.substring(0,r.length-R.raw.length)+S.raw,i=i.substring(0,i.length-R.text.length)+S.text;break}else if(h?.type==="list"){let R=h,f=R.raw+`
|
|
407
407
|
`+n.join(`
|
|
408
|
-
`),
|
|
409
|
-
`);continue}}return {type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:false,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=false;for(;e;){let l=false,p="",c="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let
|
|
410
|
-
`,1)[0]
|
|
411
|
-
`,1)[0],R=!
|
|
412
|
-
`,e=e.substring(h.length+1),l=true),!l){let
|
|
413
|
-
`,1)[0],A;if(h=
|
|
414
|
-
`+A.slice(f);else {if(R||
|
|
415
|
-
`+h;}
|
|
416
|
-
`,e=e.substring(
|
|
408
|
+
`),S=this.list(f);s[s.length-1]=S,r=r.substring(0,r.length-h.raw.length)+S.raw,i=i.substring(0,i.length-R.raw.length)+S.raw,n=f.substring(s.at(-1).raw.length).split(`
|
|
409
|
+
`);continue}}return {type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:false,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=false;for(;e;){let l=false,p="",c="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let d=fe(t[2].split(`
|
|
410
|
+
`,1)[0],t[1].length),h=e.split(`
|
|
411
|
+
`,1)[0],R=!d.trim(),f=0;if(this.options.pedantic?(f=2,c=d.trimStart()):R?f=t[1].length+1:(f=d.search(this.rules.other.nonSpaceChar),f=f>4?1:f,c=d.slice(f),f+=t[1].length),R&&this.rules.other.blankLine.test(h)&&(p+=h+`
|
|
412
|
+
`,e=e.substring(h.length+1),l=true),!l){let S=this.rules.other.nextBulletRegex(f),V=this.rules.other.hrRegex(f),Y=this.rules.other.fencesBeginRegex(f),ee=this.rules.other.headingBeginRegex(f),xe=this.rules.other.htmlBeginRegex(f),be=this.rules.other.blockquoteBeginRegex(f);for(;e;){let G=e.split(`
|
|
413
|
+
`,1)[0],A;if(h=G,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),A=h):A=h.replace(this.rules.other.tabCharGlobal," "),Y.test(h)||ee.test(h)||xe.test(h)||be.test(h)||S.test(h)||V.test(h))break;if(A.search(this.rules.other.nonSpaceChar)>=f||!h.trim())c+=`
|
|
414
|
+
`+A.slice(f);else {if(R||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Y.test(d)||ee.test(d)||V.test(d))break;c+=`
|
|
415
|
+
`+h;}R=!h.trim(),p+=G+`
|
|
416
|
+
`,e=e.substring(G.length+1),d=A.slice(f);}}i.loose||(a?i.loose=true:this.rules.other.doubleBlankLine.test(p)&&(a=true)),i.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:false,text:c,tokens:[]}),i.raw+=p;}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items){if(this.lexer.state.top=false,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(l.raw);if(p){let c={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};l.checked=c.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c);}}if(!i.loose){let p=l.tokens.filter(d=>d.type==="space"),c=p.length>0&&p.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=c;}}if(i.loose)for(let l of i.items){l.loose=true;for(let p of l.tokens)p.type==="text"&&(p.type="paragraph");}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return {type:"html",block:true,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return {type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=J(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
417
417
|
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:true,align:s.align[a]});for(let a of i)s.rows.push(J(a,s.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:false,align:s.align[l]})));return s}}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 n=t[1].charAt(t[1].length-1)===`
|
|
418
|
-
`?t[1].slice(0,-1):t[1];return {type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}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=true:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=false),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=true:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=false),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:false,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=
|
|
418
|
+
`?t[1].slice(0,-1):t[1];return {type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}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=true:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=false),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=true:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=false),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:false,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=C(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else {let s=ge(t[2],"()");if(s===-2)return;if(s>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,o).trim(),t[3]="";}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3]);}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),me(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.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 r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let s=n[0].charAt(0);return {type:"text",raw:s,text:s}}return me(n,i,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))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...r[0]].length-1,a,o,l=s,p=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);(r=c.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){l+=o;continue}else if((r[5]||r[6])&&s%3&&!((s+o)%3)){p+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+p);let d=[...r[0]][0].length,h=e.slice(0,s+r.index+d+o);if(Math.min(s,o)%2){let f=h.slice(1,-1);return {type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}let R=h.slice(2,-2);return {type:"strong",raw:h,text:R,tokens:this.lexer.inlineTokens(R)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return {type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(!r)return;if(!(r[1]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...r[0]].length-1,a,o,l=s,p=this.rules.inline.delRDelim;for(p.lastIndex=0,t=t.slice(-1*e.length+s);(r=p.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(o=[...a].length,o!==s))continue;if(r[3]||r[4]){l+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l);let c=[...r[0]][0].length,d=e.slice(0,s+r.index+c+o),h=d.slice(s,-s);return {type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else {let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0];}return {type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return {type:"text",raw:t[0],text:t[0],escaped:n}}}};var x=class u{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||T,this.options.tokenizer=this.options.tokenizer||new w,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:false,inRawBlock:false,top:true};let t={other:m,block:E.normal,inline:z.normal};this.options.pedantic?(t.block=E.pedantic,t.inline=z.pedantic):this.options.gfm&&(t.block=E.gfm,this.options.breaks?t.inline=z.breaks:t.inline=z.gfm),this.tokenizer.rules=t;}static get rules(){return {block:E,inline:z}}static lex(e,t){return new u(t).lex(e)}static lexInline(e,t){return new u(t).inlineTokens(e)}lex(e){e=e.replace(m.carriageReturn,`
|
|
419
419
|
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens);}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=false){for(this.options.pedantic&&(e=e.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),true):false))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let s=t.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
|
|
420
420
|
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let s=t.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
421
421
|
`)?"":`
|
|
@@ -429,9 +429,9 @@ ${c}`:c;let g=this.lexer.state.top;if(this.lexer.state.top=true,this.lexer.block
|
|
|
429
429
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.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 s=t.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
430
430
|
`)?"":`
|
|
431
431
|
`)+r.raw,s.text+=`
|
|
432
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(r);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=true,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 o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)o.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(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=false,a="";for(;e;){s||(a=""),s=false;let o;if(this.options.extensions?.inline?.some(p=>(o=p.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),true):false))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let p=t.at(-1);o.type==="text"&&p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if(this.options.extensions?.startInline){let p=1/0,c=e.slice(1),
|
|
433
|
-
`;return r?'<pre><code class="language-'+
|
|
434
|
-
`:"<pre><code>"+(n?i:
|
|
432
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(r);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=true,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 o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)o.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(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=false,a="";for(;e;){s||(a=""),s=false;let o;if(this.options.extensions?.inline?.some(p=>(o=p.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),true):false))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let p=t.at(-1);o.type==="text"&&p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,a)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if(this.options.extensions?.startInline){let p=1/0,c=e.slice(1),d;this.options.extensions.startInline.forEach(h=>{d=h.call({lexer:this},c),typeof d=="number"&&d>=0&&(p=Math.min(p,d));}),p<1/0&&p>=0&&(l=e.substring(0,p+1));}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(a=o.raw.slice(-1)),s=true;let p=t.at(-1);p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}};var y=class{options;parser;constructor(e){this.options=e||T;}space(e){return ""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(m.notSpaceStart)?.[0],i=e.replace(m.endingNewline,"")+`
|
|
433
|
+
`;return r?'<pre><code class="language-'+O(r)+'">'+(n?i:O(i,true))+`</code></pre>
|
|
434
|
+
`:"<pre><code>"+(n?i:O(i,true))+`</code></pre>
|
|
435
435
|
`}blockquote({tokens:e}){return `<blockquote>
|
|
436
436
|
${this.parser.parse(e)}</blockquote>
|
|
437
437
|
`}html({text:e}){return e}def(e){return ""}heading({tokens:e,depth:t}){return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
@@ -447,8 +447,8 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
447
447
|
`}tablerow({text:e}){return `<tr>
|
|
448
448
|
${e}</tr>
|
|
449
449
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return (e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
450
|
-
`}strong({tokens:e}){return `<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return `<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return `<code>${
|
|
451
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+
|
|
450
|
+
`}strong({tokens:e}){return `<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return `<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return `<code>${O(e,true)}</code>`}br(e){return "<br>"}del({tokens:e}){return `<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=X(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+O(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=X(e);if(i===null)return O(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${O(t)}"`),s+=">",s}text(e){return "tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:O(e.text)}};var $=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return ""+e}image({text:e}){return ""+e}br(){return ""}checkbox({raw:e}){return e}};var b=class u{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $;}static parse(e,t){return new u(t).parse(e)}static parseInline(e,t){return new u(t).parseInline(e)}parse(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let s=r,a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==false||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=a||"";continue}}let i=r;switch(i.type){case "space":{t+=this.renderer.space(i);break}case "hr":{t+=this.renderer.hr(i);break}case "heading":{t+=this.renderer.heading(i);break}case "code":{t+=this.renderer.code(i);break}case "table":{t+=this.renderer.table(i);break}case "blockquote":{t+=this.renderer.blockquote(i);break}case "list":{t+=this.renderer.list(i);break}case "checkbox":{t+=this.renderer.checkbox(i);break}case "html":{t+=this.renderer.html(i);break}case "def":{t+=this.renderer.def(i);break}case "paragraph":{t+=this.renderer.paragraph(i);break}case "text":{t+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==false||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}let s=i;switch(s.type){case "escape":{n+=t.text(s);break}case "html":{n+=t.html(s);break}case "link":{n+=t.link(s);break}case "image":{n+=t.image(s);break}case "checkbox":{n+=t.checkbox(s);break}case "strong":{n+=t.strong(s);break}case "em":{n+=t.em(s);break}case "codespan":{n+=t.codespan(s);break}case "br":{n+=t.br(s);break}case "del":{n+=t.del(s);break}case "text":{n+=t.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}};var P=class{options;block;constructor(e){this.options=e||T;}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?x.lex:x.lexInline}provideParser(){return this.block?b.parse:b.parseInline}};var B=class{defaults=M();options=this.setOptions;parse=this.parseMarkdown(true);parseInline=this.parseMarkdown(false);Parser=b;Renderer=y;TextRenderer=$;Lexer=x;Tokenizer=w;Hooks=P;constructor(...e){this.use(...e);}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case "table":{let i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,t));break}case "list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,t));}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)));}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||false,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===false&&(o=s.apply(this,a)),o}:t.renderers[i.name]=i.renderer;}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]));}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens);}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new y(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...p)=>{let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c||""};}r.renderer=i;}if(n.tokenizer){let i=this.defaults.tokenizer||new w(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...p)=>{let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c};}r.tokenizer=i;}if(n.hooks){let i=this.defaults.hooks||new P;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];P.passThroughHooks.has(s)?i[a]=p=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(s))return (async()=>{let d=await o.call(i,p);return l.call(i,d)})();let c=o.call(i,p);return l.call(i,c)}:i[a]=(...p)=>{if(this.defaults.async)return (async()=>{let d=await o.apply(i,p);return d===false&&(d=await l.apply(i,p)),d})();let c=o.apply(i,p);return c===false&&(c=l.apply(i,p)),c};}r.hooks=i;}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o};}this.defaults={...this.defaults,...r};}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return x.lex(e,t??this.defaults)}parser(e,t){return b.parse(e,t??this.defaults)}parseMarkdown(e){return (n,r)=>{let i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===true&&i.async===false)return a(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 n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return (async()=>{let o=s.hooks?await s.hooks.preprocess(n):n,p=await(s.hooks?await s.hooks.provideLexer():e?x.lex:x.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(p):p;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():e?b.parse:b.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let l=(s.hooks?s.hooks.provideLexer():e?x.lex:x.lexInline)(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():e?b.parse:b.parseInline)(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(o){return a(o)}}}onError(e,t){return n=>{if(n.message+=`
|
|
451
|
+
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+O(n.message+"",true)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}};var L=new B;function g(u,e){return L.parse(u,e)}g.options=g.setOptions=function(u){return L.setOptions(u),g.defaults=L.defaults,H(g.defaults),g};g.getDefaults=M;g.defaults=T;g.use=function(...u){return L.use(...u),g.defaults=L.defaults,H(g.defaults),g};g.walkTokens=function(u,e){return L.walkTokens(u,e)};g.parseInline=L.parseInline;g.Parser=b;g.parser=b.parse;g.Renderer=y;g.TextRenderer=$;g.Lexer=x;g.lexer=x.lex;g.Tokenizer=w;g.Hooks=P;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;b.parse;x.lex;
|
|
452
452
|
|
|
453
453
|
/*
|
|
454
454
|
* Set up window for Node.js
|
|
@@ -3264,14 +3264,12 @@ function comparePriority(a, b) {
|
|
|
3264
3264
|
if (minLength > 0) {
|
|
3265
3265
|
const aLast = a[minLength - 1];
|
|
3266
3266
|
const bLast = b[minLength - 1];
|
|
3267
|
-
// Special case
|
|
3268
|
-
//
|
|
3267
|
+
// Special case for deeply nested layers (depth >= 3):
|
|
3268
|
+
// When the last element is in the [0, 1] range (0 = unlayered fallback, 1 = single declared layer),
|
|
3269
|
+
// the difference at that depth is not meaningful for priority resolution.
|
|
3270
|
+
// This treats sub-layer positions with only trivial priority values as equivalent,
|
|
3271
|
+
// deferring to the parent layer priority already resolved by earlier elements.
|
|
3269
3272
|
if (minLength >= 3 && aLast >= 0 && aLast <= 1 && bLast >= 0 && bLast <= 1) {
|
|
3270
|
-
// If lengths differ, shorter array's elements are all matched
|
|
3271
|
-
if (a.length !== b.length) {
|
|
3272
|
-
return 0;
|
|
3273
|
-
}
|
|
3274
|
-
// Same length, all elements matched including last (treated as equal)
|
|
3275
3273
|
return 0;
|
|
3276
3274
|
}
|
|
3277
3275
|
// Normal comparison for last element
|
|
@@ -3282,7 +3280,11 @@ function comparePriority(a, b) {
|
|
|
3282
3280
|
return 1;
|
|
3283
3281
|
}
|
|
3284
3282
|
}
|
|
3285
|
-
// All elements are equal up to minLength
|
|
3283
|
+
// All elements are equal up to minLength — shorter array (unlayered) has higher priority
|
|
3284
|
+
if (a.length < b.length)
|
|
3285
|
+
return 1;
|
|
3286
|
+
if (a.length > b.length)
|
|
3287
|
+
return -1;
|
|
3286
3288
|
return 0;
|
|
3287
3289
|
}
|
|
3288
3290
|
|
|
@@ -3309,7 +3311,7 @@ function getCustomProperties(scope, containerType) {
|
|
|
3309
3311
|
}
|
|
3310
3312
|
const currentMap = categories.get(propName) ?? {
|
|
3311
3313
|
id: propName,
|
|
3312
|
-
name: propName.
|
|
3314
|
+
name: propName.replace(/^_[a-z]+_/, ''),
|
|
3313
3315
|
properties: new Map(),
|
|
3314
3316
|
};
|
|
3315
3317
|
if (key) {
|
|
@@ -3322,6 +3324,7 @@ function getCustomProperties(scope, containerType) {
|
|
|
3322
3324
|
currentMap.properties.set(key, currentProperty
|
|
3323
3325
|
? compareCustomPropertyByLayerPriority(currentProperty, newProperty)
|
|
3324
3326
|
: newProperty);
|
|
3327
|
+
categories.set(propName, currentMap);
|
|
3325
3328
|
}
|
|
3326
3329
|
else {
|
|
3327
3330
|
const newDefaultValue = {
|
|
@@ -3334,7 +3337,6 @@ function getCustomProperties(scope, containerType) {
|
|
|
3334
3337
|
? compareCustomPropertyByLayerPriority(currentDefaultValue, newDefaultValue)
|
|
3335
3338
|
: newDefaultValue);
|
|
3336
3339
|
}
|
|
3337
|
-
categories.set(propName, currentMap);
|
|
3338
3340
|
});
|
|
3339
3341
|
for (const propList of categories.values()) {
|
|
3340
3342
|
for (const [key, customProperty] of propList.properties.entries()) {
|
|
@@ -3349,7 +3351,7 @@ function getCustomProperties(scope, containerType) {
|
|
|
3349
3351
|
continue;
|
|
3350
3352
|
}
|
|
3351
3353
|
for (const [key, customProperty] of currentMap.properties.entries()) {
|
|
3352
|
-
if (property.value ===
|
|
3354
|
+
if (property.value.trim() ===
|
|
3353
3355
|
`var(${BLOCK_OPTION_CSS_CUSTOM_PROPERTY_PREFIX}${category}--${key})`) {
|
|
3354
3356
|
customProperty.isDefault = true;
|
|
3355
3357
|
}
|
|
@@ -3363,31 +3365,30 @@ function getCustomProperties(scope, containerType) {
|
|
|
3363
3365
|
* @param property
|
|
3364
3366
|
*/
|
|
3365
3367
|
function getCustomProperty(scope, property) {
|
|
3366
|
-
let
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
}
|
|
3368
|
+
let resultValue = null;
|
|
3369
|
+
let resultPriority = [];
|
|
3370
|
+
searchCustomProperty(scope, (cssProperty, value, layers) => {
|
|
3371
|
+
const matches = property instanceof RegExp ? property.test(cssProperty) : cssProperty === property;
|
|
3372
|
+
if (!matches) {
|
|
3373
|
+
return;
|
|
3373
3374
|
}
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
}
|
|
3375
|
+
const newPriority = layers.map((l) => l.priority);
|
|
3376
|
+
if (resultValue == null || comparePriority(resultPriority, newPriority) <= 0) {
|
|
3377
|
+
resultValue = value;
|
|
3378
|
+
resultPriority = newPriority;
|
|
3379
3379
|
}
|
|
3380
3380
|
});
|
|
3381
|
-
return
|
|
3381
|
+
return resultValue;
|
|
3382
3382
|
}
|
|
3383
3383
|
/**
|
|
3384
3384
|
* Get all CSSStyleRule from CSSRule array recursively
|
|
3385
3385
|
* @param rules - CSSRule array
|
|
3386
3386
|
* @param layers
|
|
3387
3387
|
* @param scope - Document
|
|
3388
|
+
* @param scopeRoot
|
|
3388
3389
|
* @returns CSSStyleRule array
|
|
3389
3390
|
*/
|
|
3390
|
-
function getStyleRules(rules, layers, scope) {
|
|
3391
|
+
function getStyleRules(rules, layers, scope, scopeRoot = null) {
|
|
3391
3392
|
const CSSStyleRule = scope.defaultView?.CSSStyleRule;
|
|
3392
3393
|
if (CSSStyleRule === undefined) {
|
|
3393
3394
|
throw new Error('CSSStyleRule is not available');
|
|
@@ -3400,28 +3401,51 @@ function getStyleRules(rules, layers, scope) {
|
|
|
3400
3401
|
if (CSSLayerStatementRule === undefined) {
|
|
3401
3402
|
throw new Error('CSSLayerStatementRule is not available');
|
|
3402
3403
|
}
|
|
3403
|
-
const
|
|
3404
|
+
const CSSScopeRule = scope.defaultView?.CSSScopeRule;
|
|
3405
|
+
// Build unified layer order from CSSLayerStatementRules and CSSLayerBlockRules (first-occurrence order per CSS spec)
|
|
3406
|
+
// Pass 1: Collect layers declared in @layer statements (explicit order takes precedence)
|
|
3407
|
+
const allLayerNames = [];
|
|
3408
|
+
for (const rule of rules) {
|
|
3409
|
+
if (rule instanceof CSSLayerStatementRule) {
|
|
3410
|
+
for (const name of rule.nameList) {
|
|
3411
|
+
if (!allLayerNames.includes(name)) {
|
|
3412
|
+
allLayerNames.push(name);
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
// Pass 2: Append layers that appear only in @layer block rules (first-occurrence after statements)
|
|
3418
|
+
for (const rule of rules) {
|
|
3419
|
+
if (rule instanceof CSSLayerBlockRule && !allLayerNames.includes(rule.name)) {
|
|
3420
|
+
allLayerNames.push(rule.name);
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
const reversedLayerNames = allLayerNames.toReversed();
|
|
3404
3424
|
const styleRules = [];
|
|
3405
3425
|
for (const rule of rules) {
|
|
3406
3426
|
if (rule instanceof CSSStyleRule) {
|
|
3407
3427
|
styleRules.push({
|
|
3408
3428
|
rule,
|
|
3409
|
-
_cssText: rule.cssText,
|
|
3410
3429
|
layers,
|
|
3411
|
-
|
|
3430
|
+
scopeRoot,
|
|
3431
|
+
}, ...getStyleRules(rule.cssRules, layers, scope, scopeRoot));
|
|
3412
3432
|
}
|
|
3413
3433
|
if (rule instanceof CSSLayerBlockRule) {
|
|
3414
3434
|
const layerName = rule.name;
|
|
3415
|
-
const
|
|
3416
|
-
const priority =
|
|
3435
|
+
const reversedIndex = reversedLayerNames.indexOf(layerName);
|
|
3436
|
+
const priority = Math.max(reversedIndex, 0);
|
|
3417
3437
|
styleRules.push(...getStyleRules(rule.cssRules, [
|
|
3418
3438
|
...layers,
|
|
3419
3439
|
{
|
|
3420
|
-
priorityList:
|
|
3440
|
+
priorityList: allLayerNames,
|
|
3421
3441
|
layerName,
|
|
3422
3442
|
priority: 1 + priority,
|
|
3423
3443
|
},
|
|
3424
|
-
], scope));
|
|
3444
|
+
], scope, scopeRoot));
|
|
3445
|
+
}
|
|
3446
|
+
if (CSSScopeRule && rule instanceof CSSScopeRule) {
|
|
3447
|
+
const start = 'start' in rule && typeof rule.start === 'string' ? rule.start : null;
|
|
3448
|
+
styleRules.push(...getStyleRules(rule.cssRules, layers, scope, start));
|
|
3425
3449
|
}
|
|
3426
3450
|
}
|
|
3427
3451
|
return styleRules;
|
|
@@ -3437,7 +3461,8 @@ function searchCustomProperty(scope, found) {
|
|
|
3437
3461
|
const styleRules = getStyleRules(styleSheet.cssRules, [], scope);
|
|
3438
3462
|
for (const cssRule of styleRules) {
|
|
3439
3463
|
const selector = cssRule.rule.selectorText.trim().replace(/^&/, '').trim();
|
|
3440
|
-
if (selector === BLOCK_OPTION_SCOPE_SELECTOR
|
|
3464
|
+
if (selector === BLOCK_OPTION_SCOPE_SELECTOR ||
|
|
3465
|
+
(selector === ':scope' && cssRule.scopeRoot === BLOCK_OPTION_SCOPE_SELECTOR)) {
|
|
3441
3466
|
for (const cssProperty of cssRule.rule.style) {
|
|
3442
3467
|
if (!cssProperty.startsWith('--')) {
|
|
3443
3468
|
continue;
|
|
@@ -3467,12 +3492,6 @@ function searchCustomProperty(scope, found) {
|
|
|
3467
3492
|
*/
|
|
3468
3493
|
function compareCustomPropertyByLayerPriority(a, b) {
|
|
3469
3494
|
const result = comparePriority(a.priority, b.priority);
|
|
3470
|
-
if (result === 0) {
|
|
3471
|
-
return b;
|
|
3472
|
-
}
|
|
3473
|
-
if (result === -1) {
|
|
3474
|
-
return b;
|
|
3475
|
-
}
|
|
3476
3495
|
if (result === 1) {
|
|
3477
3496
|
return a;
|
|
3478
3497
|
}
|
|
@@ -16991,7 +17010,17 @@ class DOMObserver {
|
|
|
16991
17010
|
}
|
|
16992
17011
|
}
|
|
16993
17012
|
}
|
|
16994
|
-
if (
|
|
17013
|
+
if (added.some(n => n.nodeName == "BR") && (view.input.lastKeyCode == 8 || view.input.lastKeyCode == 46)) {
|
|
17014
|
+
// Browsers sometimes insert a bogus break node if you
|
|
17015
|
+
// backspace out the last bit of text before an inline-flex node (#1552)
|
|
17016
|
+
for (let node of added)
|
|
17017
|
+
if (node.nodeName == "BR" && node.parentNode) {
|
|
17018
|
+
let after = node.nextSibling;
|
|
17019
|
+
if (after && after.nodeType == 1 && after.contentEditable == "false")
|
|
17020
|
+
node.parentNode.removeChild(node);
|
|
17021
|
+
}
|
|
17022
|
+
}
|
|
17023
|
+
else if (gecko && added.length) {
|
|
16995
17024
|
let brs = added.filter(n => n.nodeName == "BR");
|
|
16996
17025
|
if (brs.length == 2) {
|
|
16997
17026
|
let [a, b] = brs;
|
|
@@ -17009,17 +17038,6 @@ class DOMObserver {
|
|
|
17009
17038
|
}
|
|
17010
17039
|
}
|
|
17011
17040
|
}
|
|
17012
|
-
else if ((chrome || safari) && added.some(n => n.nodeName == "BR") &&
|
|
17013
|
-
(view.input.lastKeyCode == 8 || view.input.lastKeyCode == 46)) {
|
|
17014
|
-
// Chrome/Safari sometimes insert a bogus break node if you
|
|
17015
|
-
// backspace out the last bit of text before an inline-flex node (#1552)
|
|
17016
|
-
for (let node of added)
|
|
17017
|
-
if (node.nodeName == "BR" && node.parentNode) {
|
|
17018
|
-
let after = node.nextSibling;
|
|
17019
|
-
if (after && after.nodeType == 1 && after.contentEditable == "false")
|
|
17020
|
-
node.parentNode.removeChild(node);
|
|
17021
|
-
}
|
|
17022
|
-
}
|
|
17023
17041
|
let readSel = null;
|
|
17024
17042
|
// If it looks like the browser has reset the selection to the
|
|
17025
17043
|
// start of the document after focus, restore the selection from
|
|
@@ -27276,6 +27294,9 @@ var Link = Mark.create({
|
|
|
27276
27294
|
},
|
|
27277
27295
|
class: {
|
|
27278
27296
|
default: this.options.HTMLAttributes.class
|
|
27297
|
+
},
|
|
27298
|
+
title: {
|
|
27299
|
+
default: null
|
|
27279
27300
|
}
|
|
27280
27301
|
};
|
|
27281
27302
|
},
|
|
@@ -27315,10 +27336,11 @@ var Link = Mark.create({
|
|
|
27315
27336
|
});
|
|
27316
27337
|
},
|
|
27317
27338
|
renderMarkdown: (node, h) => {
|
|
27318
|
-
var _a;
|
|
27319
|
-
const href = ((_a = node.attrs) == null ? void 0 : _a.href)
|
|
27339
|
+
var _a, _b, _c, _d;
|
|
27340
|
+
const href = (_b = (_a = node.attrs) == null ? void 0 : _a.href) != null ? _b : "";
|
|
27341
|
+
const title = (_d = (_c = node.attrs) == null ? void 0 : _c.title) != null ? _d : "";
|
|
27320
27342
|
const text = h.renderChildren(node);
|
|
27321
|
-
return `[${text}](${href})`;
|
|
27343
|
+
return title ? `[${text}](${href} "${title}")` : `[${text}](${href})`;
|
|
27322
27344
|
},
|
|
27323
27345
|
addCommands() {
|
|
27324
27346
|
return {
|
|
@@ -34777,6 +34799,19 @@ function async_derived_orphan() {
|
|
|
34777
34799
|
}
|
|
34778
34800
|
}
|
|
34779
34801
|
|
|
34802
|
+
/**
|
|
34803
|
+
* Keyed each block has duplicate key `%value%` at indexes %a% and %b%
|
|
34804
|
+
* @param {string} a
|
|
34805
|
+
* @param {string} b
|
|
34806
|
+
* @param {string | undefined | null} [value]
|
|
34807
|
+
* @returns {never}
|
|
34808
|
+
*/
|
|
34809
|
+
function each_key_duplicate(a, b, value) {
|
|
34810
|
+
{
|
|
34811
|
+
throw new Error(`https://svelte.dev/e/each_key_duplicate`);
|
|
34812
|
+
}
|
|
34813
|
+
}
|
|
34814
|
+
|
|
34780
34815
|
/**
|
|
34781
34816
|
* `%rune%` cannot be used inside an effect cleanup function
|
|
34782
34817
|
* @param {string} rune
|
|
@@ -35221,11 +35256,13 @@ class Batch {
|
|
|
35221
35256
|
#maybe_dirty_effects = new Set();
|
|
35222
35257
|
|
|
35223
35258
|
/**
|
|
35224
|
-
* A
|
|
35225
|
-
* is committed — we skip over these during `process
|
|
35226
|
-
*
|
|
35259
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
35260
|
+
* is committed — we skip over these during `process`.
|
|
35261
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
35262
|
+
* so they can be rescheduled if the branch survives.
|
|
35263
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
35227
35264
|
*/
|
|
35228
|
-
|
|
35265
|
+
#skipped_branches = new Map();
|
|
35229
35266
|
|
|
35230
35267
|
is_fork = false;
|
|
35231
35268
|
|
|
@@ -35235,6 +35272,38 @@ class Batch {
|
|
|
35235
35272
|
return this.is_fork || this.#blocking_pending > 0;
|
|
35236
35273
|
}
|
|
35237
35274
|
|
|
35275
|
+
/**
|
|
35276
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
35277
|
+
* @param {Effect} effect
|
|
35278
|
+
*/
|
|
35279
|
+
skip_effect(effect) {
|
|
35280
|
+
if (!this.#skipped_branches.has(effect)) {
|
|
35281
|
+
this.#skipped_branches.set(effect, { d: [], m: [] });
|
|
35282
|
+
}
|
|
35283
|
+
}
|
|
35284
|
+
|
|
35285
|
+
/**
|
|
35286
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
35287
|
+
* any tracked dirty/maybe_dirty child effects
|
|
35288
|
+
* @param {Effect} effect
|
|
35289
|
+
*/
|
|
35290
|
+
unskip_effect(effect) {
|
|
35291
|
+
var tracked = this.#skipped_branches.get(effect);
|
|
35292
|
+
if (tracked) {
|
|
35293
|
+
this.#skipped_branches.delete(effect);
|
|
35294
|
+
|
|
35295
|
+
for (var e of tracked.d) {
|
|
35296
|
+
set_signal_status(e, DIRTY);
|
|
35297
|
+
schedule_effect(e);
|
|
35298
|
+
}
|
|
35299
|
+
|
|
35300
|
+
for (e of tracked.m) {
|
|
35301
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
35302
|
+
schedule_effect(e);
|
|
35303
|
+
}
|
|
35304
|
+
}
|
|
35305
|
+
}
|
|
35306
|
+
|
|
35238
35307
|
/**
|
|
35239
35308
|
*
|
|
35240
35309
|
* @param {Effect[]} root_effects
|
|
@@ -35263,8 +35332,8 @@ class Batch {
|
|
|
35263
35332
|
this.#defer_effects(render_effects);
|
|
35264
35333
|
this.#defer_effects(effects);
|
|
35265
35334
|
|
|
35266
|
-
for (const e of this
|
|
35267
|
-
reset_branch(e);
|
|
35335
|
+
for (const [e, t] of this.#skipped_branches) {
|
|
35336
|
+
reset_branch(e, t);
|
|
35268
35337
|
}
|
|
35269
35338
|
} else {
|
|
35270
35339
|
// append/remove branches
|
|
@@ -35311,7 +35380,7 @@ class Batch {
|
|
|
35311
35380
|
var is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;
|
|
35312
35381
|
var is_skippable_branch = is_branch && (flags & CLEAN) !== 0;
|
|
35313
35382
|
|
|
35314
|
-
var skip = is_skippable_branch || (flags & INERT) !== 0 || this.
|
|
35383
|
+
var skip = is_skippable_branch || (flags & INERT) !== 0 || this.#skipped_branches.has(effect);
|
|
35315
35384
|
|
|
35316
35385
|
if (!skip && effect.fn !== null) {
|
|
35317
35386
|
if (is_branch) {
|
|
@@ -35643,8 +35712,9 @@ function flush_effects() {
|
|
|
35643
35712
|
if (DEV) ;
|
|
35644
35713
|
}
|
|
35645
35714
|
} finally {
|
|
35646
|
-
|
|
35715
|
+
queued_root_effects = [];
|
|
35647
35716
|
|
|
35717
|
+
is_flushing = false;
|
|
35648
35718
|
last_scheduled_effect = null;
|
|
35649
35719
|
}
|
|
35650
35720
|
}
|
|
@@ -35805,7 +35875,8 @@ function schedule_effect(signal) {
|
|
|
35805
35875
|
var flags = effect.f;
|
|
35806
35876
|
|
|
35807
35877
|
// if the effect is being scheduled because a parent (each/await/etc) block
|
|
35808
|
-
// updated an internal source,
|
|
35878
|
+
// updated an internal source, or because a branch is being unskipped,
|
|
35879
|
+
// bail out or we'll cause a second flush
|
|
35809
35880
|
if (
|
|
35810
35881
|
is_flushing &&
|
|
35811
35882
|
effect === active_effect &&
|
|
@@ -35826,20 +35897,28 @@ function schedule_effect(signal) {
|
|
|
35826
35897
|
|
|
35827
35898
|
/**
|
|
35828
35899
|
* Mark all the effects inside a skipped branch CLEAN, so that
|
|
35829
|
-
* they can be correctly rescheduled later
|
|
35900
|
+
* they can be correctly rescheduled later. Tracks dirty and maybe_dirty
|
|
35901
|
+
* effects so they can be rescheduled if the branch survives.
|
|
35830
35902
|
* @param {Effect} effect
|
|
35903
|
+
* @param {{ d: Effect[], m: Effect[] }} tracked
|
|
35831
35904
|
*/
|
|
35832
|
-
function reset_branch(effect) {
|
|
35905
|
+
function reset_branch(effect, tracked) {
|
|
35833
35906
|
// clean branch = nothing dirty inside, no need to traverse further
|
|
35834
35907
|
if ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) {
|
|
35835
35908
|
return;
|
|
35836
35909
|
}
|
|
35837
35910
|
|
|
35911
|
+
if ((effect.f & DIRTY) !== 0) {
|
|
35912
|
+
tracked.d.push(effect);
|
|
35913
|
+
} else if ((effect.f & MAYBE_DIRTY) !== 0) {
|
|
35914
|
+
tracked.m.push(effect);
|
|
35915
|
+
}
|
|
35916
|
+
|
|
35838
35917
|
set_signal_status(effect, CLEAN);
|
|
35839
35918
|
|
|
35840
35919
|
var e = effect.first;
|
|
35841
35920
|
while (e !== null) {
|
|
35842
|
-
reset_branch(e);
|
|
35921
|
+
reset_branch(e, tracked);
|
|
35843
35922
|
e = e.next;
|
|
35844
35923
|
}
|
|
35845
35924
|
}
|
|
@@ -37061,7 +37140,7 @@ function proxy(value) {
|
|
|
37061
37140
|
}
|
|
37062
37141
|
var s = sources.get(prop);
|
|
37063
37142
|
if (s === undefined) {
|
|
37064
|
-
|
|
37143
|
+
with_parent(() => {
|
|
37065
37144
|
var s = state(descriptor.value);
|
|
37066
37145
|
sources.set(prop, s);
|
|
37067
37146
|
return s;
|
|
@@ -39424,11 +39503,9 @@ function _mount(Component, { target, anchor, props = {}, events, context, intro
|
|
|
39424
39503
|
pending: () => {}
|
|
39425
39504
|
},
|
|
39426
39505
|
(anchor_node) => {
|
|
39427
|
-
|
|
39428
|
-
|
|
39429
|
-
|
|
39430
|
-
ctx.c = context;
|
|
39431
|
-
}
|
|
39506
|
+
push({});
|
|
39507
|
+
var ctx = /** @type {ComponentContext} */ (component_context);
|
|
39508
|
+
if (context) ctx.c = context;
|
|
39432
39509
|
|
|
39433
39510
|
if (events) {
|
|
39434
39511
|
// We can't spread the object or else we'd lose the state proxy stuff, if it is one
|
|
@@ -39437,9 +39514,7 @@ function _mount(Component, { target, anchor, props = {}, events, context, intro
|
|
|
39437
39514
|
// @ts-expect-error the public typings are not what the actual function looks like
|
|
39438
39515
|
component = Component(anchor_node, props) || {};
|
|
39439
39516
|
|
|
39440
|
-
|
|
39441
|
-
pop();
|
|
39442
|
-
}
|
|
39517
|
+
pop();
|
|
39443
39518
|
}
|
|
39444
39519
|
);
|
|
39445
39520
|
|
|
@@ -39698,17 +39773,17 @@ class BranchManager {
|
|
|
39698
39773
|
if (defer) {
|
|
39699
39774
|
for (const [k, effect] of this.#onscreen) {
|
|
39700
39775
|
if (k === key) {
|
|
39701
|
-
batch.
|
|
39776
|
+
batch.unskip_effect(effect);
|
|
39702
39777
|
} else {
|
|
39703
|
-
batch.
|
|
39778
|
+
batch.skip_effect(effect);
|
|
39704
39779
|
}
|
|
39705
39780
|
}
|
|
39706
39781
|
|
|
39707
39782
|
for (const [k, branch] of this.#offscreen) {
|
|
39708
39783
|
if (k === key) {
|
|
39709
|
-
batch.
|
|
39784
|
+
batch.unskip_effect(branch.effect);
|
|
39710
39785
|
} else {
|
|
39711
|
-
batch.
|
|
39786
|
+
batch.skip_effect(branch.effect);
|
|
39712
39787
|
}
|
|
39713
39788
|
}
|
|
39714
39789
|
|
|
@@ -39786,11 +39861,9 @@ function init_update_callbacks(context) {
|
|
|
39786
39861
|
|
|
39787
39862
|
/** @import { TemplateNode } from '#client' */
|
|
39788
39863
|
|
|
39789
|
-
// TODO reinstate https://github.com/sveltejs/svelte/pull/15250
|
|
39790
|
-
|
|
39791
39864
|
/**
|
|
39792
39865
|
* @param {TemplateNode} node
|
|
39793
|
-
* @param {(branch: (fn: (anchor: Node) => void,
|
|
39866
|
+
* @param {(branch: (fn: (anchor: Node) => void, key?: number | false) => void) => void} fn
|
|
39794
39867
|
* @param {boolean} [elseif] True if this is an `{:else if ...}` block rather than an `{#if ...}`, as that affects which transitions are considered 'local'
|
|
39795
39868
|
* @returns {void}
|
|
39796
39869
|
*/
|
|
@@ -39800,20 +39873,20 @@ function if_block(node, fn, elseif = false) {
|
|
|
39800
39873
|
var flags = elseif ? EFFECT_TRANSPARENT : 0;
|
|
39801
39874
|
|
|
39802
39875
|
/**
|
|
39803
|
-
* @param {
|
|
39876
|
+
* @param {number | false} key
|
|
39804
39877
|
* @param {null | ((anchor: Node) => void)} fn
|
|
39805
39878
|
*/
|
|
39806
|
-
function update_branch(
|
|
39879
|
+
function update_branch(key, fn) {
|
|
39807
39880
|
|
|
39808
|
-
branches.ensure(
|
|
39881
|
+
branches.ensure(key, fn);
|
|
39809
39882
|
}
|
|
39810
39883
|
|
|
39811
39884
|
block(() => {
|
|
39812
39885
|
var has_branch = false;
|
|
39813
39886
|
|
|
39814
|
-
fn((fn,
|
|
39887
|
+
fn((fn, key = 0) => {
|
|
39815
39888
|
has_branch = true;
|
|
39816
|
-
update_branch(
|
|
39889
|
+
update_branch(key, fn);
|
|
39817
39890
|
});
|
|
39818
39891
|
|
|
39819
39892
|
if (!has_branch) {
|
|
@@ -40008,7 +40081,7 @@ function each(node, flags, get_collection, get_key, render_fn, fallback_fn = nul
|
|
|
40008
40081
|
if (item.i) internal_set(item.i, index);
|
|
40009
40082
|
|
|
40010
40083
|
if (defer) {
|
|
40011
|
-
batch.
|
|
40084
|
+
batch.unskip_effect(item.e);
|
|
40012
40085
|
}
|
|
40013
40086
|
} else {
|
|
40014
40087
|
item = create_item(
|
|
@@ -40041,11 +40114,18 @@ function each(node, flags, get_collection, get_key, render_fn, fallback_fn = nul
|
|
|
40041
40114
|
}
|
|
40042
40115
|
}
|
|
40043
40116
|
|
|
40117
|
+
if (length > keys.size) {
|
|
40118
|
+
{
|
|
40119
|
+
// in prod, the additional information isn't printed, so don't bother computing it
|
|
40120
|
+
each_key_duplicate();
|
|
40121
|
+
}
|
|
40122
|
+
}
|
|
40123
|
+
|
|
40044
40124
|
if (!first_run) {
|
|
40045
40125
|
if (defer) {
|
|
40046
40126
|
for (const [key, item] of items) {
|
|
40047
40127
|
if (!keys.has(key)) {
|
|
40048
|
-
batch.
|
|
40128
|
+
batch.skip_effect(item.e);
|
|
40049
40129
|
}
|
|
40050
40130
|
}
|
|
40051
40131
|
|
|
@@ -42083,9 +42163,9 @@ function Clipboard($$anchor, $$props) {
|
|
|
42083
42163
|
|
|
42084
42164
|
var root_1$6 = from_html(`<div class="paste-section svelte-1hna6ki"><button type="button" class="paste-button svelte-1hna6ki"><!> <span class="svelte-1hna6ki">クリップボードから貼り付け</span></button></div>`);
|
|
42085
42165
|
var root_5$4 = from_html(`<img alt="" loading="lazy" class="svelte-1hna6ki"/>`);
|
|
42086
|
-
var root_4$
|
|
42087
|
-
var root_3$
|
|
42088
|
-
var root_2$
|
|
42166
|
+
var root_4$4 = from_html(`<figure class="svelte-1hna6ki"><div class="img svelte-1hna6ki"><!></div> <figcaption class="svelte-1hna6ki"> </figcaption></figure>`);
|
|
42167
|
+
var root_3$4 = from_html(`<dd class="svelte-1hna6ki"><button type="button" class="svelte-1hna6ki"><!></button></dd>`);
|
|
42168
|
+
var root_2$5 = from_html(`<dt class="svelte-1hna6ki"> </dt> <div class="svelte-1hna6ki"></div>`, 1);
|
|
42089
42169
|
var root$a = from_html(`<div class="block-catalog"><!> <dl class="svelte-1hna6ki"></dl></div>`);
|
|
42090
42170
|
|
|
42091
42171
|
function Block_catalog($$anchor, $$props) {
|
|
@@ -42178,20 +42258,20 @@ function Block_catalog($$anchor, $$props) {
|
|
|
42178
42258
|
var $$array = user_derived(() => to_array(get($$item), 2));
|
|
42179
42259
|
let category = () => get($$array)[0];
|
|
42180
42260
|
let blocks = () => get($$array)[1];
|
|
42181
|
-
var fragment = root_2$
|
|
42261
|
+
var fragment = root_2$5();
|
|
42182
42262
|
var dt = first_child(fragment);
|
|
42183
42263
|
var text$1 = child(dt);
|
|
42184
42264
|
|
|
42185
42265
|
var div_2 = sibling(dt, 2);
|
|
42186
42266
|
|
|
42187
42267
|
each(div_2, 5, blocks, (blockInfo) => category() + blockInfo.label + blockInfo.definition.name, ($$anchor, blockInfo) => {
|
|
42188
|
-
var dd = root_3$
|
|
42268
|
+
var dd = root_3$4();
|
|
42189
42269
|
var button_1 = child(dd);
|
|
42190
42270
|
var node_2 = child(button_1);
|
|
42191
42271
|
|
|
42192
42272
|
{
|
|
42193
42273
|
var consequent_3 = ($$anchor) => {
|
|
42194
|
-
var figure = root_4$
|
|
42274
|
+
var figure = root_4$4();
|
|
42195
42275
|
var div_3 = child(figure);
|
|
42196
42276
|
var node_3 = child(div_3);
|
|
42197
42277
|
|
|
@@ -42207,34 +42287,14 @@ function Block_catalog($$anchor, $$props) {
|
|
|
42207
42287
|
append($$anchor, img);
|
|
42208
42288
|
};
|
|
42209
42289
|
|
|
42210
|
-
var
|
|
42290
|
+
var consequent_2 = ($$anchor) => {
|
|
42211
42291
|
var fragment_1 = comment();
|
|
42212
42292
|
var node_4 = first_child(fragment_1);
|
|
42213
42293
|
|
|
42214
|
-
|
|
42215
|
-
|
|
42216
|
-
|
|
42217
|
-
|
|
42218
|
-
|
|
42219
|
-
html(node_5, () => (
|
|
42220
|
-
get(blockInfo),
|
|
42221
|
-
untrack(() => get(blockInfo).definition.svg)
|
|
42222
|
-
));
|
|
42223
|
-
|
|
42224
|
-
append($$anchor, fragment_2);
|
|
42225
|
-
};
|
|
42226
|
-
|
|
42227
|
-
if_block(
|
|
42228
|
-
node_4,
|
|
42229
|
-
($$render) => {
|
|
42230
|
-
if ((
|
|
42231
|
-
get(blockInfo),
|
|
42232
|
-
untrack(() => get(blockInfo).definition.svg)
|
|
42233
|
-
)) $$render(consequent_2);
|
|
42234
|
-
},
|
|
42235
|
-
true
|
|
42236
|
-
);
|
|
42237
|
-
}
|
|
42294
|
+
html(node_4, () => (
|
|
42295
|
+
get(blockInfo),
|
|
42296
|
+
untrack(() => get(blockInfo).definition.svg)
|
|
42297
|
+
));
|
|
42238
42298
|
|
|
42239
42299
|
append($$anchor, fragment_1);
|
|
42240
42300
|
};
|
|
@@ -42243,7 +42303,10 @@ function Block_catalog($$anchor, $$props) {
|
|
|
42243
42303
|
if ((
|
|
42244
42304
|
get(blockInfo),
|
|
42245
42305
|
untrack(() => get(blockInfo).definition.img)
|
|
42246
|
-
)) $$render(consequent_1); else
|
|
42306
|
+
)) $$render(consequent_1); else if ((
|
|
42307
|
+
get(blockInfo),
|
|
42308
|
+
untrack(() => get(blockInfo).definition.svg)
|
|
42309
|
+
)) $$render(consequent_2, 1);
|
|
42247
42310
|
});
|
|
42248
42311
|
}
|
|
42249
42312
|
|
|
@@ -42253,7 +42316,7 @@ function Block_catalog($$anchor, $$props) {
|
|
|
42253
42316
|
append($$anchor, figure);
|
|
42254
42317
|
};
|
|
42255
42318
|
|
|
42256
|
-
var
|
|
42319
|
+
var alternate = ($$anchor) => {
|
|
42257
42320
|
var text_2 = text();
|
|
42258
42321
|
|
|
42259
42322
|
template_effect(() => set_text(text_2, (get(blockInfo), untrack(() => get(blockInfo).label))));
|
|
@@ -42264,7 +42327,7 @@ function Block_catalog($$anchor, $$props) {
|
|
|
42264
42327
|
if ((
|
|
42265
42328
|
get(blockInfo),
|
|
42266
42329
|
untrack(() => get(blockInfo).definition.img || get(blockInfo).definition.svg)
|
|
42267
|
-
)) $$render(consequent_3); else $$render(
|
|
42330
|
+
)) $$render(consequent_3); else $$render(alternate, false);
|
|
42268
42331
|
});
|
|
42269
42332
|
}
|
|
42270
42333
|
event('click', button_1, () => addBlock(get(blockInfo).definition));
|
|
@@ -42939,17 +43002,17 @@ function Block_menu($$anchor, $$props) {
|
|
|
42939
43002
|
pop();
|
|
42940
43003
|
}
|
|
42941
43004
|
|
|
42942
|
-
var root_2$
|
|
42943
|
-
var root_3$
|
|
42944
|
-
var root_4$
|
|
43005
|
+
var root_2$4 = from_html(`<label><span>コンテナタイプ</span> <output> </output></label>`);
|
|
43006
|
+
var root_3$3 = from_html(`<label><span>コンテナタイプ</span> <select name="bge-options-container-type"><option> </option><option> </option></select></label>`);
|
|
43007
|
+
var root_4$3 = from_html(`<label><span>セマンティック要素</span> <select name="bge-options-frame-semantics"><option>div(汎用)</option><option>ul(順序なしリスト)</option><option>ol(順序ありリスト)</option></select></label>`);
|
|
42945
43008
|
var root_5$2 = from_html(`<div role="radiogroup" aria-labelledby="justify-group"><div id="justify-group">横方向配置</div> <label><input type="radio" name="bge-options-justify" value="center"/><span>中央寄せ</span></label> <label><input type="radio" name="bge-options-justify" value="start"/><span>左寄せ</span></label> <label><input type="radio" name="bge-options-justify" value="end"/><span>右寄せ</span></label> <label><input type="radio" name="bge-options-justify" value="between"/><span>両端寄せ</span></label> <label><input type="radio" name="bge-options-justify" value="around"/><span>要素間余白均等</span></label> <label><input type="radio" name="bge-options-justify" value="evenly"/><span>要素間均等</span></label></div> <div role="radiogroup" aria-labelledby="align-group"><div id="align-group">縦向配置</div> <label><input type="radio" name="bge-options-align" value="align-center"/><span>垂直中央寄せ</span></label> <label><input type="radio" name="bge-options-align" value="align-start"/><span>上寄せ</span></label> <label><input type="radio" name="bge-options-align" value="align-end"/><span>下寄せ</span></label> <label><input type="radio" name="bge-options-align" value="align-stretch"/><span>伸縮</span></label> <label><input type="radio" name="bge-options-align" value="align-baseline"/><span>ベースライン</span></label></div>`, 1);
|
|
42946
43009
|
var root_7$2 = from_html(`<p>このブロックはコンテナタイプを変更できません。</p>`);
|
|
42947
43010
|
var root_8$1 = from_html(`<label><span>基準列数</span> <output> </output> <input name="bge-options-columns" type="range" min="1" max="5"/></label> <label><span>列の自動調整</span> <select name="bge-options-auto-repeat"><option>固定列数</option><option>auto-fill(空白保持)</option><option>auto-fit(空白最小)</option></select></label> <small>規定幅(<code title="CSSカスタムプロパティ: --bge-auto-repeat-base-width に設定されている値"> </code>)を基準に「基準列数: <code> </code>」で割った数値に近い幅を保ちます。「空白保持」は空のスペースを残し、「空白最小」はアイテムの幅を広げます。</small>`, 1);
|
|
42948
43011
|
var root_9$1 = from_html(`<div role="radiogroup" aria-labelledby="float-group"><div id="float-group">回り込み</div> <label><input type="radio" name="bge-options-float" value="start"/><span>左寄せ</span></label> <label><input type="radio" name="bge-options-float" value="end"/><span>右寄せ</span></label></div>`);
|
|
42949
43012
|
var root_1$5 = from_html(`<fieldset><legend>コンテナ特性</legend> <!> <!> <!> <!> <!> <label><input type="checkbox" name="bge-options-linkarea" value="true"/> <span>リンクエリア機能を有効にする</span></label></fieldset>`);
|
|
42950
|
-
var root_12
|
|
42951
|
-
var root_11
|
|
42952
|
-
var root_10
|
|
43013
|
+
var root_12 = from_html(`<option> </option>`);
|
|
43014
|
+
var root_11 = from_html(`<label><span> </span> <select></select></label>`);
|
|
43015
|
+
var root_10 = from_html(`<fieldset><legend>ブロックのスタイル拡張</legend> <!></fieldset>`);
|
|
42953
43016
|
var root$7 = from_html(`<!> <!> <label><span>独自class設定</span> <input type="text" name="bge-options-classes" aria-describedby="block-option-classes-desc"/></label> <small id="block-option-classes-desc">複数指定する場合はスペース(空白文字)で区切ってください。</small> <label><span>ID設定: <code>bge-</code></span> <input name="bge-options-id" type="text" aria-describedby="block-option-id-desc"/></label> <small id="block-option-id-desc">アンカーリンク用のID属性を設定します。実際のIDは<code>bge-</code>が自動的に先頭に付加されます。</small>`, 1);
|
|
42954
43017
|
|
|
42955
43018
|
function Block_options($$anchor, $$props) {
|
|
@@ -43013,7 +43076,7 @@ function Block_options($$anchor, $$props) {
|
|
|
43013
43076
|
|
|
43014
43077
|
{
|
|
43015
43078
|
var consequent = ($$anchor) => {
|
|
43016
|
-
var label = root_2$
|
|
43079
|
+
var label = root_2$4();
|
|
43017
43080
|
var output = sibling(child(label), 2);
|
|
43018
43081
|
var text = child(output);
|
|
43019
43082
|
template_effect(() => set_text(text, `${containerTypeLabel[options.containerProps.type ?? 'inline'] ?? ''} (${options.containerProps.type ?? 'inline' ?? ''})`));
|
|
@@ -43021,7 +43084,7 @@ function Block_options($$anchor, $$props) {
|
|
|
43021
43084
|
};
|
|
43022
43085
|
|
|
43023
43086
|
var alternate = ($$anchor) => {
|
|
43024
|
-
var label_1 = root_3$
|
|
43087
|
+
var label_1 = root_3$3();
|
|
43025
43088
|
var select = sibling(child(label_1), 2);
|
|
43026
43089
|
|
|
43027
43090
|
select.__change = handleContainerTypeChange;
|
|
@@ -43053,7 +43116,7 @@ function Block_options($$anchor, $$props) {
|
|
|
43053
43116
|
|
|
43054
43117
|
{
|
|
43055
43118
|
var consequent_1 = ($$anchor) => {
|
|
43056
|
-
var label_2 = root_4$
|
|
43119
|
+
var label_2 = root_4$3();
|
|
43057
43120
|
var select_1 = sibling(child(label_2), 2);
|
|
43058
43121
|
|
|
43059
43122
|
select_1.__change = handleFrameSemanticsChange;
|
|
@@ -43255,13 +43318,13 @@ function Block_options($$anchor, $$props) {
|
|
|
43255
43318
|
|
|
43256
43319
|
{
|
|
43257
43320
|
var consequent_7 = ($$anchor) => {
|
|
43258
|
-
var fieldset_1 = root_10
|
|
43321
|
+
var fieldset_1 = root_10();
|
|
43259
43322
|
var node_8 = sibling(child(fieldset_1), 2);
|
|
43260
43323
|
|
|
43261
43324
|
each(node_8, 17, () => cssProps, ([, category]) => `bge-options-style-${category.id}`, ($$anchor, $$item) => {
|
|
43262
43325
|
var $$array = user_derived(() => to_array(get($$item), 2));
|
|
43263
43326
|
let category = () => get($$array)[1];
|
|
43264
|
-
var label_19 = root_11
|
|
43327
|
+
var label_19 = root_11();
|
|
43265
43328
|
var span = child(label_19);
|
|
43266
43329
|
var text_6 = child(span);
|
|
43267
43330
|
|
|
@@ -43271,7 +43334,7 @@ function Block_options($$anchor, $$props) {
|
|
|
43271
43334
|
var $$array_1 = user_derived(() => to_array(get($$item), 2));
|
|
43272
43335
|
let propName = () => get($$array_1)[0];
|
|
43273
43336
|
let data = () => get($$array_1)[1];
|
|
43274
|
-
var option_8 = root_12
|
|
43337
|
+
var option_8 = root_12();
|
|
43275
43338
|
var text_7 = child(option_8);
|
|
43276
43339
|
|
|
43277
43340
|
var option_8_value = {};
|
|
@@ -43327,9 +43390,9 @@ function Block_options($$anchor, $$props) {
|
|
|
43327
43390
|
delegate(['change']);
|
|
43328
43391
|
|
|
43329
43392
|
var root_1$4 = from_html(`<span class="svelte-17zpf86">ソース表示</span>`);
|
|
43330
|
-
var root_2$
|
|
43331
|
-
var root_3$
|
|
43332
|
-
var root_4$
|
|
43393
|
+
var root_2$3 = from_html(`<span class="svelte-17zpf86">ソース表示</span>`);
|
|
43394
|
+
var root_3$2 = from_html(`<button type="button" class="svelte-17zpf86">本稿を下書きにコピー</button>`);
|
|
43395
|
+
var root_4$2 = from_html(`<button type="button" class="svelte-17zpf86">下書きを本稿にコピー</button>`);
|
|
43333
43396
|
var root$6 = from_html(`<div class="draft-btn svelte-17zpf86"><div class="draft-tab-btn svelte-17zpf86"><button type="button" class="svelte-17zpf86">本稿モード <!></button> <button type="button" class="svelte-17zpf86">下書きモード <!></button></div> <div class="draft-copy-btn svelte-17zpf86"><!></div></div>`);
|
|
43334
43397
|
|
|
43335
43398
|
function Draft_switcher($$anchor, $$props) {
|
|
@@ -43441,7 +43504,7 @@ function Draft_switcher($$anchor, $$props) {
|
|
|
43441
43504
|
|
|
43442
43505
|
{
|
|
43443
43506
|
var consequent_1 = ($$anchor) => {
|
|
43444
|
-
var span_1 = root_2$
|
|
43507
|
+
var span_1 = root_2$3();
|
|
43445
43508
|
|
|
43446
43509
|
append($$anchor, span_1);
|
|
43447
43510
|
};
|
|
@@ -43456,14 +43519,14 @@ function Draft_switcher($$anchor, $$props) {
|
|
|
43456
43519
|
|
|
43457
43520
|
{
|
|
43458
43521
|
var consequent_2 = ($$anchor) => {
|
|
43459
|
-
var button_2 = root_3$
|
|
43522
|
+
var button_2 = root_3$2();
|
|
43460
43523
|
|
|
43461
43524
|
event('click', button_2, onClickMainToDraft);
|
|
43462
43525
|
append($$anchor, button_2);
|
|
43463
43526
|
};
|
|
43464
43527
|
|
|
43465
43528
|
var alternate = ($$anchor) => {
|
|
43466
|
-
var button_3 = root_4$
|
|
43529
|
+
var button_3 = root_4$2();
|
|
43467
43530
|
|
|
43468
43531
|
event('click', button_3, onClickDraftToMain);
|
|
43469
43532
|
append($$anchor, button_3);
|
|
@@ -43742,7 +43805,7 @@ function getExt(src) {
|
|
|
43742
43805
|
}
|
|
43743
43806
|
|
|
43744
43807
|
var root_1$3 = from_html(`<img alt="画像のプレビュー" loading="lazy" class="svelte-by6cmj"/>`);
|
|
43745
|
-
var
|
|
43808
|
+
var root_2$2 = from_html(`<video playsinline="" class="svelte-by6cmj"><source/> <track kind="captions" src=""/> <!></video>`, 2);
|
|
43746
43809
|
var root$5 = from_html(`<span data-bge-editor-ui-component="thumbnail" class="svelte-by6cmj"><!></span>`);
|
|
43747
43810
|
|
|
43748
43811
|
function Thumbnail($$anchor, $$props) {
|
|
@@ -43766,152 +43829,50 @@ function Thumbnail($$anchor, $$props) {
|
|
|
43766
43829
|
append($$anchor, img);
|
|
43767
43830
|
};
|
|
43768
43831
|
|
|
43769
|
-
var
|
|
43770
|
-
var
|
|
43771
|
-
var node_1 = first_child(fragment);
|
|
43772
|
-
|
|
43773
|
-
{
|
|
43774
|
-
var consequent_1 = ($$anchor) => {
|
|
43775
|
-
var video = root_3$2();
|
|
43832
|
+
var consequent_1 = ($$anchor) => {
|
|
43833
|
+
var video = root_2$2();
|
|
43776
43834
|
|
|
43777
|
-
|
|
43835
|
+
video.controls = false;
|
|
43778
43836
|
|
|
43779
|
-
|
|
43780
|
-
|
|
43837
|
+
var source = child(video);
|
|
43838
|
+
var node_1 = sibling(source, 4);
|
|
43781
43839
|
|
|
43782
|
-
|
|
43840
|
+
Video(node_1, {});
|
|
43783
43841
|
|
|
43784
|
-
|
|
43785
|
-
|
|
43786
|
-
|
|
43787
|
-
|
|
43788
|
-
|
|
43789
|
-
append($$anchor, video);
|
|
43790
|
-
};
|
|
43791
|
-
|
|
43792
|
-
var alternate_5 = ($$anchor) => {
|
|
43793
|
-
var fragment_1 = comment();
|
|
43794
|
-
var node_3 = first_child(fragment_1);
|
|
43842
|
+
template_effect(() => {
|
|
43843
|
+
set_attribute(source, 'src', src());
|
|
43844
|
+
set_attribute(source, 'type', (untrack(() => `video/${file.ext}`)));
|
|
43845
|
+
});
|
|
43795
43846
|
|
|
43796
|
-
|
|
43797
|
-
|
|
43798
|
-
Headphones($$anchor, {});
|
|
43799
|
-
};
|
|
43847
|
+
append($$anchor, video);
|
|
43848
|
+
};
|
|
43800
43849
|
|
|
43801
|
-
|
|
43802
|
-
|
|
43803
|
-
|
|
43804
|
-
|
|
43805
|
-
{
|
|
43806
|
-
var consequent_3 = ($$anchor) => {
|
|
43807
|
-
File_type_doc($$anchor, {});
|
|
43808
|
-
};
|
|
43809
|
-
|
|
43810
|
-
var alternate_3 = ($$anchor) => {
|
|
43811
|
-
var fragment_5 = comment();
|
|
43812
|
-
var node_5 = first_child(fragment_5);
|
|
43813
|
-
|
|
43814
|
-
{
|
|
43815
|
-
var consequent_4 = ($$anchor) => {
|
|
43816
|
-
File_type_ppt($$anchor, {});
|
|
43817
|
-
};
|
|
43818
|
-
|
|
43819
|
-
var alternate_2 = ($$anchor) => {
|
|
43820
|
-
var fragment_7 = comment();
|
|
43821
|
-
var node_6 = first_child(fragment_7);
|
|
43822
|
-
|
|
43823
|
-
{
|
|
43824
|
-
var consequent_5 = ($$anchor) => {
|
|
43825
|
-
File_type_xls($$anchor, {});
|
|
43826
|
-
};
|
|
43827
|
-
|
|
43828
|
-
var alternate_1 = ($$anchor) => {
|
|
43829
|
-
var fragment_9 = comment();
|
|
43830
|
-
var node_7 = first_child(fragment_9);
|
|
43831
|
-
|
|
43832
|
-
{
|
|
43833
|
-
var consequent_6 = ($$anchor) => {
|
|
43834
|
-
File_type_pdf($$anchor, {});
|
|
43835
|
-
};
|
|
43836
|
-
|
|
43837
|
-
var alternate = ($$anchor) => {
|
|
43838
|
-
File($$anchor, {});
|
|
43839
|
-
};
|
|
43840
|
-
|
|
43841
|
-
if_block(
|
|
43842
|
-
node_7,
|
|
43843
|
-
($$render) => {
|
|
43844
|
-
if ((untrack(() => file.isPdf))) $$render(consequent_6); else $$render(alternate, false);
|
|
43845
|
-
},
|
|
43846
|
-
true
|
|
43847
|
-
);
|
|
43848
|
-
}
|
|
43849
|
-
|
|
43850
|
-
append($$anchor, fragment_9);
|
|
43851
|
-
};
|
|
43852
|
-
|
|
43853
|
-
if_block(
|
|
43854
|
-
node_6,
|
|
43855
|
-
($$render) => {
|
|
43856
|
-
if ((untrack(() => file.isXls))) $$render(consequent_5); else $$render(alternate_1, false);
|
|
43857
|
-
},
|
|
43858
|
-
true
|
|
43859
|
-
);
|
|
43860
|
-
}
|
|
43861
|
-
|
|
43862
|
-
append($$anchor, fragment_7);
|
|
43863
|
-
};
|
|
43864
|
-
|
|
43865
|
-
if_block(
|
|
43866
|
-
node_5,
|
|
43867
|
-
($$render) => {
|
|
43868
|
-
if ((untrack(() => file.isPpt))) $$render(consequent_4); else $$render(alternate_2, false);
|
|
43869
|
-
},
|
|
43870
|
-
true
|
|
43871
|
-
);
|
|
43872
|
-
}
|
|
43873
|
-
|
|
43874
|
-
append($$anchor, fragment_5);
|
|
43875
|
-
};
|
|
43876
|
-
|
|
43877
|
-
if_block(
|
|
43878
|
-
node_4,
|
|
43879
|
-
($$render) => {
|
|
43880
|
-
if ((untrack(() => file.isDoc))) $$render(consequent_3); else $$render(alternate_3, false);
|
|
43881
|
-
},
|
|
43882
|
-
true
|
|
43883
|
-
);
|
|
43884
|
-
}
|
|
43850
|
+
var consequent_2 = ($$anchor) => {
|
|
43851
|
+
Headphones($$anchor, {});
|
|
43852
|
+
};
|
|
43885
43853
|
|
|
43886
|
-
|
|
43887
|
-
|
|
43854
|
+
var consequent_3 = ($$anchor) => {
|
|
43855
|
+
File_type_doc($$anchor, {});
|
|
43856
|
+
};
|
|
43888
43857
|
|
|
43889
|
-
|
|
43890
|
-
|
|
43891
|
-
|
|
43892
|
-
if ((untrack(() => file.isAudio))) $$render(consequent_2); else $$render(alternate_4, false);
|
|
43893
|
-
},
|
|
43894
|
-
true
|
|
43895
|
-
);
|
|
43896
|
-
}
|
|
43858
|
+
var consequent_4 = ($$anchor) => {
|
|
43859
|
+
File_type_ppt($$anchor, {});
|
|
43860
|
+
};
|
|
43897
43861
|
|
|
43898
|
-
|
|
43899
|
-
|
|
43862
|
+
var consequent_5 = ($$anchor) => {
|
|
43863
|
+
File_type_xls($$anchor, {});
|
|
43864
|
+
};
|
|
43900
43865
|
|
|
43901
|
-
|
|
43902
|
-
|
|
43903
|
-
|
|
43904
|
-
if ((untrack(() => file.isVideo))) $$render(consequent_1); else $$render(alternate_5, false);
|
|
43905
|
-
},
|
|
43906
|
-
true
|
|
43907
|
-
);
|
|
43908
|
-
}
|
|
43866
|
+
var consequent_6 = ($$anchor) => {
|
|
43867
|
+
File_type_pdf($$anchor, {});
|
|
43868
|
+
};
|
|
43909
43869
|
|
|
43910
|
-
|
|
43870
|
+
var alternate = ($$anchor) => {
|
|
43871
|
+
File($$anchor, {});
|
|
43911
43872
|
};
|
|
43912
43873
|
|
|
43913
43874
|
if_block(node, ($$render) => {
|
|
43914
|
-
if ((untrack(() => file.isImage))) $$render(consequent); else $$render(
|
|
43875
|
+
if ((untrack(() => file.isImage))) $$render(consequent); else if ((untrack(() => file.isVideo))) $$render(consequent_1, 1); else if ((untrack(() => file.isAudio))) $$render(consequent_2, 2); else if ((untrack(() => file.isDoc))) $$render(consequent_3, 3); else if ((untrack(() => file.isPpt))) $$render(consequent_4, 4); else if ((untrack(() => file.isXls))) $$render(consequent_5, 5); else if ((untrack(() => file.isPdf))) $$render(consequent_6, 6); else $$render(alternate, false);
|
|
43915
43876
|
});
|
|
43916
43877
|
}
|
|
43917
43878
|
template_effect(() => set_attribute(span, 'data-loaded', get(isLoaded)));
|
|
@@ -43920,11 +43881,11 @@ function Thumbnail($$anchor, $$props) {
|
|
|
43920
43881
|
}
|
|
43921
43882
|
|
|
43922
43883
|
var root_3$1 = from_html(`<mark class="svelte-6hu200"> </mark>`);
|
|
43923
|
-
var root_2 = from_html(`<!> `, 1);
|
|
43884
|
+
var root_2$1 = from_html(`<!> `, 1);
|
|
43924
43885
|
var root_5$1 = from_html(`<span class="svelte-6hu200">アップロード中... <span class="svelte-6hu200"> </span></span>`);
|
|
43925
|
-
var root_6 = from_html(`<span class="attr svelte-6hu200"><span class="svelte-6hu200">ID</span><span class="svelte-6hu200"><!></span> <span class="svelte-6hu200">名称</span><span class="svelte-6hu200"><!></span> <span class="svelte-6hu200">更新</span><span class="svelte-6hu200"> </span> <span class="svelte-6hu200">サイズ</span><span class="svelte-6hu200"> </span></span>`);
|
|
43886
|
+
var root_6$1 = from_html(`<span class="attr svelte-6hu200"><span class="svelte-6hu200">ID</span><span class="svelte-6hu200"><!></span> <span class="svelte-6hu200">名称</span><span class="svelte-6hu200"><!></span> <span class="svelte-6hu200">更新</span><span class="svelte-6hu200"> </span> <span class="svelte-6hu200">サイズ</span><span class="svelte-6hu200"> </span></span>`);
|
|
43926
43887
|
var root_7$1 = from_html(`<button class="delete svelte-6hu200" type="button">削除</button>`);
|
|
43927
|
-
var root_4 = from_html(`<li class="svelte-6hu200"><button class="file svelte-6hu200" type="button"><span class="thumbnail svelte-6hu200"><!></span> <!></button> <!></li>`);
|
|
43888
|
+
var root_4$1 = from_html(`<li class="svelte-6hu200"><button class="file svelte-6hu200" type="button"><span class="thumbnail svelte-6hu200"><!></span> <!></button> <!></li>`);
|
|
43928
43889
|
var root$4 = from_html(`<div class="ctrl svelte-6hu200"><div class="pagination svelte-6hu200"><button type="button" class="svelte-6hu200">前へ</button> <div class="page svelte-6hu200"><span><input type="number" min="1" aria-label="ページ番号"/></span> <span>/</span> <span> </span></div> <button type="button" class="svelte-6hu200">次へ</button></div> <input type="search" placeholder="検索"/></div> <ul class="list svelte-6hu200"></ul>`, 1);
|
|
43929
43890
|
|
|
43930
43891
|
function File_list($$anchor, $$props) {
|
|
@@ -43953,7 +43914,7 @@ function File_list($$anchor, $$props) {
|
|
|
43953
43914
|
var node = first_child(fragment);
|
|
43954
43915
|
|
|
43955
43916
|
each(node, 3, chars, (char, i) => char + i, ($$anchor, char, i) => {
|
|
43956
|
-
var fragment_1 = root_2();
|
|
43917
|
+
var fragment_1 = root_2$1();
|
|
43957
43918
|
var node_1 = first_child(fragment_1);
|
|
43958
43919
|
|
|
43959
43920
|
{
|
|
@@ -44136,7 +44097,7 @@ function File_list($$anchor, $$props) {
|
|
|
44136
44097
|
var ul = sibling(div, 2);
|
|
44137
44098
|
|
|
44138
44099
|
each(ul, 5, () => get(fileList), (file) => file.url, ($$anchor, file) => {
|
|
44139
|
-
var li = root_4();
|
|
44100
|
+
var li = root_4$1();
|
|
44140
44101
|
var button_2 = child(li);
|
|
44141
44102
|
var span_2 = child(button_2);
|
|
44142
44103
|
var node_2 = child(span_2);
|
|
@@ -44166,8 +44127,13 @@ function File_list($$anchor, $$props) {
|
|
|
44166
44127
|
append($$anchor, span_3);
|
|
44167
44128
|
};
|
|
44168
44129
|
|
|
44130
|
+
var d = user_derived(() => (
|
|
44131
|
+
get(file),
|
|
44132
|
+
untrack(() => get(file).url.startsWith('blob:'))
|
|
44133
|
+
));
|
|
44134
|
+
|
|
44169
44135
|
var alternate = ($$anchor) => {
|
|
44170
|
-
var span_5 = root_6();
|
|
44136
|
+
var span_5 = root_6$1();
|
|
44171
44137
|
var span_6 = sibling(child(span_5));
|
|
44172
44138
|
var node_4 = child(span_6);
|
|
44173
44139
|
|
|
@@ -44224,10 +44190,7 @@ function File_list($$anchor, $$props) {
|
|
|
44224
44190
|
};
|
|
44225
44191
|
|
|
44226
44192
|
if_block(node_3, ($$render) => {
|
|
44227
|
-
if ((
|
|
44228
|
-
get(file),
|
|
44229
|
-
untrack(() => get(file).url.startsWith('blob:'))
|
|
44230
|
-
)) $$render(consequent_1); else $$render(alternate, false);
|
|
44193
|
+
if (get(d)) $$render(consequent_1); else $$render(alternate, false);
|
|
44231
44194
|
});
|
|
44232
44195
|
}
|
|
44233
44196
|
|
|
@@ -44241,11 +44204,13 @@ function File_list($$anchor, $$props) {
|
|
|
44241
44204
|
append($$anchor, button_3);
|
|
44242
44205
|
};
|
|
44243
44206
|
|
|
44207
|
+
var d_1 = user_derived(() => (
|
|
44208
|
+
get(file),
|
|
44209
|
+
untrack(() => !get(file).url.startsWith('blob:') && deleteFile)
|
|
44210
|
+
));
|
|
44211
|
+
|
|
44244
44212
|
if_block(node_6, ($$render) => {
|
|
44245
|
-
if ((
|
|
44246
|
-
get(file),
|
|
44247
|
-
untrack(() => !get(file).url.startsWith('blob:') && deleteFile)
|
|
44248
|
-
)) $$render(consequent_2);
|
|
44213
|
+
if (get(d_1)) $$render(consequent_2);
|
|
44249
44214
|
});
|
|
44250
44215
|
}
|
|
44251
44216
|
|
|
@@ -44340,14 +44305,14 @@ function File_uploader($$anchor, $$props) {
|
|
|
44340
44305
|
}
|
|
44341
44306
|
|
|
44342
44307
|
var root_1$2 = from_html(`<img alt="画像プレビュー" class="svelte-1sdkkhr"/>`);
|
|
44343
|
-
var
|
|
44344
|
-
var
|
|
44345
|
-
var
|
|
44346
|
-
var
|
|
44347
|
-
var
|
|
44348
|
-
var
|
|
44349
|
-
var
|
|
44350
|
-
var
|
|
44308
|
+
var root_2 = from_html(`<video controls="" playsinline="" class="svelte-1sdkkhr"><source/> <track kind="captions" src=""/></video>`, 2);
|
|
44309
|
+
var root_3 = from_html(`<audio controls="" class="svelte-1sdkkhr"><source/> <track kind="metadata" src=""/></audio>`);
|
|
44310
|
+
var root_4 = from_html(`<object class="svelte-1sdkkhr"><p class="svelte-1sdkkhr">プレビューできません</p></object>`);
|
|
44311
|
+
var root_5 = from_html(`<p class="svelte-1sdkkhr">プレビューできません</p>`);
|
|
44312
|
+
var root_6 = from_html(`<div class="progress svelte-1sdkkhr"></div>`);
|
|
44313
|
+
var root_7 = from_html(`<li class="upload svelte-1sdkkhr"><span>アップロード...</span> <span class="progress svelte-1sdkkhr"> </span></li>`);
|
|
44314
|
+
var root_8 = from_html(`<li class="path svelte-1sdkkhr"><a target="_blank" class="svelte-1sdkkhr"> </a></li>`);
|
|
44315
|
+
var root_9 = from_html(`<li class="dimension svelte-1sdkkhr"> </li>`);
|
|
44351
44316
|
var root$2 = from_html(`<div><div><!> <!></div> <ul class="svelte-1sdkkhr"><!> <!></ul></div>`);
|
|
44352
44317
|
|
|
44353
44318
|
function Preview($$anchor, $$props) {
|
|
@@ -44427,134 +44392,83 @@ function Preview($$anchor, $$props) {
|
|
|
44427
44392
|
append($$anchor, img);
|
|
44428
44393
|
};
|
|
44429
44394
|
|
|
44430
|
-
var
|
|
44431
|
-
var
|
|
44432
|
-
var
|
|
44433
|
-
|
|
44434
|
-
{
|
|
44435
|
-
var consequent_1 = ($$anchor) => {
|
|
44436
|
-
var video_1 = root_3();
|
|
44437
|
-
var source = child(video_1);
|
|
44395
|
+
var consequent_1 = ($$anchor) => {
|
|
44396
|
+
var video_1 = root_2();
|
|
44397
|
+
var source = child(video_1);
|
|
44438
44398
|
|
|
44439
|
-
|
|
44440
|
-
|
|
44441
|
-
|
|
44442
|
-
|
|
44399
|
+
template_effect(() => {
|
|
44400
|
+
set_attribute(source, 'src', get(selectedPath));
|
|
44401
|
+
set_attribute(source, 'type', (get(file), untrack(() => `video/${get(file).ext}`)));
|
|
44402
|
+
});
|
|
44443
44403
|
|
|
44444
|
-
|
|
44445
|
-
|
|
44404
|
+
append($$anchor, video_1);
|
|
44405
|
+
};
|
|
44446
44406
|
|
|
44447
|
-
|
|
44448
|
-
|
|
44449
|
-
|
|
44407
|
+
var consequent_2 = ($$anchor) => {
|
|
44408
|
+
var audio = root_3();
|
|
44409
|
+
var source_1 = child(audio);
|
|
44450
44410
|
|
|
44451
|
-
|
|
44452
|
-
|
|
44453
|
-
|
|
44454
|
-
|
|
44411
|
+
template_effect(() => {
|
|
44412
|
+
set_attribute(source_1, 'src', get(selectedPath));
|
|
44413
|
+
set_attribute(source_1, 'type', (get(file), untrack(() => `audio/${get(file).ext}`)));
|
|
44414
|
+
});
|
|
44455
44415
|
|
|
44456
|
-
|
|
44457
|
-
|
|
44458
|
-
set_attribute(source_1, 'type', (get(file), untrack(() => `audio/${get(file).ext}`)));
|
|
44459
|
-
});
|
|
44416
|
+
append($$anchor, audio);
|
|
44417
|
+
};
|
|
44460
44418
|
|
|
44461
|
-
|
|
44462
|
-
|
|
44419
|
+
var consequent_3 = ($$anchor) => {
|
|
44420
|
+
var object = root_4();
|
|
44463
44421
|
|
|
44464
|
-
|
|
44465
|
-
|
|
44466
|
-
var node_3 = first_child(fragment_2);
|
|
44467
|
-
|
|
44468
|
-
{
|
|
44469
|
-
var consequent_3 = ($$anchor) => {
|
|
44470
|
-
var object = root_7();
|
|
44471
|
-
|
|
44472
|
-
template_effect(() => {
|
|
44473
|
-
set_attribute(object, 'data', get(selectedPath));
|
|
44474
|
-
|
|
44475
|
-
set_attribute(object, 'type', (
|
|
44476
|
-
get(file),
|
|
44477
|
-
untrack(() => `application/${get(file).ext}`)
|
|
44478
|
-
));
|
|
44479
|
-
|
|
44480
|
-
set_attribute(object, 'title', (get(file), untrack(() => `${get(file).ext}ファイルのプレビュー`)));
|
|
44481
|
-
});
|
|
44482
|
-
|
|
44483
|
-
append($$anchor, object);
|
|
44484
|
-
};
|
|
44485
|
-
|
|
44486
|
-
var alternate = ($$anchor) => {
|
|
44487
|
-
var p = root_8();
|
|
44488
|
-
|
|
44489
|
-
append($$anchor, p);
|
|
44490
|
-
};
|
|
44491
|
-
|
|
44492
|
-
if_block(
|
|
44493
|
-
node_3,
|
|
44494
|
-
($$render) => {
|
|
44495
|
-
if ((
|
|
44496
|
-
get(file),
|
|
44497
|
-
untrack(() => get(file)?.isDoc || get(file)?.isPpt || get(file)?.isXls || get(file)?.isPdf)
|
|
44498
|
-
)) $$render(consequent_3); else $$render(alternate, false);
|
|
44499
|
-
},
|
|
44500
|
-
true
|
|
44501
|
-
);
|
|
44502
|
-
}
|
|
44422
|
+
template_effect(() => {
|
|
44423
|
+
set_attribute(object, 'data', get(selectedPath));
|
|
44503
44424
|
|
|
44504
|
-
|
|
44505
|
-
|
|
44425
|
+
set_attribute(object, 'type', (
|
|
44426
|
+
get(file),
|
|
44427
|
+
untrack(() => `application/${get(file).ext}`)
|
|
44428
|
+
));
|
|
44506
44429
|
|
|
44507
|
-
|
|
44508
|
-
|
|
44509
|
-
($$render) => {
|
|
44510
|
-
if ((get(file), untrack(() => get(file)?.isAudio))) $$render(consequent_2); else $$render(alternate_1, false);
|
|
44511
|
-
},
|
|
44512
|
-
true
|
|
44513
|
-
);
|
|
44514
|
-
}
|
|
44430
|
+
set_attribute(object, 'title', (get(file), untrack(() => `${get(file).ext}ファイルのプレビュー`)));
|
|
44431
|
+
});
|
|
44515
44432
|
|
|
44516
|
-
|
|
44517
|
-
|
|
44433
|
+
append($$anchor, object);
|
|
44434
|
+
};
|
|
44518
44435
|
|
|
44519
|
-
|
|
44520
|
-
|
|
44521
|
-
($$render) => {
|
|
44522
|
-
if ((get(file), untrack(() => get(file)?.isVideo))) $$render(consequent_1); else $$render(alternate_2, false);
|
|
44523
|
-
},
|
|
44524
|
-
true
|
|
44525
|
-
);
|
|
44526
|
-
}
|
|
44436
|
+
var alternate = ($$anchor) => {
|
|
44437
|
+
var p = root_5();
|
|
44527
44438
|
|
|
44528
|
-
append($$anchor,
|
|
44439
|
+
append($$anchor, p);
|
|
44529
44440
|
};
|
|
44530
44441
|
|
|
44531
44442
|
if_block(node, ($$render) => {
|
|
44532
|
-
if ((get(file), untrack(() => get(file)?.isImage))) $$render(consequent); else $$render(
|
|
44443
|
+
if ((get(file), untrack(() => get(file)?.isImage))) $$render(consequent); else if ((get(file), untrack(() => get(file)?.isVideo))) $$render(consequent_1, 1); else if ((get(file), untrack(() => get(file)?.isAudio))) $$render(consequent_2, 2); else if ((
|
|
44444
|
+
get(file),
|
|
44445
|
+
untrack(() => get(file)?.isDoc || get(file)?.isPpt || get(file)?.isXls || get(file)?.isPdf)
|
|
44446
|
+
)) $$render(consequent_3, 3); else $$render(alternate, false);
|
|
44533
44447
|
});
|
|
44534
44448
|
}
|
|
44535
44449
|
|
|
44536
|
-
var
|
|
44450
|
+
var node_1 = sibling(node, 2);
|
|
44537
44451
|
|
|
44538
44452
|
{
|
|
44539
44453
|
var consequent_4 = ($$anchor) => {
|
|
44540
|
-
var div_2 =
|
|
44454
|
+
var div_2 = root_6();
|
|
44541
44455
|
let styles;
|
|
44542
44456
|
|
|
44543
44457
|
template_effect(() => styles = set_style(div_2, '', styles, { translate: `${get(uploaded) / get(total) * 100}%` }));
|
|
44544
44458
|
append($$anchor, div_2);
|
|
44545
44459
|
};
|
|
44546
44460
|
|
|
44547
|
-
if_block(
|
|
44461
|
+
if_block(node_1, ($$render) => {
|
|
44548
44462
|
if (get(isUploadingMode)) $$render(consequent_4);
|
|
44549
44463
|
});
|
|
44550
44464
|
}
|
|
44551
44465
|
|
|
44552
44466
|
var ul = sibling(div_1, 2);
|
|
44553
|
-
var
|
|
44467
|
+
var node_2 = child(ul);
|
|
44554
44468
|
|
|
44555
44469
|
{
|
|
44556
44470
|
var consequent_5 = ($$anchor) => {
|
|
44557
|
-
var li =
|
|
44471
|
+
var li = root_7();
|
|
44558
44472
|
var span = sibling(child(li), 2);
|
|
44559
44473
|
var text = child(span);
|
|
44560
44474
|
|
|
@@ -44569,8 +44483,8 @@ function Preview($$anchor, $$props) {
|
|
|
44569
44483
|
append($$anchor, li);
|
|
44570
44484
|
};
|
|
44571
44485
|
|
|
44572
|
-
var
|
|
44573
|
-
var li_1 =
|
|
44486
|
+
var alternate_1 = ($$anchor) => {
|
|
44487
|
+
var li_1 = root_8();
|
|
44574
44488
|
var a = child(li_1);
|
|
44575
44489
|
var text_1 = child(a);
|
|
44576
44490
|
|
|
@@ -44582,27 +44496,29 @@ function Preview($$anchor, $$props) {
|
|
|
44582
44496
|
append($$anchor, li_1);
|
|
44583
44497
|
};
|
|
44584
44498
|
|
|
44585
|
-
if_block(
|
|
44586
|
-
if (get(isUploadingMode)) $$render(consequent_5); else $$render(
|
|
44499
|
+
if_block(node_2, ($$render) => {
|
|
44500
|
+
if (get(isUploadingMode)) $$render(consequent_5); else $$render(alternate_1, false);
|
|
44587
44501
|
});
|
|
44588
44502
|
}
|
|
44589
44503
|
|
|
44590
|
-
var
|
|
44504
|
+
var node_3 = sibling(node_2, 2);
|
|
44591
44505
|
|
|
44592
44506
|
{
|
|
44593
44507
|
var consequent_6 = ($$anchor) => {
|
|
44594
|
-
var li_2 =
|
|
44508
|
+
var li_2 = root_9();
|
|
44595
44509
|
var text_2 = child(li_2);
|
|
44596
44510
|
template_effect(() => set_text(text_2, `${get(width) ?? ''}x${get(height) ?? ''}`));
|
|
44597
44511
|
append($$anchor, li_2);
|
|
44598
44512
|
};
|
|
44599
44513
|
|
|
44600
|
-
|
|
44601
|
-
|
|
44602
|
-
|
|
44603
|
-
|
|
44604
|
-
|
|
44605
|
-
|
|
44514
|
+
var d = user_derived(() => (
|
|
44515
|
+
get(width),
|
|
44516
|
+
get(height),
|
|
44517
|
+
untrack(() => !Number.isNaN(get(width)) && !Number.isNaN(get(height)))
|
|
44518
|
+
));
|
|
44519
|
+
|
|
44520
|
+
if_block(node_3, ($$render) => {
|
|
44521
|
+
if (get(d)) $$render(consequent_6);
|
|
44606
44522
|
});
|
|
44607
44523
|
}
|
|
44608
44524
|
template_effect(() => classes = set_class(div_1, 1, 'img svelte-1sdkkhr', null, classes, { uploading: get(isUploadingMode) }));
|
|
@@ -44918,7 +44834,7 @@ function parseConfig(config) {
|
|
|
44918
44834
|
}
|
|
44919
44835
|
}
|
|
44920
44836
|
|
|
44921
|
-
const version = "4.0.0-alpha.
|
|
44837
|
+
const version = "4.0.0-alpha.58";
|
|
44922
44838
|
function attachDraftSwitcher(engine) {
|
|
44923
44839
|
if (engine.hasDraft()) {
|
|
44924
44840
|
const container = document.createElement("div");
|