generated from smyalygames/quartz

Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / publish-tag (push) Waiting to run
Docker build & push image / build (push) Waiting to run
3166 lines
962 KiB
JavaScript
3166 lines
962 KiB
JavaScript
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import sourceMapSupport from"source-map-support";import path12 from"path";import chalk from"chalk";import pretty from"pretty-time";var PerfTimer=class{static{__name(this,"PerfTimer")}evts;constructor(){this.evts={},this.addEvent("start")}addEvent(evtName){this.evts[evtName]=process.hrtime()}timeSince(evtName){return chalk.yellow(pretty(process.hrtime(this.evts[evtName??"start"])))}};import{rimraf}from"rimraf";import{isGitIgnored}from"globby";import chalk6 from"chalk";import esbuild from"esbuild";import remarkParse from"remark-parse";import remarkRehype from"remark-rehype";import{unified}from"unified";import{read}from"to-vfile";import{slug as slugAnchor}from"github-slugger";import rfdc from"rfdc";var clone=rfdc(),QUARTZ="quartz";function isRelativeURL(s){let validStart=/^\.{1,2}/.test(s),validEnding=!endsWith(s,"index");return validStart&&validEnding&&![".md",".html"].includes(_getFileExtension(s)??"")}__name(isRelativeURL,"isRelativeURL");function sluggify(s){return s.split("/").map(segment=>segment.replace(/\s/g,"-").replace(/&/g,"-and-").replace(/%/g,"-percent").replace(/\?/g,"").replace(/#/g,"")).join("/").replace(/\/$/,"")}__name(sluggify,"sluggify");function slugifyFilePath(fp,excludeExt){fp=stripSlashes(fp);let ext=_getFileExtension(fp),withoutFileExt=fp.replace(new RegExp(ext+"$"),"");(excludeExt||[".md",".html",void 0].includes(ext))&&(ext="");let slug=sluggify(withoutFileExt);return endsWith(slug,"_index")&&(slug=slug.replace(/_index$/,"index")),slug+ext}__name(slugifyFilePath,"slugifyFilePath");function simplifySlug(fp){let res=stripSlashes(trimSuffix(fp,"index"),!0);return res.length===0?"/":res}__name(simplifySlug,"simplifySlug");function transformInternalLink(link){let[fplike,anchor]=splitAnchor(decodeURI(link)),folderPath=isFolderPath(fplike),segments=fplike.split("/").filter(x=>x.length>0),prefix=segments.filter(isRelativeSegment).join("/"),fp=segments.filter(seg=>!isRelativeSegment(seg)&&seg!=="").join("/"),simpleSlug=simplifySlug(slugifyFilePath(fp)),joined=joinSegments(stripSlashes(prefix),stripSlashes(simpleSlug)),trail=folderPath?"/":"";return _addRelativeToStart(joined)+trail+anchor}__name(transformInternalLink,"transformInternalLink");var _rebaseHastElement=__name((el,attr,curBase,newBase)=>{if(el.properties?.[attr]){if(!isRelativeURL(String(el.properties[attr])))return;let rel=joinSegments(resolveRelative(curBase,newBase),"..",el.properties[attr]);el.properties[attr]=rel}},"_rebaseHastElement");function normalizeHastElement(rawEl,curBase,newBase){let el=clone(rawEl);return _rebaseHastElement(el,"src",curBase,newBase),_rebaseHastElement(el,"href",curBase,newBase),el.children&&(el.children=el.children.map(child=>normalizeHastElement(child,curBase,newBase))),el}__name(normalizeHastElement,"normalizeHastElement");function pathToRoot(slug){let rootPath=slug.split("/").filter(x=>x!=="").slice(0,-1).map(_=>"..").join("/");return rootPath.length===0&&(rootPath="."),rootPath}__name(pathToRoot,"pathToRoot");function resolveRelative(current,target){return joinSegments(pathToRoot(current),simplifySlug(target))}__name(resolveRelative,"resolveRelative");function splitAnchor(link){let[fp,anchor]=link.split("#",2);return fp.endsWith(".pdf")?[fp,anchor===void 0?"":`#${anchor}`]:(anchor=anchor===void 0?"":"#"+slugAnchor(anchor),[fp,anchor])}__name(splitAnchor,"splitAnchor");function slugTag(tag){return tag.split("/").map(tagSegment=>sluggify(tagSegment)).join("/")}__name(slugTag,"slugTag");function joinSegments(...args){if(args.length===0)return"";let joined=args.filter(segment=>segment!==""&&segment!=="/").map(segment=>stripSlashes(segment)).join("/");return args[0].startsWith("/")&&(joined="/"+joined),args[args.length-1].endsWith("/")&&(joined=joined+"/"),joined}__name(joinSegments,"joinSegments");function getAllSegmentPrefixes(tags){let segments=tags.split("/"),results=[];for(let i=0;i<segments.length;i++)results.push(segments.slice(0,i+1).join("/"));return results}__name(getAllSegmentPrefixes,"getAllSegmentPrefixes");function transformLink(src,target,opts){let targetSlug=transformInternalLink(target);if(opts.strategy==="relative")return targetSlug;{let folderTail=isFolderPath(targetSlug)?"/":"",canonicalSlug=stripSlashes(targetSlug.slice(1)),[targetCanonical,targetAnchor]=splitAnchor(canonicalSlug);if(opts.strategy==="shortest"){let matchingFileNames=opts.allSlugs.filter(slug=>{let fileName=slug.split("/").at(-1);return targetCanonical===fileName});if(matchingFileNames.length===1){let targetSlug2=matchingFileNames[0];return resolveRelative(src,targetSlug2)+targetAnchor}}return joinSegments(pathToRoot(src),canonicalSlug)+folderTail}}__name(transformLink,"transformLink");function isFolderPath(fplike){return fplike.endsWith("/")||endsWith(fplike,"index")||endsWith(fplike,"index.md")||endsWith(fplike,"index.html")}__name(isFolderPath,"isFolderPath");function endsWith(s,suffix){return s===suffix||s.endsWith("/"+suffix)}__name(endsWith,"endsWith");function trimSuffix(s,suffix){return endsWith(s,suffix)&&(s=s.slice(0,-suffix.length)),s}__name(trimSuffix,"trimSuffix");function _getFileExtension(s){return s.match(/\.[A-Za-z0-9]+$/)?.[0]}__name(_getFileExtension,"_getFileExtension");function isRelativeSegment(s){return/^\.{0,2}$/.test(s)}__name(isRelativeSegment,"isRelativeSegment");function stripSlashes(s,onlyStripPrefix){return s.startsWith("/")&&(s=s.substring(1)),!onlyStripPrefix&&s.endsWith("/")&&(s=s.slice(0,-1)),s}__name(stripSlashes,"stripSlashes");function _addRelativeToStart(s){return s===""&&(s="."),s.startsWith(".")||(s=joinSegments(".",s)),s}__name(_addRelativeToStart,"_addRelativeToStart");import path from"path";import workerpool,{Promise as WorkerPromise}from"workerpool";import{Spinner}from"cli-spinner";var QuartzLogger=class{static{__name(this,"QuartzLogger")}verbose;spinner;constructor(verbose){this.verbose=verbose}start(text){this.verbose?console.log(text):(this.spinner=new Spinner(`%s ${text}`),this.spinner.setSpinnerString(18),this.spinner.start())}end(text){this.verbose||this.spinner.stop(!0),text&&console.log(text)}};import chalk2 from"chalk";import process2 from"process";import{isMainThread}from"workerpool";var rootFile=/.*at file:/;function trace(msg,err){let stack=err.stack??"",lines=[];lines.push(""),lines.push(`
|
|
`+chalk2.bgRed.black.bold(" ERROR ")+`
|
|
|
|
`+chalk2.red(` ${msg}`)+(err.message.length>0?`: ${err.message}`:""));let reachedEndOfLegibleTrace=!1;for(let line of stack.split(`
|
|
`).slice(1)){if(reachedEndOfLegibleTrace)break;line.includes("node_modules")||(lines.push(` ${line}`),rootFile.test(line)&&(reachedEndOfLegibleTrace=!0))}let traceMsg=lines.join(`
|
|
`);if(isMainThread)console.error(traceMsg),process2.exit(1);else throw new Error(traceMsg)}__name(trace,"trace");function createMdProcessor(ctx){let transformers=ctx.cfg.plugins.transformers;return unified().use(remarkParse).use(transformers.flatMap(plugin=>plugin.markdownPlugins?.(ctx)??[]))}__name(createMdProcessor,"createMdProcessor");function createHtmlProcessor(ctx){let transformers=ctx.cfg.plugins.transformers;return unified().use(remarkRehype,{allowDangerousHtml:!0}).use(transformers.flatMap(plugin=>plugin.htmlPlugins?.(ctx)??[]))}__name(createHtmlProcessor,"createHtmlProcessor");function*chunks(arr,n){for(let i=0;i<arr.length;i+=n)yield arr.slice(i,i+n)}__name(chunks,"chunks");async function transpileWorkerScript(){return esbuild.build({entryPoints:["./quartz/worker.ts"],outfile:path.join(QUARTZ,"./.quartz-cache/transpiled-worker.mjs"),bundle:!0,keepNames:!0,platform:"node",format:"esm",packages:"external",sourcemap:!0,sourcesContent:!1,plugins:[{name:"css-and-scripts-as-text",setup(build){build.onLoad({filter:/\.scss$/},_=>({contents:"",loader:"text"})),build.onLoad({filter:/\.inline\.(ts|js)$/},_=>({contents:"",loader:"text"}))}}]})}__name(transpileWorkerScript,"transpileWorkerScript");function createFileParser(ctx,fps){let{argv,cfg}=ctx;return async processor=>{let res=[];for(let fp of fps)try{let perf=new PerfTimer,file=await read(fp);file.value=file.value.toString().trim();for(let plugin of cfg.plugins.transformers.filter(p=>p.textTransform))file.value=plugin.textTransform(ctx,file.value.toString());file.data.filePath=file.path,file.data.relativePath=path.posix.relative(argv.directory,file.path),file.data.slug=slugifyFilePath(file.data.relativePath);let ast=processor.parse(file),newAst=await processor.run(ast,file);res.push([newAst,file]),argv.verbose&&console.log(`[markdown] ${fp} -> ${file.data.slug} (${perf.timeSince()})`)}catch(err){trace(`
|
|
Failed to process markdown \`${fp}\``,err)}return res}}__name(createFileParser,"createFileParser");function createMarkdownParser(ctx,mdContent){return async processor=>{let res=[];for(let[ast,file]of mdContent)try{let perf=new PerfTimer,newAst=await processor.run(ast,file);res.push([newAst,file]),ctx.argv.verbose&&console.log(`[html] ${file.data.slug} (${perf.timeSince()})`)}catch(err){trace(`
|
|
Failed to process html \`${file.data.filePath}\``,err)}return res}}__name(createMarkdownParser,"createMarkdownParser");var clamp=__name((num,min,max)=>Math.min(Math.max(Math.round(num),min),max),"clamp");async function parseMarkdown(ctx,fps){let{argv}=ctx,perf=new PerfTimer,log=new QuartzLogger(argv.verbose),CHUNK_SIZE=128,concurrency=ctx.argv.concurrency??clamp(fps.length/CHUNK_SIZE,1,4),res=[];if(log.start(`Parsing input files using ${concurrency} threads`),concurrency===1)try{let mdRes=await createFileParser(ctx,fps)(createMdProcessor(ctx));res=await createMarkdownParser(ctx,mdRes)(createHtmlProcessor(ctx))}catch(error){throw log.end(),error}else{await transpileWorkerScript();let pool=workerpool.pool("./quartz/bootstrap-worker.mjs",{minWorkers:"max",maxWorkers:concurrency,workerType:"thread"}),errorHandler=__name(err=>{console.error(`${err}`.replace(/^error:\s*/i,"")),process.exit(1)},"errorHandler"),mdPromises=[];for(let chunk of chunks(fps,CHUNK_SIZE))mdPromises.push(pool.exec("parseMarkdown",[ctx.buildId,argv,chunk]));let mdResults=await WorkerPromise.all(mdPromises).catch(errorHandler),childPromises=[];for(let[_,extraSlugs]of mdResults)ctx.allSlugs.push(...extraSlugs);for(let[mdChunk,_]of mdResults)childPromises.push(pool.exec("processHtml",[ctx.buildId,argv,mdChunk,ctx.allSlugs]));res=(await WorkerPromise.all(childPromises).catch(errorHandler)).flat(),await pool.terminate()}return log.end(`Parsed ${res.length} Markdown files in ${perf.timeSince()}`),res}__name(parseMarkdown,"parseMarkdown");function filterContent(ctx,content){let{cfg,argv}=ctx,perf=new PerfTimer,initialLength=content.length;for(let plugin of cfg.plugins.filters){let updatedContent=content.filter(item=>plugin.shouldPublish(ctx,item));if(argv.verbose){let diff=content.filter(x=>!updatedContent.includes(x));for(let file of diff)console.log(`[filter:${plugin.name}] ${file[1].data.slug}`)}content=updatedContent}return console.log(`Filtered out ${initialLength-content.length} files in ${perf.timeSince()}`),content}__name(filterContent,"filterContent");import matter from"gray-matter";import remarkFrontmatter from"remark-frontmatter";import yaml from"js-yaml";import toml from"toml";var en_US_default={propertyDefaults:{title:"Untitled",description:"No description provided"},components:{callout:{note:"Note",abstract:"Abstract",info:"Info",todo:"Todo",tip:"Tip",success:"Success",question:"Question",warning:"Warning",failure:"Failure",danger:"Danger",bug:"Bug",example:"Example",quote:"Quote"},backlinks:{title:"Backlinks",noBacklinksFound:"No backlinks found"},themeToggle:{lightMode:"Light mode",darkMode:"Dark mode"},explorer:{title:"Explorer"},footer:{createdWith:"Created with"},graph:{title:"Graph View"},recentNotes:{title:"Recent Notes",seeRemainingMore:__name(({remaining})=>`See ${remaining} more \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclude of ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link to original"},search:{title:"Search",searchBarPlaceholder:"Search for something"},tableOfContents:{title:"Table of Contents"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"Recent notes",lastFewNotes:__name(({count})=>`Last ${count} notes`,"lastFewNotes")},error:{title:"Not Found",notFound:"Either this page is private or doesn't exist.",home:"Return to Homepage"},folderContent:{folder:"Folder",itemsUnderFolder:__name(({count})=>count===1?"1 item under this folder.":`${count} items under this folder.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Tag Index",itemsUnderTag:__name(({count})=>count===1?"1 item with this tag.":`${count} items with this tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Showing first ${count} tags.`,"showingFirst"),totalTags:__name(({count})=>`Found ${count} total tags.`,"totalTags")}}};var en_GB_default={propertyDefaults:{title:"Untitled",description:"No description provided"},components:{callout:{note:"Note",abstract:"Abstract",info:"Info",todo:"To-Do",tip:"Tip",success:"Success",question:"Question",warning:"Warning",failure:"Failure",danger:"Danger",bug:"Bug",example:"Example",quote:"Quote"},backlinks:{title:"Backlinks",noBacklinksFound:"No backlinks found"},themeToggle:{lightMode:"Light mode",darkMode:"Dark mode"},explorer:{title:"Explorer"},footer:{createdWith:"Created with"},graph:{title:"Graph View"},recentNotes:{title:"Recent Notes",seeRemainingMore:__name(({remaining})=>`See ${remaining} more \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclude of ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link to original"},search:{title:"Search",searchBarPlaceholder:"Search for something"},tableOfContents:{title:"Table of Contents"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"Recent notes",lastFewNotes:__name(({count})=>`Last ${count} notes`,"lastFewNotes")},error:{title:"Not Found",notFound:"Either this page is private or doesn't exist.",home:"Return to Homepage"},folderContent:{folder:"Folder",itemsUnderFolder:__name(({count})=>count===1?"1 item under this folder.":`${count} items under this folder.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Tag Index",itemsUnderTag:__name(({count})=>count===1?"1 item with this tag.":`${count} items with this tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Showing first ${count} tags.`,"showingFirst"),totalTags:__name(({count})=>`Found ${count} total tags.`,"totalTags")}}};var fr_FR_default={propertyDefaults:{title:"Sans titre",description:"Aucune description fournie"},components:{callout:{note:"Note",abstract:"R\xE9sum\xE9",info:"Info",todo:"\xC0 faire",tip:"Conseil",success:"Succ\xE8s",question:"Question",warning:"Avertissement",failure:"\xC9chec",danger:"Danger",bug:"Bogue",example:"Exemple",quote:"Citation"},backlinks:{title:"Liens retour",noBacklinksFound:"Aucun lien retour trouv\xE9"},themeToggle:{lightMode:"Mode clair",darkMode:"Mode sombre"},explorer:{title:"Explorateur"},footer:{createdWith:"Cr\xE9\xE9 avec"},graph:{title:"Vue Graphique"},recentNotes:{title:"Notes R\xE9centes",seeRemainingMore:__name(({remaining})=>`Voir ${remaining} de plus \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclusion de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Lien vers l'original"},search:{title:"Recherche",searchBarPlaceholder:"Rechercher quelque chose"},tableOfContents:{title:"Table des Mati\xE8res"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min de lecture`,"readingTime")}},pages:{rss:{recentNotes:"Notes r\xE9centes",lastFewNotes:__name(({count})=>`Les derni\xE8res ${count} notes`,"lastFewNotes")},error:{title:"Introuvable",notFound:"Cette page est soit priv\xE9e, soit elle n'existe pas.",home:"Retour \xE0 la page d'accueil"},folderContent:{folder:"Dossier",itemsUnderFolder:__name(({count})=>count===1?"1 \xE9l\xE9ment sous ce dossier.":`${count} \xE9l\xE9ments sous ce dossier.`,"itemsUnderFolder")},tagContent:{tag:"\xC9tiquette",tagIndex:"Index des \xE9tiquettes",itemsUnderTag:__name(({count})=>count===1?"1 \xE9l\xE9ment avec cette \xE9tiquette.":`${count} \xE9l\xE9ments avec cette \xE9tiquette.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Affichage des premi\xE8res ${count} \xE9tiquettes.`,"showingFirst"),totalTags:__name(({count})=>`Trouv\xE9 ${count} \xE9tiquettes au total.`,"totalTags")}}};var it_IT_default={propertyDefaults:{title:"Senza titolo",description:"Nessuna descrizione"},components:{callout:{note:"Nota",abstract:"Astratto",info:"Info",todo:"Da fare",tip:"Consiglio",success:"Completato",question:"Domanda",warning:"Attenzione",failure:"Errore",danger:"Pericolo",bug:"Bug",example:"Esempio",quote:"Citazione"},backlinks:{title:"Link entranti",noBacklinksFound:"Nessun link entrante"},themeToggle:{lightMode:"Tema chiaro",darkMode:"Tema scuro"},explorer:{title:"Esplora"},footer:{createdWith:"Creato con"},graph:{title:"Vista grafico"},recentNotes:{title:"Note recenti",seeRemainingMore:__name(({remaining})=>`Vedi ${remaining} altro \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclusione di ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link all'originale"},search:{title:"Cerca",searchBarPlaceholder:"Cerca qualcosa"},tableOfContents:{title:"Tabella dei contenuti"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} minuti`,"readingTime")}},pages:{rss:{recentNotes:"Note recenti",lastFewNotes:__name(({count})=>`Ultime ${count} note`,"lastFewNotes")},error:{title:"Non trovato",notFound:"Questa pagina \xE8 privata o non esiste.",home:"Ritorna alla home page"},folderContent:{folder:"Cartella",itemsUnderFolder:__name(({count})=>count===1?"1 oggetto in questa cartella.":`${count} oggetti in questa cartella.`,"itemsUnderFolder")},tagContent:{tag:"Etichetta",tagIndex:"Indice etichette",itemsUnderTag:__name(({count})=>count===1?"1 oggetto con questa etichetta.":`${count} oggetti con questa etichetta.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Prime ${count} etichette.`,"showingFirst"),totalTags:__name(({count})=>`Trovate ${count} etichette totali.`,"totalTags")}}};var ja_JP_default={propertyDefaults:{title:"\u7121\u984C",description:"\u8AAC\u660E\u306A\u3057"},components:{callout:{note:"\u30CE\u30FC\u30C8",abstract:"\u6284\u9332",info:"\u60C5\u5831",todo:"\u3084\u308B\u3079\u304D\u3053\u3068",tip:"\u30D2\u30F3\u30C8",success:"\u6210\u529F",question:"\u8CEA\u554F",warning:"\u8B66\u544A",failure:"\u5931\u6557",danger:"\u5371\u967A",bug:"\u30D0\u30B0",example:"\u4F8B",quote:"\u5F15\u7528"},backlinks:{title:"\u30D0\u30C3\u30AF\u30EA\u30F3\u30AF",noBacklinksFound:"\u30D0\u30C3\u30AF\u30EA\u30F3\u30AF\u306F\u3042\u308A\u307E\u305B\u3093"},themeToggle:{lightMode:"\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9",darkMode:"\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9"},explorer:{title:"\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u30FC"},footer:{createdWith:"\u4F5C\u6210"},graph:{title:"\u30B0\u30E9\u30D5\u30D3\u30E5\u30FC"},recentNotes:{title:"\u6700\u8FD1\u306E\u8A18\u4E8B",seeRemainingMore:__name(({remaining})=>`\u3055\u3089\u306B${remaining}\u4EF6 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug}\u306E\u307E\u3068\u3081`,"transcludeOf"),linkToOriginal:"\u5143\u8A18\u4E8B\u3078\u306E\u30EA\u30F3\u30AF"},search:{title:"\u691C\u7D22",searchBarPlaceholder:"\u691C\u7D22\u30EF\u30FC\u30C9\u3092\u5165\u529B"},tableOfContents:{title:"\u76EE\u6B21"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"\u6700\u8FD1\u306E\u8A18\u4E8B",lastFewNotes:__name(({count})=>`\u6700\u65B0\u306E${count}\u4EF6`,"lastFewNotes")},error:{title:"Not Found",notFound:"\u30DA\u30FC\u30B8\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u975E\u516C\u958B\u8A2D\u5B9A\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002",home:"\u30DB\u30FC\u30E0\u30DA\u30FC\u30B8\u306B\u623B\u308B"},folderContent:{folder:"\u30D5\u30A9\u30EB\u30C0",itemsUnderFolder:__name(({count})=>`${count}\u4EF6\u306E\u30DA\u30FC\u30B8`,"itemsUnderFolder")},tagContent:{tag:"\u30BF\u30B0",tagIndex:"\u30BF\u30B0\u4E00\u89A7",itemsUnderTag:__name(({count})=>`${count}\u4EF6\u306E\u30DA\u30FC\u30B8`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u306E\u3046\u3061\u6700\u521D\u306E${count}\u4EF6\u3092\u8868\u793A\u3057\u3066\u3044\u307E\u3059`,"showingFirst"),totalTags:__name(({count})=>`\u5168${count}\u500B\u306E\u30BF\u30B0\u3092\u8868\u793A\u4E2D`,"totalTags")}}};var de_DE_default={propertyDefaults:{title:"Unbenannt",description:"Keine Beschreibung angegeben"},components:{callout:{note:"Hinweis",abstract:"Zusammenfassung",info:"Info",todo:"Zu erledigen",tip:"Tipp",success:"Erfolg",question:"Frage",warning:"Warnung",failure:"Misserfolg",danger:"Gefahr",bug:"Fehler",example:"Beispiel",quote:"Zitat"},backlinks:{title:"Backlinks",noBacklinksFound:"Keine Backlinks gefunden"},themeToggle:{lightMode:"Light Mode",darkMode:"Dark Mode"},explorer:{title:"Explorer"},footer:{createdWith:"Erstellt mit"},graph:{title:"Graphansicht"},recentNotes:{title:"Zuletzt bearbeitete Seiten",seeRemainingMore:__name(({remaining})=>`${remaining} weitere ansehen \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transklusion von ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link zum Original"},search:{title:"Suche",searchBarPlaceholder:"Suche nach etwas"},tableOfContents:{title:"Inhaltsverzeichnis"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"Zuletzt bearbeitete Seiten",lastFewNotes:__name(({count})=>`Letzte ${count} Seiten`,"lastFewNotes")},error:{title:"Nicht gefunden",notFound:"Diese Seite ist entweder nicht \xF6ffentlich oder existiert nicht.",home:"Return to Homepage"},folderContent:{folder:"Ordner",itemsUnderFolder:__name(({count})=>count===1?"1 Datei in diesem Ordner.":`${count} Dateien in diesem Ordner.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Tag-\xDCbersicht",itemsUnderTag:__name(({count})=>count===1?"1 Datei mit diesem Tag.":`${count} Dateien mit diesem Tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Die ersten ${count} Tags werden angezeigt.`,"showingFirst"),totalTags:__name(({count})=>`${count} Tags insgesamt.`,"totalTags")}}};var nl_NL_default={propertyDefaults:{title:"Naamloos",description:"Geen beschrijving gegeven."},components:{callout:{note:"Notitie",abstract:"Samenvatting",info:"Info",todo:"Te doen",tip:"Tip",success:"Succes",question:"Vraag",warning:"Waarschuwing",failure:"Mislukking",danger:"Gevaar",bug:"Bug",example:"Voorbeeld",quote:"Citaat"},backlinks:{title:"Backlinks",noBacklinksFound:"Geen backlinks gevonden"},themeToggle:{lightMode:"Lichte modus",darkMode:"Donkere modus"},explorer:{title:"Verkenner"},footer:{createdWith:"Gemaakt met"},graph:{title:"Grafiekweergave"},recentNotes:{title:"Recente notities",seeRemainingMore:__name(({remaining})=>`Zie ${remaining} meer \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Invoeging van ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link naar origineel"},search:{title:"Zoeken",searchBarPlaceholder:"Doorzoek de website"},tableOfContents:{title:"Inhoudsopgave"},contentMeta:{readingTime:__name(({minutes})=>minutes===1?"1 minuut leestijd":`${minutes} minuten leestijd`,"readingTime")}},pages:{rss:{recentNotes:"Recente notities",lastFewNotes:__name(({count})=>`Laatste ${count} notities`,"lastFewNotes")},error:{title:"Niet gevonden",notFound:"Deze pagina is niet zichtbaar of bestaat niet.",home:"Keer terug naar de start pagina"},folderContent:{folder:"Map",itemsUnderFolder:__name(({count})=>count===1?"1 item in deze map.":`${count} items in deze map.`,"itemsUnderFolder")},tagContent:{tag:"Label",tagIndex:"Label-index",itemsUnderTag:__name(({count})=>count===1?"1 item met dit label.":`${count} items met dit label.`,"itemsUnderTag"),showingFirst:__name(({count})=>count===1?"Eerste label tonen.":`Eerste ${count} labels tonen.`,"showingFirst"),totalTags:__name(({count})=>`${count} labels gevonden.`,"totalTags")}}};var ro_RO_default={propertyDefaults:{title:"F\u0103r\u0103 titlu",description:"Nici o descriere furnizat\u0103"},components:{callout:{note:"Not\u0103",abstract:"Rezumat",info:"Informa\u021Bie",todo:"De f\u0103cut",tip:"Sfat",success:"Succes",question:"\xCEntrebare",warning:"Avertisment",failure:"E\u0219ec",danger:"Pericol",bug:"Bug",example:"Exemplu",quote:"Citat"},backlinks:{title:"Leg\u0103turi \xEEnapoi",noBacklinksFound:"Nu s-au g\u0103sit leg\u0103turi \xEEnapoi"},themeToggle:{lightMode:"Modul luminos",darkMode:"Modul \xEEntunecat"},explorer:{title:"Explorator"},footer:{createdWith:"Creat cu"},graph:{title:"Graf"},recentNotes:{title:"Noti\u021Be recente",seeRemainingMore:__name(({remaining})=>`Vezi \xEEnc\u0103 ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Extras din ${targetSlug}`,"transcludeOf"),linkToOriginal:"Leg\u0103tur\u0103 c\u0103tre original"},search:{title:"C\u0103utare",searchBarPlaceholder:"Introduce\u021Bi termenul de c\u0103utare..."},tableOfContents:{title:"Cuprins"},contentMeta:{readingTime:__name(({minutes})=>minutes==1?"lectur\u0103 de 1 minut":`lectur\u0103 de ${minutes} minute`,"readingTime")}},pages:{rss:{recentNotes:"Noti\u021Be recente",lastFewNotes:__name(({count})=>`Ultimele ${count} noti\u021Be`,"lastFewNotes")},error:{title:"Pagina nu a fost g\u0103sit\u0103",notFound:"Fie aceast\u0103 pagin\u0103 este privat\u0103, fie nu exist\u0103.",home:"Reveni\u021Bi la pagina de pornire"},folderContent:{folder:"Dosar",itemsUnderFolder:__name(({count})=>count===1?"1 articol \xEEn acest dosar.":`${count} elemente \xEEn acest dosar.`,"itemsUnderFolder")},tagContent:{tag:"Etichet\u0103",tagIndex:"Indexul etichetelor",itemsUnderTag:__name(({count})=>count===1?"1 articol cu aceast\u0103 etichet\u0103.":`${count} articole cu aceast\u0103 etichet\u0103.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Se afi\u0219eaz\u0103 primele ${count} etichete.`,"showingFirst"),totalTags:__name(({count})=>`Au fost g\u0103site ${count} etichete \xEEn total.`,"totalTags")}}};var ca_ES_default={propertyDefaults:{title:"Sense t\xEDtol",description:"Sense descripci\xF3"},components:{callout:{note:"Nota",abstract:"Resum",info:"Informaci\xF3",todo:"Per fer",tip:"Consell",success:"\xC8xit",question:"Pregunta",warning:"Advert\xE8ncia",failure:"Fall",danger:"Perill",bug:"Error",example:"Exemple",quote:"Cita"},backlinks:{title:"Retroenlla\xE7",noBacklinksFound:"No s'han trobat retroenlla\xE7os"},themeToggle:{lightMode:"Mode clar",darkMode:"Mode fosc"},explorer:{title:"Explorador"},footer:{createdWith:"Creat amb"},graph:{title:"Vista Gr\xE0fica"},recentNotes:{title:"Notes Recents",seeRemainingMore:__name(({remaining})=>`Vegi ${remaining} m\xE9s \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transcluit de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Enlla\xE7 a l'original"},search:{title:"Cercar",searchBarPlaceholder:"Cerca alguna cosa"},tableOfContents:{title:"Taula de Continguts"},contentMeta:{readingTime:__name(({minutes})=>`Es llegeix en ${minutes} min`,"readingTime")}},pages:{rss:{recentNotes:"Notes recents",lastFewNotes:__name(({count})=>`\xDAltimes ${count} notes`,"lastFewNotes")},error:{title:"No s'ha trobat.",notFound:"Aquesta p\xE0gina \xE9s privada o no existeix.",home:"Torna a la p\xE0gina principal"},folderContent:{folder:"Carpeta",itemsUnderFolder:__name(({count})=>count===1?"1 article en aquesta carpeta.":`${count} articles en esta carpeta.`,"itemsUnderFolder")},tagContent:{tag:"Etiqueta",tagIndex:"\xEDndex d'Etiquetes",itemsUnderTag:__name(({count})=>count===1?"1 article amb aquesta etiqueta.":`${count} article amb aquesta etiqueta.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Mostrant les primeres ${count} etiquetes.`,"showingFirst"),totalTags:__name(({count})=>`S'han trobat ${count} etiquetes en total.`,"totalTags")}}};var es_ES_default={propertyDefaults:{title:"Sin t\xEDtulo",description:"Sin descripci\xF3n"},components:{callout:{note:"Nota",abstract:"Resumen",info:"Informaci\xF3n",todo:"Por hacer",tip:"Consejo",success:"\xC9xito",question:"Pregunta",warning:"Advertencia",failure:"Fallo",danger:"Peligro",bug:"Error",example:"Ejemplo",quote:"Cita"},backlinks:{title:"Retroenlaces",noBacklinksFound:"No se han encontrado retroenlaces"},themeToggle:{lightMode:"Modo claro",darkMode:"Modo oscuro"},explorer:{title:"Explorador"},footer:{createdWith:"Creado con"},graph:{title:"Vista Gr\xE1fica"},recentNotes:{title:"Notas Recientes",seeRemainingMore:__name(({remaining})=>`Vea ${remaining} m\xE1s \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transcluido de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Enlace al original"},search:{title:"Buscar",searchBarPlaceholder:"Busca algo"},tableOfContents:{title:"Tabla de Contenidos"},contentMeta:{readingTime:__name(({minutes})=>`Se lee en ${minutes} min`,"readingTime")}},pages:{rss:{recentNotes:"Notas recientes",lastFewNotes:__name(({count})=>`\xDAltimas ${count} notas`,"lastFewNotes")},error:{title:"No se ha encontrado.",notFound:"Esta p\xE1gina es privada o no existe.",home:"Regresa a la p\xE1gina principal"},folderContent:{folder:"Carpeta",itemsUnderFolder:__name(({count})=>count===1?"1 art\xEDculo en esta carpeta.":`${count} art\xEDculos en esta carpeta.`,"itemsUnderFolder")},tagContent:{tag:"Etiqueta",tagIndex:"\xCDndice de Etiquetas",itemsUnderTag:__name(({count})=>count===1?"1 art\xEDculo con esta etiqueta.":`${count} art\xEDculos con esta etiqueta.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Mostrando las primeras ${count} etiquetas.`,"showingFirst"),totalTags:__name(({count})=>`Se han encontrado ${count} etiquetas en total.`,"totalTags")}}};var ar_SA_default={propertyDefaults:{title:"\u063A\u064A\u0631 \u0645\u0639\u0646\u0648\u0646",description:"\u0644\u0645 \u064A\u062A\u0645 \u062A\u0642\u062F\u064A\u0645 \u0623\u064A \u0648\u0635\u0641"},components:{callout:{note:"\u0645\u0644\u0627\u062D\u0638\u0629",abstract:"\u0645\u0644\u062E\u0635",info:"\u0645\u0639\u0644\u0648\u0645\u0627\u062A",todo:"\u0644\u0644\u0642\u064A\u0627\u0645",tip:"\u0646\u0635\u064A\u062D\u0629",success:"\u0646\u062C\u0627\u062D",question:"\u0633\u0624\u0627\u0644",warning:"\u062A\u062D\u0630\u064A\u0631",failure:"\u0641\u0634\u0644",danger:"\u062E\u0637\u0631",bug:"\u062E\u0644\u0644",example:"\u0645\u062B\u0627\u0644",quote:"\u0627\u0642\u062A\u0628\u0627\u0633"},backlinks:{title:"\u0648\u0635\u0644\u0627\u062A \u0627\u0644\u0639\u0648\u062F\u0629",noBacklinksFound:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0648\u0635\u0644\u0627\u062A \u0639\u0648\u062F\u0629"},themeToggle:{lightMode:"\u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0646\u0647\u0627\u0631\u064A",darkMode:"\u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0644\u064A\u0644\u064A"},explorer:{title:"\u0627\u0644\u0645\u0633\u062A\u0639\u0631\u0636"},footer:{createdWith:"\u0623\u064F\u0646\u0634\u0626 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645"},graph:{title:"\u0627\u0644\u062A\u0645\u062B\u064A\u0644 \u0627\u0644\u062A\u0641\u0627\u0639\u0644\u064A"},recentNotes:{title:"\u0622\u062E\u0631 \u0627\u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A",seeRemainingMore:__name(({remaining})=>`\u062A\u0635\u0641\u062D ${remaining} \u0623\u0643\u062B\u0631 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0645\u0642\u062A\u0628\u0633 \u0645\u0646 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0648\u0635\u0644\u0629 \u0644\u0644\u0645\u0644\u0627\u062D\u0638\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u0629"},search:{title:"\u0628\u062D\u062B",searchBarPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0634\u064A\u0621 \u0645\u0627"},tableOfContents:{title:"\u0641\u0647\u0631\u0633 \u0627\u0644\u0645\u062D\u062A\u0648\u064A\u0627\u062A"},contentMeta:{readingTime:__name(({minutes})=>minutes==1?"\u062F\u0642\u064A\u0642\u0629 \u0623\u0648 \u0623\u0642\u0644 \u0644\u0644\u0642\u0631\u0627\u0621\u0629":minutes==2?"\u062F\u0642\u064A\u0642\u062A\u0627\u0646 \u0644\u0644\u0642\u0631\u0627\u0621\u0629":`${minutes} \u062F\u0642\u0627\u0626\u0642 \u0644\u0644\u0642\u0631\u0627\u0621\u0629`,"readingTime")}},pages:{rss:{recentNotes:"\u0622\u062E\u0631 \u0627\u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A",lastFewNotes:__name(({count})=>`\u0622\u062E\u0631 ${count} \u0645\u0644\u0627\u062D\u0638\u0629`,"lastFewNotes")},error:{title:"\u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",notFound:"\u0625\u0645\u0627 \u0623\u0646 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u062E\u0627\u0635\u0629 \u0623\u0648 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629.",home:"\u0627\u0644\u0639\u0648\u062F\u0647 \u0644\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629"},folderContent:{folder:"\u0645\u062C\u0644\u062F",itemsUnderFolder:__name(({count})=>count===1?"\u064A\u0648\u062C\u062F \u0639\u0646\u0635\u0631 \u0648\u0627\u062D\u062F \u0641\u0642\u0637 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F":`\u064A\u0648\u062C\u062F ${count} \u0639\u0646\u0627\u0635\u0631 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F.`,"itemsUnderFolder")},tagContent:{tag:"\u0627\u0644\u0648\u0633\u0645",tagIndex:"\u0645\u0624\u0634\u0631 \u0627\u0644\u0648\u0633\u0645",itemsUnderTag:__name(({count})=>count===1?"\u064A\u0648\u062C\u062F \u0639\u0646\u0635\u0631 \u0648\u0627\u062D\u062F \u0641\u0642\u0637 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0648\u0633\u0645":`\u064A\u0648\u062C\u062F ${count} \u0639\u0646\u0627\u0635\u0631 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0648\u0633\u0645.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u0625\u0638\u0647\u0627\u0631 \u0623\u0648\u0644 ${count} \u0623\u0648\u0633\u0645\u0629.`,"showingFirst"),totalTags:__name(({count})=>`\u064A\u0648\u062C\u062F ${count} \u0623\u0648\u0633\u0645\u0629.`,"totalTags")}}};var uk_UA_default={propertyDefaults:{title:"\u0411\u0435\u0437 \u043D\u0430\u0437\u0432\u0438",description:"\u041E\u043F\u0438\u0441 \u043D\u0435 \u043D\u0430\u0434\u0430\u043D\u043E"},components:{callout:{note:"\u041F\u0440\u0438\u043C\u0456\u0442\u043A\u0430",abstract:"\u0410\u0431\u0441\u0442\u0440\u0430\u043A\u0442",info:"\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u044F",todo:"\u0417\u0430\u0432\u0434\u0430\u043D\u043D\u044F",tip:"\u041F\u043E\u0440\u0430\u0434\u0430",success:"\u0423\u0441\u043F\u0456\u0445",question:"\u041F\u0438\u0442\u0430\u043D\u043D\u044F",warning:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u0436\u0435\u043D\u043D\u044F",failure:"\u041D\u0435\u0432\u0434\u0430\u0447\u0430",danger:"\u041D\u0435\u0431\u0435\u0437\u043F\u0435\u043A\u0430",bug:"\u0411\u0430\u0433",example:"\u041F\u0440\u0438\u043A\u043B\u0430\u0434",quote:"\u0426\u0438\u0442\u0430\u0442\u0430"},backlinks:{title:"\u0417\u0432\u043E\u0440\u043E\u0442\u043D\u0456 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F",noBacklinksFound:"\u0417\u0432\u043E\u0440\u043E\u0442\u043D\u0438\u0445 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u044C \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E"},themeToggle:{lightMode:"\u0421\u0432\u0456\u0442\u043B\u0438\u0439 \u0440\u0435\u0436\u0438\u043C",darkMode:"\u0422\u0435\u043C\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C"},explorer:{title:"\u041F\u0440\u043E\u0432\u0456\u0434\u043D\u0438\u043A"},footer:{createdWith:"\u0421\u0442\u0432\u043E\u0440\u0435\u043D\u043E \u0437\u0430 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u043E\u044E"},graph:{title:"\u0412\u0438\u0433\u043B\u044F\u0434 \u0433\u0440\u0430\u0444\u0430"},recentNotes:{title:"\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u043D\u043E\u0442\u0430\u0442\u043A\u0438",seeRemainingMore:__name(({remaining})=>`\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0449\u0435 ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0412\u0438\u0434\u043E\u0431\u0443\u0442\u043E \u0437 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u041F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F \u043D\u0430 \u043E\u0440\u0438\u0433\u0456\u043D\u0430\u043B"},search:{title:"\u041F\u043E\u0448\u0443\u043A",searchBarPlaceholder:"\u0428\u0443\u043A\u0430\u0442\u0438 \u0449\u043E\u0441\u044C"},tableOfContents:{title:"\u0417\u043C\u0456\u0441\u0442"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} \u0445\u0432 \u0447\u0438\u0442\u0430\u043D\u043D\u044F`,"readingTime")}},pages:{rss:{recentNotes:"\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u043D\u043E\u0442\u0430\u0442\u043A\u0438",lastFewNotes:__name(({count})=>`\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u043D\u043E\u0442\u0430\u0442\u043A\u0438: ${count}`,"lastFewNotes")},error:{title:"\u041D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E",notFound:"\u0426\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430 \u0430\u0431\u043E \u043F\u0440\u0438\u0432\u0430\u0442\u043D\u0430, \u0430\u0431\u043E \u043D\u0435 \u0456\u0441\u043D\u0443\u0454.",home:"\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438\u0441\u044F \u043D\u0430 \u0433\u043E\u043B\u043E\u0432\u043D\u0443 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443"},folderContent:{folder:"\u0422\u0435\u043A\u0430",itemsUnderFolder:__name(({count})=>count===1?"\u0423 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456 1 \u0435\u043B\u0435\u043C\u0435\u043D\u0442.":`\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0443 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456: ${count}.`,"itemsUnderFolder")},tagContent:{tag:"\u041C\u0456\u0442\u043A\u0430",tagIndex:"\u0406\u043D\u0434\u0435\u043A\u0441 \u043C\u0456\u0442\u043A\u0438",itemsUnderTag:__name(({count})=>count===1?"1 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0437 \u0446\u0456\u0454\u044E \u043C\u0456\u0442\u043A\u043E\u044E.":`\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0437 \u0446\u0456\u0454\u044E \u043C\u0456\u0442\u043A\u043E\u044E: ${count}.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u041F\u043E\u043A\u0430\u0437 \u043F\u0435\u0440\u0448\u0438\u0445 ${count} \u043C\u0456\u0442\u043E\u043A.`,"showingFirst"),totalTags:__name(({count})=>`\u0412\u0441\u044C\u043E\u0433\u043E \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043C\u0456\u0442\u043E\u043A: ${count}.`,"totalTags")}}};var ru_RU_default={propertyDefaults:{title:"\u0411\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F",description:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"},components:{callout:{note:"\u0417\u0430\u043C\u0435\u0442\u043A\u0430",abstract:"\u0420\u0435\u0437\u044E\u043C\u0435",info:"\u0418\u043D\u0444\u043E",todo:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C",tip:"\u041F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430",success:"\u0423\u0441\u043F\u0435\u0445",question:"\u0412\u043E\u043F\u0440\u043E\u0441",warning:"\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435",failure:"\u041D\u0435\u0443\u0434\u0430\u0447\u0430",danger:"\u041E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C",bug:"\u0411\u0430\u0433",example:"\u041F\u0440\u0438\u043C\u0435\u0440",quote:"\u0426\u0438\u0442\u0430\u0442\u0430"},backlinks:{title:"\u041E\u0431\u0440\u0430\u0442\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438",noBacklinksFound:"\u041E\u0431\u0440\u0430\u0442\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442"},themeToggle:{lightMode:"\u0421\u0432\u0435\u0442\u043B\u044B\u0439 \u0440\u0435\u0436\u0438\u043C",darkMode:"\u0422\u0451\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C"},explorer:{title:"\u041F\u0440\u043E\u0432\u043E\u0434\u043D\u0438\u043A"},footer:{createdWith:"\u0421\u043E\u0437\u0434\u0430\u043D\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E"},graph:{title:"\u0412\u0438\u0434 \u0433\u0440\u0430\u0444\u0430"},recentNotes:{title:"\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438",seeRemainingMore:__name(({remaining})=>`\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448${getForm(remaining,"\u0443\u044E\u0441\u044F","\u0438\u0435\u0441\u044F","\u0438\u0435\u0441\u044F")} ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u041F\u0435\u0440\u0435\u0445\u043E\u0434 \u0438\u0437 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043E\u0440\u0438\u0433\u0438\u043D\u0430\u043B"},search:{title:"\u041F\u043E\u0438\u0441\u043A",searchBarPlaceholder:"\u041D\u0430\u0439\u0442\u0438 \u0447\u0442\u043E-\u043D\u0438\u0431\u0443\u0434\u044C"},tableOfContents:{title:"\u041E\u0433\u043B\u0430\u0432\u043B\u0435\u043D\u0438\u0435"},contentMeta:{readingTime:__name(({minutes})=>`\u0432\u0440\u0435\u043C\u044F \u0447\u0442\u0435\u043D\u0438\u044F ~${minutes} \u043C\u0438\u043D.`,"readingTime")}},pages:{rss:{recentNotes:"\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438",lastFewNotes:__name(({count})=>`\u041F\u043E\u0441\u043B\u0435\u0434\u043D${getForm(count,"\u044F\u044F","\u0438\u0435","\u0438\u0435")} ${count} \u0437\u0430\u043C\u0435\u0442${getForm(count,"\u043A\u0430","\u043A\u0438","\u043E\u043A")}`,"lastFewNotes")},error:{title:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430",notFound:"\u042D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043F\u0440\u0438\u0432\u0430\u0442\u043D\u0430\u044F \u0438\u043B\u0438 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442",home:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443"},folderContent:{folder:"\u041F\u0430\u043F\u043A\u0430",itemsUnderFolder:__name(({count})=>`\u0432 \u044D\u0442\u043E\u0439 \u043F\u0430\u043F\u043A\u0435 ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442${getForm(count,"","\u0430","\u043E\u0432")}`,"itemsUnderFolder")},tagContent:{tag:"\u0422\u0435\u0433",tagIndex:"\u0418\u043D\u0434\u0435\u043A\u0441 \u0442\u0435\u0433\u043E\u0432",itemsUnderTag:__name(({count})=>`\u0441 \u044D\u0442\u0438\u043C \u0442\u0435\u0433\u043E\u043C ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442${getForm(count,"","\u0430","\u043E\u0432")}`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430${getForm(count,"\u0435\u0442\u0441\u044F","\u044E\u0442\u0441\u044F","\u044E\u0442\u0441\u044F")} ${count} \u0442\u0435\u0433${getForm(count,"","\u0430","\u043E\u0432")}`,"showingFirst"),totalTags:__name(({count})=>`\u0412\u0441\u0435\u0433\u043E ${count} \u0442\u0435\u0433${getForm(count,"","\u0430","\u043E\u0432")}`,"totalTags")}}};function getForm(number,form1,form2,form5){let remainder100=number%100,remainder10=remainder100%10;return remainder100>=10&&remainder100<=20?form5:remainder10>1&&remainder10<5?form2:remainder10==1?form1:form5}__name(getForm,"getForm");var ko_KR_default={propertyDefaults:{title:"\uC81C\uBAA9 \uC5C6\uC74C",description:"\uC124\uBA85 \uC5C6\uC74C"},components:{callout:{note:"\uB178\uD2B8",abstract:"\uAC1C\uC694",info:"\uC815\uBCF4",todo:"\uD560\uC77C",tip:"\uD301",success:"\uC131\uACF5",question:"\uC9C8\uBB38",warning:"\uC8FC\uC758",failure:"\uC2E4\uD328",danger:"\uC704\uD5D8",bug:"\uBC84\uADF8",example:"\uC608\uC2DC",quote:"\uC778\uC6A9"},backlinks:{title:"\uBC31\uB9C1\uD06C",noBacklinksFound:"\uBC31\uB9C1\uD06C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},themeToggle:{lightMode:"\uB77C\uC774\uD2B8 \uBAA8\uB4DC",darkMode:"\uB2E4\uD06C \uBAA8\uB4DC"},explorer:{title:"\uD0D0\uC0C9\uAE30"},footer:{createdWith:"Created with"},graph:{title:"\uADF8\uB798\uD504 \uBDF0"},recentNotes:{title:"\uCD5C\uADFC \uAC8C\uC2DC\uAE00",seeRemainingMore:__name(({remaining})=>`${remaining}\uAC74 \uB354\uBCF4\uAE30 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug}\uC758 \uD3EC\uD568`,"transcludeOf"),linkToOriginal:"\uC6D0\uBCF8 \uB9C1\uD06C"},search:{title:"\uAC80\uC0C9",searchBarPlaceholder:"\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694"},tableOfContents:{title:"\uBAA9\uCC28"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"\uCD5C\uADFC \uAC8C\uC2DC\uAE00",lastFewNotes:__name(({count})=>`\uCD5C\uADFC ${count} \uAC74`,"lastFewNotes")},error:{title:"Not Found",notFound:"\uD398\uC774\uC9C0\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uAC70\uB098 \uBE44\uACF5\uAC1C \uC124\uC815\uC774 \uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",home:"\uD648\uD398\uC774\uC9C0\uB85C \uB3CC\uC544\uAC00\uAE30"},folderContent:{folder:"\uD3F4\uB354",itemsUnderFolder:__name(({count})=>`${count}\uAC74\uC758 \uD56D\uBAA9`,"itemsUnderFolder")},tagContent:{tag:"\uD0DC\uADF8",tagIndex:"\uD0DC\uADF8 \uBAA9\uB85D",itemsUnderTag:__name(({count})=>`${count}\uAC74\uC758 \uD56D\uBAA9`,"itemsUnderTag"),showingFirst:__name(({count})=>`\uCC98\uC74C ${count}\uAC1C\uC758 \uD0DC\uADF8`,"showingFirst"),totalTags:__name(({count})=>`\uCD1D ${count}\uAC1C\uC758 \uD0DC\uADF8\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4.`,"totalTags")}}};var zh_CN_default={propertyDefaults:{title:"\u65E0\u9898",description:"\u65E0\u63CF\u8FF0"},components:{callout:{note:"\u7B14\u8BB0",abstract:"\u6458\u8981",info:"\u63D0\u793A",todo:"\u5F85\u529E",tip:"\u63D0\u793A",success:"\u6210\u529F",question:"\u95EE\u9898",warning:"\u8B66\u544A",failure:"\u5931\u8D25",danger:"\u5371\u9669",bug:"\u9519\u8BEF",example:"\u793A\u4F8B",quote:"\u5F15\u7528"},backlinks:{title:"\u53CD\u5411\u94FE\u63A5",noBacklinksFound:"\u65E0\u6CD5\u627E\u5230\u53CD\u5411\u94FE\u63A5"},themeToggle:{lightMode:"\u4EAE\u8272\u6A21\u5F0F",darkMode:"\u6697\u8272\u6A21\u5F0F"},explorer:{title:"\u63A2\u7D22"},footer:{createdWith:"Created with"},graph:{title:"\u5173\u7CFB\u56FE\u8C31"},recentNotes:{title:"\u6700\u8FD1\u7684\u7B14\u8BB0",seeRemainingMore:__name(({remaining})=>`\u67E5\u770B\u66F4\u591A${remaining}\u7BC7\u7B14\u8BB0 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u5305\u542B${targetSlug}`,"transcludeOf"),linkToOriginal:"\u6307\u5411\u539F\u59CB\u7B14\u8BB0\u7684\u94FE\u63A5"},search:{title:"\u641C\u7D22",searchBarPlaceholder:"\u641C\u7D22\u4E9B\u4EC0\u4E48"},tableOfContents:{title:"\u76EE\u5F55"},contentMeta:{readingTime:__name(({minutes})=>`${minutes}\u5206\u949F\u9605\u8BFB`,"readingTime")}},pages:{rss:{recentNotes:"\u6700\u8FD1\u7684\u7B14\u8BB0",lastFewNotes:__name(({count})=>`\u6700\u8FD1\u7684${count}\u6761\u7B14\u8BB0`,"lastFewNotes")},error:{title:"\u65E0\u6CD5\u627E\u5230",notFound:"\u79C1\u6709\u7B14\u8BB0\u6216\u7B14\u8BB0\u4E0D\u5B58\u5728\u3002",home:"\u8FD4\u56DE\u9996\u9875"},folderContent:{folder:"\u6587\u4EF6\u5939",itemsUnderFolder:__name(({count})=>`\u6B64\u6587\u4EF6\u5939\u4E0B\u6709${count}\u6761\u7B14\u8BB0\u3002`,"itemsUnderFolder")},tagContent:{tag:"\u6807\u7B7E",tagIndex:"\u6807\u7B7E\u7D22\u5F15",itemsUnderTag:__name(({count})=>`\u6B64\u6807\u7B7E\u4E0B\u6709${count}\u6761\u7B14\u8BB0\u3002`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u663E\u793A\u524D${count}\u4E2A\u6807\u7B7E\u3002`,"showingFirst"),totalTags:__name(({count})=>`\u603B\u5171\u6709${count}\u4E2A\u6807\u7B7E\u3002`,"totalTags")}}};var zh_TW_default={propertyDefaults:{title:"\u7121\u984C",description:"\u7121\u63CF\u8FF0"},components:{callout:{note:"\u7B46\u8A18",abstract:"\u6458\u8981",info:"\u63D0\u793A",todo:"\u5F85\u8FA6",tip:"\u63D0\u793A",success:"\u6210\u529F",question:"\u554F\u984C",warning:"\u8B66\u544A",failure:"\u5931\u6557",danger:"\u5371\u96AA",bug:"\u932F\u8AA4",example:"\u7BC4\u4F8B",quote:"\u5F15\u7528"},backlinks:{title:"\u53CD\u5411\u9023\u7D50",noBacklinksFound:"\u7121\u6CD5\u627E\u5230\u53CD\u5411\u9023\u7D50"},themeToggle:{lightMode:"\u4EAE\u8272\u6A21\u5F0F",darkMode:"\u6697\u8272\u6A21\u5F0F"},explorer:{title:"\u63A2\u7D22"},footer:{createdWith:"Created with"},graph:{title:"\u95DC\u4FC2\u5716\u8B5C"},recentNotes:{title:"\u6700\u8FD1\u7684\u7B46\u8A18",seeRemainingMore:__name(({remaining})=>`\u67E5\u770B\u66F4\u591A ${remaining} \u7BC7\u7B46\u8A18 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u5305\u542B ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u6307\u5411\u539F\u59CB\u7B46\u8A18\u7684\u9023\u7D50"},search:{title:"\u641C\u5C0B",searchBarPlaceholder:"\u641C\u5C0B\u4E9B\u4EC0\u9EBC"},tableOfContents:{title:"\u76EE\u9304"},contentMeta:{readingTime:__name(({minutes})=>`\u95B1\u8B80\u6642\u9593\u7D04 ${minutes} \u5206\u9418`,"readingTime")}},pages:{rss:{recentNotes:"\u6700\u8FD1\u7684\u7B46\u8A18",lastFewNotes:__name(({count})=>`\u6700\u8FD1\u7684 ${count} \u689D\u7B46\u8A18`,"lastFewNotes")},error:{title:"\u7121\u6CD5\u627E\u5230",notFound:"\u79C1\u4EBA\u7B46\u8A18\u6216\u7B46\u8A18\u4E0D\u5B58\u5728\u3002",home:"\u8FD4\u56DE\u9996\u9801"},folderContent:{folder:"\u8CC7\u6599\u593E",itemsUnderFolder:__name(({count})=>`\u6B64\u8CC7\u6599\u593E\u4E0B\u6709 ${count} \u689D\u7B46\u8A18\u3002`,"itemsUnderFolder")},tagContent:{tag:"\u6A19\u7C64",tagIndex:"\u6A19\u7C64\u7D22\u5F15",itemsUnderTag:__name(({count})=>`\u6B64\u6A19\u7C64\u4E0B\u6709 ${count} \u689D\u7B46\u8A18\u3002`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u986F\u793A\u524D ${count} \u500B\u6A19\u7C64\u3002`,"showingFirst"),totalTags:__name(({count})=>`\u7E3D\u5171\u6709 ${count} \u500B\u6A19\u7C64\u3002`,"totalTags")}}};var vi_VN_default={propertyDefaults:{title:"Kh\xF4ng c\xF3 ti\xEAu \u0111\u1EC1",description:"Kh\xF4ng c\xF3 m\xF4 t\u1EA3 \u0111\u01B0\u1EE3c cung c\u1EA5p"},components:{callout:{note:"Ghi Ch\xFA",abstract:"T\xF3m T\u1EAFt",info:"Th\xF4ng tin",todo:"C\u1EA7n L\xE0m",tip:"G\u1EE3i \xDD",success:"Th\xE0nh C\xF4ng",question:"Nghi V\u1EA5n",warning:"C\u1EA3nh B\xE1o",failure:"Th\u1EA5t B\u1EA1i",danger:"Nguy Hi\u1EC3m",bug:"L\u1ED7i",example:"V\xED D\u1EE5",quote:"Tr\xEDch D\u1EABn"},backlinks:{title:"Li\xEAn K\u1EBFt Ng\u01B0\u1EE3c",noBacklinksFound:"Kh\xF4ng c\xF3 li\xEAn k\u1EBFt ng\u01B0\u1EE3c \u0111\u01B0\u1EE3c t\xECm th\u1EA5y"},themeToggle:{lightMode:"S\xE1ng",darkMode:"T\u1ED1i"},explorer:{title:"Trong b\xE0i n\xE0y"},footer:{createdWith:"\u0110\u01B0\u1EE3c t\u1EA1o b\u1EDFi"},graph:{title:"Bi\u1EC3u \u0110\u1ED3"},recentNotes:{title:"B\xE0i vi\u1EBFt g\u1EA7n \u0111\xE2y",seeRemainingMore:__name(({remaining})=>`Xem ${remaining} th\xEAm \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Bao g\u1ED3m ${targetSlug}`,"transcludeOf"),linkToOriginal:"Li\xEAn K\u1EBFt G\u1ED1c"},search:{title:"T\xECm Ki\u1EBFm",searchBarPlaceholder:"T\xECm ki\u1EBFm th\xF4ng tin"},tableOfContents:{title:"B\u1EA3ng N\u1ED9i Dung"},contentMeta:{readingTime:__name(({minutes})=>`\u0111\u1ECDc ${minutes} ph\xFAt`,"readingTime")}},pages:{rss:{recentNotes:"Nh\u1EEFng b\xE0i g\u1EA7n \u0111\xE2y",lastFewNotes:__name(({count})=>`${count} B\xE0i g\u1EA7n \u0111\xE2y`,"lastFewNotes")},error:{title:"Kh\xF4ng T\xECm Th\u1EA5y",notFound:"Trang n\xE0y \u0111\u01B0\u1EE3c b\u1EA3o m\u1EADt ho\u1EB7c kh\xF4ng t\u1ED3n t\u1EA1i.",home:"Tr\u1EDF v\u1EC1 trang ch\u1EE7"},folderContent:{folder:"Th\u01B0 M\u1EE5c",itemsUnderFolder:__name(({count})=>count===1?"1 m\u1EE5c trong th\u01B0 m\u1EE5c n\xE0y.":`${count} m\u1EE5c trong th\u01B0 m\u1EE5c n\xE0y.`,"itemsUnderFolder")},tagContent:{tag:"Th\u1EBB",tagIndex:"Th\u1EBB M\u1EE5c L\u1EE5c",itemsUnderTag:__name(({count})=>count===1?"1 m\u1EE5c g\u1EAFn th\u1EBB n\xE0y.":`${count} m\u1EE5c g\u1EAFn th\u1EBB n\xE0y.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Hi\u1EC3n th\u1ECB tr\u01B0\u1EDBc ${count} th\u1EBB.`,"showingFirst"),totalTags:__name(({count})=>`T\xECm th\u1EA5y ${count} th\u1EBB t\u1ED5ng c\u1ED9ng.`,"totalTags")}}};var pt_BR_default={propertyDefaults:{title:"Sem t\xEDtulo",description:"Sem descri\xE7\xE3o"},components:{callout:{note:"Nota",abstract:"Abstrato",info:"Info",todo:"Pend\xEAncia",tip:"Dica",success:"Sucesso",question:"Pergunta",warning:"Aviso",failure:"Falha",danger:"Perigo",bug:"Bug",example:"Exemplo",quote:"Cita\xE7\xE3o"},backlinks:{title:"Backlinks",noBacklinksFound:"Sem backlinks encontrados"},themeToggle:{lightMode:"Tema claro",darkMode:"Tema escuro"},explorer:{title:"Explorador"},footer:{createdWith:"Criado com"},graph:{title:"Vis\xE3o de gr\xE1fico"},recentNotes:{title:"Notas recentes",seeRemainingMore:__name(({remaining})=>`Veja mais ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transcrever de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link ao original"},search:{title:"Pesquisar",searchBarPlaceholder:"Pesquisar por algo"},tableOfContents:{title:"Sum\xE1rio"},contentMeta:{readingTime:__name(({minutes})=>`Leitura de ${minutes} min`,"readingTime")}},pages:{rss:{recentNotes:"Notas recentes",lastFewNotes:__name(({count})=>`\xDAltimas ${count} notas`,"lastFewNotes")},error:{title:"N\xE3o encontrado",notFound:"Esta p\xE1gina \xE9 privada ou n\xE3o existe.",home:"Retornar a p\xE1gina inicial"},folderContent:{folder:"Arquivo",itemsUnderFolder:__name(({count})=>count===1?"1 item neste arquivo.":`${count} items neste arquivo.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Sum\xE1rio de Tags",itemsUnderTag:__name(({count})=>count===1?"1 item com esta tag.":`${count} items com esta tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Mostrando as ${count} primeiras tags.`,"showingFirst"),totalTags:__name(({count})=>`Encontradas ${count} tags.`,"totalTags")}}};var hu_HU_default={propertyDefaults:{title:"N\xE9vtelen",description:"Nincs le\xEDr\xE1s"},components:{callout:{note:"Jegyzet",abstract:"Abstract",info:"Inform\xE1ci\xF3",todo:"Tennival\xF3",tip:"Tipp",success:"Siker",question:"K\xE9rd\xE9s",warning:"Figyelmeztet\xE9s",failure:"Hiba",danger:"Vesz\xE9ly",bug:"Bug",example:"P\xE9lda",quote:"Id\xE9zet"},backlinks:{title:"Visszautal\xE1sok",noBacklinksFound:"Nincs visszautal\xE1s"},themeToggle:{lightMode:"Vil\xE1gos m\xF3d",darkMode:"S\xF6t\xE9t m\xF3d"},explorer:{title:"F\xE1jlb\xF6ng\xE9sz\u0151"},footer:{createdWith:"K\xE9sz\xEDtve ezzel:"},graph:{title:"Grafikonn\xE9zet"},recentNotes:{title:"Legut\xF3bbi jegyzetek",seeRemainingMore:__name(({remaining})=>`${remaining} tov\xE1bbi megtekint\xE9se \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug} \xE1thivatkoz\xE1sa`,"transcludeOf"),linkToOriginal:"Hivatkoz\xE1s az eredetire"},search:{title:"Keres\xE9s",searchBarPlaceholder:"Keress valamire"},tableOfContents:{title:"Tartalomjegyz\xE9k"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} perces olvas\xE1s`,"readingTime")}},pages:{rss:{recentNotes:"Legut\xF3bbi jegyzetek",lastFewNotes:__name(({count})=>`Legut\xF3bbi ${count} jegyzet`,"lastFewNotes")},error:{title:"Nem tal\xE1lhat\xF3",notFound:"Ez a lap vagy priv\xE1t vagy nem l\xE9tezik.",home:"Vissza a kezd\u0151lapra"},folderContent:{folder:"Mappa",itemsUnderFolder:__name(({count})=>`Ebben a mapp\xE1ban ${count} elem tal\xE1lhat\xF3.`,"itemsUnderFolder")},tagContent:{tag:"C\xEDmke",tagIndex:"C\xEDmke index",itemsUnderTag:__name(({count})=>`${count} elem tal\xE1lhat\xF3 ezzel a c\xEDmk\xE9vel.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Els\u0151 ${count} c\xEDmke megjelen\xEDtve.`,"showingFirst"),totalTags:__name(({count})=>`\xD6sszesen ${count} c\xEDmke tal\xE1lhat\xF3.`,"totalTags")}}};var fa_IR_default={propertyDefaults:{title:"\u0628\u062F\u0648\u0646 \u0639\u0646\u0648\u0627\u0646",description:"\u062A\u0648\u0636\u06CC\u062D \u062E\u0627\u0635\u06CC \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"},components:{callout:{note:"\u06CC\u0627\u062F\u062F\u0627\u0634\u062A",abstract:"\u0686\u06A9\u06CC\u062F\u0647",info:"\u0627\u0637\u0644\u0627\u0639\u0627\u062A",todo:"\u0627\u0642\u062F\u0627\u0645",tip:"\u0646\u06A9\u062A\u0647",success:"\u062A\u06CC\u06A9",question:"\u0633\u0624\u0627\u0644",warning:"\u0647\u0634\u062F\u0627\u0631",failure:"\u0634\u06A9\u0633\u062A",danger:"\u062E\u0637\u0631",bug:"\u0628\u0627\u06AF",example:"\u0645\u062B\u0627\u0644",quote:"\u0646\u0642\u0644 \u0642\u0648\u0644"},backlinks:{title:"\u0628\u06A9\u200C\u0644\u06CC\u0646\u06A9\u200C\u0647\u0627",noBacklinksFound:"\u0628\u062F\u0648\u0646 \u0628\u06A9\u200C\u0644\u06CC\u0646\u06A9"},themeToggle:{lightMode:"\u062D\u0627\u0644\u062A \u0631\u0648\u0634\u0646",darkMode:"\u062D\u0627\u0644\u062A \u062A\u0627\u0631\u06CC\u06A9"},explorer:{title:"\u0645\u0637\u0627\u0644\u0628"},footer:{createdWith:"\u0633\u0627\u062E\u062A\u0647 \u0634\u062F\u0647 \u0628\u0627"},graph:{title:"\u0646\u0645\u0627\u06CC \u06AF\u0631\u0627\u0641"},recentNotes:{title:"\u06CC\u0627\u062F\u062F\u0627\u0634\u062A\u200C\u0647\u0627\u06CC \u0627\u062E\u06CC\u0631",seeRemainingMore:__name(({remaining})=>`${remaining} \u06CC\u0627\u062F\u062F\u0627\u0634\u062A \u062F\u06CC\u06AF\u0631 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0627\u0632 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u067E\u06CC\u0648\u0646\u062F \u0628\u0647 \u0627\u0635\u0644\u06CC"},search:{title:"\u062C\u0633\u062A\u062C\u0648",searchBarPlaceholder:"\u0645\u0637\u0644\u0628\u06CC \u0631\u0627 \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F"},tableOfContents:{title:"\u0641\u0647\u0631\u0633\u062A"},contentMeta:{readingTime:__name(({minutes})=>`\u0632\u0645\u0627\u0646 \u062A\u0642\u0631\u06CC\u0628\u06CC \u0645\u0637\u0627\u0644\u0639\u0647: ${minutes} \u062F\u0642\u06CC\u0642\u0647`,"readingTime")}},pages:{rss:{recentNotes:"\u06CC\u0627\u062F\u062F\u0627\u0634\u062A\u200C\u0647\u0627\u06CC \u0627\u062E\u06CC\u0631",lastFewNotes:__name(({count})=>`${count} \u06CC\u0627\u062F\u062F\u0627\u0634\u062A \u0627\u062E\u06CC\u0631`,"lastFewNotes")},error:{title:"\u06CC\u0627\u0641\u062A \u0646\u0634\u062F",notFound:"\u0627\u06CC\u0646 \u0635\u0641\u062D\u0647 \u06CC\u0627 \u062E\u0635\u0648\u0635\u06CC \u0627\u0633\u062A \u06CC\u0627 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F",home:"\u0628\u0627\u0632\u06AF\u0634\u062A \u0628\u0647 \u0635\u0641\u062D\u0647 \u0627\u0635\u0644\u06CC"},folderContent:{folder:"\u067E\u0648\u0634\u0647",itemsUnderFolder:__name(({count})=>count===1?".\u06CC\u06A9 \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A":`${count} \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A.`,"itemsUnderFolder")},tagContent:{tag:"\u0628\u0631\u0686\u0633\u0628",tagIndex:"\u0641\u0647\u0631\u0633\u062A \u0628\u0631\u0686\u0633\u0628\u200C\u0647\u0627",itemsUnderTag:__name(({count})=>count===1?"\u06CC\u06A9 \u0645\u0637\u0644\u0628 \u0628\u0627 \u0627\u06CC\u0646 \u0628\u0631\u0686\u0633\u0628":`${count} \u0645\u0637\u0644\u0628 \u0628\u0627 \u0627\u06CC\u0646 \u0628\u0631\u0686\u0633\u0628.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u062F\u0631 \u062D\u0627\u0644 \u0646\u0645\u0627\u06CC\u0634 ${count} \u0628\u0631\u0686\u0633\u0628.`,"showingFirst"),totalTags:__name(({count})=>`${count} \u0628\u0631\u0686\u0633\u0628 \u06CC\u0627\u0641\u062A \u0634\u062F.`,"totalTags")}}};var pl_PL_default={propertyDefaults:{title:"Bez nazwy",description:"Brak opisu"},components:{callout:{note:"Notatka",abstract:"Streszczenie",info:"informacja",todo:"Do zrobienia",tip:"Wskaz\xF3wka",success:"Zrobione",question:"Pytanie",warning:"Ostrze\u017Cenie",failure:"Usterka",danger:"Niebiezpiecze\u0144stwo",bug:"B\u0142\u0105d w kodzie",example:"Przyk\u0142ad",quote:"Cytat"},backlinks:{title:"Odno\u015Bniki zwrotne",noBacklinksFound:"Brak po\u0142\u0105cze\u0144 zwrotnych"},themeToggle:{lightMode:"Trzyb jasny",darkMode:"Tryb ciemny"},explorer:{title:"Przegl\u0105daj"},footer:{createdWith:"Stworzone z u\u017Cyciem"},graph:{title:"Graf"},recentNotes:{title:"Najnowsze notatki",seeRemainingMore:__name(({remaining})=>`Zobacz ${remaining} nastepnych \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Osadzone ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0141\u0105cze do orygina\u0142u"},search:{title:"Szukaj",searchBarPlaceholder:"Search for something"},tableOfContents:{title:"Spis tre\u015Bci"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min. czytania `,"readingTime")}},pages:{rss:{recentNotes:"Najnowsze notatki",lastFewNotes:__name(({count})=>`Ostatnie ${count} notatek`,"lastFewNotes")},error:{title:"Nie znaleziono",notFound:"Ta strona jest prywatna lub nie istnieje.",home:"Powr\xF3t do strony g\u0142\xF3wnej"},folderContent:{folder:"Folder",itemsUnderFolder:__name(({count})=>count===1?"W tym folderze jest 1 element.":`Element\xF3w w folderze: ${count}.`,"itemsUnderFolder")},tagContent:{tag:"Znacznik",tagIndex:"Spis znacznik\xF3w",itemsUnderTag:__name(({count})=>count===1?"Oznaczony 1 element.":`Element\xF3w z tym znacznikiem: ${count}.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Pokazuje ${count} pierwszych znacznik\xF3w.`,"showingFirst"),totalTags:__name(({count})=>`Znalezionych wszystkich znacznik\xF3w: ${count}.`,"totalTags")}}};var cs_CZ_default={propertyDefaults:{title:"Bez n\xE1zvu",description:"Nebyl uveden \u017E\xE1dn\xFD popis"},components:{callout:{note:"Pozn\xE1mka",abstract:"Abstract",info:"Info",todo:"Todo",tip:"Tip",success:"\xDAsp\u011Bch",question:"Ot\xE1zka",warning:"Upozorn\u011Bn\xED",failure:"Chyba",danger:"Nebezpe\u010D\xED",bug:"Bug",example:"P\u0159\xEDklad",quote:"Citace"},backlinks:{title:"P\u0159\xEDchoz\xED odkazy",noBacklinksFound:"Nenalezeny \u017E\xE1dn\xE9 p\u0159\xEDchoz\xED odkazy"},themeToggle:{lightMode:"Sv\u011Btl\xFD re\u017Eim",darkMode:"Tmav\xFD re\u017Eim"},explorer:{title:"Proch\xE1zet"},footer:{createdWith:"Vytvo\u0159eno pomoc\xED"},graph:{title:"Graf"},recentNotes:{title:"Nejnov\u011Bj\u0161\xED pozn\xE1mky",seeRemainingMore:__name(({remaining})=>`Zobraz ${remaining} dal\u0161\xEDch \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Zobrazen\xED ${targetSlug}`,"transcludeOf"),linkToOriginal:"Odkaz na p\u016Fvodn\xED dokument"},search:{title:"Hledat",searchBarPlaceholder:"Hledejte n\u011Bco"},tableOfContents:{title:"Obsah"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min \u010Dten\xED`,"readingTime")}},pages:{rss:{recentNotes:"Nejnov\u011Bj\u0161\xED pozn\xE1mky",lastFewNotes:__name(({count})=>`Posledn\xEDch ${count} pozn\xE1mek`,"lastFewNotes")},error:{title:"Nenalezeno",notFound:"Tato str\xE1nka je bu\u010F soukrom\xE1, nebo neexistuje.",home:"N\xE1vrat na domovskou str\xE1nku"},folderContent:{folder:"Slo\u017Eka",itemsUnderFolder:__name(({count})=>count===1?"1 polo\u017Eka v t\xE9to slo\u017Ece.":`${count} polo\u017Eek v t\xE9to slo\u017Ece.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Rejst\u0159\xEDk tag\u016F",itemsUnderTag:__name(({count})=>count===1?"1 polo\u017Eka s t\xEDmto tagem.":`${count} polo\u017Eek s t\xEDmto tagem.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Zobrazuj\xED se prvn\xED ${count} tagy.`,"showingFirst"),totalTags:__name(({count})=>`Nalezeno celkem ${count} tag\u016F.`,"totalTags")}}};var tr_TR_default={propertyDefaults:{title:"\u0130simsiz",description:"Herhangi bir a\xE7\u0131klama eklenmedi"},components:{callout:{note:"Not",abstract:"\xD6zet",info:"Bilgi",todo:"Yap\u0131lacaklar",tip:"\u0130pucu",success:"Ba\u015Far\u0131l\u0131",question:"Soru",warning:"Uyar\u0131",failure:"Ba\u015Far\u0131s\u0131z",danger:"Tehlike",bug:"Hata",example:"\xD6rnek",quote:"Al\u0131nt\u0131"},backlinks:{title:"Backlinkler",noBacklinksFound:"Backlink bulunamad\u0131"},themeToggle:{lightMode:"A\xE7\u0131k mod",darkMode:"Koyu mod"},explorer:{title:"Gezgin"},footer:{createdWith:"\u015Eununla olu\u015Fturuldu"},graph:{title:"Grafik G\xF6r\xFCn\xFCm\xFC"},recentNotes:{title:"Son Notlar",seeRemainingMore:__name(({remaining})=>`${remaining} tane daha g\xF6r \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug} sayfas\u0131ndan al\u0131nt\u0131`,"transcludeOf"),linkToOriginal:"Orijinal ba\u011Flant\u0131"},search:{title:"Arama",searchBarPlaceholder:"Bir \u015Fey aray\u0131n"},tableOfContents:{title:"\u0130\xE7indekiler"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} dakika okuma s\xFCresi`,"readingTime")}},pages:{rss:{recentNotes:"Son notlar",lastFewNotes:__name(({count})=>`Son ${count} not`,"lastFewNotes")},error:{title:"Bulunamad\u0131",notFound:"Bu sayfa ya \xF6zel ya da mevcut de\u011Fil.",home:"Anasayfaya geri d\xF6n"},folderContent:{folder:"Klas\xF6r",itemsUnderFolder:__name(({count})=>count===1?"Bu klas\xF6r alt\u0131nda 1 \xF6\u011Fe.":`Bu klas\xF6r alt\u0131ndaki ${count} \xF6\u011Fe.`,"itemsUnderFolder")},tagContent:{tag:"Etiket",tagIndex:"Etiket S\u0131ras\u0131",itemsUnderTag:__name(({count})=>count===1?"Bu etikete sahip 1 \xF6\u011Fe.":`Bu etiket alt\u0131ndaki ${count} \xF6\u011Fe.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u0130lk ${count} etiket g\xF6steriliyor.`,"showingFirst"),totalTags:__name(({count})=>`Toplam ${count} adet etiket bulundu.`,"totalTags")}}};var th_TH_default={propertyDefaults:{title:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D",description:"\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E22\u0E48\u0E2D"},components:{callout:{note:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E2B\u0E15\u0E38",abstract:"\u0E1A\u0E17\u0E04\u0E31\u0E14\u0E22\u0E48\u0E2D",info:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",todo:"\u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",tip:"\u0E04\u0E33\u0E41\u0E19\u0E30\u0E19\u0E33",success:"\u0E40\u0E23\u0E35\u0E22\u0E1A\u0E23\u0E49\u0E2D\u0E22",question:"\u0E04\u0E33\u0E16\u0E32\u0E21",warning:"\u0E04\u0E33\u0E40\u0E15\u0E37\u0E2D\u0E19",failure:"\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",danger:"\u0E2D\u0E31\u0E19\u0E15\u0E23\u0E32\u0E22",bug:"\u0E1A\u0E31\u0E4A\u0E01",example:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07",quote:"\u0E04\u0E33\u0E1E\u0E39\u0E01\u0E22\u0E01\u0E21\u0E32"},backlinks:{title:"\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E01\u0E25\u0E48\u0E32\u0E27\u0E16\u0E36\u0E07",noBacklinksFound:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E42\u0E22\u0E07\u0E21\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49"},themeToggle:{lightMode:"\u0E42\u0E2B\u0E21\u0E14\u0E2A\u0E27\u0E48\u0E32\u0E07",darkMode:"\u0E42\u0E2B\u0E21\u0E14\u0E21\u0E37\u0E14"},explorer:{title:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2B\u0E19\u0E49\u0E32"},footer:{createdWith:"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E14\u0E49\u0E27\u0E22"},graph:{title:"\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E01\u0E23\u0E32\u0E1F"},recentNotes:{title:"\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",seeRemainingMore:__name(({remaining})=>`\u0E14\u0E39\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E35\u0E01 ${remaining} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0E23\u0E27\u0E21\u0E02\u0E49\u0E32\u0E21\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E08\u0E32\u0E01 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0E14\u0E39\u0E2B\u0E19\u0E49\u0E32\u0E15\u0E49\u0E19\u0E17\u0E32\u0E07"},search:{title:"\u0E04\u0E49\u0E19\u0E2B\u0E32",searchBarPlaceholder:"\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07"},tableOfContents:{title:"\u0E2A\u0E32\u0E23\u0E1A\u0E31\u0E0D"},contentMeta:{readingTime:__name(({minutes})=>`\u0E2D\u0E48\u0E32\u0E19\u0E23\u0E32\u0E27 ${minutes} \u0E19\u0E32\u0E17\u0E35`,"readingTime")}},pages:{rss:{recentNotes:"\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14",lastFewNotes:__name(({count})=>`${count} \u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14`,"lastFewNotes")},error:{title:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49",notFound:"\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49\u0E2D\u0E32\u0E08\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07",home:"\u0E01\u0E25\u0E31\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E2B\u0E25\u0E31\u0E01"},folderContent:{folder:"\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C",itemsUnderFolder:__name(({count})=>`\u0E21\u0E35 ${count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49`,"itemsUnderFolder")},tagContent:{tag:"\u0E41\u0E17\u0E47\u0E01",tagIndex:"\u0E41\u0E17\u0E47\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",itemsUnderTag:__name(({count})=>`\u0E21\u0E35 ${count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E41\u0E17\u0E47\u0E01\u0E19\u0E35\u0E49`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u0E41\u0E2A\u0E14\u0E07 ${count} \u0E41\u0E17\u0E47\u0E01\u0E41\u0E23\u0E01`,"showingFirst"),totalTags:__name(({count})=>`\u0E21\u0E35\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14 ${count} \u0E41\u0E17\u0E47\u0E01`,"totalTags")}}};var lt_LT_default={propertyDefaults:{title:"Be Pavadinimo",description:"Apra\u0161ymas Nepateiktas"},components:{callout:{note:"Pastaba",abstract:"Santrauka",info:"Informacija",todo:"Darb\u0173 s\u0105ra\u0161as",tip:"Patarimas",success:"S\u0117kmingas",question:"Klausimas",warning:"\u012Esp\u0117jimas",failure:"Nes\u0117kmingas",danger:"Pavojus",bug:"Klaida",example:"Pavyzdys",quote:"Citata"},backlinks:{title:"Atgalin\u0117s Nuorodos",noBacklinksFound:"Atgalini\u0173 Nuorod\u0173 Nerasta"},themeToggle:{lightMode:"\u0160viesus Re\u017Eimas",darkMode:"Tamsus Re\u017Eimas"},explorer:{title:"Nar\u0161ykl\u0117"},footer:{createdWith:"Sukurta Su"},graph:{title:"Grafiko Vaizdas"},recentNotes:{title:"Naujausi U\u017Era\u0161ai",seeRemainingMore:__name(({remaining})=>`Per\u017Ei\u016Br\u0117ti dar ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u012Eterpimas i\u0161 ${targetSlug}`,"transcludeOf"),linkToOriginal:"Nuoroda \u012F original\u0105"},search:{title:"Paie\u0161ka",searchBarPlaceholder:"Ie\u0161koti"},tableOfContents:{title:"Turinys"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min skaitymo`,"readingTime")}},pages:{rss:{recentNotes:"Naujausi u\u017Era\u0161ai",lastFewNotes:__name(({count})=>count===1?"Paskutinis 1 u\u017Era\u0161as":count<10?`Paskutiniai ${count} u\u017Era\u0161ai`:`Paskutiniai ${count} u\u017Era\u0161\u0173`,"lastFewNotes")},error:{title:"Nerasta",notFound:"Arba \u0161is puslapis yra pasiekiamas tik tam tikriems vartotojams, arba tokio puslapio n\u0117ra.",home:"Gr\u012F\u017Eti \u012F pagrindin\u012F puslap\u012F"},folderContent:{folder:"Aplankas",itemsUnderFolder:__name(({count})=>count===1?"1 elementas \u0161iame aplanke.":count<10?`${count} elementai \u0161iame aplanke.`:`${count} element\u0173 \u0161iame aplanke.`,"itemsUnderFolder")},tagContent:{tag:"\u017Dyma",tagIndex:"\u017Dym\u0173 indeksas",itemsUnderTag:__name(({count})=>count===1?"1 elementas su \u0161ia \u017Eyma.":count<10?`${count} elementai su \u0161ia \u017Eyma.`:`${count} element\u0173 su \u0161ia \u017Eyma.`,"itemsUnderTag"),showingFirst:__name(({count})=>count<10?`Rodomos pirmosios ${count} \u017Eymos.`:`Rodomos pirmosios ${count} \u017Eym\u0173.`,"showingFirst"),totalTags:__name(({count})=>count===1?"Rasta i\u0161 viso 1 \u017Eyma.":count<10?`Rasta i\u0161 viso ${count} \u017Eymos.`:`Rasta i\u0161 viso ${count} \u017Eym\u0173.`,"totalTags")}}};var fi_FI_default={propertyDefaults:{title:"Nimet\xF6n",description:"Ei kuvausta saatavilla"},components:{callout:{note:"Merkint\xE4",abstract:"Tiivistelm\xE4",info:"Info",todo:"Teht\xE4v\xE4lista",tip:"Vinkki",success:"Onnistuminen",question:"Kysymys",warning:"Varoitus",failure:"Ep\xE4onnistuminen",danger:"Vaara",bug:"Virhe",example:"Esimerkki",quote:"Lainaus"},backlinks:{title:"Takalinkit",noBacklinksFound:"Takalinkkej\xE4 ei l\xF6ytynyt"},themeToggle:{lightMode:"Vaalea tila",darkMode:"Tumma tila"},explorer:{title:"Selain"},footer:{createdWith:"Luotu k\xE4ytt\xE4en"},graph:{title:"Verkkon\xE4kym\xE4"},recentNotes:{title:"Viimeisimm\xE4t muistiinpanot",seeRemainingMore:__name(({remaining})=>`N\xE4yt\xE4 ${remaining} lis\xE4\xE4 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Upote kohteesta ${targetSlug}`,"transcludeOf"),linkToOriginal:"Linkki alkuper\xE4iseen"},search:{title:"Haku",searchBarPlaceholder:"Hae jotain"},tableOfContents:{title:"Sis\xE4llysluettelo"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min lukuaika`,"readingTime")}},pages:{rss:{recentNotes:"Viimeisimm\xE4t muistiinpanot",lastFewNotes:__name(({count})=>`Viimeiset ${count} muistiinpanoa`,"lastFewNotes")},error:{title:"Ei l\xF6ytynyt",notFound:"T\xE4m\xE4 sivu on joko yksityinen tai sit\xE4 ei ole olemassa.",home:"Palaa etusivulle"},folderContent:{folder:"Kansio",itemsUnderFolder:__name(({count})=>count===1?"1 kohde t\xE4ss\xE4 kansiossa.":`${count} kohdetta t\xE4ss\xE4 kansiossa.`,"itemsUnderFolder")},tagContent:{tag:"Tunniste",tagIndex:"Tunnisteluettelo",itemsUnderTag:__name(({count})=>count===1?"1 kohde t\xE4ll\xE4 tunnisteella.":`${count} kohdetta t\xE4ll\xE4 tunnisteella.`,"itemsUnderTag"),showingFirst:__name(({count})=>`N\xE4ytet\xE4\xE4n ensimm\xE4iset ${count} tunnistetta.`,"showingFirst"),totalTags:__name(({count})=>`L\xF6ytyi yhteens\xE4 ${count} tunnistetta.`,"totalTags")}}};var nb_NO_default={propertyDefaults:{title:"Uten navn",description:"Ingen beskrivelse angitt"},components:{callout:{note:"Notis",abstract:"Abstrakt",info:"Info",todo:"Husk p\xE5",tip:"Tips",success:"Suksess",question:"Sp\xF8rsm\xE5l",warning:"Advarsel",failure:"Feil",danger:"Farlig",bug:"Bug",example:"Eksempel",quote:"Sitat"},backlinks:{title:"Tilbakekoblinger",noBacklinksFound:"Ingen tilbakekoblinger funnet"},themeToggle:{lightMode:"Lys modus",darkMode:"M\xF8rk modus"},explorer:{title:"Utforsker"},footer:{createdWith:"Laget med"},graph:{title:"Graf-visning"},recentNotes:{title:"Nylige notater",seeRemainingMore:__name(({remaining})=>`Se ${remaining} til \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transkludering of ${targetSlug}`,"transcludeOf"),linkToOriginal:"Lenke til original"},search:{title:"S\xF8k",searchBarPlaceholder:"S\xF8k etter noe"},tableOfContents:{title:"Oversikt"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min lesning`,"readingTime")}},pages:{rss:{recentNotes:"Nylige notat",lastFewNotes:__name(({count})=>`Siste ${count} notat`,"lastFewNotes")},error:{title:"Ikke funnet",notFound:"Enten er denne siden privat eller s\xE5 finnes den ikke.",home:"Returner til hovedsiden"},folderContent:{folder:"Mappe",itemsUnderFolder:__name(({count})=>count===1?"1 gjenstand i denne mappen.":`${count} gjenstander i denne mappen.`,"itemsUnderFolder")},tagContent:{tag:"Tagg",tagIndex:"Tagg Indeks",itemsUnderTag:__name(({count})=>count===1?"1 gjenstand med denne taggen.":`${count} gjenstander med denne taggen.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Viser f\xF8rste ${count} tagger.`,"showingFirst"),totalTags:__name(({count})=>`Fant totalt ${count} tagger.`,"totalTags")}}};var TRANSLATIONS={"en-US":en_US_default,"en-GB":en_GB_default,"fr-FR":fr_FR_default,"it-IT":it_IT_default,"ja-JP":ja_JP_default,"de-DE":de_DE_default,"nl-NL":nl_NL_default,"nl-BE":nl_NL_default,"ro-RO":ro_RO_default,"ro-MD":ro_RO_default,"ca-ES":ca_ES_default,"es-ES":es_ES_default,"ar-SA":ar_SA_default,"ar-AE":ar_SA_default,"ar-QA":ar_SA_default,"ar-BH":ar_SA_default,"ar-KW":ar_SA_default,"ar-OM":ar_SA_default,"ar-YE":ar_SA_default,"ar-IR":ar_SA_default,"ar-SY":ar_SA_default,"ar-IQ":ar_SA_default,"ar-JO":ar_SA_default,"ar-PL":ar_SA_default,"ar-LB":ar_SA_default,"ar-EG":ar_SA_default,"ar-SD":ar_SA_default,"ar-LY":ar_SA_default,"ar-MA":ar_SA_default,"ar-TN":ar_SA_default,"ar-DZ":ar_SA_default,"ar-MR":ar_SA_default,"uk-UA":uk_UA_default,"ru-RU":ru_RU_default,"ko-KR":ko_KR_default,"zh-CN":zh_CN_default,"zh-TW":zh_TW_default,"vi-VN":vi_VN_default,"pt-BR":pt_BR_default,"hu-HU":hu_HU_default,"fa-IR":fa_IR_default,"pl-PL":pl_PL_default,"cs-CZ":cs_CZ_default,"tr-TR":tr_TR_default,"th-TH":th_TH_default,"lt-LT":lt_LT_default,"fi-FI":fi_FI_default,"nb-NO":nb_NO_default},defaultTranslation="en-US",i18n=__name(locale=>TRANSLATIONS[locale??defaultTranslation],"i18n");import path2 from"path";var defaultOptions={delimiters:"---",language:"yaml"};function coalesceAliases(data,aliases){for(let alias of aliases)if(data[alias]!==void 0&&data[alias]!==null)return data[alias]}__name(coalesceAliases,"coalesceAliases");function coerceToArray(input){if(input!=null)return Array.isArray(input)||(input=input.toString().split(",").map(tag=>tag.trim())),input.filter(tag=>typeof tag=="string"||typeof tag=="number").map(tag=>tag.toString())}__name(coerceToArray,"coerceToArray");function getAliasSlugs(aliases,argv,file){let dir=path2.posix.relative(argv.directory,path2.dirname(file.data.filePath)),slugs=aliases.map(alias=>path2.posix.join(dir,slugifyFilePath(alias))),permalink=file.data.frontmatter?.permalink;return typeof permalink=="string"&&slugs.push(permalink),slugs.map(slug=>slug.endsWith("/")?joinSegments(slug,"index"):slug)}__name(getAliasSlugs,"getAliasSlugs");var FrontMatter=__name(userOpts=>{let opts={...defaultOptions,...userOpts};return{name:"FrontMatter",markdownPlugins({cfg,allSlugs,argv}){return[[remarkFrontmatter,["yaml","toml"]],()=>(_,file)=>{let{data}=matter(Buffer.from(file.value),{...opts,engines:{yaml:__name(s=>yaml.load(s,{schema:yaml.JSON_SCHEMA}),"yaml"),toml:__name(s=>toml.parse(s),"toml")}});data.title!=null&&data.title.toString()!==""?data.title=data.title.toString():data.title=file.stem??i18n(cfg.configuration.locale).propertyDefaults.title;let tags=coerceToArray(coalesceAliases(data,["tags","tag"]));tags&&(data.tags=[...new Set(tags.map(tag=>slugTag(tag)))]);let aliases=coerceToArray(coalesceAliases(data,["aliases","alias"]));if(aliases){data.aliases=aliases;let slugs=file.data.aliases=getAliasSlugs(aliases,argv,file);allSlugs.push(...slugs)}let cssclasses=coerceToArray(coalesceAliases(data,["cssclasses","cssclass"]));cssclasses&&(data.cssclasses=cssclasses);let socialImage=coalesceAliases(data,["socialImage","image","cover"]),created=coalesceAliases(data,["created","date"]);created&&(data.created=created);let modified=coalesceAliases(data,["modified","lastmod","updated","last-modified"]);modified&&(data.modified=modified);let published=coalesceAliases(data,["published","publishDate","date"]);published&&(data.published=published),socialImage&&(data.socialImage=socialImage),file.data.frontmatter=data}]}}},"FrontMatter");import remarkGfm from"remark-gfm";import smartypants from"remark-smartypants";import rehypeSlug from"rehype-slug";import rehypeAutolinkHeadings from"rehype-autolink-headings";var defaultOptions2={enableSmartyPants:!0,linkHeadings:!0},GitHubFlavoredMarkdown=__name(userOpts=>{let opts={...defaultOptions2,...userOpts};return{name:"GitHubFlavoredMarkdown",markdownPlugins(){return opts.enableSmartyPants?[remarkGfm,smartypants]:[remarkGfm]},htmlPlugins(){return opts.linkHeadings?[rehypeSlug,[rehypeAutolinkHeadings,{behavior:"append",properties:{role:"anchor",ariaHidden:!0,tabIndex:-1,"data-no-popover":!0},content:{type:"element",tagName:"svg",properties:{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},children:[{type:"element",tagName:"path",properties:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},children:[]},{type:"element",tagName:"path",properties:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},children:[]}]}}]]:[]}}},"GitHubFlavoredMarkdown");import rehypeCitation from"rehype-citation";import{visit}from"unist-util-visit";import fs from"fs";import path3 from"path";import{Repository}from"@napi-rs/simple-git";import chalk3 from"chalk";var defaultOptions3={priority:["frontmatter","git","filesystem"]};function coerceDate(fp,d){let dt=new Date(d),invalidDate=isNaN(dt.getTime())||dt.getTime()===0;return invalidDate&&d!==void 0&&console.log(chalk3.yellow(`
|
|
Warning: found invalid date "${d}" in \`${fp}\`. Supported formats: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format`)),invalidDate?new Date:dt}__name(coerceDate,"coerceDate");var CreatedModifiedDate=__name(userOpts=>{let opts={...defaultOptions3,...userOpts};return{name:"CreatedModifiedDate",markdownPlugins(){return[()=>{let repo;return async(_tree,file)=>{let created,modified,published,fp=file.data.filePath,fullFp=path3.isAbsolute(fp)?fp:path3.posix.join(file.cwd,fp);for(let source of opts.priority)if(source==="filesystem"){let st=await fs.promises.stat(fullFp);created||=st.birthtimeMs,modified||=st.mtimeMs}else if(source==="frontmatter"&&file.data.frontmatter)created||=file.data.frontmatter.created,modified||=file.data.frontmatter.modified,published||=file.data.frontmatter.published;else if(source==="git"){repo||(repo=Repository.discover(file.cwd));try{modified||=await repo.getFileLatestModifiedDateAsync(file.data.filePath)}catch{console.log(chalk3.yellow(`
|
|
Warning: ${file.data.filePath} isn't yet tracked by git, last modification date is not available for this file`))}}file.data.dates={created:coerceDate(fp,created),modified:coerceDate(fp,modified),published:coerceDate(fp,published)}}}]}}},"CreatedModifiedDate");import remarkMath from"remark-math";import rehypeKatex from"rehype-katex";import rehypeMathjax from"rehype-mathjax/svg";import rehypeTypst from"@myriaddreamin/rehype-typst";var Latex=__name(opts=>{let engine=opts?.renderEngine??"katex",macros=opts?.customMacros??{};return{name:"Latex",markdownPlugins(){return[remarkMath]},htmlPlugins(){switch(engine){case"katex":return[[rehypeKatex,{output:"html",macros,...opts?.katexOptions??{}}]];case"typst":return[[rehypeTypst,opts?.typstOptions??{}]];case"mathjax":return[[rehypeMathjax,{macros,...opts?.mathJaxOptions??{}}]];default:return[[rehypeMathjax,{macros,...opts?.mathJaxOptions??{}}]]}},externalResources(){switch(engine){case"katex":return{css:[{content:"https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"}],js:[{src:"https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/copy-tex.min.js",loadTime:"afterDOMReady",contentType:"external"}]};default:return{css:[],js:[]}}}}},"Latex");import{toString}from"hast-util-to-string";var escapeHTML=__name(unsafe=>unsafe.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"escapeHTML"),unescapeHTML=__name(html=>html.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'"),"unescapeHTML");var defaultOptions4={descriptionLength:150,replaceExternalLinks:!0},urlRegex=new RegExp(/(https?:\/\/)?(?<domain>([\da-z\.-]+)\.([a-z\.]{2,6})(:\d+)?)(?<path>[\/\w\.-]*)(\?[\/\w\.=&;-]*)?/,"g"),Description=__name(userOpts=>{let opts={...defaultOptions4,...userOpts};return{name:"Description",htmlPlugins(){return[()=>async(tree,file)=>{let frontMatterDescription=file.data.frontmatter?.description,text=escapeHTML(toString(tree));opts.replaceExternalLinks&&(frontMatterDescription=frontMatterDescription?.replace(urlRegex,"$<domain>$<path>"),text=text.replace(urlRegex,"$<domain>$<path>"));let sentences=(frontMatterDescription??text).replace(/\s+/g," ").split(/\.\s/),finalDesc=[],len=opts.descriptionLength,sentenceIdx=0,currentDescriptionLength=0;if(sentences[0]!==void 0&&sentences[0].length>=len){let firstSentence=sentences[0].split(" ");for(;currentDescriptionLength<len;){let sentence=firstSentence[sentenceIdx];if(!sentence)break;finalDesc.push(sentence),currentDescriptionLength+=sentence.length,sentenceIdx++}finalDesc.push("...")}else for(;currentDescriptionLength<len;){let sentence=sentences[sentenceIdx];if(!sentence)break;let currentSentence=sentence.endsWith(".")?sentence:sentence+".";finalDesc.push(currentSentence),currentDescriptionLength+=currentSentence.length,sentenceIdx++}file.data.description=finalDesc.join(" "),file.data.text=text}]}}},"Description");import path4 from"path";import{visit as visit2}from"unist-util-visit";import isAbsoluteUrl from"is-absolute-url";var defaultOptions5={markdownLinkResolution:"absolute",prettyLinks:!0,openLinksInNewTab:!1,lazyLoad:!1,externalLinkIcon:!0},CrawlLinks=__name(userOpts=>{let opts={...defaultOptions5,...userOpts};return{name:"LinkProcessing",htmlPlugins(ctx){return[()=>(tree,file)=>{let curSlug=simplifySlug(file.data.slug),outgoing=new Set,transformOptions={strategy:opts.markdownLinkResolution,allSlugs:ctx.allSlugs};visit2(tree,"element",(node,_index,_parent)=>{if(node.tagName==="a"&&node.properties&&typeof node.properties.href=="string"){let dest=node.properties.href,classes=node.properties.className??[],isExternal=isAbsoluteUrl(dest);classes.push(isExternal?"external":"internal"),isExternal&&opts.externalLinkIcon&&node.children.push({type:"element",tagName:"svg",properties:{"aria-hidden":"true",class:"external-icon",style:"max-width:0.8em;max-height:0.8em",viewBox:"0 0 512 512"},children:[{type:"element",tagName:"path",properties:{d:"M320 0H288V64h32 82.7L201.4 265.4 178.7 288 224 333.3l22.6-22.6L448 109.3V192v32h64V192 32 0H480 320zM32 32H0V64 480v32H32 456h32V480 352 320H424v32 96H64V96h96 32V32H160 32z"},children:[]}]}),node.children.length===1&&node.children[0].type==="text"&&node.children[0].value!==dest&&classes.push("alias"),node.properties.className=classes,isExternal&&opts.openLinksInNewTab&&(node.properties.target="_blank");let isInternal=!(isAbsoluteUrl(dest)||dest.startsWith("#"));if(isInternal){dest=node.properties.href=transformLink(file.data.slug,dest,transformOptions);let canonicalDest=new URL(dest,"https://base.com/"+stripSlashes(curSlug,!0)).pathname,[destCanonical,_destAnchor]=splitAnchor(canonicalDest);destCanonical.endsWith("/")&&(destCanonical+="index");let full=decodeURIComponent(stripSlashes(destCanonical,!0)),simple=simplifySlug(full);outgoing.add(simple),node.properties["data-slug"]=full}opts.prettyLinks&&isInternal&&node.children.length===1&&node.children[0].type==="text"&&!node.children[0].value.startsWith("#")&&(node.children[0].value=path4.basename(node.children[0].value))}if(["img","video","audio","iframe"].includes(node.tagName)&&node.properties&&typeof node.properties.src=="string"&&(opts.lazyLoad&&(node.properties.loading="lazy"),!isAbsoluteUrl(node.properties.src))){let dest=node.properties.src;dest=node.properties.src=transformLink(file.data.slug,dest,transformOptions),node.properties.src=dest}}),file.data.links=[...outgoing]}]}}},"CrawlLinks");import{findAndReplace as mdastFindReplace}from"mdast-util-find-and-replace";import rehypeRaw from"rehype-raw";import{SKIP,visit as visit3}from"unist-util-visit";import path5 from"path";var callout_inline_default=`function c(){let t=this.parentElement;t.classList.toggle("is-collapsed");let l=t.classList.contains("is-collapsed")?this.scrollHeight:t.scrollHeight;t.style.maxHeight=l+"px";let o=t,e=t.parentElement;for(;e;){if(!e.classList.contains("callout"))return;let n=e.classList.contains("is-collapsed")?e.scrollHeight:e.scrollHeight+o.scrollHeight;e.style.maxHeight=n+"px",o=e,e=e.parentElement}}function i(){let t=document.getElementsByClassName("callout is-collapsible");for(let s of t){let l=s.firstElementChild;if(l){l.addEventListener("click",c),window.addCleanup(()=>l.removeEventListener("click",c));let e=s.classList.contains("is-collapsed")?l.scrollHeight:s.scrollHeight;s.style.maxHeight=e+"px"}}}document.addEventListener("nav",i);window.addEventListener("resize",i);
|
|
`;var checkbox_inline_default='var m=Object.create;var f=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var j=(t,e,n,A)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of S(e))!b.call(t,i)&&i!==n&&f(t,i,{get:()=>e[i],enumerable:!(A=x(e,i))||A.enumerable});return t};var v=(t,e,n)=>(n=t!=null?m(y(t)):{},j(e||!t||!t.__esModule?f(n,"default",{value:t,enumerable:!0}):n,t));var p=R((_,g)=>{"use strict";g.exports=w;function B(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function w(t){if(t=t||{},t.circles)return L(t);let e=new Map;if(e.set(Date,F=>new Date(F)),e.set(Map,(F,l)=>new Map(A(Array.from(F),l))),e.set(Set,(F,l)=>new Set(A(Array.from(F),l))),t.constructorHandlers)for(let F of t.constructorHandlers)e.set(F[0],F[1]);let n=null;return t.proto?C:i;function A(F,l){let u=Object.keys(F),D=new Array(u.length);for(let E=0;E<u.length;E++){let r=u[E],s=F[r];typeof s!="object"||s===null?D[r]=s:s.constructor!==Object&&(n=e.get(s.constructor))?D[r]=n(s,l):ArrayBuffer.isView(s)?D[r]=B(s):D[r]=l(s)}return D}function i(F){if(typeof F!="object"||F===null)return F;if(Array.isArray(F))return A(F,i);if(F.constructor!==Object&&(n=e.get(F.constructor)))return n(F,i);let l={};for(let u in F){if(Object.hasOwnProperty.call(F,u)===!1)continue;let D=F[u];typeof D!="object"||D===null?l[u]=D:D.constructor!==Object&&(n=e.get(D.constructor))?l[u]=n(D,i):ArrayBuffer.isView(D)?l[u]=B(D):l[u]=i(D)}return l}function C(F){if(typeof F!="object"||F===null)return F;if(Array.isArray(F))return A(F,C);if(F.constructor!==Object&&(n=e.get(F.constructor)))return n(F,C);let l={};for(let u in F){let D=F[u];typeof D!="object"||D===null?l[u]=D:D.constructor!==Object&&(n=e.get(D.constructor))?l[u]=n(D,C):ArrayBuffer.isView(D)?l[u]=B(D):l[u]=C(D)}return l}}function L(t){let e=[],n=[],A=new Map;if(A.set(Date,u=>new Date(u)),A.set(Map,(u,D)=>new Map(C(Array.from(u),D))),A.set(Set,(u,D)=>new Set(C(Array.from(u),D))),t.constructorHandlers)for(let u of t.constructorHandlers)A.set(u[0],u[1]);let i=null;return t.proto?l:F;function C(u,D){let E=Object.keys(u),r=new Array(E.length);for(let s=0;s<E.length;s++){let c=E[s],o=u[c];if(typeof o!="object"||o===null)r[c]=o;else if(o.constructor!==Object&&(i=A.get(o.constructor)))r[c]=i(o,D);else if(ArrayBuffer.isView(o))r[c]=B(o);else{let a=e.indexOf(o);a!==-1?r[c]=n[a]:r[c]=D(o)}}return r}function F(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return C(u,F);if(u.constructor!==Object&&(i=A.get(u.constructor)))return i(u,F);let D={};e.push(u),n.push(D);for(let E in u){if(Object.hasOwnProperty.call(u,E)===!1)continue;let r=u[E];if(typeof r!="object"||r===null)D[E]=r;else if(r.constructor!==Object&&(i=A.get(r.constructor)))D[E]=i(r,F);else if(ArrayBuffer.isView(r))D[E]=B(r);else{let s=e.indexOf(r);s!==-1?D[E]=n[s]:D[E]=F(r)}}return e.pop(),n.pop(),D}function l(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return C(u,l);if(u.constructor!==Object&&(i=A.get(u.constructor)))return i(u,l);let D={};e.push(u),n.push(D);for(let E in u){let r=u[E];if(typeof r!="object"||r===null)D[E]=r;else if(r.constructor!==Object&&(i=A.get(r.constructor)))D[E]=i(r,l);else if(ArrayBuffer.isView(r))D[E]=B(r);else{let s=e.indexOf(r);s!==-1?D[E]=n[s]:D[E]=l(r)}}return e.pop(),n.pop(),D}}});var H=Object.hasOwnProperty;var h=v(p(),1),$=(0,h.default)();function d(t){return t.document.body.dataset.slug}var O=t=>`${d(window)}-checkbox-${t}`;document.addEventListener("nav",()=>{document.querySelectorAll("input.checkbox-toggle").forEach((e,n)=>{let A=O(n),i=C=>{let F=C.target?.checked?"true":"false";localStorage.setItem(A,F)};e.addEventListener("change",i),window.addCleanup(()=>e.removeEventListener("change",i)),localStorage.getItem(A)==="true"&&(e.checked=!0)})});\n';import{toHast}from"mdast-util-to-hast";import{toHtml}from"hast-util-to-html";function capitalize(s){return s.substring(0,1).toUpperCase()+s.substring(1)}__name(capitalize,"capitalize");function classNames(displayClass,...classes){return displayClass&&classes.push(displayClass),classes.join(" ")}__name(classNames,"classNames");var defaultOptions6={comments:!0,highlight:!0,wikilinks:!0,callouts:!0,mermaid:!0,parseTags:!0,parseArrows:!0,parseBlockReferences:!0,enableInHtmlEmbed:!1,enableYouTubeEmbed:!0,enableVideoEmbed:!0,enableCheckbox:!1},calloutMapping={note:"note",abstract:"abstract",summary:"abstract",tldr:"abstract",info:"info",todo:"todo",tip:"tip",hint:"tip",important:"tip",success:"success",check:"success",done:"success",question:"question",help:"question",faq:"question",warning:"warning",attention:"warning",caution:"warning",failure:"failure",missing:"failure",fail:"failure",danger:"danger",error:"danger",bug:"bug",example:"example",quote:"quote",cite:"quote"},arrowMapping={"->":"→","-->":"⇒","=>":"⇒","==>":"⇒","<-":"←","<--":"⇐","<=":"⇐","<==":"⇐"};function canonicalizeCallout(calloutName){let normalizedCallout=calloutName.toLowerCase();return calloutMapping[normalizedCallout]??calloutName}__name(canonicalizeCallout,"canonicalizeCallout");var externalLinkRegex=/^https?:\/\//i,arrowRegex=new RegExp(/(-{1,2}>|={1,2}>|<-{1,2}|<={1,2})/g),wikilinkRegex=new RegExp(/!?\[\[([^\[\]\|\#\\]+)?(#+[^\[\]\|\#\\]+)?(\\?\|[^\[\]\#]+)?\]\]/g),tableRegex=new RegExp(/^\|([^\n])+\|\n(\|)( ?:?-{3,}:? ?\|)+\n(\|([^\n])+\|\n?)+/gm),tableWikilinkRegex=new RegExp(/(!?\[\[[^\]]*?\]\]|\[\^[^\]]*?\])/g),highlightRegex=new RegExp(/==([^=]+)==/g),commentRegex=new RegExp(/%%[\s\S]*?%%/g),calloutRegex=new RegExp(/^\[\!([\w-]+)\|?(.+?)?\]([+-]?)/),calloutLineRegex=new RegExp(/^> *\[\!\w+\|?.*?\][+-]?.*$/gm),tagRegex=new RegExp(/(?<=^| )#((?:[-_\p{L}\p{Emoji}\p{M}\d])+(?:\/[-_\p{L}\p{Emoji}\p{M}\d]+)*)/gu),blockReferenceRegex=new RegExp(/\^([-_A-Za-z0-9]+)$/g),ytLinkRegex=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,ytPlaylistLinkRegex=/[?&]list=([^#?&]*)/,videoExtensionRegex=new RegExp(/\.(mp4|webm|ogg|avi|mov|flv|wmv|mkv|mpg|mpeg|3gp|m4v)$/),wikilinkImageEmbedRegex=new RegExp(/^(?<alt>(?!^\d*x?\d*$).*?)?(\|?\s*?(?<width>\d+)(x(?<height>\d+))?)?$/),ObsidianFlavoredMarkdown=__name(userOpts=>{let opts={...defaultOptions6,...userOpts},mdastToHtml=__name(ast=>{let hast=toHast(ast,{allowDangerousHtml:!0});return toHtml(hast,{allowDangerousHtml:!0})},"mdastToHtml");return{name:"ObsidianFlavoredMarkdown",textTransform(_ctx,src){return opts.comments&&(src instanceof Buffer&&(src=src.toString()),src=src.replace(commentRegex,"")),opts.callouts&&(src instanceof Buffer&&(src=src.toString()),src=src.replace(calloutLineRegex,value=>value+`
|
|
> `)),opts.wikilinks&&(src instanceof Buffer&&(src=src.toString()),src=src.replace(tableRegex,value=>value.replace(tableWikilinkRegex,(_value,raw)=>{let escaped=raw??"";return escaped=escaped.replace("#","\\#"),escaped=escaped.replace(/((^|[^\\])(\\\\)*)\|/g,"$1\\|"),escaped})),src=src.replace(wikilinkRegex,(value,...capture)=>{let[rawFp,rawHeader,rawAlias]=capture,[fp,anchor]=splitAnchor(`${rawFp??""}${rawHeader??""}`),blockRef=rawHeader?.match(/^#?\^/)?"^":"",displayAnchor=anchor?`#${blockRef}${anchor.trim().replace(/^#+/,"")}`:"",displayAlias=rawAlias??rawHeader?.replace("#","|")??"",embedDisplay=value.startsWith("!")?"!":"";return rawFp?.match(externalLinkRegex)?`${embedDisplay}[${displayAlias.replace(/^\|/,"")}](${rawFp})`:`${embedDisplay}[[${fp}${displayAnchor}${displayAlias}]]`})),src},markdownPlugins(_ctx){let plugins=[];return plugins.push(()=>(tree,file)=>{let replacements=[],base=pathToRoot(file.data.slug);opts.wikilinks&&replacements.push([wikilinkRegex,(value,...capture)=>{let[rawFp,rawHeader,rawAlias]=capture,fp=rawFp?.trim()??"",anchor=rawHeader?.trim()??"",alias=rawAlias?.slice(1).trim();if(value.startsWith("!")){let ext=path5.extname(fp).toLowerCase(),url2=slugifyFilePath(fp);if([".png",".jpg",".jpeg",".gif",".bmp",".svg",".webp"].includes(ext)){let match=wikilinkImageEmbedRegex.exec(alias??""),alt=match?.groups?.alt??"",width=match?.groups?.width??"auto",height=match?.groups?.height??"auto";return{type:"image",url:url2,data:{hProperties:{width,height,alt}}}}else{if([".mp4",".webm",".ogv",".mov",".mkv"].includes(ext))return{type:"html",value:`<video src="${url2}" controls></video>`};if([".mp3",".webm",".wav",".m4a",".ogg",".3gp",".flac"].includes(ext))return{type:"html",value:`<audio src="${url2}" controls></audio>`};if([".pdf"].includes(ext))return{type:"html",value:`<iframe src="${url2}" class="pdf"></iframe>`};{let block=anchor;return{type:"html",data:{hProperties:{transclude:!0}},value:`<blockquote class="transclude" data-url="${url2}" data-block="${block}" data-embed-alias="${alias}"><a href="${url2+anchor}" class="transclude-inner">Transclude of ${url2}${block}</a></blockquote>`}}}}return{type:"link",url:fp+anchor,children:[{type:"text",value:alias??fp}]}}]),opts.highlight&&replacements.push([highlightRegex,(_value,...capture)=>{let[inner]=capture;return{type:"html",value:`<span class="text-highlight">${inner}</span>`}}]),opts.parseArrows&&replacements.push([arrowRegex,(value,..._capture)=>{let maybeArrow=arrowMapping[value];return maybeArrow===void 0?SKIP:{type:"html",value:`<span>${maybeArrow}</span>`}}]),opts.parseTags&&replacements.push([tagRegex,(_value,tag)=>{if(/^[\/\d]+$/.test(tag))return!1;if(tag=slugTag(tag),file.data.frontmatter){let noteTags=file.data.frontmatter.tags??[];file.data.frontmatter.tags=[...new Set([...noteTags,tag])]}return{type:"link",url:base+`/tags/${tag}`,data:{hProperties:{className:["tag-link"]}},children:[{type:"text",value:tag}]}}]),opts.enableInHtmlEmbed&&visit3(tree,"html",node=>{for(let[regex,replace]of replacements)typeof replace=="string"?node.value=node.value.replace(regex,replace):node.value=node.value.replace(regex,(substring,...args)=>{let replaceValue=replace(substring,...args);return typeof replaceValue=="string"?replaceValue:Array.isArray(replaceValue)?replaceValue.map(mdastToHtml).join(""):typeof replaceValue=="object"&&replaceValue!==null?mdastToHtml(replaceValue):substring})}),mdastFindReplace(tree,replacements)}),opts.enableVideoEmbed&&plugins.push(()=>(tree,_file)=>{visit3(tree,"image",(node,index,parent)=>{if(parent&&index!=null&&videoExtensionRegex.test(node.url)){let newNode={type:"html",value:`<video controls src="${node.url}"></video>`};return parent.children.splice(index,1,newNode),SKIP}})}),opts.callouts&&plugins.push(()=>(tree,_file)=>{visit3(tree,"blockquote",node=>{if(node.children.length===0)return;let[firstChild,...calloutContent]=node.children;if(firstChild.type!=="paragraph"||firstChild.children[0]?.type!=="text")return;let text=firstChild.children[0].value,restOfTitle=firstChild.children.slice(1),[firstLine,...remainingLines]=text.split(`
|
|
`),remainingText=remainingLines.join(`
|
|
`),match=firstLine.match(calloutRegex);if(match&&match.input){let[calloutDirective,typeString,calloutMetaData,collapseChar]=match,calloutType=canonicalizeCallout(typeString.toLowerCase()),collapse=collapseChar==="+"||collapseChar==="-",defaultState=collapseChar==="-"?"collapsed":"expanded",titleContent=match.input.slice(calloutDirective.length).trim(),titleNode={type:"paragraph",children:[{type:"text",value:titleContent===""&&restOfTitle.length===0?capitalize(typeString).replace(/-/g," "):titleContent+" "},...restOfTitle]},blockquoteContent=[{type:"html",value:`<div
|
|
class="callout-title"
|
|
>
|
|
<div class="callout-icon"></div>
|
|
<div class="callout-title-inner">${mdastToHtml(titleNode)}</div>
|
|
${collapse?'<div class="fold-callout-icon"></div>':""}
|
|
</div>`}];remainingText.length>0&&blockquoteContent.push({type:"paragraph",children:[{type:"text",value:remainingText}]}),node.children.splice(0,1,...blockquoteContent);let classNames2=["callout",calloutType];if(collapse&&classNames2.push("is-collapsible"),defaultState==="collapsed"&&classNames2.push("is-collapsed"),node.data={hProperties:{...node.data?.hProperties??{},className:classNames2.join(" "),"data-callout":calloutType,"data-callout-fold":collapse,"data-callout-metadata":calloutMetaData}},calloutContent.length>0){let contentData={data:{hProperties:{className:"callout-content"},hName:"div"},type:"blockquote",children:[...calloutContent]};node.children=[node.children[0],contentData]}}})}),opts.mermaid&&plugins.push(()=>(tree,file)=>{visit3(tree,"code",node=>{node.lang==="mermaid"&&(file.data.hasMermaidDiagram=!0,node.data={hProperties:{className:["mermaid"],"data-clipboard":JSON.stringify(node.value)}})})}),plugins},htmlPlugins(){let plugins=[rehypeRaw];return opts.parseBlockReferences&&plugins.push(()=>{let inlineTagTypes=new Set(["p","li"]),blockTagTypes=new Set(["blockquote"]);return(tree,file)=>{file.data.blocks={},visit3(tree,"element",(node,index,parent)=>{if(blockTagTypes.has(node.tagName)){let nextChild=parent?.children.at(index+2);if(nextChild&&nextChild.tagName==="p"){let text=nextChild.children.at(0);if(text&&text.value&&text.type==="text"){let matches=text.value.match(blockReferenceRegex);if(matches&&matches.length>=1){parent.children.splice(index+2,1);let block=matches[0].slice(1);Object.keys(file.data.blocks).includes(block)||(node.properties={...node.properties,id:block},file.data.blocks[block]=node)}}}}else if(inlineTagTypes.has(node.tagName)){let last=node.children.at(-1);if(last&&last.value&&typeof last.value=="string"){let matches=last.value.match(blockReferenceRegex);if(matches&&matches.length>=1){last.value=last.value.slice(0,-matches[0].length);let block=matches[0].slice(1);if(last.value===""){let idx=(index??1)-1;for(;idx>=0;){let element=parent?.children.at(idx);if(!element)break;if(element.type!=="element")idx-=1;else{Object.keys(file.data.blocks).includes(block)||(element.properties={...element.properties,id:block},file.data.blocks[block]=element);return}}}else Object.keys(file.data.blocks).includes(block)||(node.properties={...node.properties,id:block},file.data.blocks[block]=node)}}}}),file.data.htmlAst=tree}}),opts.enableYouTubeEmbed&&plugins.push(()=>tree=>{visit3(tree,"element",node=>{if(node.tagName==="img"&&typeof node.properties.src=="string"){let match=node.properties.src.match(ytLinkRegex),videoId=match&&match[2].length==11?match[2]:null,playlistId=node.properties.src.match(ytPlaylistLinkRegex)?.[1];videoId?(node.tagName="iframe",node.properties={class:"external-embed youtube",allow:"fullscreen",frameborder:0,width:"600px",src:playlistId?`https://www.youtube.com/embed/${videoId}?list=${playlistId}`:`https://www.youtube.com/embed/${videoId}`}):playlistId&&(node.tagName="iframe",node.properties={class:"external-embed youtube",allow:"fullscreen",frameborder:0,width:"600px",src:`https://www.youtube.com/embed/videoseries?list=${playlistId}`})}})}),opts.enableCheckbox&&plugins.push(()=>(tree,_file)=>{visit3(tree,"element",node=>{if(node.tagName==="input"&&node.properties.type==="checkbox"){let isChecked=node.properties?.checked??!1;node.properties={type:"checkbox",disabled:!1,checked:isChecked,class:"checkbox-toggle"}}})}),opts.mermaid&&plugins.push(()=>(tree,_file)=>{visit3(tree,"element",(node,_idx,parent)=>{node.tagName==="code"&&(node.properties?.className??[])?.includes("mermaid")&&(parent.children=[{type:"element",tagName:"button",properties:{className:["expand-button"],"aria-label":"Expand mermaid diagram","aria-hidden":"true","data-view-component":!0},children:[{type:"element",tagName:"svg",properties:{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor"},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M3.72 3.72a.75.75 0 011.06 1.06L2.56 7h10.88l-2.22-2.22a.75.75 0 011.06-1.06l3.5 3.5a.75.75 0 010 1.06l-3.5 3.5a.75.75 0 11-1.06-1.06l2.22-2.22H2.56l2.22 2.22a.75.75 0 11-1.06 1.06l-3.5-3.5a.75.75 0 010-1.06l3.5-3.5z"},children:[]}]}]},node,{type:"element",tagName:"div",properties:{id:"mermaid-container"},children:[{type:"element",tagName:"div",properties:{id:"mermaid-space"},children:[{type:"element",tagName:"div",properties:{className:["mermaid-header"]},children:[{type:"element",tagName:"button",properties:{className:["close-button"],"aria-label":"close button"},children:[{type:"element",tagName:"svg",properties:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},children:[{type:"element",tagName:"line",properties:{x1:18,y1:6,x2:6,y2:18},children:[]},{type:"element",tagName:"line",properties:{x1:6,y1:6,x2:18,y2:18},children:[]}]}]}]},{type:"element",tagName:"div",properties:{className:["mermaid-content"]},children:[]}]}]}])})}),plugins},externalResources(){let js=[],css=[];return opts.enableCheckbox&&js.push({script:checkbox_inline_default,loadTime:"afterDOMReady",contentType:"inline"}),opts.callouts&&js.push({script:callout_inline_default,loadTime:"afterDOMReady",contentType:"inline"}),{js,css}}}},"ObsidianFlavoredMarkdown");var relrefRegex=new RegExp(/\[([^\]]+)\]\(\{\{< relref "([^"]+)" >\}\}\)/,"g"),predefinedHeadingIdRegex=new RegExp(/(.*) {#(?:.*)}/,"g"),hugoShortcodeRegex=new RegExp(/{{(.*)}}/,"g"),figureTagRegex=new RegExp(/< ?figure src="(.*)" ?>/,"g"),inlineLatexRegex=new RegExp(/\\\\\((.+?)\\\\\)/,"g"),blockLatexRegex=new RegExp(/(?:\\begin{equation}|\\\\\(|\\\\\[)([\s\S]*?)(?:\\\\\]|\\\\\)|\\end{equation})/,"g"),quartzLatexRegex=new RegExp(/\$\$[\s\S]*?\$\$|\$.*?\$/,"g");import rehypePrettyCode from"rehype-pretty-code";var defaultOptions7={theme:{light:"github-light",dark:"github-dark"},keepBackground:!1},SyntaxHighlighting=__name(userOpts=>{let opts={...defaultOptions7,...userOpts};return{name:"SyntaxHighlighting",htmlPlugins(){return[[rehypePrettyCode,opts]]}}},"SyntaxHighlighting");import{visit as visit4}from"unist-util-visit";import{toString as toString2}from"mdast-util-to-string";import Slugger from"github-slugger";var defaultOptions8={maxDepth:3,minEntries:1,showByDefault:!0,collapseByDefault:!1},slugAnchor2=new Slugger,TableOfContents=__name(userOpts=>{let opts={...defaultOptions8,...userOpts};return{name:"TableOfContents",markdownPlugins(){return[()=>async(tree,file)=>{if(file.data.frontmatter?.enableToc??opts.showByDefault){slugAnchor2.reset();let toc=[],highestDepth=opts.maxDepth;visit4(tree,"heading",node=>{if(node.depth<=opts.maxDepth){let text=toString2(node);highestDepth=Math.min(highestDepth,node.depth),toc.push({depth:node.depth,text,slug:slugAnchor2.slug(text)})}}),toc.length>0&&toc.length>opts.minEntries&&(file.data.toc=toc.map(entry=>({...entry,depth:entry.depth-highestDepth})),file.data.collapseToc=opts.collapseByDefault)}}]}}},"TableOfContents");import remarkBreaks from"remark-breaks";var HardLineBreaks=__name(()=>({name:"HardLineBreaks",markdownPlugins(){return[remarkBreaks]}}),"HardLineBreaks");import{visit as visit5}from"unist-util-visit";import{findAndReplace as mdastFindReplace2}from"mdast-util-find-and-replace";var orRegex=new RegExp(/{{or:(.*?)}}/,"g"),TODORegex=new RegExp(/{{.*?\bTODO\b.*?}}/,"g"),DONERegex=new RegExp(/{{.*?\bDONE\b.*?}}/,"g"),videoRegex=new RegExp(/{{.*?\[\[video\]\].*?\:(.*?)}}/,"g"),youtubeRegex=new RegExp(/{{.*?\[\[video\]\].*?(https?:\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?[\w\?=]*)?)}}/,"g"),audioRegex=new RegExp(/{{.*?\[\[audio\]\].*?\:(.*?)}}/,"g"),pdfRegex=new RegExp(/{{.*?\[\[pdf\]\].*?\:(.*?)}}/,"g"),blockquoteRegex=new RegExp(/(\[\[>\]\])\s*(.*)/,"g"),roamHighlightRegex=new RegExp(/\^\^(.+)\^\^/,"g"),roamItalicRegex=new RegExp(/__(.+)__/,"g"),tableRegex2=new RegExp(/- {{.*?\btable\b.*?}}/,"g"),attributeRegex=new RegExp(/\b\w+(?:\s+\w+)*::/,"g");var RemoveDrafts=__name(()=>({name:"RemoveDrafts",shouldPublish(_ctx,[_tree,vfile]){return!(vfile.data?.frontmatter?.draft===!0||vfile.data?.frontmatter?.draft==="true")}}),"RemoveDrafts");import path8 from"path";import{visit as visit7}from"unist-util-visit";import{jsx}from"preact/jsx-runtime";var Header=__name(({children})=>children.length>0?jsx("header",{children}):null,"Header");Header.css=`
|
|
header {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
margin: 2rem 0;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
header h1 {
|
|
margin: 0;
|
|
flex: auto;
|
|
}
|
|
`;var Header_default=__name(()=>Header,"default");var clipboard_inline_default=`var r='<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg>',l='<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" fill="rgb(63, 185, 80)" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>';document.addEventListener("nav",()=>{let a=document.getElementsByTagName("pre");for(let t=0;t<a.length;t++){let n=a[t].getElementsByTagName("code")[0];if(n){let o=function(){navigator.clipboard.writeText(i).then(()=>{e.blur(),e.innerHTML=l,setTimeout(()=>{e.innerHTML=r,e.style.borderColor=""},2e3)},d=>console.error(d))};var c=o;let i=(n.dataset.clipboard?JSON.parse(n.dataset.clipboard):n.innerText).replace(/\\n\\n/g,\`
|
|
\`),e=document.createElement("button");e.className="clipboard-button",e.type="button",e.innerHTML=r,e.ariaLabel="Copy source",e.addEventListener("click",o),window.addCleanup(()=>e.removeEventListener("click",o)),a[t].prepend(e)}}});
|
|
`;var clipboard_default=`.clipboard-button {
|
|
position: absolute;
|
|
display: flex;
|
|
float: right;
|
|
right: 0;
|
|
padding: 0.4rem;
|
|
margin: 0.3rem;
|
|
color: var(--gray);
|
|
border-color: var(--dark);
|
|
background-color: var(--light);
|
|
border: 1px solid;
|
|
border-radius: 5px;
|
|
opacity: 0;
|
|
transition: 0.2s;
|
|
}
|
|
.clipboard-button > svg {
|
|
fill: var(--light);
|
|
filter: contrast(0.3);
|
|
}
|
|
.clipboard-button:hover {
|
|
cursor: pointer;
|
|
border-color: var(--secondary);
|
|
}
|
|
.clipboard-button:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
pre:hover > .clipboard-button {
|
|
opacity: 1;
|
|
transition: 0.2s;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJjbGlwYm9hcmQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7O0FBR0Y7RUFDRTs7O0FBS0Y7RUFDRTtFQUNBIiwic291cmNlc0NvbnRlbnQiOlsiLmNsaXBib2FyZC1idXR0b24ge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsb2F0OiByaWdodDtcbiAgcmlnaHQ6IDA7XG4gIHBhZGRpbmc6IDAuNHJlbTtcbiAgbWFyZ2luOiAwLjNyZW07XG4gIGNvbG9yOiB2YXIoLS1ncmF5KTtcbiAgYm9yZGVyLWNvbG9yOiB2YXIoLS1kYXJrKTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbGlnaHQpO1xuICBib3JkZXI6IDFweCBzb2xpZDtcbiAgYm9yZGVyLXJhZGl1czogNXB4O1xuICBvcGFjaXR5OiAwO1xuICB0cmFuc2l0aW9uOiAwLjJzO1xuXG4gICYgPiBzdmcge1xuICAgIGZpbGw6IHZhcigtLWxpZ2h0KTtcbiAgICBmaWx0ZXI6IGNvbnRyYXN0KDAuMyk7XG4gIH1cblxuICAmOmhvdmVyIHtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1zZWNvbmRhcnkpO1xuICB9XG5cbiAgJjpmb2N1cyB7XG4gICAgb3V0bGluZTogMDtcbiAgfVxufVxuXG5wcmUge1xuICAmOmhvdmVyID4gLmNsaXBib2FyZC1idXR0b24ge1xuICAgIG9wYWNpdHk6IDE7XG4gICAgdHJhbnNpdGlvbjogMC4ycztcbiAgfVxufVxuIl19 */`;import{jsx as jsx2}from"preact/jsx-runtime";var Body=__name(({children})=>jsx2("div",{id:"quartz-body",children}),"Body");Body.afterDOMLoaded=clipboard_inline_default;Body.css=clipboard_default;var Body_default=__name(()=>Body,"default");import{render}from"preact-render-to-string";import{randomUUID}from"crypto";import{jsx as jsx3}from"preact/jsx-runtime";function JSResourceToScriptElement(resource,preserve){let scriptType=resource.moduleType??"application/javascript",spaPreserve=preserve??resource.spaPreserve;if(resource.contentType==="external")return jsx3("script",{src:resource.src,type:scriptType,"spa-preserve":spaPreserve},resource.src);{let content=resource.script;return jsx3("script",{type:scriptType,"spa-preserve":spaPreserve,dangerouslySetInnerHTML:{__html:content}},randomUUID())}}__name(JSResourceToScriptElement,"JSResourceToScriptElement");function CSSResourceToStyleElement(resource,preserve){let spaPreserve=preserve??resource.spaPreserve;return resource.inline??!1?jsx3("style",{children:resource.content}):jsx3("link",{href:resource.content,rel:"stylesheet",type:"text/css","spa-preserve":spaPreserve},resource.content)}__name(CSSResourceToStyleElement,"CSSResourceToStyleElement");import{visit as visit6}from"unist-util-visit";var mermaid_inline_default='function L(c){for(;c.firstChild;)c.removeChild(c.firstChild)}var h=class{constructor(e,t){this.container=e;this.content=t;this.setupEventListeners(),this.setupNavigationControls()}isDragging=!1;startPan={x:0,y:0};currentPan={x:0,y:0};scale=1;MIN_SCALE=.5;MAX_SCALE=3;ZOOM_SENSITIVITY=.001;setupEventListeners(){this.container.addEventListener("mousedown",this.onMouseDown.bind(this)),document.addEventListener("mousemove",this.onMouseMove.bind(this)),document.addEventListener("mouseup",this.onMouseUp.bind(this)),this.container.addEventListener("wheel",this.onWheel.bind(this),{passive:!1}),window.addEventListener("resize",this.resetTransform.bind(this))}setupNavigationControls(){let e=document.createElement("div");e.className="mermaid-controls";let t=this.createButton("+",()=>this.zoom(.1)),n=this.createButton("-",()=>this.zoom(-.1)),s=this.createButton("Reset",()=>this.resetTransform());e.appendChild(n),e.appendChild(s),e.appendChild(t),this.container.appendChild(e)}createButton(e,t){let n=document.createElement("button");return n.textContent=e,n.className="mermaid-control-button",n.addEventListener("click",t),window.addCleanup(()=>n.removeEventListener("click",t)),n}onMouseDown(e){e.button===0&&(this.isDragging=!0,this.startPan={x:e.clientX-this.currentPan.x,y:e.clientY-this.currentPan.y},this.container.style.cursor="grabbing")}onMouseMove(e){this.isDragging&&(e.preventDefault(),this.currentPan={x:e.clientX-this.startPan.x,y:e.clientY-this.startPan.y},this.updateTransform())}onMouseUp(){this.isDragging=!1,this.container.style.cursor="grab"}onWheel(e){e.preventDefault();let t=-e.deltaY*this.ZOOM_SENSITIVITY,n=Math.min(Math.max(this.scale+t,this.MIN_SCALE),this.MAX_SCALE),s=this.content.getBoundingClientRect(),r=e.clientX-s.left,i=e.clientY-s.top,o=n-this.scale;this.currentPan.x-=r*o,this.currentPan.y-=i*o,this.scale=n,this.updateTransform()}zoom(e){let t=Math.min(Math.max(this.scale+e,this.MIN_SCALE),this.MAX_SCALE),n=this.content.getBoundingClientRect(),s=n.width/2,r=n.height/2,i=t-this.scale;this.currentPan.x-=s*i,this.currentPan.y-=r*i,this.scale=t,this.updateTransform()}updateTransform(){this.content.style.transform=`translate(${this.currentPan.x}px, ${this.currentPan.y}px) scale(${this.scale})`}resetTransform(){this.scale=1,this.currentPan={x:0,y:0},this.updateTransform()}},T=["--secondary","--tertiary","--gray","--light","--lightgray","--highlight","--dark","--darkgray","--codeFont"],M;document.addEventListener("nav",async()=>{let e=document.querySelector(".center").querySelectorAll("code.mermaid");if(e.length===0)return;let t=T.reduce((r,i)=>(r[i]=getComputedStyle(document.documentElement).getPropertyValue(i),r),{});M||=await import("https://cdnjs.cloudflare.com/ajax/libs/mermaid/11.4.0/mermaid.esm.min.mjs");let n=M.default,s=document.documentElement.getAttribute("saved-theme")==="dark";n.initialize({startOnLoad:!1,securityLevel:"loose",theme:s?"dark":"base",themeVariables:{fontFamily:t["--codeFont"],primaryColor:t["--light"],primaryTextColor:t["--darkgray"],primaryBorderColor:t["--tertiary"],lineColor:t["--darkgray"],secondaryColor:t["--secondary"],tertiaryColor:t["--tertiary"],clusterBkg:t["--light"],edgeLabelBackground:t["--highlight"]}}),await n.run({nodes:e});for(let r=0;r<e.length;r++){let E=function(){let d=a.querySelector("#mermaid-space"),u=a.querySelector(".mermaid-content");if(!u)return;L(u);let w=i.querySelector("svg").cloneNode(!0);u.appendChild(w),a.classList.add("active"),d.style.cursor="grab",y=new h(d,u)},m=function(){a.classList.remove("active"),y=null},f=function(d){d.key==="Escape"&&m()},i=e[r],o=i.parentElement,p=o.querySelector(".clipboard-button"),l=o.querySelector(".expand-button"),v=window.getComputedStyle(p),C=p.offsetWidth+parseFloat(v.marginLeft||"0")+parseFloat(v.marginRight||"0");l.style.right=`calc(${C}px + 0.3rem)`,o.prepend(l);let a=o.querySelector("#mermaid-container");if(!a)return;let y=null,g=a.querySelector(".close-button");g.addEventListener("click",m),l.addEventListener("click",E),document.addEventListener("keydown",f),window.addCleanup(()=>{g.removeEventListener("click",m),l.removeEventListener("click",E),document.removeEventListener("keydown",f)})}});\n';var mermaid_inline_default2=`.expand-button {
|
|
position: absolute;
|
|
display: flex;
|
|
float: right;
|
|
padding: 0.4rem;
|
|
margin: 0.3rem;
|
|
right: 0;
|
|
color: var(--gray);
|
|
border-color: var(--dark);
|
|
background-color: var(--light);
|
|
border: 1px solid;
|
|
border-radius: 5px;
|
|
opacity: 0;
|
|
transition: 0.2s;
|
|
}
|
|
.expand-button > svg {
|
|
fill: var(--light);
|
|
filter: contrast(0.3);
|
|
}
|
|
.expand-button:hover {
|
|
cursor: pointer;
|
|
border-color: var(--secondary);
|
|
}
|
|
.expand-button:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
pre:hover > .expand-button {
|
|
opacity: 1;
|
|
transition: 0.2s;
|
|
}
|
|
|
|
#mermaid-container {
|
|
position: fixed;
|
|
contain: layout;
|
|
z-index: 999;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
display: none;
|
|
backdrop-filter: blur(4px);
|
|
background: rgba(0, 0, 0, 0.5);
|
|
}
|
|
#mermaid-container.active {
|
|
display: inline-block;
|
|
}
|
|
#mermaid-container > #mermaid-space {
|
|
display: grid;
|
|
width: 90%;
|
|
height: 90vh;
|
|
margin: 5vh auto;
|
|
background: var(--light);
|
|
box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-header {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
padding: 1rem;
|
|
border-bottom: 1px solid var(--lightgray);
|
|
background: var(--light);
|
|
z-index: 2;
|
|
max-height: fit-content;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-header > .close-button {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
padding: 0;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 4px;
|
|
color: var(--darkgray);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-header > .close-button:hover {
|
|
background: var(--lightgray);
|
|
color: var(--dark);
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-content {
|
|
padding: 2rem;
|
|
position: relative;
|
|
transform-origin: 0 0;
|
|
transition: transform 0.1s ease;
|
|
overflow: visible;
|
|
min-height: 200px;
|
|
min-width: 200px;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-content pre {
|
|
margin: 0;
|
|
border: none;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-content svg {
|
|
max-width: none;
|
|
height: auto;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-controls {
|
|
position: absolute;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 8px;
|
|
background: var(--light);
|
|
border: 1px solid var(--lightgray);
|
|
border-radius: 6px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
z-index: 2;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
padding: 0;
|
|
border: 1px solid var(--lightgray);
|
|
background: var(--light);
|
|
color: var(--dark);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
font-family: var(--bodyFont);
|
|
transition: all 0.2s ease;
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button:hover {
|
|
background: var(--lightgray);
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button:active {
|
|
transform: translateY(1px);
|
|
}
|
|
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button:nth-child(2) {
|
|
width: auto;
|
|
padding: 0 12px;
|
|
font-size: 14px;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJtZXJtYWlkLmlubGluZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFOzs7QUFLRjtFQUNFO0VBQ0E7OztBQUlKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBLFlBQ0U7RUFFRjtFQUNBOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRU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c2libGU7XG4gICAgICBtaW4taGVpZ2h0OiAyMDBweDtcbiAgICAgIG1pbi13aWR0aDogMjAwcHg7XG5cbiAgICAgIHByZSB7XG4gICAgICAgIG1hcmdpbjogMDtcbiAgICAgICAgYm9yZGVyOiBub25lO1xuICAgICAgfVxuXG4gICAgICBzdmcge1xuICAgICAgICBtYXgtd2lkdGg6IG5vbmU7XG4gICAgICAgIGhlaWdodDogYXV0bztcbiAgICAgIH1cbiAgICB9XG5cbiAgICAmID4gLm1lcm1haWQtY29udHJvbHMge1xuICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgYm90dG9tOiAyMHB4O1xuICAgICAgcmlnaHQ6IDIwcHg7XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgZ2FwOiA4cHg7XG4gICAgICBwYWRkaW5nOiA4cHg7XG4gICAgICBiYWNrZ3JvdW5kOiB2YXIoLS1saWdodCk7XG4gICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1saWdodGdyYXkpO1xuICAgICAgYm9yZGVyLXJhZGl1czogNnB4O1xuICAgICAgYm94LXNoYWRvdzogMCAycHggNHB4IHJnYmEoMCwgMCwgMCwgMC4xKTtcbiAgICAgIHotaW5kZXg6IDI7XG5cbiAgICAgIC5tZXJtYWlkLWNvbnRyb2wtYnV0dG9uIHtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICAgIHdpZHRoOiAzMnB4O1xuICAgICAgICBoZWlnaHQ6IDMycHg7XG4gICAgICAgIHBhZGRpbmc6IDA7XG4gICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gICAgICAgIGJhY2tncm91bmQ6IHZhcigtLWxpZ2h0KTtcbiAgICAgICAgY29sb3I6IHZhcigtLWRhcmspO1xuICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7XG4gICAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICAgZm9udC1zaXplOiAxNnB4O1xuICAgICAgICBmb250LWZhbWlseTogdmFyKC0tYm9keUZvbnQpO1xuICAgICAgICB0cmFuc2l0aW9uOiBhbGwgMC4ycyBlYXNlO1xuXG4gICAgICAgICY6aG92ZXIge1xuICAgICAgICAgIGJhY2tncm91bmQ6IHZhcigtLWxpZ2h0Z3JheSk7XG4gICAgICAgIH1cblxuICAgICAgICAmOmFjdGl2ZSB7XG4gICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKDFweCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBTdHlsZSB0aGUgcmVzZXQgYnV0dG9uIGRpZmZlcmVudGx5XG4gICAgICAgICY6bnRoLWNoaWxkKDIpIHtcbiAgICAgICAgICB3aWR0aDogYXV0bztcbiAgICAgICAgICBwYWRkaW5nOiAwIDEycHg7XG4gICAgICAgICAgZm9udC1zaXplOiAxNHB4O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0= */`;import{jsx as jsx4,jsxs}from"preact/jsx-runtime";var headerRegex=new RegExp(/h[1-6]/);function pageResources(baseDir,fileData,staticResources){let contentIndexScript=`const fetchData = fetch("${joinSegments(baseDir,"static/contentIndex.json")}").then(data => data.json())`,resources={css:[{content:joinSegments(baseDir,"index.css")},...staticResources.css],js:[{src:joinSegments(baseDir,"prescript.js"),loadTime:"beforeDOMReady",contentType:"external"},{loadTime:"beforeDOMReady",contentType:"inline",spaPreserve:!0,script:contentIndexScript},...staticResources.js]};return fileData.hasMermaidDiagram&&(resources.js.push({script:mermaid_inline_default,loadTime:"afterDOMReady",moduleType:"module",contentType:"inline"}),resources.css.push({content:mermaid_inline_default2,inline:!0})),resources.js.push({src:joinSegments(baseDir,"postscript.js"),loadTime:"afterDOMReady",moduleType:"module",contentType:"external"}),resources}__name(pageResources,"pageResources");function renderPage(cfg,slug,componentData,components,pageResources2){let root=clone(componentData.tree);visit6(root,"element",(node,_index,_parent)=>{if(node.tagName==="blockquote"&&(node.properties?.className??[]).includes("transclude")){let inner=node.children[0],transcludeTarget=inner.properties["data-slug"],page=componentData.allFiles.find(f=>f.slug===transcludeTarget);if(!page)return;let blockRef=node.properties.dataBlock;if(blockRef?.startsWith("#^")){blockRef=blockRef.slice(2);let blockNode=page.blocks?.[blockRef];blockNode&&(blockNode.tagName==="li"&&(blockNode={type:"element",tagName:"ul",properties:{},children:[blockNode]}),node.children=[normalizeHastElement(blockNode,slug,transcludeTarget),{type:"element",tagName:"a",properties:{href:inner.properties?.href,class:["internal","transclude-src"]},children:[{type:"text",value:i18n(cfg.locale).components.transcludes.linkToOriginal}]}])}else if(blockRef?.startsWith("#")&&page.htmlAst){blockRef=blockRef.slice(1);let startIdx,startDepth,endIdx;for(let[i,el]of page.htmlAst.children.entries()){if(!(el.type==="element"&&el.tagName.match(headerRegex)))continue;let depth=Number(el.tagName.substring(1));if(startIdx===void 0||startDepth===void 0)el.properties?.id===blockRef&&(startIdx=i,startDepth=depth);else if(depth<=startDepth){endIdx=i;break}}if(startIdx===void 0)return;node.children=[...page.htmlAst.children.slice(startIdx,endIdx).map(child=>normalizeHastElement(child,slug,transcludeTarget)),{type:"element",tagName:"a",properties:{href:inner.properties?.href,class:["internal","transclude-src"]},children:[{type:"text",value:i18n(cfg.locale).components.transcludes.linkToOriginal}]}]}else page.htmlAst&&(node.children=[{type:"element",tagName:"h1",properties:{},children:[{type:"text",value:page.frontmatter?.title??i18n(cfg.locale).components.transcludes.transcludeOf({targetSlug:page.slug})}]},...page.htmlAst.children.map(child=>normalizeHastElement(child,slug,transcludeTarget)),{type:"element",tagName:"a",properties:{href:inner.properties?.href,class:["internal","transclude-src"]},children:[{type:"text",value:i18n(cfg.locale).components.transcludes.linkToOriginal}]}])}}),componentData.tree=root;let{head:Head,header,beforeBody,pageBody:Content2,afterBody,left,right,footer:Footer}=components,Header2=Header_default(),Body2=Body_default(),LeftComponent=jsx4("div",{class:"left sidebar",children:left.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))}),RightComponent=jsx4("div",{class:"right sidebar",children:right.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))}),lang=componentData.fileData.frontmatter?.lang??cfg.locale?.split("-")[0]??"en",doc=jsxs("html",{lang,children:[jsx4(Head,{...componentData}),jsx4("body",{"data-slug":slug,children:jsx4("div",{id:"quartz-root",class:"page",children:jsxs(Body2,{...componentData,children:[LeftComponent,jsxs("div",{class:"center",children:[jsxs("div",{class:"page-header",children:[jsx4(Header2,{...componentData,children:header.map(HeaderComponent=>jsx4(HeaderComponent,{...componentData}))}),jsx4("div",{class:"popover-hint",children:beforeBody.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))})]}),jsx4(Content2,{...componentData}),jsx4("hr",{}),jsx4("div",{class:"page-footer",children:afterBody.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))})]}),RightComponent,jsx4(Footer,{...componentData})]})})}),pageResources2.js.filter(resource=>resource.loadTime==="afterDOMReady").map(res=>JSResourceToScriptElement(res))]});return`<!DOCTYPE html>
|
|
`+render(doc)}__name(renderPage,"renderPage");import{toJsxRuntime}from"hast-util-to-jsx-runtime";import{Fragment,jsx as jsx5,jsxs as jsxs2}from"preact/jsx-runtime";import{jsx as jsx6}from"preact/jsx-runtime";var customComponents={table:__name(props=>jsx6("div",{class:"table-container",children:jsx6("table",{...props})}),"table")};function htmlToJsx(fp,tree){try{return toJsxRuntime(tree,{Fragment,jsx:jsx5,jsxs:jsxs2,elementAttributeNameCase:"html",components:customComponents})}catch(e){trace(`Failed to parse Markdown in \`${fp}\` into JSX`,e)}}__name(htmlToJsx,"htmlToJsx");import{jsx as jsx7}from"preact/jsx-runtime";var Content=__name(({fileData,tree})=>{let content=htmlToJsx(fileData.filePath,tree),classString=["popover-hint",...fileData.frontmatter?.cssclasses??[]].join(" ");return jsx7("article",{class:classString,children:content})},"Content"),Content_default=__name(()=>Content,"default");var listPage_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
ul.section-ul {
|
|
list-style: none;
|
|
margin-top: 2em;
|
|
padding-left: 0;
|
|
}
|
|
|
|
li.section-li {
|
|
margin-bottom: 1em;
|
|
}
|
|
li.section-li > .section {
|
|
display: grid;
|
|
grid-template-columns: fit-content(8em) 3fr 1fr;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
li.section-li > .section > .tags {
|
|
display: none;
|
|
}
|
|
}
|
|
li.section-li > .section > .desc > h3 > a {
|
|
background-color: transparent;
|
|
}
|
|
li.section-li > .section .meta {
|
|
margin: 0 1em 0 0;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.popover .section {
|
|
grid-template-columns: fit-content(8em) 1fr !important;
|
|
}
|
|
.popover .section > .tags {
|
|
display: none;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3MiLCJsaXN0UGFnZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FDQUE7RUFDRTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7O0FBRUE7RUFDRTtFQUNBOztBQUVBO0VBQ0U7SUFDRTs7O0FBSUo7RUFDRTs7QUFHRjtFQUNFO0VBQ0E7OztBQU1OO0VBQ0U7O0FBRUE7RUFDRSIsInNvdXJjZXNDb250ZW50IjpbIkB1c2UgXCJzYXNzOm1h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tcbiAgfVxufVxuIl19 */`;import{jsx as jsx8}from"preact/jsx-runtime";function getDate(cfg,data){if(!cfg.defaultDateType)throw new Error("Field 'defaultDateType' was not set in the configuration object of quartz.config.ts. See https://quartz.jzhao.xyz/configuration#general-configuration for more details.");return data.dates?.[cfg.defaultDateType]}__name(getDate,"getDate");function formatDate(d,locale="en-US"){return d.toLocaleDateString(locale,{year:"numeric",month:"short",day:"2-digit"})}__name(formatDate,"formatDate");function Date2({date,locale}){return jsx8("time",{datetime:date.toISOString(),children:formatDate(date,locale)})}__name(Date2,"Date");import{jsx as jsx9,jsxs as jsxs3}from"preact/jsx-runtime";function byDateAndAlphabetical(cfg){return(f1,f2)=>{if(f1.dates&&f2.dates)return getDate(cfg,f2).getTime()-getDate(cfg,f1).getTime();if(f1.dates&&!f2.dates)return-1;if(!f1.dates&&f2.dates)return 1;let f1Title=f1.frontmatter?.title.toLowerCase()??"",f2Title=f2.frontmatter?.title.toLowerCase()??"";return f1Title.localeCompare(f2Title)}}__name(byDateAndAlphabetical,"byDateAndAlphabetical");var PageList=__name(({cfg,fileData,allFiles,limit,sort})=>{let sorter=sort??byDateAndAlphabetical(cfg),list=allFiles.sort(sorter);return limit&&(list=list.slice(0,limit)),jsx9("ul",{class:"section-ul",children:list.map(page=>{let title=page.frontmatter?.title,tags=page.frontmatter?.tags??[];return jsx9("li",{class:"section-li",children:jsxs3("div",{class:"section",children:[jsx9("p",{class:"meta",children:page.dates&&jsx9(Date2,{date:getDate(cfg,page),locale:cfg.locale})}),jsx9("div",{class:"desc",children:jsx9("h3",{children:jsx9("a",{href:resolveRelative(fileData.slug,page.slug),class:"internal",children:title})})}),jsx9("ul",{class:"tags",children:tags.map(tag=>jsx9("li",{children:jsx9("a",{class:"internal tag-link",href:resolveRelative(fileData.slug,`tags/${tag}`),children:tag})}))})]})})})})},"PageList");PageList.css=`
|
|
.section h3 {
|
|
margin: 0;
|
|
}
|
|
|
|
.section > .tags {
|
|
margin: 0;
|
|
}
|
|
`;import{Fragment as Fragment2,jsx as jsx10,jsxs as jsxs4}from"preact/jsx-runtime";var defaultOptions9={numPages:10},TagContent_default=__name(opts=>{let options2={...defaultOptions9,...opts},TagContent=__name(props=>{let{tree,fileData,allFiles,cfg}=props,slug=fileData.slug;if(!(slug?.startsWith("tags/")||slug==="tags"))throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`);let tag=simplifySlug(slug.slice(5)),allPagesWithTag=__name(tag2=>allFiles.filter(file=>(file.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes).includes(tag2)),"allPagesWithTag"),content=tree.children.length===0?fileData.description:htmlToJsx(fileData.filePath,tree),classes=(fileData.frontmatter?.cssclasses??[]).join(" ");if(tag==="/"){let tags=[...new Set(allFiles.flatMap(data=>data.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes))].sort((a,b)=>a.localeCompare(b)),tagItemMap=new Map;for(let tag2 of tags)tagItemMap.set(tag2,allPagesWithTag(tag2));return jsxs4("div",{class:"popover-hint",children:[jsx10("article",{class:classes,children:jsx10("p",{children:content})}),jsx10("p",{children:i18n(cfg.locale).pages.tagContent.totalTags({count:tags.length})}),jsx10("div",{children:tags.map(tag2=>{let pages=tagItemMap.get(tag2),listProps={...props,allFiles:pages},contentPage=allFiles.filter(file=>file.slug===`tags/${tag2}`).at(0),root=contentPage?.htmlAst,content2=!root||root?.children.length===0?contentPage?.description:htmlToJsx(contentPage.filePath,root);return jsxs4("div",{children:[jsx10("h2",{children:jsx10("a",{class:"internal tag-link",href:`../tags/${tag2}`,children:tag2})}),content2&&jsx10("p",{children:content2}),jsxs4("div",{class:"page-listing",children:[jsxs4("p",{children:[i18n(cfg.locale).pages.tagContent.itemsUnderTag({count:pages.length}),pages.length>options2.numPages&&jsxs4(Fragment2,{children:[" ",jsx10("span",{children:i18n(cfg.locale).pages.tagContent.showingFirst({count:options2.numPages})})]})]}),jsx10(PageList,{limit:options2.numPages,...listProps,sort:options2?.sort})]})]})})})]})}else{let pages=allPagesWithTag(tag),listProps={...props,allFiles:pages};return jsxs4("div",{class:classes,children:[jsx10("article",{class:"popover-hint",children:content}),jsxs4("div",{class:"page-listing",children:[jsx10("p",{children:i18n(cfg.locale).pages.tagContent.itemsUnderTag({count:pages.length})}),jsx10("div",{children:jsx10(PageList,{...listProps,sort:options2?.sort})})]})]})}},"TagContent");return TagContent.css=listPage_default+PageList.css,TagContent},"default");import path6 from"path";import{jsx as jsx11,jsxs as jsxs5}from"preact/jsx-runtime";var defaultOptions10={showFolderCount:!0,showSubfolders:!0},FolderContent_default=__name(opts=>{let options2={...defaultOptions10,...opts},FolderContent=__name(props=>{let{tree,fileData,allFiles,cfg}=props,folderSlug=stripSlashes(simplifySlug(fileData.slug)),folderParts=folderSlug.split(path6.posix.sep),allPagesInFolder=[],allPagesInSubfolders=new Map;allFiles.forEach(file=>{let fileSlug=stripSlashes(simplifySlug(file.slug)),prefixed=fileSlug.startsWith(folderSlug)&&fileSlug!==folderSlug,fileParts=fileSlug.split(path6.posix.sep),isDirectChild=fileParts.length===folderParts.length+1;if(prefixed){if(isDirectChild)allPagesInFolder.push(file);else if(options2.showSubfolders){let subfolderSlug=joinSegments(...fileParts.slice(0,folderParts.length+1)),pagesInFolder=allPagesInSubfolders.get(subfolderSlug)||[];allPagesInSubfolders.set(subfolderSlug,[...pagesInFolder,file])}}}),allPagesInSubfolders.forEach((files,subfolderSlug)=>{if(!allPagesInFolder.some(file=>subfolderSlug===stripSlashes(simplifySlug(file.slug)))){let subfolderDates=files.sort(byDateAndAlphabetical(cfg))[0].dates,subfolderTitle=subfolderSlug.split(path6.posix.sep).at(-1);allPagesInFolder.push({slug:subfolderSlug,dates:subfolderDates,frontmatter:{title:subfolderTitle,tags:["folder"]}})}});let classes=(fileData.frontmatter?.cssclasses??[]).join(" "),listProps={...props,sort:options2.sort,allFiles:allPagesInFolder},content=tree.children.length===0?fileData.description:htmlToJsx(fileData.filePath,tree);return jsxs5("div",{class:"popover-hint",children:[jsx11("article",{class:classes,children:content}),jsxs5("div",{class:"page-listing",children:[options2.showFolderCount&&jsx11("p",{children:i18n(cfg.locale).pages.folderContent.itemsUnderFolder({count:allPagesInFolder.length})}),jsx11("div",{children:jsx11(PageList,{...listProps})})]})]})},"FolderContent");return FolderContent.css=listPage_default+PageList.css,FolderContent},"default");import{jsx as jsx12,jsxs as jsxs6}from"preact/jsx-runtime";var NotFound=__name(({cfg})=>{let baseDir=new URL(`https://${cfg.baseUrl??"example.com"}`).pathname;return jsxs6("article",{class:"popover-hint",children:[jsx12("h1",{children:"404"}),jsx12("p",{children:i18n(cfg.locale).pages.error.notFound}),jsx12("a",{href:baseDir,children:i18n(cfg.locale).pages.error.home})]})},"NotFound"),__default=__name(()=>NotFound,"default");import{jsx as jsx13}from"preact/jsx-runtime";var ArticleTitle=__name(({fileData,displayClass})=>{let title=fileData.frontmatter?.title;return title?jsx13("h1",{class:classNames(displayClass,"article-title"),children:title}):null},"ArticleTitle");ArticleTitle.css=`
|
|
.article-title {
|
|
margin: 2rem 0 0 0;
|
|
}
|
|
`;var ArticleTitle_default=__name(()=>ArticleTitle,"default");var darkmode_inline_default=`var d=window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark",s=localStorage.getItem("theme")??d;document.documentElement.setAttribute("saved-theme",s);var a=t=>{let n=new CustomEvent("themechange",{detail:{theme:t}});document.dispatchEvent(n)};document.addEventListener("nav",()=>{let t=o=>{let e=document.documentElement.getAttribute("saved-theme")==="dark"?"light":"dark";document.documentElement.setAttribute("saved-theme",e),localStorage.setItem("theme",e),a(e)},n=o=>{let e=o.matches?"dark":"light";document.documentElement.setAttribute("saved-theme",e),localStorage.setItem("theme",e),a(e)},m=document.querySelector("#darkmode");m&&(m.addEventListener("click",t),window.addCleanup(()=>m.removeEventListener("click",t)));let c=window.matchMedia("(prefers-color-scheme: dark)");c.addEventListener("change",n),window.addCleanup(()=>c.removeEventListener("change",n))});
|
|
`;var darkmode_default=`.darkmode {
|
|
cursor: pointer;
|
|
padding: 0;
|
|
position: relative;
|
|
background: none;
|
|
border: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
margin: 0 10px;
|
|
text-align: inherit;
|
|
}
|
|
.darkmode svg {
|
|
position: absolute;
|
|
width: 20px;
|
|
height: 20px;
|
|
top: calc(50% - 10px);
|
|
fill: var(--darkgray);
|
|
transition: opacity 0.1s ease;
|
|
}
|
|
|
|
:root[saved-theme=dark] {
|
|
color-scheme: dark;
|
|
}
|
|
|
|
:root[saved-theme=light] {
|
|
color-scheme: light;
|
|
}
|
|
|
|
:root[saved-theme=dark] .darkmode > #dayIcon {
|
|
display: none;
|
|
}
|
|
:root[saved-theme=dark] .darkmode > #nightIcon {
|
|
display: inline;
|
|
}
|
|
|
|
:root .darkmode > #dayIcon {
|
|
display: inline;
|
|
}
|
|
:root .darkmode > #nightIcon {
|
|
display: none;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJkYXJrbW9kZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFJSjtFQUNFOzs7QUFHRjtFQUNFOzs7QUFJQTtFQUNFOztBQUVGO0VBQ0U7OztBQUtGO0VBQ0U7O0FBRUY7RUFDRSIsInNvdXJjZXNDb250ZW50IjpbIi5kYXJrbW9kZSB7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgcGFkZGluZzogMDtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBiYWNrZ3JvdW5kOiBub25lO1xuICBib3JkZXI6IG5vbmU7XG4gIHdpZHRoOiAyMHB4O1xuICBoZWlnaHQ6IDIwcHg7XG4gIG1hcmdpbjogMCAxMHB4O1xuICB0ZXh0LWFsaWduOiBpbmhlcml0O1xuXG4gICYgc3ZnIHtcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgd2lkdGg6IDIwcHg7XG4gICAgaGVpZ2h0OiAyMHB4O1xuICAgIHRvcDogY2FsYyg1MCUgLSAxMHB4KTtcbiAgICBmaWxsOiB2YXIoLS1kYXJrZ3JheSk7XG4gICAgdHJhbnNpdGlvbjogb3BhY2l0eSAwLjFzIGVhc2U7XG4gIH1cbn1cblxuOnJvb3Rbc2F2ZWQtdGhlbWU9XCJkYXJrXCJdIHtcbiAgY29sb3Itc2NoZW1lOiBkYXJrO1xufVxuXG46cm9vdFtzYXZlZC10aGVtZT1cImxpZ2h0XCJdIHtcbiAgY29sb3Itc2NoZW1lOiBsaWdodDtcbn1cblxuOnJvb3Rbc2F2ZWQtdGhlbWU9XCJkYXJrXCJdIC5kYXJrbW9kZSB7XG4gICYgPiAjZGF5SWNvbiB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxuICAmID4gI25pZ2h0SWNvbiB7XG4gICAgZGlzcGxheTogaW5saW5lO1xuICB9XG59XG5cbjpyb290IC5kYXJrbW9kZSB7XG4gICYgPiAjZGF5SWNvbiB7XG4gICAgZGlzcGxheTogaW5saW5lO1xuICB9XG4gICYgPiAjbmlnaHRJY29uIHtcbiAgICBkaXNwbGF5OiBub25lO1xuICB9XG59XG4iXX0= */`;import{jsx as jsx14,jsxs as jsxs7}from"preact/jsx-runtime";var Darkmode=__name(({displayClass,cfg})=>jsxs7("button",{class:classNames(displayClass,"darkmode"),id:"darkmode",children:[jsxs7("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"dayIcon",x:"0px",y:"0px",viewBox:"0 0 35 35",style:"enable-background:new 0 0 35 35",xmlSpace:"preserve","aria-label":i18n(cfg.locale).components.themeToggle.darkMode,children:[jsx14("title",{children:i18n(cfg.locale).components.themeToggle.darkMode}),jsx14("path",{d:"M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"})]}),jsxs7("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"nightIcon",x:"0px",y:"0px",viewBox:"0 0 100 100",style:"enable-background:new 0 0 100 100",xmlSpace:"preserve","aria-label":i18n(cfg.locale).components.themeToggle.lightMode,children:[jsx14("title",{children:i18n(cfg.locale).components.themeToggle.lightMode}),jsx14("path",{d:"M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z"})]})]}),"Darkmode");Darkmode.beforeDOMLoaded=darkmode_inline_default;Darkmode.css=darkmode_default;var Darkmode_default=__name(()=>Darkmode,"default");var DEFAULT_SANS_SERIF='system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',DEFAULT_MONO="ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace";function googleFontHref(theme){let{code,header,body}=theme.typography;return`https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`}__name(googleFontHref,"googleFontHref");function joinStyles(theme,...stylesheet){return`
|
|
${stylesheet.join(`
|
|
|
|
`)}
|
|
|
|
:root {
|
|
--light: ${theme.colors.lightMode.light};
|
|
--lightgray: ${theme.colors.lightMode.lightgray};
|
|
--gray: ${theme.colors.lightMode.gray};
|
|
--darkgray: ${theme.colors.lightMode.darkgray};
|
|
--dark: ${theme.colors.lightMode.dark};
|
|
--secondary: ${theme.colors.lightMode.secondary};
|
|
--tertiary: ${theme.colors.lightMode.tertiary};
|
|
--highlight: ${theme.colors.lightMode.highlight};
|
|
--textHighlight: ${theme.colors.lightMode.textHighlight};
|
|
|
|
--headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF};
|
|
--bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF};
|
|
--codeFont: "${theme.typography.code}", ${DEFAULT_MONO};
|
|
}
|
|
|
|
:root[saved-theme="dark"] {
|
|
--light: ${theme.colors.darkMode.light};
|
|
--lightgray: ${theme.colors.darkMode.lightgray};
|
|
--gray: ${theme.colors.darkMode.gray};
|
|
--darkgray: ${theme.colors.darkMode.darkgray};
|
|
--dark: ${theme.colors.darkMode.dark};
|
|
--secondary: ${theme.colors.darkMode.secondary};
|
|
--tertiary: ${theme.colors.darkMode.tertiary};
|
|
--highlight: ${theme.colors.darkMode.highlight};
|
|
--textHighlight: ${theme.colors.darkMode.textHighlight};
|
|
}
|
|
`}__name(joinStyles,"joinStyles");import satori from"satori";import fs2 from"fs";import sharp from"sharp";import{jsx as jsx15,jsxs as jsxs8}from"preact/jsx-runtime";async function getSatoriFont(headerFontName,bodyFontName){let headerFont=await fetchTtf(headerFontName,700),bodyFont=await fetchTtf(bodyFontName,400);return[{name:headerFontName,data:headerFont,weight:700,style:"normal"},{name:bodyFontName,data:bodyFont,weight:400,style:"normal"}]}__name(getSatoriFont,"getSatoriFont");async function fetchTtf(fontName,weight){try{let css=await(await fetch(`https://fonts.googleapis.com/css2?family=${fontName}:wght@${weight}`)).text(),match=/url\((https:\/\/fonts.gstatic.com\/s\/.*?.ttf)\)/g.exec(css);if(!match)throw new Error("Could not fetch font");return await(await fetch(match[1])).arrayBuffer()}catch(error){throw new Error(`Error fetching font: ${error}`)}}__name(fetchTtf,"fetchTtf");var defaultImage=__name((cfg,{colorScheme},title,description,fonts,_fileData)=>{let useSmallerFont=title.length>22,iconPath=`https://${cfg.baseUrl}/static/icon.png`;return jsxs8("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",backgroundColor:cfg.theme.colors[colorScheme].light,gap:"2rem",paddingTop:"1.5rem",paddingBottom:"1.5rem",paddingLeft:"5rem",paddingRight:"5rem"},children:[jsxs8("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",flexDirection:"row",gap:"2.5rem"},children:[jsx15("img",{src:iconPath,width:135,height:135}),jsx15("p",{style:{color:cfg.theme.colors[colorScheme].dark,fontSize:useSmallerFont?70:82,fontFamily:fonts[0].name},children:title})]}),jsx15("p",{style:{color:cfg.theme.colors[colorScheme].dark,fontSize:44,lineClamp:3,fontFamily:fonts[1].name},children:description})]})},"defaultImage");import{Fragment as Fragment3,jsx as jsx16,jsxs as jsxs9}from"preact/jsx-runtime";async function generateSocialImage({cfg,description,fileName,fontsPromise,title,fileData},userOpts,imageDir){let fonts=await fontsPromise,{width,height}=userOpts,imageComponent=userOpts.imageStructure(cfg,userOpts,title,description,fonts,fileData),svg=await satori(imageComponent,{width,height,fonts}),compressed=await sharp(Buffer.from(svg)).webp({quality:40}).toBuffer(),filePath=joinSegments(imageDir,`${fileName}.${extension}`);fs2.writeFileSync(filePath,compressed)}__name(generateSocialImage,"generateSocialImage");var extension="webp",defaultOptions11={colorScheme:"lightMode",width:1200,height:630,imageStructure:defaultImage,excludeRoot:!1},Head_default=__name(()=>{let fontsPromise,fullOptions;return __name(({cfg,fileData,externalResources,ctx})=>{fullOptions||(typeof cfg.generateSocialImages!="boolean"?fullOptions={...defaultOptions11,...cfg.generateSocialImages}:fullOptions=defaultOptions11),!fontsPromise&&cfg.generateSocialImages&&(fontsPromise=getSatoriFont(cfg.theme.typography.header,cfg.theme.typography.body));let fileName=fileData.filePath?.replaceAll("/","-"),fdDescription=fileData.description?.trim()??i18n(cfg.locale).propertyDefaults.description,titleSuffix=cfg.pageTitleSuffix??"",title=(fileData.frontmatter?.title??i18n(cfg.locale).propertyDefaults.title)+titleSuffix,description="";fdDescription&&(description=unescapeHTML(fdDescription)),fileData.frontmatter?.socialDescription?description=fileData.frontmatter?.socialDescription:fileData.frontmatter?.description&&(description=fileData.frontmatter?.description);let fileDir=joinSegments(ctx.argv.output,"static","social-images");cfg.generateSocialImages&&(fs2.existsSync(fileDir)||fs2.mkdirSync(fileDir,{recursive:!0}),fileName&&generateSocialImage({title,description,fileName,fileDir,fileExt:extension,fontsPromise,cfg,fileData},fullOptions,fileDir));let{css,js}=externalResources,url=new URL(`https://${cfg.baseUrl??"example.com"}`),path13=url.pathname,baseDir=fileData.slug==="404"?path13:pathToRoot(fileData.slug),iconPath=joinSegments(baseDir,"static/icon.png"),ogImageDefaultPath=`https://${cfg.baseUrl}/static/og-image.png`,ogImageGeneratedPath=`https://${cfg.baseUrl}/${fileDir.replace(`${ctx.argv.output}/`,"")}/${fileName}.${extension}`,ogImagePath=fileName===void 0||!cfg.generateSocialImages?ogImageDefaultPath:ogImageGeneratedPath,frontmatterImgUrl=fileData.frontmatter?.socialImage;fileData.slug==="index"&&(ogImagePath=ogImageDefaultPath),frontmatterImgUrl&&(ogImagePath=`https://${cfg.baseUrl}/static/${frontmatterImgUrl}`);let socialUrl=fileData.slug==="404"?url.toString():joinSegments(url.toString(),fileData.slug);return jsxs9("head",{children:[jsx16("title",{children:title}),jsx16("meta",{charSet:"utf-8"}),cfg.theme.cdnCaching&&cfg.theme.fontOrigin==="googleFonts"&&jsxs9(Fragment3,{children:[jsx16("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),jsx16("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),jsx16("link",{rel:"stylesheet",href:googleFontHref(cfg.theme)})]}),jsx16("link",{rel:"preconnect",href:"https://cdnjs.cloudflare.com",crossOrigin:"anonymous"}),jsx16("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),jsx16("meta",{name:"og:site_name",content:cfg.pageTitle}),jsx16("meta",{property:"og:title",content:title}),jsx16("meta",{property:"og:type",content:"website"}),jsx16("meta",{name:"twitter:card",content:"summary_large_image"}),jsx16("meta",{name:"twitter:title",content:title}),jsx16("meta",{name:"twitter:description",content:description}),jsx16("meta",{property:"og:description",content:description}),jsx16("meta",{property:"og:image:type",content:`image/${extension}`}),jsx16("meta",{property:"og:image:alt",content:description}),!frontmatterImgUrl&&jsxs9(Fragment3,{children:[jsx16("meta",{property:"og:image:width",content:fullOptions.width.toString()}),jsx16("meta",{property:"og:image:height",content:fullOptions.height.toString()})]}),jsx16("meta",{property:"og:image:url",content:ogImagePath}),cfg.baseUrl&&jsxs9(Fragment3,{children:[jsx16("meta",{name:"twitter:image",content:ogImagePath}),jsx16("meta",{property:"og:image",content:ogImagePath}),jsx16("meta",{property:"twitter:domain",content:cfg.baseUrl}),jsx16("meta",{property:"og:url",content:socialUrl}),jsx16("meta",{property:"twitter:url",content:socialUrl})]}),jsx16("link",{rel:"icon",href:iconPath}),jsx16("meta",{name:"description",content:description}),jsx16("meta",{name:"generator",content:"Quartz"}),css.map(resource=>CSSResourceToStyleElement(resource,!0)),js.filter(resource=>resource.loadTime==="beforeDOMReady").map(res=>JSResourceToScriptElement(res,!0))]})},"Head")},"default");import{jsx as jsx17}from"preact/jsx-runtime";var PageTitle=__name(({fileData,cfg,displayClass})=>{let title=cfg?.pageTitle??i18n(cfg.locale).propertyDefaults.title,baseDir=pathToRoot(fileData.slug);return jsx17("h2",{class:classNames(displayClass,"page-title"),children:jsx17("a",{href:baseDir,children:title})})},"PageTitle");PageTitle.css=`
|
|
.page-title {
|
|
font-size: 1.75rem;
|
|
margin: 0;
|
|
}
|
|
`;var PageTitle_default=__name(()=>PageTitle,"default");import readingTime from"reading-time";var contentMeta_default=`.content-meta {
|
|
margin-top: 0;
|
|
color: var(--gray);
|
|
}
|
|
.content-meta[show-comma=true] > *:not(:last-child) {
|
|
margin-right: 8px;
|
|
}
|
|
.content-meta[show-comma=true] > *:not(:last-child)::after {
|
|
content: ",";
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJjb250ZW50TWV0YS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0U7RUFDQTs7QUFHRTtFQUNFOztBQUVBO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyIuY29udGVudC1tZXRhIHtcbiAgbWFyZ2luLXRvcDogMDtcbiAgY29sb3I6IHZhcigtLWdyYXkpO1xuXG4gICZbc2hvdy1jb21tYT1cInRydWVcIl0ge1xuICAgID4gKjpub3QoOmxhc3QtY2hpbGQpIHtcbiAgICAgIG1hcmdpbi1yaWdodDogOHB4O1xuXG4gICAgICAmOjphZnRlciB7XG4gICAgICAgIGNvbnRlbnQ6IFwiLFwiO1xuICAgICAgfVxuICAgIH1cbiAgfVxufVxuIl19 */`;import{jsx as jsx18}from"preact/jsx-runtime";var defaultOptions12={showReadingTime:!0,showComma:!0},ContentMeta_default=__name(opts=>{let options2={...defaultOptions12,...opts};function ContentMetadata({cfg,fileData,displayClass}){let text=fileData.text;if(text){let segments=[];if(fileData.dates&&segments.push(jsx18(Date2,{date:getDate(cfg,fileData),locale:cfg.locale})),options2.showReadingTime){let{minutes,words:_words}=readingTime(text),displayedTime=i18n(cfg.locale).components.contentMeta.readingTime({minutes:Math.ceil(minutes)});segments.push(jsx18("span",{children:displayedTime}))}return jsx18("p",{"show-comma":options2.showComma,class:classNames(displayClass,"content-meta"),children:segments})}else return null}return __name(ContentMetadata,"ContentMetadata"),ContentMetadata.css=contentMeta_default,ContentMetadata},"default");import{jsx as jsx19}from"preact/jsx-runtime";function Spacer({displayClass}){return jsx19("div",{class:classNames(displayClass,"spacer")})}__name(Spacer,"Spacer");var Spacer_default=__name(()=>Spacer,"default");var legacyToc_default=`details#toc summary {
|
|
cursor: pointer;
|
|
}
|
|
details#toc summary::marker {
|
|
color: var(--dark);
|
|
}
|
|
details#toc summary > * {
|
|
padding-left: 0.25rem;
|
|
display: inline-block;
|
|
margin: 0;
|
|
}
|
|
details#toc ul {
|
|
list-style: none;
|
|
margin: 0.5rem 1.25rem;
|
|
padding: 0;
|
|
}
|
|
details#toc .depth-1 {
|
|
padding-left: calc(1rem * 1);
|
|
}
|
|
details#toc .depth-2 {
|
|
padding-left: calc(1rem * 2);
|
|
}
|
|
details#toc .depth-3 {
|
|
padding-left: calc(1rem * 3);
|
|
}
|
|
details#toc .depth-4 {
|
|
padding-left: calc(1rem * 4);
|
|
}
|
|
details#toc .depth-5 {
|
|
padding-left: calc(1rem * 5);
|
|
}
|
|
details#toc .depth-6 {
|
|
padding-left: calc(1rem * 6);
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJsZWdhY3lUb2Muc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFOztBQUVBO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7O0FBSUo7RUFDRTtFQUNBO0VBQ0E7O0FBSUE7RUFDRTs7QUFERjtFQUNFOztBQURGO0VBQ0U7O0FBREY7RUFDRTs7QUFERjtFQUNFOztBQURGO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyJkZXRhaWxzI3RvYyB7XG4gICYgc3VtbWFyeSB7XG4gICAgY3Vyc29yOiBwb2ludGVyO1xuXG4gICAgJjo6bWFya2VyIHtcbiAgICAgIGNvbG9yOiB2YXIoLS1kYXJrKTtcbiAgICB9XG5cbiAgICAmID4gKiB7XG4gICAgICBwYWRkaW5nLWxlZnQ6IDAuMjVyZW07XG4gICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgICBtYXJnaW46IDA7XG4gICAgfVxuICB9XG5cbiAgJiB1bCB7XG4gICAgbGlzdC1zdHlsZTogbm9uZTtcbiAgICBtYXJnaW46IDAuNXJlbSAxLjI1cmVtO1xuICAgIHBhZGRpbmc6IDA7XG4gIH1cblxuICBAZm9yICRpIGZyb20gMSB0aHJvdWdoIDYge1xuICAgICYgLmRlcHRoLSN7JGl9IHtcbiAgICAgIHBhZGRpbmctbGVmdDogY2FsYygxcmVtICogI3skaX0pO1xuICAgIH1cbiAgfVxufVxuIl19 */`;var toc_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
.toc {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.toc.desktop-only {
|
|
max-height: 40%;
|
|
}
|
|
|
|
@media all and not ((max-width: 800px)) {
|
|
.toc {
|
|
display: flex;
|
|
}
|
|
}
|
|
button#toc {
|
|
background-color: transparent;
|
|
border: none;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
color: var(--dark);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
button#toc h3 {
|
|
font-size: 1rem;
|
|
display: inline-block;
|
|
margin: 0;
|
|
}
|
|
button#toc .fold {
|
|
margin-left: 0.5rem;
|
|
transition: transform 0.3s ease;
|
|
opacity: 0.8;
|
|
}
|
|
button#toc.collapsed .fold {
|
|
transform: rotateZ(-90deg);
|
|
}
|
|
|
|
#toc-content {
|
|
list-style: none;
|
|
overflow: hidden;
|
|
overflow-y: auto;
|
|
max-height: 100%;
|
|
transition: max-height 0.35s ease, visibility 0s linear 0s;
|
|
position: relative;
|
|
visibility: visible;
|
|
}
|
|
#toc-content.collapsed {
|
|
max-height: 0;
|
|
transition: max-height 0.35s ease, visibility 0s linear 0.35s;
|
|
visibility: hidden;
|
|
}
|
|
#toc-content.collapsed > .overflow::after {
|
|
opacity: 0;
|
|
}
|
|
#toc-content ul {
|
|
list-style: none;
|
|
margin: 0.5rem 0;
|
|
padding: 0;
|
|
}
|
|
#toc-content ul > li > a {
|
|
color: var(--dark);
|
|
opacity: 0.35;
|
|
transition: 0.5s ease opacity, 0.3s ease color;
|
|
}
|
|
#toc-content ul > li > a.in-view {
|
|
opacity: 0.75;
|
|
}
|
|
#toc-content > ul.overflow {
|
|
max-height: none;
|
|
width: 100%;
|
|
}
|
|
#toc-content .depth-0 {
|
|
padding-left: calc(1rem * 0);
|
|
}
|
|
#toc-content .depth-1 {
|
|
padding-left: calc(1rem * 1);
|
|
}
|
|
#toc-content .depth-2 {
|
|
padding-left: calc(1rem * 2);
|
|
}
|
|
#toc-content .depth-3 {
|
|
padding-left: calc(1rem * 3);
|
|
}
|
|
#toc-content .depth-4 {
|
|
padding-left: calc(1rem * 4);
|
|
}
|
|
#toc-content .depth-5 {
|
|
padding-left: calc(1rem * 5);
|
|
}
|
|
#toc-content .depth-6 {
|
|
padding-left: calc(1rem * 6);
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3MiLCJ0b2Muc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFF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bmVhciAwLjM1cztcbiAgICB2aXNpYmlsaXR5OiBoaWRkZW47XG4gIH1cblxuICAmLmNvbGxhcHNlZCA+IC5vdmVyZmxvdzo6YWZ0ZXIge1xuICAgIG9wYWNpdHk6IDA7XG4gIH1cblxuICAmIHVsIHtcbiAgICBsaXN0LXN0eWxlOiBub25lO1xuICAgIG1hcmdpbjogMC41cmVtIDA7XG4gICAgcGFkZGluZzogMDtcbiAgICAmID4gbGkgPiBhIHtcbiAgICAgIGNvbG9yOiB2YXIoLS1kYXJrKTtcbiAgICAgIG9wYWNpdHk6IDAuMzU7XG4gICAgICB0cmFuc2l0aW9uOlxuICAgICAgICAwLjVzIGVhc2Ugb3BhY2l0eSxcbiAgICAgICAgMC4zcyBlYXNlIGNvbG9yO1xuICAgICAgJi5pbi12aWV3IHtcbiAgICAgICAgb3BhY2l0eTogMC43NTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgPiB1bC5vdmVyZmxvdyB7XG4gICAgbWF4LWhlaWdodDogbm9uZTtcbiAgICB3aWR0aDogMTAwJTtcbiAgfVxuXG4gIEBmb3IgJGkgZnJvbSAwIHRocm91Z2ggNiB7XG4gICAgJiAuZGVwdGgtI3skaX0ge1xuICAgICAgcGFkZGluZy1sZWZ0OiBjYWxjKDFyZW0gKiAjeyRpfSk7XG4gICAgfVxuICB9XG59XG4iXX0= */`;var toc_inline_default='var o=new IntersectionObserver(e=>{for(let t of e){let s=t.target.id,n=document.querySelector(`a[data-for="${s}"]`),i=t.rootBounds?.height;i&&n&&(t.boundingClientRect.y<i?n.classList.add("in-view"):n.classList.remove("in-view"))}});function c(){this.classList.toggle("collapsed"),this.setAttribute("aria-expanded",this.getAttribute("aria-expanded")==="true"?"false":"true");let e=this.nextElementSibling;e&&e.classList.toggle("collapsed")}function d(){let e=document.getElementById("toc");if(e){let t=e.classList.contains("collapsed");if(!e.nextElementSibling)return;e.addEventListener("click",c),window.addCleanup(()=>e.removeEventListener("click",c))}}window.addEventListener("resize",d);document.addEventListener("nav",()=>{d(),o.disconnect(),document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]").forEach(t=>o.observe(t))});\n';import{jsx as jsx20,jsxs as jsxs10}from"preact/jsx-runtime";var defaultOptions13={layout:"modern"},TableOfContents2=__name(({fileData,displayClass,cfg})=>fileData.toc?jsxs10("div",{class:classNames(displayClass,"toc"),children:[jsxs10("button",{type:"button",id:"toc",class:fileData.collapseToc?"collapsed":"","aria-controls":"toc-content","aria-expanded":!fileData.collapseToc,children:[jsx20("h3",{children:i18n(cfg.locale).components.tableOfContents.title}),jsx20("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"fold",children:jsx20("polyline",{points:"6 9 12 15 18 9"})})]}),jsx20("div",{id:"toc-content",class:fileData.collapseToc?"collapsed":"",children:jsx20("ul",{class:"overflow",children:fileData.toc.map(tocEntry=>jsx20("li",{class:`depth-${tocEntry.depth}`,children:jsx20("a",{href:`#${tocEntry.slug}`,"data-for":tocEntry.slug,children:tocEntry.text})},tocEntry.slug))})})]}):null,"TableOfContents");TableOfContents2.css=toc_default;TableOfContents2.afterDOMLoaded=toc_inline_default;var LegacyTableOfContents=__name(({fileData,cfg})=>fileData.toc?jsxs10("details",{id:"toc",open:!fileData.collapseToc,children:[jsx20("summary",{children:jsx20("h3",{children:i18n(cfg.locale).components.tableOfContents.title})}),jsx20("ul",{children:fileData.toc.map(tocEntry=>jsx20("li",{class:`depth-${tocEntry.depth}`,children:jsx20("a",{href:`#${tocEntry.slug}`,"data-for":tocEntry.slug,children:tocEntry.text})},tocEntry.slug))})]}):null,"LegacyTableOfContents");LegacyTableOfContents.css=legacyToc_default;var TableOfContents_default=__name(opts=>(opts?.layout??defaultOptions13.layout)==="modern"?TableOfContents2:LegacyTableOfContents,"default");var explorer_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body > :not(.sidebar.left:has(.explorer)) {
|
|
transition: transform 300ms ease-in-out;
|
|
}
|
|
.page > #quartz-body.lock-scroll > :not(.sidebar.left:has(.explorer)) {
|
|
transform: translateX(100dvw);
|
|
transition: transform 300ms ease-in-out;
|
|
}
|
|
.page > #quartz-body .sidebar.left:has(.explorer) {
|
|
box-sizing: border-box;
|
|
position: sticky;
|
|
background-color: var(--light);
|
|
}
|
|
.page > #quartz-body .hide-until-loaded ~ #explorer-content {
|
|
display: none;
|
|
}
|
|
}
|
|
.explorer {
|
|
display: flex;
|
|
height: 100%;
|
|
flex-direction: column;
|
|
overflow-y: hidden;
|
|
/*&:after {
|
|
pointer-events: none;
|
|
content: "";
|
|
width: 100%;
|
|
height: 50px;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease;
|
|
background: linear-gradient(transparent 0px, var(--light));
|
|
}*/
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.explorer {
|
|
order: -1;
|
|
height: initial;
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
align-self: flex-start;
|
|
}
|
|
}
|
|
.explorer button#mobile-explorer {
|
|
display: none;
|
|
}
|
|
.explorer button#desktop-explorer {
|
|
display: flex;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.explorer button#mobile-explorer {
|
|
display: flex;
|
|
}
|
|
.explorer button#desktop-explorer {
|
|
display: none;
|
|
}
|
|
}
|
|
@media all and not ((max-width: 800px)) {
|
|
.explorer.desktop-only {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
button#mobile-explorer,
|
|
button#desktop-explorer {
|
|
background-color: transparent;
|
|
border: none;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
color: var(--dark);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
button#mobile-explorer h2,
|
|
button#desktop-explorer h2 {
|
|
font-size: 1rem;
|
|
display: inline-block;
|
|
margin: 0;
|
|
}
|
|
button#mobile-explorer .fold,
|
|
button#desktop-explorer .fold {
|
|
margin-left: 0.5rem;
|
|
transition: transform 0.3s ease;
|
|
opacity: 0.8;
|
|
}
|
|
button#mobile-explorer.collapsed .fold,
|
|
button#desktop-explorer.collapsed .fold {
|
|
transform: rotateZ(-90deg);
|
|
}
|
|
|
|
.folder-outer {
|
|
display: grid;
|
|
grid-template-rows: 0fr;
|
|
transition: grid-template-rows 0.3s ease-in-out;
|
|
}
|
|
|
|
.folder-outer.open {
|
|
grid-template-rows: 1fr;
|
|
}
|
|
|
|
.folder-outer > ul {
|
|
overflow: hidden;
|
|
}
|
|
|
|
#explorer-content {
|
|
list-style: none;
|
|
overflow: hidden;
|
|
overflow-y: auto;
|
|
max-height: 0px;
|
|
transition: max-height 0.35s ease, visibility 0s linear 0.35s;
|
|
margin-top: 0.5rem;
|
|
visibility: hidden;
|
|
}
|
|
#explorer-content.collapsed {
|
|
max-height: 100%;
|
|
transition: max-height 0.35s ease, visibility 0s linear 0s;
|
|
visibility: visible;
|
|
}
|
|
#explorer-content ul {
|
|
list-style: none;
|
|
margin: 0.08rem 0;
|
|
padding: 0;
|
|
transition: max-height 0.35s ease, transform 0.35s ease, opacity 0.2s ease;
|
|
}
|
|
#explorer-content ul li > a {
|
|
color: var(--dark);
|
|
opacity: 0.75;
|
|
pointer-events: all;
|
|
}
|
|
#explorer-content > #explorer-ul {
|
|
max-height: none;
|
|
}
|
|
|
|
svg {
|
|
pointer-events: all;
|
|
}
|
|
svg > polyline {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.folder-container {
|
|
flex-direction: row;
|
|
display: flex;
|
|
align-items: center;
|
|
user-select: none;
|
|
}
|
|
.folder-container div > a {
|
|
color: var(--secondary);
|
|
font-family: var(--headerFont);
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
line-height: 1.5rem;
|
|
display: inline-block;
|
|
}
|
|
.folder-container div > a:hover {
|
|
color: var(--tertiary);
|
|
}
|
|
.folder-container div > button {
|
|
color: var(--dark);
|
|
background-color: transparent;
|
|
border: none;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
font-family: var(--headerFont);
|
|
}
|
|
.folder-container div > button span {
|
|
font-size: 0.95rem;
|
|
display: inline-block;
|
|
color: var(--secondary);
|
|
font-weight: 600;
|
|
margin: 0;
|
|
line-height: 1.5rem;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.folder-icon {
|
|
margin-right: 5px;
|
|
color: var(--secondary);
|
|
cursor: pointer;
|
|
transition: transform 0.3s ease;
|
|
backface-visibility: visible;
|
|
}
|
|
|
|
li:has(> .folder-outer:not(.open)) > .folder-container > svg {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.folder-icon:hover {
|
|
color: var(--tertiary);
|
|
}
|
|
|
|
.no-background::after {
|
|
background: none !important;
|
|
}
|
|
|
|
#explorer-end {
|
|
height: 4px;
|
|
margin: 0;
|
|
}
|
|
|
|
@media all and ((max-width: 800px)) {
|
|
.explorer #explorer-content {
|
|
box-sizing: border-box;
|
|
overscroll-behavior: none;
|
|
z-index: 100;
|
|
position: absolute;
|
|
top: 0;
|
|
background-color: var(--light);
|
|
max-width: 100dvw;
|
|
left: -100dvw;
|
|
width: 100%;
|
|
transition: transform 300ms ease-in-out;
|
|
overflow: hidden;
|
|
padding: 6rem 2rem 2rem;
|
|
height: 100dvh;
|
|
max-height: 100dvh;
|
|
margin-top: 0;
|
|
visibility: hidden;
|
|
}
|
|
.explorer #explorer-content:not(.collapsed) {
|
|
transform: translateX(100dvw);
|
|
visibility: visible;
|
|
}
|
|
.explorer #explorer-content ul.overflow {
|
|
max-height: 100%;
|
|
width: 100%;
|
|
}
|
|
.explorer #explorer-content.collapsed {
|
|
transform: translateX(0);
|
|
visibility: visible;
|
|
}
|
|
.explorer #mobile-explorer {
|
|
margin: 5px;
|
|
z-index: 101;
|
|
}
|
|
.explorer #mobile-explorer:not(.collapsed) .lucide-menu {
|
|
transform: rotate(-90deg);
|
|
transition: transform 200ms ease-in-out;
|
|
}
|
|
.explorer #mobile-explorer .lucide-menu {
|
|
stroke: var(--darkgray);
|
|
transition: transform 200ms ease;
|
|
}
|
|
.explorer #mobile-explorer .lucide-menu:hover {
|
|
stroke: var(--dark);
|
|
}
|
|
}
|
|
|
|
.no-scroll {
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
html:has(.no-scroll) {
|
|
overflow: hidden;
|
|
}
|
|
|
|
@media all and not ((max-width: 800px)) {
|
|
.no-scroll {
|
|
opacity: 1 !important;
|
|
overflow: auto !important;
|
|
}
|
|
html:has(.no-scroll) {
|
|
overflow: auto !important;
|
|
}
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3MiLCJleHBsb3Jlci5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FDQUE7RUFHSTtJQUNFOztFQUVGO0lBQ0U7SUFDQTs7RUFJRjtJQUNFO0lBQ0E7SUFDQTs7RUFLRjtJQUNFOzs7QUFLTjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0FBa0NBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFoQ0E7RUF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Y29sbGFwc2VkIHtcbiAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVYKDApO1xuICAgICAgICB2aXNpYmlsaXR5OiB2aXNpYmxlO1xuICAgICAgfVxuICAgIH1cblxuICAgICNtb2JpbGUtZXhwbG9yZXIge1xuICAgICAgbWFyZ2luOiA1cHg7XG4gICAgICB6LWluZGV4OiAxMDE7XG5cbiAgICAgICY6bm90KC5jb2xsYXBzZWQpIC5sdWNpZGUtbWVudSB7XG4gICAgICAgIHRyYW5zZm9ybTogcm90YXRlKC05MGRlZyk7XG4gICAgICAgIHRyYW5zaXRpb246IHRyYW5zZm9ybSAyMDBtcyBlYXNlLWluLW91dDtcbiAgICAgIH1cblxuICAgICAgLmx1Y2lkZS1tZW51IHtcbiAgICAgICAgc3Ryb2tlOiB2YXIoLS1kYXJrZ3JheSk7XG4gICAgICAgIHRyYW5zaXRpb246IHRyYW5zZm9ybSAyMDBtcyBlYXNlO1xuXG4gICAgICAgICY6aG92ZXIge1xuICAgICAgICAgIHN0cm9rZTogdmFyKC0tZGFyayk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuLm5vLXNjcm9sbCB7XG4gIG9wYWNpdHk6IDA7XG4gIG92ZXJmbG93OiBoaWRkZW47XG59XG5cbmh0bWw6aGFzKC5uby1zY3JvbGwpIHtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbn1cblxuQG1lZGlhIGFsbCBhbmQgbm90ICgkbW9iaWxlKSB7XG4gIC5uby1zY3JvbGwge1xuICAgIG9wYWNpdHk6IDEgIWltcG9ydGFudDtcbiAgICBvdmVyZmxvdzogYXV0byAhaW1wb3J0YW50O1xuICB9XG5cbiAgaHRtbDpoYXMoLm5vLXNjcm9sbCkge1xuICAgIG92ZXJmbG93OiBhdXRvICFpbXBvcnRhbnQ7XG4gIH1cbn1cbiJdfQ== */`;var explorer_inline_default=`var r,u=new IntersectionObserver(t=>{let e=document.getElementById("explorer-ul");if(e)for(let l of t)l.isIntersecting?e.classList.add("no-background"):e.classList.remove("no-background")});function d(){this.classList.toggle("collapsed"),this.setAttribute("aria-expanded",this.getAttribute("aria-expanded")==="true"?"false":"true");let t=this.nextElementSibling?.nextElementSibling?this.nextElementSibling.nextElementSibling:this.nextElementSibling;if(t&&(t.classList.toggle("collapsed"),t.classList.toggle("explorer-viewmode"),document.querySelector("#mobile-explorer"))){let e=document.querySelector("#quartz-body");e&&e.classList.toggle("lock-scroll")}}function m(t){t.stopPropagation();let e=t.target;if(!e)return;let l=e.nodeName==="svg",n=l?e.parentElement?.nextSibling:e.parentElement?.parentElement?.nextElementSibling,s=l?e.nextElementSibling:e.parentElement;if(!(n&&s))return;n.classList.toggle("open");let i=n.classList.contains("open");f(n,!i);let c=s.dataset.folderpath;L(r,c);let o=JSON.stringify(r);localStorage.setItem("fileTree",o)}function g(){let t=document.querySelectorAll(".explorer > button");for(let e of t){let l=localStorage.getItem("fileTree"),n=e?.dataset.savestate==="true";if(e){if(e.dataset.behavior==="collapse")for(let a of document.getElementsByClassName("folder-button"))window.addCleanup(()=>e.removeEventListener("click",d)),a.addEventListener("click",m);window.addCleanup(()=>e.removeEventListener("click",d)),e.addEventListener("click",d)}for(let o of document.getElementsByClassName("folder-icon"))o.addEventListener("click",m),window.addCleanup(()=>o.removeEventListener("click",m));let s=l&&n?JSON.parse(l):[],i=new Map(s.map(o=>[o.path,o.collapsed])),c=e.dataset.tree?JSON.parse(e.dataset.tree):[];r=[];for(let{path:o,collapsed:a}of c)r.push({path:o,collapsed:i.get(o)??a});r.map(o=>{let p=document.querySelector(\`[data-folderpath='\${o.path.replace("'","-")}']\`)?.parentElement?.nextElementSibling;p&&f(p,o.collapsed)})}}function E(){let t=(document.querySelector("body")?.getAttribute("data-slug")??"").replace(/\\/index$/g,"");document.querySelectorAll(".folder-outer").forEach(l=>{let n=Array.from(l.children).find(s=>s.matches("ul[data-folderul]"));n&&t.includes(n.getAttribute("data-folderul")??"")&&(l.classList.contains("open")||l.classList.add("open"))})}window.addEventListener("resize",g);document.addEventListener("nav",()=>{let t=document.querySelector("#mobile-explorer");if(t){t.classList.add("collapsed");let n=t.nextElementSibling?.nextElementSibling;n&&(n.classList.add("collapsed"),n.classList.toggle("explorer-viewmode"))}g(),u.disconnect();let e=document.getElementById("explorer-end");e&&u.observe(e),document.querySelector("#mobile-explorer")?.classList.remove("hide-until-loaded"),E()});function f(t,e){return e?t.classList.remove("open"):t.classList.add("open")}function L(t,e){let l=t.find(n=>n.path===e);l&&(l.collapsed=!l.collapsed)}
|
|
`;import{Fragment as Fragment4,jsx as jsx21,jsxs as jsxs11}from"preact/jsx-runtime";function getPathSegment(fp,idx){if(fp)return fp.split("/").at(idx)}__name(getPathSegment,"getPathSegment");var FileNode=class _FileNode{static{__name(this,"FileNode")}children;name;displayName;file;depth;constructor(slugSegment,displayName,file,depth){this.children=[],this.name=slugSegment,this.displayName=displayName??file?.frontmatter?.title??slugSegment,this.file=file?clone(file):null,this.depth=depth??0}insert(fileData){if(fileData.path.length===0)return;let nextSegment=fileData.path[0];if(fileData.path.length===1){if(nextSegment===""){let title=fileData.file.frontmatter?.title;title&&title!=="index"&&(this.displayName=title)}else this.children.push(new _FileNode(nextSegment,void 0,fileData.file,this.depth+1));return}fileData.path=fileData.path.splice(1);let child=this.children.find(c=>c.name===nextSegment);if(child){child.insert(fileData);return}let newChild=new _FileNode(nextSegment,getPathSegment(fileData.file.relativePath,this.depth),void 0,this.depth+1);newChild.insert(fileData),this.children.push(newChild)}add(file){this.insert({file,path:simplifySlug(file.slug).split("/")})}filter(filterFn){this.children=this.children.filter(filterFn),this.children.forEach(child=>child.filter(filterFn))}map(mapFn){mapFn(this),this.children.forEach(child=>child.map(mapFn))}getFolderPaths(collapsed){let folderPaths=[],traverse=__name((node,currentPath)=>{if(!node.file){let folderPath=joinSegments(currentPath,node.name);folderPath!==""&&folderPaths.push({path:folderPath,collapsed}),node.children.forEach(child=>traverse(child,folderPath))}},"traverse");return traverse(this,""),folderPaths}sort(sortFn){this.children=this.children.sort(sortFn),this.children.forEach(e=>e.sort(sortFn))}};function ExplorerNode({node,opts,fullPath,fileData}){let folderBehavior=opts.folderClickBehavior,isDefaultOpen=opts.folderDefaultState==="open",folderPath=node.name!==""?joinSegments(fullPath??"",node.name):"",href=resolveRelative(fileData.slug,folderPath)+"/";return jsx21(Fragment4,{children:node.file?jsx21("li",{children:jsx21("a",{href:resolveRelative(fileData.slug,node.file.slug),"data-for":node.file.slug,children:node.displayName})},node.file.slug):jsxs11("li",{children:[node.name!==""&&jsxs11("div",{class:"folder-container",children:[jsx21("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"5 8 14 8",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"folder-icon",children:jsx21("polyline",{points:"6 9 12 15 18 9"})}),jsx21("div",{"data-folderpath":folderPath,children:folderBehavior==="link"?jsx21("a",{href,"data-for":node.name,class:"folder-title",children:node.displayName}):jsx21("button",{class:"folder-button",children:jsx21("span",{class:"folder-title",children:node.displayName})})},node.name)]}),jsx21("div",{class:`folder-outer ${node.depth===0||isDefaultOpen?"open":""}`,children:jsx21("ul",{style:{paddingLeft:node.name!==""?"1.4rem":"0"},class:"content","data-folderul":folderPath,children:node.children.map((childNode,i)=>jsx21(ExplorerNode,{node:childNode,opts,fullPath:folderPath,fileData},i))})})]})})}__name(ExplorerNode,"ExplorerNode");import{jsx as jsx22,jsxs as jsxs12}from"preact/jsx-runtime";var defaultOptions14={folderClickBehavior:"collapse",folderDefaultState:"collapsed",useSavedState:!0,mapFn:__name(node=>node,"mapFn"),sortFn:__name((a,b)=>!a.file&&!b.file||a.file&&b.file?a.displayName.localeCompare(b.displayName,void 0,{numeric:!0,sensitivity:"base"}):a.file&&!b.file?1:-1,"sortFn"),filterFn:__name(node=>node.name!=="tags","filterFn"),order:["filter","map","sort"]},Explorer_default=__name(userOpts=>{let opts={...defaultOptions14,...userOpts},fileTree,jsonTree,lastBuildId="";function constructFileTree(allFiles){if(fileTree=new FileNode(""),allFiles.forEach(file=>fileTree.add(file)),opts.order)for(let i=0;i<opts.order.length;i++){let functionName=opts.order[i];functionName==="map"?fileTree.map(opts.mapFn):functionName==="sort"?fileTree.sort(opts.sortFn):functionName==="filter"&&fileTree.filter(opts.filterFn)}let folders=fileTree.getFolderPaths(opts.folderDefaultState==="collapsed");jsonTree=JSON.stringify(folders)}__name(constructFileTree,"constructFileTree");let Explorer=__name(({ctx,cfg,allFiles,displayClass,fileData})=>(ctx.buildId!==lastBuildId&&(lastBuildId=ctx.buildId,constructFileTree(allFiles)),jsxs12("div",{class:classNames(displayClass,"explorer"),children:[jsx22("button",{type:"button",id:"mobile-explorer",class:"collapsed hide-until-loaded","data-behavior":opts.folderClickBehavior,"data-collapsed":opts.folderDefaultState,"data-savestate":opts.useSavedState,"data-tree":jsonTree,"data-mobile":!0,"aria-controls":"explorer-content","aria-expanded":!1,children:jsxs12("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-menu",children:[jsx22("line",{x1:"4",x2:"20",y1:"12",y2:"12"}),jsx22("line",{x1:"4",x2:"20",y1:"6",y2:"6"}),jsx22("line",{x1:"4",x2:"20",y1:"18",y2:"18"})]})}),jsxs12("button",{type:"button",id:"desktop-explorer",class:"title-button","data-behavior":opts.folderClickBehavior,"data-collapsed":opts.folderDefaultState,"data-savestate":opts.useSavedState,"data-tree":jsonTree,"data-mobile":!1,"aria-controls":"explorer-content","aria-expanded":!0,children:[jsx22("h2",{children:opts.title??i18n(cfg.locale).components.explorer.title}),jsx22("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"5 8 14 8",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"fold",children:jsx22("polyline",{points:"6 9 12 15 18 9"})})]}),jsx22("div",{id:"explorer-content",children:jsxs12("ul",{class:"overflow",id:"explorer-ul",children:[jsx22(ExplorerNode,{node:fileTree,opts,fileData}),jsx22("li",{id:"explorer-end"})]})})]})),"Explorer");return Explorer.css=explorer_default,Explorer.afterDOMLoaded=explorer_inline_default,Explorer},"default");import{jsx as jsx23}from"preact/jsx-runtime";var TagList=__name(({fileData,displayClass})=>{let tags=fileData.frontmatter?.tags,baseDir=pathToRoot(fileData.slug);return tags&&tags.length>0?jsx23("ul",{class:classNames(displayClass,"tags"),children:tags.map(tag=>{let linkDest=baseDir+`/tags/${slugTag(tag)}`;return jsx23("li",{children:jsx23("a",{href:linkDest,class:"internal tag-link",children:tag})})})}):null},"TagList");TagList.css=`
|
|
.tags {
|
|
list-style: none;
|
|
display: flex;
|
|
padding-left: 0;
|
|
gap: 0.4rem;
|
|
margin: 1rem 0;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.section-li > .section > .tags {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.tags > li {
|
|
display: inline-block;
|
|
white-space: nowrap;
|
|
margin: 0;
|
|
overflow-wrap: normal;
|
|
}
|
|
|
|
a.internal.tag-link {
|
|
border-radius: 8px;
|
|
background-color: var(--highlight);
|
|
padding: 0.2rem 0.4rem;
|
|
margin: 0 0.1rem;
|
|
}
|
|
`;var TagList_default=__name(()=>TagList,"default");var graph_inline_default=`var Z1=Object.create;var Ju=Object.defineProperty;var Q1=Object.getOwnPropertyDescriptor;var J1=Object.getOwnPropertyNames;var tw=Object.getPrototypeOf,ew=Object.prototype.hasOwnProperty;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var Do=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),dd=(r,t)=>{for(var e in t)Ju(r,e,{get:t[e],enumerable:!0})},rw=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of J1(t))!ew.call(r,s)&&s!==e&&Ju(r,s,{get:()=>t[s],enumerable:!(i=Q1(t,s))||i.enumerable});return r};var hs=(r,t,e)=>(e=r!=null?Z1(tw(r)):{},rw(t||!r||!r.__esModule?Ju(e,"default",{value:r,enumerable:!0}):e,r));var b,Dl,ra,L,D=p(()=>{"use strict";b=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r.ShapeBuilder="shape-builder",r.Batcher="batcher",r))(b||{}),Dl=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},ra=(r,t)=>Dl(r).priority??t,L={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Dl).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t))}),this},add(...r){return r.map(Dl).forEach(t=>{t.type.forEach(e=>{let i=this._addHandlers,s=this._queue;i[e]?i[e]?.(t):(s[e]=s[e]||[],s[e]?.push(t))})}),this},handle(r,t,e){let i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(\`Extension type \${r} already has a handler\`);i[r]=t,s[r]=e;let n=this._queue;return n[r]&&(n[r]?.forEach(o=>t(o)),delete n[r]),this},handleByMap(r,t){return this.handle(r,e=>{e.name&&(t[e.name]=e.ref)},e=>{e.name&&delete t[e.name]})},handleByNamedList(r,t,e=-1){return this.handle(r,i=>{t.findIndex(n=>n.name===i.name)>=0||(t.push({name:i.name,value:i.ref}),t.sort((n,o)=>ra(o.value,e)-ra(n.value,e)))},i=>{let s=t.findIndex(n=>n.name===i.name);s!==-1&&t.splice(s,1)})},handleByList(r,t,e=-1){return this.handle(r,i=>{t.includes(i.ref)||(t.push(i.ref),t.sort((s,n)=>ra(n,e)-ra(s,e)))},i=>{let s=t.indexOf(i.ref);s!==-1&&t.splice(s,1)})},mixin(r,...t){for(let e of t)Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(e))}}});var Cm=Do((ZG,Pl)=>{"use strict";var wC=Object.prototype.hasOwnProperty,Qt="~";function Ms(){}Object.create&&(Ms.prototype=Object.create(null),new Ms().__proto__||(Qt=!1));function EC(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function Em(r,t,e,i,s){if(typeof e!="function")throw new TypeError("The listener must be a function");var n=new EC(e,i||r,s),o=Qt?Qt+t:t;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],n]:r._events[o].push(n):(r._events[o]=n,r._eventsCount++),r}function ia(r,t){--r._eventsCount===0?r._events=new Ms:delete r._events[t]}function $t(){this._events=new Ms,this._eventsCount=0}$t.prototype.eventNames=function(){var t=[],e,i;if(this._eventsCount===0)return t;for(i in e=this._events)wC.call(e,i)&&t.push(Qt?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};$t.prototype.listeners=function(t){var e=Qt?Qt+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,n=i.length,o=new Array(n);s<n;s++)o[s]=i[s].fn;return o};$t.prototype.listenerCount=function(t){var e=Qt?Qt+t:t,i=this._events[e];return i?i.fn?1:i.length:0};$t.prototype.emit=function(t,e,i,s,n,o){var a=Qt?Qt+t:t;if(!this._events[a])return!1;var u=this._events[a],l=arguments.length,c,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,i),!0;case 4:return u.fn.call(u.context,e,i,s),!0;case 5:return u.fn.call(u.context,e,i,s,n),!0;case 6:return u.fn.call(u.context,e,i,s,n,o),!0}for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];u.fn.apply(u.context,c)}else{var f=u.length,d;for(h=0;h<f;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),l){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,i);break;case 4:u[h].fn.call(u[h].context,e,i,s);break;default:if(!c)for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];u[h].fn.apply(u[h].context,c)}}return!0};$t.prototype.on=function(t,e,i){return Em(this,t,e,i,!1)};$t.prototype.once=function(t,e,i){return Em(this,t,e,i,!0)};$t.prototype.removeListener=function(t,e,i,s){var n=Qt?Qt+t:t;if(!this._events[n])return this;if(!e)return ia(this,n),this;var o=this._events[n];if(o.fn)o.fn===e&&(!s||o.once)&&(!i||o.context===i)&&ia(this,n);else{for(var a=0,u=[],l=o.length;a<l;a++)(o[a].fn!==e||s&&!o[a].once||i&&o[a].context!==i)&&u.push(o[a]);u.length?this._events[n]=u.length===1?u[0]:u:ia(this,n)}return this};$t.prototype.removeAllListeners=function(t){var e;return t?(e=Qt?Qt+t:t,this._events[e]&&ia(this,e)):(this._events=new Ms,this._eventsCount=0),this};$t.prototype.off=$t.prototype.removeListener;$t.prototype.addListener=$t.prototype.on;$t.prefixed=Qt;$t.EventEmitter=$t;typeof Pl<"u"&&(Pl.exports=$t)});var Am,ht,jt=p(()=>{Am=hs(Cm(),1),ht=Am.default});var CC,nr,Gt,xe,Gm,Dm,Bl,AC,sa,Im,Um,Pm,Bm,Mm,Fs,DC,PC,BC,MC,Rl,Fm,FC,Ml,Fl,Rm,kl,Me,km,Om,Lm=p(()=>{CC={grad:.9,turn:360,rad:360/(2*Math.PI)},nr=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},Gt=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},xe=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},Gm=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},Dm=function(r){return{r:xe(r.r,0,255),g:xe(r.g,0,255),b:xe(r.b,0,255),a:xe(r.a)}},Bl=function(r){return{r:Gt(r.r),g:Gt(r.g),b:Gt(r.b),a:Gt(r.a,3)}},AC=/^#([0-9a-f]{3,8})$/i,sa=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},Im=function(r){var t=r.r,e=r.g,i=r.b,s=r.a,n=Math.max(t,e,i),o=n-Math.min(t,e,i),a=o?n===t?(e-i)/o:n===e?2+(i-t)/o:4+(t-e)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},Um=function(r){var t=r.h,e=r.s,i=r.v,s=r.a;t=t/360*6,e/=100,i/=100;var n=Math.floor(t),o=i*(1-e),a=i*(1-(t-n)*e),u=i*(1-(1-t+n)*e),l=n%6;return{r:255*[i,a,o,o,u,i][l],g:255*[u,i,i,a,o,o][l],b:255*[o,o,u,i,i,a][l],a:s}},Pm=function(r){return{h:Gm(r.h),s:xe(r.s,0,100),l:xe(r.l,0,100),a:xe(r.a)}},Bm=function(r){return{h:Gt(r.h),s:Gt(r.s),l:Gt(r.l),a:Gt(r.a,3)}},Mm=function(r){return Um((e=(t=r).s,{h:t.h,s:(e*=((i=t.l)<50?i:100-i)/100)>0?2*e/(i+e)*100:0,v:i+e,a:t.a}));var t,e,i},Fs=function(r){return{h:(t=Im(r)).h,s:(s=(200-(e=t.s))*(i=t.v)/100)>0&&s<200?e*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,e,i,s},DC=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,PC=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,BC=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,MC=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,Rl={string:[[function(r){var t=AC.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?Gt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?Gt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=BC.exec(r)||MC.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dm({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=DC.exec(r)||PC.exec(r);if(!t)return null;var e,i,s=Pm({h:(e=t[1],i=t[2],i===void 0&&(i="deg"),Number(e)*(CC[i]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Mm(s)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return nr(t)&&nr(e)&&nr(i)?Dm({r:Number(t),g:Number(e),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var t=r.h,e=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!nr(t)||!nr(e)||!nr(i))return null;var o=Pm({h:Number(t),s:Number(e),l:Number(i),a:Number(n)});return Mm(o)},"hsl"],[function(r){var t=r.h,e=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!nr(t)||!nr(e)||!nr(i))return null;var o=function(a){return{h:Gm(a.h),s:xe(a.s,0,100),v:xe(a.v,0,100),a:xe(a.a)}}({h:Number(t),s:Number(e),v:Number(i),a:Number(n)});return Um(o)},"hsv"]]},Fm=function(r,t){for(var e=0;e<t.length;e++){var i=t[e][0](r);if(i)return[i,t[e][1]]}return[null,void 0]},FC=function(r){return typeof r=="string"?Fm(r.trim(),Rl.string):typeof r=="object"&&r!==null?Fm(r,Rl.object):[null,void 0]},Ml=function(r,t){var e=Fs(r);return{h:e.h,s:xe(e.s+100*t,0,100),l:e.l,a:e.a}},Fl=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},Rm=function(r,t){var e=Fs(r);return{h:e.h,s:e.s,l:xe(e.l+100*t,0,100),a:e.a}},kl=function(){function r(t){this.parsed=FC(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return Gt(Fl(this.rgba),2)},r.prototype.isDark=function(){return Fl(this.rgba)<.5},r.prototype.isLight=function(){return Fl(this.rgba)>=.5},r.prototype.toHex=function(){return t=Bl(this.rgba),e=t.r,i=t.g,s=t.b,o=(n=t.a)<1?sa(Gt(255*n)):"","#"+sa(e)+sa(i)+sa(s)+o;var t,e,i,s,n,o},r.prototype.toRgb=function(){return Bl(this.rgba)},r.prototype.toRgbString=function(){return t=Bl(this.rgba),e=t.r,i=t.g,s=t.b,(n=t.a)<1?"rgba("+e+", "+i+", "+s+", "+n+")":"rgb("+e+", "+i+", "+s+")";var t,e,i,s,n},r.prototype.toHsl=function(){return Bm(Fs(this.rgba))},r.prototype.toHslString=function(){return t=Bm(Fs(this.rgba)),e=t.h,i=t.s,s=t.l,(n=t.a)<1?"hsla("+e+", "+i+"%, "+s+"%, "+n+")":"hsl("+e+", "+i+"%, "+s+"%)";var t,e,i,s,n},r.prototype.toHsv=function(){return t=Im(this.rgba),{h:Gt(t.h),s:Gt(t.s),v:Gt(t.v),a:Gt(t.a,3)};var t},r.prototype.invert=function(){return Me({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},r.prototype.saturate=function(t){return t===void 0&&(t=.1),Me(Ml(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),Me(Ml(this.rgba,-t))},r.prototype.grayscale=function(){return Me(Ml(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),Me(Rm(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),Me(Rm(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?Me({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):Gt(this.rgba.a,3);var e},r.prototype.hue=function(t){var e=Fs(this.rgba);return typeof t=="number"?Me({h:t,s:e.s,l:e.l,a:e.a}):Gt(e.h)},r.prototype.isEqual=function(t){return this.toHex()===Me(t).toHex()},r}(),Me=function(r){return r instanceof kl?r:new kl(r)},km=[],Om=function(r){r.forEach(function(t){km.indexOf(t)<0&&(t(kl,Rl),km.push(t))})}});function Nm(r,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in e)i[e[s]]=s;var n={};r.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,u,l=i[this.toHex()];if(l)return l;if(o?.closest){var c=this.toRgb(),h=1/0,f="black";if(!n.length)for(var d in e)n[d]=new r(e[d]).toRgb();for(var m in e){var g=(a=c,u=n[m],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.b,2));g<h&&(h=g,f=m)}return f}},t.string.push([function(o){var a=o.toLowerCase(),u=a==="transparent"?"#0000":e[a];return u?new r(u).toRgb():null},"name"])}var Hm=p(()=>{});var xi,Z,Nt=p(()=>{Lm();Hm();Om([Nm]);xi=class Rs{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Rs)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,e){let i=typeof t;if(i!==typeof e)return!1;if(i==="number"||i==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((n,o)=>n===e[o]);if(t!==null&&e!==null){let n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(a=>t[a]===e[a])}return t===e}toRgba(){let[t,e,i,s]=this._components;return{r:t,g:e,b:i,a:s}}toRgb(){let[t,e,i]=this._components;return{r:t,g:e,b:i}}toRgbaString(){let[t,e,i]=this.toUint8RgbArray();return\`rgba(\${t},\${e},\${i},\${this.alpha})\`}toUint8RgbArray(t){let[e,i,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(e*255),t[1]=Math.round(i*255),t[2]=Math.round(s*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,i,s,n]=this._components;return t[0]=e,t[1]=i,t[2]=s,t[3]=n,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,i,s]=this._components;return t[0]=e,t[1]=i,t[2]=s,t}toNumber(){return this._int}toBgrNumber(){let[t,e,i]=this.toUint8RgbArray();return(i<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){let[e,i,s,n]=Rs._temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this._refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=!0){if(t===1)return(255<<24)+this._int;if(t===0)return e?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return e&&(i=i*t+.5|0,s=s*t+.5|0,n=n*t+.5|0),(t*255<<24)+(i<<16)+(s<<8)+n}toHex(){let t=this._int.toString(16);return\`#\${"000000".substring(0,6-t.length)+t}\`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}_normalize(t){let e,i,s,n;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){let o=t;e=(o>>16&255)/255,i=(o>>8&255)/255,s=(o&255)/255,n=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[e,i,s,n=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[e,i,s,n=255]=t,e/=255,i/=255,s/=255,n/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){let a=Rs.HEX_PATTERN.exec(t);a&&(t=\`#\${a[2]}\`)}let o=Me(t);o.isValid()&&({r:e,g:i,b:s,a:n}=o.rgba,e/=255,i/=255,s/=255)}if(e!==void 0)this._components[0]=e,this._components[1]=i,this._components[2]=s,this._components[3]=n,this._refreshInt();else throw new Error(\`Unable to convert color \${t}\`)}_refreshInt(){this._clamp(this._components);let[t,e,i]=this._components;this._int=(t*255<<16)+(e*255<<8)+(i*255|0)}_clamp(t,e=0,i=1){return typeof t=="number"?Math.min(Math.max(t,e),i):(t.forEach((s,n)=>{t[n]=Math.min(Math.max(s,e),i)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Rs||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};xi.shared=new xi;xi._temp=new xi;xi.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;Z=xi});var zm,Wm=p(()=>{"use strict";zm={cullArea:null,cullable:!1,cullableChildren:!0}});var Vm,Xm,$m,Gl=p(()=>{"use strict";Vm=Math.PI*2,Xm=180/Math.PI,$m=Math.PI/180});var it,Il,_e=p(()=>{"use strict";it=class r{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}clone(){return new r(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return\`[pixi.js/math:Point x=\${this.x} y=\${this.y}]\`}static get shared(){return Il.x=0,Il.y=0,Il}},Il=new it});var G,RC,kC,nt=p(()=>{Gl();_e();G=class r{constructor(t=1,e=0,i=0,s=1,n=0,o=0){this.array=null,this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,e,i,s,n,o){return this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(t,e){e=e||new it;let i=t.x,s=t.y;return e.x=this.a*i+this.c*s+this.tx,e.y=this.b*i+this.d*s+this.ty,e}applyInverse(t,e){e=e||new it;let i=this.a,s=this.b,n=this.c,o=this.d,a=this.tx,u=this.ty,l=1/(i*o+n*-s),c=t.x,h=t.y;return e.x=o*l*c+-n*l*h+(u*n-a*o)*l,e.y=i*l*h+-s*l*c+(-u*i+a*s)*l,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),s=this.a,n=this.c,o=this.tx;return this.a=s*e-this.b*i,this.b=s*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=o*e-this.ty*i,this.ty=o*i+this.ty*e,this}append(t){let e=this.a,i=this.b,s=this.c,n=this.d;return this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this}appendFrom(t,e){let i=t.a,s=t.b,n=t.c,o=t.d,a=t.tx,u=t.ty,l=e.a,c=e.b,h=e.c,f=e.d;return this.a=i*l+s*h,this.b=i*c+s*f,this.c=n*l+o*h,this.d=n*c+o*f,this.tx=a*l+u*h+e.tx,this.ty=a*c+u*f+e.ty,this}setTransform(t,e,i,s,n,o,a,u,l){return this.a=Math.cos(a+l)*n,this.b=Math.sin(a+l)*n,this.c=-Math.sin(a-u)*o,this.d=Math.cos(a-u)*o,this.tx=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d),this}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let i=this.a,s=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){let e=this.a,i=this.b,s=this.c,n=this.d,o=t.pivot,a=-Math.atan2(-s,n),u=Math.atan2(i,e),l=Math.abs(a+u);return l<1e-5||Math.abs(Vm-l)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=u),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(s*s+n*n),t.position.x=this.tx+(o.x*e+o.y*s),t.position.y=this.ty+(o.x*i+o.y*n),t}invert(){let t=this.a,e=this.b,i=this.c,s=this.d,n=this.tx,o=t*s-e*i;return this.a=s/o,this.b=-e/o,this.c=-i/o,this.d=t/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(t*this.ty-e*n)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return\`[pixi.js:Matrix a=\${this.a} b=\${this.b} c=\${this.c} d=\${this.d} tx=\${this.tx} ty=\${this.ty}]\`}static get IDENTITY(){return kC.identity()}static get shared(){return RC.identity()}},RC=new G,kC=new G});var Ht,na=p(()=>{"use strict";Ht=class r{constructor(t,e,i){this._x=e||0,this._y=i||0,this._observer=t}clone(t){return new r(t??this._observer,this._x,this._y)}set(t=0,e=t){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return\`[pixi.js/math:ObservablePoint x=0 y=0 scope=\${this._observer}]\`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}});function et(r="default"){return Ul[r]===void 0&&(Ul[r]=-1),++Ul[r]}var Ul,zt=p(()=>{"use strict";Ul={default:-1}});function W(r,t,e=3){if(jm[t])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",\`\${t}
|
|
Deprecated since v\${r}\`):(i=i.split(\`
|
|
\`).splice(e).join(\`
|
|
\`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",\`\${t}
|
|
Deprecated since v\${r}\`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",\`\${t}
|
|
Deprecated since v\${r}\`),console.warn(i))),jm[t]=!0}var jm,$,Ym,yt=p(()=>{"use strict";jm={},$="8.0.0",Ym="8.3.4"});var Vr,Ol=p(()=>{"use strict";Vr=class{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e)}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){let e;return this._index>0?e=this._pool[--this._index]:e=new this._classType,e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){this._pool.length=0,this._index=0}}});var Ll,j,Jt=p(()=>{Ol();Ll=class{constructor(){this._poolsByClass=new Map}prepopulate(t,e){this.getPool(t).prepopulate(e)}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new Vr(t)),this._poolsByClass.get(t)}stats(){let t={};return this._poolsByClass.forEach(e=>{let i=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[i]={free:e.totalFree,used:e.totalUsed,size:e.totalSize}}),t}},j=new Ll});var Km,qm=p(()=>{yt();Km={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(r){typeof r=="boolean"&&r===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(r===!0?{}:r))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(r){W("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(r)}}});function oa(r,t,e){let i=r.length,s;if(t>=i||e===0)return;e=t+e>i?i-t:e;let n=i-e;for(s=t;s<n;++s)r[s]=r[s+e];r.length=n}var Nl=p(()=>{"use strict"});var Zm,Qm=p(()=>{Nl();yt();Zm={allowChildren:!0,removeChildren(r=0,t){let e=t??this.children.length,i=e-r,s=[];if(i>0&&i<=e){for(let o=e-1;o>=r;o--){let a=this.children[o];a&&(s.push(a),a.parent=null)}oa(this.children,r,e);let n=this.renderGroup||this.parentRenderGroup;n&&n.removeChildren(s);for(let o=0;o<s.length;++o)this.emit("childRemoved",s[o],this,o),s[o].emit("removed",this);return s.length>0&&this._didViewChangeTick++,s}else if(i===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(r){let t=this.getChildAt(r);return this.removeChild(t)},getChildAt(r){if(r<0||r>=this.children.length)throw new Error(\`getChildAt: Index (\${r}) does not exist.\`);return this.children[r]},setChildIndex(r,t){if(t<0||t>=this.children.length)throw new Error(\`The index \${t} supplied is out of bounds \${this.children.length}\`);this.getChildIndex(r),this.addChildAt(r,t)},getChildIndex(r){let t=this.children.indexOf(r);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(r,t){this.allowChildren||W($,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:e}=this;if(t<0||t>e.length)throw new Error(\`\${r}addChildAt: The index \${t} supplied is out of bounds \${e.length}\`);if(r.parent){let s=r.parent.children.indexOf(r);if(r.parent===this&&s===t)return r;s!==-1&&r.parent.children.splice(s,1)}t===e.length?e.push(r):e.splice(t,0,r),r.parent=this,r.didChange=!0,r._updateFlags=15;let i=this.renderGroup||this.parentRenderGroup;return i&&i.addChild(r),this.sortableChildren&&(this.sortDirty=!0),this.emit("childAdded",r,this,t),r.emit("added",this),r},swapChildren(r,t){if(r===t)return;let e=this.getChildIndex(r),i=this.getChildIndex(t);this.children[e]=t,this.children[i]=r;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...r){return r.length===1?this.reparentChildAt(r[0],this.children.length):(r.forEach(t=>this.reparentChildAt(t,this.children.length)),r[0])},reparentChildAt(r,t){if(r.parent===this)return this.setChildIndex(r,t),r;let e=r.worldTransform.clone();r.removeFromParent(),this.addChildAt(r,t);let i=this.worldTransform.clone();return i.invert(),e.prepend(i),r.setFromMatrix(e),r}}});var Jm,tg=p(()=>{"use strict";Jm={collectRenderables(r,t,e){this.parentRenderLayer&&this.parentRenderLayer!==e||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(r,t,e):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,r):this.collectRenderablesWithEffects(r,t,e))},collectRenderablesSimple(r,t,e){let i=this.children,s=i.length;for(let n=0;n<s;n++)i[n].collectRenderables(r,t,e)},collectRenderablesWithEffects(r,t,e){let{renderPipes:i}=t;for(let s=0;s<this.effects.length;s++){let n=this.effects[s];i[n.pipe].push(n,this,r)}this.collectRenderablesSimple(r,t,e);for(let s=this.effects.length-1;s>=0;s--){let n=this.effects[s];i[n.pipe].pop(n,this,r)}}}});var or,aa=p(()=>{"use strict";or=class{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}});var Hl,ua,eg=p(()=>{D();Jt();Hl=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let i=this._tests[e];if(i.test(t))return j.get(i.maskClass,t)}return t}returnMaskEffect(t){j.return(t)}},ua=new Hl;L.handleByList(b.MaskEffect,ua._effectClasses)});var rg,ig=p(()=>{aa();eg();rg={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){let r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=!0)},addEffect(r){this.effects.indexOf(r)===-1&&(this.effects.push(r),this.effects.sort((e,i)=>e.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(r){let t=this.effects.indexOf(r);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(r){let t=this._maskEffect;t?.mask!==r&&(t&&(this.removeEffect(t),ua.returnMaskEffect(t),this._maskEffect=null),r!=null&&(this._maskEffect=ua.getMaskEffect(r),this.addEffect(this._maskEffect)))},setMask(r){this._maskOptions={...this._maskOptions,...r},r.mask&&(this.mask=r.mask),this._markStructureAsChanged()},get mask(){return this._maskEffect?.mask},set filters(r){!Array.isArray(r)&&r&&(r=[r]);let t=this._filterEffect||(this._filterEffect=new or);r=r;let e=r?.length>0,i=t.filters?.length>0,s=e!==i;r=Array.isArray(r)?r.slice(0):r,t.filters=Object.freeze(r),s&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=r??null))},get filters(){return this._filterEffect?.filters},set filterArea(r){this._filterEffect||(this._filterEffect=new or),this._filterEffect.filterArea=r},get filterArea(){return this._filterEffect?.filterArea}}});var sg,ng=p(()=>{yt();sg={label:null,get name(){return W($,"Container.name property has been removed, use Container.label instead"),this.label},set name(r){W($,"Container.name property has been removed, use Container.label instead"),this.label=r},getChildByName(r,t=!1){return this.getChildByLabel(r,t)},getChildByLabel(r,t=!1){let e=this.children;for(let i=0;i<e.length;i++){let s=e[i];if(s.label===r||r instanceof RegExp&&r.test(s.label))return s}if(t)for(let i=0;i<e.length;i++){let n=e[i].getChildByLabel(r,!0);if(n)return n}return null},getChildrenByLabel(r,t=!1,e=[]){let i=this.children;for(let s=0;s<i.length;s++){let n=i[s];(n.label===r||r instanceof RegExp&&r.test(n.label))&&e.push(n)}if(t)for(let s=0;s<i.length;s++)i[s].getChildrenByLabel(r,!0,e);return e}}});var la,tt,Wt=p(()=>{_e();la=[new it,new it,new it,new it],tt=class r{constructor(t=0,e=0,i=0,s=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(s)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new r(0,0,0,0)}clone(){return new r(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height}strokeContains(t,e,i,s=.5){let{width:n,height:o}=this;if(n<=0||o<=0)return!1;let a=this.x,u=this.y,l=i*(1-s),c=i-l,h=a-l,f=a+n+l,d=u-l,m=u+o+l,g=a+c,x=a+n-c,_=u+c,v=u+o-c;return t>=h&&t<=f&&e>=d&&e<=m&&!(t>g&&t<x&&e>_&&e<v)}intersects(t,e){if(!e){let B=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=B)return!1;let P=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>P}let i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;let a=la[0].set(t.left,t.top),u=la[1].set(t.left,t.bottom),l=la[2].set(t.right,t.top),c=la[3].set(t.right,t.bottom);if(l.x<=a.x||u.y<=a.y)return!1;let h=Math.sign(e.a*e.d-e.b*e.c);if(h===0||(e.apply(a,a),e.apply(u,u),e.apply(l,l),e.apply(c,c),Math.max(a.x,u.x,l.x,c.x)<=i||Math.min(a.x,u.x,l.x,c.x)>=s||Math.max(a.y,u.y,l.y,c.y)<=n||Math.min(a.y,u.y,l.y,c.y)>=o))return!1;let f=h*(u.y-a.y),d=h*(a.x-u.x),m=f*i+d*n,g=f*s+d*n,x=f*i+d*o,_=f*s+d*o;if(Math.max(m,g,x,_)<=f*a.x+d*a.y||Math.min(m,g,x,_)>=f*c.x+d*c.y)return!1;let v=h*(a.y-l.y),T=h*(l.x-a.x),y=v*i+T*n,A=v*s+T*n,S=v*i+T*o,E=v*s+T*o;return!(Math.max(y,A,S,E)<=v*a.x+T*a.y||Math.min(y,A,S,E)>=v*c.x+T*c.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this}fit(t){let e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(i-e,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(t=1,e=.001){let i=Math.ceil((this.x+this.width-e)*t)/t,s=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=s-this.y,this}enlarge(t){let e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=i-e,this.y=s,this.height=n-s,this}getBounds(t){return t||(t=new r),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;let e=t.x,i=t.y,s=t.x+t.width,n=t.y+t.height;return e>=this.x&&e<this.x+this.width&&i>=this.y&&i<this.y+this.height&&s>=this.x&&s<this.x+this.width&&n>=this.y&&n<this.y+this.height}toString(){return\`[pixi.js/math:Rectangle x=\${this.x} y=\${this.y} width=\${this.width} height=\${this.height}]\`}}});var og,lt,ne=p(()=>{nt();Wt();og=new G,lt=class r{constructor(t=1/0,e=1/0,i=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=og,this.minX=t,this.minY=e,this.maxX=i,this.maxY=s}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new tt);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=og,this}set(t,e,i,s){this.minX=t,this.minY=e,this.maxX=i,this.maxY=s}addFrame(t,e,i,s,n){n||(n=this.matrix);let o=n.a,a=n.b,u=n.c,l=n.d,c=n.tx,h=n.ty,f=this.minX,d=this.minY,m=this.maxX,g=this.maxY,x=o*t+u*e+c,_=a*t+l*e+h;x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),x=o*i+u*e+c,_=a*i+l*e+h,x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),x=o*t+u*s+c,_=a*t+l*s+h,x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),x=o*i+u*s+c,_=a*i+l*s+h,x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),this.minX=f,this.minY=d,this.maxX=m,this.maxY=g}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e)}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){let e=this.minX,i=this.minY,s=this.maxX,n=this.maxY,{a:o,b:a,c:u,d:l,tx:c,ty:h}=t,f=o*e+u*i+c,d=a*e+l*i+h;this.minX=f,this.minY=d,this.maxX=f,this.maxY=d,f=o*s+u*i+c,d=a*s+l*i+h,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY,f=o*e+u*n+c,d=a*e+l*n+h,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY,f=o*s+u*n+c,d=a*s+l*n+h,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,i,s){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<i&&(this.minY=i),this.maxY>s&&(this.maxY=s),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new r(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,e,i,s){let n=this.minX,o=this.minY,a=this.maxX,u=this.maxY;s||(s=this.matrix);let l=s.a,c=s.b,h=s.c,f=s.d,d=s.tx,m=s.ty;for(let g=e;g<i;g+=2){let x=t[g],_=t[g+1],v=l*x+h*_+d,T=c*x+f*_+m;n=v<n?v:n,o=T<o?T:o,a=v>a?v:a,u=T>u?T:u}this.minX=n,this.minY=o,this.maxX=a,this.maxY=u}containsPoint(t,e){return this.minX<=t&&this.minY<=e&&this.maxX>=t&&this.maxY>=e}toString(){return\`[pixi.js:Bounds minX=\${this.minX} minY=\${this.minY} maxX=\${this.maxX} maxY=\${this.maxY} width=\${this.width} height=\${this.height}]\`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}});var Dt,he,Xr=p(()=>{nt();Ol();ne();Dt=new Vr(G),he=new Vr(lt)});var GC,ag,ug=p(()=>{nt();ne();Xr();GC=new G,ag={getFastGlobalBounds(r,t){t||(t=new lt),t.clear(),this._getGlobalBoundsRecursive(!!r,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);let e=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(e.worldTransform),t},_getGlobalBoundsRecursive(r,t,e){let i=t;if(r&&this.parentRenderLayer&&this.parentRenderLayer!==e||this.localDisplayStatus!==7||!this.measurable)return;let s=!!this.effects.length;if((this.renderGroup||s)&&(i=he.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){let o=this.bounds;i.addFrame(o.minX,o.minY,o.maxX,o.maxY,this.groupTransform)}let n=this.children;for(let o=0;o<n.length;o++)n[o]._getGlobalBoundsRecursive(r,i,e)}if(s){let n=!1,o=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(n||(n=!0,i.applyMatrix(o.worldTransform)),this.effects[a].addBounds(i,!0));n&&(i.applyMatrix(o.worldTransform.copyTo(GC).invert()),t.addBounds(i,this.relativeGroupTransform)),t.addBounds(i),he.return(i)}else this.renderGroup&&(t.addBounds(i,this.relativeGroupTransform),he.return(i))}}});function _i(r,t,e){e.clear();let i,s;return r.parent?t?i=r.parent.worldTransform:(s=Dt.get().identity(),i=ca(r,s)):i=G.IDENTITY,lg(r,e,i,t),s&&Dt.return(s),e.isValid||e.set(0,0,0,0),e}function lg(r,t,e,i){if(!r.visible||!r.measurable)return;let s;i?s=r.worldTransform:(r.updateLocalTransform(),s=Dt.get(),s.appendFrom(r.localTransform,e));let n=t,o=!!r.effects.length;if(o&&(t=he.get().clear()),r.boundsArea)t.addRect(r.boundsArea,s);else{r.bounds&&(t.matrix=s,t.addBounds(r.bounds));for(let a=0;a<r.children.length;a++)lg(r.children[a],t,s,i)}if(o){for(let a=0;a<r.effects.length;a++)r.effects[a].addBounds?.(t);n.addBounds(t,G.IDENTITY),he.return(t)}i||Dt.return(s)}function ca(r,t){let e=r.parent;return e&&(ca(e,t),e.updateLocalTransform(),t.append(e.localTransform)),t}var ks=p(()=>{nt();Xr()});function ha(r,t){if(r===16777215||!t)return t;if(t===16777215||!r)return r;let e=r>>16&255,i=r>>8&255,s=r&255,n=t>>16&255,o=t>>8&255,a=t&255,u=e*n/255|0,l=i*o/255|0,c=s*a/255|0;return(u<<16)+(l<<8)+c}var zl=p(()=>{"use strict"});function yi(r,t){return r===cg?t:t===cg?r:ha(r,t)}var cg,Wl=p(()=>{zl();cg=16777215});function Gs(r){return((r&255)<<16)+(r&65280)+(r>>16&255)}var hg,fg=p(()=>{ks();Xr();Wl();hg={getGlobalAlpha(r){if(r)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,e=this.parent;for(;e;)t*=e.alpha,e=e.parent;return t},getGlobalTransform(r,t){if(t)return r.copyFrom(this.worldTransform);this.updateLocalTransform();let e=ca(this,Dt.get().identity());return r.appendFrom(this.localTransform,e),Dt.return(e),r},getGlobalTint(r){if(r)return this.renderGroup?Gs(this.renderGroup.worldColor):this.parentRenderGroup?Gs(yi(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,e=this.parent;for(;e;)t=yi(t,e.localColor),e=e.parent;return Gs(t)}}});function z(...r){Vl!==dg&&(Vl++,Vl===dg?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r))}var Vl,dg,mt=p(()=>{"use strict";Vl=0,dg=500});function bi(r,t,e){return t.clear(),e||(e=G.IDENTITY),pg(r,t,e,r,!0),t.isValid||t.set(0,0,0,0),t}function pg(r,t,e,i,s){let n;if(s)n=Dt.get(),n=e.copyTo(n);else{if(!r.visible||!r.measurable)return;r.updateLocalTransform();let u=r.localTransform;n=Dt.get(),n.appendFrom(u,e)}let o=t,a=!!r.effects.length;if(a&&(t=he.get().clear()),r.boundsArea)t.addRect(r.boundsArea,n);else{r.renderPipeId&&(t.matrix=n,t.addBounds(r.bounds));let u=r.children;for(let l=0;l<u.length;l++)pg(u[l],t,n,i,!1)}if(a){for(let u=0;u<r.effects.length;u++)r.effects[u].addLocalBounds?.(t,i);o.addBounds(t,G.IDENTITY),he.return(t)}Dt.return(n)}var fa=p(()=>{nt();Xr()});function Xl(r,t){let e=r.children;for(let i=0;i<e.length;i++){let s=e[i],n=s.uid,o=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=t.index;(t.data[a]!==n||t.data[a+1]!==o)&&(t.data[t.index]=n,t.data[t.index+1]=o,t.didChange=!0),t.index=a+2,s.children.length&&Xl(s,t)}return t.didChange}var mg=p(()=>{"use strict"});var IC,gg,xg=p(()=>{nt();ne();ks();fa();mg();IC=new G,gg={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(r,t){let e=Math.sign(this.scale.x)||1;t!==0?this.scale.x=r/t*e:this.scale.x=e},_setHeight(r,t){let e=Math.sign(this.scale.y)||1;t!==0?this.scale.y=r/t*e:this.scale.y=e},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new lt});let r=this._localBoundsCacheData;return r.index=1,r.didChange=!1,r.data[0]!==this._didViewChangeTick&&(r.didChange=!0,r.data[0]=this._didViewChangeTick),Xl(this,r),r.didChange&&bi(this,r.localBounds,IC),r.localBounds},getBounds(r,t){return _i(this,r,t||new lt)}}});var _g,yg=p(()=>{"use strict";_g={_onRender:null,set onRender(r){let t=this.renderGroup||this.parentRenderGroup;if(!r){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=r},get onRender(){return this._onRender}}});function UC(r,t){return r._zIndex-t._zIndex}var bg,vg=p(()=>{"use strict";bg={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(UC))}}});var Tg,Sg=p(()=>{_e();Xr();Tg={getGlobalPosition(r=new it,t=!1){return this.parent?this.parent.toGlobal(this._position,r,t):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,t,e=!1){let i=this.getGlobalTransform(Dt.get(),e);return t=i.apply(r,t),Dt.return(i),t},toLocal(r,t,e,i){t&&(r=t.toGlobal(r,e,i));let s=this.getGlobalTransform(Dt.get(),i);return e=s.applyInverse(r,e),Dt.return(s),e}}});var vi,$l=p(()=>{zt();vi=class{constructor(){this.uid=et("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}});function ar(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function jl(r){return!(r&r-1)&&!!r}var Is=p(()=>{"use strict"});function da(r){let t={};for(let e in r)r[e]!==void 0&&(t[e]=r[e]);return t}var Yl=p(()=>{"use strict"});function OC(r){let t=wg[r];return t===void 0&&(wg[r]=et("resource")),t}var wg,Eg,pa,Kl=p(()=>{jt();zt();yt();wg=Object.create(null);Eg=class Cg extends ht{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...Cg.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){W($,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null}_generateResourceId(){let t=\`\${this.addressModeU}-\${this.addressModeV}-\${this.addressModeW}-\${this.magFilter}-\${this.minFilter}-\${this.mipmapFilter}-\${this.lodMinClamp}-\${this.lodMaxClamp}-\${this.compare}-\${this._maxAnisotropy}\`;return this._sharedResourceId=OC(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};Eg.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};pa=Eg});var Ag,ut,oe=p(()=>{jt();Is();Yl();zt();Kl();Ag=class Dg extends ht{constructor(t={}){super(),this.options=t,this.uid=et("textureSource"),this._resourceType="textureSource",this._resourceId=et("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...Dg.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new pa(da(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){this.style!==t&&(this._style?.off("change",this._onStyleChange,this),this._style=t,this._style?.on("change",this._onStyleChange,this),this._onStyleChange())}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){let t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){this._resourceId=et("resource"),this.emit("change",this),this.emit("unload",this)}get resourceWidth(){let{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){let{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,e,i){i||(i=this._resolution),t||(t=this.width),e||(e=this.height);let s=Math.round(t*i),n=Math.round(e*i);return this.width=s/i,this.height=n/i,this._resolution=i,this.pixelWidth===s&&this.pixelHeight===n?!1:(this._refreshPOT(),this.pixelWidth=s,this.pixelHeight=n,this.emit("resize",this),this._resourceId=et("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=jl(this.pixelWidth)&&jl(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};Ag.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};ut=Ag});function LC(){for(let r=0;r<16;r++){let t=[];ql.push(t);for(let e=0;e<16;e++){let i=ma($r[r]*$r[e]+Yr[r]*jr[e]),s=ma(jr[r]*$r[e]+Kr[r]*jr[e]),n=ma($r[r]*Yr[e]+Yr[r]*Kr[e]),o=ma(jr[r]*Yr[e]+Kr[r]*Kr[e]);for(let a=0;a<16;a++)if($r[a]===i&&jr[a]===s&&Yr[a]===n&&Kr[a]===o){t.push(a);break}}}for(let r=0;r<16;r++){let t=new G;t.set($r[r],jr[r],Yr[r],Kr[r],0,0),Pg.push(t)}}var $r,jr,Yr,Kr,ql,Pg,ma,gt,Bg=p(()=>{nt();$r=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],jr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Yr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Kr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ql=[],Pg=[],ma=Math.sign;LC();gt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>$r[r],uY:r=>jr[r],vX:r=>Yr[r],vY:r=>Kr[r],inv:r=>r&8?r&15:-r&7,add:(r,t)=>ql[r][t],sub:(r,t)=>ql[r][gt.inv(t)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,t)=>Math.abs(r)*2<=Math.abs(t)?t>=0?gt.S:gt.N:Math.abs(t)*2<=Math.abs(r)?r>0?gt.E:gt.W:t>0?r>0?gt.SE:gt.SW:r>0?gt.NE:gt.NW,matrixAppendRotationInv:(r,t,e=0,i=0)=>{let s=Pg[gt.inv(t)];s.tx=e,s.ty=i,r.append(s)}}});var Zl,Mg=p(()=>{"use strict";Zl=()=>{}});var qr,Ql=p(()=>{D();oe();qr=class extends ut{constructor(t){let e=t.resource||new Float32Array(t.width*t.height*4),i=t.format;i||(e instanceof Float32Array?i="rgba32float":e instanceof Int32Array||e instanceof Uint32Array?i="rgba32uint":e instanceof Int16Array||e instanceof Uint16Array?i="rgba16uint":(e instanceof Int8Array,i="bgra8unorm")),super({...t,resource:e,format:i}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}};qr.extension=b.TextureSource});var Fg,Ti,Jl=p(()=>{nt();Fg=new G,Ti=class{constructor(t,e){this.mapCoord=new G,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof e>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=e,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){this.texture!==t&&(this._texture?.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,e){e===void 0&&(e=t);let i=this.mapCoord;for(let s=0;s<t.length;s+=2){let n=t[s],o=t[s+1];e[s]=n*i.a+o*i.c+i.tx,e[s+1]=n*i.b+o*i.d+i.ty}return e}update(){let t=this._texture;this._updateID++;let e=t.uvs;this.mapCoord.set(e.x1-e.x0,e.y1-e.y0,e.x3-e.x0,e.y3-e.y0,e.x0,e.y0);let i=t.orig,s=t.trim;s&&(Fg.set(i.width/s.width,0,0,i.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(Fg));let n=t.source,o=this.uClampFrame,a=this.clampMargin/n._resolution,u=this.clampOffset/n._resolution;return o[0]=(t.frame.x+a+u)/n.width,o[1]=(t.frame.y+a+u)/n.height,o[2]=(t.frame.x+t.frame.width-a+u)/n.width,o[3]=(t.frame.y+t.frame.height-a+u)/n.height,this.uClampOffset[0]=this.clampOffset/n.pixelWidth,this.uClampOffset[1]=this.clampOffset/n.pixelHeight,this.isSimple=t.frame.width===n.width&&t.frame.height===n.height&&t.rotate===0,!0}}});var I,ft=p(()=>{jt();Bg();Wt();zt();yt();Mg();Ql();oe();Jl();I=class extends ht{constructor({source:t,label:e,frame:i,orig:s,trim:n,defaultAnchor:o,defaultBorders:a,rotate:u,dynamic:l}={}){if(super(),this.uid=et("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new tt,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=e,this.source=t?.source??new ut,this.noFrame=!i,i)this.frame.copyFrom(i);else{let{width:c,height:h}=this._source;this.frame.width=c,this.frame.height=h}this.orig=s||this.frame,this.trim=n,this.rotate=u??0,this.defaultAnchor=o,this.defaultBorders=a,this.destroyed=!1,this.dynamic=l||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new Ti(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){let{uvs:t,frame:e}=this,{width:i,height:s}=this._source,n=e.x/i,o=e.y/s,a=e.width/i,u=e.height/s,l=this.rotate;if(l){let c=a/2,h=u/2,f=n+c,d=o+h;l=gt.add(l,gt.NW),t.x0=f+c*gt.uX(l),t.y0=d+h*gt.uY(l),l=gt.add(l,2),t.x1=f+c*gt.uX(l),t.y1=d+h*gt.uY(l),l=gt.add(l,2),t.x2=f+c*gt.uX(l),t.y2=d+h*gt.uY(l),l=gt.add(l,2),t.x3=f+c*gt.uX(l),t.y3=d+h*gt.uY(l)}else t.x0=n,t.y0=o,t.x1=n+a,t.y1=o,t.x2=n+a,t.y2=o+u,t.x3=n,t.y3=o+u}destroy(t=!1){this._source&&t&&(this._source.destroy(),this._source=null),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return W($,"Texture.baseTexture is now Texture.source"),this._source}};I.EMPTY=new I({label:"EMPTY",source:new ut({label:"EMPTY"})});I.EMPTY.destroy=Zl;I.WHITE=new I({source:new qr({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});I.WHITE.destroy=Zl});var NC,tc,bt,vr=p(()=>{Is();oe();ft();NC=0,tc=class{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,i){let s=new ut({...this.textureOptions,width:t,height:e,resolution:1,antialias:i,autoGarbageCollect:!1});return new I({source:s,label:\`texturePool_\${NC++}\`})}getOptimalTexture(t,e,i=1,s){let n=Math.ceil(t*i-1e-6),o=Math.ceil(e*i-1e-6);n=ar(n),o=ar(o);let a=(n<<17)+(o<<1)+(s?1:0);this._texturePool[a]||(this._texturePool[a]=[]);let u=this._texturePool[a].pop();return u||(u=this.createTexture(n,o,s)),u.source._resolution=i,u.source.width=n/i,u.source.height=o/i,u.source.pixelWidth=n,u.source.pixelHeight=o,u.frame.x=0,u.frame.y=0,u.frame.width=t,u.frame.height=e,u.updateUvs(),this._poolKeyHash[u.uid]=a,u}getSameSizeTexture(t,e=!1){let i=t.source;return this.getOptimalTexture(t.width,t.height,i._resolution,e)}returnTexture(t){let e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=t!==!1,t)for(let e in this._texturePool){let i=this._texturePool[e];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0)}this._texturePool={}}},bt=new tc});var ga,Rg=p(()=>{nt();$l();vr();ga=class{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new G,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new vi,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;let e=t.children;for(let i=0;i<e.length;i++){let s=e[i];s._updateFlags=15,this.addChild(s)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(bt.returnTexture(this.texture),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0}reset(){this.renderGroupChildren.length=0;for(let t in this.childrenToUpdate){let e=this.childrenToUpdate[t];e.list.fill(null),e.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){let e=this.renderGroupChildren.indexOf(t);e>-1&&this.renderGroupChildren.splice(e,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup){this.addRenderGroupChild(t.renderGroup);return}t._onRender&&this.addOnRender(t);let e=t.children;for(let i=0;i<e.length;i++)this.addChild(e[i])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}let e=t.children;for(let i=0;i<e.length;i++)this.removeChild(e[i])}removeChildren(t){for(let e=0;e<t.length;e++)this.removeChild(t[e])}onChildUpdate(t){let e=this.childrenToUpdate[t.relativeRenderGroupDepth];e||(e=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),e.list[e.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let e=0;e<this._onRenderContainers.length;e++)this._onRenderContainers[e]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){let e=this.root.children;for(let i=0;i<e.length;i++)this._getChildren(e[i],t);return t}_getChildren(t,e=[]){if(e.push(t),t.renderGroup)return e;let i=t.children;for(let s=0;s<i.length;s++)this._getChildren(i[s],e);return e}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new G),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new G),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;let t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new G),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}});function kg(r,t,e={}){for(let i in t)!e[i]&&t[i]!==void 0&&(r[i]=t[i])}var Gg=p(()=>{"use strict"});var ec,rc,ic,Si,Us,Zr,dt,Fe=p(()=>{jt();Nt();Wm();D();nt();Gl();na();zt();yt();Jt();qm();Qm();tg();ig();ng();ug();fg();xg();yg();vg();Sg();Rg();Gg();ec=new Ht(null),rc=new Ht(null),ic=new Ht(null,1,1),Si=1,Us=2,Zr=4,dt=class r extends ht{constructor(t={}){super(),this.uid=et("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.updateTick=-1,this.localTransform=new G,this.relativeGroupTransform=new G,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Ht(this,0,0),this._scale=ic,this._pivot=rc,this._skew=ec,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],kg(this,t,{children:!0,parent:!0,effects:!0}),t.children?.forEach(e=>this.addChild(e)),t.parent?.addChild(this)}static mixin(t){W("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),L.mixin(r,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=t&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||W($,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let s=0;s<t.length;s++)this.addChild(t[s]);return t[0]}let e=t[0],i=this.renderGroup||this.parentRenderGroup;return e.parent===this?(this.children.splice(this.children.indexOf(e),1),this.children.push(e),i&&(i.structureDidChange=!0),e):(e.parent&&e.parent.removeChild(e),this.children.push(e),this.sortableChildren&&(this.sortDirty=!0),e.parent=this,e.didChange=!0,e._updateFlags=15,i&&i.addChild(e),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this),this._didViewChangeTick++,e._zIndex!==0&&e.depthOfChildModified(),e)}removeChild(...t){if(t.length>1){for(let s=0;s<t.length;s++)this.removeChild(t[s]);return t[0]}let e=t[0],i=this.children.indexOf(e);return i>-1&&(this._didViewChangeTick++,this.children.splice(i,1),this.renderGroup?this.renderGroup.removeChild(e):this.parentRenderGroup&&this.parentRenderGroup.removeChild(e),e.parentRenderLayer&&e.parentRenderLayer.detach(e),e.parent=null,this.emit("childRemoved",e,this,i),e.emit("removed",this)),e}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),this.renderGroup=j.get(ga,this),this.groupTransform=G.IDENTITY,t?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),j.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new G),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*Xm}set angle(t){this.rotation=t*$m}get pivot(){return this._pivot===rc&&(this._pivot=new Ht(this,0,0)),this._pivot}set pivot(t){this._pivot===rc&&(this._pivot=new Ht(this,0,0)),typeof t=="number"?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===ec&&(this._skew=new Ht(this,0,0)),this._skew}set skew(t){this._skew===ec&&(this._skew=new Ht(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===ic&&(this._scale=new Ht(this,1,1)),this._scale}set scale(t){this._scale===ic&&(this._scale=new Ht(this,0,0)),typeof t=="number"?this._scale.set(t):this._scale.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){let e=this.getLocalBounds().width;this._setWidth(t,e)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){let e=this.getLocalBounds().height;this._setHeight(t,e)}getSize(t){t||(t={});let e=this.getLocalBounds();return t.width=Math.abs(this.scale.x*e.width),t.height=Math.abs(this.scale.y*e.height),t}setSize(t,e){let i=this.getLocalBounds();typeof t=="object"?(e=t.height??t.width,t=t.width):e??(e=t),t!==void 0&&this._setWidth(t,i.width),e!==void 0&&this._setHeight(e,i.height)}_updateSkew(){let t=this._rotation,e=this._skew;this._cx=Math.cos(t+e._y),this._sx=Math.sin(t+e._y),this._cy=-Math.sin(t-e._x),this._sy=Math.cos(t-e._x)}updateTransform(t){return this.position.set(typeof t.x=="number"?t.x:this.position.x,typeof t.y=="number"?t.y:this.position.y),this.scale.set(typeof t.scaleX=="number"?t.scaleX||1:this.scale.x,typeof t.scaleY=="number"?t.scaleY||1:this.scale.y),this.rotation=typeof t.rotation=="number"?t.rotation:this.rotation,this.skew.set(typeof t.skewX=="number"?t.skewX:this.skew.x,typeof t.skewY=="number"?t.skewY:this.skew.y),this.pivot.set(typeof t.pivotX=="number"?t.pivotX:this.pivot.x,typeof t.pivotY=="number"?t.pivotY:this.pivot.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){let t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;let e=this.localTransform,i=this._scale,s=this._pivot,n=this._position,o=i._x,a=i._y,u=s._x,l=s._y;e.a=this._cx*o,e.b=this._sx*o,e.c=this._cy*a,e.d=this._sy*a,e.tx=n._x-(u*e.a+l*e.c),e.ty=n._y-(u*e.b+l*e.d)}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=Si,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){let i=Z.shared.setValue(t??16777215).toBgrNumber();i!==this.localColor&&(this.localColor=i,this._updateFlags|=Si,this._onUpdate())}get tint(){return Gs(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Us,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){let e=t?2:0;(this.localDisplayStatus&2)!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Zr,this.localDisplayStatus^=2,this._onUpdate())}get culled(){return!(this.localDisplayStatus&4)}set culled(t){let e=t?0:4;(this.localDisplayStatus&4)!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Zr,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){let e=t?1:0;(this.localDisplayStatus&1)!==e&&(this._updateFlags|=Zr,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){if(this.destroyed)return;this.destroyed=!0;let e;if(this.children.length&&(e=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof t=="boolean"?t:t?.children)&&e)for(let s=0;s<e.length;++s)e[s].destroy(t);this.renderGroup?.destroy(),this.renderGroup=null}};L.mixin(dt,Zm,ag,Tg,_g,gg,rg,sg,bg,zm,Km,hg,Jm)});var Tr,xa=p(()=>{_e();Tr=class r{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=r.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new it,this.page=new it,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(t,e,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(t,e,i,s,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}});function HC(r){return function(t){return t.test(r)}}function Os(r){var t={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?t.userAgent=r:r&&r.userAgent&&(t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var e=t.userAgent,i=e.split("[FBAN");typeof i[1]<"u"&&(e=i[0]),i=e.split("Twitter"),typeof i[1]<"u"&&(e=i[0]);var s=HC(e),n={apple:{phone:s(sc)&&!s(ur),ipod:s(Ig),tablet:!s(sc)&&(s(Ug)||$g(t))&&!s(ur),universal:s(Og),device:(s(sc)||s(Ig)||s(Ug)||s(Og)||$g(t))&&!s(ur)},amazon:{phone:s(wi),tablet:!s(wi)&&s(_a),device:s(wi)||s(_a)},android:{phone:!s(ur)&&s(wi)||!s(ur)&&s(nc),tablet:!s(ur)&&!s(wi)&&!s(nc)&&(s(_a)||s(Lg)),device:!s(ur)&&(s(wi)||s(_a)||s(nc)||s(Lg))||s(/\\bokhttp\\b/i)},windows:{phone:s(ur),tablet:s(Ng),device:s(ur)||s(Ng)},other:{blackberry:s(Hg),blackberry10:s(zg),opera:s(Wg),firefox:s(Xg),chrome:s(Vg),device:s(Hg)||s(zg)||s(Wg)||s(Xg)||s(Vg)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}var sc,Ig,Ug,Og,nc,Lg,wi,_a,ur,Ng,Hg,zg,Wg,Vg,Xg,$g,oc=p(()=>{sc=/iPhone/i,Ig=/iPod/i,Ug=/iPad/i,Og=/\\biOS-universal(?:.+)Mac\\b/i,nc=/\\bAndroid(?:.+)Mobile\\b/i,Lg=/Android/i,wi=/(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i,_a=/Silk/i,ur=/Windows Phone/i,Ng=/\\bWindows(?:.+)ARM\\b/i,Hg=/BlackBerry/i,zg=/BB10/i,Wg=/Opera Mini/i,Vg=/\\b(CriOS|Chrome)(?:.+)Mobile/i,Xg=/Mobile(?:.+)Firefox\\b/i,$g=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"}});var jg=p(()=>{oc();oc()});var zC,Yg,Kg=p(()=>{jg();zC=Os.default??Os,Yg=zC(globalThis.navigator)});var WC,ya,VC,XC,qg,Zg,$C,jC,YC,ac,Jg,tx=p(()=>{xa();D();Kg();Nl();WC=9,ya=100,VC=0,XC=0,qg=2,Zg=1,$C=-1e3,jC=-1e3,YC=2,ac=class Qg{constructor(t,e=Yg){this._mobileInfo=e,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pool=[],this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._hookDiv=null,(e.tablet||e.phone)&&this._createTouchHook(),this._renderer=t}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}_createTouchHook(){let t=document.createElement("button");t.style.width=\`\${Zg}px\`,t.style.height=\`\${Zg}px\`,t.style.position="absolute",t.style.top=\`\${$C}px\`,t.style.left=\`\${jC}px\`,t.style.zIndex=YC.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement("div"),this._div.style.width=\`\${ya}px\`,this._div.style.height=\`\${ya}px\`,this._div.style.position="absolute",this._div.style.top=\`\${VC}px\`,this._div.style.left=\`\${XC}px\`,this._div.style.zIndex=qg.toString(),this._div.style.pointerEvents="none"),this._activateOnTab&&(this._onKeyDown=this._onKeyDown.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)),this._deactivateOnMouseMove&&(this._onMouseMove=this._onMouseMove.bind(this),globalThis.document.addEventListener("mousemove",this._onMouseMove,!0));let t=this._renderer.view.canvas;if(t.parentNode)t.parentNode.appendChild(this._div),this._initAccessibilitySetup();else{let e=new MutationObserver(()=>{t.parentNode&&(t.parentNode.appendChild(this._div),e.disconnect(),this._initAccessibilitySetup())});e.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),this._activateOnTab&&globalThis.addEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.remove(this);for(let t of this._children)t._accessibleDiv&&t._accessibleDiv.parentNode&&(t._accessibleDiv.parentNode.removeChild(t._accessibleDiv),t._accessibleDiv=null),t._accessibleActive=!1;this._pool.forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)}),this._div&&this._div.parentNode&&this._div.parentNode.removeChild(this._div),this._pool=[],this._children=[]}}_updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&(t._accessibleActive||this._addChild(t),t._renderId=this._renderId);let e=t.children;if(e)for(let i=0;i<e.length;i++)this._updateAccessibleObjects(e[i])}init(t){let i={accessibilityOptions:{...Qg.defaultOptions,...t?.accessibilityOptions||{}}};this.debug=i.accessibilityOptions.debug,this._activateOnTab=i.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=i.accessibilityOptions.deactivateOnMouseMove,i.accessibilityOptions.enabledByDefault?this._activate():this._activateOnTab&&(this._onKeyDown=this._onKeyDown.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)),this._renderer.runners.postrender.remove(this)}postrender(){let t=performance.now();if(this._mobileInfo.android.device&&t<this._androidUpdateCount||(this._androidUpdateCount=t+this._androidUpdateFrequency,!this._renderer.renderingToScreen||!this._renderer.view.canvas))return;let e=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(let i of this._children)i._renderId===this._renderId&&e.add(this._children.indexOf(i))}for(let i=this._children.length-1;i>=0;i--){let s=this._children[i];e.has(i)||(s._accessibleDiv&&s._accessibleDiv.parentNode&&(s._accessibleDiv.parentNode.removeChild(s._accessibleDiv),this._pool.push(s._accessibleDiv),s._accessibleDiv=null),s._accessibleActive=!1,oa(this._children,i,1))}if(this._renderer.renderingToScreen){let{x:i,y:s,width:n,height:o}=this._renderer.screen,a=this._div;a.style.left=\`\${i}px\`,a.style.top=\`\${s}px\`,a.style.width=\`\${n}px\`,a.style.height=\`\${o}px\`}for(let i=0;i<this._children.length;i++){let s=this._children[i];if(!s._accessibleActive||!s._accessibleDiv)continue;let n=s._accessibleDiv,o=s.hitArea||s.getBounds().rectangle;if(s.hitArea){let a=s.worldTransform,u=this._renderer.resolution,l=this._renderer.resolution;n.style.left=\`\${(a.tx+o.x*a.a)*u}px\`,n.style.top=\`\${(a.ty+o.y*a.d)*l}px\`,n.style.width=\`\${o.width*a.a*u}px\`,n.style.height=\`\${o.height*a.d*l}px\`}else{this._capHitArea(o);let a=this._renderer.resolution,u=this._renderer.resolution;n.style.left=\`\${o.x*a}px\`,n.style.top=\`\${o.y*u}px\`,n.style.width=\`\${o.width*a}px\`,n.style.height=\`\${o.height*u}px\`}}this._renderId++}_updateDebugHTML(t){t.innerHTML=\`type: \${t.type}</br> title : \${t.title}</br> tabIndex: \${t.tabIndex}\`}_capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);let{width:e,height:i}=this._renderer;t.x+t.width>e&&(t.width=e-t.x),t.y+t.height>i&&(t.height=i-t.y)}_addChild(t){let e=this._pool.pop();e||(t.accessibleType==="button"?e=document.createElement("button"):(e=document.createElement(t.accessibleType),e.style.cssText=\`
|
|
color: transparent;
|
|
pointer-events: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
border: 0;
|
|
outline: 0;
|
|
background: transparent;
|
|
box-sizing: border-box;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
\`,t.accessibleText&&(e.innerText=t.accessibleText)),e.style.width=\`\${ya}px\`,e.style.height=\`\${ya}px\`,e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=qg.toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?e.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(e.title=\`container \${t.tabIndex}\`),t.accessibleHint&&t.accessibleHint!==null&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this._updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.container=t,this._children.push(t),this._div.appendChild(t._accessibleDiv),t.interactive&&(t._accessibleDiv.tabIndex=t.tabIndex)}_dispatchEvent(t,e){let{container:i}=t.target,s=this._renderer.events.rootBoundary,n=Object.assign(new Tr(s),{target:i});s.rootTarget=this._renderer.lastObjectRendered,e.forEach(o=>s.dispatchEvent(n,o))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode!==WC||!this._activateOnTab||this._activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this._deactivate()}destroy(){this._deactivate(),this._destroyTouchHook(),this._div=null,this._pool=null,this._children=null,this._renderer=null,this._activateOnTab&&globalThis.removeEventListener("keydown",this._onKeyDown)}setAccessibilityEnabled(t){t?this._activate():this._deactivate()}};ac.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"accessibility"};ac.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};Jg=ac});var ex,rx=p(()=>{"use strict";ex={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessibleText:null,accessiblePointerEvents:"auto",accessibleChildren:!0,_renderId:-1}});var ix=p(()=>{D();Fe();tx();rx();L.add(Jg);L.mixin(dt,ex)});var Ls,sx=p(()=>{D();Ls=class{static init(t){Object.defineProperty(this,"resizeTo",{set(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,i;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,i=globalThis.innerHeight;else{let{clientWidth:s,clientHeight:n}=this._resizeTo;e=s,i=n}this.renderer.resize(e,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};Ls.extension=b.Application});var Sr,ba=p(()=>{"use strict";Sr=(r=>(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Sr||{})});var Ei,nx=p(()=>{"use strict";Ei=class{constructor(t,e=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=e,this.priority=i,this._once=s}match(t,e=null){return this._fn===t&&this._context===e}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));let e=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),e}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let e=this.next;return this.next=t?null:e,this.previous=null,e}}});var ox,ae,Ns=p(()=>{ba();nx();ox=class fe{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Ei(null,null,1/0),this.deltaMS=1/fe.targetFPMS,this.elapsedMS=1/fe.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,i=Sr.NORMAL){return this._addListener(new Ei(t,e,i))}addOnce(t,e,i=Sr.NORMAL){return this._addListener(new Ei(t,e,i,!0))}_addListener(t){let e=this._head.next,i=this._head;if(!e)t.connect(i);else{for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}return this._startIfPossible(),this}remove(t,e){let i=this._head.next;for(;i;)i.match(t,e)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){let n=t-this._lastFrame|0;if(n<this._minElapsedMS)return;this._lastFrame=t-n%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*fe.targetFPMS;let i=this._head,s=i.next;for(;s;)s=s.emit(this);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){let e=Math.min(this.maxFPS,t),i=Math.min(Math.max(0,e)/1e3,fe.targetFPMS);this._maxElapsedMS=1/i}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{let e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!fe._shared){let t=fe._shared=new fe;t.autoStart=!0,t._protected=!0}return fe._shared}static get system(){if(!fe._system){let t=fe._system=new fe;t.autoStart=!0,t._protected=!0}return fe._system}};ox.targetFPMS=.06;ae=ox});var Hs,ax=p(()=>{D();ba();Ns();Hs=class{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,Sr.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?ae.shared:new ae,t.autoStart&&this.start()}static destroy(){if(this._ticker){let t=this._ticker;this.ticker=null,t.destroy()}}};Hs.extension=b.Application});var uc=p(()=>{D();sx();ax();L.add(Ls);L.add(Hs)});var lc,Ne,cc=p(()=>{ba();Ns();lc=class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this._tickerAdded||!this.domElement||(ae.system.add(this._tickerUpdate,this,Sr.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(ae.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let t=this.events._rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY,pointerType:t.pointerType,pointerId:t.pointerId}))}_tickerUpdate(t){this._deltaTime+=t.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}},Ne=new lc});var lr,va=p(()=>{_e();xa();lr=class extends Tr{constructor(){super(...arguments),this.client=new it,this.movement=new it,this.offset=new it,this.global=new it,this.screen=new it}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(t,e,i){return t.worldTransform.applyInverse(i||this.global,e)}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(t,e,i,s,n,o,a,u,l,c,h,f,d,m,g){throw new Error("Method not implemented.")}}});var te,hc=p(()=>{va();te=class extends lr{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}});var He,fc=p(()=>{va();He=class extends lr{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};He.DOM_DELTA_PIXEL=0;He.DOM_DELTA_LINE=1;He.DOM_DELTA_PAGE=2});var KC,qC,zs,Ta,ux=p(()=>{jt();_e();mt();cc();va();hc();fc();KC=2048,qC=new it,zs=new it,Ta=class{constructor(t){this.dispatch=new ht,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=t,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((i,s)=>i.priority-s.priority)}dispatchEvent(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.dispatch.emit(e||t.type,t)}mapEvent(t){if(!this.rootTarget)return;let e=this.mappingTable[t.type];if(e)for(let i=0,s=e.length;i<s;i++)e[i].fn(t);else z(\`[EventBoundary]: Event mapping not defined for \${t.type}\`)}hitTest(t,e){Ne.pauseUpdate=!0;let s=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",n=this[s](this.rootTarget,this.rootTarget.eventMode,qC.set(t,e),this.hitTestFn,this.hitPruneFn);return n&&n[0]}propagate(t,e){if(!t.target)return;let i=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(let s=0,n=i.length-1;s<n;s++)if(t.currentTarget=i[s],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!(t.propagationStopped||t.propagationImmediatelyStopped)){t.eventPhase=t.BUBBLING_PHASE;for(let s=i.length-2;s>=0;s--)if(t.currentTarget=i[s],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,e,i=this._allInteractiveElements){if(i.length===0)return;t.eventPhase=t.BUBBLING_PHASE;let s=Array.isArray(e)?e:[e];for(let n=i.length-1;n>=0;n--)s.forEach(o=>{t.currentTarget=i[n],this.notifyTarget(t,o)})}propagationPath(t){let e=[t];for(let i=0;i<KC&&t!==this.rootTarget&&t.parent;i++){if(!t.parent)throw new Error("Cannot find propagation path to disconnected target");e.push(t.parent),t=t.parent}return e.reverse(),e}hitTestMoveRecursive(t,e,i,s,n,o=!1){let a=!1;if(this._interactivePrune(t))return null;if((t.eventMode==="dynamic"||e==="dynamic")&&(Ne.pauseUpdate=!1),t.interactiveChildren&&t.children){let c=t.children;for(let h=c.length-1;h>=0;h--){let f=c[h],d=this.hitTestMoveRecursive(f,this._isInteractive(e)?e:f.eventMode,i,s,n,o||n(t,i));if(d){if(d.length>0&&!d[d.length-1].parent)continue;let m=t.isInteractive();(d.length>0||m)&&(m&&this._allInteractiveElements.push(t),d.push(t)),this._hitElements.length===0&&(this._hitElements=d),a=!0}}}let u=this._isInteractive(e),l=t.isInteractive();return l&&l&&this._allInteractiveElements.push(t),o||this._hitElements.length>0?null:a?this._hitElements:u&&!n(t,i)&&s(t,i)?l?[t]:[]:null}hitTestRecursive(t,e,i,s,n){if(this._interactivePrune(t)||n(t,i))return null;if((t.eventMode==="dynamic"||e==="dynamic")&&(Ne.pauseUpdate=!1),t.interactiveChildren&&t.children){let u=t.children,l=i;for(let c=u.length-1;c>=0;c--){let h=u[c],f=this.hitTestRecursive(h,this._isInteractive(e)?e:h.eventMode,l,s,n);if(f){if(f.length>0&&!f[f.length-1].parent)continue;let d=t.isInteractive();return(f.length>0||d)&&f.push(t),f}}}let o=this._isInteractive(e),a=t.isInteractive();return o&&s(t,i)?a?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!t||!t.visible||!t.renderable||!t.measurable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren}hitPruneFn(t,e){if(t.hitArea&&(t.worldTransform.applyInverse(e,zs),!t.hitArea.contains(zs.x,zs.y)))return!0;if(t.effects&&t.effects.length)for(let i=0;i<t.effects.length;i++){let s=t.effects[i];if(s.containsPoint&&!s.containsPoint(e,this.hitTestFn))return!0}return!1}hitTestFn(t,e){return t.hitArea?!0:t?.containsPoint?(t.worldTransform.applyInverse(e,zs),t.containsPoint(zs)):!1}notifyTarget(t,e){if(!t.currentTarget.isInteractive())return;e??(e=t.type);let i=\`on\${e}\`;t.currentTarget[i]?.(t);let s=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?\`\${e}capture\`:e;this._notifyListeners(t,s),t.eventPhase===t.AT_TARGET&&this._notifyListeners(t,e)}mapPointerDown(t){if(!(t instanceof te)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.createPointerEvent(t);if(this.dispatchEvent(e,"pointerdown"),e.pointerType==="touch")this.dispatchEvent(e,"touchstart");else if(e.pointerType==="mouse"||e.pointerType==="pen"){let s=e.button===2;this.dispatchEvent(e,s?"rightdown":"mousedown")}let i=this.trackingData(t.pointerId);i.pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e)}mapPointerMove(t){if(!(t instanceof te)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let e=this.createPointerEvent(t);this._isPointerMoveEvent=!1;let i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.trackingData(t.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==e.target){let u=t.type==="mousemove"?"mouseout":"pointerout",l=this.createPointerEvent(t,u,n);if(this.dispatchEvent(l,"pointerout"),i&&this.dispatchEvent(l,"mouseout"),!e.composedPath().includes(n)){let c=this.createPointerEvent(t,"pointerleave",n);for(c.eventPhase=c.AT_TARGET;c.target&&!e.composedPath().includes(c.target);)c.currentTarget=c.target,this.notifyTarget(c),i&&this.notifyTarget(c,"mouseleave"),c.target=c.target.parent;this.freeEvent(c)}this.freeEvent(l)}if(n!==e.target){let u=t.type==="mousemove"?"mouseover":"pointerover",l=this.clonePointerEvent(e,u);this.dispatchEvent(l,"pointerover"),i&&this.dispatchEvent(l,"mouseover");let c=n?.parent;for(;c&&c!==this.rootTarget.parent&&c!==e.target;)c=c.parent;if(!c||c===this.rootTarget.parent){let f=this.clonePointerEvent(e,"pointerenter");for(f.eventPhase=f.AT_TARGET;f.target&&f.target!==n&&f.target!==this.rootTarget.parent;)f.currentTarget=f.target,this.notifyTarget(f),i&&this.notifyTarget(f,"mouseenter"),f.target=f.target.parent;this.freeEvent(f)}this.freeEvent(l)}let o=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(e,"pointermove"),a&&o.push("globalpointermove"),e.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(e,"touchmove"),a&&o.push("globaltouchmove")),i&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(e,"mousemove"),a&&o.push("globalmousemove"),this.cursor=e.target?.cursor),o.length>0&&this.all(e,o),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=e.composedPath(),this.freeEvent(e)}mapPointerOver(t){if(!(t instanceof te)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.trackingData(t.pointerId),i=this.createPointerEvent(t),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);let n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;e.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(t){if(!(t instanceof te)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.trackingData(t.pointerId);if(e.overTargets){let i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.findMountedTarget(e.overTargets),n=this.createPointerEvent(t,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");let o=this.createPointerEvent(t,"pointerleave",s);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;e.overTargets=null,this.freeEvent(n),this.freeEvent(o)}this.cursor=null}mapPointerUp(t){if(!(t instanceof te)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=performance.now(),i=this.createPointerEvent(t);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}let s=this.trackingData(t.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[t.button]),o=n;if(n&&!i.composedPath().includes(n)){let a=n;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let u=i.button===2;this.notifyTarget(i,u?"rightupoutside":"mouseupoutside")}a=a.parent}delete s.pressTargetsByButton[t.button],o=a}if(o){let a=this.clonePointerEvent(i,"click");a.target=o,a.path=null,s.clicksByButton[t.button]||(s.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:e});let u=s.clicksByButton[t.button];if(u.target===a.target&&e-u.timeStamp<200?++u.clickCount:u.clickCount=1,u.target=a.target,u.timeStamp=e,a.detail=u.clickCount,a.pointerType==="mouse"){let l=a.button===2;this.dispatchEvent(a,l?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(t){if(!(t instanceof te)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.trackingData(t.pointerId),i=this.findMountedTarget(e.pressTargetsByButton[t.button]),s=this.createPointerEvent(t);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete e.pressTargetsByButton[t.button]}this.freeEvent(s)}mapWheel(t){if(!(t instanceof He)){z("EventBoundary cannot map a non-wheel event as a wheel event");return}let e=this.createWheelEvent(t);this.dispatchEvent(e),this.freeEvent(e)}findMountedTarget(t){if(!t)return null;let e=t[0];for(let i=1;i<t.length&&t[i].parent===e;i++)e=t[i];return e}createPointerEvent(t,e,i){let s=this.allocateEvent(te);return this.copyPointerData(t,s),this.copyMouseData(t,s),this.copyData(t,s),s.nativeEvent=t.nativeEvent,s.originalEvent=t,s.target=i??this.hitTest(s.global.x,s.global.y)??this._hitElements[0],typeof e=="string"&&(s.type=e),s}createWheelEvent(t){let e=this.allocateEvent(He);return this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,e.target=this.hitTest(e.global.x,e.global.y),e}clonePointerEvent(t,e){let i=this.allocateEvent(te);return i.nativeEvent=t.nativeEvent,i.originalEvent=t.originalEvent,this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.target=t.target,i.path=t.composedPath().slice(),i.type=e??i.type,i}copyWheelData(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ}copyPointerData(t,e){t instanceof te&&e instanceof te&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)}copyMouseData(t,e){t instanceof lr&&e instanceof lr&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.copyFrom(t.client),e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.copyFrom(t.movement),e.screen.copyFrom(t.screen),e.shiftKey=t.shiftKey,e.global.copyFrom(t.global))}copyData(t,e){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.which=t.which,e.layer.copyFrom(t.layer),e.page.copyFrom(t.page)}trackingData(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}allocateEvent(t){this.eventPool.has(t)||this.eventPool.set(t,[]);let e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.defaultPrevented=!1,e.path=null,e.target=null,e}freeEvent(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");let e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)}_notifyListeners(t,e){let i=t.currentTarget._events[e];if(i)if("fn"in i)i.once&&t.currentTarget.removeListener(e,i.fn,void 0,!0),i.fn.call(i.context,t);else for(let s=0,n=i.length;s<n&&!t.propagationImmediatelyStopped;s++)i[s].once&&t.currentTarget.removeListener(e,i[s].fn,void 0,!0),i[s].fn.call(i[s].context,t)}}});var ZC,QC,pc,Sa,mc=p(()=>{D();ux();cc();hc();fc();ZC=1,QC={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},pc=class dc{constructor(t){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new Ta(null),Ne.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new te(null),this._rootWheelEvent=new He(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...dc.defaultEventFeatures},{set:(e,i,s)=>(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),e[i]=s,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){let{canvas:e,resolution:i}=this.renderer;this.setTargetElement(e),this.resolution=i,dc._defaultEventMode=t.eventMode??"passive",Object.assign(this.features,t.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(t){this.resolution=t}destroy(){this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(t){t||(t="default");let e=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(e=!1),this._currentCursor===t)return;this._currentCursor=t;let i=this.cursorStyles[t];if(i)switch(typeof i){case"string":e&&(this.domElement.style.cursor=i);break;case"function":i(t);break;case"object":e&&Object.assign(this.domElement.style,i);break}else e&&typeof t=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,t)&&(this.domElement.style.cursor=t)}get pointer(){return this._rootPointerEvent}_onPointerDown(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let e=this._normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(let i=0,s=e.length;i<s;i++){let n=e[i],o=this._bootstrapEvent(this._rootPointerEvent,n);this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(t){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,Ne.pointerMoved();let e=this._normalizeToPointerData(t);for(let i=0,s=e.length;i<s;i++){let n=this._bootstrapEvent(this._rootPointerEvent,e[i]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let e=t.target;t.composedPath&&t.composedPath().length>0&&(e=t.composedPath()[0]);let i=e!==this.domElement?"outside":"",s=this._normalizeToPointerData(t);for(let n=0,o=s.length;n<o;n++){let a=this._bootstrapEvent(this._rootPointerEvent,s[n]);a.type+=i,this.rootBoundary.mapEvent(a)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let e=this._normalizeToPointerData(t);for(let i=0,s=e.length;i<s;i++){let n=this._bootstrapEvent(this._rootPointerEvent,e[i]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onWheel(t){if(!this.features.wheel)return;let e=this.normalizeWheelEvent(t);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(e)}setTargetElement(t){this._removeEvents(),this.domElement=t,Ne.domElement=t,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;Ne.addTickerListener();let t=this.domElement.style;t&&(globalThis.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this._onPointerMove,!0),this.domElement.addEventListener("pointerdown",this._onPointerDown,!0),this.domElement.addEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this._onPointerOverOut,!0),globalThis.addEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this._onPointerMove,!0),this.domElement.addEventListener("mousedown",this._onPointerDown,!0),this.domElement.addEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this._onPointerOverOut,!0),globalThis.addEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this._onPointerDown,!0),this.domElement.addEventListener("touchend",this._onPointerUp,!0),this.domElement.addEventListener("touchmove",this._onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;Ne.removeTickerListener();let t=this.domElement.style;t&&(globalThis.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction="")),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this._onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this._onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this._onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this._onPointerMove,!0),this.domElement.removeEventListener("mousedown",this._onPointerDown,!0),this.domElement.removeEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this._onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this._onPointerDown,!0),this.domElement.removeEventListener("touchend",this._onPointerUp,!0),this.domElement.removeEventListener("touchmove",this._onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(t,e,i){let s=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},n=1/this.resolution;t.x=(e-s.left)*(this.domElement.width/s.width)*n,t.y=(i-s.top)*(this.domElement.height/s.height)*n}_normalizeToPointerData(t){let e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(let i=0,s=t.changedTouches.length;i<s;i++){let n=t.changedTouches[i];typeof n.button>"u"&&(n.button=0),typeof n.buttons>"u"&&(n.buttons=1),typeof n.isPrimary>"u"&&(n.isPrimary=t.touches.length===1&&t.type==="touchstart"),typeof n.width>"u"&&(n.width=n.radiusX||1),typeof n.height>"u"&&(n.height=n.radiusY||1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="touch"),typeof n.pointerId>"u"&&(n.pointerId=n.identifier||0),typeof n.pressure>"u"&&(n.pressure=n.force||.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),typeof n.layerX>"u"&&(n.layerX=n.offsetX=n.clientX),typeof n.layerY>"u"&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,n.type=t.type,e.push(n)}else if(!globalThis.MouseEvent||t instanceof MouseEvent&&(!this.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))){let i=t;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=ZC),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,e.push(i)}else e.push(t);return e}normalizeWheelEvent(t){let e=this._rootWheelEvent;return this._transferMouseData(e,t),e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,e.deltaMode=t.deltaMode,this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.nativeEvent=t,e.type=t.type,e}_bootstrapEvent(t,e){return t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this._transferMouseData(t,e),this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.isTrusted=e.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=QC[t.type]||t.type),t}_transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.relatedTarget=null,t.shiftKey=e.shiftKey}};pc.extension={name:"events",type:[b.WebGLSystem,b.CanvasSystem,b.WebGPUSystem],priority:-1};pc.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};Sa=pc});var lx,cx=p(()=>{mc();xa();lx={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode==="dynamic"||this.eventMode==="static"},set interactive(r){this.eventMode=r?"static":"passive"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??Sa.defaultEventMode},set eventMode(r){this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,t,e){let i=typeof e=="boolean"&&e||typeof e=="object"&&e.capture,s=typeof e=="object"?e.signal:void 0,n=typeof e=="object"?e.once===!0:!1,o=typeof t=="function"?void 0:t;r=i?\`\${r}capture\`:r;let a=typeof t=="function"?t:t.handleEvent,u=this;s&&s.addEventListener("abort",()=>{u.off(r,a,o)}),n?u.once(r,a,o):u.on(r,a,o)},removeEventListener(r,t,e){let i=typeof e=="boolean"&&e||typeof e=="object"&&e.capture,s=typeof t=="function"?void 0:t;r=i?\`\${r}capture\`:r,t=typeof t=="function"?t:t.handleEvent,this.off(r,t,s)},dispatchEvent(r){if(!(r instanceof Tr))throw new Error("Container cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}}});var hx=p(()=>{D();Fe();mc();cx();L.add(Sa);L.mixin(dt,lx)});var gc,fx=p(()=>{"use strict";gc=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(gc||{})});var dx,px=p(()=>{"use strict";dx={createCanvas:(r,t)=>{let e=document.createElement("canvas");return e.width=r,e.height=t,e},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,t)=>fetch(r,t),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")}});var mx,Q,Pt=p(()=>{px();mx=dx,Q={get(){return mx},set(r){mx=r}}});function Re(r){if(typeof r!="string")throw new TypeError(\`Path must be a string. Received \${JSON.stringify(r)}\`)}function Ws(r){return r.split("?")[0].split("#")[0]}function JC(r){return r.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")}function tA(r,t,e){return r.replace(new RegExp(JC(t),"g"),e)}function eA(r,t){let e="",i=0,s=-1,n=0,o=-1;for(let a=0;a<=r.length;++a){if(a<r.length)o=r.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||n===1))if(s!==a-1&&n===2){if(e.length<2||i!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){let u=e.lastIndexOf("/");if(u!==e.length-1){u===-1?(e="",i=0):(e=e.slice(0,u),i=e.length-1-e.lastIndexOf("/")),s=a,n=0;continue}}else if(e.length===2||e.length===1){e="",i=0,s=a,n=0;continue}}t&&(e.length>0?e+="/..":e="..",i=2)}else e.length>0?e+=\`/\${r.slice(s+1,a)}\`:e=r.slice(s+1,a),i=a-s-1;s=a,n=0}else o===46&&n!==-1?++n:n=-1}return e}var Qr,xc=p(()=>{Pt();Qr={toPosix(r){return tA(r,"\\\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~\`]+=[a-z0-9-.!#$%*+.{}()_|~\`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\\-._~:@\\/?%\\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){Re(r),r=this.toPosix(r);let t=/^file:\\/\\/\\//.exec(r);if(t)return t[0];let e=/^[^/:]+:\\/{0,2}/.exec(r);return e?e[0]:""},toAbsolute(r,t,e){if(Re(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;let i=Ws(this.toPosix(t??Q.get().getBaseUrl())),s=Ws(this.toPosix(e??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?Qr.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(Re(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let t="",e=r.startsWith("/");this.hasProtocol(r)&&(t=this.rootname(r),r=r.slice(t.length));let i=r.endsWith("/");return r=eA(r,!1),r.length>0&&i&&(r+="/"),e?\`/\${r}\`:t+r},isAbsolute(r){return Re(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let t;for(let e=0;e<r.length;++e){let i=r[e];if(Re(i),i.length>0)if(t===void 0)t=i;else{let s=r[e-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?t+=\`/../\${i}\`:t+=\`/\${i}\`}}return t===void 0?".":this.normalize(t)},dirname(r){if(Re(r),r.length===0)return".";r=this.toPosix(r);let t=r.charCodeAt(0),e=t===47,i=-1,s=!0,n=this.getProtocol(r),o=r;r=r.slice(n.length);for(let a=r.length-1;a>=1;--a)if(t=r.charCodeAt(a),t===47){if(!s){i=a;break}}else s=!1;return i===-1?e?"/":this.isUrl(o)?n+r:n:e&&i===1?"//":n+r.slice(0,i)},rootname(r){Re(r),r=this.toPosix(r);let t="";if(r.startsWith("/")?t="/":t=this.getProtocol(r),this.isUrl(r)){let e=r.indexOf("/",t.length);e!==-1?t=r.slice(0,e):t=r,t.endsWith("/")||(t+="/")}return t},basename(r,t){Re(r),t&&Re(t),r=Ws(this.toPosix(r));let e=0,i=-1,s=!0,n;if(t!==void 0&&t.length>0&&t.length<=r.length){if(t.length===r.length&&t===r)return"";let o=t.length-1,a=-1;for(n=r.length-1;n>=0;--n){let u=r.charCodeAt(n);if(u===47){if(!s){e=n+1;break}}else a===-1&&(s=!1,a=n+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(i=n):(o=-1,i=a))}return e===i?i=a:i===-1&&(i=r.length),r.slice(e,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){e=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(e,i)},extname(r){Re(r),r=Ws(this.toPosix(r));let t=-1,e=0,i=-1,s=!0,n=0;for(let o=r.length-1;o>=0;--o){let a=r.charCodeAt(o);if(a===47){if(!s){e=o+1;break}continue}i===-1&&(s=!1,i=o+1),a===46?t===-1?t=o:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||i===-1||n===0||n===1&&t===i-1&&t===e+1?"":r.slice(t,i)},parse(r){Re(r);let t={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return t;r=Ws(this.toPosix(r));let e=r.charCodeAt(0),i=this.isAbsolute(r),s,n="";t.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let o=-1,a=0,u=-1,l=!0,c=r.length-1,h=0;for(;c>=s;--c){if(e=r.charCodeAt(c),e===47){if(!l){a=c+1;break}continue}u===-1&&(l=!1,u=c+1),e===46?o===-1?o=c:h!==1&&(h=1):o!==-1&&(h=-1)}return o===-1||u===-1||h===0||h===1&&o===u-1&&o===a+1?u!==-1&&(a===0&&i?t.base=t.name=r.slice(1,u):t.base=t.name=r.slice(a,u)):(a===0&&i?(t.name=r.slice(1,o),t.base=r.slice(1,u)):(t.name=r.slice(a,o),t.base=r.slice(a,u)),t.ext=r.slice(o,u)),t.dir=this.dirname(r),n&&(t.dir=n+t.dir),t},sep:"/",delimiter:":",joinExtensions:[".html"]}});var wr,_c=p(()=>{"use strict";wr=(r,t,e=!1)=>(Array.isArray(r)||(r=[r]),t?r.map(i=>typeof i=="string"||e?t(i):i):r)});function gx(r,t,e,i,s){let n=t[e];for(let o=0;o<n.length;o++){let a=n[o];e<t.length-1?gx(r.replace(i[e],a),t,e+1,i,s):s.push(r.replace(i[e],a))}}function xx(r){let t=/\\{(.*?)\\}/g,e=r.match(t),i=[];if(e){let s=[];e.forEach(n=>{let o=n.substring(1,n.length-1).split(",");s.push(o)}),gx(r,s,0,e,i)}else i.push(r);return i}var _x=p(()=>{"use strict"});var yc,yx=p(()=>{"use strict";yc=r=>!Array.isArray(r)});function rA(r){return r.split(".").pop().split("?").shift().split("#").shift()}var Vs,bx=p(()=>{mt();xc();_c();_x();yx();Vs=class{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>\`\${t}\${this._bundleIdConnector}\${e}\`,extractAssetIdFromBundle:(t,e)=>e.replace(\`\${t}\${this._bundleIdConnector}\`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(e=>{this._preferredOrder.push(e),e.priority||(e.priority=Object.keys(e.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{let e=t;this._defaultSearchParams=Object.keys(e).map(i=>\`\${encodeURIComponent(i)}=\${encodeURIComponent(e[i])}\`).join("&")}}getAlias(t){let{alias:e,src:i}=t;return wr(e||i,n=>typeof n=="string"?n:Array.isArray(n)?n.map(o=>o?.src??o):n?.src?n.src:n,!0)}addManifest(t){this._manifest&&z("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(t,e){let i=[],s=e;Array.isArray(e)||(s=Object.entries(e).map(([n,o])=>typeof o=="string"||Array.isArray(o)?{alias:n,src:o}:{alias:n,...o})),s.forEach(n=>{let o=n.src,a=n.alias,u;if(typeof a=="string"){let l=this._createBundleAssetId(t,a);i.push(l),u=[a,l]}else{let l=a.map(c=>this._createBundleAssetId(t,c));i.push(...l),u=[...a,...l]}this.add({...n,alias:u,src:o})}),this._bundles[t]=i}add(t){let e=[];Array.isArray(t)?e.push(...t):e.push(t);let i;i=n=>{this.hasKey(n)&&z(\`[Resolver] already has key: \${n} overwriting\`)},wr(e).forEach(n=>{let{src:o}=n,{data:a,format:u,loadParser:l}=n,c=wr(o).map(d=>typeof d=="string"?xx(d):Array.isArray(d)?d:[d]),h=this.getAlias(n);Array.isArray(h)?h.forEach(i):i(h);let f=[];c.forEach(d=>{d.forEach(m=>{let g={};if(typeof m!="object"){g.src=m;for(let x=0;x<this._parsers.length;x++){let _=this._parsers[x];if(_.test(m)){g=_.parse(m);break}}}else a=m.data??a,u=m.format??u,l=m.loadParser??l,g={...g,...m};if(!h)throw new Error(\`[Resolver] alias is undefined for this asset: \${g.src}\`);g=this._buildResolvedAsset(g,{aliases:h,data:a,format:u,loadParser:l}),f.push(g)})}),h.forEach(d=>{this._assetMap[d]=f})})}resolveBundle(t){let e=yc(t);t=wr(t);let i={};return t.forEach(s=>{let n=this._bundles[s];if(n){let o=this.resolve(n),a={};for(let u in o){let l=o[u];a[this._extractAssetIdFromBundle(s,u)]=l}i[s]=a}}),e?i[t[0]]:i}resolveUrl(t){let e=this.resolve(t);if(typeof t!="string"){let i={};for(let s in e)i[s]=e[s].src;return i}return e.src}resolve(t){let e=yc(t);t=wr(t);let i={};return t.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s],o=this._getPreferredOrder(n);o?.priority.forEach(a=>{o.params[a].forEach(u=>{let l=n.filter(c=>c[a]?c[a]===u:!1);l.length&&(n=l)})}),this._resolverHash[s]=n[0]}else this._resolverHash[s]=this._buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),e?i[t[0]]:i}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;e<t.length;e++){let i=t[e],s=this._preferredOrder.find(n=>n.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;let e=/\\?/.test(t)?"&":"?";return\`\${t}\${e}\${this._defaultSearchParams}\`}_buildResolvedAsset(t,e){let{aliases:i,data:s,loadParser:n,format:o}=e;return(this._basePath||this._rootPath)&&(t.src=Qr.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=i??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...s||{},...t.data},t.loadParser=n??t.loadParser,t.format=o??t.format??rA(t.src),t}};Vs.RETINA_PREFIX=/@([0-9\\.]+)x/});var bc,vx=p(()=>{"use strict";bc=(r,t)=>{let e=t.split("?")[1];return e&&(r+=\`?\${e}\`),r}});var Tx,vc,Sx=p(()=>{Wt();ft();Tx=class Xs{constructor(t,e){this.linkedSheets=[],this._texture=t instanceof I?t:null,this.textureSource=t.source,this.textures={},this.animations={},this.data=e;let i=parseFloat(e.meta.scale);i?(this.resolution=i,t.source.resolution=this.resolution):this.resolution=t.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Xs.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(t){let e=t,i=Xs.BATCH_SIZE;for(;e-t<i&&e<this._frameKeys.length;){let s=this._frameKeys[e],n=this._frames[s],o=n.frame;if(o){let a=null,u=null,l=n.trimmed!==!1&&n.sourceSize?n.sourceSize:n.frame,c=new tt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);n.rotated?a=new tt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):a=new tt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),n.trimmed!==!1&&n.spriteSourceSize&&(u=new tt(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[s]=new I({source:this.textureSource,frame:a,orig:c,trim:u,rotate:n.rotated?2:0,defaultAnchor:n.anchor,defaultBorders:n.borders,label:s.toString()})}e++}}_processAnimations(){let t=this.data.animations||{};for(let e in t){this.animations[e]=[];for(let i=0;i<t[e].length;i++){let s=t[e][i];this.animations[e].push(this.textures[s])}}}_parseComplete(){let t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Xs.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Xs.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};Tx.BATCH_SIZE=1e3;vc=Tx});function wx(r,t,e){let i={};if(r.forEach(s=>{i[s]=t}),Object.keys(t.textures).forEach(s=>{i[s]=t.textures[s]}),!e){let s=Qr.dirname(r[0]);t.linkedSheets.forEach((n,o)=>{let a=wx([\`\${s}/\${t.data.meta.related_multi_packs[o]}\`],n,!0);Object.assign(i,a)})}return i}var iA,Ex,Cx=p(()=>{fx();bx();vx();D();ft();xc();Sx();iA=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];Ex={extension:b.Asset,cache:{test:r=>r instanceof vc,getCacheableAssets:(r,t)=>wx(r,t,!1)},resolver:{extension:{type:b.ResolveParser,name:"resolveSpritesheet"},test:r=>{let e=r.split("?")[0].split("."),i=e.pop(),s=e.pop();return i==="json"&&iA.includes(s)},parse:r=>{let t=r.split(".");return{resolution:parseFloat(Vs.RETINA_PREFIX.exec(r)?.[1]??"1"),format:t[t.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:b.LoadParser,priority:gc.Normal,name:"spritesheetLoader"},async testParse(r,t){return Qr.extname(t.src).toLowerCase()===".json"&&!!r.frames},async parse(r,t,e){let{texture:i,imageFilename:s,textureOptions:n}=t?.data??{},o=Qr.dirname(t.src);o&&o.lastIndexOf("/")!==o.length-1&&(o+="/");let a;if(i instanceof I)a=i;else{let c=bc(o+(s??r.meta.image),t.src);a=(await e.load([{src:c,data:n}]))[c]}let u=new vc(a.source,r);await u.parse();let l=r?.meta?.related_multi_packs;if(Array.isArray(l)){let c=[];for(let f of l){if(typeof f!="string")continue;let d=o+f;t.data?.ignoreMultiPack||(d=bc(d,t.src),c.push(e.load({src:d,data:{textureOptions:n,ignoreMultiPack:!0}})))}let h=await Promise.all(c);u.linkedSheets=h,h.forEach(f=>{f.linkedSheets=[u].concat(u.linkedSheets.filter(d=>d!==f))})}return u},async unload(r,t,e){await e.unload(r.textureSource._sourceOrigin),r.destroy(!1)}}}});var wa=p(()=>{D();Cx();L.add(Ex)});function Ea(r,t,e){let{width:i,height:s}=e.orig,n=e.trim;if(n){let o=n.width,a=n.height;r.minX=n.x-t._x*i,r.maxX=r.minX+o,r.minY=n.y-t._y*s,r.maxY=r.minY+a}else r.minX=-t._x*i,r.maxX=r.minX+i,r.minY=-t._y*s,r.maxY=r.minY+s}var Tc=p(()=>{"use strict"});var Er,Ca=p(()=>{ne();Fe();Er=class extends dt{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._bounds=new lt(0,1,0,0),this._boundsDirty=!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}containsPoint(t){let e=this.bounds,{x:i,y:s}=t;return i>=e.minX&&i<=e.maxX&&s>=e.minY&&s<=e.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;let t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}destroy(t){super.destroy(t),this._bounds=null}collectRenderablesSimple(t,e,i){let{renderPipes:s,renderableGC:n}=e;s.blendMode.setBlendMode(this,this.groupBlendMode,t),s[this.renderPipeId].addRenderable(this,t),n.addRenderable(this),this.didViewUpdate=!1;let a=this.children,u=a.length;for(let l=0;l<u;l++)a[l].collectRenderables(t,e,i)}}});var Jr,Sc=p(()=>{na();ft();Tc();yt();Ca();Jr=class r extends Er{constructor(t=I.EMPTY){t instanceof I&&(t={texture:t});let{texture:e=I.EMPTY,anchor:i,roundPixels:s,width:n,height:o,...a}=t;super({label:"Sprite",...a}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new Ht({_onUpdate:()=>{this.onViewUpdate()}}),i?this.anchor=i:e.defaultAnchor&&(this.anchor=e.defaultAnchor),this.texture=e,this.allowChildren=!1,this.roundPixels=s??!1,n!==void 0&&(this.width=n),o!==void 0&&(this.height=o)}static from(t,e=!1){return t instanceof I?new r(t):new r(I.from(t,e))}set texture(t){t||(t=I.EMPTY);let e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return Ea(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return W("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){let t=this._anchor,e=this._texture,i=this._bounds,{width:s,height:n}=e.orig;i.minX=-t._x*s,i.maxX=i.minX+s,i.minY=-t._y*n,i.maxY=i.minY+n}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t?.texture){let i=typeof t=="boolean"?t:t?.textureSource;this._texture.destroy(i)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,e){typeof t=="object"?(e=t.height??t.width,t=t.width):e??(e=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),e!==void 0&&this._setHeight(e,this._texture.orig.height)}}});function Aa(r,t,e){let i=sA;r.measurable=!0,_i(r,e,i),t.addBoundsMask(i),r.measurable=!1}var sA,wc=p(()=>{ne();ks();sA=new lt});function Da(r,t,e){let i=he.get();r.measurable=!0;let s=Dt.get().identity(),n=Ax(r,e,s);bi(r,i,n),r.measurable=!1,t.addBoundsMask(i),Dt.return(s),he.return(i)}function Ax(r,t,e){return r?(r!==t&&(Ax(r.parent,t,e),r.updateLocalTransform(),e.append(r.localTransform)),e):(z("Mask bounds, renderable is not inside the root container"),e)}var Ec=p(()=>{fa();Xr();mt()});var $s,Dx=p(()=>{D();Sc();wc();Ec();$s=class{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof Jr),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask=null}addBounds(t,e){this.inverse||Aa(this.mask,t,e)}addLocalBounds(t,e){Da(this.mask,t,e)}containsPoint(t,e){let i=this.mask;return e(i,t)}destroy(){this.reset()}static test(t){return t instanceof Jr}};$s.extension=b.MaskEffect});var js,Px=p(()=>{D();js=class{constructor(t){this.priority=0,this.pipe="colorMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}};js.extension=b.MaskEffect});var Ys,Bx=p(()=>{D();Fe();wc();Ec();Ys=class{constructor(t){this.priority=0,this.pipe="stencilMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null}addBounds(t,e){Aa(this.mask,t,e)}addLocalBounds(t,e){Da(this.mask,t,e)}containsPoint(t,e){let i=this.mask;return e(i,t)}destroy(){this.reset()}static test(t){return t instanceof dt}};Ys.extension=b.MaskEffect});var Yt,Ci=p(()=>{Pt();D();oe();Yt=class extends ut{constructor(t){t.resource||(t.resource=Q.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&(this.resource.style.width=\`\${this.width}px\`,this.resource.style.height=\`\${this.height}px\`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,e=this.height,i=this._resolution){let s=super.resize(t,e,i);return s&&this.resizeCanvas(),s}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}};Yt.extension=b.TextureSource});var ze,Pa=p(()=>{Pt();D();mt();oe();ze=class extends ut{constructor(t){if(t.resource&&globalThis.HTMLImageElement&&t.resource instanceof HTMLImageElement){let e=Q.get().createCanvas(t.resource.width,t.resource.height);e.getContext("2d").drawImage(t.resource,0,0,t.resource.width,t.resource.height),t.resource=e,z("ImageSource: Image element passed, converting to canvas. Use CanvasSource instead.")}super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}};ze.extension=b.TextureSource});async function Mx(){return Cc??(Cc=(async()=>{let t=document.createElement("canvas").getContext("webgl");if(!t)return"premultiply-alpha-on-upload";let e=await new Promise(o=>{let a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return"premultiply-alpha-on-upload";let i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i);let s=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,s),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e);let n=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,n),t.deleteFramebuffer(s),t.deleteTexture(i),t.getExtension("WEBGL_lose_context")?.loseContext(),n[0]<=n[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),Cc}var Cc,Fx=p(()=>{"use strict"});var Ba,kx,Gx=p(()=>{D();Ns();Fx();oe();Ba=class Rx extends ut{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...Rx.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){let t=ae.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let t=this.resource,e=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(e.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await Mx(),this._load=new Promise((i,s)=>{this.isValid?i(this):(this._resolve=i,this._reject=s,e.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(\`Preload exceeded timeout of \${e.preloadTimeoutMs}ms\`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){let t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){let t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(ae.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(ae.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(ae.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};Ba.extension=b.TextureSource;Ba.defaultOptions={...ut.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};Ba.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};kx=Ba});var Ac,Bt,Ks=p(()=>{mt();_c();Ac=class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){let e=this._cache.get(t);return e||z(\`[Assets] Asset id \${t} was not found in the Cache\`),e}set(t,e){let i=wr(t),s;for(let u=0;u<this.parsers.length;u++){let l=this.parsers[u];if(l.test(e)){s=l.getCacheableAssets(i,e);break}}let n=new Map(Object.entries(s||{}));s||i.forEach(u=>{n.set(u,e)});let o=[...n.keys()],a={cacheKeys:o,keys:i};i.forEach(u=>{this._cacheMap.set(u,a)}),o.forEach(u=>{let l=s?s[u]:e;this._cache.has(u)&&this._cache.get(u)!==l&&z("[Cache] already has key:",u),this._cache.set(u,n.get(u))})}remove(t){if(!this._cacheMap.has(t)){z(\`[Assets] Asset id \${t} was not found in the Cache\`);return}let e=this._cacheMap.get(t);e.cacheKeys.forEach(s=>{this._cache.delete(s)}),e.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}},Bt=new Ac});function Ix(r={}){let t=r&&r.resource,e=t?r.resource:r,i=t?r:{resource:r};for(let s=0;s<Dc.length;s++){let n=Dc[s];if(n.test(e))return new n(i)}throw new Error(\`Could not find a source type for resource: \${i.resource}\`)}function Ux(r={},t=!1){let e=r&&r.resource,i=e?r.resource:r,s=e?r:{resource:r};if(!t&&Bt.has(i))return Bt.get(i);let n=new I({source:Ix(s)});return n.on("destroy",()=>{Bt.has(i)&&Bt.remove(i)}),t||Bt.set(i,n),n}function Ox(r,t=!1){return typeof r=="string"?Bt.get(r):r instanceof ut?new I({source:r}):Ux(r,t)}var Dc,Pc=p(()=>{Ks();D();oe();ft();Dc=[];L.handleByList(b.TextureSource,Dc);I.from=Ox;ut.from=Ix});var Ma=p(()=>{D();Dx();Px();Bx();Ql();Ci();Pa();Gx();Pc();L.add($s,js,Ys,kx,ze,Yt,qr)});var It,Cr=p(()=>{"use strict";It=class{constructor(t){this.resources=Object.create(null),this._dirty=!0;let e=0;for(let i in t){let s=t[i];this.setResource(s,e++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;let t=[],e=0;for(let i in this.resources)t[e++]=this.resources[i]._resourceId;this._key=t.join("|")}setResource(t,e){let i=this.resources[e];t!==i&&(i&&t.off?.("change",this.onResourceChange,this),t.on?.("change",this.onResourceChange,this),this.resources[e]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t){let e=this.resources;for(let i in e)e[i]._touched=t}destroy(){let t=this.resources;for(let e in t)t[e].off?.("change",this.onResourceChange,this);this.resources=null}onResourceChange(t){if(this._dirty=!0,t.destroyed){let e=this.resources;for(let i in e)e[i]===t&&(e[i]=null)}else this._updateKey()}}});function Ra(){return(!Fa||Fa?.isContextLost())&&(Fa=Q.get().createCanvas().getContext("webgl",{})),Fa}var Fa,Bc=p(()=>{Pt()});function oA(r){let t="";for(let e=0;e<r;++e)e>0&&(t+=\`
|
|
else \`),e<r-1&&(t+=\`if(test == \${e}.0){}\`);return t}function Lx(r,t){if(r===0)throw new Error("Invalid value of \`0\` passed to \`checkMaxIfStatementsInShader\`");let e=t.createShader(t.FRAGMENT_SHADER);try{for(;;){let i=nA.replace(/%forloop%/gi,oA(r));if(t.shaderSource(e,i),t.compileShader(e),!t.getShaderParameter(e,t.COMPILE_STATUS))r=r/2|0;else break}}finally{t.deleteShader(e)}return r}var nA,Nx=p(()=>{"use strict";nA=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(\`
|
|
\`)});function ye(){if(Ai)return Ai;let r=Ra();return Ai=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),Ai=Lx(Ai,r),r.getExtension("WEBGL_lose_context")?.loseContext(),Ai}var Ai,ti=p(()=>{Bc();Nx();Ai=null});function Di(r,t){let e=2166136261;for(let i=0;i<t;i++)e^=r[i].uid,e=Math.imul(e,16777619),e>>>=0;return Hx[e]||aA(r,t,e)}function aA(r,t,e){let i={},s=0;Mc||(Mc=ye());for(let o=0;o<Mc;o++){let a=o<t?r[o]:I.EMPTY.source;i[s++]=a.source,i[s++]=a.style}let n=new It(i);return Hx[e]=n,n}var Hx,Mc,ka=p(()=>{Cr();ft();ti();Hx={};Mc=0});var We,Fc=p(()=>{"use strict";We=class{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[\`\${t}View\`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this.uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(\`\${t} isn't a valid view type\`)}}}});function qs(r,t){let e=r.byteLength/8|0,i=new Float64Array(r,0,e);new Float64Array(t,0,e).set(i);let n=r.byteLength-e*8;if(n>0){let o=new Uint8Array(r,e*8,n);new Uint8Array(t,e*8,n).set(o)}}var Rc=p(()=>{"use strict"});var zx,pt,ei=p(()=>{"use strict";zx={normal:"normal-npm",add:"add-npm",screen:"screen-npm"},pt=(r=>(r[r.DISABLED=0]="DISABLED",r[r.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",r[r.MASK_ACTIVE=2]="MASK_ACTIVE",r[r.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",r[r.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",r[r.NONE=5]="NONE",r))(pt||{})});function cr(r,t){return t.alphaMode==="no-premultiply-alpha"&&zx[r]||r}var Zs=p(()=>{ei()});var Ga,Wx=p(()=>{"use strict";Ga=class{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){let e=this.textures[t];this.textures[t]=null,this.ids[e.uid]=null}this.count=0}}});function Vx(){return Gc>0?$x[--Gc]:new kc}function Xx(r){$x[Gc++]=r}var kc,$x,Gc,Qs,jx,Yx,Kx=p(()=>{zt();Fc();Rc();Zs();ti();Wx();kc=class{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new Ga,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null}},$x=[],Gc=0;Qs=0,jx=class Ia{constructor(t={}){this.uid=et("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],Ia.defaultOptions.maxTextures=Ia.defaultOptions.maxTextures??ye(),t={...Ia.defaultOptions,...t};let{maxTextures:e,attributesInitialSize:i,indicesInitialSize:s}=t;this.attributeBuffer=new We(i*4),this.indexBuffer=new Uint16Array(s),this.maxTextures=e}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)Xx(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,e){let i=t._batch.textures.ids[e._source.uid];return!i&&i!==0?!1:(t._textureId=i,t.texture=e,!0)}updateElement(t){this.dirty=!0;let e=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId)}break(t){let e=this._elements;if(!e[this.elementStart])return;let i=Vx(),s=i.textures;s.clear();let n=e[this.elementStart],o=cr(n.blendMode,n.texture._source),a=n.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);let u=this.attributeBuffer.float32View,l=this.attributeBuffer.uint32View,c=this.indexBuffer,h=this._batchIndexSize,f=this._batchIndexStart,d="startBatch",m=this.maxTextures;for(let g=this.elementStart;g<this.elementSize;++g){let x=e[g];e[g]=null;let v=x.texture._source,T=cr(x.blendMode,v),y=o!==T||a!==x.topology;if(v._batchTick===Qs&&!y){x._textureId=v._textureBindLocation,h+=x.indexSize,x.packAsQuad?(this.packQuadAttributes(x,u,l,x._attributeStart,x._textureId),this.packQuadIndex(c,x._indexStart,x._attributeStart/this.vertexSize)):(this.packAttributes(x,u,l,x._attributeStart,x._textureId),this.packIndex(x,c,x._indexStart,x._attributeStart/this.vertexSize)),x._batch=i;continue}v._batchTick=Qs,(s.count>=m||y)&&(this._finishBatch(i,f,h-f,s,o,a,t,d),d="renderBatch",f=h,o=T,a=x.topology,i=Vx(),s=i.textures,s.clear(),++Qs),x._textureId=v._textureBindLocation=s.count,s.ids[v.uid]=s.count,s.textures[s.count++]=v,x._batch=i,h+=x.indexSize,x.packAsQuad?(this.packQuadAttributes(x,u,l,x._attributeStart,x._textureId),this.packQuadIndex(c,x._indexStart,x._attributeStart/this.vertexSize)):(this.packAttributes(x,u,l,x._attributeStart,x._textureId),this.packIndex(x,c,x._indexStart,x._attributeStart/this.vertexSize))}s.count>0&&(this._finishBatch(i,f,h-f,s,o,a,t,d),f=h,++Qs),this.elementStart=this.elementSize,this._batchIndexStart=f,this._batchIndexSize=h}_finishBatch(t,e,i,s,n,o,a,u){t.gpuBindGroup=null,t.bindGroup=null,t.action=u,t.batcher=this,t.textures=s,t.blendMode=n,t.topology=o,t.start=e,t.size=i,++Qs,this.batches[this.batchIndex++]=t,a.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){let e=Math.max(t,this.attributeBuffer.size*2),i=new We(e);qs(this.attributeBuffer.rawBinaryData,i.rawBinaryData),this.attributeBuffer=i}_resizeIndexBuffer(t){let e=this.indexBuffer,i=Math.max(t,e.length*1.5);i+=i%2;let s=i>65535?new Uint32Array(i):new Uint16Array(i);if(s.BYTES_PER_ELEMENT!==e.BYTES_PER_ELEMENT)for(let n=0;n<e.length;n++)s[n]=e[n];else qs(e.buffer,s.buffer);this.indexBuffer=s}packQuadIndex(t,e,i){t[e]=i+0,t[e+1]=i+1,t[e+2]=i+2,t[e+3]=i+0,t[e+4]=i+2,t[e+5]=i+3}packIndex(t,e,i,s){let n=t.indices,o=t.indexSize,a=t.indexOffset,u=t.attributeOffset;for(let l=0;l<o;l++)e[i++]=s+n[l+a]-u}destroy(){for(let t=0;t<this.batches.length;t++)Xx(this.batches[t]);this.batches=null;for(let t=0;t<this._elements.length;t++)this._elements[t]._batch=null;this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}};jx.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};Yx=jx});var J,hr=p(()=>{"use strict";J=(r=>(r[r.MAP_READ=1]="MAP_READ",r[r.MAP_WRITE=2]="MAP_WRITE",r[r.COPY_SRC=4]="COPY_SRC",r[r.COPY_DST=8]="COPY_DST",r[r.INDEX=16]="INDEX",r[r.VERTEX=32]="VERTEX",r[r.UNIFORM=64]="UNIFORM",r[r.STORAGE=128]="STORAGE",r[r.INDIRECT=256]="INDIRECT",r[r.QUERY_RESOLVE=512]="QUERY_RESOLVE",r[r.STATIC=1024]="STATIC",r))(J||{})});var St,Ar=p(()=>{jt();zt();hr();St=class extends ht{constructor(t){let{data:e,size:i}=t,{usage:s,label:n,shrinkToFit:o}=t;super(),this.uid=et("buffer"),this._resourceType="buffer",this._resourceId=et("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,e instanceof Array&&(e=new Float32Array(e)),this._data=e,i??(i=e?.byteLength);let a=!!e;this.descriptor={size:i,usage:s,mappedAtCreation:a,label:n},this.shrinkToFit=o??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&J.STATIC)}set static(t){t?this.descriptor.usage|=J.STATIC:this.descriptor.usage&=~J.STATIC}setDataWithSize(t,e,i){if(this._updateID++,this._updateSize=e*t.BYTES_PER_ELEMENT,this._data===t){i&&this.emit("update",this);return}let s=this._data;if(this._data=t,this._dataInt32=null,!s||s.length!==t.length){!this.shrinkToFit&&s&&t.byteLength<s.byteLength?i&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=et("resource"),this.emit("change",this));return}i&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}});function Ic(r,t){if(!(r instanceof St)){let e=t?J.INDEX:J.VERTEX;r instanceof Array&&(t?(r=new Uint32Array(r),e=J.INDEX|J.COPY_DST):(r=new Float32Array(r),e=J.VERTEX|J.COPY_DST)),r=new St({data:r,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:e})}return r}var qx=p(()=>{Ar();hr()});function Zx(r,t,e){let i=r.getAttribute(t);if(!i)return e.minX=0,e.minY=0,e.maxX=0,e.maxY=0,e;let s=i.buffer.data,n=1/0,o=1/0,a=-1/0,u=-1/0,l=s.BYTES_PER_ELEMENT,c=(i.offset||0)/l,h=(i.stride||2*4)/l;for(let f=c;f<s.length;f+=h){let d=s[f],m=s[f+1];d>a&&(a=d),m>u&&(u=m),d<n&&(n=d),m<o&&(o=m)}return e.minX=n,e.minY=o,e.maxX=a,e.maxY=u,e}var Qx=p(()=>{"use strict"});function uA(r){return(r instanceof St||Array.isArray(r)||r.BYTES_PER_ELEMENT)&&(r={buffer:r}),r.buffer=Ic(r.buffer,!1),r}var be,Pi=p(()=>{jt();ne();zt();Ar();qx();Qx();be=class extends ht{constructor(t={}){super(),this.uid=et("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new lt,this._boundsDirty=!0;let{attributes:e,indexBuffer:i,topology:s}=t;if(this.buffers=[],this.attributes={},e)for(let n in e)this.addAttribute(n,e[n]);this.instanceCount=t.instanceCount??1,i&&this.addIndex(i),this.topology=s||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(let t in this.attributes){let e=this.attributes[t];return e.buffer.data.length/(e.stride/4||e.size)}return 0}addAttribute(t,e){let i=uA(e);this.buffers.indexOf(i.buffer)===-1&&(this.buffers.push(i.buffer),i.buffer.on("update",this.onBufferUpdate,this),i.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=i}addIndex(t){this.indexBuffer=Ic(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,Zx(this,"aPosition",this._bounds)):this._bounds}destroy(t=!1){this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(e=>e.destroy()),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}});var lA,cA,Ua,Jx=p(()=>{Ar();hr();Pi();lA=new Float32Array(1),cA=new Uint32Array(1),Ua=class extends be{constructor(){let e=new St({data:lA,label:"attribute-batch-buffer",usage:J.VERTEX|J.COPY_DST,shrinkToFit:!1}),i=new St({data:cA,label:"index-batch-buffer",usage:J.INDEX|J.COPY_DST,shrinkToFit:!1}),s=6*4;super({attributes:{aPosition:{buffer:e,format:"float32x2",stride:s,offset:0},aUV:{buffer:e,format:"float32x2",stride:s,offset:2*4},aColor:{buffer:e,format:"unorm8x4",stride:s,offset:4*4},aTextureIdAndRound:{buffer:e,format:"uint16x2",stride:s,offset:5*4}},indexBuffer:i})}}});function fr(r,t){let e=t_[r];return e===void 0&&(Uc[t]===void 0&&(Uc[t]=1),t_[r]=e=Uc[t]++),e}var Uc,t_,Js=p(()=>{"use strict";Uc=Object.create(null),t_=Object.create(null)});function e_(){if(!Oa){Oa="mediump";let r=Ra();r&&r.getShaderPrecisionFormat&&(Oa=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision?"highp":"mediump")}return Oa}var Oa,r_=p(()=>{Bc()});function i_(r,t,e){return t?r:e?(r=r.replace("out vec4 finalColor;",""),\`
|
|
|
|
#ifdef GL_ES // This checks if it is WebGL1
|
|
#define in varying
|
|
#define finalColor gl_FragColor
|
|
#define texture texture2D
|
|
#endif
|
|
\${r}
|
|
\`):\`
|
|
|
|
#ifdef GL_ES // This checks if it is WebGL1
|
|
#define in attribute
|
|
#define out varying
|
|
#endif
|
|
\${r}
|
|
\`}var s_=p(()=>{"use strict"});function n_(r,t,e){let i=e?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(r.substring(0,9)!=="precision"){let s=e?t.requestedFragmentPrecision:t.requestedVertexPrecision;return s==="highp"&&i!=="highp"&&(s="mediump"),\`precision \${s} float;
|
|
\${r}\`}else if(i!=="highp"&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}var o_=p(()=>{"use strict"});function a_(r,t){return t?\`#version 300 es
|
|
\${r}\`:r}var u_=p(()=>{"use strict"});function l_(r,{name:t="pixi-program"},e=!0){t=t.replace(/\\s+/g,"-"),t+=e?"-fragment":"-vertex";let i=e?hA:fA;return i[t]?(i[t]++,t+=\`-\${i[t]}\`):i[t]=1,r.indexOf("#define SHADER_NAME")!==-1?r:\`\${\`#define SHADER_NAME \${t}\`}
|
|
\${r}\`}var hA,fA,c_=p(()=>{"use strict";hA={},fA={}});function h_(r,t){return t?r.replace("#version 300 es",""):r}var f_=p(()=>{"use strict"});var Oc,Lc,d_,ve,ri=p(()=>{Js();r_();s_();o_();u_();c_();f_();Oc={stripVersion:h_,ensurePrecision:n_,addProgramDefines:i_,setProgramName:l_,insertVersion:a_},Lc=Object.create(null),d_=class Nc{constructor(t){t={...Nc.defaultOptions,...t};let e=t.fragment.indexOf("#version 300 es")!==-1,i={stripVersion:e,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:e_()},setProgramName:{name:t.name},addProgramDefines:e,insertVersion:e},s=t.fragment,n=t.vertex;Object.keys(Oc).forEach(o=>{let a=i[o];s=Oc[o](s,a,!0),n=Oc[o](n,a,!1)}),this.fragment=s,this.vertex=n,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=fr(\`\${this.vertex}:\${this.fragment}\`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(t){let e=\`\${t.vertex}:\${t.fragment}\`;return Lc[e]||(Lc[e]=new Nc(t)),Lc[e]}};d_.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};ve=d_});function ue(r){return p_[r]??p_.float32}var p_,ii=p(()=>{"use strict";p_={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}}});function m_({source:r,entryPoint:t}){let e={},i=r.indexOf(\`fn \${t}\`);if(i!==-1){let s=r.indexOf("->",i);if(s!==-1){let n=r.substring(i,s),o=/@location\\((\\d+)\\)\\s+([a-zA-Z0-9_]+)\\s*:\\s*([a-zA-Z0-9_<>]+)(?:,|\\s|$)/g,a;for(;(a=o.exec(n))!==null;){let u=dA[a[3]]??"float32";e[a[2]]={location:parseInt(a[1],10),format:u,stride:ue(u).stride,offset:0,instance:!1,start:0}}}}return e}var dA,g_=p(()=>{ii();dA={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"}});function La(r){let t=/(^|[^/])@(group|binding)\\(\\d+\\)[^;]+;/g,e=/@group\\((\\d+)\\)/,i=/@binding\\((\\d+)\\)/,s=/var(<[^>]+>)? (\\w+)/,n=/:\\s*(\\w+)/,o=/struct\\s+(\\w+)\\s*{([^}]+)}/g,a=/(\\w+)\\s*:\\s*([\\w\\<\\>]+)/g,u=/struct\\s+(\\w+)/,l=r.match(t)?.map(h=>({group:parseInt(h.match(e)[1],10),binding:parseInt(h.match(i)[1],10),name:h.match(s)[2],isUniform:h.match(s)[1]==="<uniform>",type:h.match(n)[1]}));if(!l)return{groups:[],structs:[]};let c=r.match(o)?.map(h=>{let f=h.match(u)[1],d=h.match(a).reduce((m,g)=>{let[x,_]=g.split(":");return m[x.trim()]=_.trim(),m},{});return d?{name:f,members:d}:null}).filter(({name:h})=>l.some(f=>f.type===h))??[];return{groups:l,structs:c}}var x_=p(()=>{"use strict"});var Bi,__=p(()=>{"use strict";Bi=(r=>(r[r.VERTEX=1]="VERTEX",r[r.FRAGMENT=2]="FRAGMENT",r[r.COMPUTE=4]="COMPUTE",r))(Bi||{})});function y_({groups:r}){let t=[];for(let e=0;e<r.length;e++){let i=r[e];t[i.group]||(t[i.group]=[]),i.isUniform?t[i.group].push({binding:i.binding,visibility:Bi.VERTEX|Bi.FRAGMENT,buffer:{type:"uniform"}}):i.type==="sampler"?t[i.group].push({binding:i.binding,visibility:Bi.FRAGMENT,sampler:{type:"filtering"}}):i.type==="texture_2d"&&t[i.group].push({binding:i.binding,visibility:Bi.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}})}return t}var b_=p(()=>{__()});function v_({groups:r}){let t=[];for(let e=0;e<r.length;e++){let i=r[e];t[i.group]||(t[i.group]={}),t[i.group][i.name]=i.binding}return t}var T_=p(()=>{"use strict"});function S_(r,t){let e=new Set,i=new Set,s=[...r.structs,...t.structs].filter(o=>e.has(o.name)?!1:(e.add(o.name),!0)),n=[...r.groups,...t.groups].filter(o=>{let a=\`\${o.name}-\${o.binding}\`;return i.has(a)?!1:(i.add(a),!0)});return{structs:s,groups:n}}var w_=p(()=>{"use strict"});var Hc,Te,Mi=p(()=>{Js();g_();x_();b_();T_();w_();Hc=Object.create(null),Te=class r{constructor(t){this._layoutKey=0,this._attributeLocationsKey=0;let{fragment:e,vertex:i,layout:s,gpuLayout:n,name:o}=t;if(this.name=o,this.fragment=e,this.vertex=i,e.source===i.source){let a=La(e.source);this.structsAndGroups=a}else{let a=La(i.source),u=La(e.source);this.structsAndGroups=S_(a,u)}this.layout=s??v_(this.structsAndGroups),this.gpuLayout=n??y_(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){let{vertex:t,fragment:e}=this,i=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=fr(i,"program")}get attributeData(){return this._attributeData??(this._attributeData=m_(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){let e=\`\${t.vertex.source}:\${t.fragment.source}:\${t.fragment.entryPoint}:\${t.vertex.entryPoint}\`;return Hc[e]||(Hc[e]=new r(t)),Hc[e]}}});function zc(r,t,e){if(r)for(let i in r){let s=i.toLocaleLowerCase(),n=t[s];if(n){let o=r[i];i==="header"&&(o=o.replace(/@in\\s+[^;]+;\\s*/g,"").replace(/@out\\s+[^;]+;\\s*/g,"")),e&&n.push(\`//----\${e}----//\`),n.push(o)}else z(\`\${i} placement hook does not exist in shader\`)}}var E_=p(()=>{mt()});function Wc(r){let t={};return(r.match(pA)?.map(i=>i.replace(/[{()}]/g,""))??[]).forEach(i=>{t[i]=[]}),t}var pA,C_=p(()=>{"use strict";pA=/\\{\\{(.*?)\\}\\}/g});function A_(r,t){let e,i=/@in\\s+([^;]+);/g;for(;(e=i.exec(r))!==null;)t.push(e[1])}function Vc(r,t,e=!1){let i=[];A_(t,i),r.forEach(a=>{a.header&&A_(a.header,i)});let s=i;e&&s.sort();let n=s.map((a,u)=>\` @location(\${u}) \${a},\`).join(\`
|
|
\`),o=t.replace(/@in\\s+[^;]+;\\s*/g,"");return o=o.replace("{{in}}",\`
|
|
\${n}
|
|
\`),o}var D_=p(()=>{"use strict"});function P_(r,t){let e,i=/@out\\s+([^;]+);/g;for(;(e=i.exec(r))!==null;)t.push(e[1])}function mA(r){let e=/\\b(\\w+)\\s*:/g.exec(r);return e?e[1]:""}function gA(r){let t=/@.*?\\s+/g;return r.replace(t,"")}function B_(r,t){let e=[];P_(t,e),r.forEach(u=>{u.header&&P_(u.header,e)});let i=0,s=e.sort().map(u=>u.indexOf("builtin")>-1?u:\`@location(\${i++}) \${u}\`).join(\`,
|
|
\`),n=e.sort().map(u=>\` var \${gA(u)};\`).join(\`
|
|
\`),o=\`return VSOutput(
|
|
\${e.sort().map(u=>\` \${mA(u)}\`).join(\`,
|
|
\`)});\`,a=t.replace(/@out\\s+[^;]+;\\s*/g,"");return a=a.replace("{{struct}}",\`
|
|
\${s}
|
|
\`),a=a.replace("{{start}}",\`
|
|
\${n}
|
|
\`),a=a.replace("{{return}}",\`
|
|
\${o}
|
|
\`),a}var M_=p(()=>{"use strict"});function Xc(r,t){let e=r;for(let i in t){let s=t[i];s.join(\`
|
|
\`).length?e=e.replace(\`{{\${i}}}\`,\`//-----\${i} START-----//
|
|
\${s.join(\`
|
|
\`)}
|
|
//----\${i} FINISH----//\`):e=e.replace(\`{{\${i}}}\`,"")}return e}var F_=p(()=>{"use strict"});function R_({template:r,bits:t}){let e=G_(r,t);if(Dr[e])return Dr[e];let{vertex:i,fragment:s}=_A(r,t);return Dr[e]=I_(i,s,t),Dr[e]}function k_({template:r,bits:t}){let e=G_(r,t);return Dr[e]||(Dr[e]=I_(r.vertex,r.fragment,t)),Dr[e]}function _A(r,t){let e=t.map(o=>o.vertex).filter(o=>!!o),i=t.map(o=>o.fragment).filter(o=>!!o),s=Vc(e,r.vertex,!0);s=B_(e,s);let n=Vc(i,r.fragment,!0);return{vertex:s,fragment:n}}function G_(r,t){return t.map(e=>($c.has(e)||$c.set(e,xA++),$c.get(e))).sort((e,i)=>e-i).join("-")+r.vertex+r.fragment}function I_(r,t,e){let i=Wc(r),s=Wc(t);return e.forEach(n=>{zc(n.vertex,i,n.name),zc(n.fragment,s,n.name)}),{vertex:Xc(r,i),fragment:Xc(t,s)}}var Dr,$c,xA,U_=p(()=>{E_();C_();D_();M_();F_();Dr=Object.create(null),$c=new Map,xA=0});var O_,L_,N_,H_,z_=p(()=>{"use strict";O_=\`
|
|
@in aPosition: vec2<f32>;
|
|
@in aUV: vec2<f32>;
|
|
|
|
@out @builtin(position) vPosition: vec4<f32>;
|
|
@out vUV : vec2<f32>;
|
|
@out vColor : vec4<f32>;
|
|
|
|
{{header}}
|
|
|
|
struct VSOutput {
|
|
{{struct}}
|
|
};
|
|
|
|
@vertex
|
|
fn main( {{in}} ) -> VSOutput {
|
|
|
|
var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
|
|
var modelMatrix = mat3x3<f32>(
|
|
1.0, 0.0, 0.0,
|
|
0.0, 1.0, 0.0,
|
|
0.0, 0.0, 1.0
|
|
);
|
|
var position = aPosition;
|
|
var uv = aUV;
|
|
|
|
{{start}}
|
|
|
|
vColor = vec4<f32>(1., 1., 1., 1.);
|
|
|
|
{{main}}
|
|
|
|
vUV = uv;
|
|
|
|
var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
|
|
|
vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vColor *= globalUniforms.uWorldColorAlpha;
|
|
|
|
{{end}}
|
|
|
|
{{return}}
|
|
};
|
|
\`,L_=\`
|
|
@in vUV : vec2<f32>;
|
|
@in vColor : vec4<f32>;
|
|
|
|
{{header}}
|
|
|
|
@fragment
|
|
fn main(
|
|
{{in}}
|
|
) -> @location(0) vec4<f32> {
|
|
|
|
{{start}}
|
|
|
|
var outColor:vec4<f32>;
|
|
|
|
{{main}}
|
|
|
|
var finalColor:vec4<f32> = outColor * vColor;
|
|
|
|
{{end}}
|
|
|
|
return finalColor;
|
|
};
|
|
\`,N_=\`
|
|
in vec2 aPosition;
|
|
in vec2 aUV;
|
|
|
|
out vec4 vColor;
|
|
out vec2 vUV;
|
|
|
|
{{header}}
|
|
|
|
void main(void){
|
|
|
|
mat3 worldTransformMatrix = uWorldTransformMatrix;
|
|
mat3 modelMatrix = mat3(
|
|
1.0, 0.0, 0.0,
|
|
0.0, 1.0, 0.0,
|
|
0.0, 0.0, 1.0
|
|
);
|
|
vec2 position = aPosition;
|
|
vec2 uv = aUV;
|
|
|
|
{{start}}
|
|
|
|
vColor = vec4(1.);
|
|
|
|
{{main}}
|
|
|
|
vUV = uv;
|
|
|
|
mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
|
|
|
gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vColor *= uWorldColorAlpha;
|
|
|
|
{{end}}
|
|
}
|
|
\`,H_=\`
|
|
|
|
in vec4 vColor;
|
|
in vec2 vUV;
|
|
|
|
out vec4 finalColor;
|
|
|
|
{{header}}
|
|
|
|
void main(void) {
|
|
|
|
{{start}}
|
|
|
|
vec4 outColor;
|
|
|
|
{{main}}
|
|
|
|
finalColor = outColor * vColor;
|
|
|
|
{{end}}
|
|
}
|
|
\`});var W_,V_,X_=p(()=>{"use strict";W_={name:"global-uniforms-bit",vertex:{header:\`
|
|
struct GlobalUniforms {
|
|
uProjectionMatrix:mat3x3<f32>,
|
|
uWorldTransformMatrix:mat3x3<f32>,
|
|
uWorldColorAlpha: vec4<f32>,
|
|
uResolution: vec2<f32>,
|
|
}
|
|
|
|
@group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
|
|
\`}},V_={name:"global-uniforms-bit",vertex:{header:\`
|
|
uniform mat3 uProjectionMatrix;
|
|
uniform mat3 uWorldTransformMatrix;
|
|
uniform vec4 uWorldColorAlpha;
|
|
uniform vec2 uResolution;
|
|
\`}}});function Ve({bits:r,name:t}){let e=R_({template:{fragment:L_,vertex:O_},bits:[W_,...r]});return Te.from({name:t,vertex:{source:e.vertex,entryPoint:"main"},fragment:{source:e.fragment,entryPoint:"main"}})}function Xe({bits:r,name:t}){return new ve({name:t,...k_({template:{vertex:N_,fragment:H_},bits:[V_,...r]})})}var Pr=p(()=>{ri();Mi();U_();z_();X_()});var Fi,Ri,tn=p(()=>{"use strict";Fi={name:"color-bit",vertex:{header:\`
|
|
@in aColor: vec4<f32>;
|
|
\`,main:\`
|
|
vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
|
|
\`}},Ri={name:"color-bit",vertex:{header:\`
|
|
in vec4 aColor;
|
|
\`,main:\`
|
|
vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
|
|
\`}}});function yA(r){let t=[];if(r===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let e=0;for(let i=0;i<r;i++)t.push(\`@group(1) @binding(\${e++}) var textureSource\${i+1}: texture_2d<f32>;\`),t.push(\`@group(1) @binding(\${e++}) var textureSampler\${i+1}: sampler;\`)}return t.join(\`
|
|
\`)}function bA(r){let t=[];if(r===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let e=0;e<r;e++)e===r-1?t.push(" default:{"):t.push(\` case \${e}:{\`),t.push(\` outColor = textureSampleGrad(textureSource\${e+1}, textureSampler\${e+1}, vUV, uvDx, uvDy);\`),t.push(" break;}");t.push("}")}return t.join(\`
|
|
\`)}function ki(r){return jc[r]||(jc[r]={name:"texture-batch-bit",vertex:{header:\`
|
|
@in aTextureIdAndRound: vec2<u32>;
|
|
@out @interpolate(flat) vTextureId : u32;
|
|
\`,main:\`
|
|
vTextureId = aTextureIdAndRound.y;
|
|
\`,end:\`
|
|
if(aTextureIdAndRound.x == 1)
|
|
{
|
|
vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
|
}
|
|
\`},fragment:{header:\`
|
|
@in @interpolate(flat) vTextureId: u32;
|
|
|
|
\${yA(r)}
|
|
\`,main:\`
|
|
var uvDx = dpdx(vUV);
|
|
var uvDy = dpdy(vUV);
|
|
|
|
\${bA(r)}
|
|
\`}}),jc[r]}function vA(r){let t=[];for(let e=0;e<r;e++)e>0&&t.push("else"),e<r-1&&t.push(\`if(vTextureId < \${e}.5)\`),t.push("{"),t.push(\` outColor = texture(uTextures[\${e}], vUV);\`),t.push("}");return t.join(\`
|
|
\`)}function Gi(r){return Yc[r]||(Yc[r]={name:"texture-batch-bit",vertex:{header:\`
|
|
in vec2 aTextureIdAndRound;
|
|
out float vTextureId;
|
|
|
|
\`,main:\`
|
|
vTextureId = aTextureIdAndRound.y;
|
|
\`,end:\`
|
|
if(aTextureIdAndRound.x == 1.)
|
|
{
|
|
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
|
}
|
|
\`},fragment:{header:\`
|
|
in float vTextureId;
|
|
|
|
uniform sampler2D uTextures[\${r}];
|
|
|
|
\`,main:\`
|
|
|
|
\${vA(r)}
|
|
\`}}),Yc[r]}var jc,Yc,en=p(()=>{"use strict";jc={};Yc={}});var $e,je,Br=p(()=>{"use strict";$e={name:"round-pixels-bit",vertex:{header:\`
|
|
fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
|
|
{
|
|
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
}
|
|
\`}},je={name:"round-pixels-bit",vertex:{header:\`
|
|
vec2 roundPixels(vec2 position, vec2 targetSize)
|
|
{
|
|
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
}
|
|
\`}}});var Kc,$_,j_=p(()=>{"use strict";Kc=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],$_=Kc.reduce((r,t)=>(r[t]=!0,r),{})});function Y_(r,t){switch(r){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var K_=p(()=>{"use strict"});var q_,ct,ee=p(()=>{zt();Js();j_();K_();q_=class Z_{constructor(t,e){this._touched=0,this.uid=et("uniform"),this._resourceType="uniformGroup",this._resourceId=et("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,e={...Z_.defaultOptions,...e},this.uniformStructures=t;let i={};for(let s in t){let n=t[s];if(n.name=s,n.size=n.size??1,!$_[n.type])throw new Error(\`Uniform type \${n.type} is not supported. Supported uniform types are: \${Kc.join(", ")}\`);n.value??(n.value=Y_(n.type,n.size)),i[s]=n.value}this.uniforms=i,this._dirtyId=1,this.ubo=e.ubo,this.isStatic=e.isStatic,this._signature=fr(Object.keys(i).map(s=>\`\${s}-\${t[s].type}\`).join("-"),"uniform-group")}update(){this._dirtyId++}};q_.defaultOptions={ubo:!1,isStatic:!1};ct=q_});function Ii(r){let t=Q_[r];if(t)return t;let e=new Int32Array(r);for(let i=0;i<r;i++)e[i]=i;return t=Q_[r]=new ct({uTextures:{value:e,type:"i32",size:r}},{isStatic:!0}),t}var Q_,Na=p(()=>{ee();Q_={}});var Mt,Ye=p(()=>{"use strict";Mt=(r=>(r[r.WEBGL=1]="WEBGL",r[r.WEBGPU=2]="WEBGPU",r[r.BOTH=3]="BOTH",r))(Mt||{})});var wt,ke=p(()=>{jt();ri();Cr();Mi();Ye();ee();zt();wt=class r extends ht{constructor(t){super(),this.uid=et("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:i,groups:s,resources:n,compatibleRenderers:o,groupMap:a}=t;this.gpuProgram=e,this.glProgram=i,o===void 0&&(o=0,e&&(o|=Mt.WEBGPU),i&&(o|=Mt.WEBGL)),this.compatibleRenderers=o;let u={};if(!n&&!s&&(n={}),n&&s)throw new Error("[Shader] Cannot have both resources and groups");if(!e&&s&&!a)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!e&&s&&a)for(let l in a)for(let c in a[l]){let h=a[l][c];u[h]={group:l,binding:c,name:h}}else if(e&&s&&!a){let l=e.structsAndGroups.groups;a={},l.forEach(c=>{a[c.group]=a[c.group]||{},a[c.group][c.binding]=c.name,u[c.name]=c})}else if(n){s={},a={},e&&e.structsAndGroups.groups.forEach(h=>{a[h.group]=a[h.group]||{},a[h.group][h.binding]=h.name,u[h.name]=h});let l=0;for(let c in n)u[c]||(s[99]||(s[99]=new It,this._ownedBindGroups.push(s[99])),u[c]={group:99,binding:l,name:c},a[99]=a[99]||{},a[99][l]=c,l++);for(let c in n){let h=c,f=n[c];!f.source&&!f._resourceType&&(f=new ct(f));let d=u[h];d&&(s[d.group]||(s[d.group]=new It,this._ownedBindGroups.push(s[d.group])),s[d.group].setResource(f,d.binding))}}this.groups=s,this._uniformBindMap=a,this.resources=this._buildResourceAccessor(s,u)}addResource(t,e,i){var s,n;(s=this._uniformBindMap)[e]||(s[e]={}),(n=this._uniformBindMap[e])[i]||(n[i]=t),this.groups[e]||(this.groups[e]=new It,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){let i={};for(let s in e){let n=e[s];Object.defineProperty(i,n.name,{get(){return t[n.group].getResource(n.binding)},set(o){t[n.group].setResource(o,n.binding)}})}return i}destroy(t=!1){this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(e=>{e.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){let{gpu:e,gl:i,...s}=t,n,o;return e&&(n=Te.from(e)),i&&(o=ve.from(i)),new r({gpuProgram:n,glProgram:o,...s})}}});var Ha,J_=p(()=>{Pr();tn();en();Br();Na();ke();Ha=class extends wt{constructor(t){let e=Xe({name:"batch",bits:[Ri,Gi(t),je]}),i=Ve({name:"batch",bits:[Fi,ki(t),$e]});super({glProgram:e,gpuProgram:i,resources:{batchSamplers:Ii(t)}})}}});var ty,ey,rn,qc=p(()=>{D();Kx();Jx();J_();ty=null,ey=class ry extends Yx{constructor(){super(...arguments),this.geometry=new Ua,this.shader=ty||(ty=new Ha(this.maxTextures)),this.name=ry.extension.name,this.vertexSize=6}packAttributes(t,e,i,s,n){let o=n<<16|t.roundPixels&65535,a=t.transform,u=a.a,l=a.b,c=a.c,h=a.d,f=a.tx,d=a.ty,{positions:m,uvs:g}=t,x=t.color,_=t.attributeOffset,v=_+t.attributeSize;for(let T=_;T<v;T++){let y=T*2,A=m[y],S=m[y+1];e[s++]=u*A+c*S+f,e[s++]=h*S+l*A+d,e[s++]=g[y],e[s++]=g[y+1],i[s++]=x,i[s++]=o}}packQuadAttributes(t,e,i,s,n){let o=t.texture,a=t.transform,u=a.a,l=a.b,c=a.c,h=a.d,f=a.tx,d=a.ty,m=t.bounds,g=m.maxX,x=m.minX,_=m.maxY,v=m.minY,T=o.uvs,y=t.color,A=n<<16|t.roundPixels&65535;e[s+0]=u*x+c*v+f,e[s+1]=h*v+l*x+d,e[s+2]=T.x0,e[s+3]=T.y0,i[s+4]=y,i[s+5]=A,e[s+6]=u*g+c*v+f,e[s+7]=h*v+l*g+d,e[s+8]=T.x1,e[s+9]=T.y1,i[s+10]=y,i[s+11]=A,e[s+12]=u*g+c*_+f,e[s+13]=h*_+l*g+d,e[s+14]=T.x2,e[s+15]=T.y2,i[s+16]=y,i[s+17]=A,e[s+18]=u*x+c*_+f,e[s+19]=h*_+l*x+d,e[s+20]=T.x3,e[s+21]=T.y3,i[s+22]=y,i[s+23]=A}};ey.extension={type:[b.Batcher],name:"default"};rn=ey});function iy(r,t,e,i,s,n,o,a=null){let u=0;e*=t,s*=n;let l=a.a,c=a.b,h=a.c,f=a.d,d=a.tx,m=a.ty;for(;u<o;){let g=r[e],x=r[e+1];i[s]=l*g+h*x+d,i[s+1]=c*g+f*x+m,s+=n,e+=t,u++}}function sy(r,t,e,i){let s=0;for(t*=e;s<i;)r[t]=0,r[t+1]=0,t+=e,s++}var ny=p(()=>{"use strict"});function Zc(r,t,e,i,s){let n=t.a,o=t.b,a=t.c,u=t.d,l=t.tx,c=t.ty;e||(e=0),i||(i=2),s||(s=r.length/i-e);let h=e*i;for(let f=0;f<s;f++){let d=r[h],m=r[h+1];r[h]=n*d+a*m+l,r[h+1]=o*d+u*m+c,h+=i}}var oy=p(()=>{"use strict"});var TA,si,Qc=p(()=>{nt();zl();TA=new G,si=class{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){let t=this.baseColor,e=t>>16|t&65280|(t&255)<<16,i=this.renderable;return i?ha(e,i.groupColor)+(this.alpha*i.groupAlpha*255<<24):e+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||TA}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}}});var Ui,ay,uy,ly=p(()=>{D();Ui={extension:{type:b.ShapeBuilder,name:"circle"},build(r,t){let e,i,s,n,o,a;if(r.type==="circle"){let y=r;e=y.x,i=y.y,o=a=y.radius,s=n=0}else if(r.type==="ellipse"){let y=r;e=y.x,i=y.y,o=y.halfWidth,a=y.halfHeight,s=n=0}else{let y=r,A=y.width/2,S=y.height/2;e=y.x+A,i=y.y+S,o=a=Math.max(0,Math.min(y.radius,Math.min(A,S))),s=A-o,n=S-a}if(!(o>=0&&a>=0&&s>=0&&n>=0))return t;let u=Math.ceil(2.3*Math.sqrt(o+a)),l=u*8+(s?4:0)+(n?4:0);if(l===0)return t;if(u===0)return t[0]=t[6]=e+s,t[1]=t[3]=i+n,t[2]=t[4]=e-s,t[5]=t[7]=i-n,t;let c=0,h=u*4+(s?2:0)+2,f=h,d=l,m=s+o,g=n,x=e+m,_=e-m,v=i+g;if(t[c++]=x,t[c++]=v,t[--h]=v,t[--h]=_,n){let y=i-g;t[f++]=_,t[f++]=y,t[--d]=y,t[--d]=x}for(let y=1;y<u;y++){let A=Math.PI/2*(y/u),S=s+Math.cos(A)*o,E=n+Math.sin(A)*a,B=e+S,U=e-S,P=i+E,F=i-E;t[c++]=B,t[c++]=P,t[--h]=P,t[--h]=U,t[f++]=U,t[f++]=F,t[--d]=F,t[--d]=B}m=s,g=n+a,x=e+m,_=e-m,v=i+g;let T=i-g;return t[c++]=x,t[c++]=v,t[--d]=T,t[--d]=x,s&&(t[c++]=_,t[c++]=v,t[--d]=T,t[--d]=_),t},triangulate(r,t,e,i,s,n){if(r.length===0)return;let o=0,a=0;for(let c=0;c<r.length;c+=2)o+=r[c],a+=r[c+1];o/=r.length/2,a/=r.length/2;let u=i;t[u*e]=o,t[u*e+1]=a;let l=u++;for(let c=0;c<r.length;c+=2)t[u*e]=r[c],t[u*e+1]=r[c+1],c>0&&(s[n++]=u,s[n++]=l,s[n++]=u-1),u++;s[n++]=l+1,s[n++]=l,s[n++]=u-1}},ay={...Ui,extension:{...Ui.extension,name:"ellipse"}},uy={...Ui,extension:{...Ui.extension,name:"roundedRectangle"}}});function cy(r){let t=r.length;if(t<6)return 1;let e=0;for(let i=0,s=r[t-2],n=r[t-1];i<t;i+=2){let o=r[i],a=r[i+1];e+=(o-s)*(a+n),s=o,n=a}return e<0?-1:1}var hy=p(()=>{"use strict"});function fy(r,t,e,i,s,n,o,a){let u=r-e*s,l=t-i*s,c=r+e*n,h=t+i*n,f,d;o?(f=i,d=-e):(f=-i,d=e);let m=u+f,g=l+d,x=c+f,_=h+d;return a.push(m,g),a.push(x,_),2}function ni(r,t,e,i,s,n,o,a){let u=e-r,l=i-t,c=Math.atan2(u,l),h=Math.atan2(s-r,n-t);a&&c<h?c+=Math.PI*2:!a&&c>h&&(h+=Math.PI*2);let f=c,d=h-c,m=Math.abs(d),g=Math.sqrt(u*u+l*l),x=(15*m*Math.sqrt(g)/Math.PI>>0)+1,_=d/x;if(f+=_,a){o.push(r,t),o.push(e,i);for(let v=1,T=f;v<x;v++,T+=_)o.push(r,t),o.push(r+Math.sin(T)*g,t+Math.cos(T)*g);o.push(r,t),o.push(s,n)}else{o.push(e,i),o.push(r,t);for(let v=1,T=f;v<x;v++,T+=_)o.push(r+Math.sin(T)*g,t+Math.cos(T)*g),o.push(r,t);o.push(s,n),o.push(r,t)}return x*2}function dy(r,t,e,i,s,n){let o=1e-4;if(r.length===0)return;let a=t,u=a.alignment;if(t.alignment!==.5){let O=cy(r);e&&(O*=-1),u=(u-.5)*O+.5}let l=new it(r[0],r[1]),c=new it(r[r.length-2],r[r.length-1]),h=i,f=Math.abs(l.x-c.x)<o&&Math.abs(l.y-c.y)<o;if(h){r=r.slice(),f&&(r.pop(),r.pop(),c.set(r[r.length-2],r[r.length-1]));let O=(l.x+c.x)*.5,X=(c.y+l.y)*.5;r.unshift(O,X),r.push(O,X)}let d=s,m=r.length/2,g=r.length,x=d.length/2,_=a.width/2,v=_*_,T=a.miterLimit*a.miterLimit,y=r[0],A=r[1],S=r[2],E=r[3],B=0,U=0,P=-(A-E),F=y-S,N=0,q=0,w=Math.sqrt(P*P+F*F);P/=w,F/=w,P*=_,F*=_;let H=u,C=(1-H)*2,M=H*2;h||(a.cap==="round"?g+=ni(y-P*(C-M)*.5,A-F*(C-M)*.5,y-P*C,A-F*C,y+P*M,A+F*M,d,!0)+2:a.cap==="square"&&(g+=fy(y,A,P,F,C,M,!0,d))),d.push(y-P*C,A-F*C),d.push(y+P*M,A+F*M);for(let O=1;O<m-1;++O){y=r[(O-1)*2],A=r[(O-1)*2+1],S=r[O*2],E=r[O*2+1],B=r[(O+1)*2],U=r[(O+1)*2+1],P=-(A-E),F=y-S,w=Math.sqrt(P*P+F*F),P/=w,F/=w,P*=_,F*=_,N=-(E-U),q=S-B,w=Math.sqrt(N*N+q*q),N/=w,q/=w,N*=_,q*=_;let X=S-y,rt=A-E,st=S-B,Ft=U-E,_t=X*st+rt*Ft,Et=rt*st-Ft*X,Ot=Et<0;if(Math.abs(Et)<.001*Math.abs(_t)){d.push(S-P*C,E-F*C),d.push(S+P*M,E+F*M),_t>=0&&(a.join==="round"?g+=ni(S,E,S-P*C,E-F*C,S-N*C,E-q*C,d,!1)+4:g+=2,d.push(S-N*M,E-q*M),d.push(S+N*C,E+q*C));continue}let Vt=(-P+y)*(-F+E)-(-P+S)*(-F+A),ie=(-N+B)*(-q+E)-(-N+S)*(-q+U),Ee=(X*ie-st*Vt)/Et,pe=(Ft*Vt-rt*ie)/Et,tr=(Ee-S)*(Ee-S)+(pe-E)*(pe-E),Ce=S+(Ee-S)*C,Ue=E+(pe-E)*C,Oe=S-(Ee-S)*M,Ae=E-(pe-E)*M,Co=Math.min(X*X+rt*rt,st*st+Ft*Ft),Ao=Ot?C:M,R=Co+Ao*Ao*v;tr<=R?a.join==="bevel"||tr/v>T?(Ot?(d.push(Ce,Ue),d.push(S+P*M,E+F*M),d.push(Ce,Ue),d.push(S+N*M,E+q*M)):(d.push(S-P*C,E-F*C),d.push(Oe,Ae),d.push(S-N*C,E-q*C),d.push(Oe,Ae)),g+=2):a.join==="round"?Ot?(d.push(Ce,Ue),d.push(S+P*M,E+F*M),g+=ni(S,E,S+P*M,E+F*M,S+N*M,E+q*M,d,!0)+4,d.push(Ce,Ue),d.push(S+N*M,E+q*M)):(d.push(S-P*C,E-F*C),d.push(Oe,Ae),g+=ni(S,E,S-P*C,E-F*C,S-N*C,E-q*C,d,!1)+4,d.push(S-N*C,E-q*C),d.push(Oe,Ae)):(d.push(Ce,Ue),d.push(Oe,Ae)):(d.push(S-P*C,E-F*C),d.push(S+P*M,E+F*M),a.join==="round"?Ot?g+=ni(S,E,S+P*M,E+F*M,S+N*M,E+q*M,d,!0)+2:g+=ni(S,E,S-P*C,E-F*C,S-N*C,E-q*C,d,!1)+2:a.join==="miter"&&tr/v<=T&&(Ot?(d.push(Oe,Ae),d.push(Oe,Ae)):(d.push(Ce,Ue),d.push(Ce,Ue)),g+=2),d.push(S-N*C,E-q*C),d.push(S+N*M,E+q*M),g+=2)}y=r[(m-2)*2],A=r[(m-2)*2+1],S=r[(m-1)*2],E=r[(m-1)*2+1],P=-(A-E),F=y-S,w=Math.sqrt(P*P+F*F),P/=w,F/=w,P*=_,F*=_,d.push(S-P*C,E-F*C),d.push(S+P*M,E+F*M),h||(a.cap==="round"?g+=ni(S-P*(C-M)*.5,E-F*(C-M)*.5,S-P*C,E-F*C,S+P*M,E+F*M,d,!1)+2:a.cap==="square"&&(g+=fy(S,E,P,F,C,M,!1,d)));let Y=1e-4*1e-4;for(let O=x;O<g+x-2;++O)y=d[O*2],A=d[O*2+1],S=d[(O+1)*2],E=d[(O+1)*2+1],B=d[(O+2)*2],U=d[(O+2)*2+1],!(Math.abs(y*(E-U)+S*(U-A)+B*(A-E))<Y)&&n.push(O,O+1,O+2)}var py=p(()=>{_e();hy()});function my(r,t,e,i){let s=1e-4;if(r.length===0)return;let n=r[0],o=r[1],a=r[r.length-2],u=r[r.length-1],l=t||Math.abs(n-a)<s&&Math.abs(o-u)<s,c=e,h=r.length/2,f=c.length/2;for(let d=0;d<h;d++)c.push(r[d*2]),c.push(r[d*2+1]);for(let d=0;d<h-1;d++)i.push(f+d,f+d+1);l&&i.push(f+h-1,f)}var gy=p(()=>{});var ih=Do((Q5,rh)=>{"use strict";rh.exports=Va;rh.exports.default=Va;function Va(r,t,e){e=e||2;var i=t&&t.length,s=i?t[0]*e:r.length,n=_y(r,0,s,e,!0),o=[];if(!n||n.next===n.prev)return o;var a,u,l,c,h,f,d;if(i&&(n=PA(r,t,n,e)),r.length>80*e){a=l=r[0],u=c=r[1];for(var m=e;m<s;m+=e)h=r[m],f=r[m+1],h<a&&(a=h),f<u&&(u=f),h>l&&(l=h),f>c&&(c=f);d=Math.max(l-a,c-u),d=d!==0?32767/d:0}return sn(n,o,e,a,u,d,0),o}function _y(r,t,e,i,s){var n,o;if(s===eh(r,t,e,i)>0)for(n=t;n<e;n+=i)o=xy(n,r[n],r[n+1],o);else for(n=e-i;n>=t;n-=i)o=xy(n,r[n],r[n+1],o);return o&&Xa(o,o.next)&&(on(o),o=o.next),o}function oi(r,t){if(!r)return r;t||(t=r);var e=r,i;do if(i=!1,!e.steiner&&(Xa(e,e.next)||vt(e.prev,e,e.next)===0)){if(on(e),e=t=e.prev,e===e.next)break;i=!0}else e=e.next;while(i||e!==t);return t}function sn(r,t,e,i,s,n,o){if(r){!o&&n&&kA(r,i,s,n);for(var a=r,u,l;r.prev!==r.next;){if(u=r.prev,l=r.next,n?CA(r,i,s,n):EA(r)){t.push(u.i/e|0),t.push(r.i/e|0),t.push(l.i/e|0),on(r),r=l.next,a=l.next;continue}if(r=l,r===a){o?o===1?(r=AA(oi(r),t,e),sn(r,t,e,i,s,n,2)):o===2&&DA(r,t,e,i,s,n):sn(oi(r),t,e,i,s,n,1);break}}}}function EA(r){var t=r.prev,e=r,i=r.next;if(vt(t,e,i)>=0)return!1;for(var s=t.x,n=e.x,o=i.x,a=t.y,u=e.y,l=i.y,c=s<n?s<o?s:o:n<o?n:o,h=a<u?a<l?a:l:u<l?u:l,f=s>n?s>o?s:o:n>o?n:o,d=a>u?a>l?a:l:u>l?u:l,m=i.next;m!==t;){if(m.x>=c&&m.x<=f&&m.y>=h&&m.y<=d&&Oi(s,a,n,u,o,l,m.x,m.y)&&vt(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function CA(r,t,e,i){var s=r.prev,n=r,o=r.next;if(vt(s,n,o)>=0)return!1;for(var a=s.x,u=n.x,l=o.x,c=s.y,h=n.y,f=o.y,d=a<u?a<l?a:l:u<l?u:l,m=c<h?c<f?c:f:h<f?h:f,g=a>u?a>l?a:l:u>l?u:l,x=c>h?c>f?c:f:h>f?h:f,_=Jc(d,m,t,e,i),v=Jc(g,x,t,e,i),T=r.prevZ,y=r.nextZ;T&&T.z>=_&&y&&y.z<=v;){if(T.x>=d&&T.x<=g&&T.y>=m&&T.y<=x&&T!==s&&T!==o&&Oi(a,c,u,h,l,f,T.x,T.y)&&vt(T.prev,T,T.next)>=0||(T=T.prevZ,y.x>=d&&y.x<=g&&y.y>=m&&y.y<=x&&y!==s&&y!==o&&Oi(a,c,u,h,l,f,y.x,y.y)&&vt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;T&&T.z>=_;){if(T.x>=d&&T.x<=g&&T.y>=m&&T.y<=x&&T!==s&&T!==o&&Oi(a,c,u,h,l,f,T.x,T.y)&&vt(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=g&&y.y>=m&&y.y<=x&&y!==s&&y!==o&&Oi(a,c,u,h,l,f,y.x,y.y)&&vt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function AA(r,t,e){var i=r;do{var s=i.prev,n=i.next.next;!Xa(s,n)&&yy(s,i,i.next,n)&&nn(s,n)&&nn(n,s)&&(t.push(s.i/e|0),t.push(i.i/e|0),t.push(n.i/e|0),on(i),on(i.next),i=r=n),i=i.next}while(i!==r);return oi(i)}function DA(r,t,e,i,s,n){var o=r;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&UA(o,a)){var u=by(o,a);o=oi(o,o.next),u=oi(u,u.next),sn(o,t,e,i,s,n,0),sn(u,t,e,i,s,n,0);return}a=a.next}o=o.next}while(o!==r)}function PA(r,t,e,i){var s=[],n,o,a,u,l;for(n=0,o=t.length;n<o;n++)a=t[n]*i,u=n<o-1?t[n+1]*i:r.length,l=_y(r,a,u,i,!1),l===l.next&&(l.steiner=!0),s.push(IA(l));for(s.sort(BA),n=0;n<s.length;n++)e=MA(s[n],e);return e}function BA(r,t){return r.x-t.x}function MA(r,t){var e=FA(r,t);if(!e)return t;var i=by(e,r);return oi(i,i.next),oi(e,e.next)}function FA(r,t){var e=t,i=r.x,s=r.y,n=-1/0,o;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var a=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(a<=i&&a>n&&(n=a,o=e.x<e.next.x?e:e.next,a===i))return o}e=e.next}while(e!==t);if(!o)return null;var u=o,l=o.x,c=o.y,h=1/0,f;e=o;do i>=e.x&&e.x>=l&&i!==e.x&&Oi(s<c?i:n,s,l,c,s<c?n:i,s,e.x,e.y)&&(f=Math.abs(s-e.y)/(i-e.x),nn(e,r)&&(f<h||f===h&&(e.x>o.x||e.x===o.x&&RA(o,e)))&&(o=e,h=f)),e=e.next;while(e!==u);return o}function RA(r,t){return vt(r.prev,r,t.prev)<0&&vt(t.next,r,r.next)<0}function kA(r,t,e,i){var s=r;do s.z===0&&(s.z=Jc(s.x,s.y,t,e,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,GA(s)}function GA(r){var t,e,i,s,n,o,a,u,l=1;do{for(e=r,r=null,n=null,o=0;e;){for(o++,i=e,a=0,t=0;t<l&&(a++,i=i.nextZ,!!i);t++);for(u=l;a>0||u>0&&i;)a!==0&&(u===0||!i||e.z<=i.z)?(s=e,e=e.nextZ,a--):(s=i,i=i.nextZ,u--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;e=i}n.nextZ=null,l*=2}while(o>1);return r}function Jc(r,t,e,i,s){return r=(r-e)*s|0,t=(t-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function IA(r){var t=r,e=r;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==r);return e}function Oi(r,t,e,i,s,n,o,a){return(s-o)*(t-a)>=(r-o)*(n-a)&&(r-o)*(i-a)>=(e-o)*(t-a)&&(e-o)*(n-a)>=(s-o)*(i-a)}function UA(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!OA(r,t)&&(nn(r,t)&&nn(t,r)&&LA(r,t)&&(vt(r.prev,r,t.prev)||vt(r,t.prev,t))||Xa(r,t)&&vt(r.prev,r,r.next)>0&&vt(t.prev,t,t.next)>0)}function vt(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function Xa(r,t){return r.x===t.x&&r.y===t.y}function yy(r,t,e,i){var s=Wa(vt(r,t,e)),n=Wa(vt(r,t,i)),o=Wa(vt(e,i,r)),a=Wa(vt(e,i,t));return!!(s!==n&&o!==a||s===0&&za(r,e,t)||n===0&&za(r,i,t)||o===0&&za(e,r,i)||a===0&&za(e,t,i))}function za(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function Wa(r){return r>0?1:r<0?-1:0}function OA(r,t){var e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&yy(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function nn(r,t){return vt(r.prev,r,r.next)<0?vt(r,t,r.next)>=0&&vt(r,r.prev,t)>=0:vt(r,t,r.prev)<0||vt(r,r.next,t)<0}function LA(r,t){var e=r,i=!1,s=(r.x+t.x)/2,n=(r.y+t.y)/2;do e.y>n!=e.next.y>n&&e.next.y!==e.y&&s<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next;while(e!==r);return i}function by(r,t){var e=new th(r.i,r.x,r.y),i=new th(t.i,t.x,t.y),s=r.next,n=t.prev;return r.next=t,t.prev=r,e.next=s,s.prev=e,i.next=e,e.prev=i,n.next=i,i.prev=n,i}function xy(r,t,e,i){var s=new th(r,t,e);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function on(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function th(r,t,e){this.i=r,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Va.deviation=function(r,t,e,i){var s=t&&t.length,n=s?t[0]*e:r.length,o=Math.abs(eh(r,0,n,e));if(s)for(var a=0,u=t.length;a<u;a++){var l=t[a]*e,c=a<u-1?t[a+1]*e:r.length;o-=Math.abs(eh(r,l,c,e))}var h=0;for(a=0;a<i.length;a+=3){var f=i[a]*e,d=i[a+1]*e,m=i[a+2]*e;h+=Math.abs((r[f]-r[m])*(r[d+1]-r[f+1])-(r[f]-r[d])*(r[m+1]-r[f+1]))}return o===0&&h===0?0:Math.abs((h-o)/o)};function eh(r,t,e,i){for(var s=0,n=t,o=e-i;n<e;n+=i)s+=(r[o]-r[n])*(r[n+1]+r[o+1]),o=n;return s}Va.flatten=function(r){for(var t=r[0][0].length,e={vertices:[],holes:[],dimensions:t},i=0,s=0;s<r.length;s++){for(var n=0;n<r[s].length;n++)for(var o=0;o<t;o++)e.vertices.push(r[s][n][o]);s>0&&(i+=r[s-1].length,e.holes.push(i))}return e}});function $a(r,t,e,i,s,n,o){let a=(0,vy.default)(r,t,2);if(!a)return;for(let l=0;l<a.length;l+=3)n[o++]=a[l]+s,n[o++]=a[l+1]+s,n[o++]=a[l+2]+s;let u=s*i;for(let l=0;l<r.length;l+=2)e[u]=r[l],e[u+1]=r[l+1],u+=i}var vy,sh=p(()=>{vy=hs(ih(),1)});var NA,Ty,Sy=p(()=>{D();sh();NA=[],Ty={extension:{type:b.ShapeBuilder,name:"polygon"},build(r,t){for(let e=0;e<r.points.length;e++)t[e]=r.points[e];return t},triangulate(r,t,e,i,s,n){$a(r,NA,t,e,i,s,n)}}});var wy,Ey=p(()=>{D();wy={extension:{type:b.ShapeBuilder,name:"rectangle"},build(r,t){let e=r,i=e.x,s=e.y,n=e.width,o=e.height;return n>=0&&o>=0&&(t[0]=i,t[1]=s,t[2]=i+n,t[3]=s,t[4]=i+n,t[5]=s+o,t[6]=i,t[7]=s+o),t},triangulate(r,t,e,i,s,n){let o=0;i*=e,t[i+o]=r[0],t[i+o+1]=r[1],o+=e,t[i+o]=r[2],t[i+o+1]=r[3],o+=e,t[i+o]=r[6],t[i+o+1]=r[7],o+=e,t[i+o]=r[4],t[i+o+1]=r[5],o+=e;let a=i/e;s[n++]=a,s[n++]=a+1,s[n++]=a+2,s[n++]=a+1,s[n++]=a+3,s[n++]=a+2}}});var Cy,Ay=p(()=>{D();Cy={extension:{type:b.ShapeBuilder,name:"triangle"},build(r,t){return t[0]=r.x,t[1]=r.y,t[2]=r.x2,t[3]=r.y2,t[4]=r.x3,t[5]=r.y3,t},triangulate(r,t,e,i,s,n){let o=0;i*=e,t[i+o]=r[0],t[i+o+1]=r[1],o+=e,t[i+o]=r[2],t[i+o+1]=r[3],o+=e,t[i+o]=r[4],t[i+o+1]=r[5];let a=i/e;s[n++]=a,s[n++]=a+1,s[n++]=a+2}}});function Dy(r,t,e,i){let s=t.matrix?r.copyFrom(t.matrix).invert():r.identity();if(t.textureSpace==="local"){let n=e.getBounds(zA);s.translate(-n.x,-n.y),s.scale(1/n.width,1/n.height)}else{s.translate(t.texture.frame.x,t.texture.frame.y),s.scale(1/t.texture.source.width,1/t.texture.source.height);let n=t.texture.source.style;n.addressMode==="clamp-to-edge"&&(n.addressMode="repeat",n.update())}return i&&s.append(HA.copyFrom(i).invert()),s}var HA,zA,Py=p(()=>{nt();Wt();HA=new G,zA=new tt});function My(r,t){let{geometryData:e,batches:i}=t;i.length=0,e.indices.length=0,e.vertices.length=0,e.uvs.length=0;for(let s=0;s<r.instructions.length;s++){let n=r.instructions[s];if(n.action==="texture")XA(n.data,i,e);else if(n.action==="fill"||n.action==="stroke"){let o=n.action==="stroke",a=n.data.path.shapePath,u=n.data.style,l=n.data.hole;o&&l&&By(l.shapePath,u,!0,i,e),l&&(a.shapePrimitives[a.shapePrimitives.length-1].holes=l.shapePath.shapePrimitives),By(a,u,o,i,e)}}}function XA(r,t,e){let{vertices:i,uvs:s,indices:n}=e,o=n.length,a=i.length/2,u=[],l=ja.rectangle,c=WA,h=r.image;c.x=r.dx,c.y=r.dy,c.width=r.dw,c.height=r.dh;let f=r.transform;l.build(c,u),f&&Zc(u,f),l.triangulate(u,i,2,a,n,o);let d=h.uvs;s.push(d.x0,d.y0,d.x1,d.y1,d.x3,d.y3,d.x2,d.y2);let m=j.get(si);m.indexOffset=o,m.indexSize=n.length-o,m.attributeOffset=a,m.attributeSize=i.length/2-a,m.baseColor=r.style,m.alpha=r.alpha,m.texture=h,m.geometryData=e,t.push(m)}function By(r,t,e,i,s){let{vertices:n,uvs:o,indices:a}=s;r.shapePrimitives.forEach(({shape:u,transform:l,holes:c})=>{let h=a.length,f=n.length/2,d=[],m=ja[u.type],g="triangle-list";if(m.build(u,d),l&&Zc(d,l),e){let T=u.closePath??!0,y=t;y.pixelLine?(my(d,T,n,a),g="line-list"):dy(d,y,!1,T,n,a)}else if(c){let T=[],y=d.slice();$A(c).forEach(S=>{T.push(y.length/2),y.push(...S)}),$a(y,T,n,2,f,a,h)}else m.triangulate(d,n,2,f,a,h);let x=o.length/2,_=t.texture;if(_!==I.WHITE){let T=Dy(VA,t,u,l);iy(n,2,f,o,x,2,n.length/2-f,T)}else sy(o,x,2,n.length/2-f);let v=j.get(si);v.indexOffset=h,v.indexSize=a.length-h,v.attributeOffset=f,v.attributeSize=n.length/2-f,v.baseColor=t.color,v.alpha=t.alpha,v.texture=_,v.geometryData=s,v.topology=g,i.push(v)})}function $A(r){let t=[];for(let e=0;e<r.length;e++){let i=r[e].shape,s=[];ja[i.type].build(i,s),t.push(s)}return t}var ja,WA,VA,Fy=p(()=>{D();nt();Wt();ny();oy();ft();Jt();Qc();ly();py();gy();Sy();Ey();Ay();Py();sh();ja={};L.handleByMap(b.ShapeBuilder,ja);L.add(wy,Ty,Cy,Ui,ay,uy);WA=new tt,VA=new G});var nh,oh,uh,Li,Ya=p(()=>{D();ka();qc();$l();yt();Jt();Fy();nh=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}},oh=class{constructor(){this.batcher=new rn,this.instructions=new vi}init(){this.instructions.reset()}get geometry(){return W(Ym,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}},uh=class ah{constructor(t){this._gpuContextHash={},this._graphicsDataContextHash=Object.create(null),t.renderableGC.addManagedHash(this,"_gpuContextHash"),t.renderableGC.addManagedHash(this,"_graphicsDataContextHash")}init(t){ah.defaultOptions.bezierSmoothness=t?.bezierSmoothness??ah.defaultOptions.bezierSmoothness}getContextRenderData(t){return this._graphicsDataContextHash[t.uid]||this._initContextRenderData(t)}updateGpuContext(t){let e=this._gpuContextHash[t.uid]||this._initContext(t);if(t.dirty){e?this._cleanGraphicsContextData(t):e=this._initContext(t),My(t,e);let i=t.batchMode;t.customShader||i==="no-batch"?e.isBatchable=!1:i==="auto"&&(e.isBatchable=e.geometryData.vertices.length<400),t.dirty=!1}return e}getGpuContext(t){return this._gpuContextHash[t.uid]||this._initContext(t)}_initContextRenderData(t){let e=j.get(oh),{batches:i,geometryData:s}=this._gpuContextHash[t.uid],n=s.vertices.length,o=s.indices.length;for(let c=0;c<i.length;c++)i[c].applyTransform=!1;let a=e.batcher;a.ensureAttributeBuffer(n),a.ensureIndexBuffer(o),a.begin();for(let c=0;c<i.length;c++){let h=i[c];a.add(h)}a.finish(e.instructions);let u=a.geometry;u.indexBuffer.setDataWithSize(a.indexBuffer,a.indexSize,!0),u.buffers[0].setDataWithSize(a.attributeBuffer.float32View,a.attributeSize,!0);let l=a.batches;for(let c=0;c<l.length;c++){let h=l[c];h.bindGroup=Di(h.textures.textures,h.textures.count)}return this._graphicsDataContextHash[t.uid]=e,e}_initContext(t){let e=new nh;return e.context=t,this._gpuContextHash[t.uid]=e,t.on("destroy",this.onGraphicsContextDestroy,this),this._gpuContextHash[t.uid]}onGraphicsContextDestroy(t){this._cleanGraphicsContextData(t),t.off("destroy",this.onGraphicsContextDestroy,this),this._gpuContextHash[t.uid]=null}_cleanGraphicsContextData(t){let e=this._gpuContextHash[t.uid];e.isBatchable||this._graphicsDataContextHash[t.uid]&&(j.return(this.getContextRenderData(t)),this._graphicsDataContextHash[t.uid]=null),e.batches&&e.batches.forEach(i=>{j.return(i)})}destroy(){for(let t in this._gpuContextHash)this._gpuContextHash[t]&&this.onGraphicsContextDestroy(this._gpuContextHash[t].context)}};uh.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"graphicsContext"};uh.defaultOptions={bezierSmoothness:.5};Li=uh});var jA,lh,ch,hh,fh,dh,ph,mh,At,Ge=p(()=>{"use strict";jA={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},lh=0,ch=1,hh=2,fh=3,dh=4,ph=5,mh=class Ry{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<lh)}set blend(t){!!(this.data&1<<lh)!==t&&(this.data^=1<<lh)}get offsets(){return!!(this.data&1<<ch)}set offsets(t){!!(this.data&1<<ch)!==t&&(this.data^=1<<ch)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<hh)}set culling(t){!!(this.data&1<<hh)!==t&&(this.data^=1<<hh)}get depthTest(){return!!(this.data&1<<fh)}set depthTest(t){!!(this.data&1<<fh)!==t&&(this.data^=1<<fh)}get depthMask(){return!!(this.data&1<<ph)}set depthMask(t){!!(this.data&1<<ph)!==t&&(this.data^=1<<ph)}get clockwiseFrontFace(){return!!(this.data&1<<dh)}set clockwiseFrontFace(t){!!(this.data&1<<dh)!==t&&(this.data^=1<<dh)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=jA[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return\`[pixi.js/core:State blendMode=\${this.blendMode} clockwiseFrontFace=\${this.clockwiseFrontFace} culling=\${this.culling} depthMask=\${this.depthMask} polygonOffset=\${this.polygonOffset}]\`}static for2d(){let t=new Ry;return t.depthTest=!1,t.blend=!0,t}};mh.default2d=mh.for2d();At=mh});function Ke(r,t,e){let i=(r>>24&255)/255;t[e++]=(r&255)/255*i,t[e++]=(r>>8&255)/255*i,t[e++]=(r>>16&255)/255*i,t[e++]=i}var Ni=p(()=>{"use strict"});var an,ky=p(()=>{D();Ge();Jt();Ni();Qc();an=class{constructor(t,e){this.state=At.for2d(),this._graphicsBatchesHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=t,this._adaptor=e,this._adaptor.init(),this.renderer.renderableGC.addManagedHash(this,"_graphicsBatchesHash")}validateRenderable(t){let e=t.context,i=!!this._graphicsBatchesHash[t.uid],s=this.renderer.graphicsContext.updateGpuContext(e);return!!(s.isBatchable||i!==s.isBatchable)}addRenderable(t,e){let i=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),i.isBatchable?this._addToBatcher(t,e):(this.renderer.renderPipes.batch.break(e),e.add(t))}updateRenderable(t){let e=this._graphicsBatchesHash[t.uid];if(e)for(let i=0;i<e.length;i++){let s=e[i];s._batcher.updateElement(s)}}destroyRenderable(t){this._graphicsBatchesHash[t.uid]&&this._removeBatchForRenderable(t.uid),t.off("destroyed",this._destroyRenderableBound)}execute(t){if(!t.isRenderable)return;let e=this.renderer,i=t.context;if(!e.graphicsContext.getGpuContext(i).batches.length)return;let n=i.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;let o=n.resources.localUniforms.uniforms;o.uTransformMatrix=t.groupTransform,o.uRound=e._roundPixels|t._roundPixels,Ke(t.groupColorAlpha,o.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){let e=!!this._graphicsBatchesHash[t.uid],i=this.renderer.graphicsContext.updateGpuContext(t.context);e&&this._removeBatchForRenderable(t.uid),i.isBatchable&&this._initBatchesForRenderable(t),t.batched=i.isBatchable}_addToBatcher(t,e){let i=this.renderer.renderPipes.batch,s=this._getBatchesForRenderable(t);for(let n=0;n<s.length;n++){let o=s[n];i.addToBatch(o,e)}}_getBatchesForRenderable(t){return this._graphicsBatchesHash[t.uid]||this._initBatchesForRenderable(t)}_initBatchesForRenderable(t){let e=t.context,i=this.renderer.graphicsContext.getGpuContext(e),s=this.renderer._roundPixels|t._roundPixels,n=i.batches.map(o=>{let a=j.get(si);return o.copyTo(a),a.renderable=t,a.roundPixels=s,a});return this._graphicsBatchesHash[t.uid]===void 0&&t.on("destroyed",this._destroyRenderableBound),this._graphicsBatchesHash[t.uid]=n,n}_removeBatchForRenderable(t){this._graphicsBatchesHash[t].forEach(e=>{j.return(e)}),this._graphicsBatchesHash[t]=null}destroy(){this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null;for(let t in this._graphicsBatchesHash)this._removeBatchForRenderable(t);this._graphicsBatchesHash=null}};an.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"graphics"}});var gh=p(()=>{D();Ya();ky();L.add(an);L.add(Li)});var Mr,Ka=p(()=>{"use strict";Mr=class{constructor(){this.batcherName="default",this.packAsQuad=!1,this.indexOffset=0,this.attributeOffset=0,this.roundPixels=0,this._batcher=null,this._batch=null,this._textureMatrixUpdateId=-1,this._uvUpdateId=-1}get blendMode(){return this.renderable.groupBlendMode}get topology(){return this._topology||this.geometry.topology}set topology(t){this._topology=t}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.geometry=null,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}setTexture(t){this.texture!==t&&(this.texture=t,this._textureMatrixUpdateId=-1)}get uvs(){let e=this.geometry.getBuffer("aUV"),i=e.data,s=i,n=this.texture.textureMatrix;return n.isSimple||(s=this._transformedUvs,(this._textureMatrixUpdateId!==n._updateID||this._uvUpdateId!==e._updateID)&&((!s||s.length<i.length)&&(s=this._transformedUvs=new Float32Array(i.length)),this._textureMatrixUpdateId=n._updateID,this._uvUpdateId=e._updateID,n.multiplyUvs(i,s))),s}get positions(){return this.geometry.positions}get indices(){return this.geometry.indices}get color(){return this.renderable.groupColorAlpha}get groupTransform(){return this.renderable.groupTransform}get attributeSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}});var un,Gy=p(()=>{D();nt();Cr();ee();Zs();Jt();Ni();Ka();un=class{constructor(t,e){this.localUniforms=new ct({uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new It({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=t,this._adaptor=e,this._adaptor.init(),t.renderableGC.addManagedHash(this,"_gpuBatchableMeshHash"),t.renderableGC.addManagedHash(this,"_meshDataHash")}validateRenderable(t){let e=this._getMeshData(t),i=e.batched,s=t.batched;if(e.batched=s,i!==s)return!0;if(s){let n=t._geometry;if(n.indices.length!==e.indexSize||n.positions.length!==e.vertexSize)return e.indexSize=n.indices.length,e.vertexSize=n.positions.length,!0;let o=this._getBatchableMesh(t);return o.texture.uid!==t._texture.uid&&(o._textureMatrixUpdateId=-1),!o._batcher.checkAndUpdateTexture(o,t._texture)}return!1}addRenderable(t,e){let i=this.renderer.renderPipes.batch,{batched:s}=this._getMeshData(t);if(s){let n=this._getBatchableMesh(t);n.setTexture(t._texture),n.geometry=t._geometry,i.addToBatch(n,e)}else i.break(e),e.add(t)}updateRenderable(t){if(t.batched){let e=this._gpuBatchableMeshHash[t.uid];e.setTexture(t._texture),e.geometry=t._geometry,e._batcher.updateElement(e)}}destroyRenderable(t){this._meshDataHash[t.uid]=null;let e=this._gpuBatchableMeshHash[t.uid];e&&(j.return(e),this._gpuBatchableMeshHash[t.uid]=null),t.off("destroyed",this._destroyRenderableBound)}execute(t){if(!t.isRenderable)return;t.state.blendMode=cr(t.groupBlendMode,t.texture._source);let e=this.localUniforms;e.uniforms.uTransformMatrix=t.groupTransform,e.uniforms.uRound=this.renderer._roundPixels|t._roundPixels,e.update(),Ke(t.groupColorAlpha,e.uniforms.uColor,0),this._adaptor.execute(this,t)}_getMeshData(t){return this._meshDataHash[t.uid]||this._initMeshData(t)}_initMeshData(t){return this._meshDataHash[t.uid]={batched:t.batched,indexSize:t._geometry.indices?.length,vertexSize:t._geometry.positions?.length},t.on("destroyed",this._destroyRenderableBound),this._meshDataHash[t.uid]}_getBatchableMesh(t){return this._gpuBatchableMeshHash[t.uid]||this._initBatchableMesh(t)}_initBatchableMesh(t){let e=j.get(Mr);return e.renderable=t,e.setTexture(t._texture),e.transform=t.groupTransform,e.roundPixels=this.renderer._roundPixels|t._roundPixels,this._gpuBatchableMeshHash[t.uid]=e,e}destroy(){for(let t in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[t]&&j.return(this._gpuBatchableMeshHash[t]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.destroy(),this._adaptor=null,this.renderer=null}};un.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"mesh"}});var xh=p(()=>{D();Gy();L.add(un)});var qa,Iy=p(()=>{"use strict";qa=class{execute(t,e){let i=t.state,s=t.renderer,n=e.shader||t.defaultShader;n.resources.uTexture=e.texture._source,n.resources.uniforms=t.localUniforms;let o=s.gl,a=t.getBuffers(e);s.shader.bind(n),s.state.set(i),s.geometry.bind(a.geometry,n.glProgram);let l=a.geometry.indexBuffer.data.BYTES_PER_ELEMENT===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;o.drawElements(o.TRIANGLES,e.particleChildren.length*6,l,0)}}});function _h(r,t=null){let e=r*6;if(e>65535?t||(t=new Uint32Array(e)):t||(t=new Uint16Array(e)),t.length!==e)throw new Error(\`Out buffer length is incorrect, got \${t.length} and expected \${e}\`);for(let i=0,s=0;i<e;i+=6,s+=4)t[i+0]=s+0,t[i+1]=s+1,t[i+2]=s+2,t[i+3]=s+0,t[i+4]=s+2,t[i+5]=s+3;return t}var Uy=p(()=>{"use strict"});function Ly(r){return{dynamicUpdate:Oy(r,!0),staticUpdate:Oy(r,!1)}}function Oy(r,t){let e=[];e.push(\`
|
|
|
|
var index = 0;
|
|
|
|
for (let i = 0; i < ps.length; ++i)
|
|
{
|
|
const p = ps[i];
|
|
|
|
\`);let i=0;for(let n in r){let o=r[n];if(t!==o.dynamic)continue;e.push(\`offset = index + \${i}\`),e.push(o.code);let a=ue(o.format);i+=a.stride/4}e.push(\`
|
|
index += stride * 4;
|
|
}
|
|
\`),e.unshift(\`
|
|
var stride = \${i};
|
|
\`);let s=e.join(\`
|
|
\`);return new Function("ps","f32v","u32v",s)}var Ny=p(()=>{ii()});function YA(r){let t=[];for(let e in r){let i=r[e];t.push(e,i.code,i.dynamic?"d":"s")}return t.join("_")}var Za,Hy=p(()=>{Ar();hr();Pi();ii();Fc();Uy();Ny();Za=class{constructor(t){this._size=0,this._generateParticleUpdateCache={};let e=this._size=t.size??1e3,i=t.properties,s=0,n=0;for(let c in i){let h=i[c],f=ue(h.format);h.dynamic?n+=f.stride:s+=f.stride}this._dynamicStride=n/4,this._staticStride=s/4,this.staticAttributeBuffer=new We(e*4*s),this.dynamicAttributeBuffer=new We(e*4*n),this.indexBuffer=_h(e);let o=new be,a=0,u=0;this._staticBuffer=new St({data:new Float32Array(1),label:"static-particle-buffer",shrinkToFit:!1,usage:J.VERTEX|J.COPY_DST}),this._dynamicBuffer=new St({data:new Float32Array(1),label:"dynamic-particle-buffer",shrinkToFit:!1,usage:J.VERTEX|J.COPY_DST});for(let c in i){let h=i[c],f=ue(h.format);h.dynamic?(o.addAttribute(h.attributeName,{buffer:this._dynamicBuffer,stride:this._dynamicStride*4,offset:a*4,format:h.format}),a+=f.size):(o.addAttribute(h.attributeName,{buffer:this._staticBuffer,stride:this._staticStride*4,offset:u*4,format:h.format}),u+=f.size)}o.addIndex(this.indexBuffer);let l=this.getParticleUpdate(i);this._dynamicUpload=l.dynamicUpdate,this._staticUpload=l.staticUpdate,this.geometry=o}getParticleUpdate(t){let e=YA(t);return this._generateParticleUpdateCache[e]?this._generateParticleUpdateCache[e]:(this._generateParticleUpdateCache[e]=this.generateParticleUpdate(t),this._generateParticleUpdateCache[e])}generateParticleUpdate(t){return Ly(t)}update(t,e){t.length>this._size&&(e=!0,this._size=Math.max(t.length,this._size*1.5|0),this.staticAttributeBuffer=new We(this._size*this._staticStride*4*4),this.dynamicAttributeBuffer=new We(this._size*this._dynamicStride*4*4),this.indexBuffer=_h(this._size),this.geometry.indexBuffer.setDataWithSize(this.indexBuffer,this.indexBuffer.byteLength,!0));let i=this.dynamicAttributeBuffer;if(this._dynamicUpload(t,i.float32View,i.uint32View),this._dynamicBuffer.setDataWithSize(this.dynamicAttributeBuffer.float32View,t.length*this._dynamicStride*4,!0),e){let s=this.staticAttributeBuffer;this._staticUpload(t,s.float32View,s.uint32View),this._staticBuffer.setDataWithSize(s.float32View,t.length*this._staticStride*4,!0)}}destroy(){this._staticBuffer.destroy(),this._dynamicBuffer.destroy(),this.geometry.destroy()}}});var zy,Wy=p(()=>{zy=\`varying vec2 vUV;
|
|
varying vec4 vColor;
|
|
|
|
uniform sampler2D uTexture;
|
|
|
|
void main(void){
|
|
vec4 color = texture2D(uTexture, vUV) * vColor;
|
|
gl_FragColor = color;
|
|
}\`});var Vy,Xy=p(()=>{Vy=\`attribute vec2 aVertex;
|
|
attribute vec2 aUV;
|
|
attribute vec4 aColor;
|
|
|
|
attribute vec2 aPosition;
|
|
attribute float aRotation;
|
|
|
|
uniform mat3 uTranslationMatrix;
|
|
uniform float uRound;
|
|
uniform vec2 uResolution;
|
|
uniform vec4 uColor;
|
|
|
|
varying vec2 vUV;
|
|
varying vec4 vColor;
|
|
|
|
vec2 roundPixels(vec2 position, vec2 targetSize)
|
|
{
|
|
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
}
|
|
|
|
void main(void){
|
|
float cosRotation = cos(aRotation);
|
|
float sinRotation = sin(aRotation);
|
|
float x = aVertex.x * cosRotation - aVertex.y * sinRotation;
|
|
float y = aVertex.x * sinRotation + aVertex.y * cosRotation;
|
|
|
|
vec2 v = vec2(x, y);
|
|
v = v + aPosition;
|
|
|
|
gl_Position = vec4((uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
|
|
|
|
if(uRound == 1.0)
|
|
{
|
|
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
|
}
|
|
|
|
vUV = aUV;
|
|
vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uColor;
|
|
}
|
|
\`});var yh,$y=p(()=>{yh=\`
|
|
struct ParticleUniforms {
|
|
uProjectionMatrix:mat3x3<f32>,
|
|
uColor:vec4<f32>,
|
|
uResolution:vec2<f32>,
|
|
uRoundPixels:f32,
|
|
};
|
|
|
|
@group(0) @binding(0) var<uniform> uniforms: ParticleUniforms;
|
|
|
|
@group(1) @binding(0) var uTexture: texture_2d<f32>;
|
|
@group(1) @binding(1) var uSampler : sampler;
|
|
|
|
struct VSOutput {
|
|
@builtin(position) position: vec4<f32>,
|
|
@location(0) uv : vec2<f32>,
|
|
@location(1) color : vec4<f32>,
|
|
};
|
|
@vertex
|
|
fn mainVertex(
|
|
@location(0) aVertex: vec2<f32>,
|
|
@location(1) aPosition: vec2<f32>,
|
|
@location(2) aUV: vec2<f32>,
|
|
@location(3) aColor: vec4<f32>,
|
|
@location(4) aRotation: f32,
|
|
) -> VSOutput {
|
|
|
|
let v = vec2(
|
|
aVertex.x * cos(aRotation) - aVertex.y * sin(aRotation),
|
|
aVertex.x * sin(aRotation) + aVertex.y * cos(aRotation)
|
|
) + aPosition;
|
|
|
|
let position = vec4((uniforms.uProjectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
|
|
|
|
let vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uniforms.uColor;
|
|
|
|
return VSOutput(
|
|
position,
|
|
aUV,
|
|
vColor,
|
|
);
|
|
}
|
|
|
|
@fragment
|
|
fn mainFragment(
|
|
@location(0) uv: vec2<f32>,
|
|
@location(1) color: vec4<f32>,
|
|
@builtin(position) position: vec4<f32>,
|
|
) -> @location(0) vec4<f32> {
|
|
|
|
var sample = textureSample(uTexture, uSampler, uv) * color;
|
|
|
|
return sample;
|
|
}\`});var Qa,jy=p(()=>{Nt();nt();ri();Mi();ke();ft();Kl();Wy();Xy();$y();Qa=class extends wt{constructor(){let t=ve.from({vertex:Vy,fragment:zy}),e=Te.from({fragment:{source:yh,entryPoint:"mainFragment"},vertex:{source:yh,entryPoint:"mainVertex"}});super({glProgram:t,gpuProgram:e,resources:{uTexture:I.WHITE.source,uSampler:new pa({}),uniforms:{uTranslationMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Z(16777215),type:"vec4<f32>"},uRound:{value:1,type:"f32"},uResolution:{value:[0,0],type:"vec2<f32>"}}}})}}});var Hi,bh=p(()=>{nt();ee();Zs();Ge();Ni();Hy();jy();Hi=class{constructor(t,e){this.state=At.for2d(),this._gpuBufferHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.localUniforms=new ct({uTranslationMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array(4),type:"vec4<f32>"},uRound:{value:1,type:"f32"},uResolution:{value:[0,0],type:"vec2<f32>"}}),this.renderer=t,this.adaptor=e,this.defaultShader=new Qa,this.state=At.for2d()}validateRenderable(t){return!1}addRenderable(t,e){this.renderer.renderPipes.batch.break(e),e.add(t)}getBuffers(t){return this._gpuBufferHash[t.uid]||this._initBuffer(t)}_initBuffer(t){return this._gpuBufferHash[t.uid]=new Za({size:t.particleChildren.length,properties:t._properties}),t.on("destroyed",this._destroyRenderableBound),this._gpuBufferHash[t.uid]}updateRenderable(t){}destroyRenderable(t){this._gpuBufferHash[t.uid].destroy(),this._gpuBufferHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}execute(t){let e=t.particleChildren;if(e.length===0)return;let i=this.renderer,s=this.getBuffers(t);t.texture||(t.texture=e[0].texture);let n=this.state;s.update(e,t._childrenDirty),t._childrenDirty=!1,n.blendMode=cr(t.blendMode,t.texture._source);let o=this.localUniforms.uniforms,a=o.uTranslationMatrix;t.worldTransform.copyTo(a),a.prepend(i.globalUniforms.globalUniformData.projectionMatrix),o.uResolution=i.globalUniforms.globalUniformData.resolution,o.uRound=i._roundPixels|t._roundPixels,Ke(t.groupColorAlpha,o.uColor,0),this.adaptor.execute(this,t)}destroy(){this.defaultShader&&(this.defaultShader.destroy(),this.defaultShader=null)}}});var ln,Yy=p(()=>{D();Iy();bh();ln=class extends Hi{constructor(t){super(t,new qa)}};ln.extension={type:[b.WebGLPipes],name:"particle"}});var Ja,Ky=p(()=>{"use strict";Ja=class{execute(t,e){let i=t.renderer,s=e.shader||t.defaultShader;s.groups[0]=i.renderPipes.uniformBatch.getUniformBindGroup(t.localUniforms,!0),s.groups[1]=i.texture.getTextureBindGroup(e.texture);let n=t.state,o=t.getBuffers(e);i.encoder.draw({geometry:o.geometry,shader:e.shader||t.defaultShader,state:n,size:e.particleChildren.length*6})}}});var cn,qy=p(()=>{D();Ky();bh();cn=class extends Hi{constructor(t){super(t,new Ja)}};cn.extension={type:[b.WebGPUPipes],name:"particle"}});var vh=p(()=>{D();Yy();qy();L.add(ln);L.add(cn)});var qe,hn=p(()=>{"use strict";qe=class{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}}});function fn(r,t){let{texture:e,bounds:i}=r;Ea(i,t._anchor,e);let s=t._style.padding;i.minX-=s,i.minY-=s,i.maxX-=s,i.maxY-=s}var Th=p(()=>{Tc()});var dn,Zy=p(()=>{D();Jt();hn();Th();dn=class{constructor(t){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.runners.resolutionChange.add(this),this._renderer.renderableGC.addManagedHash(this,"_gpuText")}resolutionChange(){for(let t in this._gpuText){let e=this._gpuText[t];if(!e)continue;let i=e.batchableSprite.renderable;i._autoResolution&&(i._resolution=this._renderer.resolution,i.onViewUpdate())}}validateRenderable(t){let e=this._getGpuText(t),i=t._getKey();return e.currentKey!==i}addRenderable(t,e){let s=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),this._renderer.renderPipes.batch.addToBatch(s,e)}updateRenderable(t){let i=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),i._batcher.updateElement(i)}destroyRenderable(t){t.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(t.uid)}_destroyRenderableById(t){let e=this._gpuText[t];this._renderer.canvasText.decreaseReferenceCount(e.currentKey),j.return(e.batchableSprite),this._gpuText[t]=null}_updateText(t){let e=t._getKey(),i=this._getGpuText(t),s=i.batchableSprite;i.currentKey!==e&&this._updateGpuText(t),t._didTextUpdate=!1,fn(s,t)}_updateGpuText(t){let e=this._getGpuText(t),i=e.batchableSprite;e.texture&&this._renderer.canvasText.decreaseReferenceCount(e.currentKey),e.texture=i.texture=this._renderer.canvasText.getManagedTexture(t),e.currentKey=t._getKey(),i.texture=e.texture}_getGpuText(t){return this._gpuText[t.uid]||this.initGpuText(t)}initGpuText(t){let e={texture:null,currentKey:"--",batchableSprite:j.get(qe)};return e.batchableSprite.renderable=t,e.batchableSprite.transform=t.groupTransform,e.batchableSprite.bounds={minX:0,maxX:1,minY:0,maxY:0},e.batchableSprite.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuText[t.uid]=e,t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,this._updateText(t),t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuText)this._destroyRenderableById(t);this._gpuText=null,this._renderer=null}};dn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"text"}});var Sh,le,zi=p(()=>{Pt();Is();Sh=class{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,e){let i=Q.get().createCanvas();i.width=t,i.height=e;let s=i.getContext("2d");return{canvas:i,context:s}}getOptimalCanvasAndContext(t,e,i=1){t=Math.ceil(t*i-1e-6),e=Math.ceil(e*i-1e-6),t=ar(t),e=ar(e);let s=(t<<17)+(e<<1);this._canvasPool[s]||(this._canvasPool[s]=[]);let n=this._canvasPool[s].pop();return n||(n=this._createCanvasAndContext(t,e)),n}returnCanvasAndContext(t){let e=t.canvas,{width:i,height:s}=e,n=(i<<17)+(s<<1);t.context.clearRect(0,0,i,s),this._canvasPool[n].push(t)}clear(){this._canvasPool={}}},le=new Sh});function Qy(r,t,e){for(let i=0,s=4*e*t;i<t;++i,s+=4)if(r[s+3]!==0)return!1;return!0}function Jy(r,t,e,i,s){let n=4*t;for(let o=i,a=i*n+4*e;o<=s;++o,a+=n)if(r[a+3]!==0)return!1;return!0}function t0(r,t=1){let{width:e,height:i}=r,s=r.getContext("2d",{willReadFrequently:!0});if(s===null)throw new TypeError("Failed to get canvas 2D context");let o=s.getImageData(0,0,e,i).data,a=0,u=0,l=e-1,c=i-1;for(;u<i&&Qy(o,e,u);)++u;if(u===i)return tt.EMPTY;for(;Qy(o,e,c);)--c;for(;Jy(o,e,a,u,c);)++a;for(;Jy(o,e,l,u,c);)--l;return++l,++c,new tt(a/t,u/t,(l-a)/t,(c-u)/t)}var e0=p(()=>{Wt()});function i0(r,t){for(let e=0;e<t.length;e++){let i=t[e];r.addColorStop(i.offset,i.color)}}function s0(r,t){let e=Q.get().createCanvas(r,t),i=e.getContext("2d");return{canvas:e,context:i}}function KA(r){let t=r[0]??{};return(typeof t=="number"||r[1])&&(W("8.5.2","use options object instead"),t={type:"linear",start:{x:r[0],y:r[1]},end:{x:r[2],y:r[3]},textureSpace:r[4],textureSize:r[5]??Se.defaultLinearOptions.textureSize}),t}var r0,Eh,Se,pn=p(()=>{Nt();Pt();nt();Pa();ft();zt();yt();Yl();r0=[{offset:0,color:"white"},{offset:1,color:"black"}],Eh=class wh{constructor(...t){this.uid=et("fillGradient"),this.type="linear",this.colorStops=[];let e=KA(t);e={...e.type==="radial"?wh.defaultRadialOptions:wh.defaultLinearOptions,...da(e)},this._textureSize=e.textureSize,e.type==="radial"?(this.center=e.center,this.outerCenter=e.outerCenter??this.center,this.innerRadius=e.innerRadius,this.outerRadius=e.outerRadius,this.scale=e.scale,this.rotation=e.rotation):(this.start=e.start,this.end=e.end),this.textureSpace=e.textureSpace,this.type=e.type,e.colorStops.forEach(s=>{this.addColorStop(s.offset,s.color)})}addColorStop(t,e){return this.colorStops.push({offset:t,color:Z.shared.setValue(e).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let t=this.colorStops.length?this.colorStops:r0,e=this._textureSize,{canvas:i,context:s}=s0(e,1),n=s.createLinearGradient(0,0,this._textureSize,0);i0(n,t),s.fillStyle=n,s.fillRect(0,0,e,1),this.texture=new I({source:new ze({resource:i})});let{x:o,y:a}=this.start,{x:u,y:l}=this.end,c=new G,h=u-o,f=l-a,d=Math.sqrt(h*h+f*f),m=Math.atan2(f,h);c.scale(d/e,1),c.rotate(m),c.translate(o,a),this.textureSpace==="local"&&c.scale(e,e),this.transform=c}buildGradient(){this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let t=this.colorStops.length?this.colorStops:r0,e=this._textureSize,{canvas:i,context:s}=s0(e,e),{x:n,y:o}=this.center,{x:a,y:u}=this.outerCenter,l=this.innerRadius,c=this.outerRadius,h=a-c,f=u-c,d=e/(c*2),m=(n-h)*d,g=(o-f)*d,x=s.createRadialGradient(m,g,l*d,(a-h)*d,(u-f)*d,c*d);i0(x,t),s.fillStyle=t[t.length-1].color,s.fillRect(0,0,e,e),s.fillStyle=x,s.translate(m,g),s.rotate(this.rotation),s.scale(1,this.scale),s.translate(-m,-g),s.fillRect(0,0,e,e),this.texture=new I({source:new ze({resource:i,addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"})});let _=new G;_.scale(1/d,1/d),_.translate(h,f),this.textureSpace==="local"&&_.scale(e,e),this.transform=_}get styleKey(){return this.uid}destroy(){this.texture?.destroy(!0),this.texture=null}};Eh.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256};Eh.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256};Se=Eh});var n0,dr,tu=p(()=>{nt();zt();n0={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}},dr=class{constructor(t,e){this.uid=et("fillPattern"),this.transform=new G,this._styleKey=null,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),e&&(t.source.style.addressModeU=n0[e].addressModeU,t.source.style.addressModeV=n0[e].addressModeV)}setTransform(t){let e=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/e.frame.width,1/e.frame.height),this._styleKey=null}get styleKey(){return this._styleKey?this._styleKey:(this._styleKey=\`fill-pattern-\${this.uid}-\${this.texture.uid}-\${this.transform.toArray().join("-")}\`,this._styleKey)}}});var a0=Do((vz,o0)=>{o0.exports=ZA;var Ch={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},qA=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function ZA(r){var t=[];return r.replace(qA,function(e,i,s){var n=i.toLowerCase();for(s=JA(s),n=="m"&&s.length>2&&(t.push([i].concat(s.splice(0,2))),n="l",i=i=="m"?"l":"L");;){if(s.length==Ch[n])return s.unshift(i),t.push(s);if(s.length<Ch[n])throw new Error("malformed path data");t.push([i].concat(s.splice(0,Ch[n])))}}),t}var QA=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/ig;function JA(r){var t=r.match(QA);return t?t.map(Number):[]}});function l0(r,t){let e=(0,u0.default)(r),i=[],s=null,n=0,o=0;for(let a=0;a<e.length;a++){let u=e[a],l=u[0],c=u;switch(l){case"M":n=c[1],o=c[2],t.moveTo(n,o);break;case"m":n+=c[1],o+=c[2],t.moveTo(n,o);break;case"H":n=c[1],t.lineTo(n,o);break;case"h":n+=c[1],t.lineTo(n,o);break;case"V":o=c[1],t.lineTo(n,o);break;case"v":o+=c[1],t.lineTo(n,o);break;case"L":n=c[1],o=c[2],t.lineTo(n,o);break;case"l":n+=c[1],o+=c[2],t.lineTo(n,o);break;case"C":n=c[5],o=c[6],t.bezierCurveTo(c[1],c[2],c[3],c[4],n,o);break;case"c":t.bezierCurveTo(n+c[1],o+c[2],n+c[3],o+c[4],n+c[5],o+c[6]),n+=c[5],o+=c[6];break;case"S":n=c[3],o=c[4],t.bezierCurveToShort(c[1],c[2],n,o);break;case"s":t.bezierCurveToShort(n+c[1],o+c[2],n+c[3],o+c[4]),n+=c[3],o+=c[4];break;case"Q":n=c[3],o=c[4],t.quadraticCurveTo(c[1],c[2],n,o);break;case"q":t.quadraticCurveTo(n+c[1],o+c[2],n+c[3],o+c[4]),n+=c[3],o+=c[4];break;case"T":n=c[1],o=c[2],t.quadraticCurveToShort(n,o);break;case"t":n+=c[1],o+=c[2],t.quadraticCurveToShort(n,o);break;case"A":n=c[6],o=c[7],t.arcToSvg(c[1],c[2],c[3],c[4],c[5],n,o);break;case"a":n+=c[6],o+=c[7],t.arcToSvg(c[1],c[2],c[3],c[4],c[5],n,o);break;case"Z":case"z":t.closePath(),i.length>0&&(s=i.pop(),s?(n=s.startX,o=s.startY):(n=0,o=0)),s=null;break;default:z(\`Unknown SVG path command: \${l}\`)}l!=="Z"&&l!=="z"&&s===null&&(s={startX:n,startY:o},i.push(s))}return t}var u0,c0=p(()=>{u0=hs(a0(),1);mt()});var ai,Ah=p(()=>{Wt();ai=class r{constructor(t=0,e=0,i=0){this.type="circle",this.x=t,this.y=e,this.radius=i}clone(){return new r(this.x,this.y,this.radius)}contains(t,e){if(this.radius<=0)return!1;let i=this.radius*this.radius,s=this.x-t,n=this.y-e;return s*=s,n*=n,s+n<=i}strokeContains(t,e,i,s=.5){if(this.radius===0)return!1;let n=this.x-t,o=this.y-e,a=this.radius,u=(1-s)*i,l=Math.sqrt(n*n+o*o);return l<=a+u&&l>a-(i-u)}getBounds(t){return t||(t=new tt),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return\`[pixi.js/math:Circle x=\${this.x} y=\${this.y} radius=\${this.radius}]\`}}});var eu,h0=p(()=>{Wt();eu=class r{constructor(t=0,e=0,i=0,s=0){this.type="ellipse",this.x=t,this.y=e,this.halfWidth=i,this.halfHeight=s}clone(){return new r(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,e){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let i=(t-this.x)/this.halfWidth,s=(e-this.y)/this.halfHeight;return i*=i,s*=s,i+s<=1}strokeContains(t,e,i,s=.5){let{halfWidth:n,halfHeight:o}=this;if(n<=0||o<=0)return!1;let a=i*(1-s),u=i-a,l=n-u,c=o-u,h=n+a,f=o+a,d=t-this.x,m=e-this.y,g=d*d/(l*l)+m*m/(c*c),x=d*d/(h*h)+m*m/(f*f);return g>1&&x<=1}getBounds(t){return t||(t=new tt),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=this.halfWidth*2,t.height=this.halfHeight*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return\`[pixi.js/math:Ellipse x=\${this.x} y=\${this.y} halfWidth=\${this.halfWidth} halfHeight=\${this.halfHeight}]\`}}});function f0(r,t,e,i,s,n){let o=r-e,a=t-i,u=s-e,l=n-i,c=o*u+a*l,h=u*u+l*l,f=-1;h!==0&&(f=c/h);let d,m;f<0?(d=e,m=i):f>1?(d=s,m=n):(d=e+f*u,m=i+f*l);let g=r-d,x=t-m;return g*g+x*x}var d0=p(()=>{"use strict"});var tD,eD,Wi,p0=p(()=>{d0();Wt();Wi=class r{constructor(...t){this.type="polygon";let e=Array.isArray(t[0])?t[0]:t;if(typeof e[0]!="number"){let i=[];for(let s=0,n=e.length;s<n;s++)i.push(e[s].x,e[s].y);e=i}this.points=e,this.closePath=!0}isClockwise(){let t=0,e=this.points,i=e.length;for(let s=0;s<i;s+=2){let n=e[s],o=e[s+1],a=e[(s+2)%i],u=e[(s+3)%i];t+=(a-n)*(u+o)}return t<0}containsPolygon(t){let e=this.getBounds(tD),i=t.getBounds(eD);if(!e.containsRect(i))return!1;let s=t.points;for(let n=0;n<s.length;n+=2){let o=s[n],a=s[n+1];if(!this.contains(o,a))return!1}return!0}clone(){let t=this.points.slice(),e=new r(t);return e.closePath=this.closePath,e}contains(t,e){let i=!1,s=this.points.length/2;for(let n=0,o=s-1;n<s;o=n++){let a=this.points[n*2],u=this.points[n*2+1],l=this.points[o*2],c=this.points[o*2+1];u>e!=c>e&&t<(l-a)*((e-u)/(c-u))+a&&(i=!i)}return i}strokeContains(t,e,i,s=.5){let n=i*i,o=n*(1-s),a=n-o,{points:u}=this,l=u.length-(this.closePath?0:2);for(let c=0;c<l;c+=2){let h=u[c],f=u[c+1],d=u[(c+2)%u.length],m=u[(c+3)%u.length],g=f0(t,e,h,f,d,m),x=Math.sign((d-h)*(e-f)-(m-f)*(t-h));if(g<=(x<0?a:o))return!0}return!1}getBounds(t){t||(t=new tt);let e=this.points,i=1/0,s=-1/0,n=1/0,o=-1/0;for(let a=0,u=e.length;a<u;a+=2){let l=e[a],c=e[a+1];i=l<i?l:i,s=l>s?l:s,n=c<n?c:n,o=c>o?c:o}return t.x=i,t.width=s-i,t.y=n,t.height=o-n,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return\`[pixi.js/math:PolygoncloseStroke=\${this.closePath}points=\${this.points.reduce((t,e)=>\`\${t}, \${e}\`,"")}]\`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return this.points[this.points.length-2]}get y(){return this.points[this.points.length-1]}}});var ru,iu,m0=p(()=>{Wt();ru=(r,t,e,i,s,n,o)=>{let a=r-e,u=t-i,l=Math.sqrt(a*a+u*u);return l>=s-n&&l<=s+o},iu=class r{constructor(t=0,e=0,i=0,s=0,n=20){this.type="roundedRectangle",this.x=t,this.y=e,this.width=i,this.height=s,this.radius=n}getBounds(t){return t||(t=new tt),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new r(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){let i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(e>=this.y+i&&e<=this.y+this.height-i||t>=this.x+i&&t<=this.x+this.width-i)return!0;let s=t-(this.x+i),n=e-(this.y+i),o=i*i;if(s*s+n*n<=o||(s=t-(this.x+this.width-i),s*s+n*n<=o)||(n=e-(this.y+this.height-i),s*s+n*n<=o)||(s=t-(this.x+i),s*s+n*n<=o))return!0}return!1}strokeContains(t,e,i,s=.5){let{x:n,y:o,width:a,height:u,radius:l}=this,c=i*(1-s),h=i-c,f=n+l,d=o+l,m=a-l*2,g=u-l*2,x=n+a,_=o+u;return(t>=n-c&&t<=n+h||t>=x-h&&t<=x+c)&&e>=d&&e<=d+g||(e>=o-c&&e<=o+h||e>=_-h&&e<=_+c)&&t>=f&&t<=f+m?!0:t<f&&e<d&&ru(t,e,f,d,l,h,c)||t>x-l&&e<d&&ru(t,e,x-l,d,l,h,c)||t>x-l&&e>_-l&&ru(t,e,x-l,_-l,l,h,c)||t<f&&e>_-l&&ru(t,e,f,_-l,l,h,c)}toString(){return\`[pixi.js/math:RoundedRectangle x=\${this.x} y=\${this.y}width=\${this.width} height=\${this.height} radius=\${this.radius}]\`}}});function nu(r,t,e,i,s,n,o,a,u,l){let h=Math.min(.99,Math.max(0,l??Li.defaultOptions.bezierSmoothness)),f=(iD-h)/1;return f*=f,sD(t,e,i,s,n,o,a,u,r,f),r}function sD(r,t,e,i,s,n,o,a,u,l){Ph(r,t,e,i,s,n,o,a,u,l,0),u.push(o,a)}function Ph(r,t,e,i,s,n,o,a,u,l,c){if(c>rD)return;let h=Math.PI,f=(r+e)/2,d=(t+i)/2,m=(e+s)/2,g=(i+n)/2,x=(s+o)/2,_=(n+a)/2,v=(f+m)/2,T=(d+g)/2,y=(m+x)/2,A=(g+_)/2,S=(v+y)/2,E=(T+A)/2;if(c>0){let B=o-r,U=a-t,P=Math.abs((e-o)*U-(i-a)*B),F=Math.abs((s-o)*U-(n-a)*B),N,q;if(P>su&&F>su){if((P+F)*(P+F)<=l*(B*B+U*U)){if(Vi<Dh){u.push(S,E);return}let w=Math.atan2(n-i,s-e);if(N=Math.abs(w-Math.atan2(i-t,e-r)),q=Math.abs(Math.atan2(a-n,o-s)-w),N>=h&&(N=2*h-N),q>=h&&(q=2*h-q),N+q<Vi){u.push(S,E);return}if(ui!==0){if(N>ui){u.push(e,i);return}if(q>ui){u.push(s,n);return}}}}else if(P>su){if(P*P<=l*(B*B+U*U)){if(Vi<Dh){u.push(S,E);return}if(N=Math.abs(Math.atan2(n-i,s-e)-Math.atan2(i-t,e-r)),N>=h&&(N=2*h-N),N<Vi){u.push(e,i),u.push(s,n);return}if(ui!==0&&N>ui){u.push(e,i);return}}}else if(F>su){if(F*F<=l*(B*B+U*U)){if(Vi<Dh){u.push(S,E);return}if(N=Math.abs(Math.atan2(a-n,o-s)-Math.atan2(n-i,s-e)),N>=h&&(N=2*h-N),N<Vi){u.push(e,i),u.push(s,n);return}if(ui!==0&&N>ui){u.push(s,n);return}}}else if(B=S-(r+o)/2,U=E-(t+a)/2,B*B+U*U<=l){u.push(S,E);return}}Ph(r,t,f,d,v,T,S,E,u,l,c+1),Ph(S,E,y,A,x,_,o,a,u,l,c+1)}var rD,su,iD,Dh,Vi,ui,Bh=p(()=>{Ya();rD=8,su=11920929e-14,iD=1,Dh=.01,Vi=0,ui=0});function x0(r,t,e,i,s,n,o,a){let l=Math.min(.99,Math.max(0,a??Li.defaultOptions.bezierSmoothness)),c=(aD-l)/1;return c*=c,lD(t,e,i,s,n,o,r,c),r}function lD(r,t,e,i,s,n,o,a){Mh(o,r,t,e,i,s,n,a,0),o.push(s,n)}function Mh(r,t,e,i,s,n,o,a,u){if(u>nD)return;let l=Math.PI,c=(t+i)/2,h=(e+s)/2,f=(i+n)/2,d=(s+o)/2,m=(c+f)/2,g=(h+d)/2,x=n-t,_=o-e,v=Math.abs((i-n)*_-(s-o)*x);if(v>oD){if(v*v<=a*(x*x+_*_)){if(g0<uD){r.push(m,g);return}let T=Math.abs(Math.atan2(o-s,n-i)-Math.atan2(s-e,i-t));if(T>=l&&(T=2*l-T),T<g0){r.push(m,g);return}}}else if(x=m-(t+n)/2,_=g-(e+o)/2,x*x+_*_<=a){r.push(m,g);return}Mh(r,t,e,c,h,m,g,a,u+1),Mh(r,m,g,f,d,n,o,a,u+1)}var nD,oD,aD,uD,g0,_0=p(()=>{Ya();nD=8,oD=11920929e-14,aD=1,uD=.01,g0=0});function ou(r,t,e,i,s,n,o,a){let u=Math.abs(s-n);(!o&&s>n||o&&n>s)&&(u=2*Math.PI-u),a||(a=Math.max(6,Math.floor(6*Math.pow(i,1/3)*(u/Math.PI)))),a=Math.max(a,3);let l=u/a,c=s;l*=o?-1:1;for(let h=0;h<a+1;h++){let f=Math.cos(c),d=Math.sin(c),m=t+f*i,g=e+d*i;r.push(m,g),c+=l}}var Fh=p(()=>{"use strict"});function y0(r,t,e,i,s,n){let o=r[r.length-2],u=r[r.length-1]-e,l=o-t,c=s-e,h=i-t,f=Math.abs(u*h-l*c);if(f<1e-8||n===0){(r[r.length-2]!==t||r[r.length-1]!==e)&&r.push(t,e);return}let d=u*u+l*l,m=c*c+h*h,g=u*c+l*h,x=n*Math.sqrt(d)/f,_=n*Math.sqrt(m)/f,v=x*g/d,T=_*g/m,y=x*h+_*l,A=x*c+_*u,S=l*(_+v),E=u*(_+v),B=h*(x+T),U=c*(x+T),P=Math.atan2(E-A,S-y),F=Math.atan2(U-A,B-y);ou(r,y+t,A+e,n,P,F,l*c>h*u)}var b0=p(()=>{Fh()});function cD(r,t){let e=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),i=t===1.5707963267948966?.551915024494:e,s=Math.cos(r),n=Math.sin(r),o=Math.cos(r+t),a=Math.sin(r+t);return[{x:s-n*i,y:n+s*i},{x:o+a*i,y:a-o*i},{x:o,y:a}]}function T0(r,t,e,i,s,n,o,a=0,u=0,l=0){if(n===0||o===0)return;let c=Math.sin(a*mn/360),h=Math.cos(a*mn/360),f=h*(t-i)/2+c*(e-s)/2,d=-c*(t-i)/2+h*(e-s)/2;if(f===0&&d===0)return;n=Math.abs(n),o=Math.abs(o);let m=Math.pow(f,2)/Math.pow(n,2)+Math.pow(d,2)/Math.pow(o,2);m>1&&(n*=Math.sqrt(m),o*=Math.sqrt(m)),hD(t,e,i,s,n,o,u,l,c,h,f,d,Rh);let{ang1:g,ang2:x}=Rh,{centerX:_,centerY:v}=Rh,T=Math.abs(x)/(mn/4);Math.abs(1-T)<1e-7&&(T=1);let y=Math.max(Math.ceil(T),1);x/=y;let A=r[r.length-2],S=r[r.length-1],E={x:0,y:0};for(let B=0;B<y;B++){let U=cD(g,x),{x:P,y:F}=kh(U[0],n,o,h,c,_,v,E),{x:N,y:q}=kh(U[1],n,o,h,c,_,v,E),{x:w,y:H}=kh(U[2],n,o,h,c,_,v,E);nu(r,A,S,P,F,N,q,w,H),A=w,S=H,g+=x}}var mn,Rh,kh,v0,hD,S0=p(()=>{Bh();mn=Math.PI*2,Rh={centerX:0,centerY:0,ang1:0,ang2:0},kh=({x:r,y:t},e,i,s,n,o,a,u)=>{r*=e,t*=i;let l=s*r-n*t,c=n*r+s*t;return u.x=l+o,u.y=c+a,u};v0=(r,t,e,i)=>{let s=r*i-t*e<0?-1:1,n=r*e+t*i;return n>1&&(n=1),n<-1&&(n=-1),s*Math.acos(n)},hD=(r,t,e,i,s,n,o,a,u,l,c,h,f)=>{let d=Math.pow(s,2),m=Math.pow(n,2),g=Math.pow(c,2),x=Math.pow(h,2),_=d*m-d*x-m*g;_<0&&(_=0),_/=d*x+m*g,_=Math.sqrt(_)*(o===a?-1:1);let v=_*s/n*h,T=_*-n/s*c,y=l*v-u*T+(r+e)/2,A=u*v+l*T+(t+i)/2,S=(c-v)/s,E=(h-T)/n,B=(-c-v)/s,U=(-h-T)/n,P=v0(1,0,S,E),F=v0(S,E,B,U);a===0&&F>0&&(F-=mn),a===1&&F<0&&(F+=mn),f.centerX=y,f.centerY=A,f.ang1=P,f.ang2=F}});function w0(r,t,e){let i=(o,a)=>{let u=a.x-o.x,l=a.y-o.y,c=Math.sqrt(u*u+l*l),h=u/c,f=l/c;return{len:c,nx:h,ny:f}},s=(o,a)=>{o===0?r.moveTo(a.x,a.y):r.lineTo(a.x,a.y)},n=t[t.length-1];for(let o=0;o<t.length;o++){let a=t[o%t.length],u=a.radius??e;if(u<=0){s(o,a),n=a;continue}let l=t[(o+1)%t.length],c=i(a,n),h=i(a,l);if(c.len<1e-4||h.len<1e-4){s(o,a),n=a;continue}let f=Math.asin(c.nx*h.ny-c.ny*h.nx),d=1,m=!1;c.nx*h.nx-c.ny*-h.ny<0?f<0?f=Math.PI+f:(f=Math.PI-f,d=-1,m=!0):f>0&&(d=-1,m=!0);let g=f/2,x,_=Math.abs(Math.cos(g)*u/Math.sin(g));_>Math.min(c.len/2,h.len/2)?(_=Math.min(c.len/2,h.len/2),x=Math.abs(_*Math.sin(g)/Math.cos(g))):x=u;let v=a.x+h.nx*_+-h.ny*x*d,T=a.y+h.ny*_+h.nx*x*d,y=Math.atan2(c.ny,c.nx)+Math.PI/2*d,A=Math.atan2(h.ny,h.nx)-Math.PI/2*d;o===0&&r.moveTo(v+Math.cos(y)*x,T+Math.sin(y)*x),r.arc(v,T,x,y,A,m),n=a}}function E0(r,t,e,i){let s=(a,u)=>Math.sqrt((a.x-u.x)**2+(a.y-u.y)**2),n=(a,u,l)=>({x:a.x+(u.x-a.x)*l,y:a.y+(u.y-a.y)*l}),o=t.length;for(let a=0;a<o;a++){let u=t[(a+1)%o],l=u.radius??e;if(l<=0){a===0?r.moveTo(u.x,u.y):r.lineTo(u.x,u.y);continue}let c=t[a],h=t[(a+2)%o],f=s(c,u),d;if(f<1e-4)d=u;else{let x=Math.min(f/2,l);d=n(u,c,x/f)}let m=s(h,u),g;if(m<1e-4)g=u;else{let x=Math.min(m/2,l);g=n(u,h,x/m)}a===0?r.moveTo(d.x,d.y):r.lineTo(d.x,d.y),r.quadraticCurveTo(u.x,u.y,g.x,g.y,i)}}var C0=p(()=>{"use strict"});var fD,au,A0=p(()=>{Ah();h0();p0();Wt();m0();ne();Bh();_0();Fh();b0();S0();C0();fD=new tt,au=class{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new lt,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,e){return this.startPoly(t,e),this}lineTo(t,e){this._ensurePoly();let i=this._currentPoly.points,s=i[i.length-2],n=i[i.length-1];return(s!==t||n!==e)&&i.push(t,e),this}arc(t,e,i,s,n,o){this._ensurePoly(!1);let a=this._currentPoly.points;return ou(a,t,e,i,s,n,o),this}arcTo(t,e,i,s,n){this._ensurePoly();let o=this._currentPoly.points;return y0(o,t,e,i,s,n),this}arcToSvg(t,e,i,s,n,o,a){let u=this._currentPoly.points;return T0(u,this._currentPoly.lastX,this._currentPoly.lastY,o,a,t,e,i,s,n),this}bezierCurveTo(t,e,i,s,n,o,a){this._ensurePoly();let u=this._currentPoly;return nu(this._currentPoly.points,u.lastX,u.lastY,t,e,i,s,n,o,a),this}quadraticCurveTo(t,e,i,s,n){this._ensurePoly();let o=this._currentPoly;return x0(this._currentPoly.points,o.lastX,o.lastY,t,e,i,s,n),this}closePath(){return this.endPoly(!0),this}addPath(t,e){this.endPoly(),e&&!e.isIdentity()&&(t=t.clone(!0),t.transform(e));let i=this.shapePrimitives,s=i.length;for(let n=0;n<t.instructions.length;n++){let o=t.instructions[n];this[o.action](...o.data)}if(t.checkForHoles&&i.length-s>1){let n=null;for(let o=s;o<i.length;o++){let a=i[o];if(a.shape.type==="polygon"){let u=a.shape,l=n?.shape;l&&l.containsPolygon(u)?(n.holes||(n.holes=[]),n.holes.push(a),i.copyWithin(o,o+1),i.length--,o--):n=a}}}return this}finish(t=!1){this.endPoly(t)}rect(t,e,i,s,n){return this.drawShape(new tt(t,e,i,s),n),this}circle(t,e,i,s){return this.drawShape(new ai(t,e,i),s),this}poly(t,e,i){let s=new Wi(t);return s.closePath=e,this.drawShape(s,i),this}regularPoly(t,e,i,s,n=0,o){s=Math.max(s|0,3);let a=-1*Math.PI/2+n,u=Math.PI*2/s,l=[];for(let c=0;c<s;c++){let h=a-c*u;l.push(t+i*Math.cos(h),e+i*Math.sin(h))}return this.poly(l,!0,o),this}roundPoly(t,e,i,s,n,o=0,a){if(s=Math.max(s|0,3),n<=0)return this.regularPoly(t,e,i,s,o);let u=i*Math.sin(Math.PI/s)-.001;n=Math.min(n,u);let l=-1*Math.PI/2+o,c=Math.PI*2/s,h=(s-2)*Math.PI/s/2;for(let f=0;f<s;f++){let d=f*c+l,m=t+i*Math.cos(d),g=e+i*Math.sin(d),x=d+Math.PI+h,_=d-Math.PI-h,v=m+n*Math.cos(x),T=g+n*Math.sin(x),y=m+n*Math.cos(_),A=g+n*Math.sin(_);f===0?this.moveTo(v,T):this.lineTo(v,T),this.quadraticCurveTo(m,g,y,A,a)}return this.closePath()}roundShape(t,e,i=!1,s){return t.length<3?this:(i?E0(this,t,e,s):w0(this,t,e),this.closePath())}filletRect(t,e,i,s,n){if(n===0)return this.rect(t,e,i,s);let o=Math.min(i,s)/2,a=Math.min(o,Math.max(-o,n)),u=t+i,l=e+s,c=a<0?-a:0,h=Math.abs(a);return this.moveTo(t,e+h).arcTo(t+c,e+c,t+h,e,h).lineTo(u-h,e).arcTo(u-c,e+c,u,e+h,h).lineTo(u,l-h).arcTo(u-c,l-c,t+i-h,l,h).lineTo(t+h,l).arcTo(t+c,l-c,t,l-h,h).closePath()}chamferRect(t,e,i,s,n,o){if(n<=0)return this.rect(t,e,i,s);let a=Math.min(n,Math.min(i,s)/2),u=t+i,l=e+s,c=[t+a,e,u-a,e,u,e+a,u,l-a,u-a,l,t+a,l,t,l-a,t,e+a];for(let h=c.length-1;h>=2;h-=2)c[h]===c[h-2]&&c[h-1]===c[h-3]&&c.splice(h-1,2);return this.poly(c,!0,o)}ellipse(t,e,i,s,n){return this.drawShape(new eu(t,e,i,s),n),this}roundRect(t,e,i,s,n,o){return this.drawShape(new iu(t,e,i,s,n),o),this}drawShape(t,e){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:e}),this}startPoly(t,e){let i=this._currentPoly;return i&&this.endPoly(),i=new Wi,i.points.push(t,e),this._currentPoly=i,this}endPoly(t=!1){let e=this._currentPoly;return e&&e.points.length>2&&(e.closePath=t,this.shapePrimitives.push({shape:e})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Wi,t)){let e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let i=e.shape.x,s=e.shape.y;if(e.transform&&!e.transform.isIdentity()){let n=e.transform,o=i;i=n.a*i+n.c*s+n.tx,s=n.b*o+n.d*s+n.ty}this._currentPoly.points.push(i,s)}else this._currentPoly.points.push(0,0)}}buildPath(){let t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let e=0;e<t.instructions.length;e++){let i=t.instructions[e];this[i.action](...i.data)}this.finish()}get bounds(){let t=this._bounds;t.clear();let e=this.shapePrimitives;for(let i=0;i<e.length;i++){let s=e[i],n=s.shape.getBounds(fD);s.transform?t.addRect(n,s.transform):t.addRect(n)}return t}}});function gn(r,t){return r?r.prepend(t):t.clone()}var Fr,Gh=p(()=>{_e();zt();mt();c0();A0();Fr=class r{constructor(t,e=!1){this.instructions=[],this.uid=et("graphicsPath"),this._dirty=!0,this.checkForHoles=e,typeof t=="string"?l0(t,this):this.instructions=t?.slice()??[]}get shapePath(){return this._shapePath||(this._shapePath=new au(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,e){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,e]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,e,i,s,n){let o=this.instructions[this.instructions.length-1],a=this.getLastPoint(it.shared),u=0,l=0;if(!o||o.action!=="bezierCurveTo")u=a.x,l=a.y;else{u=o.data[2],l=o.data[3];let c=a.x,h=a.y;u=c+(c-u),l=h+(h-l)}return this.instructions.push({action:"bezierCurveTo",data:[u,l,t,e,i,s,n]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,e,i){let s=this.instructions[this.instructions.length-1],n=this.getLastPoint(it.shared),o=0,a=0;if(!s||s.action!=="quadraticCurveTo")o=n.x,a=n.y;else{o=s.data[0],a=s.data[1];let u=n.x,l=n.y;o=u+(u-o),a=l+(l-a)}return this.instructions.push({action:"quadraticCurveTo",data:[o,a,t,e,i]}),this._dirty=!0,this}rect(t,e,i,s,n){return this.instructions.push({action:"rect",data:[t,e,i,s,n]}),this._dirty=!0,this}circle(t,e,i,s){return this.instructions.push({action:"circle",data:[t,e,i,s]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,e,i,s,n,o,a){n||(n=s/2);let u=-1*Math.PI/2+o,l=i*2,c=Math.PI*2/l,h=[];for(let f=0;f<l;f++){let d=f%2?n:s,m=f*c+u;h.push(t+d*Math.cos(m),e+d*Math.sin(m))}return this.poly(h,!0,a),this}clone(t=!1){let e=new r;if(e.checkForHoles=this.checkForHoles,!t)e.instructions=this.instructions.slice();else for(let i=0;i<this.instructions.length;i++){let s=this.instructions[i];e.instructions.push({action:s.action,data:s.data.slice()})}return e}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;let e=t.a,i=t.b,s=t.c,n=t.d,o=t.tx,a=t.ty,u=0,l=0,c=0,h=0,f=0,d=0,m=0,g=0;for(let x=0;x<this.instructions.length;x++){let _=this.instructions[x],v=_.data;switch(_.action){case"moveTo":case"lineTo":u=v[0],l=v[1],v[0]=e*u+s*l+o,v[1]=i*u+n*l+a;break;case"bezierCurveTo":c=v[0],h=v[1],f=v[2],d=v[3],u=v[4],l=v[5],v[0]=e*c+s*h+o,v[1]=i*c+n*h+a,v[2]=e*f+s*d+o,v[3]=i*f+n*d+a,v[4]=e*u+s*l+o,v[5]=i*u+n*l+a;break;case"quadraticCurveTo":c=v[0],h=v[1],u=v[2],l=v[3],v[0]=e*c+s*h+o,v[1]=i*c+n*h+a,v[2]=e*u+s*l+o,v[3]=i*u+n*l+a;break;case"arcToSvg":u=v[5],l=v[6],m=v[0],g=v[1],v[0]=e*m+s*g,v[1]=i*m+n*g,v[5]=e*u+s*l+o,v[6]=i*u+n*l+a;break;case"circle":v[4]=gn(v[3],t);break;case"rect":v[4]=gn(v[4],t);break;case"ellipse":v[8]=gn(v[8],t);break;case"roundRect":v[5]=gn(v[5],t);break;case"addPath":v[0].transform(t);break;case"poly":v[2]=gn(v[2],t);break;default:z("unknown transform action",_.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let e=this.instructions.length-1,i=this.instructions[e];if(!i)return t.x=0,t.y=0,t;for(;i.action==="closePath";){if(e--,e<0)return t.x=0,t.y=0,t;i=this.instructions[e]}switch(i.action){case"moveTo":case"lineTo":t.x=i.data[0],t.y=i.data[1];break;case"quadraticCurveTo":t.x=i.data[2],t.y=i.data[3];break;case"bezierCurveTo":t.x=i.data[4],t.y=i.data[5];break;case"arc":case"arcToSvg":t.x=i.data[5],t.y=i.data[6];break;case"addPath":i.data[0].getLastPoint(t);break}return t}}});function xt(r,t,e){let i=r.getAttribute(t);return i?Number(i):e}var Ih=p(()=>{"use strict"});function D0(r,t){let e=r.querySelectorAll("defs");for(let i=0;i<e.length;i++){let s=e[i];for(let n=0;n<s.children.length;n++){let o=s.children[n];switch(o.nodeName.toLowerCase()){case"lineargradient":t.defs[o.id]=dD(o);break;case"radialgradient":t.defs[o.id]=pD(o);break;default:break}}}}function dD(r){let t=xt(r,"x1",0),e=xt(r,"y1",0),i=xt(r,"x2",1),s=xt(r,"y2",0),n=r.getAttribute("gradientUnits")||"objectBoundingBox",o=new Se(t,e,i,s,n==="objectBoundingBox"?"local":"global");for(let a=0;a<r.children.length;a++){let u=r.children[a],l=xt(u,"offset",0),c=Z.shared.setValue(u.getAttribute("stop-color")).toNumber();o.addColorStop(l,c)}return o}function pD(r){return z("[SVG Parser] Radial gradients are not yet supported"),new Se(0,0,1,0)}var P0=p(()=>{Nt();mt();pn();Ih()});function Uh(r){let t=r.match(/url\\s*\\(\\s*['"]?\\s*#([^'"\\s)]+)\\s*['"]?\\s*\\)/i);return t?t[1]:""}var B0=p(()=>{"use strict"});function Oh(r,t){let e=r.getAttribute("style"),i={},s={},n={strokeStyle:i,fillStyle:s,useFill:!1,useStroke:!1};for(let o in M0){let a=r.getAttribute(o);a&&F0(t,n,o,a.trim())}if(e){let o=e.split(";");for(let a=0;a<o.length;a++){let u=o[a].trim(),[l,c]=u.split(":");M0[l]&&F0(t,n,l,c.trim())}}return{strokeStyle:n.useStroke?i:null,fillStyle:n.useFill?s:null,useFill:n.useFill,useStroke:n.useStroke}}function F0(r,t,e,i){switch(e){case"stroke":if(i!=="none"){if(i.startsWith("url(")){let s=Uh(i);t.strokeStyle.fill=r.defs[s]}else t.strokeStyle.color=Z.shared.setValue(i).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(i);break;case"fill":if(i!=="none"){if(i.startsWith("url(")){let s=Uh(i);t.fillStyle.fill=r.defs[s]}else t.fillStyle.color=Z.shared.setValue(i).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(i);break;case"stroke-opacity":t.strokeStyle.alpha=Number(i);break;case"opacity":t.fillStyle.alpha=Number(i),t.strokeStyle.alpha=Number(i);break}}var M0,R0=p(()=>{Nt();B0();M0={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}}});function k0(r,t){if(typeof r=="string"){let o=document.createElement("div");o.innerHTML=r.trim(),r=o.querySelector("svg")}let e={context:t,defs:{},path:new Fr};D0(r,e);let i=r.children,{fillStyle:s,strokeStyle:n}=Oh(r,e);for(let o=0;o<i.length;o++){let a=i[o];a.nodeName.toLowerCase()!=="defs"&&G0(a,e,s,n)}return t}function G0(r,t,e,i){let s=r.children,{fillStyle:n,strokeStyle:o}=Oh(r,t);n&&e?e={...e,...n}:n&&(e=n),o&&i?i={...i,...o}:o&&(i=o);let a=!e&&!i;a&&(e={color:0});let u,l,c,h,f,d,m,g,x,_,v,T,y,A,S,E,B;switch(r.nodeName.toLowerCase()){case"path":A=r.getAttribute("d"),r.getAttribute("fill-rule")==="evenodd"&&z("SVG Evenodd fill rule not supported, your svg may render incorrectly"),S=new Fr(A,!0),t.context.path(S),e&&t.context.fill(e),i&&t.context.stroke(i);break;case"circle":m=xt(r,"cx",0),g=xt(r,"cy",0),x=xt(r,"r",0),t.context.ellipse(m,g,x,x),e&&t.context.fill(e),i&&t.context.stroke(i);break;case"rect":u=xt(r,"x",0),l=xt(r,"y",0),E=xt(r,"width",0),B=xt(r,"height",0),_=xt(r,"rx",0),v=xt(r,"ry",0),_||v?t.context.roundRect(u,l,E,B,_||v):t.context.rect(u,l,E,B),e&&t.context.fill(e),i&&t.context.stroke(i);break;case"ellipse":m=xt(r,"cx",0),g=xt(r,"cy",0),_=xt(r,"rx",0),v=xt(r,"ry",0),t.context.beginPath(),t.context.ellipse(m,g,_,v),e&&t.context.fill(e),i&&t.context.stroke(i);break;case"line":c=xt(r,"x1",0),h=xt(r,"y1",0),f=xt(r,"x2",0),d=xt(r,"y2",0),t.context.beginPath(),t.context.moveTo(c,h),t.context.lineTo(f,d),i&&t.context.stroke(i);break;case"polygon":y=r.getAttribute("points"),T=y.match(/\\d+/g).map(U=>parseInt(U,10)),t.context.poly(T,!0),e&&t.context.fill(e),i&&t.context.stroke(i);break;case"polyline":y=r.getAttribute("points"),T=y.match(/\\d+/g).map(U=>parseInt(U,10)),t.context.poly(T,!1),i&&t.context.stroke(i);break;case"g":case"svg":break;default:{z(\`[SVG parser] <\${r.nodeName}> elements unsupported\`);break}}a&&(e=null);for(let U=0;U<s.length;U++)G0(s[U],t,e,i)}var I0=p(()=>{mt();Gh();P0();Ih();R0()});function mD(r){return Z.isColorLike(r)}function U0(r){return r instanceof dr}function O0(r){return r instanceof Se}function gD(r){return r instanceof I}function xD(r,t,e){let i=Z.shared.setValue(t??0);return r.color=i.toNumber(),r.alpha=i.alpha===1?e.alpha:i.alpha,r.texture=I.WHITE,{...e,...r}}function _D(r,t,e){return r.texture=t,{...e,...r}}function L0(r,t,e){return r.fill=t,r.color=16777215,r.texture=t.texture,r.matrix=t.transform,{...e,...r}}function N0(r,t,e){return t.buildGradient(),r.fill=t,r.color=16777215,r.texture=t.texture,r.matrix=t.transform,r.textureSpace=t.textureSpace,{...e,...r}}function yD(r,t){let e={...t,...r},i=Z.shared.setValue(e.color);return e.alpha*=i.alpha,e.color=i.toNumber(),e}function pr(r,t){if(r==null)return null;let e={},i=r;return mD(r)?xD(e,r,t):gD(r)?_D(e,r,t):U0(r)?L0(e,r,t):O0(r)?N0(e,r,t):i.fill&&U0(i.fill)?L0(i,i.fill,t):i.fill&&O0(i.fill)?N0(i,i.fill,t):yD(i,t)}function Xi(r,t){let{width:e,alignment:i,miterLimit:s,cap:n,join:o,pixelLine:a,...u}=t,l=pr(r,u);return l?{width:e,alignment:i,miterLimit:s,cap:n,join:o,pixelLine:a,...l}:null}var Lh=p(()=>{Nt();ft();pn();tu()});var bD,H0,Nh,de,Hh=p(()=>{jt();Nt();nt();_e();ft();zt();yt();ne();Gh();I0();Lh();bD=new it,H0=new G,Nh=class Ze extends ht{constructor(){super(...arguments),this.uid=et("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this._activePath=new Fr,this._transform=new G,this._fillStyle={...Ze.defaultFillStyle},this._strokeStyle={...Ze.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new lt,this._boundsDirty=!0}clone(){let t=new Ze;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=pr(t,Ze.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=Xi(t,Ze.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=pr(t,Ze.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=pr(t,Ze.defaultStrokeStyle),this}texture(t,e,i,s,n,o){return this.instructions.push({action:"texture",data:{image:t,dx:i||0,dy:s||0,dw:n||t.frame.width,dh:o||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:e?Z.shared.setValue(e).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new Fr,this}fill(t,e){let i,s=this.instructions[this.instructions.length-1];return this._tick===0&&s&&s.action==="stroke"?i=s.data.path:i=this._activePath.clone(),i?(t!=null&&(e!==void 0&&typeof t=="number"&&(W($,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:e}),this._fillStyle=pr(t,Ze.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:i}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){let{x:t,y:e}=this._activePath.getLastPoint(it.shared);this._activePath.clear(),this._activePath.moveTo(t,e)}stroke(t){let e,i=this.instructions[this.instructions.length-1];return this._tick===0&&i&&i.action==="fill"?e=i.data.path:e=this._activePath.clone(),e?(t!=null&&(this._strokeStyle=Xi(t,Ze.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:e}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){let e=this.instructions[this.instructions.length-1-t],i=this._activePath.clone();if(e&&(e.action==="stroke"||e.action==="fill"))if(e.data.hole)e.data.hole.addPath(i);else{e.data.hole=i;break}}return this._initNextPathLocation(),this}arc(t,e,i,s,n,o){this._tick++;let a=this._transform;return this._activePath.arc(a.a*t+a.c*e+a.tx,a.b*t+a.d*e+a.ty,i,s,n,o),this}arcTo(t,e,i,s,n){this._tick++;let o=this._transform;return this._activePath.arcTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*i+o.c*s+o.tx,o.b*i+o.d*s+o.ty,n),this}arcToSvg(t,e,i,s,n,o,a){this._tick++;let u=this._transform;return this._activePath.arcToSvg(t,e,i,s,n,u.a*o+u.c*a+u.tx,u.b*o+u.d*a+u.ty),this}bezierCurveTo(t,e,i,s,n,o,a){this._tick++;let u=this._transform;return this._activePath.bezierCurveTo(u.a*t+u.c*e+u.tx,u.b*t+u.d*e+u.ty,u.a*i+u.c*s+u.tx,u.b*i+u.d*s+u.ty,u.a*n+u.c*o+u.tx,u.b*n+u.d*o+u.ty,a),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(t,e,i,s){return this._tick++,this._activePath.ellipse(t,e,i,s,this._transform.clone()),this}circle(t,e,i){return this._tick++,this._activePath.circle(t,e,i,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,e){this._tick++;let i=this._transform;return this._activePath.lineTo(i.a*t+i.c*e+i.tx,i.b*t+i.d*e+i.ty),this}moveTo(t,e){this._tick++;let i=this._transform,s=this._activePath.instructions,n=i.a*t+i.c*e+i.tx,o=i.b*t+i.d*e+i.ty;return s.length===1&&s[0].action==="moveTo"?(s[0].data[0]=n,s[0].data[1]=o,this):(this._activePath.moveTo(n,o),this)}quadraticCurveTo(t,e,i,s,n){this._tick++;let o=this._transform;return this._activePath.quadraticCurveTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*i+o.c*s+o.tx,o.b*i+o.d*s+o.ty,n),this}rect(t,e,i,s){return this._tick++,this._activePath.rect(t,e,i,s,this._transform.clone()),this}roundRect(t,e,i,s,n){return this._tick++,this._activePath.roundRect(t,e,i,s,n,this._transform.clone()),this}poly(t,e){return this._tick++,this._activePath.poly(t,e,this._transform.clone()),this}regularPoly(t,e,i,s,n=0,o){return this._tick++,this._activePath.regularPoly(t,e,i,s,n,o),this}roundPoly(t,e,i,s,n,o){return this._tick++,this._activePath.roundPoly(t,e,i,s,n,o),this}roundShape(t,e,i,s){return this._tick++,this._activePath.roundShape(t,e,i,s),this}filletRect(t,e,i,s,n){return this._tick++,this._activePath.filletRect(t,e,i,s,n),this}chamferRect(t,e,i,s,n,o){return this._tick++,this._activePath.chamferRect(t,e,i,s,n,o),this}star(t,e,i,s,n=0,o=0){return this._tick++,this._activePath.star(t,e,i,s,n,o,this._transform.clone()),this}svg(t){return this._tick++,k0(t,this),this}restore(){let t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,e=t){return this._transform.scale(t,e),this}setTransform(t,e,i,s,n,o){return t instanceof G?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,e,i,s,n,o),this)}transform(t,e,i,s,n,o){return t instanceof G?(this._transform.append(t),this):(H0.set(t,e,i,s,n,o),this._transform.append(H0),this)}translate(t,e=t){return this._transform.translate(t,e),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this.dirty||(this.emit("update",this,16),this.dirty=!0,this._boundsDirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;let t=this._bounds;t.clear();for(let e=0;e<this.instructions.length;e++){let i=this.instructions[e],s=i.action;if(s==="fill"){let n=i.data;t.addBounds(n.path.bounds)}else if(s==="texture"){let n=i.data;t.addFrame(n.dx,n.dy,n.dx+n.dw,n.dy+n.dh,n.transform)}if(s==="stroke"){let n=i.data,o=n.style.alignment,a=n.style.width*(1-o),u=n.path.bounds;t.addFrame(u.minX-a,u.minY-a,u.maxX+a,u.maxY+a)}}return t}containsPoint(t){if(!this.bounds.containsPoint(t.x,t.y))return!1;let e=this.instructions,i=!1;for(let s=0;s<e.length;s++){let n=e[s],o=n.data,a=o.path;if(!n.action||!a)continue;let u=o.style,l=a.shapePath.shapePrimitives;for(let c=0;c<l.length;c++){let h=l[c].shape;if(!u||!h)continue;let f=l[c].transform,d=f?f.applyInverse(t,bD):t;if(n.action==="fill")i=h.contains(d.x,d.y);else{let g=u;i=h.strokeContains(d.x,d.y,g.width,g.alignment)}let m=o.hole;if(m){let g=m.shapePath?.shapePrimitives;if(g)for(let x=0;x<g.length;x++)g[x].shape.contains(d.x,d.y)&&(i=!1)}if(i)return!0}}return i}destroy(t=!1){if(this._stateStack.length=0,this._transform=null,this.emit("destroy",this),this.removeAllListeners(),typeof t=="boolean"?t:t?.texture){let i=typeof t=="boolean"?t:t?.textureSource;this._fillStyle.texture&&this._fillStyle.texture.destroy(i),this._strokeStyle.texture&&this._strokeStyle.texture.destroy(i)}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Nh.defaultFillStyle={color:16777215,alpha:1,texture:I.WHITE,matrix:null,fill:null,textureSpace:"local"};Nh.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:I.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};de=Nh});function uu(r){let t=[],e=0;for(let i=0;i<z0.length;i++){let s=\`_\${z0[i]}\`;t[e++]=r[s]}return e=W0(r._fill,t,e),e=vD(r._stroke,t,e),e=TD(r.dropShadow,t,e),t.join("-")}function W0(r,t,e){return r&&(t[e++]=r.color,t[e++]=r.alpha,t[e++]=r.fill?.styleKey),e}function vD(r,t,e){return r&&(e=W0(r,t,e),t[e++]=r.width,t[e++]=r.alignment,t[e++]=r.cap,t[e++]=r.join,t[e++]=r.miterLimit),e}function TD(r,t,e){return r&&(t[e++]=r.alpha,t[e++]=r.angle,t[e++]=r.blur,t[e++]=r.distance,t[e++]=Z.shared.setValue(r.color).toNumber()),e}var z0,zh=p(()=>{Nt();z0=["align","breakWords","cssOverrides","fontVariant","fontWeight","leading","letterSpacing","lineHeight","padding","textBaseline","trim","whiteSpace","wordWrap","wordWrapWidth","fontFamily","fontStyle","fontSize"]});function SD(r){let t=r;if(typeof t.dropShadow=="boolean"&&t.dropShadow){let e=ce.defaultDropShadow;r.dropShadow={alpha:t.dropShadowAlpha??e.alpha,angle:t.dropShadowAngle??e.angle,blur:t.dropShadowBlur??e.blur,color:t.dropShadowColor??e.color,distance:t.dropShadowDistance??e.distance}}if(t.strokeThickness!==void 0){W($,"strokeThickness is now a part of stroke");let e=t.stroke,i={};if(Z.isColorLike(e))i.color=e;else if(e instanceof Se||e instanceof dr)i.fill=e;else if(Object.hasOwnProperty.call(e,"color")||Object.hasOwnProperty.call(e,"fill"))i=e;else throw new Error("Invalid stroke value.");r.stroke={...i,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){W($,"gradient fill is now a fill pattern: \`new FillGradient(...)\`");let e;r.fontSize==null?r.fontSize=ce.defaultTextStyle.fontSize:typeof r.fontSize=="string"?e=parseInt(r.fontSize,10):e=r.fontSize;let i=new Se({start:{x:0,y:0},end:{x:0,y:(e||0)*1.7}}),s=t.fillGradientStops.map(n=>Z.shared.setValue(n).toNumber());s.forEach((n,o)=>{let a=o/(s.length-1);i.addColorStop(a,n)}),r.fill={fill:i}}}var Wh,ce,ji=p(()=>{jt();Nt();yt();pn();tu();Hh();Lh();zh();Wh=class $i extends ht{constructor(t={}){super(),SD(t);let e={...$i.defaultTextStyle,...t};for(let i in e){let s=i;this[s]=e[i]}this.update()}get align(){return this._align}set align(t){this._align=t,this.update()}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords=t,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(t){t!==null&&typeof t=="object"?this._dropShadow=this._createProxy({...$i.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...$i.defaultDropShadow}):null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily=t,this.update()}get fontSize(){return this._fontSize}set fontSize(t){typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle=t.toLowerCase(),this.update()}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant=t,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight=t,this.update()}get leading(){return this._leading}set leading(t){this._leading=t,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing=t,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight=t,this.update()}get padding(){return this._padding}set padding(t){this._padding=t,this.update()}get trim(){return this._trim}set trim(t){this._trim=t,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline=t,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace=t,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap=t,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth=t,this.update()}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...de.defaultFillStyle,...t},()=>{this._fill=pr({...this._originalFill},de.defaultFillStyle)})),this._fill=pr(t===0?"black":t,de.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...de.defaultStrokeStyle,...t},()=>{this._stroke=Xi({...this._originalStroke},de.defaultStrokeStyle)})),this._stroke=Xi(t,de.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=uu(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){let t=$i.defaultTextStyle;for(let e in t)this[e]=t[e]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new $i({align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(t=!1){if(this.removeAllListeners(),typeof t=="boolean"?t:t?.texture){let i=typeof t=="boolean"?t:t?.textureSource;this._fill?.texture&&this._fill.texture.destroy(i),this._originalFill?.texture&&this._originalFill.texture.destroy(i),this._stroke?.texture&&this._stroke.texture.destroy(i),this._originalStroke?.texture&&this._originalStroke.texture.destroy(i)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,e){return new Proxy(t,{set:(i,s,n)=>(i[s]=n,e?.(s,n),this.update(),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Z.isColorLike(t)||t instanceof Se||t instanceof dr)}};Wh.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Wh.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};ce=Wh});function lu(r,t,e,i){let s=wD;s.minX=0,s.minY=0,s.maxX=r.width/i|0,s.maxY=r.height/i|0;let n=bt.getOptimalTexture(s.width,s.height,i,!1);return n.source.uploadMethodId="image",n.source.resource=r,n.source.alphaMode="premultiply-alpha-on-upload",n.frame.width=t/i,n.frame.height=e/i,n.source.emit("update",n.source),n.updateUvs(),n}var wD,Vh=p(()=>{vr();ne();wD=new lt});function li(r){let t=typeof r.fontSize=="number"?\`\${r.fontSize}px\`:r.fontSize,e=r.fontFamily;Array.isArray(r.fontFamily)||(e=r.fontFamily.split(","));for(let i=e.length-1;i>=0;i--){let s=e[i].trim();!/([\\"\\'])[^\\'\\"]+\\1/.test(s)&&!ED.includes(s)&&(s=\`"\${s}"\`),e[i]=s}return\`\${r.fontStyle} \${r.fontVariant} \${r.fontWeight} \${t} \${e.join(",")}\`}var ED,cu=p(()=>{"use strict";ED=["serif","sans-serif","monospace","cursive","fantasy","system-ui"]});var Xh,Ie,we,hu=p(()=>{Pt();cu();Xh={willReadFrequently:!0},Ie=class V{static get experimentalLetterSpacingSupported(){let t=V._experimentalLetterSpacingSupported;if(t!==void 0){let e=Q.get().getCanvasRenderingContext2D().prototype;t=V._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return t}constructor(t,e,i,s,n,o,a,u,l){this.text=t,this.style=e,this.width=i,this.height=s,this.lines=n,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=u,this.fontProperties=l}static measureText(t=" ",e,i=V._canvas,s=e.wordWrap){let n=\`\${t}:\${e.styleKey}\`;if(V._measurementCache[n])return V._measurementCache[n];let o=li(e),a=V.measureFont(o);a.fontSize===0&&(a.fontSize=e.fontSize,a.ascent=e.fontSize);let u=V.__context;u.font=o;let c=(s?V._wordWrap(t,e,i):t).split(/(?:\\r\\n|\\r|\\n)/),h=new Array(c.length),f=0;for(let v=0;v<c.length;v++){let T=V._measureText(c[v],e.letterSpacing,u);h[v]=T,f=Math.max(f,T)}let d=e._stroke?.width||0,m=f+d;e.dropShadow&&(m+=e.dropShadow.distance);let g=e.lineHeight||a.fontSize,x=Math.max(g,a.fontSize+d)+(c.length-1)*(g+e.leading);return e.dropShadow&&(x+=e.dropShadow.distance),new V(t,e,m,x,c,h,g+e.leading,f,a)}static _measureText(t,e,i){let s=!1;V.experimentalLetterSpacingSupported&&(V.experimentalLetterSpacing?(i.letterSpacing=\`\${e}px\`,i.textLetterSpacing=\`\${e}px\`,s=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let n=i.measureText(t),o=n.width,a=-n.actualBoundingBoxLeft,l=n.actualBoundingBoxRight-a;if(o>0)if(s)o-=e,l-=e;else{let c=(V.graphemeSegmenter(t).length-1)*e;o+=c,l+=c}return Math.max(o,l)}static _wordWrap(t,e,i=V._canvas){let s=i.getContext("2d",Xh),n=0,o="",a="",u=Object.create(null),{letterSpacing:l,whiteSpace:c}=e,h=V._collapseSpaces(c),f=V._collapseNewlines(c),d=!h,m=e.wordWrapWidth+l,g=V._tokenize(t);for(let x=0;x<g.length;x++){let _=g[x];if(V._isNewline(_)){if(!f){a+=V._addLine(o),d=!h,o="",n=0;continue}_=" "}if(h){let T=V.isBreakingSpace(_),y=V.isBreakingSpace(o[o.length-1]);if(T&&y)continue}let v=V._getFromCache(_,l,u,s);if(v>m)if(o!==""&&(a+=V._addLine(o),o="",n=0),V.canBreakWords(_,e.breakWords)){let T=V.wordWrapSplit(_);for(let y=0;y<T.length;y++){let A=T[y],S=A,E=1;for(;T[y+E];){let U=T[y+E];if(!V.canBreakChars(S,U,_,y,e.breakWords))A+=U;else break;S=U,E++}y+=E-1;let B=V._getFromCache(A,l,u,s);B+n>m&&(a+=V._addLine(o),d=!1,o="",n=0),o+=A,n+=B}}else{o.length>0&&(a+=V._addLine(o),o="",n=0);let T=x===g.length-1;a+=V._addLine(_,!T),d=!1,o="",n=0}else v+n>m&&(d=!1,a+=V._addLine(o),o="",n=0),(o.length>0||!V.isBreakingSpace(_)||d)&&(o+=_,n+=v)}return a+=V._addLine(o,!1),a}static _addLine(t,e=!0){return t=V._trimRight(t),t=e?\`\${t}
|
|
\`:t,t}static _getFromCache(t,e,i,s){let n=i[t];return typeof n!="number"&&(n=V._measureText(t,e,s)+e,i[t]=n),n}static _collapseSpaces(t){return t==="normal"||t==="pre-line"}static _collapseNewlines(t){return t==="normal"}static _trimRight(t){if(typeof t!="string")return"";for(let e=t.length-1;e>=0;e--){let i=t[e];if(!V.isBreakingSpace(i))break;t=t.slice(0,-1)}return t}static _isNewline(t){return typeof t!="string"?!1:V._newlines.includes(t.charCodeAt(0))}static isBreakingSpace(t,e){return typeof t!="string"?!1:V._breakingSpaces.includes(t.charCodeAt(0))}static _tokenize(t){let e=[],i="";if(typeof t!="string")return e;for(let s=0;s<t.length;s++){let n=t[s],o=t[s+1];if(V.isBreakingSpace(n,o)||V._isNewline(n)){i!==""&&(e.push(i),i=""),e.push(n);continue}i+=n}return i!==""&&e.push(i),e}static canBreakWords(t,e){return e}static canBreakChars(t,e,i,s,n){return!0}static wordWrapSplit(t){return V.graphemeSegmenter(t)}static measureFont(t){if(V._fonts[t])return V._fonts[t];let e=V._context;e.font=t;let i=e.measureText(V.METRICS_STRING+V.BASELINE_SYMBOL),s={ascent:i.actualBoundingBoxAscent,descent:i.actualBoundingBoxDescent,fontSize:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent};return V._fonts[t]=s,s}static clearMetrics(t=""){t?delete V._fonts[t]:V._fonts={}}static get _canvas(){if(!V.__canvas){let t;try{let e=new OffscreenCanvas(0,0);if(e.getContext("2d",Xh)?.measureText)return V.__canvas=e,e;t=Q.get().createCanvas()}catch{t=Q.get().createCanvas()}t.width=t.height=10,V.__canvas=t}return V.__canvas}static get _context(){return V.__context||(V.__context=V._canvas.getContext("2d",Xh)),V.__context}};Ie.METRICS_STRING="|\\xC9q\\xC5";Ie.BASELINE_SYMBOL="M";Ie.BASELINE_MULTIPLIER=1.4;Ie.HEIGHT_MULTIPLIER=2;Ie.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){let r=new Intl.Segmenter;return t=>[...r.segment(t)].map(e=>e.segment)}return r=>[...r]})();Ie.experimentalLetterSpacing=!1;Ie._fonts={};Ie._newlines=[10,13];Ie._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];Ie._measurementCache={};we=Ie});function Yi(r,t,e,i=0){if(r.texture===I.WHITE&&!r.fill)return Z.shared.setValue(r.color).setAlpha(r.alpha??1).toHexa();if(r.fill){if(r.fill instanceof dr){let s=r.fill,n=t.createPattern(s.texture.source.resource,"repeat"),o=s.transform.copyTo(G.shared);return o.scale(s.texture.frame.width,s.texture.frame.height),n.setTransform(o),n}else if(r.fill instanceof Se){let s=r.fill,n=s.type==="linear",o=s.textureSpace==="local",a=1,u=1;o&&e&&(a=e.width+i,u=e.height+i);let l,c=!1;if(n){let{start:h,end:f}=s;l=t.createLinearGradient(h.x*a,h.y*u,f.x*a,f.y*u),c=Math.abs(f.x-h.x)<Math.abs((f.y-h.y)*.1)}else{let{center:h,innerRadius:f,outerCenter:d,outerRadius:m}=s;l=t.createRadialGradient(h.x*a,h.y*u,f*a,d.x*a,d.y*u,m*a)}if(c&&o&&e){let h=e.lineHeight/u;for(let f=0;f<e.lines.length;f++){let d=(f*e.lineHeight+i/2)/u;s.colorStops.forEach(m=>{let g=d+m.offset*h;l.addColorStop(Math.floor(g*V0)/V0,Z.shared.setValue(m.color).toHex())})}}else s.colorStops.forEach(h=>{l.addColorStop(h.offset,Z.shared.setValue(h.color).toHex())});return l}}else{let s=t.createPattern(r.texture.source.resource,"repeat"),n=r.matrix.copyTo(G.shared);return n.scale(r.texture.frame.width,r.texture.frame.height),s.setTransform(n),s}return z("FillStyle not recognised",r),"red"}var V0,$h=p(()=>{Nt();nt();ft();mt();pn();tu();V0=1e5});var xn,X0=p(()=>{Nt();D();Is();zi();vr();e0();yt();ji();Vh();hu();cu();$h();xn=class{constructor(t){this._activeTextures={},this._renderer=t}getTextureSize(t,e,i){let s=we.measureText(t||" ",i),n=Math.ceil(Math.ceil(Math.max(1,s.width)+i.padding*2)*e),o=Math.ceil(Math.ceil(Math.max(1,s.height)+i.padding*2)*e);return n=Math.ceil(n-1e-6),o=Math.ceil(o-1e-6),n=ar(n),o=ar(o),{width:n,height:o}}getTexture(t,e,i,s){typeof t=="string"&&(W("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:i,resolution:e}),t.style instanceof ce||(t.style=new ce(t.style));let{texture:n,canvasAndContext:o}=this.createTextureAndCanvas(t);return this._renderer.texture.initSource(n._source),le.returnCanvasAndContext(o),n}createTextureAndCanvas(t){let{text:e,style:i}=t,s=t.resolution??this._renderer.resolution,n=we.measureText(e||" ",i),o=Math.ceil(Math.ceil(Math.max(1,n.width)+i.padding*2)*s),a=Math.ceil(Math.ceil(Math.max(1,n.height)+i.padding*2)*s),u=le.getOptimalCanvasAndContext(o,a),{canvas:l}=u;this.renderTextToCanvas(e,i,s,u);let c=lu(l,o,a,s);if(i.trim){let h=t0(l,s);c.frame.copyFrom(h),c.updateUvs()}return{texture:c,canvasAndContext:u}}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;let e=t._getKey();if(this._activeTextures[e])return this._increaseReferenceCount(e),this._activeTextures[e].texture;let{texture:i,canvasAndContext:s}=this.createTextureAndCanvas(t);return this._activeTextures[e]={canvasAndContext:s,texture:i,usageCount:1},i}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}returnTexture(t){let e=t.source;e.resource=null,e.uploadMethodId="unknown",e.alphaMode="no-premultiply-alpha",bt.returnTexture(t)}decreaseReferenceCount(t){let e=this._activeTextures[t];e.usageCount--,e.usageCount===0&&(le.returnCanvasAndContext(e.canvasAndContext),this.returnTexture(e.texture),this._activeTextures[t]=null)}getReferenceCount(t){return this._activeTextures[t].usageCount}renderTextToCanvas(t,e,i,s){let{canvas:n,context:o}=s,a=li(e),u=we.measureText(t||" ",e),l=u.lines,c=u.lineHeight,h=u.lineWidths,f=u.maxLineWidth,d=u.fontProperties,m=n.height;if(o.resetTransform(),o.scale(i,i),o.textBaseline=e.textBaseline,e._stroke?.width){let v=e._stroke;o.lineWidth=v.width,o.miterLimit=v.miterLimit,o.lineJoin=v.join,o.lineCap=v.cap}o.font=a;let g,x,_=e.dropShadow?2:1;for(let v=0;v<_;++v){let T=e.dropShadow&&v===0,y=T?Math.ceil(Math.max(1,m)+e.padding*2):0,A=y*i;if(T){o.fillStyle="black",o.strokeStyle="black";let B=e.dropShadow,U=B.color,P=B.alpha;o.shadowColor=Z.shared.setValue(U).setAlpha(P).toRgbaString();let F=B.blur*i,N=B.distance*i;o.shadowBlur=F,o.shadowOffsetX=Math.cos(B.angle)*N,o.shadowOffsetY=Math.sin(B.angle)*N+A}else{if(o.fillStyle=e._fill?Yi(e._fill,o,u):null,e._stroke?.width){let B=e._stroke.width*e._stroke.alignment;o.strokeStyle=Yi(e._stroke,o,u,B)}o.shadowColor="black"}let S=(c-d.fontSize)/2;c-d.fontSize<0&&(S=0);let E=e._stroke?.width??0;for(let B=0;B<l.length;B++)g=E/2,x=E/2+B*c+d.ascent+S,e.align==="right"?g+=f-h[B]:e.align==="center"&&(g+=(f-h[B])/2),e._stroke?.width&&this._drawLetterSpacing(l[B],e,s,g+e.padding,x+e.padding-y,!0),e._fill!==void 0&&this._drawLetterSpacing(l[B],e,s,g+e.padding,x+e.padding-y)}}_drawLetterSpacing(t,e,i,s,n,o=!1){let{context:a}=i,u=e.letterSpacing,l=!1;if(we.experimentalLetterSpacingSupported&&(we.experimentalLetterSpacing?(a.letterSpacing=\`\${u}px\`,a.textLetterSpacing=\`\${u}px\`,l=!0):(a.letterSpacing="0px",a.textLetterSpacing="0px")),u===0||l){o?a.strokeText(t,s,n):a.fillText(t,s,n);return}let c=s,h=we.graphemeSegmenter(t),f=a.measureText(t).width,d=0;for(let m=0;m<h.length;++m){let g=h[m];o?a.strokeText(g,c,n):a.fillText(g,c,n);let x="";for(let _=m+1;_<h.length;++_)x+=h[_];d=a.measureText(x).width,c+=f-d+u,f=d}}destroy(){this._activeTextures=null}};xn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"canvasText"}});var jh=p(()=>{D();Zy();X0();L.add(xn);L.add(dn)});var Rr,Yh=p(()=>{yt();Ca();Hh();Rr=class r extends Er{constructor(t){t instanceof de&&(t={context:t});let{context:e,roundPixels:i,...s}=t||{};super({label:"Graphics",...s}),this.renderPipeId="graphics",e?this._context=e:this._context=this._ownedContext=new de,this._context.on("update",this.onViewUpdate,this),this.allowChildren=!1,this.roundPixels=i??!1}set context(t){t!==this._context&&(this._context.off("update",this.onViewUpdate,this),this._context=t,this._context.on("update",this.onViewUpdate,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||t?.context===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_callContextMethod(t,e){return this.context[t](...e),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new r(this._context.clone()):(this._ownedContext=null,new r(this._context))}lineStyle(t,e,i){W($,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");let s={};return t&&(s.width=t),e&&(s.color=e),i&&(s.alpha=i),this.context.strokeStyle=s,this}beginFill(t,e){W($,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");let i={};return t!==void 0&&(i.color=t),e!==void 0&&(i.alpha=e),this.context.fillStyle=i,this}endFill(){W($,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();let t=this.context.strokeStyle;return(t.width!==de.defaultStrokeStyle.width||t.color!==de.defaultStrokeStyle.color||t.alpha!==de.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return W($,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return W($,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return W($,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return W($,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return W($,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return W($,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}});var $0,j0,Y0=p(()=>{"use strict";$0={name:"local-uniform-msdf-bit",vertex:{header:\`
|
|
struct LocalUniforms {
|
|
uColor:vec4<f32>,
|
|
uTransformMatrix:mat3x3<f32>,
|
|
uDistance: f32,
|
|
uRound:f32,
|
|
}
|
|
|
|
@group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
|
\`,main:\`
|
|
vColor *= localUniforms.uColor;
|
|
modelMatrix *= localUniforms.uTransformMatrix;
|
|
\`,end:\`
|
|
if(localUniforms.uRound == 1)
|
|
{
|
|
vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
|
}
|
|
\`},fragment:{header:\`
|
|
struct LocalUniforms {
|
|
uColor:vec4<f32>,
|
|
uTransformMatrix:mat3x3<f32>,
|
|
uDistance: f32
|
|
}
|
|
|
|
@group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
|
\`,main:\`
|
|
outColor = vec4<f32>(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));
|
|
\`}},j0={name:"local-uniform-msdf-bit",vertex:{header:\`
|
|
uniform mat3 uTransformMatrix;
|
|
uniform vec4 uColor;
|
|
uniform float uRound;
|
|
\`,main:\`
|
|
vColor *= uColor;
|
|
modelMatrix *= uTransformMatrix;
|
|
\`,end:\`
|
|
if(uRound == 1.)
|
|
{
|
|
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
|
}
|
|
\`},fragment:{header:\`
|
|
uniform float uDistance;
|
|
\`,main:\`
|
|
outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));
|
|
\`}}});var K0,q0,Z0=p(()=>{"use strict";K0={name:"msdf-bit",fragment:{header:\`
|
|
fn calculateMSDFAlpha(msdfColor:vec4<f32>, shapeColor:vec4<f32>, distance:f32) -> f32 {
|
|
|
|
// MSDF
|
|
var median = msdfColor.r + msdfColor.g + msdfColor.b -
|
|
min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
|
|
max(msdfColor.r, max(msdfColor.g, msdfColor.b));
|
|
|
|
// SDF
|
|
median = min(median, msdfColor.a);
|
|
|
|
var screenPxDistance = distance * (median - 0.5);
|
|
var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
|
|
if (median < 0.01) {
|
|
alpha = 0.0;
|
|
} else if (median > 0.99) {
|
|
alpha = 1.0;
|
|
}
|
|
|
|
// Gamma correction for coverage-like alpha
|
|
var luma: f32 = dot(shapeColor.rgb, vec3<f32>(0.299, 0.587, 0.114));
|
|
var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);
|
|
var coverage: f32 = pow(shapeColor.a * alpha, gamma);
|
|
|
|
return coverage;
|
|
|
|
}
|
|
\`}},q0={name:"msdf-bit",fragment:{header:\`
|
|
float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {
|
|
|
|
// MSDF
|
|
float median = msdfColor.r + msdfColor.g + msdfColor.b -
|
|
min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
|
|
max(msdfColor.r, max(msdfColor.g, msdfColor.b));
|
|
|
|
// SDF
|
|
median = min(median, msdfColor.a);
|
|
|
|
float screenPxDistance = distance * (median - 0.5);
|
|
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
|
|
|
|
if (median < 0.01) {
|
|
alpha = 0.0;
|
|
} else if (median > 0.99) {
|
|
alpha = 1.0;
|
|
}
|
|
|
|
// Gamma correction for coverage-like alpha
|
|
float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));
|
|
float gamma = mix(1.0, 1.0 / 2.2, luma);
|
|
float coverage = pow(shapeColor.a * alpha, gamma);
|
|
|
|
return coverage;
|
|
}
|
|
\`}}});var Kh,qh,fu,Q0=p(()=>{nt();ti();Pr();tn();en();Br();Na();ke();ee();Y0();Z0();fu=class extends wt{constructor(){let t=new ct({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uDistance:{value:4,type:"f32"},uRound:{value:0,type:"f32"}}),e=ye();Kh??(Kh=Ve({name:"sdf-shader",bits:[Fi,ki(e),$0,K0,$e]})),qh??(qh=Xe({name:"sdf-shader",bits:[Ri,Gi(e),j0,q0,je]})),super({glProgram:qh,gpuProgram:Kh,resources:{localUniforms:t,batchSamplers:Ii(e)}})}}});var du,J0=p(()=>{jt();yt();du=class extends ht{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.applyFillAsTint=!0,this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return W($,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return W($,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return W($,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return W($,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return W($,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(t=!1){this.emit("destroy",this),this.removeAllListeners();for(let e in this.chars)this.chars[e].texture?.destroy();this.chars=null,t&&(this.pages.forEach(e=>e.texture.destroy(!0)),this.pages=null)}}});function pu(r){if(r==="")return[];typeof r=="string"&&(r=[r]);let t=[];for(let e=0,i=r.length;e<i;e++){let s=r[e];if(Array.isArray(s)){if(s.length!==2)throw new Error(\`[BitmapFont]: Invalid character range length, expecting 2 got \${s.length}.\`);if(s[0].length===0||s[1].length===0)throw new Error("[BitmapFont]: Invalid character delimiter.");let n=s[0].charCodeAt(0),o=s[1].charCodeAt(0);if(o<n)throw new Error("[BitmapFont]: Invalid character range.");for(let a=n,u=o;a<=u;a++)t.push(String.fromCharCode(a))}else t.push(...Array.from(s))}if(t.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return t}var Zh=p(()=>{"use strict"});var tb,Qh,rb=p(()=>{Nt();Wt();zi();Pa();ft();yt();hu();cu();$h();ji();J0();Zh();tb=class eb extends du{constructor(t){super(),this.resolution=1,this.pages=[],this._padding=0,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentPageIndex=-1,this._skipKerning=!1;let e={...eb.defaultOptions,...t};this._textureSize=e.textureSize,this._mipmap=e.mipmap;let i=e.style.clone();e.overrideFill&&(i._fill.color=16777215,i._fill.alpha=1,i._fill.texture=I.WHITE,i._fill.fill=null),this.applyFillAsTint=e.overrideFill;let s=i.fontSize;i.fontSize=this.baseMeasurementFontSize;let n=li(i);e.overrideSize?i._stroke&&(i._stroke.width*=this.baseRenderedFontSize/s):i.fontSize=this.baseRenderedFontSize=s,this._style=i,this._skipKerning=e.skipKerning??!1,this.resolution=e.resolution??1,this._padding=e.padding??4,this.fontMetrics=we.measureFont(n),this.lineHeight=i.lineHeight||this.fontMetrics.fontSize||i.fontSize}ensureCharacters(t){let e=pu(t).filter(x=>!this._currentChars.includes(x)).filter((x,_,v)=>v.indexOf(x)===_);if(!e.length)return;this._currentChars=[...this._currentChars,...e];let i;this._currentPageIndex===-1?i=this._nextPage():i=this.pages[this._currentPageIndex];let{canvas:s,context:n}=i.canvasAndContext,o=i.texture.source,a=this._style,u=this._currentX,l=this._currentY,c=this.baseRenderedFontSize/this.baseMeasurementFontSize,h=this._padding*c,f=0,d=!1,m=s.width/this.resolution,g=s.height/this.resolution;for(let x=0;x<e.length;x++){let _=e[x],v=we.measureText(_,a,s,!1);v.lineHeight=v.height;let T=v.width*c,y=Math.ceil((a.fontStyle==="italic"?2:1)*T),A=v.height*c,S=y+h*2,E=A+h*2;if(d=!1,_!==\`
|
|
\`&&_!=="\\r"&&_!==" "&&_!==" "&&(d=!0,f=Math.ceil(Math.max(E,f))),u+S>m&&(l+=f,f=E,u=0,l+f>g)){o.update();let U=this._nextPage();s=U.canvasAndContext.canvas,n=U.canvasAndContext.context,o=U.texture.source,l=0}let B=T/c-(a.dropShadow?.distance??0)-(a._stroke?.width??0);if(this.chars[_]={id:_.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:B,kerning:{}},d){this._drawGlyph(n,v,u+h,l+h,c,a);let U=o.width*c,P=o.height*c,F=new tt(u/U*o.width,l/P*o.height,S/U*o.width,E/P*o.height);this.chars[_].texture=new I({source:o,frame:F}),u+=Math.ceil(S)}}o.update(),this._currentX=u,this._currentY=l,this._skipKerning&&this._applyKerning(e,n)}get pageTextures(){return W($,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(t,e){let i=this._measureCache;for(let s=0;s<t.length;s++){let n=t[s];for(let o=0;o<this._currentChars.length;o++){let a=this._currentChars[o],u=i[n];u||(u=i[n]=e.measureText(n).width);let l=i[a];l||(l=i[a]=e.measureText(a).width);let c=e.measureText(n+a).width,h=c-(u+l);h&&(this.chars[n].kerning[a]=h),c=e.measureText(n+a).width,h=c-(u+l),h&&(this.chars[a].kerning[n]=h)}}}_nextPage(){this._currentPageIndex++;let t=this.resolution,e=le.getOptimalCanvasAndContext(this._textureSize,this._textureSize,t);this._setupContext(e.context,this._style,t);let i=t*(this.baseRenderedFontSize/this.baseMeasurementFontSize),s=new I({source:new ze({resource:e.canvas,resolution:i,alphaMode:"premultiply-alpha-on-upload",autoGenerateMipmaps:this._mipmap})}),n={canvasAndContext:e,texture:s};return this.pages[this._currentPageIndex]=n,n}_setupContext(t,e,i){e.fontSize=this.baseRenderedFontSize,t.scale(i,i),t.font=li(e),e.fontSize=this.baseMeasurementFontSize,t.textBaseline=e.textBaseline;let s=e._stroke,n=s?.width??0;if(s&&(t.lineWidth=n,t.lineJoin=s.join,t.miterLimit=s.miterLimit,t.strokeStyle=Yi(s,t)),e._fill&&(t.fillStyle=Yi(e._fill,t)),e.dropShadow){let o=e.dropShadow,a=Z.shared.setValue(o.color).toArray(),u=o.blur*i,l=o.distance*i;t.shadowColor=\`rgba(\${a[0]*255},\${a[1]*255},\${a[2]*255},\${o.alpha})\`,t.shadowBlur=u,t.shadowOffsetX=Math.cos(o.angle)*l,t.shadowOffsetY=Math.sin(o.angle)*l}else t.shadowColor="black",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0}_drawGlyph(t,e,i,s,n,o){let a=e.text,u=e.fontProperties,c=(o._stroke?.width??0)*n,h=i+c/2,f=s-c/2,d=u.descent*n,m=e.lineHeight*n;o.stroke&&c&&t.strokeText(a,h,f+m-d),o._fill&&t.fillText(a,h,f+m-d)}destroy(){super.destroy();for(let t=0;t<this.pages.length;t++){let{canvasAndContext:e,texture:i}=this.pages[t];le.returnCanvasAndContext(e),i.destroy(!0)}this.pages=null}};tb.defaultOptions={textureSize:512,style:new ce,mipmap:!0};Qh=tb});function mu(r,t,e,i){let s={width:0,height:0,offsetY:0,scale:t.fontSize/e.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};s.offsetY=e.baseLineOffset;let n=s.lines[0],o=null,a=!0,u={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},l=m=>{let g=n.width;for(let x=0;x<u.index;x++){let _=m.positions[x];n.chars.push(m.chars[x]),n.charPositions.push(_+g)}n.width+=m.width,a=!1,u.width=0,u.index=0,u.chars.length=0},c=()=>{let m=n.chars.length-1;if(i){let g=n.chars[m];for(;g===" ";)n.width-=e.chars[g].xAdvance,g=n.chars[--m]}s.width=Math.max(s.width,n.width),n={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},a=!0,s.lines.push(n),s.height+=e.lineHeight},h=e.baseMeasurementFontSize/t.fontSize,f=t.letterSpacing*h,d=t.wordWrapWidth*h;for(let m=0;m<r.length+1;m++){let g,x=m===r.length;x||(g=r[m]);let _=e.chars[g]||e.chars[" "];if(/(?:\\s)/.test(g)||g==="\\r"||g===\`
|
|
\`||x){if(!a&&t.wordWrap&&n.width+u.width-f>d?(c(),l(u),x||n.charPositions.push(0)):(u.start=n.width,l(u),x||n.charPositions.push(0)),g==="\\r"||g===\`
|
|
\`)n.width!==0&&c();else if(!x){let A=_.xAdvance+(_.kerning[o]||0)+f;n.width+=A,n.spaceWidth=A,n.spacesIndex.push(n.charPositions.length),n.chars.push(g)}}else{let y=_.kerning[o]||0,A=_.xAdvance+y+f;u.positions[u.index++]=u.width+y,u.chars.push(g),u.width+=A}o=g}return c(),t.align==="center"?CD(s):t.align==="right"?AD(s):t.align==="justify"&&DD(s),s}function CD(r){for(let t=0;t<r.lines.length;t++){let e=r.lines[t],i=r.width/2-e.width/2;for(let s=0;s<e.charPositions.length;s++)e.charPositions[s]+=i}}function AD(r){for(let t=0;t<r.lines.length;t++){let e=r.lines[t],i=r.width-e.width;for(let s=0;s<e.charPositions.length;s++)e.charPositions[s]+=i}}function DD(r){let t=r.width;for(let e=0;e<r.lines.length;e++){let i=r.lines[e],s=0,n=i.spacesIndex[s++],o=0,a=i.spacesIndex.length,l=(t-i.width)/a;for(let c=0;c<i.charPositions.length;c++)c===n&&(n=i.spacesIndex[s++],o+=l),i.charPositions[c]+=o}}var Jh=p(()=>{"use strict"});var gu,tf,ib,sb=p(()=>{Ks();yt();mt();ji();rb();Jh();Zh();gu=0,tf=class{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(t,e){let i=\`\${e.fontFamily}-bitmap\`,s=!0;if(e._fill.fill&&!e._stroke)i+=e._fill.fill.styleKey,s=!1;else if(e._stroke||e.dropShadow){let o=e.styleKey;o=o.substring(0,o.lastIndexOf("-")),i=\`\${o}-bitmap\`,s=!1}if(!Bt.has(i)){let o=new Qh({style:e,overrideFill:s,overrideSize:!0,...this.defaultOptions});gu++,gu>50&&z("BitmapText",\`You have dynamically created \${gu} bitmap fonts, this can be inefficient. Try pre installing your font styles using \\\`BitmapFont.install({name:"style1", style})\\\`\`),o.once("destroy",()=>{gu--,Bt.remove(i)}),Bt.set(i,o)}let n=Bt.get(i);return n.ensureCharacters?.(t),n}getLayout(t,e,i=!0){let s=this.getFont(t,e);return mu([...t],e,s,i)}measureText(t,e,i=!0){return this.getLayout(t,e,i)}install(...t){let e=t[0];typeof e=="string"&&(e={name:e,style:t[1],chars:t[2]?.chars,resolution:t[2]?.resolution,padding:t[2]?.padding,skipKerning:t[2]?.skipKerning},W($,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));let i=e?.name;if(!i)throw new Error("[BitmapFontManager] Property \`name\` is required.");e={...this.defaultOptions,...e};let s=e.style,n=s instanceof ce?s:new ce(s),o=n._fill.fill!==null&&n._fill.fill!==void 0,a=new Qh({style:n,overrideFill:o,skipKerning:e.skipKerning,padding:e.padding,resolution:e.resolution,overrideSize:!1}),u=pu(e.chars);return a.ensureCharacters(u.join("")),Bt.set(\`\${i}-bitmap\`,a),a.once("destroy",()=>Bt.remove(\`\${i}-bitmap\`)),a}uninstall(t){let e=\`\${t}-bitmap\`,i=Bt.get(e);i&&i.destroy()}},ib=new tf});function nb(r,t){t.groupTransform=r.groupTransform,t.groupColorAlpha=r.groupColorAlpha,t.groupColor=r.groupColor,t.groupBlendMode=r.groupBlendMode,t.globalDisplayStatus=r.globalDisplayStatus,t.groupTransform=r.groupTransform,t.localDisplayStatus=r.localDisplayStatus,t.groupAlpha=r.groupAlpha,t._roundPixels=r._roundPixels}var _n,ob=p(()=>{Ks();D();Jt();Yh();Q0();sb();Jh();_n=class{constructor(t){this._gpuBitmapText={},this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuBitmapText")}validateRenderable(t){let e=this._getGpuBitmapText(t);return t._didTextUpdate&&(t._didTextUpdate=!1,this._updateContext(t,e)),this._renderer.renderPipes.graphics.validateRenderable(e)}addRenderable(t,e){let i=this._getGpuBitmapText(t);nb(t,i),t._didTextUpdate&&(t._didTextUpdate=!1,this._updateContext(t,i)),this._renderer.renderPipes.graphics.addRenderable(i,e),i.context.customShader&&this._updateDistanceField(t)}destroyRenderable(t){t.off("destroyed",this._destroyRenderableBound),this._destroyRenderableByUid(t.uid)}_destroyRenderableByUid(t){let e=this._gpuBitmapText[t].context;e.customShader&&(j.return(e.customShader),e.customShader=null),j.return(this._gpuBitmapText[t]),this._gpuBitmapText[t]=null}updateRenderable(t){let e=this._getGpuBitmapText(t);nb(t,e),this._renderer.renderPipes.graphics.updateRenderable(e),e.context.customShader&&this._updateDistanceField(t)}_updateContext(t,e){let{context:i}=e,s=ib.getFont(t.text,t._style);i.clear(),s.distanceField.type!=="none"&&(i.customShader||(i.customShader=j.get(fu)));let n=Array.from(t.text),o=t._style,a=s.baseLineOffset,u=mu(n,o,s,!0),l=0,c=o.padding,h=u.scale,f=u.width,d=u.height+u.offsetY;o._stroke&&(f+=o._stroke.width/h,d+=o._stroke.width/h),i.translate(-t._anchor._x*f-c,-t._anchor._y*d-c).scale(h,h);let m=s.applyFillAsTint?o._fill.color:16777215;for(let g=0;g<u.lines.length;g++){let x=u.lines[g];for(let _=0;_<x.charPositions.length;_++){let v=n[l++],T=s.chars[v];T?.texture&&i.texture(T.texture,m||"black",Math.round(x.charPositions[_]+T.xOffset),Math.round(a+T.yOffset))}a+=s.lineHeight}}_getGpuBitmapText(t){return this._gpuBitmapText[t.uid]||this.initGpuText(t)}initGpuText(t){let e=j.get(Rr);return this._gpuBitmapText[t.uid]=e,this._updateContext(t,e),t.on("destroyed",this._destroyRenderableBound),this._gpuBitmapText[t.uid]}_updateDistanceField(t){let e=this._getGpuBitmapText(t).context,i=t._style.fontFamily,s=Bt.get(\`\${i}-bitmap\`),{a:n,b:o,c:a,d:u}=t.groupTransform,l=Math.sqrt(n*n+o*o),c=Math.sqrt(a*a+u*u),h=(Math.abs(l)+Math.abs(c))/2,f=s.baseRenderedFontSize/t._style.fontSize,d=h*s.distanceField.range*(1/f);e.customShader.resources.localUniforms.uniforms.uDistance=d}destroy(){for(let t in this._gpuBitmapText)this._destroyRenderableByUid(t);this._gpuBitmapText=null,this._renderer=null}};_n.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"bitmapText"}});var ef=p(()=>{D();ob();L.add(_n)});var yn,ab=p(()=>{D();ft();Jt();hn();Th();yn=class{constructor(t){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.runners.resolutionChange.add(this),this._renderer.renderableGC.addManagedHash(this,"_gpuText")}resolutionChange(){for(let t in this._gpuText){let e=this._gpuText[t];if(!e)continue;let i=e.batchableSprite.renderable;i._autoResolution&&(i._resolution=this._renderer.resolution,i.onViewUpdate())}}validateRenderable(t){let e=this._getGpuText(t),i=t._getKey();return e.textureNeedsUploading?(e.textureNeedsUploading=!1,!0):e.currentKey!==i}addRenderable(t,e){let s=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),this._renderer.renderPipes.batch.addToBatch(s,e)}updateRenderable(t){let i=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),i._batcher.updateElement(i)}destroyRenderable(t){t.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(t.uid)}_destroyRenderableById(t){let e=this._gpuText[t];this._renderer.htmlText.decreaseReferenceCount(e.currentKey),j.return(e.batchableSprite),this._gpuText[t]=null}_updateText(t){let e=t._getKey(),i=this._getGpuText(t),s=i.batchableSprite;i.currentKey!==e&&this._updateGpuText(t).catch(n=>{console.error(n)}),t._didTextUpdate=!1,fn(s,t)}async _updateGpuText(t){t._didTextUpdate=!1;let e=this._getGpuText(t);if(e.generatingTexture)return;let i=t._getKey();this._renderer.htmlText.decreaseReferenceCount(e.currentKey),e.generatingTexture=!0,e.currentKey=i;let s=t.resolution??this._renderer.resolution,n=await this._renderer.htmlText.getManagedTexture(t.text,s,t._style,t._getKey()),o=e.batchableSprite;o.texture=e.texture=n,e.generatingTexture=!1,e.textureNeedsUploading=!0,t.onViewUpdate(),fn(o,t)}_getGpuText(t){return this._gpuText[t.uid]||this.initGpuText(t)}initGpuText(t){let e={texture:I.EMPTY,currentKey:"--",batchableSprite:j.get(qe),textureNeedsUploading:!1,generatingTexture:!1},i=e.batchableSprite;return i.renderable=t,i.transform=t.groupTransform,i.texture=I.EMPTY,i.bounds={minX:0,maxX:1,minY:0,maxY:0},i.roundPixels=this._renderer._roundPixels|t._roundPixels,t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,this._gpuText[t.uid]=e,t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuText)this._destroyRenderableById(t);this._gpuText=null,this._renderer=null}};yn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"htmlText"}});function ub(){let{userAgent:r}=Q.get().getNavigator();return/^((?!chrome|android).)*safari/i.test(r)}var lb=p(()=>{Pt()});var cb,hb,Ki,rf=p(()=>{"use strict";cb="http://www.w3.org/2000/svg",hb="http://www.w3.org/1999/xhtml",Ki=class{constructor(){this.svgRoot=document.createElementNS(cb,"svg"),this.foreignObject=document.createElementNS(cb,"foreignObject"),this.domElement=document.createElementNS(hb,"div"),this.styleElement=document.createElementNS(hb,"style"),this.image=new Image;let{foreignObject:t,svgRoot:e,styleElement:i,domElement:s}=this;t.setAttribute("width","10000"),t.setAttribute("height","10000"),t.style.overflow="hidden",e.appendChild(t),t.appendChild(i),t.appendChild(s)}}});function pb(r){let t=r._stroke,e=r._fill,s=[\`div { \${[\`color: \${Z.shared.setValue(e.color).toHex()}\`,\`font-size: \${r.fontSize}px\`,\`font-family: \${r.fontFamily}\`,\`font-weight: \${r.fontWeight}\`,\`font-style: \${r.fontStyle}\`,\`font-variant: \${r.fontVariant}\`,\`letter-spacing: \${r.letterSpacing}px\`,\`text-align: \${r.align}\`,\`padding: \${r.padding}px\`,\`white-space: \${r.whiteSpace==="pre"&&r.wordWrap?"pre-wrap":r.whiteSpace}\`,...r.lineHeight?[\`line-height: \${r.lineHeight}px\`]:[],...r.wordWrap?[\`word-wrap: \${r.breakWords?"break-all":"break-word"}\`,\`max-width: \${r.wordWrapWidth}px\`]:[],...t?[gb(t)]:[],...r.dropShadow?[mb(r.dropShadow)]:[],...r.cssOverrides].join(";")} }\`];return PD(r.tagStyles,s),s.join(" ")}function mb(r){let t=Z.shared.setValue(r.color).setAlpha(r.alpha).toHexa(),e=Math.round(Math.cos(r.angle)*r.distance),i=Math.round(Math.sin(r.angle)*r.distance),s=\`\${e}px \${i}px\`;return r.blur>0?\`text-shadow: \${s} \${r.blur}px \${t}\`:\`text-shadow: \${s} \${t}\`}function gb(r){return[\`-webkit-text-stroke-width: \${r.width}px\`,\`-webkit-text-stroke-color: \${Z.shared.setValue(r.color).toHex()}\`,\`text-stroke-width: \${r.width}px\`,\`text-stroke-color: \${Z.shared.setValue(r.color).toHex()}\`,"paint-order: stroke"].join(";")}function PD(r,t){for(let e in r){let i=r[e],s=[];for(let n in i)db[n]?s.push(db[n](i[n])):fb[n]&&s.push(fb[n].replace("{{VALUE}}",i[n]));t.push(\`\${e} { \${s.join(";")} }\`)}}var fb,db,xb=p(()=>{Nt();fb={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},db={fill:r=>\`color: \${Z.shared.setValue(r).toHex()}\`,breakWords:r=>\`word-wrap: \${r?"break-all":"break-word"}\`,stroke:gb,dropShadow:mb}});var xu,_b=p(()=>{mt();ji();zh();xb();xu=class r extends ce{constructor(t={}){super(t),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=t.cssOverrides),this.tagStyles=t.tagStyles??{}}set cssOverrides(t){this._cssOverrides=t instanceof Array?t:[t],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=uu(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new r({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow?{...this.dropShadow}:null,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=pb(this)),this._cssStyle}addOverride(...t){let e=t.filter(i=>!this.cssOverrides.includes(i));e.length>0&&(this.cssOverrides.push(...e),this.update())}removeOverride(...t){let e=t.filter(i=>this.cssOverrides.includes(i));e.length>0&&(this.cssOverrides=this.cssOverrides.filter(i=>!e.includes(i)),this.update())}set fill(t){typeof t!="string"&&typeof t!="number"&&z("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=t}set stroke(t){t&&typeof t!="string"&&typeof t!="number"&&z("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=t}}});function yb(r,t){let e=t.fontFamily,i=[],s={},n=/font-family:([^;"\\s]+)/g,o=r.match(n);function a(u){s[u]||(i.push(u),s[u]=!0)}if(Array.isArray(e))for(let u=0;u<e.length;u++)a(e[u]);else a(e);o&&o.forEach(u=>{let l=u.split(":")[1].trim();a(l)});for(let u in t.tagStyles){let l=t.tagStyles[u].fontFamily;a(l)}return i}var bb=p(()=>{"use strict"});async function vb(r){let e=await(await Q.get().fetch(r)).blob(),i=new FileReader;return await new Promise((n,o)=>{i.onloadend=()=>n(i.result),i.onerror=o,i.readAsDataURL(e)})}var Tb=p(()=>{Pt()});async function sf(r,t){let e=await vb(t);return\`@font-face {
|
|
font-family: "\${r.fontFamily}";
|
|
src: url('\${e}');
|
|
font-weight: \${r.fontWeight};
|
|
font-style: \${r.fontStyle};
|
|
}\`}var Sb=p(()=>{Tb()});async function wb(r,t,e){let i=r.filter(s=>Bt.has(\`\${s}-and-url\`)).map((s,n)=>{if(!_u.has(s)){let{url:o}=Bt.get(\`\${s}-and-url\`);n===0?_u.set(s,sf({fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:s},o)):_u.set(s,sf({fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:s},o))}return _u.get(s)});return(await Promise.all(i)).join(\`
|
|
\`)}var _u,Eb=p(()=>{Ks();Sb();_u=new Map});function Cb(r,t,e,i,s){let{domElement:n,styleElement:o,svgRoot:a}=s;n.innerHTML=\`<style>\${t.cssStyle}</style><div style='padding:0;'>\${r}</div>\`,n.setAttribute("style",\`transform: scale(\${e});transform-origin: top left; display: inline-block\`),o.textContent=i;let{width:u,height:l}=s.image;return a.setAttribute("width",u.toString()),a.setAttribute("height",l.toString()),new XMLSerializer().serializeToString(a)}var Ab=p(()=>{"use strict"});function Db(r,t){let e=le.getOptimalCanvasAndContext(r.width,r.height,t),{context:i}=e;return i.clearRect(0,0,r.width,r.height),i.drawImage(r,0,0),e}var Pb=p(()=>{zi()});function Bb(r,t,e){return new Promise(async i=>{e&&await new Promise(s=>setTimeout(s,100)),r.onload=()=>{i()},r.src=\`data:image/svg+xml;charset=utf8,\${encodeURIComponent(t)}\`,r.crossOrigin="anonymous"})}var Mb=p(()=>{"use strict"});function Rb(r,t,e,i){i||(i=Fb||(Fb=new Ki));let{domElement:s,styleElement:n,svgRoot:o}=i;s.innerHTML=\`<style>\${t.cssStyle};</style><div style='padding:0'>\${r}</div>\`,s.setAttribute("style","transform-origin: top left; display: inline-block"),e&&(n.textContent=e),document.body.appendChild(o);let a=s.getBoundingClientRect();o.remove();let u=t.padding*2;return{width:a.width-u,height:a.height-u}}var Fb,kb=p(()=>{rf()});var qi,Gb=p(()=>{D();zi();vr();Ye();lb();mt();Jt();Vh();rf();_b();bb();Eb();Ab();Pb();Mb();kb();qi=class{constructor(t){this._activeTextures={},this._renderer=t,this._createCanvas=t.type===Mt.WEBGPU}getTexture(t){return this._buildTexturePromise(t.text,t.resolution,t.style)}getManagedTexture(t,e,i,s){if(this._activeTextures[s])return this._increaseReferenceCount(s),this._activeTextures[s].promise;let n=this._buildTexturePromise(t,e,i).then(o=>(this._activeTextures[s].texture=o,o));return this._activeTextures[s]={texture:null,promise:n,usageCount:1},n}async _buildTexturePromise(t,e,i){let s=j.get(Ki),n=yb(t,i),o=await wb(n,i,xu.defaultTextStyle),a=Rb(t,i,o,s),u=Math.ceil(Math.ceil(Math.max(1,a.width)+i.padding*2)*e),l=Math.ceil(Math.ceil(Math.max(1,a.height)+i.padding*2)*e),c=s.image,h=2;c.width=(u|0)+h,c.height=(l|0)+h;let f=Cb(t,i,e,o,s);await Bb(c,f,ub()&&n.length>0);let d=c,m;this._createCanvas&&(m=Db(c,e));let g=lu(m?m.canvas:d,c.width-h,c.height-h,e);return this._createCanvas&&(this._renderer.texture.initSource(g.source),le.returnCanvasAndContext(m)),j.return(s),g}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}decreaseReferenceCount(t){let e=this._activeTextures[t];e&&(e.usageCount--,e.usageCount===0&&(e.texture?this._cleanUp(e):e.promise.then(i=>{e.texture=i,this._cleanUp(e)}).catch(()=>{z("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[t]=null))}_cleanUp(t){bt.returnTexture(t.texture),t.texture.source.resource=null,t.texture.source.uploadMethodId="unknown"}getReferenceCount(t){return this._activeTextures[t].usageCount}destroy(){this._activeTextures=null}};qi.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"htmlText"};qi.defaultFontOptions={fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal"}});var nf=p(()=>{D();ab();Gb();L.add(qi);L.add(yn)});var Ib,Zi,yu=p(()=>{Ar();hr();Pi();yt();Ib=class Ub extends be{constructor(...t){let e=t[0]??{};e instanceof Float32Array&&(W($,"use new MeshGeometry({ positions, uvs, indices }) instead"),e={positions:e,uvs:t[1],indices:t[2]}),e={...Ub.defaultOptions,...e};let i=e.positions||new Float32Array([0,0,1,0,1,1,0,1]),s=e.uvs;s||(e.positions?s=new Float32Array(i.length):s=new Float32Array([0,0,1,0,1,1,0,1]));let n=e.indices||new Uint32Array([0,1,2,0,2,3]),o=e.shrinkBuffersToFit,a=new St({data:i,label:"attribute-mesh-positions",shrinkToFit:o,usage:J.VERTEX|J.COPY_DST}),u=new St({data:s,label:"attribute-mesh-uvs",shrinkToFit:o,usage:J.VERTEX|J.COPY_DST}),l=new St({data:n,label:"index-mesh-buffer",shrinkToFit:o,usage:J.INDEX|J.COPY_DST});super({attributes:{aPosition:{buffer:a,format:"float32x2",stride:2*4,offset:0},aUV:{buffer:u,format:"float32x2",stride:2*4,offset:0}},indexBuffer:l,topology:e.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(t){this.attributes.aPosition.buffer.data=t}get uvs(){return this.attributes.aUV.buffer.data}set uvs(t){this.attributes.aUV.buffer.data=t}get indices(){return this.indexBuffer.data}set indices(t){this.indexBuffer.data=t}};Ib.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};Zi=Ib});var ci,Ob,Qi,Ji=p(()=>{"use strict";ci={name:"local-uniform-bit",vertex:{header:\`
|
|
|
|
struct LocalUniforms {
|
|
uTransformMatrix:mat3x3<f32>,
|
|
uColor:vec4<f32>,
|
|
uRound:f32,
|
|
}
|
|
|
|
@group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
|
\`,main:\`
|
|
vColor *= localUniforms.uColor;
|
|
modelMatrix *= localUniforms.uTransformMatrix;
|
|
\`,end:\`
|
|
if(localUniforms.uRound == 1)
|
|
{
|
|
vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
|
}
|
|
\`}},Ob={...ci,vertex:{...ci.vertex,header:ci.vertex.header.replace("group(1)","group(2)")}},Qi={name:"local-uniform-bit",vertex:{header:\`
|
|
|
|
uniform mat3 uTransformMatrix;
|
|
uniform vec4 uColor;
|
|
uniform float uRound;
|
|
\`,main:\`
|
|
vColor *= uColor;
|
|
modelMatrix = uTransformMatrix;
|
|
\`,end:\`
|
|
if(uRound == 1.)
|
|
{
|
|
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
|
}
|
|
\`}}});var Lb,Nb,Hb=p(()=>{"use strict";Lb={name:"tiling-bit",vertex:{header:\`
|
|
struct TilingUniforms {
|
|
uMapCoord:mat3x3<f32>,
|
|
uClampFrame:vec4<f32>,
|
|
uClampOffset:vec2<f32>,
|
|
uTextureTransform:mat3x3<f32>,
|
|
uSizeAnchor:vec4<f32>
|
|
};
|
|
|
|
@group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
|
|
@group(2) @binding(1) var uTexture: texture_2d<f32>;
|
|
@group(2) @binding(2) var uSampler: sampler;
|
|
\`,main:\`
|
|
uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;
|
|
|
|
position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;
|
|
\`},fragment:{header:\`
|
|
struct TilingUniforms {
|
|
uMapCoord:mat3x3<f32>,
|
|
uClampFrame:vec4<f32>,
|
|
uClampOffset:vec2<f32>,
|
|
uTextureTransform:mat3x3<f32>,
|
|
uSizeAnchor:vec4<f32>
|
|
};
|
|
|
|
@group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
|
|
@group(2) @binding(1) var uTexture: texture_2d<f32>;
|
|
@group(2) @binding(2) var uSampler: sampler;
|
|
\`,main:\`
|
|
|
|
var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);
|
|
coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;
|
|
var unclamped = coord;
|
|
coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);
|
|
|
|
var bias = 0.;
|
|
|
|
if(unclamped.x == coord.x && unclamped.y == coord.y)
|
|
{
|
|
bias = -32.;
|
|
}
|
|
|
|
outColor = textureSampleBias(uTexture, uSampler, coord, bias);
|
|
\`}},Nb={name:"tiling-bit",vertex:{header:\`
|
|
uniform mat3 uTextureTransform;
|
|
uniform vec4 uSizeAnchor;
|
|
|
|
\`,main:\`
|
|
uv = (uTextureTransform * vec3(aUV, 1.0)).xy;
|
|
|
|
position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;
|
|
\`},fragment:{header:\`
|
|
uniform sampler2D uTexture;
|
|
uniform mat3 uMapCoord;
|
|
uniform vec4 uClampFrame;
|
|
uniform vec2 uClampOffset;
|
|
\`,main:\`
|
|
|
|
vec2 coord = vUV + ceil(uClampOffset - vUV);
|
|
coord = (uMapCoord * vec3(coord, 1.0)).xy;
|
|
vec2 unclamped = coord;
|
|
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
|
|
|
|
outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0
|
|
|
|
\`}}});var of,af,bu,zb=p(()=>{nt();Pr();Ji();Br();ke();ee();ft();Hb();bu=class extends wt{constructor(){of??(of=Ve({name:"tiling-sprite-shader",bits:[ci,Lb,$e]})),af??(af=Xe({name:"tiling-sprite-shader",bits:[Qi,Nb,je]}));let t=new ct({uMapCoord:{value:new G,type:"mat3x3<f32>"},uClampFrame:{value:new Float32Array([0,0,1,1]),type:"vec4<f32>"},uClampOffset:{value:new Float32Array([0,0]),type:"vec2<f32>"},uTextureTransform:{value:new G,type:"mat3x3<f32>"},uSizeAnchor:{value:new Float32Array([100,100,.5,.5]),type:"vec4<f32>"}});super({glProgram:af,gpuProgram:of,resources:{localUniforms:new ct({uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),tilingUniforms:t,uTexture:I.EMPTY.source,uSampler:I.EMPTY.source.style}})}updateUniforms(t,e,i,s,n,o){let a=this.resources.tilingUniforms,u=o.width,l=o.height,c=o.textureMatrix,h=a.uniforms.uTextureTransform;h.set(i.a*u/t,i.b*u/e,i.c*l/t,i.d*l/e,i.tx/t,i.ty/e),h.invert(),a.uniforms.uMapCoord=c.mapCoord,a.uniforms.uClampFrame=c.uClampFrame,a.uniforms.uClampOffset=c.uClampOffset,a.uniforms.uTextureTransform=h,a.uniforms.uSizeAnchor[0]=t,a.uniforms.uSizeAnchor[1]=e,a.uniforms.uSizeAnchor[2]=s,a.uniforms.uSizeAnchor[3]=n,o&&(this.resources.uTexture=o.source,this.resources.uSampler=o.source.style)}}});var vu,Wb=p(()=>{yu();vu=class extends Zi{constructor(){super({positions:new Float32Array([0,0,1,0,1,1,0,1]),uvs:new Float32Array([0,0,1,0,1,1,0,1]),indices:new Uint32Array([0,1,2,0,2,3])})}}});function Vb(r,t){let e=r.anchor.x,i=r.anchor.y;t[0]=-e*r.width,t[1]=-i*r.height,t[2]=(1-e)*r.width,t[3]=-i*r.height,t[4]=(1-e)*r.width,t[5]=(1-i)*r.height,t[6]=-e*r.width,t[7]=(1-i)*r.height}var Xb=p(()=>{"use strict"});function $b(r,t,e,i){let s=0,n=r.length/(t||2),o=i.a,a=i.b,u=i.c,l=i.d,c=i.tx,h=i.ty;for(e*=t;s<n;){let f=r[e],d=r[e+1];r[e]=o*f+u*d+c,r[e+1]=a*f+l*d+h,e+=t,s++}}var jb=p(()=>{"use strict"});function Yb(r,t){let e=r.texture,i=e.frame.width,s=e.frame.height,n=0,o=0;r.applyAnchorToTexture&&(n=r.anchor.x,o=r.anchor.y),t[0]=t[6]=-n,t[2]=t[4]=1-n,t[1]=t[3]=-o,t[5]=t[7]=1-o;let a=G.shared;a.copyFrom(r._tileTransform.matrix),a.tx/=r.width,a.ty/=r.height,a.invert(),a.scale(r.width/i,r.height/s),$b(t,2,0,a)}var Kb=p(()=>{nt();jb()});var Tu,bn,qb=p(()=>{D();Zs();Ge();Ye();Ni();Ka();yu();zb();Wb();Xb();Kb();Tu=new vu,bn=class{constructor(t){this._state=At.default2d,this._tilingSpriteDataHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_tilingSpriteDataHash")}validateRenderable(t){let e=this._getTilingSpriteData(t),i=e.canBatch;this._updateCanBatch(t);let s=e.canBatch;if(s&&s===i){let{batchableMesh:n}=e;return!n._batcher.checkAndUpdateTexture(n,t.texture)}return i!==s}addRenderable(t,e){let i=this._renderer.renderPipes.batch;this._updateCanBatch(t);let s=this._getTilingSpriteData(t),{geometry:n,canBatch:o}=s;if(o){s.batchableMesh||(s.batchableMesh=new Mr);let a=s.batchableMesh;t.didViewUpdate&&(this._updateBatchableMesh(t),a.geometry=n,a.renderable=t,a.transform=t.groupTransform,a.setTexture(t._texture)),a.roundPixels=this._renderer._roundPixels|t._roundPixels,i.addToBatch(a,e)}else i.break(e),s.shader||(s.shader=new bu),this.updateRenderable(t),e.add(t)}execute(t){let{shader:e}=this._tilingSpriteDataHash[t.uid];e.groups[0]=this._renderer.globalUniforms.bindGroup;let i=e.resources.localUniforms.uniforms;i.uTransformMatrix=t.groupTransform,i.uRound=this._renderer._roundPixels|t._roundPixels,Ke(t.groupColorAlpha,i.uColor,0),this._state.blendMode=cr(t.groupBlendMode,t.texture._source),this._renderer.encoder.draw({geometry:Tu,shader:e,state:this._state})}updateRenderable(t){let e=this._getTilingSpriteData(t),{canBatch:i}=e;if(i){let{batchableMesh:s}=e;t.didViewUpdate&&this._updateBatchableMesh(t),s._batcher.updateElement(s)}else if(t.didViewUpdate){let{shader:s}=e;s.updateUniforms(t.width,t.height,t._tileTransform.matrix,t.anchor.x,t.anchor.y,t.texture)}}destroyRenderable(t){let e=this._getTilingSpriteData(t);e.batchableMesh=null,e.shader?.destroy(),this._tilingSpriteDataHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}_getTilingSpriteData(t){return this._tilingSpriteDataHash[t.uid]||this._initTilingSpriteData(t)}_initTilingSpriteData(t){let e=new Zi({indices:Tu.indices,positions:Tu.positions.slice(),uvs:Tu.uvs.slice()});return this._tilingSpriteDataHash[t.uid]={canBatch:!0,renderable:t,geometry:e},t.on("destroyed",this._destroyRenderableBound),this._tilingSpriteDataHash[t.uid]}_updateBatchableMesh(t){let e=this._getTilingSpriteData(t),{geometry:i}=e,s=t.texture.source.style;s.addressMode!=="repeat"&&(s.addressMode="repeat",s.update()),Yb(t,i.uvs),Vb(t,i.positions)}destroy(){for(let t in this._tilingSpriteDataHash)this.destroyRenderable(this._tilingSpriteDataHash[t].renderable);this._tilingSpriteDataHash=null,this._renderer=null}_updateCanBatch(t){let e=this._getTilingSpriteData(t),i=t.texture,s=!0;return this._renderer.type===Mt.WEBGL&&(s=this._renderer.context.supports.nonPowOf2wrapping),e.canBatch=i.textureMatrix.isSimple&&(s||i.source.isPowerOfTwo),e.canBatch}};bn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"tilingSprite"}});var uf=p(()=>{D();qb();L.add(bn)});var Zb,Jb,tv=p(()=>{yt();yu();Zb=class Qb extends Zi{constructor(...t){super({});let e=t[0]??{};typeof e=="number"&&(W($,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),e={width:e,height:t[1],verticesX:t[2],verticesY:t[3]}),this.build(e)}build(t){t={...Qb.defaultOptions,...t},this.verticesX=this.verticesX??t.verticesX,this.verticesY=this.verticesY??t.verticesY,this.width=this.width??t.width,this.height=this.height??t.height;let e=this.verticesX*this.verticesY,i=[],s=[],n=[],o=this.verticesX-1,a=this.verticesY-1,u=this.width/o,l=this.height/a;for(let h=0;h<e;h++){let f=h%this.verticesX,d=h/this.verticesX|0;i.push(f*u,d*l),s.push(f/o,d/a)}let c=o*a;for(let h=0;h<c;h++){let f=h%o,d=h/o|0,m=d*this.verticesX+f,g=d*this.verticesX+f+1,x=(d+1)*this.verticesX+f,_=(d+1)*this.verticesX+f+1;n.push(m,g,x,g,_,x)}this.buffers[0].data=new Float32Array(i),this.buffers[1].data=new Float32Array(s),this.indexBuffer.data=new Uint32Array(n),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};Zb.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};Jb=Zb});var ev,iv,sv=p(()=>{tv();ev=class rv extends Jb{constructor(t={}){t={...rv.defaultOptions,...t},super({width:t.width,height:t.height,verticesX:4,verticesY:4}),this.update(t)}update(t){this.width=t.width??this.width,this.height=t.height??this.height,this._originalWidth=t.originalWidth??this._originalWidth,this._originalHeight=t.originalHeight??this._originalHeight,this._leftWidth=t.leftWidth??this._leftWidth,this._rightWidth=t.rightWidth??this._rightWidth,this._topHeight=t.topHeight??this._topHeight,this._bottomHeight=t.bottomHeight??this._bottomHeight,this._anchorX=t.anchor?.x,this._anchorY=t.anchor?.y,this.updateUvs(),this.updatePositions()}updatePositions(){let t=this.positions,{width:e,height:i,_leftWidth:s,_rightWidth:n,_topHeight:o,_bottomHeight:a,_anchorX:u,_anchorY:l}=this,c=s+n,h=e>c?1:e/c,f=o+a,d=i>f?1:i/f,m=Math.min(h,d),g=u*e,x=l*i;t[0]=t[8]=t[16]=t[24]=-g,t[2]=t[10]=t[18]=t[26]=s*m-g,t[4]=t[12]=t[20]=t[28]=e-n*m-g,t[6]=t[14]=t[22]=t[30]=e-g,t[1]=t[3]=t[5]=t[7]=-x,t[9]=t[11]=t[13]=t[15]=o*m-x,t[17]=t[19]=t[21]=t[23]=i-a*m-x,t[25]=t[27]=t[29]=t[31]=i-x,this.getBuffer("aPosition").update()}updateUvs(){let t=this.uvs;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1;let e=1/this._originalWidth,i=1/this._originalHeight;t[2]=t[10]=t[18]=t[26]=e*this._leftWidth,t[9]=t[11]=t[13]=t[15]=i*this._topHeight,t[4]=t[12]=t[20]=t[28]=1-e*this._rightWidth,t[17]=t[19]=t[21]=t[23]=1-i*this._bottomHeight,this.getBuffer("aUV").update()}};ev.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};iv=ev});var vn,nv=p(()=>{D();Jt();Ka();sv();vn=class{constructor(t){this._gpuSpriteHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuSpriteHash")}addRenderable(t,e){let i=this._getGpuSprite(t);t.didViewUpdate&&this._updateBatchableSprite(t,i),this._renderer.renderPipes.batch.addToBatch(i,e)}updateRenderable(t){let e=this._gpuSpriteHash[t.uid];t.didViewUpdate&&this._updateBatchableSprite(t,e),e._batcher.updateElement(e)}validateRenderable(t){let e=this._getGpuSprite(t);return!e._batcher.checkAndUpdateTexture(e,t._texture)}destroyRenderable(t){let e=this._gpuSpriteHash[t.uid];j.return(e.geometry),j.return(e),this._gpuSpriteHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}_updateBatchableSprite(t,e){e.geometry.update(t),e.setTexture(t._texture)}_getGpuSprite(t){return this._gpuSpriteHash[t.uid]||this._initGPUSprite(t)}_initGPUSprite(t){let e=j.get(Mr);return e.geometry=j.get(iv),e.renderable=t,e.transform=t.groupTransform,e.texture=t._texture,e.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuSpriteHash[t.uid]=e,t.didViewUpdate||this._updateBatchableSprite(t,e),t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuSpriteHash)this._gpuSpriteHash[t].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}};vn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"nineSliceSprite"}});var lf=p(()=>{D();nv();L.add(vn)});var Tn,ov=p(()=>{D();Tn=class{constructor(t){this._renderer=t}push(t,e,i){this._renderer.renderPipes.batch.break(i),i.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:e,filterEffect:t})}pop(t,e,i){this._renderer.renderPipes.batch.break(i),i.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(t){t.action==="pushFilter"?this._renderer.filter.push(t):t.action==="popFilter"&&this._renderer.filter.pop()}destroy(){this._renderer=null}};Tn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"filter"}});function av(r,t){t.clear();let e=t.matrix;for(let i=0;i<r.length;i++){let s=r[i];s.globalDisplayStatus<7||(t.matrix=s.worldTransform,t.addBounds(s.bounds))}return t.matrix=e,t}var uv=p(()=>{"use strict"});var BD,Sn,lv=p(()=>{D();nt();_e();Cr();Pi();ee();ft();vr();Ye();ne();uv();mt();BD=new be({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),format:"float32x2",stride:2*4,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])}),Sn=class{constructor(t){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new ct({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new It({}),this.renderer=t}get activeBackTexture(){return this._activeFilterData?.backTexture}push(t){let e=this.renderer,i=t.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());let s=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,i.length===0){s.skip=!0;return}let n=s.bounds;if(t.renderables?av(t.renderables,n):t.filterEffect.filterArea?(n.clear(),n.addRect(t.filterEffect.filterArea),n.applyMatrix(t.container.worldTransform)):t.container.getFastGlobalBounds(!0,n),t.container){let m=(t.container.renderGroup||t.container.parentRenderGroup).cacheToLocalTransform;m&&n.applyMatrix(m)}let o=e.renderTarget.renderTarget.colorTexture.source,a=1/0,u=0,l=!0,c=!1,h=!1,f=!0;for(let d=0;d<i.length;d++){let m=i[d];if(a=Math.min(a,m.resolution==="inherit"?o._resolution:m.resolution),u+=m.padding,m.antialias==="off"?l=!1:m.antialias==="inherit"&&l&&(l=o.antialias),m.clipToViewport||(f=!1),!!!(m.compatibleRenderers&e.type)){h=!1;break}if(m.blendRequired&&!(e.backBuffer?.useBackBuffer??!0)){z("Blend filter requires backBuffer on WebGL renderer to be enabled. Set \`useBackBuffer: true\` in the renderer options."),h=!1;break}h=m.enabled||h,c||(c=m.blendRequired)}if(!h){s.skip=!0;return}if(f){let d=e.renderTarget.rootViewPort,m=e.renderTarget.renderTarget.resolution;n.fitBounds(0,d.width/m,0,d.height/m)}if(n.scale(a).ceil().scale(1/a).pad(u|0),!n.isPositive){s.skip=!0;return}s.skip=!1,s.bounds=n,s.blendRequired=c,s.container=t.container,s.filterEffect=t.filterEffect,s.previousRenderSurface=e.renderTarget.renderSurface,s.inputTexture=bt.getOptimalTexture(n.width,n.height,a,l),e.renderTarget.bind(s.inputTexture,!0),e.globalUniforms.push({offset:n})}pop(){let t=this.renderer;this._filterStackIndex--;let e=this._filterStack[this._filterStackIndex];if(e.skip)return;this._activeFilterData=e;let i=e.inputTexture,s=e.bounds,n=I.EMPTY;if(t.renderTarget.finishRenderPass(),e.blendRequired){let a=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,u=t.renderTarget.getRenderTarget(e.previousRenderSurface);n=this.getBackTexture(u,s,a)}e.backTexture=n;let o=e.filterEffect.filters;if(this._globalFilterBindGroup.setResource(i.source.style,2),this._globalFilterBindGroup.setResource(n.source,3),t.globalUniforms.pop(),o.length===1)o[0].apply(this,i,e.previousRenderSurface,!1),bt.returnTexture(i);else{let a=e.inputTexture,u=bt.getOptimalTexture(s.width,s.height,a.source._resolution,!1),l=0;for(l=0;l<o.length-1;++l){o[l].apply(this,a,u,!0);let h=a;a=u,u=h}o[l].apply(this,a,e.previousRenderSurface,!1),bt.returnTexture(a),bt.returnTexture(u)}e.blendRequired&&bt.returnTexture(n)}getBackTexture(t,e,i){let s=t.colorTexture.source._resolution,n=bt.getOptimalTexture(e.width,e.height,s,!1),o=e.minX,a=e.minY;i&&(o-=i.minX,a-=i.minY),o=Math.floor(o*s),a=Math.floor(a*s);let u=Math.ceil(e.width*s),l=Math.ceil(e.height*s);return this.renderer.renderTarget.copyToTexture(t,n,{x:o,y:a},{width:u,height:l},{x:0,y:0}),n}applyFilter(t,e,i,s){let n=this.renderer,o=this._filterStack[this._filterStackIndex],a=o.bounds,u=it.shared,c=o.previousRenderSurface===i,h=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,f=this._filterStackIndex-1;for(;f>0&&this._filterStack[f].skip;)--f;f>0&&(h=this._filterStack[f].inputTexture.source._resolution);let d=this._filterGlobalUniforms,m=d.uniforms,g=m.uOutputFrame,x=m.uInputSize,_=m.uInputPixel,v=m.uInputClamp,T=m.uGlobalFrame,y=m.uOutputTexture;if(c){let E=this._filterStackIndex;for(;E>0;){E--;let B=this._filterStack[this._filterStackIndex-1];if(!B.skip){u.x=B.bounds.minX,u.y=B.bounds.minY;break}}g[0]=a.minX-u.x,g[1]=a.minY-u.y}else g[0]=0,g[1]=0;g[2]=e.frame.width,g[3]=e.frame.height,x[0]=e.source.width,x[1]=e.source.height,x[2]=1/x[0],x[3]=1/x[1],_[0]=e.source.pixelWidth,_[1]=e.source.pixelHeight,_[2]=1/_[0],_[3]=1/_[1],v[0]=.5*_[2],v[1]=.5*_[3],v[2]=e.frame.width*x[2]-.5*_[2],v[3]=e.frame.height*x[3]-.5*_[3];let A=this.renderer.renderTarget.rootRenderTarget.colorTexture;T[0]=u.x*h,T[1]=u.y*h,T[2]=A.source.width*h,T[3]=A.source.height*h;let S=this.renderer.renderTarget.getRenderTarget(i);if(n.renderTarget.bind(i,!!s),i instanceof I?(y[0]=i.frame.width,y[1]=i.frame.height):(y[0]=S.width,y[1]=S.height),y[2]=S.isRoot?-1:1,d.update(),n.renderPipes.uniformBatch){let E=n.renderPipes.uniformBatch.getUboResource(d);this._globalFilterBindGroup.setResource(E,0)}else this._globalFilterBindGroup.setResource(d,0);this._globalFilterBindGroup.setResource(e.source,1),this._globalFilterBindGroup.setResource(e.source.style,2),t.groups[0]=this._globalFilterBindGroup,n.encoder.draw({geometry:BD,shader:t,state:t._state,topology:"triangle-list"}),n.type===Mt.WEBGL&&n.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new lt,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(t,e){let i=this._activeFilterData,s=t.set(i.inputTexture._source.width,0,0,i.inputTexture._source.height,i.bounds.minX,i.bounds.minY),n=e.worldTransform.copyTo(G.shared),o=e.renderGroup||e.parentRenderGroup;return o&&o.cacheToLocalTransform&&n.prepend(o.cacheToLocalTransform),n.invert(),s.prepend(n),s.scale(1/e.texture.frame.width,1/e.texture.frame.height),s.translate(e.anchor.x,e.anchor.y),s}};Sn.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"filter"}});var cf=p(()=>{D();ov();lv();L.add(Sn);L.add(Tn)});var MD={};var cv=p(()=>{ix();uc();hx();wa();Ma();gh();xh();vh();jh();ef();nf();uf();lf();cf()});var FD={};var fv=p(()=>{uc();wa();Ma();gh();xh();vh();jh();ef();nf();uf();lf();cf()});var pv,mv,gv=p(()=>{ri();Mi();ke();Ge();pv=class hf extends wt{constructor(t){t={...hf.defaultOptions,...t},super(t),this.enabled=!0,this._state=At.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource("uTexture",0,1)}apply(t,e,i,s){t.applyFilter(this,e,i,s)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){let{gpu:e,gl:i,...s}=t,n,o;return e&&(n=Te.from(e)),i&&(o=ve.from(i)),new hf({gpuProgram:n,glProgram:o,...s})}};pv.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};mv=pv});async function xv(r){if(!r)for(let t=0;t<ff.length;t++){let e=ff[t];if(e.value.test()){await e.value.load();return}}}var ff,_v=p(()=>{D();ff=[];L.handleByNamedList(b.Environment,ff)});function Su(){if(typeof wn=="boolean")return wn;try{wn=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{wn=!1}return wn}var wn,df=p(()=>{"use strict"});var Ut,ts=p(()=>{"use strict";Ut=(r=>(r[r.NONE=0]="NONE",r[r.COLOR=16384]="COLOR",r[r.STENCIL=1024]="STENCIL",r[r.DEPTH=256]="DEPTH",r[r.COLOR_DEPTH=16640]="COLOR_DEPTH",r[r.COLOR_STENCIL=17408]="COLOR_STENCIL",r[r.DEPTH_STENCIL=1280]="DEPTH_STENCIL",r[r.ALL=17664]="ALL",r))(Ut||{})});var es,pf=p(()=>{"use strict";es=class{constructor(t){this.items=[],this._name=t}emit(t,e,i,s,n,o,a,u){let{name:l,items:c}=this;for(let h=0,f=c.length;h<f;h++)c[h][l](t,e,i,s,n,o,a,u);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){let e=this.items.indexOf(t);return e!==-1&&this.items.splice(e,1),this}contains(t){return this.items.indexOf(t)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}});var RD,yv,kr,En=p(()=>{Nt();_v();Fe();df();yt();ts();pf();jt();RD=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],yv=class bv extends ht{constructor(t){super(),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;let e=[...RD,...this.config.runners??[]];this._addRunners(...e),this._unsafeEvalCheck()}async init(t={}){let e=t.skipExtensionImports===!0?!0:t.manageImports===!1;await xv(e),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(let i in this._systemsHash)t={...this._systemsHash[i].constructor.defaultOptions,...t};t={...bv.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let i=0;i<this.runners.init.items.length;i++)await this.runners.init.items[i].init(t);this._initOptions=t}render(t,e){let i=t;if(i instanceof dt&&(i={container:i},e&&(W($,"passing a second argument is deprecated, please use render options instead"),i.target=e.renderTexture)),i.target||(i.target=this.view.renderTarget),i.target===this.view.renderTarget&&(this._lastObjectRendered=i.container,i.clearColor??(i.clearColor=this.background.colorRgba),i.clear??(i.clear=this.background.clearBeforeRender)),i.clearColor){let s=Array.isArray(i.clearColor)&&i.clearColor.length===4;i.clearColor=s?i.clearColor:Z.shared.setValue(i.clearColor).toArray()}i.transform||(i.container.updateLocalTransform(),i.transform=i.container.localTransform),i.container.enableRenderGroup(),this.runners.prerender.emit(i),this.runners.renderStart.emit(i),this.runners.render.emit(i),this.runners.renderEnd.emit(i),this.runners.postrender.emit(i)}resize(t,e,i){let s=this.view.resolution;this.view.resize(t,e,i),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),i!==void 0&&i!==s&&this.runners.resolutionChange.emit(i)}clear(t={}){let e=this;t.target||(t.target=e.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=Ut.ALL);let{clear:i,clearColor:s,target:n}=t;Z.shared.setValue(s??this.background.colorRgba),e.renderTarget.clear(n,i,Z.shared.toArray())}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(e=>{this.runners[e]=new es(e)})}_addSystems(t){let e;for(e in t){let i=t[e];this._addSystem(i.value,i.name)}}_addSystem(t,e){let i=new t(this);if(this[e])throw new Error(\`Whoops! The name "\${e}" is already in use\`);this[e]=i,this._systemsHash[e]=i;for(let s in this.runners)this.runners[s].add(i);return this}_addPipes(t,e){let i=e.reduce((s,n)=>(s[n.name]=n.value,s),{});t.forEach(s=>{let n=s.value,o=s.name,a=i[o];this.renderPipes[o]=new n(this,a?new a:null)})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash=null,this.renderPipes=null}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!Su())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};yv.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};kr=yv});var Cn,Sv=p(()=>{D();nt();ti();ka();Pr();tn();en();Ji();Br();ke();ee();Cn=class{init(){let t=new ct({uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),e=Ve({name:"graphics",bits:[Fi,ki(ye()),Ob,$e]});this.shader=new wt({gpuProgram:e,resources:{localUniforms:t}})}execute(t,e){let i=e.context,s=i.customShader||this.shader,n=t.renderer,o=n.graphicsContext,{batcher:a,instructions:u}=o.getContextRenderData(i),l=n.encoder;l.setGeometry(a.geometry,s.gpuProgram);let c=n.globalUniforms.bindGroup;l.setBindGroup(0,c,s.gpuProgram);let h=n.renderPipes.uniformBatch.getUniformBindGroup(s.resources.localUniforms,!0);l.setBindGroup(2,h,s.gpuProgram);let f=u.instructions,d=null;for(let m=0;m<u.instructionSize;m++){let g=f[m];if(g.topology!==d&&(d=g.topology,l.setPipelineFromGeometryProgramAndState(a.geometry,s.gpuProgram,t.state,g.topology)),s.groups[1]=g.bindGroup,!g.gpuBindGroup){let x=g.textures;g.bindGroup=Di(x.textures,x.count),g.gpuBindGroup=n.bindGroup.getBindGroup(g.bindGroup,s.gpuProgram,1)}l.setBindGroup(1,g.bindGroup,s.gpuProgram),l.renderPassEncoder.drawIndexed(g.size,1,g.start)}}destroy(){this.shader.destroy(!0),this.shader=null}};Cn.extension={type:[b.WebGPUPipesAdaptor],name:"graphics"}});var wv,Ev,mf=p(()=>{"use strict";wv={name:"texture-bit",vertex:{header:\`
|
|
|
|
struct TextureUniforms {
|
|
uTextureMatrix:mat3x3<f32>,
|
|
}
|
|
|
|
@group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;
|
|
\`,main:\`
|
|
uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;
|
|
\`},fragment:{header:\`
|
|
@group(2) @binding(0) var uTexture: texture_2d<f32>;
|
|
@group(2) @binding(1) var uSampler: sampler;
|
|
|
|
|
|
\`,main:\`
|
|
outColor = textureSample(uTexture, uSampler, vUV);
|
|
\`}},Ev={name:"texture-bit",vertex:{header:\`
|
|
uniform mat3 uTextureMatrix;
|
|
\`,main:\`
|
|
uv = (uTextureMatrix * vec3(uv, 1.0)).xy;
|
|
\`},fragment:{header:\`
|
|
uniform sampler2D uTexture;
|
|
|
|
|
|
\`,main:\`
|
|
outColor = texture(uTexture, vUV);
|
|
\`}}});var An,Cv=p(()=>{D();nt();Pr();Ji();Br();mf();ke();ft();mt();An=class{init(){let t=Ve({name:"mesh",bits:[ci,wv,$e]});this._shader=new wt({gpuProgram:t,resources:{uTexture:I.EMPTY._source,uSampler:I.EMPTY._source.style,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new G}}}})}execute(t,e){let i=t.renderer,s=e._shader;if(!s)s=this._shader,s.groups[2]=i.texture.getTextureBindGroup(e.texture);else if(!s.gpuProgram){z("Mesh shader has no gpuProgram",e.shader);return}let n=s.gpuProgram;if(n.autoAssignGlobalUniforms&&(s.groups[0]=i.globalUniforms.bindGroup),n.autoAssignLocalUniforms){let o=t.localUniforms;s.groups[1]=i.renderPipes.uniformBatch.getUniformBindGroup(o,!0)}i.encoder.draw({geometry:e._geometry,shader:s,state:e.state})}destroy(){this._shader.destroy(!0),this._shader=null}};An.extension={type:[b.WebGPUPipesAdaptor],name:"mesh"}});var Cu,Dn,Av=p(()=>{D();Ge();ka();Cu=At.for2d(),Dn=class{start(t,e,i){let s=t.renderer,n=s.encoder,o=i.gpuProgram;this._shader=i,this._geometry=e,n.setGeometry(e,o),Cu.blendMode="normal",s.pipeline.getPipeline(e,o,Cu);let a=s.globalUniforms.bindGroup;n.resetBindGroup(1),n.setBindGroup(0,a,o)}execute(t,e){let i=this._shader.gpuProgram,s=t.renderer,n=s.encoder;if(!e.bindGroup){let u=e.textures;e.bindGroup=Di(u.textures,u.count)}Cu.blendMode=e.blendMode;let o=s.bindGroup.getBindGroup(e.bindGroup,i,1),a=s.pipeline.getPipeline(this._geometry,i,Cu,e.topology);e.bindGroup._touch(s.textureGC.count),n.setPipeline(a),n.renderPassEncoder.setBindGroup(1,o),n.renderPassEncoder.drawIndexed(e.size,1,e.start)}};Dn.extension={type:[b.WebGPUPipesAdaptor],name:"batch"}});var Pn,Dv=p(()=>{D();Pn=class{constructor(t){this._renderer=t}updateRenderable(){}destroyRenderable(){}validateRenderable(){return!1}addRenderable(t,e){this._renderer.renderPipes.batch.break(e),e.add(t)}execute(t){t.isRenderable&&t.render(this._renderer)}destroy(){this._renderer=null}};Pn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"customRender"}});function Bn(r,t){let e=r.instructionSet,i=e.instructions;for(let s=0;s<e.instructionSize;s++){let n=i[s];t[n.renderPipeId].execute(n)}}var gf=p(()=>{"use strict"});var kD,Mn,Pv=p(()=>{D();nt();Jt();hn();gf();kD=new G,Mn=class{constructor(t){this._renderer=t}addRenderGroup(t,e){t.isCachedAsTexture?this._addRenderableCacheAsTexture(t,e):this._addRenderableDirect(t,e)}execute(t){t.isRenderable&&(t.isCachedAsTexture?this._executeCacheAsTexture(t):this._executeDirect(t))}destroy(){this._renderer=null}_addRenderableDirect(t,e){this._renderer.renderPipes.batch.break(e),t._batchableRenderGroup&&(j.return(t._batchableRenderGroup),t._batchableRenderGroup=null),e.add(t)}_addRenderableCacheAsTexture(t,e){let i=t._batchableRenderGroup??(t._batchableRenderGroup=j.get(qe));i.renderable=t.root,i.transform=t.root.relativeGroupTransform,i.texture=t.texture,i.bounds=t._textureBounds,e.add(t),this._renderer.renderPipes.batch.addToBatch(i,e)}_executeCacheAsTexture(t){if(t.textureNeedsUpdate){t.textureNeedsUpdate=!1;let e=kD.identity().translate(-t._textureBounds.x,-t._textureBounds.y);this._renderer.renderTarget.push(t.texture,!0,null,t.texture.frame),this._renderer.globalUniforms.push({worldTransformMatrix:e,worldColor:4294967295}),Bn(t,this._renderer.renderPipes),this._renderer.renderTarget.finishRenderPass(),this._renderer.renderTarget.pop(),this._renderer.globalUniforms.pop()}t._batchableRenderGroup._batcher.updateElement(t._batchableRenderGroup),t._batchableRenderGroup._batcher.geometry.buffers[0].update()}_executeDirect(t){this._renderer.globalUniforms.push({worldTransformMatrix:t.inverseParentTextureTransform,worldColor:t.worldColorAlpha}),Bn(t,this._renderer.renderPipes),this._renderer.globalUniforms.pop()}};Mn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"renderGroup"}});function Fn(r,t){t||(t=0);for(let e=t;e<r.length&&r[e];e++)r[e]=null}var xf=p(()=>{"use strict"});function _f(r,t=!1){ID(r);let e=r.childrenToUpdate,i=r.updateTick++;for(let s in e){let n=Number(s),o=e[s],a=o.list,u=o.index;for(let l=0;l<u;l++){let c=a[l];c.parentRenderGroup===r&&c.relativeRenderGroupDepth===n&&Fv(c,i,0)}Fn(a,u),o.index=0}if(t)for(let s=0;s<r.renderGroupChildren.length;s++)_f(r.renderGroupChildren[s],t)}function ID(r){let t=r.root,e;if(r.renderGroupParent){let i=r.renderGroupParent;r.worldTransform.appendFrom(t.relativeGroupTransform,i.worldTransform),r.worldColor=yi(t.groupColor,i.worldColor),e=t.groupAlpha*i.worldAlpha}else r.worldTransform.copyFrom(t.localTransform),r.worldColor=t.localColor,e=t.localAlpha;e=e<0?0:e>1?1:e,r.worldAlpha=e,r.worldColorAlpha=r.worldColor+((e*255|0)<<24)}function Fv(r,t,e){if(t===r.updateTick)return;r.updateTick=t,r.didChange=!1;let i=r.localTransform;r.updateLocalTransform();let s=r.parent;if(s&&!s.renderGroup?(e|=r._updateFlags,r.relativeGroupTransform.appendFrom(i,s.relativeGroupTransform),e&Bv&&Mv(r,s,e)):(e=r._updateFlags,r.relativeGroupTransform.copyFrom(i),e&Bv&&Mv(r,GD,e)),!r.renderGroup){let n=r.children,o=n.length;for(let l=0;l<o;l++)Fv(n[l],t,e);let a=r.parentRenderGroup,u=r;u.renderPipeId&&!a.structureDidChange&&a.updateRenderable(u)}}function Mv(r,t,e){if(e&Si){r.groupColor=yi(r.localColor,t.groupColor);let i=r.localAlpha*t.groupAlpha;i=i<0?0:i>1?1:i,r.groupAlpha=i,r.groupColorAlpha=r.groupColor+((i*255|0)<<24)}e&Us&&(r.groupBlendMode=r.localBlendMode==="inherit"?t.groupBlendMode:r.localBlendMode),e&Zr&&(r.globalDisplayStatus=r.localDisplayStatus&t.globalDisplayStatus),r._updateFlags=0}var GD,Bv,Rv=p(()=>{Fe();xf();Wl();GD=new dt,Bv=Zr|Si|Us});function kv(r,t){let{list:e,index:i}=r.childrenRenderablesToUpdate,s=!1;for(let n=0;n<i;n++){let o=e[n];if(s=t[o.renderPipeId].validateRenderable(o),s)break}return r.structureDidChange=s,s}var Gv=p(()=>{"use strict"});var UD,Rn,Iv=p(()=>{D();nt();vr();ne();xf();gf();Rv();Gv();UD=new G,Rn=class{constructor(t){this._renderer=t}render({container:t,transform:e}){let i=t.parent,s=t.renderGroup.renderGroupParent;t.parent=null,t.renderGroup.renderGroupParent=null;let n=this._renderer,o=UD;e&&(o=o.copyFrom(t.renderGroup.localTransform),t.renderGroup.localTransform.copyFrom(e));let a=n.renderPipes;this._updateCachedRenderGroups(t.renderGroup,null),this._updateRenderGroups(t.renderGroup),n.globalUniforms.start({worldTransformMatrix:e?t.renderGroup.localTransform:t.renderGroup.worldTransform,worldColor:t.renderGroup.worldColorAlpha}),Bn(t.renderGroup,a),a.uniformBatch&&a.uniformBatch.renderEnd(),e&&t.renderGroup.localTransform.copyFrom(o),t.parent=i,t.renderGroup.renderGroupParent=s}destroy(){this._renderer=null}_updateCachedRenderGroups(t,e){if(t.isCachedAsTexture){if(!t.updateCacheTexture)return;e=t}t._parentCacheAsTextureRenderGroup=e;for(let i=t.renderGroupChildren.length-1;i>=0;i--)this._updateCachedRenderGroups(t.renderGroupChildren[i],e);if(t.invalidateMatrices(),t.isCachedAsTexture){if(t.textureNeedsUpdate){let i=t.root.getLocalBounds();i.ceil();let s=t.texture;t.texture&&bt.returnTexture(t.texture);let n=this._renderer,o=t.textureOptions.resolution||n.view.resolution,a=t.textureOptions.antialias??n.view.antialias;t.texture=bt.getOptimalTexture(i.width,i.height,o,a),t._textureBounds||(t._textureBounds=new lt),t._textureBounds.copyFrom(i),s!==t.texture&&t.renderGroupParent&&(t.renderGroupParent.structureDidChange=!0)}}else t.texture&&(bt.returnTexture(t.texture),t.texture=null)}_updateRenderGroups(t){let e=this._renderer,i=e.renderPipes;if(t.runOnRender(e),t.instructionSet.renderPipes=i,t.structureDidChange?Fn(t.childrenRenderablesToUpdate.list,0):kv(t,i),_f(t),t.structureDidChange?(t.structureDidChange=!1,this._buildInstructions(t,e)):this._updateRenderables(t),t.childrenRenderablesToUpdate.index=0,e.renderPipes.batch.upload(t.instructionSet),!(t.isCachedAsTexture&&!t.textureNeedsUpdate))for(let s=0;s<t.renderGroupChildren.length;s++)this._updateRenderGroups(t.renderGroupChildren[s])}_updateRenderables(t){let{list:e,index:i}=t.childrenRenderablesToUpdate;for(let s=0;s<i;s++){let n=e[s];n.didViewUpdate&&t.updateRenderable(n)}Fn(e,i)}_buildInstructions(t,e){let i=t.root,s=t.instructionSet;s.reset();let n=e.renderPipes?e:e.batch.renderer,o=n.renderPipes;o.batch.buildStart(s),o.blendMode.buildStart(),o.colorMask.buildStart(),i.sortableChildren&&i.sortChildren(),i.collectRenderablesWithEffects(s,n,null),o.batch.buildEnd(s),o.blendMode.buildEnd(s)}};Rn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"renderGroup"}});var kn,Uv=p(()=>{D();Jt();hn();kn=class{constructor(t){this._gpuSpriteHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuSpriteHash")}addRenderable(t,e){let i=this._getGpuSprite(t);t.didViewUpdate&&this._updateBatchableSprite(t,i),this._renderer.renderPipes.batch.addToBatch(i,e)}updateRenderable(t){let e=this._gpuSpriteHash[t.uid];t.didViewUpdate&&this._updateBatchableSprite(t,e),e._batcher.updateElement(e)}validateRenderable(t){let e=this._getGpuSprite(t);return!e._batcher.checkAndUpdateTexture(e,t._texture)}destroyRenderable(t){let e=this._gpuSpriteHash[t.uid];j.return(e),this._gpuSpriteHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}_updateBatchableSprite(t,e){e.bounds=t.visualBounds,e.texture=t._texture}_getGpuSprite(t){return this._gpuSpriteHash[t.uid]||this._initGPUSprite(t)}_initGPUSprite(t){let e=j.get(qe);return e.renderable=t,e.transform=t.groupTransform,e.texture=t._texture,e.bounds=t.visualBounds,e.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuSpriteHash[t.uid]=e,t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuSpriteHash)j.return(this._gpuSpriteHash[t]);this._gpuSpriteHash=null,this._renderer=null}};kn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"sprite"}});var rs,yf=p(()=>{jt();rs="8.8.1"});var Gn,In,bf=p(()=>{D();yf();Gn=class{static init(){globalThis.__PIXI_APP_INIT__?.(this,rs)}static destroy(){}};Gn.extension=b.Application;In=class{constructor(t){this._renderer=t}init(){globalThis.__PIXI_RENDERER_INIT__?.(this._renderer,rs)}destroy(){this._renderer=null}};In.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"initHook",priority:-10}});var vf,Tf,Lv=p(()=>{D();Ge();qc();vf=class Ov{constructor(t,e){this.state=At.for2d(),this._batchersByInstructionSet=Object.create(null),this._activeBatches=Object.create(null),this.renderer=t,this._adaptor=e,this._adaptor.init?.(this)}static getBatcher(t){return new this._availableBatchers[t]}buildStart(t){let e=this._batchersByInstructionSet[t.uid];e||(e=this._batchersByInstructionSet[t.uid]=Object.create(null),e.default||(e.default=new rn)),this._activeBatches=e,this._activeBatch=this._activeBatches.default;for(let i in this._activeBatches)this._activeBatches[i].begin()}addToBatch(t,e){if(this._activeBatch.name!==t.batcherName){this._activeBatch.break(e);let i=this._activeBatches[t.batcherName];i||(i=this._activeBatches[t.batcherName]=Ov.getBatcher(t.batcherName),i.begin()),this._activeBatch=i}this._activeBatch.add(t)}break(t){this._activeBatch.break(t)}buildEnd(t){this._activeBatch.break(t);let e=this._activeBatches;for(let i in e){let s=e[i],n=s.geometry;n.indexBuffer.setDataWithSize(s.indexBuffer,s.indexSize,!0),n.buffers[0].setDataWithSize(s.attributeBuffer.float32View,s.attributeSize,!1)}}upload(t){let e=this._batchersByInstructionSet[t.uid];for(let i in e){let s=e[i],n=s.geometry;s.dirty&&(s.dirty=!1,n.buffers[0].update(s.attributeSize*4))}}execute(t){if(t.action==="startBatch"){let e=t.batcher,i=e.geometry,s=e.shader;this._adaptor.start(this,i,s)}this._adaptor.execute(this,t)}destroy(){this.state=null,this.renderer=null,this._adaptor=null;for(let t in this._activeBatches)this._activeBatches[t].destroy();this._activeBatches=null}};vf.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"batch"};vf._availableBatchers=Object.create(null);Tf=vf;L.handleByMap(b.Batcher,Tf._availableBatchers);L.add(rn)});var Nv,Hv=p(()=>{Nv=\`in vec2 vMaskCoord;
|
|
in vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uTexture;
|
|
uniform sampler2D uMaskTexture;
|
|
|
|
uniform float uAlpha;
|
|
uniform vec4 uMaskClamp;
|
|
uniform float uInverse;
|
|
|
|
out vec4 finalColor;
|
|
|
|
void main(void)
|
|
{
|
|
float clip = step(3.5,
|
|
step(uMaskClamp.x, vMaskCoord.x) +
|
|
step(uMaskClamp.y, vMaskCoord.y) +
|
|
step(vMaskCoord.x, uMaskClamp.z) +
|
|
step(vMaskCoord.y, uMaskClamp.w));
|
|
|
|
// TODO look into why this is needed
|
|
float npmAlpha = uAlpha;
|
|
vec4 original = texture(uTexture, vTextureCoord);
|
|
vec4 masky = texture(uMaskTexture, vMaskCoord);
|
|
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
|
|
|
|
float a = alphaMul * masky.r * npmAlpha * clip;
|
|
|
|
if (uInverse == 1.0) {
|
|
a = 1.0 - a;
|
|
}
|
|
|
|
finalColor = original * a;
|
|
}
|
|
\`});var zv,Wv=p(()=>{zv=\`in vec2 aPosition;
|
|
|
|
out vec2 vTextureCoord;
|
|
out vec2 vMaskCoord;
|
|
|
|
|
|
uniform vec4 uInputSize;
|
|
uniform vec4 uOutputFrame;
|
|
uniform vec4 uOutputTexture;
|
|
uniform mat3 uFilterMatrix;
|
|
|
|
vec4 filterVertexPosition( vec2 aPosition )
|
|
{
|
|
vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
|
|
|
|
position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
|
|
position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;
|
|
|
|
return vec4(position, 0.0, 1.0);
|
|
}
|
|
|
|
vec2 filterTextureCoord( vec2 aPosition )
|
|
{
|
|
return aPosition * (uOutputFrame.zw * uInputSize.zw);
|
|
}
|
|
|
|
vec2 getFilterCoord( vec2 aPosition )
|
|
{
|
|
return ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = filterVertexPosition(aPosition);
|
|
vTextureCoord = filterTextureCoord(aPosition);
|
|
vMaskCoord = getFilterCoord(aPosition);
|
|
}
|
|
\`});var Sf,Vv=p(()=>{Sf=\`struct GlobalFilterUniforms {
|
|
uInputSize:vec4<f32>,
|
|
uInputPixel:vec4<f32>,
|
|
uInputClamp:vec4<f32>,
|
|
uOutputFrame:vec4<f32>,
|
|
uGlobalFrame:vec4<f32>,
|
|
uOutputTexture:vec4<f32>,
|
|
};
|
|
|
|
struct MaskUniforms {
|
|
uFilterMatrix:mat3x3<f32>,
|
|
uMaskClamp:vec4<f32>,
|
|
uAlpha:f32,
|
|
uInverse:f32,
|
|
};
|
|
|
|
@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
|
|
@group(0) @binding(1) var uTexture: texture_2d<f32>;
|
|
@group(0) @binding(2) var uSampler : sampler;
|
|
|
|
@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;
|
|
@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;
|
|
|
|
struct VSOutput {
|
|
@builtin(position) position: vec4<f32>,
|
|
@location(0) uv : vec2<f32>,
|
|
@location(1) filterUv : vec2<f32>,
|
|
};
|
|
|
|
fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
|
|
{
|
|
var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;
|
|
|
|
position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
|
|
position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;
|
|
|
|
return vec4(position, 0.0, 1.0);
|
|
}
|
|
|
|
fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
|
|
{
|
|
return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
|
|
}
|
|
|
|
fn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
|
|
{
|
|
return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);
|
|
}
|
|
|
|
fn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>
|
|
{
|
|
return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;
|
|
}
|
|
|
|
fn getSize() -> vec2<f32>
|
|
{
|
|
return gfu.uGlobalFrame.zw;
|
|
}
|
|
|
|
@vertex
|
|
fn mainVertex(
|
|
@location(0) aPosition : vec2<f32>,
|
|
) -> VSOutput {
|
|
return VSOutput(
|
|
filterVertexPosition(aPosition),
|
|
filterTextureCoord(aPosition),
|
|
getFilterCoord(aPosition)
|
|
);
|
|
}
|
|
|
|
@fragment
|
|
fn mainFragment(
|
|
@location(0) uv: vec2<f32>,
|
|
@location(1) filterUv: vec2<f32>,
|
|
@builtin(position) position: vec4<f32>
|
|
) -> @location(0) vec4<f32> {
|
|
|
|
var maskClamp = filterUniforms.uMaskClamp;
|
|
var uAlpha = filterUniforms.uAlpha;
|
|
|
|
var clip = step(3.5,
|
|
step(maskClamp.x, filterUv.x) +
|
|
step(maskClamp.y, filterUv.y) +
|
|
step(filterUv.x, maskClamp.z) +
|
|
step(filterUv.y, maskClamp.w));
|
|
|
|
var mask = textureSample(uMaskTexture, uSampler, filterUv);
|
|
var source = textureSample(uTexture, uSampler, uv);
|
|
var alphaMul = 1.0 - uAlpha * (1.0 - mask.a);
|
|
|
|
var a: f32 = alphaMul * mask.r * uAlpha * clip;
|
|
|
|
if (filterUniforms.uInverse == 1.0) {
|
|
a = 1.0 - a;
|
|
}
|
|
|
|
return source * a;
|
|
}
|
|
\`});var Au,Xv=p(()=>{nt();ri();Mi();ee();Jl();gv();Hv();Wv();Vv();Au=class extends mv{constructor(t){let{sprite:e,...i}=t,s=new Ti(e.texture),n=new ct({uFilterMatrix:{value:new G,type:"mat3x3<f32>"},uMaskClamp:{value:s.uClampFrame,type:"vec4<f32>"},uAlpha:{value:1,type:"f32"},uInverse:{value:t.inverse?1:0,type:"f32"}}),o=Te.from({vertex:{source:Sf,entryPoint:"mainVertex"},fragment:{source:Sf,entryPoint:"mainFragment"}}),a=ve.from({vertex:zv,fragment:Nv,name:"mask-filter"});super({...i,gpuProgram:o,glProgram:a,resources:{filterUniforms:n,uMaskTexture:e.texture.source}}),this.sprite=e,this._textureMatrix=s}set inverse(t){this.resources.filterUniforms.uniforms.uInverse=t?1:0}get inverse(){return this.resources.filterUniforms.uniforms.uInverse===1}apply(t,e,i,s){this._textureMatrix.texture=this.sprite.texture,t.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix,this.sprite).prepend(this._textureMatrix.mapCoord),this.resources.uMaskTexture=this.sprite.texture.source,t.applyFilter(this,e,i,s)}}});var OD,wf,Un,$v=p(()=>{D();aa();Xv();ne();ks();Sc();Jt();ft();vr();Ye();OD=new lt,wf=class extends or{constructor(){super(),this.filters=[new Au({sprite:new Jr(I.EMPTY),inverse:!1,resolution:"inherit",antialias:"inherit"})]}get sprite(){return this.filters[0].sprite}set sprite(t){this.filters[0].sprite=t}get inverse(){return this.filters[0].inverse}set inverse(t){this.filters[0].inverse=t}},Un=class{constructor(t){this._activeMaskStage=[],this._renderer=t}push(t,e,i){let s=this._renderer;if(s.renderPipes.batch.break(i),i.add({renderPipeId:"alphaMask",action:"pushMaskBegin",mask:t,inverse:e._maskOptions.inverse,canBundle:!1,maskedContainer:e}),t.inverse=e._maskOptions.inverse,t.renderMaskToTexture){let n=t.mask;n.includeInBuild=!0,n.collectRenderables(i,s,null),n.includeInBuild=!1}s.renderPipes.batch.break(i),i.add({renderPipeId:"alphaMask",action:"pushMaskEnd",mask:t,maskedContainer:e,inverse:e._maskOptions.inverse,canBundle:!1})}pop(t,e,i){this._renderer.renderPipes.batch.break(i),i.add({renderPipeId:"alphaMask",action:"popMaskEnd",mask:t,inverse:e._maskOptions.inverse,canBundle:!1})}execute(t){let e=this._renderer,i=t.mask.renderMaskToTexture;if(t.action==="pushMaskBegin"){let s=j.get(wf);if(s.inverse=t.inverse,i){t.mask.mask.measurable=!0;let n=_i(t.mask.mask,!0,OD);t.mask.mask.measurable=!1,n.ceil();let o=e.renderTarget.renderTarget.colorTexture.source,a=bt.getOptimalTexture(n.width,n.height,o._resolution,o.antialias);e.renderTarget.push(a,!0),e.globalUniforms.push({offset:n,worldColor:4294967295});let u=s.sprite;u.texture=a,u.worldTransform.tx=n.minX,u.worldTransform.ty=n.minY,this._activeMaskStage.push({filterEffect:s,maskedContainer:t.maskedContainer,filterTexture:a})}else s.sprite=t.mask.mask,this._activeMaskStage.push({filterEffect:s,maskedContainer:t.maskedContainer})}else if(t.action==="pushMaskEnd"){let s=this._activeMaskStage[this._activeMaskStage.length-1];i&&(e.type===Mt.WEBGL&&e.renderTarget.finishRenderPass(),e.renderTarget.pop(),e.globalUniforms.pop()),e.filter.push({renderPipeId:"filter",action:"pushFilter",container:s.maskedContainer,filterEffect:s.filterEffect,canBundle:!1})}else if(t.action==="popMaskEnd"){e.filter.pop();let s=this._activeMaskStage.pop();i&&bt.returnTexture(s.filterTexture),j.return(s.filterEffect)}}destroy(){this._renderer=null,this._activeMaskStage=null}};Un.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"alphaMask"}});var On,jv=p(()=>{D();On=class{constructor(t){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=t}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(t,e,i){this._renderer.renderPipes.batch.break(i);let n=this._colorStack;n[this._colorStackIndex]=n[this._colorStackIndex-1]&t.mask;let o=this._colorStack[this._colorStackIndex];o!==this._currentColor&&(this._currentColor=o,i.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1})),this._colorStackIndex++}pop(t,e,i){this._renderer.renderPipes.batch.break(i);let n=this._colorStack;this._colorStackIndex--;let o=n[this._colorStackIndex-1];o!==this._currentColor&&(this._currentColor=o,i.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1}))}execute(t){this._renderer.colorMask.setMask(t.colorMask)}destroy(){this._colorStack=null}};On.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"colorMask"}});var Ln,Yv=p(()=>{D();ts();ei();Ln=class{constructor(t){this._maskStackHash={},this._maskHash=new WeakMap,this._renderer=t}push(t,e,i){var s;let n=t,o=this._renderer;o.renderPipes.batch.break(i),o.renderPipes.blendMode.setBlendMode(n.mask,"none",i),i.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:t,inverse:e._maskOptions.inverse,canBundle:!1});let a=n.mask;a.includeInBuild=!0,this._maskHash.has(n)||this._maskHash.set(n,{instructionsStart:0,instructionsLength:0});let u=this._maskHash.get(n);u.instructionsStart=i.instructionSize,a.collectRenderables(i,o,null),a.includeInBuild=!1,o.renderPipes.batch.break(i),i.add({renderPipeId:"stencilMask",action:"pushMaskEnd",mask:t,inverse:e._maskOptions.inverse,canBundle:!1});let l=i.instructionSize-u.instructionsStart-1;u.instructionsLength=l;let c=o.renderTarget.renderTarget.uid;(s=this._maskStackHash)[c]??(s[c]=0)}pop(t,e,i){let s=t,n=this._renderer;n.renderPipes.batch.break(i),n.renderPipes.blendMode.setBlendMode(s.mask,"none",i),i.add({renderPipeId:"stencilMask",action:"popMaskBegin",inverse:e._maskOptions.inverse,canBundle:!1});let o=this._maskHash.get(t);for(let a=0;a<o.instructionsLength;a++)i.instructions[i.instructionSize++]=i.instructions[o.instructionsStart++];i.add({renderPipeId:"stencilMask",action:"popMaskEnd",canBundle:!1})}execute(t){var e;let i=this._renderer,s=i.renderTarget.renderTarget.uid,n=(e=this._maskStackHash)[s]??(e[s]=0);t.action==="pushMaskBegin"?(i.renderTarget.ensureDepthStencil(),i.stencil.setStencilMode(pt.RENDERING_MASK_ADD,n),n++,i.colorMask.setMask(0)):t.action==="pushMaskEnd"?(t.inverse?i.stencil.setStencilMode(pt.INVERSE_MASK_ACTIVE,n):i.stencil.setStencilMode(pt.MASK_ACTIVE,n),i.colorMask.setMask(15)):t.action==="popMaskBegin"?(i.colorMask.setMask(0),n!==0?i.stencil.setStencilMode(pt.RENDERING_MASK_REMOVE,n):(i.renderTarget.clear(null,Ut.STENCIL),i.stencil.setStencilMode(pt.DISABLED,n)),n--):t.action==="popMaskEnd"&&(t.inverse?i.stencil.setStencilMode(pt.INVERSE_MASK_ACTIVE,n):i.stencil.setStencilMode(pt.MASK_ACTIVE,n),i.colorMask.setMask(15)),this._maskStackHash[s]=n}destroy(){this._renderer=null,this._maskStackHash=null,this._maskHash=null}};Ln.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"stencilMask"}});var Ef,qv,Zv=p(()=>{Nt();D();Ef=class Kv{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Z(0),this.color=this._backgroundColor,this.alpha=1}init(t){t={...Kv.defaultOptions,...t},this.clearBeforeRender=t.clearBeforeRender,this.color=t.background||t.backgroundColor||this._backgroundColor,this.alpha=t.backgroundAlpha,this._backgroundColor.setAlpha(t.backgroundAlpha)}get color(){return this._backgroundColor}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get colorRgba(){return this._backgroundColor.toArray()}destroy(){}};Ef.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"background",priority:0};Ef.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};qv=Ef});var Nn,Hn,Qv=p(()=>{D();aa();mt();Nn={};L.handle(b.BlendMode,r=>{if(!r.name)throw new Error("BlendMode extension must have a name property");Nn[r.name]=r.ref},r=>{delete Nn[r.name]});Hn=class{constructor(t){this._isAdvanced=!1,this._filterHash=Object.create(null),this._renderer=t,this._renderer.runners.prerender.add(this)}prerender(){this._activeBlendMode="normal",this._isAdvanced=!1}setBlendMode(t,e,i){if(this._activeBlendMode===e){this._isAdvanced&&this._renderableList.push(t);return}this._activeBlendMode=e,this._isAdvanced&&this._endAdvancedBlendMode(i),this._isAdvanced=!!Nn[e],this._isAdvanced&&(this._beginAdvancedBlendMode(i),this._renderableList.push(t))}_beginAdvancedBlendMode(t){this._renderer.renderPipes.batch.break(t);let e=this._activeBlendMode;if(!Nn[e]){z(\`Unable to assign BlendMode: '\${e}'. You may want to include: import 'pixi.js/advanced-blend-modes'\`);return}let i=this._filterHash[e];i||(i=this._filterHash[e]=new or,i.filters=[new Nn[e]]);let s={renderPipeId:"filter",action:"pushFilter",renderables:[],filterEffect:i,canBundle:!1};this._renderableList=s.renderables,t.add(s)}_endAdvancedBlendMode(t){this._renderableList=null,this._renderer.renderPipes.batch.break(t),t.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}buildStart(){this._isAdvanced=!1}buildEnd(t){this._isAdvanced&&this._endAdvancedBlendMode(t)}destroy(){this._renderer=null,this._renderableList=null;for(let t in this._filterHash)this._filterHash[t].destroy();this._filterHash=null}};Hn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"blendMode"}});var Cf,Af,tT,eT=p(()=>{D();Fe();ft();Cf={png:"image/png",jpg:"image/jpeg",webp:"image/webp"},Af=class Jv{constructor(t){this._renderer=t}_normalizeOptions(t,e={}){return t instanceof dt||t instanceof I?{target:t,...e}:{...e,...t}}async image(t){let e=new Image;return e.src=await this.base64(t),e}async base64(t){t=this._normalizeOptions(t,Jv.defaultImageOptions);let{format:e,quality:i}=t,s=this.canvas(t);if(s.toBlob!==void 0)return new Promise((n,o)=>{s.toBlob(a=>{if(!a){o(new Error("ICanvas.toBlob failed!"));return}let u=new FileReader;u.onload=()=>n(u.result),u.onerror=o,u.readAsDataURL(a)},Cf[e],i)});if(s.toDataURL!==void 0)return s.toDataURL(Cf[e],i);if(s.convertToBlob!==void 0){let n=await s.convertToBlob({type:Cf[e],quality:i});return new Promise((o,a)=>{let u=new FileReader;u.onload=()=>o(u.result),u.onerror=a,u.readAsDataURL(n)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(t){t=this._normalizeOptions(t);let e=t.target,i=this._renderer;if(e instanceof I)return i.texture.generateCanvas(e);let s=i.textureGenerator.generateTexture(t),n=i.texture.generateCanvas(s);return s.destroy(!0),n}pixels(t){t=this._normalizeOptions(t);let e=t.target,i=this._renderer,s=e instanceof I?e:i.textureGenerator.generateTexture(t),n=i.texture.getPixels(s);return e instanceof dt&&s.destroy(!0),n}texture(t){return t=this._normalizeOptions(t),t.target instanceof I?t.target:this._renderer.textureGenerator.generateTexture(t)}download(t){t=this._normalizeOptions(t);let e=this.canvas(t),i=document.createElement("a");i.download=t.filename??"image.png",i.href=e.toDataURL("image/png"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}log(t){let e=t.width??200;t=this._normalizeOptions(t);let i=this.canvas(t),s=i.toDataURL();console.log(\`[Pixi Texture] \${i.width}px \${i.height}px\`);let n=["font-size: 1px;",\`padding: \${e}px 300px;\`,\`background: url(\${s}) no-repeat;\`,"background-size: contain;"].join(" ");console.log("%c ",n)}destroy(){this._renderer=null}};Af.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"extract"};Af.defaultImageOptions={format:"png",quality:1};tT=Af});var Du,rT=p(()=>{oe();ft();Du=class r extends I{static create(t){return new r({source:new ut(t)})}resize(t,e,i){return this.source.resize(t,e,i),this}}});var LD,ND,HD,zn,iT=p(()=>{Nt();D();nt();Wt();ne();fa();Fe();rT();LD=new tt,ND=new lt,HD=[0,0,0,0],zn=class{constructor(t){this._renderer=t}generateTexture(t){t instanceof dt&&(t={target:t,frame:void 0,textureSourceOptions:{},resolution:void 0});let e=t.resolution||this._renderer.resolution,i=t.antialias||this._renderer.view.antialias,s=t.target,n=t.clearColor;n?n=Array.isArray(n)&&n.length===4?n:Z.shared.setValue(n).toArray():n=HD;let o=t.frame?.copyTo(LD)||bi(s,ND).rectangle;o.width=Math.max(o.width,1/e)|0,o.height=Math.max(o.height,1/e)|0;let a=Du.create({...t.textureSourceOptions,width:o.width,height:o.height,resolution:e,antialias:i}),u=G.shared.translate(-o.x,-o.y);return this._renderer.render({container:s,transform:u,target:a,clearColor:n}),a.source.updateMipmaps(),a}destroy(){this._renderer=null}};zn.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"textureGenerator"}});var Wn,sT=p(()=>{D();nt();_e();Ni();Cr();Ye();ee();Wn=class{constructor(t){this._stackIndex=0,this._globalUniformDataStack=[],this._uniformsPool=[],this._activeUniforms=[],this._bindGroupPool=[],this._activeBindGroups=[],this._renderer=t}reset(){this._stackIndex=0;for(let t=0;t<this._activeUniforms.length;t++)this._uniformsPool.push(this._activeUniforms[t]);for(let t=0;t<this._activeBindGroups.length;t++)this._bindGroupPool.push(this._activeBindGroups[t]);this._activeUniforms.length=0,this._activeBindGroups.length=0}start(t){this.reset(),this.push(t)}bind({size:t,projectionMatrix:e,worldTransformMatrix:i,worldColor:s,offset:n}){let o=this._renderer.renderTarget.renderTarget,a=this._stackIndex?this._globalUniformDataStack[this._stackIndex-1]:{projectionData:o,worldTransformMatrix:new G,worldColor:4294967295,offset:new it},u={projectionMatrix:e||this._renderer.renderTarget.projectionMatrix,resolution:t||o.size,worldTransformMatrix:i||a.worldTransformMatrix,worldColor:s||a.worldColor,offset:n||a.offset,bindGroup:null},l=this._uniformsPool.pop()||this._createUniforms();this._activeUniforms.push(l);let c=l.uniforms;c.uProjectionMatrix=u.projectionMatrix,c.uResolution=u.resolution,c.uWorldTransformMatrix.copyFrom(u.worldTransformMatrix),c.uWorldTransformMatrix.tx-=u.offset.x,c.uWorldTransformMatrix.ty-=u.offset.y,Ke(u.worldColor,c.uWorldColorAlpha,0),l.update();let h;this._renderer.renderPipes.uniformBatch?h=this._renderer.renderPipes.uniformBatch.getUniformBindGroup(l,!1):(h=this._bindGroupPool.pop()||new It,this._activeBindGroups.push(h),h.setResource(l,0)),u.bindGroup=h,this._currentGlobalUniformData=u}push(t){this.bind(t),this._globalUniformDataStack[this._stackIndex++]=this._currentGlobalUniformData}pop(){this._currentGlobalUniformData=this._globalUniformDataStack[--this._stackIndex-1],this._renderer.type===Mt.WEBGL&&this._currentGlobalUniformData.bindGroup.resources[0].update()}get bindGroup(){return this._currentGlobalUniformData.bindGroup}get globalUniformData(){return this._currentGlobalUniformData}get uniformGroup(){return this._currentGlobalUniformData.bindGroup.resources[0]}_createUniforms(){return new ct({uProjectionMatrix:{value:new G,type:"mat3x3<f32>"},uWorldTransformMatrix:{value:new G,type:"mat3x3<f32>"},uWorldColorAlpha:{value:new Float32Array(4),type:"vec4<f32>"},uResolution:{value:[0,0],type:"vec2<f32>"}},{isStatic:!0})}destroy(){this._renderer=null}};Wn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"globalUniforms"}});var zD,Vn,nT=p(()=>{D();Ns();zD=1,Vn=class{constructor(){this._tasks=[],this._offset=0}init(){ae.system.add(this._update,this)}repeat(t,e,i=!0){let s=zD++,n=0;return i&&(this._offset+=1e3,n=this._offset),this._tasks.push({func:t,duration:e,start:performance.now(),offset:n,last:performance.now(),repeat:!0,id:s}),s}cancel(t){for(let e=0;e<this._tasks.length;e++)if(this._tasks[e].id===t){this._tasks.splice(e,1);return}}_update(){let t=performance.now();for(let e=0;e<this._tasks.length;e++){let i=this._tasks[e];if(t-i.offset-i.last>=i.duration){let s=t-i.start;i.func(s),i.last=t}}}destroy(){ae.system.remove(this._update,this),this._tasks.length=0}};Vn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"scheduler",priority:0}});function aT(r){if(!oT){if(Q.get().getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){let t=[\`%c %c %c %c %c PixiJS %c v\${rs} (\${r}) http://www.pixijs.com/
|
|
|
|
\`,"background: #E72264; padding:5px 0;","background: #6CA2EA; padding:5px 0;","background: #B5D33D; padding:5px 0;","background: #FED23F; padding:5px 0;","color: #FFFFFF; background: #E72264; padding:5px 0;","color: #E72264; background: #FFFFFF; padding:5px 0;"];globalThis.console.log(...t)}else globalThis.console&&globalThis.console.log(\`PixiJS \${rs} - \${r} - http://www.pixijs.com/\`);oT=!0}}var oT,uT=p(()=>{Pt();yf();oT=!1});var is,lT=p(()=>{D();uT();Ye();is=class{constructor(t){this._renderer=t}init(t){if(t.hello){let e=this._renderer.name;this._renderer.type===Mt.WEBGL&&(e+=\` \${this._renderer.context.webGLVersion}\`),aT(e)}}};is.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"hello",priority:-2};is.defaultOptions={hello:!1}});function cT(r){let t=!1;for(let i in r)if(r[i]==null){t=!0;break}if(!t)return r;let e=Object.create(null);for(let i in r){let s=r[i];s&&(e[i]=s)}return e}function hT(r){let t=0;for(let e=0;e<r.length;e++)r[e]==null?t++:r[e-t]=r[e];return r.length-=t,r}var fT=p(()=>{"use strict"});var WD,Df,pT,mT=p(()=>{D();fT();WD=0,Df=class dT{constructor(t){this._managedRenderables=[],this._managedHashes=[],this._managedArrays=[],this._renderer=t}init(t){t={...dT.defaultOptions,...t},this.maxUnusedTime=t.renderableGCMaxUnusedTime,this._frequency=t.renderableGCFrequency,this.enabled=t.renderableGCActive}get enabled(){return!!this._handler}set enabled(t){this.enabled!==t&&(t?(this._handler=this._renderer.scheduler.repeat(()=>this.run(),this._frequency,!1),this._hashHandler=this._renderer.scheduler.repeat(()=>{for(let e of this._managedHashes)e.context[e.hash]=cT(e.context[e.hash])},this._frequency),this._arrayHandler=this._renderer.scheduler.repeat(()=>{for(let e of this._managedArrays)hT(e.context[e.hash])},this._frequency)):(this._renderer.scheduler.cancel(this._handler),this._renderer.scheduler.cancel(this._hashHandler),this._renderer.scheduler.cancel(this._arrayHandler)))}addManagedHash(t,e){this._managedHashes.push({context:t,hash:e})}addManagedArray(t,e){this._managedArrays.push({context:t,hash:e})}prerender({container:t}){this._now=performance.now(),t.renderGroup.gcTick=WD++,this._updateInstructionGCTick(t.renderGroup,t.renderGroup.gcTick)}addRenderable(t){this.enabled&&(t._lastUsed===-1&&(this._managedRenderables.push(t),t.once("destroyed",this._removeRenderable,this)),t._lastUsed=this._now)}run(){let t=this._now,e=this._managedRenderables,i=this._renderer.renderPipes,s=0;for(let n=0;n<e.length;n++){let o=e[n];if(o===null){s++;continue}let a=o.renderGroup??o.parentRenderGroup,u=a?.instructionSet?.gcTick??-1;if((a?.gcTick??0)===u&&(o._lastUsed=t),t-o._lastUsed>this.maxUnusedTime){if(!o.destroyed){let l=i;a&&(a.structureDidChange=!0),l[o.renderPipeId].destroyRenderable(o)}o._lastUsed=-1,s++,o.off("destroyed",this._removeRenderable,this)}else e[n-s]=o}e.length-=s}destroy(){this.enabled=!1,this._renderer=null,this._managedRenderables.length=0,this._managedHashes.length=0,this._managedArrays.length=0}_removeRenderable(t){let e=this._managedRenderables.indexOf(t);e>=0&&(t.off("destroyed",this._removeRenderable,this),this._managedRenderables[e]=null)}_updateInstructionGCTick(t,e){t.instructionSet.gcTick=e;for(let i of t.renderGroupChildren)this._updateInstructionGCTick(i,e)}};Df.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"renderableGC",priority:0};Df.defaultOptions={renderableGCActive:!0,renderableGCMaxUnusedTime:6e4,renderableGCFrequency:3e4};pT=Df});var Pf,xT,_T=p(()=>{D();Pf=class gT{constructor(t){this._renderer=t,this.count=0,this.checkCount=0}init(t){t={...gT.defaultOptions,...t},this.checkCountMax=t.textureGCCheckCountMax,this.maxIdle=t.textureGCAMaxIdle??t.textureGCMaxIdle,this.active=t.textureGCActive}postrender(){this._renderer.renderingToScreen&&(this.count++,this.active&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){let t=this._renderer.texture.managedTextures;for(let e=0;e<t.length;e++){let i=t[e];i.autoGarbageCollect&&i.resource&&i._touched>-1&&this.count-i._touched>this.maxIdle&&(i._touched=-1,i.unload())}}destroy(){this._renderer=null}};Pf.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"textureGC"};Pf.defaultOptions={textureGCActive:!0,textureGCAMaxIdle:null,textureGCMaxIdle:60*60,textureGCCheckCountMax:600};xT=Pf});var yT,Xn,Bf=p(()=>{zt();oe();ft();yT=class bT{constructor(t={}){if(this.uid=et("renderTarget"),this.colorTextures=[],this.dirtyId=0,this.isRoot=!1,this._size=new Float32Array(2),this._managedColorTextures=!1,t={...bT.defaultOptions,...t},this.stencil=t.stencil,this.depth=t.depth,this.isRoot=t.isRoot,typeof t.colorTextures=="number"){this._managedColorTextures=!0;for(let e=0;e<t.colorTextures;e++)this.colorTextures.push(new ut({width:t.width,height:t.height,resolution:t.resolution,antialias:t.antialias}))}else{this.colorTextures=[...t.colorTextures.map(i=>i.source)];let e=this.colorTexture.source;this.resize(e.width,e.height,e._resolution)}this.colorTexture.source.on("resize",this.onSourceResize,this),(t.depthStencilTexture||this.stencil)&&(t.depthStencilTexture instanceof I||t.depthStencilTexture instanceof ut?this.depthStencilTexture=t.depthStencilTexture.source:this.ensureDepthStencilTexture())}get size(){let t=this._size;return t[0]=this.pixelWidth,t[1]=this.pixelHeight,t}get width(){return this.colorTexture.source.width}get height(){return this.colorTexture.source.height}get pixelWidth(){return this.colorTexture.source.pixelWidth}get pixelHeight(){return this.colorTexture.source.pixelHeight}get resolution(){return this.colorTexture.source._resolution}get colorTexture(){return this.colorTextures[0]}onSourceResize(t){this.resize(t.width,t.height,t._resolution,!0)}ensureDepthStencilTexture(){this.depthStencilTexture||(this.depthStencilTexture=new ut({width:this.width,height:this.height,resolution:this.resolution,format:"depth24plus-stencil8",autoGenerateMipmaps:!1,antialias:!1,mipLevelCount:1}))}resize(t,e,i=this.resolution,s=!1){this.dirtyId++,this.colorTextures.forEach((n,o)=>{s&&o===0||n.source.resize(t,e,i)}),this.depthStencilTexture&&this.depthStencilTexture.source.resize(t,e,i)}destroy(){this.colorTexture.source.off("resize",this.onSourceResize,this),this._managedColorTextures&&this.colorTextures.forEach(t=>{t.destroy()}),this.depthStencilTexture&&(this.depthStencilTexture.destroy(),delete this.depthStencilTexture)}};yT.defaultOptions={width:0,height:0,resolution:1,colorTextures:1,stencil:!1,depth:!1,antialias:!1,isRoot:!1};Xn=yT});function Pu(r,t){if(!$n.has(r)){let e=new I({source:new Yt({resource:r,...t})}),i=()=>{$n.get(r)===e&&$n.delete(r)};e.once("destroy",i),e.source.once("destroy",i),$n.set(r,e)}return $n.get(r)}var $n,Mf=p(()=>{Ci();ft();$n=new Map});var Ff,TT,ST=p(()=>{Pt();D();Wt();yt();Bf();Mf();Ff=class vT{get autoDensity(){return this.texture.source.autoDensity}set autoDensity(t){this.texture.source.autoDensity=t}get resolution(){return this.texture.source._resolution}set resolution(t){this.texture.source.resize(this.texture.source.width,this.texture.source.height,t)}init(t){t={...vT.defaultOptions,...t},t.view&&(W($,"ViewSystem.view has been renamed to ViewSystem.canvas"),t.canvas=t.view),this.screen=new tt(0,0,t.width,t.height),this.canvas=t.canvas||Q.get().createCanvas(),this.antialias=!!t.antialias,this.texture=Pu(this.canvas,t),this.renderTarget=new Xn({colorTextures:[this.texture],depth:!!t.depth,isRoot:!0}),this.texture.source.transparent=t.backgroundAlpha<1,this.resolution=t.resolution}resize(t,e,i){this.texture.source.resize(t,e,i),this.screen.width=this.texture.frame.width,this.screen.height=this.texture.frame.height}destroy(t=!1){(typeof t=="boolean"?t:!!t?.removeView)&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}};Ff.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"view",priority:0};Ff.defaultOptions={width:800,height:600,autoDensity:!1,antialias:!1};TT=Ff});var Bu,Mu,Rf=p(()=>{Dv();Pv();Iv();Uv();bf();Lv();$v();jv();Yv();Zv();Qv();eT();iT();sT();nT();lT();mT();_T();ST();Bu=[qv,Wn,is,TT,Rn,xT,zn,tT,In,pT,Vn],Mu=[Hn,Tf,kn,Mn,Un,Ln,On,Pn]});var jn,wT=p(()=>{D();jn=class{constructor(t){this._hash=Object.create(null),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_hash")}contextChange(t){this._gpu=t}getBindGroup(t,e,i){return t._updateKey(),this._hash[t._key]||this._createBindGroup(t,e,i)}_createBindGroup(t,e,i){let s=this._gpu.device,n=e.layout[i],o=[],a=this._renderer;for(let c in n){let h=t.resources[c]??t.resources[n[c]],f;if(h._resourceType==="uniformGroup"){let d=h;a.ubo.updateUniformGroup(d);let m=d.buffer;f={buffer:a.buffer.getGPUBuffer(m),offset:0,size:m.descriptor.size}}else if(h._resourceType==="buffer"){let d=h;f={buffer:a.buffer.getGPUBuffer(d),offset:0,size:d.descriptor.size}}else if(h._resourceType==="bufferResource"){let d=h;f={buffer:a.buffer.getGPUBuffer(d.buffer),offset:d.offset,size:d.size}}else if(h._resourceType==="textureSampler"){let d=h;f=a.texture.getGpuSampler(d)}else if(h._resourceType==="textureSource"){let d=h;f=a.texture.getGpuSource(d).createView({})}o.push({binding:n[c],resource:f})}let u=a.shader.getProgramData(e).bindGroups[i],l=s.createBindGroup({layout:u,entries:o});return this._hash[t._key]=l,l}destroy(){for(let t of Object.keys(this._hash))this._hash[t]=null;this._hash=null,this._renderer=null}};jn.extension={type:[b.WebGPUSystem],name:"bindGroup"}});var Yn,ET=p(()=>{D();Rc();Yn=class{constructor(t){this._gpuBuffers=Object.create(null),this._managedBuffers=[],t.renderableGC.addManagedHash(this,"_gpuBuffers")}contextChange(t){this._gpu=t}getGPUBuffer(t){return this._gpuBuffers[t.uid]||this.createGPUBuffer(t)}updateBuffer(t){let e=this._gpuBuffers[t.uid]||this.createGPUBuffer(t),i=t.data;return t._updateID&&i&&(t._updateID=0,this._gpu.device.queue.writeBuffer(e,0,i.buffer,0,(t._updateSize||i.byteLength)+3&-4)),e}destroyAll(){for(let t in this._gpuBuffers)this._gpuBuffers[t].destroy();this._gpuBuffers={}}createGPUBuffer(t){this._gpuBuffers[t.uid]||(t.on("update",this.updateBuffer,this),t.on("change",this.onBufferChange,this),t.on("destroy",this.onBufferDestroy,this),this._managedBuffers.push(t));let e=this._gpu.device.createBuffer(t.descriptor);return t._updateID=0,t.data&&(qs(t.data.buffer,e.getMappedRange()),e.unmap()),this._gpuBuffers[t.uid]=e,e}onBufferChange(t){this._gpuBuffers[t.uid].destroy(),t._updateID=0,this._gpuBuffers[t.uid]=this.createGPUBuffer(t)}onBufferDestroy(t){this._managedBuffers.splice(this._managedBuffers.indexOf(t),1),this._destroyBuffer(t)}destroy(){this._managedBuffers.forEach(t=>this._destroyBuffer(t)),this._managedBuffers=null,this._gpuBuffers=null}_destroyBuffer(t){this._gpuBuffers[t.uid].destroy(),t.off("update",this.updateBuffer,this),t.off("change",this.onBufferChange,this),t.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[t.uid]=null}};Yn.extension={type:[b.WebGPUSystem],name:"buffer"}});var Kn,CT=p(()=>{D();Kn=class{constructor(t){this._colorMaskCache=15,this._renderer=t}setMask(t){this._colorMaskCache!==t&&(this._colorMaskCache=t,this._renderer.pipeline.setColorMask(t))}destroy(){this._renderer=null,this._colorMaskCache=null}};Kn.extension={type:[b.WebGPUSystem],name:"colorMask"}});var ss,AT=p(()=>{Pt();D();ss=class{constructor(t){this._renderer=t}async init(t){return this._initPromise?this._initPromise:(this._initPromise=this._createDeviceAndAdaptor(t).then(e=>{this.gpu=e,this._renderer.runners.contextChange.emit(this.gpu)}),this._initPromise)}contextChange(t){this._renderer.gpu=t}async _createDeviceAndAdaptor(t){let e=await Q.get().getNavigator().gpu.requestAdapter({powerPreference:t.powerPreference,forceFallbackAdapter:t.forceFallbackAdapter}),i=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter(n=>e.features.has(n)),s=await e.requestDevice({requiredFeatures:i});return{adapter:e,device:s}}destroy(){this.gpu=null,this._renderer=null}};ss.extension={type:[b.WebGPUSystem],name:"device"};ss.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1}});var qn,DT=p(()=>{D();qn=class{constructor(t){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=t}renderStart(){this.commandFinished=new Promise(t=>{this._resolveCommandFinished=t}),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(t){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(t.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(t){this.renderPassEncoder.setViewport(t.x,t.y,t.width,t.height,0,1)}setPipelineFromGeometryProgramAndState(t,e,i,s){let n=this._renderer.pipeline.getPipeline(t,e,i,s);this.setPipeline(n)}setPipeline(t){this._boundPipeline!==t&&(this._boundPipeline=t,this.renderPassEncoder.setPipeline(t))}_setVertexBuffer(t,e){this._boundVertexBuffer[t]!==e&&(this._boundVertexBuffer[t]=e,this.renderPassEncoder.setVertexBuffer(t,this._renderer.buffer.updateBuffer(e)))}_setIndexBuffer(t){if(this._boundIndexBuffer===t)return;this._boundIndexBuffer=t;let e=t.data.BYTES_PER_ELEMENT===2?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(t),e)}resetBindGroup(t){this._boundBindGroup[t]=null}setBindGroup(t,e,i){if(this._boundBindGroup[t]===e)return;this._boundBindGroup[t]=e,e._touch(this._renderer.textureGC.count);let s=this._renderer.bindGroup.getBindGroup(e,i,t);this.renderPassEncoder.setBindGroup(t,s)}setGeometry(t,e){let i=this._renderer.pipeline.getBufferNamesToBind(t,e);for(let s in i)this._setVertexBuffer(s,t.attributes[i[s]].buffer);t.indexBuffer&&this._setIndexBuffer(t.indexBuffer)}_setShaderBindGroups(t,e){for(let i in t.groups){let s=t.groups[i];e||this._syncBindGroup(s),this.setBindGroup(i,s,t.gpuProgram)}}_syncBindGroup(t){for(let e in t.resources){let i=t.resources[e];i.isUniformGroup&&this._renderer.ubo.updateUniformGroup(i)}}draw(t){let{geometry:e,shader:i,state:s,topology:n,size:o,start:a,instanceCount:u,skipSync:l}=t;this.setPipelineFromGeometryProgramAndState(e,i.gpuProgram,s,n),this.setGeometry(e,i.gpuProgram),this._setShaderBindGroups(i,l),e.indexBuffer?this.renderPassEncoder.drawIndexed(o||e.indexBuffer.data.length,u??e.instanceCount,a||0):this.renderPassEncoder.draw(o||e.getSize(),u??e.instanceCount,a||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){let t=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(t);let e=this._boundPipeline,i={...this._boundVertexBuffer},s=this._boundIndexBuffer,n={...this._boundBindGroup};this._clearCache();let o=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(o.x,o.y,o.width,o.height,0,1),this.setPipeline(e);for(let a in i)this._setVertexBuffer(a,i[a]);for(let a in n)this.setBindGroup(a,n[a],null);this._setIndexBuffer(s)}_clearCache(){for(let t=0;t<16;t++)this._boundBindGroup[t]=null,this._boundVertexBuffer[t]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(t){this._gpu=t}};qn.extension={type:[b.WebGPUSystem],name:"encoder",priority:1}});var Zn,PT=p(()=>{D();ei();Zn=class{constructor(t){this._renderTargetStencilState=Object.create(null),this._renderer=t,t.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(t){let e=this._renderTargetStencilState[t.uid];e||(e=this._renderTargetStencilState[t.uid]={stencilMode:pt.DISABLED,stencilReference:0}),this._activeRenderTarget=t,this.setStencilMode(e.stencilMode,e.stencilReference)}setStencilMode(t,e){let i=this._renderTargetStencilState[this._activeRenderTarget.uid];i.stencilMode=t,i.stencilReference=e;let s=this._renderer;s.pipeline.setStencilMode(t),s.encoder.renderPassEncoder.setStencilReference(e)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}};Zn.extension={type:[b.WebGPUSystem],name:"stencil"}});var ns,kf=p(()=>{df();Ar();hr();ns=class{constructor(t){this._syncFunctionHash=Object.create(null),this._adaptor=t,this._systemCheck()}_systemCheck(){if(!Su())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}ensureUniformGroup(t){let e=this.getUniformGroupData(t);t.buffer||(t.buffer=new St({data:new Float32Array(e.layout.size/4),usage:J.UNIFORM|J.COPY_DST}))}getUniformGroupData(t){return this._syncFunctionHash[t._signature]||this._initUniformGroup(t)}_initUniformGroup(t){let e=t._signature,i=this._syncFunctionHash[e];if(!i){let s=Object.keys(t.uniformStructures).map(a=>t.uniformStructures[a]),n=this._adaptor.createUboElements(s),o=this._generateUboSync(n.uboElements);i=this._syncFunctionHash[e]={layout:n,syncFunction:o}}return this._syncFunctionHash[e]}_generateUboSync(t){return this._adaptor.generateUboSync(t)}syncUniformGroup(t,e,i){let s=this.getUniformGroupData(t);t.buffer||(t.buffer=new St({data:new Float32Array(s.layout.size/4),usage:J.UNIFORM|J.COPY_DST}));let n=null;return e||(e=t.buffer.data,n=t.buffer.dataInt32),i||(i=0),s.syncFunction(t.uniforms,e,n,i),!0}updateUniformGroup(t){if(t.isStatic&&!t._dirtyId)return!1;t._dirtyId=0;let e=this.syncUniformGroup(t);return t.buffer.update(),e}destroy(){this._syncFunctionHash=null}}});function BT(r){let t=r.map(i=>({data:i,offset:0,size:0})),e=0;for(let i=0;i<t.length;i++){let s=t[i],n=Qn[s.data.type].size,o=Qn[s.data.type].align;if(!Qn[s.data.type])throw new Error(\`[Pixi.js] WebGPU UniformBuffer: Unknown type \${s.data.type}\`);s.data.size>1&&(n=Math.max(n,o)*s.data.size),e=Math.ceil(e/o)*o,s.size=n,s.offset=e,e+=n}return e=Math.ceil(e/16)*16,{uboElements:t,size:e}}var Qn,Gf=p(()=>{"use strict";Qn={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2<i32>":{align:8,size:8},"vec2<u32>":{align:8,size:8},"vec2<f32>":{align:8,size:8},"vec2<f16>":{align:4,size:4},"vec3<i32>":{align:16,size:12},"vec3<u32>":{align:16,size:12},"vec3<f32>":{align:16,size:12},"vec3<f16>":{align:8,size:6},"vec4<i32>":{align:16,size:16},"vec4<u32>":{align:16,size:16},"vec4<f32>":{align:16,size:16},"vec4<f16>":{align:8,size:8},"mat2x2<f32>":{align:8,size:16},"mat2x2<f16>":{align:4,size:8},"mat3x2<f32>":{align:8,size:24},"mat3x2<f16>":{align:4,size:12},"mat4x2<f32>":{align:8,size:32},"mat4x2<f16>":{align:4,size:16},"mat2x3<f32>":{align:16,size:32},"mat2x3<f16>":{align:8,size:16},"mat3x3<f32>":{align:16,size:48},"mat3x3<f16>":{align:8,size:24},"mat4x3<f32>":{align:16,size:64},"mat4x3<f16>":{align:8,size:32},"mat2x4<f32>":{align:16,size:32},"mat2x4<f16>":{align:8,size:16},"mat3x4<f32>":{align:16,size:48},"mat3x4<f16>":{align:8,size:24},"mat4x4<f32>":{align:16,size:64},"mat4x4<f16>":{align:8,size:32}}});var mr,If=p(()=>{"use strict";mr=[{type:"mat3x3<f32>",test:r=>r.value.a!==void 0,ubo:\`
|
|
var matrix = uv[name].toArray(true);
|
|
data[offset] = matrix[0];
|
|
data[offset + 1] = matrix[1];
|
|
data[offset + 2] = matrix[2];
|
|
data[offset + 4] = matrix[3];
|
|
data[offset + 5] = matrix[4];
|
|
data[offset + 6] = matrix[5];
|
|
data[offset + 8] = matrix[6];
|
|
data[offset + 9] = matrix[7];
|
|
data[offset + 10] = matrix[8];
|
|
\`,uniform:\`
|
|
gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));
|
|
\`},{type:"vec4<f32>",test:r=>r.type==="vec4<f32>"&&r.size===1&&r.value.width!==void 0,ubo:\`
|
|
v = uv[name];
|
|
data[offset] = v.x;
|
|
data[offset + 1] = v.y;
|
|
data[offset + 2] = v.width;
|
|
data[offset + 3] = v.height;
|
|
\`,uniform:\`
|
|
cv = ud[name].value;
|
|
v = uv[name];
|
|
if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {
|
|
cv[0] = v.x;
|
|
cv[1] = v.y;
|
|
cv[2] = v.width;
|
|
cv[3] = v.height;
|
|
gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);
|
|
}
|
|
\`},{type:"vec2<f32>",test:r=>r.type==="vec2<f32>"&&r.size===1&&r.value.x!==void 0,ubo:\`
|
|
v = uv[name];
|
|
data[offset] = v.x;
|
|
data[offset + 1] = v.y;
|
|
\`,uniform:\`
|
|
cv = ud[name].value;
|
|
v = uv[name];
|
|
if (cv[0] !== v.x || cv[1] !== v.y) {
|
|
cv[0] = v.x;
|
|
cv[1] = v.y;
|
|
gl.uniform2f(ud[name].location, v.x, v.y);
|
|
}
|
|
\`},{type:"vec4<f32>",test:r=>r.type==="vec4<f32>"&&r.size===1&&r.value.red!==void 0,ubo:\`
|
|
v = uv[name];
|
|
data[offset] = v.red;
|
|
data[offset + 1] = v.green;
|
|
data[offset + 2] = v.blue;
|
|
data[offset + 3] = v.alpha;
|
|
\`,uniform:\`
|
|
cv = ud[name].value;
|
|
v = uv[name];
|
|
if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {
|
|
cv[0] = v.red;
|
|
cv[1] = v.green;
|
|
cv[2] = v.blue;
|
|
cv[3] = v.alpha;
|
|
gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);
|
|
}
|
|
\`},{type:"vec3<f32>",test:r=>r.type==="vec3<f32>"&&r.size===1&&r.value.red!==void 0,ubo:\`
|
|
v = uv[name];
|
|
data[offset] = v.red;
|
|
data[offset + 1] = v.green;
|
|
data[offset + 2] = v.blue;
|
|
\`,uniform:\`
|
|
cv = ud[name].value;
|
|
v = uv[name];
|
|
if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {
|
|
cv[0] = v.red;
|
|
cv[1] = v.green;
|
|
cv[2] = v.blue;
|
|
gl.uniform3f(ud[name].location, v.red, v.green, v.blue);
|
|
}
|
|
\`}]});function Fu(r,t,e,i){let s=[\`
|
|
var v = null;
|
|
var v2 = null;
|
|
var t = 0;
|
|
var index = 0;
|
|
var name = null;
|
|
var arrayOffset = null;
|
|
\`],n=0;for(let a=0;a<r.length;a++){let u=r[a],l=u.data.name,c=!1,h=0;for(let f=0;f<mr.length;f++)if(mr[f].test(u.data)){h=u.offset/4,s.push(\`name = "\${l}";\`,\`offset += \${h-n};\`,mr[f][t]||mr[f].ubo),c=!0;break}if(!c)if(u.data.size>1)h=u.offset/4,s.push(e(u,h-n));else{let f=i[u.data.type];h=u.offset/4,s.push(\`
|
|
v = uv.\${l};
|
|
offset += \${h-n};
|
|
\${f};
|
|
\`)}n=h}let o=s.join(\`
|
|
\`);return new Function("uv","data","dataInt32","offset",o)}var Uf=p(()=>{If()});function os(r,t){return\`
|
|
for (let i = 0; i < \${r*t}; i++) {
|
|
data[offset + (((i / \${r})|0) * 4) + (i % \${r})] = v[i];
|
|
}
|
|
\`}var Of,MT,Lf=p(()=>{"use strict";Of={f32:\`
|
|
data[offset] = v;\`,i32:\`
|
|
dataInt32[offset] = v;\`,"vec2<f32>":\`
|
|
data[offset] = v[0];
|
|
data[offset + 1] = v[1];\`,"vec3<f32>":\`
|
|
data[offset] = v[0];
|
|
data[offset + 1] = v[1];
|
|
data[offset + 2] = v[2];\`,"vec4<f32>":\`
|
|
data[offset] = v[0];
|
|
data[offset + 1] = v[1];
|
|
data[offset + 2] = v[2];
|
|
data[offset + 3] = v[3];\`,"vec2<i32>":\`
|
|
dataInt32[offset] = v[0];
|
|
dataInt32[offset + 1] = v[1];\`,"vec3<i32>":\`
|
|
dataInt32[offset] = v[0];
|
|
dataInt32[offset + 1] = v[1];
|
|
dataInt32[offset + 2] = v[2];\`,"vec4<i32>":\`
|
|
dataInt32[offset] = v[0];
|
|
dataInt32[offset + 1] = v[1];
|
|
dataInt32[offset + 2] = v[2];
|
|
dataInt32[offset + 3] = v[3];\`,"mat2x2<f32>":\`
|
|
data[offset] = v[0];
|
|
data[offset + 1] = v[1];
|
|
data[offset + 4] = v[2];
|
|
data[offset + 5] = v[3];\`,"mat3x3<f32>":\`
|
|
data[offset] = v[0];
|
|
data[offset + 1] = v[1];
|
|
data[offset + 2] = v[2];
|
|
data[offset + 4] = v[3];
|
|
data[offset + 5] = v[4];
|
|
data[offset + 6] = v[5];
|
|
data[offset + 8] = v[6];
|
|
data[offset + 9] = v[7];
|
|
data[offset + 10] = v[8];\`,"mat4x4<f32>":\`
|
|
for (let i = 0; i < 16; i++) {
|
|
data[offset + i] = v[i];
|
|
}\`,"mat3x2<f32>":os(3,2),"mat4x2<f32>":os(4,2),"mat2x3<f32>":os(2,3),"mat4x3<f32>":os(4,3),"mat2x4<f32>":os(2,4),"mat3x4<f32>":os(3,4)},MT={...Of,"mat2x2<f32>":\`
|
|
data[offset] = v[0];
|
|
data[offset + 1] = v[1];
|
|
data[offset + 2] = v[2];
|
|
data[offset + 3] = v[3];
|
|
\`}});function FT(r,t){let{size:e,align:i}=Qn[r.data.type],s=(i-e)/4,n=r.data.type.indexOf("i32")>=0?"dataInt32":"data";return\`
|
|
v = uv.\${r.data.name};
|
|
\${t!==0?\`offset += \${t};\`:""}
|
|
|
|
arrayOffset = offset;
|
|
|
|
t = 0;
|
|
|
|
for(var i=0; i < \${r.data.size*(e/4)}; i++)
|
|
{
|
|
for(var j = 0; j < \${e/4}; j++)
|
|
{
|
|
\${n}[arrayOffset++] = v[t++];
|
|
}
|
|
\${s!==0?\`arrayOffset += \${s};\`:""}
|
|
}
|
|
\`}var RT=p(()=>{Gf()});function kT(r){return Fu(r,"uboWgsl",FT,MT)}var GT=p(()=>{Uf();Lf();RT()});var Jn,IT=p(()=>{D();kf();Gf();GT();Jn=class extends ns{constructor(){super({createUboElements:BT,generateUboSync:kT})}};Jn.extension={type:[b.WebGPUSystem],name:"ubo"}});var Gr,Ru=p(()=>{jt();zt();Gr=class extends ht{constructor({buffer:t,offset:e,size:i}){super(),this.uid=et("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=et("resource"),this._bufferResource=!0,this.destroyed=!1,this.buffer=t,this.offset=e|0,this.size=i,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=et("resource"),this.emit("change",this)}destroy(t=!1){this.destroyed=!0,t&&this.buffer.destroy(),this.emit("change",this),this.buffer=null}}});var ku,UT=p(()=>{"use strict";ku=class{constructor({minUniformOffsetAlignment:t}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=t,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(t){if(t>this._minUniformOffsetAlignment/4)throw new Error(\`UniformBufferBatch: array is too large: \${t*4}\`);let e=this.byteIndex,i=e+t*4;if(i=Math.ceil(i/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,i>this.data.length*4)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=i,e}addGroup(t){let e=this.addEmptyGroup(t.length);for(let i=0;i<t.length;i++)this.data[e/4+i]=t[i];return e}destroy(){this.data=null}}});var Ir,to,OT=p(()=>{D();Ar();Ru();hr();UT();Cr();Ir=128,to=class{constructor(t){this._bindGroupHash=Object.create(null),this._buffers=[],this._bindGroups=[],this._bufferResources=[],this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_bindGroupHash"),this._batchBuffer=new ku({minUniformOffsetAlignment:Ir});let e=256/Ir;for(let i=0;i<e;i++){let s=J.UNIFORM|J.COPY_DST;i===0&&(s|=J.COPY_SRC),this._buffers.push(new St({data:this._batchBuffer.data,usage:s}))}}renderEnd(){this._uploadBindGroups(),this._resetBindGroups()}_resetBindGroups(){for(let t in this._bindGroupHash)this._bindGroupHash[t]=null;this._batchBuffer.clear()}getUniformBindGroup(t,e){if(!e&&this._bindGroupHash[t.uid])return this._bindGroupHash[t.uid];this._renderer.ubo.ensureUniformGroup(t);let i=t.buffer.data,s=this._batchBuffer.addEmptyGroup(i.length);return this._renderer.ubo.syncUniformGroup(t,this._batchBuffer.data,s/4),this._bindGroupHash[t.uid]=this._getBindGroup(s/Ir),this._bindGroupHash[t.uid]}getUboResource(t){this._renderer.ubo.updateUniformGroup(t);let e=t.buffer.data,i=this._batchBuffer.addGroup(e);return this._getBufferResource(i/Ir)}getArrayBindGroup(t){let e=this._batchBuffer.addGroup(t);return this._getBindGroup(e/Ir)}getArrayBufferResource(t){let i=this._batchBuffer.addGroup(t)/Ir;return this._getBufferResource(i)}_getBufferResource(t){if(!this._bufferResources[t]){let e=this._buffers[t%2];this._bufferResources[t]=new Gr({buffer:e,offset:(t/2|0)*256,size:Ir})}return this._bufferResources[t]}_getBindGroup(t){if(!this._bindGroups[t]){let e=new It({0:this._getBufferResource(t)});this._bindGroups[t]=e}return this._bindGroups[t]}_uploadBindGroups(){let t=this._renderer.buffer,e=this._buffers[0];e.update(this._batchBuffer.byteIndex),t.updateBuffer(e);let i=this._renderer.gpu.device.createCommandEncoder();for(let s=1;s<this._buffers.length;s++){let n=this._buffers[s];i.copyBufferToBuffer(t.getGPUBuffer(e),Ir,t.getGPUBuffer(n),0,this._batchBuffer.byteIndex)}this._renderer.gpu.device.queue.submit([i.finish()])}destroy(){for(let t=0;t<this._bindGroups.length;t++)this._bindGroups[t].destroy();this._bindGroups=null,this._bindGroupHash=null;for(let t=0;t<this._buffers.length;t++)this._buffers[t].destroy();this._buffers=null;for(let t=0;t<this._bufferResources.length;t++)this._bufferResources[t].destroy();this._bufferResources=null,this._batchBuffer.destroy(),this._bindGroupHash=null,this._renderer=null}};to.extension={type:[b.WebGPUPipes],name:"uniformBatch"}});function Gu(r,t){for(let e in r.attributes){let i=r.attributes[e],s=t[e];s?(i.format??(i.format=s.format),i.offset??(i.offset=s.offset),i.instance??(i.instance=s.instance)):z(\`Attribute \${e} is not present in the shader, but is present in the geometry. Unable to infer attribute details.\`)}VD(r)}function VD(r){let{buffers:t,attributes:e}=r,i={},s={};for(let n in t){let o=t[n];i[o.uid]=0,s[o.uid]=0}for(let n in e){let o=e[n];i[o.buffer.uid]+=ue(o.format).stride}for(let n in e){let o=e[n];o.stride??(o.stride=i[o.buffer.uid]),o.start??(o.start=s[o.buffer.uid]),s[o.buffer.uid]+=ue(o.format).stride}}var Nf=p(()=>{mt();ii()});var Qe,Hf=p(()=>{ei();Qe=[];Qe[pt.NONE]=void 0;Qe[pt.DISABLED]={stencilWriteMask:0,stencilReadMask:0};Qe[pt.RENDERING_MASK_ADD]={stencilFront:{compare:"equal",passOp:"increment-clamp"},stencilBack:{compare:"equal",passOp:"increment-clamp"}};Qe[pt.RENDERING_MASK_REMOVE]={stencilFront:{compare:"equal",passOp:"decrement-clamp"},stencilBack:{compare:"equal",passOp:"decrement-clamp"}};Qe[pt.MASK_ACTIVE]={stencilWriteMask:0,stencilFront:{compare:"equal",passOp:"keep"},stencilBack:{compare:"equal",passOp:"keep"}};Qe[pt.INVERSE_MASK_ACTIVE]={stencilWriteMask:0,stencilFront:{compare:"not-equal",passOp:"replace"},stencilBack:{compare:"not-equal",passOp:"replace"}}});function $D(r,t,e,i,s){return r<<24|t<<16|e<<10|i<<5|s}function jD(r,t,e,i){return e<<6|r<<3|i<<1|t}var XD,eo,LT=p(()=>{D();mt();Nf();ei();Js();Hf();XD={"point-list":0,"line-list":1,"line-strip":2,"triangle-list":3,"triangle-strip":4};eo=class{constructor(t){this._moduleCache=Object.create(null),this._bufferLayoutsCache=Object.create(null),this._bindingNamesCache=Object.create(null),this._pipeCache=Object.create(null),this._pipeStateCaches=Object.create(null),this._colorMask=15,this._multisampleCount=1,this._renderer=t}contextChange(t){this._gpu=t,this.setStencilMode(pt.DISABLED),this._updatePipeHash()}setMultisampleCount(t){this._multisampleCount!==t&&(this._multisampleCount=t,this._updatePipeHash())}setRenderTarget(t){this._multisampleCount=t.msaaSamples,this._depthStencilAttachment=t.descriptor.depthStencilAttachment?1:0,this._updatePipeHash()}setColorMask(t){this._colorMask!==t&&(this._colorMask=t,this._updatePipeHash())}setStencilMode(t){this._stencilMode!==t&&(this._stencilMode=t,this._stencilState=Qe[t],this._updatePipeHash())}setPipeline(t,e,i,s){let n=this.getPipeline(t,e,i);s.setPipeline(n)}getPipeline(t,e,i,s){t._layoutKey||(Gu(t,e.attributeData),this._generateBufferKey(t)),s||(s=t.topology);let n=$D(t._layoutKey,e._layoutKey,i.data,i._blendModeId,XD[s]);return this._pipeCache[n]?this._pipeCache[n]:(this._pipeCache[n]=this._createPipeline(t,e,i,s),this._pipeCache[n])}_createPipeline(t,e,i,s){let n=this._gpu.device,o=this._createVertexBufferLayouts(t,e),a=this._renderer.state.getColorTargets(i);a[0].writeMask=this._stencilMode===pt.RENDERING_MASK_ADD?0:this._colorMask;let u=this._renderer.shader.getProgramData(e).pipeline,l={vertex:{module:this._getModule(e.vertex.source),entryPoint:e.vertex.entryPoint,buffers:o},fragment:{module:this._getModule(e.fragment.source),entryPoint:e.fragment.entryPoint,targets:a},primitive:{topology:s,cullMode:i.cullMode},layout:u,multisample:{count:this._multisampleCount},label:"PIXI Pipeline"};return this._depthStencilAttachment&&(l.depthStencil={...this._stencilState,format:"depth24plus-stencil8",depthWriteEnabled:i.depthTest,depthCompare:i.depthTest?"less":"always"}),n.createRenderPipeline(l)}_getModule(t){return this._moduleCache[t]||this._createModule(t)}_createModule(t){let e=this._gpu.device;return this._moduleCache[t]=e.createShaderModule({code:t}),this._moduleCache[t]}_generateBufferKey(t){let e=[],i=0,s=Object.keys(t.attributes).sort();for(let o=0;o<s.length;o++){let a=t.attributes[s[o]];e[i++]=a.offset,e[i++]=a.format,e[i++]=a.stride,e[i++]=a.instance}let n=e.join("|");return t._layoutKey=fr(n,"geometry"),t._layoutKey}_generateAttributeLocationsKey(t){let e=[],i=0,s=Object.keys(t.attributeData).sort();for(let o=0;o<s.length;o++){let a=t.attributeData[s[o]];e[i++]=a.location}let n=e.join("|");return t._attributeLocationsKey=fr(n,"programAttributes"),t._attributeLocationsKey}getBufferNamesToBind(t,e){let i=t._layoutKey<<16|e._attributeLocationsKey;if(this._bindingNamesCache[i])return this._bindingNamesCache[i];let s=this._createVertexBufferLayouts(t,e),n=Object.create(null),o=e.attributeData;for(let a=0;a<s.length;a++){let l=Object.values(s[a].attributes)[0].shaderLocation;for(let c in o)if(o[c].location===l){n[a]=c;break}}return this._bindingNamesCache[i]=n,n}_createVertexBufferLayouts(t,e){e._attributeLocationsKey||this._generateAttributeLocationsKey(e);let i=t._layoutKey<<16|e._attributeLocationsKey;if(this._bufferLayoutsCache[i])return this._bufferLayoutsCache[i];let s=[];return t.buffers.forEach(n=>{let o={arrayStride:0,stepMode:"vertex",attributes:[]},a=o.attributes;for(let u in e.attributeData){let l=t.attributes[u];(l.divisor??1)!==1&&z(\`Attribute \${u} has an invalid divisor value of '\${l.divisor}'. WebGPU only supports a divisor value of 1\`),l.buffer===n&&(o.arrayStride=l.stride,o.stepMode=l.instance?"instance":"vertex",a.push({shaderLocation:e.attributeData[u].location,offset:l.offset,format:l.format}))}a.length&&s.push(o)}),this._bufferLayoutsCache[i]=s,s}_updatePipeHash(){let t=jD(this._stencilMode,this._multisampleCount,this._colorMask,this._depthStencilAttachment);this._pipeStateCaches[t]||(this._pipeStateCaches[t]=Object.create(null)),this._pipeCache=this._pipeStateCaches[t]}destroy(){this._renderer=null,this._bufferLayoutsCache=null}};eo.extension={type:[b.WebGPUSystem],name:"pipeline"}});function NT(r,t,e,i,s,n){let o=n?1:-1;return r.identity(),r.a=1/i*2,r.d=o*(1/s*2),r.tx=-1-t*r.a,r.ty=-o-e*r.d,r}var HT=p(()=>{"use strict"});function zT(r){let t=r.colorTexture.source.resource;return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement&&document.body.contains(t)}var WT=p(()=>{"use strict"});var as,zf=p(()=>{nt();Wt();ts();HT();pf();Ci();oe();ft();Mf();WT();Bf();as=class{constructor(t){this.rootViewPort=new tt,this.viewport=new tt,this.onRenderTargetChange=new es("onRenderTargetChange"),this.projectionMatrix=new G,this.defaultClearColor=[0,0,0,0],this._renderSurfaceToRenderTargetHash=new Map,this._gpuRenderTargetHash=Object.create(null),this._renderTargetStack=[],this._renderer=t,t.renderableGC.addManagedHash(this,"_gpuRenderTargetHash")}finishRenderPass(){this.adaptor.finishRenderPass(this.renderTarget)}renderStart({target:t,clear:e,clearColor:i,frame:s}){this._renderTargetStack.length=0,this.push(t,e,i,s),this.rootViewPort.copyFrom(this.viewport),this.rootRenderTarget=this.renderTarget,this.renderingToScreen=zT(this.rootRenderTarget),this.adaptor.prerender?.(this.rootRenderTarget)}postrender(){this.adaptor.postrender?.(this.rootRenderTarget)}bind(t,e=!0,i,s){let n=this.getRenderTarget(t),o=this.renderTarget!==n;this.renderTarget=n,this.renderSurface=t;let a=this.getGpuRenderTarget(n);(n.pixelWidth!==a.width||n.pixelHeight!==a.height)&&(this.adaptor.resizeGpuRenderTarget(n),a.width=n.pixelWidth,a.height=n.pixelHeight);let u=n.colorTexture,l=this.viewport,c=u.pixelWidth,h=u.pixelHeight;if(!s&&t instanceof I&&(s=t.frame),s){let f=u._resolution;l.x=s.x*f+.5|0,l.y=s.y*f+.5|0,l.width=s.width*f+.5|0,l.height=s.height*f+.5|0}else l.x=0,l.y=0,l.width=c,l.height=h;return NT(this.projectionMatrix,0,0,l.width/u.resolution,l.height/u.resolution,!n.isRoot),this.adaptor.startRenderPass(n,e,i,l),o&&this.onRenderTargetChange.emit(n),n}clear(t,e=Ut.ALL,i){e&&(t&&(t=this.getRenderTarget(t)),this.adaptor.clear(t||this.renderTarget,e,i,this.viewport))}contextChange(){this._gpuRenderTargetHash=Object.create(null)}push(t,e=Ut.ALL,i,s){let n=this.bind(t,e,i,s);return this._renderTargetStack.push({renderTarget:n,frame:s}),n}pop(){this._renderTargetStack.pop();let t=this._renderTargetStack[this._renderTargetStack.length-1];this.bind(t.renderTarget,!1,null,t.frame)}getRenderTarget(t){return t.isTexture&&(t=t.source),this._renderSurfaceToRenderTargetHash.get(t)??this._initRenderTarget(t)}copyToTexture(t,e,i,s,n){i.x<0&&(s.width+=i.x,n.x-=i.x,i.x=0),i.y<0&&(s.height+=i.y,n.y-=i.y,i.y=0);let{pixelWidth:o,pixelHeight:a}=t;return s.width=Math.min(s.width,o-i.x),s.height=Math.min(s.height,a-i.y),this.adaptor.copyToTexture(t,e,i,s,n)}ensureDepthStencil(){this.renderTarget.stencil||(this.renderTarget.stencil=!0,this.adaptor.startRenderPass(this.renderTarget,!1,null,this.viewport))}destroy(){this._renderer=null,this._renderSurfaceToRenderTargetHash.forEach((t,e)=>{t!==e&&t.destroy()}),this._renderSurfaceToRenderTargetHash.clear(),this._gpuRenderTargetHash=Object.create(null)}_initRenderTarget(t){let e=null;return Yt.test(t)&&(t=Pu(t).source),t instanceof Xn?e=t:t instanceof ut&&(e=new Xn({colorTextures:[t]}),Yt.test(t.source.resource)&&(e.isRoot=!0),t.once("destroy",()=>{e.destroy(),this._renderSurfaceToRenderTargetHash.delete(t);let i=this._gpuRenderTargetHash[e.uid];i&&(this._gpuRenderTargetHash[e.uid]=null,this.adaptor.destroyGpuRenderTarget(i))})),this._renderSurfaceToRenderTargetHash.set(t,e),e}getGpuRenderTarget(t){return this._gpuRenderTargetHash[t.uid]||(this._gpuRenderTargetHash[t.uid]=this.adaptor.initGpuRenderTarget(t))}resetState(){this.renderTarget=null,this.renderSurface=null}}});var Iu,VT=p(()=>{"use strict";Iu=class{constructor(){this.contexts=[],this.msaaTextures=[],this.msaaSamples=1}}});var Uu,XT=p(()=>{ts();Ci();oe();VT();Uu=class{init(t,e){this._renderer=t,this._renderTargetSystem=e}copyToTexture(t,e,i,s,n){let o=this._renderer,a=this._getGpuColorTexture(t),u=o.texture.getGpuSource(e.source);return o.encoder.commandEncoder.copyTextureToTexture({texture:a,origin:i},{texture:u,origin:n},s),e}startRenderPass(t,e=!0,i,s){let o=this._renderTargetSystem.getGpuRenderTarget(t),a=this.getDescriptor(t,e,i);o.descriptor=a,this._renderer.pipeline.setRenderTarget(o),this._renderer.encoder.beginRenderPass(o),this._renderer.encoder.setViewport(s)}finishRenderPass(){this._renderer.encoder.endRenderPass()}_getGpuColorTexture(t){let e=this._renderTargetSystem.getGpuRenderTarget(t);return e.contexts[0]?e.contexts[0].getCurrentTexture():this._renderer.texture.getGpuSource(t.colorTextures[0].source)}getDescriptor(t,e,i){typeof e=="boolean"&&(e=e?Ut.ALL:Ut.NONE);let s=this._renderTargetSystem,n=s.getGpuRenderTarget(t),o=t.colorTextures.map((l,c)=>{let h=n.contexts[c],f,d;h?f=h.getCurrentTexture().createView():f=this._renderer.texture.getGpuSource(l).createView({mipLevelCount:1}),n.msaaTextures[c]&&(d=f,f=this._renderer.texture.getTextureView(n.msaaTextures[c]));let m=e&Ut.COLOR?"clear":"load";return i??(i=s.defaultClearColor),{view:f,resolveTarget:d,clearValue:i,storeOp:"store",loadOp:m}}),a;if((t.stencil||t.depth)&&!t.depthStencilTexture&&(t.ensureDepthStencilTexture(),t.depthStencilTexture.source.sampleCount=n.msaa?4:1),t.depthStencilTexture){let l=e&Ut.STENCIL?"clear":"load",c=e&Ut.DEPTH?"clear":"load";a={view:this._renderer.texture.getGpuSource(t.depthStencilTexture.source).createView(),stencilStoreOp:"store",stencilLoadOp:l,depthClearValue:1,depthLoadOp:c,depthStoreOp:"store"}}return{colorAttachments:o,depthStencilAttachment:a}}clear(t,e=!0,i,s){if(!e)return;let{gpu:n,encoder:o}=this._renderer,a=n.device;if(o.commandEncoder===null){let l=a.createCommandEncoder(),c=this.getDescriptor(t,e,i),h=l.beginRenderPass(c);h.setViewport(s.x,s.y,s.width,s.height,0,1),h.end();let f=l.finish();a.queue.submit([f])}else this.startRenderPass(t,e,i,s)}initGpuRenderTarget(t){t.isRoot=!0;let e=new Iu;return t.colorTextures.forEach((i,s)=>{if(Yt.test(i.resource)){let n=i.resource.getContext("webgpu"),o=i.transparent?"premultiplied":"opaque";try{n.configure({device:this._renderer.gpu.device,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,format:"bgra8unorm",alphaMode:o})}catch(a){console.error(a)}e.contexts[s]=n}if(e.msaa=i.source.antialias,i.source.antialias){let n=new ut({width:0,height:0,sampleCount:4});e.msaaTextures[s]=n}}),e.msaa&&(e.msaaSamples=4,t.depthStencilTexture&&(t.depthStencilTexture.source.sampleCount=4)),e}destroyGpuRenderTarget(t){t.contexts.forEach(e=>{e.unconfigure()}),t.msaaTextures.forEach(e=>{e.destroy()}),t.msaaTextures.length=0,t.contexts.length=0}ensureDepthStencilTexture(t){let e=this._renderTargetSystem.getGpuRenderTarget(t);t.depthStencilTexture&&e.msaa&&(t.depthStencilTexture.source.sampleCount=4)}resizeGpuRenderTarget(t){let e=this._renderTargetSystem.getGpuRenderTarget(t);e.width=t.width,e.height=t.height,e.msaa&&t.colorTextures.forEach((i,s)=>{e.msaaTextures[s]?.resize(i.source.width,i.source.height,i.source._resolution)})}}});var ro,$T=p(()=>{D();zf();XT();ro=class extends as{constructor(t){super(t),this.adaptor=new Uu,this.adaptor.init(t,this)}};ro.extension={type:[b.WebGPUSystem],name:"renderTarget"}});var io,jT=p(()=>{D();io=class{constructor(){this._gpuProgramData=Object.create(null)}contextChange(t){this._gpu=t,this.maxTextures=t.device.limits.maxSampledTexturesPerShaderStage}getProgramData(t){return this._gpuProgramData[t._layoutKey]||this._createGPUProgramData(t)}_createGPUProgramData(t){let e=this._gpu.device,i=t.gpuLayout.map(n=>e.createBindGroupLayout({entries:n})),s={bindGroupLayouts:i};return this._gpuProgramData[t._layoutKey]={bindGroups:i,pipeline:e.createPipelineLayout(s)},this._gpuProgramData[t._layoutKey]}destroy(){this._gpu=null,this._gpuProgramData=null}};io.extension={type:[b.WebGPUSystem],name:"shader"}});var re,YT=p(()=>{"use strict";re={};re.normal={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}};re.add={alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one",operation:"add"}};re.multiply={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"dst",dstFactor:"one-minus-src-alpha",operation:"add"}};re.screen={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}};re.overlay={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}};re.none={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"zero",operation:"add"}};re["normal-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"}};re["add-npm"]={alpha:{srcFactor:"one",dstFactor:"one",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one",operation:"add"}};re["screen-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src",operation:"add"}};re.erase={alpha:{srcFactor:"zero",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"one-minus-src",operation:"add"}};re.min={alpha:{srcFactor:"one",dstFactor:"one",operation:"min"},color:{srcFactor:"one",dstFactor:"one",operation:"min"}};re.max={alpha:{srcFactor:"one",dstFactor:"one",operation:"max"},color:{srcFactor:"one",dstFactor:"one",operation:"max"}}});var so,KT=p(()=>{D();Ge();YT();so=class{constructor(){this.defaultState=new At,this.defaultState.blend=!0}contextChange(t){this.gpu=t}getColorTargets(t){return[{format:"bgra8unorm",writeMask:0,blend:re[t.blendMode]||re.normal}]}destroy(){this.gpu=null}};so.extension={type:[b.WebGPUSystem],name:"state"}});var qT,ZT=p(()=>{"use strict";qT={type:"image",upload(r,t,e){let i=r.resource,s=(r.pixelWidth|0)*(r.pixelHeight|0),n=i.byteLength/s;e.device.queue.writeTexture({texture:t},i,{offset:0,rowsPerImage:r.pixelHeight,bytesPerRow:r.pixelHeight*n},{width:r.pixelWidth,height:r.pixelHeight,depthOrArrayLayers:1})}}});var Wf,YD,QT,JT=p(()=>{"use strict";Wf={"bc1-rgba-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"bc2-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc3-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc7-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"etc1-rgb-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"etc2-rgba8unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"astc-4x4-unorm":{blockBytes:16,blockWidth:4,blockHeight:4}},YD={blockBytes:4,blockWidth:1,blockHeight:1},QT={type:"compressed",upload(r,t,e){let i=r.pixelWidth,s=r.pixelHeight,n=Wf[r.format]||YD;for(let o=0;o<r.resource.length;o++){let a=r.resource[o],u=Math.ceil(i/n.blockWidth)*n.blockBytes;e.device.queue.writeTexture({texture:t,mipLevel:o},a,{offset:0,bytesPerRow:u},{width:Math.ceil(i/n.blockWidth)*n.blockWidth,height:Math.ceil(s/n.blockHeight)*n.blockHeight,depthOrArrayLayers:1}),i=Math.max(i>>1,1),s=Math.max(s>>1,1)}}}});var Ou,Vf=p(()=>{"use strict";Ou={type:"image",upload(r,t,e){let i=r.resource;if(!i)return;let s=Math.min(t.width,r.resourceWidth||r.pixelWidth),n=Math.min(t.height,r.resourceHeight||r.pixelHeight),o=r.alphaMode==="premultiply-alpha-on-upload";e.device.queue.copyExternalImageToTexture({source:i},{texture:t,premultipliedAlpha:o},{width:s,height:n})}}});var tS,eS=p(()=>{Vf();tS={type:"video",upload(r,t,e){Ou.upload(r,t,e)}}});var Lu,rS=p(()=>{"use strict";Lu=class{constructor(t){this.device=t,this.sampler=t.createSampler({minFilter:"linear"}),this.pipelines={}}_getMipmapPipeline(t){let e=this.pipelines[t];return e||(this.mipmapShaderModule||(this.mipmapShaderModule=this.device.createShaderModule({code:\`
|
|
var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(
|
|
vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));
|
|
|
|
struct VertexOutput {
|
|
@builtin(position) position : vec4<f32>,
|
|
@location(0) texCoord : vec2<f32>,
|
|
};
|
|
|
|
@vertex
|
|
fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {
|
|
var output : VertexOutput;
|
|
output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);
|
|
output.position = vec4<f32>(pos[vertexIndex], 0.0, 1.0);
|
|
return output;
|
|
}
|
|
|
|
@group(0) @binding(0) var imgSampler : sampler;
|
|
@group(0) @binding(1) var img : texture_2d<f32>;
|
|
|
|
@fragment
|
|
fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {
|
|
return textureSample(img, imgSampler, texCoord);
|
|
}
|
|
\`})),e=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format:t}]}}),this.pipelines[t]=e),e}generateMipmap(t){let e=this._getMipmapPipeline(t.format);if(t.dimension==="3d"||t.dimension==="1d")throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let i=t,s=t.depthOrArrayLayers||1,n=t.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!n){let u={size:{width:Math.ceil(t.width/2),height:Math.ceil(t.height/2),depthOrArrayLayers:s},format:t.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:t.mipLevelCount-1};i=this.device.createTexture(u)}let o=this.device.createCommandEncoder({}),a=e.getBindGroupLayout(0);for(let u=0;u<s;++u){let l=t.createView({baseMipLevel:0,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),c=n?1:0;for(let h=1;h<t.mipLevelCount;++h){let f=i.createView({baseMipLevel:c++,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),d=o.beginRenderPass({colorAttachments:[{view:f,storeOp:"store",loadOp:"clear",clearValue:{r:0,g:0,b:0,a:0}}]}),m=this.device.createBindGroup({layout:a,entries:[{binding:0,resource:this.sampler},{binding:1,resource:l}]});d.setPipeline(e),d.setBindGroup(0,m),d.draw(3,1,0,0),d.end(),l=f}}if(!n){let u={width:Math.ceil(t.width/2),height:Math.ceil(t.height/2),depthOrArrayLayers:s};for(let l=1;l<t.mipLevelCount;++l)o.copyTextureToTexture({texture:i,mipLevel:l-1},{texture:t,mipLevel:l},u),u.width=Math.ceil(u.width/2),u.height=Math.ceil(u.height/2)}return this.device.queue.submit([o.finish()]),n||i.destroy(),t}}});var no,iS=p(()=>{Pt();D();ee();zi();Cr();ZT();JT();Vf();eS();rS();no=class{constructor(t){this.managedTextures=[],this._gpuSources=Object.create(null),this._gpuSamplers=Object.create(null),this._bindGroupHash=Object.create(null),this._textureViewHash=Object.create(null),this._uploads={image:Ou,buffer:qT,video:tS,compressed:QT},this._renderer=t,t.renderableGC.addManagedHash(this,"_gpuSources"),t.renderableGC.addManagedHash(this,"_gpuSamplers"),t.renderableGC.addManagedHash(this,"_bindGroupHash"),t.renderableGC.addManagedHash(this,"_textureViewHash")}contextChange(t){this._gpu=t}initSource(t){if(t.autoGenerateMipmaps){let u=Math.max(t.pixelWidth,t.pixelHeight);t.mipLevelCount=Math.floor(Math.log2(u))+1}let e=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST;t.uploadMethodId!=="compressed"&&(e|=GPUTextureUsage.RENDER_ATTACHMENT,e|=GPUTextureUsage.COPY_SRC);let i=Wf[t.format]||{blockBytes:4,blockWidth:1,blockHeight:1},s=Math.ceil(t.pixelWidth/i.blockWidth)*i.blockWidth,n=Math.ceil(t.pixelHeight/i.blockHeight)*i.blockHeight,o={label:t.label,size:{width:s,height:n},format:t.format,sampleCount:t.sampleCount,mipLevelCount:t.mipLevelCount,dimension:t.dimension,usage:e},a=this._gpu.device.createTexture(o);return this._gpuSources[t.uid]=a,this.managedTextures.includes(t)||(t.on("update",this.onSourceUpdate,this),t.on("resize",this.onSourceResize,this),t.on("destroy",this.onSourceDestroy,this),t.on("unload",this.onSourceUnload,this),t.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(t)),this.onSourceUpdate(t),a}onSourceUpdate(t){let e=this.getGpuSource(t);e&&(this._uploads[t.uploadMethodId]&&this._uploads[t.uploadMethodId].upload(t,e,this._gpu),t.autoGenerateMipmaps&&t.mipLevelCount>1&&this.onUpdateMipmaps(t))}onSourceUnload(t){let e=this._gpuSources[t.uid];e&&(this._gpuSources[t.uid]=null,e.destroy())}onUpdateMipmaps(t){this._mipmapGenerator||(this._mipmapGenerator=new Lu(this._gpu.device));let e=this.getGpuSource(t);this._mipmapGenerator.generateMipmap(e)}onSourceDestroy(t){t.off("update",this.onSourceUpdate,this),t.off("unload",this.onSourceUnload,this),t.off("destroy",this.onSourceDestroy,this),t.off("resize",this.onSourceResize,this),t.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(t),1),this.onSourceUnload(t)}onSourceResize(t){let e=this._gpuSources[t.uid];e?(e.width!==t.pixelWidth||e.height!==t.pixelHeight)&&(this._textureViewHash[t.uid]=null,this._bindGroupHash[t.uid]=null,this.onSourceUnload(t),this.initSource(t)):this.initSource(t)}_initSampler(t){return this._gpuSamplers[t._resourceId]=this._gpu.device.createSampler(t),this._gpuSamplers[t._resourceId]}getGpuSampler(t){return this._gpuSamplers[t._resourceId]||this._initSampler(t)}getGpuSource(t){return this._gpuSources[t.uid]||this.initSource(t)}getTextureBindGroup(t){return this._bindGroupHash[t.uid]??this._createTextureBindGroup(t)}_createTextureBindGroup(t){let e=t.source;return this._bindGroupHash[t.uid]=new It({0:e,1:e.style,2:new ct({uTextureMatrix:{type:"mat3x3<f32>",value:t.textureMatrix.mapCoord}})}),this._bindGroupHash[t.uid]}getTextureView(t){let e=t.source;return this._textureViewHash[e.uid]??this._createTextureView(e)}_createTextureView(t){return this._textureViewHash[t.uid]=this.getGpuSource(t).createView(),this._textureViewHash[t.uid]}generateCanvas(t){let e=this._renderer,i=e.gpu.device.createCommandEncoder(),s=Q.get().createCanvas();s.width=t.source.pixelWidth,s.height=t.source.pixelHeight;let n=s.getContext("webgpu");return n.configure({device:e.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:Q.get().getNavigator().gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),i.copyTextureToTexture({texture:e.texture.getGpuSource(t.source),origin:{x:0,y:0}},{texture:n.getCurrentTexture()},{width:s.width,height:s.height}),e.gpu.device.queue.submit([i.finish()]),s}getPixels(t){let e=this.generateCanvas(t),i=le.getOptimalCanvasAndContext(e.width,e.height),s=i.context;s.drawImage(e,0,0);let{width:n,height:o}=e,a=s.getImageData(0,0,n,o),u=new Uint8ClampedArray(a.data.buffer);return le.returnCanvasAndContext(i),{pixels:u,width:n,height:o}}destroy(){this.managedTextures.slice().forEach(t=>this.onSourceDestroy(t)),this.managedTextures=null;for(let t of Object.keys(this._bindGroupHash)){let e=Number(t);this._bindGroupHash[e]?.destroy(),this._bindGroupHash[e]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}};no.extension={type:[b.WebGPUSystem],name:"texture"}});var aS={};dd(aS,{WebGPURenderer:()=>Xf});var KD,qD,ZD,sS,nS,oS,Xf,uS=p(()=>{D();Sv();Cv();Av();En();Rf();Ye();wT();ET();CT();AT();DT();PT();IT();OT();LT();$T();jT();KT();iS();KD=[...Bu,Jn,qn,ss,Yn,no,ro,io,so,eo,Kn,Zn,jn],qD=[...Mu,to],ZD=[Dn,An,Cn],sS=[],nS=[],oS=[];L.handleByNamedList(b.WebGPUSystem,sS);L.handleByNamedList(b.WebGPUPipes,nS);L.handleByNamedList(b.WebGPUPipesAdaptor,oS);L.add(...KD,...qD,...ZD);Xf=class extends kr{constructor(){let t={name:"webgpu",type:Mt.WEBGPU,systems:sS,renderPipes:nS,renderPipeAdaptors:oS};super(t)}}});var oo,lS=p(()=>{D();nt();ti();Pr();tn();en();Ji();Br();Na();ke();ee();oo=class{init(){let t=new ct({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uRound:{value:0,type:"f32"}}),e=ye(),i=Xe({name:"graphics",bits:[Ri,Gi(e),Qi,je]});this.shader=new wt({glProgram:i,resources:{localUniforms:t,batchSamplers:Ii(e)}})}execute(t,e){let i=e.context,s=i.customShader||this.shader,n=t.renderer,o=n.graphicsContext,{batcher:a,instructions:u}=o.getContextRenderData(i);s.groups[0]=n.globalUniforms.bindGroup,n.state.set(t.state),n.shader.bind(s),n.geometry.bind(a.geometry,s.glProgram);let l=u.instructions;for(let c=0;c<u.instructionSize;c++){let h=l[c];if(h.size){for(let f=0;f<h.textures.count;f++)n.texture.bind(h.textures.textures[f],f);n.geometry.draw(h.topology,h.size,h.start)}}}destroy(){this.shader.destroy(!0),this.shader=null}};oo.extension={type:[b.WebGLPipesAdaptor],name:"graphics"}});var ao,cS=p(()=>{D();nt();Pr();Ji();Br();mf();ke();ft();mt();ao=class{init(){let t=Xe({name:"mesh",bits:[Qi,Ev,je]});this._shader=new wt({glProgram:t,resources:{uTexture:I.EMPTY.source,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new G}}}})}execute(t,e){let i=t.renderer,s=e._shader;if(s){if(!s.glProgram){z("Mesh shader has no glProgram",e.shader);return}}else{s=this._shader;let n=e.texture,o=n.source;s.resources.uTexture=o,s.resources.uSampler=o.style,s.resources.textureUniforms.uniforms.uTextureMatrix=n.textureMatrix.mapCoord}s.groups[100]=i.globalUniforms.bindGroup,s.groups[101]=t.localUniformsBindGroup,i.encoder.draw({geometry:e._geometry,shader:s,state:e.state})}destroy(){this._shader.destroy(!0),this._shader=null}};ao.extension={type:[b.WebGLPipesAdaptor],name:"mesh"}});var uo,hS=p(()=>{D();Ge();uo=class{constructor(){this._tempState=At.for2d(),this._didUploadHash={}}init(t){t.renderer.runners.contextChange.add(this)}contextChange(){this._didUploadHash={}}start(t,e,i){let s=t.renderer,n=this._didUploadHash[i.uid];s.shader.bind(i,n),n||(this._didUploadHash[i.uid]=!0),s.shader.updateUniformGroup(s.globalUniforms.uniformGroup),s.geometry.bind(e,i.glProgram)}execute(t,e){let i=t.renderer;this._tempState.blendMode=e.blendMode,i.state.set(this._tempState);let s=e.textures.textures;for(let n=0;n<e.textures.count;n++)i.texture.bind(s[n],n);i.geometry.draw(e.topology,e.size,e.start)}};uo.extension={type:[b.WebGLPipesAdaptor],name:"batch"}});var lo,fS=p(()=>{"use strict";lo=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(lo||{})});var Nu,dS=p(()=>{"use strict";Nu=class{constructor(t,e){this._lastBindBaseLocation=-1,this._lastBindCallId=-1,this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.type=e}}});var co,pS=p(()=>{D();hr();fS();dS();co=class{constructor(t){this._gpuBuffers=Object.create(null),this._boundBufferBases=Object.create(null),this._minBaseLocation=0,this._nextBindBaseIndex=this._minBaseLocation,this._bindCallId=0,this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuBuffers")}destroy(){this._renderer=null,this._gl=null,this._gpuBuffers=null,this._boundBufferBases=null}contextChange(){let t=this._gl=this._renderer.gl;this._gpuBuffers=Object.create(null),this._maxBindings=t.MAX_UNIFORM_BUFFER_BINDINGS?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0}getGlBuffer(t){return this._gpuBuffers[t.uid]||this.createGLBuffer(t)}bind(t){let{_gl:e}=this,i=this.getGlBuffer(t);e.bindBuffer(i.type,i.buffer)}bindBufferBase(t,e){let{_gl:i}=this;this._boundBufferBases[e]!==t&&(this._boundBufferBases[e]=t,t._lastBindBaseLocation=e,i.bindBufferBase(i.UNIFORM_BUFFER,e,t.buffer))}nextBindBase(t){this._bindCallId++,this._minBaseLocation=0,t&&(this._boundBufferBases[0]=null,this._minBaseLocation=1,this._nextBindBaseIndex<1&&(this._nextBindBaseIndex=1))}freeLocationForBufferBase(t){let e=this.getLastBindBaseLocation(t);if(e>=this._minBaseLocation)return t._lastBindCallId=this._bindCallId,e;let i=0,s=this._nextBindBaseIndex;for(;i<2;){s>=this._maxBindings&&(s=this._minBaseLocation,i++);let n=this._boundBufferBases[s];if(n&&n._lastBindCallId===this._bindCallId){s++;continue}break}return e=s,this._nextBindBaseIndex=s+1,i>=2?-1:(t._lastBindCallId=this._bindCallId,this._boundBufferBases[e]=null,e)}getLastBindBaseLocation(t){let e=t._lastBindBaseLocation;return this._boundBufferBases[e]===t?e:-1}bindBufferRange(t,e,i,s){let{_gl:n}=this;i||(i=0),e||(e=0),this._boundBufferBases[e]=null,n.bindBufferRange(n.UNIFORM_BUFFER,e||0,t.buffer,i*256,s||256)}updateBuffer(t){let{_gl:e}=this,i=this.getGlBuffer(t);if(t._updateID===i.updateID)return i;i.updateID=t._updateID,e.bindBuffer(i.type,i.buffer);let s=t.data,n=t.descriptor.usage&J.STATIC?e.STATIC_DRAW:e.DYNAMIC_DRAW;return s?i.byteLength>=s.byteLength?e.bufferSubData(i.type,0,s,0,t._updateSize/s.BYTES_PER_ELEMENT):(i.byteLength=s.byteLength,e.bufferData(i.type,s,n)):(i.byteLength=t.descriptor.size,e.bufferData(i.type,i.byteLength,n)),i}destroyAll(){let t=this._gl;for(let e in this._gpuBuffers)t.deleteBuffer(this._gpuBuffers[e].buffer);this._gpuBuffers=Object.create(null)}onBufferDestroy(t,e){let i=this._gpuBuffers[t.uid],s=this._gl;e||s.deleteBuffer(i.buffer),this._gpuBuffers[t.uid]=null}createGLBuffer(t){let{_gl:e}=this,i=lo.ARRAY_BUFFER;t.descriptor.usage&J.INDEX?i=lo.ELEMENT_ARRAY_BUFFER:t.descriptor.usage&J.UNIFORM&&(i=lo.UNIFORM_BUFFER);let s=new Nu(e.createBuffer(),i);return this._gpuBuffers[t.uid]=s,t.on("destroy",this.onBufferDestroy,this),s}resetState(){this._boundBufferBases=Object.create(null)}};co.extension={type:[b.WebGLSystem],name:"buffer"}});var $f,gS,xS=p(()=>{Pt();D();mt();$f=class mS{constructor(t){this.supports={uint32Indices:!0,uniformBufferObject:!0,vertexArrayObject:!0,srgbTextures:!0,nonPowOf2wrapping:!0,msaa:!0,nonPowOf2mipmaps:!0},this._renderer=t,this.extensions=Object.create(null),this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this._renderer.gl=t}init(t){t={...mS.defaultOptions,...t};let e=this.multiView=t.multiView;if(t.context&&e&&(z("Renderer created with both a context and multiview enabled. Disabling multiView as both cannot work together."),e=!1),e?this.canvas=Q.get().createCanvas(this._renderer.canvas.width,this._renderer.canvas.height):this.canvas=this._renderer.view.canvas,t.context)this.initFromContext(t.context);else{let i=this._renderer.background.alpha<1,s=t.premultipliedAlpha??!0,n=t.antialias&&!this._renderer.backBuffer.useBackBuffer;this.createContext(t.preferWebGLVersion,{alpha:i,premultipliedAlpha:s,antialias:n,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference??"default"})}}ensureCanvasSize(t){if(!this.multiView){t!==this.canvas&&z("multiView is disabled, but targetCanvas is not the main canvas");return}let{canvas:e}=this;(e.width<t.width||e.height<t.height)&&(e.width=Math.max(t.width,t.width),e.height=Math.max(t.height,t.height))}initFromContext(t){this.gl=t,this.webGLVersion=t instanceof Q.get().getWebGLRenderingContext()?1:2,this.getExtensions(),this.validateContext(t),this._renderer.runners.contextChange.emit(t);let e=this._renderer.view.canvas;e.addEventListener("webglcontextlost",this.handleContextLost,!1),e.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}createContext(t,e){let i,s=this.canvas;if(t===2&&(i=s.getContext("webgl2",e)),!i&&(i=s.getContext("webgl",e),!i))throw new Error("This browser does not support WebGL. Try using the canvas renderer");this.gl=i,this.initFromContext(this.gl)}getExtensions(){let{gl:t}=this,e={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc"),bptc:t.getExtension("EXT_texture_compression_bptc"),rgtc:t.getExtension("EXT_texture_compression_rgtc"),loseContext:t.getExtension("WEBGL_lose_context")};if(this.webGLVersion===1)this.extensions={...e,drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear"),vertexAttribDivisorANGLE:t.getExtension("ANGLE_instanced_arrays"),srgb:t.getExtension("EXT_sRGB")};else{this.extensions={...e,colorBufferFloat:t.getExtension("EXT_color_buffer_float")};let i=t.getExtension("WEBGL_provoking_vertex");i&&i.provokingVertexWEBGL(i.FIRST_VERTEX_CONVENTION_WEBGL)}}handleContextLost(t){t.preventDefault(),this._contextLossForced&&(this._contextLossForced=!1,setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0))}handleContextRestored(){this._renderer.runners.contextChange.emit(this.gl)}destroy(){let t=this._renderer.view.canvas;this._renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext?.loseContext()}forceContextLoss(){this.extensions.loseContext?.loseContext(),this._contextLossForced=!0}validateContext(t){let e=t.getContextAttributes();e&&!e.stencil&&z("Provided WebGL context does not have a stencil buffer, masks may not render correctly");let i=this.supports,s=this.webGLVersion===2,n=this.extensions;i.uint32Indices=s||!!n.uint32ElementIndex,i.uniformBufferObject=s,i.vertexArrayObject=s||!!n.vertexArrayObject,i.srgbTextures=s||!!n.srgb,i.nonPowOf2wrapping=s,i.nonPowOf2mipmaps=s,i.msaa=s,i.uint32Indices||z("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")}};$f.extension={type:[b.WebGLSystem],name:"context"};$f.defaultOptions={context:null,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:void 0,preferWebGLVersion:2,multiView:!1};gS=$f});var Hu,jf,ot,Yf=p(()=>{"use strict";Hu=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(Hu||{}),jf=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(jf||{}),ot=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(ot||{})});function yS(r){return _S[r]??_S.float32}var _S,bS=p(()=>{Yf();_S={uint8x2:ot.UNSIGNED_BYTE,uint8x4:ot.UNSIGNED_BYTE,sint8x2:ot.BYTE,sint8x4:ot.BYTE,unorm8x2:ot.UNSIGNED_BYTE,unorm8x4:ot.UNSIGNED_BYTE,snorm8x2:ot.BYTE,snorm8x4:ot.BYTE,uint16x2:ot.UNSIGNED_SHORT,uint16x4:ot.UNSIGNED_SHORT,sint16x2:ot.SHORT,sint16x4:ot.SHORT,unorm16x2:ot.UNSIGNED_SHORT,unorm16x4:ot.UNSIGNED_SHORT,snorm16x2:ot.SHORT,snorm16x4:ot.SHORT,float16x2:ot.HALF_FLOAT,float16x4:ot.HALF_FLOAT,float32:ot.FLOAT,float32x2:ot.FLOAT,float32x3:ot.FLOAT,float32x4:ot.FLOAT,uint32:ot.UNSIGNED_INT,uint32x2:ot.UNSIGNED_INT,uint32x3:ot.UNSIGNED_INT,uint32x4:ot.UNSIGNED_INT,sint32:ot.INT,sint32x2:ot.INT,sint32x3:ot.INT,sint32x4:ot.INT}});var QD,ho,vS=p(()=>{D();ii();Nf();bS();QD={"point-list":0,"line-list":1,"line-strip":3,"triangle-list":4,"triangle-strip":5},ho=class{constructor(t){this._geometryVaoHash=Object.create(null),this._renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this._renderer.renderableGC.addManagedHash(this,"_geometryVaoHash")}contextChange(){let t=this.gl=this._renderer.gl;if(!this._renderer.context.supports.vertexArrayObject)throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");let e=this._renderer.context.extensions.vertexArrayObject;e&&(t.createVertexArray=()=>e.createVertexArrayOES(),t.bindVertexArray=s=>e.bindVertexArrayOES(s),t.deleteVertexArray=s=>e.deleteVertexArrayOES(s));let i=this._renderer.context.extensions.vertexAttribDivisorANGLE;i&&(t.drawArraysInstanced=(s,n,o,a)=>{i.drawArraysInstancedANGLE(s,n,o,a)},t.drawElementsInstanced=(s,n,o,a,u)=>{i.drawElementsInstancedANGLE(s,n,o,a,u)},t.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n)),this._activeGeometry=null,this._activeVao=null,this._geometryVaoHash=Object.create(null)}bind(t,e){let i=this.gl;this._activeGeometry=t;let s=this.getVao(t,e);this._activeVao!==s&&(this._activeVao=s,i.bindVertexArray(s)),this.updateBuffers()}resetState(){this.unbind()}updateBuffers(){let t=this._activeGeometry,e=this._renderer.buffer;for(let i=0;i<t.buffers.length;i++){let s=t.buffers[i];e.updateBuffer(s)}}checkCompatibility(t,e){let i=t.attributes,s=e._attributeData;for(let n in s)if(!i[n])throw new Error(\`shader and geometry incompatible, geometry missing the "\${n}" attribute\`)}getSignature(t,e){let i=t.attributes,s=e._attributeData,n=["g",t.uid];for(let o in i)s[o]&&n.push(o,s[o].location);return n.join("-")}getVao(t,e){return this._geometryVaoHash[t.uid]?.[e._key]||this.initGeometryVao(t,e)}initGeometryVao(t,e,i=!0){let s=this._renderer.gl,n=this._renderer.buffer;this._renderer.shader._getProgramData(e),this.checkCompatibility(t,e);let o=this.getSignature(t,e);this._geometryVaoHash[t.uid]||(this._geometryVaoHash[t.uid]=Object.create(null),t.on("destroy",this.onGeometryDestroy,this));let a=this._geometryVaoHash[t.uid],u=a[o];if(u)return a[e._key]=u,u;Gu(t,e._attributeData);let l=t.buffers;u=s.createVertexArray(),s.bindVertexArray(u);for(let c=0;c<l.length;c++){let h=l[c];n.bind(h)}return this.activateVao(t,e),a[e._key]=u,a[o]=u,s.bindVertexArray(null),u}onGeometryDestroy(t,e){let i=this._geometryVaoHash[t.uid],s=this.gl;if(i){if(e)for(let n in i)this._activeVao!==i[n]&&this.unbind(),s.deleteVertexArray(i[n]);this._geometryVaoHash[t.uid]=null}}destroyAll(t=!1){let e=this.gl;for(let i in this._geometryVaoHash){if(t)for(let s in this._geometryVaoHash[i]){let n=this._geometryVaoHash[i];this._activeVao!==n&&this.unbind(),e.deleteVertexArray(n[s])}this._geometryVaoHash[i]=null}}activateVao(t,e){let i=this._renderer.gl,s=this._renderer.buffer,n=t.attributes;t.indexBuffer&&s.bind(t.indexBuffer);let o=null;for(let a in n){let u=n[a],l=u.buffer,c=s.getGlBuffer(l),h=e._attributeData[a];if(h){o!==c&&(s.bind(l),o=c);let f=h.location;i.enableVertexAttribArray(f);let d=ue(u.format),m=yS(u.format);if(h.format?.substring(1,4)==="int"?i.vertexAttribIPointer(f,d.size,m,u.stride,u.offset):i.vertexAttribPointer(f,d.size,m,d.normalised,u.stride,u.offset),u.instance)if(this.hasInstance){let g=u.divisor??1;i.vertexAttribDivisor(f,g)}else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,e,i,s){let{gl:n}=this._renderer,o=this._activeGeometry,a=QD[t||o.topology];if(s??(s=o.instanceCount),o.indexBuffer){let u=o.indexBuffer.data.BYTES_PER_ELEMENT,l=u===2?n.UNSIGNED_SHORT:n.UNSIGNED_INT;s>1?n.drawElementsInstanced(a,e||o.indexBuffer.data.length,l,(i||0)*u,s):n.drawElements(a,e||o.indexBuffer.data.length,l,(i||0)*u)}else s>1?n.drawArraysInstanced(a,i||0,e||o.getSize(),s):n.drawArrays(a,i||0,e||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this._renderer=null,this.gl=null,this._activeVao=null,this._activeGeometry=null}};ho.extension={type:[b.WebGLSystem],name:"geometry"}});var JD,Kf,SS,wS=p(()=>{D();mt();Pi();ke();Ge();oe();ft();ri();JD=new be({attributes:{aPosition:[-1,-1,3,-1,-1,3]}}),Kf=class TS{constructor(t){this.useBackBuffer=!1,this._useBackBufferThisRender=!1,this._renderer=t}init(t={}){let{useBackBuffer:e,antialias:i}={...TS.defaultOptions,...t};this.useBackBuffer=e,this._antialias=i,this._renderer.context.supports.msaa||(z("antialiasing, is not supported on when using the back buffer"),this._antialias=!1),this._state=At.for2d();let s=new ve({vertex:\`
|
|
attribute vec2 aPosition;
|
|
out vec2 vUv;
|
|
|
|
void main() {
|
|
gl_Position = vec4(aPosition, 0.0, 1.0);
|
|
|
|
vUv = (aPosition + 1.0) / 2.0;
|
|
|
|
// flip dem UVs
|
|
vUv.y = 1.0 - vUv.y;
|
|
}\`,fragment:\`
|
|
in vec2 vUv;
|
|
out vec4 finalColor;
|
|
|
|
uniform sampler2D uTexture;
|
|
|
|
void main() {
|
|
finalColor = texture(uTexture, vUv);
|
|
}\`,name:"big-triangle"});this._bigTriangleShader=new wt({glProgram:s,resources:{uTexture:I.WHITE.source}})}renderStart(t){let e=this._renderer.renderTarget.getRenderTarget(t.target);if(this._useBackBufferThisRender=this.useBackBuffer&&!!e.isRoot,this._useBackBufferThisRender){let i=this._renderer.renderTarget.getRenderTarget(t.target);this._targetTexture=i.colorTexture,t.target=this._getBackBufferTexture(i.colorTexture)}}renderEnd(){this._presentBackBuffer()}_presentBackBuffer(){let t=this._renderer;t.renderTarget.finishRenderPass(),this._useBackBufferThisRender&&(t.renderTarget.bind(this._targetTexture,!1),this._bigTriangleShader.resources.uTexture=this._backBufferTexture.source,t.encoder.draw({geometry:JD,shader:this._bigTriangleShader,state:this._state}))}_getBackBufferTexture(t){return this._backBufferTexture=this._backBufferTexture||new I({source:new ut({width:t.width,height:t.height,resolution:t._resolution,antialias:this._antialias})}),this._backBufferTexture.source.resize(t.width,t.height,t._resolution),this._backBufferTexture}destroy(){this._backBufferTexture&&(this._backBufferTexture.destroy(),this._backBufferTexture=null)}};Kf.extension={type:[b.WebGLSystem],name:"backBuffer",priority:1};Kf.defaultOptions={useBackBuffer:!1};SS=Kf});var fo,ES=p(()=>{D();fo=class{constructor(t){this._colorMaskCache=15,this._renderer=t}setMask(t){this._colorMaskCache!==t&&(this._colorMaskCache=t,this._renderer.gl.colorMask(!!(t&8),!!(t&4),!!(t&2),!!(t&1)))}};fo.extension={type:[b.WebGLSystem],name:"colorMask"}});var po,CS=p(()=>{D();po=class{constructor(t){this.commandFinished=Promise.resolve(),this._renderer=t}setGeometry(t,e){this._renderer.geometry.bind(t,e.glProgram)}finishRenderPass(){}draw(t){let e=this._renderer,{geometry:i,shader:s,state:n,skipSync:o,topology:a,size:u,start:l,instanceCount:c}=t;e.shader.bind(s,o),e.geometry.bind(i,e.shader._activeProgram),n&&e.state.set(n),e.geometry.draw(a,u,l,c??i.instanceCount)}destroy(){this._renderer=null}};po.extension={type:[b.WebGLSystem],name:"encoder"}});var mo,AS=p(()=>{D();Hf();ei();mo=class{constructor(t){this._stencilCache={enabled:!1,stencilReference:0,stencilMode:pt.NONE},this._renderTargetStencilState=Object.create(null),t.renderTarget.onRenderTargetChange.add(this)}contextChange(t){this._gl=t,this._comparisonFuncMapping={always:t.ALWAYS,never:t.NEVER,equal:t.EQUAL,"not-equal":t.NOTEQUAL,less:t.LESS,"less-equal":t.LEQUAL,greater:t.GREATER,"greater-equal":t.GEQUAL},this._stencilOpsMapping={keep:t.KEEP,zero:t.ZERO,replace:t.REPLACE,invert:t.INVERT,"increment-clamp":t.INCR,"decrement-clamp":t.DECR,"increment-wrap":t.INCR_WRAP,"decrement-wrap":t.DECR_WRAP},this.resetState()}onRenderTargetChange(t){if(this._activeRenderTarget===t)return;this._activeRenderTarget=t;let e=this._renderTargetStencilState[t.uid];e||(e=this._renderTargetStencilState[t.uid]={stencilMode:pt.DISABLED,stencilReference:0}),this.setStencilMode(e.stencilMode,e.stencilReference)}resetState(){this._stencilCache.enabled=!1,this._stencilCache.stencilMode=pt.NONE,this._stencilCache.stencilReference=0}setStencilMode(t,e){let i=this._renderTargetStencilState[this._activeRenderTarget.uid],s=this._gl,n=Qe[t],o=this._stencilCache;if(i.stencilMode=t,i.stencilReference=e,t===pt.DISABLED){this._stencilCache.enabled&&(this._stencilCache.enabled=!1,s.disable(s.STENCIL_TEST));return}this._stencilCache.enabled||(this._stencilCache.enabled=!0,s.enable(s.STENCIL_TEST)),(t!==o.stencilMode||o.stencilReference!==e)&&(o.stencilMode=t,o.stencilReference=e,s.stencilFunc(this._comparisonFuncMapping[n.stencilBack.compare],e,255),s.stencilOp(s.KEEP,s.KEEP,this._stencilOpsMapping[n.stencilBack.passOp]))}};mo.extension={type:[b.WebGLSystem],name:"stencil"}});function DS(r){let t=r.map(n=>({data:n,offset:0,size:0})),e=16,i=0,s=0;for(let n=0;n<t.length;n++){let o=t[n];if(i=qf[o.data.type],!i)throw new Error(\`Unknown type \${o.data.type}\`);o.data.size>1&&(i=Math.max(i,e)*o.data.size);let a=i===12?16:i;o.size=i;let u=s%e;u>0&&e-u<a?s+=(e-u)%16:s+=(i-u%i)%i,o.offset=s,s+=i}return s=Math.ceil(s/16)*16,{uboElements:t,size:s}}var qf,Zf=p(()=>{"use strict";qf={f32:4,i32:4,"vec2<f32>":8,"vec3<f32>":12,"vec4<f32>":16,"vec2<i32>":8,"vec3<i32>":12,"vec4<i32>":16,"mat2x2<f32>":32,"mat3x3<f32>":48,"mat4x4<f32>":64}});function PS(r,t){let e=Math.max(qf[r.data.type]/16,1),i=r.data.value.length/r.data.size,s=(4-i%4)%4,n=r.data.type.indexOf("i32")>=0?"dataInt32":"data";return\`
|
|
v = uv.\${r.data.name};
|
|
offset += \${t};
|
|
|
|
arrayOffset = offset;
|
|
|
|
t = 0;
|
|
|
|
for(var i=0; i < \${r.data.size*e}; i++)
|
|
{
|
|
for(var j = 0; j < \${i}; j++)
|
|
{
|
|
\${n}[arrayOffset++] = v[t++];
|
|
}
|
|
\${s!==0?\`arrayOffset += \${s};\`:""}
|
|
}
|
|
\`}var BS=p(()=>{Zf()});function MS(r){return Fu(r,"uboStd40",PS,Of)}var FS=p(()=>{Uf();Lf();BS()});var go,RS=p(()=>{D();kf();Zf();FS();go=class extends ns{constructor(){super({createUboElements:DS,generateUboSync:MS})}};go.extension={type:[b.WebGLSystem],name:"ubo"}});var zu,kS=p(()=>{"use strict";zu=class{constructor(){this.width=-1,this.height=-1,this.msaa=!1,this.msaaRenderBuffer=[]}}});var Wu,GS=p(()=>{Wt();mt();Ci();ts();kS();Wu=class{constructor(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new tt}init(t,e){this._renderer=t,this._renderTargetSystem=e,t.runners.contextChange.add(this)}contextChange(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new tt}copyToTexture(t,e,i,s,n){let o=this._renderTargetSystem,a=this._renderer,u=o.getGpuRenderTarget(t),l=a.gl;return this.finishRenderPass(t),l.bindFramebuffer(l.FRAMEBUFFER,u.resolveTargetFramebuffer),a.texture.bind(e,0),l.copyTexSubImage2D(l.TEXTURE_2D,0,n.x,n.y,i.x,i.y,s.width,s.height),e}startRenderPass(t,e=!0,i,s){let n=this._renderTargetSystem,o=t.colorTexture,a=n.getGpuRenderTarget(t),u=s.y;t.isRoot&&(u=o.pixelHeight-s.height),t.colorTextures.forEach(h=>{this._renderer.texture.unbind(h)});let l=this._renderer.gl;l.bindFramebuffer(l.FRAMEBUFFER,a.framebuffer);let c=this._viewPortCache;(c.x!==s.x||c.y!==u||c.width!==s.width||c.height!==s.height)&&(c.x=s.x,c.y=u,c.width=s.width,c.height=s.height,l.viewport(s.x,u,s.width,s.height)),!a.depthStencilRenderBuffer&&(t.stencil||t.depth)&&this._initStencil(a),this.clear(t,e,i)}finishRenderPass(t){let i=this._renderTargetSystem.getGpuRenderTarget(t);if(!i.msaa)return;let s=this._renderer.gl;s.bindFramebuffer(s.FRAMEBUFFER,i.resolveTargetFramebuffer),s.bindFramebuffer(s.READ_FRAMEBUFFER,i.framebuffer),s.blitFramebuffer(0,0,i.width,i.height,0,0,i.width,i.height,s.COLOR_BUFFER_BIT,s.NEAREST),s.bindFramebuffer(s.FRAMEBUFFER,i.framebuffer)}initGpuRenderTarget(t){let i=this._renderer.gl,s=new zu,n=t.colorTexture;return Yt.test(n.resource)?(this._renderer.context.ensureCanvasSize(t.colorTexture.resource),s.framebuffer=null,s):(this._initColor(t,s),i.bindFramebuffer(i.FRAMEBUFFER,null),s)}destroyGpuRenderTarget(t){let e=this._renderer.gl;t.framebuffer&&(e.deleteFramebuffer(t.framebuffer),t.framebuffer=null),t.resolveTargetFramebuffer&&(e.deleteFramebuffer(t.resolveTargetFramebuffer),t.resolveTargetFramebuffer=null),t.depthStencilRenderBuffer&&(e.deleteRenderbuffer(t.depthStencilRenderBuffer),t.depthStencilRenderBuffer=null),t.msaaRenderBuffer.forEach(i=>{e.deleteRenderbuffer(i)}),t.msaaRenderBuffer=null}clear(t,e,i){if(!e)return;let s=this._renderTargetSystem;typeof e=="boolean"&&(e=e?Ut.ALL:Ut.NONE);let n=this._renderer.gl;if(e&Ut.COLOR){i??(i=s.defaultClearColor);let o=this._clearColorCache,a=i;(o[0]!==a[0]||o[1]!==a[1]||o[2]!==a[2]||o[3]!==a[3])&&(o[0]=a[0],o[1]=a[1],o[2]=a[2],o[3]=a[3],n.clearColor(a[0],a[1],a[2],a[3]))}n.clear(e)}resizeGpuRenderTarget(t){if(t.isRoot)return;let i=this._renderTargetSystem.getGpuRenderTarget(t);this._resizeColor(t,i),(t.stencil||t.depth)&&this._resizeStencil(i)}_initColor(t,e){let i=this._renderer,s=i.gl,n=s.createFramebuffer();if(e.resolveTargetFramebuffer=n,s.bindFramebuffer(s.FRAMEBUFFER,n),e.width=t.colorTexture.source.pixelWidth,e.height=t.colorTexture.source.pixelHeight,t.colorTextures.forEach((o,a)=>{let u=o.source;u.antialias&&(i.context.supports.msaa?e.msaa=!0:z("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),i.texture.bindSource(u,0);let c=i.texture.getGlSource(u).texture;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+a,3553,c,0)}),e.msaa){let o=s.createFramebuffer();e.framebuffer=o,s.bindFramebuffer(s.FRAMEBUFFER,o),t.colorTextures.forEach((a,u)=>{let l=s.createRenderbuffer();e.msaaRenderBuffer[u]=l})}else e.framebuffer=n;this._resizeColor(t,e)}_resizeColor(t,e){let i=t.colorTexture.source;if(e.width=i.pixelWidth,e.height=i.pixelHeight,t.colorTextures.forEach((s,n)=>{n!==0&&s.source.resize(i.width,i.height,i._resolution)}),e.msaa){let s=this._renderer,n=s.gl,o=e.framebuffer;n.bindFramebuffer(n.FRAMEBUFFER,o),t.colorTextures.forEach((a,u)=>{let l=a.source;s.texture.bindSource(l,0);let h=s.texture.getGlSource(l).internalFormat,f=e.msaaRenderBuffer[u];n.bindRenderbuffer(n.RENDERBUFFER,f),n.renderbufferStorageMultisample(n.RENDERBUFFER,4,h,l.pixelWidth,l.pixelHeight),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+u,n.RENDERBUFFER,f)})}}_initStencil(t){if(t.framebuffer===null)return;let e=this._renderer.gl,i=e.createRenderbuffer();t.depthStencilRenderBuffer=i,e.bindRenderbuffer(e.RENDERBUFFER,i),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,i),this._resizeStencil(t)}_resizeStencil(t){let e=this._renderer.gl;e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilRenderBuffer),t.msaa?e.renderbufferStorageMultisample(e.RENDERBUFFER,4,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,this._renderer.context.webGLVersion===2?e.DEPTH24_STENCIL8:e.DEPTH_STENCIL,t.width,t.height)}prerender(t){let e=t.colorTexture.resource;this._renderer.context.multiView&&Yt.test(e)&&this._renderer.context.ensureCanvasSize(e)}postrender(t){if(this._renderer.context.multiView&&Yt.test(t.colorTexture.resource)){let e=this._renderer.context.canvas,i=t.colorTexture;i.context2D.drawImage(e,0,i.pixelHeight-e.height)}}}});var xo,IS=p(()=>{D();zf();GS();xo=class extends as{constructor(t){super(t),this.adaptor=new Wu,this.adaptor.init(t,this)}};xo.extension={type:[b.WebGLSystem],name:"renderTarget"}});function US(r,t){let e=[],i=[\`
|
|
var g = s.groups;
|
|
var sS = r.shader;
|
|
var p = s.glProgram;
|
|
var ugS = r.uniformGroup;
|
|
var resources;
|
|
\`],s=!1,n=0,o=t._getProgramData(r.glProgram);for(let u in r.groups){let l=r.groups[u];e.push(\`
|
|
resources = g[\${u}].resources;
|
|
\`);for(let c in l.resources){let h=l.resources[c];if(h instanceof ct)if(h.ubo){let f=r._uniformBindMap[u][Number(c)];e.push(\`
|
|
sS.bindUniformBlock(
|
|
resources[\${c}],
|
|
'\${f}',
|
|
\${r.glProgram._uniformBlockData[f].index}
|
|
);
|
|
\`)}else e.push(\`
|
|
ugS.updateUniformGroup(resources[\${c}], p, sD);
|
|
\`);else if(h instanceof Gr){let f=r._uniformBindMap[u][Number(c)];e.push(\`
|
|
sS.bindUniformBlock(
|
|
resources[\${c}],
|
|
'\${f}',
|
|
\${r.glProgram._uniformBlockData[f].index}
|
|
);
|
|
\`)}else if(h instanceof ut){let f=r._uniformBindMap[u][c],d=o.uniformData[f];d&&(s||(s=!0,i.push(\`
|
|
var tS = r.texture;
|
|
\`)),t._gl.uniform1i(d.location,n),e.push(\`
|
|
tS.bind(resources[\${c}], \${n});
|
|
\`),n++)}}}let a=[...i,...e].join(\`
|
|
\`);return new Function("r","s","sD",a)}var OS=p(()=>{Ru();ee();oe()});var Vu,LS=p(()=>{"use strict";Vu=class{constructor(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}});function Qf(r,t,e){let i=r.createShader(t);return r.shaderSource(i,e),r.compileShader(i),i}var NS=p(()=>{"use strict"});function Jf(r){let t=new Array(r);for(let e=0;e<t.length;e++)t[e]=!1;return t}function Xu(r,t){switch(r){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return Jf(2*t);case"bvec3":return Jf(3*t);case"bvec4":return Jf(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var td=p(()=>{"use strict"});function ed(r,t){if(!$u){let e=Object.keys(HS);$u={};for(let i=0;i<e.length;++i){let s=e[i];$u[r[s]]=HS[s]}}return $u[t]}function zS(r,t){let e=ed(r,t);return tP[e]||"float32"}var $u,HS,tP,rd=p(()=>{"use strict";$u=null,HS={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"},tP={float:"float32",vec2:"float32x2",vec3:"float32x3",vec4:"float32x4",int:"sint32",ivec2:"sint32x2",ivec3:"sint32x3",ivec4:"sint32x4",uint:"uint32",uvec2:"uint32x2",uvec3:"uint32x3",uvec4:"uint32x4",bool:"uint32",bvec2:"uint32x2",bvec3:"uint32x3",bvec4:"uint32x4"}});function WS(r,t,e=!1){let i={},s=t.getProgramParameter(r,t.ACTIVE_ATTRIBUTES);for(let o=0;o<s;o++){let a=t.getActiveAttrib(r,o);if(a.name.startsWith("gl_"))continue;let u=zS(t,a.type);i[a.name]={location:0,format:u,stride:ue(u).stride,offset:0,instance:!1,start:0}}let n=Object.keys(i);if(e){n.sort((o,a)=>o>a?1:-1);for(let o=0;o<n.length;o++)i[n[o]].location=o,t.bindAttribLocation(r,o,n[o]);t.linkProgram(r)}else for(let o=0;o<n.length;o++)i[n[o]].location=t.getAttribLocation(r,n[o]);return i}var VS=p(()=>{ii();rd()});function XS(r,t){if(!t.ACTIVE_UNIFORM_BLOCKS)return{};let e={},i=t.getProgramParameter(r,t.ACTIVE_UNIFORM_BLOCKS);for(let s=0;s<i;s++){let n=t.getActiveUniformBlockName(r,s),o=t.getUniformBlockIndex(r,n),a=t.getActiveUniformBlockParameter(r,s,t.UNIFORM_BLOCK_DATA_SIZE);e[n]={name:n,index:o,size:a}}return e}var $S=p(()=>{"use strict"});function jS(r,t){let e={},i=t.getProgramParameter(r,t.ACTIVE_UNIFORMS);for(let s=0;s<i;s++){let n=t.getActiveUniform(r,s),o=n.name.replace(/\\[.*?\\]$/,""),a=!!n.name.match(/\\[.*?\\]$/),u=ed(t,n.type);e[o]={name:o,index:s,type:u,size:n.size,isArray:a,value:Xu(u,n.size)}}return e}var YS=p(()=>{td();rd()});function KS(r,t){let e=r.getShaderSource(t).split(\`
|
|
\`).map((l,c)=>\`\${c}: \${l}\`),i=r.getShaderInfoLog(t),s=i.split(\`
|
|
\`),n={},o=s.map(l=>parseFloat(l.replace(/^ERROR\\: 0\\:([\\d]+)\\:.*$/,"$1"))).filter(l=>l&&!n[l]?(n[l]=!0,!0):!1),a=[""];o.forEach(l=>{e[l-1]=\`%c\${e[l-1]}%c\`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});let u=e.join(\`
|
|
\`);a[0]=u,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function qS(r,t,e,i){r.getProgramParameter(t,r.LINK_STATUS)||(r.getShaderParameter(e,r.COMPILE_STATUS)||KS(r,e),r.getShaderParameter(i,r.COMPILE_STATUS)||KS(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(t)))}var ZS=p(()=>{"use strict"});function QS(r,t){let e=Qf(r,r.VERTEX_SHADER,t.vertex),i=Qf(r,r.FRAGMENT_SHADER,t.fragment),s=r.createProgram();r.attachShader(s,e),r.attachShader(s,i);let n=t.transformFeedbackVaryings;n&&(typeof r.transformFeedbackVaryings!="function"?z("TransformFeedback is not supported but TransformFeedbackVaryings are given."):r.transformFeedbackVaryings(s,n.names,n.bufferMode==="separate"?r.SEPARATE_ATTRIBS:r.INTERLEAVED_ATTRIBS)),r.linkProgram(s),r.getProgramParameter(s,r.LINK_STATUS)||qS(r,s,e,i),t._attributeData=WS(s,r,!/^[ \\t]*#[ \\t]*version[ \\t]+300[ \\t]+es[ \\t]*$/m.test(t.vertex)),t._uniformData=jS(s,r),t._uniformBlockData=XS(s,r),r.deleteShader(e),r.deleteShader(i);let o={};for(let u in t._uniformData){let l=t._uniformData[u];o[u]={location:r.getUniformLocation(s,u),value:Xu(l.type,l.size)}}return new Vu(s,o)}var JS=p(()=>{mt();LS();NS();td();VS();$S();YS();ZS()});var ju,_o,t1=p(()=>{D();ti();OS();JS();ju={textureCount:0,blockIndex:0},_o=class{constructor(t){this._activeProgram=null,this._programDataHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_programDataHash")}contextChange(t){this._gl=t,this._programDataHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._activeProgram=null,this.maxTextures=ye()}bind(t,e){if(this._setProgram(t.glProgram),e)return;ju.textureCount=0,ju.blockIndex=0;let i=this._shaderSyncFunctions[t.glProgram._key];i||(i=this._shaderSyncFunctions[t.glProgram._key]=this._generateShaderSync(t,this)),this._renderer.buffer.nextBindBase(!!t.glProgram.transformFeedbackVaryings),i(this._renderer,t,ju)}updateUniformGroup(t){this._renderer.uniformGroup.updateUniformGroup(t,this._activeProgram,ju)}bindUniformBlock(t,e,i=0){let s=this._renderer.buffer,n=this._getProgramData(this._activeProgram),o=t._bufferResource;o||this._renderer.ubo.updateUniformGroup(t);let a=t.buffer,u=s.updateBuffer(a),l=s.freeLocationForBufferBase(u);if(o){let{offset:h,size:f}=t;h===0&&f===a.data.byteLength?s.bindBufferBase(u,l):s.bindBufferRange(u,l,h)}else s.getLastBindBaseLocation(u)!==l&&s.bindBufferBase(u,l);let c=this._activeProgram._uniformBlockData[e].index;n.uniformBlockBindings[i]!==l&&(n.uniformBlockBindings[i]=l,this._renderer.gl.uniformBlockBinding(n.program,c,l))}_setProgram(t){if(this._activeProgram===t)return;this._activeProgram=t;let e=this._getProgramData(t);this._gl.useProgram(e.program)}_getProgramData(t){return this._programDataHash[t._key]||this._createProgramData(t)}_createProgramData(t){let e=t._key;return this._programDataHash[e]=QS(this._gl,t),this._programDataHash[e]}destroy(){for(let t of Object.keys(this._programDataHash))this._programDataHash[t].destroy(),this._programDataHash[t]=null;this._programDataHash=null}_generateShaderSync(t,e){return US(t,e)}resetState(){this._activeProgram=null}};_o.extension={type:[b.WebGLSystem],name:"shader"}});var e1,r1,i1=p(()=>{"use strict";e1={f32:\`if (cv !== v) {
|
|
cu.value = v;
|
|
gl.uniform1f(location, v);
|
|
}\`,"vec2<f32>":\`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
gl.uniform2f(location, v[0], v[1]);
|
|
}\`,"vec3<f32>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
gl.uniform3f(location, v[0], v[1], v[2]);
|
|
}\`,"vec4<f32>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
|
}\`,i32:\`if (cv !== v) {
|
|
cu.value = v;
|
|
gl.uniform1i(location, v);
|
|
}\`,"vec2<i32>":\`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
gl.uniform2i(location, v[0], v[1]);
|
|
}\`,"vec3<i32>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
|
}\`,"vec4<i32>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
|
}\`,u32:\`if (cv !== v) {
|
|
cu.value = v;
|
|
gl.uniform1ui(location, v);
|
|
}\`,"vec2<u32>":\`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
gl.uniform2ui(location, v[0], v[1]);
|
|
}\`,"vec3<u32>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
gl.uniform3ui(location, v[0], v[1], v[2]);
|
|
}\`,"vec4<u32>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
|
}\`,bool:\`if (cv !== v) {
|
|
cu.value = v;
|
|
gl.uniform1i(location, v);
|
|
}\`,"vec2<bool>":\`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
gl.uniform2i(location, v[0], v[1]);
|
|
}\`,"vec3<bool>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
|
}\`,"vec4<bool>":\`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
|
}\`,"mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);"},r1={f32:"gl.uniform1fv(location, v);","vec2<f32>":"gl.uniform2fv(location, v);","vec3<f32>":"gl.uniform3fv(location, v);","vec4<f32>":"gl.uniform4fv(location, v);","mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2<i32>":"gl.uniform2iv(location, v);","vec3<i32>":"gl.uniform3iv(location, v);","vec4<i32>":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2<u32>":"gl.uniform2iv(location, v);","vec3<u32>":"gl.uniform3iv(location, v);","vec4<u32>":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2<bool>":"gl.uniform2iv(location, v);","vec3<bool>":"gl.uniform3iv(location, v);","vec4<bool>":"gl.uniform4iv(location, v);"}});function s1(r,t){let e=[\`
|
|
var v = null;
|
|
var cv = null;
|
|
var cu = null;
|
|
var t = 0;
|
|
var gl = renderer.gl;
|
|
var name = null;
|
|
\`];for(let i in r.uniforms){if(!t[i]){r.uniforms[i]instanceof ct?r.uniforms[i].ubo?e.push(\`
|
|
renderer.shader.bindUniformBlock(uv.\${i}, "\${i}");
|
|
\`):e.push(\`
|
|
renderer.shader.updateUniformGroup(uv.\${i});
|
|
\`):r.uniforms[i]instanceof Gr&&e.push(\`
|
|
renderer.shader.bindBufferResource(uv.\${i}, "\${i}");
|
|
\`);continue}let s=r.uniformStructures[i],n=!1;for(let o=0;o<mr.length;o++){let a=mr[o];if(s.type===a.type&&a.test(s)){e.push(\`name = "\${i}";\`,mr[o].uniform),n=!0;break}}if(!n){let a=(s.size===1?e1:r1)[s.type].replace("location",\`ud["\${i}"].location\`);e.push(\`
|
|
cu = ud["\${i}"];
|
|
cv = cu.value;
|
|
v = uv["\${i}"];
|
|
\${a};\`)}}return new Function("ud","uv","renderer","syncData",e.join(\`
|
|
\`))}var n1=p(()=>{Ru();ee();If();i1()});var yo,o1=p(()=>{D();n1();yo=class{constructor(t){this._cache={},this._uniformGroupSyncHash={},this._renderer=t,this.gl=null,this._cache={}}contextChange(t){this.gl=t}updateUniformGroup(t,e,i){let s=this._renderer.shader._getProgramData(e);(!t.isStatic||t._dirtyId!==s.uniformDirtyGroups[t.uid])&&(s.uniformDirtyGroups[t.uid]=t._dirtyId,this._getUniformSyncFunction(t,e)(s.uniformData,t.uniforms,this._renderer,i))}_getUniformSyncFunction(t,e){return this._uniformGroupSyncHash[t._signature]?.[e._key]||this._createUniformSyncFunction(t,e)}_createUniformSyncFunction(t,e){let i=this._uniformGroupSyncHash[t._signature]||(this._uniformGroupSyncHash[t._signature]={}),s=this._getSignature(t,e._uniformData,"u");return this._cache[s]||(this._cache[s]=this._generateUniformsSync(t,e._uniformData)),i[e._key]=this._cache[s],i[e._key]}_generateUniformsSync(t,e){return s1(t,e)}_getSignature(t,e,i){let s=t.uniforms,n=[\`\${i}-\`];for(let o in s)n.push(o),e[o]&&n.push(e[o].type);return n.join("-")}destroy(){this._renderer=null,this._cache=null}};yo.extension={type:[b.WebGLSystem],name:"uniformGroup"}});function a1(r){let t={};if(t.normal=[r.ONE,r.ONE_MINUS_SRC_ALPHA],t.add=[r.ONE,r.ONE],t.multiply=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],t.screen=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],t.none=[0,0],t["normal-npm"]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],t["add-npm"]=[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],t["screen-npm"]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],t.erase=[r.ZERO,r.ONE_MINUS_SRC_ALPHA],!(r instanceof Q.get().getWebGLRenderingContext()))t.min=[r.ONE,r.ONE,r.ONE,r.ONE,r.MIN,r.MIN],t.max=[r.ONE,r.ONE,r.ONE,r.ONE,r.MAX,r.MAX];else{let i=r.getExtension("EXT_blend_minmax");i&&(t.min=[r.ONE,r.ONE,r.ONE,r.ONE,i.MIN_EXT,i.MIN_EXT],t.max=[r.ONE,r.ONE,r.ONE,r.ONE,i.MAX_EXT,i.MAX_EXT])}return t}var u1=p(()=>{Pt()});var eP,rP,iP,sP,nP,oP,l1,c1,h1=p(()=>{D();Ge();u1();eP=0,rP=1,iP=2,sP=3,nP=4,oP=5,l1=class id{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode="none",this._blendEq=!1,this.map=[],this.map[eP]=this.setBlend,this.map[rP]=this.setOffset,this.map[iP]=this.setCullFace,this.map[sP]=this.setDepthTest,this.map[nP]=this.setFrontFace,this.map[oP]=this.setDepthMask,this.checks=[],this.defaultState=At.for2d()}contextChange(t){this.gl=t,this.blendModesMap=a1(t),this.resetState()}set(t){if(t||(t=this.defaultState),this.stateId!==t.data){let e=this.stateId^t.data,i=0;for(;e;)e&1&&this.map[i].call(this,!!(t.data&1<<i)),e>>=1,i++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t||(t=this.defaultState);for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this._updateCheck(id._checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this._updateCheck(id._checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(this.blendModesMap[t]||(t="normal"),t===this.blendMode)return;this.blendMode=t;let e=this.blendModesMap[t],i=this.gl;e.length===2?i.blendFunc(e[0],e[1]):i.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,i.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,i.blendEquationSeparate(i.FUNC_ADD,i.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}resetState(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode="",this.setBlendMode("normal")}_updateCheck(t,e){let i=this.checks.indexOf(t);e&&i===-1?this.checks.push(t):!e&&i!==-1&&this.checks.splice(i,1)}static _checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static _checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null,this.checks.length=0}};l1.extension={type:[b.WebGLSystem],name:"state"};c1=l1});var Yu,f1=p(()=>{Yf();Yu=class{constructor(t){this.target=jf.TEXTURE_2D,this.texture=t,this.width=-1,this.height=-1,this.type=ot.UNSIGNED_BYTE,this.internalFormat=Hu.RGBA,this.format=Hu.RGBA,this.samplerType=0}}});var d1,p1=p(()=>{"use strict";d1={id:"buffer",upload(r,t,e){t.width===r.width||t.height===r.height?e.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,t.format,t.type,r.resource):e.texImage2D(t.target,0,t.internalFormat,r.width,r.height,0,t.format,t.type,r.resource),t.width=r.width,t.height=r.height}}});var aP,m1,g1=p(()=>{"use strict";aP={"bc1-rgba-unorm":!0,"bc1-rgba-unorm-srgb":!0,"bc2-rgba-unorm":!0,"bc2-rgba-unorm-srgb":!0,"bc3-rgba-unorm":!0,"bc3-rgba-unorm-srgb":!0,"bc4-r-unorm":!0,"bc4-r-snorm":!0,"bc5-rg-unorm":!0,"bc5-rg-snorm":!0,"bc6h-rgb-ufloat":!0,"bc6h-rgb-float":!0,"bc7-rgba-unorm":!0,"bc7-rgba-unorm-srgb":!0,"etc2-rgb8unorm":!0,"etc2-rgb8unorm-srgb":!0,"etc2-rgb8a1unorm":!0,"etc2-rgb8a1unorm-srgb":!0,"etc2-rgba8unorm":!0,"etc2-rgba8unorm-srgb":!0,"eac-r11unorm":!0,"eac-r11snorm":!0,"eac-rg11unorm":!0,"eac-rg11snorm":!0,"astc-4x4-unorm":!0,"astc-4x4-unorm-srgb":!0,"astc-5x4-unorm":!0,"astc-5x4-unorm-srgb":!0,"astc-5x5-unorm":!0,"astc-5x5-unorm-srgb":!0,"astc-6x5-unorm":!0,"astc-6x5-unorm-srgb":!0,"astc-6x6-unorm":!0,"astc-6x6-unorm-srgb":!0,"astc-8x5-unorm":!0,"astc-8x5-unorm-srgb":!0,"astc-8x6-unorm":!0,"astc-8x6-unorm-srgb":!0,"astc-8x8-unorm":!0,"astc-8x8-unorm-srgb":!0,"astc-10x5-unorm":!0,"astc-10x5-unorm-srgb":!0,"astc-10x6-unorm":!0,"astc-10x6-unorm-srgb":!0,"astc-10x8-unorm":!0,"astc-10x8-unorm-srgb":!0,"astc-10x10-unorm":!0,"astc-10x10-unorm-srgb":!0,"astc-12x10-unorm":!0,"astc-12x10-unorm-srgb":!0,"astc-12x12-unorm":!0,"astc-12x12-unorm-srgb":!0},m1={id:"compressed",upload(r,t,e){e.pixelStorei(e.UNPACK_ALIGNMENT,4);let i=r.pixelWidth,s=r.pixelHeight,n=!!aP[r.format];for(let o=0;o<r.resource.length;o++){let a=r.resource[o];n?e.compressedTexImage2D(e.TEXTURE_2D,o,t.internalFormat,i,s,0,a):e.texImage2D(e.TEXTURE_2D,o,t.internalFormat,i,s,0,t.format,t.type,a),i=Math.max(i>>1,1),s=Math.max(s>>1,1)}}}});var Ku,sd=p(()=>{"use strict";Ku={id:"image",upload(r,t,e,i){let s=t.width,n=t.height,o=r.pixelWidth,a=r.pixelHeight,u=r.resourceWidth,l=r.resourceHeight;u<o||l<a?((s!==o||n!==a)&&e.texImage2D(t.target,0,t.internalFormat,o,a,0,t.format,t.type,null),i===2?e.texSubImage2D(e.TEXTURE_2D,0,0,0,u,l,t.format,t.type,r.resource):e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.format,t.type,r.resource)):s===o&&n===a?e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.format,t.type,r.resource):i===2?e.texImage2D(t.target,0,t.internalFormat,o,a,0,t.format,t.type,r.resource):e.texImage2D(t.target,0,t.internalFormat,t.format,t.type,r.resource),t.width=o,t.height=a}}});var x1,_1=p(()=>{sd();x1={id:"video",upload(r,t,e,i){if(!r.isValid){e.texImage2D(t.target,0,t.internalFormat,1,1,0,t.format,t.type,null);return}Ku.upload(r,t,e,i)}}});var nd,y1,qu,b1,v1=p(()=>{"use strict";nd={linear:9729,nearest:9728},y1={linear:{linear:9987,nearest:9985},nearest:{linear:9986,nearest:9984}},qu={"clamp-to-edge":33071,repeat:10497,"mirror-repeat":33648},b1={never:512,less:513,equal:514,"less-equal":515,greater:516,"not-equal":517,"greater-equal":518,always:519}});function od(r,t,e,i,s,n,o,a){let u=n;if(!a||r.addressModeU!=="repeat"||r.addressModeV!=="repeat"||r.addressModeW!=="repeat"){let l=qu[o?"clamp-to-edge":r.addressModeU],c=qu[o?"clamp-to-edge":r.addressModeV],h=qu[o?"clamp-to-edge":r.addressModeW];t[s](u,t.TEXTURE_WRAP_S,l),t[s](u,t.TEXTURE_WRAP_T,c),t.TEXTURE_WRAP_R&&t[s](u,t.TEXTURE_WRAP_R,h)}if((!a||r.magFilter!=="linear")&&t[s](u,t.TEXTURE_MAG_FILTER,nd[r.magFilter]),e){if(!a||r.mipmapFilter!=="linear"){let l=y1[r.minFilter][r.mipmapFilter];t[s](u,t.TEXTURE_MIN_FILTER,l)}}else t[s](u,t.TEXTURE_MIN_FILTER,nd[r.minFilter]);if(i&&r.maxAnisotropy>1){let l=Math.min(r.maxAnisotropy,t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));t[s](u,i.TEXTURE_MAX_ANISOTROPY_EXT,l)}r.compare&&t[s](u,t.TEXTURE_COMPARE_FUNC,b1[r.compare])}var T1=p(()=>{v1()});function S1(r){return{r8unorm:r.RED,r8snorm:r.RED,r8uint:r.RED,r8sint:r.RED,r16uint:r.RED,r16sint:r.RED,r16float:r.RED,rg8unorm:r.RG,rg8snorm:r.RG,rg8uint:r.RG,rg8sint:r.RG,r32uint:r.RED,r32sint:r.RED,r32float:r.RED,rg16uint:r.RG,rg16sint:r.RG,rg16float:r.RG,rgba8unorm:r.RGBA,"rgba8unorm-srgb":r.RGBA,rgba8snorm:r.RGBA,rgba8uint:r.RGBA,rgba8sint:r.RGBA,bgra8unorm:r.RGBA,"bgra8unorm-srgb":r.RGBA,rgb9e5ufloat:r.RGB,rgb10a2unorm:r.RGBA,rg11b10ufloat:r.RGB,rg32uint:r.RG,rg32sint:r.RG,rg32float:r.RG,rgba16uint:r.RGBA,rgba16sint:r.RGBA,rgba16float:r.RGBA,rgba32uint:r.RGBA,rgba32sint:r.RGBA,rgba32float:r.RGBA,stencil8:r.STENCIL_INDEX8,depth16unorm:r.DEPTH_COMPONENT,depth24plus:r.DEPTH_COMPONENT,"depth24plus-stencil8":r.DEPTH_STENCIL,depth32float:r.DEPTH_COMPONENT,"depth32float-stencil8":r.DEPTH_STENCIL}}var w1=p(()=>{"use strict"});function E1(r,t){let e={},i=r.RGBA;return r instanceof Q.get().getWebGLRenderingContext()?t.srgb&&(e={"rgba8unorm-srgb":t.srgb.SRGB8_ALPHA8_EXT,"bgra8unorm-srgb":t.srgb.SRGB8_ALPHA8_EXT}):(e={"rgba8unorm-srgb":r.SRGB8_ALPHA8,"bgra8unorm-srgb":r.SRGB8_ALPHA8},i=r.RGBA8),{r8unorm:r.R8,r8snorm:r.R8_SNORM,r8uint:r.R8UI,r8sint:r.R8I,r16uint:r.R16UI,r16sint:r.R16I,r16float:r.R16F,rg8unorm:r.RG8,rg8snorm:r.RG8_SNORM,rg8uint:r.RG8UI,rg8sint:r.RG8I,r32uint:r.R32UI,r32sint:r.R32I,r32float:r.R32F,rg16uint:r.RG16UI,rg16sint:r.RG16I,rg16float:r.RG16F,rgba8unorm:r.RGBA,...e,rgba8snorm:r.RGBA8_SNORM,rgba8uint:r.RGBA8UI,rgba8sint:r.RGBA8I,bgra8unorm:i,rgb9e5ufloat:r.RGB9_E5,rgb10a2unorm:r.RGB10_A2,rg11b10ufloat:r.R11F_G11F_B10F,rg32uint:r.RG32UI,rg32sint:r.RG32I,rg32float:r.RG32F,rgba16uint:r.RGBA16UI,rgba16sint:r.RGBA16I,rgba16float:r.RGBA16F,rgba32uint:r.RGBA32UI,rgba32sint:r.RGBA32I,rgba32float:r.RGBA32F,stencil8:r.STENCIL_INDEX8,depth16unorm:r.DEPTH_COMPONENT16,depth24plus:r.DEPTH_COMPONENT24,"depth24plus-stencil8":r.DEPTH24_STENCIL8,depth32float:r.DEPTH_COMPONENT32F,"depth32float-stencil8":r.DEPTH32F_STENCIL8,...t.s3tc?{"bc1-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,"bc2-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,"bc3-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{},...t.s3tc_sRGB?{"bc1-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,"bc2-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,"bc3-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}:{},...t.rgtc?{"bc4-r-unorm":t.rgtc.COMPRESSED_RED_RGTC1_EXT,"bc4-r-snorm":t.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,"bc5-rg-unorm":t.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,"bc5-rg-snorm":t.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}:{},...t.bptc?{"bc6h-rgb-float":t.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,"bc6h-rgb-ufloat":t.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,"bc7-rgba-unorm":t.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,"bc7-rgba-unorm-srgb":t.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT}:{},...t.etc?{"etc2-rgb8unorm":t.etc.COMPRESSED_RGB8_ETC2,"etc2-rgb8unorm-srgb":t.etc.COMPRESSED_SRGB8_ETC2,"etc2-rgb8a1unorm":t.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgb8a1unorm-srgb":t.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgba8unorm":t.etc.COMPRESSED_RGBA8_ETC2_EAC,"etc2-rgba8unorm-srgb":t.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,"eac-r11unorm":t.etc.COMPRESSED_R11_EAC,"eac-rg11unorm":t.etc.COMPRESSED_SIGNED_RG11_EAC}:{},...t.astc?{"astc-4x4-unorm":t.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,"astc-4x4-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,"astc-5x4-unorm":t.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,"astc-5x4-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,"astc-5x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,"astc-5x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,"astc-6x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,"astc-6x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,"astc-6x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,"astc-6x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,"astc-8x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,"astc-8x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,"astc-8x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,"astc-8x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,"astc-8x8-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,"astc-8x8-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,"astc-10x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,"astc-10x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,"astc-10x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,"astc-10x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,"astc-10x8-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,"astc-10x8-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,"astc-10x10-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,"astc-10x10-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,"astc-12x10-unorm":t.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,"astc-12x10-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,"astc-12x12-unorm":t.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,"astc-12x12-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR}:{}}}var C1=p(()=>{Pt()});function A1(r){return{r8unorm:r.UNSIGNED_BYTE,r8snorm:r.BYTE,r8uint:r.UNSIGNED_BYTE,r8sint:r.BYTE,r16uint:r.UNSIGNED_SHORT,r16sint:r.SHORT,r16float:r.HALF_FLOAT,rg8unorm:r.UNSIGNED_BYTE,rg8snorm:r.BYTE,rg8uint:r.UNSIGNED_BYTE,rg8sint:r.BYTE,r32uint:r.UNSIGNED_INT,r32sint:r.INT,r32float:r.FLOAT,rg16uint:r.UNSIGNED_SHORT,rg16sint:r.SHORT,rg16float:r.HALF_FLOAT,rgba8unorm:r.UNSIGNED_BYTE,"rgba8unorm-srgb":r.UNSIGNED_BYTE,rgba8snorm:r.BYTE,rgba8uint:r.UNSIGNED_BYTE,rgba8sint:r.BYTE,bgra8unorm:r.UNSIGNED_BYTE,"bgra8unorm-srgb":r.UNSIGNED_BYTE,rgb9e5ufloat:r.UNSIGNED_INT_5_9_9_9_REV,rgb10a2unorm:r.UNSIGNED_INT_2_10_10_10_REV,rg11b10ufloat:r.UNSIGNED_INT_10F_11F_11F_REV,rg32uint:r.UNSIGNED_INT,rg32sint:r.INT,rg32float:r.FLOAT,rgba16uint:r.UNSIGNED_SHORT,rgba16sint:r.SHORT,rgba16float:r.HALF_FLOAT,rgba32uint:r.UNSIGNED_INT,rgba32sint:r.INT,rgba32float:r.FLOAT,stencil8:r.UNSIGNED_BYTE,depth16unorm:r.UNSIGNED_SHORT,depth24plus:r.UNSIGNED_INT,"depth24plus-stencil8":r.UNSIGNED_INT_24_8,depth32float:r.FLOAT,"depth32float-stencil8":r.FLOAT_32_UNSIGNED_INT_24_8_REV}}var D1=p(()=>{"use strict"});var uP,bo,P1=p(()=>{Pt();D();ft();f1();p1();g1();sd();_1();T1();w1();C1();D1();uP=4,bo=class{constructor(t){this.managedTextures=[],this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundTextures=[],this._activeTextureLocation=-1,this._boundSamplers=Object.create(null),this._uploads={image:Ku,buffer:d1,video:x1,compressed:m1},this._premultiplyAlpha=!1,this._useSeparateSamplers=!1,this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_glTextures"),this._renderer.renderableGC.addManagedHash(this,"_glSamplers")}contextChange(t){this._gl=t,this._mapFormatToInternalFormat||(this._mapFormatToInternalFormat=E1(t,this._renderer.context.extensions),this._mapFormatToType=A1(t),this._mapFormatToFormat=S1(t)),this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundSamplers=Object.create(null),this._premultiplyAlpha=!1;for(let e=0;e<16;e++)this.bind(I.EMPTY,e)}initSource(t){this.bind(t)}bind(t,e=0){let i=t.source;t?(this.bindSource(i,e),this._useSeparateSamplers&&this._bindSampler(i.style,e)):(this.bindSource(null,e),this._useSeparateSamplers&&this._bindSampler(null,e))}bindSource(t,e=0){let i=this._gl;if(t._touched=this._renderer.textureGC.count,this._boundTextures[e]!==t){this._boundTextures[e]=t,this._activateLocation(e),t||(t=I.EMPTY.source);let s=this.getGlSource(t);i.bindTexture(s.target,s.texture)}}_bindSampler(t,e=0){let i=this._gl;if(!t){this._boundSamplers[e]=null,i.bindSampler(e,null);return}let s=this._getGlSampler(t);this._boundSamplers[e]!==s&&(this._boundSamplers[e]=s,i.bindSampler(e,s))}unbind(t){let e=t.source,i=this._boundTextures,s=this._gl;for(let n=0;n<i.length;n++)if(i[n]===e){this._activateLocation(n);let o=this.getGlSource(e);s.bindTexture(o.target,null),i[n]=null}}_activateLocation(t){this._activeTextureLocation!==t&&(this._activeTextureLocation=t,this._gl.activeTexture(this._gl.TEXTURE0+t))}_initSource(t){let e=this._gl,i=new Yu(e.createTexture());if(i.type=this._mapFormatToType[t.format],i.internalFormat=this._mapFormatToInternalFormat[t.format],i.format=this._mapFormatToFormat[t.format],t.autoGenerateMipmaps&&(this._renderer.context.supports.nonPowOf2mipmaps||t.isPowerOfTwo)){let s=Math.max(t.width,t.height);t.mipLevelCount=Math.floor(Math.log2(s))+1}return this._glTextures[t.uid]=i,this.managedTextures.includes(t)||(t.on("update",this.onSourceUpdate,this),t.on("resize",this.onSourceUpdate,this),t.on("styleChange",this.onStyleChange,this),t.on("destroy",this.onSourceDestroy,this),t.on("unload",this.onSourceUnload,this),t.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(t)),this.onSourceUpdate(t),this.updateStyle(t,!1),i}onStyleChange(t){this.updateStyle(t,!1)}updateStyle(t,e){let i=this._gl,s=this.getGlSource(t);i.bindTexture(i.TEXTURE_2D,s.texture),this._boundTextures[this._activeTextureLocation]=t,od(t.style,i,t.mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"texParameteri",i.TEXTURE_2D,!this._renderer.context.supports.nonPowOf2wrapping&&!t.isPowerOfTwo,e)}onSourceUnload(t){let e=this._glTextures[t.uid];e&&(this.unbind(t),this._glTextures[t.uid]=null,this._gl.deleteTexture(e.texture))}onSourceUpdate(t){let e=this._gl,i=this.getGlSource(t);e.bindTexture(e.TEXTURE_2D,i.texture),this._boundTextures[this._activeTextureLocation]=t;let s=t.alphaMode==="premultiply-alpha-on-upload";this._premultiplyAlpha!==s&&(this._premultiplyAlpha=s,e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s)),this._uploads[t.uploadMethodId]?this._uploads[t.uploadMethodId].upload(t,i,e,this._renderer.context.webGLVersion):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.pixelWidth,t.pixelHeight,0,e.RGBA,e.UNSIGNED_BYTE,null),t.autoGenerateMipmaps&&t.mipLevelCount>1&&this.onUpdateMipmaps(t,!1)}onUpdateMipmaps(t,e=!0){e&&this.bindSource(t,0);let i=this.getGlSource(t);this._gl.generateMipmap(i.target)}onSourceDestroy(t){t.off("destroy",this.onSourceDestroy,this),t.off("update",this.onSourceUpdate,this),t.off("resize",this.onSourceUpdate,this),t.off("unload",this.onSourceUnload,this),t.off("styleChange",this.onStyleChange,this),t.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(t),1),this.onSourceUnload(t)}_initSampler(t){let e=this._gl,i=this._gl.createSampler();return this._glSamplers[t._resourceId]=i,od(t,e,this._boundTextures[this._activeTextureLocation].mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"samplerParameteri",i,!1,!0),this._glSamplers[t._resourceId]}_getGlSampler(t){return this._glSamplers[t._resourceId]||this._initSampler(t)}getGlSource(t){return this._glTextures[t.uid]||this._initSource(t)}generateCanvas(t){let{pixels:e,width:i,height:s}=this.getPixels(t),n=Q.get().createCanvas();n.width=i,n.height=s;let o=n.getContext("2d");if(o){let a=o.createImageData(i,s);a.data.set(e),o.putImageData(a,0,0)}return n}getPixels(t){let e=t.source.resolution,i=t.frame,s=Math.max(Math.round(i.width*e),1),n=Math.max(Math.round(i.height*e),1),o=new Uint8Array(uP*s*n),a=this._renderer,u=a.renderTarget.getRenderTarget(t),l=a.renderTarget.getGpuRenderTarget(u),c=a.gl;return c.bindFramebuffer(c.FRAMEBUFFER,l.resolveTargetFramebuffer),c.readPixels(Math.round(i.x*e),Math.round(i.y*e),s,n,c.RGBA,c.UNSIGNED_BYTE,o),{pixels:new Uint8ClampedArray(o.buffer),width:s,height:n}}destroy(){this.managedTextures.slice().forEach(t=>this.onSourceDestroy(t)),this.managedTextures=null,this._renderer=null}resetState(){this._activeTextureLocation=-1,this._boundTextures.fill(I.EMPTY.source),this._boundSamplers=Object.create(null)}};bo.extension={type:[b.WebGLSystem],name:"texture"}});var R1={};dd(R1,{WebGLRenderer:()=>ad});var lP,cP,hP,B1,M1,F1,ad,k1=p(()=>{D();lS();cS();hS();En();Rf();Ye();pS();xS();vS();wS();ES();CS();AS();RS();IS();t1();o1();h1();P1();lP=[...Bu,go,SS,gS,co,bo,xo,ho,yo,_o,po,c1,mo,fo],cP=[...Mu],hP=[uo,ao,oo],B1=[],M1=[],F1=[];L.handleByNamedList(b.WebGLSystem,B1);L.handleByNamedList(b.WebGLPipes,M1);L.handleByNamedList(b.WebGLPipesAdaptor,F1);L.add(...lP,...cP,...hP);ad=class extends kr{constructor(){let t={name:"webgl",type:Mt.WEBGL,systems:B1,renderPipes:M1,renderPipeAdaptors:F1};super(t)}}});var W1=Do((wet,z1)=>{"use strict";z1.exports=dP;function ls(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function dP(r){if(r=r||{},r.circles)return pP(r);let t=new Map;if(t.set(Date,o=>new Date(o)),t.set(Map,(o,a)=>new Map(i(Array.from(o),a))),t.set(Set,(o,a)=>new Set(i(Array.from(o),a))),r.constructorHandlers)for(let o of r.constructorHandlers)t.set(o[0],o[1]);let e=null;return r.proto?n:s;function i(o,a){let u=Object.keys(o),l=new Array(u.length);for(let c=0;c<u.length;c++){let h=u[c],f=o[h];typeof f!="object"||f===null?l[h]=f:f.constructor!==Object&&(e=t.get(f.constructor))?l[h]=e(f,a):ArrayBuffer.isView(f)?l[h]=ls(f):l[h]=a(f)}return l}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,s);if(o.constructor!==Object&&(e=t.get(o.constructor)))return e(o,s);let a={};for(let u in o){if(Object.hasOwnProperty.call(o,u)===!1)continue;let l=o[u];typeof l!="object"||l===null?a[u]=l:l.constructor!==Object&&(e=t.get(l.constructor))?a[u]=e(l,s):ArrayBuffer.isView(l)?a[u]=ls(l):a[u]=s(l)}return a}function n(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,n);if(o.constructor!==Object&&(e=t.get(o.constructor)))return e(o,n);let a={};for(let u in o){let l=o[u];typeof l!="object"||l===null?a[u]=l:l.constructor!==Object&&(e=t.get(l.constructor))?a[u]=e(l,n):ArrayBuffer.isView(l)?a[u]=ls(l):a[u]=n(l)}return a}}function pP(r){let t=[],e=[],i=new Map;if(i.set(Date,u=>new Date(u)),i.set(Map,(u,l)=>new Map(n(Array.from(u),l))),i.set(Set,(u,l)=>new Set(n(Array.from(u),l))),r.constructorHandlers)for(let u of r.constructorHandlers)i.set(u[0],u[1]);let s=null;return r.proto?a:o;function n(u,l){let c=Object.keys(u),h=new Array(c.length);for(let f=0;f<c.length;f++){let d=c[f],m=u[d];if(typeof m!="object"||m===null)h[d]=m;else if(m.constructor!==Object&&(s=i.get(m.constructor)))h[d]=s(m,l);else if(ArrayBuffer.isView(m))h[d]=ls(m);else{let g=t.indexOf(m);g!==-1?h[d]=e[g]:h[d]=l(m)}}return h}function o(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return n(u,o);if(u.constructor!==Object&&(s=i.get(u.constructor)))return s(u,o);let l={};t.push(u),e.push(l);for(let c in u){if(Object.hasOwnProperty.call(u,c)===!1)continue;let h=u[c];if(typeof h!="object"||h===null)l[c]=h;else if(h.constructor!==Object&&(s=i.get(h.constructor)))l[c]=s(h,o);else if(ArrayBuffer.isView(h))l[c]=ls(h);else{let f=t.indexOf(h);f!==-1?l[c]=e[f]:l[c]=o(h)}}return t.pop(),e.pop(),l}function a(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return n(u,a);if(u.constructor!==Object&&(s=i.get(u.constructor)))return s(u,a);let l={};t.push(u),e.push(l);for(let c in u){let h=u[c];if(typeof h!="object"||h===null)l[c]=h;else if(h.constructor!==Object&&(s=i.get(h.constructor)))l[c]=s(h,a);else if(ArrayBuffer.isView(h))l[c]=ls(h);else{let f=t.indexOf(h);f!==-1?l[c]=e[f]:l[c]=a(h)}}return t.pop(),e.pop(),l}}});var iw={value:()=>{}};function md(){for(var r=0,t=arguments.length,e={},i;r<t;++r){if(!(i=arguments[r]+"")||i in e||/[\\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new Po(e)}function Po(r){this._=r}function sw(r,t){return r.trim().split(/^|\\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0&&(i=e.slice(s+1),e=e.slice(0,s)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}Po.prototype=md.prototype={constructor:Po,on:function(r,t){var e=this._,i=sw(r+"",e),s,n=-1,o=i.length;if(arguments.length<2){for(;++n<o;)if((s=(r=i[n]).type)&&(s=nw(e[s],r.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++n<o;)if(s=(r=i[n]).type)e[s]=pd(e[s],r.name,t);else if(t==null)for(s in e)e[s]=pd(e[s],r.name,null);return this},copy:function(){var r={},t=this._;for(var e in t)r[e]=t[e].slice();return new Po(r)},call:function(r,t){if((s=arguments.length-2)>0)for(var e=new Array(s),i=0,s,n;i<s;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(n=this._[r],i=0,s=n.length;i<s;++i)n[i].value.apply(t,e)},apply:function(r,t,e){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var i=this._[r],s=0,n=i.length;s<n;++s)i[s].value.apply(t,e)}};function nw(r,t){for(var e=0,i=r.length,s;e<i;++e)if((s=r[e]).name===t)return s.value}function pd(r,t,e){for(var i=0,s=r.length;i<s;++i)if(r[i].name===t){r[i]=iw,r=r.slice(0,i).concat(r.slice(i+1));break}return e!=null&&r.push({name:t,value:e}),r}var er=md;var Bo="http://www.w3.org/1999/xhtml",tl={svg:"http://www.w3.org/2000/svg",xhtml:Bo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rr(r){var t=r+="",e=t.indexOf(":");return e>=0&&(t=r.slice(0,e))!=="xmlns"&&(r=r.slice(e+1)),tl.hasOwnProperty(t)?{space:tl[t],local:r}:r}function ow(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===Bo&&t.documentElement.namespaceURI===Bo?t.createElement(r):t.createElementNS(e,r)}}function aw(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Mo(r){var t=rr(r);return(t.local?aw:ow)(t)}function uw(){}function Ur(r){return r==null?uw:function(){return this.querySelector(r)}}function gd(r){typeof r!="function"&&(r=Ur(r));for(var t=this._groups,e=t.length,i=new Array(e),s=0;s<e;++s)for(var n=t[s],o=n.length,a=i[s]=new Array(o),u,l,c=0;c<o;++c)(u=n[c])&&(l=r.call(u,u.__data__,c,n))&&("__data__"in u&&(l.__data__=u.__data__),a[c]=l);return new Tt(i,this._parents)}function el(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function lw(){return[]}function fs(r){return r==null?lw:function(){return this.querySelectorAll(r)}}function cw(r){return function(){return el(r.apply(this,arguments))}}function xd(r){typeof r=="function"?r=cw(r):r=fs(r);for(var t=this._groups,e=t.length,i=[],s=[],n=0;n<e;++n)for(var o=t[n],a=o.length,u,l=0;l<a;++l)(u=o[l])&&(i.push(r.call(u,u.__data__,l,o)),s.push(u));return new Tt(i,s)}function ds(r){return function(){return this.matches(r)}}function Fo(r){return function(t){return t.matches(r)}}var hw=Array.prototype.find;function fw(r){return function(){return hw.call(this.children,r)}}function dw(){return this.firstElementChild}function _d(r){return this.select(r==null?dw:fw(typeof r=="function"?r:Fo(r)))}var pw=Array.prototype.filter;function mw(){return Array.from(this.children)}function gw(r){return function(){return pw.call(this.children,r)}}function yd(r){return this.selectAll(r==null?mw:gw(typeof r=="function"?r:Fo(r)))}function bd(r){typeof r!="function"&&(r=ds(r));for(var t=this._groups,e=t.length,i=new Array(e),s=0;s<e;++s)for(var n=t[s],o=n.length,a=i[s]=[],u,l=0;l<o;++l)(u=n[l])&&r.call(u,u.__data__,l,n)&&a.push(u);return new Tt(i,this._parents)}function Ro(r){return new Array(r.length)}function vd(){return new Tt(this._enter||this._groups.map(Ro),this._parents)}function ps(r,t){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=t}ps.prototype={constructor:ps,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,t){return this._parent.insertBefore(r,t)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Td(r){return function(){return r}}function xw(r,t,e,i,s,n){for(var o=0,a,u=t.length,l=n.length;o<l;++o)(a=t[o])?(a.__data__=n[o],i[o]=a):e[o]=new ps(r,n[o]);for(;o<u;++o)(a=t[o])&&(s[o]=a)}function _w(r,t,e,i,s,n,o){var a,u,l=new Map,c=t.length,h=n.length,f=new Array(c),d;for(a=0;a<c;++a)(u=t[a])&&(f[a]=d=o.call(u,u.__data__,a,t)+"",l.has(d)?s[a]=u:l.set(d,u));for(a=0;a<h;++a)d=o.call(r,n[a],a,n)+"",(u=l.get(d))?(i[a]=u,u.__data__=n[a],l.delete(d)):e[a]=new ps(r,n[a]);for(a=0;a<c;++a)(u=t[a])&&l.get(f[a])===u&&(s[a]=u)}function yw(r){return r.__data__}function Sd(r,t){if(!arguments.length)return Array.from(this,yw);var e=t?_w:xw,i=this._parents,s=this._groups;typeof r!="function"&&(r=Td(r));for(var n=s.length,o=new Array(n),a=new Array(n),u=new Array(n),l=0;l<n;++l){var c=i[l],h=s[l],f=h.length,d=bw(r.call(c,c&&c.__data__,l,i)),m=d.length,g=a[l]=new Array(m),x=o[l]=new Array(m),_=u[l]=new Array(f);e(c,h,g,x,_,d,t);for(var v=0,T=0,y,A;v<m;++v)if(y=g[v]){for(v>=T&&(T=v+1);!(A=x[T])&&++T<m;);y._next=A||null}}return o=new Tt(o,i),o._enter=a,o._exit=u,o}function bw(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function wd(){return new Tt(this._exit||this._groups.map(Ro),this._parents)}function Ed(r,t,e){var i=this.enter(),s=this,n=this.exit();return typeof r=="function"?(i=r(i),i&&(i=i.selection())):i=i.append(r+""),t!=null&&(s=t(s),s&&(s=s.selection())),e==null?n.remove():e(n),i&&s?i.merge(s).order():s}function Cd(r){for(var t=r.selection?r.selection():r,e=this._groups,i=t._groups,s=e.length,n=i.length,o=Math.min(s,n),a=new Array(s),u=0;u<o;++u)for(var l=e[u],c=i[u],h=l.length,f=a[u]=new Array(h),d,m=0;m<h;++m)(d=l[m]||c[m])&&(f[m]=d);for(;u<s;++u)a[u]=e[u];return new Tt(a,this._parents)}function Ad(){for(var r=this._groups,t=-1,e=r.length;++t<e;)for(var i=r[t],s=i.length-1,n=i[s],o;--s>=0;)(o=i[s])&&(n&&o.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(o,n),n=o);return this}function Dd(r){r||(r=vw);function t(h,f){return h&&f?r(h.__data__,f.__data__):!h-!f}for(var e=this._groups,i=e.length,s=new Array(i),n=0;n<i;++n){for(var o=e[n],a=o.length,u=s[n]=new Array(a),l,c=0;c<a;++c)(l=o[c])&&(u[c]=l);u.sort(t)}return new Tt(s,this._parents).order()}function vw(r,t){return r<t?-1:r>t?1:r>=t?0:NaN}function Pd(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Bd(){return Array.from(this)}function Md(){for(var r=this._groups,t=0,e=r.length;t<e;++t)for(var i=r[t],s=0,n=i.length;s<n;++s){var o=i[s];if(o)return o}return null}function Fd(){let r=0;for(let t of this)++r;return r}function Rd(){return!this.node()}function kd(r){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s=t[e],n=0,o=s.length,a;n<o;++n)(a=s[n])&&r.call(a,a.__data__,n,s);return this}function Tw(r){return function(){this.removeAttribute(r)}}function Sw(r){return function(){this.removeAttributeNS(r.space,r.local)}}function ww(r,t){return function(){this.setAttribute(r,t)}}function Ew(r,t){return function(){this.setAttributeNS(r.space,r.local,t)}}function Cw(r,t){return function(){var e=t.apply(this,arguments);e==null?this.removeAttribute(r):this.setAttribute(r,e)}}function Aw(r,t){return function(){var e=t.apply(this,arguments);e==null?this.removeAttributeNS(r.space,r.local):this.setAttributeNS(r.space,r.local,e)}}function Gd(r,t){var e=rr(r);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((t==null?e.local?Sw:Tw:typeof t=="function"?e.local?Aw:Cw:e.local?Ew:ww)(e,t))}function ko(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function Dw(r){return function(){this.style.removeProperty(r)}}function Pw(r,t,e){return function(){this.style.setProperty(r,t,e)}}function Bw(r,t,e){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(r):this.style.setProperty(r,i,e)}}function Id(r,t,e){return arguments.length>1?this.each((t==null?Dw:typeof t=="function"?Bw:Pw)(r,t,e??"")):gr(this.node(),r)}function gr(r,t){return r.style.getPropertyValue(t)||ko(r).getComputedStyle(r,null).getPropertyValue(t)}function Mw(r){return function(){delete this[r]}}function Fw(r,t){return function(){this[r]=t}}function Rw(r,t){return function(){var e=t.apply(this,arguments);e==null?delete this[r]:this[r]=e}}function Ud(r,t){return arguments.length>1?this.each((t==null?Mw:typeof t=="function"?Rw:Fw)(r,t)):this.node()[r]}function Od(r){return r.trim().split(/^|\\s+/)}function rl(r){return r.classList||new Ld(r)}function Ld(r){this._node=r,this._names=Od(r.getAttribute("class")||"")}Ld.prototype={add:function(r){var t=this._names.indexOf(r);t<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var t=this._names.indexOf(r);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};function Nd(r,t){for(var e=rl(r),i=-1,s=t.length;++i<s;)e.add(t[i])}function Hd(r,t){for(var e=rl(r),i=-1,s=t.length;++i<s;)e.remove(t[i])}function kw(r){return function(){Nd(this,r)}}function Gw(r){return function(){Hd(this,r)}}function Iw(r,t){return function(){(t.apply(this,arguments)?Nd:Hd)(this,r)}}function zd(r,t){var e=Od(r+"");if(arguments.length<2){for(var i=rl(this.node()),s=-1,n=e.length;++s<n;)if(!i.contains(e[s]))return!1;return!0}return this.each((typeof t=="function"?Iw:t?kw:Gw)(e,t))}function Uw(){this.textContent=""}function Ow(r){return function(){this.textContent=r}}function Lw(r){return function(){var t=r.apply(this,arguments);this.textContent=t??""}}function Wd(r){return arguments.length?this.each(r==null?Uw:(typeof r=="function"?Lw:Ow)(r)):this.node().textContent}function Nw(){this.innerHTML=""}function Hw(r){return function(){this.innerHTML=r}}function zw(r){return function(){var t=r.apply(this,arguments);this.innerHTML=t??""}}function Vd(r){return arguments.length?this.each(r==null?Nw:(typeof r=="function"?zw:Hw)(r)):this.node().innerHTML}function Ww(){this.nextSibling&&this.parentNode.appendChild(this)}function Xd(){return this.each(Ww)}function Vw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $d(){return this.each(Vw)}function jd(r){var t=typeof r=="function"?r:Mo(r);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Xw(){return null}function Yd(r,t){var e=typeof r=="function"?r:Mo(r),i=t==null?Xw:typeof t=="function"?t:Ur(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})}function $w(){var r=this.parentNode;r&&r.removeChild(this)}function Kd(){return this.each($w)}function jw(){var r=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(r,this.nextSibling):r}function Yw(){var r=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(r,this.nextSibling):r}function qd(r){return this.select(r?Yw:jw)}function Zd(r){return arguments.length?this.property("__data__",r):this.node().__data__}function Kw(r){return function(t){r.call(this,t,this.__data__)}}function qw(r){return r.trim().split(/^|\\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}function Zw(r){return function(){var t=this.__on;if(t){for(var e=0,i=-1,s=t.length,n;e<s;++e)n=t[e],(!r.type||n.type===r.type)&&n.name===r.name?this.removeEventListener(n.type,n.listener,n.options):t[++i]=n;++i?t.length=i:delete this.__on}}}function Qw(r,t,e){return function(){var i=this.__on,s,n=Kw(t);if(i){for(var o=0,a=i.length;o<a;++o)if((s=i[o]).type===r.type&&s.name===r.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=n,s.options=e),s.value=t;return}}this.addEventListener(r.type,n,e),s={type:r.type,name:r.name,value:t,listener:n,options:e},i?i.push(s):this.__on=[s]}}function Qd(r,t,e){var i=qw(r+""),s,n=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,c;u<l;++u)for(s=0,c=a[u];s<n;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(a=t?Qw:Zw,s=0;s<n;++s)this.each(a(i[s],t,e));return this}function Jd(r,t,e){var i=ko(r),s=i.CustomEvent;typeof s=="function"?s=new s(t,e):(s=i.document.createEvent("Event"),e?(s.initEvent(t,e.bubbles,e.cancelable),s.detail=e.detail):s.initEvent(t,!1,!1)),r.dispatchEvent(s)}function Jw(r,t){return function(){return Jd(this,r,t)}}function tE(r,t){return function(){return Jd(this,r,t.apply(this,arguments))}}function tp(r,t){return this.each((typeof t=="function"?tE:Jw)(r,t))}function*ep(){for(var r=this._groups,t=0,e=r.length;t<e;++t)for(var i=r[t],s=0,n=i.length,o;s<n;++s)(o=i[s])&&(yield o)}var il=[null];function Tt(r,t){this._groups=r,this._parents=t}function rp(){return new Tt([[document.documentElement]],il)}function eE(){return this}Tt.prototype=rp.prototype={constructor:Tt,select:gd,selectAll:xd,selectChild:_d,selectChildren:yd,filter:bd,data:Sd,enter:vd,exit:wd,join:Ed,merge:Cd,selection:eE,order:Ad,sort:Dd,call:Pd,nodes:Bd,node:Md,size:Fd,empty:Rd,each:kd,attr:Gd,style:Id,property:Ud,classed:zd,text:Wd,html:Vd,raise:Xd,lower:$d,append:jd,insert:Yd,remove:Kd,clone:qd,datum:Zd,on:Qd,dispatch:tp,[Symbol.iterator]:ep};var ir=rp;function Xt(r){return typeof r=="string"?new Tt([[document.querySelector(r)]],[document.documentElement]):new Tt([[r]],il)}function ip(r){let t;for(;t=r.sourceEvent;)r=t;return r}function me(r,t){if(r=ip(r),t===void 0&&(t=r.currentTarget),t){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=r.clientX,i.y=r.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[r.clientX-s.left-t.clientLeft,r.clientY-s.top-t.clientTop]}}return[r.pageX,r.pageY]}var sp={passive:!1},Or={capture:!0,passive:!1};function Go(r){r.stopImmediatePropagation()}function xr(r){r.preventDefault(),r.stopImmediatePropagation()}function ms(r){var t=r.document.documentElement,e=Xt(r).on("dragstart.drag",xr,Or);"onselectstart"in t?e.on("selectstart.drag",xr,Or):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function gs(r,t){var e=r.document.documentElement,i=Xt(r).on("dragstart.drag",null);t&&(i.on("click.drag",xr,Or),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var xs=r=>()=>r;function _s(r,{sourceEvent:t,subject:e,target:i,identifier:s,active:n,x:o,y:a,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:n,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}_s.prototype.on=function(){var r=this._.on.apply(this._,arguments);return r===this._?this:r};function rE(r){return!r.ctrlKey&&!r.button}function iE(){return this.parentNode}function sE(r,t){return t??{x:r.x,y:r.y}}function nE(){return navigator.maxTouchPoints||"ontouchstart"in this}function sl(){var r=rE,t=iE,e=sE,i=nE,s={},n=er("start","drag","end"),o=0,a,u,l,c,h=0;function f(y){y.on("mousedown.drag",d).filter(i).on("touchstart.drag",x).on("touchmove.drag",_,sp).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(y,A){if(!(c||!r.call(this,y,A))){var S=T(this,t.call(this,y,A),y,A,"mouse");S&&(Xt(y.view).on("mousemove.drag",m,Or).on("mouseup.drag",g,Or),ms(y.view),Go(y),l=!1,a=y.clientX,u=y.clientY,S("start",y))}}function m(y){if(xr(y),!l){var A=y.clientX-a,S=y.clientY-u;l=A*A+S*S>h}s.mouse("drag",y)}function g(y){Xt(y.view).on("mousemove.drag mouseup.drag",null),gs(y.view,l),xr(y),s.mouse("end",y)}function x(y,A){if(r.call(this,y,A)){var S=y.changedTouches,E=t.call(this,y,A),B=S.length,U,P;for(U=0;U<B;++U)(P=T(this,E,y,A,S[U].identifier,S[U]))&&(Go(y),P("start",y,S[U]))}}function _(y){var A=y.changedTouches,S=A.length,E,B;for(E=0;E<S;++E)(B=s[A[E].identifier])&&(xr(y),B("drag",y,A[E]))}function v(y){var A=y.changedTouches,S=A.length,E,B;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<S;++E)(B=s[A[E].identifier])&&(Go(y),B("end",y,A[E]))}function T(y,A,S,E,B,U){var P=n.copy(),F=me(U||S,A),N,q,w;if((w=e.call(y,new _s("beforestart",{sourceEvent:S,target:f,identifier:B,active:o,x:F[0],y:F[1],dx:0,dy:0,dispatch:P}),E))!=null)return N=w.x-F[0]||0,q=w.y-F[1]||0,function H(C,M,Y){var O=F,X;switch(C){case"start":s[B]=H,X=o++;break;case"end":delete s[B],--o;case"drag":F=me(Y||M,A),X=o;break}P.call(C,y,new _s(C,{sourceEvent:M,subject:w,target:f,identifier:B,active:X,x:F[0]+N,y:F[1]+q,dx:F[0]-O[0],dy:F[1]-O[1],dispatch:P}),E)}}return f.filter=function(y){return arguments.length?(r=typeof y=="function"?y:xs(!!y),f):r},f.container=function(y){return arguments.length?(t=typeof y=="function"?y:xs(y),f):t},f.subject=function(y){return arguments.length?(e=typeof y=="function"?y:xs(y),f):e},f.touchable=function(y){return arguments.length?(i=typeof y=="function"?y:xs(!!y),f):i},f.on=function(){var y=n.on.apply(n,arguments);return y===n?f:y},f.clickDistance=function(y){return arguments.length?(h=(y=+y)*y,f):Math.sqrt(h)},f}function Io(r,t,e){r.prototype=t.prototype=e,e.constructor=r}function nl(r,t){var e=Object.create(r.prototype);for(var i in t)e[i]=t[i];return e}function vs(){}var ys=.7,Lo=1/ys,hi="\\\\s*([+-]?\\\\d+)\\\\s*",bs="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*",Le="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*",oE=/^#([0-9a-f]{3,8})$/,aE=new RegExp(\`^rgb\\\\(\${hi},\${hi},\${hi}\\\\)$\`),uE=new RegExp(\`^rgb\\\\(\${Le},\${Le},\${Le}\\\\)$\`),lE=new RegExp(\`^rgba\\\\(\${hi},\${hi},\${hi},\${bs}\\\\)$\`),cE=new RegExp(\`^rgba\\\\(\${Le},\${Le},\${Le},\${bs}\\\\)$\`),hE=new RegExp(\`^hsl\\\\(\${bs},\${Le},\${Le}\\\\)$\`),fE=new RegExp(\`^hsla\\\\(\${bs},\${Le},\${Le},\${bs}\\\\)$\`),np={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Io(vs,_r,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:op,formatHex:op,formatHex8:dE,formatHsl:pE,formatRgb:ap,toString:ap});function op(){return this.rgb().formatHex()}function dE(){return this.rgb().formatHex8()}function pE(){return dp(this).formatHsl()}function ap(){return this.rgb().formatRgb()}function _r(r){var t,e;return r=(r+"").trim().toLowerCase(),(t=oE.exec(r))?(e=t[1].length,t=parseInt(t[1],16),e===6?up(t):e===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?Uo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?Uo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=aE.exec(r))?new se(t[1],t[2],t[3],1):(t=uE.exec(r))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=lE.exec(r))?Uo(t[1],t[2],t[3],t[4]):(t=cE.exec(r))?Uo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hE.exec(r))?hp(t[1],t[2]/100,t[3]/100,1):(t=fE.exec(r))?hp(t[1],t[2]/100,t[3]/100,t[4]):np.hasOwnProperty(r)?up(np[r]):r==="transparent"?new se(NaN,NaN,NaN,0):null}function up(r){return new se(r>>16&255,r>>8&255,r&255,1)}function Uo(r,t,e,i){return i<=0&&(r=t=e=NaN),new se(r,t,e,i)}function mE(r){return r instanceof vs||(r=_r(r)),r?(r=r.rgb(),new se(r.r,r.g,r.b,r.opacity)):new se}function fi(r,t,e,i){return arguments.length===1?mE(r):new se(r,t,e,i??1)}function se(r,t,e,i){this.r=+r,this.g=+t,this.b=+e,this.opacity=+i}Io(se,fi,nl(vs,{brighter(r){return r=r==null?Lo:Math.pow(Lo,r),new se(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?ys:Math.pow(ys,r),new se(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new se(Nr(this.r),Nr(this.g),Nr(this.b),No(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lp,formatHex:lp,formatHex8:gE,formatRgb:cp,toString:cp}));function lp(){return\`#\${Lr(this.r)}\${Lr(this.g)}\${Lr(this.b)}\`}function gE(){return\`#\${Lr(this.r)}\${Lr(this.g)}\${Lr(this.b)}\${Lr((isNaN(this.opacity)?1:this.opacity)*255)}\`}function cp(){let r=No(this.opacity);return\`\${r===1?"rgb(":"rgba("}\${Nr(this.r)}, \${Nr(this.g)}, \${Nr(this.b)}\${r===1?")":\`, \${r})\`}\`}function No(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Nr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Lr(r){return r=Nr(r),(r<16?"0":"")+r.toString(16)}function hp(r,t,e,i){return i<=0?r=t=e=NaN:e<=0||e>=1?r=t=NaN:t<=0&&(r=NaN),new De(r,t,e,i)}function dp(r){if(r instanceof De)return new De(r.h,r.s,r.l,r.opacity);if(r instanceof vs||(r=_r(r)),!r)return new De;if(r instanceof De)return r;r=r.rgb();var t=r.r/255,e=r.g/255,i=r.b/255,s=Math.min(t,e,i),n=Math.max(t,e,i),o=NaN,a=n-s,u=(n+s)/2;return a?(t===n?o=(e-i)/a+(e<i)*6:e===n?o=(i-t)/a+2:o=(t-e)/a+4,a/=u<.5?n+s:2-n-s,o*=60):a=u>0&&u<1?0:o,new De(o,a,u,r.opacity)}function pp(r,t,e,i){return arguments.length===1?dp(r):new De(r,t,e,i??1)}function De(r,t,e,i){this.h=+r,this.s=+t,this.l=+e,this.opacity=+i}Io(De,pp,nl(vs,{brighter(r){return r=r==null?Lo:Math.pow(Lo,r),new De(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?ys:Math.pow(ys,r),new De(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,t=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*t,s=2*e-i;return new se(ol(r>=240?r-240:r+120,s,i),ol(r,s,i),ol(r<120?r+240:r-120,s,i),this.opacity)},clamp(){return new De(fp(this.h),Oo(this.s),Oo(this.l),No(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let r=No(this.opacity);return\`\${r===1?"hsl(":"hsla("}\${fp(this.h)}, \${Oo(this.s)*100}%, \${Oo(this.l)*100}%\${r===1?")":\`, \${r})\`}\`}}));function fp(r){return r=(r||0)%360,r<0?r+360:r}function Oo(r){return Math.max(0,Math.min(1,r||0))}function ol(r,t,e){return(r<60?t+(e-t)*r/60:r<180?e:r<240?t+(e-t)*(240-r)/60:t)*255}function al(r,t,e,i,s){var n=r*r,o=n*r;return((1-3*r+3*n-o)*t+(4-6*n+3*o)*e+(1+3*r+3*n-3*o)*i+o*s)/6}function mp(r){var t=r.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),s=r[i],n=r[i+1],o=i>0?r[i-1]:2*s-n,a=i<t-1?r[i+2]:2*n-s;return al((e-i/t)*t,o,s,n,a)}}function gp(r){var t=r.length;return function(e){var i=Math.floor(((e%=1)<0?++e:e)*t),s=r[(i+t-1)%t],n=r[i%t],o=r[(i+1)%t],a=r[(i+2)%t];return al((e-i/t)*t,s,n,o,a)}}var ul=r=>()=>r;function xE(r,t){return function(e){return r+e*t}}function _E(r,t,e){return r=Math.pow(r,e),t=Math.pow(t,e)-r,e=1/e,function(i){return Math.pow(r+i*t,e)}}function xp(r){return(r=+r)==1?Ho:function(t,e){return e-t?_E(t,e,r):ul(isNaN(t)?e:t)}}function Ho(r,t){var e=t-r;return e?xE(r,e):ul(isNaN(r)?t:r)}var zo=function r(t){var e=xp(t);function i(s,n){var o=e((s=fi(s)).r,(n=fi(n)).r),a=e(s.g,n.g),u=e(s.b,n.b),l=Ho(s.opacity,n.opacity);return function(c){return s.r=o(c),s.g=a(c),s.b=u(c),s.opacity=l(c),s+""}}return i.gamma=r,i}(1);function _p(r){return function(t){var e=t.length,i=new Array(e),s=new Array(e),n=new Array(e),o,a;for(o=0;o<e;++o)a=fi(t[o]),i[o]=a.r||0,s[o]=a.g||0,n[o]=a.b||0;return i=r(i),s=r(s),n=r(n),a.opacity=1,function(u){return a.r=i(u),a.g=s(u),a.b=n(u),a+""}}}var yE=_p(mp),bE=_p(gp);function ge(r,t){return r=+r,t=+t,function(e){return r*(1-e)+t*e}}var cl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,ll=new RegExp(cl.source,"g");function vE(r){return function(){return r}}function TE(r){return function(t){return r(t)+""}}function hl(r,t){var e=cl.lastIndex=ll.lastIndex=0,i,s,n,o=-1,a=[],u=[];for(r=r+"",t=t+"";(i=cl.exec(r))&&(s=ll.exec(t));)(n=s.index)>e&&(n=t.slice(e,n),a[o]?a[o]+=n:a[++o]=n),(i=i[0])===(s=s[0])?a[o]?a[o]+=s:a[++o]=s:(a[++o]=null,u.push({i:o,x:ge(i,s)})),e=ll.lastIndex;return e<t.length&&(n=t.slice(e),a[o]?a[o]+=n:a[++o]=n),a.length<2?u[0]?TE(u[0].x):vE(t):(t=u.length,function(l){for(var c=0,h;c<t;++c)a[(h=u[c]).i]=h.x(l);return a.join("")})}var yp=180/Math.PI,Wo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fl(r,t,e,i,s,n){var o,a,u;return(o=Math.sqrt(r*r+t*t))&&(r/=o,t/=o),(u=r*e+t*i)&&(e-=r*u,i-=t*u),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,u/=a),r*i<t*e&&(r=-r,t=-t,u=-u,o=-o),{translateX:s,translateY:n,rotate:Math.atan2(t,r)*yp,skewX:Math.atan(u)*yp,scaleX:o,scaleY:a}}var Vo;function bp(r){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return t.isIdentity?Wo:fl(t.a,t.b,t.c,t.d,t.e,t.f)}function vp(r){return r==null?Wo:(Vo||(Vo=document.createElementNS("http://www.w3.org/2000/svg","g")),Vo.setAttribute("transform",r),(r=Vo.transform.baseVal.consolidate())?(r=r.matrix,fl(r.a,r.b,r.c,r.d,r.e,r.f)):Wo)}function Tp(r,t,e,i){function s(l){return l.length?l.pop()+" ":""}function n(l,c,h,f,d,m){if(l!==h||c!==f){var g=d.push("translate(",null,t,null,e);m.push({i:g-4,x:ge(l,h)},{i:g-2,x:ge(c,f)})}else(h||f)&&d.push("translate("+h+t+f+e)}function o(l,c,h,f){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),f.push({i:h.push(s(h)+"rotate(",null,i)-2,x:ge(l,c)})):c&&h.push(s(h)+"rotate("+c+i)}function a(l,c,h,f){l!==c?f.push({i:h.push(s(h)+"skewX(",null,i)-2,x:ge(l,c)}):c&&h.push(s(h)+"skewX("+c+i)}function u(l,c,h,f,d,m){if(l!==h||c!==f){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:ge(l,h)},{i:g-2,x:ge(c,f)})}else(h!==1||f!==1)&&d.push(s(d)+"scale("+h+","+f+")")}return function(l,c){var h=[],f=[];return l=r(l),c=r(c),n(l.translateX,l.translateY,c.translateX,c.translateY,h,f),o(l.rotate,c.rotate,h,f),a(l.skewX,c.skewX,h,f),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,f),l=c=null,function(d){for(var m=-1,g=f.length,x;++m<g;)h[(x=f[m]).i]=x.x(d);return h.join("")}}}var dl=Tp(bp,"px, ","px)","deg)"),pl=Tp(vp,", ",")",")");var SE=1e-12;function Sp(r){return((r=Math.exp(r))+1/r)/2}function wE(r){return((r=Math.exp(r))-1/r)/2}function EE(r){return((r=Math.exp(2*r))-1)/(r+1)}var ml=function r(t,e,i){function s(n,o){var a=n[0],u=n[1],l=n[2],c=o[0],h=o[1],f=o[2],d=c-a,m=h-u,g=d*d+m*m,x,_;if(g<SE)_=Math.log(f/l)/t,x=function(E){return[a+E*d,u+E*m,l*Math.exp(t*E*_)]};else{var v=Math.sqrt(g),T=(f*f-l*l+i*g)/(2*l*e*v),y=(f*f-l*l-i*g)/(2*f*e*v),A=Math.log(Math.sqrt(T*T+1)-T),S=Math.log(Math.sqrt(y*y+1)-y);_=(S-A)/t,x=function(E){var B=E*_,U=Sp(A),P=l/(e*v)*(U*EE(t*B+A)-wE(A));return[a+P*d,u+P*m,l*U/Sp(t*B+A)]}}return x.duration=_*1e3*t/Math.SQRT2,x}return s.rho=function(n){var o=Math.max(.001,+n),a=o*o,u=a*a;return r(o,a,u)},s}(Math.SQRT2,2,4);var di=0,Ss=0,Ts=0,Ep=1e3,Xo,ws,$o=0,Hr=0,jo=0,Es=typeof performance=="object"&&performance.now?performance:Date,Cp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function As(){return Hr||(Cp(CE),Hr=Es.now()+jo)}function CE(){Hr=0}function Cs(){this._call=this._time=this._next=null}Cs.prototype=pi.prototype={constructor:Cs,restart:function(r,t,e){if(typeof r!="function")throw new TypeError("callback is not a function");e=(e==null?As():+e)+(t==null?0:+t),!this._next&&ws!==this&&(ws?ws._next=this:Xo=this,ws=this),this._call=r,this._time=e,gl()},stop:function(){this._call&&(this._call=null,this._time=1/0,gl())}};function pi(r,t,e){var i=new Cs;return i.restart(r,t,e),i}function Ap(){As(),++di;for(var r=Xo,t;r;)(t=Hr-r._time)>=0&&r._call.call(void 0,t),r=r._next;--di}function wp(){Hr=($o=Es.now())+jo,di=Ss=0;try{Ap()}finally{di=0,DE(),Hr=0}}function AE(){var r=Es.now(),t=r-$o;t>Ep&&(jo-=t,$o=r)}function DE(){for(var r,t=Xo,e,i=1/0;t;)t._call?(i>t._time&&(i=t._time),r=t,t=t._next):(e=t._next,t._next=null,t=r?r._next=e:Xo=e);ws=r,gl(i)}function gl(r){if(!di){Ss&&(Ss=clearTimeout(Ss));var t=r-Hr;t>24?(r<1/0&&(Ss=setTimeout(wp,r-Es.now()-jo)),Ts&&(Ts=clearInterval(Ts))):(Ts||($o=Es.now(),Ts=setInterval(AE,Ep)),di=1,Cp(wp))}}function Yo(r,t,e){var i=new Cs;return t=t==null?0:+t,i.restart(s=>{i.stop(),r(s+t)},t,e),i}var PE=er("start","end","cancel","interrupt"),BE=[],Bp=0,Dp=1,qo=2,Ko=3,Pp=4,Zo=5,Ds=6;function yr(r,t,e,i,s,n){var o=r.__transition;if(!o)r.__transition={};else if(e in o)return;ME(r,e,{name:t,index:i,group:s,on:PE,tween:BE,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:Bp})}function Ps(r,t){var e=Rt(r,t);if(e.state>Bp)throw new Error("too late; already scheduled");return e}function Lt(r,t){var e=Rt(r,t);if(e.state>Ko)throw new Error("too late; already running");return e}function Rt(r,t){var e=r.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}function ME(r,t,e){var i=r.__transition,s;i[t]=e,e.timer=pi(n,0,e.time);function n(l){e.state=Dp,e.timer.restart(o,e.delay,e.time),e.delay<=l&&o(l-e.delay)}function o(l){var c,h,f,d;if(e.state!==Dp)return u();for(c in i)if(d=i[c],d.name===e.name){if(d.state===Ko)return Yo(o);d.state===Pp?(d.state=Ds,d.timer.stop(),d.on.call("interrupt",r,r.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Ds,d.timer.stop(),d.on.call("cancel",r,r.__data__,d.index,d.group),delete i[c])}if(Yo(function(){e.state===Ko&&(e.state=Pp,e.timer.restart(a,e.delay,e.time),a(l))}),e.state=qo,e.on.call("start",r,r.__data__,e.index,e.group),e.state===qo){for(e.state=Ko,s=new Array(f=e.tween.length),c=0,h=-1;c<f;++c)(d=e.tween[c].value.call(r,r.__data__,e.index,e.group))&&(s[++h]=d);s.length=h+1}}function a(l){for(var c=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(u),e.state=Zo,1),h=-1,f=s.length;++h<f;)s[h].call(r,c);e.state===Zo&&(e.on.call("end",r,r.__data__,e.index,e.group),u())}function u(){e.state=Ds,e.timer.stop(),delete i[t];for(var l in i)return;delete r.__transition}}function br(r,t){var e=r.__transition,i,s,n=!0,o;if(e){t=t==null?null:t+"";for(o in e){if((i=e[o]).name!==t){n=!1;continue}s=i.state>qo&&i.state<Zo,i.state=Ds,i.timer.stop(),i.on.call(s?"interrupt":"cancel",r,r.__data__,i.index,i.group),delete e[o]}n&&delete r.__transition}}function Mp(r){return this.each(function(){br(this,r)})}function FE(r,t){var e,i;return function(){var s=Lt(this,r),n=s.tween;if(n!==e){i=e=n;for(var o=0,a=i.length;o<a;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function RE(r,t,e){var i,s;if(typeof e!="function")throw new Error;return function(){var n=Lt(this,r),o=n.tween;if(o!==i){s=(i=o).slice();for(var a={name:t,value:e},u=0,l=s.length;u<l;++u)if(s[u].name===t){s[u]=a;break}u===l&&s.push(a)}n.tween=s}}function Fp(r,t){var e=this._id;if(r+="",arguments.length<2){for(var i=Rt(this.node(),e).tween,s=0,n=i.length,o;s<n;++s)if((o=i[s]).name===r)return o.value;return null}return this.each((t==null?FE:RE)(e,r,t))}function mi(r,t,e){var i=r._id;return r.each(function(){var s=Lt(this,i);(s.value||(s.value={}))[t]=e.apply(this,arguments)}),function(s){return Rt(s,i).value[t]}}function Qo(r,t){var e;return(typeof t=="number"?ge:t instanceof _r?zo:(e=_r(t))?(t=e,zo):hl)(r,t)}function kE(r){return function(){this.removeAttribute(r)}}function GE(r){return function(){this.removeAttributeNS(r.space,r.local)}}function IE(r,t,e){var i,s=e+"",n;return function(){var o=this.getAttribute(r);return o===s?null:o===i?n:n=t(i=o,e)}}function UE(r,t,e){var i,s=e+"",n;return function(){var o=this.getAttributeNS(r.space,r.local);return o===s?null:o===i?n:n=t(i=o,e)}}function OE(r,t,e){var i,s,n;return function(){var o,a=e(this),u;return a==null?void this.removeAttribute(r):(o=this.getAttribute(r),u=a+"",o===u?null:o===i&&u===s?n:(s=u,n=t(i=o,a)))}}function LE(r,t,e){var i,s,n;return function(){var o,a=e(this),u;return a==null?void this.removeAttributeNS(r.space,r.local):(o=this.getAttributeNS(r.space,r.local),u=a+"",o===u?null:o===i&&u===s?n:(s=u,n=t(i=o,a)))}}function Rp(r,t){var e=rr(r),i=e==="transform"?pl:Qo;return this.attrTween(r,typeof t=="function"?(e.local?LE:OE)(e,i,mi(this,"attr."+r,t)):t==null?(e.local?GE:kE)(e):(e.local?UE:IE)(e,i,t))}function NE(r,t){return function(e){this.setAttribute(r,t.call(this,e))}}function HE(r,t){return function(e){this.setAttributeNS(r.space,r.local,t.call(this,e))}}function zE(r,t){var e,i;function s(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&HE(r,n)),e}return s._value=t,s}function WE(r,t){var e,i;function s(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&NE(r,n)),e}return s._value=t,s}function kp(r,t){var e="attr."+r;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;var i=rr(r);return this.tween(e,(i.local?zE:WE)(i,t))}function VE(r,t){return function(){Ps(this,r).delay=+t.apply(this,arguments)}}function XE(r,t){return t=+t,function(){Ps(this,r).delay=t}}function Gp(r){var t=this._id;return arguments.length?this.each((typeof r=="function"?VE:XE)(t,r)):Rt(this.node(),t).delay}function $E(r,t){return function(){Lt(this,r).duration=+t.apply(this,arguments)}}function jE(r,t){return t=+t,function(){Lt(this,r).duration=t}}function Ip(r){var t=this._id;return arguments.length?this.each((typeof r=="function"?$E:jE)(t,r)):Rt(this.node(),t).duration}function YE(r,t){if(typeof t!="function")throw new Error;return function(){Lt(this,r).ease=t}}function Up(r){var t=this._id;return arguments.length?this.each(YE(t,r)):Rt(this.node(),t).ease}function KE(r,t){return function(){var e=t.apply(this,arguments);if(typeof e!="function")throw new Error;Lt(this,r).ease=e}}function Op(r){if(typeof r!="function")throw new Error;return this.each(KE(this._id,r))}function Lp(r){typeof r!="function"&&(r=ds(r));for(var t=this._groups,e=t.length,i=new Array(e),s=0;s<e;++s)for(var n=t[s],o=n.length,a=i[s]=[],u,l=0;l<o;++l)(u=n[l])&&r.call(u,u.__data__,l,n)&&a.push(u);return new Kt(i,this._parents,this._name,this._id)}function Np(r){if(r._id!==this._id)throw new Error;for(var t=this._groups,e=r._groups,i=t.length,s=e.length,n=Math.min(i,s),o=new Array(i),a=0;a<n;++a)for(var u=t[a],l=e[a],c=u.length,h=o[a]=new Array(c),f,d=0;d<c;++d)(f=u[d]||l[d])&&(h[d]=f);for(;a<i;++a)o[a]=t[a];return new Kt(o,this._parents,this._name,this._id)}function qE(r){return(r+"").trim().split(/^|\\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||t==="start"})}function ZE(r,t,e){var i,s,n=qE(t)?Ps:Lt;return function(){var o=n(this,r),a=o.on;a!==i&&(s=(i=a).copy()).on(t,e),o.on=s}}function Hp(r,t){var e=this._id;return arguments.length<2?Rt(this.node(),e).on.on(r):this.each(ZE(e,r,t))}function QE(r){return function(){var t=this.parentNode;for(var e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function zp(){return this.on("end.remove",QE(this._id))}function Wp(r){var t=this._name,e=this._id;typeof r!="function"&&(r=Ur(r));for(var i=this._groups,s=i.length,n=new Array(s),o=0;o<s;++o)for(var a=i[o],u=a.length,l=n[o]=new Array(u),c,h,f=0;f<u;++f)(c=a[f])&&(h=r.call(c,c.__data__,f,a))&&("__data__"in c&&(h.__data__=c.__data__),l[f]=h,yr(l[f],t,e,f,l,Rt(c,e)));return new Kt(n,this._parents,t,e)}function Vp(r){var t=this._name,e=this._id;typeof r!="function"&&(r=fs(r));for(var i=this._groups,s=i.length,n=[],o=[],a=0;a<s;++a)for(var u=i[a],l=u.length,c,h=0;h<l;++h)if(c=u[h]){for(var f=r.call(c,c.__data__,h,u),d,m=Rt(c,e),g=0,x=f.length;g<x;++g)(d=f[g])&&yr(d,t,e,g,f,m);n.push(f),o.push(c)}return new Kt(n,o,t,e)}var JE=ir.prototype.constructor;function Xp(){return new JE(this._groups,this._parents)}function tC(r,t){var e,i,s;return function(){var n=gr(this,r),o=(this.style.removeProperty(r),gr(this,r));return n===o?null:n===e&&o===i?s:s=t(e=n,i=o)}}function $p(r){return function(){this.style.removeProperty(r)}}function eC(r,t,e){var i,s=e+"",n;return function(){var o=gr(this,r);return o===s?null:o===i?n:n=t(i=o,e)}}function rC(r,t,e){var i,s,n;return function(){var o=gr(this,r),a=e(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(r),gr(this,r))),o===u?null:o===i&&u===s?n:(s=u,n=t(i=o,a))}}function iC(r,t){var e,i,s,n="style."+t,o="end."+n,a;return function(){var u=Lt(this,r),l=u.on,c=u.value[n]==null?a||(a=$p(t)):void 0;(l!==e||s!==c)&&(i=(e=l).copy()).on(o,s=c),u.on=i}}function jp(r,t,e){var i=(r+="")=="transform"?dl:Qo;return t==null?this.styleTween(r,tC(r,i)).on("end.style."+r,$p(r)):typeof t=="function"?this.styleTween(r,rC(r,i,mi(this,"style."+r,t))).each(iC(this._id,r)):this.styleTween(r,eC(r,i,t),e).on("end.style."+r,null)}function sC(r,t,e){return function(i){this.style.setProperty(r,t.call(this,i),e)}}function nC(r,t,e){var i,s;function n(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&sC(r,o,e)),i}return n._value=t,n}function Yp(r,t,e){var i="style."+(r+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,nC(r,t,e??""))}function oC(r){return function(){this.textContent=r}}function aC(r){return function(){var t=r(this);this.textContent=t??""}}function Kp(r){return this.tween("text",typeof r=="function"?aC(mi(this,"text",r)):oC(r==null?"":r+""))}function uC(r){return function(t){this.textContent=r.call(this,t)}}function lC(r){var t,e;function i(){var s=r.apply(this,arguments);return s!==e&&(t=(e=s)&&uC(s)),t}return i._value=r,i}function qp(r){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(r==null)return this.tween(t,null);if(typeof r!="function")throw new Error;return this.tween(t,lC(r))}function Zp(){for(var r=this._name,t=this._id,e=Jo(),i=this._groups,s=i.length,n=0;n<s;++n)for(var o=i[n],a=o.length,u,l=0;l<a;++l)if(u=o[l]){var c=Rt(u,t);yr(u,r,e,l,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Kt(i,this._parents,r,e)}function Qp(){var r,t,e=this,i=e._id,s=e.size();return new Promise(function(n,o){var a={value:o},u={value:function(){--s===0&&n()}};e.each(function(){var l=Lt(this,i),c=l.on;c!==r&&(t=(r=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),l.on=t}),s===0&&n()})}var cC=0;function Kt(r,t,e,i){this._groups=r,this._parents=t,this._name=e,this._id=i}function Jp(r){return ir().transition(r)}function Jo(){return++cC}var sr=ir.prototype;Kt.prototype=Jp.prototype={constructor:Kt,select:Wp,selectAll:Vp,selectChild:sr.selectChild,selectChildren:sr.selectChildren,filter:Lp,merge:Np,selection:Xp,transition:Zp,call:sr.call,nodes:sr.nodes,node:sr.node,size:sr.size,empty:sr.empty,each:sr.each,on:Hp,attr:Rp,attrTween:kp,style:jp,styleTween:Yp,text:Kp,textTween:qp,remove:zp,tween:Fp,delay:Gp,duration:Ip,ease:Up,easeVarying:Op,end:Qp,[Symbol.iterator]:sr[Symbol.iterator]};function ta(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var hC={time:null,delay:0,duration:250,ease:ta};function fC(r,t){for(var e;!(e=r.__transition)||!(e=e[t]);)if(!(r=r.parentNode))throw new Error(\`transition \${t} not found\`);return e}function tm(r){var t,e;r instanceof Kt?(t=r._id,r=r._name):(t=Jo(),(e=hC).time=As(),r=r==null?null:r+"");for(var i=this._groups,s=i.length,n=0;n<s;++n)for(var o=i[n],a=o.length,u,l=0;l<a;++l)(u=o[l])&&yr(u,r,t,l,o,e||fC(u,t));return new Kt(i,this._parents,r,t)}ir.prototype.interrupt=Mp;ir.prototype.transition=tm;var{abs:UR,max:OR,min:LR}=Math;function em(r){return[+r[0],+r[1]]}function dC(r){return[em(r[0]),em(r[1])]}var NR={name:"x",handles:["w","e"].map(xl),input:function(r,t){return r==null?null:[[+r[0],t[0][1]],[+r[1],t[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},HR={name:"y",handles:["n","s"].map(xl),input:function(r,t){return r==null?null:[[t[0][0],+r[0]],[t[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},zR={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(xl),input:function(r){return r==null?null:dC(r)},output:function(r){return r}};function xl(r){return{type:r}}function _l(r,t){var e,i=1;r==null&&(r=0),t==null&&(t=0);function s(){var n,o=e.length,a,u=0,l=0;for(n=0;n<o;++n)a=e[n],u+=a.x,l+=a.y;for(u=(u/o-r)*i,l=(l/o-t)*i,n=0;n<o;++n)a=e[n],a.x-=u,a.y-=l}return s.initialize=function(n){e=n},s.x=function(n){return arguments.length?(r=+n,s):r},s.y=function(n){return arguments.length?(t=+n,s):t},s.strength=function(n){return arguments.length?(i=+n,s):i},s}function rm(r){let t=+this._x.call(null,r),e=+this._y.call(null,r);return im(this.cover(t,e),t,e,r)}function im(r,t,e,i){if(isNaN(t)||isNaN(e))return r;var s,n=r._root,o={data:i},a=r._x0,u=r._y0,l=r._x1,c=r._y1,h,f,d,m,g,x,_,v;if(!n)return r._root=o,r;for(;n.length;)if((g=t>=(h=(a+l)/2))?a=h:l=h,(x=e>=(f=(u+c)/2))?u=f:c=f,s=n,!(n=n[_=x<<1|g]))return s[_]=o,r;if(d=+r._x.call(null,n.data),m=+r._y.call(null,n.data),t===d&&e===m)return o.next=n,s?s[_]=o:r._root=o,r;do s=s?s[_]=new Array(4):r._root=new Array(4),(g=t>=(h=(a+l)/2))?a=h:l=h,(x=e>=(f=(u+c)/2))?u=f:c=f;while((_=x<<1|g)===(v=(m>=f)<<1|d>=h));return s[v]=n,s[_]=o,r}function sm(r){var t,e,i=r.length,s,n,o=new Array(i),a=new Array(i),u=1/0,l=1/0,c=-1/0,h=-1/0;for(e=0;e<i;++e)isNaN(s=+this._x.call(null,t=r[e]))||isNaN(n=+this._y.call(null,t))||(o[e]=s,a[e]=n,s<u&&(u=s),s>c&&(c=s),n<l&&(l=n),n>h&&(h=n));if(u>c||l>h)return this;for(this.cover(u,l).cover(c,h),e=0;e<i;++e)im(this,o[e],a[e],r[e]);return this}function nm(r,t){if(isNaN(r=+r)||isNaN(t=+t))return this;var e=this._x0,i=this._y0,s=this._x1,n=this._y1;if(isNaN(e))s=(e=Math.floor(r))+1,n=(i=Math.floor(t))+1;else{for(var o=s-e||1,a=this._root,u,l;e>r||r>=s||i>t||t>=n;)switch(l=(t<i)<<1|r<e,u=new Array(4),u[l]=a,a=u,o*=2,l){case 0:s=e+o,n=i+o;break;case 1:e=s-o,n=i+o;break;case 2:s=e+o,i=n-o;break;case 3:e=s-o,i=n-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._y0=i,this._x1=s,this._y1=n,this}function om(){var r=[];return this.visit(function(t){if(!t.length)do r.push(t.data);while(t=t.next)}),r}function am(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function kt(r,t,e,i,s){this.node=r,this.x0=t,this.y0=e,this.x1=i,this.y1=s}function um(r,t,e){var i,s=this._x0,n=this._y0,o,a,u,l,c=this._x1,h=this._y1,f=[],d=this._root,m,g;for(d&&f.push(new kt(d,s,n,c,h)),e==null?e=1/0:(s=r-e,n=t-e,c=r+e,h=t+e,e*=e);m=f.pop();)if(!(!(d=m.node)||(o=m.x0)>c||(a=m.y0)>h||(u=m.x1)<s||(l=m.y1)<n))if(d.length){var x=(o+u)/2,_=(a+l)/2;f.push(new kt(d[3],x,_,u,l),new kt(d[2],o,_,x,l),new kt(d[1],x,a,u,_),new kt(d[0],o,a,x,_)),(g=(t>=_)<<1|r>=x)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=m)}else{var v=r-+this._x.call(null,d.data),T=t-+this._y.call(null,d.data),y=v*v+T*T;if(y<e){var A=Math.sqrt(e=y);s=r-A,n=t-A,c=r+A,h=t+A,i=d.data}}return i}function lm(r){if(isNaN(c=+this._x.call(null,r))||isNaN(h=+this._y.call(null,r)))return this;var t,e=this._root,i,s,n,o=this._x0,a=this._y0,u=this._x1,l=this._y1,c,h,f,d,m,g,x,_;if(!e)return this;if(e.length)for(;;){if((m=c>=(f=(o+u)/2))?o=f:u=f,(g=h>=(d=(a+l)/2))?a=d:l=d,t=e,!(e=e[x=g<<1|m]))return this;if(!e.length)break;(t[x+1&3]||t[x+2&3]||t[x+3&3])&&(i=t,_=x)}for(;e.data!==r;)if(s=e,!(e=e.next))return this;return(n=e.next)&&delete e.next,s?(n?s.next=n:delete s.next,this):t?(n?t[x]=n:delete t[x],(e=t[0]||t[1]||t[2]||t[3])&&e===(t[3]||t[2]||t[1]||t[0])&&!e.length&&(i?i[_]=e:this._root=e),this):(this._root=n,this)}function cm(r){for(var t=0,e=r.length;t<e;++t)this.remove(r[t]);return this}function hm(){return this._root}function fm(){var r=0;return this.visit(function(t){if(!t.length)do++r;while(t=t.next)}),r}function dm(r){var t=[],e,i=this._root,s,n,o,a,u;for(i&&t.push(new kt(i,this._x0,this._y0,this._x1,this._y1));e=t.pop();)if(!r(i=e.node,n=e.x0,o=e.y0,a=e.x1,u=e.y1)&&i.length){var l=(n+a)/2,c=(o+u)/2;(s=i[3])&&t.push(new kt(s,l,c,a,u)),(s=i[2])&&t.push(new kt(s,n,c,l,u)),(s=i[1])&&t.push(new kt(s,l,o,a,c)),(s=i[0])&&t.push(new kt(s,n,o,l,c))}return this}function pm(r){var t=[],e=[],i;for(this._root&&t.push(new kt(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var s=i.node;if(s.length){var n,o=i.x0,a=i.y0,u=i.x1,l=i.y1,c=(o+u)/2,h=(a+l)/2;(n=s[0])&&t.push(new kt(n,o,a,c,h)),(n=s[1])&&t.push(new kt(n,c,a,u,h)),(n=s[2])&&t.push(new kt(n,o,h,c,l)),(n=s[3])&&t.push(new kt(n,c,h,u,l))}e.push(i)}for(;i=e.pop();)r(i.node,i.x0,i.y0,i.x1,i.y1);return this}function mm(r){return r[0]}function gm(r){return arguments.length?(this._x=r,this):this._x}function xm(r){return r[1]}function _m(r){return arguments.length?(this._y=r,this):this._y}function zr(r,t,e){var i=new yl(t??mm,e??xm,NaN,NaN,NaN,NaN);return r==null?i:i.addAll(r)}function yl(r,t,e,i,s,n){this._x=r,this._y=t,this._x0=e,this._y0=i,this._x1=s,this._y1=n,this._root=void 0}function ym(r){for(var t={data:r.data},e=t;r=r.next;)e=e.next={data:r.data};return t}var qt=zr.prototype=yl.prototype;qt.copy=function(){var r=new yl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,e,i;if(!t)return r;if(!t.length)return r._root=ym(t),r;for(e=[{source:t,target:r._root=new Array(4)}];t=e.pop();)for(var s=0;s<4;++s)(i=t.source[s])&&(i.length?e.push({source:i,target:t.target[s]=new Array(4)}):t.target[s]=ym(i));return r};qt.add=rm;qt.addAll=sm;qt.cover=nm;qt.data=om;qt.extent=am;qt.find=um;qt.remove=lm;qt.removeAll=cm;qt.root=hm;qt.size=fm;qt.visit=dm;qt.visitAfter=pm;qt.x=gm;qt.y=_m;function Zt(r){return function(){return r}}function Pe(r){return(r()-.5)*1e-6}function pC(r){return r.x+r.vx}function mC(r){return r.y+r.vy}function bl(r){var t,e,i,s=1,n=1;typeof r!="function"&&(r=Zt(r==null?1:+r));function o(){for(var l,c=t.length,h,f,d,m,g,x,_=0;_<n;++_)for(h=zr(t,pC,mC).visitAfter(a),l=0;l<c;++l)f=t[l],g=e[f.index],x=g*g,d=f.x+f.vx,m=f.y+f.vy,h.visit(v);function v(T,y,A,S,E){var B=T.data,U=T.r,P=g+U;if(B){if(B.index>f.index){var F=d-B.x-B.vx,N=m-B.y-B.vy,q=F*F+N*N;q<P*P&&(F===0&&(F=Pe(i),q+=F*F),N===0&&(N=Pe(i),q+=N*N),q=(P-(q=Math.sqrt(q)))/q*s,f.vx+=(F*=q)*(P=(U*=U)/(x+U)),f.vy+=(N*=q)*P,B.vx-=F*(P=1-P),B.vy-=N*P)}return}return y>d+P||S<d-P||A>m+P||E<m-P}}function a(l){if(l.data)return l.r=e[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(t){var l,c=t.length,h;for(e=new Array(c),l=0;l<c;++l)h=t[l],e[h.index]=+r(h,l,t)}}return o.initialize=function(l,c){t=l,i=c,u()},o.iterations=function(l){return arguments.length?(n=+l,o):n},o.strength=function(l){return arguments.length?(s=+l,o):s},o.radius=function(l){return arguments.length?(r=typeof l=="function"?l:Zt(+l),u(),o):r},o}function gC(r){return r.index}function bm(r,t){var e=r.get(t);if(!e)throw new Error("node not found: "+t);return e}function vl(r){var t=gC,e=h,i,s=Zt(30),n,o,a,u,l,c=1;r==null&&(r=[]);function h(x){return 1/Math.min(a[x.source.index],a[x.target.index])}function f(x){for(var _=0,v=r.length;_<c;++_)for(var T=0,y,A,S,E,B,U,P;T<v;++T)y=r[T],A=y.source,S=y.target,E=S.x+S.vx-A.x-A.vx||Pe(l),B=S.y+S.vy-A.y-A.vy||Pe(l),U=Math.sqrt(E*E+B*B),U=(U-n[T])/U*x*i[T],E*=U,B*=U,S.vx-=E*(P=u[T]),S.vy-=B*P,A.vx+=E*(P=1-P),A.vy+=B*P}function d(){if(o){var x,_=o.length,v=r.length,T=new Map(o.map((A,S)=>[t(A,S,o),A])),y;for(x=0,a=new Array(_);x<v;++x)y=r[x],y.index=x,typeof y.source!="object"&&(y.source=bm(T,y.source)),typeof y.target!="object"&&(y.target=bm(T,y.target)),a[y.source.index]=(a[y.source.index]||0)+1,a[y.target.index]=(a[y.target.index]||0)+1;for(x=0,u=new Array(v);x<v;++x)y=r[x],u[x]=a[y.source.index]/(a[y.source.index]+a[y.target.index]);i=new Array(v),m(),n=new Array(v),g()}}function m(){if(o)for(var x=0,_=r.length;x<_;++x)i[x]=+e(r[x],x,r)}function g(){if(o)for(var x=0,_=r.length;x<_;++x)n[x]=+s(r[x],x,r)}return f.initialize=function(x,_){o=x,l=_,d()},f.links=function(x){return arguments.length?(r=x,d(),f):r},f.id=function(x){return arguments.length?(t=x,f):t},f.iterations=function(x){return arguments.length?(c=+x,f):c},f.strength=function(x){return arguments.length?(e=typeof x=="function"?x:Zt(+x),m(),f):e},f.distance=function(x){return arguments.length?(s=typeof x=="function"?x:Zt(+x),g(),f):s},f}function vm(){let r=1;return()=>(r=(1664525*r+1013904223)%4294967296)/4294967296}function Tm(r){return r.x}function Sm(r){return r.y}var xC=10,_C=Math.PI*(3-Math.sqrt(5));function Tl(r){var t,e=1,i=.001,s=1-Math.pow(i,1/300),n=0,o=.6,a=new Map,u=pi(h),l=er("tick","end"),c=vm();r==null&&(r=[]);function h(){f(),l.call("tick",t),e<i&&(u.stop(),l.call("end",t))}function f(g){var x,_=r.length,v;g===void 0&&(g=1);for(var T=0;T<g;++T)for(e+=(n-e)*s,a.forEach(function(y){y(e)}),x=0;x<_;++x)v=r[x],v.fx==null?v.x+=v.vx*=o:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=o:(v.y=v.fy,v.vy=0);return t}function d(){for(var g=0,x=r.length,_;g<x;++g){if(_=r[g],_.index=g,_.fx!=null&&(_.x=_.fx),_.fy!=null&&(_.y=_.fy),isNaN(_.x)||isNaN(_.y)){var v=xC*Math.sqrt(.5+g),T=g*_C;_.x=v*Math.cos(T),_.y=v*Math.sin(T)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function m(g){return g.initialize&&g.initialize(r,c),g}return d(),t={tick:f,restart:function(){return u.restart(h),t},stop:function(){return u.stop(),t},nodes:function(g){return arguments.length?(r=g,d(),a.forEach(m),t):r},alpha:function(g){return arguments.length?(e=+g,t):e},alphaMin:function(g){return arguments.length?(i=+g,t):i},alphaDecay:function(g){return arguments.length?(s=+g,t):+s},alphaTarget:function(g){return arguments.length?(n=+g,t):n},velocityDecay:function(g){return arguments.length?(o=1-g,t):1-o},randomSource:function(g){return arguments.length?(c=g,a.forEach(m),t):c},force:function(g,x){return arguments.length>1?(x==null?a.delete(g):a.set(g,m(x)),t):a.get(g)},find:function(g,x,_){var v=0,T=r.length,y,A,S,E,B;for(_==null?_=1/0:_*=_,v=0;v<T;++v)E=r[v],y=g-E.x,A=x-E.y,S=y*y+A*A,S<_&&(B=E,_=S);return B},on:function(g,x){return arguments.length>1?(l.on(g,x),t):l.on(g)}}}function Sl(){var r,t,e,i,s=Zt(-30),n,o=1,a=1/0,u=.81;function l(d){var m,g=r.length,x=zr(r,Tm,Sm).visitAfter(h);for(i=d,m=0;m<g;++m)t=r[m],x.visit(f)}function c(){if(r){var d,m=r.length,g;for(n=new Array(m),d=0;d<m;++d)g=r[d],n[g.index]=+s(g,d,r)}}function h(d){var m=0,g,x,_=0,v,T,y;if(d.length){for(v=T=y=0;y<4;++y)(g=d[y])&&(x=Math.abs(g.value))&&(m+=g.value,_+=x,v+=x*g.x,T+=x*g.y);d.x=v/_,d.y=T/_}else{g=d,g.x=g.data.x,g.y=g.data.y;do m+=n[g.data.index];while(g=g.next)}d.value=m}function f(d,m,g,x){if(!d.value)return!0;var _=d.x-t.x,v=d.y-t.y,T=x-m,y=_*_+v*v;if(T*T/u<y)return y<a&&(_===0&&(_=Pe(e),y+=_*_),v===0&&(v=Pe(e),y+=v*v),y<o&&(y=Math.sqrt(o*y)),t.vx+=_*d.value*i/y,t.vy+=v*d.value*i/y),!0;if(d.length||y>=a)return;(d.data!==t||d.next)&&(_===0&&(_=Pe(e),y+=_*_),v===0&&(v=Pe(e),y+=v*v),y<o&&(y=Math.sqrt(o*y)));do d.data!==t&&(T=n[d.data.index]*i/y,t.vx+=_*T,t.vy+=v*T);while(d=d.next)}return l.initialize=function(d,m){r=d,e=m,c()},l.strength=function(d){return arguments.length?(s=typeof d=="function"?d:Zt(+d),c(),l):s},l.distanceMin=function(d){return arguments.length?(o=d*d,l):Math.sqrt(o)},l.distanceMax=function(d){return arguments.length?(a=d*d,l):Math.sqrt(a)},l.theta=function(d){return arguments.length?(u=d*d,l):Math.sqrt(u)},l}function wl(r,t,e){var i,s=Zt(.1),n,o;typeof r!="function"&&(r=Zt(+r)),t==null&&(t=0),e==null&&(e=0);function a(l){for(var c=0,h=i.length;c<h;++c){var f=i[c],d=f.x-t||1e-6,m=f.y-e||1e-6,g=Math.sqrt(d*d+m*m),x=(o[c]-g)*n[c]*l/g;f.vx+=d*x,f.vy+=m*x}}function u(){if(i){var l,c=i.length;for(n=new Array(c),o=new Array(c),l=0;l<c;++l)o[l]=+r(i[l],l,i),n[l]=isNaN(o[l])?0:+s(i[l],l,i)}}return a.initialize=function(l){i=l,u()},a.strength=function(l){return arguments.length?(s=typeof l=="function"?l:Zt(+l),u(),a):s},a.radius=function(l){return arguments.length?(r=typeof l=="function"?l:Zt(+l),u(),a):r},a.x=function(l){return arguments.length?(t=+l,a):t},a.y=function(l){return arguments.length?(e=+l,a):e},a}var Bs=r=>()=>r;function El(r,{sourceEvent:t,target:e,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function Be(r,t,e){this.k=r,this.x=t,this.y=e}Be.prototype={constructor:Be,scale:function(r){return r===1?this:new Be(this.k*r,this.x,this.y)},translate:function(r,t){return r===0&t===0?this:new Be(this.k,this.x+this.k*r,this.y+this.k*t)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Wr=new Be(1,0,0);Cl.prototype=Be.prototype;function Cl(r){for(;!r.__zoom;)if(!(r=r.parentNode))return Wr;return r.__zoom}function ea(r){r.stopImmediatePropagation()}function gi(r){r.preventDefault(),r.stopImmediatePropagation()}function yC(r){return(!r.ctrlKey||r.type==="wheel")&&!r.button}function bC(){var r=this;return r instanceof SVGElement?(r=r.ownerSVGElement||r,r.hasAttribute("viewBox")?(r=r.viewBox.baseVal,[[r.x,r.y],[r.x+r.width,r.y+r.height]]):[[0,0],[r.width.baseVal.value,r.height.baseVal.value]]):[[0,0],[r.clientWidth,r.clientHeight]]}function wm(){return this.__zoom||Wr}function vC(r){return-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*(r.ctrlKey?10:1)}function TC(){return navigator.maxTouchPoints||"ontouchstart"in this}function SC(r,t,e){var i=r.invertX(t[0][0])-e[0][0],s=r.invertX(t[1][0])-e[1][0],n=r.invertY(t[0][1])-e[0][1],o=r.invertY(t[1][1])-e[1][1];return r.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o))}function Al(){var r=yC,t=bC,e=SC,i=vC,s=TC,n=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,u=ml,l=er("start","zoom","end"),c,h,f,d=500,m=150,g=0,x=10;function _(w){w.property("__zoom",wm).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",U).on("dblclick.zoom",P).filter(s).on("touchstart.zoom",F).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(w,H,C,M){var Y=w.selection?w.selection():w;Y.property("__zoom",wm),w!==Y?A(w,H,C,M):Y.interrupt().each(function(){S(this,arguments).event(M).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},_.scaleBy=function(w,H,C,M){_.scaleTo(w,function(){var Y=this.__zoom.k,O=typeof H=="function"?H.apply(this,arguments):H;return Y*O},C,M)},_.scaleTo=function(w,H,C,M){_.transform(w,function(){var Y=t.apply(this,arguments),O=this.__zoom,X=C==null?y(Y):typeof C=="function"?C.apply(this,arguments):C,rt=O.invert(X),st=typeof H=="function"?H.apply(this,arguments):H;return e(T(v(O,st),X,rt),Y,o)},C,M)},_.translateBy=function(w,H,C,M){_.transform(w,function(){return e(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof C=="function"?C.apply(this,arguments):C),t.apply(this,arguments),o)},null,M)},_.translateTo=function(w,H,C,M,Y){_.transform(w,function(){var O=t.apply(this,arguments),X=this.__zoom,rt=M==null?y(O):typeof M=="function"?M.apply(this,arguments):M;return e(Wr.translate(rt[0],rt[1]).scale(X.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof C=="function"?-C.apply(this,arguments):-C),O,o)},M,Y)};function v(w,H){return H=Math.max(n[0],Math.min(n[1],H)),H===w.k?w:new Be(H,w.x,w.y)}function T(w,H,C){var M=H[0]-C[0]*w.k,Y=H[1]-C[1]*w.k;return M===w.x&&Y===w.y?w:new Be(w.k,M,Y)}function y(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function A(w,H,C,M){w.on("start.zoom",function(){S(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(M).end()}).tween("zoom",function(){var Y=this,O=arguments,X=S(Y,O).event(M),rt=t.apply(Y,O),st=C==null?y(rt):typeof C=="function"?C.apply(Y,O):C,Ft=Math.max(rt[1][0]-rt[0][0],rt[1][1]-rt[0][1]),_t=Y.__zoom,Et=typeof H=="function"?H.apply(Y,O):H,Ot=u(_t.invert(st).concat(Ft/_t.k),Et.invert(st).concat(Ft/Et.k));return function(Vt){if(Vt===1)Vt=Et;else{var ie=Ot(Vt),Ee=Ft/ie[2];Vt=new Be(Ee,st[0]-ie[0]*Ee,st[1]-ie[1]*Ee)}X.zoom(null,Vt)}})}function S(w,H,C){return!C&&w.__zooming||new E(w,H)}function E(w,H){this.that=w,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply(w,H),this.taps=0}E.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,H){return this.mouse&&w!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var H=Xt(this.that).datum();l.call(w,this.that,new El(w,{sourceEvent:this.sourceEvent,target:_,type:w,transform:this.that.__zoom,dispatch:l}),H)}};function B(w,...H){if(!r.apply(this,arguments))return;var C=S(this,H).event(w),M=this.__zoom,Y=Math.max(n[0],Math.min(n[1],M.k*Math.pow(2,i.apply(this,arguments)))),O=me(w);if(C.wheel)(C.mouse[0][0]!==O[0]||C.mouse[0][1]!==O[1])&&(C.mouse[1]=M.invert(C.mouse[0]=O)),clearTimeout(C.wheel);else{if(M.k===Y)return;C.mouse=[O,M.invert(O)],br(this),C.start()}gi(w),C.wheel=setTimeout(X,m),C.zoom("mouse",e(T(v(M,Y),C.mouse[0],C.mouse[1]),C.extent,o));function X(){C.wheel=null,C.end()}}function U(w,...H){if(f||!r.apply(this,arguments))return;var C=w.currentTarget,M=S(this,H,!0).event(w),Y=Xt(w.view).on("mousemove.zoom",st,!0).on("mouseup.zoom",Ft,!0),O=me(w,C),X=w.clientX,rt=w.clientY;ms(w.view),ea(w),M.mouse=[O,this.__zoom.invert(O)],br(this),M.start();function st(_t){if(gi(_t),!M.moved){var Et=_t.clientX-X,Ot=_t.clientY-rt;M.moved=Et*Et+Ot*Ot>g}M.event(_t).zoom("mouse",e(T(M.that.__zoom,M.mouse[0]=me(_t,C),M.mouse[1]),M.extent,o))}function Ft(_t){Y.on("mousemove.zoom mouseup.zoom",null),gs(_t.view,M.moved),gi(_t),M.event(_t).end()}}function P(w,...H){if(r.apply(this,arguments)){var C=this.__zoom,M=me(w.changedTouches?w.changedTouches[0]:w,this),Y=C.invert(M),O=C.k*(w.shiftKey?.5:2),X=e(T(v(C,O),M,Y),t.apply(this,H),o);gi(w),a>0?Xt(this).transition().duration(a).call(A,X,M,w):Xt(this).call(_.transform,X,M,w)}}function F(w,...H){if(r.apply(this,arguments)){var C=w.touches,M=C.length,Y=S(this,H,w.changedTouches.length===M).event(w),O,X,rt,st;for(ea(w),X=0;X<M;++X)rt=C[X],st=me(rt,this),st=[st,this.__zoom.invert(st),rt.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==st[2]&&(Y.touch1=st,Y.taps=0):(Y.touch0=st,O=!0,Y.taps=1+!!c);c&&(c=clearTimeout(c)),O&&(Y.taps<2&&(h=st[0],c=setTimeout(function(){c=null},d)),br(this),Y.start())}}function N(w,...H){if(this.__zooming){var C=S(this,H).event(w),M=w.changedTouches,Y=M.length,O,X,rt,st;for(gi(w),O=0;O<Y;++O)X=M[O],rt=me(X,this),C.touch0&&C.touch0[2]===X.identifier?C.touch0[0]=rt:C.touch1&&C.touch1[2]===X.identifier&&(C.touch1[0]=rt);if(X=C.that.__zoom,C.touch1){var Ft=C.touch0[0],_t=C.touch0[1],Et=C.touch1[0],Ot=C.touch1[1],Vt=(Vt=Et[0]-Ft[0])*Vt+(Vt=Et[1]-Ft[1])*Vt,ie=(ie=Ot[0]-_t[0])*ie+(ie=Ot[1]-_t[1])*ie;X=v(X,Math.sqrt(Vt/ie)),rt=[(Ft[0]+Et[0])/2,(Ft[1]+Et[1])/2],st=[(_t[0]+Ot[0])/2,(_t[1]+Ot[1])/2]}else if(C.touch0)rt=C.touch0[0],st=C.touch0[1];else return;C.zoom("touch",e(T(X,rt,st),C.extent,o))}}function q(w,...H){if(this.__zooming){var C=S(this,H).event(w),M=w.changedTouches,Y=M.length,O,X;for(ea(w),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),O=0;O<Y;++O)X=M[O],C.touch0&&C.touch0[2]===X.identifier?delete C.touch0:C.touch1&&C.touch1[2]===X.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(X=me(X,this),Math.hypot(h[0]-X[0],h[1]-X[1])<x)){var rt=Xt(this).on("dblclick.zoom");rt&&rt.apply(this,arguments)}}}return _.wheelDelta=function(w){return arguments.length?(i=typeof w=="function"?w:Bs(+w),_):i},_.filter=function(w){return arguments.length?(r=typeof w=="function"?w:Bs(!!w),_):r},_.touchable=function(w){return arguments.length?(s=typeof w=="function"?w:Bs(!!w),_):s},_.extent=function(w){return arguments.length?(t=typeof w=="function"?w:Bs([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),_):t},_.scaleExtent=function(w){return arguments.length?(n[0]=+w[0],n[1]=+w[1],_):[n[0],n[1]]},_.translateExtent=function(w){return arguments.length?(o[0][0]=+w[0][0],o[1][0]=+w[1][0],o[0][1]=+w[0][1],o[1][1]=+w[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(w){return arguments.length?(e=w,_):e},_.duration=function(w){return arguments.length?(a=+w,_):a},_.interpolate=function(w){return arguments.length?(u=w,_):u},_.on=function(){var w=l.on.apply(l,arguments);return w===l?_:w},_.clickDistance=function(w){return arguments.length?(g=(w=+w)*w,_):Math.sqrt(g)},_.tapDistance=function(w){return arguments.length?(x=+w,_):x},_}D();var hv={extension:{type:b.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.resolve().then(()=>(cv(),MD))}};D();var dv={extension:{type:b.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Promise.resolve().then(()=>(fv(),FD))}};D();Ma();wa();D();Pt();En();var wu;function vv(r){return wu!==void 0||(wu=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:r??kr.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Q.get().getWebGLRenderingContext())return!1;let i=Q.get().createCanvas().getContext("webgl",t),s=!!i?.getContextAttributes()?.stencil;if(i){let n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,s}catch{return!1}})()),wu}Pt();var Eu;async function Tv(r={}){return Eu!==void 0||(Eu=await(async()=>{let t=Q.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(r)).requestDevice(),!0}catch{return!1}})()),Eu}En();var G1=["webgl","webgpu","canvas"];async function I1(r){let t=[];r.preference?(t.push(r.preference),G1.forEach(n=>{n!==r.preference&&t.push(n)})):t=G1.slice();let e,i={};for(let n=0;n<t.length;n++){let o=t[n];if(o==="webgpu"&&await Tv()){let{WebGPURenderer:a}=await Promise.resolve().then(()=>(uS(),aS));e=a,i={...r,...r.webgpu};break}else if(o==="webgl"&&vv(r.failIfMajorPerformanceCaveat??kr.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:a}=await Promise.resolve().then(()=>(k1(),R1));e=a,i={...r,...r.webgl};break}else if(o==="canvas")throw i={...r},new Error("CanvasRenderer is not yet implemented")}if(delete i.webgpu,delete i.webgl,!e)throw new Error("No available renderer for the current environment");let s=new e;return await s.init(i),s}Fe();bf();yt();var U1=class ud{constructor(...t){this.stage=new dt,t[0]!==void 0&&W($,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.renderer=await I1(t),ud._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return W($,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,e=!1){let i=ud._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null}};U1._plugins=[];var Zu=U1;L.handleByList(b.Application,Zu._plugins);L.add(Gn);na();yt();Ca();var Qu=class extends Er{constructor(t,e){let{text:i,resolution:s,style:n,anchor:o,width:a,height:u,roundPixels:l,...c}=t;super({...c}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=e,this.text=i??"",this.style=n,this.resolution=s??null,this.allowChildren=!1,this._anchor=new Ht({_onUpdate:()=>{this.onViewUpdate()}}),o&&(this.anchor=o),this.roundPixels=l??!1,a!==void 0&&(this.width=a),u!==void 0&&(this.height=u)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=t===null,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){t||(t={}),this._style?.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,e){typeof t=="object"?(e=t.height??t.width,t=t.width):e??(e=t),t!==void 0&&this._setWidth(t,this.bounds.width),e!==void 0&&this._setHeight(e,this.bounds.height)}containsPoint(t){let e=this.bounds.width,i=this.bounds.height,s=-e*this.anchor.x,n=0;return t.x>=s&&t.x<=s+e&&(n=-i*this.anchor.y,t.y>=n&&t.y<=n+i)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}_getKey(){return\`\${this.text}:\${this._style.styleKey}:\${this._resolution}\`}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t?.style)&&this._style.destroy(t),this._style=null,this._text=null}};function O1(r,t){let e=r[0]??{};return(typeof e=="string"||r[1])&&(W($,\`use new \${t}({ text: "hi!", style }) instead\`),e={text:e,style:r[1]}),e}hu();ji();var vo=class extends Qu{constructor(...t){let e=O1(t,"Text");super(e,ce),this.renderPipeId="text"}updateBounds(){let t=this._bounds,e=this._anchor,i=we.measureText(this._text,this._style),{width:s,height:n}=i;t.minX=-e._x*s,t.maxX=t.minX+s,t.minY=-e._y*n,t.maxY=t.minY+n}};Ah();Pc();Fe();Yh();jt();var fP=hs(ih(),1);L.add(hv,dv);var So=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-So.Bounce.Out(1-r)},Out:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},InOut:function(r){return r<.5?So.Bounce.In(r*2)*.5:So.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),To=function(){return performance.now()},wo=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var s=0,n=e;s<n.length;s++){var o=n[s];(t=o._group)===null||t===void 0||t.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,s=t;i<s.length;i++){var n=s[i];n._group=void 0,delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=To()),e===void 0&&(e=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s<i.length;s++){var n=this._tweens[i[s]],o=!e;n&&n.update(t,o)===!1&&!e&&this.remove(n)}i=Object.keys(this._tweensAddedDuringUpdate)}},r}(),us={Linear:function(r,t){var e=r.length-1,i=e*t,s=Math.floor(i),n=us.Utils.Linear;return t<0?n(r[0],r[1],i):t>1?n(r[e],r[e-1],e-i):n(r[s],r[s+1>e?e:s+1],i-s)},Bezier:function(r,t){for(var e=0,i=r.length-1,s=Math.pow,n=us.Utils.Bernstein,o=0;o<=i;o++)e+=s(1-t,i-o)*s(t,o)*r[o]*n(i,o);return e},CatmullRom:function(r,t){var e=r.length-1,i=e*t,s=Math.floor(i),n=us.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(s=Math.floor(i=e*(1+t))),n(r[(s-1+e)%e],r[s],r[(s+1)%e],r[(s+2)%e],i-s)):t<0?r[0]-(n(r[0],r[0],r[1],r[1],-i)-r[0]):t>1?r[e]-(n(r[e],r[e],r[e-1],r[e-1],i-e)-r[e]):n(r[s?s-1:0],r[s],r[e<s+1?e:s+1],r[e<s+2?e:s+2],i-s)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=us.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}}(),CatmullRom:function(r,t,e,i,s){var n=(e-r)*.5,o=(i-t)*.5,a=s*s,u=s*a;return(2*t-2*e+n+o)*u+(-3*t+3*e-2*n-o)*a+n*s+t}}},L1=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),ld=new wo,Eo=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=So.Linear.None,this._interpolationFunction=us.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=L1.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=ld,ld.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=To()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var n in this._valuesEnd)s[n]=this._valuesEnd[n];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,i,s,n){for(var o in i){var a=t[o],u=Array.isArray(a),l=u?"array":typeof a,c=!u&&Array.isArray(i[o]);if(!(l==="undefined"||l==="function")){if(c){var h=i[o];if(h.length===0)continue;for(var f=[a],d=0,m=h.length;d<m;d+=1){var g=this._handleRelativeValue(a,h[d]);if(isNaN(g)){c=!1,console.warn("Found invalid interpolation list. Skipping.");break}f.push(g)}c&&(i[o]=f)}if((l==="object"||u)&&a&&!c){e[o]=u?[]:{};var x=a;for(var _ in x)e[o][_]=x[_];s[o]=u?[]:{};var h=i[o];if(!this._isDynamic){var v={};for(var _ in h)v[_]=h[_];i[o]=h=v}this._setupProperties(x,e[o],h,s[o],n)}else(typeof e[o]>"u"||n)&&(e[o]=a),u||(e[o]*=1),c?s[o]=i[o].slice().reverse():s[o]=e[o]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=To()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=To()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=So.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=us.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var i=this,s;if(t===void 0&&(t=To()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var n;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=t-this._startTime,a=this._duration+((s=this._repeatDelayTime)!==null&&s!==void 0?s:this._delayTime),u=this._duration+this._repeat*a,l=function(){if(i._duration===0||o>u)return 1;var g=Math.trunc(o/a),x=o-g*a,_=Math.min(x/i._duration,1);return _===0&&o===i._duration?1:_},c=l(),h=this._easingFunction(c);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,c),this._duration===0||o>=this._duration)if(this._repeat>0){var f=Math.min(Math.trunc((o-this._duration)/a)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=f);for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*f,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var d=0,m=this._chainedTweens.length;d<m;d++)this._chainedTweens[d].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,i,s){for(var n in i)if(e[n]!==void 0){var o=e[n]||0,a=i[n],u=Array.isArray(t[n]),l=Array.isArray(a),c=!u&&l;c?t[n]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[n],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[n]=o+(a-o)*s))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}();var cet=L1.nextId,Je=ld,het=Je.getAll.bind(Je),fet=Je.removeAll.bind(Je),det=Je.add.bind(Je),pet=Je.remove.bind(Je),met=Je.update.bind(Je);function N1(r,t){if(!r)return;function e(s){s.target===this&&(s.preventDefault(),s.stopPropagation(),t())}function i(s){s.key.startsWith("Esc")&&(s.preventDefault(),t())}r?.addEventListener("click",e),window.addCleanup(()=>r?.removeEventListener("click",e)),document.addEventListener("keydown",i),window.addCleanup(()=>document.removeEventListener("keydown",i))}function H1(r){for(;r.firstChild;)r.removeChild(r.firstChild)}var vet=Object.hasOwnProperty;var V1=hs(W1(),1),Aet=(0,V1.default)();function X1(r){return r.document.body.dataset.slug}function cs(r){let t=$1(_P(r,"index"),!0);return t.length===0?"/":t}function mP(r){let t=r.split("/").filter(e=>e!=="").slice(0,-1).map(e=>"..").join("/");return t.length===0&&(t="."),t}function cd(r,t){return gP(mP(r),cs(t))}function gP(...r){if(r.length===0)return"";let t=r.filter(e=>e!==""&&e!=="/").map(e=>$1(e)).join("/");return r[0].startsWith("/")&&(t="/"+t),r[r.length-1].endsWith("/")&&(t=t+"/"),t}function xP(r,t){return r===t||r.endsWith("/"+t)}function _P(r,t){return xP(r,t)&&(r=r.slice(0,-t.length)),r}function $1(r,t){return r.startsWith("/")&&(r=r.substring(1)),!t&&r.endsWith("/")&&(r=r.slice(0,-1)),r}var j1="graph-visited";function Y1(){return new Set(JSON.parse(localStorage.getItem(j1)??"[]"))}function yP(r){let t=Y1();t.add(r),localStorage.setItem(j1,JSON.stringify([...t]))}async function hd(r,t){let e=cs(t),i=Y1(),s=document.getElementById(r);if(!s)return;H1(s);let{drag:n,zoom:o,depth:a,scale:u,repelForce:l,centerForce:c,linkDistance:h,fontSize:f,opacityScale:d,removeTags:m,showTags:g,focusOnHover:x,enableRadial:_}=JSON.parse(s.dataset.cfg),v=new Map(Object.entries(await fetchData).map(([R,k])=>[cs(R),k])),T=[],y=[],A=new Set(v.keys()),S=new Map;for(let[R,k]of v.entries()){let K=k.links??[];for(let at of K)A.has(at)&&T.push({source:R,target:at});if(g){let at=k.tags.filter(Ct=>!m.includes(Ct)).map(Ct=>cs("tags/"+Ct));y.push(...at.filter(Ct=>!y.includes(Ct)));for(let Ct of at)T.push({source:R,target:Ct})}}let E=new Set,B=[e,"__SENTINEL"];if(a>=0)for(;a>=0&&B.length>0;){let R=B.shift();if(R==="__SENTINEL")a--,B.push("__SENTINEL");else{E.add(R);let k=T.filter(at=>at.source===R),K=T.filter(at=>at.target===R);B.push(...k.map(at=>at.target),...K.map(at=>at.source))}}else A.forEach(R=>E.add(R)),g&&y.forEach(R=>E.add(R));let U=[...E].map(R=>{let k=R.startsWith("tags/")?"#"+R.substring(5):v.get(R)?.title??R;return{id:R,text:k,tags:v.get(R)?.tags??[]}}),P={nodes:U,links:T.filter(R=>E.has(R.source)&&E.has(R.target)).map(R=>({source:U.find(k=>k.id===R.source),target:U.find(k=>k.id===R.target)}))},F=s.offsetWidth,N=Math.max(s.offsetHeight,250),q=Math.min(F,N)/2-40,w=Tl(P.nodes).force("charge",Sl().strength(-100*l)).force("center",_l().strength(c)).force("link",vl(P.links).distance(h)).force("collide",bl(R=>Y(R)).iterations(3));_&&w.force("radial",wl(q*.8,F/2,N/2).strength(.3));let C=["--secondary","--tertiary","--gray","--light","--lightgray","--dark","--darkgray","--bodyFont"].reduce((R,k)=>(R[k]=getComputedStyle(document.documentElement).getPropertyValue(k),R),{}),M=R=>R.id===e?C["--secondary"]:i.has(R.id)||R.id.startsWith("tags/")?C["--tertiary"]:C["--gray"];function Y(R){let k=P.links.filter(K=>K.source.id===R.id||K.target.id===R.id).length;return 2+Math.sqrt(k)}let O=null,X=new Set,rt=[],st=[];function Ft(R){if(O=R,R===null){X=new Set;for(let k of st)k.active=!1;for(let k of rt)k.active=!1}else{X=new Set;for(let k of rt){let K=k.simulationData;(K.source.id===R||K.target.id===R)&&(X.add(K.source.id),X.add(K.target.id)),k.active=K.source.id===R||K.target.id===R}for(let k of st)k.active=X.has(k.simulationData.id)}}let _t=0,Et=!1;function Ot(){S.get("link")?.stop();let R=new wo;for(let k of rt){let K=1;O&&(K=k.active?1:.2),k.color=k.active?C["--gray"]:C["--lightgray"],R.add(new Eo(k).to({alpha:K},200))}R.getAll().forEach(k=>k.start()),S.set("link",{update:R.update.bind(R),stop(){R.getAll().forEach(k=>k.stop())}})}function Vt(){S.get("label")?.stop();let R=new wo,k=1/u,K=k*1.1;for(let at of st){let Ct=at.simulationData.id;O===Ct?R.add(new Eo(at.label).to({alpha:1,scale:{x:K,y:K}},100)):R.add(new Eo(at.label).to({alpha:at.label.alpha,scale:{x:k,y:k}},100))}R.getAll().forEach(at=>at.start()),S.set("label",{update:R.update.bind(R),stop(){R.getAll().forEach(at=>at.stop())}})}function ie(){S.get("hover")?.stop();let R=new wo;for(let k of st){let K=1;O!==null&&x&&(K=k.active?1:.2),R.add(new Eo(k.gfx,R).to({alpha:K},200))}R.getAll().forEach(k=>k.start()),S.set("hover",{update:R.update.bind(R),stop(){R.getAll().forEach(k=>k.stop())}})}function Ee(){ie(),Ot(),Vt()}S.forEach(R=>R.stop()),S.clear();let pe=new Zu;await pe.init({width:F,height:N,antialias:!0,autoStart:!1,autoDensity:!0,backgroundAlpha:0,preference:"webgpu",resolution:window.devicePixelRatio,eventMode:"static"}),s.appendChild(pe.canvas);let tr=pe.stage;tr.interactive=!1;let Ce=new dt({zIndex:3}),Ue=new dt({zIndex:2}),Oe=new dt({zIndex:1});tr.addChild(Ue,Ce,Oe);for(let R of P.nodes){let k=R.id,K=new vo({interactive:!1,eventMode:"none",text:R.text,alpha:0,anchor:{x:.5,y:1.2},style:{fontSize:f*15,fill:C["--dark"],fontFamily:C["--bodyFont"]},resolution:window.devicePixelRatio*4});K.scale.set(1/u);let at=0,Ct=k.startsWith("tags/"),fd=new Rr({interactive:!0,label:k,eventMode:"static",hitArea:new ai(0,0,Y(R)),cursor:"pointer"}).circle(0,0,Y(R)).fill({color:Ct?C["--light"]:M(R)}).stroke({width:Ct?2:0,color:M(R)}).on("pointerover",q1=>{Ft(q1.target.label),at=K.alpha,Et||Ee()}).on("pointerleave",()=>{Ft(null),K.alpha=at,Et||Ee()});Ue.addChild(fd),Ce.addChild(K);let K1={simulationData:R,gfx:fd,label:K,color:M(R),alpha:1,active:!1};st.push(K1)}for(let R of P.links){let k=new Rr({interactive:!1,eventMode:"none"});Oe.addChild(k);let K={simulationData:R,gfx:k,color:C["--lightgray"],alpha:1,active:!1};rt.push(K)}let Ae=Wr;if(n)Xt(pe.canvas).call(sl().container(()=>pe.canvas).subject(()=>P.nodes.find(R=>R.id===O)).on("start",function(k){k.active||w.alphaTarget(1).restart(),k.subject.fx=k.subject.x,k.subject.fy=k.subject.y,k.subject.__initialDragPos={x:k.subject.x,y:k.subject.y,fx:k.subject.fx,fy:k.subject.fy},_t=Date.now(),Et=!0}).on("drag",function(k){let K=k.subject.__initialDragPos;k.subject.fx=K.x+(k.x-K.x)/Ae.k,k.subject.fy=K.y+(k.y-K.y)/Ae.k}).on("end",function(k){if(k.active||w.alphaTarget(0),k.subject.fx=null,k.subject.fy=null,Et=!1,Date.now()-_t<500){let K=P.nodes.find(Ct=>Ct.id===k.subject.id),at=cd(t,K.id);window.spaNavigate(new URL(at,window.location.toString()))}}));else for(let R of st)R.gfx.on("click",()=>{let k=cd(t,R.simulationData.id);window.spaNavigate(new URL(k,window.location.toString()))});o&&Xt(pe.canvas).call(Al().extent([[0,0],[F,N]]).scaleExtent([.25,4]).on("zoom",({transform:R})=>{Ae=R,tr.scale.set(R.k,R.k),tr.position.set(R.x,R.y);let k=R.k*d,K=Math.max((k-1)/3.75,0),at=st.filter(Ct=>Ct.active).flatMap(Ct=>Ct.label);for(let Ct of Ce.children)at.includes(Ct)||(Ct.alpha=K)}));function Co(R){for(let k of st){let{x:K,y:at}=k.simulationData;!K||!at||(k.gfx.position.set(K+F/2,at+N/2),k.label&&k.label.position.set(K+F/2,at+N/2))}for(let k of rt){let K=k.simulationData;k.gfx.clear(),k.gfx.moveTo(K.source.x+F/2,K.source.y+N/2),k.gfx.lineTo(K.target.x+F/2,K.target.y+N/2).stroke({alpha:k.alpha,width:1,color:k.color})}S.forEach(k=>k.update(R)),pe.renderer.render(tr),requestAnimationFrame(Co)}let Ao=requestAnimationFrame(Co);window.addCleanup(()=>cancelAnimationFrame(Ao))}document.addEventListener("nav",async r=>{let t=r.detail.url;yP(cs(t)),await hd("graph-container",t);let e=()=>{hd("graph-container",t)};document.addEventListener("themechange",e),window.addCleanup(()=>{document.removeEventListener("themechange",e)});let i=document.getElementById("global-graph-outer"),s=i?.closest(".sidebar");function n(){let l=X1(window);i?.classList.add("active"),s&&(s.style.zIndex="1"),hd("global-graph-container",l),N1(i,o)}function o(){i?.classList.remove("active"),s&&(s.style.zIndex="")}async function a(l){l.key==="g"&&(l.ctrlKey||l.metaKey)&&!l.shiftKey&&(l.preventDefault(),i?.classList.contains("active")?o():n())}let u=document.getElementById("global-graph-icon");u?.addEventListener("click",n),window.addCleanup(()=>u?.removeEventListener("click",n)),document.addEventListener("keydown",a),window.addCleanup(()=>document.removeEventListener("keydown",a))});
|
|
`;var graph_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
.graph > h3 {
|
|
font-size: 1rem;
|
|
margin: 0;
|
|
}
|
|
.graph > .graph-outer {
|
|
border-radius: 5px;
|
|
border: 1px solid var(--lightgray);
|
|
box-sizing: border-box;
|
|
height: 250px;
|
|
margin: 0.5em 0;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.graph > .graph-outer > #global-graph-icon {
|
|
cursor: pointer;
|
|
background: none;
|
|
border: none;
|
|
color: var(--dark);
|
|
opacity: 0.5;
|
|
width: 24px;
|
|
height: 24px;
|
|
position: absolute;
|
|
padding: 0.2rem;
|
|
margin: 0.3rem;
|
|
top: 0;
|
|
right: 0;
|
|
border-radius: 4px;
|
|
background-color: transparent;
|
|
transition: background-color 0.5s ease;
|
|
cursor: pointer;
|
|
}
|
|
.graph > .graph-outer > #global-graph-icon:hover {
|
|
background-color: var(--lightgray);
|
|
}
|
|
.graph > #global-graph-outer {
|
|
position: fixed;
|
|
z-index: 9999;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100vw;
|
|
height: 100%;
|
|
backdrop-filter: blur(4px);
|
|
display: none;
|
|
overflow: hidden;
|
|
}
|
|
.graph > #global-graph-outer.active {
|
|
display: inline-block;
|
|
}
|
|
.graph > #global-graph-outer > #global-graph-container {
|
|
border: 1px solid var(--lightgray);
|
|
background-color: var(--light);
|
|
border-radius: 5px;
|
|
box-sizing: border-box;
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
height: 80vh;
|
|
width: 80vw;
|
|
}
|
|
@media all and not ((min-width: 1200px)) {
|
|
.graph > #global-graph-outer > #global-graph-container {
|
|
width: 90%;
|
|
}
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3MiLCJncmFwaC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FDQ0U7RUFDRTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFDQTtFQUNFOztBQUtOO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQVpGO0lBYUkiLCJzb3V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ApIHtcbiAgICAgICAgd2lkdGg6IDkwJTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdfQ== */`;import{jsx as jsx24,jsxs as jsxs13}from"preact/jsx-runtime";var defaultOptions15={localGraph:{drag:!0,zoom:!0,depth:1,scale:1.1,repelForce:.5,centerForce:.3,linkDistance:30,fontSize:.6,opacityScale:1,showTags:!0,removeTags:[],focusOnHover:!1,enableRadial:!1},globalGraph:{drag:!0,zoom:!0,depth:-1,scale:.9,repelForce:.5,centerForce:.3,linkDistance:30,fontSize:.6,opacityScale:1,showTags:!0,removeTags:[],focusOnHover:!0,enableRadial:!0}},Graph_default=__name(opts=>{let Graph=__name(({displayClass,cfg})=>{let localGraph={...defaultOptions15.localGraph,...opts?.localGraph},globalGraph={...defaultOptions15.globalGraph,...opts?.globalGraph};return jsxs13("div",{class:classNames(displayClass,"graph"),children:[jsx24("h3",{children:i18n(cfg.locale).components.graph.title}),jsxs13("div",{class:"graph-outer",children:[jsx24("div",{id:"graph-container","data-cfg":JSON.stringify(localGraph)}),jsx24("button",{id:"global-graph-icon","aria-label":"Global Graph",children:jsx24("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 55 55",fill:"currentColor",xmlSpace:"preserve",children:jsx24("path",{d:`M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
|
|
s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4
|
|
c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562
|
|
C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829
|
|
c1.106,0.86,2.44,1.436,3.898,1.619v10.16c-2.833,0.478-5,2.942-5,5.91c0,3.309,2.691,6,6,6s6-2.691,6-6c0-2.967-2.167-5.431-5-5.91
|
|
v-10.16c1.458-0.183,2.792-0.759,3.898-1.619l7.669,7.669C41.215,39.576,41,40.26,41,41c0,2.206,1.794,4,4,4s4-1.794,4-4
|
|
s-1.794-4-4-4c-0.74,0-1.424,0.215-2.019,0.567l-7.669-7.669C36.366,28.542,37,26.846,37,25s-0.634-3.542-1.688-4.897l9.665-9.665
|
|
C46.042,11.405,47.451,12,49,12c3.309,0,6-2.691,6-6S52.309,0,49,0z M11,9c0-1.103,0.897-2,2-2s2,0.897,2,2s-0.897,2-2,2
|
|
S11,10.103,11,9z M6,51c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S8.206,51,6,51z M33,49c0,2.206-1.794,4-4,4s-4-1.794-4-4
|
|
s1.794-4,4-4S33,46.794,33,49z M29,31c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S32.309,31,29,31z M47,41c0,1.103-0.897,2-2,2
|
|
s-2-0.897-2-2s0.897-2,2-2S47,39.897,47,41z M49,10c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S51.206,10,49,10z`})})})]}),jsx24("div",{id:"global-graph-outer",children:jsx24("div",{id:"global-graph-container","data-cfg":JSON.stringify(globalGraph)})})]})},"Graph");return Graph.css=graph_default,Graph.afterDOMLoaded=graph_inline_default,Graph},"default");var backlinks_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
.backlinks {
|
|
flex-direction: column;
|
|
/*&:after {
|
|
pointer-events: none;
|
|
content: "";
|
|
width: 100%;
|
|
height: 50px;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease;
|
|
background: linear-gradient(transparent 0px, var(--light));
|
|
}*/
|
|
}
|
|
.backlinks > h3 {
|
|
font-size: 1rem;
|
|
margin: 0;
|
|
}
|
|
.backlinks > ul {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0.5rem 0;
|
|
}
|
|
.backlinks > ul > li > a {
|
|
background-color: transparent;
|
|
}
|
|
.backlinks > .overflow {
|
|
height: auto;
|
|
}
|
|
.backlinks > .overflow:after {
|
|
display: none;
|
|
}
|
|
@media all and not ((min-width: 1200px)) {
|
|
.backlinks > .overflow {
|
|
height: 250px;
|
|
}
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3MiLCJiYWNrbGlua3Muc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQ0FBO0VBQ0U7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBYUE7RUFDRTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBOztBQUdFO0VBQ0U7O0FBS047RUFJRTs7QUFIQTtFQUNFOztBQUdGO0VBTEY7SUFNSSIsInNvdXJjZXNDb250ZW50IjpbIkB1c2UgXCJzYXNzOm1hcFwiO1xuXG4vKipcbiAqIExheW91dCBicmVha3BvaW50c1xuICogJG1vYmlsZTogc2NyZWVuIHdpZHRoIGJlbG93IHRoaXMgdmFsdWUgd2lsbCB1c2UgbW9iaWxlIHN0eWxlc1xuICogJGRlc2t0b3A6IHN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,jsxs as jsxs14}from"preact/jsx-runtime";var defaultOptions16={hideWhenEmpty:!0},Backlinks_default=__name(opts=>{let options2={...defaultOptions16,...opts},Backlinks=__name(({fileData,allFiles,displayClass,cfg})=>{let slug=simplifySlug(fileData.slug),backlinkFiles=allFiles.filter(file=>file.links?.includes(slug));return options2.hideWhenEmpty&&backlinkFiles.length==0?null:jsxs14("div",{class:classNames(displayClass,"backlinks"),children:[jsx25("h3",{children:i18n(cfg.locale).components.backlinks.title}),jsx25("ul",{class:"overflow",children:backlinkFiles.length>0?backlinkFiles.map(f=>jsx25("li",{children:jsx25("a",{href:resolveRelative(fileData.slug,f.slug),class:"internal",children:f.frontmatter?.title})})):jsx25("li",{children:i18n(cfg.locale).components.backlinks.noBacklinksFound})})]})},"Backlinks");return Backlinks.css=backlinks_default,Backlinks},"default");var search_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
.search {
|
|
min-width: fit-content;
|
|
max-width: 14rem;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.search {
|
|
flex-grow: 0.3;
|
|
}
|
|
}
|
|
.search > .search-button {
|
|
background-color: var(--lightgray);
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
height: 2rem;
|
|
padding: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
text-align: inherit;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
}
|
|
.search > .search-button > p {
|
|
display: inline;
|
|
padding: 0 1rem;
|
|
}
|
|
.search > .search-button svg {
|
|
cursor: pointer;
|
|
width: 18px;
|
|
min-width: 18px;
|
|
margin: 0 0.5rem;
|
|
}
|
|
.search > .search-button svg .search-path {
|
|
stroke: var(--darkgray);
|
|
stroke-width: 2px;
|
|
transition: stroke 0.5s ease;
|
|
}
|
|
.search > #search-container {
|
|
position: fixed;
|
|
contain: layout;
|
|
z-index: 999;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
overflow-y: auto;
|
|
display: none;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
.search > #search-container.active {
|
|
display: inline-block;
|
|
}
|
|
.search > #search-container > #search-space {
|
|
width: 65%;
|
|
margin-top: 12vh;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
@media all and not ((min-width: 1200px)) {
|
|
.search > #search-container > #search-space {
|
|
width: 90%;
|
|
}
|
|
}
|
|
.search > #search-container > #search-space > * {
|
|
width: 100%;
|
|
border-radius: 7px;
|
|
background: var(--light);
|
|
box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);
|
|
margin-bottom: 2em;
|
|
}
|
|
.search > #search-container > #search-space > input {
|
|
box-sizing: border-box;
|
|
padding: 0.5em 1em;
|
|
font-family: var(--bodyFont);
|
|
color: var(--dark);
|
|
font-size: 1.1em;
|
|
border: 1px solid var(--lightgray);
|
|
}
|
|
.search > #search-container > #search-space > input:focus {
|
|
outline: none;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout {
|
|
display: none;
|
|
flex-direction: row;
|
|
border: 1px solid var(--lightgray);
|
|
flex: 0 0 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout.display-results {
|
|
display: flex;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout[data-preview] > #results-container {
|
|
flex: 0 0 min(30%, 450px);
|
|
}
|
|
@media all and not ((max-width: 800px)) {
|
|
.search > #search-container > #search-space > #search-layout[data-preview] .result-card > p.preview {
|
|
display: none;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout[data-preview] > div:first-child {
|
|
border-right: 1px solid var(--lightgray);
|
|
border-top-right-radius: unset;
|
|
border-bottom-right-radius: unset;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout[data-preview] > div:last-child {
|
|
border-top-left-radius: unset;
|
|
border-bottom-left-radius: unset;
|
|
}
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > div {
|
|
height: 63vh;
|
|
border-radius: 5px;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.search > #search-container > #search-space > #search-layout > #preview-container {
|
|
display: none !important;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout[data-preview] > #results-container {
|
|
width: 100%;
|
|
height: auto;
|
|
flex: 0 0 100%;
|
|
}
|
|
}
|
|
.search > #search-container > #search-space > #search-layout .highlight {
|
|
background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));
|
|
border-radius: 5px;
|
|
scroll-margin-top: 2rem;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #preview-container {
|
|
flex-grow: 1;
|
|
display: block;
|
|
overflow: hidden;
|
|
font-family: inherit;
|
|
color: var(--dark);
|
|
line-height: 1.5em;
|
|
font-weight: 400;
|
|
overflow-y: auto;
|
|
padding: 0 2rem;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #preview-container .preview-inner {
|
|
margin: 0 auto;
|
|
width: min(800px, 100%);
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #preview-container a[role=anchor] {
|
|
background-color: transparent;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container {
|
|
overflow-y: auto;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card {
|
|
overflow: hidden;
|
|
padding: 1em;
|
|
cursor: pointer;
|
|
transition: background 0.2s ease;
|
|
border-bottom: 1px solid var(--lightgray);
|
|
width: 100%;
|
|
display: block;
|
|
box-sizing: border-box;
|
|
font-family: inherit;
|
|
font-size: 100%;
|
|
line-height: 1.15;
|
|
margin: 0;
|
|
text-transform: none;
|
|
text-align: left;
|
|
outline: none;
|
|
font-weight: inherit;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card:hover, .search > #search-container > #search-space > #search-layout > #results-container .result-card:focus, .search > #search-container > #search-space > #search-layout > #results-container .result-card.focus {
|
|
background: var(--lightgray);
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card > h3 {
|
|
margin: 0;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card > ul.tags {
|
|
margin-top: 0.45rem;
|
|
margin-bottom: 0;
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card > ul > li > p {
|
|
border-radius: 8px;
|
|
background-color: var(--highlight);
|
|
padding: 0.2rem 0.4rem;
|
|
margin: 0 0.1rem;
|
|
line-height: 1.4rem;
|
|
font-weight: 700;
|
|
color: var(--secondary);
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card > ul > li > p.match-tag {
|
|
color: var(--tertiary);
|
|
}
|
|
.search > #search-container > #search-space > #search-layout > #results-container .result-card > p {
|
|
margin-bottom: 0;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3MiLCJzZWFyY2guc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQ0FBO0VBQ0U7RUFDQTs7QUFDQTtFQUhGO0lBSUk7OztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ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pO1xuICAgICAgICBtYXJnaW4tYm90dG9tOiAyZW07XG4gICAgICB9XG5cbiAgICAgICYgPiBpbnB1dCB7XG4gICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICAgIHBhZGRpbmc6IDAuNWVtIDFlbTtcbiAgICAgICAgZm9udC1mYW1pbHk6IHZhcigtLWJvZHlGb250KTtcbiAgICAgICAgY29sb3I6IHZhcigtLWRhcmspO1xuICAgICAgICBmb250LXNpemU6IDEuMWVtO1xuICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1saWdodGdyYXkpO1xuXG4gICAgICAgICY6Zm9jdXMge1xuICAgICAgICAgIG91dGxpbmU6IG5vbmU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgJiA+ICNzZWFyY2gtbGF5b3V0IHtcbiAgICAgICAgZGlzcGxheTogbm9uZTtcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgZmxleDogMCAwIDEwMCU7XG4gICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cbiAgICAgICAgJi5kaXNwbGF5LXJlc3VsdHMge1xuICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIH1cblxuICAgICAgICAmW2RhdGEtcHJldmlld10gPiAjcmVzdWx0cy1jb250YWluZXIge1xuICAgICAgICAgIGZsZXg6IDAgMCBtaW4oMzAlLCA0NTBweCk7XG4gICAgICAgIH1cblxuICAgICAgICBAbWVkaWEgYWxsIGFuZCBub3QgKCRtb2JpbGUpIHtcbiAgICAgICAgICAmW2RhdGEtcHJldmlld10ge1xuICAgICAgICAgICAgJiAucmVzdWx0LWNhcmQgPiBwLnByZXZpZXcge1xuICAgICAgICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmID4gZGl2IHtcbiAgICAgICAgICAgICAgJjpmaXJzdC1jaGlsZCB7XG4gICAgICAgICAgICAgICAgYm9yZGVyLXJpZ2h0OiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgICAgICAgICBib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogdW5zZXQ7XG4gICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6IHVuc2V0O1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgJjpsYXN0LWNoaWxkIHtcbiAgICAgICAgICAgICAgICBib3JkZXItdG9wLWxlZnQtcmFkaXVzOiB1bnNldDtcbiAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tLWxlZnQtcmFkaXVzOiB1bnNldDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgICYgPiBkaXYge1xuICAgICAgICAgIGhlaWdodDogY2FsYyg3NXZoIC0gMTJ2aCk7XG4gICAgICAgICAgYm9yZGVyLXJhZGl1czogNXB4O1xuICAgICAgICB9XG5cbiAgICAgICAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICAgICAgICAmID4gI3ByZXZpZXctY29udGFpbmVyIHtcbiAgICAgICAgICAgIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAmW2RhdGEtcHJldmlld10gPiAjcmVzdWx0cy1jb250YWluZXIge1xuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgICAgICBoZWlnaHQ6IGF1dG87XG4gICAgICAgICAgICBmbGV4OiAwIDAgMTAwJTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAmIC5oaWdobGlnaHQge1xuICAgICAgICAgIGJhY2tncm91bmQ6IGNvbG9yLW1peChpbiBzcmdiLCB2YXIoLS10ZXJ0aWFyeSkgNjAlLCByZ2JhKDI1NSwgMjU1LCAyNTUsIDApKTtcbiAgICAgICAgICBib3JkZXItcmFkaXVzOiA1cHg7XG4gICAgICAgICAgc2Nyb2xsLW1hcmdpbi10b3A6IDJyZW07XG4gICAgICAgIH1cblxuICAgICAgICAmID4gI3ByZXZpZXctY29udGFpbmVyIHtcbiAgICAgICAgICBmbGV4LWdyb3c6IDE7XG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICBmb250LWZhbWlseTogaW5oZXJpdDtcbiAgICAgICAgICBjb2xvcjogdmFyKC0tZGFyayk7XG4gICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNWVtO1xuICAgICAgICAgIGZvbnQtd2VpZ2h0OiAkbm9ybWFsV2VpZ2h0O1xuICAgICAgICAgIG92ZXJmbG93LXk6IGF1dG87XG4gICAgICAgICAgcGFkZGluZzogMCAycmVtO1xuXG4gICAgICAgICAgJiAucHJldmlldy1pbm5lciB7XG4gICAgICAgICAgICBtYXJnaW46IDAgYXV0bztcbiAgICAgICAgICAgIHdpZHRoOiBtaW4oJHBhZ2VXaWR0aCwgMTAwJSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYVtyb2xlPVwiYW5jaG9yXCJdIHtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgICYgPiAjcmVzdWx0cy1jb250YWluZXIge1xuICAgICAgICAgIG92ZXJmbG93LXk6IGF1dG87XG5cbiAgICAgICAgICAmIC5yZXN1bHQtY2FyZCB7XG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgcGFkZGluZzogMWVtO1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZCAwLjJzIGVhc2U7XG4gICAgICAgICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG4gICAgICAgICAgICAvLyBub3JtYWxpemUgY2FyZCBwcm9wc1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IGluaGVyaXQ7XG4gICAgICAgICAgICBmb250LXNpemU6IDEwMCU7XG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMS4xNTtcbiAgICAgICAgICAgIG1hcmdpbjogMDtcbiAgICAgICAgICAgIHRleHQtdHJhbnNmb3JtOiBub25lO1xuICAgICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDtcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XG4gICAgICAgICAgICBmb250LXdlaWdodDogaW5oZXJpdDtcblxuICAgICAgICAgICAgJjpob3ZlcixcbiAgICAgICAgICAgICY6Zm9jdXMsXG4gICAgICAgICAgICAmLmZvY3VzIHtcbiAgICAgICAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJiA+IGgzIHtcbiAgICAgICAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmID4gdWwudGFncyB7XG4gICAgICAgICAgICAgIG1hcmdpbi10b3A6IDAuNDVyZW07XG4gICAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICYgPiB1bCA+IGxpID4gcCB7XG4gICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDhweDtcbiAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0taGlnaGxpZ2h0KTtcbiAgICAgICAgICAgICAgcGFkZGluZzogMC4ycmVtIDAuNHJlbTtcbiAgICAgICAgICAgICAgbWFyZ2luOiAwIDAuMXJlbTtcbiAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNHJlbTtcbiAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6ICRib2xkV2VpZ2h0O1xuICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tc2Vjb25kYXJ5KTtcblxuICAgICAgICAgICAgICAmLm1hdGNoLXRhZyB7XG4gICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLXRlcnRpYXJ5KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmID4gcCB7XG4gICAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0= */`;var search_inline_default='var Kt=Object.create;var Ft=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Vt=Object.getPrototypeOf,Zt=Object.prototype.hasOwnProperty;var ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var bt=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Jt(e))!Zt.call(t,r)&&r!==u&&Ft(t,r,{get:()=>e[r],enumerable:!(n=Gt(e,r))||n.enumerable});return t};var Qt=(t,e,u)=>(u=t!=null?Kt(Vt(t)):{},bt(e||!t||!t.__esModule?Ft(u,"default",{value:t,enumerable:!0}):u,t));var ft=ht(()=>{});var It=ht((Ue,Ot)=>{"use strict";Ot.exports=ge;function q(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function ge(t){if(t=t||{},t.circles)return de(t);let e=new Map;if(e.set(Date,s=>new Date(s)),e.set(Map,(s,l)=>new Map(n(Array.from(s),l))),e.set(Set,(s,l)=>new Set(n(Array.from(s),l))),t.constructorHandlers)for(let s of t.constructorHandlers)e.set(s[0],s[1]);let u=null;return t.proto?i:r;function n(s,l){let o=Object.keys(s),D=new Array(o.length);for(let h=0;h<o.length;h++){let c=o[h],f=s[c];typeof f!="object"||f===null?D[c]=f:f.constructor!==Object&&(u=e.get(f.constructor))?D[c]=u(f,l):ArrayBuffer.isView(f)?D[c]=q(f):D[c]=l(f)}return D}function r(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return n(s,r);if(s.constructor!==Object&&(u=e.get(s.constructor)))return u(s,r);let l={};for(let o in s){if(Object.hasOwnProperty.call(s,o)===!1)continue;let D=s[o];typeof D!="object"||D===null?l[o]=D:D.constructor!==Object&&(u=e.get(D.constructor))?l[o]=u(D,r):ArrayBuffer.isView(D)?l[o]=q(D):l[o]=r(D)}return l}function i(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return n(s,i);if(s.constructor!==Object&&(u=e.get(s.constructor)))return u(s,i);let l={};for(let o in s){let D=s[o];typeof D!="object"||D===null?l[o]=D:D.constructor!==Object&&(u=e.get(D.constructor))?l[o]=u(D,i):ArrayBuffer.isView(D)?l[o]=q(D):l[o]=i(D)}return l}}function de(t){let e=[],u=[],n=new Map;if(n.set(Date,o=>new Date(o)),n.set(Map,(o,D)=>new Map(i(Array.from(o),D))),n.set(Set,(o,D)=>new Set(i(Array.from(o),D))),t.constructorHandlers)for(let o of t.constructorHandlers)n.set(o[0],o[1]);let r=null;return t.proto?l:s;function i(o,D){let h=Object.keys(o),c=new Array(h.length);for(let f=0;f<h.length;f++){let a=h[f],F=o[a];if(typeof F!="object"||F===null)c[a]=F;else if(F.constructor!==Object&&(r=n.get(F.constructor)))c[a]=r(F,D);else if(ArrayBuffer.isView(F))c[a]=q(F);else{let g=e.indexOf(F);g!==-1?c[a]=u[g]:c[a]=D(F)}}return c}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,s);if(o.constructor!==Object&&(r=n.get(o.constructor)))return r(o,s);let D={};e.push(o),u.push(D);for(let h in o){if(Object.hasOwnProperty.call(o,h)===!1)continue;let c=o[h];if(typeof c!="object"||c===null)D[h]=c;else if(c.constructor!==Object&&(r=n.get(c.constructor)))D[h]=r(c,s);else if(ArrayBuffer.isView(c))D[h]=q(c);else{let f=e.indexOf(c);f!==-1?D[h]=u[f]:D[h]=s(c)}}return e.pop(),u.pop(),D}function l(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,l);if(o.constructor!==Object&&(r=n.get(o.constructor)))return r(o,l);let D={};e.push(o),u.push(D);for(let h in o){let c=o[h];if(typeof c!="object"||c===null)D[h]=c;else if(c.constructor!==Object&&(r=n.get(c.constructor)))D[h]=r(c,l);else if(ArrayBuffer.isView(c))D[h]=q(c);else{let f=e.indexOf(c);f!==-1?D[h]=u[f]:D[h]=l(c)}}return e.pop(),u.pop(),D}}});var B;function Y(t){return typeof t<"u"?t:!0}function at(t){let e=Array(t);for(let u=0;u<t;u++)e[u]=p();return e}function p(){return Object.create(null)}function Xt(t,e){return e.length-t.length}function x(t){return typeof t=="string"}function H(t){return typeof t=="object"}function ot(t){return typeof t=="function"}function pt(t,e){var u=Yt;if(t&&(e&&(t=tt(t,e)),this.H&&(t=tt(t,this.H)),this.J&&1<t.length&&(t=tt(t,this.J)),u||u==="")){if(e=t.split(u),this.filter){t=this.filter,u=e.length;let n=[];for(let r=0,i=0;r<u;r++){let s=e[r];s&&!t[s]&&(n[i++]=s)}t=n}else t=e;return t}return t}var Yt=/[\\p{Z}\\p{S}\\p{P}\\p{C}]+/u,te=/[\\u0300-\\u036f]/g;function Et(t,e){let u=Object.keys(t),n=u.length,r=[],i="",s=0;for(let l=0,o,D;l<n;l++)o=u[l],(D=t[o])?(r[s++]=y(e?"(?!\\\\b)"+o+"(\\\\b|_)":o),r[s++]=D):i+=(i?"|":"")+o;return i&&(r[s++]=y(e?"(?!\\\\b)("+i+")(\\\\b|_)":"("+i+")"),r[s]=""),r}function tt(t,e){for(let u=0,n=e.length;u<n&&(t=t.replace(e[u],e[u+1]),t);u+=2);return t}function y(t){return new RegExp(t,"g")}function mt(t){let e="",u="";for(let n=0,r=t.length,i;n<r;n++)(i=t[n])!==u&&(e+=u=i);return e}var ee={encode:Bt,F:!1,G:""};function Bt(t){return pt.call(this,(""+t).toLowerCase(),!1)}var yt={},U={};function wt(t){$(t,"add"),$(t,"append"),$(t,"search"),$(t,"update"),$(t,"remove")}function $(t,e){t[e+"Async"]=function(){let u=this,n=arguments;var r=n[n.length-1];let i;return ot(r)&&(i=r,delete n[n.length-1]),r=new Promise(function(s){setTimeout(function(){u.async=!0;let l=u[e].apply(u,n);u.async=!1,s(l)})}),i?(r.then(i),this):r}}function xt(t,e,u,n){let r=t.length,i=[],s,l,o=0;n&&(n=[]);for(let D=r-1;0<=D;D--){let h=t[D],c=h.length,f=p(),a=!s;for(let F=0;F<c;F++){let g=h[F],A=g.length;if(A)for(let k=0,v,w;k<A;k++)if(w=g[k],s){if(s[w]){if(!D){if(u)u--;else if(i[o++]=w,o===e)return i}(D||n)&&(f[w]=1),a=!0}if(n&&(v=(l[w]||0)+1,l[w]=v,v<r)){let R=n[v-2]||(n[v-2]=[]);R[R.length]=w}}else f[w]=1}if(n)s||(l=f);else if(!a)return[];s=f}if(n)for(let D=n.length-1,h,c;0<=D;D--){h=n[D],c=h.length;for(let f=0,a;f<c;f++)if(a=h[f],!s[a]){if(u)u--;else if(i[o++]=a,o===e)return i;s[a]=1}}return i}function ue(t,e){let u=p(),n=p(),r=[];for(let i=0;i<t.length;i++)u[t[i]]=1;for(let i=0,s;i<e.length;i++){s=e[i];for(let l=0,o;l<s.length;l++)o=s[l],u[o]&&!n[o]&&(n[o]=1,r[r.length]=o)}return r}function ut(t){this.l=t!==!0&&t,this.cache=p(),this.h=[]}function vt(t,e,u){H(t)&&(t=t.query);let n=this.cache.get(t);return n||(n=this.search(t,e,u),this.cache.set(t,n)),n}ut.prototype.set=function(t,e){if(!this.cache[t]){var u=this.h.length;for(u===this.l?delete this.cache[this.h[u-1]]:u++,--u;0<u;u--)this.h[u]=this.h[u-1];this.h[0]=t}this.cache[t]=e};ut.prototype.get=function(t){let e=this.cache[t];if(this.l&&e&&(t=this.h.indexOf(t))){let u=this.h[t-1];this.h[t-1]=this.h[t],this.h[t]=u}return e};var ne={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function Lt(t,e,u,n,r,i,s,l){setTimeout(function(){let o=t(u?u+"."+n:n,JSON.stringify(s));o&&o.then?o.then(function(){e.export(t,e,u,r,i+1,l)}):e.export(t,e,u,r,i+1,l)})}function P(t,e){if(!(this instanceof P))return new P(t);var u;if(t){x(t)?t=ne[t]:(u=t.preset)&&(t=Object.assign({},u[u],t)),u=t.charset;var n=t.lang;x(u)&&(u.indexOf(":")===-1&&(u+=":default"),u=U[u]),x(n)&&(n=yt[n])}else t={};let r,i,s=t.context||{};if(this.encode=t.encode||u&&u.encode||Bt,this.register=e||p(),this.D=r=t.resolution||9,this.G=e=u&&u.G||t.tokenize||"strict",this.depth=e==="strict"&&s.depth,this.l=Y(s.bidirectional),this.s=i=Y(t.optimize),this.m=Y(t.fastupdate),this.B=t.minlength||1,this.C=t.boost,this.map=i?at(r):p(),this.A=r=s.resolution||1,this.h=i?at(r):p(),this.F=u&&u.F||t.rtl,this.H=(e=t.matcher||n&&n.H)&&Et(e,!1),this.J=(e=t.stemmer||n&&n.J)&&Et(e,!0),u=e=t.filter||n&&n.filter){u=e,n=p();for(let l=0,o=u.length;l<o;l++)n[u[l]]=1;u=n}this.filter=u,this.cache=(e=t.cache)&&new ut(e)}B=P.prototype;B.append=function(t,e){return this.add(t,e,!0)};B.add=function(t,e,u,n){if(e&&(t||t===0)){if(!n&&!u&&this.register[t])return this.update(t,e);if(e=this.encode(e),n=e.length){let D=p(),h=p(),c=this.depth,f=this.D;for(let a=0;a<n;a++){let F=e[this.F?n-1-a:a];var r=F.length;if(F&&r>=this.B&&(c||!h[F])){var i=Q(f,n,a),s="";switch(this.G){case"full":if(2<r){for(i=0;i<r;i++)for(var l=r;l>i;l--)if(l-i>=this.B){var o=Q(f,n,a,r,i);s=F.substring(i,l),K(this,h,s,o,t,u)}break}case"reverse":if(1<r){for(l=r-1;0<l;l--)s=F[l]+s,s.length>=this.B&&K(this,h,s,Q(f,n,a,r,l),t,u);s=""}case"forward":if(1<r){for(l=0;l<r;l++)s+=F[l],s.length>=this.B&&K(this,h,s,i,t,u);break}default:if(this.C&&(i=Math.min(i/this.C(e,F,a)|0,f-1)),K(this,h,F,i,t,u),c&&1<n&&a<n-1){for(r=p(),s=this.A,i=F,l=Math.min(c+1,n-a),r[i]=1,o=1;o<l;o++)if((F=e[this.F?n-1-a-o:a+o])&&F.length>=this.B&&!r[F]){r[F]=1;let g=this.l&&F>i;K(this,D,g?i:F,Q(s+(n/2>s?0:1),n,a,l-1,o-1),t,u,g?F:i)}}}}}this.m||(this.register[t]=1)}}return this};function Q(t,e,u,n,r){return u&&1<t?e+(n||0)<=t?u+(r||0):(t-1)/(e+(n||0))*(u+(r||0))+1|0:0}function K(t,e,u,n,r,i,s){let l=s?t.h:t.map;(!e[u]||s&&!e[u][s])&&(t.s&&(l=l[n]),s?(e=e[u]||(e[u]=p()),e[s]=1,l=l[s]||(l[s]=p())):e[u]=1,l=l[u]||(l[u]=[]),t.s||(l=l[n]||(l[n]=[])),i&&l.includes(r)||(l[l.length]=r,t.m&&(t=t.register[r]||(t.register[r]=[]),t[t.length]=l)))}B.search=function(t,e,u){u||(!e&&H(t)?(u=t,t=u.query):H(e)&&(u=e));let n=[],r,i,s=0;if(u){t=u.query||t,e=u.limit,s=u.offset||0;var l=u.context;i=u.suggest}if(t&&(t=this.encode(""+t),r=t.length,1<r)){u=p();var o=[];for(let h=0,c=0,f;h<r;h++)if((f=t[h])&&f.length>=this.B&&!u[f])if(this.s||i||this.map[f])o[c++]=f,u[f]=1;else return n;t=o,r=t.length}if(!r)return n;e||(e=100),l=this.depth&&1<r&&l!==!1,u=0;let D;l?(D=t[0],u=1):1<r&&t.sort(Xt);for(let h,c;u<r;u++){if(c=t[u],l?(h=gt(this,n,i,e,s,r===2,c,D),i&&h===!1&&n.length||(D=c)):h=gt(this,n,i,e,s,r===1,c),h)return h;if(i&&u===r-1){if(o=n.length,!o){if(l){l=0,u=-1;continue}return n}if(o===1)return St(n[0],e,s)}}return xt(n,e,s,i)};function gt(t,e,u,n,r,i,s,l){let o=[],D=l?t.h:t.map;if(t.s||(D=dt(D,s,l,t.l)),D){let h=0,c=Math.min(D.length,l?t.A:t.D);for(let f=0,a=0,F,g;f<c&&!((F=D[f])&&(t.s&&(F=dt(F,s,l,t.l)),r&&F&&i&&(g=F.length,g<=r?(r-=g,F=null):(F=F.slice(r),r=0)),F&&(o[h++]=F,i&&(a+=F.length,a>=n))));f++);if(h){if(i)return St(o,n,0);e[e.length]=o;return}}return!u&&o}function St(t,e,u){return t=t.length===1?t[0]:[].concat.apply([],t),u||t.length>e?t.slice(u,u+e):t}function dt(t,e,u,n){return u?(n=n&&e>u,t=(t=t[n?e:u])&&t[n?u:e]):t=t[e],t}B.contain=function(t){return!!this.register[t]};B.update=function(t,e){return this.remove(t).add(t,e)};B.remove=function(t,e){let u=this.register[t];if(u){if(this.m)for(let n=0,r;n<u.length;n++)r=u[n],r.splice(r.indexOf(t),1);else et(this.map,t,this.D,this.s),this.depth&&et(this.h,t,this.A,this.s);if(e||delete this.register[t],this.cache){e=this.cache;for(let n=0,r,i;n<e.h.length;n++)i=e.h[n],r=e.cache[i],r.includes(t)&&(e.h.splice(n--,1),delete e.cache[i])}}return this};function et(t,e,u,n,r){let i=0;if(t.constructor===Array)if(r)e=t.indexOf(e),e!==-1?1<t.length&&(t.splice(e,1),i++):i++;else{r=Math.min(t.length,u);for(let s=0,l;s<r;s++)(l=t[s])&&(i=et(l,e,u,n,r),n||i||delete t[s])}else for(let s in t)(i=et(t[s],e,u,n,r))||delete t[s];return i}B.searchCache=vt;B.export=function(t,e,u,n,r,i){let s=!0;typeof i>"u"&&(s=new Promise(D=>{i=D}));let l,o;switch(r||(r=0)){case 0:if(l="reg",this.m){o=p();for(let D in this.register)o[D]=1}else o=this.register;break;case 1:l="cfg",o={doc:0,opt:this.s?1:0};break;case 2:l="map",o=this.map;break;case 3:l="ctx",o=this.h;break;default:typeof u>"u"&&i&&i();return}return Lt(t,e||this,u,l,n,r,o,i),s};B.import=function(t,e){if(e)switch(x(e)&&(e=JSON.parse(e)),t){case"cfg":this.s=!!e.opt;break;case"reg":this.m=!1,this.register=e;break;case"map":this.map=e;break;case"ctx":this.h=e}};wt(P.prototype);function re(t){t=t.data;var e=self._index;let u=t.args;var n=t.task;switch(n){case"init":n=t.options||{},t=t.factory,e=n.encode,n.cache=!1,e&&e.indexOf("function")===0&&(n.encode=Function("return "+e)()),t?(Function("return "+t)()(self),self._index=new self.FlexSearch.Index(n),delete self.FlexSearch):self._index=new P(n);break;default:t=t.id,e=e[n].apply(e,u),postMessage(n==="search"?{id:t,msg:e}:{id:t})}}var Ct=0;function N(t){if(!(this instanceof N))return new N(t);var e;t?ot(e=t.encode)&&(t.encode=e.toString()):t={},(e=(self||window)._factory)&&(e=e.toString());let u=typeof window>"u"&&self.exports,n=this;this.o=ie(e,u,t.worker),this.h=p(),this.o&&(u?this.o.on("message",function(r){n.h[r.id](r.msg),delete n.h[r.id]}):this.o.onmessage=function(r){r=r.data,n.h[r.id](r.msg),delete n.h[r.id]},this.o.postMessage({task:"init",factory:e,options:t}))}J("add");J("append");J("search");J("update");J("remove");function J(t){N.prototype[t]=N.prototype[t+"Async"]=function(){let e=this,u=[].slice.call(arguments);var n=u[u.length-1];let r;return ot(n)&&(r=n,u.splice(u.length-1,1)),n=new Promise(function(i){setTimeout(function(){e.h[++Ct]=i,e.o.postMessage({task:t,id:Ct,args:u})})}),r?(n.then(r),this):n}}function ie(t,e,u){let n;try{n=e?new(ft()).Worker(__dirname+"/node/node.js"):t?new Worker(URL.createObjectURL(new Blob(["onmessage="+re.toString()],{type:"text/javascript"}))):new Worker(x(u)?u:"worker/worker.js",{type:"module"})}catch{}return n}function G(t){if(!(this instanceof G))return new G(t);var e=t.document||t.doc||t,u;this.K=[],this.h=[],this.A=[],this.register=p(),this.key=(u=e.key||e.id)&&X(u,this.A)||"id",this.m=Y(t.fastupdate),this.C=(u=e.store)&&u!==!0&&[],this.store=u&&p(),this.I=(u=e.tag)&&X(u,this.A),this.l=u&&p(),this.cache=(u=t.cache)&&new ut(u),t.cache=!1,this.o=t.worker,this.async=!1,u=p();let n=e.index||e.field||e;x(n)&&(n=[n]);for(let r=0,i,s;r<n.length;r++)i=n[r],x(i)||(s=i,i=i.field),s=H(s)?Object.assign({},t,s):t,this.o&&(u[i]=new N(s),u[i].o||(this.o=!1)),this.o||(u[i]=new P(s,this.register)),this.K[r]=X(i,this.A),this.h[r]=i;if(this.C)for(t=e.store,x(t)&&(t=[t]),e=0;e<t.length;e++)this.C[e]=X(t[e],this.A);this.index=u}function X(t,e){let u=t.split(":"),n=0;for(let r=0;r<u.length;r++)t=u[r],0<=t.indexOf("[]")&&(t=t.substring(0,t.length-2))&&(e[n]=!0),t&&(u[n++]=t);return n<u.length&&(u.length=n),1<n?u:u[0]}function it(t,e){if(x(e))t=t[e];else for(let u=0;t&&u<e.length;u++)t=t[e[u]];return t}function st(t,e,u,n,r){if(t=t[r],n===u.length-1)e[r]=t;else if(t)if(t.constructor===Array)for(e=e[r]=Array(t.length),r=0;r<t.length;r++)st(t,e,u,n,r);else e=e[r]||(e[r]=p()),r=u[++n],st(t,e,u,n,r)}function lt(t,e,u,n,r,i,s,l){if(t=t[s])if(n===e.length-1){if(t.constructor===Array){if(u[n]){for(e=0;e<t.length;e++)r.add(i,t[e],!0,!0);return}t=t.join(" ")}r.add(i,t,l,!0)}else if(t.constructor===Array)for(s=0;s<t.length;s++)lt(t,e,u,n,r,i,s,l);else s=e[++n],lt(t,e,u,n,r,i,s,l)}B=G.prototype;B.add=function(t,e,u){if(H(t)&&(e=t,t=it(e,this.key)),e&&(t||t===0)){if(!u&&this.register[t])return this.update(t,e);for(let n=0,r,i;n<this.h.length;n++)i=this.h[n],r=this.K[n],x(r)&&(r=[r]),lt(e,r,this.A,0,this.index[i],t,r[0],u);if(this.I){let n=it(e,this.I),r=p();x(n)&&(n=[n]);for(let i=0,s,l;i<n.length;i++)if(s=n[i],!r[s]&&(r[s]=1,l=this.l[s]||(this.l[s]=[]),!u||!l.includes(t))&&(l[l.length]=t,this.m)){let o=this.register[t]||(this.register[t]=[]);o[o.length]=l}}if(this.store&&(!u||!this.store[t])){let n;if(this.C){n=p();for(let r=0,i;r<this.C.length;r++)i=this.C[r],x(i)?n[i]=e[i]:st(e,n,i,0,i[0])}this.store[t]=n||e}}return this};B.append=function(t,e){return this.add(t,e,!0)};B.update=function(t,e){return this.remove(t).add(t,e)};B.remove=function(t){if(H(t)&&(t=it(t,this.key)),this.register[t]){for(var e=0;e<this.h.length&&(this.index[this.h[e]].remove(t,!this.o),!this.m);e++);if(this.I&&!this.m)for(let u in this.l){e=this.l[u];let n=e.indexOf(t);n!==-1&&(1<e.length?e.splice(n,1):delete this.l[u])}this.store&&delete this.store[t],delete this.register[t]}return this};B.search=function(t,e,u,n){u||(!e&&H(t)?(u=t,t=""):H(e)&&(u=e,e=0));let r=[],i=[],s,l,o,D,h,c,f=0;if(u)if(u.constructor===Array)o=u,u=null;else{if(t=u.query||t,o=(s=u.pluck)||u.index||u.field,D=u.tag,l=this.store&&u.enrich,h=u.bool==="and",e=u.limit||e||100,c=u.offset||0,D&&(x(D)&&(D=[D]),!t)){for(let F=0,g;F<D.length;F++)(g=se.call(this,D[F],e,c,l))&&(r[r.length]=g,f++);return f?r:[]}x(o)&&(o=[o])}o||(o=this.h),h=h&&(1<o.length||D&&1<D.length);let a=!n&&(this.o||this.async)&&[];for(let F=0,g,A,k;F<o.length;F++){let v;if(A=o[F],x(A)||(v=A,A=v.field,t=v.query||t,e=v.limit||e,l=v.enrich||l),a)a[F]=this.index[A].searchAsync(t,e,v||u);else{if(n?g=n[F]:g=this.index[A].search(t,e,v||u),k=g&&g.length,D&&k){let w=[],R=0;h&&(w[0]=[g]);for(let _=0,b,W;_<D.length;_++)b=D[_],(k=(W=this.l[b])&&W.length)&&(R++,w[w.length]=h?[W]:W);R&&(g=h?xt(w,e||100,c||0):ue(g,w),k=g.length)}if(k)i[f]=A,r[f++]=g;else if(h)return[]}}if(a){let F=this;return new Promise(function(g){Promise.all(a).then(function(A){g(F.search(t,e,u,A))})})}if(!f)return[];if(s&&(!l||!this.store))return r[0];for(let F=0,g;F<i.length;F++){if(g=r[F],g.length&&l&&(g=kt.call(this,g)),s)return g;r[F]={field:i[F],result:g}}return r};function se(t,e,u,n){let r=this.l[t],i=r&&r.length-u;if(i&&0<i)return(i>e||u)&&(r=r.slice(u,u+e)),n&&(r=kt.call(this,r)),{tag:t,result:r}}function kt(t){let e=Array(t.length);for(let u=0,n;u<t.length;u++)n=t[u],e[u]={id:n,doc:this.store[n]};return e}B.contain=function(t){return!!this.register[t]};B.get=function(t){return this.store[t]};B.set=function(t,e){return this.store[t]=e,this};B.searchCache=vt;B.export=function(t,e,u,n,r,i){let s;if(typeof i>"u"&&(s=new Promise(l=>{i=l})),r||(r=0),n||(n=0),n<this.h.length){let l=this.h[n],o=this.index[l];e=this,setTimeout(function(){o.export(t,e,r?l:"",n,r++,i)||(n++,r=1,e.export(t,e,l,n,r,i))})}else{let l,o;switch(r){case 1:l="tag",o=this.l,u=null;break;case 2:l="store",o=this.store,u=null;break;default:i();return}Lt(t,this,u,l,n,r,o,i)}return s};B.import=function(t,e){if(e)switch(x(e)&&(e=JSON.parse(e)),t){case"tag":this.l=e;break;case"reg":this.m=!1,this.register=e;for(let n=0,r;n<this.h.length;n++)r=this.index[this.h[n]],r.register=e,r.m=!1;break;case"store":this.store=e;break;default:t=t.split(".");let u=t[0];t=t[1],u&&t&&this.index[u].import(t,e)}};wt(G.prototype);var le={encode:Tt,F:!1,G:""},oe=[y("[\\xE0\\xE1\\xE2\\xE3\\xE4\\xE5]"),"a",y("[\\xE8\\xE9\\xEA\\xEB]"),"e",y("[\\xEC\\xED\\xEE\\xEF]"),"i",y("[\\xF2\\xF3\\xF4\\xF5\\xF6\\u0151]"),"o",y("[\\xF9\\xFA\\xFB\\xFC\\u0171]"),"u",y("[\\xFD\\u0177\\xFF]"),"y",y("\\xF1"),"n",y("[\\xE7c]"),"k",y("\\xDF"),"s",y(" & ")," and "];function Tt(t){var e=t=""+t;return e.normalize&&(e=e.normalize("NFD").replace(te,"")),pt.call(this,e.toLowerCase(),!t.normalize&&oe)}var De={encode:Mt,F:!1,G:"strict"},ce=/[^a-z0-9]+/,At={b:"p",v:"f",w:"f",z:"s",x:"s",\\u00DF:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Mt(t){t=Tt.call(this,t).join(" ");let e=[];if(t){let u=t.split(ce),n=u.length;for(let r=0,i,s=0;r<n;r++)if((t=u[r])&&(!this.filter||!this.filter[t])){i=t[0];let l=At[i]||i,o=l;for(let D=1;D<t.length;D++){i=t[D];let h=At[i]||i;h&&h!==o&&(l+=h,o=h)}e[s++]=l}}return e}var Fe={encode:Rt,F:!1,G:""},he=[y("ae"),"a",y("oe"),"o",y("sh"),"s",y("th"),"t",y("ph"),"f",y("pf"),"f",y("(?![aeo])h(?![aeo])"),"",y("(?!^[aeo])h(?!^[aeo])"),""];function Rt(t,e){return t&&(t=Mt.call(this,t).join(" "),2<t.length&&(t=tt(t,he)),e||(1<t.length&&(t=mt(t)),t&&(t=t.split(" ")))),t||[]}var fe={encode:Ee,F:!1,G:""},ae=y("(?!\\\\b)[aeo]");function Ee(t){return t&&(t=Rt.call(this,t,!0),1<t.length&&(t=t.replace(ae,"")),1<t.length&&(t=mt(t)),t&&(t=t.split(" "))),t||[]}U["latin:default"]=ee;U["latin:simple"]=le;U["latin:balance"]=De;U["latin:advanced"]=Fe;U["latin:extra"]=fe;var Ht={Index:P,Document:G,Worker:N,registerCharset:function(t,e){U[t]=e},registerLanguage:function(t,e){yt[t]=e}};function jt(t,e){if(!t)return;function u(r){r.target===this&&(r.preventDefault(),r.stopPropagation(),e())}function n(r){r.key.startsWith("Esc")&&(r.preventDefault(),e())}t?.addEventListener("click",u),window.addCleanup(()=>t?.removeEventListener("click",u)),document.addEventListener("keydown",n),window.addCleanup(()=>document.removeEventListener("keydown",n))}function V(t){for(;t.firstChild;)t.removeChild(t.firstChild)}var Ie=Object.hasOwnProperty;var Ut=Qt(It(),1),Ne=(0,Ut.default)();function Ce(t){let e=Nt(Be(t,"index"),!0);return e.length===0?"/":e}var Pt=(t,e,u)=>{let n=new URL(t.getAttribute(e),u);t.setAttribute(e,n.pathname+n.hash)};function Wt(t,e){t.querySelectorAll(\'[href=""], [href^="./"], [href^="../"]\').forEach(u=>Pt(u,"href",e)),t.querySelectorAll(\'[src=""], [src^="./"], [src^="../"]\').forEach(u=>Pt(u,"src",e))}function Ae(t){let e=t.split("/").filter(u=>u!=="").slice(0,-1).map(u=>"..").join("/");return e.length===0&&(e="."),e}function zt(t,e){return pe(Ae(t),Ce(e))}function pe(...t){if(t.length===0)return"";let e=t.filter(u=>u!==""&&u!=="/").map(u=>Nt(u)).join("/");return t[0].startsWith("/")&&(e="/"+e),t[t.length-1].endsWith("/")&&(e=e+"/"),e}function me(t,e){return t===e||t.endsWith("/"+e)}function Be(t,e){return me(t,e)&&(t=t.slice(0,-e.length)),t}function Nt(t,e){return t.startsWith("/")&&(t=t.substring(1)),!e&&t.endsWith("/")&&(t=t.slice(0,-1)),t}var j="basic",S="",ye=t=>t.toLowerCase().split(/([^a-z]|[^\\x00-\\x7F])/),Z=new Ht.Document({charset:"latin:extra",encode:ye,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),we=new DOMParser,Dt=new Map,nt=30,rt=8,xe=5,_t=t=>{let e=t.split(/\\s+/).filter(n=>n.trim()!==""),u=e.length;if(u>1)for(let n=1;n<u;n++)e.push(e.slice(0,n+1).join(" "));return e.sort((n,r)=>r.length-n.length)};function qt(t,e,u){let n=_t(t),r=e.split(/\\s+/).filter(o=>o!==""),i=0,s=r.length-1;if(u){let o=f=>n.some(a=>f.toLowerCase().startsWith(a.toLowerCase())),D=r.map(o),h=0,c=0;for(let f=0;f<Math.max(r.length-nt,0);f++){let F=D.slice(f,f+nt).reduce((g,A)=>g+(A?1:0),0);F>=h&&(h=F,c=f)}i=Math.max(c-nt,0),s=Math.min(i+2*nt,r.length-1),r=r.slice(i,s)}let l=r.map(o=>{for(let D of n)if(o.toLowerCase().includes(D.toLowerCase())){let h=new RegExp(D.toLowerCase(),"gi");return o.replace(h,\'<span class="highlight">$&</span>\')}return o}).join(" ");return`${i===0?"":"..."}${l}${s===r.length-1?"":"..."}`}function ve(t,e){let u=new DOMParser,n=_t(t),r=u.parseFromString(e.innerHTML,"text/html"),i=l=>{let o=document.createElement("span");return o.className="highlight",o.textContent=l,o},s=(l,o)=>{if(l.nodeType===Node.TEXT_NODE){let D=l.nodeValue??"",h=new RegExp(o.toLowerCase(),"gi"),c=D.match(h);if(!c||c.length===0)return;let f=document.createElement("span"),a=0;for(let F of c){let g=D.indexOf(F,a);f.appendChild(document.createTextNode(D.slice(a,g))),f.appendChild(i(F)),a=g+F.length}f.appendChild(document.createTextNode(D.slice(a))),l.parentNode?.replaceChild(f,l)}else if(l.nodeType===Node.ELEMENT_NODE){if(l.classList.contains("highlight"))return;Array.from(l.childNodes).forEach(D=>s(D,o))}};for(let l of n)s(r.body,l);return r.body}document.addEventListener("nav",async t=>{let e=t.detail.url,u=await fetchData,n=document.getElementById("search-container"),r=n?.closest(".sidebar"),i=document.getElementById("search-button"),s=document.getElementById("search-bar"),l=document.getElementById("search-layout"),o=Object.keys(u),D=E=>{l?.querySelector(`#${E.id}`)===null&&l?.appendChild(E)},h=l?.dataset?.preview==="true",c,f,a=document.createElement("div");a.id="results-container",D(a),h&&(c=document.createElement("div"),c.id="preview-container",D(c));function F(){n?.classList.remove("active"),s&&(s.value=""),r&&(r.style.zIndex=""),a&&V(a),c&&V(c),l&&l.classList.remove("display-results"),j="basic",i?.focus()}function g(E){j=E,r&&(r.style.zIndex="1"),n?.classList.add("active"),s?.focus()}let A=null;async function k(E){if(E.key==="k"&&(E.ctrlKey||E.metaKey)&&!E.shiftKey){E.preventDefault(),n?.classList.contains("active")?F():g("basic");return}else if(E.shiftKey&&(E.ctrlKey||E.metaKey)&&E.key.toLowerCase()==="k"){E.preventDefault(),n?.classList.contains("active")?F():g("tags"),s&&(s.value="#");return}if(A&&A.classList.remove("focus"),!!n?.classList.contains("active")){if(E.key==="Enter")if(a?.contains(document.activeElement)){let d=document.activeElement;if(d.classList.contains("no-match"))return;await z(d),d.click()}else{let d=document.getElementsByClassName("result-card")[0];if(!d||d?.classList.contains("no-match"))return;await z(d),d.click()}else if(E.key==="ArrowUp"||E.shiftKey&&E.key==="Tab"){if(E.preventDefault(),a?.contains(document.activeElement)){let d=A||document.activeElement,C=d?.previousElementSibling;d?.classList.remove("focus"),C?.focus(),C&&(A=C),await z(C)}}else if((E.key==="ArrowDown"||E.key==="Tab")&&(E.preventDefault(),document.activeElement===s||A!==null)){let d=A||document.getElementsByClassName("result-card")[0],C=d?.nextElementSibling;d?.classList.remove("focus"),C?.focus(),C&&(A=C),await z(C)}}}let v=(E,d)=>{let C=o[d];return{id:d,slug:C,title:j==="tags"?u[C].title:qt(E,u[C].title??""),content:qt(E,u[C].content??"",!0),tags:w(E.substring(1),u[C].tags)}};function w(E,d){return!d||j!=="tags"?[]:d.map(C=>C.toLowerCase().includes(E.toLowerCase())?`<li><p class="match-tag">#${C}</p></li>`:`<li><p>#${C}</p></li>`).slice(0,xe)}function R(E){return new URL(zt(e,E),location.toString())}let _=({slug:E,title:d,content:C,tags:M})=>{let T=M.length>0?`<ul class="tags">${M.join("")}</ul>`:"",m=document.createElement("a");m.classList.add("result-card"),m.id=E,m.href=R(E).toString(),m.innerHTML=`<h3>${d}</h3>${T}${h&&window.innerWidth>600?"":`<p>${C}</p>`}`,m.addEventListener("click",L=>{L.altKey||L.ctrlKey||L.metaKey||L.shiftKey||F()});let O=L=>{L.altKey||L.ctrlKey||L.metaKey||L.shiftKey||F()};async function I(L){if(!L.target)return;let $t=L.target;await z($t)}return m.addEventListener("mouseenter",I),window.addCleanup(()=>m.removeEventListener("mouseenter",I)),m.addEventListener("click",O),window.addCleanup(()=>m.removeEventListener("click",O)),m};async function b(E){if(a)if(V(a),E.length===0?a.innerHTML=`<a class="result-card no-match">\n <h3>No results.</h3>\n <p>Try another search term?</p>\n </a>`:a.append(...E.map(_)),E.length===0&&c)V(c);else{let d=a.firstElementChild;d.classList.add("focus"),A=d,await z(d)}}async function W(E){if(Dt.has(E))return Dt.get(E);let d=R(E).toString(),C=await fetch(d).then(M=>M.text()).then(M=>{if(M===void 0)throw new Error(`Could not fetch ${d}`);let T=we.parseFromString(M??"","text/html");return Wt(T,d),[...T.getElementsByClassName("popover-hint")]});return Dt.set(E,C),C}async function z(E){if(!l||!h||!E||!c)return;let d=E.id,C=await W(d).then(T=>T.flatMap(m=>[...ve(S,m).children]));f=document.createElement("div"),f.classList.add("preview-inner"),f.append(...C),c.replaceChildren(f),[...c.querySelectorAll(".highlight")].sort((T,m)=>m.innerHTML.length-T.innerHTML.length)[0]?.scrollIntoView({block:"start"})}async function ct(E){if(!l||!Z)return;S=E.target.value,l.classList.toggle("display-results",S!==""),j=S.startsWith("#")?"tags":"basic";let d;if(j==="tags"){S=S.substring(1).trim();let m=S.indexOf(" ");if(m!=-1){let O=S.substring(0,m),I=S.substring(m+1).trim();d=await Z.searchAsync({query:I,limit:Math.max(rt,1e4),index:["title","content"],tag:O});for(let L of d)L.result=L.result.slice(0,rt);j="basic",S=I}else d=await Z.searchAsync({query:S,limit:rt,index:["tags"]})}else j==="basic"&&(d=await Z.searchAsync({query:S,limit:rt,index:["title","content"]}));let C=m=>{let O=d.filter(I=>I.field===m);return O.length===0?[]:[...O[0].result]},T=[...new Set([...C("title"),...C("content"),...C("tags")])].map(m=>v(S,m));await b(T)}document.addEventListener("keydown",k),window.addCleanup(()=>document.removeEventListener("keydown",k)),i?.addEventListener("click",()=>g("basic")),window.addCleanup(()=>i?.removeEventListener("click",()=>g("basic"))),s?.addEventListener("input",ct),window.addCleanup(()=>s?.removeEventListener("input",ct)),jt(n,F),await Le(u)});async function Le(t){let e=0,u=[];for(let[n,r]of Object.entries(t))u.push(Z.addAsync(e++,{id:e,slug:n,title:r.title,content:r.content,tags:r.tags}));return await Promise.all(u)}\n';import{jsx as jsx26,jsxs as jsxs15}from"preact/jsx-runtime";var defaultOptions17={enablePreview:!0},Search_default=__name(userOpts=>{let Search=__name(({displayClass,cfg})=>{let opts={...defaultOptions17,...userOpts},searchPlaceholder=i18n(cfg.locale).components.search.searchBarPlaceholder;return jsxs15("div",{class:classNames(displayClass,"search"),children:[jsxs15("button",{class:"search-button",id:"search-button",children:[jsx26("p",{children:i18n(cfg.locale).components.search.title}),jsxs15("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19.9 19.7",children:[jsx26("title",{children:"Search"}),jsxs15("g",{class:"search-path",fill:"none",children:[jsx26("path",{"stroke-linecap":"square",d:"M18.5 18.3l-5.4-5.4"}),jsx26("circle",{cx:"8",cy:"8",r:"7"})]})]})]}),jsx26("div",{id:"search-container",children:jsxs15("div",{id:"search-space",children:[jsx26("input",{autocomplete:"off",id:"search-bar",name:"search",type:"text","aria-label":searchPlaceholder,placeholder:searchPlaceholder}),jsx26("div",{id:"search-layout","data-preview":opts.enablePreview})]})})]})},"Search");return Search.afterDOMLoaded=search_inline_default,Search.css=search_default,Search},"default");var footer_default=`footer {
|
|
text-align: left;
|
|
margin-bottom: 4rem;
|
|
opacity: 0.7;
|
|
}
|
|
footer ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: 1rem;
|
|
margin-top: -1rem;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJmb290ZXIuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBIiwic291cmNlc0NvbnRlbnQiOlsiZm9vdGVyIHtcbiAgdGV4dC1hbGlnbjogbGVmdDtcbiAgbWFyZ2luLWJvdHRvbTogNHJlbTtcbiAgb3BhY2l0eTogMC43O1xuXG4gICYgdWwge1xuICAgIGxpc3Qtc3R5bGU6IG5vbmU7XG4gICAgbWFyZ2luOiAwO1xuICAgIHBhZGRpbmc6IDA7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBmbGV4LWRpcmVjdGlvbjogcm93O1xuICAgIGdhcDogMXJlbTtcbiAgICBtYXJnaW4tdG9wOiAtMXJlbTtcbiAgfVxufVxuIl19 */`;var version="4.4.0";import{jsx as jsx27,jsxs as jsxs16}from"preact/jsx-runtime";var Footer_default=__name(opts=>{let Footer=__name(({displayClass,cfg})=>{let year=new Date().getFullYear(),links=opts?.links??[];return jsxs16("footer",{class:`${displayClass??""}`,children:[jsxs16("p",{children:[i18n(cfg.locale).components.footer.createdWith," ",jsxs16("a",{href:"https://quartz.jzhao.xyz/",children:["Quartz v",version]})," \xA9 ",year]}),jsx27("ul",{children:Object.entries(links).map(([text,link])=>jsx27("li",{children:jsx27("a",{href:link,children:text})}))})]})},"Footer");return Footer.css=footer_default,Footer},"default");import{Fragment as Fragment5,jsx as jsx28}from"preact/jsx-runtime";var DesktopOnly_default=__name(component=>{if(component){let Component=component,DesktopOnly=__name(props=>jsx28(Component,{displayClass:"desktop-only",...props}),"DesktopOnly");return DesktopOnly.displayName=component.displayName,DesktopOnly.afterDOMLoaded=component?.afterDOMLoaded,DesktopOnly.beforeDOMLoaded=component?.beforeDOMLoaded,DesktopOnly.css=component?.css,DesktopOnly}else return()=>jsx28(Fragment5,{})},"default");import{Fragment as Fragment6,jsx as jsx29}from"preact/jsx-runtime";var MobileOnly_default=__name(component=>{if(component){let Component=component,MobileOnly=__name(props=>jsx29(Component,{displayClass:"mobile-only",...props}),"MobileOnly");return MobileOnly.displayName=component.displayName,MobileOnly.afterDOMLoaded=component?.afterDOMLoaded,MobileOnly.beforeDOMLoaded=component?.beforeDOMLoaded,MobileOnly.css=component?.css,MobileOnly}else return()=>jsx29(Fragment6,{})},"default");import{jsx as jsx30,jsxs as jsxs17}from"preact/jsx-runtime";var breadcrumbs_default=`.breadcrumb-container {
|
|
margin: 0;
|
|
margin-top: 0.75rem;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.breadcrumb-element {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.breadcrumb-element p {
|
|
margin: 0;
|
|
margin-left: 0.5rem;
|
|
padding: 0;
|
|
line-height: normal;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc3R5bGVzIiwic291cmNlcyI6WyJicmVhZGNydW1icy5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7OztBQUdGO0VBT0U7RUFDQTtFQUNBO0VBQ0E7O0FBVEE7RUFDRTtFQUNBO0VBQ0E7RUFDQSIsInNvdXJjZXNDb250ZW50IjpbIi5icmVhZGNydW1iLWNvbnRhaW5lciB7XG4gIG1hcmdpbjogMDtcbiAgbWFyZ2luLXRvcDogMC43NXJlbTtcbiAgcGFkZGluZzogMDtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgZmxleC13cmFwOiB3cmFwO1xuICBnYXA6IDAuNXJlbTtcbn1cblxuLmJyZWFkY3J1bWItZWxlbWVudCB7XG4gIHAge1xuICAgIG1hcmdpbjogMDtcbiAgICBtYXJnaW4tbGVmdDogMC41cmVtO1xuICAgIHBhZGRpbmc6IDA7XG4gICAgbGluZS1oZWlnaHQ6IG5vcm1hbDtcbiAgfVxuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogcm93O1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbn1cbiJdfQ== */`;import{Fragment as Fragment7,jsx as jsx31,jsxs as jsxs18}from"preact/jsx-runtime";var defaultOptions18={spacerSymbol:"\u276F",rootName:"Home",resolveFrontmatterTitle:!0,hideOnRoot:!0,showCurrentPage:!0};function formatCrumb(displayName,baseSlug,currentSlug){return{displayName:displayName.replaceAll("-"," "),path:resolveRelative(baseSlug,currentSlug)}}__name(formatCrumb,"formatCrumb");var Breadcrumbs_default=__name(opts=>{let options2={...defaultOptions18,...opts},folderIndex,Breadcrumbs=__name(({fileData,allFiles,displayClass})=>{if(options2.hideOnRoot&&fileData.slug==="index")return jsx31(Fragment7,{});let crumbs=[formatCrumb(options2.rootName,fileData.slug,"/")];if(!folderIndex&&options2.resolveFrontmatterTitle){folderIndex=new Map;for(let file of allFiles){let folderParts=file.slug?.split("/");folderParts?.at(-1)==="index"&&folderIndex.set(folderParts.slice(0,-1).join("/"),file)}}let slugParts=fileData.slug?.split("/");if(slugParts){let isTagPath=slugParts[0]==="tags",currentPath="";for(let i=0;i<slugParts.length-1;i++){let curPathSegment=slugParts[i],currentFile=folderIndex?.get(slugParts.slice(0,i+1).join("/"));if(currentFile){let title=currentFile.frontmatter.title;title!=="index"&&(curPathSegment=title)}currentPath=joinSegments(currentPath,slugParts[i]);let includeTrailingSlash=!isTagPath||i<1,crumb=formatCrumb(curPathSegment,fileData.slug,currentPath+(includeTrailingSlash?"/":""));crumbs.push(crumb)}options2.showCurrentPage&&slugParts.at(-1)!=="index"&&crumbs.push({displayName:fileData.frontmatter.title,path:""})}return jsx31("nav",{class:classNames(displayClass,"breadcrumb-container"),"aria-label":"breadcrumbs",children:crumbs.map((crumb,index)=>jsxs18("div",{class:"breadcrumb-element",children:[jsx31("a",{href:crumb.path,children:crumb.displayName}),index!==crumbs.length-1&&jsx31("p",{children:` ${options2.spacerSymbol} `})]}))})},"Breadcrumbs");return Breadcrumbs.css=breadcrumbs_default,Breadcrumbs},"default");import{Fragment as Fragment8,jsx as jsx32}from"preact/jsx-runtime";var sharedPageComponents={head:Head_default(),header:[],afterBody:[],footer:Footer_default({links:{GitHub:"https://github.com/jackyzha0/quartz","Discord Community":"https://discord.gg/cRFFHYye7t"}})},defaultContentPageLayout={beforeBody:[Breadcrumbs_default(),ArticleTitle_default(),ContentMeta_default(),TagList_default()],left:[PageTitle_default(),MobileOnly_default(Spacer_default()),Search_default(),Darkmode_default(),Explorer_default()],right:[Graph_default(),DesktopOnly_default(TableOfContents_default()),Backlinks_default()]},defaultListPageLayout={beforeBody:[Breadcrumbs_default(),ArticleTitle_default(),ContentMeta_default()],left:[PageTitle_default(),MobileOnly_default(Spacer_default()),Search_default(),Darkmode_default(),Explorer_default()],right:[]};import chalk4 from"chalk";import path7 from"path";import fs3 from"fs";var write=__name(async({ctx,slug,ext,content})=>{let pathToPage=joinSegments(ctx.argv.output,slug+ext),dir=path7.dirname(pathToPage);return await fs3.promises.mkdir(dir,{recursive:!0}),await fs3.promises.writeFile(pathToPage,content),pathToPage},"write");var DepGraph=class{static{__name(this,"DepGraph")}_graph=new Map;constructor(){this._graph=new Map}export(){return{nodes:this.nodes,edges:this.edges}}toString(){return JSON.stringify(this.export(),null,2)}get nodes(){return Array.from(this._graph.keys())}get edges(){let edges=[];return this.forEachEdge(edge=>edges.push(edge)),edges}hasNode(node){return this._graph.has(node)}addNode(node){this._graph.has(node)||this._graph.set(node,{incoming:new Set,outgoing:new Set})}removeNode(node){if(this._graph.has(node)){for(let target of this._graph.get(node).outgoing)this.removeEdge(node,target);for(let source of this._graph.get(node).incoming)this.removeEdge(source,node);this._graph.delete(node)}}forEachNode(callback){for(let node of this._graph.keys())callback(node)}hasEdge(from,to){return!!this._graph.get(from)?.outgoing.has(to)}addEdge(from,to){this.addNode(from),this.addNode(to),this._graph.get(from).outgoing.add(to),this._graph.get(to).incoming.add(from)}removeEdge(from,to){this._graph.has(from)&&this._graph.has(to)&&(this._graph.get(from).outgoing.delete(to),this._graph.get(to).incoming.delete(from))}outDegree(node){return this.hasNode(node)?this._graph.get(node).outgoing.size:-1}inDegree(node){return this.hasNode(node)?this._graph.get(node).incoming.size:-1}forEachOutNeighbor(node,callback){this._graph.get(node)?.outgoing.forEach(callback)}forEachInNeighbor(node,callback){this._graph.get(node)?.incoming.forEach(callback)}forEachEdge(callback){for(let[source,{outgoing}]of this._graph.entries())for(let target of outgoing)callback([source,target])}mergeGraph(other){other.forEachEdge(([source,target])=>{this.addNode(source),this.addNode(target),this.addEdge(source,target)})}updateIncomingEdgesForNode(other,node){this.addNode(node),other.forEachInNeighbor(node,neighbor=>{this.addEdge(neighbor,node)}),this.forEachEdge(([source,target])=>{target===node&&!other.hasEdge(source,target)&&this.removeEdge(source,target)})}removeOrphanNodes(){let orphanNodes=new Set;return this.forEachNode(node=>{this.inDegree(node)===0&&this.outDegree(node)===0&&orphanNodes.add(node)}),orphanNodes.forEach(node=>{this.removeNode(node)}),orphanNodes}getLeafNodes(node){let stack=[node],visited=new Set,leafNodes=new Set;for(;stack.length>0;){let node2=stack.pop();visited.has(node2)||(visited.add(node2),this.outDegree(node2)===0&&leafNodes.add(node2),this.forEachOutNeighbor(node2,neighbor=>{visited.has(neighbor)||stack.push(neighbor)}))}return leafNodes}getLeafNodeAncestors(node){let leafNodes=this.getLeafNodes(node),visited=new Set,upstreamNodes=new Set;return leafNodes.forEach(leafNode=>{let stack=[leafNode];for(;stack.length>0;){let node2=stack.pop();visited.has(node2)||(visited.add(node2),this.outDegree(node2)!==0&&upstreamNodes.add(node2),this.forEachInNeighbor(node2,parentNode=>{visited.has(parentNode)||stack.push(parentNode)}))}}),upstreamNodes}};var parseDependencies=__name((argv,hast,file)=>{let dependencies=[];return visit7(hast,"element",elem=>{let ref=null;if(["script","img","audio","video","source","iframe"].includes(elem.tagName)&&elem?.properties?.src?ref=elem.properties.src.toString():["a","link"].includes(elem.tagName)&&elem?.properties?.href&&(ref=elem.properties.href.toString()),ref===null||!isRelativeURL(ref))return;let fp=path8.join(file.data.filePath,path8.relative(argv.directory,ref)).replace(/\\/g,"/");fp.split("/").pop()?.includes(".")||(fp+=".md"),dependencies.push(fp)}),dependencies},"parseDependencies"),ContentPage=__name(userOpts=>{let opts={...sharedPageComponents,...defaultContentPageLayout,pageBody:Content_default(),...userOpts},{head:Head,header,beforeBody,pageBody,afterBody,left,right,footer:Footer}=opts,Header2=Header_default(),Body2=Body_default();return{name:"ContentPage",getQuartzComponents(){return[Head,Header2,Body2,...header,...beforeBody,pageBody,...afterBody,...left,...right,Footer]},async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph;for(let[tree,file]of content){let sourcePath=file.data.filePath,slug=file.data.slug;graph.addEdge(sourcePath,joinSegments(ctx.argv.output,slug+".html")),parseDependencies(ctx.argv,tree,file).forEach(dep=>{graph.addEdge(dep,sourcePath)})}return graph},async emit(ctx,content,resources){let cfg=ctx.cfg.configuration,fps=[],allFiles=content.map(c=>c[1].data),containsIndex=!1;for(let[tree,file]of content){let slug=file.data.slug;slug==="index"&&(containsIndex=!0);let externalResources=pageResources(pathToRoot(slug),file.data,resources),componentData={ctx,fileData:file.data,externalResources,cfg,children:[],tree,allFiles},content2=renderPage(cfg,slug,componentData,opts,externalResources),fp=await write({ctx,content:content2,slug,ext:".html"});fps.push(fp)}return!containsIndex&&!ctx.argv.fastRebuild&&console.log(chalk4.yellow(`
|
|
Warning: you seem to be missing an \`index.md\` home page file at the root of your \`${ctx.argv.directory}\` folder. This may cause errors when deploying.`)),fps}}},"ContentPage");import{VFile}from"vfile";function defaultProcessedContent(vfileData){let root={type:"root",children:[]},vfile=new VFile("");return vfile.data=vfileData,[root,vfile]}__name(defaultProcessedContent,"defaultProcessedContent");var TagPage=__name(userOpts=>{let opts={...sharedPageComponents,...defaultListPageLayout,pageBody:TagContent_default({sort:userOpts?.sort}),...userOpts},{head:Head,header,beforeBody,pageBody,afterBody,left,right,footer:Footer}=opts,Header2=Header_default(),Body2=Body_default();return{name:"TagPage",getQuartzComponents(){return[Head,Header2,Body2,...header,...beforeBody,pageBody,...afterBody,...left,...right,Footer]},async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph;for(let[_tree,file]of content){let sourcePath=file.data.filePath,tags=(file.data.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes);tags.length>0&&tags.push("index");for(let tag of tags)graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"tags",tag+".html"))}return graph},async emit(ctx,content,resources){let fps=[],allFiles=content.map(c=>c[1].data),cfg=ctx.cfg.configuration,tags=new Set(allFiles.flatMap(data=>data.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes));tags.add("index");let tagDescriptions=Object.fromEntries([...tags].map(tag=>{let title=tag==="index"?i18n(cfg.locale).pages.tagContent.tagIndex:`${i18n(cfg.locale).pages.tagContent.tag}: ${tag}`;return[tag,defaultProcessedContent({slug:joinSegments("tags",tag),frontmatter:{title,tags:[]}})]}));for(let[tree,file]of content){let slug=file.data.slug;if(slug.startsWith("tags/")){let tag=slug.slice(5);tags.has(tag)&&(tagDescriptions[tag]=[tree,file],file.data.frontmatter?.title===tag&&(file.data.frontmatter.title=`${i18n(cfg.locale).pages.tagContent.tag}: ${tag}`))}}for(let tag of tags){let slug=joinSegments("tags",tag),[tree,file]=tagDescriptions[tag],externalResources=pageResources(pathToRoot(slug),file.data,resources),componentData={ctx,fileData:file.data,externalResources,cfg,children:[],tree,allFiles},content2=renderPage(cfg,slug,componentData,opts,externalResources),fp=await write({ctx,content:content2,slug:file.data.slug,ext:".html"});fps.push(fp)}return fps}}},"TagPage");import path9 from"path";var FolderPage=__name(userOpts=>{let opts={...sharedPageComponents,...defaultListPageLayout,pageBody:FolderContent_default({sort:userOpts?.sort}),...userOpts},{head:Head,header,beforeBody,pageBody,afterBody,left,right,footer:Footer}=opts,Header2=Header_default(),Body2=Body_default();return{name:"FolderPage",getQuartzComponents(){return[Head,Header2,Body2,...header,...beforeBody,pageBody,...afterBody,...left,...right,Footer]},async getDependencyGraph(_ctx,content,_resources){let graph=new DepGraph;return content.map(([_tree,vfile])=>{let slug=vfile.data.slug,folderName=path9.dirname(slug??"");slug&&folderName!=="."&&folderName!=="tags"&&graph.addEdge(vfile.data.filePath,joinSegments(folderName,"index.html"))}),graph},async emit(ctx,content,resources){let fps=[],allFiles=content.map(c=>c[1].data),cfg=ctx.cfg.configuration,folders=new Set(allFiles.flatMap(data=>data.slug?_getFolders(data.slug).filter(folderName=>folderName!=="."&&folderName!=="tags"):[])),folderDescriptions=Object.fromEntries([...folders].map(folder=>[folder,defaultProcessedContent({slug:joinSegments(folder,"index"),frontmatter:{title:`${i18n(cfg.locale).pages.folderContent.folder}: ${folder}`,tags:[]}})]));for(let[tree,file]of content){let slug=stripSlashes(simplifySlug(file.data.slug));folders.has(slug)&&(folderDescriptions[slug]=[tree,file])}for(let folder of folders){let slug=joinSegments(folder,"index"),[tree,file]=folderDescriptions[folder],externalResources=pageResources(pathToRoot(slug),file.data,resources),componentData={ctx,fileData:file.data,externalResources,cfg,children:[],tree,allFiles},content2=renderPage(cfg,slug,componentData,opts,externalResources),fp=await write({ctx,content:content2,slug,ext:".html"});fps.push(fp)}return fps}}},"FolderPage");function _getFolders(slug){var folderName=path9.dirname(slug??"");let parentFolderNames=[folderName];for(;folderName!==".";)folderName=path9.dirname(folderName??""),parentFolderNames.push(folderName);return parentFolderNames}__name(_getFolders,"_getFolders");import{toHtml as toHtml2}from"hast-util-to-html";var defaultOptions19={enableSiteMap:!0,enableRSS:!0,rssLimit:10,rssFullHtml:!1,includeEmptyFiles:!0};function generateSiteMap(cfg,idx){let base=cfg.baseUrl??"",createURLEntry=__name((slug,content)=>`<url>
|
|
<loc>https://${joinSegments(base,encodeURI(slug))}</loc>
|
|
${content.date&&`<lastmod>${content.date.toISOString()}</lastmod>`}
|
|
</url>`,"createURLEntry");return`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">${Array.from(idx).map(([slug,content])=>createURLEntry(simplifySlug(slug),content)).join("")}</urlset>`}__name(generateSiteMap,"generateSiteMap");function generateRSSFeed(cfg,idx,limit){let base=cfg.baseUrl??"",createURLEntry=__name((slug,content)=>`<item>
|
|
<title>${escapeHTML(content.title)}</title>
|
|
<link>https://${joinSegments(base,encodeURI(slug))}</link>
|
|
<guid>https://${joinSegments(base,encodeURI(slug))}</guid>
|
|
<description>${content.richContent??content.description}</description>
|
|
<pubDate>${content.date?.toUTCString()}</pubDate>
|
|
</item>`,"createURLEntry"),items=Array.from(idx).sort(([_,f1],[__,f2])=>f1.date&&f2.date?f2.date.getTime()-f1.date.getTime():f1.date&&!f2.date?-1:!f1.date&&f2.date?1:f1.title.localeCompare(f2.title)).map(([slug,content])=>createURLEntry(simplifySlug(slug),content)).slice(0,limit??idx.size).join("");return`<?xml version="1.0" encoding="UTF-8" ?>
|
|
<rss version="2.0">
|
|
<channel>
|
|
<title>${escapeHTML(cfg.pageTitle)}</title>
|
|
<link>https://${base}</link>
|
|
<description>${limit?i18n(cfg.locale).pages.rss.lastFewNotes({count:limit}):i18n(cfg.locale).pages.rss.recentNotes} on ${escapeHTML(cfg.pageTitle)}</description>
|
|
<generator>Quartz -- quartz.jzhao.xyz</generator>
|
|
${items}
|
|
</channel>
|
|
</rss>`}__name(generateRSSFeed,"generateRSSFeed");var ContentIndex=__name(opts=>(opts={...defaultOptions19,...opts},{name:"ContentIndex",async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph;for(let[_tree,file]of content){let sourcePath=file.data.filePath;graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"static/contentIndex.json")),opts?.enableSiteMap&&graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"sitemap.xml")),opts?.enableRSS&&graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"index.xml"))}return graph},async emit(ctx,content,_resources){let cfg=ctx.cfg.configuration,emitted=[],linkIndex=new Map;for(let[tree,file]of content){let slug=file.data.slug,date=getDate(ctx.cfg.configuration,file.data)??new Date;(opts?.includeEmptyFiles||file.data.text&&file.data.text!=="")&&linkIndex.set(slug,{title:file.data.frontmatter?.title,links:file.data.links??[],tags:file.data.frontmatter?.tags??[],content:file.data.text??"",richContent:opts?.rssFullHtml?escapeHTML(toHtml2(tree,{allowDangerousHtml:!0})):void 0,date,description:file.data.description??""})}opts?.enableSiteMap&&emitted.push(await write({ctx,content:generateSiteMap(cfg,linkIndex),slug:"sitemap",ext:".xml"})),opts?.enableRSS&&emitted.push(await write({ctx,content:generateRSSFeed(cfg,linkIndex,opts.rssLimit),slug:"index",ext:".xml"}));let fp=joinSegments("static","contentIndex"),simplifiedIndex=Object.fromEntries(Array.from(linkIndex).map(([slug,content2])=>(delete content2.description,delete content2.date,[slug,content2])));return emitted.push(await write({ctx,content:JSON.stringify(simplifiedIndex),slug:fp,ext:".json"})),emitted},getQuartzComponents:__name(()=>[],"getQuartzComponents")}),"ContentIndex");var AliasRedirects=__name(()=>({name:"AliasRedirects",getQuartzComponents(){return[]},async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph,{argv}=ctx;for(let[_tree,file]of content)for(let slug of getAliasSlugs(file.data.frontmatter?.aliases??[],argv,file))graph.addEdge(file.data.filePath,joinSegments(argv.output,slug+".html"));return graph},async emit(ctx,content,_resources){let{argv}=ctx,fps=[];for(let[_tree,file]of content){let ogSlug=simplifySlug(file.data.slug);for(let slug of file.data.aliases??[]){let redirUrl=resolveRelative(slug,file.data.slug),fp=await write({ctx,content:`
|
|
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
<head>
|
|
<title>${ogSlug}</title>
|
|
<link rel="canonical" href="${redirUrl}">
|
|
<meta name="robots" content="noindex">
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="refresh" content="0; url=${redirUrl}">
|
|
</head>
|
|
</html>
|
|
`,slug,ext:".html"});fps.push(fp)}}return fps}}),"AliasRedirects");import path11 from"path";import fs4 from"fs";import path10 from"path";import{globby}from"globby";function toPosixPath(fp){return fp.split(path10.sep).join("/")}__name(toPosixPath,"toPosixPath");async function glob(pattern,cwd,ignorePatterns){return(await globby(pattern,{cwd,ignore:ignorePatterns,gitignore:!0})).map(toPosixPath)}__name(glob,"glob");var filesToCopy=__name(async(argv,cfg)=>await glob("**",argv.directory,["**/*.md",...cfg.configuration.ignorePatterns]),"filesToCopy"),Assets=__name(()=>({name:"Assets",getQuartzComponents(){return[]},async getDependencyGraph(ctx,_content,_resources){let{argv,cfg}=ctx,graph=new DepGraph,fps=await filesToCopy(argv,cfg);for(let fp of fps){let ext=path11.extname(fp),src=joinSegments(argv.directory,fp),name=slugifyFilePath(fp,!0)+ext,dest=joinSegments(argv.output,name);graph.addEdge(src,dest)}return graph},async emit({argv,cfg},_content,_resources){let assetsPath=argv.output,fps=await filesToCopy(argv,cfg),res=[];for(let fp of fps){let ext=path11.extname(fp),src=joinSegments(argv.directory,fp),name=slugifyFilePath(fp,!0)+ext,dest=joinSegments(assetsPath,name),dir=path11.dirname(dest);await fs4.promises.mkdir(dir,{recursive:!0}),await fs4.promises.copyFile(src,dest),res.push(dest)}return res}}),"Assets");import fs5 from"fs";var Static=__name(()=>({name:"Static",getQuartzComponents(){return[]},async getDependencyGraph({argv,cfg},_content,_resources){let graph=new DepGraph,staticPath=joinSegments(QUARTZ,"static"),fps=await glob("**",staticPath,cfg.configuration.ignorePatterns);for(let fp of fps)graph.addEdge(joinSegments("static",fp),joinSegments(argv.output,"static",fp));return graph},async emit({argv,cfg},_content,_resources){let staticPath=joinSegments(QUARTZ,"static"),fps=await glob("**",staticPath,cfg.configuration.ignorePatterns);return await fs5.promises.cp(staticPath,joinSegments(argv.output,"static"),{recursive:!0,dereference:!0}),fps.map(fp=>joinSegments(argv.output,"static",fp))}}),"Static");var spa_inline_default='var $=Object.create;var R=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var q=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports);var z=(u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let F of _(e))!V.call(u,F)&&F!==t&&R(u,F,{get:()=>e[F],enumerable:!(D=W(e,F))||D.enumerable});return u};var K=(u,e,t)=>(t=u!=null?$(I(u)):{},z(e||!u||!u.__esModule?R(t,"default",{value:u,enumerable:!0}):t,u));var k=q((Bu,j)=>{"use strict";j.exports=uu;function f(u){return u instanceof Buffer?Buffer.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}function uu(u){if(u=u||{},u.circles)return eu(u);let e=new Map;if(e.set(Date,n=>new Date(n)),e.set(Map,(n,i)=>new Map(D(Array.from(n),i))),e.set(Set,(n,i)=>new Set(D(Array.from(n),i))),u.constructorHandlers)for(let n of u.constructorHandlers)e.set(n[0],n[1]);let t=null;return u.proto?l:F;function D(n,i){let r=Object.keys(n),o=new Array(r.length);for(let c=0;c<r.length;c++){let s=r[c],a=n[s];typeof a!="object"||a===null?o[s]=a:a.constructor!==Object&&(t=e.get(a.constructor))?o[s]=t(a,i):ArrayBuffer.isView(a)?o[s]=f(a):o[s]=i(a)}return o}function F(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return D(n,F);if(n.constructor!==Object&&(t=e.get(n.constructor)))return t(n,F);let i={};for(let r in n){if(Object.hasOwnProperty.call(n,r)===!1)continue;let o=n[r];typeof o!="object"||o===null?i[r]=o:o.constructor!==Object&&(t=e.get(o.constructor))?i[r]=t(o,F):ArrayBuffer.isView(o)?i[r]=f(o):i[r]=F(o)}return i}function l(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return D(n,l);if(n.constructor!==Object&&(t=e.get(n.constructor)))return t(n,l);let i={};for(let r in n){let o=n[r];typeof o!="object"||o===null?i[r]=o:o.constructor!==Object&&(t=e.get(o.constructor))?i[r]=t(o,l):ArrayBuffer.isView(o)?i[r]=f(o):i[r]=l(o)}return i}}function eu(u){let e=[],t=[],D=new Map;if(D.set(Date,r=>new Date(r)),D.set(Map,(r,o)=>new Map(l(Array.from(r),o))),D.set(Set,(r,o)=>new Set(l(Array.from(r),o))),u.constructorHandlers)for(let r of u.constructorHandlers)D.set(r[0],r[1]);let F=null;return u.proto?i:n;function l(r,o){let c=Object.keys(r),s=new Array(c.length);for(let a=0;a<c.length;a++){let A=c[a],E=r[A];if(typeof E!="object"||E===null)s[A]=E;else if(E.constructor!==Object&&(F=D.get(E.constructor)))s[A]=F(E,o);else if(ArrayBuffer.isView(E))s[A]=f(E);else{let S=e.indexOf(E);S!==-1?s[A]=t[S]:s[A]=o(E)}}return s}function n(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return l(r,n);if(r.constructor!==Object&&(F=D.get(r.constructor)))return F(r,n);let o={};e.push(r),t.push(o);for(let c in r){if(Object.hasOwnProperty.call(r,c)===!1)continue;let s=r[c];if(typeof s!="object"||s===null)o[c]=s;else if(s.constructor!==Object&&(F=D.get(s.constructor)))o[c]=F(s,n);else if(ArrayBuffer.isView(s))o[c]=f(s);else{let a=e.indexOf(s);a!==-1?o[c]=t[a]:o[c]=n(s)}}return e.pop(),t.pop(),o}function i(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return l(r,i);if(r.constructor!==Object&&(F=D.get(r.constructor)))return F(r,i);let o={};e.push(r),t.push(o);for(let c in r){let s=r[c];if(typeof s!="object"||s===null)o[c]=s;else if(s.constructor!==Object&&(F=D.get(s.constructor)))o[c]=F(s,i);else if(ArrayBuffer.isView(s))o[c]=f(s);else{let a=e.indexOf(s);a!==-1?o[c]=t[a]:o[c]=i(s)}}return e.pop(),t.pop(),o}}});var m=u=>(e,t)=>e[`node${u}`]===t[`node${u}`],Z=m("Name"),Q=m("Type"),Y=m("Value");function L(u,e){if(u.attributes.length===0&&e.attributes.length===0)return[];let t=[],D=new Map,F=new Map;for(let l of u.attributes)D.set(l.name,l.value);for(let l of e.attributes){let n=D.get(l.name);l.value===n?D.delete(l.name):(typeof n<"u"&&D.delete(l.name),F.set(l.name,l.value))}for(let l of D.keys())t.push({type:5,name:l});for(let[l,n]of F.entries())t.push({type:4,name:l,value:n});return t}function g(u,e=!0){let t=`${u.localName}`;for(let{name:D,value:F}of u.attributes)e&&D.startsWith("data-")||(t+=`[${D}=${F}]`);return t+=u.innerHTML,t}function h(u){switch(u.tagName){case"BASE":case"TITLE":return u.localName;case"META":{if(u.hasAttribute("name"))return`meta[name="${u.getAttribute("name")}"]`;if(u.hasAttribute("property"))return`meta[name="${u.getAttribute("property")}"]`;break}case"LINK":{if(u.hasAttribute("rel")&&u.hasAttribute("href"))return`link[rel="${u.getAttribute("rel")}"][href="${u.getAttribute("href")}"]`;if(u.hasAttribute("href"))return`link[href="${u.getAttribute("href")}"]`;break}}return g(u)}function G(u){let[e,t=""]=u.split("?");return`${e}?t=${Date.now()}&${t.replace(/t=\\d+/g,"")}`}function C(u){if(u.nodeType===1&&u.hasAttribute("data-persist"))return u;if(u.nodeType===1&&u.localName==="script"){let e=document.createElement("script");for(let{name:t,value:D}of u.attributes)t==="src"&&(D=G(D)),e.setAttribute(t,D);return e.innerHTML=u.innerHTML,e}return u.cloneNode(!0)}function J(u,e){if(u.children.length===0&&e.children.length===0)return[];let t=[],D=new Map,F=new Map,l=new Map;for(let n of u.children)D.set(h(n),n);for(let n of e.children){let i=h(n),r=D.get(i);r?g(n,!1)!==g(r,!1)&&F.set(i,C(n)):l.set(i,C(n)),D.delete(i)}for(let n of u.childNodes){if(n.nodeType===1){let i=h(n);if(D.has(i)){t.push({type:1});continue}else if(F.has(i)){let r=F.get(i);t.push({type:3,attributes:L(n,r),children:T(n,r)});continue}}t.push(void 0)}for(let n of l.values())t.push({type:0,node:C(n)});return t}function T(u,e){let t=[],D=Math.max(u.childNodes.length,e.childNodes.length);for(let F=0;F<D;F++){let l=u.childNodes.item(F),n=e.childNodes.item(F);t[F]=B(l,n)}return t}function B(u,e){if(!u)return{type:0,node:C(e)};if(!e)return{type:1};if(Q(u,e)){if(u.nodeType===3){let t=u.nodeValue,D=e.nodeValue;if(t.trim().length===0&&D.trim().length===0)return}if(u.nodeType===1){if(Z(u,e)){let t=u.tagName==="HEAD"?J:T;return{type:3,attributes:L(u,e),children:t(u,e)}}return{type:2,node:C(e)}}else return u.nodeType===9?B(u.documentElement,e.documentElement):Y(u,e)?void 0:{type:2,value:e.nodeValue}}return{type:2,node:C(e)}}function X(u,e){if(e.length!==0)for(let{type:t,name:D,value:F}of e)t===5?u.removeAttribute(D):t===4&&u.setAttribute(D,F)}async function y(u,e,t){if(!e)return;let D;switch(u.nodeType===9?(u=u.documentElement,D=u):t?D=t:D=u,e.type){case 0:{let{node:F}=e;u.appendChild(F);return}case 1:{if(!D)return;u.removeChild(D);return}case 2:{if(!D)return;let{node:F,value:l}=e;if(typeof l=="string"){D.nodeValue=l;return}D.replaceWith(F);return}case 3:{if(!D)return;let{attributes:F,children:l}=e;X(D,F);let n=Array.from(D.childNodes);await Promise.all(l.map((i,r)=>y(D,i,n[r])));return}}}function w(u,e){let t=B(u,e);return y(u,t)}var fu=Object.hasOwnProperty;var O=K(k(),1),gu=(0,O.default)();function b(u){return u.document.body.dataset.slug}var U=(u,e,t)=>{let D=new URL(u.getAttribute(e),t);u.setAttribute(e,D.pathname+D.hash)};function M(u,e){u.querySelectorAll(\'[href=""], [href^="./"], [href^="../"]\').forEach(t=>U(t,"href",e)),u.querySelectorAll(\'[src=""], [src^="./"], [src^="../"]\').forEach(t=>U(t,"src",e))}var tu=/<link rel="canonical" href="([^"]*)">/;async function N(u){let e=await fetch(`${u}`);if(!e.headers.get("content-type")?.startsWith("text/html"))return e;let t=await e.clone().text(),[D,F]=t.match(tu)??[];return F?fetch(`${new URL(F,u)}`):e}var Du=1,d=document.createElement("route-announcer"),nu=u=>u?.nodeType===Du,ru=u=>{try{let e=new URL(u);if(window.location.origin===e.origin)return!0}catch{}return!1},Fu=u=>{let e=u.origin===window.location.origin,t=u.pathname===window.location.pathname;return e&&t},P=({target:u})=>{if(!nu(u)||u.attributes.getNamedItem("target")?.value==="_blank")return;let e=u.closest("a");if(!e||"routerIgnore"in e.dataset)return;let{href:t}=e;if(ru(t))return{url:new URL(t),scroll:"routerNoscroll"in e.dataset?!1:void 0}};function H(u){let e=new CustomEvent("nav",{detail:{url:u}});document.dispatchEvent(e)}var v=new Set;window.addCleanup=u=>v.add(u);function iu(){let u=document.createElement("div");u.className="navigation-progress",u.style.width="0",document.body.contains(u)||document.body.appendChild(u),setTimeout(()=>{u.style.width="80%"},100)}var x;async function p(u,e=!1){iu(),x=x||new DOMParser;let t=await N(u).then(i=>{if(i.headers.get("content-type")?.startsWith("text/html"))return i.text();window.location.assign(u)}).catch(()=>{window.location.assign(u)});if(!t)return;v.forEach(i=>i()),v.clear();let D=x.parseFromString(t,"text/html");M(D,u);let F=D.querySelector("title")?.textContent;if(F)document.title=F;else{let i=document.querySelector("h1");F=i?.innerText??i?.textContent??u.pathname}d.textContent!==F&&(d.textContent=F),d.dataset.persist="",D.body.appendChild(d),w(document.body,D.body),e||(u.hash?document.getElementById(decodeURIComponent(u.hash.substring(1)))?.scrollIntoView():window.scrollTo({top:0})),document.head.querySelectorAll(":not([spa-preserve])").forEach(i=>i.remove()),D.head.querySelectorAll(":not([spa-preserve])").forEach(i=>document.head.appendChild(i)),e||history.pushState({},"",u),H(b(window)),delete d.dataset.persist}window.spaNavigate=p;function ou(){return typeof window<"u"&&(window.addEventListener("click",async u=>{let{url:e}=P(u)??{};if(!(!e||u.ctrlKey||u.metaKey)){if(u.preventDefault(),Fu(e)&&e.hash){document.getElementById(decodeURIComponent(e.hash.substring(1)))?.scrollIntoView(),history.pushState({},"",e);return}try{p(e,!1)}catch{window.location.assign(e)}}}),window.addEventListener("popstate",u=>{let{url:e}=P(u)??{};if(!(window.location.hash&&window.location.pathname===e?.pathname))try{p(new URL(window.location.toString()),!0)}catch{window.location.reload()}})),new class{go(e){let t=new URL(e,window.location.toString());return p(t,!1)}back(){return window.history.back()}forward(){return window.history.forward()}}}ou();H(b(window));if(!customElements.get("route-announcer")){let u={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};customElements.define("route-announcer",class extends HTMLElement{constructor(){super()}connectedCallback(){for(let[t,D]of Object.entries(u))this.setAttribute(t,D)}})}\n';var popover_inline_default='var ee=Object.create;var Et=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty;var re=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var se=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ne(e))!oe.call(t,i)&&i!==u&&Et(t,i,{get:()=>e[i],enumerable:!(n=ue(e,i))||n.enumerable});return t};var ce=(t,e,u)=>(u=t!=null?ee(ie(t)):{},se(e||!t||!t.__esModule?Et(u,"default",{value:t,enumerable:!0}):u,t));var Xt=re((uu,qt)=>{"use strict";qt.exports=Re;function K(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Re(t){if(t=t||{},t.circles)return Se(t);let e=new Map;if(e.set(Date,o=>new Date(o)),e.set(Map,(o,l)=>new Map(n(Array.from(o),l))),e.set(Set,(o,l)=>new Set(n(Array.from(o),l))),t.constructorHandlers)for(let o of t.constructorHandlers)e.set(o[0],o[1]);let u=null;return t.proto?r:i;function n(o,l){let s=Object.keys(o),c=new Array(s.length);for(let a=0;a<s.length;a++){let D=s[a],f=o[D];typeof f!="object"||f===null?c[D]=f:f.constructor!==Object&&(u=e.get(f.constructor))?c[D]=u(f,l):ArrayBuffer.isView(f)?c[D]=K(f):c[D]=l(f)}return c}function i(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return n(o,i);if(o.constructor!==Object&&(u=e.get(o.constructor)))return u(o,i);let l={};for(let s in o){if(Object.hasOwnProperty.call(o,s)===!1)continue;let c=o[s];typeof c!="object"||c===null?l[s]=c:c.constructor!==Object&&(u=e.get(c.constructor))?l[s]=u(c,i):ArrayBuffer.isView(c)?l[s]=K(c):l[s]=i(c)}return l}function r(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return n(o,r);if(o.constructor!==Object&&(u=e.get(o.constructor)))return u(o,r);let l={};for(let s in o){let c=o[s];typeof c!="object"||c===null?l[s]=c:c.constructor!==Object&&(u=e.get(c.constructor))?l[s]=u(c,r):ArrayBuffer.isView(c)?l[s]=K(c):l[s]=r(c)}return l}}function Se(t){let e=[],u=[],n=new Map;if(n.set(Date,s=>new Date(s)),n.set(Map,(s,c)=>new Map(r(Array.from(s),c))),n.set(Set,(s,c)=>new Set(r(Array.from(s),c))),t.constructorHandlers)for(let s of t.constructorHandlers)n.set(s[0],s[1]);let i=null;return t.proto?l:o;function r(s,c){let a=Object.keys(s),D=new Array(a.length);for(let f=0;f<a.length;f++){let F=a[f],d=s[F];if(typeof d!="object"||d===null)D[F]=d;else if(d.constructor!==Object&&(i=n.get(d.constructor)))D[F]=i(d,c);else if(ArrayBuffer.isView(d))D[F]=K(d);else{let m=e.indexOf(d);m!==-1?D[F]=u[m]:D[F]=c(d)}}return D}function o(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return r(s,o);if(s.constructor!==Object&&(i=n.get(s.constructor)))return i(s,o);let c={};e.push(s),u.push(c);for(let a in s){if(Object.hasOwnProperty.call(s,a)===!1)continue;let D=s[a];if(typeof D!="object"||D===null)c[a]=D;else if(D.constructor!==Object&&(i=n.get(D.constructor)))c[a]=i(D,o);else if(ArrayBuffer.isView(D))c[a]=K(D);else{let f=e.indexOf(D);f!==-1?c[a]=u[f]:c[a]=o(D)}}return e.pop(),u.pop(),c}function l(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return r(s,l);if(s.constructor!==Object&&(i=n.get(s.constructor)))return i(s,l);let c={};e.push(s),u.push(c);for(let a in s){let D=s[a];if(typeof D!="object"||D===null)c[a]=D;else if(D.constructor!==Object&&(i=n.get(D.constructor)))c[a]=i(D,l);else if(ArrayBuffer.isView(D))c[a]=K(D);else{let f=e.indexOf(D);f!==-1?c[a]=u[f]:c[a]=l(D)}}return e.pop(),u.pop(),c}}});var W=Math.min,v=Math.max,J=Math.round;var b=t=>({x:t,y:t}),le={left:"right",right:"left",bottom:"top",top:"bottom"},De={start:"end",end:"start"};function ft(t,e,u){return v(t,W(e,u))}function tt(t,e){return typeof t=="function"?t(e):t}function T(t){return t.split("-")[0]}function rt(t){return t.split("-")[1]}function Ft(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function $(t){return["top","bottom"].includes(T(t))?"y":"x"}function mt(t){return Ft($(t))}function Ct(t,e,u){u===void 0&&(u=!1);let n=rt(t),i=mt(t),r=dt(i),o=i==="x"?n===(u?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=G(o)),[o,G(o)]}function xt(t){let e=G(t);return[ot(t),e,ot(e)]}function ot(t){return t.replace(/start|end/g,e=>De[e])}function ae(t,e,u){let n=["left","right"],i=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return u?e?i:n:e?n:i;case"left":case"right":return e?r:o;default:return[]}}function Bt(t,e,u,n){let i=rt(t),r=ae(T(t),u==="start",n);return i&&(r=r.map(o=>o+"-"+i),e&&(r=r.concat(r.map(ot)))),r}function G(t){return t.replace(/left|right|bottom|top/g,e=>le[e])}function fe(t){return{top:0,right:0,bottom:0,left:0,...t}}function gt(t){return typeof t!="number"?fe(t):{top:t,right:t,bottom:t,left:t}}function P(t){let{x:e,y:u,width:n,height:i}=t;return{width:n,height:i,top:u,left:e,right:e+n,bottom:u+i,x:e,y:u}}function wt(t,e,u){let{reference:n,floating:i}=t,r=$(e),o=mt(e),l=dt(o),s=T(e),c=r==="y",a=n.x+n.width/2-i.width/2,D=n.y+n.height/2-i.height/2,f=n[l]/2-i[l]/2,F;switch(s){case"top":F={x:a,y:n.y-i.height};break;case"bottom":F={x:a,y:n.y+n.height};break;case"right":F={x:n.x+n.width,y:D};break;case"left":F={x:n.x-i.width,y:D};break;default:F={x:n.x,y:n.y}}switch(rt(e)){case"start":F[o]-=f*(u&&c?-1:1);break;case"end":F[o]+=f*(u&&c?-1:1);break}return F}var yt=async(t,e,u)=>{let{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:o}=u,l=r.filter(Boolean),s=await(o.isRTL==null?void 0:o.isRTL(e)),c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:D}=wt(c,n,s),f=n,F={},d=0;for(let m=0;m<l.length;m++){let{name:g,fn:A}=l[m],{x:h,y:p,data:x,reset:E}=await A({x:a,y:D,initialPlacement:n,placement:f,strategy:i,middlewareData:F,rects:c,platform:o,elements:{reference:t,floating:e}});a=h??a,D=p??D,F={...F,[g]:{...F[g],...x}},E&&d<=50&&(d++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:a,y:D}=wt(c,f,s)),m=-1)}return{x:a,y:D,placement:f,strategy:i,middlewareData:F}};async function ht(t,e){var u;e===void 0&&(e={});let{x:n,y:i,platform:r,rects:o,elements:l,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:a="viewport",elementContext:D="floating",altBoundary:f=!1,padding:F=0}=tt(e,t),d=gt(F),g=l[f?D==="floating"?"reference":"floating":D],A=P(await r.getClippingRect({element:(u=await(r.isElement==null?void 0:r.isElement(g)))==null||u?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:a,strategy:s})),h=D==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,p=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),x=await(r.isElement==null?void 0:r.isElement(p))?await(r.getScale==null?void 0:r.getScale(p))||{x:1,y:1}:{x:1,y:1},E=P(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:p,strategy:s}):h);return{top:(A.top-E.top+d.top)/x.y,bottom:(E.bottom-A.bottom+d.bottom)/x.y,left:(A.left-E.left+d.left)/x.x,right:(E.right-A.right+d.right)/x.x}}var vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var u,n;let{placement:i,middlewareData:r,rects:o,initialPlacement:l,platform:s,elements:c}=e,{mainAxis:a=!0,crossAxis:D=!0,fallbackPlacements:f,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...g}=tt(t,e);if((u=r.arrow)!=null&&u.alignmentOffset)return{};let A=T(i),h=$(l),p=T(l)===l,x=await(s.isRTL==null?void 0:s.isRTL(c.floating)),E=f||(p||!m?[G(l)]:xt(l)),V=d!=="none";!f&&V&&E.push(...Bt(l,m,d,x));let it=[l,...E],Z=await ht(e,g),_=[],C=((n=r.flip)==null?void 0:n.overflows)||[];if(a&&_.push(Z[A]),D){let S=Ct(i,o,x);_.push(Z[S[0]],Z[S[1]])}if(C=[...C,{placement:i,overflows:_}],!_.every(S=>S<=0)){var z,Q;let S=(((z=r.flip)==null?void 0:z.index)||0)+1,Y=it[S];if(Y)return{data:{index:S,overflows:C},reset:{placement:Y}};let M=(Q=C.filter(H=>H.overflows[0]<=0).sort((H,O)=>H.overflows[1]-O.overflows[1])[0])==null?void 0:Q.placement;if(!M)switch(F){case"bestFit":{var I;let H=(I=C.filter(O=>{if(V){let j=$(O.placement);return j===h||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,te)=>j+te,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:I[0];H&&(M=H);break}case"initialPlacement":M=l;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function bt(t){let e=W(...t.map(r=>r.left)),u=W(...t.map(r=>r.top)),n=v(...t.map(r=>r.right)),i=v(...t.map(r=>r.bottom));return{x:e,y:u,width:n-e,height:i-u}}function Fe(t){let e=t.slice().sort((i,r)=>i.y-r.y),u=[],n=null;for(let i=0;i<e.length;i++){let r=e[i];!n||r.y-n.y>n.height/2?u.push([r]):u[u.length-1].push(r),n=r}return u.map(i=>P(bt(i)))}var Rt=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){let{placement:u,elements:n,rects:i,platform:r,strategy:o}=e,{padding:l=2,x:s,y:c}=tt(t,e),a=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(n.reference))||[]),D=Fe(a),f=P(bt(a)),F=gt(l);function d(){if(D.length===2&&D[0].left>D[1].right&&s!=null&&c!=null)return D.find(g=>s>g.left-F.left&&s<g.right+F.right&&c>g.top-F.top&&c<g.bottom+F.bottom)||f;if(D.length>=2){if($(u)==="y"){let C=D[0],z=D[D.length-1],Q=T(u)==="top",I=C.top,S=z.bottom,Y=Q?C.left:z.left,M=Q?C.right:z.right,H=M-Y,O=S-I;return{top:I,bottom:S,left:Y,right:M,width:H,height:O,x:Y,y:I}}let g=T(u)==="left",A=v(...D.map(C=>C.right)),h=W(...D.map(C=>C.left)),p=D.filter(C=>g?C.left===h:C.right===A),x=p[0].top,E=p[p.length-1].bottom,V=h,it=A,Z=it-V,_=E-x;return{top:x,bottom:E,left:V,right:it,width:Z,height:_,x:V,y:x}}return f}let m=await r.getElementRects({reference:{getBoundingClientRect:d},floating:n.floating,strategy:o});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};var St=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:u,y:n,placement:i}=e,{mainAxis:r=!0,crossAxis:o=!1,limiter:l={fn:g=>{let{x:A,y:h}=g;return{x:A,y:h}}},...s}=tt(t,e),c={x:u,y:n},a=await ht(e,s),D=$(T(i)),f=Ft(D),F=c[f],d=c[D];if(r){let g=f==="y"?"top":"left",A=f==="y"?"bottom":"right",h=F+a[g],p=F-a[A];F=ft(h,F,p)}if(o){let g=D==="y"?"top":"left",A=D==="y"?"bottom":"right",h=d+a[g],p=d-a[A];d=ft(h,d,p)}let m=l.fn({...e,[f]:F,[D]:d});return{...m,data:{x:m.x-u,y:m.y-n,enabled:{[f]:r,[D]:o}}}}}};function ct(){return typeof window<"u"}function N(t){return Lt(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function L(t){var e;return(e=(Lt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Lt(t){return ct()?t instanceof Node||t instanceof B(t).Node:!1}function w(t){return ct()?t instanceof Element||t instanceof B(t).Element:!1}function R(t){return ct()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Ot(t){return!ct()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}function q(t){let{overflow:e,overflowX:u,overflowY:n,display:i}=y(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+u)&&!["inline","contents"].includes(i)}function Tt(t){return["table","td","th"].includes(N(t))}function et(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function lt(t){let e=Dt(),u=w(t)?y(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>u[n]?u[n]!=="none":!1)||(u.containerType?u.containerType!=="normal":!1)||!e&&(u.backdropFilter?u.backdropFilter!=="none":!1)||!e&&(u.filter?u.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(u.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(u.contain||"").includes(n))}function Pt(t){let e=k(t);for(;R(e)&&!U(e);){if(lt(e))return e;if(et(e))return null;e=k(e)}return null}function Dt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(t){return["html","body","#document"].includes(N(t))}function y(t){return B(t).getComputedStyle(t)}function ut(t){return w(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function k(t){if(N(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ot(t)&&t.host||L(t);return Ot(e)?e.host:e}function kt(t){let e=k(t);return U(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&q(e)?e:kt(e)}function st(t,e,u){var n;e===void 0&&(e=[]),u===void 0&&(u=!0);let i=kt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=B(i);if(r){let l=at(o);return e.concat(o,o.visualViewport||[],q(i)?i:[],l&&u?st(l):[])}return e.concat(i,st(i,[],u))}function at(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jt(t){let e=y(t),u=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=R(t),r=i?t.offsetWidth:u,o=i?t.offsetHeight:n,l=J(u)!==r||J(n)!==o;return l&&(u=r,n=o),{width:u,height:n,$:l}}function Wt(t){return w(t)?t:t.contextElement}function X(t){let e=Wt(t);if(!R(e))return b(1);let u=e.getBoundingClientRect(),{width:n,height:i,$:r}=jt(e),o=(r?J(u.width):u.width)/n,l=(r?J(u.height):u.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}var de=b(0);function $t(t){let e=B(t);return!Dt()||!e.visualViewport?de:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function me(t,e,u){return e===void 0&&(e=!1),!u||e&&u!==B(t)?!1:e}function nt(t,e,u,n){e===void 0&&(e=!1),u===void 0&&(u=!1);let i=t.getBoundingClientRect(),r=Wt(t),o=b(1);e&&(n?w(n)&&(o=X(n)):o=X(t));let l=me(r,u,n)?$t(r):b(0),s=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,a=i.width/o.x,D=i.height/o.y;if(r){let f=B(r),F=n&&w(n)?B(n):n,d=f,m=at(d);for(;m&&n&&F!==d;){let g=X(m),A=m.getBoundingClientRect(),h=y(m),p=A.left+(m.clientLeft+parseFloat(h.paddingLeft))*g.x,x=A.top+(m.clientTop+parseFloat(h.paddingTop))*g.y;s*=g.x,c*=g.y,a*=g.x,D*=g.y,s+=p,c+=x,d=B(m),m=at(d)}}return P({width:a,height:D,x:s,y:c})}function pt(t,e){let u=ut(t).scrollLeft;return e?e.left+u:nt(L(t)).left+u}function Nt(t,e,u){u===void 0&&(u=!1);let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-(u?0:pt(t,n)),r=n.top+e.scrollTop;return{x:i,y:r}}function ge(t){let{elements:e,rect:u,offsetParent:n,strategy:i}=t,r=i==="fixed",o=L(n),l=e?et(e.floating):!1;if(n===o||l&&r)return u;let s={scrollLeft:0,scrollTop:0},c=b(1),a=b(0),D=R(n);if((D||!D&&!r)&&((N(n)!=="body"||q(o))&&(s=ut(n)),R(n))){let F=nt(n);c=X(n),a.x=F.x+n.clientLeft,a.y=F.y+n.clientTop}let f=o&&!D&&!r?Nt(o,s,!0):b(0);return{width:u.width*c.x,height:u.height*c.y,x:u.x*c.x-s.scrollLeft*c.x+a.x+f.x,y:u.y*c.y-s.scrollTop*c.y+a.y+f.y}}function he(t){return Array.from(t.getClientRects())}function Ae(t){let e=L(t),u=ut(t),n=t.ownerDocument.body,i=v(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=v(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),o=-u.scrollLeft+pt(t),l=-u.scrollTop;return y(n).direction==="rtl"&&(o+=v(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:o,y:l}}function pe(t,e){let u=B(t),n=L(t),i=u.visualViewport,r=n.clientWidth,o=n.clientHeight,l=0,s=0;if(i){r=i.width,o=i.height;let c=Dt();(!c||c&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}return{width:r,height:o,x:l,y:s}}function Ee(t,e){let u=nt(t,!0,e==="fixed"),n=u.top+t.clientTop,i=u.left+t.clientLeft,r=R(t)?X(t):b(1),o=t.clientWidth*r.x,l=t.clientHeight*r.y,s=i*r.x,c=n*r.y;return{width:o,height:l,x:s,y:c}}function Mt(t,e,u){let n;if(e==="viewport")n=pe(t,u);else if(e==="document")n=Ae(L(t));else if(w(e))n=Ee(e,u);else{let i=$t(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return P(n)}function Ut(t,e){let u=k(t);return u===e||!w(u)||U(u)?!1:y(u).position==="fixed"||Ut(u,e)}function Ce(t,e){let u=e.get(t);if(u)return u;let n=st(t,[],!1).filter(l=>w(l)&&N(l)!=="body"),i=null,r=y(t).position==="fixed",o=r?k(t):t;for(;w(o)&&!U(o);){let l=y(o),s=lt(o);!s&&l.position==="fixed"&&(i=null),(r?!s&&!i:!s&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||q(o)&&!s&&Ut(t,o))?n=n.filter(a=>a!==o):i=l,o=k(o)}return e.set(t,n),n}function xe(t){let{element:e,boundary:u,rootBoundary:n,strategy:i}=t,o=[...u==="clippingAncestors"?et(e)?[]:Ce(e,this._c):[].concat(u),n],l=o[0],s=o.reduce((c,a)=>{let D=Mt(e,a,i);return c.top=v(D.top,c.top),c.right=W(D.right,c.right),c.bottom=W(D.bottom,c.bottom),c.left=v(D.left,c.left),c},Mt(e,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Be(t){let{width:e,height:u}=jt(t);return{width:e,height:u}}function we(t,e,u){let n=R(e),i=L(e),r=u==="fixed",o=nt(t,!0,r,e),l={scrollLeft:0,scrollTop:0},s=b(0);if(n||!n&&!r)if((N(e)!=="body"||q(i))&&(l=ut(e)),n){let f=nt(e,!0,r,e);s.x=f.x+e.clientLeft,s.y=f.y+e.clientTop}else i&&(s.x=pt(i));let c=i&&!n&&!r?Nt(i,l):b(0),a=o.left+l.scrollLeft-s.x-c.x,D=o.top+l.scrollTop-s.y-c.y;return{x:a,y:D,width:o.width,height:o.height}}function At(t){return y(t).position==="static"}function Ht(t,e){if(!R(t)||y(t).position==="fixed")return null;if(e)return e(t);let u=t.offsetParent;return L(t)===u&&(u=u.ownerDocument.body),u}function Vt(t,e){let u=B(t);if(et(t))return u;if(!R(t)){let i=k(t);for(;i&&!U(i);){if(w(i)&&!At(i))return i;i=k(i)}return u}let n=Ht(t,e);for(;n&&Tt(n)&&At(n);)n=Ht(n,e);return n&&U(n)&&At(n)&&!lt(n)?u:n||Pt(t)||u}var ye=async function(t){let e=this.getOffsetParent||Vt,u=this.getDimensions,n=await u(t.floating);return{reference:we(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ve(t){return y(t).direction==="rtl"}var be={convertOffsetParentRelativeRectToViewportRelativeRect:ge,getDocumentElement:L,getClippingRect:xe,getOffsetParent:Vt,getElementRects:ye,getClientRects:he,getDimensions:Be,getScale:X,isElement:w,isRTL:ve};var _t=St,zt=vt;var It=Rt;var Yt=(t,e,u)=>{let n=new Map,i={platform:be,...u},r={...i.platform,_c:n};return yt(t,e,{...i,platform:r})};var tu=Object.hasOwnProperty;var Zt=ce(Xt(),1),ou=(0,Zt.default)();var Kt=(t,e,u)=>{let n=new URL(t.getAttribute(e),u);t.setAttribute(e,n.pathname+n.hash)};function Qt(t,e){t.querySelectorAll(\'[href=""], [href^="./"], [href^="../"]\').forEach(u=>Kt(u,"href",e)),t.querySelectorAll(\'[src=""], [src^="./"], [src^="../"]\').forEach(u=>Kt(u,"src",e))}var Oe=/<link rel="canonical" href="([^"]*)">/;async function Gt(t){let e=await fetch(`${t}`);if(!e.headers.get("content-type")?.startsWith("text/html"))return e;let u=await e.clone().text(),[n,i]=u.match(Oe)??[];return i?fetch(`${new URL(i,t)}`):e}var Le=new DOMParser;async function Jt({clientX:t,clientY:e}){let u=this;if(u.dataset.noPopover==="true")return;async function n(d){let{x:m,y:g}=await Yt(u,d,{middleware:[It({x:t,y:e}),_t(),zt()]});Object.assign(d.style,{left:`${m}px`,top:`${g}px`})}let i=()=>[...u.children].some(d=>d.classList.contains("popover"));if(i())return n(u.lastChild);let r=new URL(document.location.href);r.hash="",r.search="";let o=new URL(u.href),l=decodeURIComponent(o.hash);o.hash="",o.search="";let s=await Gt(o).catch(d=>{console.error(d)});if(i()||!s)return;let[c]=s.headers.get("Content-Type").split(";"),[a,D]=c.split("/"),f=document.createElement("div");f.classList.add("popover");let F=document.createElement("div");switch(F.classList.add("popover-inner"),f.appendChild(F),F.dataset.contentType=c??void 0,a){case"image":let d=document.createElement("img");d.src=o.toString(),d.alt=o.pathname,F.appendChild(d);break;case"application":switch(D){case"pdf":let h=document.createElement("iframe");h.src=o.toString(),F.appendChild(h);break;default:break}break;default:let m=await s.text(),g=Le.parseFromString(m,"text/html");Qt(g,o);let A=[...g.getElementsByClassName("popover-hint")];if(A.length===0)return;A.forEach(h=>F.appendChild(h))}if(n(f),u.appendChild(f),l!==""){let d=F.querySelector(l);d&&F.scroll({top:d.offsetTop-12,behavior:"instant"})}}document.addEventListener("nav",()=>{let t=[...document.getElementsByClassName("internal")];for(let e of t)e.addEventListener("mouseenter",Jt),window.addCleanup(()=>e.removeEventListener("mouseenter",Jt))});\n';var custom_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
code[data-theme*=" "] {
|
|
color: var(--shiki-light);
|
|
background-color: var(--shiki-light-bg);
|
|
}
|
|
|
|
code[data-theme*=" "] span {
|
|
color: var(--shiki-light);
|
|
}
|
|
|
|
[saved-theme=dark] code[data-theme*=" "] {
|
|
color: var(--shiki-dark);
|
|
background-color: var(--shiki-dark-bg);
|
|
}
|
|
|
|
[saved-theme=dark] code[data-theme*=" "] span {
|
|
color: var(--shiki-dark);
|
|
}
|
|
|
|
.callout {
|
|
border: 1px solid var(--border);
|
|
background-color: var(--bg);
|
|
border-radius: 5px;
|
|
padding: 0 1rem;
|
|
overflow-y: hidden;
|
|
transition: max-height 0.3s ease;
|
|
box-sizing: border-box;
|
|
--callout-icon-note: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="2" x2="22" y2="6"></line><path d="M7.5 20.5 19 9l-4-4L3.5 16.5 2 22z"></path></svg>');
|
|
--callout-icon-abstract: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><path d="M12 11h4"></path><path d="M12 16h4"></path><path d="M8 11h.01"></path><path d="M8 16h.01"></path></svg>');
|
|
--callout-icon-info: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>');
|
|
--callout-icon-todo: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg>');
|
|
--callout-icon-tip: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"></path></svg> ');
|
|
--callout-icon-success: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> ');
|
|
--callout-icon-question: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> ');
|
|
--callout-icon-warning: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>');
|
|
--callout-icon-failure: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> ');
|
|
--callout-icon-danger: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg> ');
|
|
--callout-icon-bug: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="14" x="8" y="6" rx="4"></rect><path d="m19 7-3 2"></path><path d="m5 7 3 2"></path><path d="m19 19-3-2"></path><path d="m5 19 3-2"></path><path d="M20 13h-4"></path><path d="M4 13h4"></path><path d="m10 4 1 2"></path><path d="m14 4-1 2"></path></svg>');
|
|
--callout-icon-example: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg> ');
|
|
--callout-icon-quote: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"></path><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"></path></svg>');
|
|
--callout-icon-fold: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
|
|
}
|
|
.callout > .callout-content > :first-child {
|
|
margin-top: 0;
|
|
}
|
|
.callout[data-callout] {
|
|
--color: #448aff;
|
|
--border: #448aff44;
|
|
--bg: #448aff10;
|
|
--callout-icon: var(--callout-icon-note);
|
|
}
|
|
.callout[data-callout=abstract] {
|
|
--color: #00b0ff;
|
|
--border: #00b0ff44;
|
|
--bg: #00b0ff10;
|
|
--callout-icon: var(--callout-icon-abstract);
|
|
}
|
|
.callout[data-callout=info], .callout[data-callout=todo] {
|
|
--color: #00b8d4;
|
|
--border: #00b8d444;
|
|
--bg: #00b8d410;
|
|
--callout-icon: var(--callout-icon-info);
|
|
}
|
|
.callout[data-callout=todo] {
|
|
--callout-icon: var(--callout-icon-todo);
|
|
}
|
|
.callout[data-callout=tip] {
|
|
--color: #00bfa5;
|
|
--border: #00bfa544;
|
|
--bg: #00bfa510;
|
|
--callout-icon: var(--callout-icon-tip);
|
|
}
|
|
.callout[data-callout=success] {
|
|
--color: #09ad7a;
|
|
--border: #09ad7144;
|
|
--bg: #09ad7110;
|
|
--callout-icon: var(--callout-icon-success);
|
|
}
|
|
.callout[data-callout=question] {
|
|
--color: #dba642;
|
|
--border: #dba64244;
|
|
--bg: #dba64210;
|
|
--callout-icon: var(--callout-icon-question);
|
|
}
|
|
.callout[data-callout=warning] {
|
|
--color: #db8942;
|
|
--border: #db894244;
|
|
--bg: #db894210;
|
|
--callout-icon: var(--callout-icon-warning);
|
|
}
|
|
.callout[data-callout=failure], .callout[data-callout=danger], .callout[data-callout=bug] {
|
|
--color: #db4242;
|
|
--border: #db424244;
|
|
--bg: #db424210;
|
|
--callout-icon: var(--callout-icon-failure);
|
|
}
|
|
.callout[data-callout=bug] {
|
|
--callout-icon: var(--callout-icon-bug);
|
|
}
|
|
.callout[data-callout=danger] {
|
|
--callout-icon: var(--callout-icon-danger);
|
|
}
|
|
.callout[data-callout=example] {
|
|
--color: #7a43b5;
|
|
--border: #7a43b544;
|
|
--bg: #7a43b510;
|
|
--callout-icon: var(--callout-icon-example);
|
|
}
|
|
.callout[data-callout=quote] {
|
|
--color: var(--secondary);
|
|
--border: var(--lightgray);
|
|
--callout-icon: var(--callout-icon-quote);
|
|
}
|
|
.callout.is-collapsed > .callout-title > .fold-callout-icon {
|
|
transform: rotateZ(-90deg);
|
|
}
|
|
|
|
.callout-title {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 5px;
|
|
padding: 1rem 0;
|
|
color: var(--color);
|
|
--icon-size: 18px;
|
|
}
|
|
.callout-title .fold-callout-icon {
|
|
transition: transform 0.15s ease;
|
|
opacity: 0.8;
|
|
cursor: pointer;
|
|
--callout-icon: var(--callout-icon-fold);
|
|
}
|
|
.callout-title > .callout-title-inner > p {
|
|
color: var(--color);
|
|
margin: 0;
|
|
}
|
|
.callout-title .callout-icon, .callout-title .fold-callout-icon {
|
|
width: var(--icon-size);
|
|
height: var(--icon-size);
|
|
flex: 0 0 var(--icon-size);
|
|
background-size: var(--icon-size) var(--icon-size);
|
|
background-position: center;
|
|
background-color: var(--color);
|
|
mask-image: var(--callout-icon);
|
|
mask-size: var(--icon-size) var(--icon-size);
|
|
mask-position: center;
|
|
mask-repeat: no-repeat;
|
|
padding: 0.2rem 0;
|
|
}
|
|
.callout-title .callout-title-inner {
|
|
font-weight: 600;
|
|
}
|
|
|
|
html {
|
|
scroll-behavior: smooth;
|
|
text-size-adjust: none;
|
|
overflow-x: hidden;
|
|
width: 100vw;
|
|
}
|
|
|
|
body,
|
|
section {
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
background-color: var(--light);
|
|
font-family: var(--bodyFont);
|
|
color: var(--darkgray);
|
|
}
|
|
|
|
.text-highlight {
|
|
background-color: var(--textHighlight);
|
|
padding: 0 0.1rem;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
::selection {
|
|
background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));
|
|
color: var(--darkgray);
|
|
}
|
|
|
|
p,
|
|
ul,
|
|
text,
|
|
a,
|
|
tr,
|
|
td,
|
|
li,
|
|
ol,
|
|
ul,
|
|
.katex,
|
|
.math {
|
|
color: var(--darkgray);
|
|
fill: var(--darkgray);
|
|
hyphens: auto;
|
|
}
|
|
|
|
p,
|
|
ul,
|
|
text,
|
|
a,
|
|
li,
|
|
ol,
|
|
ul,
|
|
.katex,
|
|
.math {
|
|
overflow-wrap: anywhere;
|
|
/* tr and td removed from list of selectors for overflow-wrap, allowing them to use default 'normal' property value */
|
|
}
|
|
|
|
.math.math-display {
|
|
text-align: center;
|
|
}
|
|
|
|
strong {
|
|
font-weight: 600;
|
|
}
|
|
|
|
a {
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
transition: color 0.2s ease;
|
|
color: var(--secondary);
|
|
}
|
|
a:hover {
|
|
color: var(--tertiary) !important;
|
|
}
|
|
a.internal {
|
|
text-decoration: none;
|
|
background-color: var(--highlight);
|
|
padding: 0 0.1rem;
|
|
border-radius: 5px;
|
|
line-height: 1.4rem;
|
|
}
|
|
a.internal:has(> img) {
|
|
background-color: transparent;
|
|
border-radius: 0;
|
|
padding: 0;
|
|
}
|
|
a.internal.tag-link::before {
|
|
content: "#";
|
|
}
|
|
a.external .external-icon {
|
|
height: 1ex;
|
|
margin: 0 0.15em;
|
|
}
|
|
a.external .external-icon > path {
|
|
fill: var(--dark);
|
|
}
|
|
|
|
.desktop-only {
|
|
display: initial;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.desktop-only {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.mobile-only {
|
|
display: none;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.mobile-only {
|
|
display: initial;
|
|
}
|
|
}
|
|
|
|
.page {
|
|
max-width: calc(1200px + 300px);
|
|
margin: 0 auto;
|
|
}
|
|
.page article > h1 {
|
|
font-size: 2rem;
|
|
}
|
|
.page article li:has(> input[type=checkbox]) {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
}
|
|
.page article li:has(> input[type=checkbox]:checked) {
|
|
text-decoration: line-through;
|
|
text-decoration-color: var(--gray);
|
|
color: var(--gray);
|
|
}
|
|
.page article li > * {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
.page article p > strong {
|
|
color: var(--dark);
|
|
}
|
|
.page > #quartz-body {
|
|
display: grid;
|
|
grid-template-columns: 320px auto 320px;
|
|
grid-template-rows: auto auto auto;
|
|
column-gap: 5px;
|
|
row-gap: 5px;
|
|
grid-template-areas: "grid-sidebar-left grid-header grid-sidebar-right" "grid-sidebar-left grid-center grid-sidebar-right" "grid-sidebar-left grid-footer grid-sidebar-right";
|
|
}
|
|
@media all and ((min-width: 800px) and (max-width: 1200px)) {
|
|
.page > #quartz-body {
|
|
grid-template-columns: 320px auto;
|
|
grid-template-rows: auto auto auto auto;
|
|
column-gap: 5px;
|
|
row-gap: 5px;
|
|
grid-template-areas: "grid-sidebar-left grid-header" "grid-sidebar-left grid-center" "grid-sidebar-left grid-sidebar-right" "grid-sidebar-left grid-footer";
|
|
}
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body {
|
|
grid-template-columns: auto;
|
|
grid-template-rows: auto auto auto auto auto;
|
|
column-gap: 5px;
|
|
row-gap: 5px;
|
|
grid-template-areas: "grid-sidebar-left" "grid-header" "grid-center" "grid-sidebar-right" "grid-footer";
|
|
}
|
|
}
|
|
@media all and not ((min-width: 1200px)) {
|
|
.page > #quartz-body {
|
|
padding: 0 1rem;
|
|
}
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body {
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
.page > #quartz-body .sidebar {
|
|
gap: 2rem;
|
|
top: 0;
|
|
box-sizing: border-box;
|
|
padding: 6rem 2rem 2rem 2rem;
|
|
display: flex;
|
|
height: 100vh;
|
|
position: sticky;
|
|
}
|
|
.page > #quartz-body .sidebar.left {
|
|
z-index: 1;
|
|
grid-area: grid-sidebar-left;
|
|
flex-direction: column;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body .sidebar.left {
|
|
gap: 0;
|
|
align-items: center;
|
|
position: initial;
|
|
display: flex;
|
|
height: unset;
|
|
flex-direction: row;
|
|
padding: 0;
|
|
padding-top: 2rem;
|
|
}
|
|
}
|
|
.page > #quartz-body .sidebar.right {
|
|
grid-area: grid-sidebar-right;
|
|
margin-right: 0;
|
|
flex-direction: column;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body .sidebar.right {
|
|
margin-left: inherit;
|
|
margin-right: inherit;
|
|
}
|
|
}
|
|
@media all and not ((min-width: 1200px)) {
|
|
.page > #quartz-body .sidebar.right {
|
|
position: initial;
|
|
height: unset;
|
|
width: 100%;
|
|
flex-direction: row;
|
|
padding: 0;
|
|
}
|
|
.page > #quartz-body .sidebar.right > * {
|
|
flex: 1;
|
|
}
|
|
.page > #quartz-body .sidebar.right > .toc {
|
|
display: none;
|
|
}
|
|
}
|
|
.page > #quartz-body .page-header, .page > #quartz-body .page-footer {
|
|
margin-top: 1rem;
|
|
}
|
|
.page > #quartz-body .page-header {
|
|
grid-area: grid-header;
|
|
margin: 6rem 0 0 0;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body .page-header {
|
|
margin-top: 0;
|
|
padding: 0;
|
|
}
|
|
}
|
|
.page > #quartz-body .center > article {
|
|
grid-area: grid-center;
|
|
}
|
|
.page > #quartz-body footer {
|
|
grid-area: grid-footer;
|
|
}
|
|
.page > #quartz-body .center, .page > #quartz-body footer {
|
|
max-width: 100%;
|
|
min-width: 100%;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
@media all and ((min-width: 800px) and (max-width: 1200px)) {
|
|
.page > #quartz-body .center, .page > #quartz-body footer {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.page > #quartz-body .center, .page > #quartz-body footer {
|
|
margin-right: 0;
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
.page > #quartz-body footer {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.footnotes {
|
|
margin-top: 2rem;
|
|
border-top: 1px solid var(--lightgray);
|
|
}
|
|
|
|
input[type=checkbox] {
|
|
transform: translateY(2px);
|
|
color: var(--secondary);
|
|
border: 1px solid var(--lightgray);
|
|
border-radius: 3px;
|
|
background-color: var(--light);
|
|
position: relative;
|
|
margin-inline-end: 0.2rem;
|
|
margin-inline-start: -1.4rem;
|
|
appearance: none;
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
input[type=checkbox]:checked {
|
|
border-color: var(--secondary);
|
|
background-color: var(--secondary);
|
|
}
|
|
input[type=checkbox]:checked::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 4px;
|
|
top: 1px;
|
|
width: 4px;
|
|
height: 8px;
|
|
display: block;
|
|
border: solid var(--light);
|
|
border-width: 0 2px 2px 0;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
blockquote {
|
|
margin: 1rem 0;
|
|
border-left: 3px solid var(--secondary);
|
|
padding-left: 1rem;
|
|
transition: border-color 0.2s ease;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6,
|
|
thead {
|
|
font-family: var(--headerFont);
|
|
color: var(--dark);
|
|
font-weight: revert;
|
|
margin-bottom: 0;
|
|
}
|
|
article > h1 > a[role=anchor],
|
|
article > h2 > a[role=anchor],
|
|
article > h3 > a[role=anchor],
|
|
article > h4 > a[role=anchor],
|
|
article > h5 > a[role=anchor],
|
|
article > h6 > a[role=anchor],
|
|
article > thead > a[role=anchor] {
|
|
color: var(--dark);
|
|
background-color: transparent;
|
|
}
|
|
|
|
h1[id] > a[href^="#"],
|
|
h2[id] > a[href^="#"],
|
|
h3[id] > a[href^="#"],
|
|
h4[id] > a[href^="#"],
|
|
h5[id] > a[href^="#"],
|
|
h6[id] > a[href^="#"] {
|
|
margin: 0 0.5rem;
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease;
|
|
transform: translateY(-0.1rem);
|
|
font-family: var(--codeFont);
|
|
user-select: none;
|
|
}
|
|
h1[id]:hover > a,
|
|
h2[id]:hover > a,
|
|
h3[id]:hover > a,
|
|
h4[id]:hover > a,
|
|
h5[id]:hover > a,
|
|
h6[id]:hover > a {
|
|
opacity: 1;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.75rem;
|
|
margin-top: 2.25rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.4rem;
|
|
margin-top: 1.9rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.12rem;
|
|
margin-top: 1.62rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
font-size: 1rem;
|
|
margin-top: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
figure[data-rehype-pretty-code-figure] {
|
|
margin: 0;
|
|
position: relative;
|
|
line-height: 1.6rem;
|
|
position: relative;
|
|
}
|
|
figure[data-rehype-pretty-code-figure] > [data-rehype-pretty-code-title] {
|
|
font-family: var(--codeFont);
|
|
font-size: 0.9rem;
|
|
padding: 0.1rem 0.5rem;
|
|
border: 1px solid var(--lightgray);
|
|
width: fit-content;
|
|
border-radius: 5px;
|
|
margin-bottom: -0.5rem;
|
|
color: var(--darkgray);
|
|
}
|
|
figure[data-rehype-pretty-code-figure] > pre {
|
|
padding: 0;
|
|
}
|
|
|
|
pre {
|
|
font-family: var(--codeFont);
|
|
padding: 0 0.5rem;
|
|
border-radius: 5px;
|
|
overflow-x: auto;
|
|
border: 1px solid var(--lightgray);
|
|
position: relative;
|
|
}
|
|
pre:has(> code.mermaid) {
|
|
border: none;
|
|
}
|
|
pre > code {
|
|
background: none;
|
|
padding: 0;
|
|
font-size: 0.85rem;
|
|
counter-reset: line;
|
|
counter-increment: line 0;
|
|
display: grid;
|
|
padding: 0.5rem 0;
|
|
overflow-x: auto;
|
|
}
|
|
pre > code [data-highlighted-chars] {
|
|
background-color: var(--highlight);
|
|
border-radius: 5px;
|
|
}
|
|
pre > code > [data-line] {
|
|
padding: 0 0.25rem;
|
|
box-sizing: border-box;
|
|
border-left: 3px solid transparent;
|
|
}
|
|
pre > code > [data-line][data-highlighted-line] {
|
|
background-color: var(--highlight);
|
|
border-left: 3px solid var(--secondary);
|
|
}
|
|
pre > code > [data-line]::before {
|
|
content: counter(line);
|
|
counter-increment: line;
|
|
width: 1rem;
|
|
margin-right: 1rem;
|
|
display: inline-block;
|
|
text-align: right;
|
|
color: rgba(115, 138, 148, 0.6);
|
|
}
|
|
pre > code[data-line-numbers-max-digits="2"] > [data-line]::before {
|
|
width: 2rem;
|
|
}
|
|
pre > code[data-line-numbers-max-digits="3"] > [data-line]::before {
|
|
width: 3rem;
|
|
}
|
|
|
|
code {
|
|
font-size: 0.9em;
|
|
color: var(--dark);
|
|
font-family: var(--codeFont);
|
|
border-radius: 5px;
|
|
padding: 0.1rem 0.2rem;
|
|
background: var(--lightgray);
|
|
}
|
|
|
|
tbody,
|
|
li,
|
|
p {
|
|
line-height: 1.6rem;
|
|
}
|
|
|
|
.table-container {
|
|
overflow-x: auto;
|
|
}
|
|
.table-container > table {
|
|
margin: 1rem;
|
|
padding: 1.5rem;
|
|
border-collapse: collapse;
|
|
}
|
|
.table-container > table th,
|
|
.table-container > table td {
|
|
min-width: 75px;
|
|
}
|
|
.table-container > table > * {
|
|
line-height: 2rem;
|
|
}
|
|
|
|
th {
|
|
text-align: left;
|
|
padding: 0.4rem 0.7rem;
|
|
border-bottom: 2px solid var(--gray);
|
|
}
|
|
|
|
td {
|
|
padding: 0.2rem 0.7rem;
|
|
}
|
|
|
|
tr {
|
|
border-bottom: 1px solid var(--lightgray);
|
|
}
|
|
tr:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
border-radius: 5px;
|
|
margin: 1rem 0;
|
|
content-visibility: auto;
|
|
}
|
|
|
|
p > img + em {
|
|
display: block;
|
|
transform: translateY(-1rem);
|
|
}
|
|
|
|
hr {
|
|
width: 100%;
|
|
margin: 2rem auto;
|
|
height: 1px;
|
|
border: none;
|
|
background-color: var(--lightgray);
|
|
}
|
|
|
|
audio,
|
|
video {
|
|
width: 100%;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.spacer {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
div:has(> .overflow) {
|
|
display: flex;
|
|
overflow-y: auto;
|
|
max-height: 100%;
|
|
}
|
|
|
|
ul.overflow,
|
|
ol.overflow {
|
|
max-height: 100%;
|
|
overflow-y: auto;
|
|
content: "";
|
|
clear: both;
|
|
/*&:after {
|
|
pointer-events: none;
|
|
content: "";
|
|
width: 100%;
|
|
height: 50px;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease;
|
|
background: linear-gradient(transparent 0px, var(--light));
|
|
}*/
|
|
}
|
|
ul.overflow > li:last-of-type,
|
|
ol.overflow > li:last-of-type {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.transclude ul {
|
|
padding-left: 1rem;
|
|
}
|
|
|
|
.katex-display {
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
}
|
|
|
|
.external-embed.youtube,
|
|
iframe.pdf {
|
|
aspect-ratio: 16/9;
|
|
height: 100%;
|
|
width: 100%;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.navigation-progress {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 0;
|
|
height: 3px;
|
|
background: var(--secondary);
|
|
transition: width 0.2s ease;
|
|
z-index: 9999;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L3N0eWxlcyIsInNvdXJjZXMiOlsidmFyaWFibGVzLnNjc3MiLCJzeW50YXguc2NzcyIsImNhbGxvdXRzLnNjc3MiLCJiYXNlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUNGQTtFQUNFO0VBQ0E7OztBQUdGO0VBQ0U7OztBQUdGO0VBQ0U7RUFDQTs7O0FBR0Y7RUFDRTs7O0FDWkY7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQU1BO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBakJBO0VBQ0U7O0FBa0JGO0VBQ0U7RUFDQTtFQUNBO0VB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BoZWlnaHQ6IDEwMHZoO1xuICAgICAgcG9zaXRpb246IHN0aWNreTtcbiAgICB9XG5cbiAgICAmIC5zaWRlYmFyLmxlZnQge1xuICAgICAgei1pbmRleDogMTtcbiAgICAgIGdyaWQtYXJlYTogZ3JpZC1zaWRlYmFyLWxlZnQ7XG4gICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAgICAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICAgICAgZ2FwOiAwO1xuICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICBwb3NpdGlvbjogaW5pdGlhbDtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgaGVpZ2h0OiB1bnNldDtcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgICAgICAgcGFkZGluZzogMDtcbiAgICAgICAgcGFkZGluZy10b3A6IDJyZW07XG4gICAgICB9XG4gICAgfVxuXG4gICAgJiAuc2lkZWJhci5yaWdodCB7XG4gICAgICBncmlkLWFyZWE6IGdyaWQtc2lkZWJhci1yaWdodDtcbiAgICAgIG1hcmdpbi1yaWdodDogMDtcbiAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgICBAbWVkaWEgYWxsIGFuZCAoJG1vYmlsZSkge1xuICAgICAgICBtYXJnaW4tbGVmdDogaW5oZXJpdDtcbiAgICAgICAgbWFyZ2luLXJpZ2h0OiBpbmhlcml0O1xuICAgICAgfVxuICAgICAgQG1lZGlhIGFsbCBhbmQgbm90ICgkZGVza3RvcCkge1xuICAgICAgICBwb3NpdGlvbjogaW5pdGlhbDtcbiAgICAgICAgaGVpZ2h0OiB1bnNldDtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgICAgIHBhZGRpbmc6IDA7XG4gICAgICAgICYgPiAqIHtcbiAgICAgICAgICBmbGV4OiAxO1xuICAgICAgIC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WV2ZW50czogbm9uZTtcbiAgICBjb250ZW50OiBcIlwiO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGhlaWdodDogNTBweDtcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgbGVmdDogMDtcbiAgICBib3R0b206IDA7XG4gICAgb3BhY2l0eTogMTtcbiAgICB0cmFuc2l0aW9uOiBvcGFjaXR5IDAuM3MgZWFzZTtcbiAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQodHJhbnNwYXJlbnQgMHB4LCB2YXIoLS1saWdodCkpO1xuICB9Ki9cbn1cblxuLnRyYW5zY2x1ZGUge1xuICB1bCB7XG4gICAgcGFkZGluZy1sZWZ0OiAxcmVtO1xuICB9XG59XG5cbi5rYXRleC1kaXNwbGF5IHtcbiAgb3ZlcmZsb3cteDogYXV0bztcbiAgb3ZlcmZsb3cteTogaGlkZGVuO1xufVxuXG4uZXh0ZXJuYWwtZW1iZWQueW91dHViZSxcbmlmcmFtZS5wZGYge1xuICBhc3BlY3QtcmF0aW86IDE2IC8gOTtcbiAgaGVpZ2h0OiAxMDAlO1xuICB3aWR0aDogMTAwJTtcbiAgYm9yZGVyLXJhZGl1czogNXB4O1xufVxuXG4ubmF2aWdhdGlvbi1wcm9ncmVzcyB7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbiAgdG9wOiAwO1xuICBsZWZ0OiAwO1xuICB3aWR0aDogMDtcbiAgaGVpZ2h0OiAzcHg7XG4gIGJhY2tncm91bmQ6IHZhcigtLXNlY29uZGFyeSk7XG4gIHRyYW5zaXRpb246IHdpZHRoIDAuMnMgZWFzZTtcbiAgei1pbmRleDogOTk5OTtcbn1cbiJdfQ== */`;var popover_default=`/**
|
|
* Layout breakpoints
|
|
* $mobile: screen width below this value will use mobile styles
|
|
* $desktop: screen width above this value will use desktop styles
|
|
* Screen width between $mobile and $desktop width will use the tablet layout.
|
|
* assuming mobile < desktop
|
|
*/
|
|
@keyframes dropin {
|
|
0% {
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
}
|
|
1% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
}
|
|
.popover {
|
|
z-index: 999;
|
|
position: absolute;
|
|
overflow: visible;
|
|
padding: 1rem;
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
}
|
|
.popover > .popover-inner {
|
|
position: relative;
|
|
width: 30rem;
|
|
max-height: 20rem;
|
|
padding: 0 1rem 1rem 1rem;
|
|
font-weight: initial;
|
|
font-style: initial;
|
|
line-height: normal;
|
|
font-size: initial;
|
|
font-family: var(--bodyFont);
|
|
border: 1px solid var(--lightgray);
|
|
background-color: var(--light);
|
|
border-radius: 5px;
|
|
box-shadow: 6px 6px 36px 0 rgba(0, 0, 0, 0.25);
|
|
overflow: auto;
|
|
white-space: normal;
|
|
}
|
|
.popover > .popover-inner[data-content-type][data-content-type*=pdf], .popover > .popover-inner[data-content-type][data-content-type*=image] {
|
|
padding: 0;
|
|
max-height: 100%;
|
|
}
|
|
.popover > .popover-inner[data-content-type][data-content-type*=image] img {
|
|
margin: 0;
|
|
border-radius: 0;
|
|
display: block;
|
|
}
|
|
.popover > .popover-inner[data-content-type][data-content-type*=pdf] iframe {
|
|
width: 100%;
|
|
}
|
|
.popover h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
@media all and ((max-width: 800px)) {
|
|
.popover {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
a:hover .popover,
|
|
.popover:hover {
|
|
animation: dropin 0.3s ease;
|
|
animation-fill-mode: forwards;
|
|
animation-delay: 0.2s;
|
|
}
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvc215YWx5Z2FtZXMvUmVwb3NpdG9yaWVzL0FDSVQ0MzMwLVBhZ2UvcXVhcnR6L2NvbXBvbmVudHMvc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AgICAgbWFyZ2luOiAwO1xuICAgICAgICBib3JkZXItcmFkaXVzOiAwO1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgIH1cbiAgICB9XG5cbiAgICAmW2RhdGEtY29udGVudC10eXBlKj1cInBkZlwiXSB7XG4gICAgICBpZnJhbWUge1xuICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBoMSB7XG4gICAgZm9udC1zaXplOiAxLjVyZW07XG4gIH1cblxuICB2aXNpYmlsaXR5OiBoaWRkZW47XG4gIG9wYWNpdHk6IDA7XG4gIHRyYW5zaXRpb246XG4gICAgb3BhY2l0eSAwLjNzIGVhc2UsXG4gICAgdmlzaWJpbGl0eSAwLjNzIGVhc2U7XG5cbiAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gIH1cbn1cblxuYTpob3ZlciAucG9wb3Zlcixcbi5wb3BvdmVyOmhvdmVyIHtcbiAgYW5pbWF0aW9uOiBkcm9waW4gMC4zcyBlYXNlO1xuICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkcztcbiAgYW5pbWF0aW9uLWRlbGF5OiAwLjJzO1xufVxuIl19 */`;import{Features,transform}from"lightningcss";import{transform as transpile}from"esbuild";function getComponentResources(ctx){let allComponents=new Set;for(let emitter of ctx.cfg.plugins.emitters){let components=emitter.getQuartzComponents(ctx);for(let component of components)allComponents.add(component)}let componentResources={css:new Set,beforeDOMLoaded:new Set,afterDOMLoaded:new Set};for(let component of allComponents){let{css,beforeDOMLoaded,afterDOMLoaded}=component;css&&componentResources.css.add(css),beforeDOMLoaded&&componentResources.beforeDOMLoaded.add(beforeDOMLoaded),afterDOMLoaded&&componentResources.afterDOMLoaded.add(afterDOMLoaded)}return{css:[...componentResources.css],beforeDOMLoaded:[...componentResources.beforeDOMLoaded],afterDOMLoaded:[...componentResources.afterDOMLoaded]}}__name(getComponentResources,"getComponentResources");async function joinScripts(scripts){let script=scripts.map(script2=>`(function () {${script2}})();`).join(`
|
|
`);return(await transpile(script,{minify:!0})).code}__name(joinScripts,"joinScripts");function addGlobalPageResources(ctx,componentResources){let cfg=ctx.cfg.configuration;if(cfg.enablePopovers&&(componentResources.afterDOMLoaded.push(popover_inline_default),componentResources.css.push(popover_default)),cfg.analytics?.provider==="google"){let tagId=cfg.analytics.tagId;componentResources.afterDOMLoaded.push(`
|
|
const gtagScript = document.createElement("script")
|
|
gtagScript.src = "https://www.googletagmanager.com/gtag/js?id=${tagId}"
|
|
gtagScript.async = true
|
|
document.head.appendChild(gtagScript)
|
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag() { dataLayer.push(arguments); }
|
|
gtag("js", new Date());
|
|
gtag("config", "${tagId}", { send_page_view: false });
|
|
|
|
document.addEventListener("nav", () => {
|
|
gtag("event", "page_view", {
|
|
page_title: document.title,
|
|
page_location: location.href,
|
|
});
|
|
});`)}else if(cfg.analytics?.provider==="plausible"){let plausibleHost=cfg.analytics.host??"https://plausible.io";componentResources.afterDOMLoaded.push(`
|
|
const plausibleScript = document.createElement("script")
|
|
plausibleScript.src = "${plausibleHost}/js/script.manual.js"
|
|
plausibleScript.setAttribute("data-domain", location.hostname)
|
|
plausibleScript.defer = true
|
|
document.head.appendChild(plausibleScript)
|
|
|
|
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }
|
|
|
|
document.addEventListener("nav", () => {
|
|
plausible("pageview")
|
|
})
|
|
`)}else if(cfg.analytics?.provider==="umami")componentResources.afterDOMLoaded.push(`
|
|
const umamiScript = document.createElement("script")
|
|
umamiScript.src = "${cfg.analytics.host??"https://analytics.umami.is"}/script.js"
|
|
umamiScript.setAttribute("data-website-id", "${cfg.analytics.websiteId}")
|
|
umamiScript.async = true
|
|
|
|
document.head.appendChild(umamiScript)
|
|
`);else if(cfg.analytics?.provider==="goatcounter")componentResources.afterDOMLoaded.push(`
|
|
document.addEventListener("nav", () => {
|
|
const goatcounterScript = document.createElement("script")
|
|
goatcounterScript.src = "${cfg.analytics.scriptSrc??"https://gc.zgo.at/count.js"}"
|
|
goatcounterScript.async = true
|
|
goatcounterScript.setAttribute("data-goatcounter",
|
|
"https://${cfg.analytics.websiteId}.${cfg.analytics.host??"goatcounter.com"}/count")
|
|
document.head.appendChild(goatcounterScript)
|
|
})
|
|
`);else if(cfg.analytics?.provider==="posthog")componentResources.afterDOMLoaded.push(`
|
|
const posthogScript = document.createElement("script")
|
|
posthogScript.innerHTML= \`!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
|
posthog.init('${cfg.analytics.apiKey}',{api_host:'${cfg.analytics.host??"https://app.posthog.com"}'})\`
|
|
document.head.appendChild(posthogScript)
|
|
`);else if(cfg.analytics?.provider==="tinylytics"){let siteId=cfg.analytics.siteId;componentResources.afterDOMLoaded.push(`
|
|
const tinylyticsScript = document.createElement("script")
|
|
tinylyticsScript.src = "https://tinylytics.app/embed/${siteId}.js"
|
|
tinylyticsScript.defer = true
|
|
document.head.appendChild(tinylyticsScript)
|
|
`)}else cfg.analytics?.provider==="cabin"?componentResources.afterDOMLoaded.push(`
|
|
const cabinScript = document.createElement("script")
|
|
cabinScript.src = "${cfg.analytics.host??"https://scripts.withcabin.com"}/hello.js"
|
|
cabinScript.defer = true
|
|
cabinScript.async = true
|
|
document.head.appendChild(cabinScript)
|
|
`):cfg.analytics?.provider==="clarity"&&componentResources.afterDOMLoaded.push(`
|
|
const clarityScript = document.createElement("script")
|
|
clarityScript.innerHTML= \`(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
|
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
|
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
|
})(window, document, "clarity", "script", "${cfg.analytics.projectId}");\`
|
|
document.head.appendChild(clarityScript)
|
|
`);cfg.enableSPA?componentResources.afterDOMLoaded.push(spa_inline_default):componentResources.afterDOMLoaded.push(`
|
|
window.spaNavigate = (url, _) => window.location.assign(url)
|
|
window.addCleanup = () => {}
|
|
const event = new CustomEvent("nav", { detail: { url: document.body.dataset.slug } })
|
|
document.dispatchEvent(event)
|
|
`)}__name(addGlobalPageResources,"addGlobalPageResources");var ComponentResources=__name(()=>({name:"ComponentResources",getQuartzComponents(){return[]},async getDependencyGraph(_ctx,_content,_resources){return new DepGraph},async emit(ctx,_content,_resources){let promises=[],cfg=ctx.cfg.configuration,componentResources=getComponentResources(ctx),googleFontsStyleSheet="";if(cfg.theme.fontOrigin!=="local"){if(cfg.theme.fontOrigin==="googleFonts"&&!cfg.theme.cdnCaching){let match,fontSourceRegex=/url\((https:\/\/fonts.gstatic.com\/s\/[^)]+\.(woff2|ttf))\)/g;for(googleFontsStyleSheet=await(await fetch(googleFontHref(ctx.cfg.configuration.theme))).text();(match=fontSourceRegex.exec(googleFontsStyleSheet))!==null;){let url=match[1],[filename,ext]=url.split("/").pop().split(".");googleFontsStyleSheet=googleFontsStyleSheet.replace(url,`https://${cfg.baseUrl}/static/fonts/${filename}.ttf`),promises.push(fetch(url).then(res=>{if(!res.ok)throw new Error("Failed to fetch font");return res.arrayBuffer()}).then(buf=>write({ctx,slug:joinSegments("static","fonts",filename),ext:`.${ext}`,content:Buffer.from(buf)})))}}}addGlobalPageResources(ctx,componentResources);let stylesheet=joinStyles(ctx.cfg.configuration.theme,googleFontsStyleSheet,...componentResources.css,custom_default),[prescript,postscript]=await Promise.all([joinScripts(componentResources.beforeDOMLoaded),joinScripts(componentResources.afterDOMLoaded)]);return promises.push(write({ctx,slug:"index",ext:".css",content:transform({filename:"index.css",code:Buffer.from(stylesheet),minify:!0,targets:{safari:984576,ios_saf:984576,edge:7536640,firefox:6684672,chrome:7143424},include:Features.MediaQueries}).code.toString()}),write({ctx,slug:"prescript",ext:".js",content:prescript}),write({ctx,slug:"postscript",ext:".js",content:postscript})),await Promise.all(promises)}}),"ComponentResources");var NotFoundPage=__name(()=>{let opts={...sharedPageComponents,pageBody:__default(),beforeBody:[],left:[],right:[]},{head:Head,pageBody,footer:Footer}=opts,Body2=Body_default();return{name:"404Page",getQuartzComponents(){return[Head,Body2,pageBody,Footer]},async getDependencyGraph(_ctx,_content,_resources){return new DepGraph},async emit(ctx,_content,resources){let cfg=ctx.cfg.configuration,slug="404",path13=new URL(`https://${cfg.baseUrl??"example.com"}`).pathname,notFound=i18n(cfg.locale).pages.error.title,[tree,vfile]=defaultProcessedContent({slug,text:notFound,description:notFound,frontmatter:{title:notFound,tags:[]}}),externalResources=pageResources(path13,vfile.data,resources),componentData={ctx,fileData:vfile.data,externalResources,cfg,children:[],tree,allFiles:[]};return[await write({ctx,content:renderPage(cfg,slug,componentData,opts,externalResources),slug,ext:".html"})]}}},"NotFoundPage");import chalk5 from"chalk";function getStaticResourcesFromPlugins(ctx){let staticResources={css:[],js:[]};for(let transformer of ctx.cfg.plugins.transformers){let res=transformer.externalResources?transformer.externalResources(ctx):{};res?.js&&staticResources.js.push(...res.js),res?.css&&staticResources.css.push(...res.css)}if(ctx.argv.serve){let wsUrl=ctx.argv.remoteDevHost?`wss://${ctx.argv.remoteDevHost}:${ctx.argv.wsPort}`:`ws://localhost:${ctx.argv.wsPort}`;staticResources.js.push({loadTime:"afterDOMReady",contentType:"inline",script:`
|
|
const socket = new WebSocket('${wsUrl}')
|
|
// reload(true) ensures resources like images and scripts are fetched again in firefox
|
|
socket.addEventListener('message', () => document.location.reload(true))
|
|
`})}return staticResources}__name(getStaticResourcesFromPlugins,"getStaticResourcesFromPlugins");async function emitContent(ctx,content){let{argv,cfg}=ctx,perf=new PerfTimer,log=new QuartzLogger(ctx.argv.verbose);log.start("Emitting output files");let emittedFiles=0,staticResources=getStaticResourcesFromPlugins(ctx);for(let emitter of cfg.plugins.emitters)try{let emitted=await emitter.emit(ctx,content,staticResources);if(emittedFiles+=emitted.length,ctx.argv.verbose)for(let file of emitted)console.log(`[emit:${emitter.name}] ${file}`)}catch(err){trace(`Failed to emit from plugin \`${emitter.name}\``,err)}log.end(`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince()}`)}__name(emitContent,"emitContent");var config={configuration:{pageTitle:"ACIT4330 Lecture Notes",pageTitleSuffix:"",enableSPA:!0,enablePopovers:!0,analytics:{provider:"plausible"},locale:"en-GB",baseUrl:"quartz.jzhao.xyz",ignorePatterns:["private","templates",".obsidian"],defaultDateType:"created",generateSocialImages:!1,theme:{fontOrigin:"googleFonts",cdnCaching:!0,typography:{header:"Schibsted Grotesk",body:"Source Sans Pro",code:"IBM Plex Mono"},colors:{lightMode:{light:"#faf8f8",lightgray:"#e5e5e5",gray:"#b8b8b8",darkgray:"#4e4e4e",dark:"#2b2b2b",secondary:"#284b63",tertiary:"#84a59d",highlight:"rgba(143, 159, 169, 0.15)",textHighlight:"#fff23688"},darkMode:{light:"#161618",lightgray:"#393639",gray:"#646464",darkgray:"#d4d4d4",dark:"#ebebec",secondary:"#7b97aa",tertiary:"#84a59d",highlight:"rgba(143, 159, 169, 0.15)",textHighlight:"#b3aa0288"}}}},plugins:{transformers:[FrontMatter(),CreatedModifiedDate({priority:["frontmatter","filesystem"]}),SyntaxHighlighting({theme:{light:"github-light",dark:"github-dark"},keepBackground:!1}),ObsidianFlavoredMarkdown({enableInHtmlEmbed:!1}),GitHubFlavoredMarkdown(),TableOfContents(),CrawlLinks({markdownLinkResolution:"shortest"}),Description(),Latex({renderEngine:"katex"}),HardLineBreaks()],filters:[RemoveDrafts()],emitters:[AliasRedirects(),ComponentResources(),ContentPage(),FolderPage(),TagPage(),ContentIndex({enableSiteMap:!0,enableRSS:!0}),Assets(),Static(),NotFoundPage()]}},quartz_config_default=config;import chokidar from"chokidar";import fs6 from"fs";import{fileURLToPath}from"url";var options={retrieveSourceMap(source){if(source.includes(".quartz-cache")){let realSource=fileURLToPath(source.split("?",2)[0]+".map");return{map:fs6.readFileSync(realSource,"utf8")}}else return null}};sourceMapSupport.install(options);function newBuildId(){return Math.random().toString(36).substring(2,8)}__name(newBuildId,"newBuildId");async function buildQuartz(argv,mut,clientRefresh){let ctx={buildId:newBuildId(),argv,cfg:quartz_config_default,allSlugs:[]},perf=new PerfTimer,output=argv.output,pluginCount=Object.values(quartz_config_default.plugins).flat().length,pluginNames=__name(key=>quartz_config_default.plugins[key].map(plugin=>plugin.name),"pluginNames");argv.verbose&&(console.log(`Loaded ${pluginCount} plugins`),console.log(` Transformers: ${pluginNames("transformers").join(", ")}`),console.log(` Filters: ${pluginNames("filters").join(", ")}`),console.log(` Emitters: ${pluginNames("emitters").join(", ")}`));let release=await mut.acquire();perf.addEvent("clean"),await rimraf(path12.join(output,"*"),{glob:!0}),console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`),perf.addEvent("glob");let allFiles=await glob("**/*.*",argv.directory,quartz_config_default.configuration.ignorePatterns),fps=allFiles.filter(fp=>fp.endsWith(".md")).sort();console.log(`Found ${fps.length} input files from \`${argv.directory}\` in ${perf.timeSince("glob")}`);let filePaths=fps.map(fp=>joinSegments(argv.directory,fp));ctx.allSlugs=allFiles.map(fp=>slugifyFilePath(fp));let parsedFiles=await parseMarkdown(ctx,filePaths),filteredContent=filterContent(ctx,parsedFiles),dependencies={};if(argv.fastRebuild){let staticResources=getStaticResourcesFromPlugins(ctx);for(let emitter of quartz_config_default.plugins.emitters)dependencies[emitter.name]=await emitter.getDependencyGraph?.(ctx,filteredContent,staticResources)??null}if(await emitContent(ctx,filteredContent),console.log(chalk6.green(`Done processing ${fps.length} files in ${perf.timeSince()}`)),release(),argv.serve)return startServing(ctx,mut,parsedFiles,clientRefresh,dependencies)}__name(buildQuartz,"buildQuartz");async function startServing(ctx,mut,initialContent,clientRefresh,dependencies){let{argv}=ctx,contentMap=new Map;for(let content of initialContent){let[_tree,vfile]=content;contentMap.set(vfile.data.filePath,content)}let buildData={ctx,mut,dependencies,contentMap,ignored:await isGitIgnored(),initialSlugs:ctx.allSlugs,toRebuild:new Set,toRemove:new Set,trackedAssets:new Set,lastBuildMs:0},watcher=chokidar.watch(".",{persistent:!0,cwd:argv.directory,ignoreInitial:!0}),buildFromEntry=argv.fastRebuild?partialRebuildFromEntrypoint:rebuildFromEntrypoint;return watcher.on("add",fp=>buildFromEntry(fp,"add",clientRefresh,buildData)).on("change",fp=>buildFromEntry(fp,"change",clientRefresh,buildData)).on("unlink",fp=>buildFromEntry(fp,"delete",clientRefresh,buildData)),async()=>{await watcher.close()}}__name(startServing,"startServing");async function partialRebuildFromEntrypoint(filepath,action,clientRefresh,buildData){let{ctx,ignored,dependencies,contentMap,mut,toRemove}=buildData,{argv,cfg}=ctx;if(ignored(filepath))return;let buildId=newBuildId();ctx.buildId=buildId,buildData.lastBuildMs=new Date().getTime();let release=await mut.acquire();if(ctx.buildId!==buildId){release();return}let perf=new PerfTimer;console.log(chalk6.yellow("Detected change, rebuilding..."));let fp=joinSegments(argv.directory,toPosixPath(filepath)),staticResources=getStaticResourcesFromPlugins(ctx),processedFiles=[];switch(action){case"add":processedFiles=await parseMarkdown(ctx,[fp]),processedFiles.forEach(([tree,vfile])=>contentMap.set(vfile.data.filePath,[tree,vfile]));for(let emitter of cfg.plugins.emitters){let emitterGraph=await emitter.getDependencyGraph?.(ctx,processedFiles,staticResources)??null;if(emitterGraph){let existingGraph=dependencies[emitter.name];existingGraph!==null?existingGraph.mergeGraph(emitterGraph):dependencies[emitter.name]=emitterGraph}}break;case"change":if(processedFiles=await parseMarkdown(ctx,[fp]),processedFiles.forEach(([tree,vfile])=>contentMap.set(vfile.data.filePath,[tree,vfile])),path12.extname(fp)===".md")for(let emitter of cfg.plugins.emitters){let emitterGraph=await emitter.getDependencyGraph?.(ctx,processedFiles,staticResources)??null;emitterGraph?.hasNode(fp)&&dependencies[emitter.name]?.updateIncomingEdgesForNode(emitterGraph,fp)}break;case"delete":toRemove.add(fp);break}argv.verbose&&console.log(`Updated dependency graphs in ${perf.timeSince()}`),perf.addEvent("rebuild");let emittedFiles=0;for(let emitter of cfg.plugins.emitters){let depGraph=dependencies[emitter.name];if(depGraph===null){argv.verbose&&console.log(`Emitter ${emitter.name} doesn't define a dependency graph. Calling it with all files...`);let files=[...contentMap.values()].filter(([_node,vfile])=>!toRemove.has(vfile.data.filePath)),emittedFps=await emitter.emit(ctx,files,staticResources);if(ctx.argv.verbose)for(let file of emittedFps)console.log(`[emit:${emitter.name}] ${file}`);emittedFiles+=emittedFps.length;continue}if(depGraph.hasNode(fp)){let upstreamContent=[...depGraph.getLeafNodeAncestors(fp)].filter(file=>contentMap.has(file)).filter(file=>!toRemove.has(file)).map(file=>contentMap.get(file)),emittedFps=await emitter.emit(ctx,upstreamContent,staticResources);if(ctx.argv.verbose)for(let file of emittedFps)console.log(`[emit:${emitter.name}] ${file}`);emittedFiles+=emittedFps.length}}console.log(`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince("rebuild")}`);let destinationsToDelete=new Set;for(let file of toRemove)contentMap.delete(file),Object.values(dependencies).forEach(depGraph=>{depGraph?.removeNode(file),depGraph?.removeOrphanNodes()?.forEach(node=>{node.startsWith(argv.output)&&destinationsToDelete.add(node)})});await rimraf([...destinationsToDelete]),console.log(chalk6.green(`Done rebuilding in ${perf.timeSince()}`)),toRemove.clear(),release(),clientRefresh()}__name(partialRebuildFromEntrypoint,"partialRebuildFromEntrypoint");async function rebuildFromEntrypoint(fp,action,clientRefresh,buildData){let{ctx,ignored,mut,initialSlugs,contentMap,toRebuild,toRemove,trackedAssets}=buildData,{argv}=ctx;if(ignored(fp))return;fp=toPosixPath(fp);let filePath=joinSegments(argv.directory,fp);if(path12.extname(fp)!==".md"){action==="add"||action==="change"?trackedAssets.add(filePath):action==="delete"&&trackedAssets.delete(filePath),clientRefresh();return}action==="add"||action==="change"?toRebuild.add(filePath):action==="delete"&&toRemove.add(filePath);let buildId=newBuildId();ctx.buildId=buildId,buildData.lastBuildMs=new Date().getTime();let release=await mut.acquire();if(ctx.buildId!==buildId){release();return}let perf=new PerfTimer;console.log(chalk6.yellow("Detected change, rebuilding..."));try{let filesToRebuild=[...toRebuild].filter(fp2=>!toRemove.has(fp2)),parsedContent=await parseMarkdown(ctx,filesToRebuild);for(let content of parsedContent){let[_tree,vfile]=content;contentMap.set(vfile.data.filePath,content)}for(let fp2 of toRemove)contentMap.delete(fp2);let parsedFiles=[...contentMap.values()],filteredContent=filterContent(ctx,parsedFiles),trackedSlugs=[...new Set([...contentMap.keys(),...toRebuild,...trackedAssets])].filter(fp2=>!toRemove.has(fp2)).map(fp2=>slugifyFilePath(path12.posix.relative(argv.directory,fp2)));ctx.allSlugs=[...new Set([...initialSlugs,...trackedSlugs])],await rimraf(path12.join(argv.output,".*"),{glob:!0}),await emitContent(ctx,filteredContent),console.log(chalk6.green(`Done rebuilding in ${perf.timeSince()}`))}catch(err){console.log(chalk6.yellow("Rebuild failed. Waiting on a change to fix the error...")),argv.verbose&&console.log(chalk6.red(err))}clientRefresh(),toRebuild.clear(),toRemove.clear(),release()}__name(rebuildFromEntrypoint,"rebuildFromEntrypoint");var build_default=__name(async(argv,mut,clientRefresh)=>{try{return await buildQuartz(argv,mut,clientRefresh)}catch(err){trace(`
|
|
Exiting Quartz due to a fatal error`,err)}},"default");export{build_default as default};
|
|
//# sourceMappingURL=transpiled-build.mjs.map
|