Files
2026-02-13 22:24:27 +08:00

3 lines
41 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var qe=Object.defineProperty;var Ve=(e,t,i)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var C=(e,t,i)=>(Ve(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const b of c)if(b.type==="childList")for(const y of b.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&l(y)}).observe(document,{childList:!0,subtree:!0});function i(c){const b={};return c.integrity&&(b.integrity=c.integrity),c.referrerPolicy&&(b.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?b.credentials="include":c.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function l(c){if(c.ep)return;c.ep=!0;const b=i(c);fetch(c.href,b)}})();const Ge="monaco-editor",Ye="Zuoqiu Yingyi",Xe="https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor",Ke="0.2.5",Ze="3.0.12",Je=["代码","代碼","程式碼","code","visual","studio","vscode","monaco","编辑器","編輯器","editor","vditor","文件","資料","file","文件夹","文件夾","資料夾","folder","管理","manage","资源管理器","資源管理器","explorer","markdown","所见即所得","所見即所得","wysiwyg","下载","下載","download","上传","上傳","upload"],Qe=["all"],et=["desktop","desktop-window","browser-desktop"],tt={default:"Integrated Edit Environment",zh_CN:"集成编辑环境",zh_CHT:"集成編輯環境"},it={default:"A file editing tool integrating <a href='https://microsoft.github.io/monaco-editor/'>Monaco Editor</a>.",zh_CN:"一个集成了 <a href='https://microsoft.github.io/monaco-editor/'>Monaco Editor</a> 的文件编辑工具。",zh_CHT:"一個集成了 <a href='https://microsoft.github.io/monaco-editor/'>Monaco Editor</a> 的文件編輯工具。"},ot={default:"README.md",zh_CN:"README_zh_CN.md",zh_CHT:"README_zh_CN.md"},rt={openCollective:"",patreon:"",github:"",custom:["https://afdian.net/a/zuoqiu","https://ko-fi.com/zuoqiu"]},ai={name:Ge,author:Ye,url:Xe,version:Ke,minAppVersion:Ze,keywords:Je,backends:Qe,frontends:et,displayName:tt,description:it,readme:ot,funding:rt},at={fullscreen:{ariaLabel:"Fullscreen"},realTime:{ariaLabel:"Save changes in real time"},workspace:{text:"Workspace"}},nt="Integrated Edit Environment",st={collapse:{ariaLabel:"Collapse All Folder"},inline:{ariaLabel:`markdown: Edit standard markdown
kramdown: Inline elements use <span> tags`},kramdown:{ariaLabel:"Edit with kramdown"},refresh:{ariaLabel:"Save changes in real time"},title:"Code Edit"},lt={action:{save:{label:"Save"},saveAs:{label:"Save As"},setModelLanguage:{label:"Set Editor Model Language"},toggleWordWrap:{label:"Toggle Word Wrap"}},tooltip:{siyuanBlockHyperlink:{label:"SiYuan block hyperlink"},siyuanBlockID:{label:"SiYuan block ID"},siyuanBlockReference:{label:"SiYuan block reference"}}},ct={count:{ariaLabel:"Number of Resources"},file:{ariaLabel:"File"},fold:{ariaLabel:"Collapse"},folder:{ariaLabel:"Folder"},lastUpdated:{text:"Last Updated"},menu:{ariaLabel:"Menu"},refresh:{ariaLabel:"Refresh Explorer"},symlink:{ariaLabel:"Symbolic Link"},title:"File Explorer",toggle:{ariaLabel:"Collapse/Expand"},tooltips:{paths:[["conf","Configuration directory"],["conf/appearance","Appearance directory"],["conf/appearance/boot","Boot window directory"],["conf/appearance/emojis","Emojis directory"],["conf/appearance/icons","Interface icons directory"],["conf/appearance/langs","Localization directory"],["conf/appearance/themes","Themes directory"],["conf/conf.json","Configuration file"],["conf/windowState.json","Window state file"],["data","Data directory"],["data/.siyuan","Metadata directory"],["data/.siyuan/filesys_status_check","File system status check temporary file directory"],["data/.siyuan/conf.json","Data directory state file"],["data/.siyuan/syncignore","Data snapshot ignore configuration file"],["data/assets","Resources file directory"],["data/assets/ocr-texts.json","Image OCR results"],["data/emojis","Custom emojis file directory"],["data/plugins","Plugins directory"],["data/public","Public file directory"],["data/snippets","Code snippets directory"],["data/snippets/conf.json","Code snippets list"],["data/storage","Data storage directory"],["data/storage/av","Attribute view directory"],["data/storage/petal","Plugin data directory"],["data/storage/petal/petals.json","Plugin status directory"],["data/storage/riff","Flashcard data directory"],["data/storage/criteria.json","Search configuration"],["data/storage/local.json","Local interface configuration"],["data/storage/recent-doc.json","Recently opened documents"],["data/templates","Template directory"],["data/widgets","Widgets directory"],["history","History data directory"],["repo","Data snapshot directory"],["temp","Temporary file directory"],["temp/blocktree","Content block structure index directory"],["temp/os","System information directory"],["temp/pandoc","Pandoc directory"],["temp/pandoc/bin","Pandoc executable file directory"],["temp/history.db","Historical document index database file"],["temp/history.db-shm","Historical document index database shared memory file"],["temp/history.db-wal","Historical document index database write-ahead log file"],["temp/siyuan.db","Content block index database file"],["temp/siyuan.db-shm","Content block index database shared memory file"],["temp/siyuan.db-wal","Content block index database write-ahead log file"],["temp/siyuan.log","Kernel log file"],[".lock","Workspace occupied flag"]],siyuanDoc:"Document file",siyuanDocCustomSort:"Document customized sort file",siyuanDocDir:"Document directory",siyuanNotebook:"Notebook directory",siyuanNotebookConfig:"Notebook configuration file",siyuanNotebookMetadataDir:"Notebook metadata directory"},unfold:{ariaLabel:"Expand"},workspace:{name:"Workspace"}},dt={charset:{label:"Character set",placeholder:"The name of the character set",text:"Open the file with encoding"},confirm:{placeholder:"The full path to the resource",text:"Warning: You are operating on a protected resource ${1} !<br/>Your subsequent activities may lead to data loss or damage!<br/><br/>If you want to continue the operation, please enter the complete path of the resource ${2} in the text box below",tips:{pleaseEnter:"Please enter the complete path of the resource",warn:"Are you sure you want to continue operating the resource ${1}?"},title:"⚠️ High-risk operation confirmation"},copy:{label:"Copy"},copyDownloadHyperlink:{label:"Copy Download Hyperlink"},copyEditHyperlink:{label:"Copy Edit Hyperlink"},copyExportHyperlink:{label:"Copy Export Hyperlink"},copyFullPath:{label:"Copy Absolute Path"},copyMarkdownHyperlink:{label:"Copy Markdown Hyperlink"},copyName:{label:"Copy Name"},copyPreviewHyperlink:{label:"Copy Preview Hyperlink"},copyReferencePath:{label:"Copy Reference Path"},copyRelativePath:{label:"Copy Relative Path"},copyURL:{label:"Copy URL"},delete:{label:"Delete"},deleteFile:{label:"Delete File",text:"Make sure you want to delete the file ${1} ?<br/>The complete path of the file is ${2}"},deleteFolder:{label:"Delete Folder",text:"Make sure you want to delete the folder ${1} <br/>The complete path of the folder is ${2}"},diffEdit:{label:"Compare and Edit"},diffView:{label:"Compare and View"},download:{label:"Download"},editAssetFile:{label:"Edit Asset File"},editLocalFile:{label:"Edit Local File"},export:{accelerator:"Export",label:"Export..."},exportFile:{label:"File Export",message:"File ${1} has exported to ${2}, does you reveal it in explorer?",title:"Export file ${1}"},exportFolder:{label:"Folder Export",message:"Folder ${1} has exported to ${2}, does you reveal it in explorer?",title:"Export folder ${1}"},import:{label:"Import"},importFile:{label:"Files Import...",title:"Import files to ${1}"},importFolder:{label:"Folders Import...",title:"Import folders to ${1}"},move:{text:"Move ${1}<br/>from ${2}<br/>to&ensp;&ensp;、 ${3}?",title:"Move ${1}"},new:{label:"New"},newFile:{label:"New File...",placeholder:"File name",text:"Create a new file in the folder ${1}",tips:{empty:"The file name cannot be empty",exist:"${2} already exists under folder ${1}, please enter a different name",invalid:"Name ${1} is an invalid file name, please enter a different name",normal:"Create a new file ${1} ?",pleaseEnter:"Please enter a file name"}},newFolder:{label:"New Folder...",placeholder:"Folder name",text:"Create a new folder in the folder ${1}",tips:{empty:"The folder name cannot be empty",exist:"${2} already exists under folder ${1}, please enter a different name",invalid:"Name ${1} is an invalid folder name, please enter a different name",normal:"Create a new folder ${1} ?",pleaseEnter:"Please enter a folder name"}},open:{label:"Open"},openByNewWindow:{label:"Open with New Window"},openFile:{label:"Open File"},openFileInEditor:{label:"Open File in Text Editor"},openFileInPreviewer:{label:"Open File in File Previewer"},openInNewTab:{label:"Open in New Tab"},openTabBackground:{label:"Open in background tab"},openTabBottom:{label:"Open Below the Tab"},openTabRight:{label:"Open Right the Tab"},openWithDefaultProgram:{label:"Open with Default Program"},refresh:{label:"Refresh"},refreshDirectory:{label:"Refresh the Directory"},refreshDirectoryDeeply:{label:"Refresh the Directory Deeply"},rename:{label:"Rename..."},renameFile:{label:"Rename File",placeholder:"File name",text:"Rename file ${1}",tips:{empty:"The file name cannot be empty",exist:"${2} already exists under folder ${1}, please enter a different name",invalid:"Name ${1} is an invalid file name, please enter a different name",normal:"Rename file ${1} to ${2}?",pleaseEnter:"Please enter a new file name",same:"The file name has not changed"}},renameFolder:{label:"Rename Folder",placeholder:"Folder name",text:"Create a new folder in the folder ${1}",tips:{empty:"The folder name cannot be empty",exist:"${2} already exists under folder ${1}, please enter a different name",invalid:"Name ${1} is an invalid folder name, please enter a different name",normal:"Rename folder ${1} to ${2}?",pleaseEnter:"Please enter a new folder name",same:"The folder name has not changed"}},revealInExplorer:{label:"Reveal In Explorer"},standard:{accelerator:"Standard"},upload:{label:"Upload",tips:{confirm:"Confirm",reUpload:"Retry",startUpload:"Upload",statusInfo:"Number of files uploaded: ${1}/${2} &emsp; Size of files uploaded: ${3}/${4} Byte"}},uploadFile:{label:"Files Upload..."},uploadFolder:{label:"Folders Upload..."},viewNetworkFile:{label:"View Network File"}},ut={binaryError:"The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding.",openAnyway:"Open Anyway?"},bt={editorSettings:{globalTab:{defaultEditor:{markdown:{description:"Set the default editor for opening <code class='fn__code'>*.md</code> files",options:{monaco:"Monaco Editor",vditor:"Vditor Editor"},title:"Default Editor for Markdown Files"}},title:"Global Settings"},monacoTab:{title:"Monaco Editor",wordWrap:{description:"The word wrapping solution used in the editor",options:{bounded:"[bounded] Wrap at the minimum of custom column width and viewport width",off:"[off] Do not wrap",on:"[on] Wrap at the visible viewport",wordWrapColumn:"[wordWrapColumn] Wrap at the custom column width"},title:"Editor Word Wrapping Solution <span data-type='fn__code'>wordWrap</span>"}},title:"Editor Settings",vditorTab:{assetsDirPath:{description:"Set the directory for saving resource files, the specific directory depends on the <code class='fn__code'>Resource File Saving Scheme</code> setting",title:"Resource File Saving Directory"},assetsUploadMode:{description:"Save resource files to a specific directory, the specific directory depends on the <code class='fn__code'>Resource File Saving Directory</code> setting.<br/><code class='fn__code'>Upload to data/assets directory</code>: Upload files to the <code class='fn__code'>workspace/data/assets</code> directory, the specific directory is specified by the <code class='fn__code'>Resource File Saving Directory</code> setting.<br/><code class='fn__code'>Use relative path to specify directory</code>: Upload files to the directory specified by the <code class='fn__code'>Resource File Saving Directory</code> setting, with the working directory being the current file directory.<br/><code class='fn__code'>Use absolute path to specify directory</code>: Upload files to the directory specified by the <code class='fn__code'>Resource File Saving Directory</code> setting, with the working directory being the workspace directory.",options:{absolute:"Use absolute path to specify directory",assets:"Upload to data/assets directory",relative:"Use relative path to specify directory"},title:"Resource File Saving Scheme"},title:"Vditor Editor"}},generalSettings:{editor:{description:"Enable text editor sidebar panel",title:"Text Editor"},explorer:{description:"Enable explorer sidebar panel",title:"Explorer"},reset:{description:"Reset all settings options to default (page will refresh after reset)",text:"Reset",title:"Reset Settings"},safeMode:{description:"Whether to disable dangerous operations under the important directory",title:"Safe Mode"},title:"General Settings"},menuSettings:{history1:{description:"Context menu for file history panel",title:"File History Menu"},history2:{description:"Context menu for document history panel",title:"Document History Menu"},shorthand:{description:"Context menu for shorthand collection",title:"Shorthand Menu"},snapshot:{description:"Context menu for snapshot panel",title:"Snapshot Panel Menu"},snippet:{description:"Context menu for code snippets",title:"Code Snippets Menu"},title:"Menu Settings"}},ni={button:at,displayName:nt,dock:st,editor:lt,explorer:ct,menu:dt,message:ut,settings:bt},pt={get light(){return window.matchMedia("(prefers-color-scheme: light)")},get dark(){return window.matchMedia("(prefers-color-scheme: dark)")}},ft=vt(),ht=_t(),mt=Et();$e();kt();function wt(){return!!globalThis.require}function gt(){return!!globalThis.process}function yt(){var e,t;return!!((t=(e=globalThis.process)==null?void 0:e.versions)!=null&&t.hasOwnProperty("electron"))}function vt(){return gt()&&wt()&&yt()}function _t(){return globalThis.self!==globalThis.top}function Et(){return!globalThis.opener}function $e(){var i,l,c,b,y,E;switch((c=(l=(i=globalThis==null?void 0:globalThis.document)==null?void 0:i.documentElement)==null?void 0:l.dataset)==null?void 0:c.themeMode){case"light":return!0;case"dark":return!1}switch((E=(y=(b=globalThis==null?void 0:globalThis.siyuan)==null?void 0:b.config)==null?void 0:y.appearance)==null?void 0:E.mode){case 0:return!0;case 1:return!1}return pt.light.matches}function kt(){return!$e()}var xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pe={exports:{}};(function(e,t){(function(i,l){var c="1.0.37",b="",y="?",E="function",M="undefined",v="object",N="string",k="major",r="model",n="name",o="type",a="vendor",s="version",x="architecture",I="console",p="mobile",f="tablet",_="smarttv",F="wearable",ie="embedded",oe=500,V="Amazon",j="Apple",ge="ASUS",ye="BlackBerry",R="Browser",G="Chrome",Ue="Edge",Y="Firefox",X="Google",ve="Huawei",re="LG",ae="Microsoft",_e="Motorola",K="Opera",Z="Samsung",Ee="Sharp",J="Sony",ne="Xiaomi",se="Zebra",ke="Facebook",xe="Chromium OS",Te="Mac OS",We=function(h,w){var u={};for(var g in h)w[g]&&w[g].length%2===0?u[g]=w[g].concat(h[g]):u[g]=h[g];return u},Q=function(h){for(var w={},u=0;u<h.length;u++)w[h[u].toUpperCase()]=h[u];return w},Se=function(h,w){return typeof h===N?U(w).indexOf(U(h))!==-1:!1},U=function(h){return h.toLowerCase()},He=function(h){return typeof h===N?h.replace(/[^\d\.]/g,b).split(".")[0]:l},le=function(h,w){if(typeof h===N)return h=h.replace(/^\s\s*/,b),typeof w===M?h:h.substring(0,oe)},W=function(h,w){for(var u=0,g,O,S,m,d,A;u<w.length&&!d;){var de=w[u],Oe=w[u+1];for(g=O=0;g<de.length&&!d&&de[g];)if(d=de[g++].exec(h),d)for(S=0;S<Oe.length;S++)A=d[++O],m=Oe[S],typeof m===v&&m.length>0?m.length===2?typeof m[1]==E?this[m[0]]=m[1].call(this,A):this[m[0]]=m[1]:m.length===3?typeof m[1]===E&&!(m[1].exec&&m[1].test)?this[m[0]]=A?m[1].call(this,A,m[2]):l:this[m[0]]=A?A.replace(m[1],m[2]):l:m.length===4&&(this[m[0]]=A?m[3].call(this,A.replace(m[1],m[2])):l):this[m]=A||l;u+=2}},ce=function(h,w){for(var u in w)if(typeof w[u]===v&&w[u].length>0){for(var g=0;g<w[u].length;g++)if(Se(w[u][g],h))return u===y?l:u}else if(Se(w[u],h))return u===y?l:u;return h},Be={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ae={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Me={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[s,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[s,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,s],[/opios[\/ ]+([\w\.]+)/i],[s,[n,K+" Mini"]],[/\bopr\/([\w\.]+)/i],[s,[n,K]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[s,[n,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,s],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[s,[n,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[s,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[s,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[s,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[s,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[s,[n,"Smart Lenovo "+R]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+R],s],[/\bfocus\/([\w\.]+)/i],[s,[n,Y+" Focus"]],[/\bopt\/([\w\.]+)/i],[s,[n,K+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[s,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[s,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[s,[n,K+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[s,[n,"MIUI "+R]],[/fxios\/([-\w\.]+)/i],[s,[n,Y]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+R]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+R],s],[/samsungbrowser\/([\w\.]+)/i],[s,[n,Z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],s],[/metasr[\/ ]?([\d\.]+)/i],[s,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],s],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[n,s],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,ke],s],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[n,s],[/\bgsa\/([\w\.]+) .*safari\//i],[s,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[s,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[s,[n,G+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,G+" WebView"],s],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[s,[n,"Android "+R]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,s],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[s,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[s,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[s,ce,Be]],[/(webkit|khtml)\/([\w\.]+)/i],[n,s],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],s],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[s,[n,Y+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[n,s],[/(cobalt)\/([\w\.]+)/i],[n,[s,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[x,"amd64"]],[/(ia32(?=;))/i],[[x,U]],[/((?:i[346]|x)86)[;\)]/i],[[x,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/windows (ce|mobile); ppc;/i],[[x,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[x,/ower/,b,U]],[/(sun4\w)[;\)]/i],[[x,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[x,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[r,[a,Z],[o,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[r,[a,Z],[o,p]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[r,[a,j],[o,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[r,[a,j],[o,f]],[/(macintosh);/i],[r,[a,j]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[r,[a,Ee],[o,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[r,[a,ve],[o,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[r,[a,ve],[o,p]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[r,/_/g," "],[a,ne],[o,p]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[r,/_/g," "],[a,ne],[o,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[r,[a,"OPPO"],[o,p]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[r,[a,"Vivo"],[o,p]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[r,[a,"Realme"],[o,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[r,[a,_e],[o,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[r,[a,_e],[o,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[r,[a,re],[o,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[r,[a,re],[o,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[r,[a,"Lenovo"],[o,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[r,/_/g," "],[a,"Nokia"],[o,p]],[/(pixel c)\b/i],[r,[a,X],[o,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[r,[a,X],[o,p]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[r,[a,J],[o,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[r,"Xperia Tablet"],[a,J],[o,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[r,[a,"OnePlus"],[o,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[r,[a,V],[o,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[r,/(.+)/g,"Fire Phone $1"],[a,V],[o,p]],[/(playbook);[-\w\),; ]+(rim)/i],[r,a,[o,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[r,[a,ye],[o,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[r,[a,ge],[o,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[r,[a,ge],[o,p]],[/(nexus 9)/i],[r,[a,"HTC"],[o,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[a,[r,/_/g," "],[o,p]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[r,[a,"Acer"],[o,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[r,[a,"Meizu"],[o,p]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[r,[a,"Ulefone"],[o,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[a,r,[o,p]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,r,[o,f]],[/(surface duo)/i],[r,[a,ae],[o,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[r,[a,"Fairphone"],[o,p]],[/(u304aa)/i],[r,[a,"AT&T"],[o,p]],[/\bsie-(\w*)/i],[r,[a,"Siemens"],[o,p]],[/\b(rct\w+) b/i],[r,[a,"RCA"],[o,f]],[/\b(venue[\d ]{2,7}) b/i],[r,[a,"Dell"],[o,f]],[/\b(q(?:mv|ta)\w+) b/i],[r,[a,"Verizon"],[o,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[r,[a,"Barnes & Noble"],[o,f]],[/\b(tm\d{3}\w+) b/i],[r,[a,"NuVision"],[o,f]],[/\b(k88) b/i],[r,[a,"ZTE"],[o,f]],[/\b(nx\d{3}j) b/i],[r,[a,"ZTE"],[o,p]],[/\b(gen\d{3}) b.+49h/i],[r,[a,"Swiss"],[o,p]],[/\b(zur\d{3}) b/i],[r,[a,"Swiss"],[o,f]],[/\b((zeki)?tb.*\b) b/i],[r,[a,"Zeki"],[o,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],r,[o,f]],[/\b(ns-?\w{0,9}) b/i],[r,[a,"Insignia"],[o,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[r,[a,"NextBook"],[o,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],r,[o,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],r,[o,p]],[/\b(ph-1) /i],[r,[a,"Essential"],[o,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[r,[a,"Envizen"],[o,f]],[/\b(trio[-\w\. ]+) b/i],[r,[a,"MachSpeed"],[o,f]],[/\btu_(1491) b/i],[r,[a,"Rotor"],[o,f]],[/(shield[\w ]+) b/i],[r,[a,"Nvidia"],[o,f]],[/(sprint) (\w+)/i],[a,r,[o,p]],[/(kin\.[onetw]{3})/i],[[r,/\./g," "],[a,ae],[o,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[r,[a,se],[o,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[r,[a,se],[o,p]],[/smart-tv.+(samsung)/i],[a,[o,_]],[/hbbtv.+maple;(\d+)/i],[[r,/^/,"SmartTV"],[a,Z],[o,_]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,re],[o,_]],[/(apple) ?tv/i],[a,[r,j+" TV"],[o,_]],[/crkey/i],[[r,G+"cast"],[a,X],[o,_]],[/droid.+aft(\w+)( bui|\))/i],[r,[a,V],[o,_]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[r,[a,Ee],[o,_]],[/(bravia[\w ]+)( bui|\))/i],[r,[a,J],[o,_]],[/(mitv-\w{5}) bui/i],[r,[a,ne],[o,_]],[/Hbbtv.*(technisat) (.*);/i],[a,r,[o,_]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[a,le],[r,le],[o,_]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[o,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,r,[o,I]],[/droid.+; (shield) bui/i],[r,[a,"Nvidia"],[o,I]],[/(playstation [345portablevi]+)/i],[r,[a,J],[o,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[r,[a,ae],[o,I]],[/((pebble))app/i],[a,r,[o,F]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[r,[a,j],[o,F]],[/droid.+; (glass) \d/i],[r,[a,X],[o,F]],[/droid.+; (wt63?0{2,3})\)/i],[r,[a,se],[o,F]],[/(quest( 2| pro)?)/i],[r,[a,ke],[o,F]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[o,ie]],[/(aeobc)\b/i],[r,[a,V],[o,ie]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[r,[o,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[r,[o,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[o,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[o,p]],[/(android[-\w\. ]{0,9});.+buil/i],[r,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[s,[n,Ue+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[s,[n,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[n,s],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[s,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,s],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[s,ce,Ae]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,ce,Ae],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[s,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,Te],[s,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[s,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,s],[/\(bb(10);/i],[s,[n,ye]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[s,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[s,[n,Y+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[s,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[s,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[s,[n,G+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,xe],s],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[n,s],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],s],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,s]]},T=function(h,w){if(typeof h===v&&(w=h,h=l),!(this instanceof T))return new T(h,w).getResult();var u=typeof i!==M&&i.navigator?i.navigator:l,g=h||(u&&u.userAgent?u.userAgent:b),O=u&&u.userAgentData?u.userAgentData:l,S=w?We(Me,w):Me,m=u&&u.userAgent==g;return this.getBrowser=function(){var d={};return d[n]=l,d[s]=l,W.call(d,g,S.browser),d[k]=He(d[s]),m&&u&&u.brave&&typeof u.brave.isBrave==E&&(d[n]="Brave"),d},this.getCPU=function(){var d={};return d[x]=l,W.call(d,g,S.cpu),d},this.getDevice=function(){var d={};return d[a]=l,d[r]=l,d[o]=l,W.call(d,g,S.device),m&&!d[o]&&O&&O.mobile&&(d[o]=p),m&&d[r]=="Macintosh"&&u&&typeof u.standalone!==M&&u.maxTouchPoints&&u.maxTouchPoints>2&&(d[r]="iPad",d[o]=f),d},this.getEngine=function(){var d={};return d[n]=l,d[s]=l,W.call(d,g,S.engine),d},this.getOS=function(){var d={};return d[n]=l,d[s]=l,W.call(d,g,S.os),m&&!d[n]&&O&&O.platform!="Unknown"&&(d[n]=O.platform.replace(/chrome os/i,xe).replace(/macos/i,Te)),d},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(d){return g=typeof d===N&&d.length>oe?le(d,oe):d,this},this.setUA(g),this};T.VERSION=c,T.BROWSER=Q([n,s,k]),T.CPU=Q([x]),T.DEVICE=Q([r,a,o,I,p,_,f,F,ie]),T.ENGINE=T.OS=Q([n,s]),e.exports&&(t=e.exports=T),t.UAParser=T;var L=typeof i!==M&&(i.jQuery||i.Zepto);if(L&&!L.ua){var ee=new T;L.ua=ee.getResult(),L.ua.get=function(){return ee.getUA()},L.ua.set=function(h){ee.setUA(h);var w=ee.getResult();for(var u in w)L.ua[u]=w[u]}}})(typeof window=="object"?window:xt)})(pe,pe.exports);var St=pe.exports;const At=new St.UAParser,Ne=At.getResult();class si{constructor(t,i=!0){C(this,"FLAG_FIREFOX");this.label=t,this.collapsed=i,this.FLAG_FIREFOX=Ne.browser.name==="Firefox"||Ne.engine.name==="Gecko"}stdout(t,i,...l){const c=this.FLAG_FIREFOX?`[${this.label}] - <${t.name.toUpperCase()}>`:`[\x1B[4m${this.label}\x1B[0m] - <\x1B[1m${t.name.toUpperCase()}\x1B[0m>`;if(this.collapsed?globalThis.console.groupCollapsed(c):globalThis.console.group(c),i)for(const b of l)Array.isArray(b)?t(...b):t(b);else t(...l);globalThis.console.trace(),globalThis.console.groupEnd()}clear(...t){this.stdout(globalThis.console.clear,!1,...t)}countReset(...t){this.stdout(globalThis.console.countReset,!1,...t)}count(...t){this.stdout(globalThis.console.count,!1,...t)}counts(...t){this.stdout(globalThis.console.count,!0,...t)}assert(...t){this.stdout(globalThis.console.assert,!1,...t)}asserts(...t){this.stdout(globalThis.console.assert,!0,...t)}dir(...t){this.stdout(globalThis.console.dir,!1,...t)}dirs(...t){this.stdout(globalThis.console.dir,!0,...t)}dirxml(...t){this.stdout(globalThis.console.dirxml,!1,...t)}dirxmls(...t){this.stdout(globalThis.console.dirxml,!0,...t)}table(...t){this.stdout(globalThis.console.table,!1,...t)}tables(...t){this.stdout(globalThis.console.table,!0,...t)}debug(...t){this.stdout(globalThis.console.debug,!1,...t)}debugs(...t){this.stdout(globalThis.console.debug,!0,...t)}info(...t){this.stdout(globalThis.console.info,!1,...t)}infos(...t){this.stdout(globalThis.console.info,!0,...t)}log(...t){this.stdout(globalThis.console.log,!1,...t)}logs(...t){this.stdout(globalThis.console.log,!0,...t)}warn(...t){this.stdout(globalThis.console.warn,!1,...t)}warns(...t){this.stdout(globalThis.console.warn,!0,...t)}error(...t){this.stdout(globalThis.console.error,!1,...t)}errors(...t){this.stdout(globalThis.console.error,!0,...t)}}function fe(){}function Pe(e){return e()}function Re(){return Object.create(null)}function te(e){e.forEach(Pe)}function ze(e){return typeof e=="function"}function li(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Mt(e){return Object.keys(e).length===0}function ci(e,t,i){e.insertBefore(t,i||null)}function Ot(e){e.parentNode&&e.parentNode.removeChild(e)}function di(e){return document.createElement(e)}function ui(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function Nt(e){return Array.from(e.childNodes)}function bi(e,t,i){e.classList.toggle(t,!!i)}function Rt(e,t,{bubbles:i=!1,cancelable:l=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:l})}let B;function H(e){B=e}function we(){if(!B)throw new Error("Function called outside component initialization");return B}function pi(e){we().$$.on_mount.push(e)}function fi(e){we().$$.on_destroy.push(e)}function hi(){const e=we();return(t,i,{cancelable:l=!1}={})=>{const c=e.$$.callbacks[t];if(c){const b=Rt(t,i,{cancelable:l});return c.slice().forEach(y=>{y.call(e,b)}),!b.defaultPrevented}return!0}}const P=[],Ce=[];let z=[];const Fe=[],Ct=Promise.resolve();let he=!1;function Ft(){he||(he=!0,Ct.then(De))}function me(e){z.push(e)}const ue=new Set;let $=0;function De(){if($!==0)return;const e=B;do{try{for(;$<P.length;){const t=P[$];$++,H(t),Lt(t.$$)}}catch(t){throw P.length=0,$=0,t}for(H(null),P.length=0,$=0;Ce.length;)Ce.pop()();for(let t=0;t<z.length;t+=1){const i=z[t];ue.has(i)||(ue.add(i),i())}z.length=0}while(P.length);for(;Fe.length;)Fe.pop()();he=!1,ue.clear(),H(e)}function Lt(e){if(e.fragment!==null){e.update(),te(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(me)}}function $t(e){const t=[],i=[];z.forEach(l=>e.indexOf(l)===-1?t.push(l):i.push(l)),i.forEach(l=>l()),z=t}const Pt=new Set;function zt(e,t){e&&e.i&&(Pt.delete(e),e.i(t))}function Dt(e,t,i){const{fragment:l,after_update:c}=e.$$;l&&l.m(t,i),me(()=>{const b=e.$$.on_mount.map(Pe).filter(ze);e.$$.on_destroy?e.$$.on_destroy.push(...b):te(b),e.$$.on_mount=[]}),c.forEach(me)}function It(e,t){const i=e.$$;i.fragment!==null&&($t(i.after_update),te(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function jt(e,t){e.$$.dirty[0]===-1&&(P.push(e),Ft(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function mi(e,t,i,l,c,b,y=null,E=[-1]){const M=B;H(e);const v=e.$$={fragment:null,ctx:[],props:b,update:fe,not_equal:c,bound:Re(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(M?M.$$.context:[])),callbacks:Re(),dirty:E,skip_bound:!1,root:t.target||M.$$.root};y&&y(v.root);let N=!1;if(v.ctx=i?i(e,t.props||{},(k,r,...n)=>{const o=n.length?n[0]:r;return v.ctx&&c(v.ctx[k],v.ctx[k]=o)&&(!v.skip_bound&&v.bound[k]&&v.bound[k](o),N&&jt(e,k)),r}):[],v.update(),N=!0,te(v.before_update),v.fragment=l?l(v.ctx):!1,t.target){if(t.hydrate){const k=Nt(t.target);v.fragment&&v.fragment.l(k),k.forEach(Ot)}else v.fragment&&v.fragment.c();t.intro&&zt(e.$$.fragment),Dt(e,t.target,t.anchor),De()}H(M)}class wi{constructor(){C(this,"$$");C(this,"$$set")}$destroy(){It(this,1),this.$destroy=fe}$on(t,i){if(!ze(i))return fe;const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(i),()=>{const c=l.indexOf(i);c!==-1&&l.splice(c,1)}}$set(t){this.$$set&&!Mt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ut="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ut);var Wt=function(t){return Ht(t)&&!Bt(t)};function Ht(e){return!!e&&typeof e=="object"}function Bt(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Gt(e)}var qt=typeof Symbol=="function"&&Symbol.for,Vt=qt?Symbol.for("react.element"):60103;function Gt(e){return e.$$typeof===Vt}function Yt(e){return Array.isArray(e)?[]:{}}function q(e,t){return t.clone!==!1&&t.isMergeableObject(e)?D(Yt(e),e,t):e}function Xt(e,t,i){return e.concat(t).map(function(l){return q(l,i)})}function Kt(e,t){if(!t.customMerge)return D;var i=t.customMerge(e);return typeof i=="function"?i:D}function Zt(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Le(e){return Object.keys(e).concat(Zt(e))}function Ie(e,t){try{return t in e}catch{return!1}}function Jt(e,t){return Ie(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Qt(e,t,i){var l={};return i.isMergeableObject(e)&&Le(e).forEach(function(c){l[c]=q(e[c],i)}),Le(t).forEach(function(c){Jt(e,c)||(Ie(e,c)&&i.isMergeableObject(t[c])?l[c]=Kt(c,i)(e[c],t[c],i):l[c]=q(t[c],i))}),l}function D(e,t,i){i=i||{},i.arrayMerge=i.arrayMerge||Xt,i.isMergeableObject=i.isMergeableObject||Wt,i.cloneUnlessOtherwiseSpecified=q;var l=Array.isArray(t),c=Array.isArray(e),b=l===c;return b?l?i.arrayMerge(e,t,i):Qt(e,t,i):q(t,i)}D.all=function(t,i){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(l,c){return D(l,c,i)},{})};var ei=D,ti=ei;const ii=Tt(ti);function gi(...e){return ii.all(e)}function je(e=globalThis.navigator.language,t=[]){switch(e=e.replaceAll("_","-").toLowerCase(),!0){case e in t:break;case e.startsWith("zh-chs"):case e.startsWith("zh-cns"):e="zh-Hans";break;case e.startsWith("zh-cht"):case e.startsWith("zh-cnt"):e="zh-Hant";break;case e.startsWith("zh-hans"):case e.startsWith("zh-cn"):case e.startsWith("zh-sg"):e="zh-Hans";break;case e.startsWith("zh-hant"):case e.startsWith("zh-tw"):case e.startsWith("zh-hk"):case e.startsWith("zh-mo"):e="zh-Hant";break;case e.startsWith("zh"):e="zh-Hans";break;case e.startsWith("en"):e="en";break;case e.startsWith("es"):e="es";break;case e.startsWith("fr"):e="fr";break}return e}function yi(e){switch(je(e)){case"zh-Hans":return"zh-cn";case"zh-Hant":return"zh-tw";case"de":return"de";case"es":return"es";case"fr":return"fr";case"it":return"it";case"ja":return"ja";case"ko":return"ko";case"ru":return"ru";case"en":default:return""}}function vi(e){switch(je(e)){case"zh-Hans":return"zh_CN";case"zh-Hant":return"zh_TW";case"fr":return"fr_FR";case"ja":return"ja_JP";case"ko":return"ko_KR";case"pt":return"pt_BR";case"ru":return"ru_RU";case"sv":return"sv_SE";case"en":default:return"en_US"}}function oi(){var i,l,c,b,y,E;switch((c=(l=(i=globalThis==null?void 0:globalThis.document)==null?void 0:i.documentElement)==null?void 0:l.dataset)==null?void 0:c.themeMode){case"dark":return!0;case"light":return!1}switch((E=(y=(b=globalThis==null?void 0:globalThis.siyuan)==null?void 0:b.config)==null?void 0:y.appearance)==null?void 0:E.mode){case 1:return!0;case 0:return!1}return window.matchMedia("(prefers-color-scheme: dark)").matches}function _i(){return!oi()}const be={INIT_CHANNEL_NAME:"monaco-editor-init",MESSAGE_EVENT_NAME:"message",ID_PREFIX_MATERIAL:"#icon-monaco-editor-material",ID_PREFIX_MATERIAL_LIGHT:"#icon-monaco-editor-material-light"};class Ei{constructor(t=()=>{}){C(this,"port");C(this,"_listeners",new Map);C(this,"initEventListener",(t,i)=>{this.port=t.ports[0],this.port.start(),t instanceof MessageEvent?this.oninited(t.data):this.oninited(i)});switch(this.oninited=t,!0){case ft:{const{ipcRenderer:i}=globalThis.require("electron");i.once(be.INIT_CHANNEL_NAME,this.initEventListener);break}case ht:case mt:default:globalThis.addEventListener("message",this.initEventListener,{once:!0});break}}addEventListener(t,i,l){if(this._listeners.has(i))return!1;{const c=b=>{var y;((y=b==null?void 0:b.data)==null?void 0:y.channel)===t&&(l!=null&&l.once&&this.removeEventListener(t,i),i(b))};return this._listeners.set(i,c),this.port.addEventListener(be.MESSAGE_EVENT_NAME,c),!0}}removeEventListener(t,i){return this._listeners.has(i)?(this.port.removeEventListener(be.MESSAGE_EVENT_NAME,this._listeners.get(i)),this._listeners.delete(i),!0):!1}}export{Ei as B,ft as F,si as L,wi as S,mi as a,ui as b,xt as c,ci as d,di as e,Ot as f,Tt as g,hi as h,_i as i,ht as j,gi as k,Ce as l,yi as m,fe as n,pi as o,ai as p,mt as q,ni as r,li as s,bi as t,fi as u,vi as v};