diff --git a/sources_non_forked/coc.nvim/.all-contributorsrc b/sources_non_forked/coc.nvim/.all-contributorsrc
new file mode 100644
index 00000000..4a15ee5d
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.all-contributorsrc
@@ -0,0 +1,1853 @@
+{
+ "projectName": "coc.nvim",
+ "projectOwner": "neoclide",
+ "repoType": "github",
+ "repoHost": "https://github.com",
+ "files": [
+ "README.md"
+ ],
+ "imageSize": 50,
+ "commit": false,
+ "commitConvention": "angular",
+ "contributors": [
+ {
+ "login": "chemzqm",
+ "name": "Qiming zhao",
+ "avatar_url": "https://avatars.githubusercontent.com/u/251450?v=4",
+ "profile": "https://github.com/chemzqm",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "fannheyward",
+ "name": "Heyward Fann",
+ "avatar_url": "https://avatars.githubusercontent.com/u/345274?v=4",
+ "profile": "https://fann.im/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "weirongxu",
+ "name": "Raidou",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1709861?v=4",
+ "profile": "https://github.com/weirongxu",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kevinhwang91",
+ "name": "kevinhwang91",
+ "avatar_url": "https://avatars.githubusercontent.com/u/17562139?v=4",
+ "profile": "https://github.com/kevinhwang91",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "iamcco",
+ "name": "年糕小豆汤",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5492542?v=4",
+ "profile": "http://yuuko.cn/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Avi-D-coder",
+ "name": "Avi Dessauer",
+ "avatar_url": "https://avatars.githubusercontent.com/u/29133776?v=4",
+ "profile": "https://github.com/Avi-D-coder",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "voldikss",
+ "name": "最上川",
+ "avatar_url": "https://avatars.githubusercontent.com/u/20282795?v=4",
+ "profile": "https://github.com/voldikss",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "yatli",
+ "name": "Yatao Li",
+ "avatar_url": "https://avatars.githubusercontent.com/u/20684720?v=4",
+ "profile": "https://www.microsoft.com/en-us/research/people/yatli/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "xiyaowong",
+ "name": "wongxy",
+ "avatar_url": "https://avatars.githubusercontent.com/u/47070852?v=4",
+ "profile": "https://github.com/xiyaowong",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "sam-mccall",
+ "name": "Sam McCall",
+ "avatar_url": "https://avatars.githubusercontent.com/u/548993?v=4",
+ "profile": "https://github.com/sam-mccall",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "pappasam",
+ "name": "Samuel Roeca",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3723671?v=4",
+ "profile": "https://samroeca.com/pages/about.html#about",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "amiralies",
+ "name": "Amirali Esmaeili",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13261088?v=4",
+ "profile": "https://github.com/amiralies",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jrowlingson",
+ "name": "Jack Rowlingson",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3051781?v=4",
+ "profile": "https://bit.ly/3cLKGE4",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "tomtomjhj",
+ "name": "Jaehwang Jung",
+ "avatar_url": "https://avatars.githubusercontent.com/u/19489738?v=4",
+ "profile": "https://github.com/tomtomjhj",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "antoinemadec",
+ "name": "Antoine",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10830594?v=4",
+ "profile": "https://github.com/antoinemadec",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "cosminadrianpopescu",
+ "name": "Cosmin Popescu",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5187873?v=4",
+ "profile": "https://github.com/cosminadrianpopescu",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "xuanduc987",
+ "name": "Duc Nghiem Xuan",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1186411?v=4",
+ "profile": "https://ducnx.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "oblitum",
+ "name": "Francisco Lopes",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1269815?v=4",
+ "profile": "https://nosubstance.me/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "daquexian",
+ "name": "daquexian",
+ "avatar_url": "https://avatars.githubusercontent.com/u/11607199?v=4",
+ "profile": "https://github.com/daquexian",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "dependabot[bot]",
+ "name": "dependabot[bot]",
+ "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
+ "profile": "https://github.com/apps/dependabot",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "greenkeeper[bot]",
+ "name": "greenkeeper[bot]",
+ "avatar_url": "https://avatars.githubusercontent.com/in/505?v=4",
+ "profile": "https://github.com/apps/greenkeeper",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ckipp01",
+ "name": "Chris Kipp",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13974112?v=4",
+ "profile": "https://chris-kipp.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "dmitmel",
+ "name": "Dmytro Meleshko",
+ "avatar_url": "https://avatars.githubusercontent.com/u/15367354?v=4",
+ "profile": "https://dmitmel.github.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kirillbobyrev",
+ "name": "Kirill Bobyrev",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3352968?v=4",
+ "profile": "https://github.com/kirillbobyrev",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "gbcreation",
+ "name": "Gontran Baerts",
+ "avatar_url": "https://avatars.githubusercontent.com/u/454315?v=4",
+ "profile": "https://github.com/gbcreation",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "andys8",
+ "name": "Andy",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13085980?v=4",
+ "profile": "https://andys8.de/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "GopherJ",
+ "name": "Cheng JIANG",
+ "avatar_url": "https://avatars.githubusercontent.com/u/33961674?v=4",
+ "profile": "https://www.alexcj96.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "cpearce-py",
+ "name": "Corin",
+ "avatar_url": "https://avatars.githubusercontent.com/u/53532946?v=4",
+ "profile": "https://github.com/cpearce-py",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "wodesuck",
+ "name": "Daniel Zhang",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3124581?v=4",
+ "profile": "https://github.com/wodesuck",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Ferdi265",
+ "name": "Ferdinand Bachmann",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4077106?v=4",
+ "profile": "https://github.com/Ferdi265",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "gou4shi1",
+ "name": "Guangqing Chen",
+ "avatar_url": "https://avatars.githubusercontent.com/u/16915589?v=4",
+ "profile": "https://goushi.me/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "iamruinous",
+ "name": "Jade Meskill",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2108?v=4",
+ "profile": "http://jademeskill.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jpoppe",
+ "name": "Jasper Poppe",
+ "avatar_url": "https://avatars.githubusercontent.com/u/65505?v=4",
+ "profile": "https://github.com/jpoppe",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jean",
+ "name": "Jean Jordaan",
+ "avatar_url": "https://avatars.githubusercontent.com/u/84800?v=4",
+ "profile": "https://github.com/jean",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kidonng",
+ "name": "Kid",
+ "avatar_url": "https://avatars.githubusercontent.com/u/44045911?v=4",
+ "profile": "https://xuann.wang/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Kavantix",
+ "name": "Pieter van Loon",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6243755?v=4",
+ "profile": "https://github.com/Kavantix",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "rliebz",
+ "name": "Robert Liebowitz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5321575?v=4",
+ "profile": "https://github.com/rliebz",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "megalithic",
+ "name": "Seth Messer",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3678?v=4",
+ "profile": "https://megalithic.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "UncleBill",
+ "name": "UncleBill",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1141198?v=4",
+ "profile": "https://github.com/UncleBill",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ZSaberLv0",
+ "name": "ZERO",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6846867?v=4",
+ "profile": "http://zsaber.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "fsouza",
+ "name": "fsouza",
+ "avatar_url": "https://avatars.githubusercontent.com/u/108725?v=4",
+ "profile": "https://fsouza.blog/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "onichandame",
+ "name": "XiaoZhang",
+ "avatar_url": "https://avatars.githubusercontent.com/u/23728505?v=4",
+ "profile": "https://onichandame.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "whyreal",
+ "name": "whyreal",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2084642?v=4",
+ "profile": "https://github.com/whyreal",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "yehuohan",
+ "name": "yehuohan",
+ "avatar_url": "https://avatars.githubusercontent.com/u/17680752?v=4",
+ "profile": "https://github.com/yehuohan",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Bakudankun",
+ "name": "バクダンくん",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4504807?v=4",
+ "profile": "http://www.bakudan.farm/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "glepnir",
+ "name": "Raphael",
+ "avatar_url": "https://avatars.githubusercontent.com/u/41671631?v=4",
+ "profile": "https://blog.gopherhub.org/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "tbodt",
+ "name": "tbodt",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5678977?v=4",
+ "profile": "https://tbodt.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "aaronmcdaid",
+ "name": "Aaron McDaid",
+ "avatar_url": "https://avatars.githubusercontent.com/u/64350?v=4",
+ "profile": "https://aaronmcdaid.github.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "versi786",
+ "name": "Aasif Versi",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7347942?v=4",
+ "profile": "https://github.com/versi786",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "abnerf",
+ "name": "Abner Silva",
+ "avatar_url": "https://avatars.githubusercontent.com/u/56300?v=4",
+ "profile": "https://github.com/abnerf",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "sheerun",
+ "name": "Adam Stankiewicz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/292365?v=4",
+ "profile": "http://sheerun.net/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "adamansky",
+ "name": "Adamansky Anton",
+ "avatar_url": "https://avatars.githubusercontent.com/u/496683?v=4",
+ "profile": "https://wirow.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ahmedelgabri",
+ "name": "Ahmed El Gabri",
+ "avatar_url": "https://avatars.githubusercontent.com/u/63876?v=4",
+ "profile": "https://gabri.me/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "theg4sh",
+ "name": "Alexandr Kondratev",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5094691?v=4",
+ "profile": "http://theg4sh.ru/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "andrewkshim",
+ "name": "Andrew Shim",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1403410?v=4",
+ "profile": "https://github.com/andrewkshim",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "alindeman",
+ "name": "Andy Lindeman",
+ "avatar_url": "https://avatars.githubusercontent.com/u/395621?v=4",
+ "profile": "http://andylindeman.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Augustin82",
+ "name": "Augustin",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2370810?v=4",
+ "profile": "https://github.com/Augustin82",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Eijebong",
+ "name": "Bastien Orivel",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3650385?v=4",
+ "profile": "https://bananium.fr/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ayroblu",
+ "name": "Ben Lu",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4915682?v=4",
+ "profile": "https://github.com/ayroblu",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "vantreeseba",
+ "name": "Ben",
+ "avatar_url": "https://avatars.githubusercontent.com/u/316782?v=4",
+ "profile": "https://github.com/vantreeseba",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "bmon",
+ "name": "Brendan Roy",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2115272?v=4",
+ "profile": "https://github.com/bmon",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "brianembry",
+ "name": "brianembry",
+ "avatar_url": "https://avatars.githubusercontent.com/u/35347666?v=4",
+ "profile": "https://github.com/brianembry",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "b-",
+ "name": "br",
+ "avatar_url": "https://avatars.githubusercontent.com/u/284789?v=4",
+ "profile": "https://keybase.io/bri_",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "casonadams",
+ "name": "Cason Adams",
+ "avatar_url": "https://avatars.githubusercontent.com/u/17597548?v=4",
+ "profile": "https://github.com/casonadams",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "y9c",
+ "name": "Chang Y",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5415510?v=4",
+ "profile": "https://github.com/y9c",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "yous",
+ "name": "Chayoung You",
+ "avatar_url": "https://avatars.githubusercontent.com/u/853977?v=4",
+ "profile": "https://yous.be/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "chenlijun99",
+ "name": "Chen Lijun",
+ "avatar_url": "https://avatars.githubusercontent.com/u/20483759?v=4",
+ "profile": "https://github.com/chenlijun99",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "beeender",
+ "name": "Chen Mulong",
+ "avatar_url": "https://avatars.githubusercontent.com/u/449296?v=4",
+ "profile": "https://github.com/beeender",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "rsrchboy",
+ "name": "Chris Weyl",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59620?v=4",
+ "profile": "http://weyl.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "dezza",
+ "name": "dezza",
+ "avatar_url": "https://avatars.githubusercontent.com/u/402927?v=4",
+ "profile": "https://github.com/dezza",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ceedubs",
+ "name": "Cody Allen",
+ "avatar_url": "https://avatars.githubusercontent.com/u/977929?v=4",
+ "profile": "https://github.com/ceedubs",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "pyrho",
+ "name": "Damien Rajon",
+ "avatar_url": "https://avatars.githubusercontent.com/u/145502?v=4",
+ "profile": "https://www.25.wf/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "daern91",
+ "name": "Daniel Eriksson",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6084427?v=4",
+ "profile": "https://github.com/daern91",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "danjenson",
+ "name": "Daniel Jenson",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4793438?v=4",
+ "profile": "https://github.com/danjenson",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "davidmh",
+ "name": "David Mejorado",
+ "avatar_url": "https://avatars.githubusercontent.com/u/594302?v=4",
+ "profile": "https://github.com/davidmh",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "pderichai",
+ "name": "Deric Pang",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13430946?v=4",
+ "profile": "https://github.com/pderichai",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "miyatsu",
+ "name": "Ding Tao",
+ "avatar_url": "https://avatars.githubusercontent.com/u/12852587?v=4",
+ "profile": "https://www.dingtao.org/blog",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "doronbehar",
+ "name": "Doron Behar",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10998835?v=4",
+ "profile": "https://github.com/doronbehar",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kovetskiy",
+ "name": "Egor Kovetskiy",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8445924?v=4",
+ "profile": "https://github.com/kovetskiy",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "elkowar",
+ "name": "ElKowar",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5300871?v=4",
+ "profile": "https://github.com/elkowar",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "demelev",
+ "name": "Emeliov Dmitrii",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3952209?v=4",
+ "profile": "https://github.com/demelev",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "sawmurai",
+ "name": "Fabian Becker",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6454986?v=4",
+ "profile": "https://github.com/sawmurai",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "FallenWarrior2k",
+ "name": "FallenWarrior2k",
+ "avatar_url": "https://avatars.githubusercontent.com/u/20320149?v=4",
+ "profile": "https://github.com/FallenWarrior2k",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "fnune",
+ "name": "Fausto Núñez Alberro",
+ "avatar_url": "https://avatars.githubusercontent.com/u/16181067?v=4",
+ "profile": "https://fnune.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "FelipeCRamos",
+ "name": "Felipe Ramos",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7572843?v=4",
+ "profile": "https://github.com/FelipeCRamos",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "frbor",
+ "name": "Fredrik Borg",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2320183?v=4",
+ "profile": "https://github.com/frbor",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "gavsim",
+ "name": "Gavin Sim",
+ "avatar_url": "https://avatars.githubusercontent.com/u/812273?v=4",
+ "profile": "http://www.gavinsim.co.uk/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "gibfahn",
+ "name": "Gibson Fahnestock",
+ "avatar_url": "https://avatars.githubusercontent.com/u/15943089?v=4",
+ "profile": "https://fahn.co/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "giovannigiordano",
+ "name": "Giovanni Giordano",
+ "avatar_url": "https://avatars.githubusercontent.com/u/15145952?v=4",
+ "profile": "https://github.com/giovannigiordano",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "qubbit",
+ "name": "Gopal Adhikari",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1987473?v=4",
+ "profile": "https://github.com/qubbit",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hanh090",
+ "name": "Hanh Le",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3643657?v=4",
+ "profile": "https://github.com/hanh090",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hedyhli",
+ "name": "hedy",
+ "avatar_url": "https://avatars.githubusercontent.com/u/50042066?v=4",
+ "profile": "https://github.com/hedyhli",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hendriklammers",
+ "name": "Hendrik Lammers",
+ "avatar_url": "https://avatars.githubusercontent.com/u/754556?v=4",
+ "profile": "https://www.hendriklammers.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "henrybarreto",
+ "name": "Henry Barreto",
+ "avatar_url": "https://avatars.githubusercontent.com/u/23109089?v=4",
+ "profile": "https://github.com/henrybarreto",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "WhyNotHugo",
+ "name": "Hugo",
+ "avatar_url": "https://avatars.githubusercontent.com/u/730811?v=4",
+ "profile": "https://hugo.barrera.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jackieli-tes",
+ "name": "Jackie Li",
+ "avatar_url": "https://avatars.githubusercontent.com/u/64778297?v=4",
+ "profile": "https://github.com/jackieli-tes",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "MrQubo",
+ "name": "Jakub Nowak",
+ "avatar_url": "https://avatars.githubusercontent.com/u/16545322?v=4",
+ "profile": "https://github.com/MrQubo",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "euoia",
+ "name": "James Pickard",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1271216?v=4",
+ "profile": "https://github.com/euoia",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jsfaint",
+ "name": "Jia Sui",
+ "avatar_url": "https://avatars.githubusercontent.com/u/571829?v=4",
+ "profile": "https://github.com/jsfaint",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "expipiplus1",
+ "name": "Ellie Hermaszewska",
+ "avatar_url": "https://avatars.githubusercontent.com/u/857308?v=4",
+ "profile": "https://github.com/expipiplus1",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "cincodenada",
+ "name": "Joel Bradshaw",
+ "avatar_url": "https://avatars.githubusercontent.com/u/479715?v=4",
+ "profile": "https://cincodenada.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "irizwaririz",
+ "name": "John Carlo Roberto",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10111643?v=4",
+ "profile": "https://github.com/irizwaririz",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Jomik",
+ "name": "Jonas Holst Damtoft",
+ "avatar_url": "https://avatars.githubusercontent.com/u/699655?v=4",
+ "profile": "https://github.com/Jomik",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jdlehman",
+ "name": "Jonathan Lehman",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3144695?v=4",
+ "profile": "http://inlehmansterms.net/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "JoosepAlviste",
+ "name": "Joosep Alviste",
+ "avatar_url": "https://avatars.githubusercontent.com/u/9450943?v=4",
+ "profile": "https://joosep.xyz/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "josa42",
+ "name": "Josa Gesell",
+ "avatar_url": "https://avatars.githubusercontent.com/u/423234?v=4",
+ "profile": "https://github.com/josa42",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "joshuarubin",
+ "name": "Joshua Rubin",
+ "avatar_url": "https://avatars.githubusercontent.com/u/194275?v=4",
+ "profile": "https://jawa.dev/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "perrin4869",
+ "name": "Julian Grinblat",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5774716?v=4",
+ "profile": "https://github.com/perrin4869",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "valentjn",
+ "name": "Julian Valentin",
+ "avatar_url": "https://avatars.githubusercontent.com/u/19839841?v=4",
+ "profile": "https://valentjn.github.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "KabbAmine",
+ "name": "KabbAmine",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5658084?v=4",
+ "profile": "https://kabbamine.github.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "acro5piano",
+ "name": "Kay Gosho",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10719495?v=4",
+ "profile": "https://moncargo.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hkennyv",
+ "name": "Kenny Huynh",
+ "avatar_url": "https://avatars.githubusercontent.com/u/29909203?v=4",
+ "profile": "https://kennyvh.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kevinrambaud",
+ "name": "Kevin Rambaud",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7501477?v=4",
+ "profile": "https://github.com/kevinrambaud",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kiancross",
+ "name": "Kian Cross",
+ "avatar_url": "https://avatars.githubusercontent.com/u/11011464?v=4",
+ "profile": "https://github.com/kiancross",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kristijanhusak",
+ "name": "Kristijan Husak",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1782860?v=4",
+ "profile": "https://ko-fi.com/kristijanhusak",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "NullVoxPopuli",
+ "name": "NullVoxPopuli",
+ "avatar_url": "https://avatars.githubusercontent.com/u/199018?v=4",
+ "profile": "https://github.com/NullVoxPopuli",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "lassepe",
+ "name": "Lasse Peters",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10076790?v=4",
+ "profile": "https://github.com/lassepe",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Linerre",
+ "name": "Noel Errenil",
+ "avatar_url": "https://avatars.githubusercontent.com/u/49512984?v=4",
+ "profile": "https://github.com/Linerre",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "LinArcX",
+ "name": "LinArcX",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10884422?v=4",
+ "profile": "https://github.com/LinArcX",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "liuchengxu",
+ "name": "Liu-Cheng Xu",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8850248?v=4",
+ "profile": "https://paypal.me/liuchengxu",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "foxtrot",
+ "name": "Marc",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4153572?v=4",
+ "profile": "https://malloc.me/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "mgaw",
+ "name": "Marius Gawrisch",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2177016?v=4",
+ "profile": "https://github.com/mgaw",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "mhintz",
+ "name": "Mark Hintz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2789742?v=4",
+ "profile": "http://www.markhz.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "MatElGran",
+ "name": "Mathieu Le Tiec",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1052778?v=4",
+ "profile": "https://github.com/MatElGran",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "matt-fff",
+ "name": "Matt White",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8656127?v=4",
+ "profile": "https://matt-w.net/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ml-evs",
+ "name": "Matthew Evans",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7916000?v=4",
+ "profile": "https://github.com/ml-evs",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Me1onRind",
+ "name": "Me1onRind",
+ "avatar_url": "https://avatars.githubusercontent.com/u/19531270?v=4",
+ "profile": "https://github.com/Me1onRind",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Qyriad",
+ "name": "Qyriad",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1542224?v=4",
+ "profile": "https://github.com/Qyriad",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "leonardssh",
+ "name": "Narcis B.",
+ "avatar_url": "https://avatars.githubusercontent.com/u/35312043?v=4",
+ "profile": "https://leo.is-a.dev/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Neur1n",
+ "name": "Neur1n",
+ "avatar_url": "https://avatars.githubusercontent.com/u/17579247?v=4",
+ "profile": "https://github.com/Neur1n",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "nicoder",
+ "name": "Nicolas Dermine",
+ "avatar_url": "https://avatars.githubusercontent.com/u/365210?v=4",
+ "profile": "https://github.com/nicoder",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "NoahTheDuke",
+ "name": "Noah",
+ "avatar_url": "https://avatars.githubusercontent.com/u/603677?v=4",
+ "profile": "https://github.com/NoahTheDuke",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "IndexXuan",
+ "name": "PENG Rui",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6322673?v=4",
+ "profile": "https://github.com/IndexXuan",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "paco0x",
+ "name": "Paco",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6123425?v=4",
+ "profile": "https://liaoph.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "peng1999",
+ "name": "Peng Guanwen",
+ "avatar_url": "https://avatars.githubusercontent.com/u/12483662?v=4",
+ "profile": "https://github.com/peng1999",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ilAYAli",
+ "name": "Petter Wahlman",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1106732?v=4",
+ "profile": "https://www.twitter.com/badeip",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "pvonmoradi",
+ "name": "Pooya Moradi",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1058151?v=4",
+ "profile": "https://github.com/pvonmoradi",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "QuadeMorrison",
+ "name": "Quade Morrison",
+ "avatar_url": "https://avatars.githubusercontent.com/u/10917383?v=4",
+ "profile": "https://github.com/QuadeMorrison",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "vogler",
+ "name": "Ralf Vogler",
+ "avatar_url": "https://avatars.githubusercontent.com/u/493741?v=4",
+ "profile": "https://github.com/vogler",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "crccw",
+ "name": "Ran Chen",
+ "avatar_url": "https://avatars.githubusercontent.com/u/41463?v=4",
+ "profile": "https://github.com/crccw",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "bigardone",
+ "name": "Ricardo García Vega",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1090272?v=4",
+ "profile": "https://bigardone.dev/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "nomasprime",
+ "name": "Rick Jones",
+ "avatar_url": "https://avatars.githubusercontent.com/u/140855?v=4",
+ "profile": "https://github.com/nomasprime",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "rschristian",
+ "name": "Ryan Christian",
+ "avatar_url": "https://avatars.githubusercontent.com/u/33403762?v=4",
+ "profile": "https://github.com/rschristian",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "winterbesos",
+ "name": "Salo",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4694263?v=4",
+ "profile": "http://salo.so/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Hazelfire",
+ "name": "Sam Nolan",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13807753?v=4",
+ "profile": "https://github.com/Hazelfire",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "rickysaurav",
+ "name": "Saurav",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13986039?v=4",
+ "profile": "https://github.com/rickysaurav",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "smackesey",
+ "name": "Sean Mackesey",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1531373?v=4",
+ "profile": "https://github.com/smackesey",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "sheeldotme",
+ "name": "Sheel Patel",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6991406?v=4",
+ "profile": "https://github.com/sheeldotme",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "solomonwzs",
+ "name": "Solomon Ng",
+ "avatar_url": "https://avatars.githubusercontent.com/u/907942?v=4",
+ "profile": "https://github.com/solomonwzs",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kadimisetty",
+ "name": "Sri Kadimisetty",
+ "avatar_url": "https://avatars.githubusercontent.com/u/535947?v=4",
+ "profile": "https://github.com/kadimisetty",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "stephenprater",
+ "name": "Stephen Prater",
+ "avatar_url": "https://avatars.githubusercontent.com/u/149870?v=4",
+ "profile": "https://github.com/stephenprater",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kibs",
+ "name": "Sune Kibsgaard",
+ "avatar_url": "https://avatars.githubusercontent.com/u/14085?v=4",
+ "profile": "https://kibs.dk/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Aquaakuma",
+ "name": "Aquaakuma",
+ "avatar_url": "https://avatars.githubusercontent.com/u/31891793?v=4",
+ "profile": "https://github.com/Aquaakuma",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "coil398",
+ "name": "Takumi Kawase",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7694377?v=4",
+ "profile": "https://github.com/coil398",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "theblobscp",
+ "name": "The Blob SCP",
+ "avatar_url": "https://avatars.githubusercontent.com/u/81673375?v=4",
+ "profile": "https://github.com/theblobscp",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "przepompownia",
+ "name": "Tomasz N",
+ "avatar_url": "https://avatars.githubusercontent.com/u/11404453?v=4",
+ "profile": "https://github.com/przepompownia",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "gasuketsu",
+ "name": "Tomoyuki Harada",
+ "avatar_url": "https://avatars.githubusercontent.com/u/15703757?v=4",
+ "profile": "https://github.com/gasuketsu",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "tonyfettes",
+ "name": "Tony Fettes",
+ "avatar_url": "https://avatars.githubusercontent.com/u/29998228?v=4",
+ "profile": "https://github.com/tonyfettes",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "tony",
+ "name": "Tony Narlock",
+ "avatar_url": "https://avatars.githubusercontent.com/u/26336?v=4",
+ "profile": "https://www.git-pull.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "wwwjfy",
+ "name": "Tony Wang",
+ "avatar_url": "https://avatars.githubusercontent.com/u/126527?v=4",
+ "profile": "https://blog.wwwjfy.net/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "Varal7",
+ "name": "Victor Quach",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8019486?v=4",
+ "profile": "https://github.com/Varal7",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "whisperity",
+ "name": "Whisperity",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1969470?v=4",
+ "profile": "https://github.com/whisperity",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "willtrnr",
+ "name": "William Turner",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1878110?v=4",
+ "profile": "https://github.com/willtrnr",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "damnever",
+ "name": "Xiaochao Dong",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6223594?v=4",
+ "profile": "https://drafts.damnever.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hyhugh",
+ "name": "Hugh Hou",
+ "avatar_url": "https://avatars.githubusercontent.com/u/16500351?v=4",
+ "profile": "https://github.com/hyhugh",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "jackielii",
+ "name": "Jackie Li",
+ "avatar_url": "https://avatars.githubusercontent.com/u/360983?v=4",
+ "profile": "https://github.com/jackielii",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "TheConfuZzledDude",
+ "name": "Zachary Freed",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3160203?v=4",
+ "profile": "https://github.com/TheConfuZzledDude",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "akiyosi",
+ "name": "akiyosi",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8478977?v=4",
+ "profile": "https://github.com/akiyosi",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "alexjg",
+ "name": "alexjg",
+ "avatar_url": "https://avatars.githubusercontent.com/u/224635?v=4",
+ "profile": "https://github.com/alexjg",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "aste4",
+ "name": "aste4",
+ "avatar_url": "https://avatars.githubusercontent.com/u/47511385?v=4",
+ "profile": "https://github.com/aste4",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "clyfish",
+ "name": "clyfish",
+ "avatar_url": "https://avatars.githubusercontent.com/u/541215?v=4",
+ "profile": "https://github.com/clyfish",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "dev7ba",
+ "name": "dev7ba",
+ "avatar_url": "https://avatars.githubusercontent.com/u/93706552?v=4",
+ "profile": "https://github.com/dev7ba",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "diartyz",
+ "name": "diartyz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4486152?v=4",
+ "profile": "https://github.com/diartyz",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "doza-daniel",
+ "name": "doza-daniel",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13752683?v=4",
+ "profile": "https://github.com/doza-daniel",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "equal-l2",
+ "name": "equal-l2",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8597717?v=4",
+ "profile": "https://github.com/equal-l2",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "FongHou",
+ "name": "fong",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13973254?v=4",
+ "profile": "https://github.com/FongHou",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hexh250786313",
+ "name": "hexh",
+ "avatar_url": "https://avatars.githubusercontent.com/u/26080416?v=4",
+ "profile": "https://blog.hexuhua.vercel.app/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "hhiraba",
+ "name": "hhiraba",
+ "avatar_url": "https://avatars.githubusercontent.com/u/4624806?v=4",
+ "profile": "https://github.com/hhiraba",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ic-768",
+ "name": "ic-768",
+ "avatar_url": "https://avatars.githubusercontent.com/u/83115125?v=4",
+ "profile": "https://github.com/ic-768",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "javiertury",
+ "name": "javiertury",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1520320?v=4",
+ "profile": "https://github.com/javiertury",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "seiyeah78",
+ "name": "karasu",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6185139?v=4",
+ "profile": "https://github.com/seiyeah78",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "kevineato",
+ "name": "kevineato",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13666221?v=4",
+ "profile": "https://github.com/kevineato",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "m4c0",
+ "name": "Eduardo Costa",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1664510?v=4",
+ "profile": "https://github.com/m4c0",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "micchy326",
+ "name": "micchy326",
+ "avatar_url": "https://avatars.githubusercontent.com/u/23257067?v=4",
+ "profile": "https://github.com/micchy326",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "midchildan",
+ "name": "midchildan",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7343721?v=4",
+ "profile": "https://keybase.io/midchildan",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "minefuto",
+ "name": "minefuto",
+ "avatar_url": "https://avatars.githubusercontent.com/u/46558834?v=4",
+ "profile": "https://github.com/minefuto",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "miyanokomiya",
+ "name": "miyanokomiya",
+ "avatar_url": "https://avatars.githubusercontent.com/u/20733354?v=4",
+ "profile": "https://twitter.com/robokomy",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "miyaviee",
+ "name": "miyaviee",
+ "avatar_url": "https://avatars.githubusercontent.com/u/15247561?v=4",
+ "profile": "https://github.com/miyaviee",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "monkoose",
+ "name": "monkoose",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6261276?v=4",
+ "profile": "https://github.com/monkoose",
+ "contributions": [
+ "code",
+ "bug"
+ ]
+ },
+ {
+ "login": "mujx",
+ "name": "mujx",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6430350?v=4",
+ "profile": "https://github.com/mujx",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "mvilim",
+ "name": "mvilim",
+ "avatar_url": "https://avatars.githubusercontent.com/u/40682862?v=4",
+ "profile": "https://github.com/mvilim",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "naruaway",
+ "name": "naruaway",
+ "avatar_url": "https://avatars.githubusercontent.com/u/2931577?v=4",
+ "profile": "https://naruaway.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "piersy",
+ "name": "piersy",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5087847?v=4",
+ "profile": "https://github.com/piersy",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "ryantig",
+ "name": "ryantig",
+ "avatar_url": "https://avatars.githubusercontent.com/u/324810?v=4",
+ "profile": "https://github.com/ryantig",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "rydesun",
+ "name": "rydesun",
+ "avatar_url": "https://avatars.githubusercontent.com/u/19602440?v=4",
+ "profile": "https://catcat.cc/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "sc00ter",
+ "name": "sc00ter",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1271025?v=4",
+ "profile": "https://github.com/sc00ter",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "smhc",
+ "name": "smhc",
+ "avatar_url": "https://avatars.githubusercontent.com/u/6404304?v=4",
+ "profile": "https://github.com/smhc",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "stkaplan",
+ "name": "Sam Kaplan",
+ "avatar_url": "https://avatars.githubusercontent.com/u/594990?v=4",
+ "profile": "https://github.com/stkaplan",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "tasuten",
+ "name": "tasuten",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1623176?v=4",
+ "profile": "https://github.com/tasuten",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "todesking",
+ "name": "todesking",
+ "avatar_url": "https://avatars.githubusercontent.com/u/112881?v=4",
+ "profile": "http://todesking.com/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "typicode",
+ "name": "typicode",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5502029?v=4",
+ "profile": "https://github.com/typicode",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "LiMingFei56",
+ "name": "李鸣飞",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8553407?v=4",
+ "profile": "https://limingfei56.github.io/",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "eltociear",
+ "name": "Ikko Ashimine",
+ "avatar_url": "https://avatars.githubusercontent.com/u/22633385?v=4",
+ "profile": "https://bandism.net/",
+ "contributions": [
+ "doc"
+ ]
+ },
+ {
+ "login": "rammiah",
+ "name": "Rammiah",
+ "avatar_url": "https://avatars.githubusercontent.com/u/26727562?v=4",
+ "profile": "https://github.com/rammiah",
+ "contributions": [
+ "bug"
+ ]
+ }
+ ],
+ "contributorsPerLine": 7,
+ "skipCi": true
+}
diff --git a/sources_non_forked/coc.nvim/.editorconfig b/sources_non_forked/coc.nvim/.editorconfig
new file mode 100644
index 00000000..158192a1
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.editorconfig
@@ -0,0 +1,22 @@
+root = true
+
+[*]
+end_of_line = lf
+charset = utf-8
+
+[*.{js,ts}]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+max_line_length = 120
+
+[*.json]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+
+[*.vim]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+max_line_length = 120
diff --git a/sources_non_forked/coc.nvim/.eslintignore b/sources_non_forked/coc.nvim/.eslintignore
new file mode 100644
index 00000000..f38d5306
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.eslintignore
@@ -0,0 +1,5 @@
+node_modules
+coverage
+build
+lib
+typings
diff --git a/sources_non_forked/coc.nvim/.eslintrc.js b/sources_non_forked/coc.nvim/.eslintrc.js
new file mode 100644
index 00000000..f6a76753
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.eslintrc.js
@@ -0,0 +1,339 @@
+module.exports = {
+ "root": true,
+ "env": {
+ "es6": true,
+ "node": true,
+ "jest/globals": true
+ },
+ "extends": [
+ "plugin:@typescript-eslint/recommended",
+ "plugin:@typescript-eslint/recommended-requiring-type-checking"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "project": "./tsconfig.json",
+ "sourceType": "module"
+ },
+ "plugins": [
+ "jsdoc",
+ "jest",
+ "@typescript-eslint"
+ ],
+ "rules": {
+ "comma-dangle": [
+ 0
+ ],
+ "guard-for-in": [
+ 0
+ ],
+ "no-dupe-class-members": [
+ 0
+ ],
+ "prefer-spread": [
+ 0
+ ],
+ "prefer-rest-params": [
+ 0
+ ],
+ "func-names": [
+ 0
+ ],
+ "require-atomic-updates": [
+ 0
+ ],
+ "no-empty": "off",
+ "no-console": "off",
+ "linebreak-style": [
+ 1,
+ "unix"
+ ],
+ "no-prototype-builtins": [
+ 0
+ ],
+ "no-unused-vars": [
+ 0
+ ],
+ "no-async-promise-executor": [
+ 0
+ ],
+ "constructor-super": "error",
+ "for-direction": [
+ "error"
+ ],
+ "getter-return": [
+ "error"
+ ],
+ "no-case-declarations": [
+ "error"
+ ],
+ "no-class-assign": [
+ "error"
+ ],
+ "no-compare-neg-zero": [
+ "error"
+ ],
+ "no-cond-assign": "error",
+ "no-const-assign": [
+ "error"
+ ],
+ "no-constant-condition": [
+ "error"
+ ],
+ "no-control-regex": [
+ "error"
+ ],
+ "no-debugger": "error",
+ "no-delete-var": [
+ "error"
+ ],
+ "no-dupe-args": [
+ "error"
+ ],
+ "no-dupe-keys": [
+ "error"
+ ],
+ "no-duplicate-case": [
+ "error"
+ ],
+ "no-empty-character-class": [
+ "error"
+ ],
+ "no-empty-pattern": [
+ "error"
+ ],
+ "no-ex-assign": [
+ "error"
+ ],
+ "no-extra-boolean-cast": [
+ "error"
+ ],
+ "no-extra-semi": [
+ "error"
+ ],
+ "no-fallthrough": "off",
+ "no-func-assign": [
+ "error"
+ ],
+ "no-global-assign": [
+ "error"
+ ],
+ "no-inner-declarations": [
+ "error"
+ ],
+ "no-invalid-regexp": [
+ "error"
+ ],
+ "no-irregular-whitespace": "error",
+ "no-misleading-character-class": [
+ "error"
+ ],
+ "no-mixed-spaces-and-tabs": [
+ "error"
+ ],
+ "no-new-symbol": [
+ "error"
+ ],
+ "no-obj-calls": [
+ "error"
+ ],
+ "no-octal": [
+ "error"
+ ],
+ "no-redeclare": "error",
+ "no-regex-spaces": [
+ "error"
+ ],
+ "no-self-assign": [
+ "error"
+ ],
+ "no-shadow-restricted-names": [
+ "error"
+ ],
+ "no-sparse-arrays": "error",
+ "no-this-before-super": [
+ "error"
+ ],
+ "no-undef": [
+ "off"
+ ],
+ "no-unexpected-multiline": [
+ "error"
+ ],
+ "no-unreachable": [
+ "warn"
+ ],
+ "no-unsafe-finally": "error",
+ "no-unsafe-negation": [
+ "error"
+ ],
+ "no-unused-labels": "error",
+ "no-useless-catch": [
+ "error"
+ ],
+ "no-useless-escape": [
+ "error"
+ ],
+ "no-with": [
+ "error"
+ ],
+ "require-yield": [
+ "error"
+ ],
+ "use-isnan": "error",
+ "valid-typeof": "off",
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
+ "@typescript-eslint/prefer-regexp-exec": "off",
+ "@typescript-eslint/adjacent-overload-signatures": "error",
+ "@typescript-eslint/array-type": "off",
+ "@typescript-eslint/require-await": "off",
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-types": "off",
+ "@typescript-eslint/no-unsafe-assignment": "off",
+ "@typescript-eslint/no-unsafe-member-access": "off",
+ "@typescript-eslint/no-unsafe-call": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off",
+ "@typescript-eslint/no-unsafe-return": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/restrict-plus-operands": "off",
+ "@typescript-eslint/restrict-template-expressions": "off",
+ "@typescript-eslint/consistent-type-assertions": "error",
+ "@typescript-eslint/consistent-type-definitions": "error",
+ "@typescript-eslint/explicit-member-accessibility": [
+ "error",
+ {
+ "accessibility": "explicit",
+ "overrides": {
+ "accessors": "explicit",
+ "constructors": "off"
+ }
+ }
+ ],
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/member-delimiter-style": "off",
+ "@typescript-eslint/camelcase": "off",
+ "@typescript-eslint/member-ordering": "off",
+ "@typescript-eslint/no-empty-function": "off",
+ "@typescript-eslint/no-empty-interface": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-floating-promises": "error",
+ "@typescript-eslint/no-misused-promises": "off",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-inferrable-types": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-namespace": "off",
+ "@typescript-eslint/no-parameter-properties": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-unsafe-argument": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/no-var-requires": "off",
+ "@typescript-eslint/prefer-for-of": "off",
+ "@typescript-eslint/prefer-function-type": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "error",
+ "@typescript-eslint/quotes": "off",
+ "@typescript-eslint/semi": [
+ "error",
+ "never"
+ ],
+ "@typescript-eslint/triple-slash-reference": [
+ "error",
+ {
+ "path": "always",
+ "types": "prefer-import",
+ "lib": "always"
+ }
+ ],
+ "@typescript-eslint/unbound-method": "off",
+ "@typescript-eslint/unified-signatures": "error",
+ "arrow-body-style": "off",
+ "arrow-parens": [
+ "error",
+ "as-needed"
+ ],
+ "camelcase": "off",
+ "complexity": "off",
+ "curly": "off",
+ "dot-notation": "off",
+ "eol-last": "off",
+ "eqeqeq": [
+ "off",
+ "always"
+ ],
+ "id-blacklist": [
+ "error",
+ "any",
+ "Number",
+ "number",
+ "String",
+ "string",
+ "Boolean",
+ "boolean",
+ "Undefined"
+ ],
+ "id-match": "error",
+ "jsdoc/check-alignment": "error",
+ "jsdoc/check-indentation": "error",
+ "jsdoc/newline-after-description": "error",
+ "max-classes-per-file": "off",
+ "new-parens": "error",
+ "no-bitwise": "off",
+ "no-caller": "error",
+ "no-eval": "error",
+ "no-invalid-this": "off",
+ "no-magic-numbers": "off",
+ "no-multiple-empty-lines": [
+ "error",
+ {
+ "max": 1
+ }
+ ],
+ "no-new-wrappers": "error",
+ "no-shadow": [
+ "off",
+ {
+ "hoist": "all"
+ }
+ ],
+ "no-template-curly-in-string": "off",
+ "no-throw-literal": "error",
+ "no-trailing-spaces": "error",
+ "no-undef-init": "error",
+ "no-underscore-dangle": "off",
+ "no-unused-expressions": "off",
+ "no-var": "error",
+ "no-void": "off",
+ "object-shorthand": "error",
+ "one-var": [
+ "error",
+ "never"
+ ],
+ "prefer-const": "off",
+ "prefer-template": "off",
+ "quote-props": [
+ "error",
+ "as-needed"
+ ],
+ "radix": "error",
+ "space-before-function-paren": [
+ "error",
+ {
+ "anonymous": "never",
+ "asyncArrow": "always",
+ "named": "never"
+ }
+ ],
+ "spaced-comment": [
+ "error",
+ "always",
+ {
+ "markers": [
+ "/"
+ ]
+ }
+ ]
+ },
+ "settings": {}
+}
diff --git a/sources_non_forked/coc.nvim/.github/.codecov.yml b/sources_non_forked/coc.nvim/.github/.codecov.yml
new file mode 100644
index 00000000..fa348a8f
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.github/.codecov.yml
@@ -0,0 +1,3 @@
+coverage:
+ status:
+ patch: off
diff --git a/sources_non_forked/coc.nvim/.github/FUNDING.yml b/sources_non_forked/coc.nvim/.github/FUNDING.yml
new file mode 100644
index 00000000..bc74b9db
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.github/FUNDING.yml
@@ -0,0 +1,4 @@
+# These are supported funding model platforms
+
+open_collective: cocnvim
+patreon: chemzqm
diff --git a/sources_non_forked/coc.nvim/.github/ISSUE_TEMPLATE/bug_report.md b/sources_non_forked/coc.nvim/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..3b0eaebb
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,45 @@
+---
+name: Bug report
+about: Create a report to help us improve
+---
+
+
+
+## Result from CocInfo
+
+
+
+## Describe the bug
+
+A clear and concise description of what the bug is.
+
+## Reproduce the bug
+
+**We will close your issue when you don't provide minimal vimrc and we can't
+reproduce it**
+
+- Create file `mini.vim` with:
+
+ ```vim
+ set nocompatible
+ set runtimepath^=/path/to/coc.nvim
+ filetype plugin indent on
+ syntax on
+ set hidden
+ ```
+
+- Start (neo)vim with command: `vim -u mini.vim`
+
+- Operate vim.
+
+## Screenshots (optional)
+
+If applicable, add screenshots to help explain your problem.
diff --git a/sources_non_forked/coc.nvim/.github/ISSUE_TEMPLATE/feature_request.md b/sources_non_forked/coc.nvim/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 00000000..066b2d92
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,17 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/sources_non_forked/coc.nvim/.github/workflows/ci.yml b/sources_non_forked/coc.nvim/.github/workflows/ci.yml
new file mode 100644
index 00000000..eb0e1331
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.github/workflows/ci.yml
@@ -0,0 +1,73 @@
+name: Dev
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ test:
+ if: github.event.pull_request.draft == false
+ timeout-minutes: 60
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ node:
+ - "16"
+ - "14"
+ nvim:
+ - "0.7.0"
+ include:
+ # only enable coverage on the fastest job
+ - node: "16"
+ ENABLE_CODE_COVERAGE: true
+
+ env:
+ NODE_ENV: test
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2.3.4
+ with:
+ fetch-depth: 2
+
+ - name: Setup Node.js ${{ matrix.node }}
+ uses: actions/setup-node@v2.4.0
+ with:
+ node-version: ${{ matrix.node }}
+ cache: "yarn"
+
+ - name: Setup python3
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.9'
+ cache: 'pip'
+ - run: pip install pynvim
+
+ - name: Install Dependencies
+ run: |
+ yarn global add typescript
+ yarn install --frozen-lockfile
+
+ - name: Setup nvim ${{ matrix.nvim }}
+ run: |
+ sudo apt-get install -y xclip ripgrep ctags
+ xclip -version
+ rg --version
+ ctags --version
+ curl -LO https://github.com/neovim/neovim/releases/download/v${{ matrix.nvim }}/nvim-linux64.tar.gz
+ tar xzf nvim-linux64.tar.gz
+ export PATH="${PATH}:node_modules/.bin:$(pwd)/nvim-linux64/bin"
+ nvim --version
+ yarn test-build --maxWorkers=2
+
+ - name: Codecov
+ uses: codecov/codecov-action@v1
+ if: ${{ matrix.ENABLE_CODE_COVERAGE }}
+ with:
+ fail_ci_if_error: true
diff --git a/sources_non_forked/coc.nvim/.github/workflows/lint.yml b/sources_non_forked/coc.nvim/.github/workflows/lint.yml
new file mode 100644
index 00000000..448bccb3
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.github/workflows/lint.yml
@@ -0,0 +1,35 @@
+name: Lint
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ lint:
+ if: github.event.pull_request.draft == false
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2.3.4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v2.4.0
+ with:
+ cache: "yarn"
+
+ - name: Install Dependencies
+ run: yarn install --frozen-lockfile
+
+ - name: Check Types by TSC
+ run: yarn lint:typecheck
+
+ - name: Lint ESLint
+ run: yarn lint
+
+ - name: Check Lock File Changes
+ run: yarn && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint."
diff --git a/sources_non_forked/coc.nvim/.gitignore b/sources_non_forked/coc.nvim/.gitignore
index f9ec5e3d..266844b7 100644
--- a/sources_non_forked/coc.nvim/.gitignore
+++ b/sources_non_forked/coc.nvim/.gitignore
@@ -1,13 +1,16 @@
lib
+.cache
*.map
coverage
__pycache__
.pyc
.log
-src
-publish.sh
+build
doc/tags
-doc/tags-cn
+typings/package.json
node_modules
-src/__tests__/tags
-typings
+publish.sh
+release.sh
+!src/__tests__/tags
+src/__tests__/extensions/db.json
+package-lock.json
diff --git a/sources_non_forked/coc.nvim/.ignore b/sources_non_forked/coc.nvim/.ignore
new file mode 100644
index 00000000..a65b4177
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.ignore
@@ -0,0 +1 @@
+lib
diff --git a/sources_non_forked/coc.nvim/.npmignore b/sources_non_forked/coc.nvim/.npmignore
new file mode 100644
index 00000000..0193cd28
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.npmignore
@@ -0,0 +1,16 @@
+*.map
+.cache
+lib/extensions
+lib/__tests__
+plugin
+autoload
+rplugin
+src
+.github
+build
+coverage
+data
+tslint.json
+tsconfig.json
+.zip
+.DS_Store
diff --git a/sources_non_forked/coc.nvim/.prettierignore b/sources_non_forked/coc.nvim/.prettierignore
new file mode 100644
index 00000000..8eba6c8d
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.prettierignore
@@ -0,0 +1 @@
+src/
diff --git a/sources_non_forked/coc.nvim/.swcrc b/sources_non_forked/coc.nvim/.swcrc
new file mode 100644
index 00000000..6df4f6a9
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.swcrc
@@ -0,0 +1,16 @@
+{
+ "sourceMaps": false,
+ "module": {
+ "type": "es6"
+ },
+ "jsc": {
+ "parser": {
+ "syntax": "typescript",
+ "tsx": false,
+ "dynamicImport": false,
+ "decorators": false
+ },
+ "loose": true,
+ "target": "es2016"
+ }
+}
diff --git a/sources_non_forked/coc.nvim/.vim/coc-settings.json b/sources_non_forked/coc.nvim/.vim/coc-settings.json
new file mode 100644
index 00000000..7746fb78
--- /dev/null
+++ b/sources_non_forked/coc.nvim/.vim/coc-settings.json
@@ -0,0 +1,7 @@
+{
+ "eslint.validate": ["typescript"],
+ "eslint.lintTask.options": [".", "--ext", ".ts"],
+ "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
+ "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
+ "typescript.suggestionActions.enabled": false
+}
diff --git a/sources_non_forked/coc.nvim/Backers.md b/sources_non_forked/coc.nvim/Backers.md
new file mode 100644
index 00000000..b3cdb0b2
--- /dev/null
+++ b/sources_non_forked/coc.nvim/Backers.md
@@ -0,0 +1,207 @@
+# Backers
+
+❤️ coc.nvim? Help us keep it alive by [donating funds](https://www.bountysource.com/teams/coc-nvim)😘!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## 微信扫码赞助者
+
+- free-easy
+- sarene
+- tomspeak
+- robtrac
+- 葫芦小金刚
+- leo 陶
+- 飞翔的白斩鸡
+- mark_ll
+- 火冷
+- Solomon
+- 李宇星
+- Yus
+- IndexXuan
+- Sniper
+- 陈达野
+- 胖听
+- Jimmy
+- lightxue
+- 小亦俊
+- 周慎敏
+- 凤鸣
+- Wilson
+- Abel
diff --git a/sources_non_forked/coc.nvim/CONTRIBUTING.md b/sources_non_forked/coc.nvim/CONTRIBUTING.md
new file mode 100644
index 00000000..a3cac5f5
--- /dev/null
+++ b/sources_non_forked/coc.nvim/CONTRIBUTING.md
@@ -0,0 +1,142 @@
+# Contributing
+
+## How do I...
+
+- [Use This Guide](#introduction)?
+- Make Something? 🤓👩🏽💻📜🍳
+ - [Project Setup](#project-setup)
+ - [Contribute Documentation](#contribute-documentation)
+ - [Contribute Code](#contribute-code)
+- Manage Something ✅🙆🏼💃👔
+ - [Provide Support on Issues](#provide-support-on-issues)
+ - [Review Pull Requests](#review-pull-requests)
+ - [Join the Project Team](#join-the-project-team)
+
+## Introduction
+
+Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝
+
+The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨
+
+## Project Setup
+
+So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before.
+
+If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code).
+
+If you want to go the usual route and run the project locally, though:
+
+- [Install Node.js](https://nodejs.org/en/download/)
+- [Install Yarn](https://yarnpkg.com)
+- [Fork the project](https://guides.github.com/activities/forking/#fork)
+
+Then in your terminal:
+
+- Add coc.nvim to your vim's rtp by `set runtimepath^=/path/to/coc.nvim`
+- `cd path/to/your/coc.nvim`
+- `yarn install`
+- Install [coc-tsserver](https://github.com/neoclide/coc-tsserver) by
+ `:CocInstall coc-tsserver` in your vim
+- Install [coc-tslint-plugin](https://github.com/neoclide/coc-tslint-plugin) by
+ `:CocInstall coc-tslint-plugin` in your vim.
+
+And you should be ready to go!
+
+## Contribute Documentation
+
+Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance.
+
+Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
+
+To contribute documentation:
+
+- [Set up the project](#project-setup).
+- Edit or add any relevant documentation.
+- Make sure your changes are formatted correctly and consistently with the rest of the documentation.
+- Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything.
+- In your commit message(s), begin the first line with `docs:`. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`.
+- Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `.
+- Go to https://github.com/neoclide/coc.nvim/pulls and open a new pull request with your changes.
+- If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+## Contribute Code
+
+We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
+
+Code contributions of just about any size are acceptable!
+
+The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution.
+
+To contribute code:
+
+- [Set up the project](#project-setup).
+- Make any necessary changes to the source code.
+- Include any [additional documentation](#contribute-documentation) the changes might need.
+- Make sure the code doesn't have lint issue by command `yarn lint` in your
+ terminal.
+- Write tests that verify that your contribution works as expected when necessary.
+- Make sure all tests passed by command `yarn jest` in your terminal.
+- Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md).
+- Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion.
+- Go to https://github.com/neoclide/coc.nvim/pulls and open a new pull request with your changes.
+- If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing.
+
+Once you've filed the PR:
+
+- Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
+- One or more maintainers will use GitHub's review feature to review your PR.
+- If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review.
+- If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚
+- If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release)
+
+## Provide Support on Issues
+
+[Needs Collaborator](#join-the-project-team): none
+
+Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug.
+
+Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it.
+
+In order to help other folks out with their questions:
+
+- Go to the issue tracker and [filter open issues by the `support` label](https://github.com/neoclide/coc.nvim/issues?q=is%3Aopen+is%3Aissue+label%3Asupport).
+- Read through the list until you find something that you're familiar enough with to give an answer to.
+- Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on.
+- Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you.
+
+Some notes on picking up support issues:
+
+- Avoid responding to issues you don't know you can answer accurately.
+- As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format.
+- Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict).
+
+## Review Pull Requests
+
+[Needs Collaborator](#join-the-project-team): Issue Tracker
+
+While anyone can comment on a PR, add feedback, etc, PRs are only _approved_ by team members with Issue Tracker or higher permissions.
+
+PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration.
+
+Some notes:
+
+- You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments".
+- _ALL PULL REQUESTS_ should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers.
+- Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own.
+- Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it?
+
+## Join the Project Team
+
+### Ways to Join
+
+There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do.
+
+All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like.
+
+You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names.
+
+| Permission | Description |
+| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker. |
+| Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team. |
+| Admin/Owner | Granted to people ultimately responsible for the project, its community, etc. |
diff --git a/sources_non_forked/coc.nvim/LICENSE.md b/sources_non_forked/coc.nvim/LICENSE.md
index bee2bf1d..2faae0b1 100644
--- a/sources_non_forked/coc.nvim/LICENSE.md
+++ b/sources_non_forked/coc.nvim/LICENSE.md
@@ -1,7 +1,46 @@
-Copyright 2018-2018 by Qiming Zhao aaa
+Copyright (c) <2022>
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+"Anti 996" License Version 1.0 (Draft)
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+Permission is hereby granted to any individual or legal entity
+obtaining a copy of this licensed work (including the source code,
+documentation and/or related items, hereinafter collectively referred
+to as the "licensed work"), free of charge, to deal with the licensed
+work for any purpose, including without limitation, the rights to use,
+reproduce, modify, prepare derivative works of, distribute, publish
+and sublicense the licensed work, subject to the following conditions:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+1. The individual or the legal entity must conspicuously display,
+ without modification, this License and the notice on each redistributed
+ or derivative copy of the Licensed Work.
+
+2. The individual or the legal entity must strictly comply with all
+ applicable laws, regulations, rules and standards of the jurisdiction
+ relating to labor and employment where the individual is physically
+ located or where the individual was born or naturalized; or where the
+ legal entity is registered or is operating (whichever is stricter). In
+ case that the jurisdiction has no such laws, regulations, rules and
+ standards or its laws, regulations, rules and standards are
+ unenforceable, the individual or the legal entity are required to
+ comply with Core International Labor Standards.
+
+3. The individual or the legal entity shall not induce, suggest or force
+ its employee(s), whether full-time or part-time, or its independent
+ contractor(s), in any methods, to agree in oral or written form, to
+ directly or indirectly restrict, weaken or relinquish his or her
+ rights or remedies under such laws, regulations, rules and standards
+ relating to labor and employment as mentioned above, no matter whether
+ such written or oral agreements are enforceable under the laws of the
+ said jurisdiction, nor shall such individual or the legal entity
+ limit, in any methods, the rights of its employee(s) or independent
+ contractor(s) from reporting or complaining to the copyright holder or
+ relevant authorities monitoring the compliance of the license about
+ its violation(s) of the said license.
+
+THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN ANY WAY CONNECTION WITH THE
+LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE LICENSED WORK.
diff --git a/sources_non_forked/coc.nvim/Readme.md b/sources_non_forked/coc.nvim/README.md
similarity index 100%
rename from sources_non_forked/coc.nvim/Readme.md
rename to sources_non_forked/coc.nvim/README.md
diff --git a/sources_non_forked/coc.nvim/autoload/coc/helper.vim b/sources_non_forked/coc.nvim/autoload/coc/helper.vim
deleted file mode 100644
index 8bdc9b86..00000000
--- a/sources_non_forked/coc.nvim/autoload/coc/helper.vim
+++ /dev/null
@@ -1,148 +0,0 @@
-scriptencoding utf-8
-" Helper methods for viml
-
-function! coc#helper#get_charactor(line, col) abort
- return strchars(strpart(a:line, 0, a:col - 1))
-endfunction
-
-function! coc#helper#last_character(line) abort
- return strcharpart(a:line, strchars(a:line) - 1, 1)
-endfunction
-
-function! coc#helper#obj_equal(one, two) abort
- for key in keys(a:one)
- if a:one[key] != a:two[key]
- return 0
- endif
- endfor
- return 1
-endfunction
-
-" get change between two lines
-function! coc#helper#str_diff(curr, previous, col) abort
- let end = strpart(a:curr, a:col - 1)
- let start = strpart(a:curr, 0, a:col -1)
- let endOffset = 0
- let startOffset = 0
- let currLen = strchars(a:curr)
- let prevLen = strchars(a:previous)
- if len(end)
- let endLen = strchars(end)
- for i in range(min([prevLen, endLen]))
- if strcharpart(end, endLen - 1 - i, 1) ==# strcharpart(a:previous, prevLen -1 -i, 1)
- let endOffset = endOffset + 1
- else
- break
- endif
- endfor
- endif
- let remain = endOffset == 0 ? a:previous : strcharpart(a:previous, 0, prevLen - endOffset)
- if len(remain)
- for i in range(min([strchars(remain), strchars(start)]))
- if strcharpart(remain, i, 1) ==# strcharpart(start, i ,1)
- let startOffset = startOffset + 1
- else
- break
- endif
- endfor
- endif
- return {
- \ 'start': startOffset,
- \ 'end': prevLen - endOffset,
- \ 'text': strcharpart(a:curr, startOffset, currLen - startOffset - endOffset)
- \ }
-endfunction
-
-function! coc#helper#str_apply(content, diff) abort
- let totalLen = strchars(a:content)
- let endLen = totalLen - a:diff['end']
- return strcharpart(a:content, 0, a:diff['start']).a:diff['text'].strcharpart(a:content, a:diff['end'], endLen)
-endfunction
-
-" insert inserted to line at position, use ... when result is too long
-" line should only contains character has strwidth equals 1
-function! coc#helper#str_compose(line, position, inserted) abort
- let width = strwidth(a:line)
- let text = a:inserted
- let res = a:line
- let need_truncate = a:position + strwidth(text) + 1 > width
- if need_truncate
- let remain = width - a:position - 3
- if remain < 2
- " use text for full line, use first & end of a:line, ignore position
- let res = strcharpart(a:line, 0, 1)
- let w = strwidth(res)
- for i in range(strchars(text))
- let c = strcharpart(text, i, 1)
- let a = strwidth(c)
- if w + a <= width - 1
- let w = w + a
- let res = res.c
- endif
- endfor
- let res = res.strcharpart(a:line, w)
- else
- let res = strcharpart(a:line, 0, a:position)
- let w = strwidth(res)
- for i in range(strchars(text))
- let c = strcharpart(text, i, 1)
- let a = strwidth(c)
- if w + a <= width - 3
- let w = w + a
- let res = res.c
- endif
- endfor
- let res = res.'..'
- let w = w + 2
- let res = res.strcharpart(a:line, w)
- endif
- else
- let first = strcharpart(a:line, 0, a:position)
- let res = first.text.strcharpart(a:line, a:position + strwidth(text))
- endif
- return res
-endfunction
-
-" Return new dict with keys removed
-function! coc#helper#dict_omit(dict, keys) abort
- let res = {}
- for key in keys(a:dict)
- if index(a:keys, key) == -1
- let res[key] = a:dict[key]
- endif
- endfor
- return res
-endfunction
-
-" Return new dict with keys only
-function! coc#helper#dict_pick(dict, keys) abort
- let res = {}
- for key in keys(a:dict)
- if index(a:keys, key) != -1
- let res[key] = a:dict[key]
- endif
- endfor
- return res
-endfunction
-
-" support for float values
-function! coc#helper#min(first, ...) abort
- let val = a:first
- for i in range(0, len(a:000) - 1)
- if a:000[i] < val
- let val = a:000[i]
- endif
- endfor
- return val
-endfunction
-
-" support for float values
-function! coc#helper#max(first, ...) abort
- let val = a:first
- for i in range(0, len(a:000) - 1)
- if a:000[i] > val
- let val = a:000[i]
- endif
- endfor
- return val
-endfunction
diff --git a/sources_non_forked/coc.nvim/autoload/coc/notify.vim b/sources_non_forked/coc.nvim/autoload/coc/notify.vim
index 562a02d5..89351fbe 100644
--- a/sources_non_forked/coc.nvim/autoload/coc/notify.vim
+++ b/sources_non_forked/coc.nvim/autoload/coc/notify.vim
@@ -292,8 +292,9 @@ function! coc#notify#close(winid) abort
endif
call coc#window#set_var(a:winid, 'closing', 1)
call s:cancel(a:winid)
- let curr = s:is_vim ? {'row': row} : {'winblend': coc#window#get_var(a:winid, 'winblend', 30)}
- let dest = s:is_vim ? {'row': row + 1} : {'winblend': 60}
+ let winblend = coc#window#get_var(a:winid, 'winblend', 0)
+ let curr = s:is_vim ? {'row': row} : {'winblend': winblend}
+ let dest = s:is_vim ? {'row': row + 1} : {'winblend': winblend == 0 ? 0 : 60}
call s:animate(a:winid, curr, dest, 0, 1)
endfunction
diff --git a/sources_non_forked/coc.nvim/autoload/coc/util.vim b/sources_non_forked/coc.nvim/autoload/coc/util.vim
index c4b38b2a..5be8bcf1 100644
--- a/sources_non_forked/coc.nvim/autoload/coc/util.vim
+++ b/sources_non_forked/coc.nvim/autoload/coc/util.vim
@@ -182,14 +182,10 @@ function! coc#util#jump(cmd, filepath, ...) abort
else
exec 'drop '.fnameescape(file)
endif
- elseif a:cmd == 'edit'
- if bufloaded(file)
- exe 'b '.bufnr(file)
- else
- exe a:cmd.' '.fnameescape(file)
- endif
+ elseif a:cmd == 'edit' && bufloaded(file)
+ exe 'b '.bufnr(file)
else
- exe a:cmd.' '.fnameescape(file)
+ call s:safer_open(a:cmd, file)
endif
if !empty(get(a:, 1, []))
let line = getline(a:1[0] + 1)
@@ -208,6 +204,32 @@ function! coc#util#jump(cmd, filepath, ...) abort
endif
endfunction
+function! s:safer_open(cmd, file) abort
+ " How to support :pedit and :drop?
+ let is_supported_cmd = index(["edit", "split", "vsplit", "tabe"], a:cmd) >= 0
+
+ " Use special handling only for URI.
+ let looks_like_uri = match(a:file, "^.*://") >= 0
+
+ if looks_like_uri && is_supported_cmd && has('win32') && exists('*bufadd')
+ " Workaround a bug for Win32 paths.
+ "
+ " reference:
+ " - https://github.com/vim/vim/issues/541
+ " - https://github.com/neoclide/coc-java/issues/82
+ " - https://github.com/vim-jp/issues/issues/6
+ let buf = bufadd(a:file)
+ if a:cmd != 'edit'
+ " Open split, tab, etc. by a:cmd.
+ exe a:cmd
+ endif
+ " Set current buffer to the file
+ exe 'keepjumps buffer ' . buf
+ else
+ exe a:cmd.' '.fnameescape(a:file)
+ endif
+endfunction
+
function! coc#util#variables(bufnr) abort
let info = getbufinfo(a:bufnr)
let variables = empty(info) ? {} : copy(info[0]['variables'])
diff --git a/sources_non_forked/coc.nvim/build/index.js b/sources_non_forked/coc.nvim/build/index.js
deleted file mode 100644
index ad4d1e6e..00000000
--- a/sources_non_forked/coc.nvim/build/index.js
+++ /dev/null
@@ -1,337 +0,0 @@
-"use strict";(function () {
- var v = process.version
- var parts = v.slice(1).split('.')
- var major = parseInt(parts[0], 10)
- var minor = parseInt(parts[1], 10)
- if (major < 12 || (major == 12 && minor < 12)) {
- throw new Error('coc.nvim requires node >= v12.12.0, current version: ' + v)
- }
-})();
-var Vte=Object.create;var Jh=Object.defineProperty,eie=Object.defineProperties,tie=Object.getOwnPropertyDescriptor,iie=Object.getOwnPropertyDescriptors,nie=Object.getOwnPropertyNames,yR=Object.getOwnPropertySymbols,rie=Object.getPrototypeOf,wR=Object.prototype.hasOwnProperty,oie=Object.prototype.propertyIsEnumerable;var vR=(n,e,t)=>e in n?Jh(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ge=(n,e)=>{for(var t in e||(e={}))wR.call(e,t)&&vR(n,t,e[t]);if(yR)for(var t of yR(e))oie.call(e,t)&&vR(n,t,e[t]);return n},Ba=(n,e)=>eie(n,iie(e)),DR=n=>Jh(n,"__esModule",{value:!0});var _=(n,e)=>()=>(n&&(e=n(n=0)),e);var m=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),xs=(n,e)=>{for(var t in e)Jh(n,t,{get:e[t],enumerable:!0})},xR=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nie(e))!wR.call(n,r)&&(t||r!=="default")&&Jh(n,r,{get:()=>e[r],enumerable:!(i=tie(e,r))||i.enumerable});return n},C=(n,e)=>xR(DR(Jh(n!=null?Vte(rie(n)):{},"default",!e&&n&&n.__esModule?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n),Ha=(n=>(e,t)=>n&&n.get(e)||(t=xR(DR({}),e,1),n&&n.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var SR=m((QTe,CR)=>{var pu=1e3,mu=pu*60,bu=mu*60,qa=bu*24,sie=qa*7,aie=qa*365.25;CR.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return lie(n);if(t==="number"&&isFinite(n))return e.long?cie(n):uie(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function lie(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!!e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*aie;case"weeks":case"week":case"w":return t*sie;case"days":case"day":case"d":return t*qa;case"hours":case"hour":case"hrs":case"hr":case"h":return t*bu;case"minutes":case"minute":case"mins":case"min":case"m":return t*mu;case"seconds":case"second":case"secs":case"sec":case"s":return t*pu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function uie(n){var e=Math.abs(n);return e>=qa?Math.round(n/qa)+"d":e>=bu?Math.round(n/bu)+"h":e>=mu?Math.round(n/mu)+"m":e>=pu?Math.round(n/pu)+"s":n+"ms"}function cie(n){var e=Math.abs(n);return e>=qa?yp(n,e,qa,"day"):e>=bu?yp(n,e,bu,"hour"):e>=mu?yp(n,e,mu,"minute"):e>=pu?yp(n,e,pu,"second"):n+" ms"}function yp(n,e,t,i){var r=e>=t*1.5;return Math.round(n/t)+" "+i+(r?"s":"")}});var Ex=m((KTe,TR)=>{function hie(n){t.debug=t,t.default=t,t.coerce=l,t.disable=o,t.enable=r,t.enabled=s,t.humanize=SR(),t.destroy=u,Object.keys(n).forEach(c=>{t[c]=n[c]}),t.names=[],t.skips=[],t.formatters={};function e(c){let h=0;for(let d=0;d{if(L==="%%")return"%";S++;let W=t.formatters[j];if(typeof W=="function"){let B=b[S];L=W.call(v,B),b.splice(S,1),S--}return L}),t.formatArgs.call(v,b),(v.log||t.log).apply(v,b)}return p.namespace=c,p.useColors=t.useColors(),p.color=t.selectColor(c),p.extend=i,p.destroy=t.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==t.namespaces&&(g=t.namespaces,f=t.enabled(c)),f),set:b=>{d=b}}),typeof t.init=="function"&&t.init(p),p}function i(c,h){let d=t(this.namespace+(typeof h>"u"?":":h)+c);return d.log=this.log,d}function r(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let h,d=(typeof c=="string"?c:"").split(/[\s,]+/),g=d.length;for(h=0;h"-"+h)].join(",");return t.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let h,d;for(h=0,d=t.skips.length;h{En.formatArgs=gie;En.save=fie;En.load=pie;En.useColors=die;En.storage=mie();En.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();En.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function die(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function gie(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+vp.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,i=0;n[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(t++,r==="%c"&&(i=t))}),n.splice(i,0,e)}En.log=console.debug||console.log||(()=>{});function fie(n){try{n?En.storage.setItem("debug",n):En.storage.removeItem("debug")}catch{}}function pie(){let n;try{n=En.storage.getItem("debug")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function mie(){try{return localStorage}catch{}}vp.exports=Ex()(En);var{formatters:bie}=vp.exports;bie.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var PR=m((zTe,ER)=>{"use strict";ER.exports=(n,e=process.argv)=>{let t=n.startsWith("-")?"":n.length===1?"-":"--",i=e.indexOf(t+n),r=e.indexOf("--");return i!==-1&&(r===-1||i{"use strict";var yie=require("os"),_R=require("tty"),Yn=PR(),{env:oi}=process,Cs;Yn("no-color")||Yn("no-colors")||Yn("color=false")||Yn("color=never")?Cs=0:(Yn("color")||Yn("colors")||Yn("color=true")||Yn("color=always"))&&(Cs=1);"FORCE_COLOR"in oi&&(oi.FORCE_COLOR==="true"?Cs=1:oi.FORCE_COLOR==="false"?Cs=0:Cs=oi.FORCE_COLOR.length===0?1:Math.min(parseInt(oi.FORCE_COLOR,10),3));function Px(n){return n===0?!1:{level:n,hasBasic:!0,has256:n>=2,has16m:n>=3}}function _x(n,e){if(Cs===0)return 0;if(Yn("color=16m")||Yn("color=full")||Yn("color=truecolor"))return 3;if(Yn("color=256"))return 2;if(n&&!e&&Cs===void 0)return 0;let t=Cs||0;if(oi.TERM==="dumb")return t;if(process.platform==="win32"){let i=yie.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in oi)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in oi)||oi.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in oi)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oi.TEAMCITY_VERSION)?1:0;if(oi.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in oi){let i=parseInt((oi.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oi.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(oi.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oi.TERM)||"COLORTERM"in oi?1:t}function vie(n){let e=_x(n,n&&n.isTTY);return Px(e)}RR.exports={supportsColor:vie,stdout:Px(_x(!0,_R.isatty(1))),stderr:Px(_x(!0,_R.isatty(2)))}});var IR=m((fi,Dp)=>{var wie=require("tty"),wp=require("util");fi.init=Eie;fi.log=Sie;fi.formatArgs=xie;fi.save=Tie;fi.load=kie;fi.useColors=Die;fi.destroy=wp.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");fi.colors=[6,2,3,4,5,1];try{let n=LR();n&&(n.stderr||n).level>=2&&(fi.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}fi.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(r,o)=>o.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[t]=i,n},{});function Die(){return"colors"in fi.inspectOpts?Boolean(fi.inspectOpts.colors):wie.isatty(process.stderr.fd)}function xie(n){let{namespace:e,useColors:t}=this;if(t){let i=this.color,r="\x1B[3"+(i<8?i:"8;5;"+i),o=` ${r};1m${e} \x1B[0m`;n[0]=o+n[0].split(`
-`).join(`
-`+o),n.push(r+"m+"+Dp.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=Cie()+e+" "+n[0]}function Cie(){return fi.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Sie(...n){return process.stderr.write(wp.format(...n)+`
-`)}function Tie(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function kie(){return process.env.DEBUG}function Eie(n){n.inspectOpts={};let e=Object.keys(fi.inspectOpts);for(let t=0;te.trim()).join(" ")};FR.O=function(n){return this.inspectOpts.colors=this.useColors,wp.inspect(n,this.inspectOpts)}});var Ot=m((eke,Rx)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Rx.exports=kR():Rx.exports=IR()});var AR=m((tke,jR)=>{"use strict";jR.exports=Pie;function yu(n){return n instanceof Buffer?Buffer.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function Pie(n){if(n=n||{},n.circles)return _ie(n);return n.proto?i:t;function e(r,o){for(var s=Object.keys(r),a=new Array(s.length),l=0;l{var Rie=require("util"),Ya=Ot()("log4js:configuration"),xp=[],Cp=[],OR=n=>!n,MR=n=>n&&typeof n=="object"&&!Array.isArray(n),Lie=n=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(n),Fie=n=>n&&typeof n=="number"&&Number.isInteger(n),Iie=n=>{Cp.push(n),Ya(`Added listener, now ${Cp.length} listeners`)},jie=n=>{xp.push(n),Ya(`Added pre-processing listener, now ${xp.length} listeners`)},NR=(n,e,t)=>{(Array.isArray(e)?e:[e]).forEach(r=>{if(r)throw new Error(`Problem with log4js configuration: (${Rie.inspect(n,{depth:5})}) - ${t}`)})},Aie=n=>{Ya("New configuration to be validated: ",n),NR(n,OR(MR(n)),"must be an object."),Ya(`Calling pre-processing listeners (${xp.length})`),xp.forEach(e=>e(n)),Ya("Configuration pre-processing finished."),Ya(`Calling configuration listeners (${Cp.length})`),Cp.forEach(e=>e(n)),Ya("Configuration finished.")};BR.exports={configure:Aie,addListener:Iie,addPreProcessingListener:jie,throwExceptionIf:NR,anObject:MR,anInteger:Fie,validIdentifier:Lie,not:OR}});var Sp=m((nke,Wn)=>{"use strict";function HR(n,e){for(var t=n.toString();t.length-1?r:o,a=Za(e.getHours()),l=Za(e.getMinutes()),u=Za(e.getSeconds()),c=HR(e.getMilliseconds(),3),h=Oie(e.getTimezoneOffset()),d=n.replace(/dd/g,t).replace(/MM/g,i).replace(/y{1,4}/g,s).replace(/hh/g,a).replace(/mm/g,l).replace(/ss/g,u).replace(/SSS/g,c).replace(/O/g,h);return d}function Ja(n,e,t,i){n["set"+(i?"":"UTC")+e](t)}function Mie(n,e,t){var i=n.indexOf("O")<0,r=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(c,h){Ja(c,"FullYear",h,i)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(c,h){Ja(c,"Month",h-1,i)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(c,h){Ja(c,"Date",h,i)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(c,h){Ja(c,"Hours",h,i)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(c,h){Ja(c,"Minutes",h,i)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(c,h){Ja(c,"Seconds",h,i)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(c,h){Ja(c,"Milliseconds",h,i)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(c,h){h==="Z"?h=0:h=h.replace(":","");var d=Math.abs(h),g=(h>0?-1:1)*(d%100+Math.floor(d/100)*60);c.setUTCMinutes(c.getUTCMinutes()+g)}}],o=r.reduce(function(c,h){return h.pattern.test(c.regexp)?(h.index=c.regexp.match(h.pattern).index,c.regexp=c.regexp.replace(h.pattern,"("+h.regexp+")")):h.index=-1,c},{regexp:n,index:[]}),s=r.filter(function(c){return c.index>-1});s.sort(function(c,h){return c.index-h.index});var a=new RegExp(o.regexp),l=a.exec(e);if(l){var u=t||Wn.exports.now();return s.forEach(function(c,h){c.fn(u,l[h+1])}),u}throw new Error("String '"+e+"' could not be parsed as '"+n+"'")}function Nie(n,e,t){if(!n)throw new Error("pattern must be supplied");return Mie(n,e,t)}function Bie(){return new Date}Wn.exports=qR;Wn.exports.asString=qR;Wn.exports.parse=Nie;Wn.exports.now=Bie;Wn.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";Wn.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";Wn.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";Wn.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"});var Fx=m((rke,zR)=>{var Ss=Sp(),YR=require("os"),$h=require("util"),WR=require("path"),ZR={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function JR(n){return n?`\x1B[${ZR[n][0]}m`:""}function $R(n){return n?`\x1B[${ZR[n][1]}m`:""}function Hie(n,e){return JR(e)+n+$R(e)}function XR(n,e){return Hie($h.format("[%s] [%s] %s - ",Ss.asString(n.startTime),n.level.toString(),n.categoryName),e)}function UR(n){return XR(n)+$h.format(...n.data)}function Tp(n){return XR(n,n.level.colour)+$h.format(...n.data)}function GR(n){return $h.format(...n.data)}function QR(n){return n.data[0]}function KR(n,e){let t="%r %p %c - %m%n",i=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflos%])(\{([^}]+)\})?|([^%]+)/;n=n||t;function r(I,M){let J=I.categoryName;if(M){let K=parseInt(M,10),ae=J.split(".");KK&&(J=ae.slice(-K).join(WR.sep))}return J}function D(I){return I.lineNumber?`${I.lineNumber}`:""}function S(I){return I.columnNumber?`${I.columnNumber}`:""}function F(I){return I.callStack||""}let L={c:r,d:o,h:s,m:a,n:l,p:u,r:c,"[":h,"]":d,y:p,z:f,"%":g,x:b,X:v,f:w,l:D,o:S,s:F};function j(I,M,J){return L[I](M,J)}function W(I,M){let J;return I?(J=parseInt(I.substr(1),10),J>0?M.slice(0,J):M.slice(J)):M}function B(I,M){let J;if(I)if(I.charAt(0)==="-")for(J=parseInt(I.substr(1),10);M.length{var Yt=Wa(),VR=["white","grey","black","blue","cyan","green","magenta","red","yellow"],zt=class{constructor(e,t,i){this.level=e,this.levelStr=t,this.colour=i}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof zt?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),zt[e.toString().toUpperCase()]||t):t}static addLevels(e){e&&(Object.keys(e).forEach(i=>{let r=i.toUpperCase();zt[r]=new zt(e[i].value,r,e[i].colour);let o=zt.levels.findIndex(s=>s.levelStr===r);o>-1?zt.levels[o]=zt[r]:zt.levels.push(zt[r])}),zt.levels.sort((i,r)=>i.level-r.level))}isLessThanOrEqualTo(e){return typeof e=="string"&&(e=zt.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return typeof e=="string"&&(e=zt.getLevel(e)),this.level>=e.level}isEqualTo(e){return typeof e=="string"&&(e=zt.getLevel(e)),this.level===e.level}};zt.levels=[];zt.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Yt.addListener(n=>{let e=n.levels;e&&(Yt.throwExceptionIf(n,Yt.not(Yt.anObject(e)),"levels must be an object"),Object.keys(e).forEach(i=>{Yt.throwExceptionIf(n,Yt.not(Yt.validIdentifier(i)),`level name "${i}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Yt.throwExceptionIf(n,Yt.not(Yt.anObject(e[i])),`level "${i}" must be an object`),Yt.throwExceptionIf(n,Yt.not(e[i].value),`level "${i}" must have a 'value' property`),Yt.throwExceptionIf(n,Yt.not(Yt.anInteger(e[i].value)),`level "${i}".value must have an integer value`),Yt.throwExceptionIf(n,Yt.not(e[i].colour),`level "${i}" must have a 'colour' property`),Yt.throwExceptionIf(n,Yt.not(VR.indexOf(e[i].colour)>-1),`level "${i}".colour must be one of ${VR.join(", ")}`)}))});Yt.addListener(n=>{zt.addLevels(n.levels)});eL.exports=zt});var cL=m(Uh=>{"use strict";var{parse:nL,stringify:rL}=JSON,{keys:qie}=Object,Xh=String,oL="string",tL={},kp="object",sL=(n,e)=>e,Yie=n=>n instanceof Xh?Xh(n):n,Wie=(n,e)=>typeof e===oL?new Xh(e):e,aL=(n,e,t,i)=>{let r=[];for(let o=qie(t),{length:s}=o,a=0;a{let i=Xh(e.push(t)-1);return n.set(t,i),i},lL=(n,e)=>{let t=nL(n,Wie).map(Yie),i=t[0],r=e||sL,o=typeof i===kp&&i?aL(t,new Set,i,r):i;return r.call({"":o},"",o)};Uh.parse=lL;var uL=(n,e,t)=>{let i=e&&typeof e===kp?(c,h)=>c===""||-1nL(uL(n));Uh.toJSON=Zie;var Jie=n=>lL(rL(n));Uh.fromJSON=Jie});var Ix=m((ake,gL)=>{var hL=cL(),dL=$a(),Gh=class{constructor(e,t,i,r,o){this.startTime=new Date,this.categoryName=e,this.data=i,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,o&&(this.functionName=o.functionName,this.fileName=o.fileName,this.lineNumber=o.lineNumber,this.columnNumber=o.columnNumber,this.callStack=o.callStack)}serialise(){let e=this.data.map(t=>(t&&t.message&&t.stack&&(t=Object.assign({message:t.message,stack:t.stack},t)),t));return this.data=e,hL.stringify(this)}static deserialise(e){let t;try{let i=hL.parse(e);i.data=i.data.map(r=>{if(r&&r.message&&r.stack){let o=new Error(r);Object.keys(r).forEach(s=>{o[s]=r[s]}),r=o}return r}),t=new Gh(i.categoryName,dL.getLevel(i.level.levelStr),i.data,i.context),t.startTime=new Date(i.startTime),t.pid=i.pid,t.cluster=i.cluster}catch(i){t=new Gh("log4js",dL.ERROR,["Unable to parse log:",e,"because: ",i])}return t}};gL.exports=Gh});var Pp=m((lke,mL)=>{var Zn=Ot()("log4js:clustering"),$ie=Ix(),Xie=Wa(),vu=!1,$r=null;try{$r=require("cluster")}catch{Zn("cluster module not present"),vu=!0}var Ax=[],Kh=!1,Qh="NODE_APP_INSTANCE",fL=()=>Kh&&process.env[Qh]==="0",jx=()=>vu||$r.isMaster||fL(),pL=n=>{Ax.forEach(e=>e(n))},Ep=(n,e)=>{if(Zn("cluster message received from worker ",n,": ",e),n.topic&&n.data&&(e=n,n=void 0),e&&e.topic&&e.topic==="log4js:message"){Zn("received message: ",e.data);let t=$ie.deserialise(e.data);pL(t)}};vu||Xie.addListener(n=>{Ax.length=0,{pm2:Kh,disableClustering:vu,pm2InstanceVar:Qh="NODE_APP_INSTANCE"}=n,Zn(`clustering disabled ? ${vu}`),Zn(`cluster.isMaster ? ${$r&&$r.isMaster}`),Zn(`pm2 enabled ? ${Kh}`),Zn(`pm2InstanceVar = ${Qh}`),Zn(`process.env[${Qh}] = ${process.env[Qh]}`),Kh&&process.removeListener("message",Ep),$r&&$r.removeListener&&$r.removeListener("message",Ep),vu||n.disableClustering?Zn("Not listening for cluster messages, because clustering disabled."):fL()?(Zn("listening for PM2 broadcast messages"),process.on("message",Ep)):$r.isMaster?(Zn("listening for cluster messages"),$r.on("message",Ep)):Zn("not listening for messages, because we are not a master process")});mL.exports={onlyOnMaster:(n,e)=>jx()?n():e,isMaster:jx,send:n=>{jx()?pL(n):(Kh||(n.cluster={workerId:$r.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:n.serialise()}))},onMessage:n=>{Ax.push(n)}}});var wL=m((uke,vL)=>{function Uie(n){if(typeof n=="number"&&Number.isInteger(n))return n;let e={K:1024,M:1024*1024,G:1024*1024*1024},t=Object.keys(e),i=n.substr(n.length-1).toLocaleUpperCase(),r=n.substring(0,n.length-1).trim();if(t.indexOf(i)<0||!Number.isInteger(Number(r)))throw Error(`maxLogSize: "${n}" is invalid`);return r*e[i]}function Gie(n,e){let t=Object.assign({},e);return Object.keys(n).forEach(i=>{t[i]&&(t[i]=n[i](e[i]))}),t}function bL(n){return Gie({maxLogSize:Uie},n)}var yL={file:bL,fileSync:bL};vL.exports.modifyConfig=n=>yL[n.type]?yL[n.type](n):n});var xL=m((cke,DL)=>{var Qie=console.log.bind(console);function Kie(n,e){return t=>{Qie(n(t,e))}}function zie(n,e){let t=e.colouredLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),Kie(t,n.timezoneOffset)}DL.exports.configure=zie});var SL=m(CL=>{function Vie(n,e){return t=>{process.stdout.write(`${n(t,e)}
-`)}}function ene(n,e){let t=e.colouredLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),Vie(t,n.timezoneOffset)}CL.configure=ene});var kL=m((dke,TL)=>{function tne(n,e){return t=>{process.stderr.write(`${n(t,e)}
-`)}}function ine(n,e){let t=e.colouredLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),tne(t,n.timezoneOffset)}TL.exports.configure=ine});var PL=m((gke,EL)=>{function nne(n,e,t,i){let r=i.getLevel(n),o=i.getLevel(e,i.FATAL);return s=>{let a=s.level;a.isGreaterThanOrEqualTo(r)&&a.isLessThanOrEqualTo(o)&&t(s)}}function rne(n,e,t,i){let r=t(n.appender);return nne(n.level,n.maxLevel,r,i)}EL.exports.configure=rne});var LL=m((fke,RL)=>{var _L=Ot()("log4js:categoryFilter");function one(n,e){return typeof n=="string"&&(n=[n]),t=>{_L(`Checking ${t.categoryName} against ${n}`),n.indexOf(t.categoryName)===-1&&(_L("Not excluded, sending to appender"),e(t))}}function sne(n,e,t){let i=t(n.appender);return one(n.exclude,i)}RL.exports.configure=sne});var jL=m((pke,IL)=>{var FL=Ot()("log4js:noLogFilter");function ane(n){return n.filter(t=>t!=null&&t!=="")}function lne(n,e){return t=>{FL(`Checking data: ${t.data} against filters: ${n}`),typeof n=="string"&&(n=[n]),n=ane(n);let i=new RegExp(n.join("|"),"i");(n.length===0||t.data.findIndex(r=>i.test(r))<0)&&(FL("Not excluded, sending to appender"),e(t))}}function une(n,e,t){let i=t(n.appender);return lne(n.exclude,i)}IL.exports.configure=une});var gt=m(Ox=>{"use strict";Ox.fromCallback=function(n){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")n.apply(this,e);else return new Promise((t,i)=>{n.call(this,...e,(r,o)=>r!=null?i(r):t(o))})},"name",{value:n.name})};Ox.fromPromise=function(n){return Object.defineProperty(function(...e){let t=e[e.length-1];if(typeof t!="function")return n.apply(this,e);n.apply(this,e.slice(0,-1)).then(i=>t(null,i),t)},"name",{value:n.name})}});var OL=m((bke,AL)=>{var Ts=require("constants"),cne=process.cwd,_p=null,hne=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return _p||(_p=cne.call(process)),_p};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Mx=process.chdir,process.chdir=function(n){_p=null,Mx.call(process,n)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Mx));var Mx;AL.exports=dne;function dne(n){Ts.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(n),n.lutimes||t(n),n.chown=o(n.chown),n.fchown=o(n.fchown),n.lchown=o(n.lchown),n.chmod=i(n.chmod),n.fchmod=i(n.fchmod),n.lchmod=i(n.lchmod),n.chownSync=s(n.chownSync),n.fchownSync=s(n.fchownSync),n.lchownSync=s(n.lchownSync),n.chmodSync=r(n.chmodSync),n.fchmodSync=r(n.fchmodSync),n.lchmodSync=r(n.lchmodSync),n.stat=a(n.stat),n.fstat=a(n.fstat),n.lstat=a(n.lstat),n.statSync=l(n.statSync),n.fstatSync=l(n.fstatSync),n.lstatSync=l(n.lstatSync),n.lchmod||(n.lchmod=function(c,h,d){d&&process.nextTick(d)},n.lchmodSync=function(){}),n.lchown||(n.lchown=function(c,h,d,g){g&&process.nextTick(g)},n.lchownSync=function(){}),hne==="win32"&&(n.rename=function(c){return function(h,d,g){var f=Date.now(),p=0;c(h,d,function b(v){if(v&&(v.code==="EACCES"||v.code==="EPERM")&&Date.now()-f<6e4){setTimeout(function(){n.stat(d,function(w,D){w&&w.code==="ENOENT"?c(h,d,b):g(v)})},p),p<100&&(p+=10);return}g&&g(v)})}}(n.rename)),n.read=function(c){function h(d,g,f,p,b,v){var w;if(v&&typeof v=="function"){var D=0;w=function(S,F,L){if(S&&S.code==="EAGAIN"&&D<10)return D++,c.call(n,d,g,f,p,b,w);v.apply(this,arguments)}}return c.call(n,d,g,f,p,b,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,c),h}(n.read),n.readSync=function(c){return function(h,d,g,f,p){for(var b=0;;)try{return c.call(n,h,d,g,f,p)}catch(v){if(v.code==="EAGAIN"&&b<10){b++;continue}throw v}}}(n.readSync);function e(c){c.lchmod=function(h,d,g){c.open(h,Ts.O_WRONLY|Ts.O_SYMLINK,d,function(f,p){if(f){g&&g(f);return}c.fchmod(p,d,function(b){c.close(p,function(v){g&&g(b||v)})})})},c.lchmodSync=function(h,d){var g=c.openSync(h,Ts.O_WRONLY|Ts.O_SYMLINK,d),f=!0,p;try{p=c.fchmodSync(g,d),f=!1}finally{if(f)try{c.closeSync(g)}catch{}else c.closeSync(g)}return p}}function t(c){Ts.hasOwnProperty("O_SYMLINK")?(c.lutimes=function(h,d,g,f){c.open(h,Ts.O_SYMLINK,function(p,b){if(p){f&&f(p);return}c.futimes(b,d,g,function(v){c.close(b,function(w){f&&f(v||w)})})})},c.lutimesSync=function(h,d,g){var f=c.openSync(h,Ts.O_SYMLINK),p,b=!0;try{p=c.futimesSync(f,d,g),b=!1}finally{if(b)try{c.closeSync(f)}catch{}else c.closeSync(f)}return p}):(c.lutimes=function(h,d,g,f){f&&process.nextTick(f)},c.lutimesSync=function(){})}function i(c){return c&&function(h,d,g){return c.call(n,h,d,function(f){u(f)&&(f=null),g&&g.apply(this,arguments)})}}function r(c){return c&&function(h,d){try{return c.call(n,h,d)}catch(g){if(!u(g))throw g}}}function o(c){return c&&function(h,d,g,f){return c.call(n,h,d,g,function(p){u(p)&&(p=null),f&&f.apply(this,arguments)})}}function s(c){return c&&function(h,d,g){try{return c.call(n,h,d,g)}catch(f){if(!u(f))throw f}}}function a(c){return c&&function(h,d,g){typeof d=="function"&&(g=d,d=null);function f(p,b){b&&(b.uid<0&&(b.uid+=4294967296),b.gid<0&&(b.gid+=4294967296)),g&&g.apply(this,arguments)}return d?c.call(n,h,d,f):c.call(n,h,f)}}function l(c){return c&&function(h,d){var g=d?c.call(n,h,d):c.call(n,h);return g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296),g}}function u(c){if(!c||c.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var BL=m((yke,NL)=>{var ML=require("stream").Stream;NL.exports=gne;function gne(n){return{ReadStream:e,WriteStream:t};function e(i,r){if(!(this instanceof e))return new e(i,r);ML.call(this);var o=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var s=Object.keys(r),a=0,l=s.length;athis.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}n.open(this.path,this.flags,this.mode,function(c,h){if(c){o.emit("error",c),o.readable=!1;return}o.fd=h,o.emit("open",h),o._read()})}function t(i,r){if(!(this instanceof t))return new t(i,r);ML.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var o=Object.keys(r),s=0,a=o.length;s= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var qL=m((vke,HL)=>{"use strict";HL.exports=pne;var fne=Object.getPrototypeOf||function(n){return n.__proto__};function pne(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var e={__proto__:fne(n)};else var e=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}});var Qe=m((wke,Bx)=>{var pi=require("fs"),mne=OL(),bne=BL(),yne=qL(),Rp=require("util"),pr,Lp;typeof Symbol=="function"&&typeof Symbol.for=="function"?(pr=Symbol.for("graceful-fs.queue"),Lp=Symbol.for("graceful-fs.previous")):(pr="___graceful-fs.queue",Lp="___graceful-fs.previous");function vne(){}function WL(n,e){Object.defineProperty(n,pr,{get:function(){return e}})}var zh=vne;Rp.debuglog?zh=Rp.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(zh=function(){var n=Rp.format.apply(Rp,arguments);n="GFS4: "+n.split(/\n/).join(`
-GFS4: `),console.error(n)});pi[pr]||(YL=global[pr]||[],WL(pi,YL),pi.close=function(n){function e(t,i){return n.call(pi,t,function(r){r||ks(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,Lp,{value:n}),e}(pi.close),pi.closeSync=function(n){function e(t){n.apply(pi,arguments),ks()}return Object.defineProperty(e,Lp,{value:n}),e}(pi.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){zh(pi[pr]),require("assert").equal(pi[pr].length,0)}));var YL;global[pr]||WL(global,pi[pr]);Bx.exports=Nx(yne(pi));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!pi.__patched&&(Bx.exports=Nx(pi),pi.__patched=!0);function Nx(n){mne(n),n.gracefulify=Nx,n.createReadStream=F,n.createWriteStream=L;var e=n.readFile;n.readFile=t;function t(B,N,I){return typeof N=="function"&&(I=N,N=null),M(B,N,I);function M(J,K,ae){return e(J,K,function(je){je&&(je.code==="EMFILE"||je.code==="ENFILE")?wu([M,[J,K,ae]]):(typeof ae=="function"&&ae.apply(this,arguments),ks())})}}var i=n.writeFile;n.writeFile=r;function r(B,N,I,M){return typeof I=="function"&&(M=I,I=null),J(B,N,I,M);function J(K,ae,je,_e){return i(K,ae,je,function(Ve){Ve&&(Ve.code==="EMFILE"||Ve.code==="ENFILE")?wu([J,[K,ae,je,_e]]):(typeof _e=="function"&&_e.apply(this,arguments),ks())})}}var o=n.appendFile;o&&(n.appendFile=s);function s(B,N,I,M){return typeof I=="function"&&(M=I,I=null),J(B,N,I,M);function J(K,ae,je,_e){return o(K,ae,je,function(Ve){Ve&&(Ve.code==="EMFILE"||Ve.code==="ENFILE")?wu([J,[K,ae,je,_e]]):(typeof _e=="function"&&_e.apply(this,arguments),ks())})}}var a=n.copyFile;a&&(n.copyFile=l);function l(B,N,I,M){return typeof I=="function"&&(M=I,I=0),a(B,N,I,function(J){J&&(J.code==="EMFILE"||J.code==="ENFILE")?wu([a,[B,N,I,M]]):(typeof M=="function"&&M.apply(this,arguments),ks())})}var u=n.readdir;n.readdir=c;function c(B,N,I){var M=[B];return typeof N!="function"?M.push(N):I=N,M.push(J),h(M);function J(K,ae){ae&&ae.sort&&ae.sort(),K&&(K.code==="EMFILE"||K.code==="ENFILE")?wu([h,[M]]):(typeof I=="function"&&I.apply(this,arguments),ks())}}function h(B){return u.apply(n,B)}if(process.version.substr(0,4)==="v0.8"){var d=bne(n);v=d.ReadStream,D=d.WriteStream}var g=n.ReadStream;g&&(v.prototype=Object.create(g.prototype),v.prototype.open=w);var f=n.WriteStream;f&&(D.prototype=Object.create(f.prototype),D.prototype.open=S),Object.defineProperty(n,"ReadStream",{get:function(){return v},set:function(B){v=B},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:function(){return D},set:function(B){D=B},enumerable:!0,configurable:!0});var p=v;Object.defineProperty(n,"FileReadStream",{get:function(){return p},set:function(B){p=B},enumerable:!0,configurable:!0});var b=D;Object.defineProperty(n,"FileWriteStream",{get:function(){return b},set:function(B){b=B},enumerable:!0,configurable:!0});function v(B,N){return this instanceof v?(g.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function w(){var B=this;W(B.path,B.flags,B.mode,function(N,I){N?(B.autoClose&&B.destroy(),B.emit("error",N)):(B.fd=I,B.emit("open",I),B.read())})}function D(B,N){return this instanceof D?(f.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}function S(){var B=this;W(B.path,B.flags,B.mode,function(N,I){N?(B.destroy(),B.emit("error",N)):(B.fd=I,B.emit("open",I))})}function F(B,N){return new n.ReadStream(B,N)}function L(B,N){return new n.WriteStream(B,N)}var j=n.open;n.open=W;function W(B,N,I,M){return typeof I=="function"&&(M=I,I=null),J(B,N,I,M);function J(K,ae,je,_e){return j(K,ae,je,function(Ve,Et){Ve&&(Ve.code==="EMFILE"||Ve.code==="ENFILE")?wu([J,[K,ae,je,_e]]):(typeof _e=="function"&&_e.apply(this,arguments),ks())})}}return n}function wu(n){zh("ENQUEUE",n[0].name,n[1]),pi[pr].push(n)}function ks(){var n=pi[pr].shift();n&&(zh("RETRY",n[0].name,n[1]),n[0].apply(null,n[1]))}});var Xa=m(Es=>{"use strict";var ZL=gt().fromCallback,Pn=Qe(),wne=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof Pn[n]=="function");Object.assign(Es,Pn);wne.forEach(n=>{Es[n]=ZL(Pn[n])});Es.realpath.native=ZL(Pn.realpath.native);Es.exists=function(n,e){return typeof e=="function"?Pn.exists(n,e):new Promise(t=>Pn.exists(n,t))};Es.read=function(n,e,t,i,r,o){return typeof o=="function"?Pn.read(n,e,t,i,r,o):new Promise((s,a)=>{Pn.read(n,e,t,i,r,(l,u,c)=>{if(l)return a(l);s({bytesRead:u,buffer:c})})})};Es.write=function(n,e,...t){return typeof t[t.length-1]=="function"?Pn.write(n,e,...t):new Promise((i,r)=>{Pn.write(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffer:a})})})};typeof Pn.writev=="function"&&(Es.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?Pn.writev(n,e,...t):new Promise((i,r)=>{Pn.writev(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffers:a})})})})});var $L=m((xke,JL)=>{"use strict";var Dne=require("path");JL.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(Dne.parse(e).root,""))){let i=new Error(`Path contains invalid characters: ${e}`);throw i.code="EINVAL",i}}});var QL=m((Cke,Hx)=>{"use strict";var XL=Xa(),{checkPath:UL}=$L(),GL=n=>{let e={mode:511};return typeof n=="number"?n:ge(ge({},e),n).mode};Hx.exports.makeDir=async(n,e)=>(UL(n),XL.mkdir(n,{mode:GL(e),recursive:!0}));Hx.exports.makeDirSync=(n,e)=>(UL(n),XL.mkdirSync(n,{mode:GL(e),recursive:!0}))});var mr=m((Ske,KL)=>{"use strict";var xne=gt().fromPromise,{makeDir:Cne,makeDirSync:qx}=QL(),Yx=xne(Cne);KL.exports={mkdirs:Yx,mkdirsSync:qx,mkdirp:Yx,mkdirpSync:qx,ensureDir:Yx,ensureDirSync:qx}});var Wx=m((Tke,zL)=>{"use strict";var Du=Qe();function Sne(n,e,t,i){Du.open(n,"r+",(r,o)=>{if(r)return i(r);Du.futimes(o,e,t,s=>{Du.close(o,a=>{i&&i(s||a)})})})}function Tne(n,e,t){let i=Du.openSync(n,"r+");return Du.futimesSync(i,e,t),Du.closeSync(i)}zL.exports={utimesMillis:Sne,utimesMillisSync:Tne}});var Ua=m((kke,tF)=>{"use strict";var xu=Xa(),si=require("path"),kne=require("util");function Ene(n,e,t){let i=t.dereference?r=>xu.stat(r,{bigint:!0}):r=>xu.lstat(r,{bigint:!0});return Promise.all([i(n),i(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,o])=>({srcStat:r,destStat:o}))}function Pne(n,e,t){let i,r=t.dereference?s=>xu.statSync(s,{bigint:!0}):s=>xu.lstatSync(s,{bigint:!0}),o=r(n);try{i=r(e)}catch(s){if(s.code==="ENOENT")return{srcStat:o,destStat:null};throw s}return{srcStat:o,destStat:i}}function _ne(n,e,t,i,r){kne.callbackify(Ene)(n,e,i,(o,s)=>{if(o)return r(o);let{srcStat:a,destStat:l}=s;if(l){if(Vh(a,l)){let u=si.basename(n),c=si.basename(e);return t==="move"&&u!==c&&u.toLowerCase()===c.toLowerCase()?r(null,{srcStat:a,destStat:l,isChangingCase:!0}):r(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!l.isDirectory())return r(new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`));if(!a.isDirectory()&&l.isDirectory())return r(new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`))}return a.isDirectory()&&Zx(n,e)?r(new Error(Fp(n,e,t))):r(null,{srcStat:a,destStat:l})})}function Rne(n,e,t,i){let{srcStat:r,destStat:o}=Pne(n,e,i);if(o){if(Vh(r,o)){let s=si.basename(n),a=si.basename(e);if(t==="move"&&s!==a&&s.toLowerCase()===a.toLowerCase())return{srcStat:r,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(r.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`);if(!r.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`)}if(r.isDirectory()&&Zx(n,e))throw new Error(Fp(n,e,t));return{srcStat:r,destStat:o}}function VL(n,e,t,i,r){let o=si.resolve(si.dirname(n)),s=si.resolve(si.dirname(t));if(s===o||s===si.parse(s).root)return r();xu.stat(s,{bigint:!0},(a,l)=>a?a.code==="ENOENT"?r():r(a):Vh(e,l)?r(new Error(Fp(n,t,i))):VL(n,e,s,i,r))}function eF(n,e,t,i){let r=si.resolve(si.dirname(n)),o=si.resolve(si.dirname(t));if(o===r||o===si.parse(o).root)return;let s;try{s=xu.statSync(o,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(Vh(e,s))throw new Error(Fp(n,t,i));return eF(n,e,o,i)}function Vh(n,e){return e.ino&&e.dev&&e.ino===n.ino&&e.dev===n.dev}function Zx(n,e){let t=si.resolve(n).split(si.sep).filter(r=>r),i=si.resolve(e).split(si.sep).filter(r=>r);return t.reduce((r,o,s)=>r&&i[s]===o,!0)}function Fp(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}tF.exports={checkPaths:_ne,checkPathsSync:Rne,checkParentPaths:VL,checkParentPathsSync:eF,isSrcSubdir:Zx,areIdentical:Vh}});var sF=m((Eke,oF)=>{"use strict";var Ci=Qe(),ed=require("path"),Lne=mr().mkdirsSync,Fne=Wx().utimesMillisSync,td=Ua();function Ine(n,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
-
- see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:i,destStat:r}=td.checkPathsSync(n,e,"copy",t);return td.checkParentPathsSync(n,i,e,"copy"),jne(r,n,e,t)}function jne(n,e,t,i){if(i.filter&&!i.filter(e,t))return;let r=ed.dirname(t);return Ci.existsSync(r)||Lne(r),iF(n,e,t,i)}function Ane(n,e,t,i){if(!(i.filter&&!i.filter(e,t)))return iF(n,e,t,i)}function iF(n,e,t,i){let o=(i.dereference?Ci.statSync:Ci.lstatSync)(e);if(o.isDirectory())return Yne(o,n,e,t,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return One(o,n,e,t,i);if(o.isSymbolicLink())return Jne(n,e,t,i);throw o.isSocket()?new Error(`Cannot copy a socket file: ${e}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}function One(n,e,t,i,r){return e?Mne(n,t,i,r):nF(n,t,i,r)}function Mne(n,e,t,i){if(i.overwrite)return Ci.unlinkSync(t),nF(n,e,t,i);if(i.errorOnExist)throw new Error(`'${t}' already exists`)}function nF(n,e,t,i){return Ci.copyFileSync(e,t),i.preserveTimestamps&&Nne(n.mode,e,t),Jx(t,n.mode)}function Nne(n,e,t){return Bne(n)&&Hne(t,n),qne(e,t)}function Bne(n){return(n&128)===0}function Hne(n,e){return Jx(n,e|128)}function Jx(n,e){return Ci.chmodSync(n,e)}function qne(n,e){let t=Ci.statSync(n);return Fne(e,t.atime,t.mtime)}function Yne(n,e,t,i,r){return e?rF(t,i,r):Wne(n.mode,t,i,r)}function Wne(n,e,t,i){return Ci.mkdirSync(t),rF(e,t,i),Jx(t,n)}function rF(n,e,t){Ci.readdirSync(n).forEach(i=>Zne(i,n,e,t))}function Zne(n,e,t,i){let r=ed.join(e,n),o=ed.join(t,n),{destStat:s}=td.checkPathsSync(r,o,"copy",i);return Ane(s,r,o,i)}function Jne(n,e,t,i){let r=Ci.readlinkSync(e);if(i.dereference&&(r=ed.resolve(process.cwd(),r)),n){let o;try{o=Ci.readlinkSync(t)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return Ci.symlinkSync(r,t);throw s}if(i.dereference&&(o=ed.resolve(process.cwd(),o)),td.isSrcSubdir(r,o))throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${o}'.`);if(Ci.statSync(t).isDirectory()&&td.isSrcSubdir(o,r))throw new Error(`Cannot overwrite '${o}' with '${r}'.`);return $ne(r,t)}else return Ci.symlinkSync(r,t)}function $ne(n,e){return Ci.unlinkSync(e),Ci.symlinkSync(n,e)}oF.exports=Ine});var $x=m((Pke,aF)=>{"use strict";aF.exports={copySync:sF()}});var Ps=m((_ke,uF)=>{"use strict";var Xne=gt().fromPromise,lF=Xa();function Une(n){return lF.access(n).then(()=>!0).catch(()=>!1)}uF.exports={pathExists:Xne(Une),pathExistsSync:lF.existsSync}});var bF=m((Rke,mF)=>{"use strict";var rn=Qe(),id=require("path"),Gne=mr().mkdirs,Qne=Ps().pathExists,Kne=Wx().utimesMillis,nd=Ua();function zne(n,e,t,i){typeof t=="function"&&!i?(i=t,t={}):typeof t=="function"&&(t={filter:t}),i=i||function(){},t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
-
- see https://github.com/jprichardson/node-fs-extra/issues/269`),nd.checkPaths(n,e,"copy",t,(r,o)=>{if(r)return i(r);let{srcStat:s,destStat:a}=o;nd.checkParentPaths(n,s,e,"copy",l=>l?i(l):t.filter?dF(cF,a,n,e,t,i):cF(a,n,e,t,i))})}function cF(n,e,t,i,r){let o=id.dirname(t);Qne(o,(s,a)=>{if(s)return r(s);if(a)return Ip(n,e,t,i,r);Gne(o,l=>l?r(l):Ip(n,e,t,i,r))})}function dF(n,e,t,i,r,o){Promise.resolve(r.filter(t,i)).then(s=>s?n(e,t,i,r,o):o(),s=>o(s))}function Vne(n,e,t,i,r){return i.filter?dF(Ip,n,e,t,i,r):Ip(n,e,t,i,r)}function Ip(n,e,t,i,r){(i.dereference?rn.stat:rn.lstat)(e,(s,a)=>s?r(s):a.isDirectory()?sre(a,n,e,t,i,r):a.isFile()||a.isCharacterDevice()||a.isBlockDevice()?ere(a,n,e,t,i,r):a.isSymbolicLink()?ure(n,e,t,i,r):a.isSocket()?r(new Error(`Cannot copy a socket file: ${e}`)):a.isFIFO()?r(new Error(`Cannot copy a FIFO pipe: ${e}`)):r(new Error(`Unknown file: ${e}`)))}function ere(n,e,t,i,r,o){return e?tre(n,t,i,r,o):gF(n,t,i,r,o)}function tre(n,e,t,i,r){if(i.overwrite)rn.unlink(t,o=>o?r(o):gF(n,e,t,i,r));else return i.errorOnExist?r(new Error(`'${t}' already exists`)):r()}function gF(n,e,t,i,r){rn.copyFile(e,t,o=>o?r(o):i.preserveTimestamps?ire(n.mode,e,t,r):jp(t,n.mode,r))}function ire(n,e,t,i){return nre(n)?rre(t,n,r=>r?i(r):hF(n,e,t,i)):hF(n,e,t,i)}function nre(n){return(n&128)===0}function rre(n,e,t){return jp(n,e|128,t)}function hF(n,e,t,i){ore(e,t,r=>r?i(r):jp(t,n,i))}function jp(n,e,t){return rn.chmod(n,e,t)}function ore(n,e,t){rn.stat(n,(i,r)=>i?t(i):Kne(e,r.atime,r.mtime,t))}function sre(n,e,t,i,r,o){return e?fF(t,i,r,o):are(n.mode,t,i,r,o)}function are(n,e,t,i,r){rn.mkdir(t,o=>{if(o)return r(o);fF(e,t,i,s=>s?r(s):jp(t,n,r))})}function fF(n,e,t,i){rn.readdir(n,(r,o)=>r?i(r):pF(o,n,e,t,i))}function pF(n,e,t,i,r){let o=n.pop();return o?lre(n,o,e,t,i,r):r()}function lre(n,e,t,i,r,o){let s=id.join(t,e),a=id.join(i,e);nd.checkPaths(s,a,"copy",r,(l,u)=>{if(l)return o(l);let{destStat:c}=u;Vne(c,s,a,r,h=>h?o(h):pF(n,t,i,r,o))})}function ure(n,e,t,i,r){rn.readlink(e,(o,s)=>{if(o)return r(o);if(i.dereference&&(s=id.resolve(process.cwd(),s)),n)rn.readlink(t,(a,l)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?rn.symlink(s,t,r):r(a):(i.dereference&&(l=id.resolve(process.cwd(),l)),nd.isSrcSubdir(s,l)?r(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${l}'.`)):n.isDirectory()&&nd.isSrcSubdir(l,s)?r(new Error(`Cannot overwrite '${l}' with '${s}'.`)):cre(s,t,r)));else return rn.symlink(s,t,r)})}function cre(n,e,t){rn.unlink(e,i=>i?t(i):rn.symlink(n,e,t))}mF.exports=zne});var Xx=m((Lke,yF)=>{"use strict";var hre=gt().fromCallback;yF.exports={copy:hre(bF())}});var EF=m((Fke,kF)=>{"use strict";var vF=Qe(),CF=require("path"),ot=require("assert"),rd=process.platform==="win32";function SF(n){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{n[t]=n[t]||vF[t],t=t+"Sync",n[t]=n[t]||vF[t]}),n.maxBusyTries=n.maxBusyTries||3}function Ux(n,e,t){let i=0;typeof e=="function"&&(t=e,e={}),ot(n,"rimraf: missing path"),ot.strictEqual(typeof n,"string","rimraf: path should be a string"),ot.strictEqual(typeof t,"function","rimraf: callback function required"),ot(e,"rimraf: invalid options argument provided"),ot.strictEqual(typeof e,"object","rimraf: options should be object"),SF(e),wF(n,e,function r(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&iwF(n,e,r),s)}o.code==="ENOENT"&&(o=null)}t(o)})}function wF(n,e,t){ot(n),ot(e),ot(typeof t=="function"),e.lstat(n,(i,r)=>{if(i&&i.code==="ENOENT")return t(null);if(i&&i.code==="EPERM"&&rd)return DF(n,e,i,t);if(r&&r.isDirectory())return Ap(n,e,i,t);e.unlink(n,o=>{if(o){if(o.code==="ENOENT")return t(null);if(o.code==="EPERM")return rd?DF(n,e,o,t):Ap(n,e,o,t);if(o.code==="EISDIR")return Ap(n,e,o,t)}return t(o)})})}function DF(n,e,t,i){ot(n),ot(e),ot(typeof i=="function"),e.chmod(n,438,r=>{r?i(r.code==="ENOENT"?null:t):e.stat(n,(o,s)=>{o?i(o.code==="ENOENT"?null:t):s.isDirectory()?Ap(n,e,t,i):e.unlink(n,i)})})}function xF(n,e,t){let i;ot(n),ot(e);try{e.chmodSync(n,438)}catch(r){if(r.code==="ENOENT")return;throw t}try{i=e.statSync(n)}catch(r){if(r.code==="ENOENT")return;throw t}i.isDirectory()?Op(n,e,t):e.unlinkSync(n)}function Ap(n,e,t,i){ot(n),ot(e),ot(typeof i=="function"),e.rmdir(n,r=>{r&&(r.code==="ENOTEMPTY"||r.code==="EEXIST"||r.code==="EPERM")?dre(n,e,i):r&&r.code==="ENOTDIR"?i(t):i(r)})}function dre(n,e,t){ot(n),ot(e),ot(typeof t=="function"),e.readdir(n,(i,r)=>{if(i)return t(i);let o=r.length,s;if(o===0)return e.rmdir(n,t);r.forEach(a=>{Ux(CF.join(n,a),e,l=>{if(!s){if(l)return t(s=l);--o===0&&e.rmdir(n,t)}})})})}function TF(n,e){let t;e=e||{},SF(e),ot(n,"rimraf: missing path"),ot.strictEqual(typeof n,"string","rimraf: path should be a string"),ot(e,"rimraf: missing options"),ot.strictEqual(typeof e,"object","rimraf: options should be object");try{t=e.lstatSync(n)}catch(i){if(i.code==="ENOENT")return;i.code==="EPERM"&&rd&&xF(n,e,i)}try{t&&t.isDirectory()?Op(n,e,null):e.unlinkSync(n)}catch(i){if(i.code==="ENOENT")return;if(i.code==="EPERM")return rd?xF(n,e,i):Op(n,e,i);if(i.code!=="EISDIR")throw i;Op(n,e,i)}}function Op(n,e,t){ot(n),ot(e);try{e.rmdirSync(n)}catch(i){if(i.code==="ENOTDIR")throw t;if(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")gre(n,e);else if(i.code!=="ENOENT")throw i}}function gre(n,e){if(ot(n),ot(e),e.readdirSync(n).forEach(t=>TF(CF.join(n,t),e)),rd){let t=Date.now();do try{return e.rmdirSync(n,e)}catch{}while(Date.now()-t<500)}else return e.rmdirSync(n,e)}kF.exports=Ux;Ux.sync=TF});var od=m((Ike,_F)=>{"use strict";var Mp=Qe(),fre=gt().fromCallback,PF=EF();function pre(n,e){if(Mp.rm)return Mp.rm(n,{recursive:!0,force:!0},e);PF(n,e)}function mre(n){if(Mp.rmSync)return Mp.rmSync(n,{recursive:!0,force:!0});PF.sync(n)}_F.exports={remove:fre(pre),removeSync:mre}});var MF=m((jke,OF)=>{"use strict";var bre=gt().fromPromise,FF=Xa(),IF=require("path"),jF=mr(),AF=od(),RF=bre(async function(e){let t;try{t=await FF.readdir(e)}catch{return jF.mkdirs(e)}return Promise.all(t.map(i=>AF.remove(IF.join(e,i))))});function LF(n){let e;try{e=FF.readdirSync(n)}catch{return jF.mkdirsSync(n)}e.forEach(t=>{t=IF.join(n,t),AF.removeSync(t)})}OF.exports={emptyDirSync:LF,emptydirSync:LF,emptyDir:RF,emptydir:RF}});var qF=m((Ake,HF)=>{"use strict";var yre=gt().fromCallback,NF=require("path"),_s=Qe(),BF=mr();function vre(n,e){function t(){_s.writeFile(n,"",i=>{if(i)return e(i);e()})}_s.stat(n,(i,r)=>{if(!i&&r.isFile())return e();let o=NF.dirname(n);_s.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?BF.mkdirs(o,l=>{if(l)return e(l);t()}):e(s);a.isDirectory()?t():_s.readdir(o,l=>{if(l)return e(l)})})})}function wre(n){let e;try{e=_s.statSync(n)}catch{}if(e&&e.isFile())return;let t=NF.dirname(n);try{_s.statSync(t).isDirectory()||_s.readdirSync(t)}catch(i){if(i&&i.code==="ENOENT")BF.mkdirsSync(t);else throw i}_s.writeFileSync(n,"")}HF.exports={createFile:yre(vre),createFileSync:wre}});var $F=m((Oke,JF)=>{"use strict";var Dre=gt().fromCallback,YF=require("path"),Rs=Qe(),WF=mr(),xre=Ps().pathExists,{areIdentical:ZF}=Ua();function Cre(n,e,t){function i(r,o){Rs.link(r,o,s=>{if(s)return t(s);t(null)})}Rs.lstat(e,(r,o)=>{Rs.lstat(n,(s,a)=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),t(s);if(o&&ZF(a,o))return t(null);let l=YF.dirname(e);xre(l,(u,c)=>{if(u)return t(u);if(c)return i(n,e);WF.mkdirs(l,h=>{if(h)return t(h);i(n,e)})})})})}function Sre(n,e){let t;try{t=Rs.lstatSync(e)}catch{}try{let o=Rs.lstatSync(n);if(t&&ZF(o,t))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=YF.dirname(e);return Rs.existsSync(i)||WF.mkdirsSync(i),Rs.linkSync(n,e)}JF.exports={createLink:Dre(Cre),createLinkSync:Sre}});var UF=m((Mke,XF)=>{"use strict";var Ls=require("path"),sd=Qe(),Tre=Ps().pathExists;function kre(n,e,t){if(Ls.isAbsolute(n))return sd.lstat(n,i=>i?(i.message=i.message.replace("lstat","ensureSymlink"),t(i)):t(null,{toCwd:n,toDst:n}));{let i=Ls.dirname(e),r=Ls.join(i,n);return Tre(r,(o,s)=>o?t(o):s?t(null,{toCwd:r,toDst:n}):sd.lstat(n,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),t(a)):t(null,{toCwd:n,toDst:Ls.relative(i,n)})))}}function Ere(n,e){let t;if(Ls.isAbsolute(n)){if(t=sd.existsSync(n),!t)throw new Error("absolute srcpath does not exist");return{toCwd:n,toDst:n}}else{let i=Ls.dirname(e),r=Ls.join(i,n);if(t=sd.existsSync(r),t)return{toCwd:r,toDst:n};if(t=sd.existsSync(n),!t)throw new Error("relative srcpath does not exist");return{toCwd:n,toDst:Ls.relative(i,n)}}}XF.exports={symlinkPaths:kre,symlinkPathsSync:Ere}});var KF=m((Nke,QF)=>{"use strict";var GF=Qe();function Pre(n,e,t){if(t=typeof e=="function"?e:t,e=typeof e=="function"?!1:e,e)return t(null,e);GF.lstat(n,(i,r)=>{if(i)return t(null,"file");e=r&&r.isDirectory()?"dir":"file",t(null,e)})}function _re(n,e){let t;if(e)return e;try{t=GF.lstatSync(n)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}QF.exports={symlinkType:Pre,symlinkTypeSync:_re}});var oI=m((Bke,rI)=>{"use strict";var Rre=gt().fromCallback,VF=require("path"),br=Xa(),eI=mr(),Lre=eI.mkdirs,Fre=eI.mkdirsSync,tI=UF(),Ire=tI.symlinkPaths,jre=tI.symlinkPathsSync,iI=KF(),Are=iI.symlinkType,Ore=iI.symlinkTypeSync,Mre=Ps().pathExists,{areIdentical:nI}=Ua();function Nre(n,e,t,i){i=typeof t=="function"?t:i,t=typeof t=="function"?!1:t,br.lstat(e,(r,o)=>{!r&&o.isSymbolicLink()?Promise.all([br.stat(n),br.stat(e)]).then(([s,a])=>{if(nI(s,a))return i(null);zF(n,e,t,i)}):zF(n,e,t,i)})}function zF(n,e,t,i){Ire(n,e,(r,o)=>{if(r)return i(r);n=o.toDst,Are(o.toCwd,t,(s,a)=>{if(s)return i(s);let l=VF.dirname(e);Mre(l,(u,c)=>{if(u)return i(u);if(c)return br.symlink(n,e,a,i);Lre(l,h=>{if(h)return i(h);br.symlink(n,e,a,i)})})})})}function Bre(n,e,t){let i;try{i=br.lstatSync(e)}catch{}if(i&&i.isSymbolicLink()){let a=br.statSync(n),l=br.statSync(e);if(nI(a,l))return}let r=jre(n,e);n=r.toDst,t=Ore(r.toCwd,t);let o=VF.dirname(e);return br.existsSync(o)||Fre(o),br.symlinkSync(n,e,t)}rI.exports={createSymlink:Rre(Nre),createSymlinkSync:Bre}});var aI=m((Hke,sI)=>{"use strict";var Np=qF(),Bp=$F(),Hp=oI();sI.exports={createFile:Np.createFile,createFileSync:Np.createFileSync,ensureFile:Np.createFile,ensureFileSync:Np.createFileSync,createLink:Bp.createLink,createLinkSync:Bp.createLinkSync,ensureLink:Bp.createLink,ensureLinkSync:Bp.createLinkSync,createSymlink:Hp.createSymlink,createSymlinkSync:Hp.createSymlinkSync,ensureSymlink:Hp.createSymlink,ensureSymlinkSync:Hp.createSymlinkSync}});var Cu=m((qke,lI)=>{function Hre(n,{EOL:e=`
-`,finalEOL:t=!0,replacer:i=null,spaces:r}={}){let o=t?e:"";return JSON.stringify(n,i,r).replace(/\n/g,e)+o}function qre(n){return Buffer.isBuffer(n)&&(n=n.toString("utf8")),n.replace(/^\uFEFF/,"")}lI.exports={stringify:Hre,stripBom:qre}});var Gx=m((Yke,hI)=>{var Su;try{Su=Qe()}catch{Su=require("fs")}var qp=gt(),{stringify:uI,stripBom:cI}=Cu();async function Yre(n,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||Su,i="throws"in e?e.throws:!0,r=await qp.fromCallback(t.readFile)(n,e);r=cI(r);let o;try{o=JSON.parse(r,e?e.reviver:null)}catch(s){if(i)throw s.message=`${n}: ${s.message}`,s;return null}return o}var Wre=qp.fromPromise(Yre);function Zre(n,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||Su,i="throws"in e?e.throws:!0;try{let r=t.readFileSync(n,e);return r=cI(r),JSON.parse(r,e.reviver)}catch(r){if(i)throw r.message=`${n}: ${r.message}`,r;return null}}async function Jre(n,e,t={}){let i=t.fs||Su,r=uI(e,t);await qp.fromCallback(i.writeFile)(n,r,t)}var $re=qp.fromPromise(Jre);function Xre(n,e,t={}){let i=t.fs||Su,r=uI(e,t);return i.writeFileSync(n,r,t)}var Ure={readFile:Wre,readFileSync:Zre,writeFile:$re,writeFileSync:Xre};hI.exports=Ure});var gI=m((Wke,dI)=>{"use strict";var Yp=Gx();dI.exports={readJson:Yp.readFile,readJsonSync:Yp.readFileSync,writeJson:Yp.writeFile,writeJsonSync:Yp.writeFileSync}});var Wp=m((Zke,mI)=>{"use strict";var Gre=gt().fromCallback,ad=Qe(),fI=require("path"),pI=mr(),Qre=Ps().pathExists;function Kre(n,e,t,i){typeof t=="function"&&(i=t,t="utf8");let r=fI.dirname(n);Qre(r,(o,s)=>{if(o)return i(o);if(s)return ad.writeFile(n,e,t,i);pI.mkdirs(r,a=>{if(a)return i(a);ad.writeFile(n,e,t,i)})})}function zre(n,...e){let t=fI.dirname(n);if(ad.existsSync(t))return ad.writeFileSync(n,...e);pI.mkdirsSync(t),ad.writeFileSync(n,...e)}mI.exports={outputFile:Gre(Kre),outputFileSync:zre}});var yI=m((Jke,bI)=>{"use strict";var{stringify:Vre}=Cu(),{outputFile:eoe}=Wp();async function toe(n,e,t={}){let i=Vre(e,t);await eoe(n,i,t)}bI.exports=toe});var wI=m(($ke,vI)=>{"use strict";var{stringify:ioe}=Cu(),{outputFileSync:noe}=Wp();function roe(n,e,t){let i=ioe(e,t);noe(n,i,t)}vI.exports=roe});var xI=m((Xke,DI)=>{"use strict";var ooe=gt().fromPromise,qi=gI();qi.outputJson=ooe(yI());qi.outputJsonSync=wI();qi.outputJSON=qi.outputJson;qi.outputJSONSync=qi.outputJsonSync;qi.writeJSON=qi.writeJson;qi.writeJSONSync=qi.writeJsonSync;qi.readJSON=qi.readJson;qi.readJSONSync=qi.readJsonSync;DI.exports=qi});var EI=m((Uke,kI)=>{"use strict";var SI=Qe(),Kx=require("path"),soe=$x().copySync,TI=od().removeSync,aoe=mr().mkdirpSync,CI=Ua();function loe(n,e,t){t=t||{};let i=t.overwrite||t.clobber||!1,{srcStat:r,isChangingCase:o=!1}=CI.checkPathsSync(n,e,"move",t);return CI.checkParentPathsSync(n,r,e,"move"),uoe(e)||aoe(Kx.dirname(e)),coe(n,e,i,o)}function uoe(n){let e=Kx.dirname(n);return Kx.parse(e).root===e}function coe(n,e,t,i){if(i)return Qx(n,e,t);if(t)return TI(e),Qx(n,e,t);if(SI.existsSync(e))throw new Error("dest already exists.");return Qx(n,e,t)}function Qx(n,e,t){try{SI.renameSync(n,e)}catch(i){if(i.code!=="EXDEV")throw i;return hoe(n,e,t)}}function hoe(n,e,t){return soe(n,e,{overwrite:t,errorOnExist:!0}),TI(n)}kI.exports=loe});var _I=m((Gke,PI)=>{"use strict";PI.exports={moveSync:EI()}});var jI=m((Qke,II)=>{"use strict";var doe=Qe(),Vx=require("path"),goe=Xx().copy,FI=od().remove,foe=mr().mkdirp,poe=Ps().pathExists,RI=Ua();function moe(n,e,t,i){typeof t=="function"&&(i=t,t={});let r=t.overwrite||t.clobber||!1;RI.checkPaths(n,e,"move",t,(o,s)=>{if(o)return i(o);let{srcStat:a,isChangingCase:l=!1}=s;RI.checkParentPaths(n,a,e,"move",u=>{if(u)return i(u);if(boe(e))return LI(n,e,r,l,i);foe(Vx.dirname(e),c=>c?i(c):LI(n,e,r,l,i))})})}function boe(n){let e=Vx.dirname(n);return Vx.parse(e).root===e}function LI(n,e,t,i,r){if(i)return zx(n,e,t,r);if(t)return FI(e,o=>o?r(o):zx(n,e,t,r));poe(e,(o,s)=>o?r(o):s?r(new Error("dest already exists.")):zx(n,e,t,r))}function zx(n,e,t,i){doe.rename(n,e,r=>r?r.code!=="EXDEV"?i(r):yoe(n,e,t,i):i())}function yoe(n,e,t,i){goe(n,e,{overwrite:t,errorOnExist:!0},o=>o?i(o):FI(n,i))}II.exports=moe});var OI=m((Kke,AI)=>{"use strict";var voe=gt().fromCallback;AI.exports={move:voe(jI())}});var eC=m((zke,MI)=>{"use strict";MI.exports=ge(ge(ge(ge(ge(ge(ge(ge(ge(ge(ge(ge({},Xa()),$x()),Xx()),MF()),aI()),xI()),mr()),_I()),OI()),Wp()),Ps()),od())});var BI=m((Vke,NI)=>{NI.exports=()=>new Date});var qI=m((eEe,HI)=>{var woe=Ot()("streamroller:fileNameFormatter"),Doe=require("path"),xoe=".gz",Coe=".";HI.exports=({file:n,keepFileExt:e,needsIndex:t,alwaysIncludeDate:i,compress:r,fileNameSep:o})=>{let s=o||Coe,a=Doe.join(n.dir,n.name),l=g=>g+n.ext,u=(g,f,p)=>(t||!p)&&f?g+s+f:g,c=(g,f,p)=>(f>0||i)&&p?g+s+p:g,h=(g,f)=>f&&r?g+xoe:g,d=e?[c,u,l,h]:[l,c,u,h];return({date:g,index:f})=>(woe(`_formatFileName: date=${g}, index=${f}`),d.reduce((p,b)=>b(p,f,g),a))}});var JI=m((tEe,ZI)=>{var Ga=Ot()("streamroller:fileNameParser"),YI=".gz",WI=Sp(),Soe=".";ZI.exports=({file:n,keepFileExt:e,pattern:t,fileNameSep:i})=>{let r=i||Soe,o=(d,g)=>d.endsWith(YI)?(Ga("it is gzipped"),g.isCompressed=!0,d.slice(0,-1*YI.length)):d,s="__NOT_MATCHING__",h=[o,e?d=>d.startsWith(n.name)&&d.endsWith(n.ext)?(Ga("it starts and ends with the right things"),d.slice(n.name.length+1,-1*n.ext.length)):s:d=>d.startsWith(n.base)?(Ga("it starts with the right things"),d.slice(n.base.length+1)):s,t?(d,g)=>{let f=d.split(r),p=f[f.length-1];Ga("items: ",f,", indexStr: ",p);let b=d;p!==void 0&&p.match(/^\d+$/)?(b=d.slice(0,-1*(p.length+1)),Ga(`dateStr is ${b}`),t&&!b&&(b=p,p="0")):p="0";try{let v=WI.parse(t,b,new Date(0,0));return WI.asString(t,v)!==b?d:(g.index=parseInt(p,10),g.date=b,g.timestamp=v.getTime(),"")}catch(v){return Ga(`Problem parsing ${b} as ${t}, error was: `,v),d}}:(d,g)=>d.match(/^\d+$/)?(Ga("it has an index"),g.index=parseInt(d,10),""):d];return d=>{let g={filename:d,index:0,isCompressed:!1};return h.reduce((p,b)=>b(p,g),d)?null:g}}});var XI=m((iEe,$I)=>{var Is=Ot()("streamroller:moveAndMaybeCompressFile"),Fs=eC(),Toe=require("zlib"),koe=function(n){let e={mode:parseInt("0600",8),compress:!1},t=Object.assign({},e,n);return Is(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(t)}`),t},Eoe=async(n,e,t)=>{if(t=koe(t),n===e){Is("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Fs.pathExists(n))if(Is(`moveAndMaybeCompressFile: moving file from ${n} to ${e} ${t.compress?"with":"without"} compress`),t.compress)await new Promise((i,r)=>{Fs.createReadStream(n).pipe(Toe.createGzip()).pipe(Fs.createWriteStream(e,{mode:t.mode})).on("finish",()=>{Is(`moveAndMaybeCompressFile: finished compressing ${e}, deleting ${n}`),Fs.unlink(n).then(i).catch(()=>{Is(`Deleting ${n} failed, truncating instead`),Fs.truncate(n).then(i).catch(r)})})});else{Is(`moveAndMaybeCompressFile: deleting file=${e}, renaming ${n} to ${e}`);try{await Fs.move(n,e,{overwrite:!0})}catch(i){Is(`moveAndMaybeCompressFile: error moving ${n} to ${e}`,i),Is("Trying copy+truncate instead"),await Fs.copy(n,e,{overwrite:!0}),await Fs.truncate(n)}}};$I.exports=Eoe});var Xp=m((nEe,GI)=>{var _n=Ot()("streamroller:RollingFileWriteStream"),ld=eC(),Zp=require("path"),Jp=BI(),$p=Sp(),{Writable:Poe}=require("stream"),_oe=qI(),Roe=JI(),Loe=XI(),UI=class extends Poe{constructor(e,t){_n(`constructor: creating RollingFileWriteStream. path=${e}`);super(t);this.options=this._parseOption(t),this.fileObject=Zp.parse(e),this.fileObject.dir===""&&(this.fileObject=Zp.parse(Zp.join(process.cwd(),e))),this.fileFormatter=_oe({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(i.numBackups||i.numBackups===0){if(i.numBackups<0)throw new Error(`options.numBackups (${i.numBackups}) should be >= 0`);if(i.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${i.numBackups}) should be < Number.MAX_SAFE_INTEGER`);i.numToKeep=i.numBackups+1}else if(i.numToKeep<=0)throw new Error(`options.numToKeep (${i.numToKeep}) should be > 0`);return _n(`_parseOption: creating stream with option=${JSON.stringify(i)}`),i}_final(e){this.currentFileStream.end("",this.options.encoding,e)}_write(e,t,i){this._shouldRoll().then(()=>{_n(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`),this.currentFileStream.write(e,t,r=>{this.state.currentSize+=e.length,i(r)})})}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(_n(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll())}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==$p(this.options.pattern,Jp())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return _n("_roll: closing the current stream"),new Promise((e,t)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(e).catch(t)})})}async _moveOldFiles(){let e=await this._getExistingFiles(),t=this.state.currentDate?e.filter(i=>i.date===this.state.currentDate):e;for(let i=t.length;i>=0;i--){_n(`_moveOldFiles: i = ${i}`);let r=this.fileFormatter({date:this.state.currentDate,index:i}),o=this.fileFormatter({date:this.state.currentDate,index:i+1}),s={compress:this.options.compress&&i===0,mode:this.options.mode};await Loe(r,o,s)}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?$p(this.options.pattern,Jp()):null,_n(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((i,r)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(i).catch(r)})})}async _getExistingFiles(){let e=await ld.readdir(this.fileObject.dir).catch(()=>[]);_n(`_getExistingFiles: files=${e}`);let t=e.map(r=>this.fileNameParser(r)).filter(r=>r),i=r=>(r.timestamp?r.timestamp:Jp().getTime())-r.index;return t.sort((r,o)=>i(r)-i(o)),t}_renewWriteStream(){ld.ensureDirSync(this.fileObject.dir);let e=this.fileFormatter({date:this.state.currentDate,index:0}),t={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode};this.currentFileStream=ld.createWriteStream(e,t),this.currentFileStream.on("error",i=>{this.emit("error",i)})}async _clean(){let e=await this._getExistingFiles();if(_n(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${e.length}`),_n("_clean: existing files are: ",e),this._tooManyFiles(e.length)){let t=e.slice(0,e.length-this.options.numToKeep).map(i=>Zp.format({dir:this.fileObject.dir,base:i.filename}));await Foe(t)}}_tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}},Foe=n=>(_n(`deleteFiles: files to delete: ${n}`),Promise.all(n.map(e=>ld.unlink(e).catch(t=>{_n(`deleteFiles: error when unlinking ${e}, ignoring. Error was ${t}`)}))));GI.exports=UI});var zI=m((rEe,KI)=>{var Ioe=Xp(),QI=class extends Ioe{constructor(e,t,i,r){r||(r={}),t&&(r.maxSize=t),!r.numBackups&&r.numBackups!==0&&(!i&&i!==0&&(i=1),r.numBackups=i);super(e,r);this.backups=r.numBackups,this.size=this.options.maxSize}get theStream(){return this.currentFileStream}};KI.exports=QI});var tj=m((oEe,ej)=>{var joe=Xp(),VI=class extends joe{constructor(e,t,i){t&&typeof t=="object"&&(i=t,t=null),i||(i={}),t||(t="yyyy-MM-dd"),i.pattern=t,!i.numBackups&&i.numBackups!==0?(!i.daysToKeep&&i.daysToKeep!==0?i.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","StreamRoller0001"),i.numBackups=i.daysToKeep):i.daysToKeep=i.numBackups;super(e,i);this.mode=this.options.mode}get theStream(){return this.currentFileStream}};ej.exports=VI});var tC=m((sEe,ij)=>{ij.exports={RollingFileWriteStream:Xp(),RollingFileStream:zI(),DateRollingFileStream:tj()}});var aj=m((aEe,sj)=>{var nj=Ot()("log4js:file"),Aoe=require("path"),Ooe=tC(),Moe=require("os"),Noe=Moe.EOL,Up=!1,Gp=new Set;function rj(){Gp.forEach(n=>{n.sighupHandler()})}function oj(n,e,t,i){let r=new Ooe.RollingFileStream(n,e,t,i);return r.on("error",o=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",n,o)}),r.on("drain",()=>{process.emit("log4js:pause",!1)}),r}function Boe(n,e,t,i,r,o){n=Aoe.normalize(n),i=!i&&i!==0?5:i,nj("Creating file appender (",n,", ",t,", ",i,", ",r,", ",o,")");let s=oj(n,t,i,r),a=function(l){if(!!s.writable){if(r.removeColor===!0){let u=/\x1b[[0-9;]*m/g;l.data=l.data.map(c=>typeof c=="string"?c.replace(u,""):c)}s.write(e(l,o)+Noe,"utf8")||process.emit("log4js:pause",!0)}};return a.reopen=function(){s.end(()=>{s=oj(n,t,i,r)})},a.sighupHandler=function(){nj("SIGHUP handler called."),a.reopen()},a.shutdown=function(l){Gp.delete(a),Gp.size===0&&Up&&(process.removeListener("SIGHUP",rj),Up=!1),s.end("","utf-8",l)},Gp.add(a),Up||(process.on("SIGHUP",rj),Up=!0),a}function Hoe(n,e){let t=e.basicLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),n.mode=n.mode||384,Boe(n.filename,t,n.maxLogSize,n.backups,n,n.timezoneOffset)}sj.exports.configure=Hoe});var uj=m((lEe,lj)=>{var qoe=tC(),Yoe=require("os"),Woe=Yoe.EOL;function Zoe(n,e,t){let i=new qoe.DateRollingFileStream(n,e,t);return i.on("error",r=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",n,r)}),i.on("drain",()=>{process.emit("log4js:pause",!1)}),i}function Joe(n,e,t,i,r){i.maxSize=i.maxLogSize;let o=Zoe(n,e,i),s=function(a){!o.writable||o.write(t(a,r)+Woe,"utf8")||process.emit("log4js:pause",!0)};return s.shutdown=function(a){o.end("","utf-8",a)},s}function $oe(n,e){let t=e.basicLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),n.alwaysIncludePattern||(n.alwaysIncludePattern=!1),n.mode=n.mode||384,Joe(n.filename,n.pattern,t,n,n.timezoneOffset)}lj.exports.configure=$oe});var gj=m((uEe,dj)=>{var _o=Ot()("log4js:fileSync"),Tu=require("path"),Xr=require("fs"),Xoe=require("os"),Uoe=Xoe.EOL||`
-`;function cj(n,e){if(Xr.existsSync(n))return;let t=Xr.openSync(n,e.flags,e.mode);Xr.closeSync(t)}var hj=class{constructor(e,t,i,r){_o("In RollingFileStream");function o(){if(!e||!t||t<=0)throw new Error("You must specify a filename and file size")}o(),this.filename=e,this.size=t,this.backups=i,this.options=r,this.currentSize=0;function s(a){let l=0;try{l=Xr.statSync(a).size}catch{cj(a,r)}return l}this.currentSize=s(this.filename)}shouldRoll(){return _o("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(e){let t=this,i=new RegExp(`^${Tu.basename(e)}`);function r(u){return i.test(u)}function o(u){return parseInt(u.substring(`${Tu.basename(e)}.`.length),10)||0}function s(u,c){return o(u)>o(c)?1:o(u) ${e}.${c+1}`),Xr.renameSync(Tu.join(Tu.dirname(e),u),`${e}.${c+1}`)}}function l(){_o("Renaming the old files"),Xr.readdirSync(Tu.dirname(e)).filter(r).sort(s).reverse().forEach(a)}_o("Rolling, rolling, rolling"),l()}write(e,t){let i=this;function r(){_o("writing the chunk to the file"),i.currentSize+=e.length,Xr.appendFileSync(i.filename,e)}_o("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),r()}};function Goe(n,e,t,i,r,o){_o("fileSync appender created"),n=Tu.normalize(n),i=!i&&i!==0?5:i;function s(l,u,c){let h;return u?h=new hj(l,u,c,o):h=(d=>(cj(d,o),{write(g){Xr.appendFileSync(d,g)}}))(l),h}let a=s(n,t,i);return l=>{a.write(e(l,r)+Uoe)}}function Qoe(n,e){let t=e.basicLayout;n.layout&&(t=e.layout(n.layout.type,n.layout));let i={flags:n.flags||"a",encoding:n.encoding||"utf8",mode:n.mode||384};return Goe(n.filename,t,n.maxLogSize,n.backups,n.timezoneOffset,i)}dj.exports.configure=Qoe});var pj=m((cEe,fj)=>{var Ur=Ot()("log4js:tcp"),Koe=require("net");function zoe(n,e){let t=!1,i=[],r,o=3,s="__LOG4JS__";function a(h){Ur("Writing log event to socket"),t=r.write(`${e(h)}${s}`,"utf8")}function l(){let h;for(Ur("emptying buffer");h=i.shift();)a(h)}function u(){Ur(`appender creating socket to ${n.host||"localhost"}:${n.port||5e3}`),s=`${n.endMsg||"__LOG4JS__"}`,r=Koe.createConnection(n.port||5e3,n.host||"localhost"),r.on("connect",()=>{Ur("socket connected"),l(),t=!0}),r.on("drain",()=>{Ur("drain event received, emptying buffer"),t=!0,l()}),r.on("timeout",r.end.bind(r)),r.on("error",h=>{Ur("connection error",h),t=!1,l()}),r.on("close",u)}u();function c(h){t?a(h):(Ur("buffering log event because it cannot write at the moment"),i.push(h))}return c.shutdown=function(h){Ur("shutdown called"),i.length&&o?(Ur("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{c.shutdown(h)},100)):(r.removeAllListeners("close"),r.end(h))},c}function Voe(n,e){Ur(`configure with config = ${n}`);let t=function(i){return i.serialise()};return n.layout&&(t=e.layout(n.layout.type,n.layout)),zoe(n,t)}fj.exports.configure=Voe});var rC=m((hEe,nC)=>{var ese=require("path"),Qa=Ot()("log4js:appenders"),Jn=Wa(),mj=Pp(),tse=$a(),ise=Fx(),nse=wL(),yr=new Map;yr.set("console",xL());yr.set("stdout",SL());yr.set("stderr",kL());yr.set("logLevelFilter",PL());yr.set("categoryFilter",LL());yr.set("noLogFilter",jL());yr.set("file",aj());yr.set("dateFile",uj());yr.set("fileSync",gj());yr.set("tcp",pj());var ud=new Map,iC=(n,e)=>{Qa("Loading module from ",n);try{return require(n)}catch(t){Jn.throwExceptionIf(e,t.code!=="MODULE_NOT_FOUND",`appender "${n}" could not be loaded (error was: ${t})`);return}},rse=(n,e)=>yr.get(n)||iC(`./${n}`,e)||iC(n,e)||""||iC(ese.join(process.cwd(),n),e),Qp=new Set,bj=(n,e)=>{if(ud.has(n))return ud.get(n);if(!e.appenders[n])return!1;if(Qp.has(n))throw new Error(`Dependency loop detected for appender ${n}.`);Qp.add(n),Qa(`Creating appender ${n}`);let t=ose(n,e);return Qp.delete(n),ud.set(n,t),t},ose=(n,e)=>{let t=e.appenders[n],i=t.type.configure?t.type:rse(t.type,e);return Jn.throwExceptionIf(e,Jn.not(i),`appender "${n}" is not valid (type "${t.type}" could not be found)`),i.appender&&Qa(`DEPRECATION: Appender ${t.type} exports an appender function.`),i.shutdown&&Qa(`DEPRECATION: Appender ${t.type} exports a shutdown function.`),Qa(`${n}: clustering.isMaster ? ${mj.isMaster()}`),Qa(`${n}: appenderModule is ${require("util").inspect(i)}`),mj.onlyOnMaster(()=>(Qa(`calling appenderModule.configure for ${n} / ${t.type}`),i.configure(nse.modifyConfig(t),ise,r=>bj(r,e),tse)),()=>{})},yj=n=>{ud.clear(),Qp.clear();let e=[];Object.values(n.categories).forEach(t=>{e.push(...t.appenders)}),Object.keys(n.appenders).forEach(t=>{(e.includes(t)||n.appenders[t].type==="tcp-server")&&bj(t,n)})},vj=()=>{yj({appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"trace"}}})};vj();Jn.addListener(n=>{Jn.throwExceptionIf(n,Jn.not(Jn.anObject(n.appenders)),'must have a property "appenders" of type object.');let e=Object.keys(n.appenders);Jn.throwExceptionIf(n,Jn.not(e.length),"must define at least one appender."),e.forEach(t=>{Jn.throwExceptionIf(n,Jn.not(n.appenders[t].type),`appender "${t}" is not valid (must be an object with property "type")`)})});Jn.addListener(yj);nC.exports=ud;nC.exports.init=vj});var sC=m((dEe,Kp)=>{var Ka=Ot()("log4js:categories"),Mt=Wa(),oC=$a(),wj=rC(),za=new Map;function Dj(n,e,t){if(e.inherit===!1)return;let i=t.lastIndexOf(".");if(i<0)return;let r=t.substring(0,i),o=n.categories[r];o||(o={inherit:!0,appenders:[]}),Dj(n,o,r),!n.categories[r]&&o.appenders&&o.appenders.length&&o.level&&(n.categories[r]=o),e.appenders=e.appenders||[],e.level=e.level||o.level,o.appenders.forEach(s=>{e.appenders.includes(s)||e.appenders.push(s)}),e.parent=o}function sse(n){if(!n.categories)return;Object.keys(n.categories).forEach(t=>{let i=n.categories[t];Dj(n,i,t)})}Mt.addPreProcessingListener(n=>sse(n));Mt.addListener(n=>{Mt.throwExceptionIf(n,Mt.not(Mt.anObject(n.categories)),'must have a property "categories" of type object.');let e=Object.keys(n.categories);Mt.throwExceptionIf(n,Mt.not(e.length),"must define at least one category."),e.forEach(t=>{let i=n.categories[t];Mt.throwExceptionIf(n,[Mt.not(i.appenders),Mt.not(i.level)],`category "${t}" is not valid (must be an object with properties "appenders" and "level")`),Mt.throwExceptionIf(n,Mt.not(Array.isArray(i.appenders)),`category "${t}" is not valid (appenders must be an array of appender names)`),Mt.throwExceptionIf(n,Mt.not(i.appenders.length),`category "${t}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(i,"enableCallStack")&&Mt.throwExceptionIf(n,typeof i.enableCallStack!="boolean",`category "${t}" is not valid (enableCallStack must be boolean type)`),i.appenders.forEach(r=>{Mt.throwExceptionIf(n,Mt.not(wj.get(r)),`category "${t}" is not valid (appender "${r}" is not defined)`)}),Mt.throwExceptionIf(n,Mt.not(oC.getLevel(i.level)),`category "${t}" is not valid (level "${i.level}" not recognised; valid levels are ${oC.levels.join(", ")})`)}),Mt.throwExceptionIf(n,Mt.not(n.categories.default),'must define a "default" category.')});var xj=n=>{za.clear(),Object.keys(n.categories).forEach(t=>{let i=n.categories[t],r=[];i.appenders.forEach(o=>{r.push(wj.get(o)),Ka(`Creating category ${t}`),za.set(t,{appenders:r,level:oC.getLevel(i.level),enableCallStack:i.enableCallStack||!1})})})},Cj=()=>{xj({categories:{default:{appenders:["out"],level:"OFF"}}})};Cj();Mt.addListener(xj);var Va=n=>(Ka(`configForCategory: searching for config for ${n}`),za.has(n)?(Ka(`configForCategory: ${n} exists in config, returning it`),za.get(n)):n.indexOf(".")>0?(Ka(`configForCategory: ${n} has hierarchy, searching for parents`),Va(n.substring(0,n.lastIndexOf(".")))):(Ka("configForCategory: returning config for default category"),Va("default"))),ase=n=>Va(n).appenders,lse=n=>Va(n).level,use=(n,e)=>{let t=za.get(n);if(Ka(`setLevelForCategory: found ${t} for ${n}`),!t){let i=Va(n);Ka(`setLevelForCategory: no config found for category, found ${i} for parents of ${n}`),t={appenders:i.appenders}}t.level=e,za.set(n,t)},cse=n=>Va(n).enableCallStack===!0,hse=(n,e)=>{Va(n).enableCallStack=e};Kp.exports=za;Kp.exports=Object.assign(Kp.exports,{appendersForCategory:ase,getLevelForCategory:lse,setLevelForCategory:use,getEnableCallStackForCategory:cse,setEnableCallStackForCategory:hse,init:Cj})});var Ej=m((gEe,kj)=>{var Sj=Ot()("log4js:logger"),dse=Ix(),Ro=$a(),gse=Pp(),zp=sC(),fse=Wa(),pse=/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;function mse(n,e=4){let t=n.stack.split(`
-`).slice(e),i=pse.exec(t[0]);return i&&i.length===6?{functionName:i[1],fileName:i[2],lineNumber:parseInt(i[3],10),columnNumber:parseInt(i[4],10),callStack:t.join(`
-`)}:null}var Vp=class{constructor(e){if(!e)throw new Error("No category provided.");this.category=e,this.context={},this.parseCallStack=mse,Sj(`Logger created (${this.category}, ${this.level})`)}get level(){return Ro.getLevel(zp.getLevelForCategory(this.category),Ro.TRACE)}set level(e){zp.setLevelForCategory(this.category,Ro.getLevel(e,this.level))}get useCallStack(){return zp.getEnableCallStackForCategory(this.category)}set useCallStack(e){zp.setEnableCallStackForCategory(this.category,e===!0)}log(e,...t){let i=Ro.getLevel(e);i||(this._log(Ro.WARN,"log4js:logger.log: invalid value for log-level as first parameter given: ",e),i=Ro.INFO),this.isLevelEnabled(i)&&this._log(i,t)}isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}_log(e,t){Sj(`sending log data (${e}) to appenders`);let i=new dse(this.category,e,t,this.context,this.useCallStack&&this.parseCallStack(new Error));gse.send(i)}addContext(e,t){this.context[e]=t}removeContext(e){delete this.context[e]}clearContext(){this.context={}}setParseCallStackFunction(e){this.parseCallStack=e}};function Tj(n){let e=Ro.getLevel(n),i=e.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),r=i[0].toUpperCase()+i.slice(1);Vp.prototype[`is${r}Enabled`]=function(){return this.isLevelEnabled(e)},Vp.prototype[i]=function(...o){this.log(e,...o)}}Ro.levels.forEach(Tj);fse.addListener(()=>{Ro.levels.forEach(Tj)});kj.exports=Vp});var Rj=m((fEe,_j)=>{var ku=$a(),bse=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function yse(n){return n.originalUrl||n.url}function vse(n,e,t){let i=o=>{let s=o.concat();for(let a=0;ai.source?i.source:i);e=new RegExp(t.join("|"))}return e}function Dse(n,e,t){let i=e;if(t){let r=t.find(o=>{let s=!1;return o.from&&o.to?s=n>=o.from&&n<=o.to:s=o.codes.indexOf(n)!==-1,s});r&&(i=ku.getLevel(r.level,i))}return i}_j.exports=function(e,t){typeof t=="string"||typeof t=="function"?t={format:t}:t=t||{};let i=e,r=ku.getLevel(t.level,ku.INFO),o=t.format||bse,s=wse(t.nolog);return(a,l,u)=>{if(a._logging||s&&s.test(a.originalUrl))return u();if(i.isLevelEnabled(r)||t.level==="auto"){let c=new Date,{writeHead:h}=l;a._logging=!0,l.writeHead=(d,g)=>{l.writeHead=h,l.writeHead(d,g),l.__statusCode=d,l.__headers=g||{}},l.on("finish",()=>{l.responseTime=new Date-c,l.statusCode&&t.level==="auto"&&(r=ku.INFO,l.statusCode>=300&&(r=ku.WARN),l.statusCode>=400&&(r=ku.ERROR)),r=Dse(l.statusCode,r,t.statusRules);let d=vse(a,l,t.tokens||[]);if(t.context&&i.addContext("res",l),typeof o=="function"){let g=o(a,l,f=>Pj(f,d));g&&i.log(r,g)}else i.log(r,Pj(o,d));t.context&&i.removeContext("res")})}return u()}}});var Aj=m((pEe,jj)=>{var Lj=Ot()("log4js:recording"),em=[];function xse(){return function(n){Lj(`received logEvent, number of events now ${em.length+1}`),Lj("log event was ",n),em.push(n)}}function Fj(){return em.slice()}function Ij(){em.length=0}jj.exports={configure:xse,replay:Fj,playback:Fj,reset:Ij,erase:Ij}});var aC=m((mEe,qj)=>{var js=Ot()("log4js:main"),Cse=require("fs"),Sse=AR()({proto:!0}),Tse=Wa(),kse=Fx(),Ese=$a(),Oj=rC(),Mj=sC(),Pse=Ej(),_se=Pp(),Rse=Rj(),Lse=Aj(),cd=!1;function Fse(n){if(!cd)return;js("Received log event ",n),Mj.appendersForCategory(n.categoryName).forEach(t=>{t(n)})}function Ise(n){js(`Loading configuration from ${n}`);try{return JSON.parse(Cse.readFileSync(n,"utf8"))}catch(e){throw new Error(`Problem reading config from file "${n}". Error was ${e.message}`,e)}}function Nj(n){cd&&Bj();let e=n;return typeof e=="string"&&(e=Ise(n)),js(`Configuration is ${e}`),Tse.configure(Sse(e)),_se.onMessage(Fse),cd=!0,Hj}function jse(){return Lse}function Bj(n){js("Shutdown called. Disabling all log writing."),cd=!1;let e=Array.from(Oj.values());Oj.init(),Mj.init();let t=e.reduceRight((s,a)=>a.shutdown?s+1:s,0);if(t===0)return js("No appenders with shutdown functions found."),n!==void 0&&n();let i=0,r;js(`Found ${t} appenders with shutdown functions.`);function o(s){r=r||s,i+=1,js(`Appender shutdowns complete: ${i} / ${t}`),i>=t&&(js("All shutdown functions completed."),n&&n(r))}return e.filter(s=>s.shutdown).forEach(s=>s.shutdown(o)),null}function Ase(n){return cd||Nj(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new Pse(n||"default")}var Hj={getLogger:Ase,configure:Nj,shutdown:Bj,connectLogger:Rse,levels:Ese,addLayout:kse.addLayout,recording:jse};qj.exports=Hj});var hd=m(As=>{"use strict";var Yj=gt().fromCallback,Yi=Qe(),Ose=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof Yi[n]=="function");Object.keys(Yi).forEach(n=>{n!=="promises"&&(As[n]=Yi[n])});Ose.forEach(n=>{As[n]=Yj(Yi[n])});As.exists=function(n,e){return typeof e=="function"?Yi.exists(n,e):new Promise(t=>Yi.exists(n,t))};As.read=function(n,e,t,i,r,o){return typeof o=="function"?Yi.read(n,e,t,i,r,o):new Promise((s,a)=>{Yi.read(n,e,t,i,r,(l,u,c)=>{if(l)return a(l);s({bytesRead:u,buffer:c})})})};As.write=function(n,e,...t){return typeof t[t.length-1]=="function"?Yi.write(n,e,...t):new Promise((i,r)=>{Yi.write(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffer:a})})})};typeof Yi.writev=="function"&&(As.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?Yi.writev(n,e,...t):new Promise((i,r)=>{Yi.writev(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffers:a})})})});typeof Yi.realpath.native=="function"&&(As.realpath.native=Yj(Yi.realpath.native))});var lC=m((yEe,Wj)=>{Wj.exports=n=>{let e=process.versions.node.split(".").map(t=>parseInt(t,10));return n=n.split(".").map(t=>parseInt(t,10)),e[0]>n[0]||e[0]===n[0]&&(e[1]>n[1]||e[1]===n[1]&&e[2]>=n[2])}});var Uj=m((vEe,uC)=>{"use strict";var Eu=hd(),Lo=require("path"),Mse=lC(),Zj=Mse("10.12.0"),Jj=n=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(n.replace(Lo.parse(n).root,""))){let t=new Error(`Path contains invalid characters: ${n}`);throw t.code="EINVAL",t}},$j=n=>{let e={mode:511};return typeof n=="number"&&(n={mode:n}),ge(ge({},e),n)},Xj=n=>{let e=new Error(`operation not permitted, mkdir '${n}'`);return e.code="EPERM",e.errno=-4048,e.path=n,e.syscall="mkdir",e};uC.exports.makeDir=async(n,e)=>{if(Jj(n),e=$j(e),Zj){let i=Lo.resolve(n);return Eu.mkdir(i,{mode:e.mode,recursive:!0})}let t=async i=>{try{await Eu.mkdir(i,e.mode)}catch(r){if(r.code==="EPERM")throw r;if(r.code==="ENOENT"){if(Lo.dirname(i)===i)throw Xj(i);if(r.message.includes("null bytes"))throw r;return await t(Lo.dirname(i)),t(i)}try{if(!(await Eu.stat(i)).isDirectory())throw new Error("The path is not a directory")}catch{throw r}}};return t(Lo.resolve(n))};uC.exports.makeDirSync=(n,e)=>{if(Jj(n),e=$j(e),Zj){let i=Lo.resolve(n);return Eu.mkdirSync(i,{mode:e.mode,recursive:!0})}let t=i=>{try{Eu.mkdirSync(i,e.mode)}catch(r){if(r.code==="EPERM")throw r;if(r.code==="ENOENT"){if(Lo.dirname(i)===i)throw Xj(i);if(r.message.includes("null bytes"))throw r;return t(Lo.dirname(i)),t(i)}try{if(!Eu.statSync(i).isDirectory())throw new Error("The path is not a directory")}catch{throw r}}};return t(Lo.resolve(n))}});var vr=m((wEe,Gj)=>{"use strict";var Nse=gt().fromPromise,{makeDir:Bse,makeDirSync:cC}=Uj(),hC=Nse(Bse);Gj.exports={mkdirs:hC,mkdirsSync:cC,mkdirp:hC,mkdirpSync:cC,ensureDir:hC,ensureDirSync:cC}});var dC=m((DEe,Qj)=>{"use strict";var Pu=Qe();function Hse(n,e,t,i){Pu.open(n,"r+",(r,o)=>{if(r)return i(r);Pu.futimes(o,e,t,s=>{Pu.close(o,a=>{i&&i(s||a)})})})}function qse(n,e,t){let i=Pu.openSync(n,"r+");return Pu.futimesSync(i,e,t),Pu.closeSync(i)}Qj.exports={utimesMillis:Hse,utimesMillisSync:qse}});var dd=m((xEe,e1)=>{"use strict";var _u=hd(),on=require("path"),Yse=require("util"),Wse=lC(),tm=Wse("10.5.0"),Kj=n=>tm?_u.stat(n,{bigint:!0}):_u.stat(n),gC=n=>tm?_u.statSync(n,{bigint:!0}):_u.statSync(n);function Zse(n,e){return Promise.all([Kj(n),Kj(e).catch(t=>{if(t.code==="ENOENT")return null;throw t})]).then(([t,i])=>({srcStat:t,destStat:i}))}function Jse(n,e){let t,i=gC(n);try{t=gC(e)}catch(r){if(r.code==="ENOENT")return{srcStat:i,destStat:null};throw r}return{srcStat:i,destStat:t}}function $se(n,e,t,i){Yse.callbackify(Zse)(n,e,(r,o)=>{if(r)return i(r);let{srcStat:s,destStat:a}=o;return a&&im(s,a)?i(new Error("Source and destination must not be the same.")):s.isDirectory()&&fC(n,e)?i(new Error(nm(n,e,t))):i(null,{srcStat:s,destStat:a})})}function Xse(n,e,t){let{srcStat:i,destStat:r}=Jse(n,e);if(r&&im(i,r))throw new Error("Source and destination must not be the same.");if(i.isDirectory()&&fC(n,e))throw new Error(nm(n,e,t));return{srcStat:i,destStat:r}}function zj(n,e,t,i,r){let o=on.resolve(on.dirname(n)),s=on.resolve(on.dirname(t));if(s===o||s===on.parse(s).root)return r();let a=(l,u)=>l?l.code==="ENOENT"?r():r(l):im(e,u)?r(new Error(nm(n,t,i))):zj(n,e,s,i,r);tm?_u.stat(s,{bigint:!0},a):_u.stat(s,a)}function Vj(n,e,t,i){let r=on.resolve(on.dirname(n)),o=on.resolve(on.dirname(t));if(o===r||o===on.parse(o).root)return;let s;try{s=gC(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(im(e,s))throw new Error(nm(n,t,i));return Vj(n,e,o,i)}function im(n,e){return!!(e.ino&&e.dev&&e.ino===n.ino&&e.dev===n.dev&&(tm||e.inor),i=on.resolve(e).split(on.sep).filter(r=>r);return t.reduce((r,o,s)=>r&&i[s]===o,!0)}function nm(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}e1.exports={checkPaths:$se,checkPathsSync:Xse,checkParentPaths:zj,checkParentPathsSync:Vj,isSrcSubdir:fC}});var o1=m((CEe,r1)=>{"use strict";var Si=Qe(),gd=require("path"),Use=vr().mkdirsSync,Gse=dC().utimesMillisSync,fd=dd();function Qse(n,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
-
- see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:i,destStat:r}=fd.checkPathsSync(n,e,"copy");return fd.checkParentPathsSync(n,i,e,"copy"),Kse(r,n,e,t)}function Kse(n,e,t,i){if(i.filter&&!i.filter(e,t))return;let r=gd.dirname(t);return Si.existsSync(r)||Use(r),t1(n,e,t,i)}function t1(n,e,t,i){if(!(i.filter&&!i.filter(e,t)))return zse(n,e,t,i)}function zse(n,e,t,i){let o=(i.dereference?Si.statSync:Si.lstatSync)(e);if(o.isDirectory())return oae(o,n,e,t,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Vse(o,n,e,t,i);if(o.isSymbolicLink())return lae(n,e,t,i)}function Vse(n,e,t,i,r){return e?eae(n,t,i,r):i1(n,t,i,r)}function eae(n,e,t,i){if(i.overwrite)return Si.unlinkSync(t),i1(n,e,t,i);if(i.errorOnExist)throw new Error(`'${t}' already exists`)}function i1(n,e,t,i){return Si.copyFileSync(e,t),i.preserveTimestamps&&tae(n.mode,e,t),pC(t,n.mode)}function tae(n,e,t){return iae(n)&&nae(t,n),rae(e,t)}function iae(n){return(n&128)===0}function nae(n,e){return pC(n,e|128)}function pC(n,e){return Si.chmodSync(n,e)}function rae(n,e){let t=Si.statSync(n);return Gse(e,t.atime,t.mtime)}function oae(n,e,t,i,r){if(!e)return sae(n.mode,t,i,r);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${i}' with directory '${t}'.`);return n1(t,i,r)}function sae(n,e,t,i){return Si.mkdirSync(t),n1(e,t,i),pC(t,n)}function n1(n,e,t){Si.readdirSync(n).forEach(i=>aae(i,n,e,t))}function aae(n,e,t,i){let r=gd.join(e,n),o=gd.join(t,n),{destStat:s}=fd.checkPathsSync(r,o,"copy");return t1(s,r,o,i)}function lae(n,e,t,i){let r=Si.readlinkSync(e);if(i.dereference&&(r=gd.resolve(process.cwd(),r)),n){let o;try{o=Si.readlinkSync(t)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return Si.symlinkSync(r,t);throw s}if(i.dereference&&(o=gd.resolve(process.cwd(),o)),fd.isSrcSubdir(r,o))throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${o}'.`);if(Si.statSync(t).isDirectory()&&fd.isSrcSubdir(o,r))throw new Error(`Cannot overwrite '${o}' with '${r}'.`);return uae(r,t)}else return Si.symlinkSync(r,t)}function uae(n,e){return Si.unlinkSync(e),Si.symlinkSync(n,e)}r1.exports=Qse});var mC=m((SEe,s1)=>{"use strict";s1.exports={copySync:o1()}});var Os=m((TEe,l1)=>{"use strict";var cae=gt().fromPromise,a1=hd();function hae(n){return a1.access(n).then(()=>!0).catch(()=>!1)}l1.exports={pathExists:cae(hae),pathExistsSync:a1.existsSync}});var b1=m((kEe,m1)=>{"use strict";var sn=Qe(),pd=require("path"),dae=vr().mkdirs,gae=Os().pathExists,fae=dC().utimesMillis,md=dd();function pae(n,e,t,i){typeof t=="function"&&!i?(i=t,t={}):typeof t=="function"&&(t={filter:t}),i=i||function(){},t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
-
- see https://github.com/jprichardson/node-fs-extra/issues/269`),md.checkPaths(n,e,"copy",(r,o)=>{if(r)return i(r);let{srcStat:s,destStat:a}=o;md.checkParentPaths(n,s,e,"copy",l=>l?i(l):t.filter?d1(u1,a,n,e,t,i):u1(a,n,e,t,i))})}function u1(n,e,t,i,r){let o=pd.dirname(t);gae(o,(s,a)=>{if(s)return r(s);if(a)return bC(n,e,t,i,r);dae(o,l=>l?r(l):bC(n,e,t,i,r))})}function d1(n,e,t,i,r,o){Promise.resolve(r.filter(t,i)).then(s=>s?n(e,t,i,r,o):o(),s=>o(s))}function bC(n,e,t,i,r){return i.filter?d1(c1,n,e,t,i,r):c1(n,e,t,i,r)}function c1(n,e,t,i,r){(i.dereference?sn.stat:sn.lstat)(e,(s,a)=>{if(s)return r(s);if(a.isDirectory())return xae(a,n,e,t,i,r);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return mae(a,n,e,t,i,r);if(a.isSymbolicLink())return Tae(n,e,t,i,r)})}function mae(n,e,t,i,r,o){return e?bae(n,t,i,r,o):g1(n,t,i,r,o)}function bae(n,e,t,i,r){if(i.overwrite)sn.unlink(t,o=>o?r(o):g1(n,e,t,i,r));else return i.errorOnExist?r(new Error(`'${t}' already exists`)):r()}function g1(n,e,t,i,r){sn.copyFile(e,t,o=>o?r(o):i.preserveTimestamps?yae(n.mode,e,t,r):rm(t,n.mode,r))}function yae(n,e,t,i){return vae(n)?wae(t,n,r=>r?i(r):h1(n,e,t,i)):h1(n,e,t,i)}function vae(n){return(n&128)===0}function wae(n,e,t){return rm(n,e|128,t)}function h1(n,e,t,i){Dae(e,t,r=>r?i(r):rm(t,n,i))}function rm(n,e,t){return sn.chmod(n,e,t)}function Dae(n,e,t){sn.stat(n,(i,r)=>i?t(i):fae(e,r.atime,r.mtime,t))}function xae(n,e,t,i,r,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${i}' with directory '${t}'.`)):f1(t,i,r,o):Cae(n.mode,t,i,r,o)}function Cae(n,e,t,i,r){sn.mkdir(t,o=>{if(o)return r(o);f1(e,t,i,s=>s?r(s):rm(t,n,r))})}function f1(n,e,t,i){sn.readdir(n,(r,o)=>r?i(r):p1(o,n,e,t,i))}function p1(n,e,t,i,r){let o=n.pop();return o?Sae(n,o,e,t,i,r):r()}function Sae(n,e,t,i,r,o){let s=pd.join(t,e),a=pd.join(i,e);md.checkPaths(s,a,"copy",(l,u)=>{if(l)return o(l);let{destStat:c}=u;bC(c,s,a,r,h=>h?o(h):p1(n,t,i,r,o))})}function Tae(n,e,t,i,r){sn.readlink(e,(o,s)=>{if(o)return r(o);if(i.dereference&&(s=pd.resolve(process.cwd(),s)),n)sn.readlink(t,(a,l)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?sn.symlink(s,t,r):r(a):(i.dereference&&(l=pd.resolve(process.cwd(),l)),md.isSrcSubdir(s,l)?r(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${l}'.`)):n.isDirectory()&&md.isSrcSubdir(l,s)?r(new Error(`Cannot overwrite '${l}' with '${s}'.`)):kae(s,t,r)));else return sn.symlink(s,t,r)})}function kae(n,e,t){sn.unlink(e,i=>i?t(i):sn.symlink(n,e,t))}m1.exports=pae});var yC=m((EEe,y1)=>{"use strict";var Eae=gt().fromCallback;y1.exports={copy:Eae(b1())}});var E1=m((PEe,k1)=>{"use strict";var v1=Qe(),C1=require("path"),st=require("assert"),bd=process.platform==="win32";function S1(n){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{n[t]=n[t]||v1[t],t=t+"Sync",n[t]=n[t]||v1[t]}),n.maxBusyTries=n.maxBusyTries||3}function vC(n,e,t){let i=0;typeof e=="function"&&(t=e,e={}),st(n,"rimraf: missing path"),st.strictEqual(typeof n,"string","rimraf: path should be a string"),st.strictEqual(typeof t,"function","rimraf: callback function required"),st(e,"rimraf: invalid options argument provided"),st.strictEqual(typeof e,"object","rimraf: options should be object"),S1(e),w1(n,e,function r(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&iw1(n,e,r),s)}o.code==="ENOENT"&&(o=null)}t(o)})}function w1(n,e,t){st(n),st(e),st(typeof t=="function"),e.lstat(n,(i,r)=>{if(i&&i.code==="ENOENT")return t(null);if(i&&i.code==="EPERM"&&bd)return D1(n,e,i,t);if(r&&r.isDirectory())return om(n,e,i,t);e.unlink(n,o=>{if(o){if(o.code==="ENOENT")return t(null);if(o.code==="EPERM")return bd?D1(n,e,o,t):om(n,e,o,t);if(o.code==="EISDIR")return om(n,e,o,t)}return t(o)})})}function D1(n,e,t,i){st(n),st(e),st(typeof i=="function"),e.chmod(n,438,r=>{r?i(r.code==="ENOENT"?null:t):e.stat(n,(o,s)=>{o?i(o.code==="ENOENT"?null:t):s.isDirectory()?om(n,e,t,i):e.unlink(n,i)})})}function x1(n,e,t){let i;st(n),st(e);try{e.chmodSync(n,438)}catch(r){if(r.code==="ENOENT")return;throw t}try{i=e.statSync(n)}catch(r){if(r.code==="ENOENT")return;throw t}i.isDirectory()?sm(n,e,t):e.unlinkSync(n)}function om(n,e,t,i){st(n),st(e),st(typeof i=="function"),e.rmdir(n,r=>{r&&(r.code==="ENOTEMPTY"||r.code==="EEXIST"||r.code==="EPERM")?Pae(n,e,i):r&&r.code==="ENOTDIR"?i(t):i(r)})}function Pae(n,e,t){st(n),st(e),st(typeof t=="function"),e.readdir(n,(i,r)=>{if(i)return t(i);let o=r.length,s;if(o===0)return e.rmdir(n,t);r.forEach(a=>{vC(C1.join(n,a),e,l=>{if(!s){if(l)return t(s=l);--o===0&&e.rmdir(n,t)}})})})}function T1(n,e){let t;e=e||{},S1(e),st(n,"rimraf: missing path"),st.strictEqual(typeof n,"string","rimraf: path should be a string"),st(e,"rimraf: missing options"),st.strictEqual(typeof e,"object","rimraf: options should be object");try{t=e.lstatSync(n)}catch(i){if(i.code==="ENOENT")return;i.code==="EPERM"&&bd&&x1(n,e,i)}try{t&&t.isDirectory()?sm(n,e,null):e.unlinkSync(n)}catch(i){if(i.code==="ENOENT")return;if(i.code==="EPERM")return bd?x1(n,e,i):sm(n,e,i);if(i.code!=="EISDIR")throw i;sm(n,e,i)}}function sm(n,e,t){st(n),st(e);try{e.rmdirSync(n)}catch(i){if(i.code==="ENOTDIR")throw t;if(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")_ae(n,e);else if(i.code!=="ENOENT")throw i}}function _ae(n,e){if(st(n),st(e),e.readdirSync(n).forEach(t=>T1(C1.join(n,t),e)),bd){let t=Date.now();do try{return e.rmdirSync(n,e)}catch{}while(Date.now()-t<500)}else return e.rmdirSync(n,e)}k1.exports=vC;vC.sync=T1});var yd=m((_Ee,_1)=>{"use strict";var Rae=gt().fromCallback,P1=E1();_1.exports={remove:Rae(P1),removeSync:P1.sync}});var M1=m((REe,O1)=>{"use strict";var Lae=gt().fromCallback,F1=Qe(),I1=require("path"),j1=vr(),A1=yd(),R1=Lae(function(e,t){t=t||function(){},F1.readdir(e,(i,r)=>{if(i)return j1.mkdirs(e,t);r=r.map(s=>I1.join(e,s)),o();function o(){let s=r.pop();if(!s)return t();A1.remove(s,a=>{if(a)return t(a);o()})}})});function L1(n){let e;try{e=F1.readdirSync(n)}catch{return j1.mkdirsSync(n)}e.forEach(t=>{t=I1.join(n,t),A1.removeSync(t)})}O1.exports={emptyDirSync:L1,emptydirSync:L1,emptyDir:R1,emptydir:R1}});var q1=m((LEe,H1)=>{"use strict";var Fae=gt().fromCallback,N1=require("path"),Ms=Qe(),B1=vr();function Iae(n,e){function t(){Ms.writeFile(n,"",i=>{if(i)return e(i);e()})}Ms.stat(n,(i,r)=>{if(!i&&r.isFile())return e();let o=N1.dirname(n);Ms.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?B1.mkdirs(o,l=>{if(l)return e(l);t()}):e(s);a.isDirectory()?t():Ms.readdir(o,l=>{if(l)return e(l)})})})}function jae(n){let e;try{e=Ms.statSync(n)}catch{}if(e&&e.isFile())return;let t=N1.dirname(n);try{Ms.statSync(t).isDirectory()||Ms.readdirSync(t)}catch(i){if(i&&i.code==="ENOENT")B1.mkdirsSync(t);else throw i}Ms.writeFileSync(n,"")}H1.exports={createFile:Fae(Iae),createFileSync:jae}});var $1=m((FEe,J1)=>{"use strict";var Aae=gt().fromCallback,W1=require("path"),el=Qe(),Z1=vr(),Y1=Os().pathExists;function Oae(n,e,t){function i(r,o){el.link(r,o,s=>{if(s)return t(s);t(null)})}Y1(e,(r,o)=>{if(r)return t(r);if(o)return t(null);el.lstat(n,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),t(s);let a=W1.dirname(e);Y1(a,(l,u)=>{if(l)return t(l);if(u)return i(n,e);Z1.mkdirs(a,c=>{if(c)return t(c);i(n,e)})})})})}function Mae(n,e){if(el.existsSync(e))return;try{el.lstatSync(n)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=W1.dirname(e);return el.existsSync(i)||Z1.mkdirsSync(i),el.linkSync(n,e)}J1.exports={createLink:Aae(Oae),createLinkSync:Mae}});var U1=m((IEe,X1)=>{"use strict";var Ns=require("path"),vd=Qe(),Nae=Os().pathExists;function Bae(n,e,t){if(Ns.isAbsolute(n))return vd.lstat(n,i=>i?(i.message=i.message.replace("lstat","ensureSymlink"),t(i)):t(null,{toCwd:n,toDst:n}));{let i=Ns.dirname(e),r=Ns.join(i,n);return Nae(r,(o,s)=>o?t(o):s?t(null,{toCwd:r,toDst:n}):vd.lstat(n,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),t(a)):t(null,{toCwd:n,toDst:Ns.relative(i,n)})))}}function Hae(n,e){let t;if(Ns.isAbsolute(n)){if(t=vd.existsSync(n),!t)throw new Error("absolute srcpath does not exist");return{toCwd:n,toDst:n}}else{let i=Ns.dirname(e),r=Ns.join(i,n);if(t=vd.existsSync(r),t)return{toCwd:r,toDst:n};if(t=vd.existsSync(n),!t)throw new Error("relative srcpath does not exist");return{toCwd:n,toDst:Ns.relative(i,n)}}}X1.exports={symlinkPaths:Bae,symlinkPathsSync:Hae}});var K1=m((jEe,Q1)=>{"use strict";var G1=Qe();function qae(n,e,t){if(t=typeof e=="function"?e:t,e=typeof e=="function"?!1:e,e)return t(null,e);G1.lstat(n,(i,r)=>{if(i)return t(null,"file");e=r&&r.isDirectory()?"dir":"file",t(null,e)})}function Yae(n,e){let t;if(e)return e;try{t=G1.lstatSync(n)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}Q1.exports={symlinkType:qae,symlinkTypeSync:Yae}});var rA=m((AEe,nA)=>{"use strict";var Wae=gt().fromCallback,V1=require("path"),Ru=Qe(),eA=vr(),Zae=eA.mkdirs,Jae=eA.mkdirsSync,tA=U1(),$ae=tA.symlinkPaths,Xae=tA.symlinkPathsSync,iA=K1(),Uae=iA.symlinkType,Gae=iA.symlinkTypeSync,z1=Os().pathExists;function Qae(n,e,t,i){i=typeof t=="function"?t:i,t=typeof t=="function"?!1:t,z1(e,(r,o)=>{if(r)return i(r);if(o)return i(null);$ae(n,e,(s,a)=>{if(s)return i(s);n=a.toDst,Uae(a.toCwd,t,(l,u)=>{if(l)return i(l);let c=V1.dirname(e);z1(c,(h,d)=>{if(h)return i(h);if(d)return Ru.symlink(n,e,u,i);Zae(c,g=>{if(g)return i(g);Ru.symlink(n,e,u,i)})})})})})}function Kae(n,e,t){if(Ru.existsSync(e))return;let r=Xae(n,e);n=r.toDst,t=Gae(r.toCwd,t);let o=V1.dirname(e);return Ru.existsSync(o)||Jae(o),Ru.symlinkSync(n,e,t)}nA.exports={createSymlink:Wae(Qae),createSymlinkSync:Kae}});var sA=m((OEe,oA)=>{"use strict";var am=q1(),lm=$1(),um=rA();oA.exports={createFile:am.createFile,createFileSync:am.createFileSync,ensureFile:am.createFile,ensureFileSync:am.createFileSync,createLink:lm.createLink,createLinkSync:lm.createLinkSync,ensureLink:lm.createLink,ensureLinkSync:lm.createLinkSync,createSymlink:um.createSymlink,createSymlinkSync:um.createSymlinkSync,ensureSymlink:um.createSymlink,ensureSymlinkSync:um.createSymlinkSync}});var lA=m((MEe,aA)=>{"use strict";var cm=Gx();aA.exports={readJson:cm.readFile,readJsonSync:cm.readFileSync,writeJson:cm.writeFile,writeJsonSync:cm.writeFileSync}});var hm=m((NEe,hA)=>{"use strict";var zae=gt().fromCallback,wd=Qe(),uA=require("path"),cA=vr(),Vae=Os().pathExists;function ele(n,e,t,i){typeof t=="function"&&(i=t,t="utf8");let r=uA.dirname(n);Vae(r,(o,s)=>{if(o)return i(o);if(s)return wd.writeFile(n,e,t,i);cA.mkdirs(r,a=>{if(a)return i(a);wd.writeFile(n,e,t,i)})})}function tle(n,...e){let t=uA.dirname(n);if(wd.existsSync(t))return wd.writeFileSync(n,...e);cA.mkdirsSync(t),wd.writeFileSync(n,...e)}hA.exports={outputFile:zae(ele),outputFileSync:tle}});var gA=m((BEe,dA)=>{"use strict";var{stringify:ile}=Cu(),{outputFile:nle}=hm();async function rle(n,e,t={}){let i=ile(e,t);await nle(n,i,t)}dA.exports=rle});var pA=m((HEe,fA)=>{"use strict";var{stringify:ole}=Cu(),{outputFileSync:sle}=hm();function ale(n,e,t){let i=ole(e,t);sle(n,i,t)}fA.exports=ale});var bA=m((qEe,mA)=>{"use strict";var lle=gt().fromPromise,Wi=lA();Wi.outputJson=lle(gA());Wi.outputJsonSync=pA();Wi.outputJSON=Wi.outputJson;Wi.outputJSONSync=Wi.outputJsonSync;Wi.writeJSON=Wi.writeJson;Wi.writeJSONSync=Wi.writeJsonSync;Wi.readJSON=Wi.readJson;Wi.readJSONSync=Wi.readJsonSync;mA.exports=Wi});var CA=m((YEe,xA)=>{"use strict";var wA=Qe(),ule=require("path"),cle=mC().copySync,DA=yd().removeSync,hle=vr().mkdirpSync,yA=dd();function dle(n,e,t){t=t||{};let i=t.overwrite||t.clobber||!1,{srcStat:r}=yA.checkPathsSync(n,e,"move");return yA.checkParentPathsSync(n,r,e,"move"),hle(ule.dirname(e)),gle(n,e,i)}function gle(n,e,t){if(t)return DA(e),vA(n,e,t);if(wA.existsSync(e))throw new Error("dest already exists.");return vA(n,e,t)}function vA(n,e,t){try{wA.renameSync(n,e)}catch(i){if(i.code!=="EXDEV")throw i;return fle(n,e,t)}}function fle(n,e,t){return cle(n,e,{overwrite:t,errorOnExist:!0}),DA(n)}xA.exports=dle});var TA=m((WEe,SA)=>{"use strict";SA.exports={moveSync:CA()}});var RA=m((ZEe,_A)=>{"use strict";var ple=Qe(),mle=require("path"),ble=yC().copy,PA=yd().remove,yle=vr().mkdirp,vle=Os().pathExists,kA=dd();function wle(n,e,t,i){typeof t=="function"&&(i=t,t={});let r=t.overwrite||t.clobber||!1;kA.checkPaths(n,e,"move",(o,s)=>{if(o)return i(o);let{srcStat:a}=s;kA.checkParentPaths(n,a,e,"move",l=>{if(l)return i(l);yle(mle.dirname(e),u=>u?i(u):Dle(n,e,r,i))})})}function Dle(n,e,t,i){if(t)return PA(e,r=>r?i(r):EA(n,e,t,i));vle(e,(r,o)=>r?i(r):o?i(new Error("dest already exists.")):EA(n,e,t,i))}function EA(n,e,t,i){ple.rename(n,e,r=>r?r.code!=="EXDEV"?i(r):xle(n,e,t,i):i())}function xle(n,e,t,i){ble(n,e,{overwrite:t,errorOnExist:!0},o=>o?i(o):PA(n,i))}_A.exports=wle});var FA=m((JEe,LA)=>{"use strict";var Cle=gt().fromCallback;LA.exports={move:Cle(RA())}});var Rn=m(($Ee,wC)=>{"use strict";wC.exports=ge(ge(ge(ge(ge(ge(ge(ge(ge(ge(ge(ge({},hd()),mC()),yC()),M1()),sA()),bA()),vr()),TA()),FA()),hm()),Os()),yd());var IA=require("fs");Object.getOwnPropertyDescriptor(IA,"promises")&&Object.defineProperty(wC.exports,"promises",{get(){return IA.promises}})});var q=m((OA,MA)=>{"use strict";var tl=C(require("fs")),DC=C(aC()),dm=C(require("path")),jA=C(require("os")),AA=C(Rn());function xC(){let n=process.env.NVIM_COC_LOG_FILE;if(n)return n;let e=process.env.XDG_RUNTIME_DIR;if(e)try{return tl.default.accessSync(e,tl.default.constants.R_OK|tl.default.constants.W_OK),dm.default.join(e,`coc-nvim-${process.pid}.log`)}catch{}let t=jA.default.tmpdir();return e=dm.default.join(t,`coc.nvim-${process.pid}`),tl.default.existsSync(e)||(0,AA.mkdirpSync)(e),dm.default.join(e,"coc-nvim.log")}var Sle=1024*1024,Tle=10,gm=xC(),kle=process.env.NVIM_COC_LOG_LEVEL||"info";if(tl.default.existsSync(gm))try{tl.default.writeFileSync(gm,"",{encoding:"utf8",mode:438})}catch{}OA.getLogFile=xC;DC.default.configure({disableClustering:!0,appenders:{out:{type:"file",mode:438,filename:gm,maxLogSize:Sle,backups:Tle,layout:{type:"pattern",pattern:`%d{ISO8601} %p (pid:${process.pid}) [%c] - %m`}}},categories:{default:{appenders:["out"],level:kle}}});MA.exports=(n="coc-nvim")=>{let e=DC.default.getLogger(n);return Object.assign(e,{getLogFile:xC,logfile:gm})}});var CC=_(()=>{"use strict";Promise.prototype.logError=function(){this.catch(n=>{q()("util-extensions").error(n)})}});var BA=m((TC,NA)=>{NA.exports=SC(typeof Buffer<"u"&&Buffer)||SC(TC.Buffer)||SC(typeof window<"u"&&window.Buffer)||TC.Buffer;function SC(n){return n&&n.isBuffer&&n}});var fm=m((XEe,HA)=>{var Ele={}.toString;HA.exports=Array.isArray||function(n){return Ele.call(n)=="[object Array]"}});var WA=m((Fu,YA)=>{var Lu=Ln(),Fu=YA.exports=qA(0);Fu.alloc=qA;Fu.concat=Lu.concat;Fu.from=Ple;function qA(n){return new Array(n)}function Ple(n){if(!Lu.isBuffer(n)&&Lu.isView(n))n=Lu.Uint8Array.from(n);else if(Lu.isArrayBuffer(n))n=new Uint8Array(n);else{if(typeof n=="string")return Lu.from.call(Fu,n);if(typeof n=="number")throw new TypeError('"value" argument must not be a number')}return Array.prototype.slice.call(n)}});var $A=m((ju,JA)=>{var Fo=Ln(),Iu=Fo.global,ju=JA.exports=Fo.hasBuffer?ZA(0):[];ju.alloc=Fo.hasBuffer&&Iu.alloc||ZA;ju.concat=Fo.concat;ju.from=_le;function ZA(n){return new Iu(n)}function _le(n){if(!Fo.isBuffer(n)&&Fo.isView(n))n=Fo.Uint8Array.from(n);else if(Fo.isArrayBuffer(n))n=new Uint8Array(n);else{if(typeof n=="string")return Fo.from.call(ju,n);if(typeof n=="number")throw new TypeError('"value" argument must not be a number')}return Iu.from&&Iu.from.length!==1?Iu.from(n):new Iu(n)}});var GA=m((Au,UA)=>{var pm=Ln(),Au=UA.exports=pm.hasArrayBuffer?XA(0):[];Au.alloc=XA;Au.concat=pm.concat;Au.from=Rle;function XA(n){return new Uint8Array(n)}function Rle(n){if(pm.isView(n)){var e=n.byteOffset,t=n.byteLength;n=n.buffer,n.byteLength!==t&&(n.slice?n=n.slice(e,e+t):(n=new Uint8Array(n),n.byteLength!==t&&(n=Array.prototype.slice.call(n,e,e+t))))}else{if(typeof n=="string")return pm.from.call(Au,n);if(typeof n=="number")throw new TypeError('"value" argument must not be a number')}return new Uint8Array(n)}});var QA=m(mm=>{mm.copy=Ile;mm.toString=Fle;mm.write=Lle;function Lle(n,e){for(var t=this,i=e||(e|=0),r=n.length,o=0,s=0;s>>6,t[i++]=128|o&63):o<55296||o>57343?(t[i++]=224|o>>>12,t[i++]=128|o>>>6&63,t[i++]=128|o&63):(o=(o-55296<<10|n.charCodeAt(s++)-56320)+65536,t[i++]=240|o>>>18,t[i++]=128|o>>>12&63,t[i++]=128|o>>>6&63,t[i++]=128|o&63);return i-e}function Fle(n,e,t){var i=this,r=e|0;t||(t=i.length);for(var o="",s=0;r=65536?(s-=65536,o+=String.fromCharCode((s>>>10)+55296,(s&1023)+56320)):o+=String.fromCharCode(s)}return o}function Ile(n,e,t,i){var r;t||(t=0),!i&&i!==0&&(i=this.length),e||(e=0);var o=i-t;if(n===this&&t=0;r--)n[r+e]=this[r+t];else for(r=0;r{var kC=QA();Dd.copy=eO;Dd.slice=tO;Dd.toString=jle;Dd.write=Ale("write");var Bs=Ln(),KA=Bs.global,zA=Bs.hasBuffer&&"TYPED_ARRAY_SUPPORT"in KA,VA=zA&&!KA.TYPED_ARRAY_SUPPORT;function eO(n,e,t,i){var r=Bs.isBuffer(this),o=Bs.isBuffer(n);if(r&&o)return this.copy(n,e,t,i);if(!VA&&!r&&!o&&Bs.isView(this)&&Bs.isView(n)){var s=t||i!=null?tO.call(this,t,i):this;return n.set(s,e),s.length}else return kC.copy.call(this,n,e,t,i)}function tO(n,e){var t=this.slice||!VA&&this.subarray;if(t)return t.call(this,n,e);var i=Bs.alloc.call(this,e-n);return eO.call(this,i,0,n,e),i}function jle(n,e,t){var i=!zA&&Bs.isBuffer(this)?this.toString:kC.toString;return i.apply(this,arguments)}function Ale(n){return e;function e(){var t=this[n]||kC[n];return t.apply(this,arguments)}}});var Ln=m(Ti=>{var EC=Ti.global=BA(),oO=Ti.hasBuffer=EC&&!!EC.isBuffer,_C=Ti.hasArrayBuffer=typeof ArrayBuffer<"u",Ole=Ti.isArray=fm();Ti.isArrayBuffer=_C?Yle:LC;var Mle=Ti.isBuffer=oO?EC.isBuffer:LC,Nle=Ti.isView=_C?ArrayBuffer.isView||aO("ArrayBuffer","buffer"):LC;Ti.alloc=RC;Ti.concat=Hle;Ti.from=Ble;var iO=Ti.Array=WA(),nO=Ti.Buffer=$A(),rO=Ti.Uint8Array=GA(),PC=Ti.prototype=bm();function Ble(n){return typeof n=="string"?Wle.call(this,n):sO(this).from(n)}function RC(n){return sO(this).alloc(n)}function Hle(n,e){e||(e=0,Array.prototype.forEach.call(n,o));var t=this!==Ti&&this||n[0],i=RC.call(t,e),r=0;return Array.prototype.forEach.call(n,s),i;function o(a){e+=a.length}function s(a){r+=PC.copy.call(a,i,r)}}var qle=aO("ArrayBuffer");function Yle(n){return n instanceof ArrayBuffer||qle(n)}function Wle(n){var e=n.length*3,t=RC.call(this,e),i=PC.write.call(t,n);return e!==i&&(t=PC.slice.call(t,0,i)),t}function sO(n){return Mle(n)?nO:Nle(n)?rO:Ole(n)?iO:oO?nO:_C?rO:iO}function LC(){return!1}function aO(n,e){return n="[object "+n+"]",function(t){return t!=null&&{}.toString.call(e?t[e]:t)===n}}});var ym=m(lO=>{lO.ExtBuffer=FC;var Zle=Ln();function FC(n,e){if(!(this instanceof FC))return new FC(n,e);this.buffer=Zle.from(n),this.type=e}});var cO=m(uO=>{uO.setExtPackers=Xle;var vm=Ln(),Jle=vm.global,wr=vm.Uint8Array.from,IC,$le={name:1,message:1,stack:1,columnNumber:1,fileName:1,lineNumber:1};function Xle(n){n.addExtPacker(14,Error,[il,$n]),n.addExtPacker(1,EvalError,[il,$n]),n.addExtPacker(2,RangeError,[il,$n]),n.addExtPacker(3,ReferenceError,[il,$n]),n.addExtPacker(4,SyntaxError,[il,$n]),n.addExtPacker(5,TypeError,[il,$n]),n.addExtPacker(6,URIError,[il,$n]),n.addExtPacker(10,RegExp,[Ule,$n]),n.addExtPacker(11,Boolean,[jC,$n]),n.addExtPacker(12,String,[jC,$n]),n.addExtPacker(13,Date,[Number,$n]),n.addExtPacker(15,Number,[jC,$n]),typeof Uint8Array<"u"&&(n.addExtPacker(17,Int8Array,wr),n.addExtPacker(18,Uint8Array,wr),n.addExtPacker(19,Int16Array,wr),n.addExtPacker(20,Uint16Array,wr),n.addExtPacker(21,Int32Array,wr),n.addExtPacker(22,Uint32Array,wr),n.addExtPacker(23,Float32Array,wr),typeof Float64Array<"u"&&n.addExtPacker(24,Float64Array,wr),typeof Uint8ClampedArray<"u"&&n.addExtPacker(25,Uint8ClampedArray,wr),n.addExtPacker(26,ArrayBuffer,wr),n.addExtPacker(29,DataView,wr)),vm.hasBuffer&&n.addExtPacker(27,Jle,vm.from)}function $n(n){return IC||(IC=AC().encode),IC(n)}function jC(n){return n.valueOf()}function Ule(n){n=RegExp.prototype.toString.call(n).split("/"),n.shift();var e=[n.pop()];return e.unshift(n.join("/")),e}function il(n){var e={};for(var t in $le)e[t]=n[t];return e}});var wm=m(xd=>{var Gle,Qle,Kle,zle;(function(n){var e="undefined",t=e!==typeof Buffer&&Buffer,i=e!==typeof Uint8Array&&Uint8Array,r=e!==typeof ArrayBuffer&&ArrayBuffer,o=[0,0,0,0,0,0,0,0],s=Array.isArray||F,a=4294967296,l=16777216,u;Gle=c("Uint64BE",!0,!0),Qle=c("Int64BE",!0,!1),Kle=c("Uint64LE",!1,!0),zle=c("Int64LE",!1,!1);function c(L,j,W){var B=j?0:4,N=j?4:0,I=j?0:3,M=j?1:2,J=j?2:1,K=j?3:0,ae=j?v:D,je=j?w:S,_e=xi.prototype,Ve="is"+L,Et="_"+Ve;return _e.buffer=void 0,_e.offset=0,_e[Et]=!0,_e.toNumber=bp,_e.toString=Tx,_e.toJSON=bp,_e.toArray=h,t&&(_e.toBuffer=d),i&&(_e.toArrayBuffer=g),xi[Ve]=ys,n[L]=xi,xi;function xi(Re,Se,Te,Le){return this instanceof xi?Po(this,Re,Se,Te,Le):new xi(Re,Se,Te,Le)}function ys(Re){return!!(Re&&Re[Et])}function Po(Re,Se,Te,Le,It){if(i&&r&&(Se instanceof r&&(Se=new i(Se)),Le instanceof r&&(Le=new i(Le))),!Se&&!Te&&!Le&&!u){Re.buffer=b(o,0);return}if(!f(Se,Te)){var gr=u||Array;It=Te,Le=Se,Te=0,Se=new gr(8)}Re.buffer=Se,Re.offset=Te|=0,e!==typeof Le&&(typeof Le=="string"?mp(Se,Te,Le,It||10):f(Le,It)?p(Se,Te,Le,It):typeof It=="number"?(du(Se,Te+B,Le),du(Se,Te+N,It)):Le>0?ae(Se,Te,Le):Le<0?je(Se,Te,Le):p(Se,Te,o,0))}function mp(Re,Se,Te,Le){var It=0,gr=Te.length,fr=0,kn=0;Te[0]==="-"&&It++;for(var vs=It;It=0))break;kn=kn*Le+ws,fr=fr*Le+Math.floor(kn/a),kn%=a}vs&&(fr=~fr,kn?kn=a-kn:fr++),du(Re,Se+B,fr),du(Re,Se+N,kn)}function bp(){var Re=this.buffer,Se=this.offset,Te=gu(Re,Se+B),Le=gu(Re,Se+N);return W||(Te|=0),Te?Te*a+Le:Le}function Tx(Re){var Se=this.buffer,Te=this.offset,Le=gu(Se,Te+B),It=gu(Se,Te+N),gr="",fr=!W&&Le&2147483648;for(fr&&(Le=~Le,It=a-It),Re=Re||10;;){var kn=Le%Re*a+It;if(Le=Math.floor(Le/Re),It=Math.floor(kn/Re),gr=(kn%Re).toString(Re)+gr,!Le&&!It)break}return fr&&(gr="-"+gr),gr}function du(Re,Se,Te){Re[Se+K]=Te&255,Te=Te>>8,Re[Se+J]=Te&255,Te=Te>>8,Re[Se+M]=Te&255,Te=Te>>8,Re[Se+I]=Te&255}function gu(Re,Se){return Re[Se+I]*l+(Re[Se+M]<<16)+(Re[Se+J]<<8)+Re[Se+K]}}function h(L){var j=this.buffer,W=this.offset;return u=null,L!==!1&&W===0&&j.length===8&&s(j)?j:b(j,W)}function d(L){var j=this.buffer,W=this.offset;if(u=t,L!==!1&&W===0&&j.length===8&&Buffer.isBuffer(j))return j;var B=new t(8);return p(B,0,j,W),B}function g(L){var j=this.buffer,W=this.offset,B=j.buffer;if(u=i,L!==!1&&W===0&&B instanceof r&&B.byteLength===8)return B;var N=new i(8);return p(N,0,j,W),N.buffer}function f(L,j){var W=L&&L.length;return j|=0,W&&j+8<=W&&typeof L[j]!="string"}function p(L,j,W,B){j|=0,B|=0;for(var N=0;N<8;N++)L[j++]=W[B++]&255}function b(L,j){return Array.prototype.slice.call(L,j,j+8)}function v(L,j,W){for(var B=j+8;B>j;)L[--B]=W&255,W/=256}function w(L,j,W){var B=j+8;for(W++;B>j;)L[--B]=-W&255^255,W/=256}function D(L,j,W){for(var B=j+8;j{OC.read=function(n,e,t,i,r){var o,s,a=r*8-i-1,l=(1<>1,c=-7,h=t?r-1:0,d=t?-1:1,g=n[e+h];for(h+=d,o=g&(1<<-c)-1,g>>=-c,c+=a;c>0;o=o*256+n[e+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=s*256+n[e+h],h+=d,c-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-u}return(g?-1:1)*s*Math.pow(2,o-i)};OC.write=function(n,e,t,i,r,o){var s,a,l,u=o*8-r-1,c=(1<>1,d=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:o-1,f=i?1:-1,p=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?e+=d/l:e+=d*Math.pow(2,1-h),e*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*l-1)*Math.pow(2,r),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;n[t+g]=a&255,g+=f,a/=256,r-=8);for(s=s<0;n[t+g]=s&255,g+=f,s/=256,u-=8);n[t+g-f]|=p*128}});var NC=m(hO=>{var Vle=hO.uint8=new Array(256);for(Cd=0;Cd<=255;Cd++)Vle[Cd]=eue(Cd);var Cd;function eue(n){return function(e){var t=e.reserve(1);e.buffer[t]=n}}});var xO=m(DO=>{var gO=MC(),fO=wm(),tue=fO.Uint64BE,iue=fO.Int64BE,pO=NC().uint8,Dm=Ln(),Dt=Dm.global,nue=Dm.hasBuffer&&"TYPED_ARRAY_SUPPORT"in Dt,rue=nue&&!Dt.TYPED_ARRAY_SUPPORT,dO=Dm.hasBuffer&&Dt.prototype||{};DO.getWriteToken=oue;function oue(n){return n&&n.uint8array?sue():rue||Dm.hasBuffer&&n&&n.safe?aue():mO()}function sue(){var n=mO();return n[202]=Ke(202,4,vO),n[203]=Ke(203,8,wO),n}function mO(){var n=pO.slice();return n[196]=Sd(196),n[197]=nl(197),n[198]=rl(198),n[199]=Sd(199),n[200]=nl(200),n[201]=rl(201),n[202]=Ke(202,4,dO.writeFloatBE||vO,!0),n[203]=Ke(203,8,dO.writeDoubleBE||wO,!0),n[204]=Sd(204),n[205]=nl(205),n[206]=rl(206),n[207]=Ke(207,8,bO),n[208]=Sd(208),n[209]=nl(209),n[210]=rl(210),n[211]=Ke(211,8,yO),n[217]=Sd(217),n[218]=nl(218),n[219]=rl(219),n[220]=nl(220),n[221]=rl(221),n[222]=nl(222),n[223]=rl(223),n}function aue(){var n=pO.slice();return n[196]=Ke(196,1,Dt.prototype.writeUInt8),n[197]=Ke(197,2,Dt.prototype.writeUInt16BE),n[198]=Ke(198,4,Dt.prototype.writeUInt32BE),n[199]=Ke(199,1,Dt.prototype.writeUInt8),n[200]=Ke(200,2,Dt.prototype.writeUInt16BE),n[201]=Ke(201,4,Dt.prototype.writeUInt32BE),n[202]=Ke(202,4,Dt.prototype.writeFloatBE),n[203]=Ke(203,8,Dt.prototype.writeDoubleBE),n[204]=Ke(204,1,Dt.prototype.writeUInt8),n[205]=Ke(205,2,Dt.prototype.writeUInt16BE),n[206]=Ke(206,4,Dt.prototype.writeUInt32BE),n[207]=Ke(207,8,bO),n[208]=Ke(208,1,Dt.prototype.writeInt8),n[209]=Ke(209,2,Dt.prototype.writeInt16BE),n[210]=Ke(210,4,Dt.prototype.writeInt32BE),n[211]=Ke(211,8,yO),n[217]=Ke(217,1,Dt.prototype.writeUInt8),n[218]=Ke(218,2,Dt.prototype.writeUInt16BE),n[219]=Ke(219,4,Dt.prototype.writeUInt32BE),n[220]=Ke(220,2,Dt.prototype.writeUInt16BE),n[221]=Ke(221,4,Dt.prototype.writeUInt32BE),n[222]=Ke(222,2,Dt.prototype.writeUInt16BE),n[223]=Ke(223,4,Dt.prototype.writeUInt32BE),n}function Sd(n){return function(e,t){var i=e.reserve(2),r=e.buffer;r[i++]=n,r[i]=t}}function nl(n){return function(e,t){var i=e.reserve(3),r=e.buffer;r[i++]=n,r[i++]=t>>>8,r[i]=t}}function rl(n){return function(e,t){var i=e.reserve(5),r=e.buffer;r[i++]=n,r[i++]=t>>>24,r[i++]=t>>>16,r[i++]=t>>>8,r[i]=t}}function Ke(n,e,t,i){return function(r,o){var s=r.reserve(e+1);r.buffer[s++]=n,t.call(r.buffer,o,s,i)}}function bO(n,e){new tue(this,e,n)}function yO(n,e){new iue(this,e,n)}function vO(n,e){gO.write(this,n,e,!1,23,4)}function wO(n,e){gO.write(this,n,e,!1,52,8)}});var EO=m(kO=>{var lue=fm(),TO=wm(),uue=TO.Uint64BE,cue=TO.Int64BE,CO=Ln(),SO=bm(),hue=xO(),due=NC().uint8,gue=ym().ExtBuffer,fue=typeof Uint8Array<"u",pue=typeof Map<"u",Ou=[];Ou[1]=212;Ou[2]=213;Ou[4]=214;Ou[8]=215;Ou[16]=216;kO.getWriteType=mue;function mue(n){var e=hue.getWriteToken(n),t=n&&n.useraw,i=fue&&n&&n.binarraybuffer,r=i?CO.isArrayBuffer:CO.isBuffer,o=i?F:S,s=pue&&n&&n.usemap,a=s?W:j,l={boolean:u,function:w,number:c,object:t?v:b,string:p(t?f:g),symbol:w,undefined:w};return l;function u(N,I){var M=I?195:194;e[M](N,I)}function c(N,I){var M=I|0,J;if(I!==M){J=203,e[J](N,I);return}else-32<=M&&M<=127?J=M&255:0<=M?J=M<=255?204:M<=65535?205:206:J=-128<=M?208:-32768<=M?209:210;e[J](N,M)}function h(N,I){var M=207;e[M](N,I.toArray())}function d(N,I){var M=211;e[M](N,I.toArray())}function g(N){return N<32?1:N<=255?2:N<=65535?3:5}function f(N){return N<32?1:N<=65535?3:5}function p(N){return I;function I(M,J){var K=J.length,ae=5+K*3;M.offset=M.reserve(ae);var je=M.buffer,_e=N(K),Ve=M.offset+_e;K=SO.write.call(je,J,Ve);var Et=N(K);if(_e!==Et){var xi=Ve+Et-_e,ys=Ve+K;SO.copy.call(je,je,xi,Ve,ys)}var Po=Et===1?160+K:Et<=3?215+Et:219;e[Po](M,K),M.offset+=K}}function b(N,I){if(I===null)return w(N,I);if(r(I))return o(N,I);if(lue(I))return D(N,I);if(uue.isUint64BE(I))return h(N,I);if(cue.isInt64BE(I))return d(N,I);var M=N.codec.getExtPacker(I);if(M&&(I=M(I)),I instanceof gue)return L(N,I);a(N,I)}function v(N,I){if(r(I))return B(N,I);b(N,I)}function w(N,I){var M=192;e[M](N,I)}function D(N,I){var M=I.length,J=M<16?144+M:M<=65535?220:221;e[J](N,M);for(var K=N.codec.encode,ae=0;ae{var bue=fm();Td.createCodec=PO;Td.install=vue;Td.filter=xue;var yue=Ln();function Mu(n){if(!(this instanceof Mu))return new Mu(n);this.options=n,this.init()}Mu.prototype.init=function(){var n=this.options;return n&&n.uint8array&&(this.bufferish=yue.Uint8Array),this};function vue(n){for(var e in n)Mu.prototype[e]=wue(Mu.prototype[e],n[e])}function wue(n,e){return n&&e?t:n||e;function t(){return n.apply(this,arguments),e.apply(this,arguments)}}function Due(n){return n=n.slice(),function(t){return n.reduce(e,t)};function e(t,i){return i(t)}}function xue(n){return bue(n)?Due(n):n}function PO(n){return new Mu(n)}Td.preset=PO({preset:!0})});var xm=m(RO=>{var Cue=ym().ExtBuffer,Sue=cO(),Tue=EO(),BC=kd();BC.install({addExtPacker:Eue,getExtPacker:Pue,init:_O});RO.preset=_O.call(BC.preset);function kue(n){var e=Tue.getWriteType(n);return t;function t(i,r){var o=e[typeof r];if(!o)throw new Error('Unsupported type "'+typeof r+'": '+r);o(i,r)}}function _O(){var n=this.options;return this.encode=kue(n),n&&n.preset&&Sue.setExtPackers(this),this}function Eue(n,e,t){t=BC.filter(t);var i=e.name;if(i&&i!=="Object"){var r=this.extPackers||(this.extPackers={});r[i]=s}else{var o=this.extEncoderList||(this.extEncoderList=[]);o.unshift([e,s])}function s(a){return t&&(a=t(a)),new Cue(a,n)}}function Pue(n){var e=this.extPackers||(this.extPackers={}),t=n.constructor,i=t&&t.name&&e[t.name];if(i)return i;for(var r=this.extEncoderList||(this.extEncoderList=[]),o=r.length,s=0;s{HC.FlexDecoder=Nu;HC.FlexEncoder=Bu;var Ed=Ln(),_ue=2048,Rue=65536,LO="BUFFER_SHORTAGE";function Nu(){if(!(this instanceof Nu))return new Nu}function Bu(){if(!(this instanceof Bu))return new Bu}Nu.mixin=jO(Lue());Nu.mixin(Nu.prototype);Bu.mixin=jO(Fue());Bu.mixin(Bu.prototype);function Lue(){return{bufferish:Ed,write:n,fetch:jue,flush:e,push:IO,pull:Aue,read:FO,reserve:t,offset:0};function n(i){var r=this.offset?Ed.prototype.slice.call(this.buffer,this.offset):this.buffer;this.buffer=r?i?this.bufferish.concat([r,i]):r:i,this.offset=0}function e(){for(;this.offsetthis.buffer.length)throw new Error(LO);return this.offset=o,r}}function Fue(){return{bufferish:Ed,write:Iue,fetch:n,flush:e,push:IO,pull:t,read:FO,reserve:i,send:r,maxBufferSize:Rue,minBufferSize:_ue,offset:0,start:0};function n(){var o=this.start;if(o1?this.bufferish.concat(o):o[0];return o.length=0,s}function i(o){var s=o|0;if(this.buffer){var a=this.buffer.length,l=this.offset|0,u=l+s;if(uthis.minBufferSize)this.flush(),this.push(o);else{var a=this.reserve(s);Ed.prototype.copy.call(o,this.buffer,a)}}}function Iue(){throw new Error("method not implemented: write()")}function jue(){throw new Error("method not implemented: fetch()")}function FO(){var n=this.buffers&&this.buffers.length;return n?(this.flush(),this.pull()):this.fetch()}function IO(n){var e=this.buffers||(this.buffers=[]);e.push(n)}function Aue(){var n=this.buffers||(this.buffers=[]);return n.shift()}function jO(n){return e;function e(t){for(var i in n)t[i]=n[i];return t}}});var Cm=m(AO=>{AO.EncodeBuffer=Hu;var Oue=xm().preset,Mue=qC().FlexEncoder;Mue.mixin(Hu.prototype);function Hu(n){if(!(this instanceof Hu))return new Hu(n);if(n&&(this.options=n,n.codec)){var e=this.codec=n.codec;e.bufferish&&(this.bufferish=e.bufferish)}}Hu.prototype.codec=Oue;Hu.prototype.write=function(n){this.codec.encode(this,n)}});var AC=m(OO=>{OO.encode=Bue;var Nue=Cm().EncodeBuffer;function Bue(n,e){var t=new Nue(e);return t.write(n),t.read()}});var BO=m(NO=>{NO.setExtUnpackers=Yue;var MO=Ln(),Hue=MO.global,YC,que={name:1,message:1,stack:1,columnNumber:1,fileName:1,lineNumber:1};function Yue(n){n.addExtUnpacker(14,[Xn,ol(Error)]),n.addExtUnpacker(1,[Xn,ol(EvalError)]),n.addExtUnpacker(2,[Xn,ol(RangeError)]),n.addExtUnpacker(3,[Xn,ol(ReferenceError)]),n.addExtUnpacker(4,[Xn,ol(SyntaxError)]),n.addExtUnpacker(5,[Xn,ol(TypeError)]),n.addExtUnpacker(6,[Xn,ol(URIError)]),n.addExtUnpacker(10,[Xn,Wue]),n.addExtUnpacker(11,[Xn,Zi(Boolean)]),n.addExtUnpacker(12,[Xn,Zi(String)]),n.addExtUnpacker(13,[Xn,Zi(Date)]),n.addExtUnpacker(15,[Xn,Zi(Number)]),typeof Uint8Array<"u"&&(n.addExtUnpacker(17,Zi(Int8Array)),n.addExtUnpacker(18,Zi(Uint8Array)),n.addExtUnpacker(19,[Hs,Zi(Int16Array)]),n.addExtUnpacker(20,[Hs,Zi(Uint16Array)]),n.addExtUnpacker(21,[Hs,Zi(Int32Array)]),n.addExtUnpacker(22,[Hs,Zi(Uint32Array)]),n.addExtUnpacker(23,[Hs,Zi(Float32Array)]),typeof Float64Array<"u"&&n.addExtUnpacker(24,[Hs,Zi(Float64Array)]),typeof Uint8ClampedArray<"u"&&n.addExtUnpacker(25,Zi(Uint8ClampedArray)),n.addExtUnpacker(26,Hs),n.addExtUnpacker(29,[Hs,Zi(DataView)])),MO.hasBuffer&&n.addExtUnpacker(27,Zi(Hue))}function Xn(n){return YC||(YC=WC().decode),YC(n)}function Wue(n){return RegExp.apply(null,n)}function ol(n){return function(e){var t=new n;for(var i in que)t[i]=e[i];return t}}function Zi(n){return function(e){return new n(e)}}function Hs(n){return new Uint8Array(n).buffer}});var $C=m(JC=>{var HO=MC(),qO=wm(),YO=qO.Uint64BE,WO=qO.Int64BE;JC.getReadFormat=$ue;JC.readUint8=ZO;var ZC=Ln(),Tm=bm(),Zue=typeof Map<"u",Jue=!0;function $ue(n){var e=ZC.hasArrayBuffer&&n&&n.binarraybuffer,t=n&&n.int64,i=Zue&&n&&n.usemap,r={map:i?Uue:Xue,array:Gue,str:Que,bin:e?zue:Kue,ext:Vue,uint8:ZO,uint16:tce,uint32:nce,uint64:Sm(8,t?ace:oce),int8:ece,int16:ice,int32:rce,int64:Sm(8,t?lce:sce),float32:Sm(4,uce),float64:Sm(8,cce)};return r}function Xue(n,e){var t={},i,r=new Array(e),o=new Array(e),s=n.codec.decode;for(i=0;i{var hce=$C();$O.getReadToken=dce;function dce(n){var e=hce.getReadFormat(n);return n&&n.useraw?gce(e):JO(e)}function JO(n){var e,t=new Array(256);for(e=0;e<=127;e++)t[e]=Pd(e);for(e=128;e<=143;e++)t[e]=Io(e-128,n.map);for(e=144;e<=159;e++)t[e]=Io(e-144,n.array);for(e=160;e<=191;e++)t[e]=Io(e-160,n.str);for(t[192]=Pd(null),t[193]=null,t[194]=Pd(!1),t[195]=Pd(!0),t[196]=Fn(n.uint8,n.bin),t[197]=Fn(n.uint16,n.bin),t[198]=Fn(n.uint32,n.bin),t[199]=Fn(n.uint8,n.ext),t[200]=Fn(n.uint16,n.ext),t[201]=Fn(n.uint32,n.ext),t[202]=n.float32,t[203]=n.float64,t[204]=n.uint8,t[205]=n.uint16,t[206]=n.uint32,t[207]=n.uint64,t[208]=n.int8,t[209]=n.int16,t[210]=n.int32,t[211]=n.int64,t[212]=Io(1,n.ext),t[213]=Io(2,n.ext),t[214]=Io(4,n.ext),t[215]=Io(8,n.ext),t[216]=Io(16,n.ext),t[217]=Fn(n.uint8,n.str),t[218]=Fn(n.uint16,n.str),t[219]=Fn(n.uint32,n.str),t[220]=Fn(n.uint16,n.array),t[221]=Fn(n.uint32,n.array),t[222]=Fn(n.uint16,n.map),t[223]=Fn(n.uint32,n.map),e=224;e<=255;e++)t[e]=Pd(e-256);return t}function gce(n){var e,t=JO(n).slice();for(t[217]=t[196],t[218]=t[197],t[219]=t[198],e=160;e<=191;e++)t[e]=Io(e-160,n.bin);return t}function Pd(n){return function(){return n}}function Fn(n,e){return function(t){var i=n(t);return e(t,i)}}function Io(n,e){return function(t){return e(t,n)}}});var km=m(GO=>{var fce=ym().ExtBuffer,pce=BO(),mce=$C().readUint8,bce=XO(),XC=kd();XC.install({addExtUnpacker:vce,getExtUnpacker:wce,init:UO});GO.preset=UO.call(XC.preset);function yce(n){var e=bce.getReadToken(n);return t;function t(i){var r=mce(i),o=e[r];if(!o)throw new Error("Invalid type: "+(r&&"0x"+r.toString(16)));return o(i)}}function UO(){var n=this.options;return this.decode=yce(n),n&&n.preset&&pce.setExtUnpackers(this),this}function vce(n,e){var t=this.extUnpackers||(this.extUnpackers=[]);t[n]=XC.filter(e)}function wce(n){var e=this.extUnpackers||(this.extUnpackers=[]);return e[n]||t;function t(i){return new fce(i,n)}}});var Em=m(QO=>{QO.DecodeBuffer=qu;var Dce=km().preset,xce=qC().FlexDecoder;xce.mixin(qu.prototype);function qu(n){if(!(this instanceof qu))return new qu(n);if(n&&(this.options=n,n.codec)){var e=this.codec=n.codec;e.bufferish&&(this.bufferish=e.bufferish)}}qu.prototype.codec=Dce;qu.prototype.fetch=function(){return this.codec.decode(this)}});var WC=m(KO=>{KO.decode=Sce;var Cce=Em().DecodeBuffer;function Sce(n,e){var t=new Cce(e);return t.write(n),t.read()}});var QC=m((pPe,GC)=>{function UC(){if(!(this instanceof UC))return new UC}(function(n){typeof GC<"u"&&(GC.exports=n);var e="listeners",t={on:r,once:o,off:s,emit:a};i(n.prototype),n.mixin=i;function i(u){for(var c in t)u[c]=t[c];return u}function r(u,c){return l(this,u).push(c),this}function o(u,c){var h=this;return d.originalListener=c,l(h,u).push(d),h;function d(){s.call(h,u,d),c.apply(this,arguments)}}function s(u,c){var h=this,d;if(!arguments.length)delete h[e];else if(c){if(d=l(h,u,!0),d){if(d=d.filter(g),!d.length)return s.call(h,u);h[e][u]=d}}else if(d=h[e],d&&(delete d[u],!Object.keys(d).length))return s.call(h);return h;function g(f){return f!==c&&f.originalListener!==c}}function a(u,c){var h=this,d=l(h,u,!0);if(!d)return!1;var g=arguments.length;if(g===1)d.forEach(p);else if(g===2)d.forEach(b);else{var f=Array.prototype.slice.call(arguments,1);d.forEach(v)}return!!d.length;function p(w){w.call(h)}function b(w){w.call(h,c)}function v(w){w.apply(h,f)}}function l(u,c,h){if(!(h&&!u[e])){var d=u[e]||(u[e]={});return d[c]||(d[c]=[])}}})(UC)});var eM=m(VO=>{VO.Encoder=sl;var Tce=QC(),zO=Cm().EncodeBuffer;function sl(n){if(!(this instanceof sl))return new sl(n);zO.call(this,n)}sl.prototype=new zO;Tce.mixin(sl.prototype);sl.prototype.encode=function(n){this.write(n),this.emit("data",this.read())};sl.prototype.end=function(n){arguments.length&&this.encode(n),this.flush(),this.emit("end")}});var nM=m(iM=>{iM.Decoder=qs;var kce=QC(),tM=Em().DecodeBuffer;function qs(n){if(!(this instanceof qs))return new qs(n);tM.call(this,n)}qs.prototype=new tM;kce.mixin(qs.prototype);qs.prototype.decode=function(n){arguments.length&&this.write(n),this.flush()};qs.prototype.push=function(n){this.emit("data",n)};qs.prototype.end=function(n){this.decode(n),this.emit("end")}});var sM=m(oM=>{oM.createEncodeStream=Yu;var Ece=require("util"),rM=require("stream").Transform,Pce=Cm().EncodeBuffer;Ece.inherits(Yu,rM);var _ce={objectMode:!0};function Yu(n){if(!(this instanceof Yu))return new Yu(n);n?n.objectMode=!0:n=_ce,rM.call(this,n);var e=this,t=this.encoder=new Pce(n);t.push=function(i){e.push(i)}}Yu.prototype._transform=function(n,e,t){this.encoder.write(n),t&&t()};Yu.prototype._flush=function(n){this.encoder.flush(),n&&n()}});var uM=m(lM=>{lM.createDecodeStream=_d;var Rce=require("util"),aM=require("stream").Transform,Lce=Em().DecodeBuffer;Rce.inherits(_d,aM);var Fce={objectMode:!0};function _d(n){if(!(this instanceof _d))return new _d(n);n?n.objectMode=!0:n=Fce,aM.call(this,n);var e=this,t=this.decoder=new Lce(n);t.push=function(i){e.push(i)}}_d.prototype._transform=function(n,e,t){this.decoder.write(n),this.decoder.flush(),t&&t()}});var hM=m(cM=>{km();xm();cM.createCodec=kd().createCodec});var gM=m(dM=>{km();xm();dM.codec={preset:kd().preset}});var fM=m(jo=>{jo.encode=AC().encode;jo.decode=WC().decode;jo.Encoder=eM().Encoder;jo.Decoder=nM().Decoder;jo.createEncodeStream=sM().createEncodeStream;jo.createDecodeStream=uM().createDecodeStream;jo.createCodec=hM().createCodec;jo.codec=gM().codec});var mM=m(KC=>{"use strict";Object.defineProperty(KC,"__esModule",{value:!0});var Ice=require("stream"),pM=class extends Ice.Transform{constructor(){super({readableHighWaterMark:10*1024*1024,writableHighWaterMark:10*1024*1024});this.chunks=null,this.timer=null}sendData(){let{chunks:e}=this;if(e){this.chunks=null;let t=Buffer.concat(e);this.push(t)}}_transform(e,t,i){let{chunks:r,timer:o}=this,s=Buffer.poolSize;if(o&&clearTimeout(o),e.length{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.BaseApi=void 0;var jce=require("events"),Ace=process.env.VIM_NODE_RPC=="1",bM=class extends jce.EventEmitter{constructor({transport:e,data:t,client:i}){super();this.setTransport(e),this.data=t,this.client=i}setTransport(e){this.transport=e}equals(e){try{return String(this.data)===String(e.data)}catch{return!1}}async request(e,t=[]){let i=Error().stack;return new Promise((r,o)=>{this.transport.request(e,this.getArgsByPrefix(t),(s,a)=>{if(s){let l=new Error(`${s[1].split(/\r?\n/)[0]}`);l.stack=`Error: request error on ${e} - ${s[1]}
-`+i.split(/\r?\n/).slice(3).join(`
-`),e.endsWith("get_var")||this.client.logError(`request error on "${e}"`,t,s[1],i),o(l)}else r(a)})})}getArgsByPrefix(e){return this.prefix!=="nvim_"&&e[0]!=this?[Ace?this.data:this,...e]:e}getVar(e){return this.request(`${this.prefix}get_var`,[e]).then(t=>t,t=>null)}setVar(e,t,i=!1){if(i){this.notify(`${this.prefix}set_var`,[e,t]);return}return this.request(`${this.prefix}set_var`,[e,t])}deleteVar(e){this.notify(`${this.prefix}del_var`,[e])}getOption(e){return this.request(`${this.prefix}get_option`,[e])}setOption(e,t,i){if(i){this.notify(`${this.prefix}set_option`,[e,t]);return}return this.request(`${this.prefix}set_option`,[e,t])}notify(e,t=[]){this.transport.notify(e,this.getArgsByPrefix(t))}};Pm.BaseApi=bM});var Ld=m(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.Buffer=void 0;var Oce=Rd(),yM=class extends Oce.BaseApi{constructor(){super(...arguments);this.prefix="nvim_buf_"}async attach(e=!1,t={}){return await this.request(`${this.prefix}attach`,[e,t])}async detach(){return await this.request(`${this.prefix}detach`,[])}get id(){return this.data}get length(){return this.request(`${this.prefix}line_count`,[])}get lines(){return this.getLines()}get changedtick(){return this.request(`${this.prefix}get_changedtick`,[])}get commands(){return this.getCommands()}getCommands(e={}){return this.request(`${this.prefix}get_commands`,[e])}getLines({start:e,end:t,strictIndexing:i}={start:0,end:-1,strictIndexing:!0}){let r=typeof i>"u"?!0:i;return this.request(`${this.prefix}get_lines`,[e,t,r])}setLines(e,t,i=!1){let{start:r,end:o,strictIndexing:s}=t!=null?t:{};r=r!=null?r:0,o=o!=null?o:r+1;let a=s!=null?s:!0;return this[i?"notify":"request"](`${this.prefix}set_lines`,[r,o,a,typeof e=="string"?[e]:e])}setVirtualText(e,t,i,r={}){return this.client.isVim?Promise.resolve(-1):(this.notify(`${this.prefix}set_virtual_text`,[e,t,i,r]),Promise.resolve(e))}deleteExtMark(e,t){this.client.isVim||this.notify(`${this.prefix}del_extmark`,[e,t])}async getExtMarkById(e,t,i={}){return this.client.isVim?Promise.resolve([]):this.request(`${this.prefix}get_extmark_by_id`,[e,t,i])}async getExtMarks(e,t,i,r={}){return this.client.isVim?Promise.resolve([]):this.request(`${this.prefix}get_extmarks`,[e,t,i,r])}setExtMark(e,t,i,r={}){this.client.isVim||this.notify(`${this.prefix}set_extmark`,[e,t,i,r])}insert(e,t){return this.setLines(e,{start:t,end:t,strictIndexing:!0})}replace(e,t){let i=typeof e=="string"?[e]:e;return this.setLines(i,{start:t,end:t+i.length,strictIndexing:!1})}remove(e,t,i=!1){return this.setLines([],{start:e,end:t,strictIndexing:i})}append(e){return this.setLines(e,{start:-1,end:-1,strictIndexing:!1})}get name(){return this.request(`${this.prefix}get_name`,[])}setName(e){return this.request(`${this.prefix}set_name`,[e])}get valid(){return this.request(`${this.prefix}is_valid`,[])}mark(e){return this.request(`${this.prefix}get_mark`,[e])}getKeymap(e){return this.request(`${this.prefix}get_keymap`,[e])}setKeymap(e,t,i,r={}){this.client.call("coc#compat#buf_add_keymap",[this.id,e,t,i,r],!0)}get loaded(){return this.request(`${this.prefix}is_loaded`,[])}getOffset(e){return this.request(`${this.prefix}get_offset`,[e])}addHighlight({hlGroup:e,line:t,colStart:i,colEnd:r,srcId:o}){if(!e)throw new Error("hlGroup should not empty");let s=typeof r<"u"?r:-1,a=typeof i<"u"?i:-0,l=typeof o<"u"?o:-1,u=l==0?"request":"notify",c=this[u](`${this.prefix}add_highlight`,[l,e,t,a,s]);return u==="request"?c:Promise.resolve(null)}clearHighlight(e={}){let t={srcId:-1,lineStart:0,lineEnd:-1},{srcId:i,lineStart:r,lineEnd:o}=Object.assign({},t,e);return this.notify(`${this.prefix}clear_highlight`,[i,r,o])}highlightRanges(e,t,i){this.client.call("coc#highlight#ranges",[this.id,e,t,i],!0)}clearNamespace(e,t=0,i=-1){this.client.call("coc#highlight#clear_highlight",[this.id,e,t,i],!0)}placeSign(e){let t={lnum:e.lnum};typeof e.priority=="number"&&(t.priority=e.priority),this.client.call("sign_place",[e.id||0,e.group||"",e.name,this.id,t],!0)}unplaceSign(e){let t={buffer:this.id};e.id!=null&&(t.id=e.id),this.client.call("sign_unplace",[e.group||"",t],!0)}async getSigns(e){return(await this.client.call("sign_getplaced",[this.id,e||{}]))[0].signs}async getHighlights(e,t=0,i=-1){let r=[],o=await this.client.call("coc#highlight#get_highlights",[this.id,e,t,i]);for(let s of o)r.push({hlGroup:s[0],lnum:s[1],colStart:s[2],colEnd:s[3],id:s[4]});return r}updateHighlights(e,t,i={}){if(typeof i=="number"){this.client.logError("Bad option for buffer.updateHighlights()",new Error().stack);return}let r=typeof i.start=="number"?i.start:0,o=typeof i.end=="number"?i.end:-1,s=typeof i.changedtick=="number"?i.changedtick:null,a=typeof i.priority=="number"?i.priority:null;if(r==0&&o==-1){let l=t.map(u=>[u.hlGroup,u.lnum,u.colStart,u.colEnd,u.combine===!1?0:1,u.start_incl?1:0,u.end_incl?1:0]);this.client.call("coc#highlight#buffer_update",[this.id,e,l,a,s],!0);return}this.client.call("coc#highlight#update_highlights",[this.id,e,t,r,o,a,s],!0)}listen(e,t,i){this.client.attachBufferEvent(this,e,t),i&&i.push({dispose:()=>{this.client.detachBufferEvent(this,e,t)}})}};_m.Buffer=yM});var Fd=m(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.Window=void 0;var Mce=Rd(),zC=require("timers"),vM=class extends Mce.BaseApi{constructor(){super(...arguments);this.prefix="nvim_win_"}get id(){return this.data}get buffer(){return this.request(`${this.prefix}get_buf`,[])}get tabpage(){return this.request(`${this.prefix}get_tabpage`,[])}get cursor(){return this.request(`${this.prefix}get_cursor`,[])}setCursor(e,t=!1){return this[t?"notify":"request"](`${this.prefix}set_cursor`,[e])}get height(){return this.request(`${this.prefix}get_height`,[])}setHeight(e,t=!1){return this[t?"notify":"request"](`${this.prefix}set_height`,[e])}get width(){return this.request(`${this.prefix}get_width`,[])}setWidth(e,t=!1){return this[t?"notify":"request"](`${this.prefix}set_height`,[e])}get position(){return this.request(`${this.prefix}get_position`,[])}get row(){return this.request(`${this.prefix}get_position`,[]).then(e=>e[0])}get col(){return this.request(`${this.prefix}get_position`,[]).then(e=>e[1])}get valid(){return this.request(`${this.prefix}is_valid`,[])}get number(){return this.request(`${this.prefix}get_number`,[])}setConfig(e,t){return this[t?"notify":"request"](`${this.prefix}set_config`,[e])}getConfig(){return this.request(`${this.prefix}get_config`,[])}close(e,t){if(t){this.notify(`${this.prefix}close`,[e]);let i=0,r=setInterval(()=>{if(i==5)return(0,zC.clearInterval)(r);this.request(`${this.prefix}is_valid`,[]).then(o=>{o?this.notify(`${this.prefix}close`,[e]):(0,zC.clearInterval)(r)},()=>{(0,zC.clearInterval)(r)}),i++},50);return null}return this.request(`${this.prefix}close`,[e])}highlightRanges(e,t,i=10,r){if(r){this.client.call("coc#highlight#match_ranges",[this.id,0,t,e,i],!0);return}return this.client.call("coc#highlight#match_ranges",[this.id,0,t,e,i])}clearMatchGroup(e){this.client.call("coc#highlight#clear_match_group",[this.id,e],!0)}clearMatches(e){this.client.call("coc#highlight#clear_matches",[this.id,e],!0)}};Rm.Window=vM});var Id=m(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.Tabpage=void 0;var Nce=Rd(),wM=class extends Nce.BaseApi{constructor(){super(...arguments);this.prefix="nvim_tabpage_"}get windows(){return this.request(`${this.prefix}list_wins`,[])}get window(){return this.request(`${this.prefix}get_win`,[])}get valid(){return this.request(`${this.prefix}is_valid`,[])}get number(){return this.request(`${this.prefix}get_number`,[])}getOption(){throw new Error("Tabpage does not have `getOption`")}setOption(){throw new Error("Tabpage does not have `setOption`")}};Lm.Tabpage=wM});var DM=m(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.Metadata=al.ExtType=void 0;var Bce=Ld(),Hce=Fd(),qce=Id(),Yce;(function(n){n[n.Buffer=0]="Buffer",n[n.Window=1]="Window",n[n.Tabpage=2]="Tabpage"})(Yce=al.ExtType||(al.ExtType={}));al.Metadata=[{constructor:Bce.Buffer,name:"Buffer",prefix:"nvim_buf_"},{constructor:Hce.Window,name:"Window",prefix:"nvim_win_"},{constructor:qce.Tabpage,name:"Tabpage",prefix:"nvim_tabpage_"}]});var Wu=m(Ys=>{"use strict";var nS=Ys&&Ys.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.createLogger=Ys.nullLogger=void 0;var VC=nS(require("fs")),Wce=nS(require("os")),eS=nS(require("path"));Ys.nullLogger={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},trace:()=>{}};function Zce(){let n=process.env.NODE_CLIENT_LOG_FILE;if(n)return n;let e=process.env.XDG_RUNTIME_DIR;return e?eS.default.join(e,"node-client.log"):eS.default.join(Wce.default.tmpdir(),`node-client-${process.pid}.log`)}var tS=Zce(),xM=process.env.NODE_CLIENT_LOG_LEVEL||"info",iS=process.getuid&&process.getuid()==0;if(!iS)try{VC.default.mkdirSync(eS.default.dirname(tS),{recursive:!0}),VC.default.writeFileSync(tS,"",{encoding:"utf8",mode:438})}catch{iS=!0}function CM(n){return n==null?n:Array.isArray(n)?n.map(e=>CM(e)):typeof n=="object"&&typeof n.prefix=="string"&&typeof n.data=="number"?"["+n.prefix+n.data+"]":n}function Jce(n){return n==null?String(n):typeof n=="object"?JSON.stringify(n,null,2):String(n)}function $ce(n){return`${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}.${n.getMilliseconds()}`}var SM=class{constructor(e){this.name=e}get stream(){return iS?null:this._stream?this._stream:(this._stream=VC.default.createWriteStream(tS,{encoding:"utf8"}),this._stream)}getText(e,t,i){let r="";if(i.length){let o=CM(i);r=" "+o.map(s=>Jce(s))}return`${$ce(new Date)} ${e.toUpperCase()} [${this.name}] - ${t}${r}
-`}debug(e,...t){xM!="debug"||this.stream==null||this.stream.write(this.getText("debug",e,t))}info(e,...t){this.stream!=null&&this.stream.write(this.getText("info",e,t))}warn(e,...t){this.stream!=null&&this.stream.write(this.getText("warn",e,t))}error(e,...t){this.stream!=null&&this.stream.write(this.getText("error",e,t))}trace(e,...t){xM!="trace"||this.stream==null||this.stream.write(this.getText("trace",e,t))}};function Xce(n){return new SM(n)}Ys.createLogger=Xce});var oS=m(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});var Uce=require("events"),Gce=Wu(),TM=process.env.NODE_CLIENT_LOG_LEVEL=="debug",jd=(0,Gce.createLogger)("transport"),kM=class extends Uce.EventEmitter{constructor(e){super();this.logger=e,this.pauseLevel=0,this.paused=new Map}debug(e,...t){!TM||jd.debug(e,...t)}info(e,...t){jd.info(e,...t)}debugMessage(e){if(!TM)return;let t=e[0];t==0?jd.debug("receive request:",e.slice(1)):t==1||(t==2?jd.debug("receive notification:",e.slice(1)):jd.debug("unknown message:",e))}pauseNotification(){this.pauseLevel=this.pauseLevel+1,this.paused.set(this.pauseLevel,[])}cancelNotification(){let{pauseLevel:e}=this;e>0&&(this.paused.delete(e),this.pauseLevel=e-1)}resumeNotification(e=!1){let{pauseLevel:t}=this;if(t==0)return e?null:Promise.resolve([[],null]);let i=Error().stack;this.pauseLevel=t-1;let r=this.paused.get(t);return this.paused.delete(t),r&&r.length?new Promise((o,s)=>{if(!e)return this.request("nvim_call_atomic",[r],(a,l)=>{if(a){let u=new Error(`call_atomic error: ${a[1]}`);return u.stack=i,s(u)}if(Array.isArray(l)&&l[1]!=null){let[u,c,h]=l[1],[d,g]=r[u],f=new Error(`call_atomic request error on "${d}": ${h}`);return f.stack=i,this.logger.error(`call_atomic request error ${c} on "${d}"`,g,h,i),s(f)}o(l)});this.notify("nvim_call_atomic",[r]),o(void 0)}):e?null:Promise.resolve([[],void 0])}};rS.default=kM});var _M=m(Un=>{"use strict";var Qce=Un&&Un.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),Kce=Un&&Un.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),zce=Un&&Un.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&Qce(e,n,t);return Kce(e,n),e},EM=Un&&Un.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Un,"__esModule",{value:!0});Un.NvimTransport=void 0;var Ao=zce(fM()),Vce=EM(mM()),ehe=DM(),the=EM(oS()),PM=class extends the.default{constructor(e){super(e);this.pending=new Map,this.nextRequestId=1,this.attached=!1;let t=this.setupCodec();this.encodeStream=Ao.createEncodeStream({codec:t}),this.decodeStream=Ao.createDecodeStream({codec:t}),this.decodeStream.on("data",i=>{this.parseMessage(i)}),this.decodeStream.on("end",()=>{this.detach(),this.emit("detach")})}parseMessage(e){let t=e[0];if(this.debugMessage(e),t===0)this.emit("request",e[2].toString(),e[3],this.createResponse(e[1]));else if(t===1){let i=e[1],r=this.pending.get(i);if(r){this.pending.delete(i);let o=e[2];o&&o.length!=2&&(o=[0,o instanceof Error?o.message:o]),r(o,e[3])}}else t===2?this.emit("notification",e[1].toString(),e[2]):console.error(`Invalid message type ${t}`)}setupCodec(){let e=Ao.createCodec();return ehe.Metadata.forEach(({constructor:t},i)=>{e.addExtPacker(i,t,r=>Ao.encode(r.data)),e.addExtUnpacker(i,r=>new t({transport:this,client:this.client,data:Ao.decode(r)}))}),this.codec=e,this.codec}attach(e,t,i){this.encodeStream=this.encodeStream.pipe(e);let r=new Vce.default;t.pipe(r).pipe(this.decodeStream),this.writer=e,this.reader=t,this.client=i,this.attached=!0}detach(){!this.attached||(this.attached=!1,this.encodeStream.unpipe(this.writer),this.reader.unpipe(this.decodeStream))}request(e,t,i){if(!this.attached)return;let r=this.nextRequestId;this.nextRequestId=this.nextRequestId+1;let o=Date.now();this.debug("request to nvim:",r,e,t),this.encodeStream.write(Ao.encode([0,r,e,t],{codec:this.codec}));let s=Error().stack,a=setTimeout(()=>{this.debug(`request to vim blocked more than 1s: ${e}`,t,s)},1e3);this.pending.set(r,(l,u)=>{clearTimeout(a),this.debug("response of nvim:",r,`${Date.now()-o}ms`,u,l),i(l,u)})}notify(e,t){if(!!this.attached){if(this.pauseLevel!=0){let i=this.paused.get(this.pauseLevel);if(i){i.push([e,t]);return}}this.debug("nvim notification:",e,t),this.encodeStream.write(Ao.encode([2,e,t],{codec:this.codec}))}}send(e){this.encodeStream.write(Ao.encode(e,{codec:this.codec}))}createResponse(e){let{encodeStream:t}=this,i=Date.now(),r=!1,o=setTimeout(()=>{this.debug("request to client cost more than 1s",e)},1e3);return{send:(s,a)=>{clearTimeout(o),!(r||!this.attached)&&(this.debug("response of client:",e,`${Date.now()-i}ms`,s,a==!0),r=!0,t.write(Ao.encode([1,e,a?s:null,a?null:s])))}}}};Un.NvimTransport=PM});var FM=m(Ad=>{"use strict";var RM=Ad&&Ad.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ad,"__esModule",{value:!0});var ihe=RM(require("events")),nhe=RM(require("readline")),rhe=Wu(),Zu=(0,rhe.createLogger)("connection"),LM=class extends ihe.default{constructor(e,t){super();this.readable=e,this.writeable=t;let i=nhe.default.createInterface(this.readable);i.on("line",r=>{this.parseData(r)}),i.on("close",()=>{Zu.error("connection closed"),process.exit(0)})}parseData(e){if(e.length==0)return;let t;try{t=JSON.parse(e)}catch{console.error(`Invalid data from vim: ${e}`);return}let[i,r]=t;i>0?(Zu.debug("received request:",i,r),this.emit("request",i,r)):i==0?(Zu.debug("received notification:",r),this.emit("notification",r)):(Zu.debug("received response:",i,r),this.emit("response",i,r))}response(e,t){this.send([e,t||null])}notify(e,t){this.send([0,[e,t||null]])}send(e){Zu.debug("send to vim:",e);try{this.writeable.write(JSON.stringify(e)+`
-`)}catch{Zu.error("Send error:",e)}}redraw(e){this.send(["redraw",e?"force":""])}command(e){this.send(["ex",e])}expr(e){this.send(["expr",e])}call(e,t,i){if(!i){this.send(["call",e,t]);return}this.send(["call",e,t,i])}dispose(){this.removeAllListeners()}};Ad.default=LM});var jM=m(sS=>{"use strict";Object.defineProperty(sS,"__esModule",{value:!0});var ohe=Wu(),IPe=(0,ohe.createLogger)("request"),she=process.env.COC_NVIM=="1"?"coc#api#call":"nvim#api#call",IM=class{constructor(e,t,i){this.connection=e,this.cb=t,this.id=i}request(e,t=[]){this.method=e,this.connection.call(she,[e.slice(5),t],this.id)}callback(e,t,i){let{method:r,cb:o}=this;if(t)return o([0,t.toString()]);switch(r){case"nvim_list_wins":case"nvim_tabpage_list_wins":return o(null,i.map(s=>e.createWindow(s)));case"nvim_tabpage_get_win":case"nvim_get_current_win":case"nvim_open_win":return o(null,e.createWindow(i));case"nvim_list_bufs":return o(null,i.map(s=>e.createBuffer(s)));case"nvim_win_get_buf":case"nvim_create_buf":case"nvim_get_current_buf":return o(null,e.createBuffer(i));case"nvim_list_tabpages":return o(null,i.map(s=>e.createTabpage(s)));case"nvim_get_current_tabpage":return o(null,e.createTabpage(i));default:return o(null,i)}}};sS.default=IM});var OM=m(Ju=>{"use strict";var aS=Ju&&Ju.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ju,"__esModule",{value:!0});Ju.VimTransport=void 0;var ahe=aS(oS()),lhe=aS(FM()),uhe=aS(jM()),AM=class extends ahe.default{constructor(e){super(e);this.pending=new Map,this.nextRequestId=-1,this.attached=!1,this.errText="",this.outText="",this.notifyMethod=process.env.COC_NVIM=="1"?"coc#api#notify":"nvim#api#notify"}attach(e,t,i){let r=this.connection=new lhe.default(t,e);this.attached=!0,this.client=i,r.on("request",(o,s)=>{let[a,l]=s;this.emit("request",a,l,this.createResponse(o))}),r.on("notification",o=>{let[s,a]=o;this.emit("notification",s.toString(),a)}),r.on("response",(o,s)=>{let a=this.pending.get(o);if(a){this.pending.delete(o);let l=null,u=null;Array.isArray(s)?(l=s[0],u=s[1]):l=s,a.callback(this.client,l,u)}})}send(e){this.connection.send(e)}detach(){!this.attached||(this.attached=!1,this.connection.dispose())}request(e,t,i){if(!this.attached)return i([0,"transport disconnected"]);let r=this.nextRequestId;this.nextRequestId=this.nextRequestId-1;let o=Date.now();this.debug("request to vim:",r,e,t);let s=setTimeout(()=>{this.debug("request to vim cost more than 1s",e,t)},1e3),a=new uhe.default(this.connection,(l,u)=>{clearTimeout(s),this.debug("response from vim cost:",r,`${Date.now()-o}ms`),i(l,u)},r);this.pending.set(r,a),a.request(e,t)}notify(e,t){if(!this.attached)return;if(this.pauseLevel!=0){let r=this.paused.get(this.pauseLevel);if(r){r.push([e,t]);return}}let i=e.slice(5);if(i=="err_write"){this.errText=this.errText+t[0].toString();return}if(i=="out_write"){let r=t[0].toString()||"";if(!r.includes(`
-`))this.outText=this.outText+r;else{let o=this.outText+t[0].toString();this.outText="",this.connection.call(this.notifyMethod,[i,[o]])}return}if(i=="err_writeln"){let r=this.errText+t[0].toString();this.errText="",this.connection.call(this.notifyMethod,[i,[r]]);return}this.connection.call(this.notifyMethod,[i,t])}createResponse(e){let t=!1,{connection:i}=this,r=Date.now(),o=setTimeout(()=>{this.debug("request to client cost more than 1s",e)},1e3);return{send:(s,a)=>{if(clearTimeout(o),t||!this.attached)return;t=!0;let l=null;a&&(l=typeof s=="string"?s:s.toString()),this.debug("response of client cost:",e,`${Date.now()-r}ms`),i.response(e,[l,a?null:s])}}}};Ju.VimTransport=AM});var NM=m(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.Neovim=void 0;var che=Rd(),hhe=Ld(),dhe=Id(),ghe=Fd(),fhe=process.env.VIM_NODE_RPC=="1",MM=class extends che.BaseApi{constructor(){super(...arguments);this.prefix="nvim_",this.Buffer=hhe.Buffer,this.Window=ghe.Window,this.Tabpage=dhe.Tabpage}getArgs(e){return e?Array.isArray(e)?e:[e]:[]}get apiInfo(){return this.request(`${this.prefix}get_api_info`)}get buffers(){return this.request(`${this.prefix}list_bufs`)}get buffer(){return this.request(`${this.prefix}get_current_buf`)}async setBuffer(e){await this.request(`${this.prefix}set_current_buf`,[e])}get chans(){return this.request(`${this.prefix}list_chans`)}getChanInfo(e){return this.request(`${this.prefix}get_chan_info`,[e])}createNamespace(e=""){return process.env.COC_NVIM=="1"?(e=e.startsWith("coc-")?e.slice(4):e,this.request(`${this.prefix}call_function`,["coc#highlight#create_namespace",[e]])):this.request(`${this.prefix}create_namespace`,[e])}get namespaces(){return this.request(`${this.prefix}get_namespaces`,[])}get commands(){return this.getCommands()}getCommands(e={}){return this.request(`${this.prefix}get_commands`,[e])}get tabpages(){return this.request(`${this.prefix}list_tabpages`)}get tabpage(){return this.request(`${this.prefix}get_current_tabpage`)}async setTabpage(e){await this.request(`${this.prefix}set_current_tabpage`,[e])}get windows(){return this.getWindows()}get window(){return this.request(`${this.prefix}get_current_win`)}getWindows(){return this.request(`${this.prefix}list_wins`)}async setWindow(e){await this.request(`${this.prefix}set_current_win`,[e])}get runtimePaths(){return this.request(`${this.prefix}list_runtime_paths`)}setDirectory(e){return this.request(`${this.prefix}set_current_dir`,[e])}get line(){return this.getLine()}createNewBuffer(e=!1,t=!1){return this.request(`${this.prefix}create_buf`,[e,t])}openFloatWindow(e,t,i){return this.request(`${this.prefix}open_win`,[e,t,i])}getLine(){return this.request(`${this.prefix}get_current_line`)}setLine(e){return this.request(`${this.prefix}set_current_line`,[e])}getKeymap(e){return this.request(`${this.prefix}get_keymap`,[e])}get mode(){return this.request(`${this.prefix}get_mode`)}get colorMap(){return this.request(`${this.prefix}get_color_map`)}getColorByName(e){return this.request(`${this.prefix}get_color_by_name`,[e])}getHighlight(e,t=!0){let i=typeof e=="string"?"by_name":"by_id";return this.request(`${this.prefix}get_hl_${i}`,[e,t])}getHighlightByName(e,t=!0){return this.request(`${this.prefix}get_hl_by_name`,[e,t])}getHighlightById(e,t=!0){return this.request(`${this.prefix}get_hl_by_id`,[e,t])}deleteCurrentLine(){return this.request(`${this.prefix}del_current_line`)}eval(e){return this.request(`${this.prefix}eval`,[e])}lua(e,t=[]){return this.request(`${this.prefix}exec_lua`,[e,t])}executeLua(e,t=[]){let i=this.getArgs(t);return this.lua(e,i)}callDictFunction(e,t,i=[]){let r=this.getArgs(i);return this.request(`${this.prefix}call_dict_function`,[e,t,r])}call(e,t=[],i){let r=this.getArgs(t);return i?(this.notify(`${this.prefix}call_function`,[e,r]),null):this.request(`${this.prefix}call_function`,[e,r])}callTimer(e,t=[],i){let r=this.getArgs(t);return i?(this.notify(`${this.prefix}call_function`,["coc#util#timer",[e,r]]),null):fhe?(this.notify(`${this.prefix}call_function`,["coc#util#timer",[e,r]]),new Promise(o=>{setTimeout(()=>{o(null)},20)})):this.request(`${this.prefix}call_function`,["coc#util#timer",[e,r]])}callAsync(e,t=[]){let i=this.getArgs(t);return this.client.sendAsyncRequest(e,i)}callFunction(e,t=[]){return this.call(e,t)}callAtomic(e){return this.request(`${this.prefix}call_atomic`,[e])}command(e,t){return t?(this.notify(`${this.prefix}command`,[e]),null):this.request(`${this.prefix}command`,[e])}commandOutput(e){return this.request(`${this.prefix}command_output`,[e])}exec(e,t=!1){return this.request(`${this.prefix}exec`,[e,t])}getVvar(e){return this.request(`${this.prefix}get_vvar`,[e])}feedKeys(e,t,i){return this.request(`${this.prefix}feedkeys`,[e,t,i])}input(e){return this.request(`${this.prefix}input`,[e])}parseExpression(e,t,i){return this.request(`${this.prefix}parse_expression`,[e,t,i])}getProc(e){return this.request(`${this.prefix}get_proc`,[e])}getProcChildren(e){return this.request(`${this.prefix}get_proc_children`,[e])}replaceTermcodes(e,t,i,r){return this.request(`${this.prefix}replace_termcodes`,[e,t,i,r])}strWidth(e){return this.request(`${this.prefix}strwidth`,[e])}outWrite(e){this.notify(`${this.prefix}out_write`,[e])}outWriteLine(e){this.outWrite(`${e}
-`)}errWrite(e){this.notify(`${this.prefix}err_write`,[e])}errWriteLine(e){this.notify(`${this.prefix}err_writeln`,[e])}get uis(){return this.request(`${this.prefix}list_uis`)}uiAttach(e,t,i){return this.request(`${this.prefix}ui_attach`,[e,t,i])}uiDetach(){return this.request(`${this.prefix}ui_detach`,[])}uiTryResize(e,t){return this.request(`${this.prefix}ui_try_resize`,[e,t])}uiSetOption(e,t){return this.request(`${this.prefix}ui_set_option`,[e,t])}subscribe(e){return this.request(`${this.prefix}subscribe`,[e])}unsubscribe(e){return this.request(`${this.prefix}unsubscribe`,[e])}setClientInfo(e,t,i,r,o){this.notify(`${this.prefix}set_client_info`,[e,t,i,r,o])}async quit(){this.command("qa!",!0),this.transport&&this.transport.detach()}};Fm.Neovim=MM});var jm=m($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.NeovimClient=$u.AsyncResponse=void 0;var phe=_M(),mhe=OM(),bhe=NM(),yhe=Ld(),vhe=Fd(),whe=Id(),Dhe=Wu(),BM=(0,Dhe.createLogger)("client"),Im=process.env.VIM_NODE_RPC=="1",lS=class{constructor(e,t){this.requestId=e,this.cb=t,this.finished=!1}finish(e,t){if(!this.finished){if(this.finished=!0,e){this.cb(new Error(e));return}this.cb(null,t)}}};$u.AsyncResponse=lS;var HM=class extends bhe.Neovim{constructor(e){super({});this.logger=e,this.requestId=1,this.responses=new Map,this.attachedBuffers=new Map,this.isVim=Im,Object.defineProperty(this,"client",{value:this});let t=Im?new mhe.VimTransport(e):new phe.NvimTransport(e);this.setTransport(t),this.transportAttached=!1,this.handleRequest=this.handleRequest.bind(this),this.handleNotification=this.handleNotification.bind(this)}echoError(e){let t=process.env.COC_NVIM=="1"?"[coc.nvim] ":"";e instanceof Error?(this.errWriteLine(t+e.message+" use :CocOpenLog for details"),this.logError(e.message||"Unknown error",e.stack)):(this.errWriteLine(t+e),this.logError(e.toString(),Error().stack))}logError(e,...t){!this.logger||this.logger.error(e,...t)}createBuffer(e){return new yhe.Buffer({transport:this.transport,data:e,client:this})}createWindow(e){return new vhe.Window({transport:this.transport,data:e,client:this})}createTabpage(e){return new whe.Tabpage({transport:this.transport,data:e,client:this})}send(e){this.transport.send(e)}redrawVim(e){!Im||this.transport.notify("nvim_command",["redraw"+(e?"!":"")])}attach({reader:e,writer:t},i=!0){this.transport.attach(t,e,this),this.transportAttached=!0,this.setupTransport(i)}detach(){this.transport.detach(),this.transportAttached=!1}get isApiReady(){return this.transportAttached&&typeof this._channelId<"u"}get channelId(){return this._isReady.then(()=>this._channelId)}isAttached(e){return this.attachedBuffers.has(e)}handleRequest(e,t,i){this.emit("request",e,t,i)}sendAsyncRequest(e,t){let i=this.requestId;return this.requestId=i+1,this.notify("nvim_call_function",["coc#rpc#async_request",[i,e,t||[]]]),new Promise((r,o)=>{let s=new lS(i,(a,l)=>{if(a)return o(a);r(l)});this.responses.set(i,s)})}emitNotification(e,t){if(e.endsWith("_event")){if(e.startsWith("nvim_buf_")){let i=e.replace(/nvim_buf_(.*)_event/,"$1"),{id:r}=t[0];if(!this.attachedBuffers.has(r))return;(this.attachedBuffers.get(r).get(i)||[]).forEach(a=>a(...t)),i==="detach"&&this.attachedBuffers.delete(r);return}if(e.startsWith("nvim_async_request")){let[i,r,o]=t;this.handleRequest(r,o,{send:(s,a)=>{this.notify("nvim_call_function",["coc#rpc#async_response",[i,s,a]])}});return}if(e.startsWith("nvim_async_response")){let[i,r,o]=t,s=this.responses.get(i);if(!s){console.error(`Response not found for request ${i}`);return}this.responses.delete(i),s.finish(r,o);return}if(e==="nvim_error_event"){this.logger.error("Error event from nvim:",t[0],t[1]);return}this.logger.debug(`Unhandled event: ${e}`,t)}else this.emit("notification",e,t)}handleNotification(e,t){this.emitNotification(e,t)}setupTransport(e=!0){if(!this.transportAttached)throw new Error("Not attached to input/output");this.transport.on("request",this.handleRequest),this.transport.on("notification",this.handleNotification),this.transport.on("detach",()=>{this.emit("disconnect"),this.transport.removeAllListeners("request"),this.transport.removeAllListeners("notification"),this.transport.removeAllListeners("detach")}),e?this._isReady=this.generateApi():(this._channelId=0,this._isReady=Promise.resolve(!0))}requestApi(){return new Promise((e,t)=>{this.transport.request("nvim_get_api_info",[],(i,r)=>{i?t(new Error(Array.isArray(i)?i[1]:i.message||i.toString())):e(r)})})}async generateApi(){let e;try{e=await this.requestApi()}catch(t){console.error("Could not get vim api results"),BM.error(t)}if(e)try{let[t,i]=e;return this.functions=i.functions.map(r=>r.name),this._channelId=t,!0}catch(t){return BM.error(t.stack),null}return null}attachBufferEvent(e,t,i){let r=this.attachedBuffers.get(e.id)||new Map,o=r.get(t)||[];o.includes(i)||(o.push(i),r.set(t,o),this.attachedBuffers.set(e.id,r))}detachBufferEvent(e,t,i){let r=this.attachedBuffers.get(e.id);if(!r||!r.has(t))return;let o=r.get(t).filter(s=>s!==i);r.set(t,o)}pauseNotification(){let e=Error().stack;this.transport.pauseLevel!=0&&this.logError("Nested nvim.pauseNotification() detected, please avoid it:",e),this.transport.pauseNotification(),process.nextTick(()=>{this.transport.pauseLevel>0&&this.logError("resumeNotification not called within same tick:",e)})}resumeNotification(e,t){return Im&&e&&this.transport.notify("nvim_command",["redraw"]),t?(this.transport.resumeNotification(!0),Promise.resolve(null)):this.transport.resumeNotification()}hasFunction(e){return this.functions?this.functions.includes(e):!0}};$u.NeovimClient=HM});var qM=m(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.attach=void 0;var xhe=require("net"),Che=jm(),She=Wu();function The({reader:n,writer:e,proc:t,socket:i},r=null,o=!0){let s,a,l;if(r||(r=She.nullLogger),i){let u=(0,xhe.createConnection)(i);s=u,a=u,u.once("close",()=>{l.detach()})}else n&&e?(s=e,a=n):t&&(s=t.stdin,a=t.stdout,t.once("disconnect",()=>{l.detach()}));if(s.on("error",u=>{u.code=="EPIPE"&&l.detach()}),s&&a)return l=new Che.NeovimClient(r),l.attach({writer:s,reader:a},o),l;throw new Error("Invalid arguments, could not attach")}Am.attach=The});var YM=m(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.Tabpage=Gn.Window=Gn.Buffer=Gn.NeovimClient=Gn.Neovim=void 0;var khe=jm();Object.defineProperty(Gn,"Neovim",{enumerable:!0,get:function(){return khe.NeovimClient}});var Ehe=jm();Object.defineProperty(Gn,"NeovimClient",{enumerable:!0,get:function(){return Ehe.NeovimClient}});var Phe=Ld();Object.defineProperty(Gn,"Buffer",{enumerable:!0,get:function(){return Phe.Buffer}});var _he=Fd();Object.defineProperty(Gn,"Window",{enumerable:!0,get:function(){return _he.Window}});var Rhe=Id();Object.defineProperty(Gn,"Tabpage",{enumerable:!0,get:function(){return Rhe.Tabpage}})});var WM=m(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.Window=an.Tabpage=an.Buffer=an.NeovimClient=an.Neovim=an.attach=void 0;var Lhe=qM();Object.defineProperty(an,"attach",{enumerable:!0,get:function(){return Lhe.attach}});var Od=YM();Object.defineProperty(an,"Neovim",{enumerable:!0,get:function(){return Od.Neovim}});Object.defineProperty(an,"NeovimClient",{enumerable:!0,get:function(){return Od.NeovimClient}});Object.defineProperty(an,"Buffer",{enumerable:!0,get:function(){return Od.Buffer}});Object.defineProperty(an,"Tabpage",{enumerable:!0,get:function(){return Od.Tabpage}});Object.defineProperty(an,"Window",{enumerable:!0,get:function(){return Od.Window}})});var Oo=m(hS=>{"use strict";Object.defineProperty(hS,"__esModule",{value:!0});var uS;function cS(){if(uS===void 0)throw new Error("No runtime abstraction layer installed");return uS}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");uS=t}n.install=e})(cS||(cS={}));hS.default=cS});var dS=m(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.Disposable=void 0;var Fhe;(function(n){function e(t){return{dispose:t}}n.create=e})(Fhe=Md.Disposable||(Md.Disposable={}))});var JM=m(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.AbstractMessageBuffer=void 0;var Ihe=13,jhe=10,Ahe=`\r
-`,ZM=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(this._chunks.length===0)return;let e=0,t=0,i=0,r=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),i=0,r=0;for(;e>0;){let o=this._chunks[r];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,i),i+=e,this._chunks[r]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,i),i+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};Om.AbstractMessageBuffer=ZM});var QM=m(fS=>{"use strict";Object.defineProperty(fS,"__esModule",{value:!0});var Ohe=Oo(),$M=require("util"),ll=dS(),Mhe=JM(),Nd=class extends Mhe.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return Nd.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new $M.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}};Nd.emptyBuffer=Buffer.allocUnsafe(0);var XM=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),ll.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),ll.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),ll.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),ll.Disposable.create(()=>this.stream.off("data",e))}},UM=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),ll.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),ll.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),ll.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((i,r)=>{let o=s=>{s==null?i():r(s)};typeof e=="string"?this.stream.write(e,t,o):this.stream.write(e,o)})}end(){this.stream.end()}},GM=Object.freeze({messageBuffer:Object.freeze({create:n=>new Nd(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(n,void 0,0),e.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{try{return n instanceof Buffer?Promise.resolve(JSON.parse(n.toString(e.charset))):Promise.resolve(JSON.parse(new $M.TextDecoder(e.charset).decode(n)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:n=>new XM(n),asWritableStream:n=>new UM(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){return setTimeout(n,e,...t)},clearTimeout(n){clearTimeout(n)},setImmediate(n,...e){return setImmediate(n,...e)},clearImmediate(n){clearImmediate(n)}})});function gS(){return GM}(function(n){function e(){Ohe.default.install(GM)}n.install=e})(gS||(gS={}));fS.default=gS});var Xu=m(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.stringArray=ki.array=ki.func=ki.error=ki.number=ki.string=ki.boolean=void 0;function Nhe(n){return n===!0||n===!1}ki.boolean=Nhe;function KM(n){return typeof n=="string"||n instanceof String}ki.string=KM;function Bhe(n){return typeof n=="number"||n instanceof Number}ki.number=Bhe;function Hhe(n){return n instanceof Error}ki.error=Hhe;function qhe(n){return typeof n=="function"}ki.func=qhe;function zM(n){return Array.isArray(n)}ki.array=zM;function Yhe(n){return zM(n)&&n.every(e=>KM(e))}ki.stringArray=Yhe});var pS=m(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.isResponseMessage=ne.isNotificationMessage=ne.isRequestMessage=ne.NotificationType9=ne.NotificationType8=ne.NotificationType7=ne.NotificationType6=ne.NotificationType5=ne.NotificationType4=ne.NotificationType3=ne.NotificationType2=ne.NotificationType1=ne.NotificationType0=ne.NotificationType=ne.RequestType9=ne.RequestType8=ne.RequestType7=ne.RequestType6=ne.RequestType5=ne.RequestType4=ne.RequestType3=ne.RequestType2=ne.RequestType1=ne.RequestType=ne.RequestType0=ne.AbstractMessageSignature=ne.ParameterStructures=ne.ResponseError=ne.ErrorCodes=void 0;var ul=Xu(),VM;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=n.jsonrpcReservedErrorRangeStart,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=n.jsonrpcReservedErrorRangeEnd})(VM=ne.ErrorCodes||(ne.ErrorCodes={}));var Mm=class extends Error{constructor(e,t,i){super(t);this.code=ul.number(e)?e:VM.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,Mm.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}};ne.ResponseError=Mm;var mi=class{constructor(e){this.kind=e}static is(e){return e===mi.auto||e===mi.byName||e===mi.byPosition}toString(){return this.kind}};ne.ParameterStructures=mi;mi.auto=new mi("auto");mi.byPosition=new mi("byPosition");mi.byName=new mi("byName");var xt=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return mi.auto}};ne.AbstractMessageSignature=xt;var eN=class extends xt{constructor(e){super(e,0)}};ne.RequestType0=eN;var tN=class extends xt{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.RequestType=tN;var iN=class extends xt{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.RequestType1=iN;var nN=class extends xt{constructor(e){super(e,2)}};ne.RequestType2=nN;var rN=class extends xt{constructor(e){super(e,3)}};ne.RequestType3=rN;var oN=class extends xt{constructor(e){super(e,4)}};ne.RequestType4=oN;var sN=class extends xt{constructor(e){super(e,5)}};ne.RequestType5=sN;var aN=class extends xt{constructor(e){super(e,6)}};ne.RequestType6=aN;var lN=class extends xt{constructor(e){super(e,7)}};ne.RequestType7=lN;var uN=class extends xt{constructor(e){super(e,8)}};ne.RequestType8=uN;var cN=class extends xt{constructor(e){super(e,9)}};ne.RequestType9=cN;var hN=class extends xt{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.NotificationType=hN;var dN=class extends xt{constructor(e){super(e,0)}};ne.NotificationType0=dN;var gN=class extends xt{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.NotificationType1=gN;var fN=class extends xt{constructor(e){super(e,2)}};ne.NotificationType2=fN;var pN=class extends xt{constructor(e){super(e,3)}};ne.NotificationType3=pN;var mN=class extends xt{constructor(e){super(e,4)}};ne.NotificationType4=mN;var bN=class extends xt{constructor(e){super(e,5)}};ne.NotificationType5=bN;var yN=class extends xt{constructor(e){super(e,6)}};ne.NotificationType6=yN;var vN=class extends xt{constructor(e){super(e,7)}};ne.NotificationType7=vN;var wN=class extends xt{constructor(e){super(e,8)}};ne.NotificationType8=wN;var DN=class extends xt{constructor(e){super(e,9)}};ne.NotificationType9=DN;function Whe(n){let e=n;return e&&ul.string(e.method)&&(ul.string(e.id)||ul.number(e.id))}ne.isRequestMessage=Whe;function Zhe(n){let e=n;return e&&ul.string(e.method)&&n.id===void 0}ne.isNotificationMessage=Zhe;function Jhe(n){let e=n;return e&&(e.result!==void 0||!!e.error)&&(ul.string(e.id)||ul.number(e.id)||e.id===null)}ne.isResponseMessage=Jhe});var Uu=m(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.Emitter=cl.Event=void 0;var $he=Oo(),Xhe;(function(n){let e={dispose(){}};n.None=function(){return e}})(Xhe=cl.Event||(cl.Event={}));var xN=class{add(e,t=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(i)&&i.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let i=!1;for(let r=0,o=this._callbacks.length;r{this._callbacks||(this._callbacks=new xN),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let r={dispose:()=>{!this._callbacks||(this._callbacks.remove(e,t),r.dispose=Bd._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};cl.Emitter=Bd;Bd._noop=function(){}});var vS=m(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.CancellationTokenSource=hl.CancellationToken=void 0;var CN=Oo(),Uhe=Xu(),mS=Uu(),bS;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:mS.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:mS.Event.None});function e(t){let i=t;return i&&(i===n.None||i===n.Cancelled||Uhe.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}n.is=e})(bS=hl.CancellationToken||(hl.CancellationToken={}));var Ghe=Object.freeze(function(n,e){let t=CN.default().timer.setTimeout(n.bind(e),0);return{dispose(){CN.default().timer.clearTimeout(t)}}}),yS=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ghe:(this._emitter||(this._emitter=new mS.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},SN=class{get token(){return this._token||(this._token=new yS),this._token}cancel(){this._token?this._token.cancel():this._token=bS.Cancelled}dispose(){this._token?this._token instanceof yS&&this._token.dispose():this._token=bS.None}};hl.CancellationTokenSource=SN});var kN=m(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.ReadableStreamMessageReader=Mo.AbstractMessageReader=Mo.MessageReader=void 0;var Nm=Oo(),Gu=Xu(),wS=Uu(),Qhe;(function(n){function e(t){let i=t;return i&&Gu.func(i.listen)&&Gu.func(i.dispose)&&Gu.func(i.onError)&&Gu.func(i.onClose)&&Gu.func(i.onPartialMessage)}n.is=e})(Qhe=Mo.MessageReader||(Mo.MessageReader={}));var xS=class{constructor(){this.errorEmitter=new wS.Emitter,this.closeEmitter=new wS.Emitter,this.partialMessageEmitter=new wS.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Gu.string(e.message)?e.message:"unknown"}`)}};Mo.AbstractMessageReader=xS;var DS;(function(n){function e(t){var i;let r,o,s,a=new Map,l,u=new Map;if(t===void 0||typeof t=="string")r=t!=null?t:"utf-8";else{if(r=(i=t.charset)!==null&&i!==void 0?i:"utf-8",t.contentDecoder!==void 0&&(s=t.contentDecoder,a.set(s.name,s)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)a.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(l=t.contentTypeDecoder,u.set(l.name,l)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)u.set(c.name,c)}return l===void 0&&(l=Nm.default().applicationJson.decoder,u.set(l.name,l)),{charset:r,contentDecoder:s,contentDecoders:a,contentTypeDecoder:l,contentTypeDecoders:u}}n.fromOptions=e})(DS||(DS={}));var TN=class extends xS{constructor(e,t){super();this.readable=e,this.options=DS.fromOptions(t),this.buffer=Nm.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders();if(!r)return;let o=r.get("Content-Length");if(!o)throw new Error("Header must provide a Content-Length property.");let s=parseInt(o);if(isNaN(s))throw new Error("Content-Length value must be a number.");this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1;let i;this.options.contentDecoder!==void 0?i=this.options.contentDecoder.decode(t):i=Promise.resolve(t),i.then(r=>{this.options.contentTypeDecoder.decode(r,this.options).then(o=>{this.callback(o)},o=>{this.fireError(o)})},r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(Nm.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=Nm.default().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Mo.ReadableStreamMessageReader=TN});var PN=m(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.Semaphore=void 0;var Khe=Oo(),EN=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,i)=>{this._waiting.push({thunk:e,resolve:t,reject:i}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||Khe.default().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(i=>{this._active--,e.resolve(i),this.runNext()},i=>{this._active--,e.reject(i),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Bm.Semaphore=EN});var IN=m(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.WriteableStreamMessageWriter=No.AbstractMessageWriter=No.MessageWriter=void 0;var _N=Oo(),Hd=Xu(),zhe=PN(),RN=Uu(),Vhe="Content-Length: ",LN=`\r
-`,ede;(function(n){function e(t){let i=t;return i&&Hd.func(i.dispose)&&Hd.func(i.onClose)&&Hd.func(i.onError)&&Hd.func(i.write)}n.is=e})(ede=No.MessageWriter||(No.MessageWriter={}));var SS=class{constructor(){this.errorEmitter=new RN.Emitter,this.closeEmitter=new RN.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,i){this.errorEmitter.fire([this.asError(e),t,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${Hd.string(e.message)?e.message:"unknown"}`)}};No.AbstractMessageWriter=SS;var CS;(function(n){function e(t){var i,r;return t===void 0||typeof t=="string"?{charset:t!=null?t:"utf-8",contentTypeEncoder:_N.default().applicationJson.encoder}:{charset:(i=t.charset)!==null&&i!==void 0?i:"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:(r=t.contentTypeEncoder)!==null&&r!==void 0?r:_N.default().applicationJson.encoder}}n.fromOptions=e})(CS||(CS={}));var FN=class extends SS{constructor(e,t){super();this.writable=e,this.options=CS.fromOptions(t),this.errorCount=0,this.writeSemaphore=new zhe.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let r=[];return r.push(Vhe,i.byteLength.toString(),LN),r.push(LN),this.doWrite(e,r,i)},i=>{throw this.fireError(i),i}))}async doWrite(e,t,i){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(i)}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};No.WriteableStreamMessageWriter=FN});var AN=m(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.LRUCache=Bo.LinkedMap=Bo.Touch=void 0;var Ji;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(Ji=Bo.Touch||(Bo.Touch={}));var TS=class{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=Ji.None){let i=this._map.get(e);if(!!i)return t!==Ji.None&&this.touch(i,t),i.value}set(e,t,i=Ji.None){let r=this._map.get(e);if(r)r.value=t,i!==Ji.None&&this.touch(r,i);else{switch(r={key:e,value:t,next:void 0,previous:void 0},i){case Ji.None:this.addItemLast(r);break;case Ji.First:this.addItemFirst(r);break;case Ji.Last:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(!!t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let i=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){let e=this,t=this._state,i=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){let o={value:i.key,done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}values(){let e=this,t=this._state,i=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){let o={value:i.value,done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}entries(){let e=this,t=this._state,i=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){let o={value:[i.key,i.value],done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==Ji.First&&t!==Ji.Last)){if(t===Ji.First){if(e===this._head)return;let i=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r,r.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===Ji.Last){if(e===this._tail)return;let i=e.next,r=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=r,r.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(let[t,i]of e)this.set(t,i)}};Bo.LinkedMap=TS;var jN=class extends TS{constructor(e,t=1){super();this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=Ji.AsNew){return super.get(e,t)}peek(e){return super.get(e,Ji.None)}set(e,t){return super.set(e,t,Ji.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Bo.LRUCache=jN});var qN=m(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.createMessageConnection=be.ConnectionOptions=be.CancellationStrategy=be.CancellationSenderStrategy=be.CancellationReceiverStrategy=be.ConnectionStrategy=be.ConnectionError=be.ConnectionErrors=be.LogTraceNotification=be.SetTraceNotification=be.TraceFormat=be.Trace=be.NullLogger=be.ProgressType=void 0;var ON=Oo(),ai=Xu(),me=pS(),MN=AN(),qd=Uu(),kS=vS(),Yd;(function(n){n.type=new me.NotificationType("$/cancelRequest")})(Yd||(Yd={}));var qm;(function(n){n.type=new me.NotificationType("$/progress")})(qm||(qm={}));var NN=class{constructor(){}};be.ProgressType=NN;var ES;(function(n){function e(t){return ai.func(t)}n.is=e})(ES||(ES={}));be.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var Wt;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Verbose=2]="Verbose"})(Wt=be.Trace||(be.Trace={}));(function(n){function e(i){if(!ai.string(i))return n.Off;switch(i=i.toLowerCase(),i){case"off":return n.Off;case"messages":return n.Messages;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(i){switch(i){case n.Off:return"off";case n.Messages:return"messages";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(Wt=be.Trace||(be.Trace={}));var Dr;(function(n){n.Text="text",n.JSON="json"})(Dr=be.TraceFormat||(be.TraceFormat={}));(function(n){function e(t){return t=t.toLowerCase(),t==="json"?n.JSON:n.Text}n.fromString=e})(Dr=be.TraceFormat||(be.TraceFormat={}));var BN;(function(n){n.type=new me.NotificationType("$/setTrace")})(BN=be.SetTraceNotification||(be.SetTraceNotification={}));var PS;(function(n){n.type=new me.NotificationType("$/logTrace")})(PS=be.LogTraceNotification||(be.LogTraceNotification={}));var Hm;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Hm=be.ConnectionErrors||(be.ConnectionErrors={}));var dl=class extends Error{constructor(e,t){super(t);this.code=e,Object.setPrototypeOf(this,dl.prototype)}};be.ConnectionError=dl;var HN;(function(n){function e(t){let i=t;return i&&ai.func(i.cancelUndispatched)}n.is=e})(HN=be.ConnectionStrategy||(be.ConnectionStrategy={}));var _S;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new kS.CancellationTokenSource}});function e(t){let i=t;return i&&ai.func(i.createCancellationTokenSource)}n.is=e})(_S=be.CancellationReceiverStrategy||(be.CancellationReceiverStrategy={}));var RS;(function(n){n.Message=Object.freeze({sendCancellation(t,i){t.sendNotification(Yd.type,{id:i})},cleanup(t){}});function e(t){let i=t;return i&&ai.func(i.sendCancellation)&&ai.func(i.cleanup)}n.is=e})(RS=be.CancellationSenderStrategy||(be.CancellationSenderStrategy={}));var LS;(function(n){n.Message=Object.freeze({receiver:_S.Message,sender:RS.Message});function e(t){let i=t;return i&&_S.is(i.receiver)&&RS.is(i.sender)}n.is=e})(LS=be.CancellationStrategy||(be.CancellationStrategy={}));var tde;(function(n){function e(t){let i=t;return i&&(LS.is(i.cancellationStrategy)||HN.is(i.connectionStrategy))}n.is=e})(tde=be.ConnectionOptions||(be.ConnectionOptions={}));var xr;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(xr||(xr={}));function ide(n,e,t,i){let r=t!==void 0?t:be.NullLogger,o=0,s=0,a=0,l="2.0",u,c=Object.create(null),h,d=Object.create(null),g=new Map,f,p=new MN.LinkedMap,b=Object.create(null),v=Object.create(null),w=Wt.Off,D=Dr.Text,S,F=xr.New,L=new qd.Emitter,j=new qd.Emitter,W=new qd.Emitter,B=new qd.Emitter,N=new qd.Emitter,I=i&&i.cancellationStrategy?i.cancellationStrategy:LS.Message;function M(P){if(P===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+P.toString()}function J(P){return P===null?"res-unknown-"+(++a).toString():"res-"+P.toString()}function K(){return"not-"+(++s).toString()}function ae(P,$){me.isRequestMessage($)?P.set(M($.id),$):me.isResponseMessage($)?P.set(J($.id),$):P.set(K(),$)}function je(P){}function _e(){return F===xr.Listening}function Ve(){return F===xr.Closed}function Et(){return F===xr.Disposed}function xi(){(F===xr.New||F===xr.Listening)&&(F=xr.Closed,j.fire(void 0))}function ys(P){L.fire([P,void 0,void 0])}function Po(P){L.fire(P)}n.onClose(xi),n.onError(ys),e.onClose(xi),e.onError(Po);function mp(){f||p.size===0||(f=ON.default().timer.setImmediate(()=>{f=void 0,bp()}))}function bp(){if(p.size===0)return;let P=p.shift();try{me.isRequestMessage(P)?du(P):me.isNotificationMessage(P)?Re(P):me.isResponseMessage(P)?gu(P):Se(P)}finally{mp()}}let Tx=P=>{try{if(me.isNotificationMessage(P)&&P.method===Yd.type.method){let $=M(P.params.id),G=p.get($);if(me.isRequestMessage(G)){let ce=i==null?void 0:i.connectionStrategy,Ye=ce&&ce.cancelUndispatched?ce.cancelUndispatched(G,je):void 0;if(Ye&&(Ye.error!==void 0||Ye.result!==void 0)){p.delete($),Ye.id=G.id,It(Ye,P.method,Date.now()),e.write(Ye);return}}}ae(p,P)}finally{mp()}};function du(P){if(Et())return;function $($e,At,Xe){let Kt={jsonrpc:l,id:P.id};$e instanceof me.ResponseError?Kt.error=$e.toJson():Kt.result=$e===void 0?null:$e,It(Kt,At,Xe),e.write(Kt)}function G($e,At,Xe){let Kt={jsonrpc:l,id:P.id,error:$e.toJson()};It(Kt,At,Xe),e.write(Kt)}function ce($e,At,Xe){$e===void 0&&($e=null);let Kt={jsonrpc:l,id:P.id,result:$e};It(Kt,At,Xe),e.write(Kt)}gr(P);let Ye=c[P.method],jt,Qt;Ye&&(jt=Ye.type,Qt=Ye.handler);let ri=Date.now();if(Qt||u){let $e=String(P.id),At=I.receiver.createCancellationTokenSource($e);v[$e]=At;try{let Xe;if(Qt)if(P.params===void 0){if(jt!==void 0&&jt.numberOfParams!==0){G(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${P.method} defines ${jt.numberOfParams} params but recevied none.`),P.method,ri);return}Xe=Qt(At.token)}else if(Array.isArray(P.params)){if(jt!==void 0&&jt.parameterStructures===me.ParameterStructures.byName){G(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${P.method} defines parameters by name but received parameters by position`),P.method,ri);return}Xe=Qt(...P.params,At.token)}else{if(jt!==void 0&&jt.parameterStructures===me.ParameterStructures.byPosition){G(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${P.method} defines parameters by position but received parameters by name`),P.method,ri);return}Xe=Qt(P.params,At.token)}else u&&(Xe=u(P.method,P.params,At.token));let Kt=Xe;Xe?Kt.then?Kt.then(nn=>{delete v[$e],$(nn,P.method,ri)},nn=>{delete v[$e],nn instanceof me.ResponseError?G(nn,P.method,ri):nn&&ai.string(nn.message)?G(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${P.method} failed with message: ${nn.message}`),P.method,ri):G(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${P.method} failed unexpectedly without providing any details.`),P.method,ri)}):(delete v[$e],$(Xe,P.method,ri)):(delete v[$e],ce(Xe,P.method,ri))}catch(Xe){delete v[$e],Xe instanceof me.ResponseError?$(Xe,P.method,ri):Xe&&ai.string(Xe.message)?G(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${P.method} failed with message: ${Xe.message}`),P.method,ri):G(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${P.method} failed unexpectedly without providing any details.`),P.method,ri)}}else G(new me.ResponseError(me.ErrorCodes.MethodNotFound,`Unhandled method ${P.method}`),P.method,ri)}function gu(P){if(!Et())if(P.id===null)P.error?r.error(`Received response message without id: Error is:
-${JSON.stringify(P.error,void 0,4)}`):r.error("Received response message without id. No further error information provided.");else{let $=String(P.id),G=b[$];if(kn(P,G),G){delete b[$];try{if(P.error){let ce=P.error;G.reject(new me.ResponseError(ce.code,ce.message,ce.data))}else if(P.result!==void 0)G.resolve(P.result);else throw new Error("Should never happen.")}catch(ce){ce.message?r.error(`Response handler '${G.method}' failed with message: ${ce.message}`):r.error(`Response handler '${G.method}' failed unexpectedly.`)}}}}function Re(P){if(Et())return;let $,G;if(P.method===Yd.type.method)G=ce=>{let Ye=ce.id,jt=v[String(Ye)];jt&&jt.cancel()};else{let ce=d[P.method];ce&&(G=ce.handler,$=ce.type)}if(G||h)try{fr(P),G?P.params===void 0?($!==void 0&&$.numberOfParams!==0&&$.parameterStructures!==me.ParameterStructures.byName&&r.error(`Notification ${P.method} defines ${$.numberOfParams} params but recevied none.`),G()):Array.isArray(P.params)?($!==void 0&&($.parameterStructures===me.ParameterStructures.byName&&r.error(`Notification ${P.method} defines parameters by name but received parameters by position`),$.numberOfParams!==P.params.length&&r.error(`Notification ${P.method} defines ${$.numberOfParams} params but received ${P.params.length} argumennts`)),G(...P.params)):($!==void 0&&$.parameterStructures===me.ParameterStructures.byPosition&&r.error(`Notification ${P.method} defines parameters by position but received parameters by name`),G(P.params)):h&&h(P.method,P.params)}catch(ce){ce.message?r.error(`Notification handler '${P.method}' failed with message: ${ce.message}`):r.error(`Notification handler '${P.method}' failed unexpectedly.`)}else W.fire(P)}function Se(P){if(!P){r.error("Received empty message.");return}r.error(`Received message which is neither a response nor a notification message:
-${JSON.stringify(P,null,4)}`);let $=P;if(ai.string($.id)||ai.number($.id)){let G=String($.id),ce=b[G];ce&&ce.reject(new Error("The received response has neither a result nor an error property."))}}function Te(P){if(!(w===Wt.Off||!S))if(D===Dr.Text){let $;w===Wt.Verbose&&P.params&&($=`Params: ${JSON.stringify(P.params,null,4)}
-
-`),S.log(`Sending request '${P.method} - (${P.id})'.`,$)}else vs("send-request",P)}function Le(P){if(!(w===Wt.Off||!S))if(D===Dr.Text){let $;w===Wt.Verbose&&(P.params?$=`Params: ${JSON.stringify(P.params,null,4)}
-
-`:$=`No parameters provided.
-
-`),S.log(`Sending notification '${P.method}'.`,$)}else vs("send-notification",P)}function It(P,$,G){if(!(w===Wt.Off||!S))if(D===Dr.Text){let ce;w===Wt.Verbose&&(P.error&&P.error.data?ce=`Error data: ${JSON.stringify(P.error.data,null,4)}
-
-`:P.result?ce=`Result: ${JSON.stringify(P.result,null,4)}
-
-`:P.error===void 0&&(ce=`No result returned.
-
-`)),S.log(`Sending response '${$} - (${P.id})'. Processing request took ${Date.now()-G}ms`,ce)}else vs("send-response",P)}function gr(P){if(!(w===Wt.Off||!S))if(D===Dr.Text){let $;w===Wt.Verbose&&P.params&&($=`Params: ${JSON.stringify(P.params,null,4)}
-
-`),S.log(`Received request '${P.method} - (${P.id})'.`,$)}else vs("receive-request",P)}function fr(P){if(!(w===Wt.Off||!S||P.method===PS.type.method))if(D===Dr.Text){let $;w===Wt.Verbose&&(P.params?$=`Params: ${JSON.stringify(P.params,null,4)}
-
-`:$=`No parameters provided.
-
-`),S.log(`Received notification '${P.method}'.`,$)}else vs("receive-notification",P)}function kn(P,$){if(!(w===Wt.Off||!S))if(D===Dr.Text){let G;if(w===Wt.Verbose&&(P.error&&P.error.data?G=`Error data: ${JSON.stringify(P.error.data,null,4)}
-
-`:P.result?G=`Result: ${JSON.stringify(P.result,null,4)}
-
-`:P.error===void 0&&(G=`No result returned.
-
-`)),$){let ce=P.error?` Request failed: ${P.error.message} (${P.error.code}).`:"";S.log(`Received response '${$.method} - (${P.id})' in ${Date.now()-$.timerStart}ms.${ce}`,G)}else S.log(`Received response ${P.id} without active response promise.`,G)}else vs("receive-response",P)}function vs(P,$){if(!S||w===Wt.Off)return;let G={isLSPMessage:!0,type:P,message:$,timestamp:Date.now()};S.log(G)}function ws(){if(Ve())throw new dl(Hm.Closed,"Connection is closed.");if(Et())throw new dl(Hm.Disposed,"Connection is disposed.")}function Kte(){if(_e())throw new dl(Hm.AlreadyListening,"Connection is already listening")}function zte(){if(!_e())throw new Error("Call listen() first.")}function Zh(P){return P===void 0?null:P}function pR(P){if(P!==null)return P}function mR(P){return P!=null&&!Array.isArray(P)&&typeof P=="object"}function kx(P,$){switch(P){case me.ParameterStructures.auto:return mR($)?pR($):[Zh($)];case me.ParameterStructures.byName:if(!mR($))throw new Error("Recevied parameters by name but param is not an object literal.");return pR($);case me.ParameterStructures.byPosition:return[Zh($)];default:throw new Error(`Unknown parameter structure ${P.toString()}`)}}function bR(P,$){let G,ce=P.numberOfParams;switch(ce){case 0:G=void 0;break;case 1:G=kx(P.parameterStructures,$[0]);break;default:G=[];for(let Ye=0;Ye<$.length&&Ye{ws();let G,ce;if(ai.string(P)){G=P;let jt=$[0],Qt=0,ri=me.ParameterStructures.auto;me.ParameterStructures.is(jt)&&(Qt=1,ri=jt);let $e=$.length,At=$e-Qt;switch(At){case 0:ce=void 0;break;case 1:ce=kx(ri,$[Qt]);break;default:if(ri===me.ParameterStructures.byName)throw new Error(`Recevied ${At} parameters for 'by Name' notification parameter structure.`);ce=$.slice(Qt,$e).map(Xe=>Zh(Xe));break}}else{let jt=$;G=P.method,ce=bR(P,jt)}let Ye={jsonrpc:l,method:G,params:ce};Le(Ye),e.write(Ye)},onNotification:(P,$)=>{ws();let G;return ai.func(P)?h=P:$&&(ai.string(P)?(G=P,d[P]={type:void 0,handler:$}):(G=P.method,d[P.method]={type:P,handler:$})),{dispose:()=>{G!==void 0?delete d[G]:h=void 0}}},onProgress:(P,$,G)=>{if(g.has($))throw new Error(`Progress handler for token ${$} already registered`);return g.set($,G),{dispose:()=>{g.delete($)}}},sendProgress:(P,$,G)=>{fu.sendNotification(qm.type,{token:$,value:G})},onUnhandledProgress:B.event,sendRequest:(P,...$)=>{ws(),zte();let G,ce,Ye;if(ai.string(P)){G=P;let $e=$[0],At=$[$.length-1],Xe=0,Kt=me.ParameterStructures.auto;me.ParameterStructures.is($e)&&(Xe=1,Kt=$e);let nn=$.length;kS.CancellationToken.is(At)&&(nn=nn-1,Ye=At);let Na=nn-Xe;switch(Na){case 0:ce=void 0;break;case 1:ce=kx(Kt,$[Xe]);break;default:if(Kt===me.ParameterStructures.byName)throw new Error(`Recevied ${Na} parameters for 'by Name' request parameter structure.`);ce=$.slice(Xe,nn).map(Ds=>Zh(Ds));break}}else{let $e=$;G=P.method,ce=bR(P,$e);let At=P.numberOfParams;Ye=kS.CancellationToken.is($e[At])?$e[At]:void 0}let jt=o++,Qt;return Ye&&(Qt=Ye.onCancellationRequested(()=>{I.sender.sendCancellation(fu,jt)})),new Promise(($e,At)=>{let Xe={jsonrpc:l,id:jt,method:G,params:ce},Kt=Ds=>{$e(Ds),I.sender.cleanup(jt),Qt==null||Qt.dispose()},nn=Ds=>{At(Ds),I.sender.cleanup(jt),Qt==null||Qt.dispose()},Na={method:G,timerStart:Date.now(),resolve:Kt,reject:nn};Te(Xe);try{e.write(Xe)}catch(Ds){Na.reject(new me.ResponseError(me.ErrorCodes.MessageWriteError,Ds.message?Ds.message:"Unknown reason")),Na=null}Na&&(b[String(jt)]=Na)})},onRequest:(P,$)=>{ws();let G=null;return ES.is(P)?(G=void 0,u=P):ai.string(P)?(G=null,$!==void 0&&(G=P,c[P]={handler:$,type:void 0})):$!==void 0&&(G=P.method,c[P.method]={type:P,handler:$}),{dispose:()=>{G!==null&&(G!==void 0?delete c[G]:u=void 0)}}},trace:(P,$,G)=>{let ce=!1,Ye=Dr.Text;G!==void 0&&(ai.boolean(G)?ce=G:(ce=G.sendNotification||!1,Ye=G.traceFormat||Dr.Text)),w=P,D=Ye,w===Wt.Off?S=void 0:S=$,ce&&!Ve()&&!Et()&&fu.sendNotification(BN.type,{value:Wt.toString(P)})},onError:L.event,onClose:j.event,onUnhandledNotification:W.event,onDispose:N.event,end:()=>{e.end()},dispose:()=>{if(Et())return;F=xr.Disposed,N.fire(void 0);let P=new Error("Connection got disposed.");Object.keys(b).forEach($=>{b[$].reject(P)}),b=Object.create(null),v=Object.create(null),p=new MN.LinkedMap,ai.func(e.dispose)&&e.dispose(),ai.func(n.dispose)&&n.dispose()},listen:()=>{ws(),Kte(),F=xr.Listening,n.listen(Tx)},inspect:()=>{ON.default().console.log("inspect")}};return fu.onNotification(PS.type,P=>{w===Wt.Off||!S||S.log(P.message,w===Wt.Verbose?P.verbose:void 0)}),fu.onNotification(qm.type,P=>{let $=g.get(P.token);$?$(P.value):B.fire(P)}),fu}be.createMessageConnection=ide});var jS=m(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.CancellationSenderStrategy=X.CancellationReceiverStrategy=X.ConnectionError=X.ConnectionErrors=X.LogTraceNotification=X.SetTraceNotification=X.TraceFormat=X.Trace=X.ProgressType=X.createMessageConnection=X.NullLogger=X.ConnectionOptions=X.ConnectionStrategy=X.WriteableStreamMessageWriter=X.AbstractMessageWriter=X.MessageWriter=X.ReadableStreamMessageReader=X.AbstractMessageReader=X.MessageReader=X.CancellationToken=X.CancellationTokenSource=X.Emitter=X.Event=X.Disposable=X.ParameterStructures=X.NotificationType9=X.NotificationType8=X.NotificationType7=X.NotificationType6=X.NotificationType5=X.NotificationType4=X.NotificationType3=X.NotificationType2=X.NotificationType1=X.NotificationType0=X.NotificationType=X.ErrorCodes=X.ResponseError=X.RequestType9=X.RequestType8=X.RequestType7=X.RequestType6=X.RequestType5=X.RequestType4=X.RequestType3=X.RequestType2=X.RequestType1=X.RequestType0=X.RequestType=X.RAL=void 0;X.CancellationStrategy=void 0;var mt=pS();Object.defineProperty(X,"RequestType",{enumerable:!0,get:function(){return mt.RequestType}});Object.defineProperty(X,"RequestType0",{enumerable:!0,get:function(){return mt.RequestType0}});Object.defineProperty(X,"RequestType1",{enumerable:!0,get:function(){return mt.RequestType1}});Object.defineProperty(X,"RequestType2",{enumerable:!0,get:function(){return mt.RequestType2}});Object.defineProperty(X,"RequestType3",{enumerable:!0,get:function(){return mt.RequestType3}});Object.defineProperty(X,"RequestType4",{enumerable:!0,get:function(){return mt.RequestType4}});Object.defineProperty(X,"RequestType5",{enumerable:!0,get:function(){return mt.RequestType5}});Object.defineProperty(X,"RequestType6",{enumerable:!0,get:function(){return mt.RequestType6}});Object.defineProperty(X,"RequestType7",{enumerable:!0,get:function(){return mt.RequestType7}});Object.defineProperty(X,"RequestType8",{enumerable:!0,get:function(){return mt.RequestType8}});Object.defineProperty(X,"RequestType9",{enumerable:!0,get:function(){return mt.RequestType9}});Object.defineProperty(X,"ResponseError",{enumerable:!0,get:function(){return mt.ResponseError}});Object.defineProperty(X,"ErrorCodes",{enumerable:!0,get:function(){return mt.ErrorCodes}});Object.defineProperty(X,"NotificationType",{enumerable:!0,get:function(){return mt.NotificationType}});Object.defineProperty(X,"NotificationType0",{enumerable:!0,get:function(){return mt.NotificationType0}});Object.defineProperty(X,"NotificationType1",{enumerable:!0,get:function(){return mt.NotificationType1}});Object.defineProperty(X,"NotificationType2",{enumerable:!0,get:function(){return mt.NotificationType2}});Object.defineProperty(X,"NotificationType3",{enumerable:!0,get:function(){return mt.NotificationType3}});Object.defineProperty(X,"NotificationType4",{enumerable:!0,get:function(){return mt.NotificationType4}});Object.defineProperty(X,"NotificationType5",{enumerable:!0,get:function(){return mt.NotificationType5}});Object.defineProperty(X,"NotificationType6",{enumerable:!0,get:function(){return mt.NotificationType6}});Object.defineProperty(X,"NotificationType7",{enumerable:!0,get:function(){return mt.NotificationType7}});Object.defineProperty(X,"NotificationType8",{enumerable:!0,get:function(){return mt.NotificationType8}});Object.defineProperty(X,"NotificationType9",{enumerable:!0,get:function(){return mt.NotificationType9}});Object.defineProperty(X,"ParameterStructures",{enumerable:!0,get:function(){return mt.ParameterStructures}});var nde=dS();Object.defineProperty(X,"Disposable",{enumerable:!0,get:function(){return nde.Disposable}});var YN=Uu();Object.defineProperty(X,"Event",{enumerable:!0,get:function(){return YN.Event}});Object.defineProperty(X,"Emitter",{enumerable:!0,get:function(){return YN.Emitter}});var WN=vS();Object.defineProperty(X,"CancellationTokenSource",{enumerable:!0,get:function(){return WN.CancellationTokenSource}});Object.defineProperty(X,"CancellationToken",{enumerable:!0,get:function(){return WN.CancellationToken}});var FS=kN();Object.defineProperty(X,"MessageReader",{enumerable:!0,get:function(){return FS.MessageReader}});Object.defineProperty(X,"AbstractMessageReader",{enumerable:!0,get:function(){return FS.AbstractMessageReader}});Object.defineProperty(X,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return FS.ReadableStreamMessageReader}});var IS=IN();Object.defineProperty(X,"MessageWriter",{enumerable:!0,get:function(){return IS.MessageWriter}});Object.defineProperty(X,"AbstractMessageWriter",{enumerable:!0,get:function(){return IS.AbstractMessageWriter}});Object.defineProperty(X,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return IS.WriteableStreamMessageWriter}});var ln=qN();Object.defineProperty(X,"ConnectionStrategy",{enumerable:!0,get:function(){return ln.ConnectionStrategy}});Object.defineProperty(X,"ConnectionOptions",{enumerable:!0,get:function(){return ln.ConnectionOptions}});Object.defineProperty(X,"NullLogger",{enumerable:!0,get:function(){return ln.NullLogger}});Object.defineProperty(X,"createMessageConnection",{enumerable:!0,get:function(){return ln.createMessageConnection}});Object.defineProperty(X,"ProgressType",{enumerable:!0,get:function(){return ln.ProgressType}});Object.defineProperty(X,"Trace",{enumerable:!0,get:function(){return ln.Trace}});Object.defineProperty(X,"TraceFormat",{enumerable:!0,get:function(){return ln.TraceFormat}});Object.defineProperty(X,"SetTraceNotification",{enumerable:!0,get:function(){return ln.SetTraceNotification}});Object.defineProperty(X,"LogTraceNotification",{enumerable:!0,get:function(){return ln.LogTraceNotification}});Object.defineProperty(X,"ConnectionErrors",{enumerable:!0,get:function(){return ln.ConnectionErrors}});Object.defineProperty(X,"ConnectionError",{enumerable:!0,get:function(){return ln.ConnectionError}});Object.defineProperty(X,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ln.CancellationReceiverStrategy}});Object.defineProperty(X,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ln.CancellationSenderStrategy}});Object.defineProperty(X,"CancellationStrategy",{enumerable:!0,get:function(){return ln.CancellationStrategy}});var rde=Oo();X.RAL=rde.default});var Vu=m(We=>{"use strict";var ode=We&&We.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t),Object.defineProperty(n,i,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),sde=We&&We.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ode(e,n,t)};Object.defineProperty(We,"__esModule",{value:!0});We.createMessageConnection=We.createServerSocketTransport=We.createClientSocketTransport=We.createServerPipeTransport=We.createClientPipeTransport=We.generateRandomPipeName=We.StreamMessageWriter=We.StreamMessageReader=We.SocketMessageWriter=We.SocketMessageReader=We.IPCMessageWriter=We.IPCMessageReader=void 0;var Qu=QM();Qu.default.install();var Gr=jS(),ZN=require("path"),ade=require("os"),lde=require("crypto"),Ym=require("net");sde(jS(),We);var $N=class extends Gr.AbstractMessageReader{constructor(e){super();this.process=e;let t=this.process;t.on("error",i=>this.fireError(i)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Gr.Disposable.create(()=>this.process.off("message",e))}};We.IPCMessageReader=$N;var XN=class extends Gr.AbstractMessageWriter{constructor(e){super();this.process=e,this.errorCount=0;let t=this.process;t.on("error",i=>this.fireError(i)),t.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};We.IPCMessageWriter=XN;var Ku=class extends Gr.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(Qu.default().stream.asReadableStream(e),t)}};We.SocketMessageReader=Ku;var zu=class extends Gr.WriteableStreamMessageWriter{constructor(e,t){super(Qu.default().stream.asWritableStream(e),t);this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};We.SocketMessageWriter=zu;var AS=class extends Gr.ReadableStreamMessageReader{constructor(e,t){super(Qu.default().stream.asReadableStream(e),t)}};We.StreamMessageReader=AS;var OS=class extends Gr.WriteableStreamMessageWriter{constructor(e,t){super(Qu.default().stream.asWritableStream(e),t)}};We.StreamMessageWriter=OS;var JN=process.env.XDG_RUNTIME_DIR,ude=new Map([["linux",107],["darwin",103]]);function cde(){let n=lde.randomBytes(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${n}-sock`;let e;JN?e=ZN.join(JN,`vscode-ipc-${n}.sock`):e=ZN.join(ade.tmpdir(),`vscode-${n}.sock`);let t=ude.get(process.platform);return t!==void 0&&e.length>=t&&Qu.default().console.warn(`WARNING: IPC handle "${e}" is longer than ${t} characters.`),e}We.generateRandomPipeName=cde;function hde(n,e="utf-8"){let t,i=new Promise((r,o)=>{t=r});return new Promise((r,o)=>{let s=Ym.createServer(a=>{s.close(),t([new Ku(a,e),new zu(a,e)])});s.on("error",o),s.listen(n,()=>{s.removeListener("error",o),r({onConnected:()=>i})})})}We.createClientPipeTransport=hde;function dde(n,e="utf-8"){let t=Ym.createConnection(n);return[new Ku(t,e),new zu(t,e)]}We.createServerPipeTransport=dde;function gde(n,e="utf-8"){let t,i=new Promise((r,o)=>{t=r});return new Promise((r,o)=>{let s=Ym.createServer(a=>{s.close(),t([new Ku(a,e),new zu(a,e)])});s.on("error",o),s.listen(n,"127.0.0.1",()=>{s.removeListener("error",o),r({onConnected:()=>i})})})}We.createClientSocketTransport=gde;function fde(n,e="utf-8"){let t=Ym.createConnection(n,"127.0.0.1");return[new Ku(t,e),new zu(t,e)]}We.createServerSocketTransport=fde;function pde(n){let e=n;return e.read!==void 0&&e.addListener!==void 0}function mde(n){let e=n;return e.write!==void 0&&e.addListener!==void 0}function bde(n,e,t,i){t||(t=Gr.NullLogger);let r=pde(n)?new AS(n):n,o=mde(e)?new OS(e):e;return Gr.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),Gr.createMessageConnection(r,o,t,i)}We.createMessageConnection=bde});var MS=m((i_e,UN)=>{"use strict";UN.exports=Vu()});var QN={};xs(QN,{AnnotatedTextEdit:()=>Ho,ChangeAnnotation:()=>gl,ChangeAnnotationIdentifier:()=>bi,CodeAction:()=>f0,CodeActionContext:()=>g0,CodeActionKind:()=>d0,CodeDescription:()=>$S,CodeLens:()=>p0,Color:()=>Zm,ColorInformation:()=>HS,ColorPresentation:()=>qS,Command:()=>ec,CompletionItem:()=>t0,CompletionItemKind:()=>QS,CompletionItemTag:()=>zS,CompletionList:()=>i0,CreateFile:()=>Zs,DeleteFile:()=>qo,Diagnostic:()=>Zd,DiagnosticRelatedInformation:()=>Jm,DiagnosticSeverity:()=>ZS,DiagnosticTag:()=>JS,DocumentHighlight:()=>a0,DocumentHighlightKind:()=>s0,DocumentLink:()=>b0,DocumentSymbol:()=>h0,EOL:()=>vde,FoldingRange:()=>WS,FoldingRangeKind:()=>YS,FormattingOptions:()=>m0,Hover:()=>n0,InsertReplaceEdit:()=>VS,InsertTextFormat:()=>KS,InsertTextMode:()=>e0,Location:()=>cn,LocationLink:()=>BS,MarkedString:()=>$d,MarkupContent:()=>Xm,MarkupKind:()=>tc,OptionalVersionedTextDocumentIdentifier:()=>Jd,ParameterInformation:()=>r0,Position:()=>Vt,Range:()=>Ne,RenameFile:()=>Js,SelectionRange:()=>y0,SignatureInformation:()=>o0,SymbolInformation:()=>c0,SymbolKind:()=>l0,SymbolTag:()=>u0,TextDocument:()=>v0,TextDocumentEdit:()=>Ws,TextDocumentIdentifier:()=>XS,TextDocumentItem:()=>GS,TextEdit:()=>un,VersionedTextDocumentIdentifier:()=>US,WorkspaceChange:()=>yde,WorkspaceEdit:()=>$m,integer:()=>NS,uinteger:()=>Wd});var NS,Wd,Vt,Ne,cn,BS,Zm,HS,qS,YS,WS,Jm,ZS,JS,$S,Zd,ec,un,gl,bi,Ho,Ws,Zs,Js,qo,$m,Wm,GN,yde,XS,US,Jd,GS,tc,Xm,QS,KS,zS,VS,e0,t0,i0,$d,n0,r0,o0,s0,a0,l0,u0,c0,h0,d0,g0,f0,p0,m0,b0,y0,vde,v0,wde,Y,Qr=_(()=>{"use strict";(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647})(NS||(NS={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647})(Wd||(Wd={}));(function(n){function e(i,r){return i===Number.MAX_VALUE&&(i=Wd.MAX_VALUE),r===Number.MAX_VALUE&&(r=Wd.MAX_VALUE),{line:i,character:r}}n.create=e;function t(i){var r=i;return Y.objectLiteral(r)&&Y.uinteger(r.line)&&Y.uinteger(r.character)}n.is=t})(Vt||(Vt={}));(function(n){function e(i,r,o,s){if(Y.uinteger(i)&&Y.uinteger(r)&&Y.uinteger(o)&&Y.uinteger(s))return{start:Vt.create(i,r),end:Vt.create(o,s)};if(Vt.is(i)&&Vt.is(r))return{start:i,end:r};throw new Error("Range#create called with invalid arguments["+i+", "+r+", "+o+", "+s+"]")}n.create=e;function t(i){var r=i;return Y.objectLiteral(r)&&Vt.is(r.start)&&Vt.is(r.end)}n.is=t})(Ne||(Ne={}));(function(n){function e(i,r){return{uri:i,range:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Ne.is(r.range)&&(Y.string(r.uri)||Y.undefined(r.uri))}n.is=t})(cn||(cn={}));(function(n){function e(i,r,o,s){return{targetUri:i,targetRange:r,targetSelectionRange:o,originSelectionRange:s}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Ne.is(r.targetRange)&&Y.string(r.targetUri)&&(Ne.is(r.targetSelectionRange)||Y.undefined(r.targetSelectionRange))&&(Ne.is(r.originSelectionRange)||Y.undefined(r.originSelectionRange))}n.is=t})(BS||(BS={}));(function(n){function e(i,r,o,s){return{red:i,green:r,blue:o,alpha:s}}n.create=e;function t(i){var r=i;return Y.numberRange(r.red,0,1)&&Y.numberRange(r.green,0,1)&&Y.numberRange(r.blue,0,1)&&Y.numberRange(r.alpha,0,1)}n.is=t})(Zm||(Zm={}));(function(n){function e(i,r){return{range:i,color:r}}n.create=e;function t(i){var r=i;return Ne.is(r.range)&&Zm.is(r.color)}n.is=t})(HS||(HS={}));(function(n){function e(i,r,o){return{label:i,textEdit:r,additionalTextEdits:o}}n.create=e;function t(i){var r=i;return Y.string(r.label)&&(Y.undefined(r.textEdit)||un.is(r))&&(Y.undefined(r.additionalTextEdits)||Y.typedArray(r.additionalTextEdits,un.is))}n.is=t})(qS||(qS={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(YS||(YS={}));(function(n){function e(i,r,o,s,a){var l={startLine:i,endLine:r};return Y.defined(o)&&(l.startCharacter=o),Y.defined(s)&&(l.endCharacter=s),Y.defined(a)&&(l.kind=a),l}n.create=e;function t(i){var r=i;return Y.uinteger(r.startLine)&&Y.uinteger(r.startLine)&&(Y.undefined(r.startCharacter)||Y.uinteger(r.startCharacter))&&(Y.undefined(r.endCharacter)||Y.uinteger(r.endCharacter))&&(Y.undefined(r.kind)||Y.string(r.kind))}n.is=t})(WS||(WS={}));(function(n){function e(i,r){return{location:i,message:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&cn.is(r.location)&&Y.string(r.message)}n.is=t})(Jm||(Jm={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(ZS||(ZS={}));(function(n){n.Unnecessary=1,n.Deprecated=2})(JS||(JS={}));(function(n){function e(t){var i=t;return i!=null&&Y.string(i.href)}n.is=e})($S||($S={}));(function(n){function e(i,r,o,s,a,l){var u={range:i,message:r};return Y.defined(o)&&(u.severity=o),Y.defined(s)&&(u.code=s),Y.defined(a)&&(u.source=a),Y.defined(l)&&(u.relatedInformation=l),u}n.create=e;function t(i){var r,o=i;return Y.defined(o)&&Ne.is(o.range)&&Y.string(o.message)&&(Y.number(o.severity)||Y.undefined(o.severity))&&(Y.integer(o.code)||Y.string(o.code)||Y.undefined(o.code))&&(Y.undefined(o.codeDescription)||Y.string((r=o.codeDescription)===null||r===void 0?void 0:r.href))&&(Y.string(o.source)||Y.undefined(o.source))&&(Y.undefined(o.relatedInformation)||Y.typedArray(o.relatedInformation,Jm.is))}n.is=t})(Zd||(Zd={}));(function(n){function e(i,r){for(var o=[],s=2;s0&&(a.arguments=o),a}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.title)&&Y.string(r.command)}n.is=t})(ec||(ec={}));(function(n){function e(o,s){return{range:o,newText:s}}n.replace=e;function t(o,s){return{range:{start:o,end:o},newText:s}}n.insert=t;function i(o){return{range:o,newText:""}}n.del=i;function r(o){var s=o;return Y.objectLiteral(s)&&Y.string(s.newText)&&Ne.is(s.range)}n.is=r})(un||(un={}));(function(n){function e(i,r,o){var s={label:i};return r!==void 0&&(s.needsConfirmation=r),o!==void 0&&(s.description=o),s}n.create=e;function t(i){var r=i;return r!==void 0&&Y.objectLiteral(r)&&Y.string(r.label)&&(Y.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(Y.string(r.description)||r.description===void 0)}n.is=t})(gl||(gl={}));(function(n){function e(t){var i=t;return typeof i=="string"}n.is=e})(bi||(bi={}));(function(n){function e(o,s,a){return{range:o,newText:s,annotationId:a}}n.replace=e;function t(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}n.insert=t;function i(o,s){return{range:o,newText:"",annotationId:s}}n.del=i;function r(o){var s=o;return un.is(s)&&(gl.is(s.annotationId)||bi.is(s.annotationId))}n.is=r})(Ho||(Ho={}));(function(n){function e(i,r){return{textDocument:i,edits:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Jd.is(r.textDocument)&&Array.isArray(r.edits)}n.is=t})(Ws||(Ws={}));(function(n){function e(i,r,o){var s={kind:"create",uri:i};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(i){var r=i;return r&&r.kind==="create"&&Y.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||Y.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||Y.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||bi.is(r.annotationId))}n.is=t})(Zs||(Zs={}));(function(n){function e(i,r,o,s){var a={kind:"rename",oldUri:i,newUri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(i){var r=i;return r&&r.kind==="rename"&&Y.string(r.oldUri)&&Y.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||Y.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||Y.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||bi.is(r.annotationId))}n.is=t})(Js||(Js={}));(function(n){function e(i,r,o){var s={kind:"delete",uri:i};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(i){var r=i;return r&&r.kind==="delete"&&Y.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||Y.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||Y.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||bi.is(r.annotationId))}n.is=t})(qo||(qo={}));(function(n){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(r){return Y.string(r.kind)?Zs.is(r)||Js.is(r)||qo.is(r):Ws.is(r)}))}n.is=e})($m||($m={}));Wm=function(){function n(e,t){this.edits=e,this.changeAnnotations=t}return n.prototype.insert=function(e,t,i){var r,o;if(i===void 0?r=un.insert(e,t):bi.is(i)?(o=i,r=Ho.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=Ho.insert(e,t,o)),this.edits.push(r),o!==void 0)return o},n.prototype.replace=function(e,t,i){var r,o;if(i===void 0?r=un.replace(e,t):bi.is(i)?(o=i,r=Ho.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=Ho.replace(e,t,o)),this.edits.push(r),o!==void 0)return o},n.prototype.delete=function(e,t){var i,r;if(t===void 0?i=un.del(e):bi.is(t)?(r=t,i=Ho.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),i=Ho.del(e,r)),this.edits.push(i),r!==void 0)return r},n.prototype.add=function(e){this.edits.push(e)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),GN=function(){function n(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(e,t){var i;if(bi.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}(),yde=function(){function n(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new GN(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(Ws.is(i)){var r=new Wm(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(function(i){var r=new Wm(e.changes[i]);t._textEditChanges[i]=r})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(e){if(Jd.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var r=[],o={textDocument:t,edits:r};this._workspaceEdit.documentChanges.push(o),i=new Wm(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var r=[];this._workspaceEdit.changes[e]=r,i=new Wm(r),this._textEditChanges[e]=i}return i}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new GN,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;gl.is(t)||bi.is(t)?r=t:i=t;var o,s;if(r===void 0?o=Zs.create(e,i):(s=bi.is(r)?r:this._changeAnnotations.manage(r),o=Zs.create(e,i,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.renameFile=function(e,t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;gl.is(i)||bi.is(i)?o=i:r=i;var s,a;if(o===void 0?s=Js.create(e,t,r):(a=bi.is(o)?o:this._changeAnnotations.manage(o),s=Js.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},n.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;gl.is(t)||bi.is(t)?r=t:i=t;var o,s;if(r===void 0?o=qo.create(e,i):(s=bi.is(r)?r:this._changeAnnotations.manage(r),o=qo.create(e,i,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n}();(function(n){function e(i){return{uri:i}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)}n.is=t})(XS||(XS={}));(function(n){function e(i,r){return{uri:i,version:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)&&Y.integer(r.version)}n.is=t})(US||(US={}));(function(n){function e(i,r){return{uri:i,version:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)&&(r.version===null||Y.integer(r.version))}n.is=t})(Jd||(Jd={}));(function(n){function e(i,r,o,s){return{uri:i,languageId:r,version:o,text:s}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)&&Y.string(r.languageId)&&Y.integer(r.version)&&Y.string(r.text)}n.is=t})(GS||(GS={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(tc||(tc={}));(function(n){function e(t){var i=t;return i===n.PlainText||i===n.Markdown}n.is=e})(tc||(tc={}));(function(n){function e(t){var i=t;return Y.objectLiteral(t)&&tc.is(i.kind)&&Y.string(i.value)}n.is=e})(Xm||(Xm={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(QS||(QS={}));(function(n){n.PlainText=1,n.Snippet=2})(KS||(KS={}));(function(n){n.Deprecated=1})(zS||(zS={}));(function(n){function e(i,r,o){return{newText:i,insert:r,replace:o}}n.create=e;function t(i){var r=i;return r&&Y.string(r.newText)&&Ne.is(r.insert)&&Ne.is(r.replace)}n.is=t})(VS||(VS={}));(function(n){n.asIs=1,n.adjustIndentation=2})(e0||(e0={}));(function(n){function e(t){return{label:t}}n.create=e})(t0||(t0={}));(function(n){function e(t,i){return{items:t||[],isIncomplete:!!i}}n.create=e})(i0||(i0={}));(function(n){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(i){var r=i;return Y.string(r)||Y.objectLiteral(r)&&Y.string(r.language)&&Y.string(r.value)}n.is=t})($d||($d={}));(function(n){function e(t){var i=t;return!!i&&Y.objectLiteral(i)&&(Xm.is(i.contents)||$d.is(i.contents)||Y.typedArray(i.contents,$d.is))&&(t.range===void 0||Ne.is(t.range))}n.is=e})(n0||(n0={}));(function(n){function e(t,i){return i?{label:t,documentation:i}:{label:t}}n.create=e})(r0||(r0={}));(function(n){function e(t,i){for(var r=[],o=2;o=0;c--){var h=l[c],d=o.offsetAt(h.range.start),g=o.offsetAt(h.range.end);if(g<=u)a=a.substring(0,d)+h.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");u=d}return a}n.applyEdits=i;function r(o,s){if(o.length<=1)return o;var a=o.length/2|0,l=o.slice(0,a),u=o.slice(a);r(l,s),r(u,s);for(var c=0,h=0,d=0;c0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},n.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,r=t.length;if(r===0)return Vt.create(0,e);for(;ie?r=o:i=o+1}var s=i-1;return Vt.create(s,e-t[s])},n.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],r=e.line+1"u"}n.undefined=i;function r(g){return g===!0||g===!1}n.boolean=r;function o(g){return e.call(g)==="[object String]"}n.string=o;function s(g){return e.call(g)==="[object Number]"}n.number=s;function a(g,f,p){return e.call(g)==="[object Number]"&&f<=g&&g<=p}n.numberRange=a;function l(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=l;function u(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=u;function c(g){return e.call(g)==="[object Function]"}n.func=c;function h(g){return g!==null&&typeof g=="object"}n.objectLiteral=h;function d(g,f){return Array.isArray(g)&&g.every(f)}n.typedArray=d})(Y||(Y={}))});var li=m(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ProtocolNotificationType=Qn.ProtocolNotificationType0=Qn.ProtocolRequestType=Qn.ProtocolRequestType0=Qn.RegistrationType=void 0;var ic=Vu(),KN=class{constructor(e){this.method=e}};Qn.RegistrationType=KN;var zN=class extends ic.RequestType0{constructor(e){super(e)}};Qn.ProtocolRequestType0=zN;var VN=class extends ic.RequestType{constructor(e){super(e,ic.ParameterStructures.byName)}};Qn.ProtocolRequestType=VN;var eB=class extends ic.NotificationType0{constructor(e){super(e)}};Qn.ProtocolNotificationType0=eB;var tB=class extends ic.NotificationType{constructor(e){super(e,ic.ParameterStructures.byName)}};Qn.ProtocolNotificationType=tB});var rB=m(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.objectLiteral=Zt.typedArray=Zt.stringArray=Zt.array=Zt.func=Zt.error=Zt.number=Zt.string=Zt.boolean=void 0;function Dde(n){return n===!0||n===!1}Zt.boolean=Dde;function iB(n){return typeof n=="string"||n instanceof String}Zt.string=iB;function xde(n){return typeof n=="number"||n instanceof Number}Zt.number=xde;function Cde(n){return n instanceof Error}Zt.error=Cde;function Sde(n){return typeof n=="function"}Zt.func=Sde;function nB(n){return Array.isArray(n)}Zt.array=nB;function Tde(n){return nB(n)&&n.every(e=>iB(e))}Zt.stringArray=Tde;function kde(n,e){return Array.isArray(n)&&n.every(e)}Zt.typedArray=kde;function Ede(n){return n!==null&&typeof n=="object"}Zt.objectLiteral=Ede});var oB=m(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.ImplementationRequest=void 0;var Pde=li(),_de;(function(n){n.method="textDocument/implementation",n.type=new Pde.ProtocolRequestType(n.method)})(_de=Xd.ImplementationRequest||(Xd.ImplementationRequest={}))});var sB=m(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.TypeDefinitionRequest=void 0;var Rde=li(),Lde;(function(n){n.method="textDocument/typeDefinition",n.type=new Rde.ProtocolRequestType(n.method)})(Lde=Ud.TypeDefinitionRequest||(Ud.TypeDefinitionRequest={}))});var lB=m($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.DidChangeWorkspaceFoldersNotification=$s.WorkspaceFoldersRequest=void 0;var aB=li(),Fde;(function(n){n.type=new aB.ProtocolRequestType0("workspace/workspaceFolders")})(Fde=$s.WorkspaceFoldersRequest||($s.WorkspaceFoldersRequest={}));var Ide;(function(n){n.type=new aB.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})(Ide=$s.DidChangeWorkspaceFoldersNotification||($s.DidChangeWorkspaceFoldersNotification={}))});var uB=m(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.ConfigurationRequest=void 0;var jde=li(),Ade;(function(n){n.type=new jde.ProtocolRequestType("workspace/configuration")})(Ade=Gd.ConfigurationRequest||(Gd.ConfigurationRequest={}))});var hB=m(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.ColorPresentationRequest=Xs.DocumentColorRequest=void 0;var cB=li(),Ode;(function(n){n.method="textDocument/documentColor",n.type=new cB.ProtocolRequestType(n.method)})(Ode=Xs.DocumentColorRequest||(Xs.DocumentColorRequest={}));var Mde;(function(n){n.type=new cB.ProtocolRequestType("textDocument/colorPresentation")})(Mde=Xs.ColorPresentationRequest||(Xs.ColorPresentationRequest={}))});var dB=m(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.FoldingRangeRequest=Us.FoldingRangeKind=void 0;var Nde=li(),Bde;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Bde=Us.FoldingRangeKind||(Us.FoldingRangeKind={}));var Hde;(function(n){n.method="textDocument/foldingRange",n.type=new Nde.ProtocolRequestType(n.method)})(Hde=Us.FoldingRangeRequest||(Us.FoldingRangeRequest={}))});var gB=m(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.DeclarationRequest=void 0;var qde=li(),Yde;(function(n){n.method="textDocument/declaration",n.type=new qde.ProtocolRequestType(n.method)})(Yde=Qd.DeclarationRequest||(Qd.DeclarationRequest={}))});var fB=m(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.SelectionRangeRequest=void 0;var Wde=li(),Zde;(function(n){n.method="textDocument/selectionRange",n.type=new Wde.ProtocolRequestType(n.method)})(Zde=Kd.SelectionRangeRequest||(Kd.SelectionRangeRequest={}))});var mB=m(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.WorkDoneProgressCancelNotification=Cr.WorkDoneProgressCreateRequest=Cr.WorkDoneProgress=void 0;var Jde=Vu(),pB=li(),$de;(function(n){n.type=new Jde.ProgressType;function e(t){return t===n.type}n.is=e})($de=Cr.WorkDoneProgress||(Cr.WorkDoneProgress={}));var Xde;(function(n){n.type=new pB.ProtocolRequestType("window/workDoneProgress/create")})(Xde=Cr.WorkDoneProgressCreateRequest||(Cr.WorkDoneProgressCreateRequest={}));var Ude;(function(n){n.type=new pB.ProtocolNotificationType("window/workDoneProgress/cancel")})(Ude=Cr.WorkDoneProgressCancelNotification||(Cr.WorkDoneProgressCancelNotification={}))});var bB=m(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.CallHierarchyOutgoingCallsRequest=Sr.CallHierarchyIncomingCallsRequest=Sr.CallHierarchyPrepareRequest=void 0;var w0=li(),Gde;(function(n){n.method="textDocument/prepareCallHierarchy",n.type=new w0.ProtocolRequestType(n.method)})(Gde=Sr.CallHierarchyPrepareRequest||(Sr.CallHierarchyPrepareRequest={}));var Qde;(function(n){n.method="callHierarchy/incomingCalls",n.type=new w0.ProtocolRequestType(n.method)})(Qde=Sr.CallHierarchyIncomingCallsRequest||(Sr.CallHierarchyIncomingCallsRequest={}));var Kde;(function(n){n.method="callHierarchy/outgoingCalls",n.type=new w0.ProtocolRequestType(n.method)})(Kde=Sr.CallHierarchyOutgoingCallsRequest||(Sr.CallHierarchyOutgoingCallsRequest={}))});var yB=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.SemanticTokensRefreshRequest=ze.SemanticTokensRangeRequest=ze.SemanticTokensDeltaRequest=ze.SemanticTokensRequest=ze.SemanticTokensRegistrationType=ze.TokenFormat=ze.SemanticTokens=ze.SemanticTokenModifiers=ze.SemanticTokenTypes=void 0;var zd=li(),zde;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator"})(zde=ze.SemanticTokenTypes||(ze.SemanticTokenTypes={}));var Vde;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Vde=ze.SemanticTokenModifiers||(ze.SemanticTokenModifiers={}));var ege;(function(n){function e(t){let i=t;return i!==void 0&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}n.is=e})(ege=ze.SemanticTokens||(ze.SemanticTokens={}));var tge;(function(n){n.Relative="relative"})(tge=ze.TokenFormat||(ze.TokenFormat={}));var ige;(function(n){n.method="textDocument/semanticTokens",n.type=new zd.RegistrationType(n.method)})(ige=ze.SemanticTokensRegistrationType||(ze.SemanticTokensRegistrationType={}));var nge;(function(n){n.method="textDocument/semanticTokens/full",n.type=new zd.ProtocolRequestType(n.method)})(nge=ze.SemanticTokensRequest||(ze.SemanticTokensRequest={}));var rge;(function(n){n.method="textDocument/semanticTokens/full/delta",n.type=new zd.ProtocolRequestType(n.method)})(rge=ze.SemanticTokensDeltaRequest||(ze.SemanticTokensDeltaRequest={}));var oge;(function(n){n.method="textDocument/semanticTokens/range",n.type=new zd.ProtocolRequestType(n.method)})(oge=ze.SemanticTokensRangeRequest||(ze.SemanticTokensRangeRequest={}));var sge;(function(n){n.method="workspace/semanticTokens/refresh",n.type=new zd.ProtocolRequestType0(n.method)})(sge=ze.SemanticTokensRefreshRequest||(ze.SemanticTokensRefreshRequest={}))});var vB=m(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.ShowDocumentRequest=void 0;var age=li(),lge;(function(n){n.method="window/showDocument",n.type=new age.ProtocolRequestType(n.method)})(lge=Vd.ShowDocumentRequest||(Vd.ShowDocumentRequest={}))});var wB=m(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.LinkedEditingRangeRequest=void 0;var uge=li(),cge;(function(n){n.method="textDocument/linkedEditingRange",n.type=new uge.ProtocolRequestType(n.method)})(cge=eg.LinkedEditingRangeRequest||(eg.LinkedEditingRangeRequest={}))});var DB=m(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.WillDeleteFilesRequest=Pt.DidDeleteFilesNotification=Pt.DidRenameFilesNotification=Pt.WillRenameFilesRequest=Pt.DidCreateFilesNotification=Pt.WillCreateFilesRequest=Pt.FileOperationPatternKind=void 0;var nc=li(),hge;(function(n){n.file="file",n.folder="folder"})(hge=Pt.FileOperationPatternKind||(Pt.FileOperationPatternKind={}));var dge;(function(n){n.method="workspace/willCreateFiles",n.type=new nc.ProtocolRequestType(n.method)})(dge=Pt.WillCreateFilesRequest||(Pt.WillCreateFilesRequest={}));var gge;(function(n){n.method="workspace/didCreateFiles",n.type=new nc.ProtocolNotificationType(n.method)})(gge=Pt.DidCreateFilesNotification||(Pt.DidCreateFilesNotification={}));var fge;(function(n){n.method="workspace/willRenameFiles",n.type=new nc.ProtocolRequestType(n.method)})(fge=Pt.WillRenameFilesRequest||(Pt.WillRenameFilesRequest={}));var pge;(function(n){n.method="workspace/didRenameFiles",n.type=new nc.ProtocolNotificationType(n.method)})(pge=Pt.DidRenameFilesNotification||(Pt.DidRenameFilesNotification={}));var mge;(function(n){n.method="workspace/didDeleteFiles",n.type=new nc.ProtocolNotificationType(n.method)})(mge=Pt.DidDeleteFilesNotification||(Pt.DidDeleteFilesNotification={}));var bge;(function(n){n.method="workspace/willDeleteFiles",n.type=new nc.ProtocolRequestType(n.method)})(bge=Pt.WillDeleteFilesRequest||(Pt.WillDeleteFilesRequest={}))});var xB=m(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.MonikerRequest=Tr.MonikerKind=Tr.UniquenessLevel=void 0;var yge=li(),vge;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(vge=Tr.UniquenessLevel||(Tr.UniquenessLevel={}));var wge;(function(n){n.import="import",n.export="export",n.local="local"})(wge=Tr.MonikerKind||(Tr.MonikerKind={}));var Dge;(function(n){n.method="textDocument/moniker",n.type=new yge.ProtocolRequestType(n.method)})(Dge=Tr.MonikerRequest||(Tr.MonikerRequest={}))});var EB=m(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.DocumentLinkRequest=T.CodeLensRefreshRequest=T.CodeLensResolveRequest=T.CodeLensRequest=T.WorkspaceSymbolRequest=T.CodeActionResolveRequest=T.CodeActionRequest=T.DocumentSymbolRequest=T.DocumentHighlightRequest=T.ReferencesRequest=T.DefinitionRequest=T.SignatureHelpRequest=T.SignatureHelpTriggerKind=T.HoverRequest=T.CompletionResolveRequest=T.CompletionRequest=T.CompletionTriggerKind=T.PublishDiagnosticsNotification=T.WatchKind=T.FileChangeType=T.DidChangeWatchedFilesNotification=T.WillSaveTextDocumentWaitUntilRequest=T.WillSaveTextDocumentNotification=T.TextDocumentSaveReason=T.DidSaveTextDocumentNotification=T.DidCloseTextDocumentNotification=T.DidChangeTextDocumentNotification=T.TextDocumentContentChangeEvent=T.DidOpenTextDocumentNotification=T.TextDocumentSyncKind=T.TelemetryEventNotification=T.LogMessageNotification=T.ShowMessageRequest=T.ShowMessageNotification=T.MessageType=T.DidChangeConfigurationNotification=T.ExitNotification=T.ShutdownRequest=T.InitializedNotification=T.InitializeError=T.InitializeRequest=T.WorkDoneProgressOptions=T.TextDocumentRegistrationOptions=T.StaticRegistrationOptions=T.FailureHandlingKind=T.ResourceOperationKind=T.UnregistrationRequest=T.RegistrationRequest=T.DocumentSelector=T.DocumentFilter=void 0;T.MonikerRequest=T.MonikerKind=T.UniquenessLevel=T.WillDeleteFilesRequest=T.DidDeleteFilesNotification=T.WillRenameFilesRequest=T.DidRenameFilesNotification=T.WillCreateFilesRequest=T.DidCreateFilesNotification=T.FileOperationPatternKind=T.LinkedEditingRangeRequest=T.ShowDocumentRequest=T.SemanticTokensRegistrationType=T.SemanticTokensRefreshRequest=T.SemanticTokensRangeRequest=T.SemanticTokensDeltaRequest=T.SemanticTokensRequest=T.TokenFormat=T.SemanticTokens=T.SemanticTokenModifiers=T.SemanticTokenTypes=T.CallHierarchyPrepareRequest=T.CallHierarchyOutgoingCallsRequest=T.CallHierarchyIncomingCallsRequest=T.WorkDoneProgressCancelNotification=T.WorkDoneProgressCreateRequest=T.WorkDoneProgress=T.SelectionRangeRequest=T.DeclarationRequest=T.FoldingRangeRequest=T.ColorPresentationRequest=T.DocumentColorRequest=T.ConfigurationRequest=T.DidChangeWorkspaceFoldersNotification=T.WorkspaceFoldersRequest=T.TypeDefinitionRequest=T.ImplementationRequest=T.ApplyWorkspaceEditRequest=T.ExecuteCommandRequest=T.PrepareRenameRequest=T.RenameRequest=T.PrepareSupportDefaultBehavior=T.DocumentOnTypeFormattingRequest=T.DocumentRangeFormattingRequest=T.DocumentFormattingRequest=T.DocumentLinkResolveRequest=void 0;var Gs=rB(),ve=li(),xge=oB();Object.defineProperty(T,"ImplementationRequest",{enumerable:!0,get:function(){return xge.ImplementationRequest}});var Cge=sB();Object.defineProperty(T,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Cge.TypeDefinitionRequest}});var CB=lB();Object.defineProperty(T,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return CB.WorkspaceFoldersRequest}});Object.defineProperty(T,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return CB.DidChangeWorkspaceFoldersNotification}});var Sge=uB();Object.defineProperty(T,"ConfigurationRequest",{enumerable:!0,get:function(){return Sge.ConfigurationRequest}});var SB=hB();Object.defineProperty(T,"DocumentColorRequest",{enumerable:!0,get:function(){return SB.DocumentColorRequest}});Object.defineProperty(T,"ColorPresentationRequest",{enumerable:!0,get:function(){return SB.ColorPresentationRequest}});var Tge=dB();Object.defineProperty(T,"FoldingRangeRequest",{enumerable:!0,get:function(){return Tge.FoldingRangeRequest}});var kge=gB();Object.defineProperty(T,"DeclarationRequest",{enumerable:!0,get:function(){return kge.DeclarationRequest}});var Ege=fB();Object.defineProperty(T,"SelectionRangeRequest",{enumerable:!0,get:function(){return Ege.SelectionRangeRequest}});var D0=mB();Object.defineProperty(T,"WorkDoneProgress",{enumerable:!0,get:function(){return D0.WorkDoneProgress}});Object.defineProperty(T,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return D0.WorkDoneProgressCreateRequest}});Object.defineProperty(T,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return D0.WorkDoneProgressCancelNotification}});var x0=bB();Object.defineProperty(T,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return x0.CallHierarchyIncomingCallsRequest}});Object.defineProperty(T,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return x0.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(T,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return x0.CallHierarchyPrepareRequest}});var Yo=yB();Object.defineProperty(T,"SemanticTokenTypes",{enumerable:!0,get:function(){return Yo.SemanticTokenTypes}});Object.defineProperty(T,"SemanticTokenModifiers",{enumerable:!0,get:function(){return Yo.SemanticTokenModifiers}});Object.defineProperty(T,"SemanticTokens",{enumerable:!0,get:function(){return Yo.SemanticTokens}});Object.defineProperty(T,"TokenFormat",{enumerable:!0,get:function(){return Yo.TokenFormat}});Object.defineProperty(T,"SemanticTokensRequest",{enumerable:!0,get:function(){return Yo.SemanticTokensRequest}});Object.defineProperty(T,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Yo.SemanticTokensDeltaRequest}});Object.defineProperty(T,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Yo.SemanticTokensRangeRequest}});Object.defineProperty(T,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Yo.SemanticTokensRefreshRequest}});Object.defineProperty(T,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Yo.SemanticTokensRegistrationType}});var Pge=vB();Object.defineProperty(T,"ShowDocumentRequest",{enumerable:!0,get:function(){return Pge.ShowDocumentRequest}});var _ge=wB();Object.defineProperty(T,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return _ge.LinkedEditingRangeRequest}});var fl=DB();Object.defineProperty(T,"FileOperationPatternKind",{enumerable:!0,get:function(){return fl.FileOperationPatternKind}});Object.defineProperty(T,"DidCreateFilesNotification",{enumerable:!0,get:function(){return fl.DidCreateFilesNotification}});Object.defineProperty(T,"WillCreateFilesRequest",{enumerable:!0,get:function(){return fl.WillCreateFilesRequest}});Object.defineProperty(T,"DidRenameFilesNotification",{enumerable:!0,get:function(){return fl.DidRenameFilesNotification}});Object.defineProperty(T,"WillRenameFilesRequest",{enumerable:!0,get:function(){return fl.WillRenameFilesRequest}});Object.defineProperty(T,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return fl.DidDeleteFilesNotification}});Object.defineProperty(T,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return fl.WillDeleteFilesRequest}});var C0=xB();Object.defineProperty(T,"UniquenessLevel",{enumerable:!0,get:function(){return C0.UniquenessLevel}});Object.defineProperty(T,"MonikerKind",{enumerable:!0,get:function(){return C0.MonikerKind}});Object.defineProperty(T,"MonikerRequest",{enumerable:!0,get:function(){return C0.MonikerRequest}});var TB;(function(n){function e(t){let i=t;return Gs.string(i.language)||Gs.string(i.scheme)||Gs.string(i.pattern)}n.is=e})(TB=T.DocumentFilter||(T.DocumentFilter={}));var kB;(function(n){function e(t){if(!Array.isArray(t))return!1;for(let i of t)if(!Gs.string(i)&&!TB.is(i))return!1;return!0}n.is=e})(kB=T.DocumentSelector||(T.DocumentSelector={}));var Rge;(function(n){n.type=new ve.ProtocolRequestType("client/registerCapability")})(Rge=T.RegistrationRequest||(T.RegistrationRequest={}));var Lge;(function(n){n.type=new ve.ProtocolRequestType("client/unregisterCapability")})(Lge=T.UnregistrationRequest||(T.UnregistrationRequest={}));var Fge;(function(n){n.Create="create",n.Rename="rename",n.Delete="delete"})(Fge=T.ResourceOperationKind||(T.ResourceOperationKind={}));var Ige;(function(n){n.Abort="abort",n.Transactional="transactional",n.TextOnlyTransactional="textOnlyTransactional",n.Undo="undo"})(Ige=T.FailureHandlingKind||(T.FailureHandlingKind={}));var jge;(function(n){function e(t){let i=t;return i&&Gs.string(i.id)&&i.id.length>0}n.hasId=e})(jge=T.StaticRegistrationOptions||(T.StaticRegistrationOptions={}));var Age;(function(n){function e(t){let i=t;return i&&(i.documentSelector===null||kB.is(i.documentSelector))}n.is=e})(Age=T.TextDocumentRegistrationOptions||(T.TextDocumentRegistrationOptions={}));var Oge;(function(n){function e(i){let r=i;return Gs.objectLiteral(r)&&(r.workDoneProgress===void 0||Gs.boolean(r.workDoneProgress))}n.is=e;function t(i){let r=i;return r&&Gs.boolean(r.workDoneProgress)}n.hasWorkDoneProgress=t})(Oge=T.WorkDoneProgressOptions||(T.WorkDoneProgressOptions={}));var Mge;(function(n){n.type=new ve.ProtocolRequestType("initialize")})(Mge=T.InitializeRequest||(T.InitializeRequest={}));var Nge;(function(n){n.unknownProtocolVersion=1})(Nge=T.InitializeError||(T.InitializeError={}));var Bge;(function(n){n.type=new ve.ProtocolNotificationType("initialized")})(Bge=T.InitializedNotification||(T.InitializedNotification={}));var Hge;(function(n){n.type=new ve.ProtocolRequestType0("shutdown")})(Hge=T.ShutdownRequest||(T.ShutdownRequest={}));var qge;(function(n){n.type=new ve.ProtocolNotificationType0("exit")})(qge=T.ExitNotification||(T.ExitNotification={}));var Yge;(function(n){n.type=new ve.ProtocolNotificationType("workspace/didChangeConfiguration")})(Yge=T.DidChangeConfigurationNotification||(T.DidChangeConfigurationNotification={}));var Wge;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4})(Wge=T.MessageType||(T.MessageType={}));var Zge;(function(n){n.type=new ve.ProtocolNotificationType("window/showMessage")})(Zge=T.ShowMessageNotification||(T.ShowMessageNotification={}));var Jge;(function(n){n.type=new ve.ProtocolRequestType("window/showMessageRequest")})(Jge=T.ShowMessageRequest||(T.ShowMessageRequest={}));var $ge;(function(n){n.type=new ve.ProtocolNotificationType("window/logMessage")})($ge=T.LogMessageNotification||(T.LogMessageNotification={}));var Xge;(function(n){n.type=new ve.ProtocolNotificationType("telemetry/event")})(Xge=T.TelemetryEventNotification||(T.TelemetryEventNotification={}));var Uge;(function(n){n.None=0,n.Full=1,n.Incremental=2})(Uge=T.TextDocumentSyncKind||(T.TextDocumentSyncKind={}));var Gge;(function(n){n.method="textDocument/didOpen",n.type=new ve.ProtocolNotificationType(n.method)})(Gge=T.DidOpenTextDocumentNotification||(T.DidOpenTextDocumentNotification={}));var Qge;(function(n){function e(i){let r=i;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}n.isIncremental=e;function t(i){let r=i;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}n.isFull=t})(Qge=T.TextDocumentContentChangeEvent||(T.TextDocumentContentChangeEvent={}));var Kge;(function(n){n.method="textDocument/didChange",n.type=new ve.ProtocolNotificationType(n.method)})(Kge=T.DidChangeTextDocumentNotification||(T.DidChangeTextDocumentNotification={}));var zge;(function(n){n.method="textDocument/didClose",n.type=new ve.ProtocolNotificationType(n.method)})(zge=T.DidCloseTextDocumentNotification||(T.DidCloseTextDocumentNotification={}));var Vge;(function(n){n.method="textDocument/didSave",n.type=new ve.ProtocolNotificationType(n.method)})(Vge=T.DidSaveTextDocumentNotification||(T.DidSaveTextDocumentNotification={}));var efe;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(efe=T.TextDocumentSaveReason||(T.TextDocumentSaveReason={}));var tfe;(function(n){n.method="textDocument/willSave",n.type=new ve.ProtocolNotificationType(n.method)})(tfe=T.WillSaveTextDocumentNotification||(T.WillSaveTextDocumentNotification={}));var ife;(function(n){n.method="textDocument/willSaveWaitUntil",n.type=new ve.ProtocolRequestType(n.method)})(ife=T.WillSaveTextDocumentWaitUntilRequest||(T.WillSaveTextDocumentWaitUntilRequest={}));var nfe;(function(n){n.type=new ve.ProtocolNotificationType("workspace/didChangeWatchedFiles")})(nfe=T.DidChangeWatchedFilesNotification||(T.DidChangeWatchedFilesNotification={}));var rfe;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(rfe=T.FileChangeType||(T.FileChangeType={}));var ofe;(function(n){n.Create=1,n.Change=2,n.Delete=4})(ofe=T.WatchKind||(T.WatchKind={}));var sfe;(function(n){n.type=new ve.ProtocolNotificationType("textDocument/publishDiagnostics")})(sfe=T.PublishDiagnosticsNotification||(T.PublishDiagnosticsNotification={}));var afe;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(afe=T.CompletionTriggerKind||(T.CompletionTriggerKind={}));var lfe;(function(n){n.method="textDocument/completion",n.type=new ve.ProtocolRequestType(n.method)})(lfe=T.CompletionRequest||(T.CompletionRequest={}));var ufe;(function(n){n.method="completionItem/resolve",n.type=new ve.ProtocolRequestType(n.method)})(ufe=T.CompletionResolveRequest||(T.CompletionResolveRequest={}));var cfe;(function(n){n.method="textDocument/hover",n.type=new ve.ProtocolRequestType(n.method)})(cfe=T.HoverRequest||(T.HoverRequest={}));var hfe;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(hfe=T.SignatureHelpTriggerKind||(T.SignatureHelpTriggerKind={}));var dfe;(function(n){n.method="textDocument/signatureHelp",n.type=new ve.ProtocolRequestType(n.method)})(dfe=T.SignatureHelpRequest||(T.SignatureHelpRequest={}));var gfe;(function(n){n.method="textDocument/definition",n.type=new ve.ProtocolRequestType(n.method)})(gfe=T.DefinitionRequest||(T.DefinitionRequest={}));var ffe;(function(n){n.method="textDocument/references",n.type=new ve.ProtocolRequestType(n.method)})(ffe=T.ReferencesRequest||(T.ReferencesRequest={}));var pfe;(function(n){n.method="textDocument/documentHighlight",n.type=new ve.ProtocolRequestType(n.method)})(pfe=T.DocumentHighlightRequest||(T.DocumentHighlightRequest={}));var mfe;(function(n){n.method="textDocument/documentSymbol",n.type=new ve.ProtocolRequestType(n.method)})(mfe=T.DocumentSymbolRequest||(T.DocumentSymbolRequest={}));var bfe;(function(n){n.method="textDocument/codeAction",n.type=new ve.ProtocolRequestType(n.method)})(bfe=T.CodeActionRequest||(T.CodeActionRequest={}));var yfe;(function(n){n.method="codeAction/resolve",n.type=new ve.ProtocolRequestType(n.method)})(yfe=T.CodeActionResolveRequest||(T.CodeActionResolveRequest={}));var vfe;(function(n){n.method="workspace/symbol",n.type=new ve.ProtocolRequestType(n.method)})(vfe=T.WorkspaceSymbolRequest||(T.WorkspaceSymbolRequest={}));var wfe;(function(n){n.method="textDocument/codeLens",n.type=new ve.ProtocolRequestType(n.method)})(wfe=T.CodeLensRequest||(T.CodeLensRequest={}));var Dfe;(function(n){n.method="codeLens/resolve",n.type=new ve.ProtocolRequestType(n.method)})(Dfe=T.CodeLensResolveRequest||(T.CodeLensResolveRequest={}));var xfe;(function(n){n.method="workspace/codeLens/refresh",n.type=new ve.ProtocolRequestType0(n.method)})(xfe=T.CodeLensRefreshRequest||(T.CodeLensRefreshRequest={}));var Cfe;(function(n){n.method="textDocument/documentLink",n.type=new ve.ProtocolRequestType(n.method)})(Cfe=T.DocumentLinkRequest||(T.DocumentLinkRequest={}));var Sfe;(function(n){n.method="documentLink/resolve",n.type=new ve.ProtocolRequestType(n.method)})(Sfe=T.DocumentLinkResolveRequest||(T.DocumentLinkResolveRequest={}));var Tfe;(function(n){n.method="textDocument/formatting",n.type=new ve.ProtocolRequestType(n.method)})(Tfe=T.DocumentFormattingRequest||(T.DocumentFormattingRequest={}));var kfe;(function(n){n.method="textDocument/rangeFormatting",n.type=new ve.ProtocolRequestType(n.method)})(kfe=T.DocumentRangeFormattingRequest||(T.DocumentRangeFormattingRequest={}));var Efe;(function(n){n.method="textDocument/onTypeFormatting",n.type=new ve.ProtocolRequestType(n.method)})(Efe=T.DocumentOnTypeFormattingRequest||(T.DocumentOnTypeFormattingRequest={}));var Pfe;(function(n){n.Identifier=1})(Pfe=T.PrepareSupportDefaultBehavior||(T.PrepareSupportDefaultBehavior={}));var _fe;(function(n){n.method="textDocument/rename",n.type=new ve.ProtocolRequestType(n.method)})(_fe=T.RenameRequest||(T.RenameRequest={}));var Rfe;(function(n){n.method="textDocument/prepareRename",n.type=new ve.ProtocolRequestType(n.method)})(Rfe=T.PrepareRenameRequest||(T.PrepareRenameRequest={}));var Lfe;(function(n){n.type=new ve.ProtocolRequestType("workspace/executeCommand")})(Lfe=T.ExecuteCommandRequest||(T.ExecuteCommandRequest={}));var Ffe;(function(n){n.type=new ve.ProtocolRequestType("workspace/applyEdit")})(Ffe=T.ApplyWorkspaceEditRequest||(T.ApplyWorkspaceEditRequest={}))});var _B=m(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.createProtocolConnection=void 0;var PB=Vu();function Ife(n,e,t,i){return PB.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),PB.createMessageConnection(n,e,t,i)}Um.createProtocolConnection=Ife});var RB=m($i=>{"use strict";var jfe=$i&&$i.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t),Object.defineProperty(n,i,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),Gm=$i&&$i.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&jfe(e,n,t)};Object.defineProperty($i,"__esModule",{value:!0});$i.LSPErrorCodes=$i.createProtocolConnection=void 0;Gm(Vu(),$i);Gm((Qr(),Ha(QN)),$i);Gm(li(),$i);Gm(EB(),$i);var Afe=_B();Object.defineProperty($i,"createProtocolConnection",{enumerable:!0,get:function(){return Afe.createProtocolConnection}});var Ofe;(function(n){n.lspReservedErrorRangeStart=-32899,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(Ofe=$i.LSPErrorCodes||($i.LSPErrorCodes={}))});var H=m(Kr=>{"use strict";var Mfe=Kr&&Kr.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t),Object.defineProperty(n,i,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),LB=Kr&&Kr.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Mfe(e,n,t)};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.createProtocolConnection=void 0;var Nfe=MS();LB(MS(),Kr);LB(RB(),Kr);function Bfe(n,e,t,i){return Nfe.createMessageConnection(n,e,t,i)}Kr.createProtocolConnection=Bfe});var Ei=m((S_e,FB)=>{function S0(n,e,t){var i,r,o,s,a;e==null&&(e=100);function l(){var c=Date.now()-s;c=0?i=setTimeout(l,e-c):(i=null,t||(a=n.apply(o,r),o=r=null))}var u=function(){o=this,r=arguments,s=Date.now();var c=t&&!i;return i||(i=setTimeout(l,e)),c&&(a=n.apply(o,r),o=r=null),a};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=n.apply(o,r),o=r=null,clearTimeout(i),i=null)},u}S0.debounce=S0;FB.exports=S0});var jB=m((T_e,IB)=>{"use strict";var Nt={rfc3986:{}};Nt.generate=function(){var n="|",e="0-9",t="["+e+"]",i="a-zA-Z",r="["+i+"]";Nt.rfc3986.cidr=t+n+"[1-2]"+t+n+"3[0-2]";var o=e+"A-Fa-f",s="["+o+"]",a=i+e+"-\\._~",l="!\\$&'\\(\\)\\*\\+,;=",u="%"+o,c=a+u+l+":@",h="["+c+"]",d="0?",g="(?:"+d+d+t+n+d+"[1-9]"+t+n+"1"+t+t+n+"2[0-4]"+t+n+"25[0-5])";Nt.rfc3986.IPv4address="(?:"+g+"\\.){3}"+g;var f=s+"{1,4}",p="(?:"+f+":"+f+"|"+Nt.rfc3986.IPv4address+")",b="(?:"+f+":){6}"+p,v="::(?:"+f+":){5}"+p,w="(?:"+f+")?::(?:"+f+":){4}"+p,D="(?:(?:"+f+":){0,1}"+f+")?::(?:"+f+":){3}"+p,S="(?:(?:"+f+":){0,2}"+f+")?::(?:"+f+":){2}"+p,F="(?:(?:"+f+":){0,3}"+f+")?::"+f+":"+p,L="(?:(?:"+f+":){0,4}"+f+")?::"+p,j="(?:(?:"+f+":){0,5}"+f+")?::"+f,W="(?:(?:"+f+":){0,6}"+f+")?::";Nt.rfc3986.IPv6address="(?:"+b+n+v+n+w+n+D+n+S+n+F+n+L+n+j+n+W+")",Nt.rfc3986.IPvFuture="v"+s+"+\\.["+a+l+":]+",Nt.rfc3986.scheme=r+"["+i+e+"+-\\.]*";var B="["+a+u+l+":]*";Nt.rfc3986.IPLiteral="\\[(?:"+Nt.rfc3986.IPv6address+n+Nt.rfc3986.IPvFuture+")\\]";var N="["+a+u+l+"]{0,255}",I="(?:"+Nt.rfc3986.IPLiteral+n+Nt.rfc3986.IPv4address+n+N+")",M=t+"*",J="(?:"+B+"@)?"+I+"(?::"+M+")?",K=h+"*",ae=h+"+",je="(?:\\/"+K+")*",_e="\\/(?:"+ae+je+")?",Ve=ae+je;Nt.rfc3986.hierPart="(?:(?:\\/\\/"+J+je+")"+n+_e+n+Ve+")",Nt.rfc3986.query="["+c+"\\/\\?]*(?=#|$)",Nt.rfc3986.fragment="["+c+"\\/\\?]*",Nt.rfc3986.uri="^(?:"+Nt.rfc3986.scheme+":"+Nt.rfc3986.hierPart+")(?:\\?"+Nt.rfc3986.query+")?(?:#"+Nt.rfc3986.fragment+")?$"};Nt.generate();IB.exports=Nt.rfc3986});var T0=m((k_e,AB)=>{"use strict";var tg=jB();function Hfe(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}var ig={Uri:{createUriRegex:function(n){if(n=n||{},typeof n!="object"||Array.isArray(n))throw new Error("options must be an object");var e="";if(n.scheme){if(Array.isArray(n.scheme)||(n.scheme=[n.scheme]),n.scheme.length<=0)throw new Error("scheme must have at least 1 scheme specified");for(var t=0;t=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||e&&o===47)i!==-1&&(t+=encodeURIComponent(n.substring(i,r)),i=-1),t!==void 0&&(t+=n.charAt(r));else{t===void 0&&(t=n.substr(0,r));var s=HB[o];s!==void 0?(i!==-1&&(t+=encodeURIComponent(n.substring(i,r)),i=-1),t+=s):i===-1&&(i=r)}}return i!==-1&&(t+=encodeURIComponent(n.substring(i))),t!==void 0?t:n}function Gfe(n){for(var e=void 0,t=0;t1&&n.scheme==="file"?t="//"+n.authority+n.path:n.path.charCodeAt(0)===47&&(n.path.charCodeAt(1)>=65&&n.path.charCodeAt(1)<=90||n.path.charCodeAt(1)>=97&&n.path.charCodeAt(1)<=122)&&n.path.charCodeAt(2)===58?e?t=n.path.substr(1):t=n.path[1].toLowerCase()+n.path.substr(2):t=n.path,ng&&(t=t.replace(/\//g,"\\")),t}function k0(n,e){var t=e?Gfe:MB,i="",r=n.scheme,o=n.authority,s=n.path,a=n.query,l=n.fragment;if(r&&(i+=r,i+=":"),(o||r==="file")&&(i+=kr,i+=kr),o){var u=o.indexOf("@");if(u!==-1){var c=o.substr(0,u);o=o.substr(u+1),u=c.indexOf(":"),u===-1?i+=t(c,!1):(i+=t(c.substr(0,u),!1),i+=":",i+=t(c.substr(u+1),!1)),i+="@"}o=o.toLowerCase(),u=o.indexOf(":"),u===-1?i+=t(o,!1):(i+=t(o.substr(0,u),!1),i+=o.substr(u))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){var h=s.charCodeAt(1);h>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3))}else if(s.length>=2&&s.charCodeAt(1)===58){var h=s.charCodeAt(0);h>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}i+=t(s,!0)}return a&&(i+="?",i+=t(a,!1)),l&&(i+="#",i+=e?l:MB(l,!1)),i}function YB(n){try{return decodeURIComponent(n)}catch{return n.length>3?n.substr(0,3)+YB(n.substr(3)):n}}function Qm(n){return n.match(NB)?n.replace(NB,function(e){return YB(e)}):n}var qfe,Bt,ng,OB,Yfe,Wfe,Zfe,at,kr,Ufe,O,BB,rc,HB,NB,we=_(()=>{"use strict";qfe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o])},n(e,t)};return function(e,t){n(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();typeof process=="object"?ng=process.platform==="win32":typeof navigator=="object"&&(OB=navigator.userAgent,ng=OB.indexOf("Windows")>=0);Yfe=/^\w[\w\d+.-]*$/,Wfe=/^\//,Zfe=/^\/\//;at="",kr="/",Ufe=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,O=function(){function n(e,t,i,r,o,s){s===void 0&&(s=!1),typeof e=="object"?(this.scheme=e.scheme||at,this.authority=e.authority||at,this.path=e.path||at,this.query=e.query||at,this.fragment=e.fragment||at):(this.scheme=$fe(e,s),this.authority=t||at,this.path=Xfe(this.scheme,i||at),this.query=r||at,this.fragment=o||at,Jfe(this,s))}return n.isUri=function(e){return e instanceof n?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="function"&&typeof e.with=="function"&&typeof e.toString=="function":!1},Object.defineProperty(n.prototype,"fsPath",{get:function(){return qB(this,!1)},enumerable:!0,configurable:!0}),n.prototype.with=function(e){if(!e)return this;var t=e.scheme,i=e.authority,r=e.path,o=e.query,s=e.fragment;return t===void 0?t=this.scheme:t===null&&(t=at),i===void 0?i=this.authority:i===null&&(i=at),r===void 0?r=this.path:r===null&&(r=at),o===void 0?o=this.query:o===null&&(o=at),s===void 0?s=this.fragment:s===null&&(s=at),t===this.scheme&&i===this.authority&&r===this.path&&o===this.query&&s===this.fragment?this:new rc(t,i,r,o,s)},n.parse=function(e,t){t===void 0&&(t=!1);var i=Ufe.exec(e);return i?new rc(i[2]||at,Qm(i[4]||at),Qm(i[5]||at),Qm(i[7]||at),Qm(i[9]||at),t):new rc(at,at,at,at,at)},n.file=function(e){var t=at;if(ng&&(e=e.replace(/\\/g,kr)),e[0]===kr&&e[1]===kr){var i=e.indexOf(kr,2);i===-1?(t=e.substring(2),e=kr):(t=e.substring(2,i),e=e.substring(i)||kr)}return new rc("file",t,e,at,at)},n.from=function(e){return new rc(e.scheme,e.authority,e.path,e.query,e.fragment)},n.prototype.toString=function(e){return e===void 0&&(e=!1),k0(this,e)},n.prototype.toJSON=function(){return this},n.revive=function(e){if(e){if(e instanceof n)return e;var t=new rc(e);return t._formatted=e.external,t._fsPath=e._sep===BB?e.fsPath:null,t}else return e},n}(),BB=ng?1:void 0,rc=function(n){qfe(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=qB(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),e.prototype.toString=function(t){return t===void 0&&(t=!1),t?k0(this,!0):(this._formatted||(this._formatted=k0(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=BB),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(O),HB=(Bt={},Bt[58]="%3A",Bt[47]="%2F",Bt[63]="%3F",Bt[35]="%23",Bt[91]="%5B",Bt[93]="%5D",Bt[64]="%40",Bt[33]="%21",Bt[36]="%24",Bt[38]="%26",Bt[39]="%27",Bt[40]="%28",Bt[41]="%29",Bt[42]="%2A",Bt[43]="%2B",Bt[44]="%2C",Bt[59]="%3B",Bt[61]="%3D",Bt[32]="%20",Bt);NB=/(%[0-9A-Za-z][0-9A-Za-z])+/g});var XB=m((P_e,$B)=>{$B.exports=JB;JB.sync=Kfe;var WB=require("fs");function Qfe(n,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{KB.exports=GB;GB.sync=zfe;var UB=require("fs");function GB(n,e,t){UB.stat(n,function(i,r){t(i,i?!1:QB(r,e))})}function zfe(n,e){return QB(UB.statSync(n),e)}function QB(n,e){return n.isFile()&&Vfe(n,e)}function Vfe(n,e){var t=n.mode,i=n.uid,r=n.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,h=t&u||t&l&&r===s||t&a&&i===o||t&c&&o===0;return h}});var eH=m((L_e,VB)=>{var R_e=require("fs"),Km;process.platform==="win32"||global.TESTING_WINDOWS?Km=XB():Km=zB();VB.exports=E0;E0.sync=epe;function E0(n,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,r){E0(n,e||{},function(o,s){o?r(o):i(s)})})}Km(n,e||{},function(i,r){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,r=!1),t(i,r)})}function epe(n,e){try{return Km.sync(n,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var rg=m((F_e,sH)=>{var oc=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",tH=require("path"),tpe=oc?";":":",iH=eH(),nH=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"}),rH=(n,e)=>{let t=e.colon||tpe,i=n.match(/\//)||oc&&n.match(/\\/)?[""]:[...oc?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=oc?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=oc?r.split(t):[""];return oc&&n.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:r}},oH=(n,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:r,pathExtExe:o}=rH(n,e),s=[],a=u=>new Promise((c,h)=>{if(u===i.length)return e.all&&s.length?c(s):h(nH(n));let d=i[u],g=/^".*"$/.test(d)?d.slice(1,-1):d,f=tH.join(g,n),p=!g&&/^\.[\\\/]/.test(n)?n.slice(0,2)+f:f;c(l(p,u,0))}),l=(u,c,h)=>new Promise((d,g)=>{if(h===r.length)return d(a(c+1));let f=r[h];iH(u+f,{pathExt:o},(p,b)=>{if(!p&&b)if(e.all)s.push(u+f);else return d(u+f);return d(l(u,c,h+1))})});return t?a(0).then(u=>t(null,u),t):a(0)},ipe=(n,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:r}=rH(n,e),o=[];for(let s=0;shpe,OperatingSystem:()=>lH,Platform:()=>aH,globals:()=>cpe,isLinux:()=>ope,isMacintosh:()=>sc,isNative:()=>spe,isWeb:()=>ape,isWindows:()=>Xi,language:()=>rpe,platform:()=>lpe});var Vm,eb,P0,_0,npe,rpe,aH,zm,Xi,sc,ope,spe,ape,lpe,upe,cpe,lH,hpe,ac=_(()=>{"use strict";Vm=!1,eb=!1,P0=!1,_0=!1,npe=!1,rpe="en";typeof process=="object"&&typeof process.nextTick=="function"&&typeof process.platform=="string"&&(Vm=process.platform==="win32",eb=process.platform==="darwin",P0=process.platform==="linux",_0=!0);aH=(r=>(r[r.Web=0]="Web",r[r.Mac=1]="Mac",r[r.Linux=2]="Linux",r[r.Windows=3]="Windows",r))(aH||{}),zm=0;_0&&(eb?zm=1:Vm?zm=3:P0&&(zm=2));Xi=Vm,sc=eb,ope=P0,spe=_0,ape=npe,lpe=zm,upe=typeof self=="object"?self:typeof global=="object"?global:{},cpe=upe,lH=(i=>(i[i.Windows=1]="Windows",i[i.Macintosh=2]="Macintosh",i[i.Linux=3]="Linux",i))(lH||{}),hpe=eb?2:Vm?1:3});function og(n){return!!(pl.MarkupContent.is(n)&&n.kind==pl.MarkupKind.Markdown)}function bt(n){return n<=0?Promise.resolve(void 0):new Promise(e=>{setTimeout(()=>{e(void 0)},n)})}function fH(n){return new Promise(e=>{process.nextTick(()=>{n&&n(),e(void 0)})})}function zr(){return new Promise(n=>{setImmediate(()=>{n(void 0)})})}function tb(n,e,t,i){return n?(Xi&&!i&&!n.startsWith("jdt://")&&(n=R0.default.win32.normalize(n)),R0.default.isAbsolute(n)?O.file(n).toString():dH.default.isValid(n)?O.parse(n).toString():t!=""?`${t}:${e}`:`unknown:${e}`):`untitled:${e}`}function Z(n){for(;n.length;){let e=n.pop();e&&e.dispose()}}function sg(n){try{gH.default.sync(n)}catch{return!1}return!0}function Vr(n,e={},t){return Xi||(e.shell=e.shell||process.env.SHELL),e.maxBuffer=500*1024,new Promise((i,r)=>{let o;t&&(o=setTimeout(()=>{r(new Error(`timeout after ${t}s`))},t*1e3)),(0,uH.exec)(n,e,(s,a,l)=>{if(o&&clearTimeout(o),s){r(new Error(`exited with ${s.code}
-${s}
-${l}`));return}i(a)})})}function lc(n,e){let t=(0,cH.default)(e,100);try{let i=hH.default.watch(n,{persistent:!0,recursive:!1,encoding:"utf8"},()=>{t()});return pl.Disposable.create(()=>{t.clear(),i.close()})}catch{return pl.Disposable.create(()=>{t.clear()})}}function pH(n){try{return process.kill(n,0)==!0}catch(e){return e.code==="EPERM"}}function L0(n){return n=="n"||n=="o"||n=="x"||n=="v"?"":n=="i"?"":n=="s"?"":""}function ag(n,e,t=3){if(n.length==0)return Promise.resolve();let i=0,r=n.length,o=n.slice();return new Promise(s=>{let a=l=>{let u=()=>{if(i=i+1,i==r)s();else if(o.length){let c=o.shift();a(c)}};e(l).then(u,u)};for(let l=0;l{"use strict";uH=require("child_process"),cH=C(Ei()),hH=C(require("fs")),dH=C(T0()),R0=C(require("path")),pl=C(H());we();gH=C(rg());ac();A_e=q()("util-index"),Er="coc-settings.json"});function uc(n){return n&&typeof n.word=="string"&&n.user_data!==""}function Kn(n){return typeof n=="boolean"}function Ee(n){return typeof n=="string"}function ib(n){return typeof n=="number"}function Qs(n){return typeof n=="function"}function _t(n){return n!=null&&typeof n=="object"&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function mH(n){if(!_t(n))return!1;for(let e in n)if(dpe.call(n,e))return!1;return!0}function F0(n,e){return Array.isArray(n)&&n.every(e)}var dpe,In=_(()=>{"use strict";dpe=Object.prototype.hasOwnProperty});function Pr(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;let e=Array.isArray(n)?[]:{};return Object.keys(n).forEach(t=>{n[t]&&typeof n[t]=="object"?e[t]=Pr(n[t]):e[t]=n[t]}),e}function bH(n){if(!n||typeof n!="object")return n;let e=[n];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(gpe.call(t,i)){let r=t[i];typeof r=="object"&&!Object.isFrozen(r)&&e.push(r)}}return n}function I0(n,e,t=!0){return _t(n)?(_t(e)&&Object.keys(e).forEach(i=>{i in n?t&&(_t(n[i])&&_t(e[i])?I0(n[i],e[i],t):n[i]=e[i]):n[i]=e[i]}),n):e}function Fe(n,e){if(n===e)return!0;if(n==null||e===null||e===void 0||typeof n!=typeof e||typeof n!="object"||Array.isArray(n)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(t=0;t{"use strict";In();gpe=Object.prototype.hasOwnProperty});function yH(n){return n>=97&&n<=122?1:n>=65&&n<=90?2:0}function vH(n,e){let t=e==0?0:yH(n[e-1]);for(let i=e;i0&&r!=t)return[i,n[i]];t=r}}function wH(n,e){let t=[];for(let i=0;i0?n[0].toUpperCase()+n.slice(1):""}function Ze(n,e){let t=n.slice(0,e);return Buffer.byteLength(t)}function Ui(n,e){return Buffer.from(n,"utf8").slice(0,e).toString("utf8").length}function et(n,e,t){return Buffer.from(n,"utf8").slice(e,t).toString("utf8")}function hc(n){let e=n.charCodeAt(0);return e>128?!1:!!(e==95||e>=48&&e<=57||j0(e))}function j0(n){return n>=65&&n<=90||n>=97&&n<=122}function DH(n,e){return e&&n.endsWith(`
-`)?n.slice(0,-1).split(`
-`):n.split(`
-`)}var Pe=_(()=>{"use strict"});var dc,fpe,xH,E,le=_(()=>{"use strict";dc=C(H());z();Jt();Pe();fpe=q()("events"),xH=class{constructor(){this.handlers=new Map;this._recentInserts=[];this._lastChange=0;this._insertMode=!1;this._pumAlignTop=!1;this._pumVisible=!1;this.completing=!1}get cursor(){return this._cursor}get bufnr(){return this._bufnr}get pumvisible(){return this._pumVisible}get pumAlignTop(){return this._pumAlignTop}get insertMode(){return this._insertMode}get lastChangeTs(){return this._lastChange}race(e,t){let i=[];return new Promise(r=>{if(typeof t=="number"){let o=setTimeout(()=>{Z(i),r(void 0)},t);i.push(dc.Disposable.create(()=>{clearTimeout(o)}))}else dc.CancellationToken.is(t)&&t.onCancellationRequested(()=>{Z(i),r(void 0)},null,i);e.forEach(o=>{this.on(o,(...s)=>{Z(i),r({name:o,args:s})},null,i)})})}async fire(e,t){var r,o;let i=this.handlers.get(e);if(e=="InsertEnter")this._insertMode=!0;else if(e=="InsertLeave")this._insertMode=!1,this._pumVisible=!1,this._recentInserts=[];else if(e=="CursorHoldI"||e=="CursorMovedI")this._bufnr=t[0],this._insertMode||(this._insertMode=!0,this.fire("InsertEnter",[t[0]]));else if(e=="CursorHold"||e=="CursorMoved")this._bufnr=t[0],this._insertMode&&(this._insertMode=!1,this.fire("InsertLeave",[t[0]]));else if(e=="MenuPopupChanged")this._pumVisible=!0,this._pumAlignTop=t[1]>t[0].row;else if(e=="CompleteDone")this._pumVisible=!1;else if(e=="InsertCharPre")this._recentInserts.push([t[1],t[0]]);else if(e=="TextChanged")this._lastChange=Date.now();else if(e=="BufEnter")this._bufnr=t[0];else if(e=="TextChangedI"||e=="TextChangedP"){let s=this._recentInserts.filter(u=>u[0]==t[0]);this._bufnr=t[0],this._recentInserts=[],this._pumVisible=e=="TextChangedP",this._lastChange=Date.now();let a=t[1],l=et((r=a.line)!=null?r:"",0,a.col-1);if(a.pre=l,this._cursor=Object.freeze({bufnr:t[0],lnum:a.lnum,col:a.col,insert:!0}),s.length&&l.length){let u=l.slice(-1);s.findIndex(c=>c[1]==u)!==-1&&(a.insertChar=u,process.nextTick(()=>{this.fire("TextInsert",[...t,u])}))}}if(e=="CursorMoved"||e=="CursorMovedI"){t.push(this._recentInserts.length>0);let s={bufnr:t[0],lnum:t[1][0],col:t[1][1],insert:e=="CursorMovedI"};if(this._cursor&&Fe(this._cursor,s))return;this._cursor=Object.freeze(s)}if(i)try{t.forEach(s=>{typeof s=="object"&&Object.freeze(s)}),await Promise.all(i.slice().map(s=>s(t)))}catch(s){if(s instanceof Error&&((o=s.message)==null?void 0:o.includes("transport disconnected")))return;fpe.error(`Error on event: ${e}`,s instanceof Error?s.stack:s)}}on(e,t,i,r){if(Array.isArray(e)){let o=r||[];for(let s of e)this.on(s,t,i,o);return dc.Disposable.create(()=>{Z(o)})}else{let o=this.handlers.get(e)||[],s=l=>new Promise((u,c)=>{try{Promise.resolve(t.apply(i!=null?i:null,l)).then(()=>{u(void 0)},h=>{c(h)})}catch(h){c(h)}});o.push(s),this.handlers.set(e,o);let a=dc.Disposable.create(()=>{let l=o.indexOf(s);l!==-1&&o.splice(l,1)});return Array.isArray(r)&&r.push(a),a}}},E=new xH});function _H(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ppe(n){gc=n}function ui(n,e){if(e){if(mpe.test(n))return n.replace(bpe,CH)}else if(ype.test(n))return n.replace(vpe,CH);return n}function RH(n){return n.replace(Dpe,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}function lt(n,e){n=n.source||n,e=e||"";let t={replace:(i,r)=>(r=r.source||r,r=r.replace(xpe,"$1"),n=n.replace(i,r),t),getRegex:()=>new RegExp(n,e)};return t}function SH(n,e,t){if(n){let i;try{i=decodeURIComponent(RH(t)).replace(Cpe,"").toLowerCase()}catch{return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}e&&!Spe.test(t)&&(t=Ppe(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function Ppe(n,e){nb[" "+n]||(Tpe.test(n)?nb[" "+n]=n+"/":nb[" "+n]=rb(n,"/",!0)),n=nb[" "+n];let t=n.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:n.replace(kpe,"$1")+e:e.charAt(0)==="/"?t?e:n.replace(Epe,"$1")+e:n+e}function _r(n){let e=1,t,i;for(;e{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),i=t.split(/ \|/),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>e)i.splice(e);else for(;i.length1;)e&1&&(t+=n),e>>=1,n+=n;return t+n}function EH(n,e,t,i){let r=e.href,o=e.title?ui(e.title):null,s=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){i.state.inLink=!0;let a={type:"link",raw:t,href:r,title:o,text:s,tokens:i.inlineTokens(s,[])};return i.state.inLink=!1,a}else return{type:"image",raw:t,href:r,title:o,text:ui(s)}}function Rpe(n,e){let t=n.match(/^(\s+)(?:```)/);if(t===null)return e;let i=t[1];return e.split(`
-`).map(r=>{let o=r.match(/^\s+/);if(o===null)return r;let[s]=o;return s.length>=i.length?r.slice(i.length):r}).join(`
-`)}function Lpe(n){return n.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function PH(n){let e="",t,i,r=n.length;for(t=0;t.5&&(i="x"+i.toString(16)),e+=""+i+";";return e}function fe(n,e,t){if(typeof n>"u"||n===null)throw new Error("marked(): input parameter is undefined or null");if(typeof n!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=_r({},fe.defaults,e||{}),LH(e),t){let i=e.highlight,r;try{r=eo.lex(n,e)}catch(a){return t(a)}let o=function(a){let l;if(!a)try{e.walkTokens&&fe.walkTokens(r,e.walkTokens),l=to.parse(r,e)}catch(u){a=u}return e.highlight=i,a?t(a):t(null,l)};if(!i||i.length<3||(delete e.highlight,!r.length))return o();let s=0;fe.walkTokens(r,function(a){a.type==="code"&&(s++,setTimeout(()=>{i(a.text,a.lang,function(l,u){if(l)return o(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{let i=eo.lex(n,e);return e.walkTokens&&fe.walkTokens(i,e.walkTokens),to.parse(i,e)}catch(i){if(i.message+=`
-Please report this to https://github.com/markedjs/marked.`,e.silent)return"An error occurred:
"+ui(i.message+"",!0)+" ";throw i}}var gc,mpe,bpe,ype,vpe,wpe,CH,Dpe,xpe,Cpe,Spe,nb,Tpe,kpe,Epe,ob,sb,he,ee,eo,ab,A0,O0,to,W_e,Z_e,J_e,$_e,X_e,U_e,G_e,FH=_(()=>{gc=_H();mpe=/[&<>"']/,bpe=/[&<>"']/g,ype=/[<>"']|&(?!#?\w+;)/,vpe=/[<>"']|&(?!#?\w+;)/g,wpe={"&":"&","<":"<",">":">",'"':""","'":"'"},CH=n=>wpe[n];Dpe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;xpe=/(^|[^\[])\^/g;Cpe=/[^\w:]/g,Spe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;nb={},Tpe=/^[^:]+:\/*[^/]*$/,kpe=/^([^:]+:)[\s\S]*$/,Epe=/^([^:]+:\/*[^/]*)[\s\S]*$/;ob={exec:function(){}};sb=class{constructor(e){this.options=e||gc}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:rb(i,`
-`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let i=t[0],r=Rpe(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){let o=rb(i,"#");(this.options.pedantic||!o||/ $/.test(o))&&(i=o.trim())}let r={type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let i=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,r,o,s,a,l,u,c,h,d,g,f,p=t[1].trim(),b=p.length>1,v={type:"list",raw:"",ordered:b,start:b?+p.slice(0,-1):"",loose:!1,items:[]};p=b?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=b?p:"[*+-]");let w=new RegExp(`^( {0,3}${p})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,!(!(t=w.exec(e))||this.rules.block.hr.test(e)));){if(i=t[0],e=e.substring(i.length),c=t[2].split(`
-`,1)[0],h=e.split(`
-`,1)[0],this.options.pedantic?(s=2,g=c.trimLeft()):(s=t[2].search(/[^ ]/),s=s>4?1:s,g=c.slice(s),s+=t[1].length),l=!1,!c&&/^ *$/.test(h)&&(i+=h+`
-`,e=e.substring(h.length+1),f=!0),!f){let S=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(d=e.split(`
-`,1)[0],c=d,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!S.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())g+=`
-`+c.slice(s);else if(!l)g+=`
-`+c;else break;!l&&!c.trim()&&(l=!0),i+=d+`
-`,e=e.substring(d.length+1)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(i)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(g),r&&(o=r[0]!=="[ ] ",g=g.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:i,task:!!r,checked:o,loose:!1,text:g}),v.raw+=i}v.items[v.items.length-1].raw=i.trimRight(),v.items[v.items.length-1].text=g.trimRight(),v.raw=v.raw.trimRight();let D=v.items.length;for(a=0;aL.type==="space"),F=S.every(L=>{let j=L.raw.split(""),W=0;for(let B of j)if(B===`
-`&&(W+=1),W>1)return!0;return!1});!v.loose&&S.length&&F&&(v.loose=!0,v.items[a].loose=!0)}return v}}html(e){let t=this.rules.block.html.exec(e);if(t){let i={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};return this.options.sanitize&&(i.type="paragraph",i.text=this.options.sanitizer?this.options.sanitizer(t[0]):ui(t[0]),i.tokens=[],this.lexer.inline(i.text,i.tokens)),i}}def(e){let t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));let i=t[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:i,raw:t[0],href:t[2],title:t[3]}}}table(e){let t=this.rules.block.table.exec(e);if(t){let i={type:"table",header:TH(t[1]).map(r=>({text:r})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
-`):[]};if(i.header.length===i.align.length){i.raw=t[0];let r=i.align.length,o,s,a,l;for(o=0;o({text:u}));for(r=i.header.length,s=0;s/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):ui(t[0]):t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;let s=rb(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=_pe(t[2],"()");if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(i)?r=r.slice(1):r=r.slice(1,-1)),EH(t,{href:r&&r.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let r=(i[2]||i[1]).replace(/\s+/g," ");if(r=t[r.toLowerCase()],!r||!r.href){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return EH(i,r,i[0],this.lexer)}}emStrong(e,t,i=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r||r[3]&&i.match(/[\p{L}\p{N}]/u))return;let o=r[1]||r[2]||"";if(!o||o&&(i===""||this.rules.inline.punctuation.exec(i))){let s=r[0].length-1,a,l,u=s,c=0,h=r[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+s);(r=h.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=a.length,r[3]||r[4]){u+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(s,l)%2){let g=e.slice(1,s+r.index+l);return{type:"em",raw:e.slice(0,s+r.index+l+1),text:g,tokens:this.lexer.inlineTokens(g,[])}}let d=e.slice(2,s+r.index+l-1);return{type:"strong",raw:e.slice(0,s+r.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," "),r=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return r&&o&&(i=i.substring(1,i.length-1)),i=ui(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){let i=this.rules.inline.autolink.exec(e);if(i){let r,o;return i[2]==="@"?(r=ui(this.options.mangle?t(i[1]):i[1]),o="mailto:"+r):(r=ui(i[1]),o=r),{type:"link",raw:i[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let r,o;if(i[2]==="@")r=ui(this.options.mangle?t(i[0]):i[0]),o="mailto:"+r;else{let s;do s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0];while(s!==i[0]);r=ui(i[0]),i[1]==="www."?o="http://"+r:o=r}return{type:"link",raw:i[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e,t){let i=this.rules.inline.text.exec(e);if(i){let r;return this.lexer.state.inRawBlock?r=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):ui(i[0]):i[0]:r=ui(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:r}}}},he={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ob,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};he._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;he.def=lt(he.def).replace("label",he._label).replace("title",he._title).getRegex();he.bullet=/(?:[*+-]|\d{1,9}[.)])/;he.listItemStart=lt(/^( *)(bull) */).replace("bull",he.bullet).getRegex();he.list=lt(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex();he._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";he._comment=/|$)/;he.html=lt(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();he.paragraph=lt(he._paragraph).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he._tag).getRegex();he.blockquote=lt(he.blockquote).replace("paragraph",he.paragraph).getRegex();he.normal=_r({},he);he.gfm=_r({},he.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});he.gfm.table=lt(he.gfm.table).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he._tag).getRegex();he.gfm.paragraph=lt(he._paragraph).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",he.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he._tag).getRegex();he.pedantic=_r({},he.normal,{html:lt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ob,paragraph:lt(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^
-]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ob,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ob,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ee.punctuation=lt(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex();ee.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ee.escapedEmSt=/\\\*|\\_/g;ee._comment=lt(he._comment).replace("(?:-->|$)","-->").getRegex();ee.emStrong.lDelim=lt(ee.emStrong.lDelim).replace(/punct/g,ee._punctuation).getRegex();ee.emStrong.rDelimAst=lt(ee.emStrong.rDelimAst,"g").replace(/punct/g,ee._punctuation).getRegex();ee.emStrong.rDelimUnd=lt(ee.emStrong.rDelimUnd,"g").replace(/punct/g,ee._punctuation).getRegex();ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ee._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;ee.autolink=lt(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex();ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ee.tag=lt(ee.tag).replace("comment",ee._comment).replace("attribute",ee._attribute).getRegex();ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ee._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ee.link=lt(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex();ee.reflink=lt(ee.reflink).replace("label",ee._label).replace("ref",he._label).getRegex();ee.nolink=lt(ee.nolink).replace("ref",he._label).getRegex();ee.reflinkSearch=lt(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex();ee.normal=_r({},ee);ee.pedantic=_r({},ee.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:lt(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:lt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()});ee.gfm=_r({},ee.normal,{escape:lt(ee.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\(i=a.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&t.length>0?t[t.length-1].raw+=`
-`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
-`+i.raw,r.text+=`
-`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
-`+i.raw,r.text+=`
-`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){r=t[t.length-1],s&&r.type==="paragraph"?(r.raw+=`
-`+i.raw,r.text+=`
-`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&r.type==="text"?(r.raw+=`
-`+i.raw,r.text+=`
-`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let i,r,o,s=e,a,l,u;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+kH("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+kH("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(i=c.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),r=t[t.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,s,u)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e,PH)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e,PH))){e=e.substring(i.raw.length),t.push(i);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0,h=e.slice(1),d;this.options.extensions.startInline.forEach(function(g){d=g.call({lexer:this},h),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(i=this.tokenizer.inlineText(o,Lpe)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(u=i.raw.slice(-1)),l=!0,r=t[t.length-1],r&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},ab=class{constructor(e){this.options=e||gc}code(e,t,i){let r=(t||"").match(/\S*/)[0];if(this.options.highlight){let o=this.options.highlight(e,r);o!=null&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+`
-`,r?''+(i?e:ui(e,!0))+`
-`:""+(i?e:ui(e,!0))+`
-`}blockquote(e){return`
-`+e+`
-`}html(e){return e}heading(e,t,i,r){return this.options.headerIds?"
-`:""+e+"
-`}hr(){return this.options.xhtml?`
-`:`
-`}list(e,t,i){let r=t?"ol":"ul",o=t&&i!==1?' start="'+i+'"':"";return"<"+r+o+`>
-`+e+""+r+`>
-`}listitem(e){return""+e+`
-`}checkbox(e){return" "}paragraph(e){return""+e+`
-`}table(e,t){return t&&(t=""+t+" "),`
-`}tablerow(e){return`
-`+e+`
-`}tablecell(e,t){let i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+""+i+`>
-`}strong(e){return""+e+" "}em(e){return""+e+" "}codespan(e){return""+e+"
"}br(){return this.options.xhtml?" ":" "}del(e){return""+e+""}link(e,t,i){if(e=SH(this.options.sanitize,this.options.baseUrl,e),e===null)return i;let r='"+i+" ",r}image(e,t,i){if(e=SH(this.options.sanitize,this.options.baseUrl,e),e===null)return i;let r=' ":">",r}text(e){return e}},A0=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}},O0=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,r=0;if(this.seen.hasOwnProperty(i)){r=this.seen[e];do r++,i=e+"-"+r;while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=r,this.seen[i]=0),i}slug(e,t={}){let i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}},to=class{constructor(e){this.options=e||gc,this.options.renderer=this.options.renderer||new ab,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new A0,this.slugger=new O0}static parse(e,t){return new to(t).parse(e)}static parseInline(e,t){return new to(t).parseInline(e)}parse(e,t=!0){let i="",r,o,s,a,l,u,c,h,d,g,f,p,b,v,w,D,S,F,L,j=e.length;for(r=0;r0&&w.tokens[0].type==="paragraph"?(w.tokens[0].text=F+" "+w.tokens[0].text,w.tokens[0].tokens&&w.tokens[0].tokens.length>0&&w.tokens[0].tokens[0].type==="text"&&(w.tokens[0].tokens[0].text=F+" "+w.tokens[0].tokens[0].text)):w.tokens.unshift({type:"text",text:F}):v+=F),v+=this.parse(w.tokens,b),d+=this.renderer.listitem(v,S,D);i+=this.renderer.list(d,f,p);continue}case"html":{i+=this.renderer.html(g.text);continue}case"paragraph":{i+=this.renderer.paragraph(this.parseInline(g.tokens));continue}case"text":{for(d=g.tokens?this.parseInline(g.tokens):g.text;r+1{if(r.extensions&&(i=!0,r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){let s=t.renderers?t.renderers[o.name]:null;s?t.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)})),r.renderer){let o=fe.defaults.renderer||new ab;for(let s in r.renderer){let a=o[s];o[s]=(...l)=>{let u=r.renderer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}e.renderer=o}if(r.tokenizer){let o=fe.defaults.tokenizer||new sb;for(let s in r.tokenizer){let a=o[s];o[s]=(...l)=>{let u=r.tokenizer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}e.tokenizer=o}if(r.walkTokens){let o=fe.defaults.walkTokens;e.walkTokens=function(s){r.walkTokens.call(this,s),o&&o.call(this,s)}}i&&(e.extensions=t),fe.setOptions(e)})};fe.walkTokens=function(n,e){for(let t of n)switch(e.call(fe,t),t.type){case"table":{for(let i of t.header)fe.walkTokens(i.tokens,e);for(let i of t.rows)for(let r of i)fe.walkTokens(r.tokens,e);break}case"list":{fe.walkTokens(t.items,e);break}default:fe.defaults.extensions&&fe.defaults.extensions.childTokens&&fe.defaults.extensions.childTokens[t.type]?fe.defaults.extensions.childTokens[t.type].forEach(function(i){fe.walkTokens(t[i],e)}):t.tokens&&fe.walkTokens(t.tokens,e)}};fe.parseInline=function(n,e){if(typeof n>"u"||n===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof n!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected");e=_r({},fe.defaults,e||{}),LH(e);try{let t=eo.lexInline(n,e);return e.walkTokens&&fe.walkTokens(t,e.walkTokens),to.parseInline(t,e)}catch(t){if(t.message+=`
-Please report this to https://github.com/markedjs/marked.`,e.silent)return"An error occurred:
"+ui(t.message+"",!0)+" ";throw t}};fe.Parser=to;fe.parser=to.parse;fe.Renderer=ab;fe.TextRenderer=A0;fe.Lexer=eo;fe.lexer=eo.lex;fe.Tokenizer=sb;fe.Slugger=O0;fe.parse=fe;W_e=fe.options,Z_e=fe.setOptions,J_e=fe.use,$_e=fe.walkTokens,X_e=fe.parseInline,U_e=to.parse,G_e=eo.lex});var OH=m((K_e,AH)=>{var jH={};AH.exports=jH;var IH={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(IH).forEach(function(n){var e=IH[n],t=jH[n]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var NH=m((z_e,MH)=>{var lg=process.argv;MH.exports=function(){return lg.indexOf("--no-color")!==-1||lg.indexOf("--color=false")!==-1?!1:lg.indexOf("--color")!==-1||lg.indexOf("--color=true")!==-1||lg.indexOf("--color=always")!==-1?!0:process.stdout&&!process.stdout.isTTY?!1:process.platform==="win32"||"COLORTERM"in process.env?!0:process.env.TERM==="dumb"?!1:!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)}()});var HH=m((V_e,BH)=>{BH.exports=function(e,t){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var r={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=r[o]||[" "],a=Math.floor(Math.random()*s.length);typeof r[o]<"u"?i+=r[o][a]:i+=o}),i}});var YH=m((eRe,qH)=>{qH.exports=function(e,t){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},r=[].concat(i.up,i.down,i.mid),o={};function s(u){var c=Math.floor(Math.random()*u);return c}function a(u){var c=!1;return r.filter(function(h){c=h===u}),c}function l(u,c){var h="",d,g;c=c||{},c.up=c.up||!0,c.mid=c.mid||!0,c.down=c.down||!0,c.size=c.size||"maxi",u=u.split("");for(g in u)if(!a(g)){switch(h=h+u[g],d={up:0,down:0,mid:0},c.size){case"mini":d.up=s(8),d.min=s(2),d.down=s(8);break;case"maxi":d.up=s(16)+3,d.min=s(4)+1,d.down=s(64)+3;break;default:d.up=s(8)+1,d.mid=s(6)/2,d.down=s(8)+1;break}var f=["up","mid","down"];for(var p in f)for(var b=f[p],v=0;v<=d[b];v++)c[b]&&(h=h+i[b][s(i[b].length)])}return h}return l(e)}});var ZH=m((tRe,WH)=>{var M0=fc();WH.exports=function(){return function(n,e,t){if(n===" ")return n;switch(e%3){case 0:return M0.red(n);case 1:return M0.white(n);case 2:return M0.blue(n)}}}()});var $H=m((iRe,JH)=>{var Fpe=fc();JH.exports=function(n,e,t){return e%2===0?n:Fpe.inverse(n)}});var UH=m((nRe,XH)=>{var Ipe=fc();XH.exports=function(){var n=["red","yellow","green","blue","magenta"];return function(e,t,i){return e===" "?e:Ipe[n[t++%n.length]](e)}}()});var QH=m((rRe,GH)=>{var jpe=fc();GH.exports=function(){var n=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(e,t,i){return e===" "?e:jpe[n[Math.round(Math.random()*(n.length-1))]](e)}}()});var fc=m((sRe,iq)=>{var tt={};iq.exports=tt;tt.themes={};var Ks=tt.styles=OH(),VH=Object.defineProperties;tt.supportsColor=NH();typeof tt.enabled>"u"&&(tt.enabled=tt.supportsColor);tt.stripColors=tt.strip=function(n){return(""+n).replace(/\x1B\[\d+m/g,"")};var oRe=tt.stylize=function(e,t){return Ks[t].open+e+Ks[t].close},Ape=/[|\\{}()[\]^$+*?.]/g,Ope=function(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(Ape,"\\$&")};function eq(n){var e=function t(){return Npe.apply(t,arguments)};return e._styles=n,e.__proto__=Mpe,e}var tq=function(){var n={};return Ks.grey=Ks.gray,Object.keys(Ks).forEach(function(e){Ks[e].closeRe=new RegExp(Ope(Ks[e].close),"g"),n[e]={get:function(){return eq(this._styles.concat(e))}}}),n}(),Mpe=VH(function(){},tq);function Npe(){var n=arguments,e=n.length,t=e!==0&&String(arguments[0]);if(e>1)for(var i=1;i{var qpe=fc();nq.exports=qpe});var sq=m(pc=>{pc.repeat=function(n,e){return Array(e+1).join(n)};pc.pad=function(n,e,t,i){if(e+1>=n.length)switch(i){case"left":n=Array(e+1-n.length).join(t)+n;break;case"both":var r=Math.ceil((padlen=e-n.length)/2),o=padlen-r;n=Array(o+1).join(t)+n+Array(r+1).join(t);break;default:n=n+Array(e+1-n.length).join(t)}return n};pc.truncate=function(n,e,t){return t=t||"\u2026",n.length>=e?n.substr(0,e-t.length)+t:n};function oq(n,e){for(var t in e)t==="__proto__"||t==="constructor"||t==="prototype"||(e[t]&&e[t].constructor&&e[t].constructor===Object?(n[t]=n[t]||{},oq(n[t],e[t])):n[t]=e[t]);return n}pc.options=oq;pc.strlen=function(n){var e=/\u001b\[(?:\d*;){0,5}\d*m/g,t=(""+n).replace(e,""),i=t.split(`
-`);return i.reduce(function(r,o){return o.length>r?o.length:r},0)}});var aq=m((uRe,B0)=>{var Ype=rq(),ml=sq(),N0=ml.repeat,Wpe=ml.truncate,Zpe=ml.pad;function ug(n){this.options=ml.options({chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],colAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]},n)}ug.prototype.__proto__=Array.prototype;ug.prototype.__defineGetter__("width",function(){var n=this.toString().split(`
-`);return n.length?n[0].length:0});ug.prototype.render;ug.prototype.toString=function(){var n="",e=this.options,t=e.style,i=e.head,r=e.chars,o=e.truncate,s=e.colWidths||new Array(this.head.length),a=0;if(!i.length&&!this.length)return"";if(!s.length){var l=this.slice(0);i.length&&(l=l.concat([i])),l.forEach(function(v){if(typeof v=="object"&&v.length)u(v);else{var w=Object.keys(v)[0],D=v[w];s[0]=Math.max(s[0]||0,c(w)||0),typeof D=="object"&&D.length?u(D,1):s[1]=Math.max(s[1]||0,c(D)||0)}})}a=(s.length==1?s[0]:s.reduce(function(v,w){return v+w}))+s.length+1;function u(v,D){var D=D||0;v.forEach(function(S,F){s[F+D]=Math.max(s[F+D]||0,c(S)||0)})}function c(v){return typeof v=="object"&&v.width!=null?v.width:(typeof v=="object"?ml.strlen(v.text):ml.strlen(v))+(t["padding-left"]||0)+(t["padding-right"]||0)}function h(L,w,D,S){var F=0,L=w+N0(L,a-2)+D;return s.forEach(function(j,W){W!=s.length-1&&(F+=j+1,L=L.substr(0,F)+S+L.substr(F+1))}),f(e.style.border,L)}function d(){var v=h(r.top,r["top-left"]||r.top,r["top-right"]||r.top,r["top-mid"]);v&&(n+=v+`
-`)}function g(v,w){var D=[],S=0;if(!Array.isArray(v)&&typeof v=="object"){var F=Object.keys(v)[0],L=v[F],j=!0;Array.isArray(L)?(v=L,v.unshift(F)):v=[F,L]}v.forEach(function(N,I){var M=N.toString().split(`
-`).reduce(function(K,ae){return K.push(p(ae,I)),K},[]),J=M.length;J>S&&(S=J),D.push({contents:M,height:J})});var W=new Array(S);D.forEach(function(N,I){N.contents.forEach(function(K,ae){W[ae]||(W[ae]=[]),(w||j&&I===0&&e.style.head)&&(K=f(e.style.head,K)),W[ae].push(K)});for(var M=N.height,J=S;M0&&(B+=`
-`+f(e.style.border,r.left)),B+=N.join(f(e.style.border,r.middle))+f(e.style.border,r.right)}),f(e.style.border,r.left)+B}function f(v,w){return w?(v.forEach(function(D){w=Ype[D](w)}),w):""}function p(D,w){var D=String(typeof D=="object"&&D.text?D.text:D),S=ml.strlen(D),F=s[w]-(t["padding-left"]||0)-(t["padding-right"]||0),L=e.colAligns[w]||"left";return N0(" ",t["padding-left"]||0)+(S==F?D:S{"use strict";var lq=(n=0)=>e=>`\x1B[${38+n};5;${e}m`,uq=(n=0)=>(e,t,i)=>`\x1B[${38+n};2;${e};${t};${i}m`;function Jpe(){let n=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[t,i]of Object.entries(e)){for(let[r,o]of Object.entries(i))e[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[r]=e[r],n.set(o[0],o[1]);Object.defineProperty(e,t,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:n,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi256=lq(),e.color.ansi16m=uq(),e.bgColor.ansi256=lq(10),e.bgColor.ansi16m=uq(10),Object.defineProperties(e,{rgbToAnsi256:{value:(t,i,r)=>t===i&&i===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(i/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let i=/(?[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!i)return[0,0,0];let{colorString:r}=i.groups;r.length===3&&(r=r.split("").map(s=>s+s).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1}}),e}Object.defineProperty(cq,"exports",{enumerable:!0,get:Jpe})});function dq(n){return`${yi.default.gray.open}${n}${yi.default.gray.close}`}function H0(n){return`${yi.default.magenta.open}${n}${yi.default.magenta.close}`}function gq(n){return`${yi.default.bold.open}${n}${yi.default.bold.close}`}function q0(n){return`${yi.default.underline.open}${n}${yi.default.underline.close}`}function fq(n){return`${yi.default.strikethrough.open}${n}${yi.default.strikethrough.close}`}function pq(n){return`${yi.default.italic.open}${n}${yi.default.italic.close}`}function mq(n){return`${yi.default.yellow.open}${n}${yi.default.yellow.close}`}function Y0(n){return`${yi.default.blue.open}${n}${yi.default.blue.close}`}var yi,bq=_(()=>{"use strict";yi=C(hq())});function Rr(n){return n}function Qpe(n){return dq(n.replace(/(<([^>]+)>)/ig,""))}function yq(n,e){return e?n.replace(Gpe,/\n/g):n}function zpe(n,e){return e.replace(/(^|\n)(.+)/g,"$1"+n+"$2")}function Vpe(n,e){return e&&n+e.split(`
-`).join(`
-`+n)}function ime(n,e){let t=new RegExp("(\\S(?: | )?)((?:"+e+")+)("+Sq+"(?:.*)+)$","gm");return n.replace(t,`$1
-`+e+"$2$3")}function kq(n){return" ".repeat(n.length)}function nme(n,e){return Tq(e,n)?e:kq(J0)+e}function rme(n,e){let t=nme.bind(null,e);return n.split(`
-`).filter(Rr).map(t).join(`
-`)}function ome(n,e,t){return Tq(e,n)?{num:t+1,line:e.replace(J0,vq(t+1))}:{num:t,line:kq(vq(t))+e}}function sme(n,e){let t=ome.bind(null,e),i=0;return n.split(`
-`).filter(Rr).map(r=>{let o=t(r,i);return i=o.num,o.line}).join(`
-`)}function ame(n,e,t){return n=n.trim(),n=e?sme(n,t):rme(n,t),n}function cg(n){return n+`
-
-`}function lme(n){return n.replace(Upe,":")}function wq(n,e=null){if(!n)return[];e=e||Rr;let t=e(n).split(`
-`),i=[];return t.forEach(function(r){if(!r)return;let o=r.replace(Xpe,"").split(xq);i.push(o.splice(0,o.length-1))}),i}function Eq(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function ume(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}var Dq,hRe,xq,Z0,Xpe,Cq,Upe,Gpe,Kpe,eme,tme,Sq,Tq,J0,vq,W0,Pq,$0,_q=_(()=>{"use strict";Dq=C(aq());bq();hRe=q()("markdown-renderer"),xq="^*||*^",Z0="*|*|*|*",Xpe=new RegExp(Eq(Z0),"g"),Cq="*#COLON|*",Upe=new RegExp(Eq(Cq),"g"),Gpe="\r";Kpe={code:Rr,blockquote:Rr,html:Qpe,heading:H0,firstHeading:H0,hr:Rr,listitem:Rr,list:ame,table:Rr,paragraph:Rr,strong:gq,em:pq,codespan:mq,del:fq,link:q0,href:q0,text:Rr,unescape:!0,emoji:!1,width:80,showSectionPrefix:!0,tab:2,tableOptions:{}};eme="\\*",tme="\\d+\\.",Sq="(?:"+[eme,tme].join("|")+")";Tq=function(n,e){return n.match("^(?:"+e+")*"+Sq)};J0="* ";vq=function(n){return n+". "};W0=new Map,Pq=class{constructor(e={},t={}){this.options=e;this.highlightOptions=t;this.o=Object.assign({},Kpe,e),this.tab=" ",this.tableSettings=this.o.tableOptions,this.unescape=this.o.unescape?ume:Rr,this.highlightOptions=t||{},this.transform=this.compose(lme,this.unescape)}text(e){return this.o.text(e)}code(e,t,i){return"``` "+t+`
-`+e+"\n```\n"}blockquote(e){return cg(this.o.blockquote(Vpe(this.tab,e.trim())))}html(e){return this.o.html(e)}heading(e,t,i){return e=this.transform(e),e=(this.o.showSectionPrefix?new Array(t+1).join("#")+" ":"")+e,cg(t===1?this.o.firstHeading(e):this.o.heading(e))}hr(){return`\u2500\u2500\u2500
-`}list(e,t){return e=this.o.list(e,t,this.tab),cg(ime(zpe(this.tab,e),this.tab))}listitem(e){let t=this.compose(this.o.listitem,this.transform);return e.indexOf(`
-`)!==-1&&(e=e.trim()),`
-`+J0+t(e)}checkbox(e){return"["+(e?"X":" ")+"] "}paragraph(e){return e=this.compose(this.o.paragraph,this.transform)(e),cg(e)}table(e,t){let i=new Dq.default(Object.assign({},{head:wq(e)[0]},this.tableSettings));return wq(t,this.transform).forEach(function(r){i.push(r)}),cg(this.o.table(i.toString()))}tablerow(e){return Z0+e+Z0+`
-`}tablecell(e,t){return e+xq}strong(e){return this.o.strong(e)}em(e){return e=yq(e,this.o.reflowText),this.o.em(e)}codespan(e){return e=yq(e,this.o.reflowText),this.o.codespan(e.replace(/:/g,Cq))}br(){return`
-`}del(e){return this.o.del(e)}link(e,t,i){let r;try{r=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch{return""}if(r.startsWith("javascript:"))return"";if(i&&e&&i!=e&&W0.set(i,e),i&&i!=e)return Y0(i);let o=this.o.href(e);return this.o.link(o)}image(e,t,i){let r="!["+i;return t&&(r+=" \u2013 "+t),r+"]("+e+")"}compose(...e){return(...t)=>{for(let i=e.length;i-- >0;)t=[e[i].apply(this,t)];return t[0]}}static getLinks(){let e=[];for(let[t,i]of W0.entries())e.push(`${Y0(t)}: ${i}`);return W0.clear(),e}},$0=Pq});function mc(n,e=!1){let t=hg(n),i=[],r="";for(let o of t){if(!o.text)continue;let{foreground:s,background:a}=o,l=Q(r),u=[l,l+Q(o.text)];if(s&&a){let c=`CocList${hn(s)}${hn(a)}`;i.push({span:u,hlGroup:c})}else if(s){let c;e?s=="yellow"?c="CocMarkdownCode":s=="blue"?c="CocMarkdownLink":s=="magenta"?c="CocMarkdownHeader":c=`CocListFg${hn(s)}`:c=`CocListFg${hn(s)}`,i.push({span:u,hlGroup:c})}else if(a){let c=`CocListBg${hn(a)}`;i.push({span:u,hlGroup:c})}o.bold?i.push({span:u,hlGroup:"CocBold"}):o.italic?i.push({span:u,hlGroup:"CocItalic"}):o.underline?i.push({span:u,hlGroup:"CocUnderline"}):o.strikethrough&&i.push({span:u,hlGroup:"CocStrikeThrough"}),r=r+o.text}return{line:r,highlights:i}}function hg(n){let e=null,t=null,i="",r=[],o=[],s={},a;a=()=>{let l,u;i.length?i=i.substr(0,i.length-1):o.length&&(l=o.length-1,u=o[l].text,u.length===1?o.pop():o[l].text=u.substr(0,u.length-1))};for(let l=0;l{Rq[u]?s.foreground=Rq[u]:Lq[u]?s.background=Lq[u]:u==39?delete s.foreground:u==49?delete s.background:Fq[u]?s[Fq[u]]=!0:u==22?s.bold=!1:u==23?s.italic=!1:u==24?s.underline=!1:u==29&&(s.strikethrough=!1)}),r=[]):t+=n[l];continue}n[l]=="\x1B"?e=n[l]:n[l]=="\b"?a():i+=n[l]}return i&&(s.text=i+(e||""),o.push(s)),o}var Rq,Lq,Fq,bc=_(()=>{"use strict";Pe();Rq={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",90:"grey"},Lq={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white"},Fq={1:"bold",3:"italic",4:"underline",9:"strikethrough"}});var jq=m((pRe,Iq)=>{"use strict";Iq.exports=({onlyFirst:n=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,n?void 0:"g")}});var dg=m((mRe,Aq)=>{"use strict";var cme=jq();Aq.exports=n=>typeof n=="string"?n.replace(cme(),""):n});function lb(n,e={}){let t=[],i=[],r=[],o=0;for(let s of n){let a=t.length,{content:l,filetype:u}=s,c=s.highlights;if(u=="markdown"){let h=gme(l,e);r.push(...h.codes.map(d=>(d.startLine=d.startLine+a,d.endLine=d.endLine+a,d))),i.push(...h.highlights.map(d=>(d.lnum=d.lnum+a,d))),t.push(...h.lines)}else{let h=l.trim().split(/\r?\n/);hme.includes(s.filetype)?r.push({hlGroup:`Coc${u}Float`,startLine:a,endLine:a+h.length}):r.push({filetype:s.filetype,startLine:a,endLine:a+h.length}),t.push(...h)}if(Array.isArray(c)&&i.push(...c.map(h=>Object.assign({},h,{lnum:h.lnum+a}))),Array.isArray(s.active)){let h=dme(l,a,s.active);h.length&&i.push(...h)}o!=n.length-1&&t.push("\u2500"),o=o+1}return{lines:t,highlights:i,codes:r}}function dme(n,e,t){let i=[],[r,o]=t,s=n.split(/\r?\n/),a=0,l=!1;for(let u=0;uo){let h=Q(c.slice(0,o-a));i.push({colStart:0,colEnd:h,lnum:u+e,hlGroup:"CocUnderline"}),l=!1;break}else{let h=Q(c);i.push({colStart:0,colEnd:h,lnum:u+e,hlGroup:"CocUnderline"})}else if(a+c.length>r){l=!0;let h=Q(c.slice(0,r-a));if(a+c.length>o){let d=Q(c.slice(0,o-a));l=!1,i.push({colStart:h,colEnd:d,lnum:u+e,hlGroup:"CocUnderline"});break}else{let d=Q(c);i.push({colStart:h,colEnd:d,lnum:u+e,hlGroup:"CocUnderline"})}}a=a+c.length+1}return i}function gme(n,e){fe.setOptions({renderer:new $0,gfm:!0,breaks:!0});let t=[],i=[],r=[],o=0,s=!1,a,l=0,u=fe(n),c=$0.getLinks();c.length&&(u=u+`
-
-`+c.join(`
-`)),u=u.replace(/\s*$/,"");let h=u.split(/\n/);for(let d=0;d{"use strict";FH();_q();bc();Pe();Oq=C(dg()),hme=["Error","Warning","Info","Hint"],DRe=q()("markdown-index")});var ei,io=_(()=>{"use strict";ei=class{constructor(){this.tasks=[];this.count=1}sched(){this.count>0&&this.tasks.length>0&&(this.count--,this.tasks.shift()())}get busy(){return this.count==0}acquire(){return new Promise(e=>{let t=()=>{let i=!1;e(()=>{i||(i=!0,this.count++,this.sched())})};this.tasks.push(t),process.nextTick(this.sched.bind(this))})}use(e){return this.acquire().then(t=>e().then(i=>(t(),i)).catch(i=>{throw t(),i}))}}});var Mq,Nq,fme,RRe,ci,Zo=_(()=>{"use strict";Mq=C(Ei()),Nq=C(H());le();X0();z();io();Jt();fme=process.env.VIM_NODE_RPC=="1",RRe=q()("model-float"),ci=class{constructor(e){this.nvim=e;this.winid=0;this._bufnr=0;this.mutex=new ei;this.disposables=[];this.onCursorMoved=(0,Mq.default)(this._onCursorMoved.bind(this),100)}bindEvents(e,t){let i=["InsertLeave","InsertEnter","BufEnter"];for(let r of i)E.on(r,o=>{o!=this._bufnr&&this.close()},null,this.disposables);E.on("MenuPopupChanged",()=>{E.pumAlignTop==t&&this.close()},null,this.disposables),this.disposables.push(Nq.Disposable.create(()=>{this.onCursorMoved.clear()})),E.on("CursorMoved",this.onCursorMoved.bind(this,e),this,this.disposables),E.on("CursorMovedI",this.onCursorMoved.bind(this,e),this,this.disposables)}unbind(){this.disposables.length&&(Z(this.disposables),this.disposables=[])}_onCursorMoved(e,t,i){if(t!=this._bufnr&&!(t==this.targetBufnr&&Fe(i,this.cursor))&&(e||t!=this.targetBufnr||!E.insertMode)){this.close();return}}async create(e,t=!1,i=0){await this.show(e,{offsetX:i})}applyFloatConfig(e,t){for(let i of Object.keys(t)){if(i=="border"){t.border&&(e.border=[1,1,1,1]);continue}e[i]=t[i]}return e}async show(e,t={}){if(e.length==0||e.every(o=>o.content.length==0)){this.close();return}let i=Date.now(),r=await this.mutex.acquire();try{await this.createPopup(e,t,i),r()}catch(o){this.nvim.echoError(o),r()}}async createPopup(e,t,i){e=e.filter(p=>p.content.trim().length>0);let{lines:r,codes:o,highlights:s}=lb(e),a={codes:o,highlights:s,pumAlignTop:E.pumAlignTop,preferTop:typeof t.preferTop=="boolean"?t.preferTop:!1,offsetX:t.offsetX||0,title:t.title||"",close:t.close?1:0,rounded:t.rounded?1:0,modes:t.modes||["n","i","ic","s"]};fme||(typeof t.winblend=="number"&&(a.winblend=t.winblend),t.focusable!=null&&(a.focusable=t.focusable?1:0),t.shadow&&(a.shadow=1)),t.maxHeight&&(a.maxHeight=t.maxHeight),t.maxWidth&&(a.maxWidth=t.maxWidth),t.border&&!t.border.every(p=>p==0)&&(a.border=t.border),t.title&&!a.border&&(a.border=[1,1,1,1]),t.highlight&&(a.highlight=t.highlight),t.borderhighlight&&(a.borderhighlight=[t.borderhighlight]),t.cursorline&&(a.cursorline=1);let l=t.autoHide!=!1;l&&(a.autohide=1),this.unbind();let u=await this.nvim.call("coc#dialog#create_cursor_float",[this.winid,this._bufnr,r,a]);if(this.nvim.redrawVim(),!u||u.length==0||this.closeTs>i){let p=u&&u.length>0?u[2]:this.winid;p&&(this.winid=0,this.nvim.call("coc#float#close",[p],!0),this.nvim.redrawVim());return}let[c,h,d,g,f]=u;this.winid=d,this._bufnr=g,this.targetBufnr=c,this.cursor=h,this.bindEvents(l,f==1)}close(){let{winid:e,nvim:t}=this;this.closeTs=Date.now(),this.unbind(),e&&(this.winid=0,t.call("coc#float#close",[e],!0),t.redrawVim())}checkRetrigger(e){return!!(this.winid&&this.targetBufnr==e)}get bufnr(){return this._bufnr}get buffer(){return this.bufnr?this.nvim.createBuffer(this.bufnr):null}get window(){return this.winid?this.nvim.createWindow(this.winid):null}async activated(){return this.winid?await this.nvim.call("coc#float#valid",[this.winid])!=0:!1}dispose(){this.cursor=void 0,this.close()}}});var Hq=m((FRe,Bq)=>{Bq.exports=function(n,e){for(var t=[],i=0;i{"use strict";Zq.exports=Yq;function Yq(n,e,t){n instanceof RegExp&&(n=qq(n,t)),e instanceof RegExp&&(e=qq(e,t));var i=Wq(n,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+n.length,i[1]),post:t.slice(i[1]+e.length)}}function qq(n,e){var t=e.match(n);return t?t[0]:null}Yq.range=Wq;function Wq(n,e,t){var i,r,o,s,a,l=t.indexOf(n),u=t.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(n===e)return[l,u];for(i=[],o=t.length;c>=0&&!a;)c==l?(i.push(c),l=t.indexOf(n,c+1)):i.length==1?a=[i.pop(),u]:(r=i.pop(),r=0?l:u;i.length&&(a=[o,s])}return a}});var Vq=m((jRe,zq)=>{var mme=Hq(),$q=Jq();zq.exports=vme;var Xq="\0SLASH"+Math.random()+"\0",Uq="\0OPEN"+Math.random()+"\0",G0="\0CLOSE"+Math.random()+"\0",Gq="\0COMMA"+Math.random()+"\0",Qq="\0PERIOD"+Math.random()+"\0";function U0(n){return parseInt(n,10)==n?parseInt(n,10):n.charCodeAt(0)}function bme(n){return n.split("\\\\").join(Xq).split("\\{").join(Uq).split("\\}").join(G0).split("\\,").join(Gq).split("\\.").join(Qq)}function yme(n){return n.split(Xq).join("\\").split(Uq).join("{").split(G0).join("}").split(Gq).join(",").split(Qq).join(".")}function Kq(n){if(!n)return[""];var e=[],t=$q("{","}",n);if(!t)return n.split(",");var i=t.pre,r=t.body,o=t.post,s=i.split(",");s[s.length-1]+="{"+r+"}";var a=Kq(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function vme(n){return n?(n.substr(0,2)==="{}"&&(n="\\{\\}"+n.substr(2)),yc(bme(n),!0).map(yme)):[]}function wme(n){return"{"+n+"}"}function Dme(n){return/^-?0\d/.test(n)}function xme(n,e){return n<=e}function Cme(n,e){return n>=e}function yc(n,e){var t=[],i=$q("{","}",n);if(!i||/\$$/.test(i.pre))return[n];var r=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),s=r||o,a=i.body.indexOf(",")>=0;if(!s&&!a)return i.post.match(/,.*\}/)?(n=i.pre+"{"+i.body+G0+i.post,yc(n)):[n];var l;if(s)l=i.body.split(/\.\./);else if(l=Kq(i.body),l.length===1&&(l=yc(l[0],!1).map(wme),l.length===1)){var c=i.post.length?yc(i.post,!1):[""];return c.map(function(I){return i.pre+l[0]+I})}var u=i.pre,c=i.post.length?yc(i.post,!1):[""],h;if(s){var d=U0(l[0]),g=U0(l[1]),f=Math.max(l[0].length,l[1].length),p=l.length==3?Math.abs(U0(l[2])):1,b=xme,v=g0){var L=new Array(F+1).join("0");D<0?S="-"+L+S.slice(1):S=L+S}}h.push(S)}}else h=mme(l,function(N){return yc(N,!1)});for(var j=0;j{o2.exports=zn;zn.Minimatch=hi;var gg={sep:"/"};try{gg=require("path")}catch{}var z0=zn.GLOBSTAR=hi.GLOBSTAR={},Sme=Vq(),e2={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Q0="[^/]",K0=Q0+"*?",Tme="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",kme="(?:(?!(?:\\/|^)\\.).)*?",t2=Eme("().*{}+?[]^$\\!");function Eme(n){return n.split("").reduce(function(e,t){return e[t]=!0,e},{})}var n2=/\/+/;zn.filter=Pme;function Pme(n,e){return e=e||{},function(t,i,r){return zn(t,n,e)}}function i2(n,e){n=n||{},e=e||{};var t={};return Object.keys(e).forEach(function(i){t[i]=e[i]}),Object.keys(n).forEach(function(i){t[i]=n[i]}),t}zn.defaults=function(n){if(!n||!Object.keys(n).length)return zn;var e=zn,t=function(r,o,s){return e.minimatch(r,o,i2(n,s))};return t.Minimatch=function(r,o){return new e.Minimatch(r,i2(n,o))},t};hi.defaults=function(n){return!n||!Object.keys(n).length?hi:zn.defaults(n).Minimatch};function zn(n,e,t){if(typeof e!="string")throw new TypeError("glob pattern string required");return t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:e.trim()===""?n==="":new hi(e,t).match(n)}function hi(n,e){if(!(this instanceof hi))return new hi(n,e);if(typeof n!="string")throw new TypeError("glob pattern string required");e||(e={}),n=n.trim(),gg.sep!=="/"&&(n=n.split(gg.sep).join("/")),this.options=e,this.set=[],this.pattern=n,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}hi.prototype.debug=function(){};hi.prototype.make=_me;function _me(){if(!this._made){var n=this.pattern,e=this.options;if(!e.nocomment&&n.charAt(0)==="#"){this.comment=!0;return}if(!n){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error),this.debug(this.pattern,t),t=this.globParts=t.map(function(i){return i.split(n2)}),this.debug(this.pattern,t),t=t.map(function(i,r,o){return i.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}}hi.prototype.parseNegate=Rme;function Rme(){var n=this.pattern,e=!1,t=this.options,i=0;if(!t.nonegate){for(var r=0,o=n.length;r"u"?this.pattern:n,typeof n>"u")throw new TypeError("undefined pattern");return e.nobrace||!n.match(/\{.*\}/)?[n]:Sme(n)}hi.prototype.parse=Lme;var ub={};function Lme(n,e){if(n.length>1024*64)throw new TypeError("pattern is too long");var t=this.options;if(!t.noglobstar&&n==="**")return z0;if(n==="")return"";var i="",r=!!t.nocase,o=!1,s=[],a=[],l,u=!1,c=-1,h=-1,d=n.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this;function f(){if(l){switch(l){case"*":i+=K0,r=!0;break;case"?":i+=Q0,r=!0;break;default:i+="\\"+l;break}g.debug("clearStateChar %j %j",l,i),l=!1}}for(var p=0,b=n.length,v;p-1;W--){var B=a[W],N=i.slice(0,B.reStart),I=i.slice(B.reStart,B.reEnd-8),M=i.slice(B.reEnd-8,B.reEnd),J=i.slice(B.reEnd);M+=J;var K=N.split("(").length-1,ae=J;for(p=0;p=0&&(r=n[o],!r);o--);for(o=0;o>> no match, partial?`,n,c,e,h),c===s))}var g;if(typeof l=="string"?(i.nocase?g=u.toLowerCase()===l.toLowerCase():g=u===l,this.debug("string match",l,u,g)):(g=u.match(l),this.debug("pattern match",l,u,g)),!g)return!1}if(r===s&&o===a)return!0;if(r===s)return t;if(o===a){var f=r===s-1&&n[r]==="";return f}throw new Error("wtf?")};function jme(n){return n.replace(/\\(.)/g,"$1")}function Ame(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var s2=m(V0=>{var bl=require("path"),Vs=process.platform==="win32",zs=require("fs"),Ome=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function Mme(){var n;if(Ome){var e=new Error;n=t}else n=i;return n;function t(r){r&&(e.message=r.message,r=e,i(r))}function i(r){if(r){if(process.throwDeprecation)throw r;if(!process.noDeprecation){var o="fs: missing callback "+(r.stack||r.message);process.traceDeprecation?console.trace(o):console.error(o)}}}}function Nme(n){return typeof n=="function"?n:Mme()}var ORe=bl.normalize;Vs?Jo=/(.*?)(?:[\/\\]+|$)/g:Jo=/(.*?)(?:[\/]+|$)/g;var Jo;Vs?fg=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:fg=/^[\/]*/;var fg;V0.realpathSync=function(e,t){if(e=bl.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var i=e,r={},o={},s,a,l,u;c();function c(){var b=fg.exec(e);s=b[0].length,a=b[0],l=b[0],u="",Vs&&!o[l]&&(zs.lstatSync(l),o[l]=!0)}for(;s=e.length)return t&&(t[r]=e),i(null,e);Jo.lastIndex=a;var b=Jo.exec(e);return c=l,l+=b[0],u=c+b[1],a=Jo.lastIndex,s[u]||t&&t[u]===u?process.nextTick(d):t&&Object.prototype.hasOwnProperty.call(t,u)?p(t[u]):zs.lstat(u,g)}function g(b,v){if(b)return i(b);if(!v.isSymbolicLink())return s[u]=!0,t&&(t[u]=u),process.nextTick(d);if(!Vs){var w=v.dev.toString(32)+":"+v.ino.toString(32);if(o.hasOwnProperty(w))return f(null,o[w],u)}zs.stat(u,function(D){if(D)return i(D);zs.readlink(u,function(S,F){Vs||(o[w]=F),f(S,F)})})}function f(b,v,w){if(b)return i(b);var D=bl.resolve(c,v);t&&(t[w]=D),p(D)}function p(b){e=bl.resolve(b,e.slice(a)),h()}}});var nT=m((NRe,c2)=>{c2.exports=ea;ea.realpath=ea;ea.sync=iT;ea.realpathSync=iT;ea.monkeypatch=Hme;ea.unmonkeypatch=qme;var vc=require("fs"),eT=vc.realpath,tT=vc.realpathSync,Bme=process.version,a2=/^v[0-5]\./.test(Bme),l2=s2();function u2(n){return n&&n.syscall==="realpath"&&(n.code==="ELOOP"||n.code==="ENOMEM"||n.code==="ENAMETOOLONG")}function ea(n,e,t){if(a2)return eT(n,e,t);typeof e=="function"&&(t=e,e=null),eT(n,e,function(i,r){u2(i)?l2.realpath(n,e,t):t(i,r)})}function iT(n,e){if(a2)return tT(n,e);try{return tT(n,e)}catch(t){if(u2(t))return l2.realpathSync(n,e);throw t}}function Hme(){vc.realpath=ea,vc.realpathSync=iT}function qme(){vc.realpath=eT,vc.realpathSync=tT}});var h2=m((BRe,rT)=>{typeof Object.create=="function"?rT.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:rT.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}});var d2=m((HRe,sT)=>{try{if(oT=require("util"),typeof oT.inherits!="function")throw"";sT.exports=oT.inherits}catch{sT.exports=h2()}var oT});var hb=m((qRe,cb)=>{"use strict";function g2(n){return n.charAt(0)==="/"}function f2(n){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,t=e.exec(n),i=t[1]||"",r=Boolean(i&&i.charAt(1)!==":");return Boolean(t[2]||r)}cb.exports=process.platform==="win32"?f2:g2;cb.exports.posix=g2;cb.exports.win32=f2});var lT=m(ta=>{ta.setopts=Xme;ta.ownProp=p2;ta.makeAbs=pg;ta.finish=Ume;ta.mark=Gme;ta.isIgnored=b2;ta.childrenIgnored=Qme;function p2(n,e){return Object.prototype.hasOwnProperty.call(n,e)}var Yme=require("fs"),wc=require("path"),Wme=Vn(),m2=hb(),aT=Wme.Minimatch;function Zme(n,e){return n.localeCompare(e,"en")}function Jme(n,e){n.ignore=e.ignore||[],Array.isArray(n.ignore)||(n.ignore=[n.ignore]),n.ignore.length&&(n.ignore=n.ignore.map($me))}function $me(n){var e=null;if(n.slice(-3)==="/**"){var t=n.replace(/(\/\*\*)+$/,"");e=new aT(t,{dot:!0})}return{matcher:new aT(n,{dot:!0}),gmatcher:e}}function Xme(n,e,t){if(t||(t={}),t.matchBase&&e.indexOf("/")===-1){if(t.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}n.silent=!!t.silent,n.pattern=e,n.strict=t.strict!==!1,n.realpath=!!t.realpath,n.realpathCache=t.realpathCache||Object.create(null),n.follow=!!t.follow,n.dot=!!t.dot,n.mark=!!t.mark,n.nodir=!!t.nodir,n.nodir&&(n.mark=!0),n.sync=!!t.sync,n.nounique=!!t.nounique,n.nonull=!!t.nonull,n.nosort=!!t.nosort,n.nocase=!!t.nocase,n.stat=!!t.stat,n.noprocess=!!t.noprocess,n.absolute=!!t.absolute,n.fs=t.fs||Yme,n.maxLength=t.maxLength||1/0,n.cache=t.cache||Object.create(null),n.statCache=t.statCache||Object.create(null),n.symlinks=t.symlinks||Object.create(null),Jme(n,t),n.changedCwd=!1;var i=process.cwd();p2(t,"cwd")?(n.cwd=wc.resolve(t.cwd),n.changedCwd=n.cwd!==i):n.cwd=i,n.root=t.root||wc.resolve(n.cwd,"/"),n.root=wc.resolve(n.root),process.platform==="win32"&&(n.root=n.root.replace(/\\/g,"/")),n.cwdAbs=m2(n.cwd)?n.cwd:pg(n,n.cwd),process.platform==="win32"&&(n.cwdAbs=n.cwdAbs.replace(/\\/g,"/")),n.nomount=!!t.nomount,t.nonegate=!0,t.nocomment=!0,n.minimatch=new aT(e,t),n.options=n.minimatch.options}function Ume(n){for(var e=n.nounique,t=e?[]:Object.create(null),i=0,r=n.matches.length;i{D2.exports=w2;w2.GlobSync=ti;var Kme=nT(),y2=Vn(),WRe=y2.Minimatch,ZRe=gb().Glob,JRe=require("util"),uT=require("path"),v2=require("assert"),db=hb(),yl=lT(),zme=yl.setopts,cT=yl.ownProp,Vme=yl.childrenIgnored,ebe=yl.isIgnored;function w2(n,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
-See: https://github.com/isaacs/node-glob/issues/167`);return new ti(n,e).found}function ti(n,e){if(!n)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
-See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof ti))return new ti(n,e);if(zme(this,n,e),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var i=0;ithis.maxLength)return!1;if(!this.stat&&cT(this.cache,e)){var s=this.cache[e];if(Array.isArray(s)&&(s="DIR"),!t||s==="DIR")return s;if(t&&s==="FILE")return!1}var i,r=this.statCache[e];if(!r){var o;try{o=this.fs.lstatSync(e)}catch(a){if(a&&(a.code==="ENOENT"||a.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(o&&o.isSymbolicLink())try{r=this.fs.statSync(e)}catch{r=o}else r=o}this.statCache[e]=r;var s=!0;return r&&(s=r.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,t&&s==="FILE"?!1:s};ti.prototype._mark=function(n){return yl.mark(this,n)};ti.prototype._makeAbs=function(n){return yl.makeAbs(this,n)}});var hT=m((XRe,S2)=>{S2.exports=C2;function C2(n,e){if(n&&e)return C2(n)(e);if(typeof n!="function")throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(i){t[i]=n[i]}),t;function t(){for(var i=new Array(arguments.length),r=0;r{var T2=hT();dT.exports=T2(fb);dT.exports.strict=T2(k2);fb.proto=fb(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return fb(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return k2(this)},configurable:!0})});function fb(n){var e=function(){return e.called?e.value:(e.called=!0,e.value=n.apply(this,arguments))};return e.called=!1,e}function k2(n){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=n.apply(this,arguments)},t=n.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}});var P2=m((GRe,E2)=>{var tbe=hT(),mg=Object.create(null),ibe=gT();E2.exports=tbe(nbe);function nbe(n,e){return mg[n]?(mg[n].push(e),null):(mg[n]=[e],rbe(n))}function rbe(n){return ibe(function e(){var t=mg[n],i=t.length,r=obe(arguments);try{for(var o=0;oi?(t.splice(0,i),process.nextTick(function(){e.apply(null,r)})):delete mg[n]}})}function obe(n){for(var e=n.length,t=[],i=0;i{R2.exports=vl;var sbe=nT(),_2=Vn(),QRe=_2.Minimatch,abe=d2(),lbe=require("events").EventEmitter,fT=require("path"),pT=require("assert"),bg=hb(),bT=x2(),wl=lT(),ube=wl.setopts,mT=wl.ownProp,yT=P2(),KRe=require("util"),cbe=wl.childrenIgnored,hbe=wl.isIgnored,dbe=gT();function vl(n,e,t){if(typeof e=="function"&&(t=e,e={}),e||(e={}),e.sync){if(t)throw new TypeError("callback provided to sync glob");return bT(n,e)}return new Ue(n,e,t)}vl.sync=bT;var gbe=vl.GlobSync=bT.GlobSync;vl.glob=vl;function fbe(n,e){if(e===null||typeof e!="object")return n;for(var t=Object.keys(e),i=t.length;i--;)n[t[i]]=e[t[i]];return n}vl.hasMagic=function(n,e){var t=fbe({},e);t.noprocess=!0;var i=new Ue(n,t),r=i.minimatch.set;if(!n)return!1;if(r.length>1)return!0;for(var o=0;othis.maxLength)return e();if(!this.stat&&mT(this.cache,t)){var r=this.cache[t];if(Array.isArray(r)&&(r="DIR"),!i||r==="DIR")return e(null,r);if(i&&r==="FILE")return e()}var o,s=this.statCache[t];if(s!==void 0){if(s===!1)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&a==="FILE"?e():e(null,a,s)}var l=this,u=yT("stat\0"+t,c);u&&l.fs.lstat(t,u);function c(h,d){if(d&&d.isSymbolicLink())return l.fs.stat(t,function(g,f){g?l._stat2(n,t,null,d,e):l._stat2(n,t,g,f,e)});l._stat2(n,t,h,d,e)}};Ue.prototype._stat2=function(n,e,t,i,r){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return this.statCache[e]=!1,r();var o=n.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return r(null,!1,i);var s=!0;return i&&(s=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,o&&s==="FILE"?r():r(null,s,i)}});async function Ht(n){let e=null;try{e=await Lr.default.stat(n)}catch{}return e}async function j2(n){if(!n)return!1;let e=await Ht(n);if(!e||!e.isFile())return!1;let t=null;try{let{stdout:r}=await DT.default.promisify(wT.exec)("git rev-parse --show-toplevel",{cwd:Gi.default.dirname(n)});t=r.trim()}catch{}if(!t)return!1;let i=Gi.default.relative(t,n);try{let{stdout:r}=await DT.default.promisify(wT.exec)(`git check-ignore ${i}`,{cwd:t});return r.trim()==i}catch{}return!1}function vT(n,e=[]){return!e||!e.length?!1:e.some(t=>(0,xT.default)(n,t,{dot:!0}))}function mb(n,e,t,i=!1,r=!0,o=[]){let s=yg(n);if(r&&t&&Ae(t,s,!0)&&!vT(t,o)&&pb(t,e))return t;let a=s.split(Gi.default.sep);if(i){for(;a.length>0;){let l=a.join(Gi.default.sep);if(!vT(l,o)&&pb(l,e))return l;a.pop()}return null}else{let l=[a.shift()];for(let u of a){l.push(u);let c=l.join(Gi.default.sep);if(!vT(c,o)&&pb(c,e))return c}return null}}async function A2(n,e,t=500){return new Promise((i,r)=>{let o=setTimeout(()=>{a.abort(),i(!1)},t),s=!1,a=(0,I2.default)(e,{nosort:!0,dot:!0,cwd:n,nodir:!0,absolute:!1},l=>{if(clearTimeout(o),l)return r(l);i(s)});a.on("match",()=>{clearTimeout(o),s=!0,a.abort(),i(!0)}),a.on("end",()=>{clearTimeout(o),i(s)})})}function pb(n,e){try{let t=Lr.default.readdirSync(n);for(let i of e)if(i.includes("*")?xT.default.match(t,i,{nobrace:!0,noext:!0,nocomment:!0,nonegate:!0,dot:!0}).length!==0:t.includes(i))return!0}catch{}return!1}function Dc(n,e){let t=Gi.default.parse(e).root,i=Array.isArray(n)?n:[n];for(;e&&e!==t;){if(pb(e,i))for(let o of i){let s=Gi.default.join(e,o);if(Lr.default.existsSync(s))return s}e=Gi.default.dirname(e)}return null}function xc(n,e){return new Promise((t,i)=>{Lr.default.readFile(n,e,(r,o)=>{r&&i(r),t(o)})})}function O2(n){let e,t=0;return new Promise((i,r)=>{Lr.default.createReadStream(n).on("error",o=>r(o)).on("data",o=>{for(e=0;ei(t))})}function ia(n,e,t){if(!Lr.default.existsSync(n))return Promise.reject(new Error(`file does not exist: ${n}`));let i=[],r=Lr.default.createReadStream(n,{encoding:"utf8"}),o=CT.default.createInterface({input:r,crlfDelay:1/0,terminal:!1}),s=0;return new Promise((a,l)=>{o.on("line",u=>{s>=e&&s<=t&&i.push(u),s==t&&o.close(),s=s+1}),o.on("close",()=>{a(i),r.close()}),o.on("error",l)})}function M2(n,e){if(!Lr.default.existsSync(n))return Promise.reject(new Error(`file does not exist: ${n}`));let t=Lr.default.createReadStream(n,{encoding:"utf8"}),i=CT.default.createInterface({input:t,crlfDelay:1/0,terminal:!1}),r=0;return new Promise((o,s)=>{i.on("line",a=>{if(r==e){r==0&&a.startsWith("\uFEFF")&&(a=a.slice(1)),i.close(),t.close(),o(a);return}r=r+1}),i.on("error",s)})}function ii(n,e,t){return t=typeof t=="boolean"?t:Xi||sc,!n||!e?!1:t?n.toLowerCase()===e.toLowerCase():n===e}function L2(n,e){return Xi||sc?n.toLowerCase().startsWith(e.toLowerCase()):n.startsWith(e)}async function bb(n,e){await Lr.default.writeFile(n,e,{encoding:"utf8"})}function vg(n){return n.startsWith("file:")}function Ae(n,e,t=!1){let i=yg(Gi.default.resolve(Gi.default.normalize(n))),r=yg(Gi.default.resolve(Gi.default.normalize(e)));return i=="//"&&(i="/"),ii(i,r)?!!t:i.endsWith(Gi.default.sep)?L2(r,i):L2(r,i)&&r[i.length]==Gi.default.sep}function yg(n,e=F2.default.platform()){return e!="win32"||n[1]!=":"?n:n[0].toUpperCase()+n.slice(1)}var wT,Lr,xT,F2,Gi,CT,DT,I2,VRe,Je=_(()=>{"use strict";wT=require("child_process"),Lr=C(Rn()),xT=C(Vn()),F2=C(require("os")),Gi=C(require("path")),CT=C(require("readline")),DT=C(require("util")),I2=C(gb());ac();VRe=q()("util-fs")});function Pi(n,e){return ut(n.start,e)===0&&ut(n.end,e)===0}function N2(n,e){return n.line===e.line&&n.character===e.character}function B2(n,e){let{start:t,end:i}=n;if(t.line>i.line||t.line===i.line&&t.character>i.character){let r=t;t=i,i=r}return t=Cc.Position.create(Math.max(0,t.line),Math.max(0,t.character)),i=Cc.Position.create(Math.max(0,i.line),Math.max(0,i.character)),{start:t,end:i}}function yb(n,e){return De(n.end,e.start)==0||De(e.end,n.start)==0}function Sc(n,e){let{start:t,end:i}=n;return!(De(i,e.start)<=0||De(t,e.end)>=0)}function Dl(n,e){return!!(ut(n.start,e)==0||ut(n.end,e)==0||Pi(e,n))}function H2(n,e){let{line:t,character:i}=e,{start:r,end:o}=n,s=o.line==r.line?o.character+i:o.character;return Cc.Range.create(r.line+t,i+r.character,o.line+t,s)}function q2(n,e){let{start:t,end:i}=e;return n>=t.line&&n<=i.line}function Ct(n){let{start:e,end:t}=n;return e.line==t.line&&e.character==t.character}function ut(n,e){let{start:t,end:i}=e;return De(n,t)<0?-1:De(n,i)>0?1:0}function De(n,e){return n.line>e.line||e.line==n.line&&n.character>e.character?1:e.line==n.line&&n.character==e.character?0:-1}function Y2(n){return n.start.line==n.end.line}function _i(n,e){let t=e.split(/\r?\n/),i=t.length,r=t[i-1],o=i==1?n.character+e.length:r.length;return Cc.Position.create(n.line+i-1,o)}var Cc,yt=_(()=>{"use strict";Cc=C(H())});var tLe,vb,W2=_(()=>{"use strict";tLe=q()("outpubChannel"),vb=class{constructor(e,t,i){this.name=e;this.nvim=t;this.onDispose=i;this.lines=[""];this._disposed=!1;this.created=!1;if(!/^[\w\s-.]+$/.test(e))throw new Error(`Invalid channel name "${e}", only word characters and white space allowed.`)}get content(){return this.lines.join(`
-`)}_append(e){let{nvim:t}=this,i=this.lines.length-1,r=e.split(/\r?\n/),o=this.lines[i]+r[0];this.lines[i]=o;let s=r.slice(1);this.lines=this.lines.concat(s),this.created&&(t.pauseNotification(),t.call("setbufline",[this.bufname,"$",o],!0),s.length&&t.call("appendbufline",[this.bufname,"$",s],!0),t.resumeNotification(!1,!0))}append(e){!this.validate()||this._append(e)}appendLine(e){!this.validate()||this._append(e+`
-`)}clear(e){if(!this.validate())return;let{nvim:t}=this;this.lines=e?this.lines.slice(-e):[],this.created&&(t.pauseNotification(),t.call("deletebufline",[this.bufname,1,"$"],!0),this.lines.length&&t.call("appendbufline",[this.bufname,"$",this.lines],!0),t.resumeNotification(!0,!0))}hide(){this.created=!1,this.nvim.command(`exe 'silent! bd! '.fnameescape('${this.bufname}')`,!0)}get bufname(){return`output:///${this.name}`}show(e,t="vs"){let{nvim:i}=this;i.pauseNotification(),i.command(`exe '${t} '.fnameescape('${this.bufname}')`,!0),e&&i.command("wincmd p",!0),i.resumeNotification(!0,!0),this.created=!0}validate(){return!this._disposed}dispose(){this.onDispose&&this.onDispose(),this._disposed=!0,this.hide(),this.lines=[]}}});var oLe,Z2,$o,wb=_(()=>{"use strict";le();W2();oLe=q()("core-channels"),Z2=class{constructor(){this.outputChannels=new Map;this.bufnrs=new Map;this.disposable=E.on("BufUnload",e=>{let t=this.bufnrs.get(e);if(t){let i=this.outputChannels.get(t);i&&(i.created=!1)}})}getProvider(e){return{onDidChange:null,provideTextDocumentContent:async i=>{let r=this.get(i.path.slice(1));if(!r)return"";e.pauseNotification(),e.call("bufnr",["%"],!0),e.command("setlocal nospell nofoldenable nowrap noswapfile",!0),e.command("setlocal buftype=nofile bufhidden=hide",!0),e.command("setfiletype log",!0);let o=await e.resumeNotification();return this.bufnrs.set(o[0][0],r.name),r.created=!0,r.content}}}get names(){return Array.from(this.outputChannels.keys())}get(e){return this.outputChannels.get(e)}create(e,t){if(this.outputChannels.has(e))return this.outputChannels.get(e);let i=new vb(e,t,()=>{this.outputChannels.delete(e)});return this.outputChannels.set(e,i),i}show(e,t,i){let r=this.outputChannels.get(e);!r||r.show(i,t)}dispose(){this.disposable.dispose();for(let e of this.outputChannels.values())e.dispose();this.outputChannels.clear()}},$o=new Z2});var aLe,Db,J2=_(()=>{"use strict";aLe=q()("model-terminal"),Db=class{constructor(e,t,i,r,o){this.cmd=e;this.args=t;this.nvim=i;this._name=r;this.strictEnv=o;this.pid=0}async start(e,t){let{nvim:i}=this,r=[this.cmd,...this.args],[o,s]=await i.call("coc#terminal#start",[r,e,t||{},!!this.strictEnv]);this.bufnr=o,this.pid=s}onExit(e){this.exitStatus={code:e===-1?void 0:e}}get name(){return this._name||this.cmd}get processId(){return Promise.resolve(this.pid)}sendText(e,t=!0){!this.bufnr||this.nvim.call("coc#terminal#send",[this.bufnr,e,t],!0)}async show(e){let{bufnr:t,nvim:i}=this;if(!t)return;let[r,o,s]=await i.eval(`[bufloaded(${t}),bufwinid(${t}),win_getid()]`);return r?(s==o||(i.pauseNotification(),o==-1?(i.command(`below ${t}sb`,!0),i.command("resize 8",!0),i.call("coc#util#do_autocmd",["CocTerminalOpen"],!0)):i.call("win_gotoid",[o],!0),i.command("normal! G",!0),e&&i.command("wincmd p",!0),await i.resumeNotification()),!0):!1}async hide(){let{bufnr:e,nvim:t}=this;!e||await t.eval(`coc#window#close(bufwinid(${e}))`)}dispose(){this.exitStatus||(this.exitStatus={code:void 0});let{bufnr:e,nvim:t}=this;!e||(this.bufnr=void 0,t.call("coc#terminal#close",[e],!0))}}});var ST,bbe,xb,$2=_(()=>{"use strict";J2();ST=C(H());z();le();bbe=q()("core-terminals"),xb=class{constructor(){this._terminals=new Map;this.disposables=[];this._onDidOpenTerminal=new ST.Emitter;this._onDidCloseTerminal=new ST.Emitter;this.onDidCloseTerminal=this._onDidCloseTerminal.event;this.onDidOpenTerminal=this._onDidOpenTerminal.event;E.on("BufUnload",e=>{if(this._terminals.has(e)){bbe.debug("terminal detach",e);let t=this._terminals.get(e);this._onDidCloseTerminal.fire(t),this._terminals.delete(e)}},null,this.disposables),E.on("TermExit",(e,t)=>{let i=this._terminals.get(e);i&&(i.onExit(t),i.dispose())},null,this.disposables)}get terminals(){return Array.from(this._terminals.values())}async createTerminal(e,t){let i=t.cwd,r=t.shellPath,o=t.shellArgs;r||(r=await e.getOption("shell")),i||(i=await e.call("getcwd"));let s=new Db(r,o||[],e,t.name,t.strictEnv);return await s.start(i,t.env),this._terminals.set(s.bufnr,s),this._onDidOpenTerminal.fire(s),s}reset(){for(let e of this._terminals.values())e.dispose();this._terminals.clear()}dispose(){this._onDidOpenTerminal.dispose(),this._onDidCloseTerminal.dispose(),Z(this.disposables),this.reset()}}});async function Cb(n){let[e,t]=await n.eval("[line('.')-1, strpart(getline('.'), 0, col('.') - 1)]");return Tc.Position.create(e,t.length)}async function Sb(n,e){return await n.callAsync("coc#dialog#prompt_confirm",[e])==1}async function X2(n,e,t){await n.call("coc#cursor#move_to",[e.line,e.character]),t&&n.command("redraw",!0)}async function U2(n){return await n.call("coc#cursor#char_offset")}async function G2(n){let[e,t]=await n.call("coc#cursor#screen_pos");return{row:e,col:t}}function Q2(n,e,t="MoreMsg",i=!1){n[i||ybe?"callTimer":"call"]("coc#ui#echo_messages",[t,("[coc.nvim] "+e).split(`
-`)],!0)}async function K2(n,e){if(e==="line"){let i=await n.call("line",["."]);return Tc.Range.create(i-1,0,i,0)}if(e==="cursor"){let[i,r]=await n.eval("coc#cursor#position()");return Tc.Range.create(i,r,i,r)}let t=await n.call("coc#cursor#get_selection",[e==="char"?1:0]);return t?Tc.Range.create(t[0],t[1],t[2],t[3]):null}async function z2(n,e,t){let{start:i,end:r}=e,[o,s]=await n.eval(`[getline(${i.line+1}),getline(${r.line+1})]`),a=o.length>0?Q(o.slice(0,i.character)):0,l,u,c=r.character==0;if(c){u=r.line==0?0:r.line-1;let h=await n.call("getline",[u+1]);l=Q(h)}else u=r.line,l=s.length>0?Q(s.slice(0,r.character)):0;n.pauseNotification(),n.command(`noa call cursor(${i.line+1},${a+1})`,!0),n.command("normal! v",!0),n.command(`noa call cursor(${u+1},${l})`,!0),c&&n.command("normal! $",!0),await n.resumeNotification(t)}var Tc,ybe,Tb=_(()=>{"use strict";Tc=C(H());Pe();ybe=process.env.VIM_NODE_RPC=="1"});var kb,kT=_(()=>{kb="0.0.81"});var wg,Dg,Eb,Pb,xg,_b,Fr=_(()=>{"use strict";wg=(i=>(i[i.Buffer=0]="Buffer",i[i.LanguageServer=1]="LanguageServer",i[i.Global=2]="Global",i))(wg||{}),Dg=(i=>(i[i.Native=0]="Native",i[i.Remote=1]="Remote",i[i.Service=2]="Service",i))(Dg||{}),Eb=(i=>(i[i.More=0]="More",i[i.Warning=1]="Warning",i[i.Error=2]="Error",i))(Eb||{}),Pb=(i=>(i[i.Global=0]="Global",i[i.User=1]="User",i[i.Workspace=2]="Workspace",i))(Pb||{}),xg=(s=>(s[s.Initial=0]="Initial",s[s.Starting=1]="Starting",s[s.StartFailed=2]="StartFailed",s[s.Running=3]="Running",s[s.Stopping=4]="Stopping",s[s.Stopped=5]="Stopped",s))(xg||{}),_b=(r=>(r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink",r))(_b||{})});function ET(n,e){if(n.length<=1)return n;let t=n.length/2|0,i=n.slice(0,t),r=n.slice(t);ET(i,e),ET(r,e);let o=0,s=0,a=0;for(;ot.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function wbe(n){let e=eY(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var kc,jn,Ec=_(()=>{"use strict";kc=class{constructor(e,t,i,r){this._uri=e,this._languageId=t,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){for(let i of e)if(kc.isIncremental(i)){let r=eY(i.range),o=this.offsetAt(r.start),s=this.offsetAt(r.end);this._content=this._content.substring(0,o)+i.text+this._content.substring(s,this._content.length);let a=Math.max(r.start.line,0),l=Math.max(r.end.line,0),u=this._lineOffsets,c=V2(i.text,!1,o);if(l-a===c.length)for(let d=0,g=c.length;de?r=s:i=s+1}let o=i-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],r=e.line+1{let d=c.range.start.line-h.range.start.line;return d===0?c.range.start.character-h.range.start.character:d}),l=0,u=[];for(let c of a){let h=r.offsetAt(c.range.start);if(hl&&u.push(s.substring(l,h)),c.newText.length&&u.push(c.newText),l=r.offsetAt(c.range.end)}return u.push(s.substr(l)),u.join("")}n.applyEdits=i})(jn||(jn={}))});function Sg(n,e){e===void 0&&(e=!1);var t=n.length,i=0,r="",o=0,s=16,a=0,l=0,u=0,c=0,h=0;function d(D,S){for(var F=0,L=0;F=48&&j<=57)L=L*16+j-48;else if(j>=65&&j<=70)L=L*16+j-65+10;else if(j>=97&&j<=102)L=L*16+j-97+10;else break;i++,F++}return F=t){D+=n.substring(S,i),h=2;break}var F=n.charCodeAt(i);if(F===34){D+=n.substring(S,i),i++;break}if(F===92){if(D+=n.substring(S,i),i++,i>=t){h=2;break}var L=n.charCodeAt(i++);switch(L){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=`
-`;break;case 114:D+="\r";break;case 116:D+=" ";break;case 117:var j=d(4,!0);j>=0?D+=String.fromCharCode(j):h=4;break;default:h=5}S=i;continue}if(F>=0&&F<=31)if(Cg(F)){D+=n.substring(S,i),h=2;break}else h=6;i++}return D}function b(){if(r="",h=0,o=i,l=a,c=u,i>=t)return o=t,s=17;var D=n.charCodeAt(i);if(PT(D)){do i++,r+=String.fromCharCode(D),D=n.charCodeAt(i);while(PT(D));return s=15}if(Cg(D))return i++,r+=String.fromCharCode(D),D===13&&n.charCodeAt(i)===10&&(i++,r+=`
-`),a++,u=i,s=14;switch(D){case 123:return i++,s=1;case 125:return i++,s=2;case 91:return i++,s=3;case 93:return i++,s=4;case 58:return i++,s=6;case 44:return i++,s=5;case 34:return i++,r=p(),s=10;case 47:var S=i-1;if(n.charCodeAt(i+1)===47){for(i+=2;i=12&&D<=15);return D}return{setPosition:g,getPosition:function(){return i},scan:e?w:b,getToken:function(){return s},getTokenValue:function(){return r},getTokenOffset:function(){return o},getTokenLength:function(){return i-o},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return o-c},getTokenError:function(){return h}}}function PT(n){return n===32||n===9||n===11||n===12||n===160||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===65279}function Cg(n){return n===10||n===13||n===8232||n===8233}function Pc(n){return n>=48&&n<=57}var Rb=_(()=>{"use strict"});function RT(n,e,t){var i,r,o,s,a;if(e){for(s=e.offset,a=s+e.length,o=s;o>0&&!Tg(n,o-1);)o--;for(var l=a;ls)&&n.substring(J,K)!==M&&v.push({offset:J,length:K-J,content:M})}var D=b();if(D!==17){var S=g.getTokenOffset()+o,F=_T(d,i);w(F,o,S)}for(;D!==17;){for(var L=g.getTokenOffset()+g.getTokenLength()+o,j=b(),W="",B=!1;!c&&(j===12||j===13);){var N=g.getTokenOffset()+o;w(" ",L,N),L=g.getTokenOffset()+g.getTokenLength()+o,B=j===12,W=B?p():"",j=b()}if(j===2)D!==1&&(h--,W=p());else if(j===4)D!==3&&(h--,W=p());else{switch(D){case 3:case 1:h++,W=p();break;case 5:case 12:W=p();break;case 13:c?W=p():B||(W=" ");break;case 6:B||(W=" ");break;case 10:if(j===6){B||(W="");break}case 7:case 8:case 9:case 11:case 2:case 4:j===12||j===13?B||(W=" "):j!==5&&j!==17&&(f=!0);break;case 16:f=!0;break}c&&(j===12||j===13)&&(W=p())}j===17&&(W=t.insertFinalNewline?u:"");var I=g.getTokenOffset()+o;w(W,L,I),D=j}return v}function _T(n,e){for(var t="",i=0;i{"use strict";Rb()});function tY(n,e,t){e===void 0&&(e=[]),t===void 0&&(t=kg.DEFAULT);var i=null,r=[],o=[];function s(l){Array.isArray(r)?r.push(l):i!==null&&(r[i]=l)}var a={onObjectBegin:function(){var l={};s(l),o.push(r),r=l,i=null},onObjectProperty:function(l){i=l},onObjectEnd:function(){r=o.pop()},onArrayBegin:function(){var l=[];s(l),o.push(r),r=l,i=null},onArrayEnd:function(){r=o.pop()},onLiteralValue:s,onError:function(l,u,c){e.push({error:l,offset:u,length:c})}};return IT(n,a,t),r[0]}function FT(n,e,t){e===void 0&&(e=[]),t===void 0&&(t=kg.DEFAULT);var i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function r(l){i.type==="property"&&(i.length=l-i.offset,i=i.parent)}function o(l){return i.children.push(l),l}var s={onObjectBegin:function(l){i=o({type:"object",offset:l,length:-1,parent:i,children:[]})},onObjectProperty:function(l,u,c){i=o({type:"property",offset:u,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:l,offset:u,length:c,parent:i})},onObjectEnd:function(l,u){r(l+u),i.length=l+u-i.offset,i=i.parent,r(l+u)},onArrayBegin:function(l,u){i=o({type:"array",offset:l,length:-1,parent:i,children:[]})},onArrayEnd:function(l,u){i.length=l+u-i.offset,i=i.parent,r(l+u)},onLiteralValue:function(l,u,c){o({type:Tbe(l),offset:u,length:c,parent:i,value:l}),r(u+c)},onSeparator:function(l,u,c){i.type==="property"&&(l===":"?i.colonOffset=u:l===","&&r(u))},onError:function(l,u,c){e.push({error:l,offset:u,length:c})}};IT(n,s,t);var a=i.children[0];return a&&delete a.parent,a}function Lb(n,e){if(!!n){for(var t=n,i=0,r=e;i=t.children.length)return;t=t.children[c]}}return t}}function IT(n,e,t){t===void 0&&(t=kg.DEFAULT);var i=Sg(n,!1);function r(B){return B?function(){return B(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function o(B){return B?function(N){return B(N,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var s=r(e.onObjectBegin),a=o(e.onObjectProperty),l=r(e.onObjectEnd),u=r(e.onArrayBegin),c=r(e.onArrayEnd),h=o(e.onLiteralValue),d=o(e.onSeparator),g=r(e.onComment),f=o(e.onError),p=t&&t.disallowComments,b=t&&t.allowTrailingComma;function v(){for(;;){var B=i.scan();switch(i.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:p||w(11);break;case 2:w(12);break;case 6:w(16);break}switch(B){case 12:case 13:p?w(10):g();break;case 16:w(1);break;case 15:case 14:break;default:return B}}}function w(B,N,I){if(N===void 0&&(N=[]),I===void 0&&(I=[]),f(B),N.length+I.length>0)for(var M=i.getToken();M!==17;){if(N.indexOf(M)!==-1){v();break}else if(I.indexOf(M)!==-1)break;M=v()}}function D(B){var N=i.getTokenValue();return B?h(N):a(N),v(),!0}function S(){switch(i.getToken()){case 11:var B=i.getTokenValue(),N=Number(B);isNaN(N)&&(w(2),N=0),h(N);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return v(),!0}function F(){return i.getToken()!==10?(w(3,[],[2,5]),!1):(D(!1),i.getToken()===6?(d(":"),v(),W()||w(4,[],[2,5])):w(5,[],[2,5]),!0)}function L(){s(),v();for(var B=!1;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(B||w(4,[],[]),d(","),v(),i.getToken()===2&&b)break}else B&&w(6,[],[]);F()||w(4,[],[2,5]),B=!0}return l(),i.getToken()!==2?w(7,[2],[]):v(),!0}function j(){u(),v();for(var B=!1;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(B||w(4,[],[]),d(","),v(),i.getToken()===4&&b)break}else B&&w(6,[],[]);W()||w(4,[],[4,5]),B=!0}return c(),i.getToken()!==4?w(8,[4],[]):v(),!0}function W(){switch(i.getToken()){case 3:return j();case 1:return L();case 10:return D(!0);default:return S()}}return v(),i.getToken()===17?t.allowEmptyContent?!0:(w(4,[],[]),!1):W()?(i.getToken()!==17&&w(9,[],[]),!0):(w(4,[],[]),!1)}function Tbe(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(n){if(Array.isArray(n))return"array"}else return"null";return"object"}default:return"null"}}var kg,jT=_(()=>{"use strict";Rb();(function(n){n.DEFAULT={allowTrailingComma:!1}})(kg||(kg={}))});function iY(n,e,t,i){for(var r,o=e.slice(),s=[],a=FT(n,s),l=void 0,u=void 0;o.length>0&&(u=o.pop(),l=Lb(a,o),l===void 0&&t!==void 0);)typeof u=="string"?t=(r={},r[u]=t,r):t=[t];if(l)if(l.type==="object"&&typeof u=="string"&&Array.isArray(l.children)){var c=Lb(l,[u]);if(c!==void 0)if(t===void 0){if(!c.parent)throw new Error("Malformed AST");var h=l.children.indexOf(c.parent),d=void 0,g=c.parent.offset+c.parent.length;if(h>0){var f=l.children[h-1];d=f.offset+f.length}else if(d=l.offset+1,l.children.length>1){var p=l.children[1];g=p.offset}return xl(n,{offset:d,length:g-d,content:""},i)}else return xl(n,{offset:c.offset,length:c.length,content:JSON.stringify(t)},i);else{if(t===void 0)return[];var b=JSON.stringify(u)+": "+JSON.stringify(t),v=i.getInsertionIndex?i.getInsertionIndex(l.children.map(function(B){return B.children[0].value})):l.children.length,w=void 0;if(v>0){var f=l.children[v-1];w={offset:f.offset+f.length,length:0,content:","+b}}else l.children.length===0?w={offset:l.offset+1,length:0,content:b}:w={offset:l.offset+1,length:0,content:b+","};return xl(n,w,i)}}else if(l.type==="array"&&typeof u=="number"&&Array.isArray(l.children)){var D=u;if(D===-1){var b=""+JSON.stringify(t),w=void 0;if(l.children.length===0)w={offset:l.offset+1,length:0,content:b};else{var f=l.children[l.children.length-1];w={offset:f.offset+f.length,length:0,content:","+b}}return xl(n,w,i)}else if(t===void 0&&l.children.length>=0){var S=u,F=l.children[S],w=void 0;if(l.children.length===1)w={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===S){var f=l.children[S-1],L=f.offset+f.length,j=l.offset+l.length;w={offset:L,length:j-2-L,content:""}}else w={offset:F.offset,length:l.children[S+1].offset-F.offset,content:""};return xl(n,w,i)}else if(t!==void 0){var w=void 0,b=""+JSON.stringify(t);if(!i.isArrayInsertion&&l.children.length>u){var W=l.children[u];w={offset:W.offset,length:W.length,content:b}}else if(l.children.length===0||u===0)w={offset:l.offset+1,length:0,content:l.children.length===0?b:b+","};else{var v=u>l.children.length?l.children.length:u,f=l.children[v-1];w={offset:f.offset+f.length,length:0,content:","+b}}return xl(n,w,i)}else throw new Error("Can not "+(t===void 0?"remove":i.isArrayInsertion?"insert":"modify")+" Array index "+D+" as length is not sufficient")}else throw new Error("Can not add "+(typeof u!="number"?"index":"property")+" to parent of type "+l.type);else{if(t===void 0)throw new Error("Can not delete in empty document");return xl(n,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(t)},i)}}function xl(n,e,t){if(!t.formattingOptions)return[e];var i=Fb(n,e),r=e.offset,o=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;r>0&&!Tg(i,r-1);)r--;for(;o=0;a--){var l=s[a];i=Fb(i,l),r=Math.min(r,l.offset),o=Math.max(o,l.offset+l.length),o+=l.content.length-l.length}var u=n.length-(i.length-o)-r;return[{offset:r,length:u,content:i.substring(r,o)}]}function Fb(n,e){return n.substring(0,e.offset)+e.content+n.substring(e.offset+e.length)}var nY=_(()=>{"use strict";LT();jT()});function rY(n,e,t,i){return iY(n,e,t,i)}function oY(n,e){for(var t=e.length-1;t>=0;t--)n=Fb(n,e[t]);return n}var _c,Eg=_(()=>{"use strict";LT();nY();Rb();jT();_c=tY});function aY(n){let e={};for(let t of Object.keys(n))if(t.indexOf(".")==-1)e[t]=n[t];else{let i=t.split("."),r=e,o=i.length;for(let s=0;s"u"?t:o}function OT(){let n=Ab.default.join(_be,"data/schema.json"),e=Ib.default.readFileSync(n,"utf8"),{properties:t}=JSON.parse(e),i={};return Object.keys(t).forEach(r=>{let o=t[r].default;o!==void 0&&Pg(i,r,o,s=>{Pbe.error(s)})}),{contents:i}}function AT(n,e){let t=[];for(let i of Object.keys(n)){let r=n[i],o=e?`${e}.${i}`:i;t.push(o),_t(r)&&t.push(...AT(r,o))}return t}function hY(n,e){let t=[],i=AT(n),r=AT(e),o=r.filter(a=>!i.includes(a)),s=i.filter(a=>!r.includes(a));t.push(...o),t.push(...s);for(let a of i){if(!r.includes(a))continue;let l=jb(n,a),u=jb(e,a);Fe(l,u)||t.push(a)}return t}var sY,Ib,Ab,Pbe,_be,Ob=_(()=>{"use strict";sY=C(H());Ec();Eg();In();Jt();Ib=C(require("fs"));we();Ab=C(require("path")),Pbe=q()("configuration-util"),_be=(0,Ab.dirname)(__dirname)});var dn,MT=_(()=>{"use strict";In();Jt();Ob();dn=class{constructor(e={}){this._contents=e}get contents(){return this._contents}clone(){return new dn(Pr(this._contents))}getValue(e){return e?jb(this.contents,e):this.contents}merge(...e){let t=Pr(this.contents);for(let i of e)this.mergeContents(t,i.contents);return new dn(t)}freeze(){return Object.isFrozen(this._contents)||Object.freeze(this._contents),this}mergeContents(e,t){for(let i of Object.keys(t)){if(i in e&&_t(e[i])&&_t(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=Pr(t[i])}}setValue(e,t){Pg(this.contents,e,t,i=>{console.error(i)})}removeValue(e){uY(this.contents,e)}}});var Mb,dY=_(()=>{"use strict";MT();Mb=class{constructor(e,t,i,r=new dn){this._defaultConfiguration=e;this._userConfiguration=t;this._workspaceConfiguration=i;this._memoryConfiguration=r}getConsolidateConfiguration(){return this._consolidateConfiguration||(this._consolidateConfiguration=this._defaultConfiguration.merge(this._userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._consolidateConfiguration=this._consolidateConfiguration.freeze()),this._consolidateConfiguration}getValue(e){return this.getConsolidateConfiguration().getValue(e)}inspect(e){let t=this.getConsolidateConfiguration(),{_workspaceConfiguration:i,_memoryConfiguration:r}=this;return{default:this._defaultConfiguration.freeze().getValue(e),user:this._userConfiguration.freeze().getValue(e),workspace:i.freeze().getValue(e),memory:r.freeze().getValue(e),value:t.getValue(e)}}get defaults(){return this._defaultConfiguration}get user(){return this._userConfiguration}get workspace(){return this._workspaceConfiguration}toData(){return{defaults:{contents:this._defaultConfiguration.contents},user:{contents:this._userConfiguration.contents},workspace:{contents:this._workspaceConfiguration.contents}}}}});function NT(n,e){if(e){if(n&&n.hasOwnProperty(e))return n[e];let t=e.split("."),i=n;for(let r=0;i&&r{"use strict";BT=C(require("fs")),gY=C(require("os")),no=C(require("path")),HT=C(H());we();Fr();z();Je();In();Jt();dY();MT();Ob();Rc=q()("configurations");Xo=class{constructor(e,t){this.userConfigFile=e;this._proxy=t;this.cwd=process.cwd();this._errorItems=[];this._folderConfigurations=new Map;this._onError=new HT.Emitter;this._onChange=new HT.Emitter;this.disposables=[];this.onError=this._onError.event;this.onDidChange=this._onChange.event;let i=this.parseContentFromFile(e),r={defaults:OT(),user:i,workspace:{contents:{}}};this._configuration=Xo.parse(r),this.watchFile(e,1),this.addFolderFromCwd()}parseContentFromFile(e){if(!e)return{contents:{}};let t=O.file(e).toString();this._errorItems=this._errorItems.filter(r=>r.location.uri!=t);let i=lY(e,r=>{this._errorItems.push(...r)});return this._onError.fire(this._errorItems),i}get errorItems(){return this._errorItems}get foldConfigurations(){return this._folderConfigurations}extendsDefaults(e){let{defaults:t}=this._configuration,{contents:i}=t;i=Pr(i),Object.keys(e).forEach(o=>{Pg(i,o,e[o],s=>{Rc.error(s)})});let r={defaults:{contents:i},user:this._configuration.user,workspace:this._configuration.workspace};this._configuration=Xo.parse(r)}updateUserConfig(e){if(!e||Object.keys(e).length==0)return;let{user:t}=this._configuration,i=t.clone();Object.keys(e).forEach(r=>{let o=e[r];if(o===void 0)i.removeValue(r);else if(_t(o))for(let s of Object.keys(o))i.setValue(`${r}.${s}`,o[s]);else i.setValue(r,o)}),this.changeConfiguration(1,i,void 0)}get defaults(){return this._configuration.defaults}get user(){return this._configuration.user}get workspace(){return this._configuration.workspace}addFolderFile(e,t=!0,i=!1){if(!BT.default.existsSync(e)||ii(this.userConfigFile,e)||ii(e,no.default.join(gY.default.homedir(),`.vim/${Er}`)))return!1;this._folderConfigurations.has(e)||this.watchFile(e,2);let r=this.updateFolderConfiguration(e);return Rc.info(`Add folder configuration from ${i?"cwd":"file"}:`,e),t&&this.workspaceConfigFile!==e&&(this.workspaceConfigFile=e,Rc.info(`Change folder configuration from ${i?"cwd":"file"} to:`,e),this.changeConfiguration(2,r,e)),!0}addFolderFromCwd(){let e=no.default.join(this.cwd,`.vim/${Er}`);this.addFolderFile(e,!0,!0)}watchFile(e,t){if(!BT.default.existsSync(e)||global.__TEST__)return;let i=t===2,r=lc(e,()=>{let o=this.parseContentFromFile(e);i?(this._folderConfigurations.set(e,new dn(o.contents)),ii(this.workspaceConfigFile,e)&&this.changeConfiguration(t,o,e)):this.changeConfiguration(t,o,e)});this.disposables.push(r)}updateFolderConfiguration(e){let t=this.parseContentFromFile(e);return this._folderConfigurations.set(e,new dn(t.contents)),t}changeConfiguration(e,t,i){let{defaults:r,user:o,workspace:s}=this._configuration,a={defaults:e==0?t:r,user:e==1?t:o,workspace:e==2?t:s},l=Xo.parse(a),u=hY(this._configuration.getValue(),l.getValue());u.length!=0&&(this._configuration=l,this._onChange.fire({affectsConfiguration:(c,h)=>{if(!h||!h.startsWith("file:")||e!=2)return u.includes(c);let g=O.parse(h).fsPath;return i&&!Ae(no.default.resolve(i,"../.."),g)?!1:u.includes(c)}}))}getFolderConfigFile(e){let{folders:t}=this,i=t.find(r=>Ae(r,e,!0));return i?no.default.join(i,`.vim/${Er}`):void 0}getConfigFile(e){return e==0?null:e==1?this.userConfigFile:this.workspaceConfigFile}get folders(){let e=[],{_folderConfigurations:t}=this;for(let i of t.keys())e.push(no.default.resolve(i,"../.."));return e}get configuration(){return this._configuration}getWorkspaceConfigUri(e){let t;return e||(t=this.workspaceConfigFile?O.file(this.workspaceConfigFile):void 0),!t&&this._proxy&&typeof this._proxy.getWorkspaceConfig=="function"&&(t=this._proxy.getWorkspaceConfig(e),t&&ii(this.userConfigFile,t.fsPath)&&(t=void 0)),t}getConfiguration(e,t){let i,r;if(t){let{defaults:a,user:l}=this._configuration,[u,c]=this.getFolderConfiguration(t);r=u,i=new Mb(a,l,c)}else r=this.workspaceConfigFile?O.file(this.workspaceConfigFile):void 0,i=this._configuration;let o=Object.freeze(NT(i.getValue(null),e)),s={has(a){return typeof NT(o,a)<"u"},get:(a,l)=>{let u=NT(o,a);return u==null?l:u},update:(a,l,u=!1)=>{let c=e?`${e}.${a}`:a,h=u?1:2,d=h==1?this.user.clone():this.workspace.clone();if(l===void 0?d.removeValue(c):d.setValue(c,l),r||(r=this.getWorkspaceConfigUri(t)),r&&!ii(this.workspaceConfigFile,r.fsPath)&&(Rc.info(`Change folder configuration ${t?"by "+t:""} to:`,r.fsPath),this.workspaceConfigFile=r.fsPath),this.changeConfiguration(h,d,h==2?this.workspaceConfigFile:this.userConfigFile),!u&&!r){global.__TEST__||console.error(`Unable to locate workspace configuration ${t?"for "+t:""}, workspace folder not resolved.`),Rc.error("Unable to locate workspace configuration",t);return}let g=u?O.parse(this.userConfigFile):r;this._proxy&&!global.__TEST__&&(l===void 0?this._proxy.$removeConfigurationOption(h,c,{resource:g}):this._proxy.$updateConfigurationOption(h,c,l,{resource:g})),!u&&r&&this.addFolderFile(r.fsPath,!1)},inspect:a=>{a=e?`${e}.${a}`:a;let l=this._configuration.inspect(a);return{key:a,defaultValue:l.default,globalValue:l.user,workspaceValue:l.workspace}}};return Object.defineProperty(s,"has",{enumerable:!1}),Object.defineProperty(s,"get",{enumerable:!1}),Object.defineProperty(s,"update",{enumerable:!1}),Object.defineProperty(s,"inspect",{enumerable:!1}),typeof o=="object"&&I0(s,o,!1),bH(s)}getFolderConfiguration(e){let t=O.parse(e),i;t.scheme!="file"?i=this.cwd:i=t.fsPath;for(let[r,o]of this.foldConfigurations){let s=no.default.resolve(r,"../..");if(Ae(s,i,!0))return[O.file(r),o]}return[void 0,new dn]}resolveFolderConfigution(e){let t=O.parse(e);if(t.scheme!="file")return;let i=no.default.dirname(t.fsPath),r=this.getFolderConfigFile(i);if(r)return r;let o=Dc(".vim",i);if(!o)return;let s=no.default.join(o,Er);if(!!this.addFolderFile(s,!1))return s}setFolderConfiguration(e){let t=O.parse(e);if(t.scheme!="file")return;let i=t.fsPath;for(let[r,o]of this.foldConfigurations){let s=no.default.resolve(r,"../..");if(Ae(s,i,!0)){this.workspaceConfigFile!=r&&(this.workspaceConfigFile=r,Rc.info("Change folder configuration to:",r),this.changeConfiguration(2,o,r));break}}}static parse(e){let t=new dn(e.defaults.contents),i=new dn(e.user.contents),r=new dn(e.workspace.contents);return new Mb(t,i,r,new dn)}reset(){this._errorItems=[],this._folderConfigurations.clear();let e=this.parseContentFromFile(this.userConfigFile),t={defaults:OT(),user:e,workspace:{contents:{}}};this._configuration=Xo.parse(t),this._onChange.fire({affectsConfiguration:()=>!0})}dispose(){this._folderConfigurations.clear(),this._onError.dispose(),this._onChange.dispose(),Z(this.disposables)}}});var _g,pY,qT,Fbe,Nb,mY=_(()=>{"use strict";_g=C(require("fs"));Eg();pY=C(require("os")),qT=C(require("path"));we();z();Je();Fbe=q()("configuration-shape"),Nb=class{constructor(e){this.resolver=e}modifyConfiguration(e,t,i){if(!e||e.scheme!=="file")return;Fbe.info("modify configuration file:",e.fsPath);let r=e.fsPath,o=qT.default.dirname(r),s={tabSize:2,insertSpaces:!0};_g.default.existsSync(o)||_g.default.mkdirSync(o,{recursive:!0});let a=_g.default.readFileSync(r,{encoding:"utf8",flag:"a+"});a=a||"{}";let l=rY(a,[t],i,{formattingOptions:s});a=oY(a,l),_g.default.writeFileSync(r,a,"utf8")}getWorkspaceConfig(e){let t;if(e){if(typeof this.resolver.getWorkspaceFolder=="function"){let i=this.resolver.getWorkspaceFolder(e);i&&(t=O.parse(i.uri).fsPath)}}else t=this.resolver.root;if(t&&!ii(t,pY.default.homedir()))return O.file(qT.default.join(t,".vim",Er))}$updateConfigurationOption(e,t,i,r){this.modifyConfiguration(r==null?void 0:r.resource,t,i)}$removeConfigurationOption(e,t,i){this.modifyConfiguration(i==null?void 0:i.resource,t)}}});var YT,bY,WT,yY,Ibe,Bb,vY=_(()=>{"use strict";YT=C(Rn()),bY=C(require("os")),WT=C(require("path")),yY=C(H());z();Ibe=q()("core-autocmds"),Bb=class{constructor(e,t){this.contentProvider=e;this.watchers=t;this._dynAutocmd=!1;this.autocmdMaxId=0;this.autocmds=new Map;this.disposables=[];this.contentProvider.onDidProviderChange(()=>{this.setupDynamicAutocmd()},null,this.disposables),this.watchers.onDidOptionChange(()=>{this.setupDynamicAutocmd()},null,this.disposables)}attach(e,t){this.nvim=e,this.env=t}async doAutocmd(e,t){let i=this.autocmds.get(e);if(i){let r=Array.isArray(i.event)?i.event.join(","):i.event;Ibe.debug(`invoke ${i.request?"request":"notify"} autocmd:`,r),await Promise.resolve(i.callback.apply(i.thisArg,t))}}registerAutocmd(e){this.autocmdMaxId+=1;let t=this.autocmdMaxId;return this.autocmds.set(t,e),this.setupDynamicAutocmd(),yY.Disposable.create(()=>{this.autocmds.delete(t),this.setupDynamicAutocmd()})}setupDynamicAutocmd(e=!1){if(!e&&!this._dynAutocmd)return;this._dynAutocmd=!0;let t=this.contentProvider.schemes,i=[];for(let o of t)i.push(`autocmd BufReadCmd,FileReadCmd,SourceCmd ${o}:/* call coc#rpc#request('CocAutocmd', ['BufReadCmd','${o}', expand('')])`);for(let[o,s]of this.autocmds.entries()){let a=s.arglist&&s.arglist.length?", "+s.arglist.join(", "):"",l=Array.isArray(s.event)?s.event.join(","):s.event,u=s.pattern!=null?s.pattern:"*";/\buser\b/i.test(l)&&(u=""),i.push(`autocmd ${l} ${u} call coc#rpc#${s.request?"request":"notify"}('doAutocmd', [${o}${a}])`)}for(let o of this.watchers.options)i.push(`autocmd OptionSet ${o} call coc#rpc#notify('OptionSet',[expand(''), v:option_old, v:option_new])`);let r=`
-augroup coc_dynamic_autocmd
- autocmd!
- ${i.join(`
- `)}
-augroup end`;if(this.nvim.hasFunction("nvim_exec"))this.nvim.exec(r,!1);else{let o=WT.default.join(process.env.TMPDIR||bY.default.tmpdir(),`coc.nvim-${process.pid}.vim`);YT.default.mkdirSync(o,{recursive:!0});let s=WT.default.join(o,`coc-${process.pid}.vim`);YT.default.writeFileSync(s,r,"utf8");let a=`source ${s}`;this.env.isCygwin&&Wo.isWindows&&(a=`execute "source" . substitute(system('cygpath ${s.replace(/\\/g,"/")}'), '\\n', '', 'g')`),this.nvim.command(a)}}dispose(){this.nvim.command("augroup coc_dynamic_autocmd| autocmd!|augroup end",!0),Z(this.disposables)}}});var Cl,Hb,wY=_(()=>{"use strict";Cl=C(H());we();le();z();Hb=class{constructor(e){this.documents=e;this.disposables=[];this.providers=new Map;this._onDidProviderChange=new Cl.Emitter;this.onDidProviderChange=this._onDidProviderChange.event}attach(e){this.nvim=e,E.on("BufReadCmd",this.onBufReadCmd,this,this.disposables)}get schemes(){return Array.from(this.providers.keys())}async onBufReadCmd(e,t){let i=this.providers.get(e);if(!i)return;let r=new Cl.CancellationTokenSource,o=await Promise.resolve(i.provideTextDocumentContent(O.parse(t),r.token)),s=await this.nvim.buffer;await s.setLines(o.split(/\r?\n/),{start:0,end:-1,strictIndexing:!1}),process.nextTick(()=>{E.fire("BufCreate",[s.id])})}registerTextDocumentContentProvider(e,t){this.providers.set(e,t),this._onDidProviderChange.fire();let i=[];return t.onDidChange&&t.onDidChange(async r=>{let{buffer:o}=this.documents.getDocument(r.toString()),s=new Cl.CancellationTokenSource,a=await Promise.resolve(t.provideTextDocumentContent(r,s.token));await o.setLines(a.split(/\r?\n/),{start:0,end:-1,strictIndexing:!1})},null,i),Cl.Disposable.create(()=>{this.providers.delete(e),Z(i),this._onDidProviderChange.fire()})}dispose(){Z(this.disposables),this._onDidProviderChange.dispose(),this.providers.clear()}}});var CY=m((xFe,qb)=>{"use strict";qb.exports=Mbe;qb.exports.format=DY;qb.exports.parse=xY;var jbe=/\B(?=(\d{3})+(?!\d))/g,Abe=/(?:\.0*|(\.[^0]+)0+)$/,na={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},Obe=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function Mbe(n,e){return typeof n=="string"?xY(n):typeof n=="number"?DY(n,e):null}function DY(n,e){if(!Number.isFinite(n))return null;var t=Math.abs(n),i=e&&e.thousandsSeparator||"",r=e&&e.unitSeparator||"",o=e&&e.decimalPlaces!==void 0?e.decimalPlaces:2,s=Boolean(e&&e.fixedDecimals),a=e&&e.unit||"";(!a||!na[a.toLowerCase()])&&(t>=na.pb?a="PB":t>=na.tb?a="TB":t>=na.gb?a="GB":t>=na.mb?a="MB":t>=na.kb?a="KB":a="B");var l=n/na[a.toLowerCase()],u=l.toFixed(o);return s||(u=u.replace(Abe,"$1")),i&&(u=u.replace(jbe,i)),u+r+a}function xY(n){if(typeof n=="number"&&!isNaN(n))return n;if(typeof n!="string")return null;var e=Obe.exec(n),t,i="b";return e?(t=parseFloat(e[1]),i=e[4].toLowerCase()):(t=parseInt(n,10),i="b"),Math.floor(na[i]*t)}});var Lg=m((CFe,RY)=>{var ro=-1,Ir=1,gn=0;function Rg(n,e,t,i){if(n===e)return n?[[gn,n]]:[];if(t!=null){var r=Ybe(n,e,t);if(r)return r}var o=JT(n,e),s=n.substring(0,o);n=n.substring(o),e=e.substring(o),o=$T(n,e);var a=n.substring(n.length-o);n=n.substring(0,n.length-o),e=e.substring(0,e.length-o);var l=Nbe(n,e);return s&&l.unshift([gn,s]),a&&l.push([gn,a]),TY(l,i),l}function Nbe(n,e){var t;if(!n)return[[Ir,e]];if(!e)return[[ro,n]];var i=n.length>e.length?n:e,r=n.length>e.length?e:n,o=i.indexOf(r);if(o!==-1)return t=[[Ir,i.substring(0,o)],[gn,r],[Ir,i.substring(o+r.length)]],n.length>e.length&&(t[0][0]=t[2][0]=ro),t;if(r.length===1)return[[ro,n],[Ir,e]];var s=Hbe(n,e);if(s){var a=s[0],l=s[1],u=s[2],c=s[3],h=s[4],d=Rg(a,u),g=Rg(l,c);return d.concat([[gn,h]],g)}return Bbe(n,e)}function Bbe(n,e){for(var t=n.length,i=e.length,r=Math.ceil((t+i)/2),o=r,s=2*r,a=new Array(s),l=new Array(s),u=0;ut)g+=2;else if(S>i)d+=2;else if(h){var F=o+c-v;if(F>=0&&F=L)return SY(n,e,D,S)}}}for(var j=-b+f;j<=b-p;j+=2){var F=o+j,L;j===-b||j!==b&&l[F-1]t)p+=2;else if(W>i)f+=2;else if(!h){var w=o+c-j;if(w>=0&&w=L)return SY(n,e,D,S)}}}}return[[ro,n],[Ir,e]]}function SY(n,e,t,i){var r=n.substring(0,t),o=e.substring(0,i),s=n.substring(t),a=e.substring(i),l=Rg(r,o),u=Rg(s,a);return l.concat(u)}function JT(n,e){if(!n||!e||n.charAt(0)!==e.charAt(0))return 0;for(var t=0,i=Math.min(n.length,e.length),r=i,o=0;te.length?n:e,i=n.length>e.length?e:n;if(t.length<4||i.length*2=g.length?[D,S,F,L,w]:null}var o=r(t,i,Math.ceil(t.length/4)),s=r(t,i,Math.ceil(t.length/2)),a;if(!o&&!s)return null;s?o?a=o[4].length>s[4].length?o:s:a=s:a=o;var l,u,c,h;n.length>e.length?(l=a[0],u=a[1],c=a[2],h=a[3]):(c=a[0],h=a[1],l=a[2],u=a[3]);var d=a[4];return[l,u,c,h,d]}function TY(n,e){n.push([gn,""]);for(var t=0,i=0,r=0,o="",s="",a;t=0&&_Y(n[l][1])){var u=n[l][1].slice(-1);if(n[l][1]=n[l][1].slice(0,-1),o=u+o,s=u+s,!n[l][1]){n.splice(l,1),t--;var c=l-1;n[c]&&n[c][0]===Ir&&(r++,s=n[c][1]+s,c--),n[c]&&n[c][0]===ro&&(i++,o=n[c][1]+o,c--),l=c}}if(PY(n[t][1])){var u=n[t][1].charAt(0);n[t][1]=n[t][1].slice(1),o+=u,s+=u}}if(t0||s.length>0){o.length>0&&s.length>0&&(a=JT(s,o),a!==0&&(l>=0?n[l][1]+=s.substring(0,a):(n.splice(0,0,[gn,s.substring(0,a)]),t++),s=s.substring(a),o=o.substring(a)),a=$T(s,o),a!==0&&(n[t][1]=s.substring(s.length-a)+n[t][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a)));var h=r+i;o.length===0&&s.length===0?(n.splice(t-h,h),t=t-h):o.length===0?(n.splice(t-h,h,[Ir,s]),t=t-h+1):s.length===0?(n.splice(t-h,h,[ro,o]),t=t-h+1):(n.splice(t-h,h,[ro,o],[Ir,s]),t=t-h+2)}t!==0&&n[t-1][0]===gn?(n[t-1][1]+=n[t][1],n.splice(t,1)):t++,r=0,i=0,o="",s="";break}}n[n.length-1][1]===""&&n.pop();var d=!1;for(t=1;t=55296&&n<=56319}function EY(n){return n>=56320&&n<=57343}function PY(n){return EY(n.charCodeAt(0))}function _Y(n){return kY(n.charCodeAt(n.length-1))}function qbe(n){for(var e=[],t=0;t0&&e.push(n[t]);return e}function ZT(n,e,t,i){return _Y(n)||PY(i)?null:qbe([[gn,n],[ro,e],[Ir,t],[gn,i]])}function Ybe(n,e,t){var i=typeof t=="number"?{index:t,length:0}:t.oldRange,r=typeof t=="number"?null:t.newRange,o=n.length,s=e.length;if(i.length===0&&(r===null||r.length===0)){var a=i.index,l=n.slice(0,a),u=n.slice(a),c=r?r.index:null;e:{var h=a+s-o;if(c!==null&&c!==h||h<0||h>s)break e;var d=e.slice(0,h),g=e.slice(h);if(g!==u)break e;var f=Math.min(a,h),p=l.slice(0,f),b=d.slice(0,f);if(p!==b)break e;var v=l.slice(f),w=d.slice(f);return ZT(p,v,w,u)}e:{if(c!==null&&c!==a)break e;var D=a,d=e.slice(0,D),g=e.slice(D);if(d!==l)break e;var S=Math.min(o-D,s-D),F=u.slice(u.length-S),L=g.slice(g.length-S);if(F!==L)break e;var v=u.slice(0,u.length-S),w=g.slice(0,g.length-S);return ZT(l,v,w,F)}}if(i.length>0&&r&&r.length===0){e:{var p=n.slice(0,i.index),F=n.slice(i.index+i.length),f=p.length,S=F.length;if(sr&&s.length){let l=0;for(let u=0;u=b&&v!==p&&(v+=1);let w=0;for(let F=0;F0?h.join(`
-`)+`
-`:"";if(!(d.length===0&&a===r-c))return un.replace(Ne.create(a,0,r-c,0),d)}var Wb,kFe,XT=_(()=>{"use strict";Wb=C(Lg());Qr();Pe();kFe=q()("util-diff")});function ra(n){let{newText:e}=n,t=Zb(n.range),i=t.end.line-t.start.line;return e.split(/\r?\n/).length-i-1}function Zb(n){let e=n.start,t=n.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function Fg(n,e){if(n.length<=1)return n;let t=n.length/2|0,i=n.slice(0,t),r=n.slice(t);Fg(i,e),Fg(r,e);let o=0,s=0,a=0;for(;o0&&i.character==0,o;for(let s=0;s0){let h=t[t.length-1];h.newText=l,o=void 0;continue}o=void 0}l.includes("\r")&&(l=l.replace(/\r\n/g,`
-`));let c=De(u.end,i);if(c>0&&(u.end={line:i.line,character:i.character}),n.getText(u)!==l){if(c===0&&r&&!Ct(u)&&l.endsWith(`
-`)){l=l.slice(0,-1);let h=n.lines[i.line-1];u.end=er.Position.create(i.line-1,h.length)}else l.length==0&&(o=u.start);t.push({range:u,newText:l})}}return Fg(t,(s,a)=>{let l=s.range.start.line-a.range.start.line;return l===0?s.range.start.character-a.range.start.character:l})}function NY(n,e){var s,a;if(e.length==1){let{start:l,end:u}=e[0].range,{lines:c}=n,h=(s=c[l.line])!=null?s:"",d=(a=c[u.line])!=null?a:"",g=h.substring(0,l.character)+e[0].newText+d.substring(u.character);return u.line>=c.length&&n.eol?g==""?[...c.slice(0,l.line)]:(g.endsWith(`
-`)&&(g=g.slice(0,-1)),[...c.slice(0,l.line),...g.split(`
-`)]):[...c.slice(0,l.line),...g.split(`
-`),...c.slice(u.line+1)]}let t=n.getText(),i=0,r=[];for(let l of e){let u=n.offsetAt(l.range.start);if(ui&&r.push(t.substring(i,u)),l.newText.length&&r.push(l.newText),i=n.offsetAt(l.range.end)}r.push(t.substring(i));let o=r.join("");if(o!==t)return DH(o,n.eol)}function BY(n,e){return e.map(t=>{var c,h;let{start:i,end:r}=t.range,o=(c=n[i.line])!=null?c:"",s=Q(o.slice(0,i.character)),a=r.line==i.line?o:(h=n[r.line])!=null?h:"",l=Q(a.slice(0,r.character)),{newText:u}=t;return[u.length>0?u.split(`
-`):[],i.line,s,r.line,l]})}function Jb(n,e){let{range:t,newText:i}=e;if(De(t.end,n)<=0){let r=i.split(`
-`),o=r.length-(t.end.line-t.start.line)-1,s=n.character;if(t.end.line==n.line){let a=r[r.length-1].length;r.length>1?s=a+s-t.end.character:s=t.start.character+a+s-t.end.character}return{line:o,character:s-n.character}}return{line:0,character:0}}function $b(n,e){let{line:t,character:i}=n,{range:r,newText:o}=e,{end:s}=r,a=o.split(`
-`),l=a.length-(s.line-r.start.line)-1,u=r.end.line-n.line;if(u>0)return{line:t,character:i};if(u<0)return{line:t+l,character:i};if(a.length>1){let h=a[a.length-1].length;return{line:t+l,character:h+i-s.character}}let c=r.start.character-r.end.character;return{line:t+l,character:c+o.length+i}}function Xb(n,e){let t=er.Position.create(n.line,n.character),i=!1;for(let r=e.length-1;r>=0;r--){let o=e[r];if(i){t.line+=ra(o);continue}De(o.range.end,t)>0||(o.range.end.line==t.line?t=$b(t,o):(i=!0,t.line+=ra(o)))}return t}function UT(n,e){let t=0;for(let i of e){let r=Zb(i.range);De(r.end,n)<=0&&(t+=ra(i))}return t}function HY(n,e,t){var c,h;let i=n[0].range.start,r=n[n.length-1].range.end,o=e.length-r.line,s=((c=e[r.line])!=null?c:"").length-r.character,a=t.length-o,l=((h=t[a])!=null?h:"").length-s,u=Wbe(i,er.Position.create(a,l),t);return er.TextEdit.replace(er.Range.create(i,r),u)}function Wbe(n,e,t){var r,o;if(n.line===e.line)return((r=t[n.line])!=null?r:"").slice(n.character,e.character);let i=[];for(let s=n.line;s<=e.line;s++){let a=(o=t[s])!=null?o:"";s===n.line?i.push(a.slice(n.character)):s===e.line?i.push(a.slice(0,e.character)):i.push(a)}return i.join(`
-`)}var er,jr=_(()=>{"use strict";er=C(H());yt();Pe()});var GT,OFe,tr,jg,qY=_(()=>{"use strict";GT=C(H());z();Ec();OFe=q()("model-chars"),tr=class{constructor(e,t){this.start=e,this.end=t||e}static fromKeywordOption(e){let t=e.split(","),i=[];i.push(new tr(65,90)),i.push(new tr(97,122));for(let r of t)if(r=="@")i.push(new tr(256,65535));else if(r=="@-@")i.push(new tr(64));else if(/^\d+-\d+$/.test(r)){let o=r.match(/^(\d+)-(\d+)$/);i.push(new tr(Number(o[1]),Number(o[2])))}else if(/^\d+$/.test(r))i.push(new tr(Number(r)));else{let o=r.charCodeAt(0);i.some(s=>s.contains(o))||i.push(new tr(o))}return i}contains(e){return e>=this.start&&e<=this.end}},jg=class{constructor(e){this.ranges=[];e&&(this.ranges=tr.fromKeywordOption(e))}addKeyword(e){let t=e.charCodeAt(0),{ranges:i}=this;i.some(r=>r.contains(t))||i.push(new tr(t))}clone(){let e=new jg;return e.ranges=this.ranges.slice(),e}setKeywordOption(e){this.ranges=tr.fromKeywordOption(e)}async matchLines(e,t=2,i){let r=new Set,o=Date.now();for(let s of e){if(s.length===0)continue;let a="";Date.now()-o>15&&(await zr(),o=Date.now());for(let l of s){if(i&&i.isCancellationRequested)return;let u=l.codePointAt(0);this.isKeywordCode(u)?a=a+l:a.length>0&&(a.length>=t&&a.length<48&&r.add(a),a="")}a.length>=t&&a.length<48&&r.add(a)}return r}isKeywordCode(e){return e>255?!0:e<33?!1:this.ranges.some(t=>t.contains(e))}isKeywordChar(e){let{ranges:t}=this;if(/\s/.test(e))return!1;let i=e.charCodeAt(0);return i<33?!1:t.some(r=>r.contains(i))}isKeyword(e){for(let t=0,i=e.length;tr){let p=l.length,b=!1;for(;a>e.line+1;){let v=i[a-1].length;if(p-v1){let v=l.substring(g,p);o.set(v,p/c)}f=b}g=h-d,f=!1;for(let p=g;p1){let v=p==h-1?p+1:p,w=l.substring(g,v),D=o.get(w)||0,S=h-p+(v-g);S!==d&&o.set(w,Math.max(D,S/d))}f=b}return o}}});var QT,KT,YY=_(()=>{"use strict";QT=C(H()),KT=class{constructor(e,t,i){this._line=e,this._text=t,this._isLastLine=i}get lineNumber(){return this._line}get text(){return this._text}get range(){return QT.Range.create(this._line,0,this._line,this._text.length)}get rangeIncludingLineBreak(){return this._isLastLine?this.range:QT.Range.create(this._line,0,this._line+1,0)}get firstNonWhitespaceCharacterIndex(){return/^(\s*)/.exec(this._text)[1].length}get isEmptyOrWhitespace(){return this.firstNonWhitespaceCharacterIndex===this._text.length}}});function Zbe(n,e){let t=[],i=0;for(let r of n)t.push(i),i+=r.length+1;return e&&t.push(i),t}var Ub,Ag,WY=_(()=>{"use strict";Ub=C(H());YY();Ag=class{constructor(e,t,i,r,o,s){this.uri=e;this.languageId=t;this.version=i;this.lines=r;this.bufnr=o;this.eol=s}get content(){return this._content||(this._content=this.lines.join(`
-`)+(this.eol?`
-`:"")),this._content}get length(){if(!this._content){let e=this.lines.reduce((t,i)=>t+i.length+1,0);return this.eol?e:e-1}return this._content.length}get end(){let e=this.lineCount-1;return this.eol?Ub.Position.create(e,0):Ub.Position.create(e,this.lines[e].length)}get lineCount(){return this.lines.length+(this.eol?1:0)}getText(e){var t;if(e){let{start:i,end:r}=e;return i.line===r.line?i.character===r.character?"":((t=this.lines[i.line])!=null?t:"").substring(i.character,r.character):this.content.substring(this.offsetAt(e.start),this.offsetAt(e.end))}return this.content}lineAt(e){var i;let t=Ub.Position.is(e)?e.line:e;if(typeof t!="number"||t<0||t>=this.lineCount||Math.floor(t)!==t)throw new Error("Illegal value for `line`");return new KT(t,(i=this.lines[t])!=null?i:"",t===this.lineCount-1)}positionAt(e){e=Math.max(Math.min(e,this.content.length),0);let t=this.getLineOffsets(),i=0,r=t.length;if(r===0)return{line:0,character:e};for(;ie?r=s:i=s+1}let o=i-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this.content.length;if(e.line<0)return 0;let i=t[e.line],r=e.line+1{"use strict";VT=C(Ei()),ir=C(H());we();le();XT();z();Jt();yt();Pe();jr();qY();WY();nIe=q()("model-document"),Gb=class{constructor(e,t,i,r){this.buffer=e;this.env=t;this.nvim=i;this.isIgnored=!1;this.eol=!0;this._disposed=!1;this._attached=!1;this._previewwindow=!1;this._winid=-1;this.disposables=[];this.lines=[];this._onDocumentChange=new ir.Emitter;this.onDocumentChange=this._onDocumentChange.event;this.fireContentChanges=(0,VT.default)(()=>{this._fireContentChanges()},global.__TEST__?20:150),this.fetchContent=(0,VT.default)(()=>{this._fetchContent()},100),this.init(r)}get content(){return this.syncLines.join(`
-`)+(this.eol?`
-`:"")}get attached(){return this._attached}get textDocument(){return this._textDocument}get syncLines(){return this._textDocument.lines}get version(){return this._textDocument.version}get bufnr(){return this.buffer.id}get bufname(){return this._bufname}get filetype(){return this._filetype}get uri(){return this._uri}get isCommandLine(){return this.uri&&this.uri.endsWith("%5BCommand%20Line%5D")}get enabled(){return this.getVar("enabled",!0)}get languageId(){let{_filetype:e}=this;return e.includes(".")?e.match(/(.*?)\./)[1]:e}get changedtick(){return this._changedtick}convertFiletype(e){switch(e){case"javascript.jsx":return"javascriptreact";case"typescript.jsx":case"typescript.tsx":return"typescriptreact";case"tex":return"latex";default:{let t=this.env.filetypeMap;return String(t[e]||e)}}}get schema(){return O.parse(this.uri).scheme}get lineCount(){return this.lines.length}get winid(){return this._winid}get indentkeys(){return this._indentkeys}get previewwindow(){return this._previewwindow}init(e){let t=this.buftype=e.buftype;this._indentkeys=e.indentkeys,this._bufname=e.bufname,this._previewwindow=!!e.previewwindow,this._winid=e.winid,this.variables=e.variables||{},this._changedtick=e.changedtick,this.eol=e.eol==1,this._uri=tb(e.fullpath,this.bufnr,t,this.env.isCygwin),Array.isArray(e.lines)&&(this.lines=e.lines,this._noFetch=!0,this._attached=!0,this.attach()),this._filetype=this.convertFiletype(e.filetype),this.setIskeyword(e.iskeyword),this.createTextDocument(1,this.lines)}attach(){if(this.env.isVim)return;let e=this.lines;this.buffer.attach(!0).then(t=>{t||zT(this.bufnr)},t=>{zT(this.bufnr)}),this.buffer.listen("lines",(t,i,r,o,s)=>{if(!(t.id!==this.bufnr||!this._attached||i==null)&&i>this._changedtick){if(this._changedtick=i,e=[...e.slice(0,r),...s,...o==-1?[]:e.slice(o)],e.length==0&&(e=[""]),this.lines=e,Lc(t.id),E.pumvisible)return;this.fireContentChanges()}},this.disposables),this.buffer.listen("detach",()=>{zT(this.bufnr)},this.disposables)}get dirty(){return this.lines!==this.syncLines}get hasChanged(){return this.dirty?!Fe(this.lines,this.syncLines):!1}_fireContentChanges(e){var s;if(this.lines===this.syncLines)return;let t=this._textDocument,i=[];if(!e){let{cursor:a,insertMode:l}=E,u;if(a&&a.bufnr==this.bufnr){let c=(s=this.lines[a.lnum-1])!=null?s:"";u=ir.Position.create(a.lnum-1,Ui(c,a.col-1))}e=IY(t.lines,this.lines,u,l)}let r;e?(r=t.getText(e.range),i.push({range:e.range,text:e.newText,rangeLength:r.length})):r="";let o=this.createTextDocument(this.version+(e?1:0),this.lines);this._onDocumentChange.fire(Object.freeze({bufnr:this.bufnr,original:r,originalLines:t.lines,textDocument:{version:o.version,uri:this.uri},contentChanges:i}))}async applyEdits(e,t=!1,i=!1){var b,v;if(Array.isArray(arguments[1])&&(e=arguments[1]),!this._attached||e.length===0)return;this._forceSync();let r=this.textDocument;if(e=MY(r,e),e.length===0)return;let o=NY(r,e);if(!o)return;let s=r.lines,a=LY(s,o,e[0].range.start.line);if(a.start===a.end&&a.replacement.length==0)return;let l=a.start===a.end&&a.start===s.length+(this.eol?0:1),u=s.slice(a.start,a.end),c=[];this.nvim.hasFunction("nvim_buf_set_text")&&e.length<200&&a.start!==a.end&&e[e.length-1].range.end.line=0;){let u=o[a-1];if(!u||!r.isKeywordChar(u))break;a=a-1}for(;l<=o.length;){let u=o[l];if(!u||!r.isKeywordChar(u))break;l=l+1}return ir.Range.create(e.line,a,e.line,l)}createTextDocument(e,t){let{uri:i,languageId:r,eol:o}=this;return this._textDocument=new Ag(i,r,e,t,this.bufnr,o)}async _fetchContent(e){if(!this.env.isVim||!this._attached)return;let{nvim:t,bufnr:i,changedtick:r}=this,o=await t.call("coc#util#get_buf_lines",[i,r]);this._noFetch=!0,o?(this._changedtick=o.changedtick,this.lines=o.lines,Lc(this.bufnr),e?this._forceSync():this.fireContentChanges()):e&&this._forceSync()}changeLine(e,t,i){if(this.lines[e-1]===void 0)return;let o=this.lines.slice();o[e-1]=t,this.lines=o,Lc(this.bufnr),this._changedtick=i}async patchChange(e){if(!!this._attached)if(this.env.isVim)if(e){let t=await this.nvim.call("coc#util#get_changeinfo",[]);if(t.bufnr!==this.bufnr)return;if(t.changedtick0&&!d&&l==e&&s.push(ir.Range.create(o.positionAt(u-l.length),o.positionAt(u))),d||(l="")}return s}fixStartcol(e,t){let i=this.getline(e.line);if(!i)return null;let{character:r}=e,o=i.slice(0,r),s=Q(o),{chars:a}=this;for(let l=o.length-1;l>=0;l--){let u=o[l];if(u==" "||!a.isKeywordChar(u)&&!t.includes(u))break;s=s-Q(u)}return s}addHighlights(e,t,i,r={}){let{start:o,end:s}=i;if(!Ct(i))for(let a=o.line;a<=s.line;a++){let l=this.getline(a,!1),u=a==o.line?Ze(l,o.character):0,c=a==s.line?Ze(l,s.character):global.Buffer.byteLength(l);u>=c||e.push(Object.assign({hlGroup:t,lnum:a,colStart:u,colEnd:c},r))}}getline(e,t=!0){return t?this.lines[e]||"":this.syncLines[e]||""}getLines(e,t){return this.lines.slice(e!=null?e:0,t!=null?t:this.lines.length)}getDocumentContent(){let e=this.lines.join(`
-`);return this.eol?e+`
-`:e}getVar(e,t){let i=this.variables[`coc_${e}`];return i===void 0?t:i}getPosition(e,t){let i=this.getline(e-1);if(!i||t==0)return{line:e-1,character:0};let r=et(i,0,t-1);return{line:e-1,character:r.length}}getEndOffset(e,t,i){let r=0,o=this.lines.length;for(let s=e-1;s{"use strict";JY=C(CY()),ek=C(require("fs")),tk=C(require("os")),Sl=C(require("path")),fn=C(H());we();le();ZY();z();Je();Pe();Qb=q()("core-documents"),Kb=class{constructor(e,t){this.configurations=e;this.workspaceFolder=t;this._initialized=!1;this._attached=!1;this._currentResolve=!1;this.disposables=[];this.creating=new Map;this.buffers=new Map;this.winids=new Set;this.resolves=[];this._onDidOpenTextDocument=new fn.Emitter;this._onDidCloseDocument=new fn.Emitter;this._onDidChangeDocument=new fn.Emitter;this._onDidSaveDocument=new fn.Emitter;this._onWillSaveDocument=new fn.Emitter;this.onDidOpenTextDocument=this._onDidOpenTextDocument.event;this.onDidCloseDocument=this._onDidCloseDocument.event;this.onDidChangeDocument=this._onDidChangeDocument.event;this.onDidSaveTextDocument=this._onDidSaveDocument.event;this.onWillSaveTextDocument=this._onWillSaveDocument.event;this._cwd=process.cwd()}async attach(e,t){if(this._attached)return;this.nvim=e,this._env=t,this._attached=!0;let r=this.configurations.getConfiguration("coc.preferences").get("maxFileSize","10MB");this.maxFileSize=JY.default.parse(r),e.setVar("coc_max_filesize",this.maxFileSize,!0);let{bufnrs:o,winid:s,bufnr:a,winids:l}=await this.nvim.call("coc#util#all_state");this.winids=new Set(l),this._bufnr=a,await Promise.all(o.map(c=>this.createDocument(c))),E.on("BufDetach",this.onBufDetach,this,this.disposables),E.on("VimLeavePre",()=>{this.resolveCurrent(void 0)},null,this.disposables),E.on("WinEnter",c=>{this.winids.add(c)},null,this.disposables),E.on("BufWinEnter",(c,h)=>{this.winids.add(h)},null,this.disposables),E.on("DirChanged",c=>{this._cwd=c},null,this.disposables),E.on("CursorHold",async()=>{let{bufnrs:c,winids:h}=await this.nvim.call("coc#util#all_state");for(let d of this.buffers.keys())c.includes(d)||E.fire("BufUnload",[d]);for(let d of this.winids)h.includes(d)||E.fire("WinClosed",[d]);this.winids=new Set(h)},null,this.disposables);let u=c=>{this._bufnr=c,this.createDocument(c)};E.on("CursorMoved",u,null,this.disposables),E.on("CursorMovedI",u,null,this.disposables),E.on("BufUnload",this.onBufUnload,this,this.disposables),E.on("BufEnter",this.onBufEnter,this,this.disposables),E.on("BufCreate",this.onBufCreate,this,this.disposables),E.on("TermOpen",this.onBufCreate,this,this.disposables),E.on("BufWritePost",this.onBufWritePost,this,this.disposables),E.on("BufWritePre",this.onBufWritePre,this,this.disposables),E.on("FileType",this.onFileTypeChange,this,this.disposables),E.fire("BufEnter",[a]),E.fire("BufWinEnter",[a,s]),E.on("BufEnter",c=>{this.createDocument(c)},null,this.disposables),E.on("CursorHold",(c,h,d)=>{let g=this.getDocument(c);g&&g.onCursorHold(d)},null,this.disposables),this._env.isVim?["TextChangedP","TextChangedI","TextChanged"].forEach(c=>{E.on(c,(h,d)=>{let g=this.buffers.get(h);g!=null&&g.attached&&g.onTextChange(c,d)},null,this.disposables)}):E.on("CompleteDone",async()=>{let c=await E.race(["TextChangedI","TextChanged","MenuPopupChanged"],100);if(c&&(c.name==="TextChangedI"||c.name==="TextChanged")){let h=this.buffers.get(E.bufnr);h!=null&&h.attached&&h._forceSync()}},null,this.disposables),this._initialized=!0}get bufnr(){return this._bufnr}get root(){return this._root}get cwd(){return this._cwd}get documents(){return Array.from(this.buffers.values()).filter(e=>e.attached&&!e.isCommandLine)}get bufnrs(){return Array.from(this.buffers.keys())}detach(){if(!!this._attached){this._attached=!1;for(let e of this.buffers.keys())this.onBufUnload(e);Z(this.disposables)}}get textDocuments(){let e=[];for(let t of this.buffers.values())t.attached&&e.push(t.textDocument);return e}getDocument(e){if(typeof e=="number")return this.buffers.get(e);let t=Wo.isWindows||Wo.isMacintosh;e=O.parse(e).toString();for(let i of this.buffers.values())if(i.uri===e||t&&i.uri.toLowerCase()===e.toLowerCase())return i;return null}expand(e){if(e.startsWith("~")&&(e=tk.default.homedir()+e.slice(1)),e.includes("$")){let t=this.getDocument(this.bufnr),i=t?O.parse(t.uri).fsPath:"";e=e.replace(/\$\{(.*?)\}/g,(r,o)=>{if(o.startsWith("env:")){let s=o.split(":")[1];return s?process.env[s]:""}switch(o){case"workspace":case"workspaceRoot":case"workspaceFolder":return this._root;case"workspaceFolderBasename":return Sl.default.dirname(this._root);case"cwd":return this._cwd;case"file":return i;case"fileDirname":return i?Sl.default.dirname(i):"";case"fileExtname":return i?Sl.default.extname(i):"";case"fileBasename":return i?Sl.default.basename(i):"";case"fileBasenameNoExtension":{let s=i?Sl.default.basename(i):"";return s?s.slice(0,s.length-Sl.default.extname(s).length):""}default:return r}}),e=e.replace(/\$[\w]+/g,r=>r=="$HOME"?tk.default.homedir():process.env[r.slice(1)]||r)}return e}get document(){return this._currentResolve?new Promise(e=>{this.resolves.push(e)}):(this._currentResolve=!0,new Promise((e,t)=>{this.nvim.eval('coc#util#get_bufoptions(bufnr("%"))').then(i=>{let r;i!=null&&(this.creating.delete(i.bufnr),r=this._createDocument(i)),this.resolveCurrent(r),e(r),this._currentResolve=!1},t)}))}resolveCurrent(e){if(this.resolves.length>0)for(;this.resolves.length;){let t=this.resolves.pop();t&&t(e)}}get uri(){let{bufnr:e}=this;if(e){let t=this.getDocument(e);if(t)return t.uri}return null}get filetypes(){let e=new Set;for(let t of this.documents)e.add(t.filetype);return e}get languageIds(){let e=new Set;for(let t of this.documents)e.add(t.languageId);return e}async getFormatOptions(e){let t;e&&(t=this.getDocument(e));let i=t?t.bufnr:0,r=await this.nvim.call("coc#util#get_format_opts",[i]),o={tabSize:r.tabsize,insertSpaces:r.expandtab==1};return o.insertFinalNewline=r.insertFinalNewline==1,r.trimTrailingWhitespace&&(o.trimTrailingWhitespace=!0),r.trimFinalNewlines&&(o.trimFinalNewlines=!0),o}async createDocument(e){let t=this.buffers.get(e);if(t)return t;if(this.creating.has(e))return await this.creating.get(e);let i=new Promise(r=>{this.nvim.call("coc#util#get_bufoptions",[e]).then(o=>{if(!this.creating.has(e)){r(void 0);return}if(this.creating.delete(e),!o){r(void 0);return}t=this._createDocument(o),r(t)},()=>{this.creating.delete(e),r(void 0)})});return this.creating.set(e,i),await i}async onBufCreate(e){this.onBufUnload(e),await this.createDocument(e)}_createDocument(e){let{bufnr:t}=e;if(this.buffers.has(t))return this.buffers.get(t);let i=this.nvim.createBuffer(t),r=new Gb(i,this._env,this.nvim,e);if(this.buffers.set(t,r),r.attached){if(r.schema=="file"){let o=this.configurations.resolveFolderConfigution(r.uri),s=this.workspaceFolder.resolveRoot(r,this._cwd,this._initialized,this.expand.bind(this));t==this._bufnr&&(o&&this.configurations.setFolderConfiguration(r.uri),s&&(this._root=s))}this._onDidOpenTextDocument.fire(r.textDocument),r.onDocumentChange(o=>this._onDidChangeDocument.fire(o))}return Qb.debug("buffer created",t,r.attached,r.uri),r}onBufEnter(e){this._bufnr=e;let t=this.buffers.get(e);if(t){this.configurations.setFolderConfiguration(t.uri);let i=this.workspaceFolder.getWorkspaceFolder(O.parse(t.uri));i&&(this._root=O.parse(i.uri).fsPath)}}onBufUnload(e){this.creating.delete(e),this.onBufDetach(e,!1)}async onBufDetach(e,t=!0){this.detachBuffer(e),t&&await this.nvim.call("bufloaded",[e])&&await this.createDocument(e)}detachBuffer(e){let t=this.buffers.get(e);!t||(Qb.debug("document detach",e,t.uri),this._onDidCloseDocument.fire(t.textDocument),this.buffers.delete(e),t.detach())}async onBufWritePost(e,t){let i=this.buffers.get(e);i&&(i.changedtick!=t&&await i.patchChange(),this._onDidSaveDocument.fire(i.textDocument))}async onBufWritePre(e,t,i){let r=this.buffers.get(e);if(!r||!r.attached||r.bufname!=t&&(this.detachBuffer(e),r=await this.createDocument(e),!r.attached))return;r.changedtick!=i?await r.synchronize():await r.patchChange();let o=!0,s=[],a={document:r.textDocument,reason:fn.TextDocumentSaveReason.Manual,waitUntil:u=>{o?s.push(u):(Qb.error("Can't call waitUntil in async manner:",Error().stack),this.nvim.echoError("waitUntil can't be used in async manner, check log for details"))}};this._onWillSaveDocument.fire(a),o=!1;let l=s.length;if(l){let c=await new Promise(h=>{let g=this.configurations.getConfiguration("coc.preferences").get("willSaveHandlerTimeout",500),f=setTimeout(()=>{this.nvim.outWriteLine(`Will save handler timeout after ${g}ms`),h(void 0)},g),p=0,b=!1;for(let v of s){let w=D=>{b||(b=!0,clearTimeout(f),h(D))};v.then(D=>{if(Array.isArray(D)&&D.length&&fn.TextEdit.is(D[0]))return w(D);p=p+1,p==l&&w(void 0)},D=>{Qb.error("Error on will save handler:",D),p=p+1,p==l&&w(void 0)})}});c&&await r.applyEdits(c,!1,this.bufnr===r.bufnr)}}onFileTypeChange(e,t){let i=this.getDocument(t);!i||i.convertFiletype(e)==i.filetype||(this._onDidCloseDocument.fire(i.textDocument),i.setFiletype(e),this._onDidOpenTextDocument.fire(i.textDocument))}async getQuickfixList(e){let t={},i=e.reduce((r,o)=>{let s=O.parse(o.uri);return s.scheme=="file"&&!r.includes(s.fsPath)&&!this.getDocument(o.uri)&&r.push(s.fsPath),r},[]);return await Promise.all(i.map(r=>new Promise(o=>{ek.default.readFile(r,"utf8",(s,a)=>{if(s)return o(void 0);t[r]=a.split(/\r?\n/),o(void 0)})}))),await Promise.all(e.map(r=>{let{uri:o,range:s}=r,{fsPath:a}=O.parse(o),l,u=t[a];return u&&(l=u[s.start.line]),this.getQuickfixItem(r,l)}))}async getQuickfixItem(e,t,i="",r){fn.LocationLink.is(e)&&(e=fn.Location.create(e.targetUri,e.targetRange));let o=this.getDocument(e.uri),{uri:s,range:a}=e,{start:l,end:u}=a,c=O.parse(s);!t&&c.scheme=="file"&&(t=await this.getLine(s,l.line));let h=l.line==u.line?t:await this.getLine(s,u.line),d={uri:s,filename:c.scheme=="file"?c.fsPath:s,lnum:l.line+1,end_lnum:u.line+1,col:t?Ze(t,l.character)+1:l.character+1,end_col:h?Ze(h,u.character)+1:u.character+1,text:t||"",range:a};return r&&(d.module=r),i&&(d.type=i),o&&(d.bufnr=o.bufnr),d}async getLine(e,t){let i=this.getDocument(e);if(i&&i.attached)return i.getline(t)||"";if(!e.startsWith("file:"))return"";let r=O.parse(e).fsPath;return ek.default.existsSync(r)?await M2(r,t):""}async readFile(e){let t=this.getDocument(e);if(t)return await t.patchChange(),t.content;let i=O.parse(e);return i.scheme!="file"?"":(await this.nvim.call("readfile",[i.fsPath])).join(`
-`)+`
-`}reset(){this.creating.clear();for(let e of this.buffers.keys())this.onBufUnload(e);this.buffers.clear(),this._root=process.cwd()}dispose(){for(let e of this.buffers.keys())this.onBufUnload(e);this._attached=!1,this.buffers.clear(),Z(this.disposables)}}});function Og(){return XY.default.randomBytes(16)}var XY,ik=_(()=>{XY=C(require("crypto"))});function Jbe(n,e){var t=e||0,i=UY;return[i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]]].join("")}var UY,Mg,zb,nk=_(()=>{UY=[];for(Mg=0;Mg<256;++Mg)UY[Mg]=(Mg+256).toString(16).substr(1);zb=Jbe});function $be(n,e,t){var i=e&&t||0,r=e||[];n=n||{};var o=n.node||GY,s=n.clockseq!==void 0?n.clockseq:rk;if(o==null||s==null){var a=n.random||(n.rng||Og)();o==null&&(o=GY=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=rk=(a[6]<<8|a[7])&16383)}var l=n.msecs!==void 0?n.msecs:new Date().getTime(),u=n.nsecs!==void 0?n.nsecs:sk+1,c=l-ok+(u-sk)/1e4;if(c<0&&n.clockseq===void 0&&(s=s+1&16383),(c<0||l>ok)&&n.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ok=l,sk=u,rk=s,l+=122192928e5;var h=((l&268435455)*1e4+u)%4294967296;r[i++]=h>>>24&255,r[i++]=h>>>16&255,r[i++]=h>>>8&255,r[i++]=h&255;var d=l/4294967296*1e4&268435455;r[i++]=d>>>8&255,r[i++]=d&255,r[i++]=d>>>24&15|16,r[i++]=d>>>16&255,r[i++]=s>>>8|128,r[i++]=s&255;for(var g=0;g<6;++g)r[i+g]=o[g];return e||zb(r)}var GY,rk,ok,sk,Uo,QY=_(()=>{ik();nk();ok=0,sk=0;Uo=$be});function Xbe(n,e,t){var i=e&&t||0;typeof n=="string"&&(e=n==="binary"?new Array(16):null,n=null),n=n||{};var r=n.random||(n.rng||Og)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e)for(var o=0;o<16;++o)e[i+o]=r[o];return e||zb(r)}var re,KY=_(()=>{ik();nk();re=Xbe});var Oe=_(()=>{QY();KY()});var Ri,oa=_(()=>{"use strict";bc();Pe();Ri=class{constructor(){this.lines=[];this._highlights=[]}addLine(e,t){if(e.includes(`
-`)){for(let i of e.split(/\r?\n/))this.addLine(i,t);return}if(t&&this._highlights.push({lnum:this.lines.length,colStart:e.match(/^\s*/)[0].length,colEnd:Q(e),hlGroup:t}),e.includes("\x1B")){let i=mc(e);for(let r of i.highlights){let{span:o,hlGroup:s}=r;o[0]!=o[1]&&this._highlights.push({lnum:this.lines.length,colStart:o[0],colEnd:o[1],hlGroup:s})}this.lines.push(i.line)}else this.lines.push(e)}addLines(e){this.lines.push(...e)}addTexts(e){let t=this.lines.length,i="";for(let r of e){let o=Q(i);r.hlGroup&&this._highlights.push({lnum:t,colStart:o,colEnd:o+Q(r.text),hlGroup:r.hlGroup}),i+=r.text}this.lines.push(i)}addText(e,t){let{lines:i}=this,r=i[i.length-1]||"";if(e.includes(`
-`)){let o=e.split(`
-`);this.addText(o[0],t);for(let s of o.slice(1))this.addLine(s,t);return}if(t){let o=Q(r);this._highlights.push({lnum:i.length?i.length-1:0,colStart:o,colEnd:o+Q(e),hlGroup:t})}i.length?i[i.length-1]=`${r}${e}`:i.push(e)}get length(){return this.lines.length}getline(e){return this.lines[e]||""}get highlights(){return this._highlights}get content(){return this.lines.join(`
-`)}render(e,t=0,i=-1){e.setLines(this.lines,{start:t,end:i,strictIndexing:!1},!0);for(let r of this._highlights)e.addHighlight({hlGroup:r.hlGroup,colStart:r.colStart,colEnd:r.colEnd==null?-1:r.colEnd,line:t+r.lnum,srcId:-1})}}});function Gbe(n,e){var i,r;let t=new Map;for(let o of n){let s=(i=Ig(o))!=null?i:null,a=s&&(r=e[s].label)!=null?r:null,l=t.get(a);l?l.push(o):t.set(a,[o])}return t}var Ng,Vb,BIe,Ube,ey,zY=_(()=>{"use strict";Ng=C(Lg()),Vb=C(require("path"));Qr();we();le();z();Je();jr();oa();BIe=q()("mdoe-editInspect"),Ube=0,ey=class{constructor(e,t){this.nvim=e;this.keymaps=t;this.disposables=[];this.items=[];this.renameMap=new Map;E.on("BufUnload",i=>{i==this.bufnr&&this.dispose()},null,this.disposables)}addFile(e,t,i){this.items.push({index:t.length,filepath:e,lnum:i})}async show(e){var c,h;let{nvim:t}=this,i=Ube++;t.pauseNotification(),t.command(`tabe +setl\\ buftype=nofile CocWorkspaceEdit${i}`,!0),t.command("setl bufhidden=wipe nolist",!0),t.command("setl nobuflisted wrap undolevels=-1 filetype=cocedits noswapfile",!0),await t.resumeNotification(!0);let r=await t.buffer,o=await t.call("getcwd");this.bufnr=r.id;let s=d=>{let g=O.parse(d).fsPath;return Ae(o,g,!0)?Vb.default.relative(o,g):g},a=d=>Vb.default.isAbsolute(d)?d:Vb.default.join(o,d),l=new Ri,u=Gbe((c=e.edit.documentChanges)!=null?c:[],(h=e.edit.changeAnnotations)!=null?h:{});for(let[d,g]of u.entries()){d&&(l.addLine(d,"MoreMsg"),l.addLine(""));for(let f of g)if(Ws.is(f)){let p=e.changes[f.textDocument.uri],b=s(f.textDocument.uri);l.addTexts([{text:"Change",hlGroup:"Title"},{text:" "},{text:b,hlGroup:"Directory"},{text:`:${p.lnum}`,hlGroup:"LineNr"}]),this.addFile(b,l,p.lnum),l.addLine(""),this.addChangedLines(l,p,b,p.lnum),l.addLine("")}else if(Zs.is(f)||qo.is(f)){let p=qo.is(f)?"Delete":"Create",b=s(f.uri);l.addTexts([{text:p,hlGroup:"Title"},{text:" "},{text:b,hlGroup:"Directory"}]),this.addFile(b,l),l.addLine("")}else if(Js.is(f)){let p=s(f.oldUri),b=s(f.newUri);l.addTexts([{text:"Rename",hlGroup:"Title"},{text:" "},{text:p,hlGroup:"Directory"},{text:"->",hlGroup:"Comment"},{text:b,hlGroup:"Directory"}]),this.renameMap.set(p,b),this.addFile(b,l),l.addLine("")}}t.pauseNotification(),l.render(r),r.setOption("modifiable",!1,!0),await t.resumeNotification(!0),this.disposables.push(this.keymaps.registerLocalKeymap("n","",async()=>{var v;let d=await t.call("line","."),g=await t.call("col","."),f;for(let w=this.items.length-1;w>=0;w--){let D=this.items[w];if(d>=D.index){f=D;break}}if(!f)return;let p=O.file(a(f.filepath)).toString(),b=this.renameMap.has(f.filepath)?this.renameMap.get(f.filepath):f.filepath;if(await t.call("coc#util#open_file",["tab drop",a(b)]),typeof f.lnum=="number"){let D=((v=e.edit.documentChanges)!=null?v:[]).find(F=>Ws.is(F)&&F.textDocument.uri==p),S=f.lnum;if(D){let F=Fg(D.edits,(j,W)=>{let B=j.range.start.line-W.range.start.line;return B===0?j.range.start.character-W.range.start.character:B});S=Xb(Vt.create(S-1,0),F).line+1}await t.call("cursor",[S,g])}t.redrawVim()},!0)),this.disposables.push(this.keymaps.registerLocalKeymap("n","",async()=>{t.command("bwipeout!",!0)},!0))}addChangedLines(e,t,i,r){let o=(0,Ng.default)(t.oldLines.join(`
-`),t.newLines.join(`
-`));for(let s=0;s0&&e.addText(h)}r+=l.split(`
-`).length-1}else a[0]==Ng.default.DELETE?(r+=a[1].split(`
-`).length-1,e.addText(a[1],"DiffDelete")):a[0]==Ng.default.INSERT&&e.addText(a[1],"DiffAdd")}}dispose(){Z(this.disposables)}}});function ak(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}function lk(n){return new Error(`File ${n} already exists`)}function ty(n){return new Error(`File ${n} not exists`)}function VY(n){return new Error(`${n} should not be called in an asynchronize manner`)}function iy(n){return new Error(`Change of ${n} not supported`)}var uk=_(()=>{"use strict"});function zbe(n,e,t){let i=Ar.default.join(n,e);if(typeof t!="string"){let r=t.baseUri.fsPath;if(!Ae(r,i))return!1;let o=Ar.default.relative(r,i);return(0,ck.default)(o,t.pattern,{dot:!0})}return(0,ck.default)(e,t,{dot:!0})}function ny(n){return O.parse(n).fsPath}var ct,eW,ck,ry,Ar,tW,St,Kbe,oy,iW=_(()=>{"use strict";ct=C(Rn()),eW=C(gb()),ck=C(Vn()),ry=C(require("os")),Ar=C(require("path")),tW=require("util");Oe();St=C(H());we();le();zY();uk();Je();Pe();jr();Tb();Kbe=q()("core-files"),oy=class{constructor(e,t,i,r){this.documents=e;this.configurations=t;this.workspaceFolderControl=i;this.keymaps=r;this.operationTimeout=500;this._onDidCreateFiles=new St.Emitter;this._onDidRenameFiles=new St.Emitter;this._onDidDeleteFiles=new St.Emitter;this._onWillCreateFiles=new St.Emitter;this._onWillRenameFiles=new St.Emitter;this._onWillDeleteFiles=new St.Emitter;this.onDidCreateFiles=this._onDidCreateFiles.event;this.onDidRenameFiles=this._onDidRenameFiles.event;this.onDidDeleteFiles=this._onDidDeleteFiles.event;this.onWillCreateFiles=this._onWillCreateFiles.event;this.onWillRenameFiles=this._onWillRenameFiles.event;this.onWillDeleteFiles=this._onWillDeleteFiles.event}attach(e,t,i){this.nvim=e,this.env=t,this.window=i}async openTextDocument(e){e=typeof e=="string"?O.file(e):e;let t=this.documents.getDocument(e.toString());if(t)return await this.jumpTo(e.toString(),null,"drop"),t;let i=e.scheme;if(i=="file"){if(!ct.default.existsSync(e.fsPath))throw ty(e.fsPath);ct.default.accessSync(e.fsPath,ct.default.constants.R_OK)}return i=="untitled"?(await this.nvim.call("coc#util#open_file",["tab drop",e.path]),await this.documents.document):await this.loadResource(e.toString())}async jumpTo(e,t,i){let r=this.configurations.getConfiguration("coc.preferences"),o=i||r.get("jumpCommand","edit"),{nvim:s}=this,a=this.documents.getDocument(e),l=a?a.bufnr:-1;if(l!=-1&&o=="edit"){if(s.pauseNotification(),s.command("silent! normal! m'",!0),s.command(`buffer ${l}`,!0),s.command("if &filetype ==# '' | filetype detect | endif",!0),t){let u=a.getline(t.line),c=Q(u.slice(0,t.character))+1;s.call("cursor",[t.line+1,c],!0)}await s.resumeNotification(!0)}else{let{fsPath:u,scheme:c}=O.parse(e),h=t==null?null:[t.line,t.character];if(c=="file"){let d=yg(Ar.default.normalize(u));await this.nvim.call("coc#util#jump",[o,d,h])}else ry.default.platform()=="win32"&&(e=e.replace(/\/?/,"?")),await this.nvim.call("coc#util#jump",[o,e,h])}}async openResource(e){let{nvim:t}=this,i=O.parse(e);if(/^https?/.test(i.scheme)){await t.call("coc#ui#open_url",e);return}let r=await t.getOption("wildignore");await t.setOption("wildignore",""),await this.jumpTo(e),await t.setOption("wildignore",r)}async loadResource(e){let t=this.documents.getDocument(e);if(t)return t;let r=this.configurations.getConfiguration("workspace").get("openResourceCommand","tab drop"),o=O.parse(e),s=o.scheme==="file"?o.fsPath:e,a;if(r){let l=await this.nvim.call("win_getid");a=await this.nvim.call("coc#util#open_file",[r,s]),await this.nvim.call("win_gotoid",[l])}else a=(await this.nvim.call("coc#ui#open_files",[[s]]))[0];return await this.documents.createDocument(a)}async loadResources(e){let{documents:t}=this,i=e.map(o=>{let s=O.parse(o);return s.scheme=="file"?s.fsPath:o}),r=await this.nvim.call("coc#ui#open_files",[i]);return await Promise.all(r.map(o=>t.createDocument(o)))}async createFile(e,t={},i){let{nvim:r}=this,o=ct.default.existsSync(e);if(o&&!t.overwrite&&!t.ignoreIfExists)throw lk(e);if(!o||t.overwrite){let s=new St.CancellationTokenSource;await this.fireWaitUntilEvent(this._onWillCreateFiles,{files:[O.file(e)],token:s.token},i),s.cancel();let a=Ar.default.dirname(e);if(!ct.default.existsSync(a)){let c,h=a;for(;![".","/",Ar.default.parse(a).root].includes(h);){if(ct.default.existsSync(Ar.default.dirname(h))){c=h;break}h=Ar.default.dirname(h)}await ct.default.mkdirp(a),i&&i.push(async()=>{ct.default.existsSync(c)&&await ct.default.remove(c)})}ct.default.writeFileSync(e,"","utf8"),i&&i.push(async()=>{ct.default.existsSync(e)&&await ct.default.unlink(e)});let u=(await this.loadResource(e)).bufnr;i&&i.push(()=>(E.fire("BufUnload",[u]),r.command(`silent! bd! ${u}`))),this._onDidCreateFiles.fire({files:[O.file(e)]})}}async deleteFile(e,t={},i){let{ignoreIfNotExists:r,recursive:o}=t,s=await Ht(e),a=s&&s.isDirectory();if(!s&&!r)throw ty(e);if(s==null)return;let l=O.file(e);if(await this.fireWaitUntilEvent(this._onWillDeleteFiles,{files:[l]},i),!a){let u=await this.nvim.call("bufnr",[e]);u&&(E.fire("BufUnload",[u]),await this.nvim.command(`silent! bwipeout ${u}`),i&&i.push(()=>this.loadResource(l.toString())))}if(a&&o){let u=Ar.default.join(ry.default.tmpdir(),"coc-"+re());await ct.default.mkdir(u),await ct.default.copy(e,u,{recursive:!0}),await ct.default.remove(e),i&&i.push(async()=>{await ct.default.mkdir(e),await ct.default.copy(u,e,{recursive:!0}),await ct.default.remove(u)})}else if(a)await ct.default.rmdir(e),i&&i.push(()=>ct.default.mkdir(e));else{let u=Ar.default.join(ry.default.tmpdir(),"coc-"+re());await ct.default.copyFile(e,u),await ct.default.unlink(e),i&&i.push(()=>ct.default.move(u,e,{overwrite:!0}))}this._onDidDeleteFiles.fire({files:[l]})}async renameFile(e,t,i={},r){let{nvim:o}=this,{overwrite:s,ignoreIfExists:a}=i;if(t===e)return;let l=ct.default.existsSync(t);if(l&&a&&!s)return;if(l&&!s)throw lk(t);let u=await Ht(e),c=u&&u.isDirectory()?0:await o.call("bufloaded",[e]);if(!c&&!u)throw ty(e);let h={newUri:O.parse(t),oldUri:O.parse(e)};if(i.skipEvent||await this.fireWaitUntilEvent(this._onWillRenameFiles,{files:[h]},r),c){let d=await o.call("coc#ui#rename_file",[e,t,u!=null]);await this.documents.onBufCreate(d)}else{if(u!=null&&u.isDirectory())for(let d of this.documents.documents){let g=O.parse(d.uri);if(g.scheme==="file"&&Ae(e,g.fsPath,!1)){let f=g.fsPath.replace(e,t),p=await o.call("coc#ui#rename_file",[g.fsPath,f,!1]);await this.documents.onBufCreate(p)}}ct.default.renameSync(e,t)}r&&r.push(()=>this.renameFile(t,e,{skipEvent:!0})),i.skipEvent||this._onDidRenameFiles.fire({files:[h]})}async renameCurrent(){let{nvim:e}=this,t=await e.call("expand",["%:p"]),i=await e.callAsync("coc#util#with_callback",["input",["New path: ",t,"file"]]);i=i?i.trim():null,!(i===t||!i)&&(t.toLowerCase()!=i.toLowerCase()&&ct.default.existsSync(i)&&!await Sb(this.nvim,`${i} exists, overwrite?`)||await this.renameFile(t,i,{overwrite:!0}))}get currentUri(){let e=this.documents.getDocument(this.documents.bufnr);return e?e.uri:null}async applyEdit(e,t){let i=OY(e),r=[],o=!1;try{let{changeAnnotations:s}=e,{currentUri:a}=this,l=s?AY(i,s):[],u={},c=[];for(let h of l){let d=s[h];d.needsConfirmation=!1,await this.window.showMenuPicker(["Yes","No"],{position:"center",title:"Confirm edits",content:d.label+(d.description?" "+d.description:"")})!==0&&c.push(h)}if(i=i.filter(h=>!c.includes(Ig(h))),!i.length)return!0;o=i.every(h=>St.TextDocumentEdit.is(h)&&h.textDocument.uri===a),this.validateChanges(i);for(let h of i)if(St.TextDocumentEdit.is(h)){let{textDocument:d,edits:g}=h,{uri:f}=d,p=await this.loadResource(f),b=await p.applyEdits(g,!1,f===a);if(b){let v=p.version,{newText:w,range:D}=b;u[f]={uri:f,lnum:D.start.line+1,newLines:p.getLines(D.start.line,D.end.line),oldLines:w.endsWith(`
-`)?w.slice(0,-1).split(`
-`):w.split(`
-`)},r.push(async()=>{let S=this.documents.getDocument(f);!S||!S.attached||S.version!==v||(await S.applyEdits([b]),d.version=S.version)})}}else St.CreateFile.is(h)?await this.createFile(ny(h.uri),h.options,r):St.DeleteFile.is(h)?await this.deleteFile(ny(h.uri),h.options,r):St.RenameFile.is(h)&&await this.renameFile(ny(h.oldUri),ny(h.newUri),h.options,r);if(r.length===0)return!0;t||(this.editState={edit:{documentChanges:i,changeAnnotations:e.changeAnnotations},changes:u,recovers:r,applied:!0}),this.nvim.redrawVim()}catch(s){return Kbe.error("Error on applyEdits:",e,s),await this.undoChanges(r),t||this.window.showErrorMessage(`Error on applyEdits: ${s}`),!1}return t||o||this.window.showInformationMessage("Use ':wa' to save changes or ':CocCommand workspace.inspectEdit' to inspect."),!0}async undoChanges(e){for(;e.length>0;)await e.pop()()}async inspectEdit(){if(!this.editState){this.window.showWarningMessage("No workspace edit to inspect");return}await new ey(this.nvim,this.keymaps).show(this.editState)}async undoWorkspaceEdit(){let{editState:e}=this;if(!e||!e.applied){this.window.showWarningMessage("No workspace edit to undo");return}e.applied=!1,await this.undoChanges(e.recovers)}async redoWorkspaceEdit(){let{editState:e}=this;if(!e||e.applied){this.window.showWarningMessage("No workspace edit to redo");return}this.editState=void 0,await this.applyEdit(e.edit)}validateChanges(e){let{documents:t}=this;for(let i of e)if(St.TextDocumentEdit.is(i)){let{uri:r,version:o}=i.textDocument,s=t.getDocument(r);if(typeof o=="number"&&o>0){if(!s)throw new Error(`File ${r} not loaded`);if(s.version!=o)throw new Error(`${r} changed before apply edit`)}else if(!s&&!vg(r))throw iy(O.parse(r).scheme)}else if(St.CreateFile.is(i)||St.DeleteFile.is(i)){if(!vg(i.uri))throw iy(O.parse(i.uri).scheme)}else if(St.RenameFile.is(i)&&(!vg(i.oldUri)||!vg(i.newUri)))throw iy(O.parse(i.oldUri).scheme)}async findFiles(e,t,i,r){let o=this.workspaceFolderControl.workspaceFolders;if((r==null?void 0:r.isCancellationRequested)||!o.length||i===0)return[];i=i!=null?i:1/0;let s=o.map(u=>O.parse(u.uri).fsPath);if(typeof e!="string"){let u=e.baseUri.fsPath;s=s.filter(c=>Ae(u,c,!0))}let a=typeof e=="string"?e:e.pattern,l=[];for(let u of s){if(l.length>=i)break;let c=await(0,tW.promisify)(eW.default)(a,{dot:!0,cwd:u,nodir:!0,absolute:!1});if(r!=null&&r.isCancellationRequested)return[];for(let h of c)if(!(t&&zbe(u,h,t))&&(l.push(O.file(Ar.default.join(u,h))),l.length===i))break}return l}async fireWaitUntilEvent(e,t,i){let r=!0,o=[];e.fire(Ba(ge({},t),{waitUntil:s=>{if(!r)throw VY("waitUntil");let a=new Promise(u=>{setTimeout(u,this.operationTimeout)}),l=Promise.race([s,a]).then(u=>{if(u&&St.WorkspaceEdit.is(u))return this.applyEdit(u,!0)});o.push(l)}})),r=!1,await Promise.all(o)}}});function hk(n,e){for(let t of e)if(n.includes(t))return!0;return!1}function nW(n,e,t=0){let i=-1;for(let r=t;r{e(i)?t[0].push(i):t[1].push(i)}),t}function sa(n,e){if(!e)return n.filter((i,r)=>n.indexOf(i)===r);let t=Object.create(null);return n.filter(i=>{let r=e(i);return t[r]?!1:(t[r]=!0,!0)})}var Go=_(()=>{"use strict"});var aW=m((rje,sW)=>{var dk=4294967296,oW=[];for(Fc=0;Fc<256;Fc++)oW[Fc]=(Fc>15?"":"0")+Fc.toString(16);var Fc,Bg=sW.exports=function(n,e){n instanceof Buffer?(this.buffer=n,this.offset=e||0):Object.prototype.toString.call(n)=="[object Uint8Array]"?(this.buffer=new Buffer(n),this.offset=e||0):(this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments))};Bg.MAX_INT=Math.pow(2,53);Bg.MIN_INT=-Math.pow(2,53);Bg.prototype={constructor:Bg,_2scomp:function(){for(var n=this.buffer,e=this.offset,t=1,i=e+7;i>=e;i--){var r=(n[i]^255)+t;n[i]=r&255,t=r>>8}},setValue:function(n,e){var t=!1;if(arguments.length==1)if(typeof n=="number"){if(t=n<0,n=Math.abs(n),e=n%dk,n=n/dk,n>dk)throw new RangeError(n+" is outside Int64 range");n=n|0}else if(typeof n=="string")n=(n+"").replace(/^0x/,""),e=n.substr(-8),n=n.length>8?n.substr(0,n.length-8):"",n=parseInt(n,16),e=parseInt(e,16);else throw new Error(n+" must be a Number or String");for(var i=this.buffer,r=this.offset,o=7;o>=0;o--)i[r+o]=e&255,e=o==4?n:e>>>8;t&&this._2scomp()},toNumber:function(n){for(var e=this.buffer,t=this.offset,i=e[t]&128,r=0,o=1,s=7,a=1;s>=0;s--,a*=256){var l=e[t+s];i&&(l=(l^255)+o,o=l>>8,l=l&255),r+=l*a}return!n&&r>=Bg.MAX_INT?i?-1/0:1/0:i?-r:r},valueOf:function(){return this.toNumber(!1)},toString:function(n){return this.valueOf().toString(n||10)},toOctetString:function(n){for(var e=new Array(8),t=this.buffer,i=this.offset,r=0;r<8;r++)e[r]=oW[t[i+r]];return e.join(n||"")},toBuffer:function(n){if(n&&this.offset===0)return this.buffer;var e=new Buffer(8);return this.buffer.copy(e,0,this.offset,this.offset+8),e},copy:function(n,e){this.buffer.copy(n,e||0,this.offset,this.offset+8)},compare:function(n){if((this.buffer[this.offset]&128)!=(n.buffer[n.offset]&128))return n.buffer[n.offset]-this.buffer[this.offset];for(var e=0;e<8;e++)if(this.buffer[this.offset+e]!==n.buffer[n.offset+e])return this.buffer[this.offset+e]-n.buffer[n.offset+e];return 0},equals:function(n){return this.compare(n)===0},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}});var yW=m(qg=>{var uW=require("events").EventEmitter,Vbe=require("util"),eye=require("os"),oje=require("assert"),Hg=aW(),aa=eye.endianness()=="BE";function cW(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function di(n){this.buf=Buffer.alloc(cW(n||8192)),this.readOffset=0,this.writeOffset=0}qg.Accumulator=di;di.prototype.writeAvail=function(){return this.buf.length-this.writeOffset};di.prototype.readAvail=function(){return this.writeOffset-this.readOffset};di.prototype.reserve=function(n){if(!(n0&&(this.buf.copy(this.buf,0,this.readOffset,this.writeOffset),this.writeOffset-=this.readOffset,this.readOffset=0),!(n0)this.assertReadableSize(n);else if(n<0&&this.readOffset+n<0)throw new Error("advance with negative offset "+n+" would seek off the start of the buffer");this.readOffset+=n};di.prototype.writeByte=function(n){this.reserve(1),this.buf.writeInt8(n,this.writeOffset),++this.writeOffset};di.prototype.writeInt=function(n,e){switch(this.reserve(e),e){case 1:this.buf.writeInt8(n,this.writeOffset);break;case 2:aa?this.buf.writeInt16BE(n,this.writeOffset):this.buf.writeInt16LE(n,this.writeOffset);break;case 4:aa?this.buf.writeInt32BE(n,this.writeOffset):this.buf.writeInt32LE(n,this.writeOffset);break;default:throw new Error("unsupported integer size "+e)}this.writeOffset+=e};di.prototype.writeDouble=function(n){this.reserve(8),aa?this.buf.writeDoubleBE(n,this.writeOffset):this.buf.writeDoubleLE(n,this.writeOffset),this.writeOffset+=8};var fk=0,pk=1,mk=2,bk=3,yk=4,cy=5,uy=6,hW=7,dW=8,gW=9,fW=10,pW=11,tye=12,gk=0,lW=1,iye=127,nye=32767,rye=2147483647;function pn(){uW.call(this),this.buf=new di,this.state=gk}Vbe.inherits(pn,uW);qg.BunserBuf=pn;pn.prototype.append=function(n,e){if(e)return this.buf.append(n),this.process(e);try{this.buf.append(n)}catch(t){this.emit("error",t);return}this.processLater()};pn.prototype.processLater=function(){var n=this;process.nextTick(function(){try{n.process(!1)}catch(e){n.emit("error",e)}})};pn.prototype.process=function(n){if(this.state==gk){if(this.buf.readAvail()<2)return;if(this.expectCode(0),this.expectCode(1),this.pduLen=this.decodeInt(!0),this.pduLen===!1){this.buf.readAdvance(-2);return}this.buf.reserve(this.pduLen),this.state=lW}if(this.state==lW){if(this.buf.readAvail()0&&this.processLater()};pn.prototype.raise=function(n){throw new Error(n+", in Buffer of length "+this.buf.buf.length+" ("+this.buf.readAvail()+" readable) at offset "+this.buf.readOffset+" buffer: "+JSON.stringify(this.buf.buf.slice(this.buf.readOffset,this.buf.readOffset+32).toJSON()))};pn.prototype.expectCode=function(n){var e=this.buf.readInt(1);e!=n&&this.raise("expected bser opcode "+n+" but got "+e)};pn.prototype.decodeAny=function(){var n=this.buf.peekInt(1);switch(n){case bk:case yk:case cy:case uy:return this.decodeInt();case hW:return this.buf.readAdvance(1),this.buf.readDouble();case dW:return this.buf.readAdvance(1),!0;case gW:return this.buf.readAdvance(1),!1;case fW:return this.buf.readAdvance(1),null;case mk:return this.decodeString();case fk:return this.decodeArray();case pk:return this.decodeObject();case pW:return this.decodeTemplate();default:this.raise("unhandled bser opcode "+n)}};pn.prototype.decodeArray=function(){this.expectCode(fk);for(var n=this.decodeInt(),e=[],t=0;t"u")throw Error("no bser found in string and no error raised!?");return t}qg.loadFromBuffer=oye;function mW(n){for(var e=Buffer.alloc(n.length),t=0;t"u"&&r--}ay(n,r);for(var t=0;t"u")){ly(n,o);try{ly(n,s)}catch(c){throw new Error(c.message+" (while serializing object property with name `"+o+"')")}}}return;default:throw new Error("cannot serialize type "+typeof e+" to BSER")}}function sye(n){var e=new di;e.writeByte(0),e.writeByte(1),e.writeByte(cy),e.writeInt(0,4),ly(e,n);var t=e.writeOffset,i=t-7;return e.writeOffset=3,e.writeInt(i,4),e.writeOffset=t,e.buf.slice(0,t)}qg.dumpToBuffer=sye});var TW=m((aje,SW)=>{"use strict";var aye=require("net"),xW=require("events").EventEmitter,lye=require("util"),uye=require("child_process"),CW=yW(),vW=["subscription","log"];function Qo(n){var e=this;xW.call(this),this.watchmanBinaryPath="watchman",n&&n.watchmanBinaryPath&&(this.watchmanBinaryPath=n.watchmanBinaryPath.trim()),this.commands=[]}lye.inherits(Qo,xW);SW.exports.Client=Qo;Qo.prototype.sendNextCommand=function(){this.currentCommand||(this.currentCommand=this.commands.shift(),this.currentCommand&&this.socket.write(CW.dumpToBuffer(this.currentCommand.cmd)))};Qo.prototype.cancelCommands=function(n){var e=new Error(n),t=this.commands;this.commands=[],this.currentCommand&&(t.unshift(this.currentCommand),this.currentCommand=null),t.forEach(function(i){i.cb(e)})};Qo.prototype.connect=function(){var n=this;function e(l){n.bunser=new CW.BunserBuf,n.bunser.on("value",function(u){for(var c=!1,h=0;h=0:!1}Qo.prototype._synthesizeCapabilityCheck=function(n,e,t){n.capabilities={};var i=n.version;return e.forEach(function(r){n.capabilities[r]=DW(i,r)}),t.forEach(function(r){var o=DW(i,r);n.capabilities[r]=o,o||(n.error="client required capability `"+r+"` is not supported by this server")}),n};Qo.prototype.capabilityCheck=function(n,e){var t=n.optional||[],i=n.required||[],r=this;this.command(["version",{optional:t,required:i}],function(o,s){if(o){e(o);return}if(!("capabilities"in s)&&(s=r._synthesizeCapabilityCheck(s,t,i),s.error)){o=new Error(s.error),o.watchmanResponse=s,e(o);return}e(null,s)})};Qo.prototype.end=function(){this.cancelCommands("The client was ended"),this.socket&&(this.socket.end(),this.socket=null),this.bunser=null}});function dye(n){return!(n=="/"||n=="/tmp"||n=="/private/tmp"||Ae(n,vk.default.homedir(),!0)||dy.default.parse(n).base==n||n.startsWith("/tmp/")||n.startsWith("/private/tmp/")||Ae(vk.default.tmpdir(),n,!0))}var kW,EW,vk,dy,hy,hye,la,wk=_(()=>{"use strict";kW=C(TW()),EW=C(Vn()),vk=C(require("os")),dy=C(require("path"));Oe();Je();hy=q()("core-watchman"),hye=["relative_root","cmd-watch-project","wildmatch","field-new"],la=class{constructor(e,t){this.channel=t;this._disposed=!1;this.client=new kW.default.Client({watchmanBinaryPath:e}),this.client.setMaxListeners(300)}checkCapability(){let{client:e}=this;return new Promise((t,i)=>{e.capabilityCheck({optional:[],required:hye},(r,o)=>{if(r)return t(!1);let{capabilities:s}=o;for(let a of Object.keys(s))if(!s[a])return t(!1);t(!0)})})}async watchProject(e){let t=await this.command(["watch-project",e]),{watch:i,warning:r,relative_path:o}=t;return i?(r&&hy.warn(r),this.watch=i,this.relative_path=o,hy.info(`watchman watching project: ${e}`),this.appendOutput(`watchman watching project: ${e}`),!0):!1}command(e){return new Promise((t,i)=>{this.client.command(e,(r,o)=>{if(r)return i(r);t(o)})})}async subscribe(e,t){let{watch:i,relative_path:r}=this;if(!i)throw new Error("watchman not watching");let{clock:o}=await this.command(["clock",i]),s=Uo(),a={expression:["allof",["match","**/*","wholename"]],fields:["name","size","new","exists","type","mtime_ms","ctime_ms"],since:o},l=i;r&&(a.relative_root=r,l=dy.default.join(i,r));let{subscribe:u}=await this.command(["subscribe",i,s,a]);return this.appendOutput(`subscribing "${e}" in ${l}`),this.client.on("subscription",c=>{if(!c||c.subscription!=s)return;let{files:h}=c;if(!h||(h=h.filter(g=>g.type=="f"&&(0,EW.default)(g.name,e,{dot:!0})),!h.length))return;let d=Object.assign({},c);this.relative_path&&(d.root=dy.default.resolve(c.root,this.relative_path)),this.appendOutput(`file change detected: ${JSON.stringify(d,null,2)}`),t(d)}),{dispose:()=>{this.unsubscribe(u)},subscribe:u}}unsubscribe(e){if(this._disposed)return Promise.resolve();let{watch:t}=this;if(!!t)return this.appendOutput(`unsubscribe "${e}" in: ${t}`),this.command(["unsubscribe",t,e]).catch(i=>{var r;(r=i.message)!=null&&r.includes("The client was ended")&&hy.error(i)})}dispose(){this._disposed||(this._disposed=!0,this.client&&(this.client.removeAllListeners(),this.client.end(),this.client=void 0))}appendOutput(e,t="Info"){this.channel&&this.channel.appendLine(`[${t} - ${new Date().toLocaleTimeString()}] ${e}`)}static async createClient(e,t,i){if(!dye(t))return null;let r;try{if(r=new la(e,i),!await r.checkCapability())throw new Error("required capabilities do not exist.");if(!await r.watchProject(t))throw new Error("unable to watch");return r}catch(o){return r&&r.dispose(),hy.error("Error on watchman create",o),null}}}});var PW,Ic,jc,wje,Yg,Wg,_W,RW=_(()=>{"use strict";PW=C(Vn()),Ic=C(require("path")),jc=C(H());we();z();Go();wk();wje=q()("filesystem-watcher"),Yg=class{constructor(e,t){this.workspaceFolder=e;this.watchmanPath=t;this.clientsMap=new Map;this.disposables=[];this.creating=new Set;this._onDidCreateClient=new jc.Emitter;this.onDidCreateClient=this._onDidCreateClient.event}attach(e){this.channel=e;let t=i=>{let r=O.parse(i.uri).fsPath;this.creating.has(r)||(this.creating.add(r),this.createClient(r).finally(()=>{this.creating.delete(r)}))};this.workspaceFolder.workspaceFolders.forEach(i=>{t(i)}),this.workspaceFolder.onDidChangeWorkspaceFolders(i=>{i.added.forEach(r=>{t(r)}),i.removed.forEach(r=>{let o=O.parse(r.uri).fsPath,s=this.clientsMap.get(o);s&&(this.clientsMap.delete(o),s.dispose())})},null,this.disposables)}waitClient(e){return this.clientsMap.has(e)?Promise.resolve():new Promise(t=>{let i=this.onDidCreateClient(r=>{r==e&&(i.dispose(),t())})})}async createClient(e){if(!(this.watchmanPath==null||this.clientsMap.has(e)))try{let t=await la.createClient(this.watchmanPath,e,this.channel);if(!t)return;this.clientsMap.set(e,t);for(let i of Yg.watchers)i.listen(t);this._onDidCreateClient.fire(e)}catch(t){this.channel&&this.channel.appendLine("Error on create watchman client:"+t)}}createFileSystemWatcher(e,t,i,r){let o=new _W(e,t,i,r);for(let s of this.clientsMap.values())o.listen(s);return Yg.watchers.add(o),o}dispose(){this._onDidCreateClient.dispose();for(let e of this.clientsMap.values())e&&e.dispose();this.clientsMap.clear(),Yg.watchers.clear(),Z(this.disposables)}},Wg=Yg;Wg.watchers=new Set;_W=class{constructor(e,t,i,r){this.globPattern=e;this.ignoreCreateEvents=t;this.ignoreChangeEvents=i;this.ignoreDeleteEvents=r;this._onDidCreate=new jc.Emitter;this._onDidChange=new jc.Emitter;this._onDidDelete=new jc.Emitter;this._onDidRename=new jc.Emitter;this.disposables=[];this._disposed=!1;this.onDidCreate=this._onDidCreate.event;this.onDidChange=this._onDidChange.event;this.onDidDelete=this._onDidDelete.event;this.onDidRename=this._onDidRename.event}listen(e){let{globPattern:t,ignoreCreateEvents:i,ignoreChangeEvents:r,ignoreDeleteEvents:o}=this,s=a=>{let{root:l,files:u}=a;u=u.filter(c=>c.type=="f"&&(0,PW.default)(c.name,t,{dot:!0}));for(let c of u){let h=O.file(Ic.default.join(l,c.name));c.exists?c.new===!0?i||this._onDidCreate.fire(h):r||this._onDidChange.fire(h):o||this._onDidDelete.fire(h)}if(u.length==2&&!u[0].exists&&u[1].exists){let c=u[0],h=u[1];c.size==h.size&&this._onDidRename.fire({oldUri:O.file(Ic.default.join(l,c.name)),newUri:O.file(Ic.default.join(l,h.name))})}if(u.length>=2){let[c,h]=sy(u,d=>d.exists===!1);if(c.length==h.length)for(let d of c){let g=h.find(f=>f.size==d.size&&f.mtime_ms==d.mtime_ms);g&&this._onDidRename.fire({oldUri:O.file(Ic.default.join(l,d.name)),newUri:O.file(Ic.default.join(l,g.name))})}}};e.subscribe(t,s).then(a=>{if(this.subscribe=a.subscribe,this._disposed)return a.dispose();this.disposables.push(a)}).logError()}dispose(){this._disposed=!0,Wg.watchers.delete(this),this._onDidRename.dispose(),this._onDidCreate.dispose(),this._onDidChange.dispose(),Z(this.disposables)}}});var Zg=m((xje,LW)=>{var gye="2.0.0",fye=Number.MAX_SAFE_INTEGER||9007199254740991,pye=16;LW.exports={SEMVER_SPEC_VERSION:gye,MAX_LENGTH:256,MAX_SAFE_INTEGER:fye,MAX_SAFE_COMPONENT_LENGTH:pye}});var Jg=m((Cje,FW)=>{var mye=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};FW.exports=mye});var Tl=m((ua,IW)=>{var{MAX_SAFE_COMPONENT_LENGTH:Dk}=Zg(),bye=Jg();ua=IW.exports={};var yye=ua.re=[],te=ua.src=[],ie=ua.t={},vye=0,xe=(n,e,t)=>{let i=vye++;bye(n,i,e),ie[n]=i,te[i]=e,yye[i]=new RegExp(e,t?"g":void 0)};xe("NUMERICIDENTIFIER","0|[1-9]\\d*");xe("NUMERICIDENTIFIERLOOSE","[0-9]+");xe("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");xe("MAINVERSION",`(${te[ie.NUMERICIDENTIFIER]})\\.(${te[ie.NUMERICIDENTIFIER]})\\.(${te[ie.NUMERICIDENTIFIER]})`);xe("MAINVERSIONLOOSE",`(${te[ie.NUMERICIDENTIFIERLOOSE]})\\.(${te[ie.NUMERICIDENTIFIERLOOSE]})\\.(${te[ie.NUMERICIDENTIFIERLOOSE]})`);xe("PRERELEASEIDENTIFIER",`(?:${te[ie.NUMERICIDENTIFIER]}|${te[ie.NONNUMERICIDENTIFIER]})`);xe("PRERELEASEIDENTIFIERLOOSE",`(?:${te[ie.NUMERICIDENTIFIERLOOSE]}|${te[ie.NONNUMERICIDENTIFIER]})`);xe("PRERELEASE",`(?:-(${te[ie.PRERELEASEIDENTIFIER]}(?:\\.${te[ie.PRERELEASEIDENTIFIER]})*))`);xe("PRERELEASELOOSE",`(?:-?(${te[ie.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${te[ie.PRERELEASEIDENTIFIERLOOSE]})*))`);xe("BUILDIDENTIFIER","[0-9A-Za-z-]+");xe("BUILD",`(?:\\+(${te[ie.BUILDIDENTIFIER]}(?:\\.${te[ie.BUILDIDENTIFIER]})*))`);xe("FULLPLAIN",`v?${te[ie.MAINVERSION]}${te[ie.PRERELEASE]}?${te[ie.BUILD]}?`);xe("FULL",`^${te[ie.FULLPLAIN]}$`);xe("LOOSEPLAIN",`[v=\\s]*${te[ie.MAINVERSIONLOOSE]}${te[ie.PRERELEASELOOSE]}?${te[ie.BUILD]}?`);xe("LOOSE",`^${te[ie.LOOSEPLAIN]}$`);xe("GTLT","((?:<|>)?=?)");xe("XRANGEIDENTIFIERLOOSE",`${te[ie.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);xe("XRANGEIDENTIFIER",`${te[ie.NUMERICIDENTIFIER]}|x|X|\\*`);xe("XRANGEPLAIN",`[v=\\s]*(${te[ie.XRANGEIDENTIFIER]})(?:\\.(${te[ie.XRANGEIDENTIFIER]})(?:\\.(${te[ie.XRANGEIDENTIFIER]})(?:${te[ie.PRERELEASE]})?${te[ie.BUILD]}?)?)?`);xe("XRANGEPLAINLOOSE",`[v=\\s]*(${te[ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${te[ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${te[ie.XRANGEIDENTIFIERLOOSE]})(?:${te[ie.PRERELEASELOOSE]})?${te[ie.BUILD]}?)?)?`);xe("XRANGE",`^${te[ie.GTLT]}\\s*${te[ie.XRANGEPLAIN]}$`);xe("XRANGELOOSE",`^${te[ie.GTLT]}\\s*${te[ie.XRANGEPLAINLOOSE]}$`);xe("COERCE",`(^|[^\\d])(\\d{1,${Dk}})(?:\\.(\\d{1,${Dk}}))?(?:\\.(\\d{1,${Dk}}))?(?:$|[^\\d])`);xe("COERCERTL",te[ie.COERCE],!0);xe("LONETILDE","(?:~>?)");xe("TILDETRIM",`(\\s*)${te[ie.LONETILDE]}\\s+`,!0);ua.tildeTrimReplace="$1~";xe("TILDE",`^${te[ie.LONETILDE]}${te[ie.XRANGEPLAIN]}$`);xe("TILDELOOSE",`^${te[ie.LONETILDE]}${te[ie.XRANGEPLAINLOOSE]}$`);xe("LONECARET","(?:\\^)");xe("CARETTRIM",`(\\s*)${te[ie.LONECARET]}\\s+`,!0);ua.caretTrimReplace="$1^";xe("CARET",`^${te[ie.LONECARET]}${te[ie.XRANGEPLAIN]}$`);xe("CARETLOOSE",`^${te[ie.LONECARET]}${te[ie.XRANGEPLAINLOOSE]}$`);xe("COMPARATORLOOSE",`^${te[ie.GTLT]}\\s*(${te[ie.LOOSEPLAIN]})$|^$`);xe("COMPARATOR",`^${te[ie.GTLT]}\\s*(${te[ie.FULLPLAIN]})$|^$`);xe("COMPARATORTRIM",`(\\s*)${te[ie.GTLT]}\\s*(${te[ie.LOOSEPLAIN]}|${te[ie.XRANGEPLAIN]})`,!0);ua.comparatorTrimReplace="$1$2$3";xe("HYPHENRANGE",`^\\s*(${te[ie.XRANGEPLAIN]})\\s+-\\s+(${te[ie.XRANGEPLAIN]})\\s*$`);xe("HYPHENRANGELOOSE",`^\\s*(${te[ie.XRANGEPLAINLOOSE]})\\s+-\\s+(${te[ie.XRANGEPLAINLOOSE]})\\s*$`);xe("STAR","(<|>)?=?\\s*\\*");xe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");xe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var $g=m((Sje,jW)=>{var wye=["includePrerelease","loose","rtl"],Dye=n=>n?typeof n!="object"?{loose:!0}:wye.filter(e=>n[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};jW.exports=Dye});var gy=m((Tje,MW)=>{var AW=/^[0-9]+$/,OW=(n,e)=>{let t=AW.test(n),i=AW.test(e);return t&&i&&(n=+n,e=+e),n===e?0:t&&!i?-1:i&&!t?1:nOW(e,n);MW.exports={compareIdentifiers:OW,rcompareIdentifiers:xye}});var Li=m((kje,qW)=>{var fy=Jg(),{MAX_LENGTH:NW,MAX_SAFE_INTEGER:py}=Zg(),{re:BW,t:HW}=Tl(),Cye=$g(),{compareIdentifiers:Ac}=gy(),nr=class{constructor(e,t){if(t=Cye(t),e instanceof nr){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>NW)throw new TypeError(`version is longer than ${NW} characters`);fy("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?BW[HW.LOOSE]:BW[HW.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>py||this.major<0)throw new TypeError("Invalid major version");if(this.minor>py||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>py||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let o=+r;if(o>=0&&o=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(Ac(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};qW.exports=nr});var kl=m((Eje,JW)=>{var{MAX_LENGTH:Sye}=Zg(),{re:YW,t:WW}=Tl(),ZW=Li(),Tye=$g(),kye=(n,e)=>{if(e=Tye(e),n instanceof ZW)return n;if(typeof n!="string"||n.length>Sye||!(e.loose?YW[WW.LOOSE]:YW[WW.FULL]).test(n))return null;try{return new ZW(n,e)}catch{return null}};JW.exports=kye});var XW=m((Pje,$W)=>{var Eye=kl(),Pye=(n,e)=>{let t=Eye(n,e);return t?t.version:null};$W.exports=Pye});var GW=m((_je,UW)=>{var _ye=kl(),Rye=(n,e)=>{let t=_ye(n.trim().replace(/^[=v]+/,""),e);return t?t.version:null};UW.exports=Rye});var zW=m((Rje,KW)=>{var QW=Li(),Lye=(n,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new QW(n instanceof QW?n.version:n,t).inc(e,i).version}catch{return null}};KW.exports=Lye});var rr=m((Lje,e3)=>{var VW=Li(),Fye=(n,e,t)=>new VW(n,t).compare(new VW(e,t));e3.exports=Fye});var my=m((Fje,t3)=>{var Iye=rr(),jye=(n,e,t)=>Iye(n,e,t)===0;t3.exports=jye});var r3=m((Ije,n3)=>{var i3=kl(),Aye=my(),Oye=(n,e)=>{if(Aye(n,e))return null;{let t=i3(n),i=i3(e),r=t.prerelease.length||i.prerelease.length,o=r?"pre":"",s=r?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return o+a;return s}};n3.exports=Oye});var s3=m((jje,o3)=>{var Mye=Li(),Nye=(n,e)=>new Mye(n,e).major;o3.exports=Nye});var l3=m((Aje,a3)=>{var Bye=Li(),Hye=(n,e)=>new Bye(n,e).minor;a3.exports=Hye});var c3=m((Oje,u3)=>{var qye=Li(),Yye=(n,e)=>new qye(n,e).patch;u3.exports=Yye});var d3=m((Mje,h3)=>{var Wye=kl(),Zye=(n,e)=>{let t=Wye(n,e);return t&&t.prerelease.length?t.prerelease:null};h3.exports=Zye});var f3=m((Nje,g3)=>{var Jye=rr(),$ye=(n,e,t)=>Jye(e,n,t);g3.exports=$ye});var m3=m((Bje,p3)=>{var Xye=rr(),Uye=(n,e)=>Xye(n,e,!0);p3.exports=Uye});var by=m((Hje,y3)=>{var b3=Li(),Gye=(n,e,t)=>{let i=new b3(n,t),r=new b3(e,t);return i.compare(r)||i.compareBuild(r)};y3.exports=Gye});var w3=m((qje,v3)=>{var Qye=by(),Kye=(n,e)=>n.sort((t,i)=>Qye(t,i,e));v3.exports=Kye});var x3=m((Yje,D3)=>{var zye=by(),Vye=(n,e)=>n.sort((t,i)=>zye(i,t,e));D3.exports=Vye});var Xg=m((Wje,C3)=>{var eve=rr(),tve=(n,e,t)=>eve(n,e,t)>0;C3.exports=tve});var yy=m((Zje,S3)=>{var ive=rr(),nve=(n,e,t)=>ive(n,e,t)<0;S3.exports=nve});var xk=m((Jje,T3)=>{var rve=rr(),ove=(n,e,t)=>rve(n,e,t)!==0;T3.exports=ove});var vy=m(($je,k3)=>{var sve=rr(),ave=(n,e,t)=>sve(n,e,t)>=0;k3.exports=ave});var wy=m((Xje,E3)=>{var lve=rr(),uve=(n,e,t)=>lve(n,e,t)<=0;E3.exports=uve});var Ck=m((Uje,P3)=>{var cve=my(),hve=xk(),dve=Xg(),gve=vy(),fve=yy(),pve=wy(),mve=(n,e,t,i)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return cve(n,t,i);case"!=":return hve(n,t,i);case">":return dve(n,t,i);case">=":return gve(n,t,i);case"<":return fve(n,t,i);case"<=":return pve(n,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};P3.exports=mve});var R3=m((Gje,_3)=>{var bve=Li(),yve=kl(),{re:Dy,t:xy}=Tl(),vve=(n,e)=>{if(n instanceof bve)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;e=e||{};let t=null;if(!e.rtl)t=n.match(Dy[xy.COERCE]);else{let i;for(;(i=Dy[xy.COERCERTL].exec(n))&&(!t||t.index+t[0].length!==n.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Dy[xy.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Dy[xy.COERCERTL].lastIndex=-1}return t===null?null:yve(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};_3.exports=vve});var F3=m((Qje,L3)=>{"use strict";L3.exports=function(n){n.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Ug=m((Kje,I3)=>{"use strict";I3.exports=Be;Be.Node=El;Be.create=Be;function Be(n){var e=this;if(e instanceof Be||(e=new Be),e.tail=null,e.head=null,e.length=0,n&&typeof n.forEach=="function")n.forEach(function(r){e.push(r)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=0;i!==null;r++)t=n(t,i.value,r),i=i.next;return t};Be.prototype.reduceReverse=function(n,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=this.length-1;i!==null;r--)t=n(t,i.value,r),i=i.prev;return t};Be.prototype.toArray=function(){for(var n=new Array(this.length),e=0,t=this.head;t!==null;e++)n[e]=t.value,t=t.next;return n};Be.prototype.toArrayReverse=function(){for(var n=new Array(this.length),e=0,t=this.tail;t!==null;e++)n[e]=t.value,t=t.prev;return n};Be.prototype.slice=function(n,e){e=e||this.length,e<0&&(e+=this.length),n=n||0,n<0&&(n+=this.length);var t=new Be;if(ethis.length&&(e=this.length);for(var i=0,r=this.head;r!==null&&ithis.length&&(e=this.length);for(var i=this.length,r=this.tail;r!==null&&i>e;i--)r=r.prev;for(;r!==null&&i>n;i--,r=r.prev)t.push(r.value);return t};Be.prototype.splice=function(n,e,...t){n>this.length&&(n=this.length-1),n<0&&(n=this.length+n);for(var i=0,r=this.head;r!==null&&i{"use strict";var Cve=Ug(),Pl=Symbol("max"),zo=Symbol("length"),Oc=Symbol("lengthCalculator"),Qg=Symbol("allowStale"),_l=Symbol("maxAge"),Ko=Symbol("dispose"),j3=Symbol("noDisposeOnSet"),gi=Symbol("lruList"),Or=Symbol("cache"),O3=Symbol("updateAgeOnGet"),Sk=()=>1,M3=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Pl]=e.max||1/0,i=e.length||Sk;if(this[Oc]=typeof i!="function"?Sk:i,this[Qg]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[_l]=e.maxAge||0,this[Ko]=e.dispose,this[j3]=e.noDisposeOnSet||!1,this[O3]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Pl]=e||1/0,Gg(this)}get max(){return this[Pl]}set allowStale(e){this[Qg]=!!e}get allowStale(){return this[Qg]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[_l]=e,Gg(this)}get maxAge(){return this[_l]}set lengthCalculator(e){typeof e!="function"&&(e=Sk),e!==this[Oc]&&(this[Oc]=e,this[zo]=0,this[gi].forEach(t=>{t.length=this[Oc](t.value,t.key),this[zo]+=t.length})),Gg(this)}get lengthCalculator(){return this[Oc]}get length(){return this[zo]}get itemCount(){return this[gi].length}rforEach(e,t){t=t||this;for(let i=this[gi].tail;i!==null;){let r=i.prev;A3(this,e,i,t),i=r}}forEach(e,t){t=t||this;for(let i=this[gi].head;i!==null;){let r=i.next;A3(this,e,i,t),i=r}}keys(){return this[gi].toArray().map(e=>e.key)}values(){return this[gi].toArray().map(e=>e.value)}reset(){this[Ko]&&this[gi]&&this[gi].length&&this[gi].forEach(e=>this[Ko](e.key,e.value)),this[Or]=new Map,this[gi]=new Cve,this[zo]=0}dump(){return this[gi].map(e=>Cy(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[gi]}set(e,t,i){if(i=i||this[_l],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let r=i?Date.now():0,o=this[Oc](t,e);if(this[Or].has(e)){if(o>this[Pl])return Mc(this,this[Or].get(e)),!1;let l=this[Or].get(e).value;return this[Ko]&&(this[j3]||this[Ko](e,l.value)),l.now=r,l.maxAge=i,l.value=t,this[zo]+=o-l.length,l.length=o,this.get(e),Gg(this),!0}let s=new N3(e,t,o,r,i);return s.length>this[Pl]?(this[Ko]&&this[Ko](e,t),!1):(this[zo]+=s.length,this[gi].unshift(s),this[Or].set(e,this[gi].head),Gg(this),!0)}has(e){if(!this[Or].has(e))return!1;let t=this[Or].get(e).value;return!Cy(this,t)}get(e){return Tk(this,e,!0)}peek(e){return Tk(this,e,!1)}pop(){let e=this[gi].tail;return e?(Mc(this,e),e.value):null}del(e){Mc(this,this[Or].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let r=e[i],o=r.e||0;if(o===0)this.set(r.k,r.v);else{let s=o-t;s>0&&this.set(r.k,r.v,s)}}}prune(){this[Or].forEach((e,t)=>Tk(this,t,!1))}},Tk=(n,e,t)=>{let i=n[Or].get(e);if(i){let r=i.value;if(Cy(n,r)){if(Mc(n,i),!n[Qg])return}else t&&(n[O3]&&(i.value.now=Date.now()),n[gi].unshiftNode(i));return r.value}},Cy=(n,e)=>{if(!e||!e.maxAge&&!n[_l])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:n[_l]&&t>n[_l]},Gg=n=>{if(n[zo]>n[Pl])for(let e=n[gi].tail;n[zo]>n[Pl]&&e!==null;){let t=e.prev;Mc(n,e),e=t}},Mc=(n,e)=>{if(e){let t=e.value;n[Ko]&&n[Ko](t.key,t.value),n[zo]-=t.length,n[Or].delete(t.key),n[gi].removeNode(e)}},N3=class{constructor(e,t,i,r,o){this.key=e,this.value=t,this.length=i,this.now=r,this.maxAge=o||0}},A3=(n,e,t,i)=>{let r=t.value;Cy(n,r)&&(Mc(n,t),n[Qg]||(r=void 0)),r&&e.call(i,r.value,r.key,n)};B3.exports=M3});var or=m((Vje,Z3)=>{var Nc=class{constructor(e,t){if(t=Tve(t),e instanceof Nc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Nc(e.raw,t);if(e instanceof kk)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!Y3(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&Rve(r[0])){this.set=[r];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=q3.get(i);if(r)return r;let o=this.options.loose,s=o?mn[Qi.HYPHENRANGELOOSE]:mn[Qi.HYPHENRANGE];e=e.replace(s,Hve(this.options.includePrerelease)),Rt("hyphen replace",e),e=e.replace(mn[Qi.COMPARATORTRIM],Eve),Rt("comparator trim",e),e=e.replace(mn[Qi.TILDETRIM],Pve),e=e.replace(mn[Qi.CARETTRIM],_ve),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(h=>Lve(h,this.options)).join(" ").split(/\s+/).map(h=>Bve(h,this.options));o&&(a=a.filter(h=>(Rt("loose invalid filter",h,this.options),!!h.match(mn[Qi.COMPARATORLOOSE])))),Rt("range list",a);let l=new Map,u=a.map(h=>new kk(h,this.options));for(let h of u){if(Y3(h))return[h];l.set(h.value,h)}l.size>1&&l.has("")&&l.delete("");let c=[...l.values()];return q3.set(i,c),c}intersects(e,t){if(!(e instanceof Nc))throw new TypeError("a Range is required");return this.set.some(i=>W3(i,t)&&e.set.some(r=>W3(r,t)&&i.every(o=>r.every(s=>o.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new kve(e,this.options)}catch{return!1}for(let t=0;tn.value==="<0.0.0-0",Rve=n=>n.value==="",W3=(n,e)=>{let t=!0,i=n.slice(),r=i.pop();for(;t&&i.length;)t=i.every(o=>r.intersects(o,e)),r=i.pop();return t},Lve=(n,e)=>(Rt("comp",n,e),n=jve(n,e),Rt("caret",n),n=Fve(n,e),Rt("tildes",n),n=Ove(n,e),Rt("xrange",n),n=Nve(n,e),Rt("stars",n),n),Ki=n=>!n||n.toLowerCase()==="x"||n==="*",Fve=(n,e)=>n.trim().split(/\s+/).map(t=>Ive(t,e)).join(" "),Ive=(n,e)=>{let t=e.loose?mn[Qi.TILDELOOSE]:mn[Qi.TILDE];return n.replace(t,(i,r,o,s,a)=>{Rt("tilde",n,i,r,o,s,a);let l;return Ki(r)?l="":Ki(o)?l=`>=${r}.0.0 <${+r+1}.0.0-0`:Ki(s)?l=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?(Rt("replaceTilde pr",a),l=`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`):l=`>=${r}.${o}.${s} <${r}.${+o+1}.0-0`,Rt("tilde return",l),l})},jve=(n,e)=>n.trim().split(/\s+/).map(t=>Ave(t,e)).join(" "),Ave=(n,e)=>{Rt("caret",n,e);let t=e.loose?mn[Qi.CARETLOOSE]:mn[Qi.CARET],i=e.includePrerelease?"-0":"";return n.replace(t,(r,o,s,a,l)=>{Rt("caret",n,r,o,s,a,l);let u;return Ki(o)?u="":Ki(s)?u=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Ki(a)?o==="0"?u=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:l?(Rt("replaceCaret pr",l),o==="0"?s==="0"?u=`>=${o}.${s}.${a}-${l} <${o}.${s}.${+a+1}-0`:u=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${a}-${l} <${+o+1}.0.0-0`):(Rt("no pr"),o==="0"?s==="0"?u=`>=${o}.${s}.${a}${i} <${o}.${s}.${+a+1}-0`:u=`>=${o}.${s}.${a}${i} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),Rt("caret return",u),u})},Ove=(n,e)=>(Rt("replaceXRanges",n,e),n.split(/\s+/).map(t=>Mve(t,e)).join(" ")),Mve=(n,e)=>{n=n.trim();let t=e.loose?mn[Qi.XRANGELOOSE]:mn[Qi.XRANGE];return n.replace(t,(i,r,o,s,a,l)=>{Rt("xRange",n,i,r,o,s,a,l);let u=Ki(o),c=u||Ki(s),h=c||Ki(a),d=h;return r==="="&&d&&(r=""),l=e.includePrerelease?"-0":"",u?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&d?(c&&(s=0),a=0,r===">"?(r=">=",c?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",c?o=+o+1:s=+s+1),r==="<"&&(l="-0"),i=`${r+o}.${s}.${a}${l}`):c?i=`>=${o}.0.0${l} <${+o+1}.0.0-0`:h&&(i=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`),Rt("xRange return",i),i})},Nve=(n,e)=>(Rt("replaceStars",n,e),n.trim().replace(mn[Qi.STAR],"")),Bve=(n,e)=>(Rt("replaceGTE0",n,e),n.trim().replace(mn[e.includePrerelease?Qi.GTE0PRE:Qi.GTE0],"")),Hve=n=>(e,t,i,r,o,s,a,l,u,c,h,d,g)=>(Ki(i)?t="":Ki(r)?t=`>=${i}.0.0${n?"-0":""}`:Ki(o)?t=`>=${i}.${r}.0${n?"-0":""}`:s?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,Ki(u)?l="":Ki(c)?l=`<${+u+1}.0.0-0`:Ki(h)?l=`<${u}.${+c+1}.0-0`:d?l=`<=${u}.${c}.${h}-${d}`:n?l=`<${u}.${c}.${+h+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),qve=(n,e,t)=>{for(let i=0;i0){let r=n[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var Kg=m((e1e,G3)=>{var zg=Symbol("SemVer ANY"),Vg=class{static get ANY(){return zg}constructor(e,t){if(t=Yve(t),e instanceof Vg){if(e.loose===!!t.loose)return e;e=e.value}Pk("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===zg?this.value="":this.value=this.operator+this.semver.version,Pk("comp",this)}parse(e){let t=this.options.loose?J3[$3.COMPARATORLOOSE]:J3[$3.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new X3(i[2],this.options.loose):this.semver=zg}toString(){return this.value}test(e){if(Pk("Comparator.test",e,this.options.loose),this.semver===zg||e===zg)return!0;if(typeof e=="string")try{e=new X3(e,this.options)}catch{return!1}return Ek(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Vg))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new U3(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new U3(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),r=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),o=this.semver.version===e.semver.version,s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=Ek(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=Ek(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||r||o&&s||a||l}};G3.exports=Vg;var Yve=$g(),{re:J3,t:$3}=Tl(),Ek=Ck(),Pk=Jg(),X3=Li(),U3=or()});var ef=m((t1e,Q3)=>{var Wve=or(),Zve=(n,e,t)=>{try{e=new Wve(e,t)}catch{return!1}return e.test(n)};Q3.exports=Zve});var z3=m((i1e,K3)=>{var Jve=or(),$ve=(n,e)=>new Jve(n,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));K3.exports=$ve});var eZ=m((n1e,V3)=>{var Xve=Li(),Uve=or(),Gve=(n,e,t)=>{let i=null,r=null,o=null;try{o=new Uve(e,t)}catch{return null}return n.forEach(s=>{o.test(s)&&(!i||r.compare(s)===-1)&&(i=s,r=new Xve(i,t))}),i};V3.exports=Gve});var iZ=m((r1e,tZ)=>{var Qve=Li(),Kve=or(),zve=(n,e,t)=>{let i=null,r=null,o=null;try{o=new Kve(e,t)}catch{return null}return n.forEach(s=>{o.test(s)&&(!i||r.compare(s)===1)&&(i=s,r=new Qve(i,t))}),i};tZ.exports=zve});var oZ=m((o1e,rZ)=>{var _k=Li(),Vve=or(),nZ=Xg(),ewe=(n,e)=>{n=new Vve(n,e);let t=new _k("0.0.0");if(n.test(t)||(t=new _k("0.0.0-0"),n.test(t)))return t;t=null;for(let i=0;i{let a=new _k(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||nZ(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!t||nZ(t,o))&&(t=o)}return t&&n.test(t)?t:null};rZ.exports=ewe});var aZ=m((s1e,sZ)=>{var twe=or(),iwe=(n,e)=>{try{return new twe(n,e).range||"*"}catch{return null}};sZ.exports=iwe});var Sy=m((a1e,hZ)=>{var nwe=Li(),cZ=Kg(),{ANY:rwe}=cZ,owe=or(),swe=ef(),lZ=Xg(),uZ=yy(),awe=wy(),lwe=vy(),uwe=(n,e,t,i)=>{n=new nwe(n,i),e=new owe(e,i);let r,o,s,a,l;switch(t){case">":r=lZ,o=awe,s=uZ,a=">",l=">=";break;case"<":r=uZ,o=lwe,s=lZ,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(swe(n,e,i))return!1;for(let u=0;u{g.semver===rwe&&(g=new cZ(">=0.0.0")),h=h||g,d=d||g,r(g.semver,h.semver,i)?h=g:s(g.semver,d.semver,i)&&(d=g)}),h.operator===a||h.operator===l||(!d.operator||d.operator===a)&&o(n,d.semver))return!1;if(d.operator===l&&s(n,d.semver))return!1}return!0};hZ.exports=uwe});var gZ=m((l1e,dZ)=>{var cwe=Sy(),hwe=(n,e,t)=>cwe(n,e,">",t);dZ.exports=hwe});var pZ=m((u1e,fZ)=>{var dwe=Sy(),gwe=(n,e,t)=>dwe(n,e,"<",t);fZ.exports=gwe});var yZ=m((c1e,bZ)=>{var mZ=or(),fwe=(n,e,t)=>(n=new mZ(n,t),e=new mZ(e,t),n.intersects(e));bZ.exports=fwe});var wZ=m((h1e,vZ)=>{var pwe=ef(),mwe=rr();vZ.exports=(n,e,t)=>{let i=[],r=null,o=null,s=n.sort((c,h)=>mwe(c,h,t));for(let c of s)pwe(c,e,t)?(o=c,r||(r=c)):(o&&i.push([r,o]),o=null,r=null);r&&i.push([r,null]);let a=[];for(let[c,h]of i)c===h?a.push(c):!h&&c===s[0]?a.push("*"):h?c===s[0]?a.push(`<=${h}`):a.push(`${c} - ${h}`):a.push(`>=${c}`);let l=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{var DZ=or(),Ty=Kg(),{ANY:Rk}=Ty,tf=ef(),Lk=rr(),bwe=(n,e,t={})=>{if(n===e)return!0;n=new DZ(n,t),e=new DZ(e,t);let i=!1;e:for(let r of n.set){for(let o of e.set){let s=ywe(r,o,t);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},ywe=(n,e,t)=>{if(n===e)return!0;if(n.length===1&&n[0].semver===Rk){if(e.length===1&&e[0].semver===Rk)return!0;t.includePrerelease?n=[new Ty(">=0.0.0-0")]:n=[new Ty(">=0.0.0")]}if(e.length===1&&e[0].semver===Rk){if(t.includePrerelease)return!0;e=[new Ty(">=0.0.0")]}let i=new Set,r,o;for(let g of n)g.operator===">"||g.operator===">="?r=xZ(r,g,t):g.operator==="<"||g.operator==="<="?o=CZ(o,g,t):i.add(g.semver);if(i.size>1)return null;let s;if(r&&o){if(s=Lk(r.semver,o.semver,t),s>0)return null;if(s===0&&(r.operator!==">="||o.operator!=="<="))return null}for(let g of i){if(r&&!tf(g,String(r),t)||o&&!tf(g,String(o),t))return null;for(let f of e)if(!tf(g,String(f),t))return!1;return!0}let a,l,u,c,h=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=r&&!t.includePrerelease&&r.semver.prerelease.length?r.semver:!1;h&&h.prerelease.length===1&&o.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(c=c||g.operator===">"||g.operator===">=",u=u||g.operator==="<"||g.operator==="<=",r){if(d&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===d.major&&g.semver.minor===d.minor&&g.semver.patch===d.patch&&(d=!1),g.operator===">"||g.operator===">="){if(a=xZ(r,g,t),a===g&&a!==r)return!1}else if(r.operator===">="&&!tf(r.semver,String(g),t))return!1}if(o){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(l=CZ(o,g,t),l===g&&l!==o)return!1}else if(o.operator==="<="&&!tf(o.semver,String(g),t))return!1}if(!g.operator&&(o||r)&&s!==0)return!1}return!(r&&u&&!o&&s!==0||o&&c&&!r&&s!==0||d||h)},xZ=(n,e,t)=>{if(!n)return e;let i=Lk(n.semver,e.semver,t);return i>0?n:i<0||e.operator===">"&&n.operator===">="?e:n},CZ=(n,e,t)=>{if(!n)return e;let i=Lk(n.semver,e.semver,t);return i<0?n:i>0||e.operator==="<"&&n.operator==="<="?e:n};SZ.exports=bwe});var nf=m((g1e,kZ)=>{var Fk=Tl();kZ.exports={re:Fk.re,src:Fk.src,tokens:Fk.t,SEMVER_SPEC_VERSION:Zg().SEMVER_SPEC_VERSION,SemVer:Li(),compareIdentifiers:gy().compareIdentifiers,rcompareIdentifiers:gy().rcompareIdentifiers,parse:kl(),valid:XW(),clean:GW(),inc:zW(),diff:r3(),major:s3(),minor:l3(),patch:c3(),prerelease:d3(),compare:rr(),rcompare:f3(),compareLoose:m3(),compareBuild:by(),sort:w3(),rsort:x3(),gt:Xg(),lt:yy(),eq:my(),neq:xk(),gte:vy(),lte:wy(),cmp:Ck(),coerce:R3(),Comparator:Kg(),Range:or(),satisfies:ef(),toComparators:z3(),maxSatisfying:eZ(),minSatisfying:iZ(),minVersion:oZ(),validRange:aZ(),outside:Sy(),gtr:gZ(),ltr:pZ(),intersects:yZ(),simplifyRange:wZ(),subset:TZ()}});var Bc,EZ,Ik,m1e,ky,PZ=_(()=>{"use strict";Bc=C(require("path")),EZ=C(require("fs"));z();Je();Ik=C(dg()),m1e=q()("model-resolver"),ky=class{get nodeFolder(){return sg("npm")?this._npmFolder?Promise.resolve(this._npmFolder):Vr("npm --loglevel silent root -g",{},3e3).then(e=>(this._npmFolder=(0,Ik.default)(e).trim(),this._npmFolder)):Promise.resolve("")}get yarnFolder(){return sg("yarnpkg")?this._yarnFolder?Promise.resolve(this._yarnFolder):Vr("yarnpkg global dir",{},3e3).then(e=>{let t=Bc.default.join((0,Ik.default)(e).trim(),"node_modules"),i=EZ.default.existsSync(t);return i&&(this._yarnFolder=t),i?t:""}):Promise.resolve("")}async resolveModule(e){let t=await this.nodeFolder,i=await this.yarnFolder;if(i){let r=await Ht(Bc.default.join(i,e,"package.json"));if(r&&r.isFile())return Bc.default.join(i,e)}if(t){let r=await Ht(Bc.default.join(t,e,"package.json"));if(r&&r.isFile())return Bc.default.join(t,e)}return null}}});function FZ(n,e){if(!e.startsWith("nvim-")&&!e.startsWith("patch-"))throw new Error("Feature param could only starts with nvim and patch");if(!n.isVim&&e.startsWith("patch-")||n.isVim&&e.startsWith("nvim-"))return!1;if(n.isVim){let[t,i,r,o]=n.version.match(/^(\d)(\d{2})(\d+)$/),s=`${i}.${parseInt(r,10)}.${parseInt(o,10)}`;return Ak.default.gte(s,e.slice(6))}return Ak.default.gte(n.version,e.slice(5))}function IZ(n=""){return jk.has(n)?jk.get(n):(Ey=Ey+1,jk.set(n,Ey),Ey)}function jZ(n){let t=n.getConfiguration("coc.preferences").get("watchmanPath","watchman");try{return LZ.default.sync(t)}catch{return null}}async function AZ(n,e,t){let i=await n.call("expand","%:p");i=rf.default.normalize(i);let r=i&&rf.default.isAbsolute(i);if(r&&!Ae(e,i,!0))return Dc(t,rf.default.dirname(i));let o=Dc(t,e);return o&&o!=RZ.default.homedir()?o:r?Dc(t,rf.default.dirname(i)):null}function OZ(n){return vwe.resolveModule(n)}function Ok(n,e,t){if(Array.isArray(n)){let i=0;for(let r of n){let o=Ok(r,e,t);if(o===10)return o;o>i&&(i=o)}return i}else{if(typeof n=="string")return n==="*"?5:n===t?10:0;if(n){let i=O.parse(e),{language:r,pattern:o,scheme:s}=n,a=0;if(s)if(s===i.scheme)a=5;else if(s==="*")a=3;else return 0;if(r)if(r===t)a=10;else if(r==="*")a=Math.max(a,5);else return 0;if(o){let l=Xi||sc,u=l?o.toLowerCase():o,c=l?i.fsPath.toLowerCase():i.fsPath;if(u===c||(0,_Z.default)(c,u,{dot:!0}))a=5;else return 0}return a}else return 0}}var _Z,RZ,rf,Ak,LZ,Ey,vwe,jk,MZ=_(()=>{"use strict";_Z=C(Vn()),RZ=C(require("os")),rf=C(require("path")),Ak=C(nf());we();LZ=C(rg());PZ();Je();ac();Ey=2e3,vwe=new ky,jk=new Map});var Py,wwe,_y,NZ=_(()=>{"use strict";Oe();Py=C(H());z();wwe=q()("core-keymaps"),_y=class{constructor(e){this.documents=e;this.keymaps=new Map}attach(e){this.nvim=e}async doKeymap(e,t="",i){let r=this.keymaps.get(e);if(!r)return wwe.error(`keymap for ${e} not found`),i&&this.nvim.command(`silent! unmap ${i.startsWith("{")&&i.endsWith("}")?`<${i.slice(1,-1)}>`:i}`,!0),t;let[o,s]=r,a=await Promise.resolve(o());return s&&await this.nvim.command(`silent! call repeat#set("\\(coc-${e})", -1)`),a!=null?a:t}registerKeymap(e,t,i,r={}){if(!t)throw new Error(`Invalid key ${t} of registerKeymap`);if(this.keymaps.has(t))throw new Error(`${t} already exists.`);r=Object.assign({sync:!0,cancel:!0,silent:!0,repeat:!1},r);let{nvim:o}=this;this.keymaps.set(t,[i,!!r.repeat]);let s=r.sync?"request":"notify",a=r.silent?"":"";for(let l of e)if(l=="i")o.command(`inoremap ${a} (coc-${t}) coc#_insert_key('${s}', '${t}', ${r.cancel?1:0})`,!0);else{let u=L0(l);o.command(`${l}noremap ${a} (coc-${t}) :${u}call coc#rpc#${s}('doKeymap', ['${t}'])`,!0)}return Py.Disposable.create(()=>{this.keymaps.delete(t);for(let l of e)o.command(`${l}unmap (coc-${t})`,!0)})}registerExprKeymap(e,t,i,r=!1){let o=`${e}${global.Buffer.from(t).toString("base64")}${r?"1":"0"}`,{nvim:s}=this;return this.keymaps.set(o,[i,!1]),e=="i"?s.command(`inoremap ${r?"":""} ${t} coc#_insert_key('request', '${o}')`,!0):s.command(`${e}noremap ${r?"":""} ${t} coc#rpc#request('doKeymap', ['${o}'])`,!0),Py.Disposable.create(()=>{this.keymaps.delete(o),s.command(`${e}unmap ${r?"":""} ${t}`,!0)})}registerLocalKeymap(e,t,i,r=!1){let o=Uo(),{nvim:s}=this,a=this.documents.bufnr;this.keymaps.set(o,[i,!1]);let l=r?"notify":"request",u=L0(e),c=t.startsWith("<")&&t.endsWith(">")?`{${t.slice(1,-1)}}`:t;if(this.nvim.hasFunction("nvim_buf_set_keymap")&&!global.hasOwnProperty("__TEST__"))s.call("nvim_buf_set_keymap",[0,e,t,`:${u}call coc#rpc#${l}('doKeymap', ['${o}', '', '${c}'])`,{silent:!0,nowait:!0}],!0);else{let h=`${e}noremap ${t} :${u}call coc#rpc#${l}('doKeymap', ['${o}', '', '${c}'])`;s.command(h,!0)}return Py.Disposable.create(()=>{this.keymaps.delete(o),s.call("coc#compat#buf_del_keymap",[a,e,t],!0)})}}});var k1e,Ry,BZ=_(()=>{"use strict";z();k1e=q()("core-locations"),Ry=class{constructor(e,t,i){this.configurations=e;this.documents=t;this.contentProvider=i;this.disposables=[]}attach(e,t){this.nvim=e,this.env=t}async showLocations(e){let{documents:t,nvim:i,env:r,configurations:o}=this,s=await t.getQuickfixList(e);if(o.getConfiguration("coc.preferences").get("useQuickfixForLocations",!1)){let l=await i.getVar("coc_quickfix_open_command");typeof l!="string"&&(l=s.length<10?`copen ${s.length}`:"copen"),i.pauseNotification(),i.call("setqflist",[s],!0),i.command(l,!0),i.resumeNotification(!1,!0)}else await i.setVar("coc_jump_locations",s),r.locationlist?i.command("CocList --normal --auto-preview location",!0):i.call("coc#util#do_autocmd",["CocLocationsChange"],!0)}dispose(){Z(this.disposables)}}});var Hc,L1e,Ly,HZ=_(()=>{"use strict";le();Hc=C(H());z();L1e=q()("core-watchers"),Ly=class{constructor(){this.watchedOptions=new Set;this.disposables=[];this._onDidRuntimePathChange=new Hc.Emitter;this._onDidOptionChange=new Hc.Emitter;this.onDidRuntimePathChange=this._onDidRuntimePathChange.event;this.onDidOptionChange=this._onDidOptionChange.event}get options(){return Array.from(this.watchedOptions)}attach(e,t){this.nvim=e,this.env=t,this.watchOption("runtimepath",(i,r)=>{let o=i.split(","),a=r.split(",").filter(l=>!o.includes(l));a.length>0&&this._onDidRuntimePathChange.fire(a),this.env.runtimepath=r},this.disposables)}watchOption(e,t,i){let r=this.watchedOptions.has(e);r||(this.watchedOptions.add(e),this._onDidOptionChange.fire());let o=E.on("OptionSet",async(s,a,l)=>{s==e&&t&&await Promise.resolve(t(a,l))});i&&i.push(Hc.Disposable.create(()=>{o.dispose(),!r&&(this.watchedOptions.delete(e),this._onDidOptionChange.fire())}))}watchGlobal(e,t,i){let{nvim:r}=this;r.call("coc#_watch",e,!0);let o=E.on("GlobalChange",async(s,a,l)=>{s==e&&await Promise.resolve(t(a,l))});i&&i.push(Hc.Disposable.create(()=>{o.dispose(),r.call("coc#_unwatch",e,!0)}))}dispose(){Z(this.disposables),this._onDidOptionChange.dispose(),this._onDidRuntimePathChange.dispose()}}});var of,qZ,Fy,YZ=_(()=>{"use strict";of=C(H());le();ke();qZ=q()("core-editors"),Fy=class{constructor(e){this.documents=e;this.disposables=[];this.editors=new Map;this._onDidChangeActiveTextEditor=new of.Emitter;this._onDidChangeVisibleTextEditors=new of.Emitter;this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event;this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event}get activeTextEditor(){return this.editors.get(this.winid)}get visibleTextEditors(){return Array.from(this.editors.values())}onChange(e){let t=`${e.winid}-${e.document.bufnr}-${e.document.uri}`;t!=this.previousId&&(this.previousId=t,this._onDidChangeActiveTextEditor.fire(e))}async attach(e){this.nvim=e;let{documents:t}=this,i=t.getDocument(t.bufnr);i&&i.winid>0&&(this.winid=i.winid,await this.createTextEditor(this.winid)),E.on("WinEnter",r=>{this.winid=r;let o=this.editors.get(r);o&&this.onChange(o)},null,this.disposables),E.on("CursorHold",async()=>{let[r,o,s]=await e.eval("[win_getid(),&buftype,coc#window#is_float(win_getid())]"),a=!1;!s&&["","acwrite"].includes(o)&&!this.editors.has(r)&&await this.createTextEditor(r)&&(a=!0),a&&this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors)},null,this.disposables),E.on("WinClosed",r=>{this.editors.has(r)&&(this.editors.delete(r),this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors))},null,this.disposables),E.on("BufWinEnter",async(r,o)=>{this.winid=o,await this.createTextEditor(o,!0)},null,this.disposables)}async createTextEditor(e,t=!1){let{documents:i,nvim:r}=this,o=await r.call("coc#util#get_editoroption",[e]);if(!o)return!1;let s=!1;if(t)for(let l of this.editors.keys())o.winids.includes(l)||(s=!0,this.editors.delete(l));let a=i.getDocument(o.bufnr);if(a){let l=this.fromOptions(o,a);return this.editors.set(e,l),e==this.winid&&this.onChange(l),this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors),qZ.debug("editor created winid & bufnr & tabnr: ",e,o.bufnr,o.tabpagenr),!0}else s&&this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors);return qZ.error(`document not found for window: ${e}`),!1}fromOptions(e,t){let{visibleRanges:i}=e,r=k.getTabId(e.tabpagenr);return{get tabpagenr(){return k.getTabNumber(r)},winid:e.winid,winnr:e.winnr,document:t,visibleRanges:i.map(o=>of.Range.create(o[0]-1,0,o[1],0)),options:{tabSize:e.tabSize,insertSpaces:!!e.insertSpaces}}}}});function sf(n){if(!(!n||!af.default.isAbsolute(n)))return{name:af.default.basename(n),uri:O.file(n).toString()}}var af,WZ,Iy,ZZ=_(()=>{"use strict";af=C(require("path")),WZ=C(H());we();Fr();Go();Je();Iy=class{constructor(e){this.configurations=e;this._onDidChangeWorkspaceFolders=new WZ.Emitter;this.onDidChangeWorkspaceFolders=this._onDidChangeWorkspaceFolders.event;this.rootPatterns=new Map;this._workspaceFolders=[]}setWorkspaceFolders(e){if(!e||!Array.isArray(e))return;let t=e.map(i=>sf(i));this._workspaceFolders=t.filter(i=>i!=null)}getWorkspaceFolder(e){if(e.scheme!=="file")return;let t=Array.from(this._workspaceFolders).map(o=>O.parse(o.uri).fsPath);t.sort((o,s)=>s.length-o.length);let i=e.fsPath,r=t.find(o=>Ae(o,i,!0));return sf(r)}getRelativePath(e,t){let i,r="";if(typeof e=="string"?(i=O.file(e),r=e):typeof e<"u"&&(i=e,r=e.fsPath),!i)return r;let o=this.getWorkspaceFolder(i);if(!o)return r;typeof t>"u"&&this._workspaceFolders&&(t=this._workspaceFolders.length>1);let s=af.default.relative(O.parse(o.uri).fsPath,i.fsPath);return s=s==""?i.fsPath:s,t&&o.name&&(s=`${o.name}/${s}`),s}get workspaceFolders(){return this._workspaceFolders}addRootPattern(e,t){let i=this.rootPatterns.get(e)||[];for(let r of t)i.includes(r)||i.push(r);this.rootPatterns.set(e,i)}resolveRoot(e,t,i,r){if(e.buftype!==""||e.schema!=="file"||!e.enabled)return null;let o=[0,1,2],s=O.parse(e.uri),a=af.default.dirname(s.fsPath),l=this.configurations.getConfiguration("workspace",e.uri),u=l.get("ignoredFiletypes",[]),c=l.get("bottomUpFiletypes",[]),h=l.get("workspaceFolderCheckCwd",!0),d=l.get("ignoredFolders",[]),g=l.get("workspaceFolderFallbackCwd",!0);if(u!=null&&u.includes(e.filetype))return null;let f=this.getWorkspaceFolder(O.parse(e.uri));if(f)return O.parse(f.uri).fsPath;d=Array.isArray(d)?d.filter(b=>b&&b.length>0).map(b=>r(b)):[];let p=null;for(let b of o){let v=this.getRootPatterns(e,b);if(v&&v.length){let w=c.includes("*")||c.includes(e.filetype),D=mb(a,v,t,w,h,d);if(D){p=D;break}}}return g&&!p&&!d.includes(t)&&Ae(t,a,!0)&&(p=t),p&&this.addWorkspaceFolder(p,i),p}addWorkspaceFolder(e,t){let i=sf(e);if(!!i)return this._workspaceFolders.findIndex(r=>r.uri==i.uri)==-1&&(this._workspaceFolders.push(i),t&&this._onDidChangeWorkspaceFolders.fire({added:[i],removed:[]})),i}renameWorkspaceFolder(e,t){let i=sf(t);if(!i)return;let r=this._workspaceFolders.findIndex(s=>O.parse(s.uri).fsPath==e);if(r==-1)return;let o=this.workspaceFolders[r];this._workspaceFolders.splice(r,1,i),this._onDidChangeWorkspaceFolders.fire({removed:[o],added:[i]})}removeWorkspaceFolder(e){let t=sf(e);if(!t)return;let i=this._workspaceFolders.findIndex(r=>r.uri==t.uri);i!=-1&&(this._workspaceFolders.splice(i,1),this._onDidChangeWorkspaceFolders.fire({removed:[t],added:[]}))}getRootPatterns(e,t){let{uri:i}=e;return t==0?e.getVar("root_patterns",[])||[]:t==1?this.getServerRootPatterns(e.languageId):this.configurations.getConfiguration("coc.preferences",i).get("rootPatterns",[".git",".hg",".projections.json"]).slice()}reset(){this.rootPatterns.clear(),this._workspaceFolders=[]}getServerRootPatterns(e){let t=this.configurations.getConfiguration().get("languageserver",{}),i=[];for(let r of Object.keys(t)){let o=t[r],{filetypes:s,rootPatterns:a}=o;Array.isArray(s)&&a&&s.includes(e)&&i.push(...a)}return i=i.concat(this.rootPatterns.get(e)||[]),i.length?sa(i):[]}}});var jy,JZ=_(()=>{"use strict";le();z();jy=class{constructor(e,t){this._create=e;this.disposables=[];this.itemsMap=new Map;let{disposables:i}=this;for(let r of t.documents)this.create(r);t.onDidOpenTextDocument(r=>{this.create(t.getDocument(r.bufnr))},null,i),t.onDidChangeDocument(r=>{this.onChange(r)},null,i),t.onDidCloseDocument(r=>{this.delete(r.bufnr)},null,i),E.on("LinesChanged",r=>{let o=this.itemsMap.get(r);o&&typeof o.item.onTextChange=="function"&&o.item.onTextChange()},null,i)}get items(){return Array.from(this.itemsMap.values()).map(e=>e.item)}getItem(e){var i;if(typeof e=="number")return(i=this.itemsMap.get(e))==null?void 0:i.item;let t=Array.from(this.itemsMap.values()).find(r=>r.uri==e);return t?t.item:void 0}create(e){if(!e)return;let t=this.itemsMap.get(e.bufnr);t&&t.item.dispose();let i=this._create(e);i&&this.itemsMap.set(e.bufnr,{uri:e.uri,item:i})}onChange(e){let t=this.itemsMap.get(e.bufnr);t&&typeof t.item.onChange=="function"&&t.item.onChange(e)}delete(e){let t=this.itemsMap.get(e);t&&(t.item.dispose(),this.itemsMap.delete(e))}reset(){for(let e of this.itemsMap.values())e.item.dispose();this.itemsMap.clear()}dispose(){Z(this.disposables);for(let e of this.itemsMap.values())e.item.dispose();this._create=void 0,this.itemsMap.clear()}}});var An,Mk,qc,Nk=_(()=>{"use strict";An=C(Rn()),Mk=C(require("path")),qc=class{constructor(e){this.filepath=e}fetch(e){let t=this.load();if(!e)return t;let i=e.split(".");for(let r of i){if(typeof t[r]>"u")return;t=t[r]}return t}exists(e){let t=this.load(),i=e.split(".");for(let r of i){if(typeof t[r]>"u")return!1;t=t[r]}return!0}delete(e){let t=this.load(),i=t,r=e.split("."),o=r.length;for(let s=0;s"u");s++){if(s==o-1){delete t[r[s]],An.default.writeFileSync(this.filepath,JSON.stringify(i,null,2),"utf8");break}t=t[r[s]]}}push(e,t){let i=this.load()||{},r=i,o=e.split("."),s=o.length;if(r==null){let a=Mk.default.dirname(this.filepath);An.default.mkdirpSync(a),r=i}for(let a=0;a"u"&&(r[l]={}),r=r[l]}}load(){let e=Mk.default.dirname(this.filepath),t=An.default.statSync(e);if(!t||!t.isDirectory())return An.default.mkdirpSync(e),An.default.writeFileSync(this.filepath,"{}","utf8"),{};try{let i=An.default.readFileSync(this.filepath,"utf8");return JSON.parse(i.trim())}catch{return An.default.writeFileSync(this.filepath,"{}","utf8"),{}}}clear(){let e=An.default.statSync(this.filepath);!e||!e.isFile()||An.default.writeFileSync(this.filepath,"{}","utf8")}destroy(){An.default.existsSync(this.filepath)&&An.default.unlinkSync(this.filepath)}}});var Bk,ca,oo,lf=_(()=>{"use strict";Bk=C(require("path")),ca=C(Rn());Je();Go();oo=class{constructor(e,t,i=5e3){this.maximum=i;this.file=Bk.default.join(t||process.env.COC_DATA_HOME,e);let r=Bk.default.dirname(this.file);ca.default.mkdirpSync(r)}async load(){try{let e=await ia(this.file,0,this.maximum);return e.length>this.maximum&&await bb(this.file,e.join(`
-`)),e[e.length-1]==""&&(e=e.slice(0,-1)),sa(e)}catch{return[]}}loadSync(){if(!ca.default.existsSync(this.file))return[];try{let e=ca.default.readFileSync(this.file,"utf8");return e=e.trim(),e.length?e.trim().split(`
-`):[]}catch{return[]}}async add(e){let t;try{t=ca.default.readFileSync(this.file),t[0]===239&&t[1]===187&&t[2]===191&&(t=t.slice(3)),t=Buffer.concat([Buffer.from(e,"utf8"),new Uint8Array([10]),t])}catch{t=Buffer.concat([Buffer.from(e,"utf8"),new Uint8Array([10])])}await ca.default.writeFile(this.file,t,"utf8")}async remove(e){let t=await this.load(),i=t.length;t=t.filter(r=>r!=e),t.length!=i&&await ca.default.writeFile(this.file,t.join(`
-`),"utf8")}async clean(){try{await ca.default.unlink(this.file)}catch{}}}});var Ay,Oy,$Z=_(()=>{"use strict";Ay=C(H());le();z();Oy=class{constructor(e,t){this.nvim=e;this.id=t;this.disposables=[];this._onExit=new Ay.Emitter;this._onStderr=new Ay.Emitter;this._onStdout=new Ay.Emitter;this.onExit=this._onExit.event;this.onStdout=this._onStdout.event;this.onStderr=this._onStderr.event;E.on("TaskExit",(i,r)=>{i==this.id&&this._onExit.fire(r)},null,this.disposables),E.on("TaskStderr",(i,r)=>{i==this.id&&this._onStderr.fire(r)},null,this.disposables),E.on("TaskStdout",(i,r)=>{i==this.id&&this._onStdout.fire(r)},null,this.disposables)}async start(e){let{nvim:t}=this;return await t.call("coc#task#start",[this.id,e])}async stop(){let{nvim:e}=this;await e.call("coc#task#stop",[this.id])}get running(){let{nvim:e}=this;return e.call("coc#task#running",[this.id])}dispose(){let{nvim:e}=this;e.call("coc#task#stop",[this.id],!0),this._onStdout.dispose(),this._onStderr.dispose(),this._onExit.dispose(),Z(this.disposables)}}});var GZ,Hk,ha,XZ,UZ,Dwe,QZ,y,V=_(()=>{"use strict";GZ=C(Rn()),Hk=C(require("os")),ha=C(require("path"));we();kT();fY();mY();vY();wb();wY();$Y();iW();RW();MZ();NZ();BZ();Tb();HZ();YZ();ZZ();le();JZ();Nk();lf();$Z();z();XZ=30,UZ=q()("workspace"),Dwe=["showMessage","runTerminalCommand","openTerminal","showQuickpick","menuPick","openLocalConfig","showPrompt","createStatusBarItem","createOutputChannel","showOutputChannel","requestInput","echoLines","getCursorPosition","moveTo","getOffset","getSelectedRange","selectRange","createTerminal"],QZ=class{constructor(){this.version=kb;let e=ha.default.normalize(process.env.COC_VIMCONFIG)||ha.default.join(Hk.default.homedir(),".vim"),t=ha.default.join(e,Er);this.configurations=new Xo(t,new Nb(this)),this.workspaceFolderControl=new Iy(this.configurations);let i=this.documentsManager=new Kb(this.configurations,this.workspaceFolderControl);this.contentProvider=new Hb(i),this.watchers=new Ly,this.autocmds=new Bb(this.contentProvider,this.watchers),this.keymaps=new _y(i),this.locations=new Ry(this.configurations,i,this.contentProvider),this.files=new oy(i,this.configurations,this.workspaceFolderControl,this.keymaps),this.editors=new Fy(i),this.onDidRuntimePathChange=this.watchers.onDidRuntimePathChange,this.onDidChangeWorkspaceFolders=this.workspaceFolderControl.onDidChangeWorkspaceFolders,this.onDidChangeConfiguration=this.configurations.onDidChange,this.onDidOpenTextDocument=i.onDidOpenTextDocument,this.onDidChangeTextDocument=i.onDidChangeDocument,this.onDidCloseTextDocument=i.onDidCloseDocument,this.onDidSaveTextDocument=i.onDidSaveTextDocument,this.onWillSaveTextDocument=i.onWillSaveTextDocument,this.onDidCreateFiles=this.files.onDidCreateFiles,this.onDidRenameFiles=this.files.onDidRenameFiles,this.onDidDeleteFiles=this.files.onDidDeleteFiles,this.onWillCreateFiles=this.files.onWillCreateFiles,this.onWillRenameFiles=this.files.onWillRenameFiles,this.onWillDeleteFiles=this.files.onWillDeleteFiles;let r=global.__TEST__?null:this.getWatchmanPath();this.fileSystemWatchers=new Wg(this.workspaceFolderControl,r)}async init(e){let{nvim:t}=this;for(let o of Dwe)Object.defineProperty(this,o,{get:()=>(...s)=>{let a=`
-`+Error().stack.split(`
-`).slice(2,4).join(`
-`);return UZ.warn(`workspace.${o} is deprecated, please use window.${o} instead.`,a),e[o].apply(e,s)}});for(let o of["onDidOpenTerminal","onDidCloseTerminal"])Object.defineProperty(this,o,{get:()=>{let s=`
-`+Error().stack.split(`
-`).slice(2,4).join(`
-`);return UZ.warn(`workspace.${o} is deprecated, please use window.${o} instead.`,s),e[o]}});let i=this._env=await t.call("coc#util#vim_info");e.init(i),this._env.apiversion!=XZ&&t.echoError(`API version ${this._env.apiversion} is not ${XZ}, please build coc.nvim by 'yarn install' after pull source code.`),this.workspaceFolderControl.setWorkspaceFolders(this._env.workspaceFolders),this.configurations.updateUserConfig(this._env.config),this.files.attach(t,i,e),this.contentProvider.attach(t),this.keymaps.attach(t),this.autocmds.attach(t,i),this.locations.attach(t,i),this.watchers.attach(t,i),await this.attach(),await this.editors.attach(t);let r=$o.create("watchman",t);this.fileSystemWatchers.attach(r)}get cwd(){return this.documentsManager.cwd}get env(){return this._env}get root(){return this.documentsManager.root||this.cwd}get rootPath(){return this.root}get bufnr(){return this.documentsManager.bufnr}get insertMode(){return E.insertMode}get floatSupported(){return this.env.floating||this.env.textprop}get uri(){return this.documentsManager.uri}get workspaceFolder(){return this.workspaceFolders[0]}get textDocuments(){return this.documentsManager.textDocuments}get documents(){return this.documentsManager.documents}get document(){return this.documentsManager.document}get workspaceFolders(){return this.workspaceFolderControl.workspaceFolders}get folderPaths(){return this.workspaceFolders.map(e=>O.parse(e.uri).fsPath)}get channelNames(){return $o.names}get pluginRoot(){return ha.default.dirname(__dirname)}get isVim(){return this._env.isVim}get isNvim(){return!this._env.isVim}get completeOpt(){return this._env.completeOpt}get filetypes(){return this.documentsManager.filetypes}get languageIds(){return this.documentsManager.languageIds}createNameSpace(e){return IZ(e)}getConfigFile(e){return this.configurations.getConfigFile(e)}has(e){return FZ(this.env,e)}registerAutocmd(e){return this.autocmds.registerAutocmd(e)}watchOption(e,t,i){this.watchers.watchOption(e,t,i)}watchGlobal(e,t,i){this.watchers.watchGlobal(e,t||function(){},i)}match(e,t){return Ok(e,t.uri,t.languageId)}createFileSystemWatcher(e,t,i,r){return this.fileSystemWatchers.createFileSystemWatcher(e,t,i,r)}getWatchmanPath(){return jZ(this.configurations)}getConfiguration(e,t){return this.configurations.getConfiguration(e,t)}getDocument(e){return this.documentsManager.getDocument(e)}isAttached(e){let t=this.documentsManager.getDocument(e);return t!=null&&t.attached}getAttachedDocument(e){let t=this.getDocument(e);if(!t)throw new Error(`Buffer ${e} not created.`);if(!t.attached)throw new Error(`Buffer ${e} not attached, try :CocCommand document.checkBuffer`);return t}getQuickfixItem(e,t,i="",r){return this.documentsManager.getQuickfixItem(e,t,i,r)}createMru(e){return new oo(e)}async getQuickfixList(e){return this.documentsManager.getQuickfixList(e)}async showLocations(e){await this.locations.showLocations(e)}getLine(e,t){return this.documentsManager.getLine(e,t)}getWorkspaceFolder(e){return this.workspaceFolderControl.getWorkspaceFolder(O.parse(e))}readFile(e){return this.documentsManager.readFile(e)}async getCurrentState(){let e=await this.document,t=await Cb(this.nvim);return{document:e.textDocument,position:t}}async getFormatOptions(e){return this.documentsManager.getFormatOptions(e)}resolveModule(e){return OZ(e)}async runCommand(e,t,i){return t=t||this.cwd,Vr(e,{cwd:t},i)}expand(e){return this.documentsManager.expand(e)}async callAsync(e,t){return this.isNvim?await this.nvim.call(e,t):await this.nvim.callAsync("coc#util#with_callback",[e,t])}registerTextDocumentContentProvider(e,t){return this.contentProvider.registerTextDocumentContentProvider(e,t)}registerKeymap(e,t,i,r={}){return this.keymaps.registerKeymap(e,t,i,r)}registerExprKeymap(e,t,i,r=!1){return this.keymaps.registerExprKeymap(e,t,i,r)}registerLocalKeymap(e,t,i,r=!1){return this.keymaps.registerLocalKeymap(e,t,i,r)}createTask(e){return new Oy(this.nvim,e)}createDatabase(e){let t;global.hasOwnProperty("__TEST__")?(t=ha.default.join(Hk.default.tmpdir(),`coc-${process.pid}`),GZ.default.mkdirpSync(t)):t=ha.default.dirname(this.env.extensionRoot);let i=ha.default.join(t,e+".json");return new qc(i)}registerBufferSync(e){return new jy(e,this.documentsManager)}async attach(){await this.documentsManager.attach(this.nvim,this._env)}jumpTo(e,t,i){return this.files.jumpTo(e,t,i)}findUp(e){return AZ(this.nvim,this.cwd,e)}applyEdit(e){return this.files.applyEdit(e)}createFile(e,t={}){return this.files.createFile(e,t)}loadFile(e){return this.files.loadResource(e)}async loadFiles(e){return this.files.loadResources(e)}async renameFile(e,t,i={}){await this.files.renameFile(e,t,i)}async deleteFile(e,t={}){await this.files.deleteFile(e,t)}async renameCurrent(){await this.files.renameCurrent()}async openResource(e){await this.files.openResource(e)}openTextDocument(e){return this.files.openTextDocument(e)}getRelativePath(e,t){return this.workspaceFolderControl.getRelativePath(e,t)}async findFiles(e,t,i,r){return this.files.findFiles(e,t,i,r)}detach(){this.documentsManager.detach()}reset(){this.configurations.reset(),this.workspaceFolderControl.reset(),this.documentsManager.reset()}dispose(){this.watchers.dispose(),this.autocmds.dispose(),this.contentProvider.dispose(),this.documentsManager.dispose(),this.configurations.dispose()}},y=new QZ});function qk(n,e){let{range:t,uri:i}=e;n.find(r=>r.uri==i&&Fe(r.range,t))==null&&n.push(e)}var Yc,xwe,pe,Tt=_(()=>{"use strict";Yc=C(H());V();Jt();xwe=q()("provider-manager"),pe=class{constructor(){this.providers=new Set}hasProvider(e){return this.getProvider(e)!=null}getProvider(e){let t=0,i;for(let r of this.providers){let{selector:o,priority:s}=r,a=y.match(o,e);a!=0&&(typeof s=="number"&&(a=s),!(ai.id==e);return t?t.provider:null}getProviders(e){let t=Array.from(this.providers);return t=t.filter(i=>y.match(i.selector,e)>0),t.sort((i,r)=>y.match(r.selector,e)-y.match(i.selector,e))}toLocations(e){let t=[];for(let i of e)if(!!i)if(Yc.Location.is(i))qk(t,i);else if(Array.isArray(i)){for(let r of i)if(Yc.Location.is(r))qk(t,r);else if(Yc.LocationLink.is(r)){let{targetUri:o,targetSelectionRange:s,targetRange:a}=r;qk(t,Yc.Location.create(o,s||a))}}else xwe.error("Bad definition",i);return t}}});var KZ,My,zZ=_(()=>{"use strict";KZ=C(H());Tt();Oe();My=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),KZ.Disposable.create(()=>{this.providers.delete(i)})}async prepareCallHierarchy(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.prepareCallHierarchy===null?null:await Promise.resolve(o.prepareCallHierarchy(e,t,i))}async provideCallHierarchyOutgoingCalls(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideCallHierarchyOutgoingCalls===null?null:await Promise.resolve(o.provideCallHierarchyOutgoingCalls(t,i))}async provideCallHierarchyIncomingCalls(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideCallHierarchyIncomingCalls(t,i)===null?null:await Promise.resolve(o.provideCallHierarchyIncomingCalls(t,i))}}});function eJ(n,...e){return n=Object(n),e.forEach(t=>{if(t!=null){t=Object(t);for(let i in t){let r=n[i];(r===void 0||r===VZ[i]&&!Cwe.call(n,i))&&(n[i]=t[i])}}}),n}function zi(n,e){let t={};for(let i of Object.keys(n))e.includes(i)||(t[i]=n[i]);return t}var VZ,Cwe,Vo=_(()=>{"use strict";VZ=Object.prototype,Cwe=VZ.hasOwnProperty});var Ny,nOe,By,tJ=_(()=>{"use strict";Ny=C(H());Tt();Oe();Vo();nOe=q()("codeActionManager"),By=class extends pe{register(e,t,i,r){let o={id:re(),selector:e,provider:t,kinds:r,clientId:i};return this.providers.add(o),Ny.Disposable.create(()=>{this.providers.delete(o)})}async provideCodeActions(e,t,i,r){let o=this.getProviders(e);if(!o.length)return null;if(i.only){let{only:a}=i;o=o.filter(l=>!(l.kinds&&!l.kinds.some(u=>a.includes(u))))}let s=[];return await Promise.all(o.map(a=>{let{provider:l,id:u}=a;return Promise.resolve(l.provideCodeActions(e,t,i,r)).then(c=>{if(!(!c||c.length==0))for(let h of c)if(Ny.Command.is(h)){let d={title:h.title,command:h,providerId:u};s.push(d)}else{if(i.only){if(!h.kind)continue;let g=!1;for(let f of i.only)if(h.kind.startsWith(f)){g=!0;break}if(!g)continue}s.findIndex(g=>g.title==h.title)==-1&&s.push(Object.assign({providerId:u},h))}})})),s}async resolveCodeAction(e,t){if(e.edit!=null)return e;let i=e.providerId;if(!i)throw new Error("provider id not found from codeAction");let r=this.getProviderById(i);return!r||typeof r.resolveCodeAction!="function"?e:await Promise.resolve(r.resolveCodeAction(zi(e,["providerId"]),t))||e}}});var iJ,Hy,nJ=_(()=>{"use strict";iJ=C(H());Tt();Oe();Vo();Hy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),iJ.Disposable.create(()=>{this.providers.delete(i)})}async provideCodeLenses(e,t){let i=this.getProviders(e);if(!i.length)return null;let r=await Promise.all(i.map(o=>{let{provider:s,id:a}=o;return Promise.resolve(s.provideCodeLenses(e,t)).then(l=>{if(Array.isArray(l))for(let u of l)u.source=a;return l})}));return[].concat(...r)}async resolveCodeLens(e,t){if(e.command)return e;let{source:i}=e,r=this.getProviderById(i);if(!r||typeof r.resolveCodeLens!="function")return e;let o=await Promise.resolve(r.resolveCodeLens(zi(e,["source"]),t));return Object.assign(e,o),e}}});var rJ,DOe,qy,oJ=_(()=>{"use strict";rJ=C(H());Tt();Oe();DOe=q()("definitionManager"),qy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),rJ.Disposable.create(()=>{this.providers.delete(i)})}async provideDeclaration(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideDeclaration(e,t,i))}}});var Yy,IOe,Wy,sJ=_(()=>{"use strict";Yy=C(H());Tt();Oe();Jt();IOe=q()("definitionManager"),Wy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),Yy.Disposable.create(()=>{this.providers.delete(i)})}async getDefinitions(e,t,i){let r=this.getProviders(e);return r.length?await Promise.all(r.map(s=>{let{provider:a}=s;return Promise.resolve(a.provideDefinition(e,t,i))})):[]}async provideDefinition(e,t,i){let r=await this.getDefinitions(e,t,i);return this.toLocations(r)}async provideDefinitionLinks(e,t,i){let r=await this.getDefinitions(e,t,i),o=[];for(let s of r)if(!!Array.isArray(s))for(let a of s)Yy.LocationLink.is(a)&&o.findIndex(u=>u.targetUri==a.targetUri&&Fe(u.targetRange,a.targetRange))==-1&&o.push(a);return o}}});var aJ,Zy,lJ=_(()=>{"use strict";aJ=C(H());Tt();Oe();Zy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),aJ.Disposable.create(()=>{this.providers.delete(i)})}async provideDocumentColors(e,t){let i=this.getProvider(e);if(!i)return null;let{provider:r}=i;return await Promise.resolve(r.provideDocumentColors(e,t))}async provideColorPresentations(e,t,i){let{range:r,color:o}=e,s=this.getProvider(t);if(!s)return null;let{provider:a}=s;return await Promise.resolve(a.provideColorPresentations(o,{document:t,range:r},i))}}});var uJ,Jy,cJ=_(()=>{"use strict";uJ=C(H());Tt();Oe();Jy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),uJ.Disposable.create(()=>{this.providers.delete(i)})}async provideDocumentHighlights(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideDocumentHighlights(e,t,i))}}});var hJ,$y,dJ=_(()=>{"use strict";hJ=C(H());Tt();Oe();$y=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),hJ.Disposable.create(()=>{this.providers.delete(i)})}async _provideDocumentLinks(e,t,i){let{provider:r,id:o}=e,s=await Promise.resolve(r.provideDocumentLinks(t,i));return!s||!s.length?[]:(s.forEach(a=>{a.data=a.data||{},a.data.source=o}),s)}async provideDocumentLinks(e,t){let i=this.getProviders(e);if(i.length==0)return[];let r=await Promise.all(i.map(o=>this._provideDocumentLinks(o,e,t)));return[].concat(...r)}async resolveDocumentLink(e,t){let{data:i}=e;if(!i||!i.source)return null;for(let r of this.providers)if(r.id==i.source){let{provider:o}=r;return e=await Promise.resolve(o.resolveDocumentLink(e,t)),e}return null}}});var gJ,Xy,fJ=_(()=>{"use strict";gJ=C(H());Tt();Oe();Xy=class extends pe{register(e,t,i){let r={id:re(),meta:i,selector:e,provider:t};return this.providers.add(r),gJ.Disposable.create(()=>{this.providers.delete(r)})}getMetaData(e){var i;let t=this.getProvider(e);return t?(i=t.provider.meta)!=null?i:{}:{}}async provideDocumentSymbols(e,t){let i=this.getProvider(e);if(!i)return null;let{provider:r}=i;return await Promise.resolve(r.provideDocumentSymbols(e,t))||[]}}});var pJ,Uy,mJ=_(()=>{"use strict";pJ=C(H());Tt();Oe();Uy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),pJ.Disposable.create(()=>{this.providers.delete(i)})}async provideFoldingRanges(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideFoldingRanges(e,t,i))||[]}}});var bJ,Gy,yJ=_(()=>{"use strict";bJ=C(H());Tt();Oe();Gy=class extends pe{register(e,t,i=0){let r={id:re(),selector:e,priority:i,provider:t};return this.providers.add(r),bJ.Disposable.create(()=>{this.providers.delete(r)})}handles(e){return this.getProvider(e)!=null}async provideDocumentFormattingEdits(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideDocumentFormattingEdits(e,t,i))}}});var vJ,Qy,wJ=_(()=>{"use strict";vJ=C(H());Tt();Oe();Qy=class extends pe{register(e,t,i=0){let r={id:re(),selector:e,provider:t,priority:i};return this.providers.add(r),vJ.Disposable.create(()=>{this.providers.delete(r)})}async provideDocumentRangeFormattingEdits(e,t,i,r){let o=this.getProvider(e);if(!o)return null;let{provider:s}=o;return await Promise.resolve(s.provideDocumentRangeFormattingEdits(e,t,i,r))}}});var DJ,Ky,xJ=_(()=>{"use strict";DJ=C(H());Tt();Oe();Ky=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),DJ.Disposable.create(()=>{this.providers.delete(i)})}async provideHover(e,t,i){let r=this.getProviders(e);if(r.length===0)return null;let o=[];for(let s=0,a=r.length;s{"use strict";CJ=C(H());Tt();Oe();zy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),CJ.Disposable.create(()=>{this.providers.delete(i)})}async provideReferences(e,t,i){let r=this.getProviders(e);if(!r.length)return null;let o=await Promise.all(r.map(s=>{let{provider:a}=s;return Promise.resolve(a.provideImplementation(e,t,i))}));return this.toLocations(o)}}});var TJ,oNe,Vy,kJ=_(()=>{"use strict";Oe();TJ=C(H());Tt();oNe=q()("linkedEditingManager"),Vy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),TJ.Disposable.create(()=>{this.providers.delete(i)})}async provideLinkedEditingRanges(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideLinkedEditingRanges?await Promise.resolve(o.provideLinkedEditingRanges(e,t,i)):null}}});var EJ,dNe,ev,PJ=_(()=>{"use strict";EJ=C(H());V();dNe=q()("onTypeFormatManager"),ev=class{constructor(){this.providers=new Set}register(e,t,i){let r={triggerCharacters:i,selector:e,provider:t};return this.providers.add(r),EJ.Disposable.create(()=>{this.providers.delete(r)})}hasProvider(e){for(let t of this.providers){let{selector:i}=t;if(y.match(i,e)>0)return!0}return!1}getProvider(e,t){for(let i of this.providers){let{triggerCharacters:r,selector:o}=i;if(y.match(o,e)>0&&r.includes(t))return i.provider}return null}async onCharacterType(e,t,i,r){let o=this.getProvider(t,e);if(!o)return;let s=await y.getFormatOptions(t.uri);return await Promise.resolve(o.provideOnTypeFormattingEdits(t,i,e,s,r))}}});var _J,tv,RJ=_(()=>{"use strict";_J=C(H());Tt();Oe();tv=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),_J.Disposable.create(()=>{this.providers.delete(i)})}async provideReferences(e,t,i,r){let o=this.getProviders(e);if(!o.length)return null;let s=await Promise.all(o.map(a=>{let{provider:l}=a;return Promise.resolve(l.provideReferences(e,t,i,r))}));return this.toLocations(s)}}});var LJ,iv,FJ=_(()=>{"use strict";LJ=C(H());Tt();Oe();iv=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),LJ.Disposable.create(()=>{this.providers.delete(i)})}async provideRenameEdits(e,t,i,r){let o=this.getProvider(e);if(!o)return null;let{provider:s}=o;return await Promise.resolve(s.provideRenameEdits(e,t,i,r))}async prepareRename(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;if(o.prepareRename==null)return null;let s=await Promise.resolve(o.prepareRename(e,t,i));return s==null?!1:s}}});var IJ,nv,jJ=_(()=>{"use strict";IJ=C(H());Tt();Oe();nv=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),IJ.Disposable.create(()=>{this.providers.delete(i)})}async provideSelectionRanges(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r,s=await Promise.resolve(o.provideSelectionRanges(e,t,i));if(!s||s.length==0)return[];for(let a=0;a{"use strict";Oe();AJ=C(H());Tt();$Ne=q()("semanticTokensManager"),rv=class extends pe{constructor(){super(...arguments);this.resolvedProvider=new Map}register(e,t,i,r){let o=re(),s={id:o,selector:e,legend:i,provider:t};this.providers.add(s);let a;return typeof t.onDidChangeSemanticTokens=="function"&&(a=t.onDidChangeSemanticTokens(()=>{r()})),AJ.Disposable.create(()=>{a==null||a.dispose();for(let[l,u]of this.resolvedProvider.entries())u==o&&this.resolvedProvider.delete(l);this.providers.delete(s)})}getLegend(e){let t=this.getProvider(e);if(!!t)return this.resolvedProvider.set(e.uri,t.id),t.legend}resolveProvider(e){var i;let t=this.resolvedProvider.get(e.uri);return t?this.getProviderById(t):(i=this.getProvider(e))==null?void 0:i.provider}hasSemanticTokensEdits(e){let t=this.resolveProvider(e);return t?typeof t.provideDocumentSemanticTokensEdits=="function":!1}async provideDocumentSemanticTokens(e,t){let i=this.resolveProvider(e);return!i||typeof i.provideDocumentSemanticTokens!="function"?null:await Promise.resolve(i.provideDocumentSemanticTokens(e,t))}async provideDocumentSemanticTokensEdits(e,t,i){let r=this.resolveProvider(e);return!r||typeof r.provideDocumentSemanticTokensEdits!="function"?null:await Promise.resolve(r.provideDocumentSemanticTokensEdits(e,t,i))}}});var MJ,iBe,ov,NJ=_(()=>{"use strict";Oe();MJ=C(H());Tt();iBe=q()("semanticTokensRangeManager"),ov=class extends pe{register(e,t,i){let r={id:re(),selector:e,legend:i,provider:t};return this.providers.add(r),MJ.Disposable.create(()=>{this.providers.delete(r)})}getLegend(e){let t=this.getProvider(e);if(!!t)return t.legend}async provideDocumentRangeSemanticTokens(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideDocumentRangeSemanticTokens===null?null:await Promise.resolve(o.provideDocumentRangeSemanticTokens(e,t,i))}}});var BJ,sv,HJ=_(()=>{"use strict";BJ=C(H());Tt();Oe();sv=class extends pe{register(e,t,i){let r=i.reduce((s,a)=>s.concat(a.length==1?[a]:a.split(/\s*/g)),[]),o={id:re(),selector:e,provider:t,triggerCharacters:r};return this.providers.add(o),BJ.Disposable.create(()=>{this.providers.delete(o)})}shouldTrigger(e,t){let i=this.getProvider(e);if(!i)return!1;let{triggerCharacters:r}=i;return r&&r.indexOf(t)!=-1}async provideSignatureHelp(e,t,i,r){let o=this.getProvider(e);if(!o)return null;let s=await Promise.resolve(o.provider.provideSignatureHelp(e,t,i,r));return s&&s.signatures&&s.signatures.length?s:null}}});var qJ,av,YJ=_(()=>{"use strict";qJ=C(H());Tt();Oe();av=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),qJ.Disposable.create(()=>{this.providers.delete(i)})}async provideTypeDefinition(e,t,i){let r=this.getProviders(e);if(!r.length)return null;let o=await Promise.all(r.map(s=>{let{provider:a}=s;return Promise.resolve(a.provideTypeDefinition(e,t,i))}));return this.toLocations(o)}}});var WJ,lv,ZJ=_(()=>{"use strict";Oe();WJ=C(H()),lv=class{constructor(){this.providers=new Map}register(e){let t=re();return this.providers.set(t,e),WJ.Disposable.create(()=>{this.providers.delete(t)})}async provideWorkspaceSymbols(e,t){let i=Array.from(this.providers.entries());if(!i.length)return[];let r=[];return await Promise.all(i.map(o=>{let[s,a]=o;return Promise.resolve(a.provideWorkspaceSymbols(e,t)).then(l=>{l&&r.push(...l.map(u=>Object.assign({source:s},u)))})})),r}async resolveWorkspaceSymbol(e,t){let i=this.providers.get(e.source);if(!!i)return typeof i.resolveWorkspaceSymbol!="function"?Promise.resolve(e):await Promise.resolve(i.resolveWorkspaceSymbol(e,t))}hasProvider(){return this.providers.size>0}}});var Mr,Yk,Wk,uv,JJ=_(()=>{"use strict";Mr=C(H());In();(i=>{i.Type=1,i.Parameter=2;function t(r){return r===1||r===2}i.is=t})(Yk||(Yk={}));(t=>{function n(i){return{value:i}}t.create=n;function e(i){let r=i;return _t(r)&&(r.tooltip===void 0||Ee(r.tooltip)||Mr.MarkupContent.is(r.tooltip))&&(r.location===void 0||Mr.Location.is(r.location))&&(r.command===void 0||Mr.Command.is(r.command))}t.is=e})(Wk||(Wk={}));(t=>{function n(i,r,o){let s={position:i,label:r};return o!==void 0&&(s.kind=o),s}t.create=n;function e(i){let r=i;return _t(r)&&Mr.Position.is(r.position)&&(Ee(r.label)||F0(r.label,Wk.is))&&(r.kind===void 0||Yk.is(r.kind))&&r.textEdits===void 0||F0(r.textEdits,Mr.TextEdit.is)&&(r.tooltip===void 0||Ee(r.tooltip)||Mr.MarkupContent.is(r.tooltip))&&(r.paddingLeft===void 0||Kn(r.paddingLeft))&&(r.paddingRight===void 0||Kn(r.paddingRight))}t.is=e})(uv||(uv={}))});function Swe(n,e){return De(n.position,e.position)!==0?!1:cv(n)===cv(e)}function Twe(n,e){return n.label.length===0||Array.isArray(n.label)&&n.label.every(t=>t.value.length===0)?(Zk.warn("INVALID inlay hint, empty label",n),!1):uv.is(n)?!(e&&ut(n.position,e)!==0):(Zk.warn("INVALID inlay hint",n),!1)}function cv(n){return typeof n.label=="string"?n.label:n.label.map(e=>e.value).join(" ")}var $J,Zk,hv,Jk=_(()=>{"use strict";Oe();$J=C(H());JJ();yt();Tt();Zk=q()("inlayHintManger"),hv=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),$J.Disposable.create(()=>{this.providers.delete(i)})}async provideInlayHints(e,t,i){let r=this.getProviders(e);if(r.length===0)return null;let o=[],s=0;return await Promise.all(r.map(a=>{let{id:l,provider:u}=a;return Promise.resolve(u.provideInlayHints(e,t,i)).then(c=>{if(!i.isCancellationRequested){for(let h of c)!Twe(h,t)||s>0&&o.findIndex(d=>Swe(d,h))!=-1||o.push(ge({providerId:l},h));s+=1}},c=>{Zk.error("Error on provideInlayHints",c)})})),o}async resolveInlayHint(e,t){let i=this.getProviderById(e.providerId);if(!i||typeof i.resolveInlayHint!="function"||e.resolved===!0)return e;let r=await Promise.resolve(i.resolveInlayHint(e,t));return t.isCancellationRequested?e:Object.assign(e,r,{resolved:!0})}}});var OBe,$k,dv,Xk=_(()=>{"use strict";Oe();OBe=q()("model-status"),$k=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],dv=class{constructor(e){this.nvim=e;this.items=new Map;this.shownIds=new Set;this._text="";this.interval=setInterval(()=>{this.setStatusText()},100)}dispose(){this.items.clear(),this.shownIds.clear(),clearInterval(this.interval)}createStatusBarItem(e=0,t=!1){let i=Uo(),r={text:"",priority:e,isProgress:t,show:()=>{this.shownIds.add(i),this.setStatusText()},hide:()=>{this.shownIds.delete(i),this.setStatusText()},dispose:()=>{this.shownIds.delete(i),this.items.delete(i),this.setStatusText()}};return this.items.set(i,r),r}getText(){if(this.shownIds.size==0)return"";let e=new Date,t=Math.floor(e.getMilliseconds()/100),i="",r=[];for(let[o,s]of this.items)this.shownIds.has(o)&&r.push(s);r.sort((o,s)=>o.priority-s.priority);for(let o of r)o.isProgress?i=`${i} ${$k[t]} ${o.text}`:i=`${i} ${o.text}`;return i}setStatusText(){let e=this.getText(),{nvim:t}=this;e!=this._text&&(this._text=e,t.pauseNotification(),this.nvim.setVar("coc_status",e,!0),this.nvim.call("coc#util#do_autocmd",["CocStatusChange"],!0),t.resumeNotification(!1,!0))}}});var XJ,BBe,uf,UJ=_(()=>{"use strict";XJ=require("events");Xk();BBe=q()("model-installBuffer"),uf=class extends XJ.EventEmitter{constructor(e=!1,t=!1,i=void 0){super();this.isUpdate=e;this.isSync=t;this.channel=i;this.statMap=new Map;this.messagesMap=new Map;this.names=[]}setExtensions(e){this.statMap.clear(),this.names=e;for(let t of e)this.statMap.set(t,0)}addMessage(e,t,i=!1){if(i&&this.channel)return;let r=this.messagesMap.get(e)||[];this.messagesMap.set(e,r.concat(t.trim().split(/\r?\n/))),this.channel&&this.channel.appendLine(`[${e}] ${t}`)}startProgress(e){for(let t of e)this.statMap.set(t,2)}finishProgress(e,t=!0){this.channel&&(t?this.channel.appendLine(`[${e}] install succeed!`):this.channel.appendLine(`[${e}] install failed!`)),this.statMap.set(e,t?3:1)}get remains(){let e=0;for(let t of this.names){let i=this.statMap.get(t);[3,1].includes(i)||(e=e+1)}return e}getLines(){let e=[];for(let t of this.names){let i=this.statMap.get(t),r="*";switch(i){case 2:{let s=new Date,a=Math.floor(s.getMilliseconds()/100);r=$k[a];break}case 1:r="\u2717";break;case 3:r="\u2713";break}let o=this.messagesMap.get(t)||[];e.push(`- ${r} ${t} ${o.length?o[o.length-1]:""}`)}return e}getMessages(e){if(e<=1)return[];let t=this.names[e-2];return t?this.messagesMap.get(t):[]}draw(e,t){let{remains:i}=this,o=[i==0?`${this.isUpdate?"Update":"Install"} finished`:`Installing, ${i} remaining...`,"",...this.getLines()];t.setLines(o,{start:0,end:-1,strictIndexing:!1},!0),i==0&&this.interval&&(clearInterval(this.interval),this.interval=null),process.env.VIM_NODE_RPC&&e.command("redraw",!0)}highlight(e){e.call("matchadd",["CocListFgCyan","^\\-\\s\\zs\\*"],!0),e.call("matchadd",["CocListFgGreen","^\\-\\s\\zs\u2713"],!0),e.call("matchadd",["CocListFgRed","^\\-\\s\\zs\u2717"],!0),e.call("matchadd",["CocListFgYellow","^-.\\{3\\}\\zs\\S\\+"],!0)}async show(e){let{isSync:t}=this;if(this.channel)return;e.pauseNotification(),e.command(t?"enew":"vs +enew",!0),e.call("bufnr",["%"],!0),e.command("setl buftype=nofile bufhidden=wipe noswapfile nobuflisted wrap undolevels=-1",!0),t||e.command("nnoremap q :q",!0),this.highlight(e);let i=await e.resumeNotification();this.bufnr=i[0][1];let r=e.createBuffer(this.bufnr);this.interval=setInterval(()=>{this.draw(e,r)},100)}dispose(){this.interval&&clearInterval(this.interval)}}});var KJ=m((Uk,QJ)=>{var gv=require("buffer"),es=gv.Buffer;function GJ(n,e){for(var t in n)e[t]=n[t]}es.from&&es.alloc&&es.allocUnsafe&&es.allocUnsafeSlow?QJ.exports=gv:(GJ(gv,Uk),Uk.Buffer=Wc);function Wc(n,e,t){return es(n,e,t)}GJ(es,Wc);Wc.from=function(n,e,t){if(typeof n=="number")throw new TypeError("Argument must not be a number");return es(n,e,t)};Wc.alloc=function(n,e,t){if(typeof n!="number")throw new TypeError("Argument must be a number");var i=es(n);return e!==void 0?typeof t=="string"?i.fill(e,t):i.fill(e):i.fill(0),i};Wc.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return es(n)};Wc.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return gv.SlowBuffer(n)}});var n$=m((qBe,Gk)=>{"use strict";Gk.exports=Owe;Gk.exports.parse=Hwe;var zJ=require("path").basename,kwe=KJ().Buffer,Ewe=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,Pwe=/%[0-9A-Fa-f]{2}/,_we=/%([0-9A-Fa-f]{2})/g,e$=/[^\x20-\x7e\xa0-\xff]/g,Rwe=/\\([\u0000-\u007f])/g,Lwe=/([\\"])/g,VJ=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,Fwe=/^[\x20-\x7e\x80-\xff]+$/,Iwe=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,jwe=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,Awe=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function Owe(n,e){var t=e||{},i=t.type||"attachment",r=Mwe(n,t.fallback);return Nwe(new i$(i,r))}function Mwe(n,e){if(n!==void 0){var t={};if(typeof n!="string")throw new TypeError("filename must be a string");if(e===void 0&&(e=!0),typeof e!="string"&&typeof e!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof e=="string"&&e$.test(e))throw new TypeError("fallback must be ISO-8859-1 string");var i=zJ(n),r=Fwe.test(i),o=typeof e!="string"?e&&t$(i):zJ(e),s=typeof o=="string"&&o!==i;return(s||!r||Pwe.test(i))&&(t["filename*"]=i),(r||s)&&(t.filename=s?o:i),t}}function Nwe(n){var e=n.parameters,t=n.type;if(!t||typeof t!="string"||!Iwe.test(t))throw new TypeError("invalid type");var i=String(t).toLowerCase();if(e&&typeof e=="object")for(var r,o=Object.keys(e).sort(),s=0;s{var cf;r$.exports=function(){if(!cf){try{cf=Ot()("follow-redirects")}catch{}typeof cf!="function"&&(cf=function(){})}cf.apply(null,arguments)}});var eE=m((WBe,Vk)=>{var Rl=require("url"),Qk=Rl.URL,Jwe=require("http"),$we=require("https"),l$=require("stream").Writable,Xwe=require("assert"),u$=o$(),Ll=["abort","aborted","connect","error","socket","timeout"],zk=Object.create(null);Ll.forEach(function(n){zk[n]=function(e,t,i){this._redirectable.emit(n,e,t,i)}});var s$=fv("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Uwe=fv("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Gwe=fv("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Qwe=fv("ERR_STREAM_WRITE_AFTER_END","write after end");function On(n,e){l$.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(i){t._processResponse(i)},this._performRequest()}On.prototype=Object.create(l$.prototype);On.prototype.abort=function(){h$(this._currentRequest),this.emit("abort")};On.prototype.write=function(n,e,t){if(this._ending)throw new Qwe;if(!(typeof n=="string"||typeof n=="object"&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(typeof e=="function"&&(t=e,e=null),n.length===0){t&&t();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:e}),this._currentRequest.write(n,e,t)):(this.emit("error",new Gwe),this.abort())};On.prototype.end=function(n,e,t){if(typeof n=="function"?(t=n,n=e=null):typeof e=="function"&&(t=e,e=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var i=this,r=this._currentRequest;this.write(n,e,function(){i._ended=!0,r.end(null,null,t)}),this._ending=!0}};On.prototype.setHeader=function(n,e){this._options.headers[n]=e,this._currentRequest.setHeader(n,e)};On.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};On.prototype.setTimeout=function(n,e){var t=this;function i(s){s.setTimeout(n),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function r(s){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),o()},n),i(s)}function o(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",o),t.removeListener("error",o),t.removeListener("response",o),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",r)}return e&&this.on("timeout",e),this.socket?r(this.socket):this._currentRequest.once("socket",r),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){On.prototype[n]=function(e,t){return this._currentRequest[n](e,t)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(On.prototype,n,{get:function(){return this._currentRequest[n]}})});On.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var e=n.path.indexOf("?");e<0?n.pathname=n.path:(n.pathname=n.path.substring(0,e),n.search=n.path.substring(e))}};On.prototype._performRequest=function(){var n=this._options.protocol,e=this._options.nativeProtocols[n];if(!e){this.emit("error",new TypeError("Unsupported protocol "+n));return}if(this._options.agents){var t=n.substr(0,n.length-1);this._options.agent=this._options.agents[t]}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=Rl.format(this._options),i._redirectable=this;for(var r=0;r=300&&e<400){if(h$(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Uwe);return}((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Kk(/^content-/i,this._options.headers));var i=Kk(/^host$/i,this._options.headers),r=Rl.parse(this._currentUrl),o=i||r.host,s=/^\w+:/.test(t)?this._currentUrl:Rl.format(Object.assign(r,{host:o})),a;try{a=Rl.resolve(s,t)}catch(c){this.emit("error",new s$(c));return}u$("redirecting to",a),this._isRedirect=!0;var l=Rl.parse(a);if(Object.assign(this._options,l),(l.protocol!==r.protocol||!zwe(l.host,o))&&Kk(/^(?:authorization|cookie)$/i,this._options.headers),typeof this._options.beforeRedirect=="function"){var u={headers:n.headers};try{this._options.beforeRedirect.call(null,this._options,u)}catch(c){this.emit("error",c);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(c){this.emit("error",new s$(c))}}else n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[]};function c$(n){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(n).forEach(function(i){var r=i+":",o=t[r]=n[i],s=e[i]=Object.create(o);function a(u,c,h){if(typeof u=="string"){var d=u;try{u=a$(new Qk(d))}catch{u=Rl.parse(d)}}else Qk&&u instanceof Qk?u=a$(u):(h=c,c=u,u={protocol:r});return typeof c=="function"&&(h=c,c=null),c=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},u,c),c.nativeProtocols=t,Xwe.equal(c.protocol,r,"protocol mismatch"),u$("options",c),new On(c,h)}function l(u,c,h){var d=s.request(u,c,h);return d.end(),d}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:l,configurable:!0,enumerable:!0,writable:!0}})}),e}function Kwe(){}function a$(n){var e={protocol:n.protocol,hostname:n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,hash:n.hash,search:n.search,pathname:n.pathname,path:n.pathname+n.search,href:n.href};return n.port!==""&&(e.port=Number(n.port)),e}function Kk(n,e){var t;for(var i in e)n.test(i)&&(t=e[i],delete e[i]);return t===null||typeof t>"u"?void 0:String(t).trim()}function fv(n,e){function t(i){Error.captureStackTrace(this,this.constructor),i?(this.message=e+": "+i.message,this.cause=i):this.message=e}return t.prototype=new Error,t.prototype.constructor=t,t.prototype.name="Error ["+n+"]",t.prototype.code=n,t}function h$(n){for(var e=0;e0&&n[t]==="."&&n.endsWith(e)}Vk.exports=c$({http:Jwe,https:$we});Vk.exports.wrap=c$});var Zc=m((ZBe,g$)=>{"use strict";var d$=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);g$.exports=n=>n?Object.keys(n).map(e=>[d$.has(e)?d$.get(e):e,n[e]]).reduce((e,t)=>(e[t[0]]=t[1],e),Object.create(null)):{}});var Jc=m((JBe,x$)=>{"use strict";var Vwe=require("events"),f$=require("stream"),hf=Ug(),p$=require("string_decoder").StringDecoder,ts=Symbol("EOF"),df=Symbol("maybeEmitEnd"),da=Symbol("emittedEnd"),pv=Symbol("emittingEnd"),mv=Symbol("closed"),m$=Symbol("read"),tE=Symbol("flush"),b$=Symbol("flushChunk"),bn=Symbol("encoding"),is=Symbol("decoder"),bv=Symbol("flowing"),gf=Symbol("paused"),ff=Symbol("resume"),Vi=Symbol("bufferLength"),y$=Symbol("bufferPush"),iE=Symbol("bufferShift"),Fi=Symbol("objectMode"),Ii=Symbol("destroyed"),w$=global._MP_NO_ITERATOR_SYMBOLS_!=="1",eDe=w$&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),tDe=w$&&Symbol.iterator||Symbol("iterator not implemented"),v$=n=>n==="end"||n==="finish"||n==="prefinish",iDe=n=>n instanceof ArrayBuffer||typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,nDe=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n);x$.exports=class D$ extends f${constructor(e){super();this[bv]=!1,this[gf]=!1,this.pipes=new hf,this.buffer=new hf,this[Fi]=e&&e.objectMode||!1,this[Fi]?this[bn]=null:this[bn]=e&&e.encoding||null,this[bn]==="buffer"&&(this[bn]=null),this[is]=this[bn]?new p$(this[bn]):null,this[ts]=!1,this[da]=!1,this[pv]=!1,this[mv]=!1,this.writable=!0,this.readable=!0,this[Vi]=0,this[Ii]=!1}get bufferLength(){return this[Vi]}get encoding(){return this[bn]}set encoding(e){if(this[Fi])throw new Error("cannot set encoding in objectMode");if(this[bn]&&e!==this[bn]&&(this[is]&&this[is].lastNeed||this[Vi]))throw new Error("cannot change encoding");this[bn]!==e&&(this[is]=e?new p$(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[is].write(t)))),this[bn]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Fi]}set objectMode(e){this[Fi]=this[Fi]||!!e}write(e,t,i){if(this[ts])throw new Error("write after end");return this[Ii]?(this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0):(typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8"),!this[Fi]&&!Buffer.isBuffer(e)&&(nDe(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):iDe(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[Vi]!==0&&this.emit("readable"),i&&i(),this.flowing):(typeof e=="string"&&!this[Fi]&&!(t===this[bn]&&!this[is].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[bn]&&(e=this[is].write(e)),this.flowing?(this[Vi]!==0&&this[tE](!0),this.emit("data",e)):this[y$](e),this[Vi]!==0&&this.emit("readable"),i&&i(),this.flowing))}read(e){if(this[Ii])return null;try{return this[Vi]===0||e===0||e>this[Vi]?null:(this[Fi]&&(e=null),this.buffer.length>1&&!this[Fi]&&(this.encoding?this.buffer=new hf([Array.from(this.buffer).join("")]):this.buffer=new hf([Buffer.concat(Array.from(this.buffer),this[Vi])])),this[m$](e||null,this.buffer.head.value))}finally{this[df]()}}[m$](e,t){return e===t.length||e===null?this[iE]():(this.buffer.head.value=t.slice(e),t=t.slice(0,e),this[Vi]-=e),this.emit("data",t),!this.buffer.length&&!this[ts]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=null),typeof t=="function"&&(i=t,t="utf8"),e&&this.write(e,t),i&&this.once("end",i),this[ts]=!0,this.writable=!1,(this.flowing||!this[gf])&&this[df](),this}[ff](){this[Ii]||(this[gf]=!1,this[bv]=!0,this.emit("resume"),this.buffer.length?this[tE]():this[ts]?this[df]():this.emit("drain"))}resume(){return this[ff]()}pause(){this[bv]=!1,this[gf]=!0}get destroyed(){return this[Ii]}get flowing(){return this[bv]}get paused(){return this[gf]}[y$](e){return this[Fi]?this[Vi]+=1:this[Vi]+=e.length,this.buffer.push(e)}[iE](){return this.buffer.length&&(this[Fi]?this[Vi]-=1:this[Vi]-=this.buffer.head.value.length),this.buffer.shift()}[tE](e){do;while(this[b$](this[iE]()));!e&&!this.buffer.length&&!this[ts]&&this.emit("drain")}[b$](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[Ii])return;let i=this[da];t=t||{},e===process.stdout||e===process.stderr?t.end=!1:t.end=t.end!==!1;let r={dest:e,opts:t,ondrain:o=>this[ff]()};return this.pipes.push(r),e.on("drain",r.ondrain),this[ff](),i&&r.opts.end&&r.dest.end(),e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{e==="data"&&!this.pipes.length&&!this.flowing?this[ff]():v$(e)&&this[da]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[da]}[df](){!this[pv]&&!this[da]&&!this[Ii]&&this.buffer.length===0&&this[ts]&&(this[pv]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[mv]&&this.emit("close"),this[pv]=!1)}emit(e,t){if(e!=="error"&&e!=="close"&&e!==Ii&&this[Ii])return;if(e==="data"){if(!t)return;this.pipes.length&&this.pipes.forEach(r=>r.dest.write(t)===!1&&this.pause())}else if(e==="end"){if(this[da]===!0)return;this[da]=!0,this.readable=!1,this[is]&&(t=this[is].end(),t&&(this.pipes.forEach(r=>r.dest.write(t)),super.emit("data",t))),this.pipes.forEach(r=>{r.dest.removeListener("drain",r.ondrain),r.opts.end&&r.dest.end()})}else if(e==="close"&&(this[mv]=!0,!this[da]&&!this[Ii]))return;let i=new Array(arguments.length);if(i[0]=e,i[1]=t,arguments.length>2)for(let r=2;r{e.push(i),this[Fi]||(e.dataLength+=i.length)}),t.then(()=>e)}concat(){return this[Fi]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Fi]?Promise.reject(new Error("cannot concat in objectMode")):this[bn]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(Ii,()=>t(new Error("stream destroyed"))),this.on("end",()=>e()),this.on("error",i=>t(i))})}[eDe](){return{next:()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[ts])return Promise.resolve({done:!0});let i=null,r=null,o=u=>{this.removeListener("data",s),this.removeListener("end",a),r(u)},s=u=>{this.removeListener("error",o),this.removeListener("end",a),this.pause(),i({value:u,done:!!this[ts]})},a=()=>{this.removeListener("error",o),this.removeListener("data",s),i({done:!0})},l=()=>o(new Error("stream destroyed"));return new Promise((u,c)=>{r=c,i=u,this.once(Ii,l),this.once("error",o),this.once("end",a),this.once("data",s)})}}}[tDe](){return{next:()=>{let t=this.read();return{value:t,done:t===null}}}}destroy(e){return this[Ii]?(e?this.emit("error",e):this.emit(Ii),this):(this[Ii]=!0,this.buffer=new hf,this[Vi]=0,typeof this.close=="function"&&!this[mv]&&this.close(),e?this.emit("error",e):this.emit(Ii),this)}static isStream(e){return!!e&&(e instanceof D$||e instanceof f$||e instanceof Vwe&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var S$=m(($Be,C$)=>{var rDe=require("zlib").constants||{ZLIB_VERNUM:4736};C$.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},rDe))});var hE=m(Mn=>{"use strict";var aE=require("assert"),ga=require("buffer").Buffer,E$=require("zlib"),Fl=Mn.constants=S$(),oDe=Jc(),T$=ga.concat,Il=Symbol("_superWrite"),mf=class extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},sDe=Symbol("opts"),pf=Symbol("flushFlag"),k$=Symbol("finishFlushFlag"),lE=Symbol("fullFlushFlag"),ft=Symbol("handle"),yv=Symbol("onError"),$c=Symbol("sawError"),nE=Symbol("level"),rE=Symbol("strategy"),oE=Symbol("ended"),XBe=Symbol("_defaultFullFlush"),uE=class extends oDe{constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[$c]=!1,this[oE]=!1,this[sDe]=e,this[pf]=e.flush,this[k$]=e.finishFlush;try{this[ft]=new E$[t](e)}catch(i){throw new mf(i)}this[yv]=i=>{this[$c]||(this[$c]=!0,this.close(),this.emit("error",i))},this[ft].on("error",i=>this[yv](new mf(i))),this.once("end",()=>this.close)}close(){this[ft]&&(this[ft].close(),this[ft]=null,this.emit("close"))}reset(){if(!this[$c])return aE(this[ft],"zlib binding closed"),this[ft].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[lE]),this.write(Object.assign(ga.alloc(0),{[pf]:e})))}end(e,t,i){return e&&this.write(e,t),this.flush(this[k$]),this[oE]=!0,super.end(null,null,i)}get ended(){return this[oE]}write(e,t,i){if(typeof t=="function"&&(i=t,t="utf8"),typeof e=="string"&&(e=ga.from(e,t)),this[$c])return;aE(this[ft],"zlib binding closed");let r=this[ft]._handle,o=r.close;r.close=()=>{};let s=this[ft].close;this[ft].close=()=>{},ga.concat=u=>u;let a;try{let u=typeof e[pf]=="number"?e[pf]:this[pf];a=this[ft]._processChunk(e,u),ga.concat=T$}catch(u){ga.concat=T$,this[yv](new mf(u))}finally{this[ft]&&(this[ft]._handle=r,r.close=o,this[ft].close=s,this[ft].removeAllListeners("error"))}this[ft]&&this[ft].on("error",u=>this[yv](new mf(u)));let l;if(a)if(Array.isArray(a)&&a.length>0){l=this[Il](ga.from(a[0]));for(let u=1;u{this.flush(r),o()};try{this[ft].params(e,t)}finally{this[ft].flush=i}this[ft]&&(this[nE]=e,this[rE]=t)}}}},P$=class extends fa{constructor(e){super(e,"Deflate")}},_$=class extends fa{constructor(e){super(e,"Inflate")}},sE=Symbol("_portable"),R$=class extends fa{constructor(e){super(e,"Gzip");this[sE]=e&&!!e.portable}[Il](e){return this[sE]?(this[sE]=!1,e[9]=255,super[Il](e)):super[Il](e)}},L$=class extends fa{constructor(e){super(e,"Gunzip")}},F$=class extends fa{constructor(e){super(e,"DeflateRaw")}},I$=class extends fa{constructor(e){super(e,"InflateRaw")}},j$=class extends fa{constructor(e){super(e,"Unzip")}},cE=class extends uE{constructor(e,t){e=e||{},e.flush=e.flush||Fl.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Fl.BROTLI_OPERATION_FINISH;super(e,t);this[lE]=Fl.BROTLI_OPERATION_FLUSH}},A$=class extends cE{constructor(e){super(e,"BrotliCompress")}},O$=class extends cE{constructor(e){super(e,"BrotliDecompress")}};Mn.Deflate=P$;Mn.Inflate=_$;Mn.Gzip=R$;Mn.Gunzip=L$;Mn.DeflateRaw=F$;Mn.InflateRaw=I$;Mn.Unzip=j$;typeof E$.BrotliCompress=="function"?(Mn.BrotliCompress=A$,Mn.BrotliDecompress=O$):Mn.BrotliCompress=Mn.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var Xc=m((GBe,M$)=>{var aDe=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;M$.exports=aDe!=="win32"?n=>n:n=>n&&n.replace(/\\/g,"/")});var vv=m((KBe,N$)=>{"use strict";var lDe=Jc(),dE=Xc(),gE=Symbol("slurp");N$.exports=class extends lDe{constructor(e,t,i){super();switch(this.pause(),this.extended=t,this.globalExtended=i,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=dE(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=dE(e.linkpath),this.uname=e.uname,this.gname=e.gname,t&&this[gE](t),i&&this[gE](i,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,r=this.blockRemain;return this.remain=Math.max(0,i-t),this.blockRemain=Math.max(0,r-t),this.ignore?!0:i>=t?super.write(e):super.write(e.slice(0,i))}[gE](e,t){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(t&&i==="path")&&(this[i]=i==="path"||i==="linkpath"?dE(e[i]):e[i])}}});var fE=m(wv=>{"use strict";wv.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);wv.code=new Map(Array.from(wv.name).map(n=>[n[1],n[0]]))});var Y$=m((VBe,q$)=>{"use strict";var uDe=(n,e)=>{if(Number.isSafeInteger(n))n<0?hDe(n,e):cDe(n,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},cDe=(n,e)=>{e[0]=128;for(var t=e.length;t>1;t--)e[t-1]=n&255,n=Math.floor(n/256)},hDe=(n,e)=>{e[0]=255;var t=!1;n=n*-1;for(var i=e.length;i>1;i--){var r=n&255;n=Math.floor(n/256),t?e[i-1]=B$(r):r===0?e[i-1]=0:(t=!0,e[i-1]=H$(r))}},dDe=n=>{let e=n[0],t=e===128?fDe(n.slice(1,n.length)):e===255?gDe(n):null;if(t===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(t))throw Error("parsed number outside of javascript safe integer range");return t},gDe=n=>{for(var e=n.length,t=0,i=!1,r=e-1;r>-1;r--){var o=n[r],s;i?s=B$(o):o===0?s=o:(i=!0,s=H$(o)),s!==0&&(t-=s*Math.pow(256,e-r-1))}return t},fDe=n=>{for(var e=n.length,t=0,i=e-1;i>-1;i--){var r=n[i];r!==0&&(t+=r*Math.pow(256,e-i-1))}return t},B$=n=>(255^n)&255,H$=n=>(255^n)+1&255;q$.exports={encode:uDe,parse:dDe}});var Gc=m((eHe,J$)=>{"use strict";var pE=fE(),Uc=require("path").posix,W$=Y$(),mE=Symbol("slurp"),Nn=Symbol("type"),Z$=class{constructor(e,t,i,r){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Nn]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,t||0,i,r):e&&this.set(e)}decode(e,t,i,r){if(t||(t=0),!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");if(this.path=jl(e,t,100),this.mode=pa(e,t+100,8),this.uid=pa(e,t+108,8),this.gid=pa(e,t+116,8),this.size=pa(e,t+124,12),this.mtime=bE(e,t+136,12),this.cksum=pa(e,t+148,12),this[mE](i),this[mE](r,!0),this[Nn]=jl(e,t+156,1),this[Nn]===""&&(this[Nn]="0"),this[Nn]==="0"&&this.path.substr(-1)==="/"&&(this[Nn]="5"),this[Nn]==="5"&&(this.size=0),this.linkpath=jl(e,t+157,100),e.slice(t+257,t+265).toString()==="ustar\x0000")if(this.uname=jl(e,t+265,32),this.gname=jl(e,t+297,32),this.devmaj=pa(e,t+329,8),this.devmin=pa(e,t+337,8),e[t+475]!==0){let s=jl(e,t+345,155);this.path=s+"/"+this.path}else{let s=jl(e,t+345,130);s&&(this.path=s+"/"+this.path),this.atime=bE(e,t+476,12),this.ctime=bE(e,t+488,12)}let o=8*32;for(let s=t;s=t+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,r=pDe(this.path||"",i),o=r[0],s=r[1];this.needPax=r[2],this.needPax=Al(e,t,100,o)||this.needPax,this.needPax=ma(e,t+100,8,this.mode)||this.needPax,this.needPax=ma(e,t+108,8,this.uid)||this.needPax,this.needPax=ma(e,t+116,8,this.gid)||this.needPax,this.needPax=ma(e,t+124,12,this.size)||this.needPax,this.needPax=yE(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this[Nn].charCodeAt(0),this.needPax=Al(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=Al(e,t+265,32,this.uname)||this.needPax,this.needPax=Al(e,t+297,32,this.gname)||this.needPax,this.needPax=ma(e,t+329,8,this.devmaj)||this.needPax,this.needPax=ma(e,t+337,8,this.devmin)||this.needPax,this.needPax=Al(e,t+345,i,s)||this.needPax,e[t+475]!==0?this.needPax=Al(e,t+345,155,s)||this.needPax:(this.needPax=Al(e,t+345,130,s)||this.needPax,this.needPax=yE(e,t+476,12,this.atime)||this.needPax,this.needPax=yE(e,t+488,12,this.ctime)||this.needPax);let a=8*32;for(let l=t;l{let i=n,r="",o,s=Uc.parse(n).root||".";if(Buffer.byteLength(i)<100)o=[i,r,!1];else{r=Uc.dirname(i),i=Uc.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(r)<=e?o=[i,r,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(r)<=e?o=[i.substr(0,100-1),r,!0]:(i=Uc.join(Uc.basename(r),i),r=Uc.dirname(r));while(r!==s&&!o);o||(o=[n.substr(0,100-1),"",!0])}return o},jl=(n,e,t)=>n.slice(e,e+t).toString("utf8").replace(/\0.*/,""),bE=(n,e,t)=>mDe(pa(n,e,t)),mDe=n=>n===null?null:new Date(n*1e3),pa=(n,e,t)=>n[e]&128?W$.parse(n.slice(e,e+t)):yDe(n,e,t),bDe=n=>isNaN(n)?null:n,yDe=(n,e,t)=>bDe(parseInt(n.slice(e,e+t).toString("utf8").replace(/\0.*$/,"").trim(),8)),vDe={12:8589934591,8:2097151},ma=(n,e,t,i)=>i===null?!1:i>vDe[t]||i<0?(W$.encode(i,n.slice(e,e+t)),!0):(wDe(n,e,t,i),!1),wDe=(n,e,t,i)=>n.write(DDe(i,t),e,t,"ascii"),DDe=(n,e)=>xDe(Math.floor(n).toString(8),e),xDe=(n,e)=>(n.length===e-1?n:new Array(e-n.length-1).join("0")+n+" ")+"\0",yE=(n,e,t,i)=>i===null?!1:ma(n,e,t,i.getTime()/1e3),CDe=new Array(156).join("\0"),Al=(n,e,t,i)=>i===null?!1:(n.write(i+CDe,e,t,"utf8"),i.length!==Buffer.byteLength(i)||i.length>t);J$.exports=Z$});var xv=m((tHe,$$)=>{"use strict";var SDe=Gc(),TDe=require("path"),Dv=class{constructor(e,t){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=t||!1}encode(){let e=this.encodeBody();if(e==="")return null;let t=Buffer.byteLength(e),i=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(i);for(let o=0;o<512;o++)r[o]=0;new SDe({path:("PaxHeader/"+TDe.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(r),r.write(e,512,t,"utf8");for(let o=t+512;o=Math.pow(10,o)&&(o+=1),o+r+i}};Dv.parse=(n,e,t)=>new Dv(kDe(EDe(n),e),t);var kDe=(n,e)=>e?Object.keys(n).reduce((t,i)=>(t[i]=n[i],t),e):n,EDe=n=>n.replace(/\n$/,"").split(`
-`).reduce(PDe,Object.create(null)),PDe=(n,e)=>{let t=parseInt(e,10);if(t!==Buffer.byteLength(e)+1)return n;e=e.substr((t+" ").length);let i=e.split("="),r=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r)return n;let o=i.join("=");return n[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(o*1e3):/^[0-9]+$/.test(o)?+o:o,n};$$.exports=Dv});var Qc=m((iHe,X$)=>{X$.exports=n=>{let e=n.length-1,t=-1;for(;e>-1&&n.charAt(e)==="/";)t=e,e--;return t===-1?n:n.slice(0,t)}});var Cv=m((nHe,U$)=>{"use strict";U$.exports=n=>class extends n{warn(e,t,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=t instanceof Error&&t.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(t instanceof Error&&(i=Object.assign(t,i),t=t.message),this.emit("warn",i.tarCode,t,i)):t instanceof Error?this.emit("error",Object.assign(t,i)):this.emit("error",Object.assign(new Error(`${e}: ${t}`),i))}}});var wE=m((rHe,G$)=>{"use strict";var Sv=["|","<",">","?",":"],vE=Sv.map(n=>String.fromCharCode(61440+n.charCodeAt(0))),_De=new Map(Sv.map((n,e)=>[n,vE[e]])),RDe=new Map(vE.map((n,e)=>[n,Sv[e]]));G$.exports={encode:n=>Sv.reduce((e,t)=>e.split(t).join(_De.get(t)),n),decode:n=>vE.reduce((e,t)=>e.split(t).join(RDe.get(t)),n)}});var DE=m((oHe,K$)=>{var{isAbsolute:LDe,parse:Q$}=require("path").win32;K$.exports=n=>{let e="",t=Q$(n);for(;LDe(n)||t.root;){let i=n.charAt(0)==="/"&&n.slice(0,4)!=="//?/"?"/":t.root;n=n.substr(i.length),e+=i,t=Q$(n)}return[e,n]}});var V$=m((sHe,z$)=>{"use strict";z$.exports=(n,e,t)=>(n&=4095,t&&(n=(n|384)&-19),e&&(n&256&&(n|=64),n&32&&(n|=8),n&4&&(n|=1)),n)});var RE=m((uHe,fX)=>{"use strict";var sX=Jc(),aX=xv(),lX=Gc(),ao=require("fs"),eX=require("path"),so=Xc(),FDe=Qc(),uX=(n,e)=>e?(n=so(n).replace(/^\.(\/|$)/,""),FDe(e)+"/"+n):so(n),IDe=16*1024*1024,tX=Symbol("process"),iX=Symbol("file"),nX=Symbol("directory"),CE=Symbol("symlink"),rX=Symbol("hardlink"),bf=Symbol("header"),Tv=Symbol("read"),SE=Symbol("lstat"),kv=Symbol("onlstat"),TE=Symbol("onread"),kE=Symbol("onreadlink"),EE=Symbol("openfile"),PE=Symbol("onopenfile"),ba=Symbol("close"),Ev=Symbol("mode"),_E=Symbol("awaitDrain"),xE=Symbol("ondrain"),lo=Symbol("prefix"),oX=Symbol("hadError"),cX=Cv(),jDe=wE(),hX=DE(),dX=V$(),Pv=cX(class extends sX{constructor(e,t){t=t||{};super(t);if(typeof e!="string")throw new TypeError("path is required");this.path=so(e),this.portable=!!t.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=t.maxReadSize||IDe,this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.preservePaths=!!t.preservePaths,this.cwd=so(t.cwd||process.cwd()),this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,this.prefix=t.prefix?so(t.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof t.onwarn=="function"&&this.on("warn",t.onwarn);let i=!1;if(!this.preservePaths){let[r,o]=hX(this.path);r&&(this.path=o,i=r)}this.win32=!!t.win32||process.platform==="win32",this.win32&&(this.path=jDe.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=so(t.absolute||eX.resolve(this.cwd,e)),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[kv](this.statCache.get(this.absolute)):this[SE]()}emit(e,...t){return e==="error"&&(this[oX]=!0),super.emit(e,...t)}[SE](){ao.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[kv](t)})}[kv](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=ODe(e),this.emit("stat",e),this[tX]()}[tX](){switch(this.type){case"File":return this[iX]();case"Directory":return this[nX]();case"SymbolicLink":return this[CE]();default:return this.end()}}[Ev](e){return dX(e,this.type==="Directory",this.portable)}[lo](e){return uX(e,this.prefix)}[bf](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new lX({path:this[lo](this.path),linkpath:this.type==="Link"?this[lo](this.linkpath):this.linkpath,mode:this[Ev](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new aX({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[lo](this.path),linkpath:this.type==="Link"?this[lo](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[nX](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[bf](),this.end()}[CE](){ao.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[kE](t)})}[kE](e){this.linkpath=so(e),this[bf](),this.end()}[rX](e){this.type="Link",this.linkpath=so(eX.relative(this.cwd,e)),this.stat.size=0,this[bf](),this.end()}[iX](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[rX](t)}this.linkCache.set(e,this.absolute)}if(this[bf](),this.stat.size===0)return this.end();this[EE]()}[EE](){ao.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[PE](t)})}[PE](e){if(this.fd=e,this[oX])return this[ba]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Tv]()}[Tv](){let{fd:e,buf:t,offset:i,length:r,pos:o}=this;ao.read(e,t,i,r,o,(s,a)=>{if(s)return this[ba](()=>this.emit("error",s));this[TE](a)})}[ba](e){ao.close(this.fd,e)}[TE](e){if(e<=0&&this.remain>0){let r=new Error("encountered unexpected EOF");return r.path=this.absolute,r.syscall="read",r.code="EOF",this[ba](()=>this.emit("error",r))}if(e>this.remain){let r=new Error("did not encounter expected EOF");return r.path=this.absolute,r.syscall="read",r.code="EOF",this[ba](()=>this.emit("error",r))}if(e===this.remain)for(let r=e;rthis[xE]())}[_E](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Tv]()}}),gX=class extends Pv{[SE](){this[kv](ao.lstatSync(this.absolute))}[CE](){this[kE](ao.readlinkSync(this.absolute))}[EE](){this[PE](ao.openSync(this.absolute,"r"))}[Tv](){let e=!0;try{let{fd:t,buf:i,offset:r,length:o,pos:s}=this,a=ao.readSync(t,i,r,o,s);this[TE](a),e=!1}finally{if(e)try{this[ba](()=>{})}catch{}}}[_E](e){e()}[ba](e){ao.closeSync(this.fd),e()}},ADe=cX(class extends sX{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths,this.portable=!!t.portable,this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=t.prefix||null,this.path=so(e.path),this.mode=this[Ev](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:t.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=so(e.linkpath),typeof t.onwarn=="function"&&this.on("warn",t.onwarn);let i=!1;if(!this.preservePaths){let[r,o]=hX(this.path);r&&(this.path=o,i=r)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new lX({path:this[lo](this.path),linkpath:this.type==="Link"?this[lo](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new aX({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[lo](this.path),linkpath:this.type==="Link"?this[lo](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[lo](e){return uX(e,this.prefix)}[Ev](e){return dX(e,this.type==="Directory",this.portable)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=t,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});Pv.Sync=gX;Pv.Tar=ADe;var ODe=n=>n.isFile()?"File":n.isDirectory()?"Directory":n.isSymbolicLink()?"SymbolicLink":"Unsupported";fX.exports=Pv});var Ov=m((hHe,xX)=>{"use strict";var AE=class{constructor(e,t){this.path=e||"./",this.absolute=t,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},MDe=Jc(),NDe=hE(),BDe=vv(),BE=RE(),HDe=BE.Sync,qDe=BE.Tar,YDe=Ug(),pX=Buffer.alloc(1024),Lv=Symbol("onStat"),_v=Symbol("ended"),uo=Symbol("queue"),Kc=Symbol("current"),Ol=Symbol("process"),Rv=Symbol("processing"),mX=Symbol("processJob"),co=Symbol("jobs"),LE=Symbol("jobDone"),Fv=Symbol("addFSEntry"),bX=Symbol("addTarEntry"),OE=Symbol("stat"),ME=Symbol("readdir"),Iv=Symbol("onreaddir"),jv=Symbol("pipe"),yX=Symbol("entry"),FE=Symbol("entryOpt"),NE=Symbol("writeEntryClass"),wX=Symbol("write"),IE=Symbol("ondrain"),Av=require("fs"),vX=require("path"),WDe=Cv(),jE=Xc(),HE=WDe(class extends MDe{constructor(e){super(e);e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=jE(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[NE]=BE,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new NDe.Gzip(e.gzip),this.zip.on("data",t=>super.write(t)),this.zip.on("end",t=>super.end()),this.zip.on("drain",t=>this[IE]()),this.on("resume",t=>this.zip.resume())):this.on("drain",this[IE]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:t=>!0,this[uo]=new YDe,this[co]=0,this.jobs=+e.jobs||4,this[Rv]=!1,this[_v]=!1}[wX](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[_v]=!0,this[Ol](),this}write(e){if(this[_v])throw new Error("write after end");return e instanceof BDe?this[bX](e):this[Fv](e),this.flowing}[bX](e){let t=jE(vX.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let i=new AE(e.path,t,!1);i.entry=new qDe(e,this[FE](i)),i.entry.on("end",r=>this[LE](i)),this[co]+=1,this[uo].push(i)}this[Ol]()}[Fv](e){let t=jE(vX.resolve(this.cwd,e));this[uo].push(new AE(e,t)),this[Ol]()}[OE](e){e.pending=!0,this[co]+=1;let t=this.follow?"stat":"lstat";Av[t](e.absolute,(i,r)=>{e.pending=!1,this[co]-=1,i?this.emit("error",i):this[Lv](e,r)})}[Lv](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[Ol]()}[ME](e){e.pending=!0,this[co]+=1,Av.readdir(e.absolute,(t,i)=>{if(e.pending=!1,this[co]-=1,t)return this.emit("error",t);this[Iv](e,i)})}[Iv](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[Ol]()}[Ol](){if(!this[Rv]){this[Rv]=!0;for(let e=this[uo].head;e!==null&&this[co]this.warn(t,i,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[yX](e){this[co]+=1;try{return new this[NE](e.path,this[FE](e)).on("end",()=>this[LE](e)).on("error",t=>this.emit("error",t))}catch(t){this.emit("error",t)}}[IE](){this[Kc]&&this[Kc].entry&&this[Kc].entry.resume()}[jv](e){e.piped=!0,e.readdir&&e.readdir.forEach(r=>{let o=e.path,s=o==="./"?"":o.replace(/\/*$/,"/");this[Fv](s+r)});let t=e.entry,i=this.zip;i?t.on("data",r=>{i.write(r)||t.pause()}):t.on("data",r=>{super.write(r)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),DX=class extends HE{constructor(e){super(e);this[NE]=HDe}pause(){}resume(){}[OE](e){let t=this.follow?"statSync":"lstatSync";this[Lv](e,Av[t](e.absolute))}[ME](e,t){this[Iv](e,Av.readdirSync(e.absolute))}[jv](e){let t=e.entry,i=this.zip;e.readdir&&e.readdir.forEach(r=>{let o=e.path,s=o==="./"?"":o.replace(/\/*$/,"/");this[Fv](s+r)}),i?t.on("data",r=>{i.write(r)}):t.on("data",r=>{super[wX](r)})}};HE.Sync=DX;xX.exports=HE});var oh=m(vf=>{"use strict";var ZDe=Jc(),JDe=require("events").EventEmitter,yn=require("fs"),WE=yn.writev;if(!WE){let n=process.binding("fs"),e=n.FSReqWrap||n.FSReqCallback;WE=(t,i,r,o)=>{let s=(l,u)=>o(l,u,i),a=new e;a.oncomplete=s,n.writeBuffers(t,i,r,a)}}var nh=Symbol("_autoClose"),Nr=Symbol("_close"),yf=Symbol("_ended"),it=Symbol("_fd"),CX=Symbol("_finished"),va=Symbol("_flags"),qE=Symbol("_flush"),ZE=Symbol("_handleChunk"),JE=Symbol("_makeBuf"),qv=Symbol("_mode"),Mv=Symbol("_needDrain"),th=Symbol("_onerror"),rh=Symbol("_onopen"),YE=Symbol("_onread"),Vc=Symbol("_onwrite"),wa=Symbol("_open"),ns=Symbol("_path"),Ml=Symbol("_pos"),ho=Symbol("_queue"),eh=Symbol("_read"),SX=Symbol("_readSize"),ya=Symbol("_reading"),Nv=Symbol("_remain"),TX=Symbol("_size"),Bv=Symbol("_write"),zc=Symbol("_writing"),Hv=Symbol("_defaultFlag"),ih=Symbol("_errored"),$E=class extends ZDe{constructor(e,t){t=t||{};super(t);if(this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[ih]=!1,this[it]=typeof t.fd=="number"?t.fd:null,this[ns]=e,this[SX]=t.readSize||16*1024*1024,this[ya]=!1,this[TX]=typeof t.size=="number"?t.size:1/0,this[Nv]=this[TX],this[nh]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[it]=="number"?this[eh]():this[wa]()}get fd(){return this[it]}get path(){return this[ns]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[wa](){yn.open(this[ns],"r",(e,t)=>this[rh](e,t))}[rh](e,t){e?this[th](e):(this[it]=t,this.emit("open",t),this[eh]())}[JE](){return Buffer.allocUnsafe(Math.min(this[SX],this[Nv]))}[eh](){if(!this[ya]){this[ya]=!0;let e=this[JE]();if(e.length===0)return process.nextTick(()=>this[YE](null,0,e));yn.read(this[it],e,0,e.length,null,(t,i,r)=>this[YE](t,i,r))}}[YE](e,t,i){this[ya]=!1,e?this[th](e):this[ZE](t,i)&&this[eh]()}[Nr](){if(this[nh]&&typeof this[it]=="number"){let e=this[it];this[it]=null,yn.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[th](e){this[ya]=!0,this[Nr](),this.emit("error",e)}[ZE](e,t){let i=!1;return this[Nv]-=e,e>0&&(i=super.write(ethis[rh](e,t))}[rh](e,t){this[Hv]&&this[va]==="r+"&&e&&e.code==="ENOENT"?(this[va]="w",this[wa]()):e?this[th](e):(this[it]=t,this.emit("open",t),this[qE]())}end(e,t){return e&&this.write(e,t),this[yf]=!0,!this[zc]&&!this[ho].length&&typeof this[it]=="number"&&this[Vc](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[yf]?(this.emit("error",new Error("write() after end()")),!1):this[it]===null||this[zc]||this[ho].length?(this[ho].push(e),this[Mv]=!0,!1):(this[zc]=!0,this[Bv](e),!0)}[Bv](e){yn.write(this[it],e,0,e.length,this[Ml],(t,i)=>this[Vc](t,i))}[Vc](e,t){e?this[th](e):(this[Ml]!==null&&(this[Ml]+=t),this[ho].length?this[qE]():(this[zc]=!1,this[yf]&&!this[CX]?(this[CX]=!0,this[Nr](),this.emit("finish")):this[Mv]&&(this[Mv]=!1,this.emit("drain"))))}[qE](){if(this[ho].length===0)this[yf]&&this[Vc](null,0);else if(this[ho].length===1)this[Bv](this[ho].pop());else{let e=this[ho];this[ho]=[],WE(this[it],e,this[Ml],(t,i)=>this[Vc](t,i))}}[Nr](){if(this[nh]&&typeof this[it]=="number"){let e=this[it];this[it]=null,yn.close(e,t=>t?this.emit("error",t):this.emit("close"))}}},EX=class extends XE{[wa](){let e;if(this[Hv]&&this[va]==="r+")try{e=yn.openSync(this[ns],this[va],this[qv])}catch(t){if(t.code==="ENOENT")return this[va]="w",this[wa]();throw t}else e=yn.openSync(this[ns],this[va],this[qv]);this[rh](null,e)}[Nr](){if(this[nh]&&typeof this[it]=="number"){let e=this[it];this[it]=null,yn.closeSync(e),this.emit("close")}}[Bv](e){let t=!0;try{this[Vc](null,yn.writeSync(this[it],e,0,e.length,this[Ml])),t=!1}finally{if(t)try{this[Nr]()}catch{}}}};vf.ReadStream=$E;vf.ReadStreamSync=kX;vf.WriteStream=XE;vf.WriteStreamSync=EX});var Uv=m((fHe,jX)=>{"use strict";var $De=Cv(),XDe=Gc(),UDe=require("events"),GDe=Ug(),QDe=1024*1024,KDe=vv(),PX=xv(),zDe=hE(),UE=Buffer.from([31,139]),sr=Symbol("state"),Nl=Symbol("writeEntry"),rs=Symbol("readEntry"),GE=Symbol("nextEntry"),_X=Symbol("processEntry"),ar=Symbol("extendedHeader"),wf=Symbol("globalExtendedHeader"),Da=Symbol("meta"),RX=Symbol("emitMeta"),vt=Symbol("buffer"),os=Symbol("queue"),Bl=Symbol("ended"),LX=Symbol("emittedEnd"),Hl=Symbol("emit"),vn=Symbol("unzip"),Yv=Symbol("consumeChunk"),Wv=Symbol("consumeChunkSub"),QE=Symbol("consumeBody"),FX=Symbol("consumeMeta"),IX=Symbol("consumeHeader"),Zv=Symbol("consuming"),KE=Symbol("bufferConcat"),zE=Symbol("maybeEnd"),Df=Symbol("writing"),xa=Symbol("aborted"),Jv=Symbol("onDone"),ql=Symbol("sawValidEntry"),$v=Symbol("sawNullBlock"),Xv=Symbol("sawEOF"),VDe=n=>!0;jX.exports=$De(class extends UDe{constructor(e){e=e||{};super(e);this.file=e.file||"",this[ql]=null,this.on(Jv,t=>{(this[sr]==="begin"||this[ql]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(Jv,e.ondone):this.on(Jv,t=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||QDe,this.filter=typeof e.filter=="function"?e.filter:VDe,this.writable=!0,this.readable=!1,this[os]=new GDe,this[vt]=null,this[rs]=null,this[Nl]=null,this[sr]="begin",this[Da]="",this[ar]=null,this[wf]=null,this[Bl]=!1,this[vn]=null,this[xa]=!1,this[$v]=!1,this[Xv]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[IX](e,t){this[ql]===null&&(this[ql]=!1);let i;try{i=new XDe(e,t,this[ar],this[wf])}catch(r){return this.warn("TAR_ENTRY_INVALID",r)}if(i.nullBlock)this[$v]?(this[Xv]=!0,this[sr]==="begin"&&(this[sr]="header"),this[Hl]("eof")):(this[$v]=!0,this[Hl]("nullBlock"));else if(this[$v]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let r=i.type;if(/^(Symbolic)?Link$/.test(r)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(r)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let o=this[Nl]=new KDe(i,this[ar],this[wf]);if(!this[ql])if(o.remain){let s=()=>{o.invalid||(this[ql]=!0)};o.on("end",s)}else this[ql]=!0;o.meta?o.size>this.maxMetaEntrySize?(o.ignore=!0,this[Hl]("ignoredEntry",o),this[sr]="ignore",o.resume()):o.size>0&&(this[Da]="",o.on("data",s=>this[Da]+=s),this[sr]="meta"):(this[ar]=null,o.ignore=o.ignore||!this.filter(o.path,o),o.ignore?(this[Hl]("ignoredEntry",o),this[sr]=o.remain?"ignore":"header",o.resume()):(o.remain?this[sr]="body":(this[sr]="header",o.end()),this[rs]?this[os].push(o):(this[os].push(o),this[GE]())))}}}[_X](e){let t=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[rs]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",i=>this[GE]()),t=!1)):(this[rs]=null,t=!1),t}[GE](){do;while(this[_X](this[os].shift()));if(!this[os].length){let e=this[rs];!e||e.flowing||e.size===e.remain?this[Df]||this.emit("drain"):e.once("drain",i=>this.emit("drain"))}}[QE](e,t){let i=this[Nl],r=i.blockRemain,o=r>=e.length&&t===0?e:e.slice(t,t+r);return i.write(o),i.blockRemain||(this[sr]="header",this[Nl]=null,i.end()),o.length}[FX](e,t){let i=this[Nl],r=this[QE](e,t);return this[Nl]||this[RX](i),r}[Hl](e,t,i){!this[os].length&&!this[rs]?this.emit(e,t,i):this[os].push([e,t,i])}[RX](e){switch(this[Hl]("meta",this[Da]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[ar]=PX.parse(this[Da],this[ar],!1);break;case"GlobalExtendedHeader":this[wf]=PX.parse(this[Da],this[wf],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[ar]=this[ar]||Object.create(null),this[ar].path=this[Da].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[ar]=this[ar]||Object.create(null),this[ar].linkpath=this[Da].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[xa]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[xa])return;if(this[vn]===null&&e){if(this[vt]&&(e=Buffer.concat([this[vt],e]),this[vt]=null),e.lengththis[Yv](o)),this[vn].on("error",o=>this.abort(o)),this[vn].on("end",o=>{this[Bl]=!0,this[Yv]()}),this[Df]=!0;let r=this[vn][i?"end":"write"](e);return this[Df]=!1,r}}this[Df]=!0,this[vn]?this[vn].write(e):this[Yv](e),this[Df]=!1;let t=this[os].length?!1:this[rs]?this[rs].flowing:!0;return!t&&!this[os].length&&this[rs].once("drain",i=>this.emit("drain")),t}[KE](e){e&&!this[xa]&&(this[vt]=this[vt]?Buffer.concat([this[vt],e]):e)}[zE](){if(this[Bl]&&!this[LX]&&!this[xa]&&!this[Zv]){this[LX]=!0;let e=this[Nl];if(e&&e.blockRemain){let t=this[vt]?this[vt].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[vt]&&e.write(this[vt]),e.end()}this[Hl](Jv)}}[Yv](e){if(this[Zv])this[KE](e);else if(!e&&!this[vt])this[zE]();else{if(this[Zv]=!0,this[vt]){this[KE](e);let t=this[vt];this[vt]=null,this[Wv](t)}else this[Wv](e);for(;this[vt]&&this[vt].length>=512&&!this[xa]&&!this[Xv];){let t=this[vt];this[vt]=null,this[Wv](t)}this[Zv]=!1}(!this[vt]||this[Bl])&&this[zE]()}[Wv](e){let t=0,i=e.length;for(;t+512<=i&&!this[xa]&&!this[Xv];)switch(this[sr]){case"begin":case"header":this[IX](e,t),t+=512;break;case"ignore":case"body":t+=this[QE](e,t);break;case"meta":t+=this[FX](e,t);break;default:throw new Error("invalid state: "+this[sr])}t{"use strict";var exe=Zc(),OX=Uv(),sh=require("fs"),txe=oh(),AX=require("path"),VE=Qc();NX.exports=(n,e,t)=>{typeof n=="function"?(t=n,e=null,n={}):Array.isArray(n)&&(e=n,n={}),typeof e=="function"&&(t=e,e=null),e?e=Array.from(e):e=[];let i=exe(n);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return e.length&&nxe(i,e),i.noResume||ixe(i),i.file&&i.sync?rxe(i):i.file?oxe(i,t):MX(i)};var ixe=n=>{let e=n.onentry;n.onentry=e?t=>{e(t),t.resume()}:t=>t.resume()},nxe=(n,e)=>{let t=new Map(e.map(o=>[VE(o),!0])),i=n.filter,r=(o,s)=>{let a=s||AX.parse(o).root||".",l=o===a?!1:t.has(o)?t.get(o):r(AX.dirname(o),a);return t.set(o,l),l};n.filter=i?(o,s)=>i(o,s)&&r(VE(o)):o=>r(VE(o))},rxe=n=>{let e=MX(n),t=n.file,i=!0,r;try{let o=sh.statSync(t),s=n.maxReadSize||16*1024*1024;if(o.size{let t=new OX(n),i=n.maxReadSize||16*1024*1024,r=n.file,o=new Promise((s,a)=>{t.on("error",a),t.on("end",s),sh.stat(r,(l,u)=>{if(l)a(l);else{let c=new txe.ReadStream(r,{readSize:i,size:u.size});c.on("error",a),c.pipe(t)}})});return e?o.then(e,e):o},MX=n=>new OX(n)});var ZX=m((mHe,WX)=>{"use strict";var sxe=Zc(),Qv=Ov(),BX=oh(),HX=Gv(),qX=require("path");WX.exports=(n,e,t)=>{if(typeof e=="function"&&(t=e),Array.isArray(n)&&(e=n,n={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let i=sxe(n);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?axe(i,e):i.file?lxe(i,e,t):i.sync?uxe(i,e):cxe(i,e)};var axe=(n,e)=>{let t=new Qv.Sync(n),i=new BX.WriteStreamSync(n.file,{mode:n.mode||438});t.pipe(i),YX(t,e)},lxe=(n,e,t)=>{let i=new Qv(n),r=new BX.WriteStream(n.file,{mode:n.mode||438});i.pipe(r);let o=new Promise((s,a)=>{r.on("error",a),r.on("close",s),i.on("error",a)});return eP(i,e),t?o.then(t,t):o},YX=(n,e)=>{e.forEach(t=>{t.charAt(0)==="@"?HX({file:qX.resolve(n.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:i=>n.add(i)}):n.add(t)}),n.end()},eP=(n,e)=>{for(;e.length;){let t=e.shift();if(t.charAt(0)==="@")return HX({file:qX.resolve(n.cwd,t.substr(1)),noResume:!0,onentry:i=>n.add(i)}).then(i=>eP(n,e));n.add(t)}n.end()},uxe=(n,e)=>{let t=new Qv.Sync(n);return YX(t,e),t},cxe=(n,e)=>{let t=new Qv(n);return eP(t,e),t}});var tP=m((bHe,KX)=>{"use strict";var hxe=Zc(),JX=Ov(),Bn=require("fs"),$X=oh(),XX=Gv(),UX=require("path"),GX=Gc();KX.exports=(n,e,t)=>{let i=hxe(n);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),i.sync?dxe(i,e):fxe(i,e,t)};var dxe=(n,e)=>{let t=new JX.Sync(n),i=!0,r,o;try{try{r=Bn.openSync(n.file,"r+")}catch(l){if(l.code==="ENOENT")r=Bn.openSync(n.file,"w+");else throw l}let s=Bn.fstatSync(r),a=Buffer.alloc(512);e:for(o=0;os.size)break;o+=u,n.mtimeCache&&n.mtimeCache.set(l.path,l.mtime)}i=!1,gxe(n,t,o,r,e)}finally{if(i)try{Bn.closeSync(r)}catch{}}},gxe=(n,e,t,i,r)=>{let o=new $X.WriteStreamSync(n.file,{fd:i,start:t});e.pipe(o),pxe(e,r)},fxe=(n,e,t)=>{e=Array.from(e);let i=new JX(n),r=(s,a,l)=>{let u=(f,p)=>{f?Bn.close(s,b=>l(f)):l(null,p)},c=0;if(a===0)return u(null,0);let h=0,d=Buffer.alloc(512),g=(f,p)=>{if(f)return u(f);if(h+=p,h<512&&p)return Bn.read(s,d,h,d.length-h,c+h,g);if(c===0&&d[0]===31&&d[1]===139)return u(new Error("cannot append to compressed archives"));if(h<512)return u(null,c);let b=new GX(d);if(!b.cksumValid)return u(null,c);let v=512*Math.ceil(b.size/512);if(c+v+512>a||(c+=v+512,c>=a))return u(null,c);n.mtimeCache&&n.mtimeCache.set(b.path,b.mtime),h=0,Bn.read(s,d,0,512,c,g)};Bn.read(s,d,0,512,c,g)},o=new Promise((s,a)=>{i.on("error",a);let l="r+",u=(c,h)=>{if(c&&c.code==="ENOENT"&&l==="r+")return l="w+",Bn.open(n.file,l,u);if(c)return a(c);Bn.fstat(h,(d,g)=>{if(d)return Bn.close(h,()=>a(d));r(h,g.size,(f,p)=>{if(f)return a(f);let b=new $X.WriteStream(n.file,{fd:h,start:p});i.pipe(b),b.on("error",a),b.on("close",s),QX(i,e)})})};Bn.open(n.file,l,u)});return t?o.then(t,t):o},pxe=(n,e)=>{e.forEach(t=>{t.charAt(0)==="@"?XX({file:UX.resolve(n.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:i=>n.add(i)}):n.add(t)}),n.end()},QX=(n,e)=>{for(;e.length;){let t=e.shift();if(t.charAt(0)==="@")return XX({file:UX.resolve(n.cwd,t.substr(1)),noResume:!0,onentry:i=>n.add(i)}).then(i=>QX(n,e));n.add(t)}n.end()}});var VX=m((yHe,zX)=>{"use strict";var mxe=Zc(),bxe=tP();zX.exports=(n,e,t)=>{let i=mxe(n);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),yxe(i),bxe(i,e,t)};var yxe=n=>{let e=n.filter;n.mtimeCache||(n.mtimeCache=new Map),n.filter=e?(t,i)=>e(t,i)&&!(n.mtimeCache.get(t)>i.mtime):(t,i)=>!(n.mtimeCache.get(t)>i.mtime)}});var iU=m((vHe,tU)=>{var{promisify:eU}=require("util"),Ca=require("fs"),vxe=n=>{if(!n)n={mode:511,fs:Ca};else if(typeof n=="object")n=ge({mode:511,fs:Ca},n);else if(typeof n=="number")n={mode:n,fs:Ca};else if(typeof n=="string")n={mode:parseInt(n,8),fs:Ca};else throw new TypeError("invalid options argument");return n.mkdir=n.mkdir||n.fs.mkdir||Ca.mkdir,n.mkdirAsync=eU(n.mkdir),n.stat=n.stat||n.fs.stat||Ca.stat,n.statAsync=eU(n.stat),n.statSync=n.statSync||n.fs.statSync||Ca.statSync,n.mkdirSync=n.mkdirSync||n.fs.mkdirSync||Ca.mkdirSync,n};tU.exports=vxe});var rU=m((wHe,nU)=>{var wxe=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:Dxe,parse:xxe}=require("path"),Cxe=n=>{if(/\0/.test(n))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:n,code:"ERR_INVALID_ARG_VALUE"});if(n=Dxe(n),wxe==="win32"){let e=/[*|"<>?:]/,{root:t}=xxe(n);if(e.test(n.substr(t.length)))throw Object.assign(new Error("Illegal characters in path."),{path:n,code:"EINVAL"})}return n};nU.exports=Cxe});var uU=m((DHe,lU)=>{var{dirname:oU}=require("path"),sU=(n,e,t=void 0)=>t===e?Promise.resolve():n.statAsync(e).then(i=>i.isDirectory()?t:void 0,i=>i.code==="ENOENT"?sU(n,oU(e),e):void 0),aU=(n,e,t=void 0)=>{if(t!==e)try{return n.statSync(e).isDirectory()?t:void 0}catch(i){return i.code==="ENOENT"?aU(n,oU(e),e):void 0}};lU.exports={findMade:sU,findMadeSync:aU}});var rP=m((xHe,hU)=>{var{dirname:cU}=require("path"),iP=(n,e,t)=>{e.recursive=!1;let i=cU(n);return i===n?e.mkdirAsync(n,e).catch(r=>{if(r.code!=="EISDIR")throw r}):e.mkdirAsync(n,e).then(()=>t||n,r=>{if(r.code==="ENOENT")return iP(i,e).then(o=>iP(n,e,o));if(r.code!=="EEXIST"&&r.code!=="EROFS")throw r;return e.statAsync(n).then(o=>{if(o.isDirectory())return t;throw r},()=>{throw r})})},nP=(n,e,t)=>{let i=cU(n);if(e.recursive=!1,i===n)try{return e.mkdirSync(n,e)}catch(r){if(r.code!=="EISDIR")throw r;return}try{return e.mkdirSync(n,e),t||n}catch(r){if(r.code==="ENOENT")return nP(n,e,nP(i,e,t));if(r.code!=="EEXIST"&&r.code!=="EROFS")throw r;try{if(!e.statSync(n).isDirectory())throw r}catch{throw r}}};hU.exports={mkdirpManual:iP,mkdirpManualSync:nP}});var fU=m((CHe,gU)=>{var{dirname:dU}=require("path"),{findMade:Sxe,findMadeSync:Txe}=uU(),{mkdirpManual:kxe,mkdirpManualSync:Exe}=rP(),Pxe=(n,e)=>(e.recursive=!0,dU(n)===n?e.mkdirAsync(n,e):Sxe(e,n).then(i=>e.mkdirAsync(n,e).then(()=>i).catch(r=>{if(r.code==="ENOENT")return kxe(n,e);throw r}))),_xe=(n,e)=>{if(e.recursive=!0,dU(n)===n)return e.mkdirSync(n,e);let i=Txe(e,n);try{return e.mkdirSync(n,e),i}catch(r){if(r.code==="ENOENT")return Exe(n,e);throw r}};gU.exports={mkdirpNative:Pxe,mkdirpNativeSync:_xe}});var yU=m((SHe,bU)=>{var pU=require("fs"),Rxe=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,oP=Rxe.replace(/^v/,"").split("."),mU=+oP[0]>10||+oP[0]==10&&+oP[1]>=12,Lxe=mU?n=>n.mkdir===pU.mkdir:()=>!1,Fxe=mU?n=>n.mkdirSync===pU.mkdirSync:()=>!1;bU.exports={useNative:Lxe,useNativeSync:Fxe}});var SU=m((THe,CU)=>{var ah=iU(),lh=rU(),{mkdirpNative:vU,mkdirpNativeSync:wU}=fU(),{mkdirpManual:DU,mkdirpManualSync:xU}=rP(),{useNative:Ixe,useNativeSync:jxe}=yU(),uh=(n,e)=>(n=lh(n),e=ah(e),Ixe(e)?vU(n,e):DU(n,e)),Axe=(n,e)=>(n=lh(n),e=ah(e),jxe(e)?wU(n,e):xU(n,e));uh.sync=Axe;uh.native=(n,e)=>vU(lh(n),ah(e));uh.manual=(n,e)=>DU(lh(n),ah(e));uh.nativeSync=(n,e)=>wU(lh(n),ah(e));uh.manualSync=(n,e)=>xU(lh(n),ah(e));CU.exports=uh});var LU=m((kHe,RU)=>{"use strict";var lr=require("fs"),Yl=require("path"),Oxe=lr.lchown?"lchown":"chown",Mxe=lr.lchownSync?"lchownSync":"chownSync",kU=lr.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),TU=(n,e,t)=>{try{return lr[Mxe](n,e,t)}catch(i){if(i.code!=="ENOENT")throw i}},Nxe=(n,e,t)=>{try{return lr.chownSync(n,e,t)}catch(i){if(i.code!=="ENOENT")throw i}},Bxe=kU?(n,e,t,i)=>r=>{!r||r.code!=="EISDIR"?i(r):lr.chown(n,e,t,i)}:(n,e,t,i)=>i,sP=kU?(n,e,t)=>{try{return TU(n,e,t)}catch(i){if(i.code!=="EISDIR")throw i;Nxe(n,e,t)}}:(n,e,t)=>TU(n,e,t),Hxe=process.version,EU=(n,e,t)=>lr.readdir(n,e,t),qxe=(n,e)=>lr.readdirSync(n,e);/^v4\./.test(Hxe)&&(EU=(n,e,t)=>lr.readdir(n,t));var Kv=(n,e,t,i)=>{lr[Oxe](n,e,t,Bxe(n,e,t,r=>{i(r&&r.code!=="ENOENT"?r:null)}))},PU=(n,e,t,i,r)=>{if(typeof e=="string")return lr.lstat(Yl.resolve(n,e),(o,s)=>{if(o)return r(o.code!=="ENOENT"?o:null);s.name=e,PU(n,s,t,i,r)});if(e.isDirectory())aP(Yl.resolve(n,e.name),t,i,o=>{if(o)return r(o);let s=Yl.resolve(n,e.name);Kv(s,t,i,r)});else{let o=Yl.resolve(n,e.name);Kv(o,t,i,r)}},aP=(n,e,t,i)=>{EU(n,{withFileTypes:!0},(r,o)=>{if(r){if(r.code==="ENOENT")return i();if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!o.length)return Kv(n,e,t,i);let s=o.length,a=null,l=u=>{if(!a){if(u)return i(a=u);if(--s===0)return Kv(n,e,t,i)}};o.forEach(u=>PU(n,u,e,t,l))})},Yxe=(n,e,t,i)=>{if(typeof e=="string")try{let r=lr.lstatSync(Yl.resolve(n,e));r.name=e,e=r}catch(r){if(r.code==="ENOENT")return;throw r}e.isDirectory()&&_U(Yl.resolve(n,e.name),t,i),sP(Yl.resolve(n,e.name),t,i)},_U=(n,e,t)=>{let i;try{i=qxe(n,{withFileTypes:!0})}catch(r){if(r.code==="ENOENT")return;if(r.code==="ENOTDIR"||r.code==="ENOTSUP")return sP(n,e,t);throw r}return i&&i.length&&i.forEach(r=>Yxe(n,r,e,t)),sP(n,e,t)};RU.exports=aP;aP.sync=_U});var AU=m((EHe,cP)=>{"use strict";var FU=SU(),ur=require("fs"),zv=require("path"),IU=LU(),Br=Xc(),lP=class extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t,this.symlink=e}get name(){return"SylinkError"}},uP=class extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e,this.code=t}get name(){return"CwdError"}},Vv=(n,e)=>n.get(Br(e)),xf=(n,e,t)=>n.set(Br(e),t),Wxe=(n,e)=>{ur.stat(n,(t,i)=>{(t||!i.isDirectory())&&(t=new uP(n,t&&t.code||"ENOTDIR")),e(t)})};cP.exports=(n,e,t)=>{n=Br(n);let i=e.umask,r=e.mode|448,o=(r&i)!==0,s=e.uid,a=e.gid,l=typeof s=="number"&&typeof a=="number"&&(s!==e.processUid||a!==e.processGid),u=e.preserve,c=e.unlink,h=e.cache,d=Br(e.cwd),g=(b,v)=>{b?t(b):(xf(h,n,!0),v&&l?IU(v,s,a,w=>g(w)):o?ur.chmod(n,r,t):t())};if(h&&Vv(h,n)===!0)return g();if(n===d)return Wxe(n,g);if(u)return FU(n,{mode:r}).then(b=>g(null,b),g);let p=Br(zv.relative(d,n)).split("/");ew(d,p,r,h,c,d,null,g)};var ew=(n,e,t,i,r,o,s,a)=>{if(!e.length)return a(null,s);let l=e.shift(),u=Br(zv.resolve(n+"/"+l));if(Vv(i,u))return ew(u,e,t,i,r,o,s,a);ur.mkdir(u,t,jU(u,e,t,i,r,o,s,a))},jU=(n,e,t,i,r,o,s,a)=>l=>{l?ur.lstat(n,(u,c)=>{if(u)u.path=u.path&&Br(u.path),a(u);else if(c.isDirectory())ew(n,e,t,i,r,o,s,a);else if(r)ur.unlink(n,h=>{if(h)return a(h);ur.mkdir(n,t,jU(n,e,t,i,r,o,s,a))});else{if(c.isSymbolicLink())return a(new lP(n,n+"/"+e.join("/")));a(l)}}):(s=s||n,ew(n,e,t,i,r,o,s,a))},Zxe=n=>{let e=!1,t="ENOTDIR";try{e=ur.statSync(n).isDirectory()}catch(i){t=i.code}finally{if(!e)throw new uP(n,t)}};cP.exports.sync=(n,e)=>{n=Br(n);let t=e.umask,i=e.mode|448,r=(i&t)!==0,o=e.uid,s=e.gid,a=typeof o=="number"&&typeof s=="number"&&(o!==e.processUid||s!==e.processGid),l=e.preserve,u=e.unlink,c=e.cache,h=Br(e.cwd),d=b=>{xf(c,n,!0),b&&a&&IU.sync(b,o,s),r&&ur.chmodSync(n,i)};if(c&&Vv(c,n)===!0)return d();if(n===h)return Zxe(h),d();if(l)return d(FU.sync(n,i));let f=Br(zv.relative(h,n)).split("/"),p=null;for(let b=f.shift(),v=h;b&&(v+="/"+b);b=f.shift())if(v=Br(zv.resolve(v)),!Vv(c,v))try{ur.mkdirSync(v,i),p=p||v,xf(c,v,!0)}catch{let D=ur.lstatSync(v);if(D.isDirectory()){xf(c,v,!0);continue}else if(u){ur.unlinkSync(v),ur.mkdirSync(v,i),p=p||v,xf(c,v,!0);continue}else if(D.isSymbolicLink())return new lP(v,v+"/"+f.join("/"))}return d(p)}});var dP=m((PHe,OU)=>{var hP=Object.create(null),{hasOwnProperty:Jxe}=Object.prototype;OU.exports=n=>(Jxe.call(hP,n)||(hP[n]=n.normalize("NFKD")),hP[n])});var HU=m((_He,BU)=>{var MU=require("assert"),$xe=dP(),Xxe=Qc(),{join:NU}=require("path"),Uxe=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Gxe=Uxe==="win32";BU.exports=()=>{let n=new Map,e=new Map,t=u=>u.split("/").slice(0,-1).reduce((h,d)=>(h.length&&(d=NU(h[h.length-1],d)),h.push(d||"/"),h),[]),i=new Set,r=u=>{let c=e.get(u);if(!c)throw new Error("function does not have any path reservations");return{paths:c.paths.map(h=>n.get(h)),dirs:[...c.dirs].map(h=>n.get(h))}},o=u=>{let{paths:c,dirs:h}=r(u);return c.every(d=>d[0]===u)&&h.every(d=>d[0]instanceof Set&&d[0].has(u))},s=u=>i.has(u)||!o(u)?!1:(i.add(u),u(()=>a(u)),!0),a=u=>{if(!i.has(u))return!1;let{paths:c,dirs:h}=e.get(u),d=new Set;return c.forEach(g=>{let f=n.get(g);MU.equal(f[0],u),f.length===1?n.delete(g):(f.shift(),typeof f[0]=="function"?d.add(f[0]):f[0].forEach(p=>d.add(p)))}),h.forEach(g=>{let f=n.get(g);MU(f[0]instanceof Set),f[0].size===1&&f.length===1?n.delete(g):f[0].size===1?(f.shift(),d.add(f[0])):f[0].delete(u)}),i.delete(u),d.forEach(g=>s(g)),!0};return{check:o,reserve:(u,c)=>{u=Gxe?["win32 parallelization disabled"]:u.map(d=>$xe(Xxe(NU(d))).toLowerCase());let h=new Set(u.map(d=>t(d)).reduce((d,g)=>d.concat(g)));return e.set(c,{dirs:h,paths:u}),u.forEach(d=>{let g=n.get(d);g?g.push(c):n.set(d,[c])}),h.forEach(d=>{let g=n.get(d);g?g[g.length-1]instanceof Set?g[g.length-1].add(c):g.push(new Set([c])):n.set(d,[new Set([c])])}),s(c)}}}});var WU=m((RHe,YU)=>{var Qxe=process.env.__FAKE_PLATFORM__||process.platform,Kxe=Qxe==="win32",zxe=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:Vxe,O_TRUNC:eCe,O_WRONLY:tCe,UV_FS_O_FILEMAP:qU=0}=zxe.constants,iCe=Kxe&&!!qU,nCe=512*1024,rCe=qU|eCe|Vxe|tCe;YU.exports=iCe?n=>n"w"});var wP=m((LHe,r8)=>{"use strict";var oCe=require("assert"),sCe=Uv(),He=require("fs"),aCe=oh(),ss=require("path"),e8=AU(),ZU=wE(),lCe=HU(),uCe=DE(),Hn=Xc(),cCe=Qc(),hCe=dP(),JU=Symbol("onEntry"),pP=Symbol("checkFs"),$U=Symbol("checkFs2"),nw=Symbol("pruneCache"),mP=Symbol("isReusable"),cr=Symbol("makeFs"),bP=Symbol("file"),yP=Symbol("directory"),rw=Symbol("link"),XU=Symbol("symlink"),UU=Symbol("hardlink"),GU=Symbol("unsupported"),QU=Symbol("checkPath"),Sa=Symbol("mkdir"),ji=Symbol("onError"),tw=Symbol("pending"),KU=Symbol("pend"),ch=Symbol("unpend"),gP=Symbol("ended"),fP=Symbol("maybeClose"),vP=Symbol("skip"),Cf=Symbol("doChown"),Sf=Symbol("uid"),Tf=Symbol("gid"),kf=Symbol("checkedCwd"),t8=require("crypto"),i8=WU(),dCe=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Ef=dCe==="win32",gCe=(n,e)=>{if(!Ef)return He.unlink(n,e);let t=n+".DELETE."+t8.randomBytes(16).toString("hex");He.rename(n,t,i=>{if(i)return e(i);He.unlink(t,e)})},fCe=n=>{if(!Ef)return He.unlinkSync(n);let e=n+".DELETE."+t8.randomBytes(16).toString("hex");He.renameSync(n,e),He.unlinkSync(e)},zU=(n,e,t)=>n===n>>>0?n:e===e>>>0?e:t,VU=n=>hCe(cCe(Hn(n))).toLowerCase(),pCe=(n,e)=>{e=VU(e);for(let t of n.keys()){let i=VU(t);(i===e||i.indexOf(e+"/")===0)&&n.delete(t)}},mCe=n=>{for(let e of n.keys())n.delete(e)},ow=class extends sCe{constructor(e){e||(e={}),e.ondone=t=>{this[gP]=!0,this[fP]()};super(e);if(this[kf]=!1,this.reservations=lCe(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[tw]=0,this[gP]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Ef,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=Hn(ss.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",t=>this[JU](t))}warn(e,t,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,t,i)}[fP](){this[gP]&&this[tw]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[QU](e){if(this.strip){let t=Hn(e.path).split("/");if(t.length=this.strip)e.linkpath=i.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let t=Hn(e.path),i=t.split("/");if(i.includes("..")||Ef&&/^[a-z]:\.\.$/i.test(i[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;let[r,o]=uCe(t);r&&(e.path=o,this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:e,path:t}))}if(ss.isAbsolute(e.path)?e.absolute=Hn(ss.resolve(e.path)):e.absolute=Hn(ss.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:Hn(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:t}=ss.win32.parse(e.absolute);e.absolute=t+ZU.encode(e.absolute.substr(t.length));let{root:i}=ss.win32.parse(e.path);e.path=i+ZU.encode(e.path.substr(i.length))}return!0}[JU](e){if(!this[QU](e))return e.resume();switch(oCe.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[pP](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[GU](e)}}[ji](e,t){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[ch](),t.resume())}[Sa](e,t,i){e8(Hn(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},i)}[Cf](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[Sf](e){return zU(this.uid,e.uid,this.processUid)}[Tf](e){return zU(this.gid,e.gid,this.processGid)}[bP](e,t){let i=e.mode&4095||this.fmode,r=new aCe.WriteStream(e.absolute,{flags:i8(e.size),mode:i,autoClose:!1});r.on("error",l=>{r.fd&&He.close(r.fd,()=>{}),r.write=()=>!0,this[ji](l,e),t()});let o=1,s=l=>{if(l){r.fd&&He.close(r.fd,()=>{}),this[ji](l,e),t();return}--o===0&&He.close(r.fd,u=>{u?this[ji](u,e):this[ch](),t()})};r.on("finish",l=>{let u=e.absolute,c=r.fd;if(e.mtime&&!this.noMtime){o++;let h=e.atime||new Date,d=e.mtime;He.futimes(c,h,d,g=>g?He.utimes(u,h,d,f=>s(f&&g)):s())}if(this[Cf](e)){o++;let h=this[Sf](e),d=this[Tf](e);He.fchown(c,h,d,g=>g?He.chown(u,h,d,f=>s(f&&g)):s())}s()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",l=>{this[ji](l,e),t()}),e.pipe(a)),a.pipe(r)}[yP](e,t){let i=e.mode&4095||this.dmode;this[Sa](e.absolute,i,r=>{if(r){this[ji](r,e),t();return}let o=1,s=a=>{--o===0&&(t(),this[ch](),e.resume())};e.mtime&&!this.noMtime&&(o++,He.utimes(e.absolute,e.atime||new Date,e.mtime,s)),this[Cf](e)&&(o++,He.chown(e.absolute,this[Sf](e),this[Tf](e),s)),s()})}[GU](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[XU](e,t){this[rw](e,e.linkpath,"symlink",t)}[UU](e,t){let i=Hn(ss.resolve(this.cwd,e.linkpath));this[rw](e,i,"link",t)}[KU](){this[tw]++}[ch](){this[tw]--,this[fP]()}[vP](e){this[ch](),e.resume()}[mP](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!Ef}[pP](e){this[KU]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,i=>this[$U](e,i))}[nw](e){e.type==="SymbolicLink"?mCe(this.dirCache):e.type!=="Directory"&&pCe(this.dirCache,e.absolute)}[$U](e,t){this[nw](e);let i=a=>{this[nw](e),t(a)},r=()=>{this[Sa](this.cwd,this.dmode,a=>{if(a){this[ji](a,e),i();return}this[kf]=!0,o()})},o=()=>{if(e.absolute!==this.cwd){let a=Hn(ss.dirname(e.absolute));if(a!==this.cwd)return this[Sa](a,this.dmode,l=>{if(l){this[ji](l,e),i();return}s()})}s()},s=()=>{He.lstat(e.absolute,(a,l)=>{if(l&&(this.keep||this.newer&&l.mtime>e.mtime)){this[vP](e),i();return}if(a||this[mP](e,l))return this[cr](null,e,i);if(l.isDirectory()){if(e.type==="Directory"){let u=!this.noChmod&&e.mode&&(l.mode&4095)!==e.mode,c=h=>this[cr](h,e,i);return u?He.chmod(e.absolute,e.mode,c):c()}if(e.absolute!==this.cwd)return He.rmdir(e.absolute,u=>this[cr](u,e,i))}if(e.absolute===this.cwd)return this[cr](null,e,i);gCe(e.absolute,u=>this[cr](u,e,i))})};this[kf]?o():r()}[cr](e,t,i){if(e){this[ji](e,t),i();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[bP](t,i);case"Link":return this[UU](t,i);case"SymbolicLink":return this[XU](t,i);case"Directory":case"GNUDumpDir":return this[yP](t,i)}}[rw](e,t,i,r){He[i](t,e.absolute,o=>{o?this[ji](o,e):(this[ch](),e.resume()),r()})}},iw=n=>{try{return[null,n()]}catch(e){return[e,null]}},n8=class extends ow{[cr](e,t){return super[cr](e,t,()=>{})}[pP](e){if(this[nw](e),!this[kf]){let o=this[Sa](this.cwd,this.dmode);if(o)return this[ji](o,e);this[kf]=!0}if(e.absolute!==this.cwd){let o=Hn(ss.dirname(e.absolute));if(o!==this.cwd){let s=this[Sa](o,this.dmode);if(s)return this[ji](s,e)}}let[t,i]=iw(()=>He.lstatSync(e.absolute));if(i&&(this.keep||this.newer&&i.mtime>e.mtime))return this[vP](e);if(t||this[mP](e,i))return this[cr](null,e);if(i.isDirectory()){if(e.type==="Directory"){let s=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode,[a]=s?iw(()=>{He.chmodSync(e.absolute,e.mode)}):[];return this[cr](a,e)}let[o]=iw(()=>He.rmdirSync(e.absolute));this[cr](o,e)}let[r]=e.absolute===this.cwd?[]:iw(()=>fCe(e.absolute));this[cr](r,e)}[bP](e,t){let i=e.mode&4095||this.fmode,r=a=>{let l;try{He.closeSync(o)}catch(u){l=u}(a||l)&&this[ji](a||l,e),t()},o;try{o=He.openSync(e.absolute,i8(e.size),i)}catch(a){return r(a)}let s=this.transform&&this.transform(e)||e;s!==e&&(s.on("error",a=>this[ji](a,e)),e.pipe(s)),s.on("data",a=>{try{He.writeSync(o,a,0,a.length)}catch(l){r(l)}}),s.on("end",a=>{let l=null;if(e.mtime&&!this.noMtime){let u=e.atime||new Date,c=e.mtime;try{He.futimesSync(o,u,c)}catch(h){try{He.utimesSync(e.absolute,u,c)}catch{l=h}}}if(this[Cf](e)){let u=this[Sf](e),c=this[Tf](e);try{He.fchownSync(o,u,c)}catch(h){try{He.chownSync(e.absolute,u,c)}catch{l=l||h}}}r(l)})}[yP](e,t){let i=e.mode&4095||this.dmode,r=this[Sa](e.absolute,i);if(r){this[ji](r,e),t();return}if(e.mtime&&!this.noMtime)try{He.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[Cf](e))try{He.chownSync(e.absolute,this[Sf](e),this[Tf](e))}catch{}t(),e.resume()}[Sa](e,t){try{return e8.sync(Hn(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(i){return i}}[rw](e,t,i,r){try{He[i+"Sync"](t,e.absolute),r(),e.resume()}catch(o){return this[ji](o,e)}}};ow.Sync=n8;r8.exports=ow});var u8=m((FHe,l8)=>{"use strict";var bCe=Zc(),sw=wP(),s8=require("fs"),a8=oh(),o8=require("path"),DP=Qc();l8.exports=(n,e,t)=>{typeof n=="function"?(t=n,e=null,n={}):Array.isArray(n)&&(e=n,n={}),typeof e=="function"&&(t=e,e=null),e?e=Array.from(e):e=[];let i=bCe(n);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return e.length&&yCe(i,e),i.file&&i.sync?vCe(i):i.file?wCe(i,t):i.sync?DCe(i):xCe(i)};var yCe=(n,e)=>{let t=new Map(e.map(o=>[DP(o),!0])),i=n.filter,r=(o,s)=>{let a=s||o8.parse(o).root||".",l=o===a?!1:t.has(o)?t.get(o):r(o8.dirname(o),a);return t.set(o,l),l};n.filter=i?(o,s)=>i(o,s)&&r(DP(o)):o=>r(DP(o))},vCe=n=>{let e=new sw.Sync(n),t=n.file,i=s8.statSync(t),r=n.maxReadSize||16*1024*1024;new a8.ReadStreamSync(t,{readSize:r,size:i.size}).pipe(e)},wCe=(n,e)=>{let t=new sw(n),i=n.maxReadSize||16*1024*1024,r=n.file,o=new Promise((s,a)=>{t.on("error",a),t.on("close",s),s8.stat(r,(l,u)=>{if(l)a(l);else{let c=new a8.ReadStream(r,{readSize:i,size:u.size});c.on("error",a),c.pipe(t)}})});return e?o.then(e,e):o},DCe=n=>new sw.Sync(n),xCe=n=>new sw(n)});var c8=m(ni=>{"use strict";ni.c=ni.create=ZX();ni.r=ni.replace=tP();ni.t=ni.list=Gv();ni.u=ni.update=VX();ni.x=ni.extract=u8();ni.Pack=Ov();ni.Unpack=wP();ni.Parse=Uv();ni.ReadEntry=vv();ni.WriteEntry=RE();ni.Header=Gc();ni.Pax=xv();ni.types=fE()});var f8=m((jHe,g8)=>{g8.exports=Ai;function Ai(n){if(!(this instanceof Ai))return new Ai(n);this.value=n}Ai.prototype.get=function(n){for(var e=this.value,t=0;t{var CCe=f8(),SCe=require("events").EventEmitter;p8.exports=hh;function hh(n){var e=hh.saw(n,{}),t=n.call(e.handlers,e);return t!==void 0&&(e.handlers=t),e.record(),e.chain()}hh.light=function(e){var t=hh.saw(e,{}),i=e.call(t.handlers,t);return i!==void 0&&(t.handlers=i),t.chain()};hh.saw=function(n,e){var t=new SCe;return t.handlers=e,t.actions=[],t.chain=function(){var i=CCe(t.handlers).map(function(r){if(this.isRoot)return r;var o=this.path;typeof r=="function"&&this.update(function(){return t.actions.push({path:o,args:[].slice.call(arguments)}),i})});return process.nextTick(function(){t.emit("begin"),t.next()}),i},t.pop=function(){return t.actions.shift()},t.next=function(){var i=t.pop();if(!i)t.emit("end");else if(!i.trap){var r=t.handlers;i.path.forEach(function(o){r=r[o]}),r.apply(t.handlers,i.args)}},t.nest=function(i){var r=[].slice.call(arguments,1),o=!0;if(typeof i=="boolean"){var o=i;i=r.shift()}var s=hh.saw(n,{}),a=n.call(s.handlers,s);a!==void 0&&(s.handlers=a),typeof t.step<"u"&&s.record(),i.apply(s.chain(),r),o!==!1&&s.on("end",t.next)},t.record=function(){TCe(t)},["trap","down","jump"].forEach(function(i){t[i]=function(){throw new Error("To use the trap, down and jump features, please call record() first to start recording actions.")}}),t};function TCe(n){n.step=0,n.pop=function(){return n.actions[n.step++]},n.trap=function(e,t){var i=Array.isArray(e)?e:[e];n.actions.push({path:i,step:n.step,cb:t,trap:!0})},n.down=function(e){var t=(Array.isArray(e)?e:[e]).join("/"),i=n.actions.slice(n.step).map(function(o){return o.trap&&o.step<=n.step?!1:o.path.join("/")==t}).indexOf(!0);i>=0?n.step+=i:n.step=n.actions.length;var r=n.actions[n.step-1];r&&r.trap?(n.step=r.step,r.cb()):n.next()},n.jump=function(e){n.step=e,n.next()}}});var y8=m((OHe,b8)=>{b8.exports=en;function en(n){if(!(this instanceof en))return new en(n);this.buffers=n||[],this.length=this.buffers.reduce(function(e,t){return e+t.length},0)}en.prototype.push=function(){for(var n=0;n=0?n:this.length-n,r=[].slice.call(arguments,2);e===void 0?e=this.length-i:e>this.length-i&&(e=this.length-i);for(var n=0;n0){var u=i-a;if(u+e0){var g=r.slice();g.unshift(h),g.push(d),t.splice.apply(t,[l,1].concat(g)),l+=g.length,r=[]}else t.splice(l,1,h,d),l+=2}else o.push(t[l].slice(u)),t[l]=t[l].slice(0,u),l++}for(r.length>0&&(t.splice.apply(t,[l,0].concat(r)),l+=r.length);o.lengththis.length&&(e=this.length);for(var i=0,r=0;r=e-n?Math.min(u+(e-n)-s,l):l;t[a].copy(o,s,u,c),s+=c-u}return o};en.prototype.pos=function(n){if(n<0||n>=this.length)throw new Error("oob");for(var e=n,t=0,i=null;;){if(i=this.buffers[t],e=this.buffers[t].length;)if(i=0,t++,t>=this.buffers.length)return-1;var l=this.buffers[t][i];if(l==n[r]){if(r==0&&(o={i:t,j:i,pos:s}),r++,r==n.length)return o.pos}else r!=0&&(t=o.i,i=o.j,s=o.pos,r=0);i++,s++}};en.prototype.toBuffer=function(){return this.slice()};en.prototype.toString=function(n,e,t){return this.slice(e,t).toString(n)}});var w8=m((MHe,v8)=>{v8.exports=function(n){function e(i,r){var o=t.store,s=i.split(".");s.slice(0,-1).forEach(function(l){o[l]===void 0&&(o[l]={}),o=o[l]});var a=s[s.length-1];return arguments.length==1?o[a]:o[a]=r}var t={get:function(i){return e(i)},set:function(i,r){return e(i,r)},store:n||{}};return t}});var k8=m((Wl,T8)=>{var kCe=m8(),D8=require("events").EventEmitter,ECe=y8(),aw=w8(),PCe=require("stream").Stream;Wl=T8.exports=function(n,e){if(Buffer.isBuffer(n))return Wl.parse(n);var t=Wl.stream();return n&&n.pipe?n.pipe(t):n&&(n.on(e||"data",function(i){t.write(i)}),n.on("end",function(){t.end()})),t};Wl.stream=function(n){if(n)return Wl.apply(null,arguments);var e=null;function t(h,d,g){e={bytes:h,skip:g,cb:function(f){e=null,d(f)}},r()}var i=null;function r(){if(!e){c&&(u=!0);return}if(typeof e=="function")e();else{var h=i+e.bytes;if(a.length>=h){var d;i==null?(d=a.splice(0,h),e.skip||(d=d.slice())):(e.skip||(d=a.slice(i,h)),i=h),e.skip?e.cb():e.cb(d)}}}function o(h){function d(){u||h.next()}var g=S8(function(f,p){return function(b){t(f,function(v){l.set(b,p(v)),d()})}});return g.tap=function(f){h.nest(f,l.store)},g.into=function(f,p){l.get(f)||l.set(f,{});var b=l;l=aw(b.get(f)),h.nest(function(){p.apply(this,arguments),this.tap(function(){l=b})},l.store)},g.flush=function(){l.store={},d()},g.loop=function(f){var p=!1;h.nest(!1,function b(){this.vars=l.store,f.call(this,function(){p=!0,d()},l.store),this.tap(function(){p?h.next():b.call(this)}.bind(this))},l.store)},g.buffer=function(f,p){typeof p=="string"&&(p=l.get(p)),t(p,function(b){l.set(f,b),d()})},g.skip=function(f){typeof f=="string"&&(f=l.get(f)),t(f,function(){d()})},g.scan=function(p,b){if(typeof b=="string")b=new Buffer(b);else if(!Buffer.isBuffer(b))throw new Error("search must be a Buffer or a string");var v=0;e=function(){var w=a.indexOf(b,i+v),D=w-i-v;w!==-1?(e=null,i!=null?(l.set(p,a.slice(i,i+v+D)),i+=v+D+b.length):(l.set(p,a.slice(0,v+D)),a.splice(0,v+D+b.length)),d(),r()):D=Math.max(a.length-b.length-i-v,0),v+=D},r()},g.peek=function(f){i=0,h.nest(function(){f.call(this,l.store),this.tap(function(){i=null})})},g}var s=kCe.light(o);s.writable=!0;var a=ECe();s.write=function(h){a.push(h),r()};var l=aw(),u=!1,c=!1;return s.end=function(){c=!0},s.pipe=PCe.prototype.pipe,Object.getOwnPropertyNames(D8.prototype).forEach(function(h){s[h]=D8.prototype[h]}),s};Wl.parse=function(e){var t=S8(function(o,s){return function(a){if(i+o<=e.length){var l=e.slice(i,i+o);i+=o,r.set(a,s(l))}else r.set(a,null);return t}}),i=0,r=aw();return t.vars=r.store,t.tap=function(o){return o.call(t,r.store),t},t.into=function(o,s){r.get(o)||r.set(o,{});var a=r;return r=aw(a.get(o)),s.call(t,r.store),r=a,t},t.loop=function(o){for(var s=!1,a=function(){s=!0};s===!1;)o.call(t,a,r.store);return t},t.buffer=function(o,s){typeof s=="string"&&(s=r.get(s));var a=e.slice(i,Math.min(e.length,i+s));return i+=s,r.set(o,a),t},t.skip=function(o){return typeof o=="string"&&(o=r.get(o)),i+=o,t},t.scan=function(o,s){if(typeof s=="string")s=new Buffer(s);else if(!Buffer.isBuffer(s))throw new Error("search must be a Buffer or a string");r.set(o,null);for(var a=0;a+i<=e.length-s.length+1;a++){for(var l=0;l=e.length},t};function x8(n){for(var e=0,t=0;t{var E8=require("stream").Transform,LCe=require("util");function Zl(n,e){if(!(this instanceof Zl))return new Zl;E8.call(this);var t=typeof n=="object"?n.pattern:n;this.pattern=Buffer.isBuffer(t)?t:Buffer.from(t),this.requiredLength=this.pattern.length,n.requiredExtraSize&&(this.requiredLength+=n.requiredExtraSize),this.data=new Buffer(""),this.bytesSoFar=0,this.matchFn=e}LCe.inherits(Zl,E8);Zl.prototype.checkDataChunk=function(n){var e=this.data.length>=this.requiredLength;if(!!e){var t=this.data.indexOf(this.pattern,n?1:0);if(t>=0&&t+this.requiredLength>this.data.length){if(t>0){var i=this.data.slice(0,t);this.push(i),this.bytesSoFar+=t,this.data=this.data.slice(t)}return}if(t===-1){var r=this.data.length-this.requiredLength+1,i=this.data.slice(0,r);this.push(i),this.bytesSoFar+=r,this.data=this.data.slice(r);return}if(t>0){var i=this.data.slice(0,t);this.data=this.data.slice(t),this.push(i),this.bytesSoFar+=t}var o=this.matchFn?this.matchFn(this.data,this.bytesSoFar):!0;if(o){this.data=new Buffer("");return}return!0}};Zl.prototype._transform=function(n,e,t){this.data=Buffer.concat([this.data,n]);for(var i=!0;this.checkDataChunk(!i);)i=!1;t()};Zl.prototype._flush=function(n){if(this.data.length>0)for(var e=!0;this.checkDataChunk(!e);)e=!1;this.data.length>0&&(this.push(this.data),this.data=null),n()};P8.exports=Zl});var L8=m((BHe,R8)=>{"use strict";var xP=require("stream"),FCe=require("util").inherits;function Pf(){if(!(this instanceof Pf))return new Pf;xP.PassThrough.call(this),this.path=null,this.type=null,this.isDirectory=!1}FCe(Pf,xP.PassThrough);Pf.prototype.autodrain=function(){return this.pipe(new xP.Transform({transform:function(n,e,t){t()}}))};R8.exports=Pf});var SP=m((HHe,I8)=>{"use strict";var Ta=k8(),CP=require("stream"),ICe=require("util"),jCe=require("zlib"),ACe=_8(),F8=L8(),de={STREAM_START:0,START:1,LOCAL_FILE_HEADER:2,LOCAL_FILE_HEADER_SUFFIX:3,FILE_DATA:4,FILE_DATA_END:5,DATA_DESCRIPTOR:6,CENTRAL_DIRECTORY_FILE_HEADER:7,CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:8,CDIR64_END:9,CDIR64_END_DATA_SECTOR:10,CDIR64_LOCATOR:11,CENTRAL_DIRECTORY_END:12,CENTRAL_DIRECTORY_END_COMMENT:13,TRAILING_JUNK:14,ERROR:99},_f=4294967296,OCe=67324752,MCe=134695760,NCe=33639248,BCe=101075792,HCe=117853008,qCe=101010256;function vi(n){if(!(this instanceof vi))return new vi(n);CP.Transform.call(this),this.options=n||{},this.data=new Buffer(""),this.state=de.STREAM_START,this.skippedBytes=0,this.parsedEntity=null,this.outStreamInfo={}}ICe.inherits(vi,CP.Transform);vi.prototype.processDataChunk=function(n){var e;switch(this.state){case de.STREAM_START:case de.START:e=4;break;case de.LOCAL_FILE_HEADER:e=26;break;case de.LOCAL_FILE_HEADER_SUFFIX:e=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength;break;case de.DATA_DESCRIPTOR:e=12;break;case de.CENTRAL_DIRECTORY_FILE_HEADER:e=42;break;case de.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:e=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength+this.parsedEntity.fileCommentLength;break;case de.CDIR64_END:e=52;break;case de.CDIR64_END_DATA_SECTOR:e=this.parsedEntity.centralDirectoryRecordSize-44;break;case de.CDIR64_LOCATOR:e=16;break;case de.CENTRAL_DIRECTORY_END:e=18;break;case de.CENTRAL_DIRECTORY_END_COMMENT:e=this.parsedEntity.commentLength;break;case de.FILE_DATA:return 0;case de.FILE_DATA_END:return 0;case de.TRAILING_JUNK:return this.options.debug&&console.log("found",n.length,"bytes of TRAILING_JUNK"),n.length;default:return n.length}var t=n.length;if(t>>8,(o&255)===80){s=a;break}return this.skippedBytes+=s,this.options.debug&&console.log("Skipped",this.skippedBytes,"bytes"),s}this.state=de.ERROR;var l=r?"Not a valid zip file":"Invalid signature in zip file";if(this.options.debug){var u=n.readUInt32LE(0),c;try{c=n.slice(0,4).toString()}catch{}console.log("Unexpected signature in zip file: 0x"+u.toString(16),'"'+c+'", skipped',this.skippedBytes,"bytes")}return this.emit("error",new Error(l)),n.length}return this.skippedBytes=0,e;case de.LOCAL_FILE_HEADER:return this.parsedEntity=this._readFile(n),this.state=de.LOCAL_FILE_HEADER_SUFFIX,e;case de.LOCAL_FILE_HEADER_SUFFIX:var h=new F8,d=(this.parsedEntity.flags&2048)!==0;h.path=this._decodeString(n.slice(0,this.parsedEntity.fileNameLength),d);var f=n.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),p=this._readExtraFields(f);if(p&&p.parsed&&(p.parsed.path&&!d&&(h.path=p.parsed.path),Number.isFinite(p.parsed.uncompressedSize)&&this.parsedEntity.uncompressedSize===_f-1&&(this.parsedEntity.uncompressedSize=p.parsed.uncompressedSize),Number.isFinite(p.parsed.compressedSize)&&this.parsedEntity.compressedSize===_f-1&&(this.parsedEntity.compressedSize=p.parsed.compressedSize)),this.parsedEntity.extra=p.parsed||{},this.options.debug){let S=Object.assign({},this.parsedEntity,{path:h.path,flags:"0x"+this.parsedEntity.flags.toString(16),extraFields:p&&p.debug});console.log("decoded LOCAL_FILE_HEADER:",JSON.stringify(S,null,2))}return this._prepareOutStream(this.parsedEntity,h),this.emit("entry",h),this.state=de.FILE_DATA,e;case de.CENTRAL_DIRECTORY_FILE_HEADER:return this.parsedEntity=this._readCentralDirectoryEntry(n),this.state=de.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX,e;case de.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:var d=(this.parsedEntity.flags&2048)!==0,g=this._decodeString(n.slice(0,this.parsedEntity.fileNameLength),d),f=n.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),p=this._readExtraFields(f);p&&p.parsed&&p.parsed.path&&!d&&(g=p.parsed.path),this.parsedEntity.extra=p.parsed;var b=(this.parsedEntity.versionMadeBy&65280)>>8===3,v,w;if(b){v=this.parsedEntity.externalFileAttributes>>>16;var D=v>>>12;w=(D&10)===10}if(this.options.debug){let S=Object.assign({},this.parsedEntity,{path:g,flags:"0x"+this.parsedEntity.flags.toString(16),unixAttrs:v&&"0"+v.toString(8),isSymlink:w,extraFields:p.debug});console.log("decoded CENTRAL_DIRECTORY_FILE_HEADER:",JSON.stringify(S,null,2))}return this.state=de.START,e;case de.CDIR64_END:return this.parsedEntity=this._readEndOfCentralDirectory64(n),this.options.debug&&console.log("decoded CDIR64_END_RECORD:",this.parsedEntity),this.state=de.CDIR64_END_DATA_SECTOR,e;case de.CDIR64_END_DATA_SECTOR:return this.state=de.START,e;case de.CDIR64_LOCATOR:return this.state=de.START,e;case de.CENTRAL_DIRECTORY_END:return this.parsedEntity=this._readEndOfCentralDirectory(n),this.options.debug&&console.log("decoded CENTRAL_DIRECTORY_END:",this.parsedEntity),this.state=de.CENTRAL_DIRECTORY_END_COMMENT,e;case de.CENTRAL_DIRECTORY_END_COMMENT:return this.options.debug&&console.log("decoded CENTRAL_DIRECTORY_END_COMMENT:",n.slice(0,e).toString()),this.state=de.TRAILING_JUNK,e;case de.ERROR:return n.length;default:return console.log("didn't handle state #",this.state,"discarding"),n.length}};vi.prototype._prepareOutStream=function(n,e){var t=this,i=n.uncompressedSize===0&&/[\/\\]$/.test(e.path);e.path=e.path.replace(/^([/\\]*[.]+[/\\]+)*[/\\]*/,""),e.type=i?"Directory":"File",e.isDirectory=i;var r=!(n.flags&8);r&&(e.size=n.uncompressedSize);var o=n.versionsNeededToExtract<=45;if(this.outStreamInfo={stream:null,limit:r?n.compressedSize:-1,written:0},r)this.outStreamInfo.stream=new CP.PassThrough;else{var s=new Buffer(4);s.writeUInt32LE(MCe,0);var a=n.extra.zip64Mode,l=a?20:12,u={pattern:s,requiredExtraSize:l},c=new ACe(u,function(p,b){var v=t._readDataDescriptor(p,a),w=v.compressedSize===b;if(!a&&!w&&b>=_f)for(var D=b-_f;D>=0&&(w=v.compressedSize===D,!w);)D-=_f;if(!!w){t.state=de.FILE_DATA_END;var S=a?24:16;return t.data.length>0?t.data=Buffer.concat([p.slice(S),t.data]):t.data=p.slice(S),!0}});this.outStreamInfo.stream=c}var h=n.flags&1||n.flags&64;if(h||!o){var d=h?"Encrypted files are not supported!":"Zip version "+Math.floor(n.versionsNeededToExtract/10)+"."+n.versionsNeededToExtract%10+" is not supported";e.skip=!0,setImmediate(()=>{e.emit("error",new Error(d))}),this.outStreamInfo.stream.pipe(new F8().autodrain());return}var g=n.compressionMethod>0;if(g){var f=jCe.createInflateRaw();f.on("error",function(p){t.state=de.ERROR,t.emit("error",p)}),this.outStreamInfo.stream.pipe(f).pipe(e)}else this.outStreamInfo.stream.pipe(e);this._drainAllEntries&&e.autodrain()};vi.prototype._readFile=function(n){var e=Ta.parse(n).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;return e};vi.prototype._readExtraFields=function(n){var e={},t={parsed:e};this.options.debug&&(t.debug=[]);for(var i=0;i=w+4&&a&1&&(e.mtime=new Date(n.readUInt32LE(i+w)*1e3),w+=4),r.extraSize>=w+4&&a&2&&(e.atime=new Date(n.readUInt32LE(i+w)*1e3),w+=4),r.extraSize>=w+4&&a&4&&(e.ctime=new Date(n.readUInt32LE(i+w)*1e3));break;case 28789:o="Info-ZIP Unicode Path Extra Field";var l=n.readUInt8(i);if(l===1){var w=1,u=n.readUInt32LE(i+w);w+=4;var c=n.slice(i+w);e.path=c.toString()}break;case 13:case 22613:o=r.extraId===13?"PKWARE Unix":"Info-ZIP UNIX (type 1)";var w=0;if(r.extraSize>=8){var h=new Date(n.readUInt32LE(i+w)*1e3);w+=4;var d=new Date(n.readUInt32LE(i+w)*1e3);if(w+=4,e.atime=h,e.mtime=d,r.extraSize>=12){var g=n.readUInt16LE(i+w);w+=2;var f=n.readUInt16LE(i+w);w+=2,e.uid=g,e.gid=f}}break;case 30805:o="Info-ZIP UNIX (type 2)";var w=0;if(r.extraSize>=4){var g=n.readUInt16LE(i+w);w+=2;var f=n.readUInt16LE(i+w);w+=2,e.uid=g,e.gid=f}break;case 30837:o="Info-ZIP New Unix";var w=0,p=n.readUInt8(i);if(w+=1,p===1){var b=n.readUInt8(i+w);w+=1,b<=6&&(e.uid=n.readUIntLE(i+w,b)),w+=b;var v=n.readUInt8(i+w);w+=1,v<=6&&(e.gid=n.readUIntLE(i+w,v))}break;case 30062:o="ASi Unix";var w=0;if(r.extraSize>=14){var D=n.readUInt32LE(i+w);w+=4;var S=n.readUInt16LE(i+w);w+=2;var F=n.readUInt32LE(i+w);w+=4;var g=n.readUInt16LE(i+w);w+=2;var f=n.readUInt16LE(i+w);if(w+=2,e.mode=S,e.uid=g,e.gid=f,r.extraSize>14){var L=i+w,j=i+r.extraSize-14,W=this._decodeString(n.slice(L,j));e.symlink=W}}break}this.options.debug&&t.debug.push({extraId:"0x"+r.extraId.toString(16),description:o,data:n.slice(i,i+r.extraSize).inspect()}),i+=r.extraSize}return t};vi.prototype._readDataDescriptor=function(n,e){if(e){var t=Ta.parse(n).word32lu("dataDescriptorSignature").word32lu("crc32").word64lu("compressedSize").word64lu("uncompressedSize").vars;return t}var t=Ta.parse(n).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;return t};vi.prototype._readCentralDirectoryEntry=function(n){var e=Ta.parse(n).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return e};vi.prototype._readEndOfCentralDirectory64=function(n){var e=Ta.parse(n).word64lu("centralDirectoryRecordSize").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskNumberWithCentralDirectoryStart").word64lu("centralDirectoryEntries").word64lu("totalCentralDirectoryEntries").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;return e};vi.prototype._readEndOfCentralDirectory=function(n){var e=Ta.parse(n).word16lu("diskNumber").word16lu("diskStart").word16lu("centralDirectoryEntries").word16lu("totalCentralDirectoryEntries").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return e};var YCe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ";vi.prototype._decodeString=function(n,e){if(e)return n.toString("utf8");if(this.options.decodeString)return this.options.decodeString(n);let t="";for(var i=0;i0&&(this.data=this.data.slice(t),this.data.length!==0););if(this.state===de.FILE_DATA){if(this.outStreamInfo.limit>=0){var i=this.outStreamInfo.limit-this.outStreamInfo.written,r;i{if(this.state===de.FILE_DATA_END)return this.state=de.START,o.end(e);e()})}return}e()};vi.prototype.drainAll=function(){this._drainAllEntries=!0};vi.prototype._transform=function(n,e,t){var i=this;i.data.length>0?i.data=Buffer.concat([i.data,n]):i.data=n;var r=i.data.length,o=function(){if(i.data.length>0&&i.data.length0){e._parseOrOutput("buffer",function(){if(e.data.length>0)return setImmediate(function(){e._flush(n)});n()});return}if(e.state===de.FILE_DATA)return n(new Error("Stream finished in an invalid state, uncompression failed"));setImmediate(n)};I8.exports=vi});var A8=m((qHe,j8)=>{var Rf=require("stream").Transform,WCe=require("util"),ZCe=SP();function ka(n){if(!(this instanceof ka))return new ka(n);var e=n||{};Rf.call(this,{readableObjectMode:!0}),this.opts=n||{},this.unzipStream=new ZCe(this.opts);var t=this;this.unzipStream.on("entry",function(i){t.push(i)}),this.unzipStream.on("error",function(i){t.emit("error",i)})}WCe.inherits(ka,Rf);ka.prototype._transform=function(n,e,t){this.unzipStream.write(n,e,t)};ka.prototype._flush=function(n){var e=this;this.unzipStream.end(function(){process.nextTick(function(){e.emit("close")}),n()})};ka.prototype.on=function(n,e){return n==="entry"?Rf.prototype.on.call(this,"data",e):Rf.prototype.on.call(this,n,e)};ka.prototype.drainAll=function(){return this.unzipStream.drainAll(),this.pipe(new Rf({objectMode:!0,transform:function(n,e,t){t()}}))};j8.exports=ka});var B8=m((YHe,N8)=>{var Lf=require("path"),O8=require("fs"),M8=parseInt("0777",8);N8.exports=dh.mkdirp=dh.mkdirP=dh;function dh(n,e,t,i){typeof e=="function"?(t=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var r=e.mode,o=e.fs||O8;r===void 0&&(r=M8),i||(i=null);var s=t||function(){};n=Lf.resolve(n),o.mkdir(n,r,function(a){if(!a)return i=i||n,s(null,i);switch(a.code){case"ENOENT":if(Lf.dirname(n)===n)return s(a);dh(Lf.dirname(n),e,function(l,u){l?s(l,u):dh(n,e,s,u)});break;default:o.stat(n,function(l,u){l||!u.isDirectory()?s(a,i):s(null,i)});break}})}dh.sync=function n(e,t,i){(!t||typeof t!="object")&&(t={mode:t});var r=t.mode,o=t.fs||O8;r===void 0&&(r=M8),i||(i=null),e=Lf.resolve(e);try{o.mkdirSync(e,r),i=i||e}catch(a){switch(a.code){case"ENOENT":i=n(Lf.dirname(e),t,i),n(e,t,i);break;default:var s;try{s=o.statSync(e)}catch{throw a}if(!s.isDirectory())throw a;break}}return i}});var W8=m((WHe,Y8)=>{var JCe=require("fs"),H8=require("path"),$Ce=require("util"),XCe=B8(),q8=require("stream").Transform,UCe=SP();function Ea(n){if(!(this instanceof Ea))return new Ea(n);q8.call(this),this.opts=n||{},this.unzipStream=new UCe(this.opts),this.unfinishedEntries=0,this.afterFlushWait=!1,this.createdDirectories={};var e=this;this.unzipStream.on("entry",this._processEntry.bind(this)),this.unzipStream.on("error",function(t){e.emit("error",t)})}$Ce.inherits(Ea,q8);Ea.prototype._transform=function(n,e,t){this.unzipStream.write(n,e,t)};Ea.prototype._flush=function(n){var e=this,t=function(){process.nextTick(function(){e.emit("close")}),n()};this.unzipStream.end(function(){if(e.unfinishedEntries>0)return e.afterFlushWait=!0,e.on("await-finished",t);t()})};Ea.prototype._processEntry=function(n){var e=this,t=H8.join(this.opts.path,n.path),i=n.isDirectory?t:H8.dirname(t);this.unfinishedEntries++;var r=function(){var o=JCe.createWriteStream(t);o.on("close",function(){e.unfinishedEntries--,e._notifyAwaiter()}),o.on("error",function(s){e.emit("error",s)}),n.pipe(o)};if(this.createdDirectories[i]||i===".")return r();XCe(i,function(o){if(o)return e.emit("error",o);if(e.createdDirectories[i]=!0,n.isDirectory){e.unfinishedEntries--,e._notifyAwaiter();return}r()})};Ea.prototype._notifyAwaiter=function(){this.afterFlushWait&&this.unfinishedEntries===0&&(this.emit("await-finished"),this.afterFlushWait=!1)};Y8.exports=Ea});var Z8=m(TP=>{"use strict";TP.Parse=A8();TP.Extract=W8()});var J8=m(kP=>{"use strict";Object.defineProperty(kP,"__esModule",{value:!0});function GCe(n,e,{signal:t}={}){return new Promise((i,r)=>{function o(){t==null||t.removeEventListener("abort",o),n.removeListener(e,s),n.removeListener("error",a)}function s(...l){o(),i(l)}function a(l){o(),r(l)}t==null||t.addEventListener("abort",o),n.on(e,s),n.on("error",a)})}kP.default=GCe});var $8=m(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});function QCe(n){return function(e,t){return new Promise((i,r)=>{n.call(this,e,t,(o,s)=>{o?r(o):i(s)})})}}EP.default=QCe});var RP=m((_P,U8)=>{"use strict";var X8=_P&&_P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},KCe=require("events"),zCe=X8(Ot()),VCe=X8($8()),Ff=zCe.default("agent-base");function eSe(n){return Boolean(n)&&typeof n.addRequest=="function"}function PP(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
-`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function lw(n,e){return new lw.Agent(n,e)}(function(n){class e extends KCe.EventEmitter{constructor(i,r){super();let o=r;typeof i=="function"?this.callback=i:i&&(o=i),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:PP()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:PP()?"https:":"http:"}set protocol(i){this.explicitProtocol=i}callback(i,r,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(i,r){let o=Object.assign({},r);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=PP()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,i._last=!0,i.shouldKeepAlive=!1;let s=!1,a=null,l=o.timeout||this.timeout,u=g=>{i._hadError||(i.emit("error",g),i._hadError=!0)},c=()=>{a=null,s=!0;let g=new Error(`A "socket" was not created for HTTP request before ${l}ms`);g.code="ETIMEOUT",u(g)},h=g=>{s||(a!==null&&(clearTimeout(a),a=null),u(g))},d=g=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),eSe(g)){Ff("Callback returned another Agent instance %o",g.constructor.name),g.addRequest(i,o);return}if(g){g.once("free",()=>{this.freeSocket(g,o)}),i.onSocket(g);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${i.method} ${i.path}\``);u(f)};if(typeof this.callback!="function"){u(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Ff("Converting legacy callback function to promise"),this.promisifiedCallback=VCe.default(this.callback)):this.promisifiedCallback=this.callback),typeof l=="number"&&l>0&&(a=setTimeout(c,l)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{Ff("Resolving socket for %o request: %o",o.protocol,`${i.method} ${i.path}`),Promise.resolve(this.promisifiedCallback(i,o)).then(d,h)}catch(g){Promise.reject(g).catch(h)}}freeSocket(i,r){Ff("Freeing socket %o %o",i.constructor.name,r),i.destroy()}destroy(){Ff("Destroying agent %o",this.constructor.name)}}n.Agent=e,n.prototype=n.Agent.prototype})(lw||(lw={}));U8.exports=lw});var Q8=m(Jl=>{"use strict";var tSe=Jl&&Jl.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(h){s(h)}}function l(c){try{u(i.throw(c))}catch(h){s(h)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},If=Jl&&Jl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Jl,"__esModule",{value:!0});var iSe=If(require("net")),nSe=If(require("tls")),LP=If(require("url")),rSe=If(Ot()),oSe=If(J8()),sSe=RP(),Pa=(0,rSe.default)("http-proxy-agent");function aSe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}var G8=class extends sSe.Agent{constructor(e){let t;if(typeof e=="string"?t=LP.default.parse(e):t=e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Pa("Creating new HttpProxyAgent instance: %o",t);super(t);let i=Object.assign({},t);this.secureProxy=t.secureProxy||aSe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,t){return tSe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:r}=this,o=LP.default.parse(e.path);o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=t.hostname||t.host||null),o.port==null&&typeof t.port&&(o.port=String(t.port)),o.port==="80"&&(o.port=""),e.path=LP.default.format(o),i.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(i.auth).toString("base64")}`);let s;if(r?(Pa("Creating `tls.Socket`: %o",i),s=nSe.default.connect(i)):(Pa("Creating `net.Socket`: %o",i),s=iSe.default.connect(i)),e._header){let a,l;Pa("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(Pa("Patching connection write() output buffer with updated header"),a=e.output[0],l=a.indexOf(`\r
-\r
-`)+4,e.output[0]=e._header+a.substring(l),Pa("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(Pa("Patching connection write() output buffer with updated header"),a=e.outputData[0].data,l=a.indexOf(`\r
-\r
-`)+4,e.outputData[0].data=e._header+a.substring(l),Pa("Output buffer: %o",e.outputData[0].data))}return yield(0,oSe.default)(s,"connect"),s})}};Jl.default=G8});var z8=m((jP,K8)=>{"use strict";var lSe=jP&&jP.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},FP=lSe(Q8());function IP(n){return new FP.default(n)}(function(n){n.HttpProxyAgent=FP.default,n.prototype=FP.default.prototype})(IP||(IP={}));K8.exports=IP});var V8=m(Af=>{"use strict";var uSe=Af&&Af.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Af,"__esModule",{value:!0});var cSe=uSe(Ot()),jf=cSe.default("https-proxy-agent:parse-proxy-response");function hSe(n){return new Promise((e,t)=>{let i=0,r=[];function o(){let h=n.read();h?c(h):n.once("readable",o)}function s(){n.removeListener("end",l),n.removeListener("error",u),n.removeListener("close",a),n.removeListener("readable",o)}function a(h){jf("onclose had error %o",h)}function l(){jf("onend")}function u(h){s(),jf("onerror %o",h),t(h)}function c(h){r.push(h),i+=h.length;let d=Buffer.concat(r,i);if(d.indexOf(`\r
-\r
-`)===-1){jf("have not received end of HTTP headers yet..."),o();return}let f=d.toString("ascii",0,d.indexOf(`\r
-`)),p=+f.split(" ")[1];jf("got proxy server response: %o",f),e({statusCode:p,buffered:d})}n.on("error",u),n.on("close",a),n.on("end",l),o()})}Af.default=hSe});var nG=m($l=>{"use strict";var dSe=$l&&$l.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(h){s(h)}}function l(c){try{u(i.throw(c))}catch(h){s(h)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},gh=$l&&$l.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($l,"__esModule",{value:!0});var eG=gh(require("net")),tG=gh(require("tls")),gSe=gh(require("url")),fSe=gh(require("assert")),pSe=gh(Ot()),mSe=RP(),bSe=gh(V8()),Of=pSe.default("https-proxy-agent:agent"),iG=class extends mSe.Agent{constructor(e){let t;if(typeof e=="string"?t=gSe.default.parse(e):t=e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Of("creating new HttpsProxyAgent instance: %o",t);super(t);let i=Object.assign({},t);this.secureProxy=t.secureProxy||wSe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in i)&&(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,t){return dSe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:r}=this,o;r?(Of("Creating `tls.Socket`: %o",i),o=tG.default.connect(i)):(Of("Creating `net.Socket`: %o",i),o=eG.default.connect(i));let s=Object.assign({},i.headers),l=`CONNECT ${`${t.host}:${t.port}`} HTTP/1.1\r
-`;i.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(i.auth).toString("base64")}`);let{host:u,port:c,secureEndpoint:h}=t;vSe(c,h)||(u+=`:${c}`),s.Host=u,s.Connection="close";for(let b of Object.keys(s))l+=`${b}: ${s[b]}\r
-`;let d=bSe.default(o);o.write(`${l}\r
-`);let{statusCode:g,buffered:f}=yield d;if(g===200){if(e.once("socket",ySe),t.secureEndpoint){let b=t.servername||t.host;if(!b)throw new Error('Could not determine "servername"');return Of("Upgrading socket connection to TLS"),tG.default.connect(Object.assign(Object.assign({},DSe(t,"host","hostname","path","port")),{socket:o,servername:b}))}return o}o.destroy();let p=new eG.default.Socket;return p.readable=!0,e.once("socket",b=>{Of("replaying proxy buffer for failed request"),fSe.default(b.listenerCount("data")>0),b.push(f),b.push(null)}),p})}};$l.default=iG;function ySe(n){n.resume()}function vSe(n,e){return Boolean(!e&&n===80||e&&n===443)}function wSe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function DSe(n,...e){let t={},i;for(i in n)e.includes(i)||(t[i]=n[i]);return t}});var oG=m((MP,rG)=>{"use strict";var xSe=MP&&MP.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},AP=xSe(nG());function OP(n){return new AP.default(n)}(function(n){n.HttpsProxyAgent=AP.default,n.prototype=AP.default.prototype})(OP||(OP={}));rG.exports=OP});var aG=m((QHe,sG)=>{"use strict";var CSe=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];sG.exports=(n,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let t=new Set(Object.keys(n).concat(CSe)),i={};for(let r of t)r in e||(i[r]={get(){let o=n[r];return typeof o=="function"?o.bind(n):o},set(o){n[r]=o},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),n.once("aborted",()=>{e.destroy(),e.emit("aborted")}),n.once("close",()=>{n.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var uG=m((KHe,lG)=>{"use strict";var{Transform:SSe,PassThrough:TSe}=require("stream"),NP=require("zlib"),kSe=aG();lG.exports=n=>{let e=(n.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return n;let t=e==="br";if(t&&typeof NP.createBrotliDecompress!="function")return n.destroy(new Error("Brotli is not supported on Node.js < 12")),n;let i=!0,r=new SSe({transform(a,l,u){i=!1,u(null,a)},flush(a){a()}}),o=new TSe({autoDestroy:!1,destroy(a,l){n.destroy(),l(a)}}),s=t?NP.createBrotliDecompress():NP.createUnzip();return s.once("error",a=>{if(i&&!n.readable){o.end();return}o.destroy(a)}),kSe(n,o),n.pipe(r).pipe(s).pipe(o),o}});function ESe(n){let e;n.protocol==="http:"?e=process.env.HTTP_PROXY||process.env.http_proxy||null:n.protocol==="https:"&&(e=process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null);let t=process.env.NO_PROXY||process.env.no_proxy;if(t==="*")e=null;else if(t){let i=n.hostname.replace(/^\.*/,".").toLowerCase(),r=n.port||n.protocol.startsWith("https")?"443":"80",o=t.split(",");for(let s=0,a=o.length;s{if(i){let u=i.onCancellationRequested(()=>{u.dispose(),l.destroy(new Error("request aborted"))})}let a,l=r.request(t,u=>{let c=u;if(u.statusCode>=200&&u.statusCode<300||u.statusCode===1223){let h=u.headers||{},d=[],g=h["content-type"]||"";c=(0,fG.default)(u),c.on("data",f=>{d.push(f)}),c.on("end",()=>{a&&clearTimeout(a);let f=Buffer.concat(d);if(!t.buffer&&(g.startsWith("application/json")||g.startsWith("text/"))){let p=g.match(/charset=(\S+)/),b=p?p[1]:"utf8",v=f.toString(b);if(!g.includes("application/json"))o(v);else try{let w=JSON.parse(v);o(w)}catch(w){s(new Error(`Parse response error: ${w}`))}}else o(f)}),c.on("error",f=>{s(new Error(`Unable to connect ${n}: ${f.message}`))})}else s(new Error(`Bad response from ${n}: ${u.statusCode}`))});l.on("error",u=>{t.agent&&u.code=="ECONNRESET"?a=setTimeout(()=>{s(u)},500):s(u)}),l.on("timeout",()=>{l.destroy(new Error(`Request timeout after ${t.timeout}ms`))}),e&&(typeof e=="string"||Buffer.isBuffer(e)?l.write(e):l.write(JSON.stringify(e))),t.timeout&&l.setTimeout(t.timeout),l.end()})}function RSe(n){return n===null?"null":n===void 0?"undefined":typeof n=="string"?"string":Buffer.isBuffer(n)?"buffer":Array.isArray(n)||_t(n)?"object":"unknown"}function fh(n,e={},t){let i=HP(n,e);return _Se(n,e.data,i,t).catch(r=>{if(pG.error(`Fetch error for ${n}:`,i,r),i.agent&&i.agent.proxy){let{proxy:o}=i.agent;throw new Error(`Request failed using proxy ${o.host}: ${r.message}`)}else throw r})}var uw,BP,cG,hG,dG,gG,fG,pG,cw=_(()=>{"use strict";uw=C(eE()),BP=require("url"),cG=C(require("fs"));In();V();hG=require("querystring"),dG=C(z8()),gG=C(oG()),fG=C(uG()),pG=q()("model-fetch")});function Nf(n,e,t){let{dest:i,onProgress:r,extract:o}=e;if(!i||!Mf.default.isAbsolute(i))throw new Error("Expect absolute file path for dest option.");let s;try{s=hw.default.statSync(i)}catch{hw.default.mkdirpSync(i)}if(s&&!s.isDirectory())throw new Error(`${i} exists, but not directory!`);let a=n.startsWith("https")?dw.https:dw.http,l=HP(n,e),u=Mf.default.extname(n);return new Promise((c,h)=>{if(t){let f=t.onCancellationRequested(()=>{f.dispose(),g.destroy(new Error("request aborted"))})}let d,g=a.request(l,f=>{var p,b;if(f.statusCode>=200&&f.statusCode<300||f.statusCode===1223){let v=f.headers||{},w=v["content-disposition"];if(!u&&w){let L=mG.default.parse(w);(p=L.parameters)!=null&&p.filename&&(u=Mf.default.extname(L.parameters.filename))}if(o===!0)if(u===".zip"||v["content-type"]=="application/zip")o="unzip";else if(u==".tgz")o="untar";else{h(new Error(`Unable to extract for ${n}`));return}let D=Number(v["content-length"]),S=0;isNaN(D)||f.on("data",L=>{S+=L.length;let j=(S/D*100).toFixed(1);r?r(j):qP.info(`Download ${n} progress ${j}%`)}),f.on("error",L=>{h(new Error(`Unable to connect ${n}: ${L.message}`))}),f.on("data",()=>{d&&(clearTimeout(d),d=void 0)}),f.on("end",()=>{qP.info("Download completed:",n)});let F;o==="untar"?F=f.pipe(bG.default.x({strip:(b=e.strip)!=null?b:1,C:i})):o==="unzip"?F=f.pipe(yG.default.Extract({path:i})):(i=Mf.default.join(i,`${Uo()}${u}`),F=f.pipe(hw.default.createWriteStream(i))),F.on("finish",()=>{qP.info(`Downloaded ${n} => ${i}`),setTimeout(()=>{c(i)},100)}),F.on("error",h)}else h(new Error(`Invalid response from ${n}: ${f.statusCode}`))});g.on("error",f=>{l.agent&&f.code=="ECONNRESET"?d=setTimeout(()=>{h(f)},500):h(f)}),g.on("timeout",()=>{g.destroy(new Error(`request timeout after ${e.timeout}ms`))}),e.timeout&&g.setTimeout(e.timeout),g.end()})}var mG,dw,hw,Mf,bG,yG,qP,YP=_(()=>{"use strict";mG=C(n$()),dw=C(eE()),hw=C(Rn()),Mf=C(require("path")),bG=C(c8()),yG=C(Z8());Oe();cw();qP=q()("model-download")});function FSe(n="coc.nvim"){let e="https://registry.npmjs.org/",t=qn.default.join(LSe,".npmrc");if($t.default.existsSync(t))try{let i=$t.default.readFileSync(t,"utf8"),r={};for(let o of i.split(/\r?\n/))if(o.indexOf("=")>-1){let[s,a,l]=o.match(/^(.*?)=(.*)$/);r[a]=l}r[`${n}:registry`]?e=r[`${n}:registry`]:r.registry&&(e=r.registry)}catch(i){WP.error("Error on read .npmrc:",i)}return e.endsWith("/")?e:e+"/"}function ISe(n){let e=qn.default.basename(n);return e==="npm"||e==="npm.CMD"}function jSe(n){let e=qn.default.basename(n);return["yarn","yarn.CMD","yarnpkg","yarnpkg.CMD"].includes(e)}function ASe(n,e){let t=["install","--ignore-scripts","--no-lockfile","--production"];return e.startsWith("https://github.com")&&(t=["install"]),ISe(n)&&(t.push("--legacy-peer-deps"),t.push("--no-global")),jSe(n)&&t.push("--ignore-engines"),t}function OSe(n){let e;try{e=JSON.parse(n).dependencies||{}}catch{e={}}return zi(e,["coc.nvim","esbuild","webpack","@types/node"])}function vG(n){return!!($t.default.existsSync(n)&&$t.default.lstatSync(n).isSymbolicLink())}function pw(n,e){return t=>new CG(e,n,t)}var wG,DG,$t,fw,qn,xG,gw,WP,LSe,CG,SG=_(()=>{"use strict";wG=require("child_process"),DG=require("events"),$t=C(Rn());Eg();fw=C(require("os")),qn=C(require("path")),xG=C(require("readline")),gw=C(nf());Je();Vo();V();YP();cw();WP=q()("model-installer"),LSe=global.__TEST__?fw.default.tmpdir():fw.default.homedir();CG=class extends DG.EventEmitter{constructor(e,t,i){super();this.root=e;this.npm=t;this.def=i;if($t.default.existsSync(e)||$t.default.mkdirpSync(e),/^https?:/.test(i))this.url=i;else{let r=i.match(/(.+)@([^/]+)$/);r?(this.name=r[1],this.version=r[2]):this.name=i}}get info(){return{name:this.name,version:this.version}}async install(){this.log(`Using npm from: ${this.npm}`);let e=await this.getInfo();WP.info(`Fetched info of ${this.def}`,e);let{name:t}=e,i=e["engines.coc"]?e["engines.coc"].replace(/^\^/,">="):"";if(i&&!gw.default.satisfies(y.version,i))throw new Error(`${t} ${e.version} requires coc.nvim >= ${i}, please update coc.nvim.`);return await this.doInstall(e),t}async update(e){this.url=e;let t=qn.default.join(this.root,this.name);if(vG(t)){this.log("Skipped update for symbol link");return}let i;if($t.default.existsSync(qn.default.join(t,"package.json"))){let a=await $t.default.readFile(qn.default.join(t,"package.json"),"utf8");i=JSON.parse(a).version}this.log(`Using npm from: ${this.npm}`);let r=await this.getInfo();if(i&&r.version&&gw.default.gte(i,r.version)){this.log(`Current version ${i} is up to date.`);return}let o=r["engines.coc"]?r["engines.coc"].replace(/^\^/,">="):"";if(o&&!gw.default.satisfies(y.version,o))throw new Error(`${r.version} requires coc.nvim ${o}, please update coc.nvim.`);await this.doInstall(r);let s=qn.default.join(this.root,r.name,"package.json");return this.log(`Updated to v${r.version}`),qn.default.dirname(s)}async doInstall(e){let t=qn.default.join(this.root,e.name);if(vG(t))return!1;let i=await $t.default.mkdtemp(qn.default.join(fw.default.tmpdir(),`${e.name.replace("/","-")}-`)),r=e["dist.tarball"];this.log(`Downloading from ${r}`),await Nf(r,{dest:i,onProgress:d=>this.log(`Download progress ${d}%`,!0),extract:"untar"}),this.log(`Extension download at ${i}`);let o=await $t.default.readFile(qn.default.join(i,"package.json"),"utf8"),s=OSe(o);Object.keys(s).length&&await new Promise((g,f)=>{let p=ASe(this.npm,r);this.log(`Installing dependencies by: ${this.npm} ${p.join(" ")}.`);let b=(0,wG.spawn)(this.npm,p,{cwd:i});xG.default.createInterface({input:b.stdout}).on("line",D=>{this.log(`[npm] ${D}`,!0)}),b.stderr.setEncoding("utf8"),b.stdout.setEncoding("utf8"),b.on("error",f);let w="";b.stderr.on("data",D=>{w+=D}),b.on("exit",D=>{if(D){w&&this.log(w),f(new Error(`${this.npm} install exited with ${D}`));return}g()})});let a=qn.default.resolve(this.root,global.__TEST__?"":"..","package.json"),l=[];$t.default.existsSync(a)||$t.default.writeFileSync(a,"{}");let u=_c($t.default.readFileSync(a,"utf8"),l,{allowTrailingComma:!0});if(l&&l.length>0)throw new Error(`Error on load ${a}`);u.dependencies=u.dependencies||{},this.url?u.dependencies[e.name]=this.url:u.dependencies[e.name]=">="+e.version;let c={dependencies:{}};Object.keys(u.dependencies).sort().forEach(d=>{c.dependencies[d]=u.dependencies[d]});let h=await Ht(t);return h&&(h.isDirectory()?$t.default.removeSync(t):$t.default.unlinkSync(t)),await $t.default.move(i,t,{overwrite:!0}),await $t.default.writeFile(a,JSON.stringify(c,null,2),{encoding:"utf8"}),$t.default.existsSync(i)&&$t.default.rmdirSync(i),this.log(`Update package.json at ${a}`),this.log(`Installed extension ${this.name}@${e.version} at ${t}`),!0}async getInfo(){if(this.url)return await this.getInfoFromUri();let e=FSe();this.log(`Get info from ${e}`);let t=await fh(e+this.name,{timeout:1e4,buffer:!0}),i=JSON.parse(t.toString());this.version||(this.version=i["dist-tags"].latest);let r=i.versions[this.version];if(!r)throw new Error(`${this.def} doesn't exists in ${e}.`);let o=r.engines&&r.engines.coc;if(!o)throw new Error(`${this.def} is not valid coc extension, "engines" field with coc property required.`);return{"dist.tarball":r.dist.tarball,"engines.coc":o,version:r.version,name:i.name}}async getInfoFromUri(){let{url:e}=this;if(!e.startsWith("https://github.com"))throw new Error(`"${e}" is not supported, coc.nvim support github.com only`);e=e.replace(/\/$/,"");let t="master";if(e.includes("@")){let s=e.indexOf("@");t=e.substr(s+1),e=e.substring(0,s)}let i=e.replace("github.com","raw.githubusercontent.com")+`/${t}/package.json`;this.log(`Get info from ${i}`);let r=await fh(i,{timeout:1e4}),o=typeof r=="string"?JSON.parse(r):r;return this.name=o.name,{"dist.tarball":`${e}/archive/${t}.tar.gz`,"engines.coc":o.engines?o.engines.coc:null,name:o.name,version:o.version}}log(e,t=!1){WP.info(e),this.emit("message",e,t)}}});var ph,MSe,mw,TG=_(()=>{"use strict";ph=C(require("fs"));Jt();MSe=q()("model-memos"),mw=class{constructor(e){this.filepath=e;ph.default.existsSync(e)||ph.default.writeFileSync(e,"{}","utf8")}fetchContent(e,t){try{let i=ph.default.readFileSync(this.filepath,"utf8"),o=JSON.parse(i)[e];return o?o[t]:void 0}catch{return}}async update(e,t,i){let{filepath:r}=this;try{let o=ph.default.readFileSync(r,"utf8"),s=o?JSON.parse(o):{};s[e]=s[e]||{},i!==void 0?s[e][t]=Pr(i):delete s[e][t],o=JSON.stringify(s,null,2),ph.default.writeFileSync(r,o,"utf8")}catch(o){MSe.error("Error on update memos:",o)}}createMemento(e){return{get:(t,i)=>{let r=this.fetchContent(e,t);return r===void 0?i:r},update:async(t,i)=>{await this.update(e,t,i)}}}}});var bw,kG=_(()=>{"use strict";we();uk();bw=class{constructor(e,t){if(typeof e!="string"&&(!e||!O.isUri(e)&&typeof e.uri!="string"))throw ak("base");if(typeof t!="string")throw ak("pattern");typeof e=="string"?this.baseUri=O.file(e):O.isUri(e)?this.baseUri=e:this.baseUri=O.parse(e.uri),this.pattern=t}toJSON(){return{pattern:this.pattern,baseUri:this.baseUri.toJSON()}}}});var PG=m((xqe,EG)=>{"use strict";EG.exports=H()});function _G(n,e){if(!n.killed)if(NSe)try{let t={stdio:["pipe","pipe","ignore"]};return e&&(t.cwd=e),Bf.execFileSync("taskkill",["/T","/F","/PID",n.pid.toString()],t),!0}catch{return!1}else if(HSe||BSe)try{let t=(0,yw.join)(qSe,"bin/terminateProcess.sh");return!Bf.spawnSync(t,[n.pid.toString()]).error}catch{return!1}else return n.kill("SIGKILL"),!0}var Bf,yw,NSe,BSe,HSe,qSe,RG=_(()=>{"use strict";Bf=C(require("child_process")),yw=require("path"),NSe=process.platform==="win32",BSe=process.platform==="darwin",HSe=process.platform==="linux",qSe=(0,yw.dirname)(__dirname)});function YSe(n){return typeof n!="number"?!1:n>=0&&n<=100}var LG,Aqe,Hf,ZP=_(()=>{"use strict";LG=C(H());z();ke();V();Aqe=q()("language-client-progressPart"),Hf=class{constructor(e,t,i,r){this.id=e;this.token=i;this.disposables=[];this._cancelled=!1;this._percent=0;this._started=!1;!y.env.dialog||this.disposables.push(t.onProgress(LG.WorkDoneProgress.type,this.token,o=>{switch(o.kind){case"begin":this.begin(o);break;case"report":this.report(o);break;case"end":this.done(o.message),r&&r(this);break}}))}begin(e){this._started||(this._started=!0,k.withProgress({source:`language-client-${this.id}`,cancellable:e.cancellable,title:e.title},(t,i)=>(this.progress=t,this.report(e),new Promise(r=>{e.cancellable&&i.onCancellationRequested(()=>{this.cancel(),r()}),this._resolve=r}))).catch(t=>{k.showErrorMessage(t.message)}).finally(()=>{this._resolve=void 0,this.progress=void 0}))}report(e){if(!this.progress)return;let t={};e.message&&(t.message=e.message),YSe(e.percentage)&&(t.increment=e.percentage-this._percent,this._percent=e.percentage),Object.keys(t).length>0&&this.progress.report(t)}cancel(){this._cancelled||(this._cancelled=!0,Z(this.disposables))}done(e){if(this.progress){let t={};e&&(t.message=e),this._percent>0&&(t.increment=100-this._percent),this.progress.report(t)}setTimeout(()=>{this._resolve&&this._resolve()},300),this.cancel()}}});var JP,$P,FG=_(()=>{"use strict";JP=C(H()),$P=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(i=>{this.onSuccess=i}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let i=this.task();return this.task=void 0,i})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,JP.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}dispose(){this.cancelTimeout()}cancelTimeout(){this.timeout!==void 0&&((0,JP.RAL)().timer.clearTimeout(this.timeout),this.timeout=void 0)}}});function IG(n){return{uri:n.uri,languageId:n.languageId,version:n.version,text:n.getText()}}function jG(n){return{textDocument:{uri:n.uri}}}function AG(n){return{textDocument:{uri:n.uri,version:n.version},contentChanges:[{text:n.getText()}]}}function XP(n){return{textDocument:vw(n.document),reason:n.reason}}function vw(n){return{uri:n.uri,version:n.version}}function OG(n,e){let t={textDocument:vw(n)};return e&&(t.text=n.getText()),t}function qf(n){return n.toString()}function MG(n,e,t){return{textDocument:{uri:n.uri},position:e,context:zi(t,["option"])}}function wn(n,e){return{textDocument:{uri:n.uri},position:e}}function NG(n,e,t){return{textDocument:Xl(n),position:e,context:t}}function Xl(n){return{uri:n.uri}}function BG(n,e,t){return{textDocument:{uri:n.uri},position:e,context:{includeDeclaration:t.includeDeclaration}}}function HG(n){return{textDocument:{uri:n.uri}}}function qG(n){return{textDocument:{uri:n.uri}}}var _a=_(()=>{"use strict";Vo()});function qe(){return re()}var ww=_(()=>{"use strict";Oe()});function WSe(n,e,t,i,r){let o=new WG,s=(0,x.createProtocolConnection)(n,e,o,r),a=[];return s.onError(u=>{t(u[0],u[1],u[2])},null,a),s.onClose(i,null,a),{listen:()=>s.listen(),unlisten:()=>{Z(a)},sendRequest:(u,...c)=>s.sendRequest(Ee(u)?u:u.method,...c),onRequest:(u,c)=>s.onRequest(Ee(u)?u:u.method,c),sendNotification:(u,c)=>s.sendNotification(Ee(u)?u:u.method,c),onNotification:(u,c)=>s.onNotification(Ee(u)?u:u.method,c),onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(u,c,h)=>{let d={sendNotification:!1,traceFormat:x.TraceFormat.Text};h===void 0?s.trace(u,c,d):(Kn(h),s.trace(u,c,h))},initialize:u=>s.sendRequest(x.InitializeRequest.type,u),shutdown:()=>s.sendRequest(x.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(x.ExitNotification.type),onLogMessage:u=>s.onNotification(x.LogMessageNotification.type,u),onShowMessage:u=>s.onNotification(x.ShowMessageNotification.type,u),onTelemetry:u=>s.onNotification(x.TelemetryEventNotification.type,u),didChangeConfiguration:u=>s.sendNotification(x.DidChangeConfigurationNotification.type,u),didChangeWatchedFiles:u=>s.sendNotification(x.DidChangeWatchedFilesNotification.type,u),didOpenTextDocument:u=>s.sendNotification(x.DidOpenTextDocumentNotification.type,u),didChangeTextDocument:u=>s.sendNotification(x.DidChangeTextDocumentNotification.type,u),didCloseTextDocument:u=>s.sendNotification(x.DidCloseTextDocumentNotification.type,u),didSaveTextDocument:u=>s.sendNotification(x.DidSaveTextDocumentNotification.type,u),onDiagnostics:u=>s.onNotification(x.PublishDiagnosticsNotification.type,u),end:()=>s.end(),dispose:()=>s.dispose()}}function U(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var GP,x,YG,go,WG,zP,VP,e_,ZG,Dw,xw,Cw,JG,ZSe,$G,QP,fo,XG,UG,GG,QG,KG,zG,VG,Me,e6,t6,i6,n6,r6,o6,s6,a6,l6,u6,c6,h6,d6,g6,f6,p6,m6,b6,mh,KP,t_,Dn=_(()=>{"use strict";GP=C(require("path")),x=C(H());we();wi();Ce();Je();In();Vo();Ob();ke();V();Ul();ZP();FG();YG=C(require("os"));_a();ww();yt();z();go=q()("language-client-client"),WG=class{error(e){go.error(e)}warn(e){go.warn(e)}info(e){go.info(e)}log(e){go.log(e)}},zP=class{error(e){}warn(e){}info(e){}log(e){}};VP=(t=>(t[t.Continue=1]="Continue",t[t.Shutdown=2]="Shutdown",t))(VP||{}),e_=(t=>(t[t.DoNotRestart=1]="DoNotRestart",t[t.Restart=2]="Restart",t))(e_||{}),ZG=class{constructor(e,t){this.name=e;this.maxRestartCount=t;this.restarts=[]}error(e,t,i){return i&&i<=3?1:2}closed(){return this.restarts.push(Date.now()),this.restarts.length(r[r.Info=1]="Info",r[r.Warn=2]="Warn",r[r.Error=3]="Error",r[r.Never=4]="Never",r))(Dw||{}),xw=(i=>(i[i.Stopped=1]="Stopped",i[i.Running=2]="Running",i[i.Starting=3]="Starting",i))(xw||{}),Cw=(s=>(s[s.Initial=0]="Initial",s[s.Starting=1]="Starting",s[s.StartFailed=2]="StartFailed",s[s.Running=3]="Running",s[s.Stopping=4]="Stopping",s[s.Stopped=5]="Stopped",s))(Cw||{}),JG=[x.SymbolKind.File,x.SymbolKind.Module,x.SymbolKind.Namespace,x.SymbolKind.Package,x.SymbolKind.Class,x.SymbolKind.Method,x.SymbolKind.Property,x.SymbolKind.Field,x.SymbolKind.Constructor,x.SymbolKind.Enum,x.SymbolKind.Interface,x.SymbolKind.Function,x.SymbolKind.Variable,x.SymbolKind.Constant,x.SymbolKind.String,x.SymbolKind.Number,x.SymbolKind.Boolean,x.SymbolKind.Array,x.SymbolKind.Object,x.SymbolKind.Key,x.SymbolKind.Null,x.SymbolKind.EnumMember,x.SymbolKind.Struct,x.SymbolKind.Event,x.SymbolKind.Operator,x.SymbolKind.TypeParameter],ZSe=[x.CompletionItemKind.Text,x.CompletionItemKind.Method,x.CompletionItemKind.Function,x.CompletionItemKind.Constructor,x.CompletionItemKind.Field,x.CompletionItemKind.Variable,x.CompletionItemKind.Class,x.CompletionItemKind.Interface,x.CompletionItemKind.Module,x.CompletionItemKind.Property,x.CompletionItemKind.Unit,x.CompletionItemKind.Value,x.CompletionItemKind.Enum,x.CompletionItemKind.Keyword,x.CompletionItemKind.Snippet,x.CompletionItemKind.Color,x.CompletionItemKind.File,x.CompletionItemKind.Reference,x.CompletionItemKind.Folder,x.CompletionItemKind.EnumMember,x.CompletionItemKind.Constant,x.CompletionItemKind.Struct,x.CompletionItemKind.Event,x.CompletionItemKind.Operator,x.CompletionItemKind.TypeParameter],$G=[x.SymbolTag.Deprecated];(e=>{function n(t){let i=t;return i&&Qs(i.register)&&Qs(i.unregister)&&Qs(i.dispose)&&i.registrationType!==void 0}e.is=n})(QP||(QP={}));fo=class{constructor(e,t,i,r,o,s){this._client=e;this._event=t;this._type=i;this._middleware=r;this._createParams=o;this._selectorFilter=s;this._selectors=new Map}static textDocumentFilter(e,t){for(let i of e)if(y.match(i,t)>0)return!0;return!1}register(e){!e.registerOptions.documentSelector||(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))&&(this._middleware?this._middleware(e,t=>this._client.sendNotification(this._type,this._createParams(t))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(y.match(t,e))return{send:i=>{this.callback(i)}}}},XG=class extends fo{constructor(e,t){super(e,y.onDidOpenTextDocument,x.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,i=>({textDocument:IG(i)}),fo.textDocumentFilter);this._syncedDocuments=t}get registrationType(){return x.DidOpenTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.openClose&&this.register({id:qe(),registerOptions:{documentSelector:t}})}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=e.registerOptions.documentSelector;y.textDocuments.forEach(i=>{let r=i.uri.toString();if(!this._syncedDocuments.has(r)&&y.match(t,i)>0){let o=this._client.clientOptions.middleware,s=a=>{this._client.sendNotification(this._type,this._createParams(a))};o.didOpen?o.didOpen(i,s):s(i),this._syncedDocuments.set(r,i)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}},UG=class extends fo{constructor(e,t){super(e,y.onDidCloseTextDocument,x.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,i=>jG(i),fo.textDocumentFilter);this._syncedDocuments=t}get registrationType(){return x.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.openClose&&this.register({id:qe(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let i=this._selectors.values();this._syncedDocuments.forEach(r=>{if(y.match(t,r)>0&&!this._selectorFilter(i,r)){let o=this._client.clientOptions.middleware,s=a=>{this._client.sendNotification(this._type,this._createParams(a))};this._syncedDocuments.delete(r.uri.toString()),o.didClose?o.didClose(r,s):s(r)}})}},GG=class{constructor(e){this._client=e;this._changeData=new Map}get registrationType(){return x.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.change!==void 0&&i.change!==x.TextDocumentSyncKind.None&&this.register({id:qe(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:i.change})})}register(e){!e.registerOptions.documentSelector||(this._listener||(this._listener=y.onDidChangeTextDocument(t=>{this.callback({textDocument:t.textDocument,contentChanges:t.contentChanges.slice()})},this)),this._changeData.set(e.id,{documentSelector:e.registerOptions.documentSelector,syncKind:e.registerOptions.syncKind}))}callback(e){if(e.contentChanges.length===0)return;let t=y.getDocument(e.textDocument.uri);if(!t)return;let{textDocument:i}=t;for(let r of this._changeData.values())if(y.match(r.documentSelector,i)>0){let o=this._client.clientOptions.middleware;if(r.syncKind===x.TextDocumentSyncKind.Incremental){let s=a=>{this._client.sendNotification(x.DidChangeTextDocumentNotification.type,zi(a,["bufnr","original","originalLines"]))};o.didChange?o.didChange(e,s):s(e)}else if(r.syncKind===x.TextDocumentSyncKind.Full){let s=()=>{this._client.sendNotification(x.DidChangeTextDocumentNotification.type,AG(i))};o.didChange?o.didChange(e,s):s(e)}}}unregister(e){this._changeData.delete(e),this._changeData.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._changeData.values())if(y.match(t.documentSelector,e))return{send:i=>{this.callback(i)}}}},QG=class extends fo{constructor(e){super(e,y.onWillSaveTextDocument,x.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>XP(t),(t,i)=>fo.textDocumentFilter(t,i.document))}get registrationType(){return x.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.willSave&&this.register({id:qe(),registerOptions:{documentSelector:t}})}},KG=class{constructor(e){this._client=e;this._selectors=new Map}get registrationType(){return x.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.willSaveWaitUntil&&this.register({id:qe(),registerOptions:{documentSelector:t}})}register(e){!e.registerOptions.documentSelector||(this._listener||(this._listener=y.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){if(fo.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,i=r=>this._client.sendRequest(x.WillSaveTextDocumentWaitUntilRequest.type,XP(r)).then(o=>o||[],o=>(k.showMessage(`Error on willSaveWaitUntil: ${o}`,"error"),go.error(o),[]));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,i):i(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}},zG=class extends fo{constructor(e){super(e,y.onDidSaveTextDocument,x.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>OG(t,this._includeText),fo.textDocumentFilter);this._includeText=!1}get registrationType(){return x.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;if(t&&i&&i.save){let r=typeof i.save=="boolean"?{includeText:!1}:{includeText:!!i.save.includeText};this.register({id:qe(),registerOptions:Object.assign({},{documentSelector:t},r)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}},VG=class{constructor(e,t){this._notifyFileEvent=t;this._watchers=new Map}get registrationType(){return x.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){U(U(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let i of e.registerOptions.watchers){if(!Ee(i.globPattern))continue;let r=!0,o=!0,s=!0;i.kind!=null&&(r=(i.kind&x.WatchKind.Create)!==0,o=(i.kind&x.WatchKind.Change)!=0,s=(i.kind&x.WatchKind.Delete)!=0);let a=y.createFileSystemWatcher(i.globPattern,!r,!o,!s);this.hookListeners(a,r,o,s,t),t.push(a)}this._watchers.set(e.id,t)}registerRaw(e,t){let i=[];for(let r of t)i.push(r),this.hookListeners(r,!0,!0,!0,i);this._watchers.set(e,i)}hookListeners(e,t,i,r,o){t&&e.onDidCreate(s=>this._notifyFileEvent({uri:qf(s),type:x.FileChangeType.Created}),null,o),i&&e.onDidChange(s=>this._notifyFileEvent({uri:qf(s),type:x.FileChangeType.Changed}),null,o),r&&e.onDidDelete(s=>this._notifyFileEvent({uri:qf(s),type:x.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let i of t)i.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}},Me=class{constructor(e,t){this._client=e;this._registrationType=t;this._registrations=new Map}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(x.TextDocumentRegistrationOptions.is(t)){let i=x.StaticRegistrationOptions.hasId(t)?t.id:qe(),r=t.documentSelector||e;if(r)return[i,Object.assign({},t,{documentSelector:r})]}else if(Kn(t)&&t===!0||x.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let i=Kn(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[qe(),i]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return Kn(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let i=t.data.registerOptions.documentSelector;if(i!==null&&y.match(i,e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}},e6=class{constructor(e,t){this._client=e;this._registrationType=t;this._registrations=new Map}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}},t6=class extends Me{constructor(e){super(e,x.CompletionRequest.type)}fillClientCapabilities(e){let t=this._client.clientOptions.disableSnippetCompletion!==!0,i=U(U(e,"textDocument"),"completion");i.dynamicRegistration=!0,i.contextSupport=!0,i.completionItem={snippetSupport:t,commitCharactersSupport:!0,documentationFormat:this._client.supportedMarkupKind,deprecatedSupport:!0,preselectSupport:!0,insertReplaceSupport:!0,tagSupport:{valueSet:[x.CompletionItemTag.Deprecated]},resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[x.InsertTextMode.asIs,x.InsertTextMode.adjustIndentation]}},i.completionItemKind={valueSet:ZSe},i.insertTextMode=x.InsertTextMode.adjustIndentation}initialize(e,t){this.index=0;let i=this.getRegistrationOptions(t,e.completionProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t=e.triggerCharacters||[],i=e.allCommitCharacters||[],r=e.priority,o={provideCompletionItems:(l,u,c,h)=>{let d=this._client,g=this._client.clientOptions.middleware,f=(p,b,v,w)=>d.sendRequest(x.CompletionRequest.type,MG(p,b,v),w).then(D=>D!=null?D:[],D=>d.handleFailedRequest(x.CompletionRequest.type,w,D,[]));return g.provideCompletionItem?g.provideCompletionItem(l,u,h,c,f):f(l,u,h,c)},resolveCompletionItem:e.resolveProvider?(l,u)=>{let c=this._client,h=this._client.clientOptions.middleware,d=(g,f)=>c.sendRequest(x.CompletionResolveRequest.type,g,f).then(p=>p,p=>c.handleFailedRequest(x.CompletionResolveRequest.type,f,p,g));return h.resolveCompletionItem?h.resolveCompletionItem(l,u,d):d(l,u)}:void 0},s=this._client.id+(this.index?"-"+this.index:"");Lt.removeSource(s);let a=A.registerCompletionItemProvider(s,"LS",e.documentSelector||this._client.clientOptions.documentSelector,o,t,r,i);return this.index=this.index+1,[a,o]}},i6=class extends Me{constructor(e){super(e,x.HoverRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=this._client.supportedMarkupKind}initialize(e,t){let i=this.getRegistrationOptions(t,e.hoverProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideHover:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(x.HoverRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(x.HoverRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideHover?l.provideHover(i,r,o,a):a(i,r,o)}};return[A.registerHoverProvider(e.documentSelector,t),t]}},n6=class extends Me{constructor(e){super(e,x.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.contextSupport=!0,t.signatureInformation={documentationFormat:this._client.supportedMarkupKind,activeParameterSupport:!0,parameterInformation:{labelOffsetSupport:!0}}}initialize(e,t){let i=this.getRegistrationOptions(t,e.signatureHelpProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideSignatureHelp:(o,s,a,l)=>{let u=this._client,c=(d,g,f,p)=>u.sendRequest(x.SignatureHelpRequest.type,NG(d,g,f),p).then(b=>b,b=>u.handleFailedRequest(x.SignatureHelpRequest.type,p,b,null)),h=u.clientOptions.middleware;return h.provideSignatureHelp?h.provideSignatureHelp(o,s,l,a,c):c(o,s,l,a)}},i=e.triggerCharacters||[];return[A.registerSignatureHelpProvider(e.documentSelector,t,i),t]}},r6=class extends Me{constructor(e){super(e,x.DefinitionRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"definition");t.dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.definitionProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideDefinition:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(x.DefinitionRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(x.DefinitionRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideDefinition?l.provideDefinition(i,r,o,a):a(i,r,o)}};return[A.registerDefinitionProvider(e.documentSelector,t),t]}},o6=class extends Me{constructor(e){super(e,x.ReferencesRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.referencesProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideReferences:(i,r,o,s)=>{let a=this._client,l=(c,h,d,g)=>a.sendRequest(x.ReferencesRequest.type,BG(c,h,d),g).then(f=>f,f=>a.handleFailedRequest(x.ReferencesRequest.type,g,f,null)),u=a.clientOptions.middleware;return u.provideReferences?u.provideReferences(i,r,o,s,l):l(i,r,o,s)}};return[A.registerReferencesProvider(e.documentSelector,t),t]}},s6=class extends Me{constructor(e){super(e,x.DocumentHighlightRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentHighlightProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentHighlights:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(x.DocumentHighlightRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(x.DocumentHighlightRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,r,o,a):a(i,r,o)}};return[A.registerDocumentHighlightProvider(e.documentSelector,t),t]}},a6=class extends Me{constructor(e){super(e,x.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:JG},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:$G},t.labelSupport=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentSymbolProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentSymbols:(r,o)=>{let s=this._client,a=(u,c)=>s.sendRequest(x.DocumentSymbolRequest.type,HG(u),c).then(h=>{if(h!==null){if(h.length===0)return[];{let d=h[0];return x.DocumentSymbol.is(d),h}}},h=>s.handleFailedRequest(x.DocumentSymbolRequest.type,c,h,null)),l=s.clientOptions.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(r,o,a):a(r,o)}},i=e.label?{label:e.label}:void 0;return[A.registerDocumentSymbolProvider(e.documentSelector,t,i),t]}},l6=class extends e6{constructor(e){super(e,x.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=U(U(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:JG},t.tagSupport={valueSet:$G}}initialize(e){!e.workspaceSymbolProvider||this.register({id:qe(),registerOptions:e.workspaceSymbolProvider===!0?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){let t={provideWorkspaceSymbols:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(x.WorkspaceSymbolRequest.type,{query:l},u).then(c=>c,c=>o.handleFailedRequest(x.WorkspaceSymbolRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(i,r,s):s(i,r)}};return[A.registerWorkspaceSymbolProvider(t),t]}},u6=class extends Me{constructor(e){super(e,x.CodeActionRequest.type);this.disposables=[]}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.honorsChangeAnnotations=!1,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[x.CodeActionKind.Empty,x.CodeActionKind.QuickFix,x.CodeActionKind.Refactor,x.CodeActionKind.RefactorExtract,x.CodeActionKind.RefactorInline,x.CodeActionKind.RefactorRewrite,x.CodeActionKind.Source,x.CodeActionKind.SourceOrganizeImports]}}}initialize(e,t){let i=this.getRegistrationOptions(t,e.codeActionProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t=r=>{if(oe.has(r))return;let o=this._client,s=(l,u)=>{let c={command:l,arguments:u};return o.sendRequest(x.ExecuteCommandRequest.type,c).then(void 0,h=>{throw o.handleFailedRequest(x.ExecuteCommandRequest.type,void 0,h,void 0),h})},a=o.clientOptions.middleware;this.disposables.push(oe.registerCommand(r,(...l)=>a.executeCommand?a.executeCommand(r,l,s):s(r,l),null,!0))},i={provideCodeActions:(r,o,s,a)=>{let l=this._client,u=(h,d,g,f)=>{let p={textDocument:{uri:h.uri},range:d,context:g};return l.sendRequest(x.CodeActionRequest.type,p,f).then(b=>{if(b!==null)return b.forEach(v=>{var D;let w=x.Command.is(v)?v.command:(D=v.command)==null?void 0:D.command;w&&!oe.has(w)&&t(w)}),b},b=>l.handleFailedRequest(x.CodeActionRequest.type,f,b,null))},c=l.clientOptions.middleware;return c.provideCodeActions?c.provideCodeActions(r,o,s,a,u):u(r,o,s,a)},resolveCodeAction:e.resolveProvider?(r,o)=>{let s=this._client,a=this._client.clientOptions.middleware,l=(u,c)=>s.sendRequest(x.CodeActionResolveRequest.type,u,c).then(h=>h,h=>s.handleFailedRequest(x.CodeActionResolveRequest.type,c,h,u));return a.resolveCodeAction?a.resolveCodeAction(r,o,l):l(r,o)}:void 0};return[A.registerCodeActionProvider(e.documentSelector,i,this._client.id,e.codeActionKinds),i]}dispose(){this.disposables.forEach(e=>{e.dispose()}),this.disposables=[],super.dispose()}},c6=class extends Me{constructor(e){super(e,x.CodeLensRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"codeLens").dynamicRegistration=!0,U(U(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(x.CodeLensRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeCodeLensEmitter.fire()});let r=this.getRegistrationOptions(t,e.codeLensProvider);!r||this.register({id:qe(),registerOptions:r})}registerLanguageProvider(e){let t=new x.Emitter,i={onDidChangeCodeLenses:t.event,provideCodeLenses:(r,o)=>{let s=this._client,a=(u,c)=>s.sendRequest(x.CodeLensRequest.type,qG(u),c).then(h=>h,h=>s.handleFailedRequest(x.CodeLensRequest.type,c,h,null)),l=s.clientOptions.middleware;return l.provideCodeLenses?l.provideCodeLenses(r,o,a):a(r,o)},resolveCodeLens:e.resolveProvider?(r,o)=>{let s=this._client,a=(u,c)=>s.sendRequest(x.CodeLensResolveRequest.type,u,c).then(h=>h,h=>s.handleFailedRequest(x.CodeLensResolveRequest.type,c,h,u)),l=s.clientOptions.middleware;return l.resolveCodeLens?l.resolveCodeLens(r,o,a):a(r,o)}:void 0};return[A.registerCodeLensProvider(e.documentSelector,i),{provider:i,onDidChangeCodeLensEmitter:t}]}},h6=class extends Me{constructor(e){super(e,x.DocumentFormattingRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentFormattingProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentFormattingEdits:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:{uri:u.uri},options:c};return s.sendRequest(x.DocumentFormattingRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(x.DocumentFormattingRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,r,o,a):a(i,r,o)}};return[A.registerDocumentFormatProvider(e.documentSelector,t,this._client.clientOptions.formatterPriority),t]}},d6=class extends Me{constructor(e){super(e,x.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentRangeFormattingEdits:(i,r,o,s)=>{let a=this._client,l=(c,h,d,g)=>{let f={textDocument:{uri:c.uri},range:h,options:d};return a.sendRequest(x.DocumentRangeFormattingRequest.type,f,g).then(p=>p,p=>a.handleFailedRequest(x.DocumentRangeFormattingRequest.type,g,p,null))},u=a.clientOptions.middleware;return u.provideDocumentRangeFormattingEdits?u.provideDocumentRangeFormattingEdits(i,r,o,s,l):l(i,r,o,s)}};return[A.registerDocumentRangeFormatProvider(e.documentSelector,t),t]}},g6=class extends Me{constructor(e){super(e,x.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideOnTypeFormattingEdits:(o,s,a,l,u)=>{let c=this._client,h=(g,f,p,b,v)=>{let w={textDocument:vw(g),position:f,ch:p,options:b};return c.sendRequest(x.DocumentOnTypeFormattingRequest.type,w,v).then(D=>D,D=>c.handleFailedRequest(x.DocumentOnTypeFormattingRequest.type,v,D,null))},d=c.clientOptions.middleware;return d.provideOnTypeFormattingEdits?d.provideOnTypeFormattingEdits(o,s,a,l,u,h):h(o,s,a,l,u)}},i=e.moreTriggerCharacter||[],r=[e.firstTriggerCharacter,...i];return[A.registerOnTypeFormattingEditProvider(e.documentSelector,t,r),t]}},f6=class extends Me{constructor(e){super(e,x.RenameRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.renameProvider);!i||(Kn(e.renameProvider)&&(i.prepareProvider=!1),this.register({id:qe(),registerOptions:i}))}registerLanguageProvider(e){let t={provideRenameEdits:(i,r,o,s)=>{let a=this._client,l=(c,h,d,g)=>{let f={textDocument:{uri:c.uri},position:h,newName:d};return a.sendRequest(x.RenameRequest.type,f,g).then(p=>p,p=>a.handleFailedRequest(x.RenameRequest.type,g,p,null))},u=a.clientOptions.middleware;return u.provideRenameEdits?u.provideRenameEdits(i,r,o,s,l):l(i,r,o,s)},prepareRename:e.prepareProvider?(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:Xl(u),position:c};return s.sendRequest(x.PrepareRenameRequest.type,d,h).then(g=>x.Range.is(g)?g:this.isDefaultBehavior(g)?g.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):g&&x.Range.is(g.range)?{range:g.range,placeholder:g.placeholder}:Promise.reject(new Error("The element can't be renamed.")),g=>s.handleFailedRequest(x.PrepareRenameRequest.type,h,g,void 0))},l=s.clientOptions.middleware;return l.prepareRename?l.prepareRename(i,r,o,a):a(i,r,o)}:void 0};return[A.registerRenameProvider(e.documentSelector,t),t]}isDefaultBehavior(e){let t=e;return t&&Kn(t.defaultBehavior)}},p6=class extends Me{constructor(e){super(e,x.DocumentLinkRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentLinkProvider);!i||this.register({id:qe(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentLinks:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(x.DocumentLinkRequest.type,{textDocument:{uri:l.uri}},u).then(c=>c,c=>o.handleFailedRequest(x.DocumentLinkRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideDocumentLinks?a.provideDocumentLinks(i,r,s):s(i,r)},resolveDocumentLink:e.resolveProvider?(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(x.DocumentLinkResolveRequest.type,l,u).then(c=>c,c=>o.handleFailedRequest(x.DocumentLinkResolveRequest.type,u,c,l)),a=o.clientOptions.middleware;return a.resolveDocumentLink?a.resolveDocumentLink(i,r,s):s(i,r)}:void 0};return[A.registerDocumentLinkProvider(e.documentSelector,t),t]}},m6=class{constructor(e){this._client=e;this._listeners=new Map}get registrationType(){return x.DidChangeConfigurationNotification.type}fillClientCapabilities(e){U(U(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){var t;let e=(t=this._client.clientOptions.synchronize)==null?void 0:t.configurationSection;e!==void 0&&this.register({id:qe(),registerOptions:{section:e}})}register(e){let{section:t}=e.registerOptions,i=y.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,i),t!=null&&this.onDidChangeConfiguration(t,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let i=typeof e=="string"&&e.startsWith("languageserver."),r;if(Ee(e)?r=[e]:r=e,r!=null&&t!=null&&!r.some(l=>t.affectsConfiguration(l)))return;let o=a=>{if(a==null){this._client.sendNotification(x.DidChangeConfigurationNotification.type,{settings:null});return}this._client.sendNotification(x.DidChangeConfigurationNotification.type,{settings:i?this.getConfiguredSettings(a[0]):this.extractSettingsInformation(a)})},s=this.getMiddleware();s?s(r,o):o(r)}getConfiguredSettings(e){let t=9,i=y.getConfiguration(e.slice(0,-t));return aY(i.get("settings",{}))}extractSettingsInformation(e){function t(r,o){let s=r;for(let a=0;a=0?a=y.getConfiguration(o.substr(0,s)).get(o.substr(s+1)):a=y.getConfiguration(o),a){let l=e[r].split(".");t(i,l)[l[l.length-1]]=a}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;if(e.workspace&&e.workspace.didChangeConfiguration)return e.workspace.didChangeConfiguration}},b6=class{constructor(e){this._client=e;this._commands=new Map}get registrationType(){return x.ExecuteCommandRequest.type}fillClientCapabilities(e){U(U(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){!e.executeCommandProvider||this.register({id:qe(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,i=t.clientOptions.middleware,r=(o,s)=>{let a={command:o,arguments:s};return t.sendRequest(x.ExecuteCommandRequest.type,a).then(void 0,l=>{throw t.handleFailedRequest(x.ExecuteCommandRequest.type,void 0,l,void 0),l})};if(e.registerOptions.commands){let o=[];for(let s of e.registerOptions.commands)o.push(oe.registerCommand(s,(...a)=>i.executeCommand?i.executeCommand(s,a,r):r(s,a),null,!0));this._commands.set(e.id,o)}}unregister(e){let t=this._commands.get(e);t&&t.forEach(i=>i.dispose())}dispose(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};(e=>{function n(t){return t&&x.MessageReader.is(t.reader)&&x.MessageWriter.is(t.writer)}e.is=n})(mh||(mh={}));KP=class{constructor(e,t){this._resolve=e;this._reject=t;this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}},t_=class{constructor(e,t,i){this._features=[];this._dynamicFeatures=new Map;var l;this._id=e,this._name=t,i.outputChannel?this._outputChannel=i.outputChannel:this._outputChannel=void 0;let r=!1;(y.getConfiguration("suggest").get("snippetsSupport",!0)===!1||i.disableSnippetCompletion)&&(r=!0);let s={isTrusted:!1,supportHtml:!1};i.markdown!=null&&(s.isTrusted=i.markdown.isTrusted===!0,s.supportHtml=i.markdown.supportHtml===!0),this._clientOptions={disableSnippetCompletion:r,disableDynamicRegister:i.disableDynamicRegister,disabledFeatures:i.disabledFeatures||[],formatterPriority:i.formatterPriority,ignoredRootPaths:i.ignoredRootPaths,documentSelector:i.documentSelector||[],synchronize:i.synchronize||{},diagnosticCollectionName:i.diagnosticCollectionName,outputChannelName:i.outputChannelName||this._id,revealOutputChannelOn:i.revealOutputChannelOn||4,stdioEncoding:i.stdioEncoding||"utf8",initializationOptions:i.initializationOptions,initializationFailedHandler:i.initializationFailedHandler,progressOnInitialization:!!i.progressOnInitialization,errorHandler:i.errorHandler||this.createDefaultErrorHandler((l=i.connectionOptions)==null?void 0:l.maxRestartCount),middleware:i.middleware||{},workspaceFolder:i.workspaceFolder,connectionOptions:i.connectionOptions,markdown:s};for(let u of["disableCompletion","disableWorkspaceFolders","disableDiagnostics"])if(typeof i[u]=="boolean"){let c=`
-`+Error().stack.split(`
-`).slice(2,4).join(`
-`);if(go.warn(`${u} in the client options is deprecated. use disabledFeatures instead.`,c),this.warn(`${u} in the client options is deprecated. use disabledFeatures instead.`,c),i[u]===!0){let h=u.slice(7);this._clientOptions.disabledFeatures.push(h[0].toLowerCase()+h.slice(1))}}this.state=0,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new $P(250),this._onReady=new Promise((u,c)=>{this._onReadyCallbacks=new KP(u,c)}),this._onStop=void 0,this._stateChangeEmitter=new x.Emitter,this._trace=x.Trace.Off,this._tracer={log:(u,c)=>{Ee(u)?this.logTrace(u,c):this.logObjectTrace(u)}},this._syncedDocuments=new Map;let a=y.getConfiguration("coc.preferences");this._markdownSupport=a.get("enableMarkdown",!0),this.registerBuiltinFeatures()}get supportedMarkupKind(){return this._markdownSupport?[x.MarkupKind.Markdown,x.MarkupKind.PlainText]:[x.MarkupKind.PlainText]}get state(){return this._state}get id(){return this._id}get name(){return this._name}set state(e){let t=this.getPublicState();this._state=e;let i=this.getPublicState();i!==t&&this._stateChangeEmitter.fire({oldState:t,newState:i})}getPublicState(){return this.state===3?2:this.state===1?3:1}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.sendRequest(e,...t)}catch(i){throw this.error(`Sending request ${Ee(e)?e:e.method} failed.`,i),i}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onRequest(e,t)}catch(i){throw this.error(`Registering request handler ${Ee(e)?e:e.method} failed.`,i),i}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.sendNotification(e,t)}catch(i){throw this.error(`Sending notification ${Ee(e)?e:e.method} failed.`,i),i}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onNotification(e,t)}catch(i){throw this.error(`Registering notification handler ${Ee(e)?e:e.method} failed.`,i),i}}onProgress(e,t,i){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{if(e==x.WorkDoneProgress.type){let r=this._clientOptions.middleware.handleWorkDoneProgress;if(r!==void 0)return this._resolvedConnection.onProgress(e,t,o=>{r(t,o,()=>i(o))})}return this._resolvedConnection.onProgress(e,t,i)}catch(r){throw this.error(`Registering progress handler for token ${t} failed.`,r),r}}sendProgress(e,t,i){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.sendProgress(e,t,i)}catch(r){throw this.error(`Sending progress for token ${t} failed.`,r),r}}get clientOptions(){return this._clientOptions}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){if(!this._outputChannel){let{outputChannelName:e}=this._clientOptions;this._outputChannel=k.createOutputChannel(e||this._name)}return this._outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(e){return new ZG(this._id,e!=null?e:4)}set trace(e){this._trace=e,this.onReady().then(()=>{this.resolveConnection().then(t=>{t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})})},()=>{})}logObjectTrace(e){e.isLSPMessage&&e.type?this.outputChannel.append(`[LSP - ${new Date().toLocaleTimeString()}] `):this.outputChannel.append(`[Trace - ${new Date().toLocaleTimeString()}] `),e&&this.outputChannel.appendLine(`${JSON.stringify(e)}`)}data2String(e){if(e instanceof x.ResponseError){let t=e;return` Message: ${t.message}
- Code: ${t.code} ${t.data?`
-`+t.data.toString():""}`}return e instanceof Error?Ee(e.stack)?e.stack:e.message:Ee(e)?e:e.toString()}_appendOutput(e,t,i){let r=3;switch(e){case"Info":r=1;break;case"Warn":r=2;break}this.outputChannel.appendLine(`[${e} - ${new Date().toLocaleTimeString()}] ${t}`);let o;i&&(o=this.data2String(i),this.outputChannel.appendLine(o)),this._clientOptions.revealOutputChannelOn<=r&&this.outputChannel.show(!0)}info(e,t){this._appendOutput("Info",e,t)}warn(e,t){this._appendOutput("Warn",e,t)}error(e,t){this._appendOutput("Error",e,t)}logTrace(e,t){this.outputChannel.appendLine(`[Trace - ${new Date().toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t))}needsStart(){return this.state===0||this.state===4||this.state===5}needsStop(){return this.state===1||this.state===3}onReady(){return this._onReady}get started(){return this.state!=0}isConnectionActive(){return this.state===3&&!!this._resolvedConnection}start(){if(this._rootPath=this.resolveRootPath(),this._rootPath===!1)return this.warn("Required root pattern not resolved, server won't start."),x.Disposable.create(()=>{});if(this._onReadyCallbacks.isUsed&&(this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new KP(e,t)})),this._listeners=[],this._providers=[],!this._diagnostics){let e=this._clientOptions,t=e.diagnosticCollectionName?e.diagnosticCollectionName:this._id;e.disabledFeatures.includes("diagnostics")||(this._diagnostics=A.createDiagnosticCollection(t))}return this.state=1,this.resolveConnection().then(e=>(e.onLogMessage(t=>{let i;switch(t.type){case x.MessageType.Error:i="error",this.error(t.message);break;case x.MessageType.Warning:i="warning",this.warn(t.message);break;case x.MessageType.Info:i="info",this.info(t.message);break;default:i="log",this.outputChannel.appendLine(t.message)}if(global.hasOwnProperty("__TEST__")){console.log(`[${i}] ${t.message}`);return}}),e.onShowMessage(t=>{switch(t.type){case x.MessageType.Error:k.showErrorMessage(t.message);break;case x.MessageType.Warning:k.showWarningMessage(t.message);break;case x.MessageType.Info:k.showInformationMessage(t.message);break;default:k.showInformationMessage(t.message)}}),e.onRequest(x.ShowMessageRequest.type,t=>{let i;switch(t.type){case x.MessageType.Error:i=k.showErrorMessage.bind(k);break;case x.MessageType.Warning:i=k.showWarningMessage.bind(k);break;case x.MessageType.Info:i=k.showInformationMessage.bind(k);break;default:i=k.showInformationMessage.bind(k)}let r=t.actions||[];return i(t.message,...r).then(o=>o==null?null:o)}),e.onRequest(x.ShowDocumentRequest.type,async t=>{var o;let i=async s=>{try{if(s.external===!0||/^https?:\/\//.test(s.uri))return await y.openResource(s.uri),{success:!0};{let{selection:a,takeFocus:l}=s;return l===!1?await y.loadFile(s.uri):(await y.jumpTo(s.uri,a==null?void 0:a.start),De(a.start,a.end)!=0&&await k.selectRange(a)),{success:!0}}}catch{return{success:!0}}},r=(o=this._clientOptions.middleware.window)==null?void 0:o.showDocument;return r!==void 0?r(t,i):i(t)}),e.onTelemetry(t=>{}),e.listen(),this.initialize(e))).then(void 0,e=>{this.state=2,this._onReadyCallbacks.reject(e),this.error("Starting client failed ",e)}),x.Disposable.create(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}resolveRootPath(){if(this._clientOptions.workspaceFolder)return O.parse(this._clientOptions.workspaceFolder.uri).fsPath;let{ignoredRootPaths:e}=this._clientOptions,t=y.getConfiguration(this.id),i=t.get("rootPatterns",[]),r=t.get("requireRootPattern",!1),o;if(i&&i.length){let a=y.getDocument(y.bufnr);if(a&&a.schema=="file"){let l=GP.default.dirname(O.parse(a.uri).fsPath);o=mb(l,i,y.cwd)}}if(r&&!o)return!1;let s=o||y.rootPath||y.cwd;return ii(s,YG.default.homedir())||Array.isArray(e)&&e.some(a=>ii(s,a))?(this.warn(`Ignored rootPath ${s} of client "${this._id}"`),null):s}initialize(e){let{initializationOptions:t,progressOnInitialization:i}=this._clientOptions;this.refreshTrace(e,!1);let r=this._rootPath,o={processId:process.pid,rootPath:r||null,rootUri:r?qf(O.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:Qs(t)?t():t,trace:x.Trace.toString(this._trace),workspaceFolders:null,locale:this.getLocale(),clientInfo:{name:"coc.nvim",version:y.version}};if(this.fillInitializeParams(o),i){let s=qe();o.workDoneToken=s;let a=new Hf(this._id,e,s);return a.begin({title:`Initializing ${this.id}`,kind:"begin"}),this.doInitialize(e,o).then(l=>(a.done(),l),l=>{throw a.cancel(),l})}else return this.doInitialize(e,o)}doInitialize(e,t){return e.initialize(t).then(i=>{this._resolvedConnection=e,this._initializeResult=i,this.state=3;let r;return ib(i.capabilities.textDocumentSync)?i.capabilities.textDocumentSync===x.TextDocumentSyncKind.None?r={openClose:!1,change:x.TextDocumentSyncKind.None,save:void 0}:r={openClose:!0,change:i.capabilities.textDocumentSync,save:{includeText:!1}}:i.capabilities.textDocumentSync!=null&&i.capabilities.textDocumentSync!==void 0&&(r=i.capabilities.textDocumentSync),this._capabilities=Object.assign({},i.capabilities,{resolvedTextDocumentSync:r}),e.onDiagnostics(o=>this.handleDiagnostics(o)),e.onRequest(x.RegistrationRequest.type,o=>this.handleRegistrationRequest(o)),e.onRequest("client/registerFeature",o=>this.handleRegistrationRequest(o)),e.onRequest(x.UnregistrationRequest.type,o=>this.handleUnregistrationRequest(o)),e.onRequest("client/unregisterFeature",o=>this.handleUnregistrationRequest(o)),e.onRequest(x.ApplyWorkspaceEditRequest.type,o=>this.handleApplyWorkspaceEdit(o)),e.sendNotification(x.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),i}).then(void 0,i=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(i)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(i)):i instanceof x.ResponseError&&i.data&&i.data.retry?k.showPrompt(i.message+" Retry?").then(r=>{r?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(i))}):(i&&i.message&&k.showMessage(i.message,"error"),this.error("Server initialization failed.",i),this.stop(),this._onReadyCallbacks.reject(i)),i})}stop(){if(this._initializeResult=void 0,!this._connectionPromise)return this.state=5,Promise.resolve();if(this.state===4&&this._onStop)return this._onStop;this.state=4,this.cleanUp();let e=this.resolveConnection().then(t=>{let i=!1,r=setTimeout(()=>{i=!0,t.end(),t.dispose()},2e3);return t.shutdown().then(()=>(clearTimeout(r),t.exit(),t),o=>{if(!i)throw t.end(),t.dispose(),o})});return(this._onStop=e.then(t=>{t&&t.unlisten()},t=>{throw go.error("Stopping server failed:",t),this.error("Stopping server failed",t),t})).finally(()=>{this.state=5,this.cleanUpChannel(),this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0})}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach(i=>i.dispose()),this._listeners=void 0),this._providers&&(this._providers.forEach(i=>i.dispose()),this._providers=void 0);for(let i of this._features.values())typeof i.dispose=="function"?i.dispose():go.error("Feature can't be disposed",i);this._syncedDocuments&&this._syncedDocuments.clear(),e&&this.cleanUpChannel(),this._diagnostics&&(t?(this._diagnostics.dispose(),this._diagnostics=void 0):this._diagnostics.clear())}cleanUpChannel(){this._outputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){var o;let t=this;function i(s){t._fileEvents.push(s),t._fileEventDelayer.trigger(()=>{t.onReady().then(()=>{t.resolveConnection().then(a=>{t.isConnectionActive()&&a.didChangeWatchedFiles({changes:t._fileEvents}),t._fileEvents=[]})},a=>{t.error("Notify file events failed.",a)})})}let r=(o=this.clientOptions.middleware)==null?void 0:o.workspace;r!=null&&r.didChangeWatchedFile?r.didChangeWatchedFile(e,i):i(e)}handleDiagnostics(e){if(!this._diagnostics)return;let{uri:t,diagnostics:i,version:r}=e;if(typeof r=="number"){let s=y.getDocument(t);if(!s||s.version!=r)return}let o=this.clientOptions.middleware.handleDiagnostics;o?o(t,i,(s,a)=>this.setDiagnostics(s,a)):this.setDiagnostics(t,i)}setDiagnostics(e,t){var r;if(!this._diagnostics)return;if(y.getConfiguration("diagnostic").get("separateRelatedInformationAsDiagnostics")&&t.length>0){let o=new Map;o.set(e,t);for(let s of t){if((r=s.relatedInformation)!=null&&r.length){let a=`${s.message}
-
-Related diagnostics:
-`;for(let l of s.relatedInformation){let u=GP.default.basename(O.parse(l.location.uri).fsPath),c=l.location.range.start.line;a=`${a}
-${u}(line ${c+1}): ${l.message}`;let h=o.get(l.location.uri)||[];h.push(x.Diagnostic.create(l.location.range,l.message,x.DiagnosticSeverity.Hint,s.code,s.source)),o.set(l.location.uri,h)}s.message=a}this._diagnostics.set(Array.from(o))}}else this._diagnostics.set(e,t)}createConnection(){let e=(i,r,o)=>{go.error("connection error:",i,r),this.handleConnectionError(i,r,o)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(i=>WSe(i.reader,i.writer,e,t,this._clientOptions.connectionOptions))}handleConnectionClosed(){if(this.state===5){go.debug(`client ${this._id} normal close`);return}try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch{}let e=1;if(this.state!==4)try{e=this._clientOptions.errorHandler.closed()}catch{}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===1?(this.error("Connection to server got closed. Server will not be restarted."),this.state===1?(this._onReadyCallbacks.reject(new Error("Connection to server got closed. Server will not be restarted.")),this.state=2):this.state=5,this.cleanUp(!1,!0)):e===2&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!0),this.state=0,this.start())}restart(){this.cleanUp(!0,!1),this.start()}handleConnectionError(e,t,i){this._clientOptions.errorHandler.error(e,t,i)===2&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){y.onDidChangeConfiguration(t=>{t.affectsConfiguration(this._id)&&this.refreshTrace(e,!0)},null,this._listeners)}refreshTrace(e,t=!1){let i=y.getConfiguration(this._id),r=x.Trace.Off,o=x.TraceFormat.Text;if(i){let s=i.get("trace.server","off");typeof s=="string"?r=x.Trace.fromString(s):(r=x.Trace.fromString(i.get("trace.server.verbosity","off")),o=x.TraceFormat.fromString(i.get("trace.server.format","text")))}t&&this._trace==r&&this._traceFormat==o||(this._trace=r,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}))}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let i;Array.isArray(t)?i=t:i=[t],i&&this._dynamicFeatures.get(x.DidChangeWatchedFilesNotification.type.method).registerRaw(qe(),i)}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),QP.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}registerBuiltinFeatures(){let{disabledFeatures:e}=this._clientOptions;e.includes("configuration")||this.registerFeature(new m6(this)),this.registerFeature(new XG(this,this._syncedDocuments)),this.registerFeature(new GG(this)),this.registerFeature(new UG(this,this._syncedDocuments)),e.includes("willSave")||this.registerFeature(new QG(this)),e.includes("willSaveWaitUntil")||this.registerFeature(new KG(this)),e.includes("didSave")||this.registerFeature(new zG(this)),e.includes("fileSystemWatcher")||this.registerFeature(new VG(this,t=>this.notifyFileEvent(t))),e.includes("completion")||this.registerFeature(new t6(this)),e.includes("hover")||this.registerFeature(new i6(this)),e.includes("signatureHelp")||this.registerFeature(new n6(this)),e.includes("references")||this.registerFeature(new o6(this)),e.includes("definition")||this.registerFeature(new r6(this)),e.includes("documentHighlight")||this.registerFeature(new s6(this)),e.includes("documentSymbol")||this.registerFeature(new a6(this)),e.includes("codeAction")||this.registerFeature(new u6(this)),e.includes("workspaceSymbol")||this.registerFeature(new l6(this)),e.includes("codeLens")||this.registerFeature(new c6(this)),e.includes("documentFormatting")||this.registerFeature(new h6(this)),e.includes("documentRangeFormatting")||this.registerFeature(new d6(this)),e.includes("documentOnTypeFormatting")||this.registerFeature(new g6(this)),e.includes("rename")||this.registerFeature(new f6(this)),e.includes("documentLink")||this.registerFeature(new p6(this)),e.includes("executeCommand")||this.registerFeature(new b6(this))}fillInitializeParams(e){for(let t of this._features)Qs(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};U(e,"workspace").applyEdit=!0;let t=U(U(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[x.ResourceOperationKind.Create,x.ResourceOperationKind.Rename,x.ResourceOperationKind.Delete],t.failureHandling=x.FailureHandlingKind.Undo,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!1};let i=U(U(e,"textDocument"),"publishDiagnostics");i.relatedInformation=!0,i.versionSupport=!0,i.tagSupport={valueSet:[x.DiagnosticTag.Unnecessary,x.DiagnosticTag.Deprecated]},i.codeDescriptionSupport=!0,i.dataSupport=!0;let r=U(e,"window"),o=U(r,"showMessage");o.messageActionItem={additionalPropertiesSupport:!0};let s=U(r,"showDocument");s.support=!0;let a=U(e,"general");a.regularExpressions={engine:"ECMAScript",version:"ES2020"},a.markdown={parser:"marked",version:"4.0.10"};for(let l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let i of this._features)i.initialize(this._capabilities,t)}handleRegistrationRequest(e){return this.clientOptions.disableDynamicRegister?Promise.resolve():new Promise((t,i)=>{for(let r of e.registrations){let o=this._dynamicFeatures.get(r.method);if(!o){i(new Error(`No feature implementation for ${r.method} found. Registration failed.`));return}let s=r.registerOptions||{};s.documentSelector=s.documentSelector||this._clientOptions.documentSelector;let a={id:r.id,registerOptions:s};try{o.register(a)}catch(l){i(l);return}}t()})}handleUnregistrationRequest(e){return new Promise((t,i)=>{for(let r of e.unregisterations){let o=this._dynamicFeatures.get(r.method);if(!o){i(new Error(`No feature implementation for ${r.method} found. Unregistration failed.`));return}o.unregister(r.id)}t()})}handleApplyWorkspaceEdit(e){let t=e.edit,i=new Map;y.textDocuments.forEach(o=>i.set(o.uri.toString(),o));let r=!1;if(t.documentChanges){for(let o of t.documentChanges)if(x.TextDocumentEdit.is(o)&&o.textDocument.version&&o.textDocument.version>=0){let s=i.get(o.textDocument.uri);if(s&&s.version!==o.textDocument.version){r=!0;break}}}return r?Promise.resolve({applied:!1}):y.applyEdit(e.edit).then(o=>({applied:o}))}getLocale(){let e=process.env.LANG;return e?e.split(".")[0]:"en"}handleFailedRequest(e,t,i,r){if(i instanceof x.ResponseError){if(i.code===x.LSPErrorCodes.RequestCancelled){if(t!==void 0&&t.isCancellationRequested)return r}else if(i.code===x.LSPErrorCodes.ContentModified)return r}this.error(`Request ${e.method} failed.`,i)}logFailedRequest(e,t){t instanceof x.ResponseError&&t.code===x.LSPErrorCodes.RequestCancelled||this.error(`Request ${e.method} failed.`,t)}}});var Gl,i_,y6=_(()=>{"use strict";Gl=C(H());Ce();Dn();"use strict";i_=class extends Me{constructor(e){super(e,Gl.DocumentColorRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.colorProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideColorPresentations:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={color:u,textDocument:{uri:c.document.uri},range:c.range};return s.sendRequest(Gl.ColorPresentationRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(Gl.ColorPresentationRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,r,o,a):a(i,r,o)},provideDocumentColors:(i,r)=>{let o=this._client,s=(l,u)=>{let c={textDocument:{uri:l.uri}};return o.sendRequest(Gl.DocumentColorRequest.type,c,u).then(h=>h,h=>o.handleFailedRequest(Gl.ColorPresentationRequest.type,u,h,null))},a=o.clientOptions.middleware;return a.provideDocumentColors?a.provideDocumentColors(i,r,s):s(i,r)}};return[A.registerDocumentColorProvider(e.documentSelector,t),t]}}});function Wf(n){if(n){if(Array.isArray(n))return n.map(Wf);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Wf(n[t]));return e}}return n}var v6,qWe,n_,w6=_(()=>{"use strict";v6=C(H());V();qWe=q()("languageclient-configuration"),n_=class{constructor(e){this._client=e;var i;let t=(i=this._client.clientOptions.synchronize)==null?void 0:i.configurationSection;typeof t=="string"&&t.startsWith("languageserver.")&&(this.languageserverSection=t)}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(v6.ConfigurationRequest.type,(t,i)=>{let r=s=>{let a=[];for(let l of s.items)a.push(this.getConfiguration(l.scopeUri,l.section));return a},o=e.clientOptions.middleware.workspace;return o&&o.configuration?o.configuration(t,i,r):r(t,i)})}getConfiguration(e,t){let i=null;if(t){this.languageserverSection&&(t=`${this.languageserverSection}.${t}`);let r=t.lastIndexOf(".");if(r===-1)i=Wf(y.getConfiguration(void 0,e).get(t));else{let o=y.getConfiguration(t.substr(0,r),e);o&&(i=Wf(o.get(t.substr(r+1))))}}else{let r=y.getConfiguration(this.languageserverSection,e);i={};for(let o of Object.keys(r))r.has(o)&&(i[o]=Wf(r.get(o)))}return i}dispose(){}}});var Sw,r_,D6=_(()=>{"use strict";Sw=C(H());Ce();Dn();_a();"use strict";r_=class extends Me{constructor(e){super(e,Sw.DeclarationRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"declaration");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.declarationProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideDeclaration:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(Sw.DeclarationRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(Sw.DeclarationRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideDeclaration?l.provideDeclaration(i,r,o,a):a(i,r,o)}};return[A.registerDeclarationProvider(e.documentSelector,t),t]}}});var Tw,o_,x6=_(()=>{"use strict";Tw=C(H());Ce();Dn();"use strict";o_=class extends Me{constructor(e){super(e,Tw.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.foldingRangeProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideFoldingRanges:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:{uri:u.uri}};return s.sendRequest(Tw.FoldingRangeRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(Tw.FoldingRangeRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideFoldingRanges?l.provideFoldingRanges(i,r,o,a):a(i,r,o)}};return[A.registerFoldingRangeProvider(e.documentSelector,t),t]}}});var kw,s_,C6=_(()=>{"use strict";kw=C(H());Ce();Dn();_a();s_=class extends Me{constructor(e){super(e,kw.ImplementationRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"implementation");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.implementationProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideImplementation:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(kw.ImplementationRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(kw.ImplementationRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideImplementation?l.provideImplementation(i,r,o,a):a(i,r,o)}};return[A.registerImplementationProvider(e.documentSelector,t),t]}}});var S6,a_,T6=_(()=>{"use strict";S6=C(H());Dn();ZP();"use strict";a_=class{constructor(e){this._client=e;this.activeParts=new Set}fillClientCapabilities(e){U(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=r=>{this.activeParts.delete(r)},i=r=>{this.activeParts.add(new Hf(this._client.id,this._client,r.token,t))};e.onRequest(S6.WorkDoneProgressCreateRequest.type,i)}dispose(){for(let e of this.activeParts)e.done();this.activeParts.clear()}}});var Ew,l_,k6=_(()=>{"use strict";Ew=C(H());Ce();Dn();_a();l_=class extends Me{constructor(e){super(e,Ew.TypeDefinitionRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.typeDefinitionProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideTypeDefinition:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(Ew.TypeDefinitionRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(Ew.TypeDefinitionRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,r,o,a):a(i,r,o)}};return[A.registerTypeDefinitionProvider(e.documentSelector,t),t]}}});function u_(n,e){if(n!==void 0)return n[e]}function E6(n,e){return n.filter(t=>!e.includes(t))}var Zf,cZe,c_,P6=_(()=>{"use strict";Zf=C(H());we();Je();V();ww();"use strict";cZe=q()("language-client-workspaceFolder");c_=class{constructor(e){this._client=e;this._listeners=new Map}get registrationType(){return Zf.DidChangeWorkspaceFoldersNotification.type}getValidWorkspaceFolders(){let{workspaceFolders:e}=y;if(!e||e.length==0)return;let{ignoredRootPaths:t}=this._client.clientOptions;Array.isArray(t)||(t=[]);let i=e.filter(r=>{let o=O.parse(r.uri).fsPath;return t.every(s=>!ii(s,o))});return i.length?i:void 0}asProtocol(e){return e==null?null:{uri:e.uri,name:e.name}}fillInitializeParams(e){let t=this.getValidWorkspaceFolders();this._initialFolders=t,t==null?(this._client.warn("No valid workspaceFolder exists"),e.workspaceFolders=null):e.workspaceFolders=t.map(i=>this.asProtocol(i))}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(Zf.WorkspaceFoldersRequest.type,o=>{let s=()=>{let l=this.getValidWorkspaceFolders();return l===void 0?null:l.map(c=>this.asProtocol(c))},a=t.clientOptions.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(o,s):s(o)});let i=u_(u_(u_(e,"workspace"),"workspaceFolders"),"changeNotifications"),r;typeof i=="string"?r=i:i===!0&&(r=qe()),r&&this.register({id:r,registerOptions:void 0})}doSendEvent(e,t){let i={event:{added:e.map(r=>this.asProtocol(r)),removed:t.map(r=>this.asProtocol(r))}};this._client.sendNotification(Zf.DidChangeWorkspaceFoldersNotification.type,i)}sendInitialEvent(e){if(this._initialFolders&&e){let t=E6(this._initialFolders,e),i=E6(e,this._initialFolders);(i.length>0||t.length>0)&&this.doSendEvent(i,t)}else this._initialFolders?this.doSendEvent([],this._initialFolders):e&&this.doSendEvent(e,[])}register(e){let t=e.id,i=this._client,r=y.onDidChangeWorkspaceFolders(s=>{let a=u=>{this.doSendEvent(u.added,u.removed)},l=i.clientOptions.middleware.workspace;l&&l.didChangeWorkspaceFolders?l.didChangeWorkspaceFolders(s,a):a(s)});this._listeners.set(t,r);let o=this.getValidWorkspaceFolders();this.sendInitialEvent(o)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}}});var Pw,h_,_6=_(()=>{"use strict";Pw=C(H());Ce();Dn();"use strict";h_=class extends Me{constructor(e){super(e,Pw.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.selectionRangeProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideSelectionRanges:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:{uri:u.uri},positions:c};return s.sendRequest(Pw.SelectionRangeRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(Pw.SelectionRangeRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,r,o,a):a(i,r,o)}};return[A.registerSelectionRangeProvider(e.documentSelector,t),t]}}});var po,d_,R6=_(()=>{"use strict";po=C(H());Ce();Dn();_a();"use strict";d_=class extends Me{constructor(e){super(e,po.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let i=U(U(e,"textDocument"),"callHierarchy");i.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.callHierarchyProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={prepareCallHierarchy:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d=wn(u,c);return s.sendRequest(po.CallHierarchyPrepareRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(po.CallHierarchyPrepareRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.prepareCallHierarchy?l.prepareCallHierarchy(i,r,o,a):a(i,r,o)},provideCallHierarchyIncomingCalls:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(po.CallHierarchyIncomingCallsRequest.type,{item:l},u).then(c=>c,c=>o.handleFailedRequest(po.CallHierarchyIncomingCallsRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideCallHierarchyIncomingCalls?a.provideCallHierarchyIncomingCalls(i,r,s):s(i,r)},provideCallHierarchyOutgoingCalls:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(po.CallHierarchyOutgoingCallsRequest.type,{item:l},u).then(c=>c,c=>o.handleFailedRequest(po.CallHierarchyOutgoingCallsRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideCallHierarchyOutgoingCalls?a.provideCallHierarchyOutgoingCalls(i,r,s):s(i,r)}};return[A.registerCallHierarchyProvider(e.documentSelector,t),t]}}});var ue,sJe,g_,L6=_(()=>{"use strict";ue=C(H());Ce();In();Dn();_a();"use strict";sJe=q()("languageclient-semanticTokens"),g_=class extends Me{constructor(e){super(e,ue.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[ue.SemanticTokenTypes.namespace,ue.SemanticTokenTypes.type,ue.SemanticTokenTypes.class,ue.SemanticTokenTypes.enum,ue.SemanticTokenTypes.interface,ue.SemanticTokenTypes.struct,ue.SemanticTokenTypes.typeParameter,ue.SemanticTokenTypes.parameter,ue.SemanticTokenTypes.variable,ue.SemanticTokenTypes.property,ue.SemanticTokenTypes.enumMember,ue.SemanticTokenTypes.event,ue.SemanticTokenTypes.function,ue.SemanticTokenTypes.method,ue.SemanticTokenTypes.macro,ue.SemanticTokenTypes.keyword,ue.SemanticTokenTypes.modifier,ue.SemanticTokenTypes.comment,ue.SemanticTokenTypes.string,ue.SemanticTokenTypes.number,ue.SemanticTokenTypes.regexp,ue.SemanticTokenTypes.operator],t.tokenModifiers=[ue.SemanticTokenModifiers.declaration,ue.SemanticTokenModifiers.definition,ue.SemanticTokenModifiers.readonly,ue.SemanticTokenModifiers.static,ue.SemanticTokenModifiers.deprecated,ue.SemanticTokenModifiers.abstract,ue.SemanticTokenModifiers.async,ue.SemanticTokenModifiers.modification,ue.SemanticTokenModifiers.documentation,ue.SemanticTokenModifiers.defaultLibrary],t.formats=[ue.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,U(U(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(ue.SemanticTokensRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeSemanticTokensEmitter.fire()});let[r,o]=this.getRegistration(t,e.semanticTokensProvider);!r||!o||this.register({id:r,registerOptions:o})}registerLanguageProvider(e){let t=Kn(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,r=new ue.Emitter,o=t?{onDidChangeSemanticTokens:r.event,provideDocumentSemanticTokens:(u,c)=>{let h=this._client,d=h.clientOptions.middleware,g=(f,p)=>{let b={textDocument:Xl(f)};return h.sendRequest(ue.SemanticTokensRequest.type,b,p).then(v=>v,v=>h.handleFailedRequest(ue.SemanticTokensRequest.type,p,v,null))};return d.provideDocumentSemanticTokens?d.provideDocumentSemanticTokens(u,c,g):g(u,c)},provideDocumentSemanticTokensEdits:i?(u,c,h)=>{let d=this._client,g=d.clientOptions.middleware,f=(p,b,v)=>{let w={textDocument:Xl(p),previousResultId:b};return d.sendRequest(ue.SemanticTokensDeltaRequest.type,w,v).then(D=>D,D=>d.handleFailedRequest(ue.SemanticTokensDeltaRequest.type,v,D,null))};return g.provideDocumentSemanticTokensEdits?g.provideDocumentSemanticTokensEdits(u,c,h,f):f(u,c,h)}:void 0}:void 0,a=e.range===!0?{provideDocumentRangeSemanticTokens:(u,c,h)=>{let d=this._client,g=d.clientOptions.middleware,f=(p,b,v)=>{let w={textDocument:Xl(p),range:b};return d.sendRequest(ue.SemanticTokensRangeRequest.type,w,v).then(D=>D,D=>d.handleFailedRequest(ue.SemanticTokensRangeRequest.type,v,D,null))};return g.provideDocumentRangeSemanticTokens?g.provideDocumentRangeSemanticTokens(u,c,h,f):f(u,c,h)}}:void 0,l=[];return o!==void 0&&l.push(A.registerDocumentSemanticTokensProvider(e.documentSelector,o,e.legend)),a!==void 0&&l.push(A.registerDocumentRangeSemanticTokensProvider(e.documentSelector,a,e.legend)),[ue.Disposable.create(()=>l.forEach(u=>u.dispose())),{range:a,full:o,onDidChangeSemanticTokensEmitter:r}]}}});var _w,wJe,f_,F6=_(()=>{"use strict";_w=C(H());Ce();Dn();_a();wJe=q()("languageclient-linkedEditingRange"),f_=class extends Me{constructor(e){super(e,_w.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"linkedEditingRange");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.linkedEditingRangeProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideLinkedEditingRanges:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d=wn(u,c);return s.sendRequest(_w.LinkedEditingRangeRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(_w.LinkedEditingRangeRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,r,o,a):a(i,r,o)}};return[A.registerLinkedEditingRangeProvider(e.documentSelector,t),t]}}});function JSe(n,e){return n[e]}function I6(n,e,t){n[e]=t}function Rw(n){return{files:n.files.map(e=>({uri:e.toString()}))}}function A6(n){return{files:n.files.map(e=>({oldUri:e.oldUri.toString(),newUri:e.newUri.toString()}))}}var j6,Oi,KJe,Ql,Lw,p_,m_,b_,Fw,y_,v_,w_,O6=_(()=>{"use strict";j6=C(Vn()),Oi=C(H());Fr();Je();V();Dn();ww();KJe=q()("language-client-fileOperations");Ql=class{constructor(e,t,i,r,o){this._filters=new Map;this._client=e,this._event=t,this._registrationType=i,this._clientCapability=r,this._serverCapability=o}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=U(U(e,"workspace"),"fileOperations");I6(t,"dynamicRegistration",!0),I6(t,this._clientCapability,!0)}initialize(e){var r;let t=(r=e.workspace)==null?void 0:r.fileOperations,i=t!==void 0?JSe(t,this._serverCapability):void 0;if((i==null?void 0:i.filters)!==void 0)try{this.register({id:qe(),registerOptions:{filters:i.filters}})}catch(o){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${o}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(i=>{let r=new j6.Minimatch(i.pattern.glob,Ql.asMinimatchOptions(i.pattern.options));if(!r.makeRe())throw new Error(`Invalid pattern ${i.pattern.glob}!`);return{scheme:i.scheme,matcher:r,kind:i.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}async filter(e,t){let i=await Promise.all(e.files.map(async o=>{let s=t(o),a=s.fsPath.replace(/\\/g,"/");for(let l of this._filters.values())for(let u of l)if(!(u.scheme!==void 0&&u.scheme!==s.scheme)){if(u.matcher.match(a)){if(u.kind===void 0)return!0;let c=await Ql.getFileType(s);if(c===void 0)return this._client.error(`Failed to determine file type for ${s.toString()}.`),!0;if(c===1&&u.kind===Oi.FileOperationPatternKind.file||c===2&&u.kind===Oi.FileOperationPatternKind.folder)return!0}else if(u.kind===Oi.FileOperationPatternKind.folder&&await Ql.getFileType(s)===2&&u.matcher.match(`${a}/`))return!0}return!1})),r=e.files.filter((o,s)=>i[s]);return Ba(ge({},e),{files:r})}static async getFileType(e){try{let t=await Ht(e.fsPath);return t.isFile()?1:t.isDirectory()?2:t.isSymbolicLink()?64:0}catch{return}}static asMinimatchOptions(e){if(e!==void 0&&e.ignoreCase===!0)return{nocase:!0}}},Lw=class extends Ql{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o);this._notificationType=i,this._accessUri=s,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let i=async r=>{this._client.sendNotification(this._notificationType,this._createParams(r))};this.doSend(t,i)}}},p_=class extends Lw{constructor(e){super(e,y.onDidCreateFiles,Oi.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,t=>Rw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.didCreateFiles?i.didCreateFiles(e,t):t(e)}},m_=class extends Lw{constructor(e){super(e,y.onDidRenameFiles,Oi.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,t=>A6(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.didRenameFiles?i.didRenameFiles(e,t):t(e)}},b_=class extends Lw{constructor(e){super(e,y.onDidDeleteFiles,Oi.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,t=>Rw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.didDeleteFiles?i.didDeleteFiles(e,t):t(e)}},Fw=class extends Ql{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o);this._requestType=i,this._accessUri=s,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let i=r=>this._client.sendRequest(this._requestType,this._createParams(r));return this.doSend(t,i)}else return}},y_=class extends Fw{constructor(e){super(e,y.onWillCreateFiles,Oi.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,t=>Rw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.willCreateFiles?i.willCreateFiles(e,t):t(e)}},v_=class extends Fw{constructor(e){super(e,y.onWillRenameFiles,Oi.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,t=>A6(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.willRenameFiles?i.willRenameFiles(e,t):t(e)}},w_=class extends Fw{constructor(e){super(e,y.onWillDeleteFiles,Oi.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,t=>Rw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.willDeleteFiles?i.willDeleteFiles(e,t):t(e)}}});var as,Iw,bh,ht,y$e,D_,x_,jw,yh,C_,S_,T_,Jf,k_,$Se,E_=_(()=>{"use strict";as=C(require("child_process")),Iw=C(require("fs")),bh=C(require("path")),ht=C(PG());Fr();z();In();RG();V();Dn();y6();w6();D6();x6();C6();T6();k6();P6();_6();R6();L6();F6();O6();Dn();y$e=as.default.ChildProcess,D_=q()("language-client-index");(e=>{function n(t){return Ee(t.command)}e.is=n})(x_||(x_={}));jw=(r=>(r[r.stdio=0]="stdio",r[r.ipc=1]="ipc",r[r.pipe=2]="pipe",r[r.socket=3]="socket",r))(jw||{});(e=>{function n(t){let i=t;return i&&i.kind===3&&ib(i.port)}e.isSocket=n})(yh||(yh={}));(e=>{function n(t){return Ee(t.module)}e.is=n})(C_||(C_={}));(e=>{function n(t){let i=t;return i&&i.writer!==void 0&&i.reader!==void 0}e.is=n})(S_||(S_={}));(e=>{function n(t){let i=t;return i&&i.process!==void 0&&typeof i.detached=="boolean"}e.is=n})(T_||(T_={}));Jf=class extends t_{constructor(e,t,i,r,o){let s,a,l,u,c;Ee(t)?(s=e,a=t,l=i,u=r,c=!!o):(s=e.toLowerCase(),a=e,l=t,u=i,c=r),c===void 0&&(c=!1);super(s,a,u);this._serverOptions=l,this._forceDebug=c,this.registerProposedFeatures()}stop(){return super.stop().then(()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(e),this._isDetached=void 0}})}get serviceState(){let e=this._state;switch(e){case 0:return 0;case 3:return 3;case 2:return 2;case 1:return 1;case 5:return 5;case 4:return 4;default:return D_.error(`Unknown state: ${e}`),5}}static stateName(e){switch(e){case 0:return"Initial";case 3:return"Running";case 2:return"StartFailed";case 1:return"Starting";case 5:return"Stopped";case 4:return"Stopping";default:return"Unknown"}}checkProcessDied(e){!e||global.__TEST__||setTimeout(()=>{try{process.kill(e.pid,0),_G(e)}catch{}},2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}createMessageTransports(e){function t(c,h){if(!c&&!h)return;let d=Object.create(null);return Object.keys(process.env).forEach(g=>d[g]=process.env[g]),c&&Object.keys(c).forEach(g=>d[g]=c[g]),d}let i=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],r=["--debug","--debug-brk","--inspect","--inspect-brk"];function o(){let c=process.execArgv;return c?c.some(h=>i.some(d=>h.startsWith(d))||r.some(d=>h===d)):!1}function s(c){if(c.stdin===null||c.stdout===null||c.stderr===null)throw new Error("Process created without stdio streams")}let a=this._serverOptions;if(Qs(a))return a().then(c=>{if(mh.is(c))return this._isDetached=!!c.detached,c;if(S_.is(c))return this._isDetached=!!c.detached,{reader:new ht.StreamMessageReader(c.reader),writer:new ht.StreamMessageWriter(c.writer)};{let h;return T_.is(c)?(h=c.process,this._isDetached=c.detached):(h=c,this._isDetached=!1),h.stderr.on("data",d=>this.outputChannel.append(Ee(d)?d:d.toString(e))),{reader:new ht.StreamMessageReader(h.stdout),writer:new ht.StreamMessageWriter(h.stdin)}}});let l,u=a;return u.run||u.debug?typeof v8debug=="object"||this._forceDebug||o()?l=u.debug:l=u.run:l=a,this._getServerWorkingDir(l.options).then(c=>{if(C_.is(l)&&l.module){let h=l,d=h.transport||0;if(h.runtime){let g=[],f=h.options||Object.create(null);f.execArgv&&f.execArgv.forEach(w=>g.push(w)),g.push(h.module),h.args&&h.args.forEach(w=>g.push(w));let p=Object.create(null);p.cwd=c,p.env=t(f.env,!1);let b=this._getRuntimePath(h.runtime,c),v;if(d===1?(p.stdio=[null,null,null,"ipc"],g.push("--node-ipc")):d===0?g.push("--stdio"):d===2?(v=(0,ht.generateRandomPipeName)(),g.push(`--pipe=${v}`)):yh.isSocket(d)&&g.push(`--socket=${d.port}`),g.push(`--clientProcessId=${process.pid.toString()}`),d===1||d===0){let w=as.default.spawn(b,g,p);return!w||!w.pid?Promise.reject(`Launching server using runtime ${b} failed.`):(this._serverProcess=w,w.stderr.on("data",D=>this.outputChannel.append(Ee(D)?D:D.toString(e))),d===1?(w.stdout.on("data",D=>this.outputChannel.append(Ee(D)?D:D.toString(e))),Promise.resolve({reader:new ht.IPCMessageReader(w),writer:new ht.IPCMessageWriter(w)})):Promise.resolve({reader:new ht.StreamMessageReader(w.stdout),writer:new ht.StreamMessageWriter(w.stdin)}))}else{if(d===2)return(0,ht.createClientPipeTransport)(v).then(w=>{let D=as.default.spawn(b,g,p);return!D||!D.pid?Promise.reject(`Launching server using runtime ${b} failed.`):(this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),w.onConnected().then(S=>({reader:S[0],writer:S[1]})))});if(yh.isSocket(d))return(0,ht.createClientSocketTransport)(d.port).then(w=>{let D=as.default.spawn(b,g,p);return!D||!D.pid?Promise.reject(`Launching server using runtime ${b} failed.`):(this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),w.onConnected().then(S=>({reader:S[0],writer:S[1]})))})}}else{let g;return new Promise((f,p)=>{let b=h.args&&h.args.slice()||[];d===1?b.push("--node-ipc"):d===0?b.push("--stdio"):d===2?(g=(0,ht.generateRandomPipeName)(),b.push(`--pipe=${g}`)):yh.isSocket(d)&&b.push(`--socket=${d.port}`),b.push(`--clientProcessId=${process.pid.toString()}`);let v=h.options||Object.create(null);if(v.env=t(v.env,!0),v.execArgv=v.execArgv||[],v.cwd=c,v.silent=!0,d===1||d===0){let w=as.default.fork(h.module,b||[],v);s(w),this._serverProcess=w,w.stderr.on("data",D=>this.outputChannel.append(Ee(D)?D:D.toString(e))),d===1?(w.stdout.on("data",D=>this.outputChannel.append(Ee(D)?D:D.toString(e))),f({reader:new ht.IPCMessageReader(this._serverProcess),writer:new ht.IPCMessageWriter(this._serverProcess)})):f({reader:new ht.StreamMessageReader(w.stdout),writer:new ht.StreamMessageWriter(w.stdin)})}else d===2?(0,ht.createClientPipeTransport)(g).then(w=>{let D=as.default.fork(h.module,b||[],v);s(D),this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),w.onConnected().then(S=>{f({reader:S[0],writer:S[1]})})}):yh.isSocket(d)&&(0,ht.createClientSocketTransport)(d.port).then(w=>{let D=as.default.fork(h.module,b||[],v);s(D),this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Ee(S)?S:S.toString(e))),w.onConnected().then(S=>{f({reader:S[0],writer:S[1]})})})})}}else if(x_.is(l)&&l.command){let h=l,d=h.args||[],g=Object.assign({},h.options);g.env=g.env?Object.assign({},process.env,g.env):process.env,g.cwd=g.cwd||c;let f=y.expand(l.command),p=as.default.spawn(f,d,g);return p.on("error",b=>{this.error(b.message),D_.error(b)}),!p||!p.pid?Promise.reject(`Launching server "${this.id}" using command ${h.command} failed.`):(D_.info(`Language server "${this.id}" started with ${p.pid}`),p.on("exit",b=>{b!=0&&this.error(`${h.command} exited with code: ${b}`)}),p.stderr.on("data",b=>this.outputChannel.append(Ee(b)?b:b.toString(e))),this._serverProcess=p,this._isDetached=!!g.detached,Promise.resolve({reader:new ht.StreamMessageReader(p.stdout),writer:new ht.StreamMessageWriter(p.stdin)}))}return Promise.reject(`Unsupported server configuration ${JSON.stringify(a,null,2)}`)})}_getRuntimePath(e,t){if(bh.default.isAbsolute(e))return e;let i=this._mainGetRootPath();if(i!==void 0){let r=bh.default.join(i,e);if(Iw.default.existsSync(r))return r}if(t!==void 0){let r=bh.default.join(t,e);if(Iw.default.existsSync(r))return r}return e}_mainGetRootPath(){let e=y.workspaceFolders;return!e||e.length===0?void 0:e[0].uri}registerProposedFeatures(){this.registerFeatures($Se.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures();let{disabledFeatures:e}=this.clientOptions;e.includes("pullConfiguration")||this.registerFeature(new n_(this)),e.includes("typeDefinition")||this.registerFeature(new l_(this)),e.includes("implementation")||this.registerFeature(new s_(this)),e.includes("declaration")||this.registerFeature(new r_(this)),e.includes("colorProvider")||this.registerFeature(new i_(this)),e.includes("foldingRange")||this.registerFeature(new o_(this)),e.includes("selectionRange")||this.registerFeature(new h_(this)),e.includes("callHierarchy")||this.registerFeature(new d_(this)),e.includes("progress")||this.registerFeature(new a_(this)),e.includes("linkedEditing")||this.registerFeature(new f_(this)),e.includes("fileEvents")||(this.registerFeature(new p_(this)),this.registerFeature(new m_(this)),this.registerFeature(new b_(this)),this.registerFeature(new y_(this)),this.registerFeature(new v_(this)),this.registerFeature(new w_(this))),e.includes("semanticTokens")||this.registerFeature(new g_(this)),e.includes("workspaceFolders")||this.registerFeature(new c_(this))}_getServerWorkingDir(e){let t=e&&e.cwd;return t&&!bh.default.isAbsolute(t)&&(t=bh.default.join(y.cwd,t)),t||(t=y.cwd),t?new Promise(i=>{Iw.default.lstat(t,(r,o)=>{i(!r&&o.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}appendOutput(e,t){let i=Ee(e)?e:e.toString(t);this.outputChannel.append(i.endsWith(`
-`)?i:i+`
-`)}},k_=class{constructor(e,t){this._client=e;this._setting=t;this._listeners=[]}start(){return y.onDidChangeConfiguration(e=>{e.affectsConfiguration(this._setting)&&this.onDidChangeConfiguration()},null,this._listeners),this.onDidChangeConfiguration(),{dispose:()=>{Z(this._listeners),this._client.needsStop()&&this._client.stop()}}}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,i=e>=0?this._setting.substr(e+1):void 0,r=i?y.getConfiguration(t).get(i,!0):y.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}},$Se={createAll:n=>[]}});function XSe(n){switch(n){case 0:return"init";case 3:return"running";case 1:return"starting";case 2:return"startFailed";case 4:return"stopping";case 5:return"stopped";default:return"unknown"}}function USe(n){let e=n.map(t=>typeof t=="string"?t:t.language);return e=e.filter(t=>typeof t=="string"),Array.from(new Set(e))}function GSe(n,e,t){let{command:i,module:r,port:o,args:s,filetypes:a}=t;if(s=s||[],!a)return k.showMessage(`Wrong configuration of LS "${e}", filetypes not found`,"error"),null;if(!i&&!r&&!o)return k.showMessage(`Wrong configuration of LS "${e}", no command or module specified.`,"error"),null;let l;if(r){if(r=y.expand(r),!B6.default.existsSync(r))return k.showMessage(`Module file "${r}" not found for LS "${e}"`,"error"),null;l={module:r,runtime:t.runtime||process.execPath,args:s,transport:KSe(t),options:zSe(t)}}else i?l={command:i,args:s,options:VSe(t)}:o&&(l=()=>new Promise((g,f)=>{let p=new H6.default.Socket,b=t.host||"127.0.0.1";Kl.info(`languageserver "${n}" connecting to ${b}:${o}`),p.connect(o,b,()=>{g({reader:p,writer:p})}),p.on("error",v=>{f(new Error(`Connection error for ${n}: ${v.message}`))})}));let u=Array.from(t.disabledFeatures||[]);for(let g of["disableWorkspaceFolders","disableCompletion","disableDiagnostics"])if(t[g]===!0){let f=g.slice(7);u.push(f[0].toLowerCase()+f.slice(1))}let c=!!t.disableSnippetCompletion;return[{ignoredRootPaths:(t.ignoredRootPaths||[]).map(g=>y.expand(g)),disableSnippetCompletion:c,disableDynamicRegister:!!t.disableDynamicRegister,disabledFeatures:u,formatterPriority:t.formatterPriority||0,documentSelector:Y6(t.filetypes,t.additionalSchemes),revealOutputChannelOn:QSe(t.revealOutputChannelOn),synchronize:{configurationSection:`${n}.settings`},diagnosticCollectionName:e,outputChannelName:n,stdioEncoding:t.stdioEncoding||"utf8",progressOnInitialization:t.progressOnInitialization===!0,initializationOptions:t.initializationOptions||{}},l]}function QSe(n){switch(n){case"info":return 1;case"warn":return 2;case"error":return 3;case"never":return 4;default:return 4}}function Y6(n,e){let t=[],i=["file","untitled"].concat(e||[]);return n?(n.forEach(r=>{t.push(...i.map(o=>({language:r,scheme:o})))}),t):i.map(r=>({scheme:r}))}function KSe(n){let{transport:e,transportPort:t}=n;return!e||e=="ipc"?1:e=="stdio"?0:e=="pipe"?2:{kind:3,port:t}}function zSe(n){return{cwd:n.cwd,execArgv:n.execArgv||[],env:n.env||void 0}}function VSe(n){return{cwd:n.cwd,detached:!!n.detached,shell:!!n.shell,env:n.env||void 0}}function M6(n){switch(n){case 2:return"running";case 3:return"starting";case 1:return"stopped";default:return"unknown"}}var N6,B6,H6,vh,Kl,q6,Mi,$f=_(()=>{"use strict";N6=require("events"),B6=C(require("fs")),H6=C(require("net")),vh=C(H());E_();Fr();z();ke();V();Kl=q()("services");q6=class extends N6.EventEmitter{constructor(){super(...arguments);this.registered=new Map;this.disposables=[]}init(){y.onDidOpenTextDocument(e=>{this.start(e)},null,this.disposables),y.onDidChangeConfiguration(e=>{e.affectsConfiguration("languageserver")&&this.createCustomServices()},null,this.disposables),this.createCustomServices()}dispose(){this.removeAllListeners(),Z(this.disposables);for(let e of this.registered.values())e.dispose()}regist(e){let{id:t}=e;if(t||Kl.error("invalid service configuration. ",e.name),!this.registered.get(t))return this.registered.set(t,e),Kl.info(`registered service "${t}"`),this.shouldStart(e)&&e.start(),e.state==3&&this.emit("ready",t),e.onServiceReady(()=>{Kl.info(`service ${t} started`),this.emit("ready",t)},null,this.disposables),vh.Disposable.create(()=>{e.stop(),e.dispose(),this.registered.delete(t)})}getService(e){let t=this.registered.get(e);return t||(t=this.registered.get(`languageserver.${e}`)),t}shouldStart(e){if(e.state!=0)return!1;let t=e.selector;for(let i of y.documents)if(y.match(t,i.textDocument))return!0;return!1}start(e){let t=this.getServices(e);for(let i of t)i.state==0&&i.start()}getServices(e){let t=[];for(let i of this.registered.values())y.match(i.selector,e)>0&&t.push(i);return t}stop(e){let t=this.registered.get(e);if(!t){k.showMessage(`Service ${e} not found`,"error");return}return Promise.resolve(t.stop())}stopAll(){for(let e of this.registered.values())e.stop()}async toggle(e){let t=this.registered.get(e);if(!t){k.showMessage(`Service ${e} not found`,"error");return}let{state:i}=t;try{i==3?await Promise.resolve(t.stop()):i==0?await t.start():i==5&&await t.restart()}catch(r){k.showMessage(`Service error: ${r}`,"error")}}getServiceStats(){let e=[];for(let[t,i]of this.registered)e.push({id:t,languageIds:USe(i.selector),state:XSe(i.state)});return e}createCustomServices(){let e=y.getConfiguration().get("languageserver",{});for(let t of Object.keys(e)){let i=e[t];!this.validServerConfig(t,i)||this.registLanguageClient(t,i)}}validServerConfig(e,t){let i=[];return t.module!=null&&typeof t.module!="string"&&i.push(`"module" field of languageserver ${e} should be string`),t.command!=null&&typeof t.command!="string"&&i.push(`"command" field of languageserver ${e} should be string`),t.transport!=null&&typeof t.transport!="string"&&i.push(`"transport" field of languageserver ${e} should be string`),t.transportPort!=null&&typeof t.transportPort!="number"&&i.push(`"transportPort" field of languageserver ${e} should be string`),(!Array.isArray(t.filetypes)||!t.filetypes.every(r=>typeof r=="string"))&&i.push(`"filetypes" field of languageserver ${e} should be array of string`),t.additionalSchemes&&(!Array.isArray(t.additionalSchemes)||t.additionalSchemes.some(r=>typeof r!="string"))&&i.push(`"additionalSchemes" field of languageserver ${e} should be array of string`),i.length?(k.showMessage(i.join(`
-`),"error"),!1):!0}waitClient(e){let t=this.getService(e);return t&&t.state==3?Promise.resolve():t?new Promise(i=>{t.onServiceReady(()=>{i()})}):new Promise(i=>{let r=o=>{(o==e||o==`languageserver.${e}`)&&(this.off("ready",r),i())};this.on("ready",r)})}async registNotification(e,t){await this.waitClient(e);let i=this.getService(e);if(!i.client){k.showMessage(`Not a language client: ${e}`,"error");return}i.client.onNotification(t,async o=>{y.nvim.call("coc#do_notify",[e,t,o],!0)})}async sendNotification(e,t,i){if(!t)throw new Error("method required for ontification");let r=this.getService(e);if(!r||!r.client)throw new Error(`Language server ${e} not found`);if(r.state==1&&await r.client.onReady(),r.state!=3)throw new Error(`Language server ${e} not running`);await Promise.resolve(r.client.sendNotification(t,i))}async sendRequest(e,t,i,r){if(!t)throw new Error("method required for sendRequest");let o=this.getService(e);if(o||await bt(100),o=this.getService(e),!o||!o.client)throw new Error(`Language server ${e} not found`);if(o.state==1&&await o.client.onReady(),o.state!=3)throw new Error(`Language server ${e} not running`);return r||(r=new vh.CancellationTokenSource().token),await Promise.resolve(o.client.sendRequest(t,i,r))}registLanguageClient(e,t){let i=typeof e=="string"?`languageserver.${e}`:e.id,r=[],o=new vh.Emitter,s=typeof e=="string"?null:e;if(this.registered.has(i))return;let a=!1,l={id:i,client:s,name:typeof e=="string"?e:e.name,selector:typeof e=="string"?Y6(t.filetypes,t.additionalSchemes):e.clientOptions.documentSelector,state:0,onServiceReady:o.event,start:()=>{if(l.state==1||l.state==3||s&&!s.needsStart())return;if(a&&s)return s.restart(),Promise.resolve();if(!a){if(typeof e=="string"&&!s){let c=y.getConfiguration().get("languageserver",{})[e];if(!c||c.enable===!1)return;let h=GSe(i,e,c);if(!h)return;s=new Jf(i,e,h[1],h[0]),l.selector=h[0].documentSelector,l.client=s}s.onDidChangeState(c=>{let{oldState:h,newState:d}=c;d==3?l.state=1:d==2?l.state=3:d==1&&(l.state=5);let g=M6(h),f=M6(d);Kl.info(`${s.name} state change: ${g} => ${f}`)},null,r),a=!0}l.state=1,Kl.debug(`starting service: ${i}`);let u=s.start();return r.push(u),new Promise(c=>{s.onReady().then(()=>{o.fire(void 0),c()},h=>{k.showMessage(`Server ${i} failed to start: ${h}`,"error"),Kl.error(`Server ${i} failed to start:`,h),l.state=2,c()})})},dispose:async()=>{o.dispose(),Z(r)},stop:async()=>{!s||!s.needsStop()||await Promise.resolve(s.stop())},restart:async()=>{s?(l.state=1,s.restart()):await l.start()}};return this.regist(l)}};Mi=new q6});var W6,zl,wh,Aw=_(()=>{"use strict";V();ke();W6=require("events"),zl=["","","","","","","","","","","","","","","","","","","","<2-LeftMouse>","","","","","","","","","","","","","","","","","