diff --git a/.gitattributes b/.gitattributes
index a6344aac8c09253b3b630fb776ae94478aa0275b..09152f64f0daf415f83c8776eec430202fd6b1f9 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
+chroma_index_1/chroma.sqlite3 filter=lfs diff=lfs merge=lfs -text
+data_2/tailieuxanh_giao_trinh_luat_thue_viet_nam_tai_ban_nam_2018_phan_2_5165.pdf filter=lfs diff=lfs merge=lfs -text
+frontend/public/images/image1.jpg filter=lfs diff=lfs merge=lfs -text
+vectorstore/chroma_db/chroma.sqlite3 filter=lfs diff=lfs merge=lfs -text
diff --git a/.streamlit/config.toml b/.streamlit/config.toml
new file mode 100644
index 0000000000000000000000000000000000000000..20d2b12b320d0943be59f7216fdb9d664f7cb719
--- /dev/null
+++ b/.streamlit/config.toml
@@ -0,0 +1,4 @@
+[theme]
+base="dark"
+primaryColor="#0fa3b1"
+
diff --git a/App.py b/App.py
new file mode 100644
index 0000000000000000000000000000000000000000..07bf540bc83565aca30ae13230329056ab985fa7
--- /dev/null
+++ b/App.py
@@ -0,0 +1,31 @@
+import streamlit as st
+from streamlit_option_menu import option_menu
+from screens.index import get_routes
+
+st.set_page_config(
+ layout="wide",
+)
+
+routes = get_routes()
+
+with st.sidebar:
+ global selected_screen
+
+ selected_screen = option_menu("Taskbar", routes['name'],
+ icons=routes['icon'], menu_icon="book")
+
+ # selected_screen = on_hover_tabs(tabName=routes['name'],
+ # iconName=routes['icon'], default_choice=0)
+
+routes['component'][selected_screen]()
+
+
+
+hide_streamlit_style = """
+
+ """
+st.markdown(hide_streamlit_style, unsafe_allow_html=True)
+
diff --git a/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/data_level0.bin b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/data_level0.bin
new file mode 100644
index 0000000000000000000000000000000000000000..cf2080e0ebddc46c9cbfcd3f8523b72678786328
--- /dev/null
+++ b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/data_level0.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5514cb404bec613b7ee3fc7076aaa89d7fdccfe2f245f3356fa796000565f8fd
+size 234476000
diff --git a/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/header.bin b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/header.bin
new file mode 100644
index 0000000000000000000000000000000000000000..9ed8e0ec9f98b84ad698b7e5bd73bd6bea0a3807
--- /dev/null
+++ b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/header.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5de509801e124e90427d1b995869dc86abbe714179688acc26506e7fae48fef0
+size 100
diff --git a/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/index_metadata.pickle b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/index_metadata.pickle
new file mode 100644
index 0000000000000000000000000000000000000000..d764269590f45b7e5992bae33cf49c293fdabc7d
--- /dev/null
+++ b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/index_metadata.pickle
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:85234823c16aeb6efb2e37e27a15c215a17a695b9fa0ab1f3c31287b1d8d85f8
+size 12652262
diff --git a/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/length.bin b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/length.bin
new file mode 100644
index 0000000000000000000000000000000000000000..eb12abd22101b2b073124dd52046bac043f98320
--- /dev/null
+++ b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/length.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a55b3a5c013c8fbdc744a98ee68d029910dee03ac52439370ab0b99b804dfcc3
+size 292000
diff --git a/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/link_lists.bin b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/link_lists.bin
new file mode 100644
index 0000000000000000000000000000000000000000..7e028158f8bd15a754dc96152480d41a5a05e457
--- /dev/null
+++ b/chroma_index_1/2b0279f5-e550-4bf1-beb2-9293fec733a5/link_lists.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:869a73acd4d9a49d15c334c030b4ed86f5ccd8b0a91ed6a5c6e98af3704fb759
+size 609764
diff --git a/chroma_index_1/chroma.sqlite3 b/chroma_index_1/chroma.sqlite3
new file mode 100644
index 0000000000000000000000000000000000000000..826dc91f9183f684d369bfc5fb09d96b50c9b4a7
--- /dev/null
+++ b/chroma_index_1/chroma.sqlite3
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bf9231a1821f2cce59c9883abc40074325ec78b1df0a2e517b8335ed148d165a
+size 983453696
diff --git a/config.yml b/config.yml
new file mode 100644
index 0000000000000000000000000000000000000000..369f1442e38b10279beeb4038fc71a395e2511ba
--- /dev/null
+++ b/config.yml
@@ -0,0 +1,16 @@
+API_KEY:
+ Bard: "aAhD1NyQqzeoXs8PclDOD_hvEI3N9uHnsn2F0isADM5FFwBfYxatJf1csSUTMo4TXLjOxA."
+CHUNK:
+ chunk_size: 256
+ chunk_overlap: 20
+CHAT:
+ chat_context_length: 20
+EMBEDDINGS:
+ HuggingFaceEmbeddings:
+ model_name: "keepitreal/vietnamese-sbert"
+ model_kwargs: {"device": "cpu"}
+LOCAL_PATH:
+ data_path_folder: "C:/Users/duong/OneDrive/Desktop/VietNam Housing App/data_2"
+ main_path: "C:/Users/duong/OneDrive/Desktop/VietNam Housing App"
+
+
diff --git a/config2.yml b/config2.yml
new file mode 100644
index 0000000000000000000000000000000000000000..fc0b5413e377677d86921874192b470f4af8f1f3
--- /dev/null
+++ b/config2.yml
@@ -0,0 +1,15 @@
+API_KEY:
+ Bard: "aAhD1NyQqzeoXs8PclDOD_hvEI3N9uHnsn2F0isADM5FFwBfYxatJf1csSUTMo4TXLjOxA."
+CHUNK:
+ chunk_size: 256
+ chunk_overlap: 20
+CHAT:
+ chat_context_length: 20
+EMBEDDINGS:
+ HuggingFaceEmbeddings:
+ model_name: "keepitreal/vietnamese-sbert"
+ model_kwargs: {"device": "cpu"}
+LOCAL_PATH:
+ main_path: "C:/Users/duong/OneDrive/Desktop/VietNam Housing App"
+
+
diff --git a/data_2/35_2018_QH14_390511.pdf b/data_2/35_2018_QH14_390511.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..2a268133d33115f02ee6431fcea0e49600085b45
Binary files /dev/null and b/data_2/35_2018_QH14_390511.pdf differ
diff --git a/data_2/45_2013_QH13_215836.pdf b/data_2/45_2013_QH13_215836.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ba5fbf4ea41733484284ce32011b5b9c1d162465
Binary files /dev/null and b/data_2/45_2013_QH13_215836.pdf differ
diff --git a/data_2/chiem-nguong-ngoi-nha-nhu-khu-nghi-duong-duoc-thiet-ke-theo-phong-cach-nha-que-post479542.html.txt b/data_2/chiem-nguong-ngoi-nha-nhu-khu-nghi-duong-duoc-thiet-ke-theo-phong-cach-nha-que-post479542.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..55346ceea5e5cee50c4f630e3ac05b02b1bbbf54
--- /dev/null
+++ b/data_2/chiem-nguong-ngoi-nha-nhu-khu-nghi-duong-duoc-thiet-ke-theo-phong-cach-nha-que-post479542.html.txt
@@ -0,0 +1,17 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Chiêm ngưỡng ngôi nhà như khu nghỉ dưỡng được thiết kế theo phong cách “nhà quê”
+
+Ngôi nhà được xây dựng theo phong cách "nhà quê" của vùng đồng bằng Bắc Bộ, có nhiều cây xanh bao quanh để có thể trải nghiệm cuộc sống giữa thiên nhiên ở ngoại ô.
+Công trình bao gồm hai khu, mỗi khu có hai căn nhà gỗ được thiết kế giật cấp, mỗi căn có độ cao khác nhau để phân chia khu vực chức năng và tạo sự hài hòa cho tổng thể công trình.
+Ngoài khối nhà chính rộng 110m2, gia chủ còn xây thêm một khối nhà khác để đón tiếp người thân và bạn bè được trang bị đầy đủ phòng ngủ, bếp ăn và phòng tắm.
+Về mặt kiến trúc, công trình này có diện mạo giống một khu làng nhỏ trên đồi, với con đường chính uốn lượn lấy cảm hứng từ cung đường quanh co của núi rừng Tây Bắc. Các căn nhà gỗ đều có ban công rộng, từ đó có tầm nhìn thẳng ra các ngọn núi xung quanh, tạo không gian thư giãn và tận hưởng không khí trong lành.
+Ngôi nhà sử dụng vật liệu gần gũi với thiên nhiên như tường đất, gạch lát nung biến tính, gạch ốp vân tre, cói và terazzo. Khung nhà được dựng lên từ cột gỗ nhà sàn cũ có tuổi đời trăm năm, tạo nên diện mạo gần gũi nhưng vẫn sang trọng. Hệ cửa chính sử dụng gỗ lim Nam Phi, một loại gỗ cứng chịu được thời tiết khắc nghiệt và bền bỉ.
+Những bức tường đất được xây dựng bằng đất trộn rơm, kết hợp với chất phụ gia kết dính và xử lý bề mặt để không thấm nước. Trần nhà được làm bằng cót ép, một loại vật liệu truyền thống có khả năng cách nhiệt và tạo giá trị nghỉ dưỡng cho ngôi nhà.
+Nội thất phòng tắm sử dụng các vật liệu như sàn đá mài terrazzo, bồn tắm terrazzo từ Hội An, gạch men cổ điển và gạch nung thủ công của nghệ nhân gốm Phù Lãng.
+Cảnh quan xung quanh ngôi nhà được thiết kế theo nguyên tắc "thuận theo tự nhiên". Các cây rừng cũ được giữ lại và tạo thành mái che trước hiên nhà. Ngoài không gian để ở, xung quanh ngôi nhà còn có các tiểu cảnh như ao hoa súng, hồ cá nhỏ, guồng nước và sân chơi cho trẻ em, tạo cảm giác như đang ở trong một khu nghỉ dưỡng.
+Vào buổi tối, ngôi nhà được thắp sáng bằng hệ thống ánh sáng được thiết kế riêng biệt theo tiêu chuẩn resort, tạo ra cảm giác ấm cúng và thân thuộc.
+
+
+H.V (tổng hợp)
+
diff --git a/data_2/doc-dao-khu-vuon-di-dong-tren-tau-dien-tai-bi-post478977.html.txt b/data_2/doc-dao-khu-vuon-di-dong-tren-tau-dien-tai-bi-post478977.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c583ec546458cd3f8627069a4027b21debd1faee
--- /dev/null
+++ b/data_2/doc-dao-khu-vuon-di-dong-tren-tau-dien-tai-bi-post478977.html.txt
@@ -0,0 +1,13 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Độc đáo "khu vườn di động" trên tàu điện tại Bỉ
+
+Khi hành khách lên tàu, nhân viên sẽ thông báo cho toàn bộ hành khách về sáng kiến của hội đồng. Đồng thời trên cửa sổ cũng có mã QR để hành khách quét và tìm hiểu thêm thông tin về dự án. Cây xanh thân mềm được trang trí khắp nơi trên toa tàu, từ giữa ghế ngồi, trên nóc tàu, hay giữa mỗi tấm kính trong tàu.
+Trong sáng kiến này, Hội đồng thành phố Antwerp sẽ cung cấp cây miễn phí cho những người ủng hộ quan điểm trồng cây, muốn trang trí bên ngoài tòa nhà. Người dân sống ở khu vực trung tâm của thành phố có thể đề nghị thành phố cung cấp cây trồng, vòng hoa. Ngoài ra, hội đồng thành phố cũng sẽ hỗ trợ tài chính cho những người muốn mua hệ thống thu gom nước mưa để tưới tiêu cho vườn.
+Dự án này từng được thực hiện và thu về thành công lớn. Khi đó, người dân ở Antwerp đã được khuyến khích và trồng tới 200 sân vườn, 100 vòng hoa và 170 khu trồng cây.
+Trong quá trình thực hiện, hội đồng thành phố sẽ chịu trách nhiệm xử lý vỉa hè để giành đất trồng cây còn người dân phụ trách chăm sóc, tưới tiêu hàng ngày.
+Đây là một phần trong dự án mang tên “Trồng cây trong khu dân cư” vừa để thu hút người dân thành phố sử dụng phương tiện công cộng, vừa là để khuyến khích trồng nhiều cây xanh, biến thành phố thành một nơi thân thiện với môi trường, có lợi cho sức khỏe hơn.
+
+
+Việt Hoàng (dịch)
+
diff --git a/data_2/doc-dao-ngoi-nha-mac-ao-chong-nong-o-sai-gon-post480353.html.txt b/data_2/doc-dao-ngoi-nha-mac-ao-chong-nong-o-sai-gon-post480353.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..86efcda5a71d6ecf62e42ebabab454178ba76f02
--- /dev/null
+++ b/data_2/doc-dao-ngoi-nha-mac-ao-chong-nong-o-sai-gon-post480353.html.txt
@@ -0,0 +1,20 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Độc đáo ngôi nhà ‘mặc áo’ chống nóng ở Sài Gòn
+
+Ngôi nhà nơi ở của gia đình 4 người nằm trong một khu dân cư đông đúc tại quận 11, Sài Gòn, có mặt tiền hướng Tây - Tây Nam nên bị ảnh hưởng mạnh bởi nắng nóng trực diện vào buổi chiều.
+Ngôi nhà được xây dựng trên khu đất rộng 185m2 với điểm hạn chế là thóp hậu và không vuông vức. Tuy vậy, gia chủ vẫn mong muốn có một không gian sống thoáng mát, nhiều cây xanh để giảm bớt sự khắc nghiệt của thời tiết. Bên cạnh các phòng chức năng chính, gia chủ yêu cầu bố trí thêm phòng tập gym, studio, phòng ngủ cho khách, vườn trồng rau và nuôi chim. Chính điều này đã tạo nên thử thách cho các kiến trúc sư.
+Các kiến trúc sư đã bố trí mỗi tầng ít nhất một khu vườn, kết hợp với các ô cửa để ngôi nhà được bao quanh bởi thảm thực vật đa dạng.
+Hồ cá nằm ở trước nhà được bao quanh bởi lớp cây xanh. Từ phòng khách, gia chủ có thể ngắm nhìn hồ cá và cây xanh bên ngoài, cảm nhận sự thư thái giữa thiên nhiên.
+Tầng 1 là không gian sinh hoạt chung của gia đình bao gồm phòng khách, khu thư giãn và bếp ăn với tường kính được sử dụng để phân chia không gian.
+Hai giếng trời trong nhà được bố trí cùng khu vực thang máy và thang bộ giúp đưa ánh sáng tự nhiên vào sâu bên trong ngôi nhà, thúc đẩy lưu thông không khí.
+Các phòng ngủ đều có ban công rộng rãi với lớp cây xanh giúp chắn bụi và tiếng ồn. Không gian bên trong và bên ngoài ngăn cách bởi cửa kính trượt tạo sự gắn kết với thiên nhiên.
+Vào mỗi thời điểm khác nhau trong ngày, hiệu ứng ánh sáng xuyên qua tường gạch tạo nên sự chuyển động vô cùng thú vị.
+Các phòng chức năng chính đều bố trí lệch hướng nắng trực diện, thay vào đó là không gian phụ như nhà vệ sinh, phòng thay đồ.
+Phòng tập gym nằm ở tầng 4 với các cửa kính được bố trí xung quanh giúp tăng lưu thông gió, đón nhiều ánh sáng.
+Ngôi nhà cũng được bố trí một khu vườn nhiệt đới và trồng rau với diện tích 45m2 ở sân thượng để có thêm không gian thư giãn, gần gũi thiên nhiên đồng thời giảm bức xạ nhiệt cho phần mái.
+Tại sân thượng, mái vòm lưới được sử dụng tạo không gian mở thoáng mát, cản bớt nắng và mưa cho khu vườn ở dưới.
+
+
+H.V (tổng hợp)
+
diff --git a/data_2/goi-y-mot-so-diem-den-xanh-giua-long-singapore-post486630.html.txt b/data_2/goi-y-mot-so-diem-den-xanh-giua-long-singapore-post486630.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3ec77149f987960edb1b118eb03b998c33935045
--- /dev/null
+++ b/data_2/goi-y-mot-so-diem-den-xanh-giua-long-singapore-post486630.html.txt
@@ -0,0 +1,27 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Gợi ý một số điểm đến xanh giữa lòng Singapore
+
+Gardens by the Bay
+Gardens by the Bay là một trong những công viên nổi tiếng, thu hút du khách ghé thăm khi đến Singapore. Đây là công viên tự nhiên lớn nhất tại Singapore, với diện tích đến 101 ha, và nằm ở khu trung tâm của quốc đảo Sư Tử, tiếp giáp với Marina Reservoir.
+Trong khu công viên này sẽ có: vườn Vịnh Nam, vườn Vịnh Đông và vườn Vịnh trung tâm. Vừa mang lại không gian xanh lớn cho thành phố, vừa là nơi thể hiện các kiến trúc đồ sộ bậc nhất tại Singapore.
+Ngoài ra, tại đây, du khách có thể chiêm ngưỡng toàn cảnh thành phố từ đường đi bộ trên không ở độ cao 22 mét, tham quan khu vườn nhà kính lớn nhất thế giới hoặc thưởng ngoạn thác nước trong nhà cao 35 mét.
+Vườn bách thảo Singapore
+Vườn bách thảo hay Vườn thực vật Singapore là một khu vườn bách thảo có diện tích 74 ha nằm ở đảo quốc Singapore. Đây là vườn bách thảo duy nhất trên thế giới mở cửa từ 5 giờ sáng đến 12 giờ đêm mỗi ngày, và cũng không thu phí vào cửa.
+Vườn Bách thảo Singapore được UNESCO công nhận là Di sản thế giới từ năm 2015. Không gian xanh trên 150 tuổi này gồm nhiều điểm đến nổi bật như Vườn phong lan Quốc gia, hồ thiên nga và các khu vườn thảo mộc nhiệt đới…
+Điểm nhấn tại đây có Vườn Lan Quốc gia (National Orchid Garden), được biết đến là vườn lan lớn nhất thế giới, trưng bày hơn 60.000 cá thể thực vật và hoa lan. Còn Bảo tàng Di sản SBG (SBG Heritage Museum) là nơi tổ chức các cuộc triển lãm tương tác và đa phương tiện, với các bức pa-nô mô tả chi tiết những di sản phong phú của Khu vườn, và Phòng trưng bày Xanh CDL (CDL Green Gallery) trưng bày về các hiện vật và triển lãm liên quan đến thực vật.
+Trẻ nhỏ hẳn sẽ rất thích Vườn Trẻ em Jacob Ballas nơi các bé được chơi đùa và học hỏi mọi điều về đời sống thực vật. Một loạt các nhà hàng và quán cafe đã sẵn sàng phục vụ các vị khách đang đói và khát sau một ngày vui chơi dưới nắng.
+Đường mòn MacRitchie và công viên Reservoir Park
+Hồ chứa nước MacRitchie Reservoir được xây dựng vào năm 1867, nhờ vào khoản quyên góp 13,000 USD của nhà từ thiện Tan Kim Seng, và là một trong bốn hồ chứa nước đặt trong khu bảo tồn thiên nhiên.
+Gắn liền với hồ chứa nước lớn nhất Singapore - là một phần của hệ thống trữ nước mưa - công viên và khu bảo tồn thiên nhiên nằm ngay chính giữa trung tâm Singapore này là một điểm đến ưa thích của những người chạy bộ, những người đam mê thể thao dưới nước, và tất nhiên là cả những người yêu thiên nhiên nữa.
+Tại Đường mòn MacRitchie và công viên Reservoir Park, du khách sẽ có cơ hội “đi bộ trong rừng” qua con đường mòn dài 11km.
+Ngoài ra, cây cầu treo Treetop Walk cao 250m nối hai điểm cao nhất của công viên công viên Reservoir Park cũng là một địa điểm được du khách ưa thích check in.
+Khu bảo tồn đầm lầy Sungei Buloh
+Trong khu đầm lầy Sungei rộng 87 ha, bạn có thể bắt gặp những chú chim di cư đang trên đường đi tránh rét để đến những vùng ấm áp hơn ở Úc – có một số đến từ những nơi xa xôi như Siberia.
+Ở những nơi khác, bạn sẽ tìm thấy cua, cá thòi lòi và tôm hùm sống trong bùn trong môi trường sống tự nhiên của chúng, và có thể ngắm những sinh vật này từ xa tại các điểm quan sát nằm rải rác trong công viên.
+Khu bảo tồn đầm lầy Sungei Buloh là một trải nghiệm du lịch sinh thái đẳng cấp thế giới được một nhóm người đi ngắm chim thuộc Hiệp hội Tự nhiên Mã Lai (Malayan Nature Society) phát hiện lần đầu vào năm 1986.
+Ba năm sau, khu vực này được chính phủ công nhận là công viên tự nhiên vào năm 1989, và chính thức mở cửa vào năm 1993. Để trải nghiệm các khu đầm lầy một cách trọn vẹn, bạn có thể tham gia các tour có hướng dẫn viên miễn phí. Ngoài ra, các hoạt động khác như lớp vẽ tranh hoặc minh họa nuôi tôm sẽ khiến bạn thỏa sức vui chơi, giải trí suốt cả ngày.
+
+
+V. Hoàng
+
diff --git a/data_2/goi-y-mot-so-xu-huong-thiet-ke-khong-gian-xanh-cho-nha-pho-post484155.html.txt b/data_2/goi-y-mot-so-xu-huong-thiet-ke-khong-gian-xanh-cho-nha-pho-post484155.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e92c3d12ab2044f51d3147bd756777a977d00d8d
--- /dev/null
+++ b/data_2/goi-y-mot-so-xu-huong-thiet-ke-khong-gian-xanh-cho-nha-pho-post484155.html.txt
@@ -0,0 +1,12 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Gợi ý một số xu hướng thiết kế không gian xanh cho nhà phố
+
+Giếng trời là không gian hoàn hảo để trồng cây xanh: Ngày nay, các gia chủ thường yêu cầu thiết kế nhà ở với sự thông thoáng và ánh sáng tự nhiên cao. Điều này đang thúc đẩy xu hướng sử dụng giếng trời trong thiết kế nhà ở. Giếng trời không chỉ giúp cung cấp không gian để trồng cây xanh, tạo sự mát mẻ cho ngôi nhà, mà còn mang lại vẻ đẹp thẩm mỹ với kiến trúc hiện đại và khéo léo.
+Tận dụng không gian góc khuất của cầu thang: Những căn nhà phố thường có diện tích khá hạn chế. Như vậy, việc sử dụng không gian góc khuất của cầu thang có thể mang lại hiệu quả tích cực. Trồng cây hoặc bố trí tiểu cảnh dưới gầm hoặc bên cạnh cầu thang có thể làm cho căn nhà trông rộng rãi và đẹp mắt hơn.
+Sân thượng vườn nhiệt đới: Sân thượng vườn nhiệt đới đem lại cảm giác như đang sống trong rừng nhiệt đới. Sử dụng cây cảnh và các yếu tố thiên nhiên khác, bạn có thể tạo nên một không gian ngập tràn xanh tươi.
+Vườn dây leo: Vườn dây leo trên sân thượng là lựa chọn thú vị khác. Dùng dây leo kết hợp với các chậu cây khác, bạn có thể tạo không gian xanh và dễ thở.
+
+
+H. Việt
+
diff --git a/data_2/mat-mat-nha-san-giua-vuon-dua-bat-chap-thoi-tiet-khac-nghiet-post485290.html.txt b/data_2/mat-mat-nha-san-giua-vuon-dua-bat-chap-thoi-tiet-khac-nghiet-post485290.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3e25d936a8304977fafa421311884e1d65febb44
--- /dev/null
+++ b/data_2/mat-mat-nha-san-giua-vuon-dua-bat-chap-thoi-tiet-khac-nghiet-post485290.html.txt
@@ -0,0 +1,16 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Mát mắt nhà sàn giữa vườn dừa bất chấp thời tiết khắc nghiệt
+
+Ngôi nhà được xây dựng chủ yếu từ gỗ tái chế, đồng nghĩa với việc sử dụng lại tài nguyên và giảm lượng rác thải. Điều này thể hiện tinh thần bảo vệ môi trường và tạo nên một môi trường sống bền vững.
+Những tán dừa và kênh dẫn nước xung quanh không chỉ tạo nên vẻ đẹp tự nhiên mà còn giúp cho ngôi nhà hòa quyện hơn với thiên nhiên. Hệ thống này cung cấp thông gió tự nhiên và giữ cho ngôi nhà luôn mát mẻ suốt cả năm. Thậm chí, ngôi nhà này còn không cần sử dụng điều hoà.
+Vùng này từng trải qua những trận lũ lụt, và việc xây dựng nhà sàn gỗ là một cách an toàn để ngăn ngừa tình trạng ngập lụt. Việc sử dụng cột và dầm gỗ giúp ngôi nhà đứng vững trước thời tiết khắc nghiệt.
+Thiết kế nhà sàn với không gian mở và sử dụng cột bê tông tạo sự ổn định cho sàn gỗ cùng với thông gió tốt. Điều này giúp ngôi nhà luôn mát mẻ và thoải mái.
+Ngôi nhà được thiết kế với sự linh hoạt để đáp ứng nhiều nhu cầu của cuộc sống gia đình. Với một chiếc bàn gỗ ở trung tâm phòng, không gian này có thể được sử dụng cho nhiều mục đích khác nhau như tiếp khách, ăn uống và thư giãn.
+Hai phòng ngủ đơn giản với tông màu đơn sắc và việc treo mùng vải để ngăn muỗi tạo nên một không gian thư giãn và yên bình. Cuộc sống tại đây luôn dễ chịu bởi thiên nhiên xung quanh, thông gió tốt, và sàn gỗ không bị nóng,...
+Việc sử dụng gỗ và các mảng ván tường ngắn hơn làm cho ngôi nhà hòa quyện hoàn hảo với thiên nhiên xanh xung quanh, tạo nên một không gian sống hài hòa và thú vị.
+Ngôi nhà sàn gỗ này không chỉ là một nơi sống mà còn là một tác phẩm kiến trúc kết hợp với thiên nhiên, tạo ra một môi trường sống thoải mái và gần gũi với bản chất của cuộc sống nông thôn.
+
+
+H. Việt
+
diff --git a/data_2/ngoi-nha-tren-cay-khong-can-dieu-hoa-va-co-the-thao-roi-di-chuyen-post478256.html.txt b/data_2/ngoi-nha-tren-cay-khong-can-dieu-hoa-va-co-the-thao-roi-di-chuyen-post478256.html.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ef76930cd8eeca3cca7f5778880c740015b6b60f
--- /dev/null
+++ b/data_2/ngoi-nha-tren-cay-khong-can-dieu-hoa-va-co-the-thao-roi-di-chuyen-post478256.html.txt
@@ -0,0 +1,15 @@
+Tin tức ngày12-09-2023từ website: https://baophapluat.vn/bds
+
+ Ngôi nhà trên cây không cần điều hoà và có thể tháo rời, di chuyển
+
+Gia chủ mong muốn có một không gian mang đến những trải nghiệm thú vị qua những trò chơi, câu chuyện và bản nhạc… gắn liền con người theo thời gian. Vì vậy, các kiến trúc sư đã truyền tải thông điệp này qua các thiết kế đi cùng là những giải pháp như: Ngôi nhà hòa quyện, gần gũi với thiên nhiên, con người từ vật liệu đến giải pháp kiến trúc; Không gian thiết kế mở gắn kết con người với thiên nhiên.
+Công trình được hoàn thiện phần nhiều bằng vật liệu “phế liệu” tại địa phương với mong muốn giảm thiểu chi phí cũng như tác động tới cảnh vật và thiên nhiên hiện hữu. Với việc xây dựng từ kết cấu thép, tôn “phế liệu”, công trình có thể di chuyển từ nơi này sang nơi khác khá linh hoạt mà không ảnh hưởng đến môi trường tự nhiên.
+Từ ngoài vào trong, ngôi nhà mang nét mộc mạc, bình dị của những vật liệu xưa cũ, thậm chí những món đồ nội thất và chi tiết trang trí đều đơn giản, nhẹ nhàng để nhường chỗ cho nắng, gió, cây xanh xung quanh và các hoạt động tự do vui chơi của trẻ như chạy nhảy, leo trèo theo ý thích.
+Các yếu tố nắng, gió, cây xanh tự nhiên được đưa vào không gian nội thất nhằm mang lại hiệu quả thẩm mỹ mà vẫn đảm bảo ánh sáng, nhiệt độ, không khí phù hợp với nhu cầu sinh hoạt hằng ngày của gia đình.
+Không gian phòng khách nhỏ nằm tại tầng 1, được che chắn bởi một lớp cửa kính, có tầm nhìn thẳng ra cảnh quan thiên nhiên bên ngoài.
+Tầng 2 là một khối nhà chuyển động hình học được che chắn bởi lớp tôn cũ tạo cảm giác khối công trình không tách biệt quá so với rừng cây. Tầng 2 gồm 2 phòng ngủ cho bố mẹ và con nhỏ, không gian đọc sách và khoảng sân chơi trải dài ra sau. Điểm nhấn của tầng 2 là khu vực sinh hoạt chung giữa nhà với các mảng tường cong, mái sáng, lưới chơi tạo cảm giác hòa mình vào thiên nhiên một cách tuyệt đối.
+Nhờ cách thiết kế sáng tạo, ngôi nhà luôn thông thoáng và mát mẻ hơn so với bên ngoài. Từ đó, “nhà trên cây” không cần sử dụng các thiết bị làm mát như điều hòa cũng như các thiết bị hiện đại khác, kể cả vào mùa hè.
+
+
+H.V (tổng hợp)
+
diff --git a/data_2/tailieuxanh_giao_trinh_luat_thue_viet_nam_tai_ban_nam_2018_phan_2_5165.pdf b/data_2/tailieuxanh_giao_trinh_luat_thue_viet_nam_tai_ban_nam_2018_phan_2_5165.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..1c209f84c926a2c40114233d8c53701e5ac92ec5
--- /dev/null
+++ b/data_2/tailieuxanh_giao_trinh_luat_thue_viet_nam_tai_ban_nam_2018_phan_2_5165.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f28cc2b07e0ee2d61eb582dba0c548c0ccdf38d67b388d84455ab233be18caf0
+size 12129355
diff --git a/frontend/node_modules/.bin/arrow2csv b/frontend/node_modules/.bin/arrow2csv
new file mode 100644
index 0000000000000000000000000000000000000000..5c0057329ff9f3cfd238308c9c9c5ed7a46c0768
--- /dev/null
+++ b/frontend/node_modules/.bin/arrow2csv
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../apache-arrow/bin/arrow2csv.js" "$@"
+else
+ exec node "$basedir/../apache-arrow/bin/arrow2csv.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/arrow2csv.cmd b/frontend/node_modules/.bin/arrow2csv.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..9572709767de1b67d9e681e5e3fb6ebc008e0e00
--- /dev/null
+++ b/frontend/node_modules/.bin/arrow2csv.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\apache-arrow\bin\arrow2csv.js" %*
diff --git a/frontend/node_modules/.bin/arrow2csv.ps1 b/frontend/node_modules/.bin/arrow2csv.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..5411f0bf29a4e665e02a4ec310d4ed78fe7b8235
--- /dev/null
+++ b/frontend/node_modules/.bin/arrow2csv.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args
+ } else {
+ & "node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/livereload b/frontend/node_modules/.bin/livereload
new file mode 100644
index 0000000000000000000000000000000000000000..eacb37dbbc433e0a098d248876707bbd2696b8ec
--- /dev/null
+++ b/frontend/node_modules/.bin/livereload
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../livereload/bin/livereload.js" "$@"
+else
+ exec node "$basedir/../livereload/bin/livereload.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/livereload.cmd b/frontend/node_modules/.bin/livereload.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..c9e27cd4bd13dc2082132029e43231e9937749c2
--- /dev/null
+++ b/frontend/node_modules/.bin/livereload.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\livereload\bin\livereload.js" %*
diff --git a/frontend/node_modules/.bin/livereload.ps1 b/frontend/node_modules/.bin/livereload.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..97e1776e013796352ca0f1041b7624f101ed51a8
--- /dev/null
+++ b/frontend/node_modules/.bin/livereload.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../livereload/bin/livereload.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../livereload/bin/livereload.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../livereload/bin/livereload.js" $args
+ } else {
+ & "node$exe" "$basedir/../livereload/bin/livereload.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/mime b/frontend/node_modules/.bin/mime
new file mode 100644
index 0000000000000000000000000000000000000000..0a62a1b13b965546f7aab56bbcb07d37e1cb6087
--- /dev/null
+++ b/frontend/node_modules/.bin/mime
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
+else
+ exec node "$basedir/../mime/cli.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/mime.cmd b/frontend/node_modules/.bin/mime.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..54491f12e08014083099d3a46bf7b99f0ec22b56
--- /dev/null
+++ b/frontend/node_modules/.bin/mime.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
diff --git a/frontend/node_modules/.bin/mime.ps1 b/frontend/node_modules/.bin/mime.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..2222f40bcf2aca56c70178225cfe21cc31e2773f
--- /dev/null
+++ b/frontend/node_modules/.bin/mime.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../mime/cli.js" $args
+ } else {
+ & "node$exe" "$basedir/../mime/cli.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/mkdirp b/frontend/node_modules/.bin/mkdirp
new file mode 100644
index 0000000000000000000000000000000000000000..6ba5765a8cd217d8965731b917977e786e4d97b7
--- /dev/null
+++ b/frontend/node_modules/.bin/mkdirp
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
+else
+ exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/mkdirp.cmd b/frontend/node_modules/.bin/mkdirp.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..a865dd9f3a2ef7c26f9cb350ee12041578808e79
--- /dev/null
+++ b/frontend/node_modules/.bin/mkdirp.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
diff --git a/frontend/node_modules/.bin/mkdirp.ps1 b/frontend/node_modules/.bin/mkdirp.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..911e85466417449a40e584cce49fa18f1c513c3d
--- /dev/null
+++ b/frontend/node_modules/.bin/mkdirp.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
+ } else {
+ & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/rimraf b/frontend/node_modules/.bin/rimraf
new file mode 100644
index 0000000000000000000000000000000000000000..b816825501681cb0eb7a06021ceaf06669977fd1
--- /dev/null
+++ b/frontend/node_modules/.bin/rimraf
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
+else
+ exec node "$basedir/../rimraf/bin.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/rimraf.cmd b/frontend/node_modules/.bin/rimraf.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..13f45eca337b1e901d40623f7270a4b687913b7c
--- /dev/null
+++ b/frontend/node_modules/.bin/rimraf.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*
diff --git a/frontend/node_modules/.bin/rimraf.ps1 b/frontend/node_modules/.bin/rimraf.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..17167914ff79eef0e1cf7ed4e94c5933073d9cd4
--- /dev/null
+++ b/frontend/node_modules/.bin/rimraf.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../rimraf/bin.js" $args
+ } else {
+ & "node$exe" "$basedir/../rimraf/bin.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/rollup b/frontend/node_modules/.bin/rollup
new file mode 100644
index 0000000000000000000000000000000000000000..11bd86d0796e66a0d2e023aac4a984ba4957bf64
--- /dev/null
+++ b/frontend/node_modules/.bin/rollup
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@"
+else
+ exec node "$basedir/../rollup/dist/bin/rollup" "$@"
+fi
diff --git a/frontend/node_modules/.bin/rollup.cmd b/frontend/node_modules/.bin/rollup.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..b3f110b3e345e7fe6ffe12293fe47cc062aecc26
--- /dev/null
+++ b/frontend/node_modules/.bin/rollup.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %*
diff --git a/frontend/node_modules/.bin/rollup.ps1 b/frontend/node_modules/.bin/rollup.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..10f657d7269a6d3b0b24d5c1f7195c6d24e1f9a8
--- /dev/null
+++ b/frontend/node_modules/.bin/rollup.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
+ } else {
+ & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/sirv b/frontend/node_modules/.bin/sirv
new file mode 100644
index 0000000000000000000000000000000000000000..ee714d01ae8f898b19466180dc38fbc8b9e24f7d
--- /dev/null
+++ b/frontend/node_modules/.bin/sirv
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../sirv-cli/bin.js" "$@"
+else
+ exec node "$basedir/../sirv-cli/bin.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/sirv.cmd b/frontend/node_modules/.bin/sirv.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..bca08a984d093b06de2a43a442da14512558120b
--- /dev/null
+++ b/frontend/node_modules/.bin/sirv.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sirv-cli\bin.js" %*
diff --git a/frontend/node_modules/.bin/sirv.ps1 b/frontend/node_modules/.bin/sirv.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..2cb2b29ed60f05afcf0662d8c3f4bc998852ab62
--- /dev/null
+++ b/frontend/node_modules/.bin/sirv.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../sirv-cli/bin.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../sirv-cli/bin.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../sirv-cli/bin.js" $args
+ } else {
+ & "node$exe" "$basedir/../sirv-cli/bin.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/sorcery b/frontend/node_modules/.bin/sorcery
new file mode 100644
index 0000000000000000000000000000000000000000..74ab1fe00fe709dc3426f66aea236d91a3e74b7c
--- /dev/null
+++ b/frontend/node_modules/.bin/sorcery
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../sorcery/bin/index.js" "$@"
+else
+ exec node "$basedir/../sorcery/bin/index.js" "$@"
+fi
diff --git a/frontend/node_modules/.bin/sorcery.cmd b/frontend/node_modules/.bin/sorcery.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..a006c2d2a542118d0013ee7b74bcf0b1332ec353
--- /dev/null
+++ b/frontend/node_modules/.bin/sorcery.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sorcery\bin\index.js" %*
diff --git a/frontend/node_modules/.bin/sorcery.ps1 b/frontend/node_modules/.bin/sorcery.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..ab4b8e835a6f0389ac3fdc9fe5e9ca7549e92400
--- /dev/null
+++ b/frontend/node_modules/.bin/sorcery.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../sorcery/bin/index.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../sorcery/bin/index.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../sorcery/bin/index.js" $args
+ } else {
+ & "node$exe" "$basedir/../sorcery/bin/index.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/svelte-check b/frontend/node_modules/.bin/svelte-check
new file mode 100644
index 0000000000000000000000000000000000000000..3c55d2d9c4684b0d0317feb84d1fd359a602c84d
--- /dev/null
+++ b/frontend/node_modules/.bin/svelte-check
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../svelte-check/bin/svelte-check" "$@"
+else
+ exec node "$basedir/../svelte-check/bin/svelte-check" "$@"
+fi
diff --git a/frontend/node_modules/.bin/svelte-check.cmd b/frontend/node_modules/.bin/svelte-check.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..f08f2f6f956e9dd73f62b76b28f70d96056dc0fa
--- /dev/null
+++ b/frontend/node_modules/.bin/svelte-check.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svelte-check\bin\svelte-check" %*
diff --git a/frontend/node_modules/.bin/svelte-check.ps1 b/frontend/node_modules/.bin/svelte-check.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..3fcdf81c7d12b05a23c7b58444282def2948a5d6
--- /dev/null
+++ b/frontend/node_modules/.bin/svelte-check.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../svelte-check/bin/svelte-check" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../svelte-check/bin/svelte-check" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../svelte-check/bin/svelte-check" $args
+ } else {
+ & "node$exe" "$basedir/../svelte-check/bin/svelte-check" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/terser b/frontend/node_modules/.bin/terser
new file mode 100644
index 0000000000000000000000000000000000000000..2d3fa890a629e92909cef0e2cc8b7e8f8e97c67b
--- /dev/null
+++ b/frontend/node_modules/.bin/terser
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../terser/bin/terser" "$@"
+else
+ exec node "$basedir/../terser/bin/terser" "$@"
+fi
diff --git a/frontend/node_modules/.bin/terser.cmd b/frontend/node_modules/.bin/terser.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..abf66a827f5f191a622e2e2329585e58cd55fa72
--- /dev/null
+++ b/frontend/node_modules/.bin/terser.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\terser\bin\terser" %*
diff --git a/frontend/node_modules/.bin/terser.ps1 b/frontend/node_modules/.bin/terser.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..0bbfff61b989171d91bfb5e954d6a3a6e1379fa8
--- /dev/null
+++ b/frontend/node_modules/.bin/terser.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../terser/bin/terser" $args
+ } else {
+ & "node$exe" "$basedir/../terser/bin/terser" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/tsc b/frontend/node_modules/.bin/tsc
new file mode 100644
index 0000000000000000000000000000000000000000..49798517b1460f2a6ebc3044d2e7b09518c1d1c3
--- /dev/null
+++ b/frontend/node_modules/.bin/tsc
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
+else
+ exec node "$basedir/../typescript/bin/tsc" "$@"
+fi
diff --git a/frontend/node_modules/.bin/tsc.cmd b/frontend/node_modules/.bin/tsc.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..40bf1284554c31563142dfbf913d5e2d9ddf2c44
--- /dev/null
+++ b/frontend/node_modules/.bin/tsc.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %*
diff --git a/frontend/node_modules/.bin/tsc.ps1 b/frontend/node_modules/.bin/tsc.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..112413b584126ebe668f6f58ea14e0d83b6fe1fe
--- /dev/null
+++ b/frontend/node_modules/.bin/tsc.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
+ } else {
+ & "node$exe" "$basedir/../typescript/bin/tsc" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.bin/tsserver b/frontend/node_modules/.bin/tsserver
new file mode 100644
index 0000000000000000000000000000000000000000..cc53aac9ebd8252f048b1015b77c950d5297ad96
--- /dev/null
+++ b/frontend/node_modules/.bin/tsserver
@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
+else
+ exec node "$basedir/../typescript/bin/tsserver" "$@"
+fi
diff --git a/frontend/node_modules/.bin/tsserver.cmd b/frontend/node_modules/.bin/tsserver.cmd
new file mode 100644
index 0000000000000000000000000000000000000000..57f851fd7f4a0cdd0e155b002007b6acb8a4c4a9
--- /dev/null
+++ b/frontend/node_modules/.bin/tsserver.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %*
diff --git a/frontend/node_modules/.bin/tsserver.ps1 b/frontend/node_modules/.bin/tsserver.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..249f417d2703e27c453ed15e1e0ff60aff80811f
--- /dev/null
+++ b/frontend/node_modules/.bin/tsserver.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
+ } else {
+ & "node$exe" "$basedir/../typescript/bin/tsserver" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/frontend/node_modules/.package-lock.json b/frontend/node_modules/.package-lock.json
new file mode 100644
index 0000000000000000000000000000000000000000..c22e6fc1aee965cbb45b39af58351fdda0e65890
--- /dev/null
+++ b/frontend/node_modules/.package-lock.json
@@ -0,0 +1,1565 @@
+{
+ "name": "streamlit_component_svelte_template",
+ "version": "2.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@babel/code-frame": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz",
+ "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/highlight": "^7.16.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.15.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz",
+ "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz",
+ "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.15.7",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@polka/url": {
+ "version": "1.0.0-next.21",
+ "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
+ "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
+ },
+ "node_modules/@rollup/plugin-commonjs": {
+ "version": "12.0.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-12.0.0.tgz",
+ "integrity": "sha512-8+mDQt1QUmN+4Y9D3yCG8AJNewuTSLYPJVzKKUZ+lGeQrI+bV12Tc5HCyt2WdlnG6ihIL/DPbKRJlB40DX40mw==",
+ "dev": true,
+ "dependencies": {
+ "@rollup/pluginutils": "^3.0.8",
+ "commondir": "^1.0.1",
+ "estree-walker": "^1.0.1",
+ "glob": "^7.1.2",
+ "is-reference": "^1.1.2",
+ "magic-string": "^0.25.2",
+ "resolve": "^1.11.0"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.3.4"
+ }
+ },
+ "node_modules/@rollup/plugin-node-resolve": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz",
+ "integrity": "sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==",
+ "dev": true,
+ "dependencies": {
+ "@rollup/pluginutils": "^3.1.0",
+ "@types/resolve": "1.17.1",
+ "builtin-modules": "^3.1.0",
+ "deep-freeze": "^0.0.1",
+ "deepmerge": "^4.2.2",
+ "is-module": "^1.0.0",
+ "resolve": "^1.17.0"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0"
+ }
+ },
+ "node_modules/@rollup/plugin-typescript": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-4.1.2.tgz",
+ "integrity": "sha512-+7UlGat/99e2JbmGNnIauxwEhYLwrL7adO/tSJxUN57xrrS3Ps+ZzYpLCDGPZJ57j+ZJTZLLN89KXW9JMEB+jg==",
+ "dev": true,
+ "dependencies": {
+ "@rollup/pluginutils": "^3.0.1",
+ "resolve": "^1.14.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0",
+ "tslib": "*",
+ "typescript": ">=2.1.0"
+ }
+ },
+ "node_modules/@rollup/pluginutils": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
+ "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "0.0.39",
+ "estree-walker": "^1.0.1",
+ "picomatch": "^2.2.2"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0"
+ }
+ },
+ "node_modules/@tsconfig/svelte": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-1.0.13.tgz",
+ "integrity": "sha512-5lYJP45Xllo4yE/RUBccBT32eBlRDbqN8r1/MIvQbKxW3aFqaYPCNgm8D5V20X4ShHcwvYWNlKg3liDh1MlBoA==",
+ "dev": true
+ },
+ "node_modules/@types/estree": {
+ "version": "0.0.39",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
+ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
+ "dev": true
+ },
+ "node_modules/@types/flatbuffers": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/@types/flatbuffers/-/flatbuffers-1.10.0.tgz",
+ "integrity": "sha512-7btbphLrKvo5yl/5CC2OCxUSMx1wV1wvGT1qDXkSt7yi00/YW7E8k6qzXqJHsp+WU0eoG7r6MTQQXI9lIvd0qA=="
+ },
+ "node_modules/@types/node": {
+ "version": "16.11.6",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz",
+ "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==",
+ "dev": true
+ },
+ "node_modules/@types/pug": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.5.tgz",
+ "integrity": "sha512-LOnASQoeNZMkzexRuyqcBBDZ6rS+rQxUMkmj5A0PkhhiSZivLIuz6Hxyr1mkGoEZEkk66faROmpMi4fFkrKsBA==",
+ "dev": true
+ },
+ "node_modules/@types/resolve": {
+ "version": "1.17.1",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz",
+ "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/sass": {
+ "version": "1.43.0",
+ "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.0.tgz",
+ "integrity": "sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/text-encoding-utf-8": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@types/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz",
+ "integrity": "sha512-AQ6zewa0ucLJvtUi5HsErbOFKAcQfRLt9zFLlUOvcXBy2G36a+ZDpCHSGdzJVUD8aNURtIjh9aSjCStNMRCcRQ=="
+ },
+ "node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/apache-arrow": {
+ "version": "0.17.0",
+ "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-0.17.0.tgz",
+ "integrity": "sha512-cbgSx/tzGgnC1qeUySXnAsSsoxhDykNINqr1D3U5pRwf0/Q0ztVccV3/VRW6gUR+lcOFawk6FtyYwmU+KjglbQ==",
+ "dependencies": {
+ "@types/flatbuffers": "^1.9.1",
+ "@types/node": "^12.0.4",
+ "@types/text-encoding-utf-8": "^1.0.1",
+ "command-line-args": "5.0.2",
+ "command-line-usage": "5.0.5",
+ "flatbuffers": "1.11.0",
+ "json-bignum": "^0.0.3",
+ "pad-left": "^2.1.0",
+ "text-encoding-utf-8": "^1.0.2",
+ "tslib": "^1.9.3"
+ },
+ "bin": {
+ "arrow2csv": "bin/arrow2csv.js"
+ }
+ },
+ "node_modules/apache-arrow/node_modules/@types/node": {
+ "version": "12.20.36",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz",
+ "integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA=="
+ },
+ "node_modules/apache-arrow/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+ },
+ "node_modules/argv-tools": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/argv-tools/-/argv-tools-0.1.2.tgz",
+ "integrity": "sha512-wxqoymY0BEu9NblZVQiOTOAiJUjPhaa/kbNMjC2h6bnrmUSgnxKgWJo3lzXvi3bHJRwXyqK/dHzMlZVRT89Cxg==",
+ "dependencies": {
+ "array-back": "^2.0.0",
+ "find-replace": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/array-back": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz",
+ "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==",
+ "dependencies": {
+ "typical": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true
+ },
+ "node_modules/builtin-modules": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz",
+ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
+ "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
+ "dev": true,
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+ },
+ "node_modules/command-line-args": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.0.2.tgz",
+ "integrity": "sha512-/qPcbL8zpqg53x4rAaqMFlRV4opN3pbla7I7k9x8kyOBMQoGT6WltjN6sXZuxOXw6DgdK7Ad+ijYS5gjcr7vlA==",
+ "dependencies": {
+ "argv-tools": "^0.1.1",
+ "array-back": "^2.0.0",
+ "find-replace": "^2.0.1",
+ "lodash.camelcase": "^4.3.0",
+ "typical": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/command-line-usage": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-5.0.5.tgz",
+ "integrity": "sha512-d8NrGylA5oCXSbGoKz05FkehDAzSmIm4K03S5VDh4d5lZAtTWfc3D1RuETtuQCn8129nYfJfDdF7P/lwcz1BlA==",
+ "dependencies": {
+ "array-back": "^2.0.0",
+ "chalk": "^2.4.1",
+ "table-layout": "^0.4.3",
+ "typical": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "node_modules/console-clear": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz",
+ "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/deep-freeze": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz",
+ "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=",
+ "dev": true
+ },
+ "node_modules/deepmerge": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
+ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/detect-indent": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
+ "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/es6-promise": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
+ "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=",
+ "dev": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
+ "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
+ "dev": true
+ },
+ "node_modules/event-target-shim": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-replace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-2.0.1.tgz",
+ "integrity": "sha512-LzDo3Fpa30FLIBsh6DCDnMN1KW2g4QKkqKmejlImgWY67dDFPX/x9Kh/op/GK522DchQXEvDi/wD48HKW49XOQ==",
+ "dependencies": {
+ "array-back": "^2.0.0",
+ "test-value": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/flatbuffers": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-1.11.0.tgz",
+ "integrity": "sha512-0PqFKtXI4MjxomI7jO4g5XfLPm/15g2R+5WGCHBGYGh0ihQiypnHlJ6bMmkkrAe0GzZ4d7PDAfCONKIPUxNF+A=="
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "node_modules/get-port": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz",
+ "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.8",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
+ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==",
+ "dev": true
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz",
+ "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==",
+ "dev": true,
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
+ "dev": true
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-reference": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/jest-worker": {
+ "version": "24.9.0",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz",
+ "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==",
+ "dev": true,
+ "dependencies": {
+ "merge-stream": "^2.0.0",
+ "supports-color": "^6.1.0"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/jest-worker/node_modules/supports-color": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
+ "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "node_modules/json-bignum": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz",
+ "integrity": "sha1-QRY7UENsdz2CQk28IO1w23YEuNc=",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/livereload": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz",
+ "integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==",
+ "dev": true,
+ "dependencies": {
+ "chokidar": "^3.5.0",
+ "livereload-js": "^3.3.1",
+ "opts": ">= 1.2.0",
+ "ws": "^7.4.3"
+ },
+ "bin": {
+ "livereload": "bin/livereload.js"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/livereload-js": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.3.2.tgz",
+ "integrity": "sha512-w677WnINxFkuixAoUEXOStewzLYGI76XVag+0JWMMEyjJQKs0ibWZMxkTlB96Lm3EjZ7IeOxVziBEbtxVQqQZA==",
+ "dev": true
+ },
+ "node_modules/local-access": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.1.0.tgz",
+ "integrity": "sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/lodash.camelcase": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
+ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY="
+ },
+ "node_modules/lodash.padend": {
+ "version": "4.6.1",
+ "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz",
+ "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4="
+ },
+ "node_modules/magic-string": {
+ "version": "0.25.7",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
+ "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
+ "dev": true,
+ "dependencies": {
+ "sourcemap-codec": "^1.4.4"
+ }
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true
+ },
+ "node_modules/mime": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
+ "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/min-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+ "dev": true
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.5"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/mri": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/opts": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz",
+ "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==",
+ "dev": true
+ },
+ "node_modules/pad-left": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz",
+ "integrity": "sha1-FuajstRKjhOMsIOMx8tAOk/J6ZQ=",
+ "dependencies": {
+ "repeat-string": "^1.5.4"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
+ "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/reduce-flatten": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz",
+ "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/repeat-string": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/require-relative": {
+ "version": "0.8.7",
+ "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
+ "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=",
+ "dev": true
+ },
+ "node_modules/resolve": {
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
+ "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
+ "dev": true,
+ "dependencies": {
+ "is-core-module": "^2.2.0",
+ "path-parse": "^1.0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "2.59.0",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.59.0.tgz",
+ "integrity": "sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==",
+ "dev": true,
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/rollup-plugin-livereload": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz",
+ "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==",
+ "dev": true,
+ "dependencies": {
+ "livereload": "^0.9.1"
+ }
+ },
+ "node_modules/rollup-plugin-svelte": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-6.1.1.tgz",
+ "integrity": "sha512-ijnm0pH1ScrY4uxwaNXBpNVejVzpL2769hIEbAlnqNUWZrffLspu5/k9/l/Wsj3NrEHLQ6wCKGagVJonyfN7ow==",
+ "dev": true,
+ "dependencies": {
+ "require-relative": "^0.8.7",
+ "rollup-pluginutils": "^2.8.2",
+ "sourcemap-codec": "^1.4.8"
+ },
+ "peerDependencies": {
+ "rollup": ">=1.19.2",
+ "svelte": "*"
+ }
+ },
+ "node_modules/rollup-plugin-terser": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz",
+ "integrity": "sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==",
+ "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.5.5",
+ "jest-worker": "^24.9.0",
+ "rollup-pluginutils": "^2.8.2",
+ "serialize-javascript": "^4.0.0",
+ "terser": "^4.6.2"
+ },
+ "peerDependencies": {
+ "rollup": ">=0.66.0 <3"
+ }
+ },
+ "node_modules/rollup-pluginutils": {
+ "version": "2.8.2",
+ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
+ "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
+ "dev": true,
+ "dependencies": {
+ "estree-walker": "^0.6.1"
+ }
+ },
+ "node_modules/rollup-pluginutils/node_modules/estree-walker": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
+ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
+ "dev": true
+ },
+ "node_modules/sade": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.4.tgz",
+ "integrity": "sha512-y5yauMD93rX840MwUJr7C1ysLFBgMspsdTo4UVrDg3fXDvtwOyIqykhVAAm6fk/3au77773itJStObgK+LKaiA==",
+ "dependencies": {
+ "mri": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/sander": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
+ "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=",
+ "dev": true,
+ "dependencies": {
+ "es6-promise": "^3.1.2",
+ "graceful-fs": "^4.1.3",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.2"
+ }
+ },
+ "node_modules/semiver": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz",
+ "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/serialize-javascript": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
+ "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
+ "dev": true,
+ "dependencies": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "node_modules/sirv": {
+ "version": "1.0.18",
+ "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.18.tgz",
+ "integrity": "sha512-f2AOPogZmXgJ9Ma2M22ZEhc1dNtRIzcEkiflMFeVTRq+OViOZMvH1IPMVOwrKaxpSaHioBJiDR0SluRqGa7atA==",
+ "dependencies": {
+ "@polka/url": "^1.0.0-next.20",
+ "mime": "^2.3.1",
+ "totalist": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/sirv-cli": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-1.0.14.tgz",
+ "integrity": "sha512-yyUTNr984ANKDloqepkYbBSqvx3buwYg2sQKPWjSU+IBia5loaoka2If8N9CMwt8AfP179cdEl7kYJ//iWJHjQ==",
+ "dependencies": {
+ "console-clear": "^1.1.0",
+ "get-port": "^3.2.0",
+ "kleur": "^3.0.0",
+ "local-access": "^1.0.1",
+ "sade": "^1.6.0",
+ "semiver": "^1.0.0",
+ "sirv": "^1.0.13",
+ "tinydate": "^1.0.0"
+ },
+ "bin": {
+ "sirv": "bin.js"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/sorcery": {
+ "version": "0.10.0",
+ "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz",
+ "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=",
+ "dev": true,
+ "dependencies": {
+ "buffer-crc32": "^0.2.5",
+ "minimist": "^1.2.0",
+ "sander": "^0.5.0",
+ "sourcemap-codec": "^1.3.0"
+ },
+ "bin": {
+ "sorcery": "bin/index.js"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+ "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.20",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz",
+ "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==",
+ "dev": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/source-map-support/node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/sourcemap-codec": {
+ "version": "1.4.8",
+ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
+ "deprecated": "Please use @jridgewell/sourcemap-codec instead",
+ "dev": true
+ },
+ "node_modules/strip-indent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
+ "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
+ "dev": true,
+ "dependencies": {
+ "min-indent": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/svelte": {
+ "version": "3.44.1",
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.1.tgz",
+ "integrity": "sha512-4DrCEJoBvdR689efHNSxIQn2pnFwB7E7j2yLEJtHE/P8hxwZWIphCtJ8are7bjl/iVMlcEf5uh5pJ68IwR09vQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/svelte-check": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-1.6.0.tgz",
+ "integrity": "sha512-nQTlbFJWhwoeLY5rkhgbjzGQSwk5F1pRdEXait0EFaQSrE/iJF+PIjrQlk0BjL/ogk9HaR9ZI0DQSYrl7jl3IQ==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.0.0",
+ "chokidar": "^3.4.1",
+ "glob": "^7.1.6",
+ "import-fresh": "^3.2.1",
+ "minimist": "^1.2.5",
+ "sade": "^1.7.4",
+ "source-map": "^0.7.3",
+ "svelte-preprocess": "^4.0.0",
+ "typescript": "*"
+ },
+ "bin": {
+ "svelte-check": "bin/svelte-check"
+ },
+ "peerDependencies": {
+ "svelte": "^3.24.0"
+ }
+ },
+ "node_modules/svelte-check/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/svelte-check/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/svelte-check/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/svelte-check/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/svelte-check/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/svelte-check/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/svelte-preprocess": {
+ "version": "4.9.8",
+ "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.9.8.tgz",
+ "integrity": "sha512-EQS/oRZzMtYdAprppZxY3HcysKh11w54MgA63ybtL+TAZ4hVqYOnhw41JVJjWN9dhPnNjjLzvbZ2tMhTsla1Og==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "@types/pug": "^2.0.4",
+ "@types/sass": "^1.16.0",
+ "detect-indent": "^6.0.0",
+ "magic-string": "^0.25.7",
+ "sorcery": "^0.10.0",
+ "strip-indent": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 9.11.2"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.10.2",
+ "coffeescript": "^2.5.1",
+ "less": "^3.11.3",
+ "postcss": "^7 || ^8",
+ "postcss-load-config": "^2.1.0 || ^3.0.0",
+ "pug": "^3.0.0",
+ "sass": "^1.26.8",
+ "stylus": "^0.54.7",
+ "sugarss": "^2.0.0",
+ "svelte": "^3.23.0",
+ "typescript": "^3.9.5 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@babel/core": {
+ "optional": true
+ },
+ "coffeescript": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "node-sass": {
+ "optional": true
+ },
+ "postcss": {
+ "optional": true
+ },
+ "postcss-load-config": {
+ "optional": true
+ },
+ "pug": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/table-layout": {
+ "version": "0.4.5",
+ "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz",
+ "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==",
+ "dependencies": {
+ "array-back": "^2.0.0",
+ "deep-extend": "~0.6.0",
+ "lodash.padend": "^4.6.1",
+ "typical": "^2.6.1",
+ "wordwrapjs": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/terser": {
+ "version": "4.8.0",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
+ "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
+ "dev": true,
+ "dependencies": {
+ "commander": "^2.20.0",
+ "source-map": "~0.6.1",
+ "source-map-support": "~0.5.12"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/terser/node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/test-value": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz",
+ "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==",
+ "dependencies": {
+ "array-back": "^2.0.0",
+ "typical": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/text-encoding-utf-8": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz",
+ "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg=="
+ },
+ "node_modules/tinydate": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz",
+ "integrity": "sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/totalist": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz",
+ "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
+ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
+ "dev": true
+ },
+ "node_modules/typescript": {
+ "version": "3.9.10",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
+ "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
+ "node_modules/typical": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz",
+ "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0="
+ },
+ "node_modules/wordwrapjs": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz",
+ "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==",
+ "dependencies": {
+ "reduce-flatten": "^1.0.1",
+ "typical": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "node_modules/ws": {
+ "version": "7.5.5",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
+ "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/frontend/node_modules/@babel/code-frame/LICENSE b/frontend/node_modules/@babel/code-frame/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..f31575ec773bb199aeb7c0d0f1612cfe1c7038f1
--- /dev/null
+++ b/frontend/node_modules/@babel/code-frame/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@babel/code-frame/README.md b/frontend/node_modules/@babel/code-frame/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..08cacb0477fb94a0a1948270ef7346993d2bf053
--- /dev/null
+++ b/frontend/node_modules/@babel/code-frame/README.md
@@ -0,0 +1,19 @@
+# @babel/code-frame
+
+> Generate errors that contain a code frame that point to source locations.
+
+See our website [@babel/code-frame](https://babeljs.io/docs/en/babel-code-frame) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/code-frame
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/code-frame --dev
+```
diff --git a/frontend/node_modules/@babel/code-frame/lib/index.js b/frontend/node_modules/@babel/code-frame/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..cba3f83792c73cabd4be0d33b2c5a3f8f863fe5e
--- /dev/null
+++ b/frontend/node_modules/@babel/code-frame/lib/index.js
@@ -0,0 +1,163 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.codeFrameColumns = codeFrameColumns;
+exports.default = _default;
+
+var _highlight = require("@babel/highlight");
+
+let deprecationWarningShown = false;
+
+function getDefs(chalk) {
+ return {
+ gutter: chalk.grey,
+ marker: chalk.red.bold,
+ message: chalk.red.bold
+ };
+}
+
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+
+function getMarkerLines(loc, source, opts) {
+ const startLoc = Object.assign({
+ column: 0,
+ line: -1
+ }, loc.start);
+ const endLoc = Object.assign({}, startLoc, loc.end);
+ const {
+ linesAbove = 2,
+ linesBelow = 3
+ } = opts || {};
+ const startLine = startLoc.line;
+ const startColumn = startLoc.column;
+ const endLine = endLoc.line;
+ const endColumn = endLoc.column;
+ let start = Math.max(startLine - (linesAbove + 1), 0);
+ let end = Math.min(source.length, endLine + linesBelow);
+
+ if (startLine === -1) {
+ start = 0;
+ }
+
+ if (endLine === -1) {
+ end = source.length;
+ }
+
+ const lineDiff = endLine - startLine;
+ const markerLines = {};
+
+ if (lineDiff) {
+ for (let i = 0; i <= lineDiff; i++) {
+ const lineNumber = i + startLine;
+
+ if (!startColumn) {
+ markerLines[lineNumber] = true;
+ } else if (i === 0) {
+ const sourceLength = source[lineNumber - 1].length;
+ markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
+ } else if (i === lineDiff) {
+ markerLines[lineNumber] = [0, endColumn];
+ } else {
+ const sourceLength = source[lineNumber - i].length;
+ markerLines[lineNumber] = [0, sourceLength];
+ }
+ }
+ } else {
+ if (startColumn === endColumn) {
+ if (startColumn) {
+ markerLines[startLine] = [startColumn, 0];
+ } else {
+ markerLines[startLine] = true;
+ }
+ } else {
+ markerLines[startLine] = [startColumn, endColumn - startColumn];
+ }
+ }
+
+ return {
+ start,
+ end,
+ markerLines
+ };
+}
+
+function codeFrameColumns(rawLines, loc, opts = {}) {
+ const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
+ const chalk = (0, _highlight.getChalk)(opts);
+ const defs = getDefs(chalk);
+
+ const maybeHighlight = (chalkFn, string) => {
+ return highlighted ? chalkFn(string) : string;
+ };
+
+ const lines = rawLines.split(NEWLINE);
+ const {
+ start,
+ end,
+ markerLines
+ } = getMarkerLines(loc, lines, opts);
+ const hasColumns = loc.start && typeof loc.start.column === "number";
+ const numberMaxWidth = String(end).length;
+ const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
+ let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
+ const number = start + 1 + index;
+ const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
+ const gutter = ` ${paddedNumber} |`;
+ const hasMarker = markerLines[number];
+ const lastMarkerLine = !markerLines[number + 1];
+
+ if (hasMarker) {
+ let markerLine = "";
+
+ if (Array.isArray(hasMarker)) {
+ const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
+ const numberOfMarkers = hasMarker[1] || 1;
+ markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
+
+ if (lastMarkerLine && opts.message) {
+ markerLine += " " + maybeHighlight(defs.message, opts.message);
+ }
+ }
+
+ return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
+ } else {
+ return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
+ }
+ }).join("\n");
+
+ if (opts.message && !hasColumns) {
+ frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
+ }
+
+ if (highlighted) {
+ return chalk.reset(frame);
+ } else {
+ return frame;
+ }
+}
+
+function _default(rawLines, lineNumber, colNumber, opts = {}) {
+ if (!deprecationWarningShown) {
+ deprecationWarningShown = true;
+ const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
+
+ if (process.emitWarning) {
+ process.emitWarning(message, "DeprecationWarning");
+ } else {
+ const deprecationError = new Error(message);
+ deprecationError.name = "DeprecationWarning";
+ console.warn(new Error(message));
+ }
+ }
+
+ colNumber = Math.max(colNumber, 0);
+ const location = {
+ start: {
+ column: colNumber,
+ line: lineNumber
+ }
+ };
+ return codeFrameColumns(rawLines, location, opts);
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/code-frame/package.json b/frontend/node_modules/@babel/code-frame/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..fddb2759647da42cd399516f472ffb48987fa244
--- /dev/null
+++ b/frontend/node_modules/@babel/code-frame/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@babel/code-frame",
+ "version": "7.16.0",
+ "description": "Generate errors that contain a code frame that point to source locations.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-code-frame",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-code-frame"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/highlight": "^7.16.0"
+ },
+ "devDependencies": {
+ "@types/chalk": "^2.0.0",
+ "chalk": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/LICENSE b/frontend/node_modules/@babel/helper-validator-identifier/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..f31575ec773bb199aeb7c0d0f1612cfe1c7038f1
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/README.md b/frontend/node_modules/@babel/helper-validator-identifier/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..6733576a8ce76b5f2a8a766884487c608e838aad
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-validator-identifier
+
+> Validate identifier/keywords name
+
+See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/babel-helper-validator-identifier) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-validator-identifier
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-validator-identifier --dev
+```
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/frontend/node_modules/@babel/helper-validator-identifier/lib/identifier.js
new file mode 100644
index 0000000000000000000000000000000000000000..b8a5d9a67f740841499eacdef7e05094bd4a0833
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/lib/identifier.js
@@ -0,0 +1,84 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isIdentifierStart = isIdentifierStart;
+exports.isIdentifierChar = isIdentifierChar;
+exports.isIdentifierName = isIdentifierName;
+let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
+const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+function isInAstralSet(code, set) {
+ let pos = 0x10000;
+
+ for (let i = 0, length = set.length; i < length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+
+ return false;
+}
+
+function isIdentifierStart(code) {
+ if (code < 65) return code === 36;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+
+function isIdentifierChar(code) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+
+function isIdentifierName(name) {
+ let isFirst = true;
+
+ for (let i = 0; i < name.length; i++) {
+ let cp = name.charCodeAt(i);
+
+ if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
+ const trail = name.charCodeAt(++i);
+
+ if ((trail & 0xfc00) === 0xdc00) {
+ cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
+ }
+ }
+
+ if (isFirst) {
+ isFirst = false;
+
+ if (!isIdentifierStart(cp)) {
+ return false;
+ }
+ } else if (!isIdentifierChar(cp)) {
+ return false;
+ }
+ }
+
+ return !isFirst;
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/lib/index.js b/frontend/node_modules/@babel/helper-validator-identifier/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..7b623c90a6e164c669cedff262de4048c2290857
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/lib/index.js
@@ -0,0 +1,57 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "isIdentifierName", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierName;
+ }
+});
+Object.defineProperty(exports, "isIdentifierChar", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierChar;
+ }
+});
+Object.defineProperty(exports, "isIdentifierStart", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierStart;
+ }
+});
+Object.defineProperty(exports, "isReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindOnlyReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictReservedWord;
+ }
+});
+Object.defineProperty(exports, "isKeyword", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isKeyword;
+ }
+});
+
+var _identifier = require("./identifier");
+
+var _keyword = require("./keyword");
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/frontend/node_modules/@babel/helper-validator-identifier/lib/keyword.js
new file mode 100644
index 0000000000000000000000000000000000000000..110cee4002896b7024e15c0e92f505eb40b9afa6
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/lib/keyword.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isReservedWord = isReservedWord;
+exports.isStrictReservedWord = isStrictReservedWord;
+exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
+exports.isStrictBindReservedWord = isStrictBindReservedWord;
+exports.isKeyword = isKeyword;
+const reservedWords = {
+ keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
+ strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
+ strictBind: ["eval", "arguments"]
+};
+const keywords = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
+
+function isReservedWord(word, inModule) {
+ return inModule && word === "await" || word === "enum";
+}
+
+function isStrictReservedWord(word, inModule) {
+ return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
+}
+
+function isStrictBindOnlyReservedWord(word) {
+ return reservedWordsStrictBindSet.has(word);
+}
+
+function isStrictBindReservedWord(word, inModule) {
+ return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
+}
+
+function isKeyword(word) {
+ return keywords.has(word);
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/package.json b/frontend/node_modules/@babel/helper-validator-identifier/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0efb119c4b51652563b9fcf009c88120123e3b58
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "@babel/helper-validator-identifier",
+ "version": "7.15.7",
+ "description": "Validate identifier/keywords name",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-validator-identifier"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "exports": "./lib/index.js",
+ "devDependencies": {
+ "@unicode/unicode-14.0.0": "^1.2.1",
+ "charcodes": "^0.2.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/frontend/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
new file mode 100644
index 0000000000000000000000000000000000000000..f644d77df9f124be316a87baeac03d16ab31fac6
--- /dev/null
+++ b/frontend/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
@@ -0,0 +1,75 @@
+"use strict";
+
+// Always use the latest available version of Unicode!
+// https://tc39.github.io/ecma262/#sec-conformance
+const version = "14.0.0";
+
+const start = require("@unicode/unicode-" +
+ version +
+ "/Binary_Property/ID_Start/code-points.js").filter(function (ch) {
+ return ch > 0x7f;
+});
+let last = -1;
+const cont = [0x200c, 0x200d].concat(
+ require("@unicode/unicode-" +
+ version +
+ "/Binary_Property/ID_Continue/code-points.js").filter(function (ch) {
+ return ch > 0x7f && search(start, ch, last + 1) == -1;
+ })
+);
+
+function search(arr, ch, starting) {
+ for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
+ if (arr[i] === ch) return i;
+ }
+ return -1;
+}
+
+function pad(str, width) {
+ while (str.length < width) str = "0" + str;
+ return str;
+}
+
+function esc(code) {
+ const hex = code.toString(16);
+ if (hex.length <= 2) return "\\x" + pad(hex, 2);
+ else return "\\u" + pad(hex, 4);
+}
+
+function generate(chars) {
+ const astral = [];
+ let re = "";
+ for (let i = 0, at = 0x10000; i < chars.length; i++) {
+ const from = chars[i];
+ let to = from;
+ while (i < chars.length - 1 && chars[i + 1] == to + 1) {
+ i++;
+ to++;
+ }
+ if (to <= 0xffff) {
+ if (from == to) re += esc(from);
+ else if (from + 1 == to) re += esc(from) + esc(to);
+ else re += esc(from) + "-" + esc(to);
+ } else {
+ astral.push(from - at, to - from);
+ at = to;
+ }
+ }
+ return { nonASCII: re, astral: astral };
+}
+
+const startData = generate(start);
+const contData = generate(cont);
+
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"
+);
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"
+);
diff --git a/frontend/node_modules/@babel/highlight/LICENSE b/frontend/node_modules/@babel/highlight/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..f31575ec773bb199aeb7c0d0f1612cfe1c7038f1
--- /dev/null
+++ b/frontend/node_modules/@babel/highlight/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@babel/highlight/README.md b/frontend/node_modules/@babel/highlight/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..f8887ad2ca470c6202b1738436055b1fa3028846
--- /dev/null
+++ b/frontend/node_modules/@babel/highlight/README.md
@@ -0,0 +1,19 @@
+# @babel/highlight
+
+> Syntax highlight JavaScript strings for output in terminals.
+
+See our website [@babel/highlight](https://babeljs.io/docs/en/babel-highlight) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/highlight
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/highlight --dev
+```
diff --git a/frontend/node_modules/@babel/highlight/lib/index.js b/frontend/node_modules/@babel/highlight/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..b8537b26f6ba13df21a6a835eb62d1909a19e1d2
--- /dev/null
+++ b/frontend/node_modules/@babel/highlight/lib/index.js
@@ -0,0 +1,116 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = highlight;
+exports.getChalk = getChalk;
+exports.shouldHighlight = shouldHighlight;
+
+var _jsTokens = require("js-tokens");
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _chalk = require("chalk");
+
+const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
+
+function getDefs(chalk) {
+ return {
+ keyword: chalk.cyan,
+ capitalized: chalk.yellow,
+ jsxIdentifier: chalk.yellow,
+ punctuator: chalk.yellow,
+ number: chalk.magenta,
+ string: chalk.green,
+ regex: chalk.magenta,
+ comment: chalk.grey,
+ invalid: chalk.white.bgRed.bold
+ };
+}
+
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+const BRACKET = /^[()[\]{}]$/;
+let tokenize;
+{
+ const JSX_TAG = /^[a-z][\w-]*$/i;
+
+ const getTokenType = function (token, offset, text) {
+ if (token.type === "name") {
+ if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
+ return "keyword";
+ }
+
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "")) {
+ return "jsxIdentifier";
+ }
+
+ if (token.value[0] !== token.value[0].toLowerCase()) {
+ return "capitalized";
+ }
+ }
+
+ if (token.type === "punctuator" && BRACKET.test(token.value)) {
+ return "bracket";
+ }
+
+ if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
+ return "punctuator";
+ }
+
+ return token.type;
+ };
+
+ tokenize = function* (text) {
+ let match;
+
+ while (match = _jsTokens.default.exec(text)) {
+ const token = _jsTokens.matchToToken(match);
+
+ yield {
+ type: getTokenType(token, match.index, text),
+ value: token.value
+ };
+ }
+ };
+}
+
+function highlightTokens(defs, text) {
+ let highlighted = "";
+
+ for (const {
+ type,
+ value
+ } of tokenize(text)) {
+ const colorize = defs[type];
+
+ if (colorize) {
+ highlighted += value.split(NEWLINE).map(str => colorize(str)).join("\n");
+ } else {
+ highlighted += value;
+ }
+ }
+
+ return highlighted;
+}
+
+function shouldHighlight(options) {
+ return !!_chalk.supportsColor || options.forceColor;
+}
+
+function getChalk(options) {
+ return options.forceColor ? new _chalk.constructor({
+ enabled: true,
+ level: 1
+ }) : _chalk;
+}
+
+function highlight(code, options = {}) {
+ if (shouldHighlight(options)) {
+ const chalk = getChalk(options);
+ const defs = getDefs(chalk);
+ return highlightTokens(defs, code);
+ } else {
+ return code;
+ }
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@babel/highlight/package.json b/frontend/node_modules/@babel/highlight/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..a18f453f116bbe0985b9005f8c934c4bbc181f0f
--- /dev/null
+++ b/frontend/node_modules/@babel/highlight/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@babel/highlight",
+ "version": "7.16.0",
+ "description": "Syntax highlight JavaScript strings for output in terminals.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-highlight",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-highlight"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.15.7",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "devDependencies": {
+ "@types/chalk": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@polka/url/build.js b/frontend/node_modules/@polka/url/build.js
new file mode 100644
index 0000000000000000000000000000000000000000..33dfc56cc3581d838d452b005cc89bd05380dd20
--- /dev/null
+++ b/frontend/node_modules/@polka/url/build.js
@@ -0,0 +1,42 @@
+const qs = require('querystring');
+
+/**
+ * @typedef ParsedURL
+ * @type {import('.').ParsedURL}
+ */
+
+/**
+ * @typedef Request
+ * @property {string} url
+ * @property {ParsedURL} _parsedUrl
+ */
+
+/**
+ * @param {Request} req
+ * @returns {ParsedURL|void}
+ */
+function parse(req) {
+ let raw = req.url;
+ if (raw == null) return;
+
+ let prev = req._parsedUrl;
+ if (prev && prev.raw === raw) return prev;
+
+ let pathname=raw, search='', query;
+
+ if (raw.length > 1) {
+ let idx = raw.indexOf('?', 1);
+
+ if (idx !== -1) {
+ search = raw.substring(idx);
+ pathname = raw.substring(0, idx);
+ if (search.length > 1) {
+ query = qs.parse(search.substring(1));
+ }
+ }
+ }
+
+ return req._parsedUrl = { pathname, search, query, raw };
+}
+
+exports.parse = parse;
\ No newline at end of file
diff --git a/frontend/node_modules/@polka/url/build.mjs b/frontend/node_modules/@polka/url/build.mjs
new file mode 100644
index 0000000000000000000000000000000000000000..9d5e7b91132ce31a4096284160ad00c4e3164922
--- /dev/null
+++ b/frontend/node_modules/@polka/url/build.mjs
@@ -0,0 +1,40 @@
+import * as qs from 'querystring';
+
+/**
+ * @typedef ParsedURL
+ * @type {import('.').ParsedURL}
+ */
+
+/**
+ * @typedef Request
+ * @property {string} url
+ * @property {ParsedURL} _parsedUrl
+ */
+
+/**
+ * @param {Request} req
+ * @returns {ParsedURL|void}
+ */
+export function parse(req) {
+ let raw = req.url;
+ if (raw == null) return;
+
+ let prev = req._parsedUrl;
+ if (prev && prev.raw === raw) return prev;
+
+ let pathname=raw, search='', query;
+
+ if (raw.length > 1) {
+ let idx = raw.indexOf('?', 1);
+
+ if (idx !== -1) {
+ search = raw.substring(idx);
+ pathname = raw.substring(0, idx);
+ if (search.length > 1) {
+ query = qs.parse(search.substring(1));
+ }
+ }
+ }
+
+ return req._parsedUrl = { pathname, search, query, raw };
+}
diff --git a/frontend/node_modules/@polka/url/index.d.ts b/frontend/node_modules/@polka/url/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9b27c042e4689444de12b45c6486ce8ae50f41d3
--- /dev/null
+++ b/frontend/node_modules/@polka/url/index.d.ts
@@ -0,0 +1,10 @@
+import type { IncomingMessage } from 'http';
+
+export interface ParsedURL {
+ pathname: string;
+ search: string;
+ query: Record | void;
+ raw: string;
+}
+
+export function parse(req: IncomingMessage): ParsedURL;
diff --git a/frontend/node_modules/@polka/url/license b/frontend/node_modules/@polka/url/license
new file mode 100644
index 0000000000000000000000000000000000000000..d46889ae35762abe2fc2f33a4b2ef0825fd1a6dc
--- /dev/null
+++ b/frontend/node_modules/@polka/url/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Luke Edwards (https://lukeed.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@polka/url/package.json b/frontend/node_modules/@polka/url/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..2d36518dd095e2d3ad4ceed6482c17befd99534f
--- /dev/null
+++ b/frontend/node_modules/@polka/url/package.json
@@ -0,0 +1,30 @@
+{
+ "version": "1.0.0-next.21",
+ "name": "@polka/url",
+ "repository": "lukeed/polka",
+ "description": "Super fast, memoized `req.url` parser",
+ "module": "build.mjs",
+ "types": "index.d.ts",
+ "main": "build.js",
+ "license": "MIT",
+ "exports": {
+ ".": {
+ "import": "./build.mjs",
+ "require": "./build.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "*.d.ts",
+ "build.*"
+ ],
+ "author": {
+ "name": "Luke Edwards",
+ "email": "luke@lukeed.com",
+ "url": "https://lukeed.com"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "gitHead": "8d6e31871225f4449e645ecba13de7014f772b34"
+}
diff --git a/frontend/node_modules/@polka/url/readme.md b/frontend/node_modules/@polka/url/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..69947a7ac859d42393c0d8d21ca38b7cdb030911
--- /dev/null
+++ b/frontend/node_modules/@polka/url/readme.md
@@ -0,0 +1,68 @@
+# @polka/url [](https://npmjs.org/package/@polka/url)
+
+> Super fast, memoized `req.url` parser; _not_ limited to [Polka][polka]!
+
+Parses the `url` from a [`IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) request. The returned object will always only contain the following keys: `search`, `query`, `pathname`, and `raw`.
+
+> **Note:** This library does not process `protocol`, `hostname`, `port`, etc.
This is because the incoming `req.url` value only begins with the path information.
+
+Parsed requests will be mutated with a `_parsedUrl` key, containing the returned output. This is used for future memoization, avoiding the need to fully parse the same `url` value multiple times.
+
+## Install
+
+```
+$ npm install --save @polka/url
+```
+
+## Usage
+
+```js
+const parse = require('@polka/url');
+
+let req = {
+ url: '/foo/bar?fizz=buzz'
+};
+let output = parse(req);
+//=> {
+//=> pathname: '/foo/bar',
+//=> raw: '/foo/bar?fizz=buzz',
+//=> search: '?fizz=buzz',
+//=> query: {
+//=> fizz: 'buzz'
+//=> },
+//=> }
+
+// Attaches result for future memoization
+assert.deepEqual(output, req._parsedUrl); //=> true
+```
+
+## API
+
+### url(req)
+Returns: `Object` or `undefined`
+
+> **Important:** The `req` must have a `url` key, otherwise `undefined` will be returned.
If no input is provided at all, a `TypeError` will be thrown.
+
+#### req
+Type: `IncomingMessage` or `{ url: string }`
+
+The incoming HTTP request (`req`) or a plain `Object` with a `url` key.
+
+> **Note:** In Node.js servers, the [`req.url`](https://nodejs.org/api/http.html#http_message_url) begins with a pathname & does not include a `hash`.
+
+
+## Benchmarks
+
+Check out the [`bench`](/bench) directory for in-depth benchmark results and comparisons.
+
+
+## Support
+
+Any issues or questions can be sent to the [Polka][polka] repository.
However, please specify that your inquiry is about `@polka/url` specifically.
+
+
+## License
+
+MIT © [Luke Edwards](https://lukeed.com)
+
+[polka]: https://github.com/lukeed/polka
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/CHANGELOG.md b/frontend/node_modules/@rollup/plugin-commonjs/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..e63f84f712267de790fd54f53093868cf42d1081
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/CHANGELOG.md
@@ -0,0 +1,410 @@
+# @rollup/plugin-commonjs ChangeLog
+
+## v12.0.0
+
+_2020-05-20_
+
+### Breaking Changes
+
+- feat: add kill-switch for mixed es-cjs modules (#358)
+- feat: set syntheticNamedExports for commonjs modules (#149)
+
+### Bugfixes
+
+- fix: expose the virtual `require` function on mock `module`. fixes #307 (#326)
+- fix: improved shouldWrap logic. fixes #304 (#355)
+
+### Features
+
+- feat: support for explicit module.require calls. fixes #310 (#325)
+
+## v11.1.0
+
+_2020-04-12_
+
+### Bugfixes
+
+- fix: produce legal variable names from filenames containing hyphens. (#201)
+
+### Features
+
+- feat: support dynamic require (#206)
+- feat: export properties defined using Object.defineProperty(exports, ..) (#222)
+
+### Updates
+
+- chore: snapshot mismatch running tests before publish (d6bbfdd)
+- test: add snapshots to all "function" tests (#218)
+
+## v11.0.2
+
+_2020-02-01_
+
+### Updates
+
+- docs: fix link for plugin-node-resolve (#170)
+- chore: update dependencies (5405eea)
+- chore: remove jsnext:main (#152)
+
+## v11.0.1
+
+_2020-01-04_
+
+### Bugfixes
+
+- fix: module.exports object spread (#121)
+
+## 11.0.0
+
+_2019-12-13_
+
+- **Breaking:** Minimum compatible Rollup version is 1.20.0
+- **Breaking:** Minimum supported Node version is 8.0.0
+- Published as @rollup/plugin-commonjs
+
+## 10.1.0
+
+_2019-08-27_
+
+- Normalize ids before looking up in named export map ([#406](https://github.com/rollup/rollup-plugin-commonjs/issues/406))
+- Update README.md with note on symlinks ([#405](https://github.com/rollup/rollup-plugin-commonjs/issues/405))
+
+## 10.0.2
+
+_2019-08-03_
+
+- Support preserveSymlinks: false ([#401](https://github.com/rollup/rollup-plugin-commonjs/issues/401))
+
+## 10.0.1
+
+_2019-06-27_
+
+- Make tests run with Node 6 again and update dependencies ([#389](https://github.com/rollup/rollup-plugin-commonjs/issues/389))
+- Handle builtins appropriately for resolve 1.11.0 ([#395](https://github.com/rollup/rollup-plugin-commonjs/issues/395))
+
+## 10.0.0
+
+_2019-05-15_
+
+- Use new Rollup@1.12 context functions, fix issue when resolveId returns an object ([#387](https://github.com/rollup/rollup-plugin-commonjs/issues/387))
+
+## 9.3.4
+
+_2019-04-04_
+
+- Make "extensions" optional ([#384](https://github.com/rollup/rollup-plugin-commonjs/issues/384))
+- Use same typing for include and exclude properties ([#385](https://github.com/rollup/rollup-plugin-commonjs/issues/385))
+
+## 9.3.3
+
+_2019-04-04_
+
+- Remove colon from module prefixes ([#371](https://github.com/rollup/rollup-plugin-commonjs/issues/371))
+
+## 9.3.2
+
+_2019-04-04_
+
+- Use shared extractAssignedNames, fix destructuring issue ([#303](https://github.com/rollup/rollup-plugin-commonjs/issues/303))
+
+## 9.3.1
+
+_2019-04-04_
+
+- Include typings in release ([#382](https://github.com/rollup/rollup-plugin-commonjs/issues/382))
+
+## 9.3.0
+
+_2019-04-03_
+
+- Add TypeScript types ([#363](https://github.com/rollup/rollup-plugin-commonjs/issues/363))
+
+## 9.2.3
+
+_2019-04-02_
+
+- Improve support for ES3 browsers ([#364](https://github.com/rollup/rollup-plugin-commonjs/issues/364))
+- Add note about monorepo usage to readme ([#372](https://github.com/rollup/rollup-plugin-commonjs/issues/372))
+- Add .js extension to generated helper file ([#373](https://github.com/rollup/rollup-plugin-commonjs/issues/373))
+
+## 9.2.2
+
+_2019-03-25_
+
+- Handle array destructuring assignment ([#379](https://github.com/rollup/rollup-plugin-commonjs/issues/379))
+
+## 9.2.1
+
+_2019-02-23_
+
+- Use correct context when manually resolving ids ([#370](https://github.com/rollup/rollup-plugin-commonjs/issues/370))
+
+## 9.2.0
+
+_2018-10-10_
+
+- Fix missing default warning, produce better code when importing known ESM default exports ([#349](https://github.com/rollup/rollup-plugin-commonjs/issues/349))
+- Refactor code and add prettier ([#346](https://github.com/rollup/rollup-plugin-commonjs/issues/346))
+
+## 9.1.8
+
+_2018-09-18_
+
+- Ignore virtual modules created by other plugins ([#327](https://github.com/rollup/rollup-plugin-commonjs/issues/327))
+- Add "location" and "process" to reserved words ([#330](https://github.com/rollup/rollup-plugin-commonjs/issues/330))
+
+## 9.1.6
+
+_2018-08-24_
+
+- Keep commonJS detection between instantiations ([#338](https://github.com/rollup/rollup-plugin-commonjs/issues/338))
+
+## 9.1.5
+
+_2018-08-09_
+
+- Handle object form of input ([#329](https://github.com/rollup/rollup-plugin-commonjs/issues/329))
+
+## 9.1.4
+
+_2018-07-27_
+
+- Make "from" a reserved word ([#320](https://github.com/rollup/rollup-plugin-commonjs/issues/320))
+
+## 9.1.3
+
+_2018-04-30_
+
+- Fix a caching issue ([#316](https://github.com/rollup/rollup-plugin-commonjs/issues/316))
+
+## 9.1.2
+
+_2018-04-30_
+
+- Re-publication of 9.1.0
+
+## 9.1.1
+
+_2018-04-30_
+
+- Fix ordering of modules when using rollup 0.58 ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
+
+## 9.1.0
+
+- Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
+
+## 9.0.0
+
+- Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300))
+
+## 8.4.1
+
+- Re-release of 8.3.0 as #287 was actually a breaking change
+
+## 8.4.0
+
+- Better handle non-CJS files that contain CJS keywords ([#285](https://github.com/rollup/rollup-plugin-commonjs/issues/285))
+- Use rollup's plugin context`parse` function ([#287](https://github.com/rollup/rollup-plugin-commonjs/issues/287))
+- Improve error handling ([#288](https://github.com/rollup/rollup-plugin-commonjs/issues/288))
+
+## 8.3.0
+
+- Handle multiple entry points ([#283](https://github.com/rollup/rollup-plugin-commonjs/issues/283))
+- Extract named exports from exported object literals ([#272](https://github.com/rollup/rollup-plugin-commonjs/issues/272))
+- Fix when `options.external` is modified by other plugins ([#264](https://github.com/rollup/rollup-plugin-commonjs/issues/264))
+- Recognize static template strings in require statements ([#271](https://github.com/rollup/rollup-plugin-commonjs/issues/271))
+
+## 8.2.4
+
+- Don't import default from ES modules that don't export default ([#206](https://github.com/rollup/rollup-plugin-commonjs/issues/206))
+
+## 8.2.3
+
+- Prevent duplicate default exports ([#230](https://github.com/rollup/rollup-plugin-commonjs/pull/230))
+- Only include default export when it exists ([#226](https://github.com/rollup/rollup-plugin-commonjs/pull/226))
+- Deconflict `require` aliases ([#232](https://github.com/rollup/rollup-plugin-commonjs/issues/232))
+
+## 8.2.1
+
+- Fix magic-string deprecation warning
+
+## 8.2.0
+
+- Avoid using `index` as a variable name ([#208](https://github.com/rollup/rollup-plugin-commonjs/pull/208))
+
+## 8.1.1
+
+- Compatibility with 0.48 ([#220](https://github.com/rollup/rollup-plugin-commonjs/issues/220))
+
+## 8.1.0
+
+- Handle `options.external` correctly ([#212](https://github.com/rollup/rollup-plugin-commonjs/pull/212))
+- Support top-level return ([#195](https://github.com/rollup/rollup-plugin-commonjs/pull/195))
+
+## 8.0.2
+
+- Fix another `var` rewrite bug ([#181](https://github.com/rollup/rollup-plugin-commonjs/issues/181))
+
+## 8.0.1
+
+- Remove declarators within a var declaration correctly ([#179](https://github.com/rollup/rollup-plugin-commonjs/issues/179))
+
+## 8.0.0
+
+- Prefer the names dependencies are imported by for the common `var foo = require('foo')` pattern ([#176](https://github.com/rollup/rollup-plugin-commonjs/issues/176))
+
+## 7.1.0
+
+- Allow certain `require` statements to pass through unmolested ([#174](https://github.com/rollup/rollup-plugin-commonjs/issues/174))
+
+## 7.0.2
+
+- Handle duplicate default exports ([#158](https://github.com/rollup/rollup-plugin-commonjs/issues/158))
+
+## 7.0.1
+
+- Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168))
+
+## 7.0.0
+
+- Rewrite `typeof module`, `typeof module.exports` and `typeof exports` as `'object'` ([#151](https://github.com/rollup/rollup-plugin-commonjs/issues/151))
+
+## 6.0.1
+
+- Don't overwrite globals ([#127](https://github.com/rollup/rollup-plugin-commonjs/issues/127))
+
+## 6.0.0
+
+- Rewrite top-level `define` as `undefined`, so AMD-first UMD blocks do not cause breakage ([#144](https://github.com/rollup/rollup-plugin-commonjs/issues/144))
+- Support ES2017 syntax ([#132](https://github.com/rollup/rollup-plugin-commonjs/issues/132))
+- Deconflict exported reserved keywords ([#116](https://github.com/rollup/rollup-plugin-commonjs/issues/116))
+
+## 5.0.5
+
+- Fix parenthesis wrapped exports ([#120](https://github.com/rollup/rollup-plugin-commonjs/issues/120))
+
+## 5.0.4
+
+- Ensure named exports are added to default export in optimised modules ([#112](https://github.com/rollup/rollup-plugin-commonjs/issues/112))
+
+## 5.0.3
+
+- Respect custom `namedExports` in optimised modules ([#35](https://github.com/rollup/rollup-plugin-commonjs/issues/35))
+
+## 5.0.2
+
+- Replace `require` (outside call expressions) with `commonjsRequire` helper ([#77](https://github.com/rollup/rollup-plugin-commonjs/issues/77), [#83](https://github.com/rollup/rollup-plugin-commonjs/issues/83))
+
+## 5.0.1
+
+- Deconflict against globals ([#84](https://github.com/rollup/rollup-plugin-commonjs/issues/84))
+
+## 5.0.0
+
+- Optimise modules that don't need to be wrapped in a function ([#106](https://github.com/rollup/rollup-plugin-commonjs/pull/106))
+- Ignore modules containing `import` and `export` statements ([#96](https://github.com/rollup/rollup-plugin-commonjs/pull/96))
+
+## 4.1.0
+
+- Ignore dead branches ([#93](https://github.com/rollup/rollup-plugin-commonjs/issues/93))
+
+## 4.0.1
+
+- Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86))
+
+## 4.0.0
+
+- Better interop and smaller output ([#92](https://github.com/rollup/rollup-plugin-commonjs/pull/92))
+
+## 3.3.1
+
+- Deconflict export and local module ([rollup/rollup#554](https://github.com/rollup/rollup/issues/554))
+
+## 3.3.0
+
+- Keep the order of execution for require calls ([#43](https://github.com/rollup/rollup-plugin-commonjs/pull/43))
+- Use interopDefault as helper ([#42](https://github.com/rollup/rollup-plugin-commonjs/issues/42))
+
+## 3.2.0
+
+- Use named exports as a function when no default export is defined ([#524](https://github.com/rollup/rollup/issues/524))
+
+## 3.1.0
+
+- Replace `typeof require` with `'function'` ([#38](https://github.com/rollup/rollup-plugin-commonjs/issues/38))
+- Don't attempt to resolve entry file relative to importer ([#63](https://github.com/rollup/rollup-plugin-commonjs/issues/63))
+
+## 3.0.2
+
+- Handle multiple references to `global`
+
+## 3.0.1
+
+- Return a `name`
+
+## 3.0.0
+
+- Make `transform` stateless ([#71](https://github.com/rollup/rollup-plugin-commonjs/pull/71))
+- Support web worker `global` ([#50](https://github.com/rollup/rollup-plugin-commonjs/issues/50))
+- Ignore global with `options.ignoreGlobal` ([#48](https://github.com/rollup/rollup-plugin-commonjs/issues/48))
+
+## 2.2.1
+
+- Prevent false positives with `namedExports` ([#36](https://github.com/rollup/rollup-plugin-commonjs/issues/36))
+
+## 2.2.0
+
+- Rewrite top-level `this` expressions to mean the same as `global` ([#31](https://github.com/rollup/rollup-plugin-commonjs/issues/31))
+
+## 2.1.0
+
+- Optimised module wrappers ([#20](https://github.com/rollup/rollup-plugin-commonjs/pull/20))
+- Allow control over named exports via `options.namedExports` ([#18](https://github.com/rollup/rollup-plugin-commonjs/issues/18))
+- Handle bare imports correctly ([#23](https://github.com/rollup/rollup-plugin-commonjs/issues/23))
+- Blacklist all reserved words as export names ([#21](https://github.com/rollup/rollup-plugin-commonjs/issues/21))
+- Configure allowed file extensions via `options.extensions` ([#27](https://github.com/rollup/rollup-plugin-commonjs/pull/27))
+
+## 2.0.0
+
+- Support for transpiled modules – `exports.default` is used as the default export in place of `module.exports`, if applicable, and `__esModule` is not exported ([#16](https://github.com/rollup/rollup-plugin-commonjs/pull/16))
+
+## 1.4.0
+
+- Generate sourcemaps by default
+
+## 1.3.0
+
+- Handle references to `global` ([#6](https://github.com/rollup/rollup-plugin-commonjs/issues/6))
+
+## 1.2.0
+
+- Generate named exports where possible ([#5](https://github.com/rollup/rollup-plugin-commonjs/issues/5))
+- Handle shadowed `require`/`module`/`exports`
+
+## 1.1.0
+
+- Handle dots in filenames ([#3](https://github.com/rollup/rollup-plugin-commonjs/issues/3))
+- Wrap modules in IIFE for more readable output
+
+## 1.0.0
+
+- Stable release, now that Rollup supports plugins
+
+## 0.2.1
+
+- Allow mixed CommonJS/ES6 imports/exports
+- Use `var` instead of `let`
+
+## 0.2.0
+
+- Sourcemap support
+- Support `options.include` and `options.exclude`
+- Bail early if module is obviously not a CommonJS module
+
+## 0.1.1
+
+Add dist files to package (whoops!)
+
+## 0.1.0
+
+- First release
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/LICENSE b/frontend/node_modules/@rollup/plugin-commonjs/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/README.md b/frontend/node_modules/@rollup/plugin-commonjs/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5d67d347cbf7bbd283f15f0d7a30c32d6dcb7411
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/README.md
@@ -0,0 +1,165 @@
+[npm]: https://img.shields.io/npm/v/@rollup/plugin-commonjs
+[npm-url]: https://www.npmjs.com/package/@rollup/plugin-commonjs
+[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-commonjs
+[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-commonjs
+
+[![npm][npm]][npm-url]
+[![size][size]][size-url]
+[](https://liberamanifesto.com)
+
+# @rollup/plugin-commonjs
+
+🍣 A Rollup plugin to convert CommonJS modules to ES6, so they can be included in a Rollup bundle
+
+## Requirements
+
+This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
+
+## Install
+
+Using npm:
+
+```bash
+npm install @rollup/plugin-commonjs --save-dev
+```
+
+## Usage
+
+Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
+
+```js
+import commonjs from '@rollup/plugin-commonjs';
+
+export default {
+ input: 'src/index.js',
+ output: {
+ dir: 'output',
+ format: 'cjs'
+ },
+ plugins: [commonjs()]
+};
+```
+
+Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
+
+## Options
+
+### `dynamicRequireTargets`
+
+Type: `String|Array[String]`
+Default: `[]`
+
+Some modules contain dynamic `require` calls, or require modules that contain circular dependencies, which are not handled well by static imports.
+Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like) environment for them with support for dynamic and circular dependencies.
+
+_Note: In extreme cases, this feature may result in some paths being rendered as absolute in the final bundle. The plugin tries to avoid exposing paths from the local machine, but if you are `dynamicRequirePaths` with paths that are far away from your project's folder, that may require replacing strings like `"/Users/John/Desktop/foo-project/"` -> `"/"`._
+
+Example:
+
+```js
+commonjs({
+ dynamicRequireTargets: [
+ // include using a glob pattern (either a string or an array of strings)
+ 'node_modules/logform/*.js',
+
+ // exclude files that are known to not be required dynamically, this allows for better optimizations
+ '!node_modules/logform/index.js',
+ '!node_modules/logform/format.js',
+ '!node_modules/logform/levels.js',
+ '!node_modules/logform/browser.js'
+ ]
+});
+```
+
+### `exclude`
+
+Type: `String` | `Array[...String]`
+Default: `null`
+
+A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default non-CommonJS modules are ignored.
+
+### `include`
+
+Type: `String` | `Array[...String]`
+Default: `null`
+
+A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default CommonJS modules are targeted.
+
+### `extensions`
+
+Type: `Array[...String]`
+Default: `['.js']`
+
+Search for extensions other than .js in the order specified.
+
+### `ignoreGlobal`
+
+Type: `Boolean`
+Default: `false`
+
+If true, uses of `global` won't be dealt with by this plugin.
+
+### `sourceMap`
+
+Type: `Boolean`
+Default: `true`
+
+If false, skips source map generation for CommonJS modules.
+
+### `transformMixedEsModules`
+
+Type: `Boolean`
+Default: `false`
+
+Instructs the plugin whether or not to enable mixed module transformations. This is useful in scenarios with mixed ES and CommonJS modules. Set to `true` if it's known that `require` calls should be transformed, or `false` if the code contains env detection and the `require` should survive a transformation.
+
+### `ignore`
+
+Type: `Array[...String | (String) => Boolean]`
+Default: `[]`
+
+Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function. Only use this option if you know what you're doing!
+
+## Using with @rollup/plugin-node-resolve
+
+Since most CommonJS packages you are importing are probably dependencies in `node_modules`, you may need to use [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve):
+
+```js
+// rollup.config.js
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+
+export default {
+ input: 'main.js',
+ output: {
+ file: 'bundle.js',
+ format: 'iife',
+ name: 'MyModule'
+ },
+ plugins: [resolve(), commonjs()]
+};
+```
+
+## Usage with symlinks
+
+Symlinks are common in monorepos and are also created by the `npm link` command. Rollup with `@rollup/plugin-node-resolve` resolves modules to their real paths by default. So `include` and `exclude` paths should handle real paths rather than symlinked paths (e.g. `../common/node_modules/**` instead of `node_modules/**`). You may also use a regular expression for `include` that works regardless of base path. Try this:
+
+```js
+commonjs({
+ include: /node_modules/
+});
+```
+
+Whether symlinked module paths are [realpathed](http://man7.org/linux/man-pages/man3/realpath.3.html) or preserved depends on Rollup's `preserveSymlinks` setting, which is false by default, matching Node.js' default behavior. Setting `preserveSymlinks` to true in your Rollup config will cause `import` and `export` to match based on symlinked paths instead.
+
+## Strict mode
+
+ES modules are _always_ parsed in strict mode. That means that certain non-strict constructs (like octal literals) will be treated as syntax errors when Rollup parses modules that use them. Some older CommonJS modules depend on those constructs, and if you depend on them your bundle will blow up. There's basically nothing we can do about that.
+
+Luckily, there is absolutely no good reason _not_ to use strict mode for everything — so the solution to this problem is to lobby the authors of those modules to update them.
+
+## Meta
+
+[CONTRIBUTING](/.github/CONTRIBUTING.md)
+
+[LICENSE (MIT)](/LICENSE)
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js
new file mode 100644
index 0000000000000000000000000000000000000000..52223468ecb25a948e22d09baf211d8bcf1da545
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js
@@ -0,0 +1,1374 @@
+import { statSync, existsSync, readFileSync } from 'fs';
+import { basename, extname, dirname, sep, resolve, join } from 'path';
+import { makeLegalIdentifier, attachScopes, extractAssignedNames, createFilter } from '@rollup/pluginutils';
+import getCommonDir from 'commondir';
+import glob from 'glob';
+import { walk } from 'estree-walker';
+import MagicString from 'magic-string';
+import { sync } from 'resolve';
+import isReference from 'is-reference';
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+}
+
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(n);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+}
+
+function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+function _createForOfIteratorHelper(o) {
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
+ var i = 0;
+
+ var F = function () {};
+
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var it,
+ normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = o[Symbol.iterator]();
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+}
+
+var peerDependencies = {
+ rollup: "^2.3.4"
+};
+
+/* eslint-disable no-undefined */
+const operators = {
+ '==': x => equals(x.left, x.right, false),
+ '!=': x => not(operators['=='](x)),
+ '===': x => equals(x.left, x.right, true),
+ '!==': x => not(operators['==='](x)),
+ '!': x => isFalsy(x.argument),
+ '&&': x => isTruthy(x.left) && isTruthy(x.right),
+ '||': x => isTruthy(x.left) || isTruthy(x.right)
+};
+function flatten(node) {
+ const parts = [];
+
+ while (node.type === 'MemberExpression') {
+ if (node.computed) return null;
+ parts.unshift(node.property.name); // eslint-disable-next-line no-param-reassign
+
+ node = node.object;
+ }
+
+ if (node.type !== 'Identifier') return null;
+ const _node = node,
+ name = _node.name;
+ parts.unshift(name);
+ return {
+ name,
+ keypath: parts.join('.')
+ };
+}
+
+function isTruthy(node) {
+ if (node.type === 'Literal') return !!node.value;
+ if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
+ if (node.operator in operators) return operators[node.operator](node);
+ return undefined;
+}
+function isFalsy(node) {
+ return not(isTruthy(node));
+}
+
+function not(value) {
+ return value === undefined ? value : !value;
+}
+
+function equals(a, b, strict) {
+ if (a.type !== b.type) return undefined; // eslint-disable-next-line eqeqeq
+
+ if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
+ return undefined;
+}
+
+const PROXY_SUFFIX = '?commonjs-proxy';
+const getProxyId = id => `\0${id}${PROXY_SUFFIX}`;
+const getIdFromProxyId = proxyId => proxyId.slice(1, -PROXY_SUFFIX.length);
+const EXTERNAL_SUFFIX = '?commonjs-external';
+const getExternalProxyId = id => `\0${id}${EXTERNAL_SUFFIX}`;
+const getIdFromExternalProxyId = proxyId => proxyId.slice(1, -EXTERNAL_SUFFIX.length);
+const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
+const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
+ if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);
+ return path;
+};
+const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:';
+const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
+const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages';
+const HELPERS_ID = '\0commonjsHelpers.js'; // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
+// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
+
+const HELPERS = `
+export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+export function unwrapExports (x) {
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+}
+
+export function createCommonjsModule(fn, basedir, module) {
+ return module = {
+ path: basedir,
+ exports: {},
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
+ }
+ }, fn(module, module.exports), module.exports;
+}
+
+export function getCjsExportFromNamespace (n) {
+ return n && n['default'] || n;
+}
+`;
+const HELPER_NON_DYNAMIC = `
+export function commonjsRequire () {
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
+}
+`;
+const HELPERS_DYNAMIC = `
+export function commonjsRegister (path, loader) {
+ DYNAMIC_REQUIRE_LOADERS[path] = loader;
+}
+
+const DYNAMIC_REQUIRE_LOADERS = Object.create(null);
+const DYNAMIC_REQUIRE_CACHE = Object.create(null);
+const DEFAULT_PARENT_MODULE = {
+ id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
+};
+const CHECKED_EXTENSIONS = ['', '.js', '.json'];
+
+function normalize (path) {
+ path = path.replace(/\\\\/g, '/');
+ const parts = path.split('/');
+ const slashed = parts[0] === '';
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] === '.' || parts[i] === '') {
+ parts.splice(i--, 1);
+ }
+ }
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] !== '..') continue;
+ if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
+ parts.splice(--i, 2);
+ i--;
+ }
+ }
+ path = parts.join('/');
+ if (slashed && path[0] !== '/')
+ path = '/' + path;
+ else if (path.length === 0)
+ path = '.';
+ return path;
+}
+
+function join () {
+ if (arguments.length === 0)
+ return '.';
+ let joined;
+ for (let i = 0; i < arguments.length; ++i) {
+ let arg = arguments[i];
+ if (arg.length > 0) {
+ if (joined === undefined)
+ joined = arg;
+ else
+ joined += '/' + arg;
+ }
+ }
+ if (joined === undefined)
+ return '.';
+
+ return joined;
+}
+
+function isPossibleNodeModulesPath (modulePath) {
+ let c0 = modulePath[0];
+ if (c0 === '/' || c0 === '\\\\') return false;
+ let c1 = modulePath[1], c2 = modulePath[2];
+ if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||
+ (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;
+ if (c1 === ':' && (c2 === '/' || c2 === '\\\\'))
+ return false;
+ return true;
+}
+
+function dirname (path) {
+ if (path.length === 0)
+ return '.';
+
+ let i = path.length - 1;
+ while (i > 0) {
+ const c = path.charCodeAt(i);
+ if ((c === 47 || c === 92) && i !== path.length - 1)
+ break;
+ i--;
+ }
+
+ if (i > 0)
+ return path.substr(0, i);
+
+ if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
+ return path.charAt(0);
+
+ return '.';
+}
+
+export function commonjsRequire (path, originalModuleDir) {
+ const shouldTryNodeModules = isPossibleNodeModulesPath(path);
+ path = normalize(path);
+ let relPath;
+ while (true) {
+ if (!shouldTryNodeModules) {
+ relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;
+ } else if (originalModuleDir) {
+ relPath = normalize(originalModuleDir + '/node_modules/' + path);
+ } else {
+ relPath = normalize(join('node_modules', path));
+ }
+ for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
+ const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
+ let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ if (cachedModule) return cachedModule.exports;
+ const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
+ if (loader) {
+ DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
+ id: resolvedPath,
+ filename: resolvedPath,
+ path: dirname(resolvedPath),
+ exports: {},
+ parent: DEFAULT_PARENT_MODULE,
+ loaded: false,
+ children: [],
+ paths: [],
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
+ }
+ };
+ try {
+ loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
+ } catch (error) {
+ delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ throw error;
+ }
+ cachedModule.loaded = true;
+ return cachedModule.exports;
+ };
+ }
+ if (!shouldTryNodeModules) break;
+ const nextDir = normalize(originalModuleDir + '/..');
+ if (nextDir === originalModuleDir) break;
+ originalModuleDir = nextDir;
+ }
+ return require(path);
+}
+
+commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
+`;
+
+/* eslint-disable import/prefer-default-export */
+function getName(id) {
+ const name = makeLegalIdentifier(basename(id, extname(id)));
+
+ if (name !== 'index') {
+ return name;
+ }
+
+ const segments = dirname(id).split(sep);
+ return makeLegalIdentifier(segments[segments.length - 1]);
+}
+
+const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(' ');
+const blacklist = {
+ __esModule: true
+};
+reserved.forEach(word => blacklist[word] = true);
+const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
+const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
+const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
+const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
+const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
+
+function deconflict(scope, globals, identifier) {
+ let i = 1;
+ let deconflicted = makeLegalIdentifier(identifier);
+
+ while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {
+ deconflicted = `${identifier}_${i}`;
+ i += 1;
+ }
+
+ scope.declarations[deconflicted] = true;
+ return deconflicted;
+}
+
+function tryParse(parse, code, id) {
+ try {
+ return parse(code, {
+ allowReturnOutsideFunction: true
+ });
+ } catch (err) {
+ err.message += ` in ${id}`;
+ throw err;
+ }
+}
+
+function normalizePathSlashes(path) {
+ return path.replace(/\\/g, '/');
+}
+function hasCjsKeywords(code, ignoreGlobal) {
+ const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
+ return firstpass.test(code);
+}
+function checkEsModule(parse, code, id) {
+ const ast = tryParse(parse, code, id);
+ let isEsModule = false;
+
+ var _iterator = _createForOfIteratorHelper(ast.body),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const node = _step.value;
+ if (node.type === 'ExportDefaultDeclaration') return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+
+ if (node.type === 'ExportNamedDeclaration') {
+ isEsModule = true;
+
+ var _iterator2 = _createForOfIteratorHelper(node.specifiers),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const specifier = _step2.value;
+
+ if (specifier.exported.name === 'default') {
+ return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+ }
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ } else if (importExportDeclaration.test(node.type)) isEsModule = true;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return {
+ isEsModule,
+ hasDefaultExport: false,
+ ast
+ };
+}
+
+function getDefinePropertyCallName(node, targetName) {
+ if (node.type !== 'CallExpression') return;
+ const _node$callee = node.callee,
+ object = _node$callee.object,
+ property = _node$callee.property;
+ if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
+ if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
+ if (node.arguments.length !== 3) return;
+
+ const _node$arguments = _slicedToArray(node.arguments, 2),
+ target = _node$arguments[0],
+ val = _node$arguments[1];
+
+ if (target.type !== 'Identifier' || target.name !== targetName) return; // eslint-disable-next-line consistent-return
+
+ return val.value;
+}
+
+function transformCommonjs(parse, code, id, isEntry, isEsModule, ignoreGlobal, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, astCache) {
+ const ast = astCache || tryParse(parse, code, id);
+ const magicString = new MagicString(code);
+ const required = {}; // Because objects have no guaranteed ordering, yet we need it,
+ // we need to keep track of the order in a array
+
+ const sources = [];
+ let uid = 0;
+ let scope = attachScopes(ast, 'scope');
+ const uses = {
+ module: false,
+ exports: false,
+ global: false,
+ require: false
+ };
+ let lexicalDepth = 0;
+ let programDepth = 0;
+ const globals = new Set(); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
+
+ const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');
+ const namedExports = {}; // TODO handle transpiled modules
+
+ let shouldWrap = /__esModule/.test(code);
+ let usesCommonjsHelpers = false;
+
+ function isRequireStatement(node) {
+ if (!node) return false;
+ if (node.type !== 'CallExpression') return false; // Weird case of `require()` or `module.require()` without arguments
+
+ if (node.arguments.length === 0) return false;
+ return isRequireIdentifier(node.callee);
+ }
+
+ function isRequireIdentifier(node) {
+ if (!node) return false;
+
+ if (node.type === 'Identifier' && node.name === 'require'
+ /* `require` */
+ ) {
+ // `require` is hidden by a variable in local scope
+ if (scope.contains('require')) return false;
+ return true;
+ } else if (node.type === 'MemberExpression'
+ /* `[something].[something]` */
+ ) {
+ // `module.[something]`
+ if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false; // `module` is hidden by a variable in local scope
+
+ if (scope.contains('module')) return false; // `module.require(...)`
+
+ if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;
+ return true;
+ }
+
+ return false;
+ }
+
+ function hasDynamicArguments(node) {
+ return node.arguments.length > 1 || node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0);
+ }
+
+ function isStaticRequireStatement(node) {
+ if (!isRequireStatement(node)) return false;
+ if (hasDynamicArguments(node)) return false;
+ return true;
+ }
+
+ function isIgnoredRequireStatement(requiredNode) {
+ return ignoreRequire(requiredNode.arguments[0].value);
+ }
+
+ function getRequireStringArg(node) {
+ return node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked;
+ }
+
+ function getRequired(node, name) {
+ let sourceId = getRequireStringArg(node);
+ const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);
+
+ if (isDynamicRegister) {
+ sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);
+ }
+
+ const existing = required[sourceId]; // eslint-disable-next-line no-undefined
+
+ if (existing === undefined) {
+ const isDynamic = hasDynamicModuleForPath(sourceId);
+
+ if (!name) {
+ do {
+ name = `require$$${uid}`;
+ uid += 1;
+ } while (scope.contains(name));
+ }
+
+ if (isDynamicRegister && sourceId.endsWith('.json')) {
+ sourceId = DYNAMIC_JSON_PREFIX + sourceId;
+ }
+
+ if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {
+ sources.push([sourceId, !isDynamicRegister]);
+ }
+
+ required[sourceId] = {
+ source: sourceId,
+ name,
+ importsDefault: false,
+ isDynamic
+ };
+ }
+
+ return required[sourceId];
+ }
+
+ function hasDynamicModuleForPath(source) {
+ if (!/[/\\]/.test(source)) {
+ try {
+ const resolvedPath = normalizePathSlashes(sync(source, {
+ basedir: dirname(id)
+ }));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ } catch (ex) {
+ // Probably a node.js internal module
+ return false;
+ }
+
+ return false;
+ }
+
+ for (var _i = 0, _arr = ['', '.js', '.json']; _i < _arr.length; _i++) {
+ const attemptExt = _arr[_i];
+ const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function shouldUseSimulatedRequire(required) {
+ return hasDynamicModuleForPath(required.source) && ( // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.
+ required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'));
+ } // do a first pass, see which names are assigned to. This is necessary to prevent
+ // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
+ // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
+
+
+ const assignedTo = new Set();
+ walk(ast, {
+ enter(node) {
+ if (node.type !== 'AssignmentExpression') return;
+ if (node.left.type === 'MemberExpression') return;
+ extractAssignedNames(node.left).forEach(name => {
+ assignedTo.add(name);
+ });
+ }
+
+ });
+ walk(ast, {
+ enter(node, parent) {
+ if (sourceMap) {
+ magicString.addSourcemapLocation(node.start);
+ magicString.addSourcemapLocation(node.end);
+ } // skip dead branches
+
+
+ if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {
+ if (node === parent.consequent && isFalsy(parent.test)) {
+ this.skip();
+ return;
+ }
+
+ if (node === parent.alternate && isTruthy(parent.test)) {
+ this.skip();
+ return;
+ }
+ }
+
+ if (node._skip) {
+ this.skip();
+ return;
+ }
+
+ programDepth += 1;
+
+ if (node.scope) {
+ scope = node.scope;
+ }
+
+ if (functionType.test(node.type)) lexicalDepth += 1; // if toplevel return, we need to wrap it
+
+ if (node.type === 'ReturnStatement' && lexicalDepth === 0) {
+ shouldWrap = true;
+ } // rewrite `this` as `commonjsHelpers.commonjsGlobal`
+
+
+ if (node.type === 'ThisExpression' && lexicalDepth === 0) {
+ uses.global = true;
+
+ if (!ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ return;
+ } // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
+
+
+ if (node.type === 'UnaryExpression' && node.operator === 'typeof') {
+ const flattened = flatten(node.argument);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+
+ if (flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports') {
+ magicString.overwrite(node.start, node.end, `'object'`, {
+ storeName: false
+ });
+ }
+ } // rewrite `require` (if not already handled) `global` and `define`, and handle free references to
+ // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule
+
+
+ if (node.type === 'Identifier') {
+ if (isReference(node, parent) && !scope.contains(node.name)) {
+ if (node.name in uses) {
+ if (isRequireIdentifier(node)) {
+ if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {
+ return;
+ }
+
+ if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {
+ magicString.appendLeft(parent.end - 1, `,${JSON.stringify(dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))}`);
+ }
+
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ uses[node.name] = true;
+
+ if (node.name === 'global' && !ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ } // if module or exports are used outside the context of an assignment
+ // expression, we need to wrap the module
+
+
+ if (node.name === 'module' || node.name === 'exports') {
+ shouldWrap = true;
+ }
+ }
+
+ if (node.name === 'define') {
+ magicString.overwrite(node.start, node.end, 'undefined', {
+ storeName: true
+ });
+ }
+
+ globals.add(node.name);
+ }
+
+ return;
+ } // Is this an assignment to exports or module.exports?
+
+
+ if (node.type === 'AssignmentExpression') {
+ if (node.left.type !== 'MemberExpression') return;
+ const flattened = flatten(node.left);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+ const match = exportsPattern.exec(flattened.keypath);
+ if (!match || flattened.keypath === 'exports') return;
+ uses[flattened.name] = true; // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
+ // if this isn't top-level, we'll need to wrap the module
+
+ if (programDepth > 3) shouldWrap = true;
+ node.left._skip = true;
+
+ if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
+ node.right.properties.forEach(prop => {
+ if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;
+ const name = prop.key.name;
+ if (name === makeLegalIdentifier(name)) namedExports[name] = true;
+ });
+ return;
+ }
+
+ if (match[1]) namedExports[match[1]] = true;
+ return;
+ }
+
+ const name = getDefinePropertyCallName(node, 'exports');
+ if (name && name === makeLegalIdentifier(name)) namedExports[name] = true; // if this is `var x = require('x')`, we can do `import x from 'x'`
+
+ if (node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isStaticRequireStatement(node.init) && !isIgnoredRequireStatement(node.init)) {
+ // for now, only do this for top-level requires. maybe fix this in future
+ if (scope.parent) return; // edge case — CJS allows you to assign to imports. ES doesn't
+
+ if (assignedTo.has(node.id.name)) return;
+ const required = getRequired(node.init, node.id.name);
+ required.importsDefault = true;
+
+ if (required.name === node.id.name && !required.isDynamic) {
+ node._shouldRemove = true;
+ }
+ }
+
+ if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {
+ return;
+ }
+
+ const required = getRequired(node);
+
+ if (parent.type === 'ExpressionStatement') {
+ // is a bare import, e.g. `require('foo');`
+ magicString.remove(parent.start, parent.end);
+ } else {
+ required.importsDefault = true;
+
+ if (shouldUseSimulatedRequire(required)) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir))}, ${JSON.stringify(dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))})`);
+ usesCommonjsHelpers = true;
+ } else {
+ magicString.overwrite(node.start, node.end, required.name);
+ }
+ }
+
+ node.callee._skip = true;
+ },
+
+ leave(node) {
+ programDepth -= 1;
+ if (node.scope) scope = scope.parent;
+ if (functionType.test(node.type)) lexicalDepth -= 1;
+
+ if (node.type === 'VariableDeclaration') {
+ let keepDeclaration = false;
+ let c = node.declarations[0].start;
+
+ for (let i = 0; i < node.declarations.length; i += 1) {
+ const declarator = node.declarations[i];
+
+ if (declarator._shouldRemove) {
+ magicString.remove(c, declarator.end);
+ } else {
+ if (!keepDeclaration) {
+ magicString.remove(c, declarator.start);
+ keepDeclaration = true;
+ }
+
+ c = declarator.end;
+ }
+ }
+
+ if (!keepDeclaration) {
+ magicString.remove(node.start, node.end);
+ }
+ }
+ }
+
+ });
+
+ if (!sources.length && !uses.module && !uses.exports && !uses.require && (ignoreGlobal || !uses.global)) {
+ if (Object.keys(namedExports).length) {
+ throw new Error(`Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`);
+ } // not a CommonJS module
+
+
+ return null;
+ } // If `isEsModule` is on, it means it has ES6 import/export statements,
+ // which just can't be wrapped in a function.
+
+
+ if (isEsModule) shouldWrap = false;
+ usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;
+ const importBlock = `${(usesCommonjsHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : []).concat(sources.map(([source]) => // import the actual module before the proxy, so that we know
+ // what kind of proxy to build
+ `import '${source}';`), sources.filter(([, importProxy]) => importProxy).map(([source]) => {
+ const _required$source = required[source],
+ name = _required$source.name,
+ importsDefault = _required$source.importsDefault;
+ return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;
+ })).join('\n')}\n\n`;
+ const namedExportDeclarations = [];
+ let wrapperStart = '';
+ let wrapperEnd = '';
+ const moduleName = deconflict(scope, globals, getName(id));
+
+ if (!isEntry && !isEsModule) {
+ const exportModuleExports = {
+ str: `export { ${moduleName} as __moduleExports };`,
+ name: '__moduleExports'
+ };
+ namedExportDeclarations.push(exportModuleExports);
+ }
+
+ const name = getName(id);
+
+ function addExport(x) {
+ const deconflicted = deconflict(scope, globals, name);
+ const declaration = deconflicted === name ? `export var ${x} = ${moduleName}.${x};` : `var ${deconflicted} = ${moduleName}.${x};\nexport { ${deconflicted} as ${x} };`;
+ namedExportDeclarations.push({
+ str: declaration,
+ name: x
+ });
+ }
+
+ const defaultExportPropertyAssignments = [];
+ let hasDefaultExport = false;
+
+ if (shouldWrap) {
+ const args = `module${uses.exports ? ', exports' : ''}`;
+ wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`;
+ wrapperEnd = `\n}`;
+
+ if (isDynamicRequireModulesEnabled) {
+ wrapperEnd += `, ${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))}`;
+ }
+
+ wrapperEnd += `);`;
+ } else {
+ const names = [];
+
+ var _iterator3 = _createForOfIteratorHelper(ast.body),
+ _step3;
+
+ try {
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
+ const node = _step3.value;
+
+ if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {
+ const left = node.expression.left;
+ const flattened = flatten(left);
+
+ if (!flattened) {
+ continue;
+ }
+
+ const match = exportsPattern.exec(flattened.keypath);
+
+ if (!match) {
+ continue;
+ }
+
+ if (flattened.keypath === 'module.exports') {
+ hasDefaultExport = true;
+ magicString.overwrite(left.start, left.end, `var ${moduleName}`);
+ } else {
+ const _match = _slicedToArray(match, 2),
+ name = _match[1];
+
+ const deconflicted = deconflict(scope, globals, name);
+ names.push({
+ name,
+ deconflicted
+ });
+ magicString.overwrite(node.start, left.end, `var ${deconflicted}`);
+ const declaration = name === deconflicted ? `export { ${name} };` : `export { ${deconflicted} as ${name} };`;
+
+ if (name !== 'default') {
+ namedExportDeclarations.push({
+ str: declaration,
+ name
+ });
+ delete namedExports[name];
+ }
+
+ defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);
+ }
+ }
+ }
+ } catch (err) {
+ _iterator3.e(err);
+ } finally {
+ _iterator3.f();
+ }
+
+ if (!hasDefaultExport && (names.length || !isEntry && !isEsModule)) {
+ wrapperEnd = `\n\nvar ${moduleName} = {\n${names.map(({
+ name,
+ deconflicted
+ }) => `\t${name}: ${deconflicted}`).join(',\n')}\n};`;
+ }
+ }
+
+ Object.keys(namedExports).filter(key => !blacklist[key]).forEach(addExport);
+ const defaultExport = /__esModule/.test(code) ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`;
+ const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str);
+ const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`;
+ magicString.trim().prepend(importBlock + wrapperStart).trim().append(wrapperEnd);
+ const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry;
+
+ if (injectExportBlock) {
+ magicString.append(exportBlock);
+ }
+
+ code = magicString.toString();
+ const map = sourceMap ? magicString.generateMap() : null;
+ return {
+ code,
+ map,
+ syntheticNamedExports: injectExportBlock
+ };
+}
+
+function getDynamicRequirePaths(patterns) {
+ const dynamicRequireModuleSet = new Set();
+
+ var _iterator = _createForOfIteratorHelper(!patterns || Array.isArray(patterns) ? patterns || [] : [patterns]),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const pattern = _step.value;
+ const isNegated = pattern.startsWith('!');
+ const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);
+
+ var _iterator2 = _createForOfIteratorHelper(glob.sync(isNegated ? pattern.substr(1) : pattern)),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const path = _step2.value;
+ modifySet(normalizePathSlashes(resolve(path)));
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(path => {
+ try {
+ if (statSync(path).isDirectory()) return true;
+ } catch (ignored) {// Nothing to do here
+ }
+
+ return false;
+ });
+ return {
+ dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths
+ };
+}
+
+/* eslint-disable no-undefined */
+const isCjsPromises = new Map();
+function getIsCjsPromise(id) {
+ let isCjsPromise = isCjsPromises.get(id);
+ if (isCjsPromise) return isCjsPromise.promise;
+ const promise = new Promise(resolve => {
+ isCjsPromise = {
+ resolve,
+ promise: undefined
+ };
+ isCjsPromises.set(id, isCjsPromise);
+ });
+ isCjsPromise.promise = promise;
+ return promise;
+}
+function setIsCjsPromise(id, resolution) {
+ const isCjsPromise = isCjsPromises.get(id);
+
+ if (isCjsPromise) {
+ if (isCjsPromise.resolve) {
+ isCjsPromise.resolve(resolution);
+ isCjsPromise.resolve = undefined;
+ }
+ } else {
+ isCjsPromises.set(id, {
+ promise: Promise.resolve(resolution),
+ resolve: undefined
+ });
+ }
+}
+
+/* eslint-disable no-param-reassign, no-undefined */
+
+function getCandidatesForExtension(resolved, extension) {
+ return [resolved + extension, `${resolved}${sep}index${extension}`];
+}
+
+function getCandidates(resolved, extensions) {
+ return extensions.reduce((paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), [resolved]);
+}
+
+function getResolveId(extensions) {
+ function resolveExtensions(importee, importer) {
+ // not our problem
+ if (importee[0] !== '.' || !importer) return undefined;
+ const resolved = resolve(dirname(importer), importee);
+ const candidates = getCandidates(resolved, extensions);
+
+ for (let i = 0; i < candidates.length; i += 1) {
+ try {
+ const stats = statSync(candidates[i]);
+ if (stats.isFile()) return {
+ id: candidates[i]
+ };
+ } catch (err) {
+ /* noop */
+ }
+ }
+
+ return undefined;
+ }
+
+ function resolveId(importee, importer) {
+ const isProxyModule = importee.endsWith(PROXY_SUFFIX);
+
+ if (isProxyModule) {
+ importee = getIdFromProxyId(importee);
+ } else if (importee.startsWith('\0')) {
+ if (importee === HELPERS_ID || importee === DYNAMIC_PACKAGES_ID || importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ return null;
+ }
+
+ if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ if (importer && importer.endsWith(PROXY_SUFFIX)) {
+ importer = getIdFromProxyId(importer);
+ }
+
+ return this.resolve(importee, importer, {
+ skipSelf: true
+ }).then(resolved => {
+ if (!resolved) {
+ resolved = resolveExtensions(importee, importer);
+ }
+
+ if (isProxyModule) {
+ if (!resolved) {
+ return {
+ id: getExternalProxyId(importee),
+ external: false
+ };
+ }
+
+ resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);
+ resolved.external = false;
+ return resolved;
+ }
+
+ return resolved;
+ });
+ }
+
+ return resolveId;
+}
+
+function commonjs(options = {}) {
+ const extensions = options.extensions || ['.js'];
+ const filter = createFilter(options.include, options.exclude);
+ const ignoreGlobal = options.ignoreGlobal;
+
+ const _getDynamicRequirePat = getDynamicRequirePaths(options.dynamicRequireTargets),
+ dynamicRequireModuleSet = _getDynamicRequirePat.dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths = _getDynamicRequirePat.dynamicRequireModuleDirPaths;
+
+ const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;
+ const commonDir = isDynamicRequireModulesEnabled ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd())) : null;
+ const esModulesWithoutDefaultExport = new Set();
+ const esModulesWithDefaultExport = new Set();
+ const ignoreRequire = typeof options.ignore === 'function' ? options.ignore : Array.isArray(options.ignore) ? id => options.ignore.includes(id) : () => false;
+ const resolveId = getResolveId(extensions);
+ const sourceMap = options.sourceMap !== false;
+
+ function transformAndCheckExports(code, id) {
+ const _checkEsModule = checkEsModule(this.parse, code, id),
+ isEsModule = _checkEsModule.isEsModule,
+ hasDefaultExport = _checkEsModule.hasDefaultExport,
+ ast = _checkEsModule.ast;
+
+ const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));
+
+ if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {
+ (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);
+
+ if (!options.transformMixedEsModules) {
+ setIsCjsPromise(id, false);
+ return null;
+ }
+ } // it is not an ES module AND it does not have CJS-specific elements.
+ else if (!hasCjsKeywords(code, ignoreGlobal)) {
+ esModulesWithoutDefaultExport.add(id);
+ setIsCjsPromise(id, false);
+ return null;
+ }
+
+ const transformed = transformCommonjs(this.parse, code, id, this.getModuleInfo(id).isEntry, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, ast);
+ setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));
+
+ if (!transformed) {
+ if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);
+ return null;
+ }
+
+ return transformed;
+ }
+
+ return {
+ name: 'commonjs',
+
+ buildStart() {
+ if (options.namedExports != null) {
+ this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.');
+ }
+
+ const _this$meta$rollupVers = this.meta.rollupVersion.split('.').map(Number),
+ _this$meta$rollupVers2 = _slicedToArray(_this$meta$rollupVers, 2),
+ major = _this$meta$rollupVers2[0],
+ minor = _this$meta$rollupVers2[1];
+
+ const minVersion = peerDependencies.rollup.slice(2);
+
+ const _minVersion$split$map = minVersion.split('.').map(Number),
+ _minVersion$split$map2 = _slicedToArray(_minVersion$split$map, 2),
+ minMajor = _minVersion$split$map2[0],
+ minMinor = _minVersion$split$map2[1];
+
+ if (major < minMajor || major === minMajor && minor < minMinor) {
+ this.error(`Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`);
+ }
+ },
+
+ resolveId,
+
+ load(id) {
+ if (id === HELPERS_ID) {
+ let code = HELPERS; // Do not bloat everyone's code with the module manager code
+
+ if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;else code += HELPER_NON_DYNAMIC;
+ return code;
+ } // generate proxy modules
+
+
+ if (id.endsWith(EXTERNAL_SUFFIX)) {
+ const actualId = getIdFromExternalProxyId(id);
+ const name = getName(actualId);
+ if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID) // These do not export default
+ return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ }
+
+ if (id === DYNAMIC_PACKAGES_ID) {
+ let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;
+
+ var _iterator = _createForOfIteratorHelper(dynamicRequireModuleDirPaths),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const dir = _step.value;
+ let entryPoint = 'index.js';
+
+ try {
+ if (existsSync(join(dir, 'package.json'))) {
+ entryPoint = JSON.parse(readFileSync(join(dir, 'package.json'), {
+ encoding: 'utf8'
+ })).main || entryPoint;
+ }
+ } catch (ignored) {// ignored
+ }
+
+ code += `\ncommonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(dir, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});
+});`;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return code;
+ }
+
+ let actualId = id;
+ const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);
+
+ if (isDynamicJson) {
+ actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);
+ }
+
+ const normalizedPath = normalizePathSlashes(actualId);
+
+ if (isDynamicJson) {
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizedPath)});
+});`;
+ }
+
+ if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {
+ // Try our best to still export the module fully.
+ // The commonjs polyfill should take care of circular references.
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ ${readFileSync(normalizedPath, {
+ encoding: 'utf8'
+ })}
+});`;
+ }
+
+ if (actualId.endsWith(PROXY_SUFFIX)) {
+ actualId = getIdFromProxyId(actualId);
+ const name = getName(actualId);
+ return getIsCjsPromise(actualId).then(isCjs => {
+ if (dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) && !actualId.endsWith('.json')) return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir))}); export default (${name} && ${name}['default']) || ${name}`;else if (isCjs) return `import { __moduleExports } from ${JSON.stringify(actualId)}; export default __moduleExports;`;else if (esModulesWithoutDefaultExport.has(actualId)) return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;else if (esModulesWithDefaultExport.has(actualId)) {
+ return `export {default} from ${JSON.stringify(actualId)};`;
+ }
+ return `import * as ${name} from ${JSON.stringify(actualId)}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`;
+ });
+ }
+
+ if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
+ let code;
+
+ try {
+ code = readFileSync(actualId, {
+ encoding: 'utf8'
+ });
+ } catch (ex) {
+ this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);
+ return null;
+ }
+
+ let dynamicImports = Array.from(dynamicRequireModuleSet).map(dynamicId => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`).join('\n');
+
+ if (dynamicRequireModuleDirPaths.length) {
+ dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`;
+ }
+
+ code = `${dynamicImports}\n${code}`;
+ return code;
+ }
+
+ return null;
+ },
+
+ transform(code, id) {
+ if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {
+ if (!filter(id) || extensions.indexOf(extname(id)) === -1) {
+ setIsCjsPromise(id, null);
+ return null;
+ }
+ }
+
+ let transformed;
+
+ try {
+ transformed = transformAndCheckExports.call(this, code, id);
+ } catch (err) {
+ transformed = null;
+ setIsCjsPromise(id, false);
+ this.error(err, err.loc);
+ }
+
+ return transformed;
+ }
+
+ };
+}
+
+export default commonjs;
+//# sourceMappingURL=index.es.js.map
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..b94021e577f1a8681ee973cdb7237e99c8b8b842
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.es.js","sources":["../src/ast-utils.js","../src/helpers.js","../src/utils.js","../src/transform.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/resolve-id.js","../src/index.js"],"sourcesContent":["/* eslint-disable no-undefined */\nexport { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nconst extractors = {\n Identifier(names, node) {\n names.push(node.name);\n },\n\n ObjectPattern(names, node) {\n node.properties.forEach((prop) => {\n getExtractor(prop.value.type)(names, prop.value);\n });\n },\n\n ArrayPattern(names, node) {\n node.elements.forEach((element) => {\n if (!element) return;\n getExtractor(element.type)(names, element);\n });\n },\n\n RestElement(names, node) {\n getExtractor(node.argument.type)(names, node.argument);\n },\n\n AssignmentPattern(names, node) {\n getExtractor(node.left.type)(names, node.left);\n }\n};\n\nexport function flatten(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport function extractNames(node) {\n const names = [];\n extractors[node.type](names, node);\n return names;\n}\n\nfunction getExtractor(type) {\n const extractor = extractors[type];\n if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);\n return extractor;\n}\n\nexport function isTruthy(node) {\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return undefined;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nfunction not(value) {\n return value === undefined ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return undefined;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return undefined;\n}\n","export const PROXY_SUFFIX = '?commonjs-proxy';\nexport const getProxyId = (id) => `\\0${id}${PROXY_SUFFIX}`;\nexport const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);\n\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const getExternalProxyId = (id) => `\\0${id}${EXTERNAL_SUFFIX}`;\nexport const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);\n\nexport const VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);\n return path;\n};\n\nexport const DYNAMIC_REGISTER_PREFIX = '\\0commonjs-dynamic-register:';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\nexport const HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nexport function getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n`;\n\nexport const HELPER_NON_DYNAMIC = `\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n`;\n\nexport const HELPERS_DYNAMIC = `\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\nconst DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tconst parts = path.split('/');\n\tconst slashed = parts[0] === '';\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tlet joined;\n\tfor (let i = 0; i < arguments.length; ++i) {\n\t let arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tlet c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tlet c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n let i = path.length - 1;\n while (i > 0) {\n const c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tlet relPath;\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tlet cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\tif (cachedModule) return cachedModule.exports;\n\t\t\tconst loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t\t\tif (loader) {\n\t\t\t\tDYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t\t\t\t\tid: resolvedPath,\n\t\t\t\t\tfilename: resolvedPath,\n\t\t\t\t\tpath: dirname(resolvedPath),\n\t\t\t\t\texports: {},\n\t\t\t\t\tparent: DEFAULT_PARENT_MODULE,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tpaths: [],\n\t\t\t\t\trequire: function (path, base) {\n\t\t\t\t\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tloader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdelete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tcachedModule.loaded = true;\n\t\t\t\treturn cachedModule.exports;\n\t\t\t};\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tconst nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn require(path);\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n`;\n","/* eslint-disable import/prefer-default-export */\nimport { basename, dirname, extname, sep } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n const segments = dirname(id).split(sep);\n return makeLegalIdentifier(segments[segments.length - 1]);\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\nimport { resolve, dirname } from 'path';\n\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport { flatten, isFalsy, isReference, isTruthy } from './ast-utils';\nimport {\n getProxyId,\n getVirtualPathForDynamicRequirePath,\n HELPERS_ID,\n DYNAMIC_REGISTER_PREFIX,\n DYNAMIC_JSON_PREFIX\n} from './helpers';\nimport { getName } from './utils';\n// TODO can this be async?\n\nconst reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(\n ' '\n);\nconst blacklist = { __esModule: true };\nreserved.forEach((word) => (blacklist[word] = true));\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict(scope, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n\n while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {\n deconflicted = `${identifier}_${i}`;\n i += 1;\n }\n scope.declarations[deconflicted] = true;\n\n return deconflicted;\n}\n\nfunction tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n\nexport function checkEsModule(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n for (const node of ast.body) {\n if (node.type === 'ExportDefaultDeclaration')\n return { isEsModule: true, hasDefaultExport: true, ast };\n if (node.type === 'ExportNamedDeclaration') {\n isEsModule = true;\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n return { isEsModule: true, hasDefaultExport: true, ast };\n }\n }\n } else if (importExportDeclaration.test(node.type)) isEsModule = true;\n }\n\n return { isEsModule, hasDefaultExport: false, ast };\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n if (node.type !== 'CallExpression') return;\n\n const {\n callee: { object, property }\n } = node;\n\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n\n if (node.arguments.length !== 3) return;\n\n const [target, val] = node.arguments;\n if (target.type !== 'Identifier' || target.name !== targetName) return;\n // eslint-disable-next-line consistent-return\n return val.value;\n}\n\nexport function transformCommonjs(\n parse,\n code,\n id,\n isEntry,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n astCache\n) {\n const ast = astCache || tryParse(parse, code, id);\n\n const magicString = new MagicString(code);\n\n const required = {};\n // Because objects have no guaranteed ordering, yet we need it,\n // we need to keep track of the order in a array\n const sources = [];\n\n let uid = 0;\n\n let scope = attachScopes(ast, 'scope');\n const uses = { module: false, exports: false, global: false, require: false };\n\n let lexicalDepth = 0;\n let programDepth = 0;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');\n\n const namedExports = {};\n\n // TODO handle transpiled modules\n let shouldWrap = /__esModule/.test(code);\n let usesCommonjsHelpers = false;\n\n function isRequireStatement(node) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequireIdentifier(node.callee);\n }\n\n function isRequireIdentifier(node) {\n if (!node) return false;\n\n if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {\n // `require` is hidden by a variable in local scope\n if (scope.contains('require')) return false;\n\n return true;\n } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {\n // `module.[something]`\n if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;\n\n // `module` is hidden by a variable in local scope\n if (scope.contains('module')) return false;\n\n // `module.require(...)`\n if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;\n\n return true;\n }\n\n return false;\n }\n\n function hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n }\n\n function isStaticRequireStatement(node) {\n if (!isRequireStatement(node)) return false;\n if (hasDynamicArguments(node)) return false;\n return true;\n }\n\n function isIgnoredRequireStatement(requiredNode) {\n return ignoreRequire(requiredNode.arguments[0].value);\n }\n\n function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n }\n\n function getRequired(node, name) {\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);\n if (isDynamicRegister) {\n sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);\n }\n\n const existing = required[sourceId];\n // eslint-disable-next-line no-undefined\n if (existing === undefined) {\n const isDynamic = hasDynamicModuleForPath(sourceId);\n\n if (!name) {\n do {\n name = `require$$${uid}`;\n uid += 1;\n } while (scope.contains(name));\n }\n\n if (isDynamicRegister && sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n\n if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {\n sources.push([sourceId, !isDynamicRegister]);\n }\n\n required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };\n }\n\n return required[sourceId];\n }\n\n function hasDynamicModuleForPath(source) {\n if (!/[/\\\\]/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(\n nodeResolveSync(source, { basedir: dirname(id) })\n );\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldUseSimulatedRequire(required) {\n return (\n hasDynamicModuleForPath(required.source) &&\n // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.\n (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))\n );\n }\n\n // do a first pass, see which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const assignedTo = new Set();\n walk(ast, {\n enter(node) {\n if (node.type !== 'AssignmentExpression') return;\n if (node.left.type === 'MemberExpression') return;\n\n extractAssignedNames(node.left).forEach((name) => {\n assignedTo.add(name);\n });\n }\n });\n\n walk(ast, {\n enter(node, parent) {\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // skip dead branches\n if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {\n if (node === parent.consequent && isFalsy(parent.test)) {\n this.skip();\n return;\n }\n if (node === parent.alternate && isTruthy(parent.test)) {\n this.skip();\n return;\n }\n }\n\n if (node._skip) {\n this.skip();\n return;\n }\n\n programDepth += 1;\n\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n\n // if toplevel return, we need to wrap it\n if (node.type === 'ReturnStatement' && lexicalDepth === 0) {\n shouldWrap = true;\n }\n\n // rewrite `this` as `commonjsHelpers.commonjsGlobal`\n if (node.type === 'ThisExpression' && lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n return;\n }\n\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.type === 'UnaryExpression' && node.operator === 'typeof') {\n const flattened = flatten(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });\n }\n }\n\n // rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n if (node.type === 'Identifier') {\n if (isReference(node, parent) && !scope.contains(node.name)) {\n if (node.name in uses) {\n if (isRequireIdentifier(node)) {\n if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(\n normalizePathSlashes(dirname(id)),\n commonDir\n )\n )}`\n );\n }\n\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n uses[node.name] = true;\n if (node.name === 'global' && !ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n // if module or exports are used outside the context of an assignment\n // expression, we need to wrap the module\n if (node.name === 'module' || node.name === 'exports') {\n shouldWrap = true;\n }\n }\n\n if (node.name === 'define') {\n magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });\n }\n\n globals.add(node.name);\n }\n\n return;\n }\n\n // Is this an assignment to exports or module.exports?\n if (node.type === 'AssignmentExpression') {\n if (node.left.type !== 'MemberExpression') return;\n\n const flattened = flatten(node.left);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match || flattened.keypath === 'exports') return;\n\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n // if this isn't top-level, we'll need to wrap the module\n if (programDepth > 3) shouldWrap = true;\n\n node.left._skip = true;\n\n if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {\n node.right.properties.forEach((prop) => {\n if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;\n const { name } = prop.key;\n if (name === makeLegalIdentifier(name)) namedExports[name] = true;\n });\n return;\n }\n\n if (match[1]) namedExports[match[1]] = true;\n return;\n }\n\n const name = getDefinePropertyCallName(node, 'exports');\n if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;\n\n // if this is `var x = require('x')`, we can do `import x from 'x'`\n if (\n node.type === 'VariableDeclarator' &&\n node.id.type === 'Identifier' &&\n isStaticRequireStatement(node.init) &&\n !isIgnoredRequireStatement(node.init)\n ) {\n // for now, only do this for top-level requires. maybe fix this in future\n if (scope.parent) return;\n\n // edge case — CJS allows you to assign to imports. ES doesn't\n if (assignedTo.has(node.id.name)) return;\n\n const required = getRequired(node.init, node.id.name);\n required.importsDefault = true;\n\n if (required.name === node.id.name && !required.isDynamic) {\n node._shouldRemove = true;\n }\n }\n\n if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {\n return;\n }\n\n const required = getRequired(node);\n\n if (parent.type === 'ExpressionStatement') {\n // is a bare import, e.g. `require('foo');`\n magicString.remove(parent.start, parent.end);\n } else {\n required.importsDefault = true;\n\n if (shouldUseSimulatedRequire(required)) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )})`\n );\n usesCommonjsHelpers = true;\n } else {\n magicString.overwrite(node.start, node.end, required.name);\n }\n }\n\n node.callee._skip = true;\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n\n if (node.type === 'VariableDeclaration') {\n let keepDeclaration = false;\n let c = node.declarations[0].start;\n\n for (let i = 0; i < node.declarations.length; i += 1) {\n const declarator = node.declarations[i];\n\n if (declarator._shouldRemove) {\n magicString.remove(c, declarator.end);\n } else {\n if (!keepDeclaration) {\n magicString.remove(c, declarator.start);\n keepDeclaration = true;\n }\n\n c = declarator.end;\n }\n }\n\n if (!keepDeclaration) {\n magicString.remove(node.start, node.end);\n }\n }\n }\n });\n\n if (\n !sources.length &&\n !uses.module &&\n !uses.exports &&\n !uses.require &&\n (ignoreGlobal || !uses.global)\n ) {\n if (Object.keys(namedExports).length) {\n throw new Error(\n `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`\n );\n }\n // not a CommonJS module\n return null;\n }\n\n // If `isEsModule` is on, it means it has ES6 import/export statements,\n // which just can't be wrapped in a function.\n if (isEsModule) shouldWrap = false;\n\n usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;\n\n const importBlock = `${(usesCommonjsHelpers\n ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]\n : []\n )\n .concat(\n sources.map(\n ([source]) =>\n // import the actual module before the proxy, so that we know\n // what kind of proxy to build\n `import '${source}';`\n ),\n sources\n .filter(([, importProxy]) => importProxy)\n .map(([source]) => {\n const { name, importsDefault } = required[source];\n return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;\n })\n )\n .join('\\n')}\\n\\n`;\n\n const namedExportDeclarations = [];\n let wrapperStart = '';\n let wrapperEnd = '';\n\n const moduleName = deconflict(scope, globals, getName(id));\n if (!isEntry && !isEsModule) {\n const exportModuleExports = {\n str: `export { ${moduleName} as __moduleExports };`,\n name: '__moduleExports'\n };\n\n namedExportDeclarations.push(exportModuleExports);\n }\n\n const name = getName(id);\n\n function addExport(x) {\n const deconflicted = deconflict(scope, globals, name);\n\n const declaration =\n deconflicted === name\n ? `export var ${x} = ${moduleName}.${x};`\n : `var ${deconflicted} = ${moduleName}.${x};\\nexport { ${deconflicted} as ${x} };`;\n\n namedExportDeclarations.push({\n str: declaration,\n name: x\n });\n }\n\n const defaultExportPropertyAssignments = [];\n let hasDefaultExport = false;\n\n if (shouldWrap) {\n const args = `module${uses.exports ? ', exports' : ''}`;\n\n wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\n wrapperEnd = `\\n}`;\n if (isDynamicRequireModulesEnabled) {\n wrapperEnd += `, ${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )}`;\n }\n\n wrapperEnd += `);`;\n } else {\n const names = [];\n\n for (const node of ast.body) {\n if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {\n const { left } = node.expression;\n const flattened = flatten(left);\n\n if (!flattened) {\n continue;\n }\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match) {\n continue;\n }\n\n if (flattened.keypath === 'module.exports') {\n hasDefaultExport = true;\n magicString.overwrite(left.start, left.end, `var ${moduleName}`);\n } else {\n const [, name] = match;\n const deconflicted = deconflict(scope, globals, name);\n\n names.push({ name, deconflicted });\n\n magicString.overwrite(node.start, left.end, `var ${deconflicted}`);\n\n const declaration =\n name === deconflicted\n ? `export { ${name} };`\n : `export { ${deconflicted} as ${name} };`;\n\n if (name !== 'default') {\n namedExportDeclarations.push({\n str: declaration,\n name\n });\n delete namedExports[name];\n }\n\n defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);\n }\n }\n }\n\n if (!hasDefaultExport && (names.length || (!isEntry && !isEsModule))) {\n wrapperEnd = `\\n\\nvar ${moduleName} = {\\n${names\n .map(({ name, deconflicted }) => `\\t${name}: ${deconflicted}`)\n .join(',\\n')}\\n};`;\n }\n }\n\n Object.keys(namedExports)\n .filter((key) => !blacklist[key])\n .forEach(addExport);\n\n const defaultExport = /__esModule/.test(code)\n ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});`\n : `export default ${moduleName};`;\n\n const named = namedExportDeclarations\n .filter((x) => x.name !== 'default' || !hasDefaultExport)\n .map((x) => x.str);\n\n const exportBlock = `\\n\\n${(isEsModule ? [] : [defaultExport])\n .concat(named)\n .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])\n .join('\\n')}`;\n\n magicString\n .trim()\n .prepend(importBlock + wrapperStart)\n .trim()\n .append(wrapperEnd);\n\n const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry;\n if (injectExportBlock) {\n magicString.append(exportBlock);\n }\n\n code = magicString.toString();\n const map = sourceMap ? magicString.generateMap() : null;\n\n return { code, map, syntheticNamedExports: injectExportBlock };\n}\n","import { statSync } from 'fs';\n\nimport { resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './transform';\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(\n (path) => {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n }\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","/* eslint-disable no-undefined */\nconst isCjsPromises = new Map();\n\nexport function getIsCjsPromise(id) {\n let isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) return isCjsPromise.promise;\n\n const promise = new Promise((resolve) => {\n isCjsPromise = {\n resolve,\n promise: undefined\n };\n isCjsPromises.set(id, isCjsPromise);\n });\n isCjsPromise.promise = promise;\n\n return promise;\n}\n\nexport function setIsCjsPromise(id, resolution) {\n const isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) {\n if (isCjsPromise.resolve) {\n isCjsPromise.resolve(resolution);\n isCjsPromise.resolve = undefined;\n }\n } else {\n isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });\n }\n}\n","/* eslint-disable no-param-reassign, no-undefined */\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n getExternalProxyId,\n getIdFromProxyId,\n getProxyId,\n HELPERS_ID,\n PROXY_SUFFIX\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n function resolveId(importee, importer) {\n const isProxyModule = importee.endsWith(PROXY_SUFFIX);\n if (isProxyModule) {\n importee = getIdFromProxyId(importee);\n } else if (importee.startsWith('\\0')) {\n if (\n importee === HELPERS_ID ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n return null;\n }\n\n if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {\n return importee;\n }\n\n if (importer && importer.endsWith(PROXY_SUFFIX)) {\n importer = getIdFromProxyId(importer);\n }\n\n return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (isProxyModule) {\n if (!resolved) {\n return { id: getExternalProxyId(importee), external: false };\n }\n resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);\n resolved.external = false;\n return resolved;\n }\n return resolved;\n });\n }\n\n return resolveId;\n}\n","import { existsSync, readFileSync } from 'fs';\nimport { extname, join } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\n\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport getDynamicRequirePaths from './dynamic-require-paths';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_PREFIX,\n getVirtualPathForDynamicRequirePath,\n EXTERNAL_SUFFIX,\n getIdFromExternalProxyId,\n getIdFromProxyId,\n HELPERS,\n HELPERS_ID,\n HELPER_NON_DYNAMIC,\n HELPERS_DYNAMIC,\n PROXY_SUFFIX\n} from './helpers';\n\nimport { getIsCjsPromise, setIsCjsPromise } from './is-cjs';\nimport getResolveId from './resolve-id';\nimport {\n checkEsModule,\n normalizePathSlashes,\n hasCjsKeywords,\n transformCommonjs\n} from './transform';\nimport { getName } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const { ignoreGlobal } = options;\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithoutDefaultExport = new Set();\n const esModulesWithDefaultExport = new Set();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);\n\n const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));\n\n if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {\n (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);\n if (!options.transformMixedEsModules) {\n setIsCjsPromise(id, false);\n return null;\n }\n }\n // it is not an ES module AND it does not have CJS-specific elements.\n else if (!hasCjsKeywords(code, ignoreGlobal)) {\n esModulesWithoutDefaultExport.add(id);\n setIsCjsPromise(id, false);\n return null;\n }\n\n const transformed = transformCommonjs(\n this.parse,\n code,\n id,\n this.getModuleInfo(id).isEntry,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n ast\n );\n\n setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));\n\n if (!transformed) {\n if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);\n return null;\n }\n\n return transformed;\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n\n const [major, minor] = this.meta.rollupVersion.split('.').map(Number);\n const minVersion = peerDependencies.rollup.slice(2);\n const [minMajor, minMinor] = minVersion.split('.').map(Number);\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n this.error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n let code = HELPERS;\n\n // Do not bloat everyone's code with the module manager code\n if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;\n else code += HELPER_NON_DYNAMIC;\n\n return code;\n }\n\n // generate proxy modules\n if (id.endsWith(EXTERNAL_SUFFIX)) {\n const actualId = getIdFromExternalProxyId(id);\n const name = getName(actualId);\n\n if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID)\n // These do not export default\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n\n return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dir, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dir, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n code += `\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});\n});`;\n }\n return code;\n }\n\n let actualId = id;\n\n const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);\n if (isDynamicJson) {\n actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);\n }\n\n const normalizedPath = normalizePathSlashes(actualId);\n\n if (isDynamicJson) {\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n }\n\n if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {\n // Try our best to still export the module fully.\n // The commonjs polyfill should take care of circular references.\n\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n }\n\n if (actualId.endsWith(PROXY_SUFFIX)) {\n actualId = getIdFromProxyId(actualId);\n const name = getName(actualId);\n\n return getIsCjsPromise(actualId).then((isCjs) => {\n if (\n dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) &&\n !actualId.endsWith('.json')\n )\n return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir)\n )}); export default (${name} && ${name}['default']) || ${name}`;\n else if (isCjs)\n return `import { __moduleExports } from ${JSON.stringify(\n actualId\n )}; export default __moduleExports;`;\n else if (esModulesWithoutDefaultExport.has(actualId))\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n else if (esModulesWithDefaultExport.has(actualId)) {\n return `export {default} from ${JSON.stringify(actualId)};`;\n }\n return `import * as ${name} from ${JSON.stringify(\n actualId\n )}; import {getCjsExportFromNamespace} from \"${HELPERS_ID}\"; export default getCjsExportFromNamespace(${name})`;\n });\n }\n\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n let code;\n\n try {\n code = readFileSync(actualId, { encoding: 'utf8' });\n } catch (ex) {\n this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);\n return null;\n }\n\n let dynamicImports = Array.from(dynamicRequireModuleSet)\n .map((dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`)\n .join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID\n )});`;\n }\n\n code = `${dynamicImports}\\n${code}`;\n\n return code;\n }\n\n return null;\n },\n\n transform(code, id) {\n if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {\n if (!filter(id) || extensions.indexOf(extname(id)) === -1) {\n setIsCjsPromise(id, null);\n return null;\n }\n }\n\n let transformed;\n try {\n transformed = transformAndCheckExports.call(this, code, id);\n } catch (err) {\n transformed = null;\n setIsCjsPromise(id, false);\n this.error(err, err.loc);\n }\n\n return transformed;\n }\n };\n}\n"],"names":["operators","x","equals","left","right","not","isFalsy","argument","isTruthy","flatten","node","parts","type","computed","unshift","property","name","object","keypath","join","value","expression","operator","undefined","a","b","strict","PROXY_SUFFIX","getProxyId","id","getIdFromProxyId","proxyId","slice","length","EXTERNAL_SUFFIX","getExternalProxyId","getIdFromExternalProxyId","VIRTUAL_PATH_BASE","getVirtualPathForDynamicRequirePath","path","commonDir","startsWith","DYNAMIC_REGISTER_PREFIX","DYNAMIC_JSON_PREFIX","DYNAMIC_PACKAGES_ID","HELPERS_ID","HELPERS","HELPER_NON_DYNAMIC","HELPERS_DYNAMIC","getName","makeLegalIdentifier","basename","extname","segments","dirname","split","sep","reserved","blacklist","__esModule","forEach","word","exportsPattern","firstpassGlobal","firstpassNoGlobal","importExportDeclaration","functionType","deconflict","scope","globals","identifier","i","deconflicted","contains","has","declarations","tryParse","parse","code","allowReturnOutsideFunction","err","message","normalizePathSlashes","replace","hasCjsKeywords","ignoreGlobal","firstpass","test","checkEsModule","ast","isEsModule","body","hasDefaultExport","specifiers","specifier","exported","getDefinePropertyCallName","targetName","callee","arguments","target","val","transformCommonjs","isEntry","ignoreRequire","sourceMap","isDynamicRequireModulesEnabled","dynamicRequireModuleSet","astCache","magicString","MagicString","required","sources","uid","attachScopes","uses","module","exports","global","require","lexicalDepth","programDepth","Set","HELPERS_NAME","namedExports","shouldWrap","usesCommonjsHelpers","isRequireStatement","isRequireIdentifier","hasDynamicArguments","expressions","isStaticRequireStatement","isIgnoredRequireStatement","requiredNode","getRequireStringArg","quasis","cooked","getRequired","sourceId","isDynamicRegister","substr","existing","isDynamic","hasDynamicModuleForPath","endsWith","push","source","importsDefault","resolvedPath","nodeResolveSync","basedir","ex","attemptExt","resolve","shouldUseSimulatedRequire","assignedTo","walk","enter","extractAssignedNames","add","parent","addSourcemapLocation","start","end","consequent","skip","alternate","_skip","overwrite","storeName","flattened","isReference","appendLeft","JSON","stringify","match","exec","properties","prop","key","init","_shouldRemove","remove","leave","keepDeclaration","c","declarator","Object","keys","Error","importBlock","concat","map","filter","importProxy","namedExportDeclarations","wrapperStart","wrapperEnd","moduleName","exportModuleExports","str","addExport","declaration","defaultExportPropertyAssignments","args","names","defaultExport","named","exportBlock","trim","prepend","append","injectExportBlock","toString","generateMap","syntheticNamedExports","getDynamicRequirePaths","patterns","Array","isArray","pattern","isNegated","modifySet","prototype","bind","glob","sync","dynamicRequireModuleDirPaths","from","values","statSync","isDirectory","ignored","isCjsPromises","Map","getIsCjsPromise","isCjsPromise","get","promise","Promise","set","setIsCjsPromise","resolution","getCandidatesForExtension","resolved","extension","getCandidates","extensions","reduce","paths","getResolveId","resolveExtensions","importee","importer","candidates","stats","isFile","resolveId","isProxyModule","skipSelf","then","external","commonjs","options","createFilter","include","exclude","dynamicRequireTargets","size","getCommonDir","process","cwd","esModulesWithoutDefaultExport","esModulesWithDefaultExport","ignore","includes","transformAndCheckExports","isDynamicRequireModule","transformMixedEsModules","transformed","getModuleInfo","Boolean","buildStart","warn","meta","rollupVersion","Number","major","minor","minVersion","peerDependencies","rollup","minMajor","minMinor","error","load","actualId","dir","entryPoint","existsSync","readFileSync","encoding","main","isDynamicJson","normalizedPath","isCjs","dynamicImports","dynamicId","transform","indexOf","call","loc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,MAAMA,SAAS,GAAG;AAChB,QAAOC,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,KAAlB,CADH;AAGhB,QAAOH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,IAAD,CAAT,CAAgBC,CAAhB,CAAD,CAHA;AAKhB,SAAQA,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,IAAlB,CALJ;AAOhB,SAAQH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,KAAD,CAAT,CAAiBC,CAAjB,CAAD,CAPD;AAShB,OAAMA,CAAD,IAAOK,OAAO,CAACL,CAAC,CAACM,QAAH,CATH;AAWhB,QAAON,CAAD,IAAOO,QAAQ,CAACP,CAAC,CAACE,IAAH,CAAR,IAAoBK,QAAQ,CAACP,CAAC,CAACG,KAAH,CAXzB;AAahB,QAAOH,CAAD,IAAOO,QAAQ,CAACP,CAAC,CAACE,IAAH,CAAR,IAAoBK,QAAQ,CAACP,CAAC,CAACG,KAAH;AAbzB,CAAlB;AA2CO,SAASK,OAAT,CAAiBC,IAAjB,EAAuB;AAC5B,QAAMC,KAAK,GAAG,EAAd;;AAEA,SAAOD,IAAI,CAACE,IAAL,KAAc,kBAArB,EAAyC;AACvC,QAAIF,IAAI,CAACG,QAAT,EAAmB,OAAO,IAAP;AAEnBF,IAAAA,KAAK,CAACG,OAAN,CAAcJ,IAAI,CAACK,QAAL,CAAcC,IAA5B,EAHuC;;AAKvCN,IAAAA,IAAI,GAAGA,IAAI,CA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C,CAE3B,IAFF;AAGD;;AAEDkC,QAAAA,IAAI,GAAI,GAAEoO,cAAe,KAAIpO,IAAK,EAAlC;AAEA,eAAOA,IAAP;AACD;;AAED,aAAO,IAAP;AACD,KAtJI;;AAwJLsO,IAAAA,SAAS,CAACtO,IAAD,EAAOjD,EAAP,EAAW;AAClB,UAAIA,EAAE,KAAKe,mBAAP,IAA8B,CAACf,EAAE,CAACY,UAAH,CAAcE,mBAAd,CAAnC,EAAuE;AACrE,YAAI,CAACsJ,MAAM,CAACpK,EAAD,CAAP,IAAe0N,UAAU,CAAC8D,OAAX,CAAmBjQ,OAAO,CAACvB,EAAD,CAA1B,MAAoC,CAAC,CAAxD,EAA2D;AACzDoN,UAAAA,eAAe,CAACpN,EAAD,EAAK,IAAL,CAAf;AACA,iBAAO,IAAP;AACD;AACF;;AAED,UAAI0P,WAAJ;;AACA,UAAI;AACFA,QAAAA,WAAW,GAAGH,wBAAwB,CAACkC,IAAzB,CAA8B,IAA9B,EAAoCxO,IAApC,EAA0CjD,EAA1C,CAAd;AACD,OAFD,CAEE,OAAOmD,GAAP,EAAY;AACZuM,QAAAA,WAAW,GAAG,IAAd;AACAtC,QAAAA,eAAe,CAACpN,EAAD,EAAK,KAAL,CAAf;AACA,aAAKyQ,KAAL,CAAWtN,GAAX,EAAgBA,GAAG,CAACuO,GAApB;AACD;;AAED,aAAOhC,WAAP;AACD;;AA1KI,GAAP;AA4KD;;;;"}
\ No newline at end of file
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..a9cb2c1c94e4231ccb075ef8df50fee83084528b
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js
@@ -0,0 +1,1378 @@
+'use strict';
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var fs = require('fs');
+var path = require('path');
+var pluginutils = require('@rollup/pluginutils');
+var getCommonDir = _interopDefault(require('commondir'));
+var glob = _interopDefault(require('glob'));
+var estreeWalker = require('estree-walker');
+var MagicString = _interopDefault(require('magic-string'));
+var resolve = require('resolve');
+var isReference = _interopDefault(require('is-reference'));
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+}
+
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(n);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+}
+
+function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+function _createForOfIteratorHelper(o) {
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
+ var i = 0;
+
+ var F = function () {};
+
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var it,
+ normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = o[Symbol.iterator]();
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+}
+
+var peerDependencies = {
+ rollup: "^2.3.4"
+};
+
+/* eslint-disable no-undefined */
+const operators = {
+ '==': x => equals(x.left, x.right, false),
+ '!=': x => not(operators['=='](x)),
+ '===': x => equals(x.left, x.right, true),
+ '!==': x => not(operators['==='](x)),
+ '!': x => isFalsy(x.argument),
+ '&&': x => isTruthy(x.left) && isTruthy(x.right),
+ '||': x => isTruthy(x.left) || isTruthy(x.right)
+};
+function flatten(node) {
+ const parts = [];
+
+ while (node.type === 'MemberExpression') {
+ if (node.computed) return null;
+ parts.unshift(node.property.name); // eslint-disable-next-line no-param-reassign
+
+ node = node.object;
+ }
+
+ if (node.type !== 'Identifier') return null;
+ const _node = node,
+ name = _node.name;
+ parts.unshift(name);
+ return {
+ name,
+ keypath: parts.join('.')
+ };
+}
+
+function isTruthy(node) {
+ if (node.type === 'Literal') return !!node.value;
+ if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);
+ if (node.operator in operators) return operators[node.operator](node);
+ return undefined;
+}
+function isFalsy(node) {
+ return not(isTruthy(node));
+}
+
+function not(value) {
+ return value === undefined ? value : !value;
+}
+
+function equals(a, b, strict) {
+ if (a.type !== b.type) return undefined; // eslint-disable-next-line eqeqeq
+
+ if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;
+ return undefined;
+}
+
+const PROXY_SUFFIX = '?commonjs-proxy';
+const getProxyId = id => `\0${id}${PROXY_SUFFIX}`;
+const getIdFromProxyId = proxyId => proxyId.slice(1, -PROXY_SUFFIX.length);
+const EXTERNAL_SUFFIX = '?commonjs-external';
+const getExternalProxyId = id => `\0${id}${EXTERNAL_SUFFIX}`;
+const getIdFromExternalProxyId = proxyId => proxyId.slice(1, -EXTERNAL_SUFFIX.length);
+const VIRTUAL_PATH_BASE = '/$$rollup_base$$';
+const getVirtualPathForDynamicRequirePath = (path, commonDir) => {
+ if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);
+ return path;
+};
+const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:';
+const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:';
+const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages';
+const HELPERS_ID = '\0commonjsHelpers.js'; // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.
+// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.
+
+const HELPERS = `
+export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+export function unwrapExports (x) {
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+}
+
+export function createCommonjsModule(fn, basedir, module) {
+ return module = {
+ path: basedir,
+ exports: {},
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
+ }
+ }, fn(module, module.exports), module.exports;
+}
+
+export function getCjsExportFromNamespace (n) {
+ return n && n['default'] || n;
+}
+`;
+const HELPER_NON_DYNAMIC = `
+export function commonjsRequire () {
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
+}
+`;
+const HELPERS_DYNAMIC = `
+export function commonjsRegister (path, loader) {
+ DYNAMIC_REQUIRE_LOADERS[path] = loader;
+}
+
+const DYNAMIC_REQUIRE_LOADERS = Object.create(null);
+const DYNAMIC_REQUIRE_CACHE = Object.create(null);
+const DEFAULT_PARENT_MODULE = {
+ id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
+};
+const CHECKED_EXTENSIONS = ['', '.js', '.json'];
+
+function normalize (path) {
+ path = path.replace(/\\\\/g, '/');
+ const parts = path.split('/');
+ const slashed = parts[0] === '';
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] === '.' || parts[i] === '') {
+ parts.splice(i--, 1);
+ }
+ }
+ for (let i = 1; i < parts.length; i++) {
+ if (parts[i] !== '..') continue;
+ if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
+ parts.splice(--i, 2);
+ i--;
+ }
+ }
+ path = parts.join('/');
+ if (slashed && path[0] !== '/')
+ path = '/' + path;
+ else if (path.length === 0)
+ path = '.';
+ return path;
+}
+
+function join () {
+ if (arguments.length === 0)
+ return '.';
+ let joined;
+ for (let i = 0; i < arguments.length; ++i) {
+ let arg = arguments[i];
+ if (arg.length > 0) {
+ if (joined === undefined)
+ joined = arg;
+ else
+ joined += '/' + arg;
+ }
+ }
+ if (joined === undefined)
+ return '.';
+
+ return joined;
+}
+
+function isPossibleNodeModulesPath (modulePath) {
+ let c0 = modulePath[0];
+ if (c0 === '/' || c0 === '\\\\') return false;
+ let c1 = modulePath[1], c2 = modulePath[2];
+ if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||
+ (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;
+ if (c1 === ':' && (c2 === '/' || c2 === '\\\\'))
+ return false;
+ return true;
+}
+
+function dirname (path) {
+ if (path.length === 0)
+ return '.';
+
+ let i = path.length - 1;
+ while (i > 0) {
+ const c = path.charCodeAt(i);
+ if ((c === 47 || c === 92) && i !== path.length - 1)
+ break;
+ i--;
+ }
+
+ if (i > 0)
+ return path.substr(0, i);
+
+ if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
+ return path.charAt(0);
+
+ return '.';
+}
+
+export function commonjsRequire (path, originalModuleDir) {
+ const shouldTryNodeModules = isPossibleNodeModulesPath(path);
+ path = normalize(path);
+ let relPath;
+ while (true) {
+ if (!shouldTryNodeModules) {
+ relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;
+ } else if (originalModuleDir) {
+ relPath = normalize(originalModuleDir + '/node_modules/' + path);
+ } else {
+ relPath = normalize(join('node_modules', path));
+ }
+ for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
+ const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
+ let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ if (cachedModule) return cachedModule.exports;
+ const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
+ if (loader) {
+ DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
+ id: resolvedPath,
+ filename: resolvedPath,
+ path: dirname(resolvedPath),
+ exports: {},
+ parent: DEFAULT_PARENT_MODULE,
+ loaded: false,
+ children: [],
+ paths: [],
+ require: function (path, base) {
+ return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
+ }
+ };
+ try {
+ loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
+ } catch (error) {
+ delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
+ throw error;
+ }
+ cachedModule.loaded = true;
+ return cachedModule.exports;
+ };
+ }
+ if (!shouldTryNodeModules) break;
+ const nextDir = normalize(originalModuleDir + '/..');
+ if (nextDir === originalModuleDir) break;
+ originalModuleDir = nextDir;
+ }
+ return require(path);
+}
+
+commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
+`;
+
+/* eslint-disable import/prefer-default-export */
+function getName(id) {
+ const name = pluginutils.makeLegalIdentifier(path.basename(id, path.extname(id)));
+
+ if (name !== 'index') {
+ return name;
+ }
+
+ const segments = path.dirname(id).split(path.sep);
+ return pluginutils.makeLegalIdentifier(segments[segments.length - 1]);
+}
+
+const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(' ');
+const blacklist = {
+ __esModule: true
+};
+reserved.forEach(word => blacklist[word] = true);
+const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
+const firstpassGlobal = /\b(?:require|module|exports|global)\b/;
+const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
+const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
+const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
+
+function deconflict(scope, globals, identifier) {
+ let i = 1;
+ let deconflicted = pluginutils.makeLegalIdentifier(identifier);
+
+ while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {
+ deconflicted = `${identifier}_${i}`;
+ i += 1;
+ }
+
+ scope.declarations[deconflicted] = true;
+ return deconflicted;
+}
+
+function tryParse(parse, code, id) {
+ try {
+ return parse(code, {
+ allowReturnOutsideFunction: true
+ });
+ } catch (err) {
+ err.message += ` in ${id}`;
+ throw err;
+ }
+}
+
+function normalizePathSlashes(path) {
+ return path.replace(/\\/g, '/');
+}
+function hasCjsKeywords(code, ignoreGlobal) {
+ const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
+ return firstpass.test(code);
+}
+function checkEsModule(parse, code, id) {
+ const ast = tryParse(parse, code, id);
+ let isEsModule = false;
+
+ var _iterator = _createForOfIteratorHelper(ast.body),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const node = _step.value;
+ if (node.type === 'ExportDefaultDeclaration') return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+
+ if (node.type === 'ExportNamedDeclaration') {
+ isEsModule = true;
+
+ var _iterator2 = _createForOfIteratorHelper(node.specifiers),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const specifier = _step2.value;
+
+ if (specifier.exported.name === 'default') {
+ return {
+ isEsModule: true,
+ hasDefaultExport: true,
+ ast
+ };
+ }
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ } else if (importExportDeclaration.test(node.type)) isEsModule = true;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return {
+ isEsModule,
+ hasDefaultExport: false,
+ ast
+ };
+}
+
+function getDefinePropertyCallName(node, targetName) {
+ if (node.type !== 'CallExpression') return;
+ const _node$callee = node.callee,
+ object = _node$callee.object,
+ property = _node$callee.property;
+ if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;
+ if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;
+ if (node.arguments.length !== 3) return;
+
+ const _node$arguments = _slicedToArray(node.arguments, 2),
+ target = _node$arguments[0],
+ val = _node$arguments[1];
+
+ if (target.type !== 'Identifier' || target.name !== targetName) return; // eslint-disable-next-line consistent-return
+
+ return val.value;
+}
+
+function transformCommonjs(parse, code, id, isEntry, isEsModule, ignoreGlobal, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, astCache) {
+ const ast = astCache || tryParse(parse, code, id);
+ const magicString = new MagicString(code);
+ const required = {}; // Because objects have no guaranteed ordering, yet we need it,
+ // we need to keep track of the order in a array
+
+ const sources = [];
+ let uid = 0;
+ let scope = pluginutils.attachScopes(ast, 'scope');
+ const uses = {
+ module: false,
+ exports: false,
+ global: false,
+ require: false
+ };
+ let lexicalDepth = 0;
+ let programDepth = 0;
+ const globals = new Set(); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯
+
+ const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');
+ const namedExports = {}; // TODO handle transpiled modules
+
+ let shouldWrap = /__esModule/.test(code);
+ let usesCommonjsHelpers = false;
+
+ function isRequireStatement(node) {
+ if (!node) return false;
+ if (node.type !== 'CallExpression') return false; // Weird case of `require()` or `module.require()` without arguments
+
+ if (node.arguments.length === 0) return false;
+ return isRequireIdentifier(node.callee);
+ }
+
+ function isRequireIdentifier(node) {
+ if (!node) return false;
+
+ if (node.type === 'Identifier' && node.name === 'require'
+ /* `require` */
+ ) {
+ // `require` is hidden by a variable in local scope
+ if (scope.contains('require')) return false;
+ return true;
+ } else if (node.type === 'MemberExpression'
+ /* `[something].[something]` */
+ ) {
+ // `module.[something]`
+ if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false; // `module` is hidden by a variable in local scope
+
+ if (scope.contains('module')) return false; // `module.require(...)`
+
+ if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;
+ return true;
+ }
+
+ return false;
+ }
+
+ function hasDynamicArguments(node) {
+ return node.arguments.length > 1 || node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0);
+ }
+
+ function isStaticRequireStatement(node) {
+ if (!isRequireStatement(node)) return false;
+ if (hasDynamicArguments(node)) return false;
+ return true;
+ }
+
+ function isIgnoredRequireStatement(requiredNode) {
+ return ignoreRequire(requiredNode.arguments[0].value);
+ }
+
+ function getRequireStringArg(node) {
+ return node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked;
+ }
+
+ function getRequired(node, name) {
+ let sourceId = getRequireStringArg(node);
+ const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);
+
+ if (isDynamicRegister) {
+ sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);
+ }
+
+ const existing = required[sourceId]; // eslint-disable-next-line no-undefined
+
+ if (existing === undefined) {
+ const isDynamic = hasDynamicModuleForPath(sourceId);
+
+ if (!name) {
+ do {
+ name = `require$$${uid}`;
+ uid += 1;
+ } while (scope.contains(name));
+ }
+
+ if (isDynamicRegister && sourceId.endsWith('.json')) {
+ sourceId = DYNAMIC_JSON_PREFIX + sourceId;
+ }
+
+ if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {
+ sources.push([sourceId, !isDynamicRegister]);
+ }
+
+ required[sourceId] = {
+ source: sourceId,
+ name,
+ importsDefault: false,
+ isDynamic
+ };
+ }
+
+ return required[sourceId];
+ }
+
+ function hasDynamicModuleForPath(source) {
+ if (!/[/\\]/.test(source)) {
+ try {
+ const resolvedPath = normalizePathSlashes(resolve.sync(source, {
+ basedir: path.dirname(id)
+ }));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ } catch (ex) {
+ // Probably a node.js internal module
+ return false;
+ }
+
+ return false;
+ }
+
+ for (var _i = 0, _arr = ['', '.js', '.json']; _i < _arr.length; _i++) {
+ const attemptExt = _arr[_i];
+ const resolvedPath = normalizePathSlashes(path.resolve(path.dirname(id), source + attemptExt));
+
+ if (dynamicRequireModuleSet.has(resolvedPath)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function shouldUseSimulatedRequire(required) {
+ return hasDynamicModuleForPath(required.source) && ( // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.
+ required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'));
+ } // do a first pass, see which names are assigned to. This is necessary to prevent
+ // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,
+ // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)
+
+
+ const assignedTo = new Set();
+ estreeWalker.walk(ast, {
+ enter(node) {
+ if (node.type !== 'AssignmentExpression') return;
+ if (node.left.type === 'MemberExpression') return;
+ pluginutils.extractAssignedNames(node.left).forEach(name => {
+ assignedTo.add(name);
+ });
+ }
+
+ });
+ estreeWalker.walk(ast, {
+ enter(node, parent) {
+ if (sourceMap) {
+ magicString.addSourcemapLocation(node.start);
+ magicString.addSourcemapLocation(node.end);
+ } // skip dead branches
+
+
+ if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {
+ if (node === parent.consequent && isFalsy(parent.test)) {
+ this.skip();
+ return;
+ }
+
+ if (node === parent.alternate && isTruthy(parent.test)) {
+ this.skip();
+ return;
+ }
+ }
+
+ if (node._skip) {
+ this.skip();
+ return;
+ }
+
+ programDepth += 1;
+
+ if (node.scope) {
+ scope = node.scope;
+ }
+
+ if (functionType.test(node.type)) lexicalDepth += 1; // if toplevel return, we need to wrap it
+
+ if (node.type === 'ReturnStatement' && lexicalDepth === 0) {
+ shouldWrap = true;
+ } // rewrite `this` as `commonjsHelpers.commonjsGlobal`
+
+
+ if (node.type === 'ThisExpression' && lexicalDepth === 0) {
+ uses.global = true;
+
+ if (!ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ return;
+ } // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)
+
+
+ if (node.type === 'UnaryExpression' && node.operator === 'typeof') {
+ const flattened = flatten(node.argument);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+
+ if (flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports') {
+ magicString.overwrite(node.start, node.end, `'object'`, {
+ storeName: false
+ });
+ }
+ } // rewrite `require` (if not already handled) `global` and `define`, and handle free references to
+ // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule
+
+
+ if (node.type === 'Identifier') {
+ if (isReference(node, parent) && !scope.contains(node.name)) {
+ if (node.name in uses) {
+ if (isRequireIdentifier(node)) {
+ if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {
+ return;
+ }
+
+ if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {
+ magicString.appendLeft(parent.end - 1, `,${JSON.stringify(path.dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))}`);
+ }
+
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ }
+
+ uses[node.name] = true;
+
+ if (node.name === 'global' && !ignoreGlobal) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {
+ storeName: true
+ });
+ usesCommonjsHelpers = true;
+ } // if module or exports are used outside the context of an assignment
+ // expression, we need to wrap the module
+
+
+ if (node.name === 'module' || node.name === 'exports') {
+ shouldWrap = true;
+ }
+ }
+
+ if (node.name === 'define') {
+ magicString.overwrite(node.start, node.end, 'undefined', {
+ storeName: true
+ });
+ }
+
+ globals.add(node.name);
+ }
+
+ return;
+ } // Is this an assignment to exports or module.exports?
+
+
+ if (node.type === 'AssignmentExpression') {
+ if (node.left.type !== 'MemberExpression') return;
+ const flattened = flatten(node.left);
+ if (!flattened) return;
+ if (scope.contains(flattened.name)) return;
+ const match = exportsPattern.exec(flattened.keypath);
+ if (!match || flattened.keypath === 'exports') return;
+ uses[flattened.name] = true; // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –
+ // if this isn't top-level, we'll need to wrap the module
+
+ if (programDepth > 3) shouldWrap = true;
+ node.left._skip = true;
+
+ if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {
+ node.right.properties.forEach(prop => {
+ if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;
+ const name = prop.key.name;
+ if (name === pluginutils.makeLegalIdentifier(name)) namedExports[name] = true;
+ });
+ return;
+ }
+
+ if (match[1]) namedExports[match[1]] = true;
+ return;
+ }
+
+ const name = getDefinePropertyCallName(node, 'exports');
+ if (name && name === pluginutils.makeLegalIdentifier(name)) namedExports[name] = true; // if this is `var x = require('x')`, we can do `import x from 'x'`
+
+ if (node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isStaticRequireStatement(node.init) && !isIgnoredRequireStatement(node.init)) {
+ // for now, only do this for top-level requires. maybe fix this in future
+ if (scope.parent) return; // edge case — CJS allows you to assign to imports. ES doesn't
+
+ if (assignedTo.has(node.id.name)) return;
+ const required = getRequired(node.init, node.id.name);
+ required.importsDefault = true;
+
+ if (required.name === node.id.name && !required.isDynamic) {
+ node._shouldRemove = true;
+ }
+ }
+
+ if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {
+ return;
+ }
+
+ const required = getRequired(node);
+
+ if (parent.type === 'ExpressionStatement') {
+ // is a bare import, e.g. `require('foo');`
+ magicString.remove(parent.start, parent.end);
+ } else {
+ required.importsDefault = true;
+
+ if (shouldUseSimulatedRequire(required)) {
+ magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir))}, ${JSON.stringify(path.dirname(id) === '.' ? null
+ /* default behavior */
+ : getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))})`);
+ usesCommonjsHelpers = true;
+ } else {
+ magicString.overwrite(node.start, node.end, required.name);
+ }
+ }
+
+ node.callee._skip = true;
+ },
+
+ leave(node) {
+ programDepth -= 1;
+ if (node.scope) scope = scope.parent;
+ if (functionType.test(node.type)) lexicalDepth -= 1;
+
+ if (node.type === 'VariableDeclaration') {
+ let keepDeclaration = false;
+ let c = node.declarations[0].start;
+
+ for (let i = 0; i < node.declarations.length; i += 1) {
+ const declarator = node.declarations[i];
+
+ if (declarator._shouldRemove) {
+ magicString.remove(c, declarator.end);
+ } else {
+ if (!keepDeclaration) {
+ magicString.remove(c, declarator.start);
+ keepDeclaration = true;
+ }
+
+ c = declarator.end;
+ }
+ }
+
+ if (!keepDeclaration) {
+ magicString.remove(node.start, node.end);
+ }
+ }
+ }
+
+ });
+
+ if (!sources.length && !uses.module && !uses.exports && !uses.require && (ignoreGlobal || !uses.global)) {
+ if (Object.keys(namedExports).length) {
+ throw new Error(`Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`);
+ } // not a CommonJS module
+
+
+ return null;
+ } // If `isEsModule` is on, it means it has ES6 import/export statements,
+ // which just can't be wrapped in a function.
+
+
+ if (isEsModule) shouldWrap = false;
+ usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;
+ const importBlock = `${(usesCommonjsHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : []).concat(sources.map(([source]) => // import the actual module before the proxy, so that we know
+ // what kind of proxy to build
+ `import '${source}';`), sources.filter(([, importProxy]) => importProxy).map(([source]) => {
+ const _required$source = required[source],
+ name = _required$source.name,
+ importsDefault = _required$source.importsDefault;
+ return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;
+ })).join('\n')}\n\n`;
+ const namedExportDeclarations = [];
+ let wrapperStart = '';
+ let wrapperEnd = '';
+ const moduleName = deconflict(scope, globals, getName(id));
+
+ if (!isEntry && !isEsModule) {
+ const exportModuleExports = {
+ str: `export { ${moduleName} as __moduleExports };`,
+ name: '__moduleExports'
+ };
+ namedExportDeclarations.push(exportModuleExports);
+ }
+
+ const name = getName(id);
+
+ function addExport(x) {
+ const deconflicted = deconflict(scope, globals, name);
+ const declaration = deconflicted === name ? `export var ${x} = ${moduleName}.${x};` : `var ${deconflicted} = ${moduleName}.${x};\nexport { ${deconflicted} as ${x} };`;
+ namedExportDeclarations.push({
+ str: declaration,
+ name: x
+ });
+ }
+
+ const defaultExportPropertyAssignments = [];
+ let hasDefaultExport = false;
+
+ if (shouldWrap) {
+ const args = `module${uses.exports ? ', exports' : ''}`;
+ wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`;
+ wrapperEnd = `\n}`;
+
+ if (isDynamicRequireModulesEnabled) {
+ wrapperEnd += `, ${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))}`;
+ }
+
+ wrapperEnd += `);`;
+ } else {
+ const names = [];
+
+ var _iterator3 = _createForOfIteratorHelper(ast.body),
+ _step3;
+
+ try {
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
+ const node = _step3.value;
+
+ if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {
+ const left = node.expression.left;
+ const flattened = flatten(left);
+
+ if (!flattened) {
+ continue;
+ }
+
+ const match = exportsPattern.exec(flattened.keypath);
+
+ if (!match) {
+ continue;
+ }
+
+ if (flattened.keypath === 'module.exports') {
+ hasDefaultExport = true;
+ magicString.overwrite(left.start, left.end, `var ${moduleName}`);
+ } else {
+ const _match = _slicedToArray(match, 2),
+ name = _match[1];
+
+ const deconflicted = deconflict(scope, globals, name);
+ names.push({
+ name,
+ deconflicted
+ });
+ magicString.overwrite(node.start, left.end, `var ${deconflicted}`);
+ const declaration = name === deconflicted ? `export { ${name} };` : `export { ${deconflicted} as ${name} };`;
+
+ if (name !== 'default') {
+ namedExportDeclarations.push({
+ str: declaration,
+ name
+ });
+ delete namedExports[name];
+ }
+
+ defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);
+ }
+ }
+ }
+ } catch (err) {
+ _iterator3.e(err);
+ } finally {
+ _iterator3.f();
+ }
+
+ if (!hasDefaultExport && (names.length || !isEntry && !isEsModule)) {
+ wrapperEnd = `\n\nvar ${moduleName} = {\n${names.map(({
+ name,
+ deconflicted
+ }) => `\t${name}: ${deconflicted}`).join(',\n')}\n};`;
+ }
+ }
+
+ Object.keys(namedExports).filter(key => !blacklist[key]).forEach(addExport);
+ const defaultExport = /__esModule/.test(code) ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`;
+ const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str);
+ const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`;
+ magicString.trim().prepend(importBlock + wrapperStart).trim().append(wrapperEnd);
+ const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry;
+
+ if (injectExportBlock) {
+ magicString.append(exportBlock);
+ }
+
+ code = magicString.toString();
+ const map = sourceMap ? magicString.generateMap() : null;
+ return {
+ code,
+ map,
+ syntheticNamedExports: injectExportBlock
+ };
+}
+
+function getDynamicRequirePaths(patterns) {
+ const dynamicRequireModuleSet = new Set();
+
+ var _iterator = _createForOfIteratorHelper(!patterns || Array.isArray(patterns) ? patterns || [] : [patterns]),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const pattern = _step.value;
+ const isNegated = pattern.startsWith('!');
+ const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);
+
+ var _iterator2 = _createForOfIteratorHelper(glob.sync(isNegated ? pattern.substr(1) : pattern)),
+ _step2;
+
+ try {
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
+ const path$1 = _step2.value;
+ modifySet(normalizePathSlashes(path.resolve(path$1)));
+ }
+ } catch (err) {
+ _iterator2.e(err);
+ } finally {
+ _iterator2.f();
+ }
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(path => {
+ try {
+ if (fs.statSync(path).isDirectory()) return true;
+ } catch (ignored) {// Nothing to do here
+ }
+
+ return false;
+ });
+ return {
+ dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths
+ };
+}
+
+/* eslint-disable no-undefined */
+const isCjsPromises = new Map();
+function getIsCjsPromise(id) {
+ let isCjsPromise = isCjsPromises.get(id);
+ if (isCjsPromise) return isCjsPromise.promise;
+ const promise = new Promise(resolve => {
+ isCjsPromise = {
+ resolve,
+ promise: undefined
+ };
+ isCjsPromises.set(id, isCjsPromise);
+ });
+ isCjsPromise.promise = promise;
+ return promise;
+}
+function setIsCjsPromise(id, resolution) {
+ const isCjsPromise = isCjsPromises.get(id);
+
+ if (isCjsPromise) {
+ if (isCjsPromise.resolve) {
+ isCjsPromise.resolve(resolution);
+ isCjsPromise.resolve = undefined;
+ }
+ } else {
+ isCjsPromises.set(id, {
+ promise: Promise.resolve(resolution),
+ resolve: undefined
+ });
+ }
+}
+
+/* eslint-disable no-param-reassign, no-undefined */
+
+function getCandidatesForExtension(resolved, extension) {
+ return [resolved + extension, `${resolved}${path.sep}index${extension}`];
+}
+
+function getCandidates(resolved, extensions) {
+ return extensions.reduce((paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), [resolved]);
+}
+
+function getResolveId(extensions) {
+ function resolveExtensions(importee, importer) {
+ // not our problem
+ if (importee[0] !== '.' || !importer) return undefined;
+ const resolved = path.resolve(path.dirname(importer), importee);
+ const candidates = getCandidates(resolved, extensions);
+
+ for (let i = 0; i < candidates.length; i += 1) {
+ try {
+ const stats = fs.statSync(candidates[i]);
+ if (stats.isFile()) return {
+ id: candidates[i]
+ };
+ } catch (err) {
+ /* noop */
+ }
+ }
+
+ return undefined;
+ }
+
+ function resolveId(importee, importer) {
+ const isProxyModule = importee.endsWith(PROXY_SUFFIX);
+
+ if (isProxyModule) {
+ importee = getIdFromProxyId(importee);
+ } else if (importee.startsWith('\0')) {
+ if (importee === HELPERS_ID || importee === DYNAMIC_PACKAGES_ID || importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ return null;
+ }
+
+ if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {
+ return importee;
+ }
+
+ if (importer && importer.endsWith(PROXY_SUFFIX)) {
+ importer = getIdFromProxyId(importer);
+ }
+
+ return this.resolve(importee, importer, {
+ skipSelf: true
+ }).then(resolved => {
+ if (!resolved) {
+ resolved = resolveExtensions(importee, importer);
+ }
+
+ if (isProxyModule) {
+ if (!resolved) {
+ return {
+ id: getExternalProxyId(importee),
+ external: false
+ };
+ }
+
+ resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);
+ resolved.external = false;
+ return resolved;
+ }
+
+ return resolved;
+ });
+ }
+
+ return resolveId;
+}
+
+function commonjs(options = {}) {
+ const extensions = options.extensions || ['.js'];
+ const filter = pluginutils.createFilter(options.include, options.exclude);
+ const ignoreGlobal = options.ignoreGlobal;
+
+ const _getDynamicRequirePat = getDynamicRequirePaths(options.dynamicRequireTargets),
+ dynamicRequireModuleSet = _getDynamicRequirePat.dynamicRequireModuleSet,
+ dynamicRequireModuleDirPaths = _getDynamicRequirePat.dynamicRequireModuleDirPaths;
+
+ const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;
+ const commonDir = isDynamicRequireModulesEnabled ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd())) : null;
+ const esModulesWithoutDefaultExport = new Set();
+ const esModulesWithDefaultExport = new Set();
+ const ignoreRequire = typeof options.ignore === 'function' ? options.ignore : Array.isArray(options.ignore) ? id => options.ignore.includes(id) : () => false;
+ const resolveId = getResolveId(extensions);
+ const sourceMap = options.sourceMap !== false;
+
+ function transformAndCheckExports(code, id) {
+ const _checkEsModule = checkEsModule(this.parse, code, id),
+ isEsModule = _checkEsModule.isEsModule,
+ hasDefaultExport = _checkEsModule.hasDefaultExport,
+ ast = _checkEsModule.ast;
+
+ const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));
+
+ if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {
+ (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);
+
+ if (!options.transformMixedEsModules) {
+ setIsCjsPromise(id, false);
+ return null;
+ }
+ } // it is not an ES module AND it does not have CJS-specific elements.
+ else if (!hasCjsKeywords(code, ignoreGlobal)) {
+ esModulesWithoutDefaultExport.add(id);
+ setIsCjsPromise(id, false);
+ return null;
+ }
+
+ const transformed = transformCommonjs(this.parse, code, id, this.getModuleInfo(id).isEntry, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, ast);
+ setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));
+
+ if (!transformed) {
+ if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);
+ return null;
+ }
+
+ return transformed;
+ }
+
+ return {
+ name: 'commonjs',
+
+ buildStart() {
+ if (options.namedExports != null) {
+ this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.');
+ }
+
+ const _this$meta$rollupVers = this.meta.rollupVersion.split('.').map(Number),
+ _this$meta$rollupVers2 = _slicedToArray(_this$meta$rollupVers, 2),
+ major = _this$meta$rollupVers2[0],
+ minor = _this$meta$rollupVers2[1];
+
+ const minVersion = peerDependencies.rollup.slice(2);
+
+ const _minVersion$split$map = minVersion.split('.').map(Number),
+ _minVersion$split$map2 = _slicedToArray(_minVersion$split$map, 2),
+ minMajor = _minVersion$split$map2[0],
+ minMinor = _minVersion$split$map2[1];
+
+ if (major < minMajor || major === minMajor && minor < minMinor) {
+ this.error(`Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`);
+ }
+ },
+
+ resolveId,
+
+ load(id) {
+ if (id === HELPERS_ID) {
+ let code = HELPERS; // Do not bloat everyone's code with the module manager code
+
+ if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;else code += HELPER_NON_DYNAMIC;
+ return code;
+ } // generate proxy modules
+
+
+ if (id.endsWith(EXTERNAL_SUFFIX)) {
+ const actualId = getIdFromExternalProxyId(id);
+ const name = getName(actualId);
+ if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID) // These do not export default
+ return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;
+ }
+
+ if (id === DYNAMIC_PACKAGES_ID) {
+ let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;
+
+ var _iterator = _createForOfIteratorHelper(dynamicRequireModuleDirPaths),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const dir = _step.value;
+ let entryPoint = 'index.js';
+
+ try {
+ if (fs.existsSync(path.join(dir, 'package.json'))) {
+ entryPoint = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), {
+ encoding: 'utf8'
+ })).main || entryPoint;
+ }
+ } catch (ignored) {// ignored
+ }
+
+ code += `\ncommonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(dir, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizePathSlashes(path.join(dir, entryPoint)))});
+});`;
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ return code;
+ }
+
+ let actualId = id;
+ const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);
+
+ if (isDynamicJson) {
+ actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);
+ }
+
+ const normalizedPath = normalizePathSlashes(actualId);
+
+ if (isDynamicJson) {
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ module.exports = require(${JSON.stringify(normalizedPath)});
+});`;
+ }
+
+ if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {
+ // Try our best to still export the module fully.
+ // The commonjs polyfill should take care of circular references.
+ return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) {
+ ${fs.readFileSync(normalizedPath, {
+ encoding: 'utf8'
+ })}
+});`;
+ }
+
+ if (actualId.endsWith(PROXY_SUFFIX)) {
+ actualId = getIdFromProxyId(actualId);
+ const name = getName(actualId);
+ return getIsCjsPromise(actualId).then(isCjs => {
+ if (dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) && !actualId.endsWith('.json')) return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir))}); export default (${name} && ${name}['default']) || ${name}`;else if (isCjs) return `import { __moduleExports } from ${JSON.stringify(actualId)}; export default __moduleExports;`;else if (esModulesWithoutDefaultExport.has(actualId)) return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;else if (esModulesWithDefaultExport.has(actualId)) {
+ return `export {default} from ${JSON.stringify(actualId)};`;
+ }
+ return `import * as ${name} from ${JSON.stringify(actualId)}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`;
+ });
+ }
+
+ if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {
+ let code;
+
+ try {
+ code = fs.readFileSync(actualId, {
+ encoding: 'utf8'
+ });
+ } catch (ex) {
+ this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);
+ return null;
+ }
+
+ let dynamicImports = Array.from(dynamicRequireModuleSet).map(dynamicId => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`).join('\n');
+
+ if (dynamicRequireModuleDirPaths.length) {
+ dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`;
+ }
+
+ code = `${dynamicImports}\n${code}`;
+ return code;
+ }
+
+ return null;
+ },
+
+ transform(code, id) {
+ if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {
+ if (!filter(id) || extensions.indexOf(path.extname(id)) === -1) {
+ setIsCjsPromise(id, null);
+ return null;
+ }
+ }
+
+ let transformed;
+
+ try {
+ transformed = transformAndCheckExports.call(this, code, id);
+ } catch (err) {
+ transformed = null;
+ setIsCjsPromise(id, false);
+ this.error(err, err.loc);
+ }
+
+ return transformed;
+ }
+
+ };
+}
+
+module.exports = commonjs;
+//# sourceMappingURL=index.js.map
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js.map b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..65315401e0d206c4d84f1db4580719df0d75fc59
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sources":["../src/ast-utils.js","../src/helpers.js","../src/utils.js","../src/transform.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/resolve-id.js","../src/index.js"],"sourcesContent":["/* eslint-disable no-undefined */\nexport { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nconst extractors = {\n Identifier(names, node) {\n names.push(node.name);\n },\n\n ObjectPattern(names, node) {\n node.properties.forEach((prop) => {\n getExtractor(prop.value.type)(names, prop.value);\n });\n },\n\n ArrayPattern(names, node) {\n node.elements.forEach((element) => {\n if (!element) return;\n getExtractor(element.type)(names, element);\n });\n },\n\n RestElement(names, node) {\n getExtractor(node.argument.type)(names, node.argument);\n },\n\n AssignmentPattern(names, node) {\n getExtractor(node.left.type)(names, node.left);\n }\n};\n\nexport function flatten(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport function extractNames(node) {\n const names = [];\n extractors[node.type](names, node);\n return names;\n}\n\nfunction getExtractor(type) {\n const extractor = extractors[type];\n if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);\n return extractor;\n}\n\nexport function isTruthy(node) {\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return undefined;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nfunction not(value) {\n return value === undefined ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return undefined;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return undefined;\n}\n","export const PROXY_SUFFIX = '?commonjs-proxy';\nexport const getProxyId = (id) => `\\0${id}${PROXY_SUFFIX}`;\nexport const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);\n\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const getExternalProxyId = (id) => `\\0${id}${EXTERNAL_SUFFIX}`;\nexport const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);\n\nexport const VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);\n return path;\n};\n\nexport const DYNAMIC_REGISTER_PREFIX = '\\0commonjs-dynamic-register:';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\nexport const HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nexport function getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n`;\n\nexport const HELPER_NON_DYNAMIC = `\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n`;\n\nexport const HELPERS_DYNAMIC = `\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\nconst DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tconst parts = path.split('/');\n\tconst slashed = parts[0] === '';\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tlet joined;\n\tfor (let i = 0; i < arguments.length; ++i) {\n\t let arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tlet c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tlet c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n let i = path.length - 1;\n while (i > 0) {\n const c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tlet relPath;\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tlet cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\tif (cachedModule) return cachedModule.exports;\n\t\t\tconst loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t\t\tif (loader) {\n\t\t\t\tDYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t\t\t\t\tid: resolvedPath,\n\t\t\t\t\tfilename: resolvedPath,\n\t\t\t\t\tpath: dirname(resolvedPath),\n\t\t\t\t\texports: {},\n\t\t\t\t\tparent: DEFAULT_PARENT_MODULE,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tpaths: [],\n\t\t\t\t\trequire: function (path, base) {\n\t\t\t\t\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tloader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdelete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tcachedModule.loaded = true;\n\t\t\t\treturn cachedModule.exports;\n\t\t\t};\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tconst nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn require(path);\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n`;\n","/* eslint-disable import/prefer-default-export */\nimport { basename, dirname, extname, sep } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n const segments = dirname(id).split(sep);\n return makeLegalIdentifier(segments[segments.length - 1]);\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\nimport { resolve, dirname } from 'path';\n\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport { flatten, isFalsy, isReference, isTruthy } from './ast-utils';\nimport {\n getProxyId,\n getVirtualPathForDynamicRequirePath,\n HELPERS_ID,\n DYNAMIC_REGISTER_PREFIX,\n DYNAMIC_JSON_PREFIX\n} from './helpers';\nimport { getName } from './utils';\n// TODO can this be async?\n\nconst reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(\n ' '\n);\nconst blacklist = { __esModule: true };\nreserved.forEach((word) => (blacklist[word] = true));\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict(scope, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n\n while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {\n deconflicted = `${identifier}_${i}`;\n i += 1;\n }\n scope.declarations[deconflicted] = true;\n\n return deconflicted;\n}\n\nfunction tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n\nexport function checkEsModule(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n for (const node of ast.body) {\n if (node.type === 'ExportDefaultDeclaration')\n return { isEsModule: true, hasDefaultExport: true, ast };\n if (node.type === 'ExportNamedDeclaration') {\n isEsModule = true;\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n return { isEsModule: true, hasDefaultExport: true, ast };\n }\n }\n } else if (importExportDeclaration.test(node.type)) isEsModule = true;\n }\n\n return { isEsModule, hasDefaultExport: false, ast };\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n if (node.type !== 'CallExpression') return;\n\n const {\n callee: { object, property }\n } = node;\n\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n\n if (node.arguments.length !== 3) return;\n\n const [target, val] = node.arguments;\n if (target.type !== 'Identifier' || target.name !== targetName) return;\n // eslint-disable-next-line consistent-return\n return val.value;\n}\n\nexport function transformCommonjs(\n parse,\n code,\n id,\n isEntry,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n astCache\n) {\n const ast = astCache || tryParse(parse, code, id);\n\n const magicString = new MagicString(code);\n\n const required = {};\n // Because objects have no guaranteed ordering, yet we need it,\n // we need to keep track of the order in a array\n const sources = [];\n\n let uid = 0;\n\n let scope = attachScopes(ast, 'scope');\n const uses = { module: false, exports: false, global: false, require: false };\n\n let lexicalDepth = 0;\n let programDepth = 0;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');\n\n const namedExports = {};\n\n // TODO handle transpiled modules\n let shouldWrap = /__esModule/.test(code);\n let usesCommonjsHelpers = false;\n\n function isRequireStatement(node) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequireIdentifier(node.callee);\n }\n\n function isRequireIdentifier(node) {\n if (!node) return false;\n\n if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {\n // `require` is hidden by a variable in local scope\n if (scope.contains('require')) return false;\n\n return true;\n } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {\n // `module.[something]`\n if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;\n\n // `module` is hidden by a variable in local scope\n if (scope.contains('module')) return false;\n\n // `module.require(...)`\n if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;\n\n return true;\n }\n\n return false;\n }\n\n function hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n }\n\n function isStaticRequireStatement(node) {\n if (!isRequireStatement(node)) return false;\n if (hasDynamicArguments(node)) return false;\n return true;\n }\n\n function isIgnoredRequireStatement(requiredNode) {\n return ignoreRequire(requiredNode.arguments[0].value);\n }\n\n function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n }\n\n function getRequired(node, name) {\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);\n if (isDynamicRegister) {\n sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);\n }\n\n const existing = required[sourceId];\n // eslint-disable-next-line no-undefined\n if (existing === undefined) {\n const isDynamic = hasDynamicModuleForPath(sourceId);\n\n if (!name) {\n do {\n name = `require$$${uid}`;\n uid += 1;\n } while (scope.contains(name));\n }\n\n if (isDynamicRegister && sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n\n if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {\n sources.push([sourceId, !isDynamicRegister]);\n }\n\n required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };\n }\n\n return required[sourceId];\n }\n\n function hasDynamicModuleForPath(source) {\n if (!/[/\\\\]/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(\n nodeResolveSync(source, { basedir: dirname(id) })\n );\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldUseSimulatedRequire(required) {\n return (\n hasDynamicModuleForPath(required.source) &&\n // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.\n (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))\n );\n }\n\n // do a first pass, see which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const assignedTo = new Set();\n walk(ast, {\n enter(node) {\n if (node.type !== 'AssignmentExpression') return;\n if (node.left.type === 'MemberExpression') return;\n\n extractAssignedNames(node.left).forEach((name) => {\n assignedTo.add(name);\n });\n }\n });\n\n walk(ast, {\n enter(node, parent) {\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // skip dead branches\n if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {\n if (node === parent.consequent && isFalsy(parent.test)) {\n this.skip();\n return;\n }\n if (node === parent.alternate && isTruthy(parent.test)) {\n this.skip();\n return;\n }\n }\n\n if (node._skip) {\n this.skip();\n return;\n }\n\n programDepth += 1;\n\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n\n // if toplevel return, we need to wrap it\n if (node.type === 'ReturnStatement' && lexicalDepth === 0) {\n shouldWrap = true;\n }\n\n // rewrite `this` as `commonjsHelpers.commonjsGlobal`\n if (node.type === 'ThisExpression' && lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n return;\n }\n\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.type === 'UnaryExpression' && node.operator === 'typeof') {\n const flattened = flatten(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });\n }\n }\n\n // rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n if (node.type === 'Identifier') {\n if (isReference(node, parent) && !scope.contains(node.name)) {\n if (node.name in uses) {\n if (isRequireIdentifier(node)) {\n if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(\n normalizePathSlashes(dirname(id)),\n commonDir\n )\n )}`\n );\n }\n\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n uses[node.name] = true;\n if (node.name === 'global' && !ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n // if module or exports are used outside the context of an assignment\n // expression, we need to wrap the module\n if (node.name === 'module' || node.name === 'exports') {\n shouldWrap = true;\n }\n }\n\n if (node.name === 'define') {\n magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });\n }\n\n globals.add(node.name);\n }\n\n return;\n }\n\n // Is this an assignment to exports or module.exports?\n if (node.type === 'AssignmentExpression') {\n if (node.left.type !== 'MemberExpression') return;\n\n const flattened = flatten(node.left);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match || flattened.keypath === 'exports') return;\n\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n // if this isn't top-level, we'll need to wrap the module\n if (programDepth > 3) shouldWrap = true;\n\n node.left._skip = true;\n\n if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {\n node.right.properties.forEach((prop) => {\n if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;\n const { name } = prop.key;\n if (name === makeLegalIdentifier(name)) namedExports[name] = true;\n });\n return;\n }\n\n if (match[1]) namedExports[match[1]] = true;\n return;\n }\n\n const name = getDefinePropertyCallName(node, 'exports');\n if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;\n\n // if this is `var x = require('x')`, we can do `import x from 'x'`\n if (\n node.type === 'VariableDeclarator' &&\n node.id.type === 'Identifier' &&\n isStaticRequireStatement(node.init) &&\n !isIgnoredRequireStatement(node.init)\n ) {\n // for now, only do this for top-level requires. maybe fix this in future\n if (scope.parent) return;\n\n // edge case — CJS allows you to assign to imports. ES doesn't\n if (assignedTo.has(node.id.name)) return;\n\n const required = getRequired(node.init, node.id.name);\n required.importsDefault = true;\n\n if (required.name === node.id.name && !required.isDynamic) {\n node._shouldRemove = true;\n }\n }\n\n if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {\n return;\n }\n\n const required = getRequired(node);\n\n if (parent.type === 'ExpressionStatement') {\n // is a bare import, e.g. `require('foo');`\n magicString.remove(parent.start, parent.end);\n } else {\n required.importsDefault = true;\n\n if (shouldUseSimulatedRequire(required)) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )})`\n );\n usesCommonjsHelpers = true;\n } else {\n magicString.overwrite(node.start, node.end, required.name);\n }\n }\n\n node.callee._skip = true;\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n\n if (node.type === 'VariableDeclaration') {\n let keepDeclaration = false;\n let c = node.declarations[0].start;\n\n for (let i = 0; i < node.declarations.length; i += 1) {\n const declarator = node.declarations[i];\n\n if (declarator._shouldRemove) {\n magicString.remove(c, declarator.end);\n } else {\n if (!keepDeclaration) {\n magicString.remove(c, declarator.start);\n keepDeclaration = true;\n }\n\n c = declarator.end;\n }\n }\n\n if (!keepDeclaration) {\n magicString.remove(node.start, node.end);\n }\n }\n }\n });\n\n if (\n !sources.length &&\n !uses.module &&\n !uses.exports &&\n !uses.require &&\n (ignoreGlobal || !uses.global)\n ) {\n if (Object.keys(namedExports).length) {\n throw new Error(\n `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`\n );\n }\n // not a CommonJS module\n return null;\n }\n\n // If `isEsModule` is on, it means it has ES6 import/export statements,\n // which just can't be wrapped in a function.\n if (isEsModule) shouldWrap = false;\n\n usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;\n\n const importBlock = `${(usesCommonjsHelpers\n ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]\n : []\n )\n .concat(\n sources.map(\n ([source]) =>\n // import the actual module before the proxy, so that we know\n // what kind of proxy to build\n `import '${source}';`\n ),\n sources\n .filter(([, importProxy]) => importProxy)\n .map(([source]) => {\n const { name, importsDefault } = required[source];\n return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;\n })\n )\n .join('\\n')}\\n\\n`;\n\n const namedExportDeclarations = [];\n let wrapperStart = '';\n let wrapperEnd = '';\n\n const moduleName = deconflict(scope, globals, getName(id));\n if (!isEntry && !isEsModule) {\n const exportModuleExports = {\n str: `export { ${moduleName} as __moduleExports };`,\n name: '__moduleExports'\n };\n\n namedExportDeclarations.push(exportModuleExports);\n }\n\n const name = getName(id);\n\n function addExport(x) {\n const deconflicted = deconflict(scope, globals, name);\n\n const declaration =\n deconflicted === name\n ? `export var ${x} = ${moduleName}.${x};`\n : `var ${deconflicted} = ${moduleName}.${x};\\nexport { ${deconflicted} as ${x} };`;\n\n namedExportDeclarations.push({\n str: declaration,\n name: x\n });\n }\n\n const defaultExportPropertyAssignments = [];\n let hasDefaultExport = false;\n\n if (shouldWrap) {\n const args = `module${uses.exports ? ', exports' : ''}`;\n\n wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\n wrapperEnd = `\\n}`;\n if (isDynamicRequireModulesEnabled) {\n wrapperEnd += `, ${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )}`;\n }\n\n wrapperEnd += `);`;\n } else {\n const names = [];\n\n for (const node of ast.body) {\n if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {\n const { left } = node.expression;\n const flattened = flatten(left);\n\n if (!flattened) {\n continue;\n }\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match) {\n continue;\n }\n\n if (flattened.keypath === 'module.exports') {\n hasDefaultExport = true;\n magicString.overwrite(left.start, left.end, `var ${moduleName}`);\n } else {\n const [, name] = match;\n const deconflicted = deconflict(scope, globals, name);\n\n names.push({ name, deconflicted });\n\n magicString.overwrite(node.start, left.end, `var ${deconflicted}`);\n\n const declaration =\n name === deconflicted\n ? `export { ${name} };`\n : `export { ${deconflicted} as ${name} };`;\n\n if (name !== 'default') {\n namedExportDeclarations.push({\n str: declaration,\n name\n });\n delete namedExports[name];\n }\n\n defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);\n }\n }\n }\n\n if (!hasDefaultExport && (names.length || (!isEntry && !isEsModule))) {\n wrapperEnd = `\\n\\nvar ${moduleName} = {\\n${names\n .map(({ name, deconflicted }) => `\\t${name}: ${deconflicted}`)\n .join(',\\n')}\\n};`;\n }\n }\n\n Object.keys(namedExports)\n .filter((key) => !blacklist[key])\n .forEach(addExport);\n\n const defaultExport = /__esModule/.test(code)\n ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});`\n : `export default ${moduleName};`;\n\n const named = namedExportDeclarations\n .filter((x) => x.name !== 'default' || !hasDefaultExport)\n .map((x) => x.str);\n\n const exportBlock = `\\n\\n${(isEsModule ? [] : [defaultExport])\n .concat(named)\n .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])\n .join('\\n')}`;\n\n magicString\n .trim()\n .prepend(importBlock + wrapperStart)\n .trim()\n .append(wrapperEnd);\n\n const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry;\n if (injectExportBlock) {\n magicString.append(exportBlock);\n }\n\n code = magicString.toString();\n const map = sourceMap ? magicString.generateMap() : null;\n\n return { code, map, syntheticNamedExports: injectExportBlock };\n}\n","import { statSync } from 'fs';\n\nimport { resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './transform';\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(\n (path) => {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n }\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","/* eslint-disable no-undefined */\nconst isCjsPromises = new Map();\n\nexport function getIsCjsPromise(id) {\n let isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) return isCjsPromise.promise;\n\n const promise = new Promise((resolve) => {\n isCjsPromise = {\n resolve,\n promise: undefined\n };\n isCjsPromises.set(id, isCjsPromise);\n });\n isCjsPromise.promise = promise;\n\n return promise;\n}\n\nexport function setIsCjsPromise(id, resolution) {\n const isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) {\n if (isCjsPromise.resolve) {\n isCjsPromise.resolve(resolution);\n isCjsPromise.resolve = undefined;\n }\n } else {\n isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });\n }\n}\n","/* eslint-disable no-param-reassign, no-undefined */\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n getExternalProxyId,\n getIdFromProxyId,\n getProxyId,\n HELPERS_ID,\n PROXY_SUFFIX\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n function resolveId(importee, importer) {\n const isProxyModule = importee.endsWith(PROXY_SUFFIX);\n if (isProxyModule) {\n importee = getIdFromProxyId(importee);\n } else if (importee.startsWith('\\0')) {\n if (\n importee === HELPERS_ID ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n return null;\n }\n\n if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {\n return importee;\n }\n\n if (importer && importer.endsWith(PROXY_SUFFIX)) {\n importer = getIdFromProxyId(importer);\n }\n\n return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (isProxyModule) {\n if (!resolved) {\n return { id: getExternalProxyId(importee), external: false };\n }\n resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);\n resolved.external = false;\n return resolved;\n }\n return resolved;\n });\n }\n\n return resolveId;\n}\n","import { existsSync, readFileSync } from 'fs';\nimport { extname, join } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\n\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport getDynamicRequirePaths from './dynamic-require-paths';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_PREFIX,\n getVirtualPathForDynamicRequirePath,\n EXTERNAL_SUFFIX,\n getIdFromExternalProxyId,\n getIdFromProxyId,\n HELPERS,\n HELPERS_ID,\n HELPER_NON_DYNAMIC,\n HELPERS_DYNAMIC,\n PROXY_SUFFIX\n} from './helpers';\n\nimport { getIsCjsPromise, setIsCjsPromise } from './is-cjs';\nimport getResolveId from './resolve-id';\nimport {\n checkEsModule,\n normalizePathSlashes,\n hasCjsKeywords,\n transformCommonjs\n} from './transform';\nimport { getName } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const { ignoreGlobal } = options;\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithoutDefaultExport = new Set();\n const esModulesWithDefaultExport = new Set();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);\n\n const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));\n\n if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {\n (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);\n if (!options.transformMixedEsModules) {\n setIsCjsPromise(id, false);\n return null;\n }\n }\n // it is not an ES module AND it does not have CJS-specific elements.\n else if (!hasCjsKeywords(code, ignoreGlobal)) {\n esModulesWithoutDefaultExport.add(id);\n setIsCjsPromise(id, false);\n return null;\n }\n\n const transformed = transformCommonjs(\n this.parse,\n code,\n id,\n this.getModuleInfo(id).isEntry,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n ast\n );\n\n setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));\n\n if (!transformed) {\n if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);\n return null;\n }\n\n return transformed;\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n\n const [major, minor] = this.meta.rollupVersion.split('.').map(Number);\n const minVersion = peerDependencies.rollup.slice(2);\n const [minMajor, minMinor] = minVersion.split('.').map(Number);\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n this.error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n let code = HELPERS;\n\n // Do not bloat everyone's code with the module manager code\n if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;\n else code += HELPER_NON_DYNAMIC;\n\n return code;\n }\n\n // generate proxy modules\n if (id.endsWith(EXTERNAL_SUFFIX)) {\n const actualId = getIdFromExternalProxyId(id);\n const name = getName(actualId);\n\n if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID)\n // These do not export default\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n\n return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dir, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dir, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n code += `\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});\n});`;\n }\n return code;\n }\n\n let actualId = id;\n\n const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);\n if (isDynamicJson) {\n actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);\n }\n\n const normalizedPath = normalizePathSlashes(actualId);\n\n if (isDynamicJson) {\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n }\n\n if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {\n // Try our best to still export the module fully.\n // The commonjs polyfill should take care of circular references.\n\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n }\n\n if (actualId.endsWith(PROXY_SUFFIX)) {\n actualId = getIdFromProxyId(actualId);\n const name = getName(actualId);\n\n return getIsCjsPromise(actualId).then((isCjs) => {\n if (\n dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) &&\n !actualId.endsWith('.json')\n )\n return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir)\n )}); export default (${name} && ${name}['default']) || ${name}`;\n else if (isCjs)\n return `import { __moduleExports } from ${JSON.stringify(\n actualId\n )}; export default __moduleExports;`;\n else if (esModulesWithoutDefaultExport.has(actualId))\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n else if (esModulesWithDefaultExport.has(actualId)) {\n return `export {default} from ${JSON.stringify(actualId)};`;\n }\n return `import * as ${name} from ${JSON.stringify(\n actualId\n )}; import {getCjsExportFromNamespace} from \"${HELPERS_ID}\"; export default getCjsExportFromNamespace(${name})`;\n });\n }\n\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n let code;\n\n try {\n code = readFileSync(actualId, { encoding: 'utf8' });\n } catch (ex) {\n this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);\n return null;\n }\n\n let dynamicImports = Array.from(dynamicRequireModuleSet)\n .map((dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`)\n .join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID\n )});`;\n }\n\n code = `${dynamicImports}\\n${code}`;\n\n return code;\n }\n\n return null;\n },\n\n transform(code, id) {\n if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {\n if (!filter(id) || extensions.indexOf(extname(id)) === -1) {\n setIsCjsPromise(id, null);\n return null;\n }\n }\n\n let transformed;\n try {\n transformed = transformAndCheckExports.call(this, code, id);\n } catch (err) {\n transformed = null;\n setIsCjsPromise(id, false);\n this.error(err, err.loc);\n }\n\n return transformed;\n }\n };\n}\n"],"names":["operators","x","equals","left","right","not","isFalsy","argument","isTruthy","flatten","node","parts","type","computed","unshift","property","name","object","keypath","join","value","expression","operator","undefined","a","b","strict","PROXY_SUFFIX","getProxyId","id","getIdFromProxyId","proxyId","slice","length","EXTERNAL_SUFFIX","getExternalProxyId","getIdFromExternalProxyId","VIRTUAL_PATH_BASE","getVirtualPathForDynamicRequirePath","path","commonDir","startsWith","DYNAMIC_REGISTER_PREFIX","DYNAMIC_JSON_PREFIX","DYNAMIC_PACKAGES_ID","HELPERS_ID","HELPERS","HELPER_NON_DYNAMIC","HELPERS_DYNAMIC","getName","makeLegalIdentifier","basename","extname","segments","dirname","split","sep","reserved","blacklist","__esModule","forEach","word","exportsPattern","firstpassGlobal","firstpassNoGlobal","importExportDeclaration","functionType","deconflict","scope","globals","identifier","i","deconflicted","contains","has","declarations","tryParse","parse","code","allowReturnOutsideFunction","err","message","normalizePathSlashes","replace","hasCjsKeywords","ignoreGlobal","firstpass","test","checkEsModule","ast","isEsModule","body","hasDefaultExport","specifiers","specifier","exported","getDefinePropertyCallName","targetName","callee","arguments","target","val","transformCommonjs","isEntry","ignoreRequire","sourceMap","isDynamicRequireModulesEnabled","dynamicRequireModuleSet","astCache","magicString","MagicString","required","sources","uid","attachScopes","uses","module","exports","global","require","lexicalDepth","programDepth","Set","HELPERS_NAME","namedExports","shouldWrap","usesCommonjsHelpers","isRequireStatement","isRequireIdentifier","hasDynamicArguments","expressions","isStaticRequireStatement","isIgnoredRequireStatement","requiredNode","getRequireStringArg","quasis","cooked","getRequired","sourceId","isDynamicRegister","substr","existing","isDynamic","hasDynamicModuleForPath","endsWith","push","source","importsDefault","resolvedPath","nodeResolveSync","basedir","ex","attemptExt","resolve","shouldUseSimulatedRequire","assignedTo","walk","enter","extractAssignedNames","add","parent","addSourcemapLocation","start","end","consequent","skip","alternate","_skip","overwrite","storeName","flattened","isReference","appendLeft","JSON","stringify","match","exec","properties","prop","key","init","_shouldRemove","remove","leave","keepDeclaration","c","declarator","Object","keys","Error","importBlock","concat","map","filter","importProxy","namedExportDeclarations","wrapperStart","wrapperEnd","moduleName","exportModuleExports","str","addExport","declaration","defaultExportPropertyAssignments","args","names","defaultExport","named","exportBlock","trim","prepend","append","injectExportBlock","toString","generateMap","syntheticNamedExports","getDynamicRequirePaths","patterns","Array","isArray","pattern","isNegated","modifySet","prototype","bind","glob","sync","dynamicRequireModuleDirPaths","from","values","statSync","isDirectory","ignored","isCjsPromises","Map","getIsCjsPromise","isCjsPromise","get","promise","Promise","set","setIsCjsPromise","resolution","getCandidatesForExtension","resolved","extension","getCandidates","extensions","reduce","paths","getResolveId","resolveExtensions","importee","importer","candidates","stats","isFile","resolveId","isProxyModule","skipSelf","then","external","commonjs","options","createFilter","include","exclude","dynamicRequireTargets","size","getCommonDir","process","cwd","esModulesWithoutDefaultExport","esModulesWithDefaultExport","ignore","includes","transformAndCheckExports","isDynamicRequireModule","transformMixedEsModules","transformed","getModuleInfo","Boolean","buildStart","warn","meta","rollupVersion","Number","major","minor","minVersion","peerDependencies","rollup","minMajor","minMinor","error","load","actualId","dir","entryPoint","existsSync","readFileSync","encoding","main","isDynamicJson","normalizedPath","isCjs","dynamicImports","dynamicId","transform","indexOf","call","loc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,MAAMA,SAAS,GAAG;AAChB,QAAOC,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,KAAlB,CADH;AAGhB,QAAOH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,IAAD,CAAT,CAAgBC,CAAhB,CAAD,CAHA;AAKhB,SAAQA,CAAD,IAAOC,MAAM,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CAAf;AACA,iBAAO,IAAP;AACD;AACF;;AAED,UAAI0P,WAAJ;;AACA,UAAI;AACFA,QAAAA,WAAW,GAAGH,wBAAwB,CAACkC,IAAzB,CAA8B,IAA9B,EAAoCxO,IAApC,EAA0CjD,EAA1C,CAAd;AACD,OAFD,CAEE,OAAOmD,GAAP,EAAY;AACZuM,QAAAA,WAAW,GAAG,IAAd;AACAtC,QAAAA,eAAe,CAACpN,EAAD,EAAK,KAAL,CAAf;AACA,aAAKyQ,KAAL,CAAWtN,GAAX,EAAgBA,GAAG,CAACuO,GAApB;AACD;;AAED,aAAOhC,WAAP;AACD;;AA1KI,GAAP;AA4KD;;;;"}
\ No newline at end of file
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/package.json b/frontend/node_modules/@rollup/plugin-commonjs/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..ad77e7429a0b4a962135f3589af832c0c721b131
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "@rollup/plugin-commonjs",
+ "version": "12.0.0",
+ "publishConfig": {
+ "access": "public"
+ },
+ "description": "Convert CommonJS modules to ES2015",
+ "license": "MIT",
+ "repository": "rollup/plugins",
+ "author": "Rich Harris ",
+ "homepage": "https://github.com/rollup/plugins/tree/master/packages/commonjs/#readme",
+ "bugs": "https://github.com/rollup/plugins/issues",
+ "main": "dist/index.js",
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "scripts": {
+ "build": "rollup -c",
+ "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
+ "ci:lint": "pnpm run build && pnpm run lint",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
+ "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
+ "lint:docs": "prettier --single-quote --write README.md",
+ "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
+ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
+ "prebuild": "del-cli dist",
+ "prepare": "pnpm run build",
+ "prepublishOnly": "pnpm run lint && pnpm run test:ts",
+ "pretest": "pnpm run build",
+ "test": "ava",
+ "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
+ },
+ "files": [
+ "dist",
+ "types",
+ "README.md",
+ "LICENSE"
+ ],
+ "keywords": [
+ "rollup",
+ "plugin",
+ "npm",
+ "modules",
+ "commonjs",
+ "require"
+ ],
+ "peerDependencies": {
+ "rollup": "^2.3.4"
+ },
+ "dependencies": {
+ "@rollup/pluginutils": "^3.0.8",
+ "commondir": "^1.0.1",
+ "estree-walker": "^1.0.1",
+ "glob": "^7.1.2",
+ "is-reference": "^1.1.2",
+ "magic-string": "^0.25.2",
+ "resolve": "^1.11.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.9.0",
+ "@babel/preset-env": "^7.9.0",
+ "@babel/register": "^7.9.0",
+ "@rollup/plugin-json": "^4.0.1",
+ "@rollup/plugin-node-resolve": "^7.0.0",
+ "acorn": "^7.1.1",
+ "locate-character": "^2.0.5",
+ "prettier": "^1.19.1",
+ "require-relative": "^0.8.7",
+ "rollup": "^2.3.4",
+ "rollup-plugin-babel": "^4.3.3",
+ "shx": "^0.3.2",
+ "source-map": "^0.6.1",
+ "source-map-support": "^0.5.16",
+ "typescript": "^3.7.4"
+ },
+ "ava": {
+ "files": [
+ "!**/fixtures/**",
+ "!**/helpers/**",
+ "!**/recipes/**",
+ "!**/types.ts"
+ ]
+ },
+ "module": "dist/index.es.js",
+ "types": "types/index.d.ts"
+}
diff --git a/frontend/node_modules/@rollup/plugin-commonjs/types/index.d.ts b/frontend/node_modules/@rollup/plugin-commonjs/types/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1b124fdd279466247a0a46e47a1f9fb6f8ebd08b
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-commonjs/types/index.d.ts
@@ -0,0 +1,69 @@
+import { FilterPattern } from '@rollup/pluginutils';
+import { Plugin } from 'rollup';
+
+interface RollupCommonJSOptions {
+ /**
+ * non-CommonJS modules will be ignored, but you can also
+ * specifically include/exclude files
+ * @default undefined
+ */
+ include?: FilterPattern;
+ /**
+ * non-CommonJS modules will be ignored, but you can also
+ * specifically include/exclude files
+ * @default undefined
+ */
+ exclude?: FilterPattern;
+ /**
+ * search for files other than .js files (must already
+ * be transpiled by a previous plugin!)
+ * @default [ '.js' ]
+ */
+ extensions?: ReadonlyArray;
+ /**
+ * if true then uses of `global` won't be dealt with by this plugin
+ * @default false
+ */
+ ignoreGlobal?: boolean;
+ /**
+ * if false then skip sourceMap generation for CommonJS modules
+ * @default true
+ */
+ sourceMap?: boolean;
+ /**
+ * Instructs the plugin whether or not to enable mixed module transformations. This is useful in scenarios with mixed ES and CommonJS modules. Set to `true` if it's known that `require` calls should be transformed, or `false` if the code contains env detection and the `require` should survive a transformation.
+ * @default false
+ */
+ transformMixedEsModules?: boolean;
+ /**
+ * explicitly specify unresolvable named exports
+ * ([see below for more details](https://github.com/rollup/plugins/tree/master/packages/commonjs#named-exports))
+ * @default undefined
+ */
+ namedExports?: { [package: string]: ReadonlyArray };
+ /**
+ * sometimes you have to leave require statements
+ * unconverted. Pass an array containing the IDs
+ * or a `id => boolean` function. Only use this
+ * option if you know what you're doing!
+ */
+ ignore?: ReadonlyArray boolean)>;
+ /**
+ * Some modules contain dynamic `require` calls, or require modules that contain
+ * circular dependencies, which are not handled well by static imports.
+ * Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like)
+ * environment for them with support for dynamic and circular dependencies.
+ *
+ * Note: In extreme cases, this feature may result in some paths being rendered as
+ * absolute in the final bundle. The plugin tries to avoid exposing paths from
+ * the local machine, but if you are `dynamicRequirePaths` with paths that are
+ * far away from your project's folder, that may require replacing strings
+ * like `"/Users/John/Desktop/foo-project/"` -> `"/"`.
+ */
+ dynamicRequireTargets?: string | ReadonlyArray;
+}
+
+/**
+ * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
+ */
+export default function commonjs(options?: RollupCommonJSOptions): Plugin;
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md b/frontend/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..607c4caff31864d5cc4741f6cf56573db5bc386a
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md
@@ -0,0 +1,345 @@
+# @rollup/plugin-node-resolve ChangeLog
+
+## v8.4.0
+
+_2020-07-12_
+
+### Features
+
+- feat: preserve search params and hashes (#487)
+- feat: support .js imports in TypeScript (#480)
+
+### Updates
+
+- docs: fix named export use in readme (#456)
+- docs: correct mainFields valid values (#469)
+
+## v8.3.0
+
+_2020-07-12_
+
+### Features
+
+- feat: preserve search params and hashes (#487)
+- feat: support .js imports in TypeScript (#480)
+
+### Updates
+
+- docs: fix named export use in readme (#456)
+- docs: correct mainFields valid values (#469)
+
+## v8.2.0
+
+_2020-07-12_
+
+### Features
+
+- feat: preserve search params and hashes (#487)
+- feat: support .js imports in TypeScript (#480)
+
+### Updates
+
+- docs: fix named export use in readme (#456)
+- docs: correct mainFields valid values (#469)
+
+## v8.1.0
+
+_2020-06-22_
+
+### Features
+
+- feat: add native node es modules support (#413)
+
+## v8.0.1
+
+_2020-06-05_
+
+### Bugfixes
+
+- fix: handle nested entry modules with the resolveOnly option (#430)
+
+## v8.0.0
+
+_2020-05-20_
+
+### Breaking Changes
+
+- feat: Add default export (#361)
+- feat: export defaults (#301)
+
+### Bugfixes
+
+- fix: resolve local files if `resolveOption` is set (#337)
+
+### Updates
+
+- docs: correct misspelling (#343)
+
+## v7.1.3
+
+_2020-04-12_
+
+### Bugfixes
+
+- fix: resolve symlinked entry point properly (#291)
+
+## v7.1.2
+
+_2020-04-12_
+
+### Updates
+
+- docs: fix url (#289)
+
+## v7.1.1
+
+_2020-02-03_
+
+### Bugfixes
+
+- fix: main fields regression (#196)
+
+## v7.1.0
+
+_2020-02-01_
+
+### Updates
+
+- refactor: clean codebase and fix external warnings (#155)
+
+## v7.0.0
+
+_2020-01-07_
+
+### Breaking Changes
+
+- feat: dedupe by package name (#99)
+
+## v6.1.0
+
+_2020-01-04_
+
+### Bugfixes
+
+- fix: allow deduplicating custom module dirs (#101)
+
+### Features
+
+- feat: add rootDir option (#98)
+
+### Updates
+
+- docs: improve doc related to mainFields (#138)
+
+## 6.0.0
+
+_2019-11-25_
+
+- **Breaking:** Minimum compatible Rollup version is 1.20.0
+- **Breaking:** Minimum supported Node version is 8.0.0
+- Published as @rollup/plugin-node-resolve
+
+## 5.2.1 (unreleased)
+
+- add missing MIT license file ([#233](https://github.com/rollup/rollup-plugin-node-resolve/pull/233) by @kenjiO)
+- Fix incorrect example of config ([#239](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @myshov)
+- Fix typo in readme ([#240](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @LinusU)
+
+## 5.2.0 (2019-06-29)
+
+- dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat)
+
+## 5.1.1 (2019-06-29)
+
+- Move Rollup version check to buildStart hook to avoid issues ([#232](https://github.com/rollup/rollup-plugin-node-resolve/pull/232) by @lukastaegert)
+
+## 5.1.0 (2019-06-22)
+
+- Fix path fragment inputs ([#229](https://github.com/rollup/rollup-plugin-node-resolve/pull/229) by @bterlson)
+
+## 5.0.4 (2019-06-22)
+
+- Treat sideEffects array as inclusion list ([#227](https://github.com/rollup/rollup-plugin-node-resolve/pull/227) by @mikeharder)
+
+## 5.0.3 (2019-06-16)
+
+- Make empty.js a virtual module ([#224](https://github.com/rollup/rollup-plugin-node-resolve/pull/224) by @manucorporat)
+
+## 5.0.2 (2019-06-13)
+
+- Support resolve 1.11.1, add built-in test ([#223](https://github.com/rollup/rollup-plugin-node-resolve/pull/223) by @bterlson)
+
+## 5.0.1 (2019-05-31)
+
+- Update to resolve@1.11.0 for better performance ([#220](https://github.com/rollup/rollup-plugin-node-resolve/pull/220) by @keithamus)
+
+## 5.0.0 (2019-05-15)
+
+- Replace bublé with babel, update dependencies ([#216](https://github.com/rollup/rollup-plugin-node-resolve/pull/216) by @mecurc)
+- Handle module side-effects ([#219](https://github.com/rollup/rollup-plugin-node-resolve/pull/219) by @lukastaegert)
+
+### Breaking Changes
+
+- Requires at least rollup@1.11.0 to work (v1.12.0 for module side-effects to be respected)
+- If used with rollup-plugin-commonjs, it should be at least v10.0.0
+
+## 4.2.4 (2019-05-11)
+
+- Add note on builtins to Readme ([#215](https://github.com/rollup/rollup-plugin-node-resolve/pull/215) by @keithamus)
+- Add issue templates ([#217](https://github.com/rollup/rollup-plugin-node-resolve/pull/217) by @mecurc)
+- Improve performance by caching `isDir` ([#218](https://github.com/rollup/rollup-plugin-node-resolve/pull/218) by @keithamus)
+
+## 4.2.3 (2019-04-11)
+
+- Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert)
+
+## 4.2.2 (2019-04-10)
+
+- Fix TypeScript typings (rename and export Options interface) ([#206](https://github.com/rollup/rollup-plugin-node-resolve/pull/206) by @Kocal)
+- Fix mainfields typing ([#207](https://github.com/rollup/rollup-plugin-node-resolve/pull/207) by @nicolashenry)
+
+## 4.2.1 (2019-04-06)
+
+- Respect setting the deprecated fields "module", "main", and "jsnext" ([#204](https://github.com/rollup/rollup-plugin-node-resolve/pull/204) by @nick-woodward)
+
+## 4.2.0 (2019-04-06)
+
+- Add new mainfields option ([#182](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @keithamus)
+- Added dedupe option to prevent bundling the same package multiple times ([#201](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @sormy)
+
+## 4.1.0 (2019-04-05)
+
+- Add TypeScript typings ([#189](https://github.com/rollup/rollup-plugin-node-resolve/pull/189) by @NotWoods)
+- Update dependencies ([#202](https://github.com/rollup/rollup-plugin-node-resolve/pull/202) by @lukastaegert)
+
+## 4.0.1 (2019-02-22)
+
+- Fix issue when external modules are specified in `package.browser` ([#143](https://github.com/rollup/rollup-plugin-node-resolve/pull/143) by @keithamus)
+- Fix `package.browser` mapping issue when `false` is specified ([#183](https://github.com/rollup/rollup-plugin-node-resolve/pull/183) by @allex)
+
+## 4.0.0 (2018-12-09)
+
+This release will support rollup@1.0
+
+### Features
+
+- Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman)
+- Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert)
+
+## 3.4.0 (2018-09-04)
+
+This release now supports `.mjs` files by default
+
+### Features
+
+- feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron)
+
+## 3.3.0 (2018-03-17)
+
+This release adds the `only` option
+
+### New Features
+
+- feat: add `only` option (#83; @arantes555)
+
+### Docs
+
+- docs: correct description of `jail` option (#120; @GeorgeTaveras1231)
+
+## 3.2.0 (2018-03-07)
+
+This release caches reading/statting of files, to improve speed.
+
+### Performance Improvements
+
+- perf: cache file stats/reads (#126; @keithamus)
+
+## 3.0.4 (unreleased)
+
+- Update lockfile [#137](https://github.com/rollup/rollup-plugin-node-resolve/issues/137)
+- Update rollup dependency [#138](https://github.com/rollup/rollup-plugin-node-resolve/issues/138)
+- Enable installation from Github [#142](https://github.com/rollup/rollup-plugin-node-resolve/issues/142)
+
+## 3.0.3
+
+- Fix [#130](https://github.com/rollup/rollup-plugin-node-resolve/issues/130) and [#131](https://github.com/rollup/rollup-plugin-node-resolve/issues/131)
+
+## 3.0.2
+
+- Ensure `pkg.browser` is an object if necessary ([#129](https://github.com/rollup/rollup-plugin-node-resolve/pull/129))
+
+## 3.0.1
+
+- Remove `browser-resolve` dependency ([#127](https://github.com/rollup/rollup-plugin-node-resolve/pull/127))
+
+## 3.0.0
+
+- [BREAKING] Remove `options.skip` ([#90](https://github.com/rollup/rollup-plugin-node-resolve/pull/90))
+- Add `modulesOnly` option ([#96](https://github.com/rollup/rollup-plugin-node-resolve/pull/96))
+
+## 2.1.1
+
+- Prevent `jail` from breaking builds on Windows ([#93](https://github.com/rollup/rollup-plugin-node-resolve/issues/93))
+
+## 2.1.0
+
+- Add `jail` option ([#53](https://github.com/rollup/rollup-plugin-node-resolve/pull/53))
+- Add `customResolveOptions` option ([#79](https://github.com/rollup/rollup-plugin-node-resolve/pull/79))
+- Support symlinked packages ([#82](https://github.com/rollup/rollup-plugin-node-resolve/pull/82))
+
+## 2.0.0
+
+- Add support `module` field in package.json as an official alternative to jsnext
+
+## 1.7.3
+
+- Error messages are more descriptive ([#50](https://github.com/rollup/rollup-plugin-node-resolve/issues/50))
+
+## 1.7.2
+
+- Allow entry point paths beginning with ./
+
+## 1.7.1
+
+- Return a `name`
+
+## 1.7.0
+
+- Allow relative IDs to be external ([#32](https://github.com/rollup/rollup-plugin-node-resolve/pull/32))
+
+## 1.6.0
+
+- Skip IDs containing null character
+
+## 1.5.0
+
+- Prefer built-in options, but allow opting out ([#28](https://github.com/rollup/rollup-plugin-node-resolve/pull/28))
+
+## 1.4.0
+
+- Pass `options.extensions` through to `node-resolve`
+
+## 1.3.0
+
+- `skip: true` skips all packages that don't satisfy the `main` or `jsnext` options ([#16](https://github.com/rollup/rollup-plugin-node-resolve/pull/16))
+
+## 1.2.1
+
+- Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-node-resolve/issues/15))
+
+## 1.2.0
+
+- Support `browser` field ([#8](https://github.com/rollup/rollup-plugin-node-resolve/issues/8))
+- Get tests to pass on Windows
+
+## 1.1.0
+
+- Use node-resolve to handle various corner cases
+
+## 1.0.0
+
+- Add ES6 build, use Rollup 0.20.0
+
+## 0.1.0
+
+- First release
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/LICENSE b/frontend/node_modules/@rollup/plugin-node-resolve/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/README.md b/frontend/node_modules/@rollup/plugin-node-resolve/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..9f093239ebb5d82635ee71d26bb6e808c93f9658
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/README.md
@@ -0,0 +1,194 @@
+[npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve
+[npm-url]: https://www.npmjs.com/package/@rollup/plugin-node-resolve
+[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-node-resolve
+[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-node-resolve
+
+[![npm][npm]][npm-url]
+[![size][size]][size-url]
+[](https://liberamanifesto.com)
+
+# @rollup/plugin-node-resolve
+
+🍣 A Rollup plugin which locates modules using the [Node resolution algorithm](https://nodejs.org/api/modules.html#modules_all_together), for using third party modules in `node_modules`
+
+## Requirements
+
+This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
+
+## Install
+
+Using npm:
+
+```console
+npm install @rollup/plugin-node-resolve --save-dev
+```
+
+## Usage
+
+Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
+
+```js
+import { nodeResolve } from '@rollup/plugin-node-resolve';
+
+export default {
+ input: 'src/index.js',
+ output: {
+ dir: 'output',
+ format: 'cjs'
+ },
+ plugins: [nodeResolve()]
+};
+```
+
+Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
+
+## Options
+
+### `browser`
+
+Type: `Boolean`
+Default: `false`
+
+If `true`, instructs the plugin to use the `"browser"` property in `package.json` files to specify alternative files to load for bundling. This is useful when bundling for a browser environment. Alternatively, a value of `'browser'` can be added to the `mainFields` option. If `false`, any `"browser"` properties in package files will be ignored. This option takes precedence over `mainFields`.
+
+### `customResolveOptions`
+
+Type: `Object`
+Default: `null`
+
+An `Object` that specifies additional options that should be passed through to [`resolve`](https://www.npmjs.com/package/resolve).
+
+```
+customResolveOptions: {
+ moduleDirectory: 'js_modules'
+}
+```
+
+### `dedupe`
+
+Type: `Array[...String]`
+Default: `[]`
+
+An `Array` of modules names, which instructs the plugin to force resolving for the specified modules to the root `node_modules`. Helps to prevent bundling the same package multiple times if package is imported from dependencies.
+
+```js
+dedupe: ['my-package', '@namespace/my-package'];
+```
+
+This will deduplicate bare imports such as:
+
+```js
+import 'my-package';
+import '@namespace/my-package';
+```
+
+And it will deduplicate deep imports such as:
+
+```js
+import 'my-package/foo.js';
+import '@namespace/my-package/bar.js';
+```
+
+### `extensions`
+
+Type: `Array[...String]`
+Default: `['.mjs', '.js', '.json', '.node']`
+
+Specifies the extensions of files that the plugin will operate on.
+
+### `jail`
+
+Type: `String`
+Default: `'/'`
+
+Locks the module search within specified path (e.g. chroot). Modules defined outside this path will be marked as external.
+
+### `mainFields`
+
+Type: `Array[...String]`
+Default: `['module', 'main']`
+Valid values: `['browser', 'jsnext:main', 'module', 'main']`
+
+Specifies the properties to scan within a `package.json`, used to determine the bundle entry point. The order of property names is significant, as the first-found property is used as the resolved entry point. If the array contains `'browser'`, key/values specified in the `package.json` `browser` property will be used.
+
+### `only`
+
+DEPRECATED: use "resolveOnly" instead
+
+### `preferBuiltins`
+
+Type: `Boolean`
+Default: `true`
+
+If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, the plugin will look for locally installed modules of the same name.
+
+### `modulesOnly`
+
+Type: `Boolean`
+Default: `false`
+
+If `true`, inspect resolved files to assert that they are ES2015 modules.
+
+### `resolveOnly`
+
+Type: `Array[...String|RegExp]`
+Default: `null`
+
+An `Array` which instructs the plugin to limit module resolution to those whose names match patterns in the array. _Note: Modules not matching any patterns will be marked as external._
+
+Example: `resolveOnly: ['batman', /^@batcave\/.*$/]`
+
+### `rootDir`
+
+Type: `String`
+Default: `process.cwd()`
+
+Specifies the root directory from which to resolve modules. Typically used when resolving entry-point imports, and when resolving deduplicated modules. Useful when executing rollup in a package of a mono-repository.
+
+```
+// Set the root directory to be the parent folder
+rootDir: path.join(process.cwd(), '..')
+```
+
+## Using with @rollup/plugin-commonjs
+
+Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs):
+
+```js
+// rollup.config.js
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+
+export default {
+ input: 'main.js',
+ output: {
+ file: 'bundle.js',
+ format: 'iife',
+ name: 'MyModule'
+ },
+ plugins: [resolve(), commonjs()]
+};
+```
+
+## Resolving Built-Ins (like `fs`)
+
+This plugin won't resolve any builtins (e.g. `fs`). If you need to resolve builtins you can install local modules and set `preferBuiltins` to `false`, or install a plugin like [rollup-plugin-node-polyfills](https://github.com/ionic-team/rollup-plugin-node-polyfills) which provides stubbed versions of these methods.
+
+If you want to silence warnings about builtins, you can add the list of builtins to the `externals` option; like so:
+
+```js
+import resolve from '@rollup/plugin-node-resolve';
+import builtins from 'builtin-modules'
+export default ({
+ input: ...,
+ plugins: [resolve()],
+ external: builtins,
+ output: ...
+})
+```
+
+## Meta
+
+[CONTRIBUTING](/.github/CONTRIBUTING.md)
+
+[LICENSE (MIT)](/LICENSE)
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js b/frontend/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d8a288e6cbc9c0591d856c250b25af7be1d3d057
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js
@@ -0,0 +1,717 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var path = require('path');
+var builtinList = _interopDefault(require('builtin-modules'));
+var deepFreeze = _interopDefault(require('deep-freeze'));
+var deepMerge = _interopDefault(require('deepmerge'));
+var isModule = _interopDefault(require('is-module'));
+var fs = require('fs');
+var fs__default = _interopDefault(fs);
+var util = require('util');
+var pluginutils = require('@rollup/pluginutils');
+var resolveModule = _interopDefault(require('resolve'));
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+}
+
+function _asyncToGenerator(fn) {
+ return function () {
+ var self = this,
+ args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+}
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+}
+
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(n);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+}
+
+function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+function _createForOfIteratorHelper(o) {
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
+ var i = 0;
+
+ var F = function () {};
+
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var it,
+ normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = o[Symbol.iterator]();
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+}
+
+const exists = util.promisify(fs__default.exists);
+const readFile = util.promisify(fs__default.readFile);
+const realpath = util.promisify(fs__default.realpath);
+const stat = util.promisify(fs__default.stat);
+
+const onError = error => {
+ if (error.code === 'ENOENT') {
+ return false;
+ }
+
+ throw error;
+};
+
+const makeCache = fn => {
+ const cache = new Map();
+
+ const wrapped = /*#__PURE__*/function () {
+ var _ref = _asyncToGenerator(function* (param, done) {
+ if (cache.has(param) === false) {
+ cache.set(param, fn(param).catch(err => {
+ cache.delete(param);
+ throw err;
+ }));
+ }
+
+ try {
+ const result = cache.get(param);
+ const value = yield result;
+ return done(null, value);
+ } catch (error) {
+ return done(error);
+ }
+ });
+
+ return function wrapped(_x, _x2) {
+ return _ref.apply(this, arguments);
+ };
+ }();
+
+ wrapped.clear = () => cache.clear();
+
+ return wrapped;
+};
+
+const isDirCached = makeCache( /*#__PURE__*/function () {
+ var _ref2 = _asyncToGenerator(function* (file) {
+ try {
+ const stats = yield stat(file);
+ return stats.isDirectory();
+ } catch (error) {
+ return onError(error);
+ }
+ });
+
+ return function (_x3) {
+ return _ref2.apply(this, arguments);
+ };
+}());
+const isFileCached = makeCache( /*#__PURE__*/function () {
+ var _ref3 = _asyncToGenerator(function* (file) {
+ try {
+ const stats = yield stat(file);
+ return stats.isFile();
+ } catch (error) {
+ return onError(error);
+ }
+ });
+
+ return function (_x4) {
+ return _ref3.apply(this, arguments);
+ };
+}());
+const readCachedFile = makeCache(readFile);
+
+const resolveId = util.promisify(resolveModule); // returns the imported package name for bare module imports
+
+function getPackageName(id) {
+ if (id.startsWith('.') || id.startsWith('/')) {
+ return null;
+ }
+
+ const split = id.split('/'); // @my-scope/my-package/foo.js -> @my-scope/my-package
+ // @my-scope/my-package -> @my-scope/my-package
+
+ if (split[0][0] === '@') {
+ return `${split[0]}/${split[1]}`;
+ } // my-package/foo.js -> my-package
+ // my-package -> my-package
+
+
+ return split[0];
+}
+function getMainFields(options) {
+ let mainFields;
+
+ if (options.mainFields) {
+ mainFields = options.mainFields;
+ } else {
+ mainFields = ['module', 'main'];
+ }
+
+ if (options.browser && mainFields.indexOf('browser') === -1) {
+ return ['browser'].concat(mainFields);
+ }
+
+ if (!mainFields.length) {
+ throw new Error('Please ensure at least one `mainFields` value is specified');
+ }
+
+ return mainFields;
+}
+function getPackageInfo(options) {
+ const cache = options.cache,
+ extensions = options.extensions,
+ pkg = options.pkg,
+ mainFields = options.mainFields,
+ preserveSymlinks = options.preserveSymlinks,
+ useBrowserOverrides = options.useBrowserOverrides;
+ let pkgPath = options.pkgPath;
+
+ if (cache.has(pkgPath)) {
+ return cache.get(pkgPath);
+ } // browserify/resolve doesn't realpath paths returned in its packageFilter callback
+
+
+ if (!preserveSymlinks) {
+ pkgPath = fs.realpathSync(pkgPath);
+ }
+
+ const pkgRoot = path.dirname(pkgPath);
+ const packageInfo = {
+ // copy as we are about to munge the `main` field of `pkg`.
+ packageJson: Object.assign({}, pkg),
+ // path to package.json file
+ packageJsonPath: pkgPath,
+ // directory containing the package.json
+ root: pkgRoot,
+ // which main field was used during resolution of this module (main, module, or browser)
+ resolvedMainField: 'main',
+ // whether the browser map was used to resolve the entry point to this module
+ browserMappedMain: false,
+ // the entry point of the module with respect to the selected main field and any
+ // relevant browser mappings.
+ resolvedEntryPoint: ''
+ };
+ let overriddenMain = false;
+
+ for (let i = 0; i < mainFields.length; i++) {
+ const field = mainFields[i];
+
+ if (typeof pkg[field] === 'string') {
+ pkg.main = pkg[field];
+ packageInfo.resolvedMainField = field;
+ overriddenMain = true;
+ break;
+ }
+ }
+
+ const internalPackageInfo = {
+ cachedPkg: pkg,
+ hasModuleSideEffects: () => null,
+ hasPackageEntry: overriddenMain !== false || mainFields.indexOf('main') !== -1,
+ packageBrowserField: useBrowserOverrides && typeof pkg.browser === 'object' && Object.keys(pkg.browser).reduce((browser, key) => {
+ let resolved = pkg.browser[key];
+
+ if (resolved && resolved[0] === '.') {
+ resolved = path.resolve(pkgRoot, resolved);
+ }
+ /* eslint-disable no-param-reassign */
+
+
+ browser[key] = resolved;
+
+ if (key[0] === '.') {
+ const absoluteKey = path.resolve(pkgRoot, key);
+ browser[absoluteKey] = resolved;
+
+ if (!path.extname(key)) {
+ extensions.reduce((subBrowser, ext) => {
+ subBrowser[absoluteKey + ext] = subBrowser[key];
+ return subBrowser;
+ }, browser);
+ }
+ }
+
+ return browser;
+ }, {}),
+ packageInfo
+ };
+ const browserMap = internalPackageInfo.packageBrowserField;
+
+ if (useBrowserOverrides && typeof pkg.browser === 'object' && // eslint-disable-next-line no-prototype-builtins
+ browserMap.hasOwnProperty(pkg.main)) {
+ packageInfo.resolvedEntryPoint = browserMap[pkg.main];
+ packageInfo.browserMappedMain = true;
+ } else {
+ // index.node is technically a valid default entrypoint as well...
+ packageInfo.resolvedEntryPoint = path.resolve(pkgRoot, pkg.main || 'index.js');
+ packageInfo.browserMappedMain = false;
+ }
+
+ const packageSideEffects = pkg.sideEffects;
+
+ if (typeof packageSideEffects === 'boolean') {
+ internalPackageInfo.hasModuleSideEffects = () => packageSideEffects;
+ } else if (Array.isArray(packageSideEffects)) {
+ internalPackageInfo.hasModuleSideEffects = pluginutils.createFilter(packageSideEffects, null, {
+ resolve: pkgRoot
+ });
+ }
+
+ cache.set(pkgPath, internalPackageInfo);
+ return internalPackageInfo;
+}
+function normalizeInput(input) {
+ if (Array.isArray(input)) {
+ return input;
+ } else if (typeof input === 'object') {
+ return Object.values(input);
+ } // otherwise it's a string
+
+
+ return [input];
+} // Resolve module specifiers in order. Promise resolves to the first module that resolves
+// successfully, or the error that resulted from the last attempted module resolution.
+
+function resolveImportSpecifiers(importSpecifierList, resolveOptions) {
+ let promise = Promise.resolve();
+
+ for (let i = 0; i < importSpecifierList.length; i++) {
+ promise = promise.then(value => {
+ // if we've already resolved to something, just return it.
+ if (value) {
+ return value;
+ }
+
+ return resolveId(importSpecifierList[i], resolveOptions).then(result => {
+ if (!resolveOptions.preserveSymlinks) {
+ result = fs.realpathSync(result);
+ }
+
+ return result;
+ });
+ });
+
+ if (i < importSpecifierList.length - 1) {
+ // swallow MODULE_NOT_FOUND errors from all but the last resolution
+ promise = promise.catch(error => {
+ if (error.code !== 'MODULE_NOT_FOUND') {
+ throw error;
+ }
+ });
+ }
+ }
+
+ return promise;
+}
+
+const builtins = new Set(builtinList);
+const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
+
+const nullFn = () => null;
+
+const defaults = {
+ customResolveOptions: {},
+ dedupe: [],
+ // It's important that .mjs is listed before .js so that Rollup will interpret npm modules
+ // which deploy both ESM .mjs and CommonJS .js files as ESM.
+ extensions: ['.mjs', '.js', '.json', '.node'],
+ resolveOnly: []
+};
+const DEFAULTS = deepFreeze(deepMerge({}, defaults));
+function nodeResolve(opts = {}) {
+ const options = Object.assign({}, defaults, opts);
+ const customResolveOptions = options.customResolveOptions,
+ extensions = options.extensions,
+ jail = options.jail;
+ const warnings = [];
+ const packageInfoCache = new Map();
+ const idToPackageInfo = new Map();
+ const mainFields = getMainFields(options);
+ const useBrowserOverrides = mainFields.indexOf('browser') !== -1;
+ const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false;
+ const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true;
+ const rootDir = options.rootDir || process.cwd();
+ let dedupe = options.dedupe;
+ let rollupOptions;
+
+ if (options.only) {
+ warnings.push('node-resolve: The `only` options is deprecated, please use `resolveOnly`');
+ options.resolveOnly = options.only;
+ }
+
+ if (typeof dedupe !== 'function') {
+ dedupe = importee => options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
+ }
+
+ const resolveOnly = options.resolveOnly.map(pattern => {
+ if (pattern instanceof RegExp) {
+ return pattern;
+ }
+
+ const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+ return new RegExp(`^${normalized}$`);
+ });
+ const browserMapCache = new Map();
+ let preserveSymlinks;
+ return {
+ name: 'node-resolve',
+
+ buildStart(options) {
+ rollupOptions = options;
+
+ var _iterator = _createForOfIteratorHelper(warnings),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const warning = _step.value;
+ this.warn(warning);
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ preserveSymlinks = options.preserveSymlinks;
+ },
+
+ generateBundle() {
+ readCachedFile.clear();
+ isFileCached.clear();
+ isDirCached.clear();
+ },
+
+ resolveId(importee, importer) {
+ var _this = this;
+
+ return _asyncToGenerator(function* () {
+ if (importee === ES6_BROWSER_EMPTY) {
+ return importee;
+ } // ignore IDs with null character, these belong to other plugins
+
+
+ if (/\0/.test(importee)) return null; // strip hash and query params from import
+
+ const _importee$split = importee.split('#'),
+ _importee$split2 = _slicedToArray(_importee$split, 2),
+ withoutHash = _importee$split2[0],
+ hash = _importee$split2[1];
+
+ const _withoutHash$split = withoutHash.split('?'),
+ _withoutHash$split2 = _slicedToArray(_withoutHash$split, 2),
+ importPath = _withoutHash$split2[0],
+ params = _withoutHash$split2[1];
+
+ const importSuffix = `${params ? `?${params}` : ''}${hash ? `#${hash}` : ''}`;
+ importee = importPath;
+ const basedir = !importer || dedupe(importee) ? rootDir : path.dirname(importer); // https://github.com/defunctzombie/package-browser-field-spec
+
+ const browser = browserMapCache.get(importer);
+
+ if (useBrowserOverrides && browser) {
+ const resolvedImportee = path.resolve(basedir, importee);
+
+ if (browser[importee] === false || browser[resolvedImportee] === false) {
+ return ES6_BROWSER_EMPTY;
+ }
+
+ const browserImportee = browser[importee] || browser[resolvedImportee] || browser[`${resolvedImportee}.js`] || browser[`${resolvedImportee}.json`];
+
+ if (browserImportee) {
+ importee = browserImportee;
+ }
+ }
+
+ const parts = importee.split(/[/\\]/);
+ let id = parts.shift();
+ let isRelativeImport = false;
+
+ if (id[0] === '@' && parts.length > 0) {
+ // scoped packages
+ id += `/${parts.shift()}`;
+ } else if (id[0] === '.') {
+ // an import relative to the parent dir of the importer
+ id = path.resolve(basedir, importee);
+ isRelativeImport = true;
+ }
+
+ if (!isRelativeImport && resolveOnly.length && !resolveOnly.some(pattern => pattern.test(id))) {
+ if (normalizeInput(rollupOptions.input).includes(importee)) {
+ return null;
+ }
+
+ return false;
+ }
+
+ let hasModuleSideEffects = nullFn;
+ let hasPackageEntry = true;
+ let packageBrowserField = false;
+ let packageInfo;
+
+ const filter = (pkg, pkgPath) => {
+ const info = getPackageInfo({
+ cache: packageInfoCache,
+ extensions,
+ pkg,
+ pkgPath,
+ mainFields,
+ preserveSymlinks,
+ useBrowserOverrides
+ });
+ packageInfo = info.packageInfo;
+ hasModuleSideEffects = info.hasModuleSideEffects;
+ hasPackageEntry = info.hasPackageEntry;
+ packageBrowserField = info.packageBrowserField;
+ return info.cachedPkg;
+ };
+
+ let resolveOptions = {
+ basedir,
+ packageFilter: filter,
+ readFile: readCachedFile,
+ isFile: isFileCached,
+ isDirectory: isDirCached,
+ extensions
+ };
+
+ if (preserveSymlinks !== undefined) {
+ resolveOptions.preserveSymlinks = preserveSymlinks;
+ }
+
+ const importSpecifierList = [];
+
+ if (importer === undefined && !importee[0].match(/^\.?\.?\//)) {
+ // For module graph roots (i.e. when importer is undefined), we
+ // need to handle 'path fragments` like `foo/bar` that are commonly
+ // found in rollup config files. If importee doesn't look like a
+ // relative or absolute path, we make it relative and attempt to
+ // resolve it. If we don't find anything, we try resolving it as we
+ // got it.
+ importSpecifierList.push(`./${importee}`);
+ }
+
+ const importeeIsBuiltin = builtins.has(importee);
+
+ if (importeeIsBuiltin && (!preferBuiltins || !isPreferBuiltinsSet)) {
+ // The `resolve` library will not resolve packages with the same
+ // name as a node built-in module. If we're resolving something
+ // that's a builtin, and we don't prefer to find built-ins, we
+ // first try to look up a local module with that name. If we don't
+ // find anything, we resolve the builtin which just returns back
+ // the built-in's name.
+ importSpecifierList.push(`${importee}/`);
+ } // TypeScript files may import '.js' to refer to either '.ts' or '.tsx'
+
+
+ if (importer && importee.endsWith('.js')) {
+ for (var _i = 0, _arr = ['.ts', '.tsx']; _i < _arr.length; _i++) {
+ const ext = _arr[_i];
+
+ if (importer.endsWith(ext) && extensions.includes(ext)) {
+ importSpecifierList.push(importee.replace(/.js$/, ext));
+ }
+ }
+ }
+
+ importSpecifierList.push(importee);
+ resolveOptions = Object.assign(resolveOptions, customResolveOptions);
+
+ try {
+ let resolved = yield resolveImportSpecifiers(importSpecifierList, resolveOptions);
+
+ if (resolved && packageBrowserField) {
+ if (Object.prototype.hasOwnProperty.call(packageBrowserField, resolved)) {
+ if (!packageBrowserField[resolved]) {
+ browserMapCache.set(resolved, packageBrowserField);
+ return ES6_BROWSER_EMPTY;
+ }
+
+ resolved = packageBrowserField[resolved];
+ }
+
+ browserMapCache.set(resolved, packageBrowserField);
+ }
+
+ if (hasPackageEntry && !preserveSymlinks && resolved) {
+ const fileExists = yield exists(resolved);
+
+ if (fileExists) {
+ resolved = yield realpath(resolved);
+ }
+ }
+
+ idToPackageInfo.set(resolved, packageInfo);
+
+ if (hasPackageEntry) {
+ if (builtins.has(resolved) && preferBuiltins && isPreferBuiltinsSet) {
+ return null;
+ } else if (importeeIsBuiltin && preferBuiltins) {
+ if (!isPreferBuiltinsSet) {
+ _this.warn(`preferring built-in module '${importee}' over local alternative at '${resolved}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`);
+ }
+
+ return null;
+ } else if (jail && resolved.indexOf(path.normalize(jail.trim(path.sep))) !== 0) {
+ return null;
+ }
+ }
+
+ if (resolved && options.modulesOnly) {
+ const code = yield readFile(resolved, 'utf-8');
+
+ if (isModule(code)) {
+ return {
+ id: `${resolved}${importSuffix}`,
+ moduleSideEffects: hasModuleSideEffects(resolved)
+ };
+ }
+
+ return null;
+ }
+
+ const result = {
+ id: `${resolved}${importSuffix}`,
+ moduleSideEffects: hasModuleSideEffects(resolved)
+ };
+ return result;
+ } catch (error) {
+ return null;
+ }
+ })();
+ },
+
+ load(importee) {
+ if (importee === ES6_BROWSER_EMPTY) {
+ return 'export default {};';
+ }
+
+ return null;
+ },
+
+ getPackageInfoForId(id) {
+ return idToPackageInfo.get(id);
+ }
+
+ };
+}
+
+exports.DEFAULTS = DEFAULTS;
+exports.default = nodeResolve;
+exports.nodeResolve = nodeResolve;
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/index.js b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..be12fe14bb1a07f8b6e1eb8c5e32b018b3e68362
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/index.js
@@ -0,0 +1,709 @@
+import { dirname, resolve, extname, normalize, sep } from 'path';
+import builtinList from 'builtin-modules';
+import deepFreeze from 'deep-freeze';
+import deepMerge from 'deepmerge';
+import isModule from 'is-module';
+import fs, { realpathSync } from 'fs';
+import { promisify } from 'util';
+import { createFilter } from '@rollup/pluginutils';
+import resolveModule from 'resolve';
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+}
+
+function _asyncToGenerator(fn) {
+ return function () {
+ var self = this,
+ args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+}
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+}
+
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(n);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+}
+
+function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+function _createForOfIteratorHelper(o) {
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
+ var i = 0;
+
+ var F = function () {};
+
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var it,
+ normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = o[Symbol.iterator]();
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+}
+
+const exists = promisify(fs.exists);
+const readFile = promisify(fs.readFile);
+const realpath = promisify(fs.realpath);
+const stat = promisify(fs.stat);
+
+const onError = error => {
+ if (error.code === 'ENOENT') {
+ return false;
+ }
+
+ throw error;
+};
+
+const makeCache = fn => {
+ const cache = new Map();
+
+ const wrapped = /*#__PURE__*/function () {
+ var _ref = _asyncToGenerator(function* (param, done) {
+ if (cache.has(param) === false) {
+ cache.set(param, fn(param).catch(err => {
+ cache.delete(param);
+ throw err;
+ }));
+ }
+
+ try {
+ const result = cache.get(param);
+ const value = yield result;
+ return done(null, value);
+ } catch (error) {
+ return done(error);
+ }
+ });
+
+ return function wrapped(_x, _x2) {
+ return _ref.apply(this, arguments);
+ };
+ }();
+
+ wrapped.clear = () => cache.clear();
+
+ return wrapped;
+};
+
+const isDirCached = makeCache( /*#__PURE__*/function () {
+ var _ref2 = _asyncToGenerator(function* (file) {
+ try {
+ const stats = yield stat(file);
+ return stats.isDirectory();
+ } catch (error) {
+ return onError(error);
+ }
+ });
+
+ return function (_x3) {
+ return _ref2.apply(this, arguments);
+ };
+}());
+const isFileCached = makeCache( /*#__PURE__*/function () {
+ var _ref3 = _asyncToGenerator(function* (file) {
+ try {
+ const stats = yield stat(file);
+ return stats.isFile();
+ } catch (error) {
+ return onError(error);
+ }
+ });
+
+ return function (_x4) {
+ return _ref3.apply(this, arguments);
+ };
+}());
+const readCachedFile = makeCache(readFile);
+
+const resolveId = promisify(resolveModule); // returns the imported package name for bare module imports
+
+function getPackageName(id) {
+ if (id.startsWith('.') || id.startsWith('/')) {
+ return null;
+ }
+
+ const split = id.split('/'); // @my-scope/my-package/foo.js -> @my-scope/my-package
+ // @my-scope/my-package -> @my-scope/my-package
+
+ if (split[0][0] === '@') {
+ return `${split[0]}/${split[1]}`;
+ } // my-package/foo.js -> my-package
+ // my-package -> my-package
+
+
+ return split[0];
+}
+function getMainFields(options) {
+ let mainFields;
+
+ if (options.mainFields) {
+ mainFields = options.mainFields;
+ } else {
+ mainFields = ['module', 'main'];
+ }
+
+ if (options.browser && mainFields.indexOf('browser') === -1) {
+ return ['browser'].concat(mainFields);
+ }
+
+ if (!mainFields.length) {
+ throw new Error('Please ensure at least one `mainFields` value is specified');
+ }
+
+ return mainFields;
+}
+function getPackageInfo(options) {
+ const cache = options.cache,
+ extensions = options.extensions,
+ pkg = options.pkg,
+ mainFields = options.mainFields,
+ preserveSymlinks = options.preserveSymlinks,
+ useBrowserOverrides = options.useBrowserOverrides;
+ let pkgPath = options.pkgPath;
+
+ if (cache.has(pkgPath)) {
+ return cache.get(pkgPath);
+ } // browserify/resolve doesn't realpath paths returned in its packageFilter callback
+
+
+ if (!preserveSymlinks) {
+ pkgPath = realpathSync(pkgPath);
+ }
+
+ const pkgRoot = dirname(pkgPath);
+ const packageInfo = {
+ // copy as we are about to munge the `main` field of `pkg`.
+ packageJson: Object.assign({}, pkg),
+ // path to package.json file
+ packageJsonPath: pkgPath,
+ // directory containing the package.json
+ root: pkgRoot,
+ // which main field was used during resolution of this module (main, module, or browser)
+ resolvedMainField: 'main',
+ // whether the browser map was used to resolve the entry point to this module
+ browserMappedMain: false,
+ // the entry point of the module with respect to the selected main field and any
+ // relevant browser mappings.
+ resolvedEntryPoint: ''
+ };
+ let overriddenMain = false;
+
+ for (let i = 0; i < mainFields.length; i++) {
+ const field = mainFields[i];
+
+ if (typeof pkg[field] === 'string') {
+ pkg.main = pkg[field];
+ packageInfo.resolvedMainField = field;
+ overriddenMain = true;
+ break;
+ }
+ }
+
+ const internalPackageInfo = {
+ cachedPkg: pkg,
+ hasModuleSideEffects: () => null,
+ hasPackageEntry: overriddenMain !== false || mainFields.indexOf('main') !== -1,
+ packageBrowserField: useBrowserOverrides && typeof pkg.browser === 'object' && Object.keys(pkg.browser).reduce((browser, key) => {
+ let resolved = pkg.browser[key];
+
+ if (resolved && resolved[0] === '.') {
+ resolved = resolve(pkgRoot, resolved);
+ }
+ /* eslint-disable no-param-reassign */
+
+
+ browser[key] = resolved;
+
+ if (key[0] === '.') {
+ const absoluteKey = resolve(pkgRoot, key);
+ browser[absoluteKey] = resolved;
+
+ if (!extname(key)) {
+ extensions.reduce((subBrowser, ext) => {
+ subBrowser[absoluteKey + ext] = subBrowser[key];
+ return subBrowser;
+ }, browser);
+ }
+ }
+
+ return browser;
+ }, {}),
+ packageInfo
+ };
+ const browserMap = internalPackageInfo.packageBrowserField;
+
+ if (useBrowserOverrides && typeof pkg.browser === 'object' && // eslint-disable-next-line no-prototype-builtins
+ browserMap.hasOwnProperty(pkg.main)) {
+ packageInfo.resolvedEntryPoint = browserMap[pkg.main];
+ packageInfo.browserMappedMain = true;
+ } else {
+ // index.node is technically a valid default entrypoint as well...
+ packageInfo.resolvedEntryPoint = resolve(pkgRoot, pkg.main || 'index.js');
+ packageInfo.browserMappedMain = false;
+ }
+
+ const packageSideEffects = pkg.sideEffects;
+
+ if (typeof packageSideEffects === 'boolean') {
+ internalPackageInfo.hasModuleSideEffects = () => packageSideEffects;
+ } else if (Array.isArray(packageSideEffects)) {
+ internalPackageInfo.hasModuleSideEffects = createFilter(packageSideEffects, null, {
+ resolve: pkgRoot
+ });
+ }
+
+ cache.set(pkgPath, internalPackageInfo);
+ return internalPackageInfo;
+}
+function normalizeInput(input) {
+ if (Array.isArray(input)) {
+ return input;
+ } else if (typeof input === 'object') {
+ return Object.values(input);
+ } // otherwise it's a string
+
+
+ return [input];
+} // Resolve module specifiers in order. Promise resolves to the first module that resolves
+// successfully, or the error that resulted from the last attempted module resolution.
+
+function resolveImportSpecifiers(importSpecifierList, resolveOptions) {
+ let promise = Promise.resolve();
+
+ for (let i = 0; i < importSpecifierList.length; i++) {
+ promise = promise.then(value => {
+ // if we've already resolved to something, just return it.
+ if (value) {
+ return value;
+ }
+
+ return resolveId(importSpecifierList[i], resolveOptions).then(result => {
+ if (!resolveOptions.preserveSymlinks) {
+ result = realpathSync(result);
+ }
+
+ return result;
+ });
+ });
+
+ if (i < importSpecifierList.length - 1) {
+ // swallow MODULE_NOT_FOUND errors from all but the last resolution
+ promise = promise.catch(error => {
+ if (error.code !== 'MODULE_NOT_FOUND') {
+ throw error;
+ }
+ });
+ }
+ }
+
+ return promise;
+}
+
+const builtins = new Set(builtinList);
+const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js';
+
+const nullFn = () => null;
+
+const defaults = {
+ customResolveOptions: {},
+ dedupe: [],
+ // It's important that .mjs is listed before .js so that Rollup will interpret npm modules
+ // which deploy both ESM .mjs and CommonJS .js files as ESM.
+ extensions: ['.mjs', '.js', '.json', '.node'],
+ resolveOnly: []
+};
+const DEFAULTS = deepFreeze(deepMerge({}, defaults));
+function nodeResolve(opts = {}) {
+ const options = Object.assign({}, defaults, opts);
+ const customResolveOptions = options.customResolveOptions,
+ extensions = options.extensions,
+ jail = options.jail;
+ const warnings = [];
+ const packageInfoCache = new Map();
+ const idToPackageInfo = new Map();
+ const mainFields = getMainFields(options);
+ const useBrowserOverrides = mainFields.indexOf('browser') !== -1;
+ const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false;
+ const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true;
+ const rootDir = options.rootDir || process.cwd();
+ let dedupe = options.dedupe;
+ let rollupOptions;
+
+ if (options.only) {
+ warnings.push('node-resolve: The `only` options is deprecated, please use `resolveOnly`');
+ options.resolveOnly = options.only;
+ }
+
+ if (typeof dedupe !== 'function') {
+ dedupe = importee => options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
+ }
+
+ const resolveOnly = options.resolveOnly.map(pattern => {
+ if (pattern instanceof RegExp) {
+ return pattern;
+ }
+
+ const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+ return new RegExp(`^${normalized}$`);
+ });
+ const browserMapCache = new Map();
+ let preserveSymlinks;
+ return {
+ name: 'node-resolve',
+
+ buildStart(options) {
+ rollupOptions = options;
+
+ var _iterator = _createForOfIteratorHelper(warnings),
+ _step;
+
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ const warning = _step.value;
+ this.warn(warning);
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+
+ preserveSymlinks = options.preserveSymlinks;
+ },
+
+ generateBundle() {
+ readCachedFile.clear();
+ isFileCached.clear();
+ isDirCached.clear();
+ },
+
+ resolveId(importee, importer) {
+ var _this = this;
+
+ return _asyncToGenerator(function* () {
+ if (importee === ES6_BROWSER_EMPTY) {
+ return importee;
+ } // ignore IDs with null character, these belong to other plugins
+
+
+ if (/\0/.test(importee)) return null; // strip hash and query params from import
+
+ const _importee$split = importee.split('#'),
+ _importee$split2 = _slicedToArray(_importee$split, 2),
+ withoutHash = _importee$split2[0],
+ hash = _importee$split2[1];
+
+ const _withoutHash$split = withoutHash.split('?'),
+ _withoutHash$split2 = _slicedToArray(_withoutHash$split, 2),
+ importPath = _withoutHash$split2[0],
+ params = _withoutHash$split2[1];
+
+ const importSuffix = `${params ? `?${params}` : ''}${hash ? `#${hash}` : ''}`;
+ importee = importPath;
+ const basedir = !importer || dedupe(importee) ? rootDir : dirname(importer); // https://github.com/defunctzombie/package-browser-field-spec
+
+ const browser = browserMapCache.get(importer);
+
+ if (useBrowserOverrides && browser) {
+ const resolvedImportee = resolve(basedir, importee);
+
+ if (browser[importee] === false || browser[resolvedImportee] === false) {
+ return ES6_BROWSER_EMPTY;
+ }
+
+ const browserImportee = browser[importee] || browser[resolvedImportee] || browser[`${resolvedImportee}.js`] || browser[`${resolvedImportee}.json`];
+
+ if (browserImportee) {
+ importee = browserImportee;
+ }
+ }
+
+ const parts = importee.split(/[/\\]/);
+ let id = parts.shift();
+ let isRelativeImport = false;
+
+ if (id[0] === '@' && parts.length > 0) {
+ // scoped packages
+ id += `/${parts.shift()}`;
+ } else if (id[0] === '.') {
+ // an import relative to the parent dir of the importer
+ id = resolve(basedir, importee);
+ isRelativeImport = true;
+ }
+
+ if (!isRelativeImport && resolveOnly.length && !resolveOnly.some(pattern => pattern.test(id))) {
+ if (normalizeInput(rollupOptions.input).includes(importee)) {
+ return null;
+ }
+
+ return false;
+ }
+
+ let hasModuleSideEffects = nullFn;
+ let hasPackageEntry = true;
+ let packageBrowserField = false;
+ let packageInfo;
+
+ const filter = (pkg, pkgPath) => {
+ const info = getPackageInfo({
+ cache: packageInfoCache,
+ extensions,
+ pkg,
+ pkgPath,
+ mainFields,
+ preserveSymlinks,
+ useBrowserOverrides
+ });
+ packageInfo = info.packageInfo;
+ hasModuleSideEffects = info.hasModuleSideEffects;
+ hasPackageEntry = info.hasPackageEntry;
+ packageBrowserField = info.packageBrowserField;
+ return info.cachedPkg;
+ };
+
+ let resolveOptions = {
+ basedir,
+ packageFilter: filter,
+ readFile: readCachedFile,
+ isFile: isFileCached,
+ isDirectory: isDirCached,
+ extensions
+ };
+
+ if (preserveSymlinks !== undefined) {
+ resolveOptions.preserveSymlinks = preserveSymlinks;
+ }
+
+ const importSpecifierList = [];
+
+ if (importer === undefined && !importee[0].match(/^\.?\.?\//)) {
+ // For module graph roots (i.e. when importer is undefined), we
+ // need to handle 'path fragments` like `foo/bar` that are commonly
+ // found in rollup config files. If importee doesn't look like a
+ // relative or absolute path, we make it relative and attempt to
+ // resolve it. If we don't find anything, we try resolving it as we
+ // got it.
+ importSpecifierList.push(`./${importee}`);
+ }
+
+ const importeeIsBuiltin = builtins.has(importee);
+
+ if (importeeIsBuiltin && (!preferBuiltins || !isPreferBuiltinsSet)) {
+ // The `resolve` library will not resolve packages with the same
+ // name as a node built-in module. If we're resolving something
+ // that's a builtin, and we don't prefer to find built-ins, we
+ // first try to look up a local module with that name. If we don't
+ // find anything, we resolve the builtin which just returns back
+ // the built-in's name.
+ importSpecifierList.push(`${importee}/`);
+ } // TypeScript files may import '.js' to refer to either '.ts' or '.tsx'
+
+
+ if (importer && importee.endsWith('.js')) {
+ for (var _i = 0, _arr = ['.ts', '.tsx']; _i < _arr.length; _i++) {
+ const ext = _arr[_i];
+
+ if (importer.endsWith(ext) && extensions.includes(ext)) {
+ importSpecifierList.push(importee.replace(/.js$/, ext));
+ }
+ }
+ }
+
+ importSpecifierList.push(importee);
+ resolveOptions = Object.assign(resolveOptions, customResolveOptions);
+
+ try {
+ let resolved = yield resolveImportSpecifiers(importSpecifierList, resolveOptions);
+
+ if (resolved && packageBrowserField) {
+ if (Object.prototype.hasOwnProperty.call(packageBrowserField, resolved)) {
+ if (!packageBrowserField[resolved]) {
+ browserMapCache.set(resolved, packageBrowserField);
+ return ES6_BROWSER_EMPTY;
+ }
+
+ resolved = packageBrowserField[resolved];
+ }
+
+ browserMapCache.set(resolved, packageBrowserField);
+ }
+
+ if (hasPackageEntry && !preserveSymlinks && resolved) {
+ const fileExists = yield exists(resolved);
+
+ if (fileExists) {
+ resolved = yield realpath(resolved);
+ }
+ }
+
+ idToPackageInfo.set(resolved, packageInfo);
+
+ if (hasPackageEntry) {
+ if (builtins.has(resolved) && preferBuiltins && isPreferBuiltinsSet) {
+ return null;
+ } else if (importeeIsBuiltin && preferBuiltins) {
+ if (!isPreferBuiltinsSet) {
+ _this.warn(`preferring built-in module '${importee}' over local alternative at '${resolved}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`);
+ }
+
+ return null;
+ } else if (jail && resolved.indexOf(normalize(jail.trim(sep))) !== 0) {
+ return null;
+ }
+ }
+
+ if (resolved && options.modulesOnly) {
+ const code = yield readFile(resolved, 'utf-8');
+
+ if (isModule(code)) {
+ return {
+ id: `${resolved}${importSuffix}`,
+ moduleSideEffects: hasModuleSideEffects(resolved)
+ };
+ }
+
+ return null;
+ }
+
+ const result = {
+ id: `${resolved}${importSuffix}`,
+ moduleSideEffects: hasModuleSideEffects(resolved)
+ };
+ return result;
+ } catch (error) {
+ return null;
+ }
+ })();
+ },
+
+ load(importee) {
+ if (importee === ES6_BROWSER_EMPTY) {
+ return 'export default {};';
+ }
+
+ return null;
+ },
+
+ getPackageInfoForId(id) {
+ return idToPackageInfo.get(id);
+ }
+
+ };
+}
+
+export default nodeResolve;
+export { DEFAULTS, nodeResolve };
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/package.json b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..7c34deb5837d8d5e168b54f95f7872b2c50eca13
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/package.json
@@ -0,0 +1 @@
+{"type":"module"}
\ No newline at end of file
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/package.json b/frontend/node_modules/@rollup/plugin-node-resolve/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3e6f4fed6c7910f7ee68a899ce692ce1de57a251
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "@rollup/plugin-node-resolve",
+ "version": "8.4.0",
+ "publishConfig": {
+ "access": "public"
+ },
+ "description": "Locate and bundle third-party dependencies in node_modules",
+ "license": "MIT",
+ "repository": "rollup/plugins",
+ "author": "Rich Harris ",
+ "homepage": "https://github.com/rollup/plugins/tree/master/packages/node-resolve/#readme",
+ "bugs": "https://github.com/rollup/plugins/issues",
+ "main": "./dist/cjs/index.js",
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "scripts": {
+ "build": "rollup -c",
+ "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
+ "ci:lint": "pnpm run build && pnpm run lint",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "ci:test": "pnpm run test -- --verbose && pnpm run test:ts",
+ "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
+ "lint:docs": "prettier --single-quote --write README.md",
+ "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
+ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
+ "prebuild": "del-cli dist",
+ "prepare": "pnpm run build",
+ "prepublishOnly": "pnpm run lint && pnpm run test && pnpm run test:ts",
+ "pretest": "pnpm run build",
+ "test": "ava",
+ "test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
+ },
+ "files": [
+ "dist",
+ "types",
+ "README.md",
+ "LICENSE"
+ ],
+ "keywords": [
+ "rollup",
+ "plugin",
+ "es2015",
+ "npm",
+ "modules"
+ ],
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0"
+ },
+ "dependencies": {
+ "@rollup/pluginutils": "^3.1.0",
+ "@types/resolve": "1.17.1",
+ "builtin-modules": "^3.1.0",
+ "deep-freeze": "^0.0.1",
+ "deepmerge": "^4.2.2",
+ "is-module": "^1.0.0",
+ "resolve": "^1.17.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.10.4",
+ "@babel/plugin-transform-typescript": "^7.10.4",
+ "@babel/preset-env": "^7.10.4",
+ "@rollup/plugin-babel": "^5.0.4",
+ "@rollup/plugin-commonjs": "^13.0.0",
+ "@rollup/plugin-json": "^4.1.0",
+ "es5-ext": "^0.10.53",
+ "rollup": "^2.12.0",
+ "source-map": "^0.7.3",
+ "string-capitalize": "^1.0.1"
+ },
+ "ava": {
+ "files": [
+ "!**/fixtures/**",
+ "!**/helpers/**",
+ "!**/recipes/**",
+ "!**/types.ts"
+ ]
+ },
+ "exports": {
+ "require": "./dist/cjs/index.js",
+ "import": "./dist/es/index.js"
+ },
+ "module": "./dist/es/index.js",
+ "type": "commonjs",
+ "types": "types/index.d.ts"
+}
diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/types/index.d.ts b/frontend/node_modules/@rollup/plugin-node-resolve/types/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d2fed0f77621359a0b438d348b10cc1fc62264ad
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-node-resolve/types/index.d.ts
@@ -0,0 +1,92 @@
+import { Plugin } from 'rollup';
+import { AsyncOpts } from 'resolve';
+
+export const DEFAULTS: {
+ customResolveOptions: {};
+ dedupe: [];
+ extensions: ['.mjs', '.js', '.json', '.node'];
+ resolveOnly: [];
+};
+
+export interface RollupNodeResolveOptions {
+ /**
+ * If `true`, instructs the plugin to use the `"browser"` property in `package.json`
+ * files to specify alternative files to load for bundling. This is useful when
+ * bundling for a browser environment. Alternatively, a value of `'browser'` can be
+ * added to the `mainFields` option. If `false`, any `"browser"` properties in
+ * package files will be ignored. This option takes precedence over `mainFields`.
+ * @default false
+ */
+ browser?: boolean;
+
+ /**
+ * An `Object` that specifies additional options that should be passed through to `node-resolve`.
+ */
+ customResolveOptions?: AsyncOpts;
+
+ /**
+ * An `Array` of modules names, which instructs the plugin to force resolving for the
+ * specified modules to the root `node_modules`. Helps to prevent bundling the same
+ * package multiple times if package is imported from dependencies.
+ */
+ dedupe?: string[] | ((importee: string) => boolean);
+
+ /**
+ * Specifies the extensions of files that the plugin will operate on.
+ * @default [ '.mjs', '.js', '.json', '.node' ]
+ */
+ extensions?: readonly string[];
+
+ /**
+ * Locks the module search within specified path (e.g. chroot). Modules defined
+ * outside this path will be marked as external.
+ * @default '/'
+ */
+ jail?: string;
+
+ /**
+ * Specifies the properties to scan within a `package.json`, used to determine the
+ * bundle entry point.
+ * @default ['module', 'main']
+ */
+ mainFields?: readonly string[];
+
+ /**
+ * If `true`, inspect resolved files to assert that they are ES2015 modules.
+ * @default false
+ */
+ modulesOnly?: boolean;
+
+ /**
+ * @deprecated use "resolveOnly" instead
+ * @default null
+ */
+ only?: ReadonlyArray | null;
+
+ /**
+ * If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`,
+ * the plugin will look for locally installed modules of the same name.
+ * @default true
+ */
+ preferBuiltins?: boolean;
+
+ /**
+ * An `Array` which instructs the plugin to limit module resolution to those whose
+ * names match patterns in the array.
+ * @default []
+ */
+ resolveOnly?: ReadonlyArray | null;
+
+ /**
+ * Specifies the root directory from which to resolve modules. Typically used when
+ * resolving entry-point imports, and when resolving deduplicated modules.
+ * @default process.cwd()
+ */
+ rootDir?: string;
+}
+
+/**
+ * Locate modules using the Node resolution algorithm, for using third party modules in node_modules
+ */
+export function nodeResolve(options?: RollupNodeResolveOptions): Plugin;
+export default nodeResolve;
diff --git a/frontend/node_modules/@rollup/plugin-typescript/CHANGELOG.md b/frontend/node_modules/@rollup/plugin-typescript/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..275972f05a1e5149a755f50bbd8d998ba20da207
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/CHANGELOG.md
@@ -0,0 +1,220 @@
+# @rollup/plugin-typescript ChangeLog
+
+## v4.1.2
+
+_2020-05-20_
+
+### Bugfixes
+
+- fix: memory leak. fixes #322 (#352)
+
+### Updates
+
+- docs: update readme examples (#391)
+- docs: update link to @rollup/plugin-babel in README.md (#372)
+
+## v4.1.1
+
+_2020-04-12_
+
+### Bugfixes
+
+- fix: sourcemap generated as null (#276)
+- fix: use parsedOptions.fileNames for emit declaration files (#270) (#271)
+
+## v4.1.0
+
+_2020-04-12_
+
+### Features
+
+- feat: Refine options interface (#284)
+
+## v4.0.0
+
+### Bugfixes
+
+- fix: Use builtin extends resolution (#199)
+
+### Features
+
+- feat: Move to BuilderProgram API (#217)
+
+### Breaking Changes
+
+Please see https://github.com/rollup/plugins/pull/217 for more information.
+
+## v3.1.0
+
+_2020-03-05_
+
+_Note: This was a bad release due to breaking changes. v3.1.1 has been published to revert the latest 3.x.x version to a non-breaking state. For the changes in this erroneous version, please use v4.0.0._
+
+### Updates
+
+- test: Add preserveModules test (#234)
+- chore: refactor compiler host (#214)
+- test: Add test for optional chaining (#207)
+- chore: Use typechecking (4bb8753)
+
+## v3.0.0
+
+_2020-01-27_
+
+### Breaking Changes
+
+- feat: Add typechecking! (#177)
+
+### Bugfixes
+
+- fix: extended config file path (#157)
+
+### Updates
+
+- core: Add note about old behaviour (#181)
+- chore: Always use ParsedCommandLine (#162)
+- chore: update devDeps (96c45ff)
+- chore: Remove resolveHost (#148)
+
+## v2.1.0
+
+_2020-01-07_
+
+### Features
+
+- feat: Warning objects for type errors (#144)
+- feat: Find tslib asynchronously (#131)
+
+### Updates
+
+- chore: Use ts.findConfigFile helper (#145)
+
+## v2.0.2
+
+_2020-01-04_
+
+### Bugfixes
+
+- fix: Use this.warn for ts errors (#129)
+
+### Updates
+
+- refactor: use typescript in typescript plugin (#122)
+- chore: update changelog (b723f92)
+- chore: misc linting updates (4de10f0)
+
+## 2.0.1
+
+_2019-12-04_
+
+- fix(typescript): import from scoped utils (#78)
+
+## 2.0.0
+
+_2019-11-25_
+
+- **Breaking:** Minimum compatible Rollup version is 1.20.0
+- **Breaking:** Minimum supported Node version is 8.0.0
+- Published as @rollup/plugin-typescript
+
+## 1.0.1
+
+_2019-03-24_
+
+- Update dependencies ([#136](https://github.com/rollup/rollup-plugin-typescript/issues/136))
+
+## 1.0.0
+
+_2018-09-16_
+
+- Major update for TypeScript 2/3, Rollup 1 compatibility, lots of fixes ([#124](https://github.com/rollup/rollup-plugin-typescript/issues/124))
+- Require TypeScript as peer dependency ([#121](https://github.com/rollup/rollup-plugin-typescript/issues/121))
+- Also test on Node 10 ([#119](https://github.com/rollup/rollup-plugin-typescript/issues/119))
+- Fix example in readme ([#98](https://github.com/rollup/rollup-plugin-typescript/issues/98))
+
+## 0.8.1
+
+- Ignore typescript-helpers in source maps ([#61](https://github.com/rollup/rollup-plugin-typescript/issues/61))
+
+## 0.8.0
+
+- Fix the rollup breaking change with paths ([#52](https://github.com/rollup/rollup-plugin-typescript/issues/52))
+- Don't fail without source maps ([#57](https://github.com/rollup/rollup-plugin-typescript/pull/57))
+
+## 0.7.7
+
+- Add missing `__assign` helper ([#49](https://github.com/rollup/rollup-plugin-typescript/issues/49))
+
+## 0.7.6
+
+- Ignore the `declaration` option ([#45](https://github.com/rollup/rollup-plugin-typescript/issues/45))
+- Disable `strictNullChecks` with a warning for TypeScript versions that don't support it ([#46](https://github.com/rollup/rollup-plugin-typescript/issues/46))
+
+## 0.7.5
+
+- Ensure NPM doesn't ignore typescript-helpers
+
+## 0.7.4
+
+- Resolve typescript-helpers to a file in the filesystem.
+
+## 0.7.3
+
+- Update Tippex to ^2.1.1
+
+## 0.7.2
+
+- Don't error if both `sourceMap` and `inlineSourceMap` are specified
+
+## 0.7.1
+
+- No plugin specific options should be forwarded to TypeScript
+
+## 0.7.0
+
+- Use `compilerOptions` from `tsconfig.json` if found ([#39](https://github.com/rollup/rollup-plugin-typescript/pull/32))
+
+## 0.6.1
+
+- Upgrade Tippex to ^2.1.0
+- Upgrade TypeScript to ^1.8.9
+
+## 0.6.0
+
+- Upgrade to TypeScript ^1.8.7
+- Update `__awaiter` helper to support TypeScript 1.8.x ([#32](https://github.com/rollup/rollup-plugin-typescript/pull/32))
+- Update `ts.nodeModuleNameResolver` to support both 1.7.x and 1.8.x ([#31](https://github.com/rollup/rollup-plugin-typescript/issues/31))
+
+## 0.5.0
+
+- Do not duplicate TypeScript's helpers ([#24](https://github.com/rollup/rollup-plugin-typescript/issues/24))
+- Handle `export abstract class` ([#23](https://github.com/rollup/rollup-plugin-typescript/issues/23))
+
+## 0.4.1
+
+- Does not attempt resolve or transform `.d.ts` files ([#22](https://github.com/rollup/rollup-plugin-typescript/pull/22))
+
+## 0.4.0
+
+- Work around TypeScript 1.7.5's transpilation issues ([#9](https://github.com/rollup/rollup-plugin-typescript/issues/9))
+- Overridable TypeScript version when transpiling ([#4](https://github.com/rollup/rollup-plugin-typescript/issues/4))
+- Add `jsx` support ([#11](https://github.com/rollup/rollup-plugin-typescript/issues/11))
+
+## 0.3.0
+
+- Author plugin in TypeScript
+- Report diagnostics
+- Resolve identifiers using `ts.nodeModuleNameResolver`
+
+## 0.2.1
+
+- Upgrade to TypeScript ^1.7.5
+- Enable source maps per default
+
+## 0.2.0
+
+- Use (_prerelease version of_) TypeScript 1.7.0 to generate ES5 while preserving ES2015 imports for efficient bundling.
+
+## 0.1.0
+
+- Initial release
diff --git a/frontend/node_modules/@rollup/plugin-typescript/LICENSE b/frontend/node_modules/@rollup/plugin-typescript/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@rollup/plugin-typescript/README.md b/frontend/node_modules/@rollup/plugin-typescript/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..feb219ce36b7eb009f1d4cdcf9cb1b7f627b16df
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/README.md
@@ -0,0 +1,195 @@
+[npm]: https://img.shields.io/npm/v/@rollup/plugin-typescript
+[npm-url]: https://www.npmjs.com/package/@rollup/plugin-typescript
+[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-typescript
+[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-typescript
+
+[![npm][npm]][npm-url]
+[![size][size]][size-url]
+[](https://liberamanifesto.com)
+
+# @rollup/plugin-typescript
+
+🍣 A Rollup plugin for seamless integration between Rollup and Typescript.
+
+## Requirements
+
+This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. Due to the use of `tslib` to inject helpers, this plugin requires at least [TypeScript 2.1](https://github.com/Microsoft/TypeScript/wiki/Roadmap#21-december-2016). See also [here](https://blog.mariusschulz.com/2016/12/16/typescript-2-1-external-helpers-library#the-importhelpers-flag-and-tslib).
+
+## Install
+
+Using npm:
+
+```console
+npm install @rollup/plugin-typescript --save-dev
+```
+
+Note that both `typescript` and `tslib` are peer dependencies of this plugin that need to be installed separately.
+
+## Why?
+
+See [@rollup/plugin-babel](https://github.com/rollup/plugins/tree/master/packages/babel).
+
+## Usage
+
+Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
+
+```js
+// rollup.config.js
+import typescript from '@rollup/plugin-typescript';
+
+export default {
+ input: 'src/index.ts',
+ output: {
+ dir: 'output',
+ format: 'cjs'
+ },
+ plugins: [typescript()]
+};
+```
+
+Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
+
+## Options
+
+The plugin loads any [`compilerOptions`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) from the `tsconfig.json` file by default. Passing options to the plugin directly overrides those options:
+
+```js
+...
+export default {
+ input: './main.ts',
+ plugins: [
+ typescript({lib: ["es5", "es6", "dom"], target: "es5"})
+ ]
+}
+```
+
+The following options are unique to `rollup-plugin-typescript`:
+
+### `exclude`
+
+Type: `String` | `Array[...String]`
+Default: `null`
+
+A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default no files are ignored.
+
+### `include`
+
+Type: `String` | `Array[...String]`
+Default: `null`
+
+A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all `.ts` and `.tsx` files are targeted.
+
+### `tsconfig`
+
+Type: `String` | `Boolean`
+Default: `true`
+
+When set to false, ignores any options specified in the config file. If set to a string that corresponds to a file path, the specified file will be used as config file.
+
+### `typescript`
+
+Type: `import('typescript')`
+Default: _peer dependency_
+
+Overrides the TypeScript module used for transpilation.
+
+```js
+typescript({
+ typescript: require('some-fork-of-typescript')
+});
+```
+
+### `tslib`
+
+Type: `String`
+Default: _peer dependency_
+
+Overrides the injected TypeScript helpers with a custom version.
+
+```js
+typescript({
+ tslib: require.resolve('some-fork-of-tslib')
+});
+```
+
+### Typescript compiler options
+
+Some of Typescript's [CompilerOptions](https://www.typescriptlang.org/docs/handbook/compiler-options.html) affect how Rollup builds files.
+
+#### `noEmitOnError`
+
+Type: `Boolean`
+Default: `true`
+
+If a type error is detected, the Rollup build is aborted when this option is set to true.
+
+#### `files`, `include`, `exclude`
+
+Type: `Array[...String]`
+Default: `[]`
+
+Declaration files are automatically included if they are listed in the `files` field in your `tsconfig.json` file. Source files in these fields are ignored as Rollup's configuration is used instead.
+
+#### Ignored options
+
+These compiler options are ignored by Rollup:
+
+- `noEmitHelpers`, `importHelpers`: The `tslib` helper module always must be used.
+- `noEmit`, `emitDeclarationOnly`: Typescript needs to emit code for the plugin to work with.
+- `noResolve`: Preventing Typescript from resolving code may break compilation
+
+### Importing CommonJS
+
+Though it is not recommended, it is possible to configure this plugin to handle imports of CommonJS files from TypeScript. For this, you need to specify `CommonJS` as the module format and add `rollup-plugin-commonjs` to transpile the CommonJS output generated by TypeScript to ES Modules so that rollup can process it.
+
+```js
+// rollup.config.js
+import typescript from '@rollup/plugin-typescript';
+import commonjs from '@rollup/plugin-commonjs';
+
+export default {
+ input: './main.ts',
+ plugins: [
+ typescript({ module: 'CommonJS' }),
+ commonjs({ extensions: ['.js', '.ts'] }) // the ".ts" extension is required
+ ]
+};
+```
+
+Note that this will often result in less optimal output.
+
+### Preserving JSX output
+
+Whenever choosing to preserve JSX output to be further consumed by another transform step via `tsconfig` `compilerOptions` by setting `jsx: 'preserve'` or [overriding options](#options), please bear in mind that, by itself, this plugin won't be able to preserve JSX output, usually failing with:
+
+```sh
+[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
+file.tsx (1:15)
+1: export default Foobar
+ ^
+```
+
+To prevent that, make sure to use the acorn plugin, namely `acorn-jsx`, which will make Rollup's parser acorn handle JSX tokens. (See https://rollupjs.org/guide/en/#acorninjectplugins)
+
+After adding `acorn-jsx` plugin, your Rollup config would look like the following, correctly preserving your JSX output.
+
+```js
+import jsx from 'acorn-jsx';
+import typescript from '@rollup/plugin-typescript';
+
+export default {
+ // … other options …
+ acornInjectPlugins: [jsx()],
+ plugins: [typescript({ jsx: 'preserve' })]
+};
+```
+
+### Faster compiling
+
+Previous versions of this plugin used Typescript's `transpileModule` API, which is faster but does not perform typechecking and does not support cross-file features like `const enum`s and emit-less types. If you want this behaviour, you can use [@rollup/plugin-sucrase](https://github.com/rollup/plugins/tree/master/packages/sucrase) instead.
+
+## Meta
+
+[CONTRIBUTING](/.github/CONTRIBUTING.md)
+
+[LICENSE (MIT)](/LICENSE)
diff --git a/frontend/node_modules/@rollup/plugin-typescript/dist/index.es.js b/frontend/node_modules/@rollup/plugin-typescript/dist/index.es.js
new file mode 100644
index 0000000000000000000000000000000000000000..7e6704fd2662f54efd495d2103ff43464a780a5b
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/dist/index.es.js
@@ -0,0 +1,538 @@
+import { resolve, dirname, relative, win32, posix } from 'path';
+import { createFilter } from '@rollup/pluginutils';
+import * as defaultTs from 'typescript';
+import resolveId from 'resolve';
+import { readFileSync } from 'fs';
+
+/**
+ * Create a format diagnostics host to use with the Typescript type checking APIs.
+ * Typescript hosts are used to represent the user's system,
+ * with an API for checking case sensitivity etc.
+ * @param compilerOptions Typescript compiler options. Affects functions such as `getNewLine`.
+ * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
+ */
+function createFormattingHost(ts, compilerOptions) {
+ return {
+ /** Returns the compiler options for the project. */
+ getCompilationSettings: () => compilerOptions,
+ /** Returns the current working directory. */
+ getCurrentDirectory: () => process.cwd(),
+ /** Returns the string that corresponds with the selected `NewLineKind`. */
+ getNewLine() {
+ switch (compilerOptions.newLine) {
+ case ts.NewLineKind.CarriageReturnLineFeed:
+ return '\r\n';
+ case ts.NewLineKind.LineFeed:
+ return '\n';
+ default:
+ return ts.sys.newLine;
+ }
+ },
+ /** Returns a lower case name on case insensitive systems, otherwise the original name. */
+ getCanonicalFileName: (fileName) => ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase()
+ };
+}
+
+/**
+ * Create a helper for resolving modules using Typescript.
+ * @param host Typescript host that extends `ModuleResolutionHost`
+ * with methods for sanitizing filenames and getting compiler options.
+ */
+function createModuleResolver(ts, host) {
+ const compilerOptions = host.getCompilationSettings();
+ const cache = ts.createModuleResolutionCache(process.cwd(), host.getCanonicalFileName, compilerOptions);
+ const moduleHost = Object.assign(Object.assign({}, ts.sys), host);
+ return (moduleName, containingFile) => {
+ const resolved = ts.nodeModuleNameResolver(moduleName, containingFile, compilerOptions, moduleHost, cache);
+ return resolved.resolvedModule;
+ };
+}
+
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+function __rest(s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+}
+
+const resolveIdAsync = (file, opts) => new Promise((fulfil, reject) => resolveId(file, opts, (err, contents) => (err ? reject(err) : fulfil(contents))));
+/**
+ * Returns code asynchronously for the tslib helper library.
+ */
+function getTsLibPath() {
+ return resolveIdAsync('tslib/tslib.es6.js', { basedir: __dirname });
+}
+
+/**
+ * Separate the Rollup plugin options from the Typescript compiler options,
+ * and normalize the Rollup options.
+ * @returns Object with normalized options:
+ * - `filter`: Checks if a file should be included.
+ * - `tsconfig`: Path to a tsconfig, or directive to ignore tsconfig.
+ * - `compilerOptions`: Custom Typescript compiler options that override tsconfig.
+ * - `typescript`: Instance of Typescript library (possibly custom).
+ * - `tslib`: ESM code from the tslib helper library (possibly custom).
+ */
+function getPluginOptions(options) {
+ const { include, exclude, tsconfig, typescript, tslib } = options, compilerOptions = __rest(options, ["include", "exclude", "tsconfig", "typescript", "tslib"]);
+ const filter = createFilter(include || ['*.ts+(|x)', '**/*.ts+(|x)'], exclude);
+ return {
+ filter,
+ tsconfig,
+ compilerOptions: compilerOptions,
+ typescript: typescript || defaultTs,
+ tslib: tslib || getTsLibPath()
+ };
+}
+
+/**
+ * Converts a Typescript type error into an equivalent Rollup warning object.
+ */
+function diagnosticToWarning(ts, host, diagnostic) {
+ const pluginCode = `TS${diagnostic.code}`;
+ const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
+ // Build a Rollup warning object from the diagnostics object.
+ const warning = {
+ pluginCode,
+ message: `@rollup/plugin-typescript ${pluginCode}: ${message}`
+ };
+ if (diagnostic.file) {
+ // Add information about the file location
+ const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
+ warning.loc = {
+ column: character + 1,
+ line: line + 1,
+ file: diagnostic.file.fileName
+ };
+ if (host) {
+ // Extract a code frame from Typescript
+ const formatted = ts.formatDiagnosticsWithColorAndContext([diagnostic], host);
+ // Typescript only exposes this formatter as a string prefixed with the flattened message.
+ // We need to remove it here since Rollup treats the properties as separate parts.
+ let frame = formatted.slice(formatted.indexOf(message) + message.length);
+ const newLine = host.getNewLine();
+ if (frame.startsWith(newLine)) {
+ frame = frame.slice(frame.indexOf(newLine) + newLine.length);
+ }
+ warning.frame = frame;
+ }
+ }
+ return warning;
+}
+
+const DEFAULT_COMPILER_OPTIONS = {
+ module: 'esnext',
+ noEmitOnError: true,
+ skipLibCheck: true
+};
+const FORCED_COMPILER_OPTIONS = {
+ // Always use tslib
+ noEmitHelpers: true,
+ importHelpers: true,
+ // Typescript needs to emit the code for us to work with
+ noEmit: false,
+ emitDeclarationOnly: false,
+ // Preventing Typescript from resolving code may break compilation
+ noResolve: false
+};
+
+/* eslint-disable no-param-reassign */
+const DIRECTORY_PROPS = ['outDir', 'declarationDir'];
+/**
+ * Mutates the compiler options to convert paths from relative to absolute.
+ * This should be used with compiler options passed through the Rollup plugin options,
+ * not those found from loading a tsconfig.json file.
+ * @param compilerOptions Compiler options to _mutate_.
+ * @param relativeTo Paths are resolved relative to this path.
+ */
+function makePathsAbsolute(compilerOptions, relativeTo) {
+ for (const pathProp of DIRECTORY_PROPS) {
+ if (compilerOptions[pathProp]) {
+ compilerOptions[pathProp] = resolve(relativeTo, compilerOptions[pathProp]);
+ }
+ }
+}
+/**
+ * Mutates the compiler options to normalize some values for Rollup.
+ * @param compilerOptions Compiler options to _mutate_.
+ * @returns True if the source map compiler option was not initially set.
+ */
+function normalizeCompilerOptions(ts, compilerOptions) {
+ let autoSetSourceMap = false;
+ if (compilerOptions.inlineSourceMap) {
+ // Force separate source map files for Rollup to work with.
+ compilerOptions.sourceMap = true;
+ compilerOptions.inlineSourceMap = false;
+ }
+ else if (typeof compilerOptions.sourceMap !== 'boolean') {
+ // Default to using source maps.
+ // If the plugin user sets sourceMap to false we keep that option.
+ compilerOptions.sourceMap = true;
+ // Using inlineSources to make sure typescript generate source content
+ // instead of source path.
+ compilerOptions.inlineSources = true;
+ autoSetSourceMap = true;
+ }
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.ES2015:
+ case ts.ModuleKind.ESNext:
+ case ts.ModuleKind.CommonJS:
+ // OK module type
+ return autoSetSourceMap;
+ case ts.ModuleKind.None:
+ case ts.ModuleKind.AMD:
+ case ts.ModuleKind.UMD:
+ case ts.ModuleKind.System: {
+ // Invalid module type
+ const moduleType = ts.ModuleKind[compilerOptions.module];
+ throw new Error(`@rollup/plugin-typescript: The module kind should be 'ES2015' or 'ESNext, found: '${moduleType}'`);
+ }
+ default:
+ // Unknown or unspecified module type, force ESNext
+ compilerOptions.module = ts.ModuleKind.ESNext;
+ }
+ return autoSetSourceMap;
+}
+
+/**
+ * Finds the path to the tsconfig file relative to the current working directory.
+ * @param relativePath Relative tsconfig path given by the user.
+ * If `false` is passed, then a null path is returned.
+ * @returns The absolute path, or null if the file does not exist.
+ */
+function getTsConfigPath(ts, relativePath) {
+ if (relativePath === false)
+ return null;
+ // Resolve path to file. `tsConfigOption` defaults to 'tsconfig.json'.
+ const tsConfigPath = resolve(process.cwd(), relativePath || 'tsconfig.json');
+ if (!ts.sys.fileExists(tsConfigPath)) {
+ if (relativePath) {
+ // If an explicit path was provided but no file was found, throw
+ throw new Error(`Could not find specified tsconfig.json at ${tsConfigPath}`);
+ }
+ else {
+ return null;
+ }
+ }
+ return tsConfigPath;
+}
+/**
+ * Tries to read the tsconfig file at `tsConfigPath`.
+ * @param tsConfigPath Absolute path to tsconfig JSON file.
+ * @param explicitPath If true, the path was set by the plugin user.
+ * If false, the path was computed automatically.
+ */
+function readTsConfigFile(ts, tsConfigPath) {
+ const { config, error } = ts.readConfigFile(tsConfigPath, (path) => readFileSync(path, 'utf8'));
+ if (error) {
+ throw Object.assign(Error(), diagnosticToWarning(ts, null, error));
+ }
+ return config || {};
+}
+/**
+ * Returns true if any of the `compilerOptions` contain an enum value (i.e.: ts.ScriptKind) rather than a string.
+ * This indicates that the internal CompilerOptions type is used rather than the JsonCompilerOptions.
+ */
+function containsEnumOptions(compilerOptions) {
+ const enums = [
+ 'module',
+ 'target',
+ 'jsx',
+ 'moduleResolution',
+ 'newLine'
+ ];
+ return enums.some((prop) => prop in compilerOptions && typeof compilerOptions[prop] === 'number');
+}
+const configCache = new Map();
+/**
+ * Parse the Typescript config to use with the plugin.
+ * @param ts Typescript library instance.
+ * @param tsconfig Path to the tsconfig file, or `false` to ignore the file.
+ * @param compilerOptions Options passed to the plugin directly for Typescript.
+ *
+ * @returns Parsed tsconfig.json file with some important properties:
+ * - `options`: Parsed compiler options.
+ * - `fileNames` Type definition files that should be included in the build.
+ * - `errors`: Any errors from parsing the config file.
+ */
+function parseTypescriptConfig(ts, tsconfig, compilerOptions) {
+ /* eslint-disable no-undefined */
+ const cwd = process.cwd();
+ makePathsAbsolute(compilerOptions, cwd);
+ let parsedConfig;
+ // Resolve path to file. If file is not found, pass undefined path to `parseJsonConfigFileContent`.
+ // eslint-disable-next-line no-undefined
+ const tsConfigPath = getTsConfigPath(ts, tsconfig) || undefined;
+ const tsConfigFile = tsConfigPath ? readTsConfigFile(ts, tsConfigPath) : {};
+ const basePath = tsConfigPath ? dirname(tsConfigPath) : cwd;
+ // If compilerOptions has enums, it represents an CompilerOptions object instead of parsed JSON.
+ // This determines where the data is passed to the parser.
+ if (containsEnumOptions(compilerOptions)) {
+ parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions) }), ts.sys, basePath, Object.assign(Object.assign({}, compilerOptions), FORCED_COMPILER_OPTIONS), tsConfigPath, undefined, undefined, configCache);
+ }
+ else {
+ parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions), compilerOptions) }), ts.sys, basePath, FORCED_COMPILER_OPTIONS, tsConfigPath, undefined, undefined, configCache);
+ }
+ const autoSetSourceMap = normalizeCompilerOptions(ts, parsedConfig.options);
+ return Object.assign(Object.assign({}, parsedConfig), { autoSetSourceMap });
+}
+/**
+ * If errors are detected in the parsed options,
+ * display all of them as warnings then emit an error.
+ */
+function emitParsedOptionsErrors(ts, context, parsedOptions) {
+ if (parsedOptions.errors.length > 0) {
+ parsedOptions.errors.forEach((error) => context.warn(diagnosticToWarning(ts, null, error)));
+ context.error(`@rollup/plugin-typescript: Couldn't process compiler options`);
+ }
+}
+
+/**
+ * Validate that the `compilerOptions.sourceMap` option matches `outputOptions.sourcemap`.
+ * @param context Rollup plugin context used to emit warnings.
+ * @param compilerOptions Typescript compiler options.
+ * @param outputOptions Rollup output options.
+ * @param autoSetSourceMap True if the `compilerOptions.sourceMap` property was set to `true`
+ * by the plugin, not the user.
+ */
+function validateSourceMap(context, compilerOptions, outputOptions, autoSetSourceMap) {
+ if (compilerOptions.sourceMap && !outputOptions.sourcemap && !autoSetSourceMap) {
+ context.warn(`@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.`);
+ }
+ else if (!compilerOptions.sourceMap && outputOptions.sourcemap) {
+ context.warn(`@rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.`);
+ }
+}
+/**
+ * Validate that the out directory used by Typescript can be controlled by Rollup.
+ * @param context Rollup plugin context used to emit errors.
+ * @param compilerOptions Typescript compiler options.
+ * @param outputOptions Rollup output options.
+ */
+function validatePaths(ts, context, compilerOptions, outputOptions) {
+ if (compilerOptions.out) {
+ context.error(`@rollup/plugin-typescript: Deprecated 'out' option is not supported. Use 'outDir' instead.`);
+ }
+ else if (compilerOptions.outFile) {
+ context.error(`@rollup/plugin-typescript: 'outFile' option is not supported. Use 'outDir' instead.`);
+ }
+ for (const dirProperty of DIRECTORY_PROPS) {
+ if (compilerOptions[dirProperty]) {
+ if (!outputOptions.dir) {
+ context.error(`@rollup/plugin-typescript: 'dir' must be used when '${dirProperty}' is specified.`);
+ }
+ // Checks if the given path lies within Rollup output dir
+ const fromRollupDirToTs = relative(outputOptions.dir, compilerOptions[dirProperty]);
+ if (fromRollupDirToTs.startsWith('..')) {
+ context.error(`@rollup/plugin-typescript: '${dirProperty}' must be located inside 'dir'.`);
+ }
+ }
+ }
+ const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
+ if (tsBuildInfoPath && compilerOptions.incremental) {
+ if (!outputOptions.dir) {
+ context.error(`@rollup/plugin-typescript: 'dir' must be used when 'tsBuildInfoFile' or 'incremental' are specified.`);
+ }
+ // Checks if the given path lies within Rollup output dir
+ const fromRollupDirToTs = relative(outputOptions.dir, tsBuildInfoPath);
+ if (fromRollupDirToTs.startsWith('..')) {
+ context.error(`@rollup/plugin-typescript: 'tsBuildInfoFile' must be located inside 'dir'.`);
+ }
+ }
+ if (compilerOptions.declaration || compilerOptions.declarationMap) {
+ if (DIRECTORY_PROPS.every((dirProperty) => !compilerOptions[dirProperty])) {
+ context.error(`@rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.`);
+ }
+ }
+}
+
+/**
+ * Checks if the given OutputFile represents some code
+ */
+function isCodeOutputFile(name) {
+ return !isMapOutputFile(name) && !name.endsWith('.d.ts');
+}
+/**
+ * Checks if the given OutputFile represents some source map
+ */
+function isMapOutputFile(name) {
+ return name.endsWith('.map');
+}
+/**
+ * Finds the corresponding emitted Javascript files for a given Typescript file.
+ * @param id Path to the Typescript file.
+ * @param emittedFiles Map of file names to source code,
+ * containing files emitted by the Typescript compiler.
+ */
+function findTypescriptOutput(ts, parsedOptions, id, emittedFiles) {
+ const emittedFileNames = ts.getOutputFileNames(parsedOptions, id, !ts.sys.useCaseSensitiveFileNames);
+ const codeFile = emittedFileNames.find(isCodeOutputFile);
+ const mapFile = emittedFileNames.find(isMapOutputFile);
+ return {
+ code: emittedFiles.get(codeFile),
+ map: emittedFiles.get(mapFile),
+ declarations: emittedFileNames.filter((name) => name !== codeFile && name !== mapFile)
+ };
+}
+
+// `Cannot compile modules into 'es6' when targeting 'ES5' or lower.`
+const CANNOT_COMPILE_ESM = 1204;
+/**
+ * Emit a Rollup warning or error for a Typescript type error.
+ */
+function emitDiagnostic(ts, context, host, diagnostic) {
+ if (diagnostic.code === CANNOT_COMPILE_ESM)
+ return;
+ const { noEmitOnError } = host.getCompilationSettings();
+ // Build a Rollup warning object from the diagnostics object.
+ const warning = diagnosticToWarning(ts, host, diagnostic);
+ // Errors are fatal. Otherwise emit warnings.
+ if (noEmitOnError && diagnostic.category === ts.DiagnosticCategory.Error) {
+ context.error(warning);
+ }
+ else {
+ context.warn(warning);
+ }
+}
+function buildDiagnosticReporter(ts, context, host) {
+ return function reportDiagnostics(diagnostic) {
+ emitDiagnostic(ts, context, host, diagnostic);
+ };
+}
+
+/**
+ * Create a language service host to use with the Typescript compiler & type checking APIs.
+ * Typescript hosts are used to represent the user's system,
+ * with an API for reading files, checking directories and case sensitivity etc.
+ * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
+ */
+function createWatchHost(ts, context, { formatHost, parsedOptions, writeFile, resolveModule }) {
+ const createProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram;
+ const baseHost = ts.createWatchCompilerHost(parsedOptions.fileNames, parsedOptions.options, ts.sys, createProgram, buildDiagnosticReporter(ts, context, formatHost),
+ // Ignore watch status changes
+ () => { }, parsedOptions.projectReferences);
+ return Object.assign(Object.assign({}, baseHost), {
+ /** Override the created program so an in-memory emit is used */
+ afterProgramCreate(program) {
+ const origEmit = program.emit;
+ // eslint-disable-next-line no-param-reassign
+ program.emit = (targetSourceFile, _, ...args) => origEmit(targetSourceFile, writeFile, ...args);
+ return baseHost.afterProgramCreate(program);
+ },
+ /** Add helper to deal with module resolution */
+ resolveModuleNames(moduleNames, containingFile) {
+ return moduleNames.map((moduleName) => resolveModule(moduleName, containingFile));
+ } });
+}
+function createWatchProgram(ts, context, options) {
+ return ts.createWatchProgram(createWatchHost(ts, context, options));
+}
+
+function typescript(options = {}) {
+ const { filter, tsconfig, compilerOptions, tslib, typescript: ts } = getPluginOptions(options);
+ const emittedFiles = new Map();
+ const parsedOptions = parseTypescriptConfig(ts, tsconfig, compilerOptions);
+ parsedOptions.fileNames = parsedOptions.fileNames.filter(filter);
+ const formatHost = createFormattingHost(ts, parsedOptions.options);
+ const resolveModule = createModuleResolver(ts, formatHost);
+ let program = null;
+ function normalizePath(fileName) {
+ return fileName.split(win32.sep).join(posix.sep);
+ }
+ return {
+ name: 'typescript',
+ buildStart() {
+ emitParsedOptionsErrors(ts, this, parsedOptions);
+ // Fixes a memory leak https://github.com/rollup/plugins/issues/322
+ if (!program) {
+ program = createWatchProgram(ts, this, {
+ formatHost,
+ resolveModule,
+ parsedOptions,
+ writeFile(fileName, data) {
+ emittedFiles.set(fileName, data);
+ }
+ });
+ }
+ },
+ buildEnd() {
+ var _a;
+ if (process.env.ROLLUP_WATCH !== 'true') {
+ // ESLint doesn't understand optional chaining
+ // eslint-disable-next-line
+ (_a = program) === null || _a === void 0 ? void 0 : _a.close();
+ }
+ },
+ renderStart(outputOptions) {
+ validateSourceMap(this, parsedOptions.options, outputOptions, parsedOptions.autoSetSourceMap);
+ validatePaths(ts, this, parsedOptions.options, outputOptions);
+ },
+ resolveId(importee, importer) {
+ if (importee === 'tslib') {
+ return tslib;
+ }
+ if (!importer)
+ return null;
+ // Convert path from windows separators to posix separators
+ const containingFile = normalizePath(importer);
+ const resolved = resolveModule(importee, containingFile);
+ if (resolved) {
+ if (resolved.extension === '.d.ts')
+ return null;
+ return resolved.resolvedFileName;
+ }
+ return null;
+ },
+ load(id) {
+ if (!filter(id))
+ return null;
+ const output = findTypescriptOutput(ts, parsedOptions, id, emittedFiles);
+ return output.code ? output : null;
+ },
+ generateBundle(outputOptions) {
+ parsedOptions.fileNames.forEach((fileName) => {
+ const output = findTypescriptOutput(ts, parsedOptions, fileName, emittedFiles);
+ output.declarations.forEach((id) => {
+ const code = emittedFiles.get(id);
+ if (!code)
+ return;
+ this.emitFile({
+ type: 'asset',
+ fileName: normalizePath(relative(outputOptions.dir, id)),
+ source: code
+ });
+ });
+ });
+ const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(parsedOptions.options);
+ if (tsBuildInfoPath) {
+ this.emitFile({
+ type: 'asset',
+ fileName: normalizePath(relative(outputOptions.dir, tsBuildInfoPath)),
+ source: emittedFiles.get(tsBuildInfoPath)
+ });
+ }
+ }
+ };
+}
+
+export default typescript;
diff --git a/frontend/node_modules/@rollup/plugin-typescript/dist/index.js b/frontend/node_modules/@rollup/plugin-typescript/dist/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..b2e2310ef005b87083af8ee58225feb758ede0a3
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/dist/index.js
@@ -0,0 +1,542 @@
+'use strict';
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var path = require('path');
+var pluginutils = require('@rollup/pluginutils');
+var defaultTs = require('typescript');
+var resolveId = _interopDefault(require('resolve'));
+var fs = require('fs');
+
+/**
+ * Create a format diagnostics host to use with the Typescript type checking APIs.
+ * Typescript hosts are used to represent the user's system,
+ * with an API for checking case sensitivity etc.
+ * @param compilerOptions Typescript compiler options. Affects functions such as `getNewLine`.
+ * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
+ */
+function createFormattingHost(ts, compilerOptions) {
+ return {
+ /** Returns the compiler options for the project. */
+ getCompilationSettings: () => compilerOptions,
+ /** Returns the current working directory. */
+ getCurrentDirectory: () => process.cwd(),
+ /** Returns the string that corresponds with the selected `NewLineKind`. */
+ getNewLine() {
+ switch (compilerOptions.newLine) {
+ case ts.NewLineKind.CarriageReturnLineFeed:
+ return '\r\n';
+ case ts.NewLineKind.LineFeed:
+ return '\n';
+ default:
+ return ts.sys.newLine;
+ }
+ },
+ /** Returns a lower case name on case insensitive systems, otherwise the original name. */
+ getCanonicalFileName: (fileName) => ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase()
+ };
+}
+
+/**
+ * Create a helper for resolving modules using Typescript.
+ * @param host Typescript host that extends `ModuleResolutionHost`
+ * with methods for sanitizing filenames and getting compiler options.
+ */
+function createModuleResolver(ts, host) {
+ const compilerOptions = host.getCompilationSettings();
+ const cache = ts.createModuleResolutionCache(process.cwd(), host.getCanonicalFileName, compilerOptions);
+ const moduleHost = Object.assign(Object.assign({}, ts.sys), host);
+ return (moduleName, containingFile) => {
+ const resolved = ts.nodeModuleNameResolver(moduleName, containingFile, compilerOptions, moduleHost, cache);
+ return resolved.resolvedModule;
+ };
+}
+
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+function __rest(s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+}
+
+const resolveIdAsync = (file, opts) => new Promise((fulfil, reject) => resolveId(file, opts, (err, contents) => (err ? reject(err) : fulfil(contents))));
+/**
+ * Returns code asynchronously for the tslib helper library.
+ */
+function getTsLibPath() {
+ return resolveIdAsync('tslib/tslib.es6.js', { basedir: __dirname });
+}
+
+/**
+ * Separate the Rollup plugin options from the Typescript compiler options,
+ * and normalize the Rollup options.
+ * @returns Object with normalized options:
+ * - `filter`: Checks if a file should be included.
+ * - `tsconfig`: Path to a tsconfig, or directive to ignore tsconfig.
+ * - `compilerOptions`: Custom Typescript compiler options that override tsconfig.
+ * - `typescript`: Instance of Typescript library (possibly custom).
+ * - `tslib`: ESM code from the tslib helper library (possibly custom).
+ */
+function getPluginOptions(options) {
+ const { include, exclude, tsconfig, typescript, tslib } = options, compilerOptions = __rest(options, ["include", "exclude", "tsconfig", "typescript", "tslib"]);
+ const filter = pluginutils.createFilter(include || ['*.ts+(|x)', '**/*.ts+(|x)'], exclude);
+ return {
+ filter,
+ tsconfig,
+ compilerOptions: compilerOptions,
+ typescript: typescript || defaultTs,
+ tslib: tslib || getTsLibPath()
+ };
+}
+
+/**
+ * Converts a Typescript type error into an equivalent Rollup warning object.
+ */
+function diagnosticToWarning(ts, host, diagnostic) {
+ const pluginCode = `TS${diagnostic.code}`;
+ const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
+ // Build a Rollup warning object from the diagnostics object.
+ const warning = {
+ pluginCode,
+ message: `@rollup/plugin-typescript ${pluginCode}: ${message}`
+ };
+ if (diagnostic.file) {
+ // Add information about the file location
+ const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
+ warning.loc = {
+ column: character + 1,
+ line: line + 1,
+ file: diagnostic.file.fileName
+ };
+ if (host) {
+ // Extract a code frame from Typescript
+ const formatted = ts.formatDiagnosticsWithColorAndContext([diagnostic], host);
+ // Typescript only exposes this formatter as a string prefixed with the flattened message.
+ // We need to remove it here since Rollup treats the properties as separate parts.
+ let frame = formatted.slice(formatted.indexOf(message) + message.length);
+ const newLine = host.getNewLine();
+ if (frame.startsWith(newLine)) {
+ frame = frame.slice(frame.indexOf(newLine) + newLine.length);
+ }
+ warning.frame = frame;
+ }
+ }
+ return warning;
+}
+
+const DEFAULT_COMPILER_OPTIONS = {
+ module: 'esnext',
+ noEmitOnError: true,
+ skipLibCheck: true
+};
+const FORCED_COMPILER_OPTIONS = {
+ // Always use tslib
+ noEmitHelpers: true,
+ importHelpers: true,
+ // Typescript needs to emit the code for us to work with
+ noEmit: false,
+ emitDeclarationOnly: false,
+ // Preventing Typescript from resolving code may break compilation
+ noResolve: false
+};
+
+/* eslint-disable no-param-reassign */
+const DIRECTORY_PROPS = ['outDir', 'declarationDir'];
+/**
+ * Mutates the compiler options to convert paths from relative to absolute.
+ * This should be used with compiler options passed through the Rollup plugin options,
+ * not those found from loading a tsconfig.json file.
+ * @param compilerOptions Compiler options to _mutate_.
+ * @param relativeTo Paths are resolved relative to this path.
+ */
+function makePathsAbsolute(compilerOptions, relativeTo) {
+ for (const pathProp of DIRECTORY_PROPS) {
+ if (compilerOptions[pathProp]) {
+ compilerOptions[pathProp] = path.resolve(relativeTo, compilerOptions[pathProp]);
+ }
+ }
+}
+/**
+ * Mutates the compiler options to normalize some values for Rollup.
+ * @param compilerOptions Compiler options to _mutate_.
+ * @returns True if the source map compiler option was not initially set.
+ */
+function normalizeCompilerOptions(ts, compilerOptions) {
+ let autoSetSourceMap = false;
+ if (compilerOptions.inlineSourceMap) {
+ // Force separate source map files for Rollup to work with.
+ compilerOptions.sourceMap = true;
+ compilerOptions.inlineSourceMap = false;
+ }
+ else if (typeof compilerOptions.sourceMap !== 'boolean') {
+ // Default to using source maps.
+ // If the plugin user sets sourceMap to false we keep that option.
+ compilerOptions.sourceMap = true;
+ // Using inlineSources to make sure typescript generate source content
+ // instead of source path.
+ compilerOptions.inlineSources = true;
+ autoSetSourceMap = true;
+ }
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.ES2015:
+ case ts.ModuleKind.ESNext:
+ case ts.ModuleKind.CommonJS:
+ // OK module type
+ return autoSetSourceMap;
+ case ts.ModuleKind.None:
+ case ts.ModuleKind.AMD:
+ case ts.ModuleKind.UMD:
+ case ts.ModuleKind.System: {
+ // Invalid module type
+ const moduleType = ts.ModuleKind[compilerOptions.module];
+ throw new Error(`@rollup/plugin-typescript: The module kind should be 'ES2015' or 'ESNext, found: '${moduleType}'`);
+ }
+ default:
+ // Unknown or unspecified module type, force ESNext
+ compilerOptions.module = ts.ModuleKind.ESNext;
+ }
+ return autoSetSourceMap;
+}
+
+/**
+ * Finds the path to the tsconfig file relative to the current working directory.
+ * @param relativePath Relative tsconfig path given by the user.
+ * If `false` is passed, then a null path is returned.
+ * @returns The absolute path, or null if the file does not exist.
+ */
+function getTsConfigPath(ts, relativePath) {
+ if (relativePath === false)
+ return null;
+ // Resolve path to file. `tsConfigOption` defaults to 'tsconfig.json'.
+ const tsConfigPath = path.resolve(process.cwd(), relativePath || 'tsconfig.json');
+ if (!ts.sys.fileExists(tsConfigPath)) {
+ if (relativePath) {
+ // If an explicit path was provided but no file was found, throw
+ throw new Error(`Could not find specified tsconfig.json at ${tsConfigPath}`);
+ }
+ else {
+ return null;
+ }
+ }
+ return tsConfigPath;
+}
+/**
+ * Tries to read the tsconfig file at `tsConfigPath`.
+ * @param tsConfigPath Absolute path to tsconfig JSON file.
+ * @param explicitPath If true, the path was set by the plugin user.
+ * If false, the path was computed automatically.
+ */
+function readTsConfigFile(ts, tsConfigPath) {
+ const { config, error } = ts.readConfigFile(tsConfigPath, (path) => fs.readFileSync(path, 'utf8'));
+ if (error) {
+ throw Object.assign(Error(), diagnosticToWarning(ts, null, error));
+ }
+ return config || {};
+}
+/**
+ * Returns true if any of the `compilerOptions` contain an enum value (i.e.: ts.ScriptKind) rather than a string.
+ * This indicates that the internal CompilerOptions type is used rather than the JsonCompilerOptions.
+ */
+function containsEnumOptions(compilerOptions) {
+ const enums = [
+ 'module',
+ 'target',
+ 'jsx',
+ 'moduleResolution',
+ 'newLine'
+ ];
+ return enums.some((prop) => prop in compilerOptions && typeof compilerOptions[prop] === 'number');
+}
+const configCache = new Map();
+/**
+ * Parse the Typescript config to use with the plugin.
+ * @param ts Typescript library instance.
+ * @param tsconfig Path to the tsconfig file, or `false` to ignore the file.
+ * @param compilerOptions Options passed to the plugin directly for Typescript.
+ *
+ * @returns Parsed tsconfig.json file with some important properties:
+ * - `options`: Parsed compiler options.
+ * - `fileNames` Type definition files that should be included in the build.
+ * - `errors`: Any errors from parsing the config file.
+ */
+function parseTypescriptConfig(ts, tsconfig, compilerOptions) {
+ /* eslint-disable no-undefined */
+ const cwd = process.cwd();
+ makePathsAbsolute(compilerOptions, cwd);
+ let parsedConfig;
+ // Resolve path to file. If file is not found, pass undefined path to `parseJsonConfigFileContent`.
+ // eslint-disable-next-line no-undefined
+ const tsConfigPath = getTsConfigPath(ts, tsconfig) || undefined;
+ const tsConfigFile = tsConfigPath ? readTsConfigFile(ts, tsConfigPath) : {};
+ const basePath = tsConfigPath ? path.dirname(tsConfigPath) : cwd;
+ // If compilerOptions has enums, it represents an CompilerOptions object instead of parsed JSON.
+ // This determines where the data is passed to the parser.
+ if (containsEnumOptions(compilerOptions)) {
+ parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions) }), ts.sys, basePath, Object.assign(Object.assign({}, compilerOptions), FORCED_COMPILER_OPTIONS), tsConfigPath, undefined, undefined, configCache);
+ }
+ else {
+ parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions), compilerOptions) }), ts.sys, basePath, FORCED_COMPILER_OPTIONS, tsConfigPath, undefined, undefined, configCache);
+ }
+ const autoSetSourceMap = normalizeCompilerOptions(ts, parsedConfig.options);
+ return Object.assign(Object.assign({}, parsedConfig), { autoSetSourceMap });
+}
+/**
+ * If errors are detected in the parsed options,
+ * display all of them as warnings then emit an error.
+ */
+function emitParsedOptionsErrors(ts, context, parsedOptions) {
+ if (parsedOptions.errors.length > 0) {
+ parsedOptions.errors.forEach((error) => context.warn(diagnosticToWarning(ts, null, error)));
+ context.error(`@rollup/plugin-typescript: Couldn't process compiler options`);
+ }
+}
+
+/**
+ * Validate that the `compilerOptions.sourceMap` option matches `outputOptions.sourcemap`.
+ * @param context Rollup plugin context used to emit warnings.
+ * @param compilerOptions Typescript compiler options.
+ * @param outputOptions Rollup output options.
+ * @param autoSetSourceMap True if the `compilerOptions.sourceMap` property was set to `true`
+ * by the plugin, not the user.
+ */
+function validateSourceMap(context, compilerOptions, outputOptions, autoSetSourceMap) {
+ if (compilerOptions.sourceMap && !outputOptions.sourcemap && !autoSetSourceMap) {
+ context.warn(`@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.`);
+ }
+ else if (!compilerOptions.sourceMap && outputOptions.sourcemap) {
+ context.warn(`@rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.`);
+ }
+}
+/**
+ * Validate that the out directory used by Typescript can be controlled by Rollup.
+ * @param context Rollup plugin context used to emit errors.
+ * @param compilerOptions Typescript compiler options.
+ * @param outputOptions Rollup output options.
+ */
+function validatePaths(ts, context, compilerOptions, outputOptions) {
+ if (compilerOptions.out) {
+ context.error(`@rollup/plugin-typescript: Deprecated 'out' option is not supported. Use 'outDir' instead.`);
+ }
+ else if (compilerOptions.outFile) {
+ context.error(`@rollup/plugin-typescript: 'outFile' option is not supported. Use 'outDir' instead.`);
+ }
+ for (const dirProperty of DIRECTORY_PROPS) {
+ if (compilerOptions[dirProperty]) {
+ if (!outputOptions.dir) {
+ context.error(`@rollup/plugin-typescript: 'dir' must be used when '${dirProperty}' is specified.`);
+ }
+ // Checks if the given path lies within Rollup output dir
+ const fromRollupDirToTs = path.relative(outputOptions.dir, compilerOptions[dirProperty]);
+ if (fromRollupDirToTs.startsWith('..')) {
+ context.error(`@rollup/plugin-typescript: '${dirProperty}' must be located inside 'dir'.`);
+ }
+ }
+ }
+ const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
+ if (tsBuildInfoPath && compilerOptions.incremental) {
+ if (!outputOptions.dir) {
+ context.error(`@rollup/plugin-typescript: 'dir' must be used when 'tsBuildInfoFile' or 'incremental' are specified.`);
+ }
+ // Checks if the given path lies within Rollup output dir
+ const fromRollupDirToTs = path.relative(outputOptions.dir, tsBuildInfoPath);
+ if (fromRollupDirToTs.startsWith('..')) {
+ context.error(`@rollup/plugin-typescript: 'tsBuildInfoFile' must be located inside 'dir'.`);
+ }
+ }
+ if (compilerOptions.declaration || compilerOptions.declarationMap) {
+ if (DIRECTORY_PROPS.every((dirProperty) => !compilerOptions[dirProperty])) {
+ context.error(`@rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.`);
+ }
+ }
+}
+
+/**
+ * Checks if the given OutputFile represents some code
+ */
+function isCodeOutputFile(name) {
+ return !isMapOutputFile(name) && !name.endsWith('.d.ts');
+}
+/**
+ * Checks if the given OutputFile represents some source map
+ */
+function isMapOutputFile(name) {
+ return name.endsWith('.map');
+}
+/**
+ * Finds the corresponding emitted Javascript files for a given Typescript file.
+ * @param id Path to the Typescript file.
+ * @param emittedFiles Map of file names to source code,
+ * containing files emitted by the Typescript compiler.
+ */
+function findTypescriptOutput(ts, parsedOptions, id, emittedFiles) {
+ const emittedFileNames = ts.getOutputFileNames(parsedOptions, id, !ts.sys.useCaseSensitiveFileNames);
+ const codeFile = emittedFileNames.find(isCodeOutputFile);
+ const mapFile = emittedFileNames.find(isMapOutputFile);
+ return {
+ code: emittedFiles.get(codeFile),
+ map: emittedFiles.get(mapFile),
+ declarations: emittedFileNames.filter((name) => name !== codeFile && name !== mapFile)
+ };
+}
+
+// `Cannot compile modules into 'es6' when targeting 'ES5' or lower.`
+const CANNOT_COMPILE_ESM = 1204;
+/**
+ * Emit a Rollup warning or error for a Typescript type error.
+ */
+function emitDiagnostic(ts, context, host, diagnostic) {
+ if (diagnostic.code === CANNOT_COMPILE_ESM)
+ return;
+ const { noEmitOnError } = host.getCompilationSettings();
+ // Build a Rollup warning object from the diagnostics object.
+ const warning = diagnosticToWarning(ts, host, diagnostic);
+ // Errors are fatal. Otherwise emit warnings.
+ if (noEmitOnError && diagnostic.category === ts.DiagnosticCategory.Error) {
+ context.error(warning);
+ }
+ else {
+ context.warn(warning);
+ }
+}
+function buildDiagnosticReporter(ts, context, host) {
+ return function reportDiagnostics(diagnostic) {
+ emitDiagnostic(ts, context, host, diagnostic);
+ };
+}
+
+/**
+ * Create a language service host to use with the Typescript compiler & type checking APIs.
+ * Typescript hosts are used to represent the user's system,
+ * with an API for reading files, checking directories and case sensitivity etc.
+ * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
+ */
+function createWatchHost(ts, context, { formatHost, parsedOptions, writeFile, resolveModule }) {
+ const createProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram;
+ const baseHost = ts.createWatchCompilerHost(parsedOptions.fileNames, parsedOptions.options, ts.sys, createProgram, buildDiagnosticReporter(ts, context, formatHost),
+ // Ignore watch status changes
+ () => { }, parsedOptions.projectReferences);
+ return Object.assign(Object.assign({}, baseHost), {
+ /** Override the created program so an in-memory emit is used */
+ afterProgramCreate(program) {
+ const origEmit = program.emit;
+ // eslint-disable-next-line no-param-reassign
+ program.emit = (targetSourceFile, _, ...args) => origEmit(targetSourceFile, writeFile, ...args);
+ return baseHost.afterProgramCreate(program);
+ },
+ /** Add helper to deal with module resolution */
+ resolveModuleNames(moduleNames, containingFile) {
+ return moduleNames.map((moduleName) => resolveModule(moduleName, containingFile));
+ } });
+}
+function createWatchProgram(ts, context, options) {
+ return ts.createWatchProgram(createWatchHost(ts, context, options));
+}
+
+function typescript(options = {}) {
+ const { filter, tsconfig, compilerOptions, tslib, typescript: ts } = getPluginOptions(options);
+ const emittedFiles = new Map();
+ const parsedOptions = parseTypescriptConfig(ts, tsconfig, compilerOptions);
+ parsedOptions.fileNames = parsedOptions.fileNames.filter(filter);
+ const formatHost = createFormattingHost(ts, parsedOptions.options);
+ const resolveModule = createModuleResolver(ts, formatHost);
+ let program = null;
+ function normalizePath(fileName) {
+ return fileName.split(path.win32.sep).join(path.posix.sep);
+ }
+ return {
+ name: 'typescript',
+ buildStart() {
+ emitParsedOptionsErrors(ts, this, parsedOptions);
+ // Fixes a memory leak https://github.com/rollup/plugins/issues/322
+ if (!program) {
+ program = createWatchProgram(ts, this, {
+ formatHost,
+ resolveModule,
+ parsedOptions,
+ writeFile(fileName, data) {
+ emittedFiles.set(fileName, data);
+ }
+ });
+ }
+ },
+ buildEnd() {
+ var _a;
+ if (process.env.ROLLUP_WATCH !== 'true') {
+ // ESLint doesn't understand optional chaining
+ // eslint-disable-next-line
+ (_a = program) === null || _a === void 0 ? void 0 : _a.close();
+ }
+ },
+ renderStart(outputOptions) {
+ validateSourceMap(this, parsedOptions.options, outputOptions, parsedOptions.autoSetSourceMap);
+ validatePaths(ts, this, parsedOptions.options, outputOptions);
+ },
+ resolveId(importee, importer) {
+ if (importee === 'tslib') {
+ return tslib;
+ }
+ if (!importer)
+ return null;
+ // Convert path from windows separators to posix separators
+ const containingFile = normalizePath(importer);
+ const resolved = resolveModule(importee, containingFile);
+ if (resolved) {
+ if (resolved.extension === '.d.ts')
+ return null;
+ return resolved.resolvedFileName;
+ }
+ return null;
+ },
+ load(id) {
+ if (!filter(id))
+ return null;
+ const output = findTypescriptOutput(ts, parsedOptions, id, emittedFiles);
+ return output.code ? output : null;
+ },
+ generateBundle(outputOptions) {
+ parsedOptions.fileNames.forEach((fileName) => {
+ const output = findTypescriptOutput(ts, parsedOptions, fileName, emittedFiles);
+ output.declarations.forEach((id) => {
+ const code = emittedFiles.get(id);
+ if (!code)
+ return;
+ this.emitFile({
+ type: 'asset',
+ fileName: normalizePath(path.relative(outputOptions.dir, id)),
+ source: code
+ });
+ });
+ });
+ const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(parsedOptions.options);
+ if (tsBuildInfoPath) {
+ this.emitFile({
+ type: 'asset',
+ fileName: normalizePath(path.relative(outputOptions.dir, tsBuildInfoPath)),
+ source: emittedFiles.get(tsBuildInfoPath)
+ });
+ }
+ }
+ };
+}
+
+module.exports = typescript;
diff --git a/frontend/node_modules/@rollup/plugin-typescript/package.json b/frontend/node_modules/@rollup/plugin-typescript/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..e22230a6a2fe32de2d92ced328720edf7b775c18
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/package.json
@@ -0,0 +1,82 @@
+{
+ "name": "@rollup/plugin-typescript",
+ "version": "4.1.2",
+ "publishConfig": {
+ "access": "public"
+ },
+ "description": "Seamless integration between Rollup and TypeScript.",
+ "license": "MIT",
+ "repository": "rollup/plugins",
+ "author": "Oskar Segersvärd",
+ "homepage": "https://github.com/rollup/plugins/tree/master/packages/typescript/#readme",
+ "bugs": "https://github.com/rollup/plugins/issues",
+ "main": "dist/index.js",
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "scripts": {
+ "build": "rollup -c",
+ "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
+ "ci:lint": "pnpm run build && pnpm run lint",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "ci:test": "pnpm run test -- --verbose --serial",
+ "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package",
+ "lint:docs": "prettier --single-quote --write README.md",
+ "lint:js": "eslint --fix --cache src test --ext .js,.ts",
+ "lint:json": "prettier --write **/tsconfig.json",
+ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
+ "prebuild": "del-cli dist",
+ "prepare": "pnpm run build",
+ "prepublishOnly": "pnpm run lint",
+ "pretest": "pnpm run build",
+ "test": "ava"
+ },
+ "files": [
+ "dist",
+ "types",
+ "README.md",
+ "LICENSE"
+ ],
+ "keywords": [
+ "rollup",
+ "plugin",
+ "typescript",
+ "es2015"
+ ],
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0",
+ "tslib": "*",
+ "typescript": ">=2.1.0"
+ },
+ "dependencies": {
+ "@rollup/pluginutils": "^3.0.1",
+ "resolve": "^1.14.1"
+ },
+ "devDependencies": {
+ "@rollup/plugin-buble": "^0.21.0",
+ "@rollup/plugin-commonjs": "^11.0.1",
+ "@rollup/plugin-typescript": "^3.0.0",
+ "buble": "^0.19.8",
+ "rollup": "^2.0.0",
+ "tslib": "^1.10.0",
+ "typescript": "^3.7.4"
+ },
+ "ava": {
+ "compileEnhancements": false,
+ "extensions": [
+ "ts"
+ ],
+ "require": [
+ "ts-node/register"
+ ],
+ "files": [
+ "!**/fixtures/**",
+ "!**/output/**",
+ "!**/helpers/**",
+ "!**/recipes/**",
+ "!**/types.ts"
+ ]
+ },
+ "module": "dist/index.es.js",
+ "types": "types/index.d.ts"
+}
diff --git a/frontend/node_modules/@rollup/plugin-typescript/types/index.d.ts b/frontend/node_modules/@rollup/plugin-typescript/types/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..adffe1e71e2d84d051757012a90e8744d8e43b4f
--- /dev/null
+++ b/frontend/node_modules/@rollup/plugin-typescript/types/index.d.ts
@@ -0,0 +1,47 @@
+import { FilterPattern } from '@rollup/pluginutils';
+import { Plugin } from 'rollup';
+import { CompilerOptions } from 'typescript';
+
+export interface RollupTypescriptPluginOptions {
+ /**
+ * Determine which files are transpiled by Typescript (all `.ts` and
+ * `.tsx` files by default).
+ */
+ include?: FilterPattern;
+ /**
+ * Determine which files are transpiled by Typescript (all `.ts` and
+ * `.tsx` files by default).
+ */
+ exclude?: FilterPattern;
+ /**
+ * When set to false, ignores any options specified in the config file.
+ * If set to a string that corresponds to a file path, the specified file
+ * will be used as config file.
+ */
+ tsconfig?: string | false;
+ /**
+ * Overrides TypeScript used for transpilation
+ */
+ typescript?: typeof import('typescript');
+ /**
+ * Overrides the injected TypeScript helpers with a custom version.
+ */
+ tslib?: Promise | string;
+}
+
+/** Properties of `CompilerOptions` that are normally enums */
+export type EnumCompilerOptions = 'module' | 'moduleResolution' | 'newLine' | 'jsx' | 'target';
+
+/** JSON representation of Typescript compiler options */
+export type JsonCompilerOptions = Omit &
+ Record;
+
+/** Compiler options set by the plugin user. */
+export type PartialCompilerOptions = Partial | Partial;
+
+export type RollupTypescriptOptions = RollupTypescriptPluginOptions & PartialCompilerOptions;
+
+/**
+ * Seamless integration between Rollup and Typescript.
+ */
+export default function typescript(options?: RollupTypescriptOptions): Plugin;
diff --git a/frontend/node_modules/@rollup/pluginutils/CHANGELOG.md b/frontend/node_modules/@rollup/pluginutils/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..d286908b4c22d8e451ee6092e8ff26bc81c7bf07
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/CHANGELOG.md
@@ -0,0 +1,315 @@
+# @rollup/pluginutils ChangeLog
+
+## v3.1.0
+
+_2020-06-05_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Features
+
+- feat: add native node es modules support (#419)
+
+### Updates
+
+- refactor: replace micromatch with picomatch. (#306)
+- chore: Don't bundle micromatch (#220)
+- chore: add missing typescript devDep (238b140)
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.10
+
+_2020-05-02_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Updates
+
+- refactor: replace micromatch with picomatch. (#306)
+- chore: Don't bundle micromatch (#220)
+- chore: add missing typescript devDep (238b140)
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.9
+
+_2020-04-12_
+
+### Updates
+
+- chore: support Rollup v2
+
+## v3.0.8
+
+_2020-02-01_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Updates
+
+- chore: add missing typescript devDep (238b140)
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.7
+
+_2020-02-01_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+### Updates
+
+- chore: Use readonly arrays, add TSDoc (#187)
+- chore: Use typechecking (2ae08eb)
+
+## v3.0.6
+
+_2020-01-27_
+
+### Bugfixes
+
+- fix: resolve relative paths starting with "./" (#180)
+
+## v3.0.5
+
+_2020-01-25_
+
+### Bugfixes
+
+- fix: bring back named exports (#176)
+
+## v3.0.4
+
+_2020-01-10_
+
+### Bugfixes
+
+- fix: keep for(const..) out of scope (#151)
+
+## v3.0.3
+
+_2020-01-07_
+
+### Bugfixes
+
+- fix: createFilter Windows regression (#141)
+
+### Updates
+
+- test: fix windows path failure (0a0de65)
+- chore: fix test script (5eae320)
+
+## v3.0.2
+
+_2020-01-04_
+
+### Bugfixes
+
+- fix: makeLegalIdentifier - potentially unsafe input for blacklisted identifier (#116)
+
+### Updates
+
+- docs: Fix documented type of createFilter's include/exclude (#123)
+- chore: update minor linting correction (bcbf9d2)
+
+## 3.0.1
+
+- fix: Escape glob characters in folder (#84)
+
+## 3.0.0
+
+_2019-11-25_
+
+- **Breaking:** Minimum compatible Rollup version is 1.20.0
+- **Breaking:** Minimum supported Node version is 8.0.0
+- Published as @rollup/plugins-image
+
+## 2.8.2
+
+_2019-09-13_
+
+- Handle optional catch parameter in attachScopes ([#70](https://github.com/rollup/rollup-pluginutils/pulls/70))
+
+## 2.8.1
+
+_2019-06-04_
+
+- Support serialization of many edge cases ([#64](https://github.com/rollup/rollup-pluginutils/issues/64))
+
+## 2.8.0
+
+_2019-05-30_
+
+- Bundle updated micromatch dependency ([#60](https://github.com/rollup/rollup-pluginutils/issues/60))
+
+## 2.7.1
+
+_2019-05-17_
+
+- Do not ignore files with a leading "." in createFilter ([#62](https://github.com/rollup/rollup-pluginutils/issues/62))
+
+## 2.7.0
+
+_2019-05-15_
+
+- Add `resolve` option to createFilter ([#59](https://github.com/rollup/rollup-pluginutils/issues/59))
+
+## 2.6.0
+
+_2019-04-04_
+
+- Add `extractAssignedNames` ([#59](https://github.com/rollup/rollup-pluginutils/issues/59))
+- Provide dedicated TypeScript typings file ([#58](https://github.com/rollup/rollup-pluginutils/issues/58))
+
+## 2.5.0
+
+_2019-03-18_
+
+- Generalize dataToEsm type ([#55](https://github.com/rollup/rollup-pluginutils/issues/55))
+- Handle empty keys in dataToEsm ([#56](https://github.com/rollup/rollup-pluginutils/issues/56))
+
+## 2.4.1
+
+_2019-02-16_
+
+- Remove unnecessary dependency
+
+## 2.4.0
+
+_2019-02-16_
+Update dependencies to solve micromatch vulnerability ([#53](https://github.com/rollup/rollup-pluginutils/issues/53))
+
+## 2.3.3
+
+_2018-09-19_
+
+- Revert micromatch update ([#43](https://github.com/rollup/rollup-pluginutils/issues/43))
+
+## 2.3.2
+
+_2018-09-18_
+
+- Bumb micromatch dependency ([#36](https://github.com/rollup/rollup-pluginutils/issues/36))
+- Bumb dependencies ([#41](https://github.com/rollup/rollup-pluginutils/issues/41))
+- Split up tests ([#40](https://github.com/rollup/rollup-pluginutils/issues/40))
+
+## 2.3.1
+
+_2018-08-06_
+
+- Fixed ObjectPattern scope in attachScopes to recognise { ...rest } syntax ([#37](https://github.com/rollup/rollup-pluginutils/issues/37))
+
+## 2.3.0
+
+_2018-05-21_
+
+- Add option to not generate named exports ([#32](https://github.com/rollup/rollup-pluginutils/issues/32))
+
+## 2.2.1
+
+_2018-05-21_
+
+- Support `null` serialization ([#34](https://github.com/rollup/rollup-pluginutils/issues/34))
+
+## 2.2.0
+
+_2018-05-11_
+
+- Improve white-space handling in `dataToEsm` and add `prepare` script ([#31](https://github.com/rollup/rollup-pluginutils/issues/31))
+
+## 2.1.1
+
+_2018-05-09_
+
+- Update dependencies
+
+## 2.1.0
+
+_2018-05-08_
+
+- Add `dataToEsm` helper to create named exports from objects ([#29](https://github.com/rollup/rollup-pluginutils/issues/29))
+- Support literal keys in object patterns ([#27](https://github.com/rollup/rollup-pluginutils/issues/27))
+- Support function declarations without id in `attachScopes` ([#28](https://github.com/rollup/rollup-pluginutils/issues/28))
+
+## 2.0.1
+
+_2017-01-03_
+
+- Don't add extension to file with trailing dot ([#14](https://github.com/rollup/rollup-pluginutils/issues/14))
+
+## 2.0.0
+
+_2017-01-03_
+
+- Use `micromatch` instead of `minimatch` ([#19](https://github.com/rollup/rollup-pluginutils/issues/19))
+- Allow `createFilter` to take regexes ([#5](https://github.com/rollup/rollup-pluginutils/issues/5))
+
+## 1.5.2
+
+_2016-08-29_
+
+- Treat `arguments` as a reserved word ([#10](https://github.com/rollup/rollup-pluginutils/issues/10))
+
+## 1.5.1
+
+_2016-06-24_
+
+- Add all declarators in a var declaration to scope, not just the first
+
+## 1.5.0
+
+_2016-06-07_
+
+- Exclude IDs with null character (`\0`)
+
+## 1.4.0
+
+_2016-06-07_
+
+- Workaround minimatch issue ([#6](https://github.com/rollup/rollup-pluginutils/pull/6))
+- Exclude non-string IDs in `createFilter`
+
+## 1.3.1
+
+_2015-12-16_
+
+- Build with Rollup directly, rather than via Gobble
+
+## 1.3.0
+
+_2015-12-16_
+
+- Use correct path separator on Windows
+
+## 1.2.0
+
+_2015-11-02_
+
+- Add `attachScopes` and `makeLegalIdentifier`
+
+## 1.1.0
+
+2015-10-24\*
+
+- Add `addExtension` function
+
+## 1.0.1
+
+_2015-10-24_
+
+- Include dist files in package
+
+## 1.0.0
+
+_2015-10-24_
+
+- First release
diff --git a/frontend/node_modules/@rollup/pluginutils/LICENSE b/frontend/node_modules/@rollup/pluginutils/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/frontend/node_modules/@rollup/pluginutils/README.md b/frontend/node_modules/@rollup/pluginutils/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..2a103e6bd696860b005ed594301926732871da25
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/README.md
@@ -0,0 +1,237 @@
+[npm]: https://img.shields.io/npm/v/@rollup/pluginutils
+[npm-url]: https://www.npmjs.com/package/@rollup/pluginutils
+[size]: https://packagephobia.now.sh/badge?p=@rollup/pluginutils
+[size-url]: https://packagephobia.now.sh/result?p=@rollup/pluginutils
+
+[![npm][npm]][npm-url]
+[![size][size]][size-url]
+[](https://liberamanifesto.com)
+
+# @rollup/pluginutils
+
+A set of utility functions commonly used by 🍣 Rollup plugins.
+
+## Requirements
+
+This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
+
+## Install
+
+Using npm:
+
+```console
+npm install @rollup/pluginutils --save-dev
+```
+
+## Usage
+
+```js
+import utils from '@rollup/pluginutils';
+//...
+```
+
+## API
+
+Available utility functions are listed below:
+
+_Note: Parameter names immediately followed by a `?` indicate that the parameter is optional._
+
+### addExtension
+
+Adds an extension to a module ID if one does not exist.
+
+Parameters: `(filename: String, ext?: String)`
+Returns: `String`
+
+```js
+import { addExtension } from '@rollup/pluginutils';
+
+export default function myPlugin(options = {}) {
+ return {
+ resolveId(code, id) {
+ // only adds an extension if there isn't one already
+ id = addExtension(id); // `foo` -> `foo.js`, `foo.js -> foo.js`
+ id = addExtension(id, '.myext'); // `foo` -> `foo.myext`, `foo.js -> `foo.js`
+ }
+ };
+}
+```
+
+### attachScopes
+
+Attaches `Scope` objects to the relevant nodes of an AST. Each `Scope` object has a `scope.contains(name)` method that returns `true` if a given name is defined in the current scope or a parent scope.
+
+Parameters: `(ast: Node, propertyName?: String)`
+Returns: `Object`
+
+See [rollup-plugin-inject](https://github.com/rollup/rollup-plugin-inject) or [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) for an example of usage.
+
+```js
+import { attachScopes } from '@rollup/pluginutils';
+import { walk } from 'estree-walker';
+
+export default function myPlugin(options = {}) {
+ return {
+ transform(code) {
+ const ast = this.parse(code);
+
+ let scope = attachScopes(ast, 'scope');
+
+ walk(ast, {
+ enter(node) {
+ if (node.scope) scope = node.scope;
+
+ if (!scope.contains('foo')) {
+ // `foo` is not defined, so if we encounter it,
+ // we assume it's a global
+ }
+ },
+ leave(node) {
+ if (node.scope) scope = scope.parent;
+ }
+ });
+ }
+ };
+}
+```
+
+### createFilter
+
+Constructs a filter function which can be used to determine whether or not certain modules should be operated upon.
+
+Parameters: `(include?: , exclude?: , options?: Object)`
+Returns: `String`
+
+#### `include` and `exclude`
+
+Type: `String | RegExp | Array[...String|RegExp]`
+
+A valid [`minimatch`](https://www.npmjs.com/package/minimatch) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `minimatch` patterns, and must not match any of the `options.exclude` patterns.
+
+#### `options`
+
+##### `resolve`
+
+Type: `String | Boolean | null`
+
+Optionally resolves the patterns against a directory other than `process.cwd()`. If a `String` is specified, then the value will be used as the base directory. Relative paths will be resolved against `process.cwd()` first. If `false`, then the patterns will not be resolved against any directory. This can be useful if you want to create a filter for virtual module names.
+
+#### Usage
+
+```js
+import { createFilter } from '@rollup/pluginutils';
+
+export default function myPlugin(options = {}) {
+ // assume that the myPlugin accepts options of `options.include` and `options.exclude`
+ var filter = createFilter(options.include, options.exclude, {
+ resolve: '/my/base/dir'
+ });
+
+ return {
+ transform(code, id) {
+ if (!filter(id)) return;
+
+ // proceed with the transformation...
+ }
+ };
+}
+```
+
+### dataToEsm
+
+Transforms objects into tree-shakable ES Module imports.
+
+Parameters: `(data: Object)`
+Returns: `String`
+
+#### `data`
+
+Type: `Object`
+
+An object to transform into an ES module.
+
+#### Usage
+
+```js
+import { dataToEsm } from '@rollup/pluginutils';
+
+const esModuleSource = dataToEsm(
+ {
+ custom: 'data',
+ to: ['treeshake']
+ },
+ {
+ compact: false,
+ indent: '\t',
+ preferConst: false,
+ objectShorthand: false,
+ namedExports: true
+ }
+);
+/*
+Outputs the string ES module source:
+ export const custom = 'data';
+ export const to = ['treeshake'];
+ export default { custom, to };
+*/
+```
+
+### extractAssignedNames
+
+Extracts the names of all assignment targets based upon specified patterns.
+
+Parameters: `(param: Node)`
+Returns: `Array[...String]`
+
+#### `param`
+
+Type: `Node`
+
+An `acorn` AST Node.
+
+#### Usage
+
+```js
+import { extractAssignedNames } from '@rollup/pluginutils';
+import { walk } from 'estree-walker';
+
+export default function myPlugin(options = {}) {
+ return {
+ transform(code) {
+ const ast = this.parse(code);
+
+ walk(ast, {
+ enter(node) {
+ if (node.type === 'VariableDeclarator') {
+ const declaredNames = extractAssignedNames(node.id);
+ // do something with the declared names
+ // e.g. for `const {x, y: z} = ... => declaredNames = ['x', 'z']
+ }
+ }
+ });
+ }
+ };
+}
+```
+
+### makeLegalIdentifier
+
+Constructs a bundle-safe identifier from a `String`.
+
+Parameters: `(str: String)`
+Returns: `String`
+
+#### Usage
+
+```js
+import { makeLegalIdentifier } from '@rollup/pluginutils';
+
+makeLegalIdentifier('foo-bar'); // 'foo_bar'
+makeLegalIdentifier('typeof'); // '_typeof'
+```
+
+## Meta
+
+[CONTRIBUTING](/.github/CONTRIBUTING.md)
+
+[LICENSE (MIT)](/LICENSE)
diff --git a/frontend/node_modules/@rollup/pluginutils/dist/cjs/index.js b/frontend/node_modules/@rollup/pluginutils/dist/cjs/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..c980d90e1c3617f3fbecb9ff42b135819c00420b
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/dist/cjs/index.js
@@ -0,0 +1,447 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var path = require('path');
+var pm = _interopDefault(require('picomatch'));
+
+const addExtension = function addExtension(filename, ext = '.js') {
+ let result = `${filename}`;
+ if (!path.extname(filename))
+ result += ext;
+ return result;
+};
+
+function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement = null;
+const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+};
+
+function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
+
+const extractors = {
+ ArrayPattern(names, param) {
+ for (const element of param.elements) {
+ if (element)
+ extractors[element.type](names, element);
+ }
+ },
+ AssignmentPattern(names, param) {
+ extractors[param.left.type](names, param.left);
+ },
+ Identifier(names, param) {
+ names.push(param.name);
+ },
+ MemberExpression() { },
+ ObjectPattern(names, param) {
+ for (const prop of param.properties) {
+ // @ts-ignore Typescript reports that this is not a valid type
+ if (prop.type === 'RestElement') {
+ extractors.RestElement(names, prop);
+ }
+ else {
+ extractors[prop.value.type](names, prop.value);
+ }
+ }
+ },
+ RestElement(names, param) {
+ extractors[param.argument.type](names, param.argument);
+ }
+};
+const extractAssignedNames = function extractAssignedNames(param) {
+ const names = [];
+ extractors[param.type](names, param);
+ return names;
+};
+
+const blockDeclarations = {
+ const: true,
+ let: true
+};
+class Scope {
+ constructor(options = {}) {
+ this.parent = options.parent;
+ this.isBlockScope = !!options.block;
+ this.declarations = Object.create(null);
+ if (options.params) {
+ options.params.forEach((param) => {
+ extractAssignedNames(param).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ });
+ }
+ }
+ addDeclaration(node, isBlockDeclaration, isVar) {
+ if (!isBlockDeclaration && this.isBlockScope) {
+ // it's a `var` or function node, and this
+ // is a block scope, so we need to go up
+ this.parent.addDeclaration(node, isBlockDeclaration, isVar);
+ }
+ else if (node.id) {
+ extractAssignedNames(node.id).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ }
+ }
+ contains(name) {
+ return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
+ }
+}
+const attachScopes = function attachScopes(ast, propertyName = 'scope') {
+ let scope = new Scope();
+ walk(ast, {
+ enter(n, parent) {
+ const node = n;
+ // function foo () {...}
+ // class Foo {...}
+ if (/(Function|Class)Declaration/.test(node.type)) {
+ scope.addDeclaration(node, false, false);
+ }
+ // var foo = 1
+ if (node.type === 'VariableDeclaration') {
+ const { kind } = node;
+ const isBlockDeclaration = blockDeclarations[kind];
+ // don't add const/let declarations in the body of a for loop #113
+ const parentType = parent ? parent.type : '';
+ if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
+ node.declarations.forEach((declaration) => {
+ scope.addDeclaration(declaration, isBlockDeclaration, true);
+ });
+ }
+ }
+ let newScope;
+ // create new function scope
+ if (/Function/.test(node.type)) {
+ const func = node;
+ newScope = new Scope({
+ parent: scope,
+ block: false,
+ params: func.params
+ });
+ // named function expressions - the name is considered
+ // part of the function's scope
+ if (func.type === 'FunctionExpression' && func.id) {
+ newScope.addDeclaration(func, false, false);
+ }
+ }
+ // create new block scope
+ if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) {
+ newScope = new Scope({
+ parent: scope,
+ block: true
+ });
+ }
+ // catch clause has its own block scope
+ if (node.type === 'CatchClause') {
+ newScope = new Scope({
+ parent: scope,
+ params: node.param ? [node.param] : [],
+ block: true
+ });
+ }
+ if (newScope) {
+ Object.defineProperty(node, propertyName, {
+ value: newScope,
+ configurable: true
+ });
+ scope = newScope;
+ }
+ },
+ leave(n) {
+ const node = n;
+ if (node[propertyName])
+ scope = scope.parent;
+ }
+ });
+ return scope;
+};
+
+// Helper since Typescript can't detect readonly arrays with Array.isArray
+function isArray(arg) {
+ return Array.isArray(arg);
+}
+function ensureArray(thing) {
+ if (isArray(thing))
+ return thing;
+ if (thing == null)
+ return [];
+ return [thing];
+}
+
+function getMatcherString(id, resolutionBase) {
+ if (resolutionBase === false) {
+ return id;
+ }
+ // resolve('') is valid and will default to process.cwd()
+ const basePath = path.resolve(resolutionBase || '')
+ .split(path.sep)
+ .join('/')
+ // escape all possible (posix + win) path characters that might interfere with regex
+ .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
+ // Note that we use posix.join because:
+ // 1. the basePath has been normalized to use /
+ // 2. the incoming glob (id) matcher, also uses /
+ // otherwise Node will force backslash (\) on windows
+ return path.posix.join(basePath, id);
+}
+const createFilter = function createFilter(include, exclude, options) {
+ const resolutionBase = options && options.resolve;
+ const getMatcher = (id) => id instanceof RegExp
+ ? id
+ : {
+ test: (what) => {
+ // this refactor is a tad overly verbose but makes for easy debugging
+ const pattern = getMatcherString(id, resolutionBase);
+ const fn = pm(pattern, { dot: true });
+ const result = fn(what);
+ return result;
+ }
+ };
+ const includeMatchers = ensureArray(include).map(getMatcher);
+ const excludeMatchers = ensureArray(exclude).map(getMatcher);
+ return function result(id) {
+ if (typeof id !== 'string')
+ return false;
+ if (/\0/.test(id))
+ return false;
+ const pathId = id.split(path.sep).join('/');
+ for (let i = 0; i < excludeMatchers.length; ++i) {
+ const matcher = excludeMatchers[i];
+ if (matcher.test(pathId))
+ return false;
+ }
+ for (let i = 0; i < includeMatchers.length; ++i) {
+ const matcher = includeMatchers[i];
+ if (matcher.test(pathId))
+ return true;
+ }
+ return !includeMatchers.length;
+ };
+};
+
+const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
+const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
+const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
+forbiddenIdentifiers.add('');
+const makeLegalIdentifier = function makeLegalIdentifier(str) {
+ let identifier = str
+ .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
+ .replace(/[^$_a-zA-Z0-9]/g, '_');
+ if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
+ identifier = `_${identifier}`;
+ }
+ return identifier || '_';
+};
+
+function stringify(obj) {
+ return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
+}
+function serializeArray(arr, indent, baseIndent) {
+ let output = '[';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ for (let i = 0; i < arr.length; i++) {
+ const key = arr[i];
+ output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}]`;
+}
+function serializeObject(obj, indent, baseIndent) {
+ let output = '{';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ const entries = Object.entries(obj);
+ for (let i = 0; i < entries.length; i++) {
+ const [key, value] = entries[i];
+ const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
+ output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}}`;
+}
+function serialize(obj, indent, baseIndent) {
+ if (obj === Infinity)
+ return 'Infinity';
+ if (obj === -Infinity)
+ return '-Infinity';
+ if (obj === 0 && 1 / obj === -Infinity)
+ return '-0';
+ if (obj instanceof Date)
+ return `new Date(${obj.getTime()})`;
+ if (obj instanceof RegExp)
+ return obj.toString();
+ if (obj !== obj)
+ return 'NaN'; // eslint-disable-line no-self-compare
+ if (Array.isArray(obj))
+ return serializeArray(obj, indent, baseIndent);
+ if (obj === null)
+ return 'null';
+ if (typeof obj === 'object')
+ return serializeObject(obj, indent, baseIndent);
+ return stringify(obj);
+}
+const dataToEsm = function dataToEsm(data, options = {}) {
+ const t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const declarationType = options.preferConst ? 'const' : 'var';
+ if (options.namedExports === false ||
+ typeof data !== 'object' ||
+ Array.isArray(data) ||
+ data instanceof Date ||
+ data instanceof RegExp ||
+ data === null) {
+ const code = serialize(data, options.compact ? null : t, '');
+ const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape
+ return `export default${magic}${code};`;
+ }
+ let namedExportCode = '';
+ const defaultExportRows = [];
+ for (const [key, value] of Object.entries(data)) {
+ if (key === makeLegalIdentifier(key)) {
+ if (options.objectShorthand)
+ defaultExportRows.push(key);
+ else
+ defaultExportRows.push(`${key}:${_}${key}`);
+ namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`;
+ }
+ else {
+ defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`);
+ }
+ }
+ return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
+};
+
+// TODO: remove this in next major
+var index = {
+ addExtension,
+ attachScopes,
+ createFilter,
+ dataToEsm,
+ extractAssignedNames,
+ makeLegalIdentifier
+};
+
+exports.addExtension = addExtension;
+exports.attachScopes = attachScopes;
+exports.createFilter = createFilter;
+exports.dataToEsm = dataToEsm;
+exports.default = index;
+exports.extractAssignedNames = extractAssignedNames;
+exports.makeLegalIdentifier = makeLegalIdentifier;
diff --git a/frontend/node_modules/@rollup/pluginutils/dist/es/index.js b/frontend/node_modules/@rollup/pluginutils/dist/es/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..a4230529334cc85529d038b6858a9ce45f55fd6d
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/dist/es/index.js
@@ -0,0 +1,436 @@
+import { extname, sep, resolve, posix } from 'path';
+import pm from 'picomatch';
+
+const addExtension = function addExtension(filename, ext = '.js') {
+ let result = `${filename}`;
+ if (!extname(filename))
+ result += ext;
+ return result;
+};
+
+function walk(ast, { enter, leave }) {
+ return visit(ast, null, enter, leave);
+}
+
+let should_skip = false;
+let should_remove = false;
+let replacement = null;
+const context = {
+ skip: () => should_skip = true,
+ remove: () => should_remove = true,
+ replace: (node) => replacement = node
+};
+
+function replace(parent, prop, index, node) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop][index] = node;
+ } else {
+ parent[prop] = node;
+ }
+ }
+}
+
+function remove(parent, prop, index) {
+ if (parent) {
+ if (index !== null) {
+ parent[prop].splice(index, 1);
+ } else {
+ delete parent[prop];
+ }
+ }
+}
+
+function visit(
+ node,
+ parent,
+ enter,
+ leave,
+ prop,
+ index
+) {
+ if (node) {
+ if (enter) {
+ const _should_skip = should_skip;
+ const _should_remove = should_remove;
+ const _replacement = replacement;
+ should_skip = false;
+ should_remove = false;
+ replacement = null;
+
+ enter.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const skipped = should_skip;
+ const removed = should_remove;
+
+ should_skip = _should_skip;
+ should_remove = _should_remove;
+ replacement = _replacement;
+
+ if (skipped) return node;
+ if (removed) return null;
+ }
+
+ for (const key in node) {
+ const value = (node )[key];
+
+ if (typeof value !== 'object') {
+ continue;
+ }
+
+ else if (Array.isArray(value)) {
+ for (let j = 0, k = 0; j < value.length; j += 1, k += 1) {
+ if (value[j] !== null && typeof value[j].type === 'string') {
+ if (!visit(value[j], node, enter, leave, key, k)) {
+ // removed
+ j--;
+ }
+ }
+ }
+ }
+
+ else if (value !== null && typeof value.type === 'string') {
+ visit(value, node, enter, leave, key, null);
+ }
+ }
+
+ if (leave) {
+ const _replacement = replacement;
+ const _should_remove = should_remove;
+ replacement = null;
+ should_remove = false;
+
+ leave.call(context, node, parent, prop, index);
+
+ if (replacement) {
+ node = replacement;
+ replace(parent, prop, index, node);
+ }
+
+ if (should_remove) {
+ remove(parent, prop, index);
+ }
+
+ const removed = should_remove;
+
+ replacement = _replacement;
+ should_remove = _should_remove;
+
+ if (removed) return null;
+ }
+ }
+
+ return node;
+}
+
+const extractors = {
+ ArrayPattern(names, param) {
+ for (const element of param.elements) {
+ if (element)
+ extractors[element.type](names, element);
+ }
+ },
+ AssignmentPattern(names, param) {
+ extractors[param.left.type](names, param.left);
+ },
+ Identifier(names, param) {
+ names.push(param.name);
+ },
+ MemberExpression() { },
+ ObjectPattern(names, param) {
+ for (const prop of param.properties) {
+ // @ts-ignore Typescript reports that this is not a valid type
+ if (prop.type === 'RestElement') {
+ extractors.RestElement(names, prop);
+ }
+ else {
+ extractors[prop.value.type](names, prop.value);
+ }
+ }
+ },
+ RestElement(names, param) {
+ extractors[param.argument.type](names, param.argument);
+ }
+};
+const extractAssignedNames = function extractAssignedNames(param) {
+ const names = [];
+ extractors[param.type](names, param);
+ return names;
+};
+
+const blockDeclarations = {
+ const: true,
+ let: true
+};
+class Scope {
+ constructor(options = {}) {
+ this.parent = options.parent;
+ this.isBlockScope = !!options.block;
+ this.declarations = Object.create(null);
+ if (options.params) {
+ options.params.forEach((param) => {
+ extractAssignedNames(param).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ });
+ }
+ }
+ addDeclaration(node, isBlockDeclaration, isVar) {
+ if (!isBlockDeclaration && this.isBlockScope) {
+ // it's a `var` or function node, and this
+ // is a block scope, so we need to go up
+ this.parent.addDeclaration(node, isBlockDeclaration, isVar);
+ }
+ else if (node.id) {
+ extractAssignedNames(node.id).forEach((name) => {
+ this.declarations[name] = true;
+ });
+ }
+ }
+ contains(name) {
+ return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
+ }
+}
+const attachScopes = function attachScopes(ast, propertyName = 'scope') {
+ let scope = new Scope();
+ walk(ast, {
+ enter(n, parent) {
+ const node = n;
+ // function foo () {...}
+ // class Foo {...}
+ if (/(Function|Class)Declaration/.test(node.type)) {
+ scope.addDeclaration(node, false, false);
+ }
+ // var foo = 1
+ if (node.type === 'VariableDeclaration') {
+ const { kind } = node;
+ const isBlockDeclaration = blockDeclarations[kind];
+ // don't add const/let declarations in the body of a for loop #113
+ const parentType = parent ? parent.type : '';
+ if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) {
+ node.declarations.forEach((declaration) => {
+ scope.addDeclaration(declaration, isBlockDeclaration, true);
+ });
+ }
+ }
+ let newScope;
+ // create new function scope
+ if (/Function/.test(node.type)) {
+ const func = node;
+ newScope = new Scope({
+ parent: scope,
+ block: false,
+ params: func.params
+ });
+ // named function expressions - the name is considered
+ // part of the function's scope
+ if (func.type === 'FunctionExpression' && func.id) {
+ newScope.addDeclaration(func, false, false);
+ }
+ }
+ // create new block scope
+ if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) {
+ newScope = new Scope({
+ parent: scope,
+ block: true
+ });
+ }
+ // catch clause has its own block scope
+ if (node.type === 'CatchClause') {
+ newScope = new Scope({
+ parent: scope,
+ params: node.param ? [node.param] : [],
+ block: true
+ });
+ }
+ if (newScope) {
+ Object.defineProperty(node, propertyName, {
+ value: newScope,
+ configurable: true
+ });
+ scope = newScope;
+ }
+ },
+ leave(n) {
+ const node = n;
+ if (node[propertyName])
+ scope = scope.parent;
+ }
+ });
+ return scope;
+};
+
+// Helper since Typescript can't detect readonly arrays with Array.isArray
+function isArray(arg) {
+ return Array.isArray(arg);
+}
+function ensureArray(thing) {
+ if (isArray(thing))
+ return thing;
+ if (thing == null)
+ return [];
+ return [thing];
+}
+
+function getMatcherString(id, resolutionBase) {
+ if (resolutionBase === false) {
+ return id;
+ }
+ // resolve('') is valid and will default to process.cwd()
+ const basePath = resolve(resolutionBase || '')
+ .split(sep)
+ .join('/')
+ // escape all possible (posix + win) path characters that might interfere with regex
+ .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
+ // Note that we use posix.join because:
+ // 1. the basePath has been normalized to use /
+ // 2. the incoming glob (id) matcher, also uses /
+ // otherwise Node will force backslash (\) on windows
+ return posix.join(basePath, id);
+}
+const createFilter = function createFilter(include, exclude, options) {
+ const resolutionBase = options && options.resolve;
+ const getMatcher = (id) => id instanceof RegExp
+ ? id
+ : {
+ test: (what) => {
+ // this refactor is a tad overly verbose but makes for easy debugging
+ const pattern = getMatcherString(id, resolutionBase);
+ const fn = pm(pattern, { dot: true });
+ const result = fn(what);
+ return result;
+ }
+ };
+ const includeMatchers = ensureArray(include).map(getMatcher);
+ const excludeMatchers = ensureArray(exclude).map(getMatcher);
+ return function result(id) {
+ if (typeof id !== 'string')
+ return false;
+ if (/\0/.test(id))
+ return false;
+ const pathId = id.split(sep).join('/');
+ for (let i = 0; i < excludeMatchers.length; ++i) {
+ const matcher = excludeMatchers[i];
+ if (matcher.test(pathId))
+ return false;
+ }
+ for (let i = 0; i < includeMatchers.length; ++i) {
+ const matcher = includeMatchers[i];
+ if (matcher.test(pathId))
+ return true;
+ }
+ return !includeMatchers.length;
+ };
+};
+
+const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
+const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
+const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
+forbiddenIdentifiers.add('');
+const makeLegalIdentifier = function makeLegalIdentifier(str) {
+ let identifier = str
+ .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
+ .replace(/[^$_a-zA-Z0-9]/g, '_');
+ if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
+ identifier = `_${identifier}`;
+ }
+ return identifier || '_';
+};
+
+function stringify(obj) {
+ return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
+}
+function serializeArray(arr, indent, baseIndent) {
+ let output = '[';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ for (let i = 0; i < arr.length; i++) {
+ const key = arr[i];
+ output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}]`;
+}
+function serializeObject(obj, indent, baseIndent) {
+ let output = '{';
+ const separator = indent ? `\n${baseIndent}${indent}` : '';
+ const entries = Object.entries(obj);
+ for (let i = 0; i < entries.length; i++) {
+ const [key, value] = entries[i];
+ const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
+ output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`;
+ }
+ return `${output}${indent ? `\n${baseIndent}` : ''}}`;
+}
+function serialize(obj, indent, baseIndent) {
+ if (obj === Infinity)
+ return 'Infinity';
+ if (obj === -Infinity)
+ return '-Infinity';
+ if (obj === 0 && 1 / obj === -Infinity)
+ return '-0';
+ if (obj instanceof Date)
+ return `new Date(${obj.getTime()})`;
+ if (obj instanceof RegExp)
+ return obj.toString();
+ if (obj !== obj)
+ return 'NaN'; // eslint-disable-line no-self-compare
+ if (Array.isArray(obj))
+ return serializeArray(obj, indent, baseIndent);
+ if (obj === null)
+ return 'null';
+ if (typeof obj === 'object')
+ return serializeObject(obj, indent, baseIndent);
+ return stringify(obj);
+}
+const dataToEsm = function dataToEsm(data, options = {}) {
+ const t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const declarationType = options.preferConst ? 'const' : 'var';
+ if (options.namedExports === false ||
+ typeof data !== 'object' ||
+ Array.isArray(data) ||
+ data instanceof Date ||
+ data instanceof RegExp ||
+ data === null) {
+ const code = serialize(data, options.compact ? null : t, '');
+ const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape
+ return `export default${magic}${code};`;
+ }
+ let namedExportCode = '';
+ const defaultExportRows = [];
+ for (const [key, value] of Object.entries(data)) {
+ if (key === makeLegalIdentifier(key)) {
+ if (options.objectShorthand)
+ defaultExportRows.push(key);
+ else
+ defaultExportRows.push(`${key}:${_}${key}`);
+ namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`;
+ }
+ else {
+ defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`);
+ }
+ }
+ return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
+};
+
+// TODO: remove this in next major
+var index = {
+ addExtension,
+ attachScopes,
+ createFilter,
+ dataToEsm,
+ extractAssignedNames,
+ makeLegalIdentifier
+};
+
+export default index;
+export { addExtension, attachScopes, createFilter, dataToEsm, extractAssignedNames, makeLegalIdentifier };
diff --git a/frontend/node_modules/@rollup/pluginutils/dist/es/package.json b/frontend/node_modules/@rollup/pluginutils/dist/es/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..7c34deb5837d8d5e168b54f95f7872b2c50eca13
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/dist/es/package.json
@@ -0,0 +1 @@
+{"type":"module"}
\ No newline at end of file
diff --git a/frontend/node_modules/@rollup/pluginutils/package.json b/frontend/node_modules/@rollup/pluginutils/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0f57f4192913c29a2978a4de72d605f1010b32c8
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/package.json
@@ -0,0 +1,91 @@
+{
+ "name": "@rollup/pluginutils",
+ "version": "3.1.0",
+ "publishConfig": {
+ "access": "public"
+ },
+ "description": "A set of utility functions commonly used by Rollup plugins",
+ "license": "MIT",
+ "repository": "rollup/plugins",
+ "author": "Rich Harris ",
+ "homepage": "https://github.com/rollup/plugins/tree/master/packages/pluginutils#readme",
+ "bugs": {
+ "url": "https://github.com/rollup/plugins/issues"
+ },
+ "main": "./dist/cjs/index.js",
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "scripts": {
+ "build": "rollup -c",
+ "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
+ "ci:lint": "pnpm run build && pnpm run lint",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "ci:test": "pnpm run test -- --verbose",
+ "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package",
+ "lint:docs": "prettier --single-quote --write README.md",
+ "lint:js": "eslint --fix --cache src test types --ext .js,.ts",
+ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package",
+ "prebuild": "del-cli dist",
+ "prepare": "pnpm run build",
+ "prepublishOnly": "pnpm run lint && pnpm run build",
+ "pretest": "pnpm run build -- --sourcemap",
+ "test": "ava"
+ },
+ "files": [
+ "dist",
+ "types",
+ "README.md",
+ "LICENSE"
+ ],
+ "keywords": [
+ "rollup",
+ "plugin",
+ "utils"
+ ],
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0"
+ },
+ "dependencies": {
+ "@types/estree": "0.0.39",
+ "estree-walker": "^1.0.1",
+ "picomatch": "^2.2.2"
+ },
+ "devDependencies": {
+ "@rollup/plugin-commonjs": "^11.0.2",
+ "@rollup/plugin-node-resolve": "^7.1.1",
+ "@rollup/plugin-typescript": "^3.0.0",
+ "@types/jest": "^24.9.0",
+ "@types/node": "^12.12.25",
+ "@types/picomatch": "^2.2.1",
+ "typescript": "^3.7.5"
+ },
+ "ava": {
+ "compileEnhancements": false,
+ "extensions": [
+ "ts"
+ ],
+ "require": [
+ "ts-node/register"
+ ],
+ "files": [
+ "!**/fixtures/**",
+ "!**/helpers/**",
+ "!**/recipes/**",
+ "!**/types.ts"
+ ]
+ },
+ "exports": {
+ "require": "./dist/cjs/index.js",
+ "import": "./dist/es/index.js"
+ },
+ "module": "./dist/es/index.js",
+ "nyc": {
+ "extension": [
+ ".js",
+ ".ts"
+ ]
+ },
+ "type": "commonjs",
+ "types": "types/index.d.ts"
+}
diff --git a/frontend/node_modules/@rollup/pluginutils/types/index.d.ts b/frontend/node_modules/@rollup/pluginutils/types/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..33d40e50971d89d02012553ac52d10993fefc708
--- /dev/null
+++ b/frontend/node_modules/@rollup/pluginutils/types/index.d.ts
@@ -0,0 +1,86 @@
+// eslint-disable-next-line import/no-unresolved
+import { BaseNode } from 'estree';
+
+export interface AttachedScope {
+ parent?: AttachedScope;
+ isBlockScope: boolean;
+ declarations: { [key: string]: boolean };
+ addDeclaration(node: BaseNode, isBlockDeclaration: boolean, isVar: boolean): void;
+ contains(name: string): boolean;
+}
+
+export interface DataToEsmOptions {
+ compact?: boolean;
+ indent?: string;
+ namedExports?: boolean;
+ objectShorthand?: boolean;
+ preferConst?: boolean;
+}
+
+/**
+ * A valid `minimatch` pattern, or array of patterns.
+ */
+export type FilterPattern = ReadonlyArray | string | RegExp | null;
+
+/**
+ * Adds an extension to a module ID if one does not exist.
+ */
+export function addExtension(filename: string, ext?: string): string;
+
+/**
+ * Attaches `Scope` objects to the relevant nodes of an AST.
+ * Each `Scope` object has a `scope.contains(name)` method that returns `true`
+ * if a given name is defined in the current scope or a parent scope.
+ */
+export function attachScopes(ast: BaseNode, propertyName?: string): AttachedScope;
+
+/**
+ * Constructs a filter function which can be used to determine whether or not
+ * certain modules should be operated upon.
+ * @param include If `include` is omitted or has zero length, filter will return `true` by default.
+ * @param exclude ID must not match any of the `exclude` patterns.
+ * @param options Optionally resolves the patterns against a directory other than `process.cwd()`.
+ * If a `string` is specified, then the value will be used as the base directory.
+ * Relative paths will be resolved against `process.cwd()` first.
+ * If `false`, then the patterns will not be resolved against any directory.
+ * This can be useful if you want to create a filter for virtual module names.
+ */
+export function createFilter(
+ include?: FilterPattern,
+ exclude?: FilterPattern,
+ options?: { resolve?: string | false | null }
+): (id: string | unknown) => boolean;
+
+/**
+ * Transforms objects into tree-shakable ES Module imports.
+ * @param data An object to transform into an ES module.
+ */
+export function dataToEsm(data: unknown, options?: DataToEsmOptions): string;
+
+/**
+ * Extracts the names of all assignment targets based upon specified patterns.
+ * @param param An `acorn` AST Node.
+ */
+export function extractAssignedNames(param: BaseNode): string[];
+
+/**
+ * Constructs a bundle-safe identifier from a `string`.
+ */
+export function makeLegalIdentifier(str: string): string;
+
+export type AddExtension = typeof addExtension;
+export type AttachScopes = typeof attachScopes;
+export type CreateFilter = typeof createFilter;
+export type ExtractAssignedNames = typeof extractAssignedNames;
+export type MakeLegalIdentifier = typeof makeLegalIdentifier;
+export type DataToEsm = typeof dataToEsm;
+
+declare const defaultExport: {
+ addExtension: AddExtension;
+ attachScopes: AttachScopes;
+ createFilter: CreateFilter;
+ dataToEsm: DataToEsm;
+ extractAssignedNames: ExtractAssignedNames;
+ makeLegalIdentifier: MakeLegalIdentifier;
+};
+export default defaultExport;
diff --git a/frontend/node_modules/@tsconfig/svelte/LICENSE b/frontend/node_modules/@tsconfig/svelte/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..48ea6616b5b8581df3401872996cecf1f8b08a0d
--- /dev/null
+++ b/frontend/node_modules/@tsconfig/svelte/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Microsoft Corporation.
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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
diff --git a/frontend/node_modules/@tsconfig/svelte/README.md b/frontend/node_modules/@tsconfig/svelte/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4c88100dc68630fb1bba1e25e7007ffcbb2e5bed
--- /dev/null
+++ b/frontend/node_modules/@tsconfig/svelte/README.md
@@ -0,0 +1,51 @@
+### A base TSConfig for working with Svelte.
+
+Add the package to your `"devDependencies"`:
+
+```sh
+npm install --save-dev @tsconfig/svelte
+yarn add --dev @tsconfig/svelte
+```
+
+Add to your `tsconfig.json`:
+
+```json
+"extends": "@tsconfig/svelte/tsconfig.json"
+```
+
+---
+
+The `tsconfig.json`:
+
+```jsonc
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "display": "Svelte",
+
+ "compilerOptions": {
+ "moduleResolution": "node",
+ "target": "es2017",
+ /**
+ Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript
+ to enforce using `import type` instead of `import` for Types.
+ */
+ "importsNotUsedAsValues": "error",
+ "isolatedModules": true,
+ /**
+ To have warnings/errors of the Svelte compiler at the correct position,
+ enable source maps by default.
+ */
+ "sourceMap": true,
+ /** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */
+ "types": ["svelte"],
+
+ "strict": false,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true
+ }
+}
+
+```
+
+You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/svelte.json).
\ No newline at end of file
diff --git a/frontend/node_modules/@tsconfig/svelte/package.json b/frontend/node_modules/@tsconfig/svelte/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..ef7e002b19479751f97859b12cd03b05971e32ee
--- /dev/null
+++ b/frontend/node_modules/@tsconfig/svelte/package.json
@@ -0,0 +1 @@
+{"name":"@tsconfig/svelte","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Svelte.","version":"1.0.13"}
\ No newline at end of file
diff --git a/frontend/node_modules/@tsconfig/svelte/tsconfig.json b/frontend/node_modules/@tsconfig/svelte/tsconfig.json
new file mode 100644
index 0000000000000000000000000000000000000000..bc9f0ea60070eb1db0fb44237ede16ede5201fc3
--- /dev/null
+++ b/frontend/node_modules/@tsconfig/svelte/tsconfig.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "display": "Svelte",
+
+ "compilerOptions": {
+ "moduleResolution": "node",
+ "target": "es2017",
+ /**
+ Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript
+ to enforce using `import type` instead of `import` for Types.
+ */
+ "importsNotUsedAsValues": "error",
+ "isolatedModules": true,
+ /**
+ To have warnings/errors of the Svelte compiler at the correct position,
+ enable source maps by default.
+ */
+ "sourceMap": true,
+ /** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */
+ "types": ["svelte"],
+
+ "strict": false,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true
+ }
+}
diff --git a/frontend/node_modules/@types/estree/LICENSE b/frontend/node_modules/@types/estree/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..21071075c24599ee98254f702bcfc504cdc275a6
--- /dev/null
+++ b/frontend/node_modules/@types/estree/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ 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
diff --git a/frontend/node_modules/@types/estree/README.md b/frontend/node_modules/@types/estree/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..2a22bde8561a9a6235fa478108b7b81dd2676c8d
--- /dev/null
+++ b/frontend/node_modules/@types/estree/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/estree`
+
+# Summary
+This package contains type definitions for ESTree AST specification (https://github.com/estree/estree).
+
+# Details
+Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree
+
+Additional Details
+ * Last updated: Tue, 17 Apr 2018 20:22:09 GMT
+ * Dependencies: none
+ * Global values: none
+
+# Credits
+These definitions were written by RReverser .
diff --git a/frontend/node_modules/@types/estree/index.d.ts b/frontend/node_modules/@types/estree/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0133991c9fe3ba531d8bff8a74003e0c0f7411db
--- /dev/null
+++ b/frontend/node_modules/@types/estree/index.d.ts
@@ -0,0 +1,548 @@
+// Type definitions for ESTree AST specification
+// Project: https://github.com/estree/estree
+// Definitions by: RReverser
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+// This definition file follows a somewhat unusual format. ESTree allows
+// runtime type checks based on the `type` parameter. In order to explain this
+// to typescript we want to use discriminated union types:
+// https://github.com/Microsoft/TypeScript/pull/9163
+//
+// For ESTree this is a bit tricky because the high level interfaces like
+// Node or Function are pulling double duty. We want to pass common fields down
+// to the interfaces that extend them (like Identifier or
+// ArrowFunctionExpression), but you can't extend a type union or enforce
+// common fields on them. So we've split the high level interfaces into two
+// types, a base type which passes down inhereted fields, and a type union of
+// all types which extend the base type. Only the type union is exported, and
+// the union is how other types refer to the collection of inheriting types.
+//
+// This makes the definitions file here somewhat more difficult to maintain,
+// but it has the notable advantage of making ESTree much easier to use as
+// an end user.
+
+interface BaseNodeWithoutComments {
+ // Every leaf interface that extends BaseNode must specify a type property.
+ // The type property should be a string literal. For example, Identifier
+ // has: `type: "Identifier"`
+ type: string;
+ loc?: SourceLocation | null;
+ range?: [number, number];
+}
+
+interface BaseNode extends BaseNodeWithoutComments {
+ leadingComments?: Array;
+ trailingComments?: Array;
+}
+
+export type Node =
+ Identifier | Literal | Program | Function | SwitchCase | CatchClause |
+ VariableDeclarator | Statement | Expression | Property |
+ AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern |
+ ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier;
+
+export interface Comment extends BaseNodeWithoutComments {
+ type: "Line" | "Block";
+ value: string;
+}
+
+interface SourceLocation {
+ source?: string | null;
+ start: Position;
+ end: Position;
+}
+
+export interface Position {
+ /** >= 1 */
+ line: number;
+ /** >= 0 */
+ column: number;
+}
+
+export interface Program extends BaseNode {
+ type: "Program";
+ sourceType: "script" | "module";
+ body: Array;
+ comments?: Array;
+}
+
+interface BaseFunction extends BaseNode {
+ params: Array;
+ generator?: boolean;
+ async?: boolean;
+ // The body is either BlockStatement or Expression because arrow functions
+ // can have a body that's either. FunctionDeclarations and
+ // FunctionExpressions have only BlockStatement bodies.
+ body: BlockStatement | Expression;
+}
+
+export type Function =
+ FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
+
+export type Statement =
+ ExpressionStatement | BlockStatement | EmptyStatement |
+ DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement |
+ BreakStatement | ContinueStatement | IfStatement | SwitchStatement |
+ ThrowStatement | TryStatement | WhileStatement | DoWhileStatement |
+ ForStatement | ForInStatement | ForOfStatement | Declaration;
+
+interface BaseStatement extends BaseNode { }
+
+export interface EmptyStatement extends BaseStatement {
+ type: "EmptyStatement";
+}
+
+export interface BlockStatement extends BaseStatement {
+ type: "BlockStatement";
+ body: Array;
+ innerComments?: Array;
+}
+
+export interface ExpressionStatement extends BaseStatement {
+ type: "ExpressionStatement";
+ expression: Expression;
+}
+
+export interface IfStatement extends BaseStatement {
+ type: "IfStatement";
+ test: Expression;
+ consequent: Statement;
+ alternate?: Statement | null;
+}
+
+export interface LabeledStatement extends BaseStatement {
+ type: "LabeledStatement";
+ label: Identifier;
+ body: Statement;
+}
+
+export interface BreakStatement extends BaseStatement {
+ type: "BreakStatement";
+ label?: Identifier | null;
+}
+
+export interface ContinueStatement extends BaseStatement {
+ type: "ContinueStatement";
+ label?: Identifier | null;
+}
+
+export interface WithStatement extends BaseStatement {
+ type: "WithStatement";
+ object: Expression;
+ body: Statement;
+}
+
+export interface SwitchStatement extends BaseStatement {
+ type: "SwitchStatement";
+ discriminant: Expression;
+ cases: Array;
+}
+
+export interface ReturnStatement extends BaseStatement {
+ type: "ReturnStatement";
+ argument?: Expression | null;
+}
+
+export interface ThrowStatement extends BaseStatement {
+ type: "ThrowStatement";
+ argument: Expression;
+}
+
+export interface TryStatement extends BaseStatement {
+ type: "TryStatement";
+ block: BlockStatement;
+ handler?: CatchClause | null;
+ finalizer?: BlockStatement | null;
+}
+
+export interface WhileStatement extends BaseStatement {
+ type: "WhileStatement";
+ test: Expression;
+ body: Statement;
+}
+
+export interface DoWhileStatement extends BaseStatement {
+ type: "DoWhileStatement";
+ body: Statement;
+ test: Expression;
+}
+
+export interface ForStatement extends BaseStatement {
+ type: "ForStatement";
+ init?: VariableDeclaration | Expression | null;
+ test?: Expression | null;
+ update?: Expression | null;
+ body: Statement;
+}
+
+interface BaseForXStatement extends BaseStatement {
+ left: VariableDeclaration | Pattern;
+ right: Expression;
+ body: Statement;
+}
+
+export interface ForInStatement extends BaseForXStatement {
+ type: "ForInStatement";
+}
+
+export interface DebuggerStatement extends BaseStatement {
+ type: "DebuggerStatement";
+}
+
+export type Declaration =
+ FunctionDeclaration | VariableDeclaration | ClassDeclaration;
+
+interface BaseDeclaration extends BaseStatement { }
+
+export interface FunctionDeclaration extends BaseFunction, BaseDeclaration {
+ type: "FunctionDeclaration";
+ /** It is null when a function declaration is a part of the `export default function` statement */
+ id: Identifier | null;
+ body: BlockStatement;
+}
+
+export interface VariableDeclaration extends BaseDeclaration {
+ type: "VariableDeclaration";
+ declarations: Array;
+ kind: "var" | "let" | "const";
+}
+
+export interface VariableDeclarator extends BaseNode {
+ type: "VariableDeclarator";
+ id: Pattern;
+ init?: Expression | null;
+}
+
+type Expression =
+ ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression |
+ ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression |
+ UpdateExpression | BinaryExpression | AssignmentExpression |
+ LogicalExpression | MemberExpression | ConditionalExpression |
+ CallExpression | NewExpression | SequenceExpression | TemplateLiteral |
+ TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier |
+ AwaitExpression;
+
+export interface BaseExpression extends BaseNode { }
+
+export interface ThisExpression extends BaseExpression {
+ type: "ThisExpression";
+}
+
+export interface ArrayExpression extends BaseExpression {
+ type: "ArrayExpression";
+ elements: Array;
+}
+
+export interface ObjectExpression extends BaseExpression {
+ type: "ObjectExpression";
+ properties: Array;
+}
+
+export interface Property extends BaseNode {
+ type: "Property";
+ key: Expression;
+ value: Expression | Pattern; // Could be an AssignmentProperty
+ kind: "init" | "get" | "set";
+ method: boolean;
+ shorthand: boolean;
+ computed: boolean;
+}
+
+export interface FunctionExpression extends BaseFunction, BaseExpression {
+ id?: Identifier | null;
+ type: "FunctionExpression";
+ body: BlockStatement;
+}
+
+export interface SequenceExpression extends BaseExpression {
+ type: "SequenceExpression";
+ expressions: Array;
+}
+
+export interface UnaryExpression extends BaseExpression {
+ type: "UnaryExpression";
+ operator: UnaryOperator;
+ prefix: true;
+ argument: Expression;
+}
+
+export interface BinaryExpression extends BaseExpression {
+ type: "BinaryExpression";
+ operator: BinaryOperator;
+ left: Expression;
+ right: Expression;
+}
+
+export interface AssignmentExpression extends BaseExpression {
+ type: "AssignmentExpression";
+ operator: AssignmentOperator;
+ left: Pattern | MemberExpression;
+ right: Expression;
+}
+
+export interface UpdateExpression extends BaseExpression {
+ type: "UpdateExpression";
+ operator: UpdateOperator;
+ argument: Expression;
+ prefix: boolean;
+}
+
+export interface LogicalExpression extends BaseExpression {
+ type: "LogicalExpression";
+ operator: LogicalOperator;
+ left: Expression;
+ right: Expression;
+}
+
+export interface ConditionalExpression extends BaseExpression {
+ type: "ConditionalExpression";
+ test: Expression;
+ alternate: Expression;
+ consequent: Expression;
+}
+
+interface BaseCallExpression extends BaseExpression {
+ callee: Expression | Super;
+ arguments: Array;
+}
+export type CallExpression = SimpleCallExpression | NewExpression;
+
+export interface SimpleCallExpression extends BaseCallExpression {
+ type: "CallExpression";
+}
+
+export interface NewExpression extends BaseCallExpression {
+ type: "NewExpression";
+}
+
+export interface MemberExpression extends BaseExpression, BasePattern {
+ type: "MemberExpression";
+ object: Expression | Super;
+ property: Expression;
+ computed: boolean;
+}
+
+export type Pattern =
+ Identifier | ObjectPattern | ArrayPattern | RestElement |
+ AssignmentPattern | MemberExpression;
+
+interface BasePattern extends BaseNode { }
+
+export interface SwitchCase extends BaseNode {
+ type: "SwitchCase";
+ test?: Expression | null;
+ consequent: Array;
+}
+
+export interface CatchClause extends BaseNode {
+ type: "CatchClause";
+ param: Pattern;
+ body: BlockStatement;
+}
+
+export interface Identifier extends BaseNode, BaseExpression, BasePattern {
+ type: "Identifier";
+ name: string;
+}
+
+export type Literal = SimpleLiteral | RegExpLiteral;
+
+export interface SimpleLiteral extends BaseNode, BaseExpression {
+ type: "Literal";
+ value: string | boolean | number | null;
+ raw?: string;
+}
+
+export interface RegExpLiteral extends BaseNode, BaseExpression {
+ type: "Literal";
+ value?: RegExp | null;
+ regex: {
+ pattern: string;
+ flags: string;
+ };
+ raw?: string;
+}
+
+export type UnaryOperator =
+ "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
+
+export type BinaryOperator =
+ "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" |
+ ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" |
+ "instanceof";
+
+export type LogicalOperator = "||" | "&&";
+
+export type AssignmentOperator =
+ "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" |
+ "|=" | "^=" | "&=";
+
+export type UpdateOperator = "++" | "--";
+
+export interface ForOfStatement extends BaseForXStatement {
+ type: "ForOfStatement";
+}
+
+export interface Super extends BaseNode {
+ type: "Super";
+}
+
+export interface SpreadElement extends BaseNode {
+ type: "SpreadElement";
+ argument: Expression;
+}
+
+export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
+ type: "ArrowFunctionExpression";
+ expression: boolean;
+ body: BlockStatement | Expression;
+}
+
+export interface YieldExpression extends BaseExpression {
+ type: "YieldExpression";
+ argument?: Expression | null;
+ delegate: boolean;
+}
+
+export interface TemplateLiteral extends BaseExpression {
+ type: "TemplateLiteral";
+ quasis: Array;
+ expressions: Array;
+}
+
+export interface TaggedTemplateExpression extends BaseExpression {
+ type: "TaggedTemplateExpression";
+ tag: Expression;
+ quasi: TemplateLiteral;
+}
+
+export interface TemplateElement extends BaseNode {
+ type: "TemplateElement";
+ tail: boolean;
+ value: {
+ cooked: string;
+ raw: string;
+ };
+}
+
+export interface AssignmentProperty extends Property {
+ value: Pattern;
+ kind: "init";
+ method: boolean; // false
+}
+
+export interface ObjectPattern extends BasePattern {
+ type: "ObjectPattern";
+ properties: Array;
+}
+
+export interface ArrayPattern extends BasePattern {
+ type: "ArrayPattern";
+ elements: Array;
+}
+
+export interface RestElement extends BasePattern {
+ type: "RestElement";
+ argument: Pattern;
+}
+
+export interface AssignmentPattern extends BasePattern {
+ type: "AssignmentPattern";
+ left: Pattern;
+ right: Expression;
+}
+
+export type Class = ClassDeclaration | ClassExpression;
+interface BaseClass extends BaseNode {
+ superClass?: Expression | null;
+ body: ClassBody;
+}
+
+export interface ClassBody extends BaseNode {
+ type: "ClassBody";
+ body: Array;
+}
+
+export interface MethodDefinition extends BaseNode {
+ type: "MethodDefinition";
+ key: Expression;
+ value: FunctionExpression;
+ kind: "constructor" | "method" | "get" | "set";
+ computed: boolean;
+ static: boolean;
+}
+
+export interface ClassDeclaration extends BaseClass, BaseDeclaration {
+ type: "ClassDeclaration";
+ /** It is null when a class declaration is a part of the `export default class` statement */
+ id: Identifier | null;
+}
+
+export interface ClassExpression extends BaseClass, BaseExpression {
+ type: "ClassExpression";
+ id?: Identifier | null;
+}
+
+export interface MetaProperty extends BaseExpression {
+ type: "MetaProperty";
+ meta: Identifier;
+ property: Identifier;
+}
+
+export type ModuleDeclaration =
+ ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration |
+ ExportAllDeclaration;
+interface BaseModuleDeclaration extends BaseNode { }
+
+export type ModuleSpecifier =
+ ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier |
+ ExportSpecifier;
+interface BaseModuleSpecifier extends BaseNode {
+ local: Identifier;
+}
+
+export interface ImportDeclaration extends BaseModuleDeclaration {
+ type: "ImportDeclaration";
+ specifiers: Array;
+ source: Literal;
+}
+
+export interface ImportSpecifier extends BaseModuleSpecifier {
+ type: "ImportSpecifier";
+ imported: Identifier;
+}
+
+export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
+ type: "ImportDefaultSpecifier";
+}
+
+export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
+ type: "ImportNamespaceSpecifier";
+}
+
+export interface ExportNamedDeclaration extends BaseModuleDeclaration {
+ type: "ExportNamedDeclaration";
+ declaration?: Declaration | null;
+ specifiers: Array;
+ source?: Literal | null;
+}
+
+export interface ExportSpecifier extends BaseModuleSpecifier {
+ type: "ExportSpecifier";
+ exported: Identifier;
+}
+
+export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
+ type: "ExportDefaultDeclaration";
+ declaration: Declaration | Expression;
+}
+
+export interface ExportAllDeclaration extends BaseModuleDeclaration {
+ type: "ExportAllDeclaration";
+ source: Literal;
+}
+
+export interface AwaitExpression extends BaseExpression {
+ type: "AwaitExpression";
+ argument: Expression;
+}
diff --git a/frontend/node_modules/@types/estree/package.json b/frontend/node_modules/@types/estree/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..513aaf152a045300cbbcf3aa5b59678c1fce405d
--- /dev/null
+++ b/frontend/node_modules/@types/estree/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "@types/estree",
+ "version": "0.0.39",
+ "description": "TypeScript definitions for ESTree AST specification",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "RReverser",
+ "url": "https://github.com/RReverser",
+ "githubUsername": "RReverser"
+ }
+ ],
+ "main": "",
+ "repository": {
+ "type": "git",
+ "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "427ba878ebb5570e15aab870f708720d146a1c4b272e4a9d9990db4d1d033170",
+ "typeScriptVersion": "2.0"
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@types/flatbuffers/LICENSE b/frontend/node_modules/@types/flatbuffers/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..21071075c24599ee98254f702bcfc504cdc275a6
--- /dev/null
+++ b/frontend/node_modules/@types/flatbuffers/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ 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
diff --git a/frontend/node_modules/@types/flatbuffers/README.md b/frontend/node_modules/@types/flatbuffers/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b7172fee291a2304b6c6454c4df52a409bedf4a3
--- /dev/null
+++ b/frontend/node_modules/@types/flatbuffers/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/flatbuffers`
+
+# Summary
+This package contains type definitions for flatbuffers (http://google.github.io/flatbuffers/index.html).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flatbuffers.
+
+### Additional Details
+ * Last updated: Fri, 03 Jan 2020 18:11:06 GMT
+ * Dependencies: none
+ * Global values: none
+
+# Credits
+These definitions were written by Kamil Rojewski (kamil.rojewski@gmail.com), and Robin Giese (robin@grumpycorp.com).
diff --git a/frontend/node_modules/@types/flatbuffers/index.d.ts b/frontend/node_modules/@types/flatbuffers/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f7bd3af6a857227d1dfd39760d69e05d06287d09
--- /dev/null
+++ b/frontend/node_modules/@types/flatbuffers/index.d.ts
@@ -0,0 +1,304 @@
+// Type definitions for flatbuffers 1.10
+// Project: http://google.github.io/flatbuffers/index.html
+// Definitions by: Kamil Rojewski
+// Robin Giese
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+export { flatbuffers };
+
+declare global {
+ namespace flatbuffers {
+ type Offset = number;
+
+ interface Table {
+ bb: ByteBuffer|null;
+ bb_pos: number;
+ }
+
+ const SIZEOF_SHORT: number;
+ const SIZEOF_INT: number;
+ const FILE_IDENTIFIER_LENGTH: number;
+ const SIZE_PREFIX_LENGTH: number;
+
+ enum Encoding { UTF8_BYTES, UTF16_STRING }
+
+ const int32: Int32Array;
+ const float32: Float32Array;
+ const float64: Float64Array;
+ const isLittleEndian: boolean;
+
+ ////////////////////////////////////////////////////////////////////////////////
+
+ class Long {
+ low: number;
+ high: number;
+ static ZERO: Long;
+ constructor(low: number, high: number);
+ toFloat64(): number;
+ equals(other: any): boolean;
+ static create(low: number, high: number): Long;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+
+ class Builder {
+ constructor(initial_size?: number);
+
+ /**
+ * Reset all the state in this FlatBufferBuilder
+ * so it can be reused to construct another buffer.
+ */
+ clear(): void;
+
+ /**
+ * In order to save space, fields that are set to their default value
+ * don't get serialized into the buffer. Forcing defaults provides a
+ * way to manually disable this optimization.
+ *
+ * @param forceDefaults true always serializes default values
+ */
+ forceDefaults(forceDefaults: boolean): void;
+
+ /**
+ * Get the ByteBuffer representing the FlatBuffer. Only call this after you've
+ * called finish(). The actual data starts at the ByteBuffer's current position,
+ * not necessarily at 0.
+ */
+ dataBuffer(): ByteBuffer;
+
+ /**
+ * Get the ByteBuffer representing the FlatBuffer. Only call this after you've
+ * called finish(). The actual data starts at the ByteBuffer's current position,
+ * not necessarily at 0.
+ */
+ asUint8Array(): Uint8Array;
+
+ /**
+ * Prepare to write an element of `size` after `additional_bytes` have been
+ * written, e.g. if you write a string, you need to align such the int length
+ * field is aligned to 4 bytes, and the string data follows it directly. If all
+ * you need to do is alignment, `additional_bytes` will be 0.
+ *
+ * @param size This is the of the new element to write
+ * @param additional_bytes The padding size
+ */
+ prep(size: number, additional_bytes: number): void;
+
+ pad(byte_size: number): void;
+
+ writeInt8(value: number): void;
+ writeInt16(value: number): void;
+ writeInt32(value: number): void;
+ writeInt64(value: Long): void;
+ writeFloat32(value: number): void;
+ writeFloat64(value: number): void;
+
+ addInt8(value: number): void;
+ addInt16(value: number): void;
+ addInt32(value: number): void;
+ addInt64(value: Long): void;
+ addFloat32(value: number): void;
+ addFloat64(value: number): void;
+ addFieldInt8(voffset: number, value: number, defaultValue: number): void;
+ addFieldInt16(voffset: number, value: number, defaultValue: number): void;
+ addFieldInt32(voffset: number, value: number, defaultValue: number): void;
+ addFieldInt64(voffset: number, value: Long, defaultValue: Long): void;
+ addFieldFloat32(voffset: number, value: number, defaultValue: number): void;
+ addFieldFloat64(voffset: number, value: number, defaultValue: number): void;
+
+ addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void;
+
+ /**
+ * Structs are stored inline, so nothing additional is being added. `d` is always 0.
+ */
+ addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void;
+
+ /**
+ * Structures are always stored inline, they need to be created right
+ * where they're used. You'll get this assertion failure if you
+ * created it elsewhere.
+ *
+ * @param obj The offset of the created object
+ */
+ nested(obj: Offset): void;
+
+ /**
+ * Should not be creating any other object, string or vector
+ * while an object is being constructed
+ */
+ notNested(): void;
+
+ /**
+ * Set the current vtable at `voffset` to the current location in the buffer.
+ */
+ slot(voffset: number): void;
+
+ /**
+ * @returns Offset relative to the end of the buffer.
+ */
+ offset(): Offset;
+
+ /**
+ * Doubles the size of the backing ByteBuffer and copies the old data towards
+ * the end of the new buffer (since we build the buffer backwards).
+ *
+ * @param bb The current buffer with the existing data
+ * @returns A new byte buffer with the old data copied
+ * to it. The data is located at the end of the buffer.
+ */
+ static growByteBuffer(bb: ByteBuffer): ByteBuffer;
+
+ /**
+ * Adds on offset, relative to where it will be written.
+ *
+ * @param offset The offset to add
+ */
+ addOffset(offset: Offset): void;
+
+ /**
+ * Start encoding a new object in the buffer. Users will not usually need to
+ * call this directly. The FlatBuffers compiler will generate helper methods
+ * that call this method internally.
+ */
+ startObject(numfields: number): void;
+
+ /**
+ * Finish off writing the object that is under construction.
+ *
+ * @returns The offset to the object inside `dataBuffer`
+ */
+ endObject(): Offset;
+
+ finish(root_table: Offset, file_identifier?: string, size_prefix?: boolean): void;
+ finishSizePrefixed(root_table: Offset, file_identifier?: string): void;
+
+ /**
+ * This checks a required field has been set in a given table that has
+ * just been constructed.
+ */
+ requiredField(table: Offset, field: number): void;
+
+ /**
+ * Start a new array/vector of objects. Users usually will not call
+ * this directly. The FlatBuffers compiler will create a start/end
+ * method for vector types in generated code.
+ *
+ * @param elem_size The size of each element in the array
+ * @param num_elems The number of elements in the array
+ * @param alignment The alignment of the array
+ */
+ startVector(elem_size: number, num_elems: number, alignment: number): void;
+
+ /**
+ * Finish off the creation of an array and all its elements. The array must be
+ * created with `startVector`.
+ *
+ * @returns The offset at which the newly created array
+ * starts.
+ */
+ endVector(): Offset;
+
+ /**
+ * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed
+ * instead of a string, it is assumed to contain valid UTF-8 encoded data.
+ *
+ * @param s The string to encode
+ * @return The offset in the buffer where the encoded string starts
+ */
+ createString(s: string|Uint8Array): Offset;
+
+ /**
+ * Convenience function for creating Long objects.
+ */
+ createLong(low: number, high: number): Long;
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+
+ class ByteBuffer {
+ constructor(bytes: Uint8Array);
+
+ static allocate(byte_size: number): ByteBuffer;
+
+ clear(): void;
+
+ bytes(): Uint8Array;
+
+ position(): number;
+
+ setPosition(position: number): void;
+
+ capacity(): number;
+
+ readInt8(offset: number): number;
+ readUint8(offset: number): number;
+ readInt16(offset: number): number;
+ readUint16(offset: number): number;
+ readInt32(offset: number): number;
+ readUint32(offset: number): number;
+ readInt64(offset: number): Long;
+ readUint64(offset: number): Long;
+ readFloat32(offset: number): number;
+ readFloat64(offset: number): number;
+
+ writeInt8(offset: number, value: number): void;
+ writeUint8(offset: number, value: number): void;
+ writeInt16(offset: number, value: number): void;
+ writeUint16(offset: number, value: number): void;
+ writeInt32(offset: number, value: number): void;
+ writeUint32(offset: number, value: number): void;
+ writeInt64(offset: number, value: Long): void;
+ writeUint64(offset: number, value: Long): void;
+ writeFloat32(offset: number, value: number): void;
+ writeFloat64(offset: number, value: number): void;
+
+ getBufferIdentifier(): string;
+
+ /**
+ * Look up a field in the vtable, return an offset into the object, or 0 if the
+ * field is not present.
+ */
+ __offset(bb_pos: number, vtable_offset: number): number;
+
+ /**
+ * Initialize any Table-derived type to point to the union at the given offset.
+ */
+ __union(t: T, offset: number): T;
+
+ /**
+ * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.
+ * This allocates a new string and converts to wide chars upon each access.
+ *
+ * To avoid the conversion to UTF-16, pass flatbuffers.Encoding.UTF8_BYTES as
+ * the "optionalEncoding" argument. This is useful for avoiding conversion to
+ * and from UTF-16 when the data will just be packaged back up in another
+ * FlatBuffer later on.
+ *
+ * @param optionalEncoding Defaults to UTF16_STRING
+ */
+ __string(offset: number, optionalEncoding?: Encoding): string|Uint8Array;
+
+ /**
+ * Retrieve the relative offset stored at "offset"
+ */
+ __indirect(offset: number): number;
+
+ /**
+ * Get the start of data of a vector whose offset is stored at "offset" in this object.
+ */
+ __vector(offset: number): number;
+
+ /**
+ * Get the length of a vector whose offset is stored at "offset" in this object.
+ */
+ __vector_len(offset: number): number;
+
+ __has_identifier(ident: string): boolean;
+
+ /**
+ * Convenience function for creating Long objects.
+ */
+ createLong(low: number, high: number): Long;
+ }
+ }
+}
diff --git a/frontend/node_modules/@types/flatbuffers/package.json b/frontend/node_modules/@types/flatbuffers/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..7848d87a5b9cc876fea81524ecb2297e40061391
--- /dev/null
+++ b/frontend/node_modules/@types/flatbuffers/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@types/flatbuffers",
+ "version": "1.10.0",
+ "description": "TypeScript definitions for flatbuffers",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Kamil Rojewski",
+ "url": "kamil.rojewski@gmail.com"
+ },
+ {
+ "name": "Robin Giese",
+ "url": "robin@grumpycorp.com"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/flatbuffers"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "4a501959d37c0653420b35adb414b2e77419fe1025615d8f988758bf84582800",
+ "typeScriptVersion": "2.8"
+}
\ No newline at end of file
diff --git a/frontend/node_modules/@types/node/LICENSE b/frontend/node_modules/@types/node/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5
--- /dev/null
+++ b/frontend/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ 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
diff --git a/frontend/node_modules/@types/node/README.md b/frontend/node_modules/@types/node/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..eb97075650e47a440ca976666b25d8e93257d9d4
--- /dev/null
+++ b/frontend/node_modules/@types/node/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for Node.js (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Mon, 25 Oct 2021 23:31:45 GMT
+ * Dependencies: none
+ * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), and [wafuwafu13](https://github.com/wafuwafu13).
diff --git a/frontend/node_modules/@types/node/assert.d.ts b/frontend/node_modules/@types/node/assert.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9f916c16bcc478d2f7b33e76f068e88ec3601d3c
--- /dev/null
+++ b/frontend/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,912 @@
+/**
+ * The `assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/assert.js)
+ */
+declare module 'assert' {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `assert` module
+ * will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ actual: unknown;
+ expected: unknown;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is currently experimental and behavior might still change.
+ * @since v14.2.0, v12.19.0
+ * @experimental
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls any>(fn?: Func, exact?: number): Func;
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * function foo() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * tracker.report();
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return of objects containing information about the wrapper functions returned by `calls`.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison) ( `==` ). `NaN` is special handled
+ * and treated as being identical in case both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison)(`!=` ). `NaN` is special handled and treated as
+ * being identical in case both
+ * sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2
+ * }
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj4 = Object.create(obj1);
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text'
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text'
+ * }
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * }
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text'
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i
+ * }
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error'
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops'
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
+ * handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
+ *
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value'
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second
+ * argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise;
+ function rejects(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise;
+ function doesNotReject(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ const strict: Omit & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
diff --git a/frontend/node_modules/@types/node/assert/strict.d.ts b/frontend/node_modules/@types/node/assert/strict.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b4319b974861f6cad84b745485af55264b13c3d8
--- /dev/null
+++ b/frontend/node_modules/@types/node/assert/strict.d.ts
@@ -0,0 +1,8 @@
+declare module 'assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
+declare module 'node:assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
diff --git a/frontend/node_modules/@types/node/async_hooks.d.ts b/frontend/node_modules/@types/node/async_hooks.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..35b9be2c1153f64c8d2c54415c7cc80d73957ed2
--- /dev/null
+++ b/frontend/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,497 @@
+/**
+ * The `async_hooks` module provides an API to track asynchronous resources. It
+ * can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/async_hooks.js)
+ */
+declare module 'async_hooks' {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'async_hooks';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on `promise execution tracking`.
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'fs';
+ * import { executionAsyncId, executionAsyncResource } from 'async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * }
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on `promise execution tracking`.
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { }
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since 9.3)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind any, ThisArg>(
+ fn: Func,
+ type?: string,
+ thisArg?: ThisArg
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind any>(
+ fn: Func
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ *
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
+ * implementation that involves significant optimizations that are non-obvious to
+ * implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'http';
+ * import { AsyncLocalStorage } from 'async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage {
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function or
+ * the asynchronous operations created within the callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
diff --git a/frontend/node_modules/@types/node/buffer.d.ts b/frontend/node_modules/@types/node/buffer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..cfcd33e0a0e3255ccf0077b9d8d1d1238b811dab
--- /dev/null
+++ b/frontend/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,2142 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value & 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/buffer.js)
+ */
+declare module 'buffer' {
+ import { BinaryLike } from 'node:crypto';
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new (size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0
+ * @experimental
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0
+ */
+ arrayBuffer(): Promise;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0
+ */
+ text(): Promise;
+ /**
+ * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): unknown; // pending web streams types
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ global {
+ // Buffer class
+ type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
+ type WithImplicitCoercion =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new (str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new (size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: ReadonlyArray): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new (buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | ReadonlyArray): Buffer;
+ from(data: WithImplicitCoercion | string>): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion
+ | {
+ [Symbol.toPrimitive](hint: 'string'): string;
+ },
+ encoding?: BufferEncoding
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints:
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: ReadonlyArray, totalLength?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ , ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): number;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary):
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the
+ * deprecated`new Buffer(size)` constructor only when `size` is less than or equal
+ * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created
+ * if `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer extends Uint8Array {
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value && value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints:
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: 'Buffer';
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [ , , ]
+ * // (This result is equal to: [buf1, buf3, buf2].)
+ * ```
+ *
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+ *
+ * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2, 0, 6, 4));
+ * // Prints: -1
+ * console.log(buf1.compare(buf2, 5, 6, 5));
+ * // Prints: 1
+ * ```
+ *
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+ * @since v0.11.13
+ * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+ */
+ compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+ *
+ * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+ * for all TypedArrays, including Node.js `Buffer`s, although it takes
+ * different function arguments.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create two `Buffer` instances.
+ * const buf1 = Buffer.allocUnsafe(26);
+ * const buf2 = Buffer.allocUnsafe(26).fill('!');
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+ * buf1.copy(buf2, 8, 16, 20);
+ * // This is equivalent to:
+ * // buf2.set(buf1.subarray(16, 20), 8);
+ *
+ * console.log(buf2.toString('ascii', 0, 25));
+ * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+ * ```
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a `Buffer` and copy data from one region to an overlapping region
+ * // within the same `Buffer`.
+ *
+ * const buf = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf[i] = i + 97;
+ * }
+ *
+ * buf.copy(buf, 0, 4, 10);
+ *
+ * console.log(buf.toString());
+ * // Prints: efghijghijklmnopqrstuvwxyz
+ * ```
+ * @since v0.1.90
+ * @param target A `Buffer` or {@link Uint8Array} to copy into.
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+ * @return The number of bytes copied.
+ */
+ copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * This is the same behavior as `buf.subarray()`.
+ *
+ * This method is not compatible with the `Uint8Array.prototype.slice()`,
+ * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+ * copiedBuf[0]++;
+ * console.log(copiedBuf.toString());
+ * // Prints: cuffer
+ *
+ * console.log(buf.toString());
+ * // Prints: buffer
+ * ```
+ * @since v0.3.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ slice(start?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * Specifying `end` greater than `buf.length` will return the same result as
+ * that of `end` equal to `buf.length`.
+ *
+ * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+ *
+ * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+ * // from the original `Buffer`.
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * const buf2 = buf1.subarray(0, 3);
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: abc
+ *
+ * buf1[0] = 33;
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: !bc
+ * ```
+ *
+ * Specifying negative indexes causes the slice to be generated relative to the
+ * end of `buf` rather than the beginning.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * console.log(buf.subarray(-6, -1).toString());
+ * // Prints: buffe
+ * // (Equivalent to buf.subarray(0, 5).)
+ *
+ * console.log(buf.subarray(-6, -2).toString());
+ * // Prints: buff
+ * // (Equivalent to buf.subarray(0, 4).)
+ *
+ * console.log(buf.subarray(-5, -2).toString());
+ * // Prints: uff
+ * // (Equivalent to buf.subarray(1, 4).)
+ * ```
+ * @since v3.0.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ subarray(start?: number, end?: number): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64BE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64LE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * This function is also available under the `writeBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * This function is also available under the `writeBigUint64LE` alias.
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than a signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+ * signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64BE(0));
+ * // Prints: 4294967295n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64BE(offset?: number): bigint;
+ /**
+ * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64LE(0));
+ * // Prints: 18446744069414584320n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64LE(offset?: number): bigint;
+ /**
+ * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64BE(offset?: number): bigint;
+ /**
+ * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64LE(offset?: number): bigint;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntLE(0, 6).toString(16));
+ * // Prints: ab9078563412
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readUIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntLE(0, 6).toString(16));
+ * // Prints: -546f87a9cbee
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * console.log(buf.readIntBE(1, 0).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, -2]);
+ *
+ * console.log(buf.readUInt8(0));
+ * // Prints: 1
+ * console.log(buf.readUInt8(1));
+ * // Prints: 254
+ * console.log(buf.readUInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readUInt8(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16LE(0).toString(16));
+ * // Prints: 3412
+ * console.log(buf.readUInt16LE(1).toString(16));
+ * // Prints: 5634
+ * console.log(buf.readUInt16LE(2).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16BE(0).toString(16));
+ * // Prints: 1234
+ * console.log(buf.readUInt16BE(1).toString(16));
+ * // Prints: 3456
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16BE(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32LE(0).toString(16));
+ * // Prints: 78563412
+ * console.log(buf.readUInt32LE(1).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32BE(0).toString(16));
+ * // Prints: 12345678
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32BE(offset?: number): number;
+ /**
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([-1, 5]);
+ *
+ * console.log(buf.readInt8(0));
+ * // Prints: -1
+ * console.log(buf.readInt8(1));
+ * // Prints: 5
+ * console.log(buf.readInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readInt8(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16LE(0));
+ * // Prints: 1280
+ * console.log(buf.readInt16LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16BE(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32LE(0));
+ * // Prints: 83886080
+ * console.log(buf.readInt32LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32BE(offset?: number): number;
+ /**
+ * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatLE(0));
+ * // Prints: 1.539989614439558e-36
+ * console.log(buf.readFloatLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatLE(offset?: number): number;
+ /**
+ * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatBE(0));
+ * // Prints: 2.387939260590663e-38
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatBE(offset?: number): number;
+ /**
+ * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleLE(0));
+ * // Prints: 5.447603722011605e-270
+ * console.log(buf.readDoubleLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleLE(offset?: number): number;
+ /**
+ * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleBE(0));
+ * // Prints: 8.20788039913184e-304
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * buf1.swap16();
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap16();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ *
+ * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+ * between UTF-16 little-endian and UTF-16 big-endian:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+ * buf.swap16(); // Convert to big-endian UTF-16 text.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap16(): Buffer;
+ /**
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * buf1.swap32();
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap32();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap32(): Buffer;
+ /**
+ * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+ * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * buf1.swap64();
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap64();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v6.3.0
+ * @return A reference to `buf`.
+ */
+ swap64(): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a
+ * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+ * other than an unsigned 8-bit integer.
+ *
+ * This function is also available under the `writeUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt8(0x3, 0);
+ * buf.writeUInt8(0x4, 1);
+ * buf.writeUInt8(0x23, 2);
+ * buf.writeUInt8(0x42, 3);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16LE(0xdead, 0);
+ * buf.writeUInt16LE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16BE(0xdead, 0);
+ * buf.writeUInt16BE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32LE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32BE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+ * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+ * a signed 8-bit integer.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt8(2, 0);
+ * buf.writeInt8(-2, 1);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16LE(0x0304, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16BE(0x0102, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32LE(0x05060708, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32BE(0x01020304, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatLE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatBE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatBE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleLE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleBE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleBE(value: number, offset?: number): number;
+ /**
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+ * the entire `buf` will be filled:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Fill a `Buffer` with the ASCII character 'h'.
+ *
+ * const b = Buffer.allocUnsafe(50).fill('h');
+ *
+ * console.log(b.toString());
+ * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+ * ```
+ *
+ * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+ * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+ * filled with `value & 255`.
+ *
+ * If the final write of a `fill()` operation falls on a multi-byte character,
+ * then only the bytes of that character that fit into `buf` are written:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+ *
+ * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+ * // Prints:
+ * ```
+ *
+ * If `value` contains invalid characters, it is truncated; if no valid
+ * fill data remains, an exception is thrown:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(5);
+ *
+ * console.log(buf.fill('a'));
+ * // Prints:
+ * console.log(buf.fill('aazz', 'hex'));
+ * // Prints:
+ * console.log(buf.fill('zz', 'hex'));
+ * // Throws an exception.
+ * ```
+ * @since v0.5.0
+ * @param value The value with which to fill `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+ * @return A reference to `buf`.
+ */
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+ /**
+ * If `value` is:
+ *
+ * * a string, `value` is interpreted according to the character encoding in`encoding`.
+ * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+ * To compare a partial `Buffer`, use `buf.slice()`.
+ * * a number, `value` will be interpreted as an unsigned 8-bit integer
+ * value between `0` and `255`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.indexOf('this'));
+ * // Prints: 0
+ * console.log(buf.indexOf('is'));
+ * // Prints: 2
+ * console.log(buf.indexOf(Buffer.from('a buffer')));
+ * // Prints: 8
+ * console.log(buf.indexOf(97));
+ * // Prints: 8 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.indexOf(Buffer.from('a buffer example')));
+ * // Prints: -1
+ * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: 8
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+ * // Prints: 4
+ * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+ * // Prints: 6
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. If the result
+ * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+ * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.indexOf(99.9));
+ * console.log(b.indexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN or 0.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.indexOf('b', undefined));
+ * console.log(b.indexOf('b', {}));
+ * console.log(b.indexOf('b', null));
+ * console.log(b.indexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+ * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+ * @since v1.5.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+ * rather than the first occurrence.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this buffer is a buffer');
+ *
+ * console.log(buf.lastIndexOf('this'));
+ * // Prints: 0
+ * console.log(buf.lastIndexOf('buffer'));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(97));
+ * // Prints: 15 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+ * // Prints: -1
+ * console.log(buf.lastIndexOf('buffer', 5));
+ * // Prints: 5
+ * console.log(buf.lastIndexOf('buffer', 4));
+ * // Prints: -1
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+ * // Prints: 6
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+ * // Prints: 4
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+ * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+ * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.lastIndexOf(99.9));
+ * console.log(b.lastIndexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.lastIndexOf('b', undefined));
+ * console.log(b.lastIndexOf('b', {}));
+ *
+ * // Passing a byteOffset that coerces to 0.
+ * // Prints: -1, equivalent to passing 0.
+ * console.log(b.lastIndexOf('b', null));
+ * console.log(b.lastIndexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+ * @since v6.0.0
+ * @param value What to search for.
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
+ * of `buf`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Log the entire contents of a `Buffer`.
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const pair of buf.entries()) {
+ * console.log(pair);
+ * }
+ * // Prints:
+ * // [0, 98]
+ * // [1, 117]
+ * // [2, 102]
+ * // [3, 102]
+ * // [4, 101]
+ * // [5, 114]
+ * ```
+ * @since v1.1.0
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Equivalent to `buf.indexOf() !== -1`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.includes('this'));
+ * // Prints: true
+ * console.log(buf.includes('is'));
+ * // Prints: true
+ * console.log(buf.includes(Buffer.from('a buffer')));
+ * // Prints: true
+ * console.log(buf.includes(97));
+ * // Prints: true (97 is the decimal ASCII value for 'a')
+ * console.log(buf.includes(Buffer.from('a buffer example')));
+ * // Prints: false
+ * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: true
+ * console.log(buf.includes('this', 4));
+ * // Prints: false
+ * ```
+ * @since v5.3.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+ * @return `true` if `value` was found in `buf`, `false` otherwise.
+ */
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const key of buf.keys()) {
+ * console.log(key);
+ * }
+ * // Prints:
+ * // 0
+ * // 1
+ * // 2
+ * // 3
+ * // 4
+ * // 5
+ * ```
+ * @since v1.1.0
+ */
+ keys(): IterableIterator;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
+ * called automatically when a `Buffer` is used in a `for..of` statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const value of buf.values()) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ *
+ * for (const value of buf) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ * ```
+ * @since v1.1.0
+ */
+ values(): IterableIterator;
+ }
+ var Buffer: BufferConstructor;
+ /**
+ * Decodes a string of Base64-encoded data into bytes, and encodes those bytes
+ * into a string using Latin-1 (ISO-8859-1).
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0
+ * @deprecated Use `Buffer.from(data, 'base64')` instead.
+ * @param data The Base64-encoded input string.
+ */
+ function atob(data: string): string;
+ /**
+ * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
+ * into a string using Base64.
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0
+ * @deprecated Use `buf.toString('base64')` instead.
+ * @param data An ASCII (Latin1) string.
+ */
+ function btoa(data: string): string;
+ }
+}
+declare module 'node:buffer' {
+ export * from 'buffer';
+}
diff --git a/frontend/node_modules/@types/node/child_process.d.ts b/frontend/node_modules/@types/node/child_process.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d38314551c20f5edd498c7a5c64d348b300f5c5e
--- /dev/null
+++ b/frontend/node_modules/@types/node/child_process.d.ts
@@ -0,0 +1,1366 @@
+/**
+ * The `child_process` module provides the ability to spawn subprocesses in
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
+ * is primarily provided by the {@link spawn} function:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
+ * the parent Node.js process and the spawned subprocess. These pipes have
+ * limited (and platform-specific) capacity. If the subprocess writes to
+ * stdout in excess of that limit without the output being captured, the
+ * subprocess blocks waiting for the pipe buffer to accept more data. This is
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
+ *
+ * The command lookup is performed using the `options.env.PATH` environment
+ * variable if it is in the `options` object. Otherwise, `process.env.PATH` is
+ * used.
+ *
+ * On Windows, environment variables are case-insensitive. Node.js
+ * lexicographically sorts the `env` keys and uses the first one that
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
+ * passed to the subprocess. This might lead to issues on Windows when passing
+ * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`.
+ *
+ * The {@link spawn} method spawns the child process asynchronously,
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
+ * the event loop until the spawned process either exits or is terminated.
+ *
+ * For convenience, the `child_process` module provides a handful of synchronous
+ * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
+ * top of {@link spawn} or {@link spawnSync}.
+ *
+ * * {@link exec}: spawns a shell and runs a command within that
+ * shell, passing the `stdout` and `stderr` to a callback function when
+ * complete.
+ * * {@link execFile}: similar to {@link exec} except
+ * that it spawns the command directly without first spawning a shell by
+ * default.
+ * * {@link fork}: spawns a new Node.js process and invokes a
+ * specified module with an IPC communication channel established that allows
+ * sending messages between parent and child.
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
+ *
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
+ * the synchronous methods can have significant impact on performance due to
+ * stalling the event loop while spawned processes complete.
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/child_process.js)
+ */
+declare module 'child_process' {
+ import { ObjectEncodingOptions } from 'node:fs';
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as net from 'node:net';
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
+ import { URL } from 'node:url';
+ type Serializable = string | object | number | boolean | bigint;
+ type SendHandle = net.Socket | net.Server;
+ /**
+ * Instances of the `ChildProcess` represent spawned child processes.
+ *
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+ * instances of `ChildProcess`.
+ * @since v2.2.0
+ */
+ class ChildProcess extends EventEmitter {
+ /**
+ * A `Writable Stream` that represents the child process's `stdin`.
+ *
+ * If a child process waits to read all of its input, the child will not continue
+ * until this stream has been closed via `end()`.
+ *
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stdin` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdin: Writable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stdout`.
+ *
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+ * refer to the same value.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn('ls');
+ *
+ * subprocess.stdout.on('data', (data) => {
+ * console.log(`Received chunk ${data}`);
+ * });
+ * ```
+ *
+ * The `subprocess.stdout` property can be `null` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdout: Readable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stderr`.
+ *
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stderr` property can be `null` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stderr: Readable | null;
+ /**
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
+ * no IPC channel currently exists, this property is `undefined`.
+ * @since v7.1.0
+ */
+ readonly channel?: Pipe | null | undefined;
+ /**
+ * A sparse array of pipes to the child process, corresponding with positions in
+ * the `stdio` option passed to {@link spawn} that have been set
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`,
+ * respectively.
+ *
+ * In the following example, only the child's fd `1` (stdout) is configured as a
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+ * in the array are `null`.
+ *
+ * ```js
+ * const assert = require('assert');
+ * const fs = require('fs');
+ * const child_process = require('child_process');
+ *
+ * const subprocess = child_process.spawn('ls', {
+ * stdio: [
+ * 0, // Use parent's stdin for child.
+ * 'pipe', // Pipe child's stdout to parent.
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+ * ]
+ * });
+ *
+ * assert.strictEqual(subprocess.stdio[0], null);
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+ *
+ * assert(subprocess.stdout);
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+ *
+ * assert.strictEqual(subprocess.stdio[2], null);
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+ * ```
+ *
+ * The `subprocess.stdio` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.7.10
+ */
+ readonly stdio: [
+ Writable | null,
+ // stdin
+ Readable | null,
+ // stdout
+ Readable | null,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra
+ Readable | Writable | null | undefined // extra
+ ];
+ /**
+ * The `subprocess.killed` property indicates whether the child process
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
+ * does not indicate that the child process has been terminated.
+ * @since v0.5.10
+ */
+ readonly killed: boolean;
+ /**
+ * Returns the process identifier (PID) of the child process. If the child process
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
+ * emitted.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * console.log(`Spawned child pid: ${grep.pid}`);
+ * grep.stdin.end();
+ * ```
+ * @since v0.1.90
+ */
+ readonly pid?: number | undefined;
+ /**
+ * The `subprocess.connected` property indicates whether it is still possible to
+ * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages.
+ * @since v0.7.2
+ */
+ readonly connected: boolean;
+ /**
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
+ * If the child process is still running, the field will be `null`.
+ */
+ readonly exitCode: number | null;
+ /**
+ * The `subprocess.signalCode` property indicates the signal received by
+ * the child process if any, else `null`.
+ */
+ readonly signalCode: NodeJS.Signals | null;
+ /**
+ * The `subprocess.spawnargs` property represents the full list of command-line
+ * arguments the child process was launched with.
+ */
+ readonly spawnargs: string[];
+ /**
+ * The `subprocess.spawnfile` property indicates the executable file name of
+ * the child process that is launched.
+ *
+ * For {@link fork}, its value will be equal to `process.execPath`.
+ * For {@link spawn}, its value will be the name of
+ * the executable file.
+ * For {@link exec}, its value will be the name of the shell
+ * in which the child process is launched.
+ */
+ readonly spawnfile: string;
+ /**
+ * The `subprocess.kill()` method sends a signal to the child process. If no
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * grep.on('close', (code, signal) => {
+ * console.log(
+ * `child process terminated due to receipt of signal ${signal}`);
+ * });
+ *
+ * // Send SIGHUP to process.
+ * grep.kill('SIGHUP');
+ * ```
+ *
+ * The `ChildProcess` object may emit an `'error'` event if the signal
+ * cannot be delivered. Sending a signal to a child process that has already exited
+ * is not an error but may have unforeseen consequences. Specifically, if the
+ * process identifier (PID) has been reassigned to another process, the signal will
+ * be delivered to that process instead which can have unexpected results.
+ *
+ * While the function is called `kill`, the signal delivered to the child process
+ * may not actually terminate the process.
+ *
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+ *
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
+ * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`).
+ * See `Signal Events` for more details.
+ *
+ * On Linux, child processes of child processes will not be terminated
+ * when attempting to kill their parent. This is likely to happen when running a
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+ *
+ * ```js
+ * 'use strict';
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(
+ * 'sh',
+ * [
+ * '-c',
+ * `node -e "setInterval(() => {
+ * console.log(process.pid, 'is alive')
+ * }, 500);"`,
+ * ], {
+ * stdio: ['inherit', 'inherit', 'inherit']
+ * }
+ * );
+ *
+ * setTimeout(() => {
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
+ * }, 2000);
+ * ```
+ * @since v0.1.90
+ */
+ kill(signal?: NodeJS.Signals | number): boolean;
+ /**
+ * When an IPC channel has been established between the parent and child (
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
+ * be used to send messages to the child process. When the child process is a
+ * Node.js instance, these messages can be received via the `'message'` event.
+ *
+ * The message goes through serialization and parsing. The resulting
+ * message might not be the same as what is originally sent.
+ *
+ * For example, in the parent script:
+ *
+ * ```js
+ * const cp = require('child_process');
+ * const n = cp.fork(`${__dirname}/sub.js`);
+ *
+ * n.on('message', (m) => {
+ * console.log('PARENT got message:', m);
+ * });
+ *
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
+ * n.send({ hello: 'world' });
+ * ```
+ *
+ * And then the child script, `'sub.js'` might look like this:
+ *
+ * ```js
+ * process.on('message', (m) => {
+ * console.log('CHILD got message:', m);
+ * });
+ *
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+ * process.send({ foo: 'bar', baz: NaN });
+ * ```
+ *
+ * Child Node.js processes will have a `process.send()` method of their own
+ * that allows the child to send messages back to the parent.
+ *
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js.
+ * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice.
+ *
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+ * for passing a TCP server or socket object to the child process. The child will
+ * receive the object as the second argument passed to the callback function
+ * registered on the `'message'` event. Any data that is received
+ * and buffered in the socket will not be sent to the child.
+ *
+ * The optional `callback` is a function that is invoked after the message is
+ * sent but before the child may have received it. The function is called with a
+ * single argument: `null` on success, or an `Error` object on failure.
+ *
+ * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can
+ * happen, for instance, when the child process has already exited.
+ *
+ * `subprocess.send()` will return `false` if the channel has closed or when the
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
+ * more. Otherwise, the method returns `true`. The `callback` function can be
+ * used to implement flow control.
+ *
+ * #### Example: sending a server object
+ *
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
+ * a TCP server object to the child process as illustrated in the example below:
+ *
+ * ```js
+ * const subprocess = require('child_process').fork('subprocess.js');
+ *
+ * // Open up the server object and send the handle.
+ * const server = require('net').createServer();
+ * server.on('connection', (socket) => {
+ * socket.end('handled by parent');
+ * });
+ * server.listen(1337, () => {
+ * subprocess.send('server', server);
+ * });
+ * ```
+ *
+ * The child would then receive the server object as:
+ *
+ * ```js
+ * process.on('message', (m, server) => {
+ * if (m === 'server') {
+ * server.on('connection', (socket) => {
+ * socket.end('handled by child');
+ * });
+ * }
+ * });
+ * ```
+ *
+ * Once the server is now shared between the parent and child, some connections
+ * can be handled by the parent and some by the child.
+ *
+ * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on
+ * a `'message'` event instead of `'connection'` and using `server.bind()` instead
+ * of `server.listen()`. This is, however, currently only supported on Unix
+ * platforms.
+ *
+ * #### Example: sending a socket object
+ *
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
+ * socket to the child process. The example below spawns two children that each
+ * handle connections with "normal" or "special" priority:
+ *
+ * ```js
+ * const { fork } = require('child_process');
+ * const normal = fork('subprocess.js', ['normal']);
+ * const special = fork('subprocess.js', ['special']);
+ *
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+ * // the sockets from being read before they are sent to the child process.
+ * const server = require('net').createServer({ pauseOnConnect: true });
+ * server.on('connection', (socket) => {
+ *
+ * // If this is special priority...
+ * if (socket.remoteAddress === '74.125.127.100') {
+ * special.send('socket', socket);
+ * return;
+ * }
+ * // This is normal priority.
+ * normal.send('socket', socket);
+ * });
+ * server.listen(1337);
+ * ```
+ *
+ * The `subprocess.js` would receive the socket handle as the second argument
+ * passed to the event callback function:
+ *
+ * ```js
+ * process.on('message', (m, socket) => {
+ * if (m === 'socket') {
+ * if (socket) {
+ * // Check that the client socket exists.
+ * // It is possible for the socket to be closed between the time it is
+ * // sent and the time it is received in the child process.
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
+ * }
+ * }
+ * });
+ * ```
+ *
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+ * The parent cannot track when the socket is destroyed.
+ *
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+ * as the connection may have been closed during the time it takes to send the
+ * connection to the child.
+ * @since v0.5.9
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * Closes the IPC channel between parent and child, allowing the child to exit
+ * gracefully once there are no other connections keeping it alive. After calling
+ * this method the `subprocess.connected` and `process.connected` properties in
+ * both the parent and child (respectively) will be set to `false`, and it will be
+ * no longer possible to pass messages between the processes.
+ *
+ * The `'disconnect'` event will be emitted when there are no messages in the
+ * process of being received. This will most often be triggered immediately after
+ * calling `subprocess.disconnect()`.
+ *
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+ * within the child process to close the IPC channel as well.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * By default, the parent will wait for the detached child to exit. To prevent the
+ * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not
+ * include the child in its reference count, allowing the parent to exit
+ * independently of the child, unless there is an established IPC channel between
+ * the child and the parent.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore'
+ * });
+ *
+ * subprocess.unref();
+ * ```
+ * @since v0.7.10
+ */
+ unref(): void;
+ /**
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+ * restore the removed reference count for the child process, forcing the parent
+ * to wait for the child to exit before exiting itself.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore'
+ * });
+ *
+ * subprocess.unref();
+ * subprocess.ref();
+ * ```
+ * @since v0.7.10
+ */
+ ref(): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ * 6. spawn
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ addListener(event: 'spawn', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean;
+ emit(event: 'spawn', listener: () => void): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ on(event: 'spawn', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ once(event: 'spawn', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependListener(event: 'spawn', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependOnceListener(event: 'spawn', listener: () => void): this;
+ }
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable,
+ Readable,
+ Readable,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio extends ChildProcess {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ interface MessageOptions {
+ keepOpen?: boolean | undefined;
+ }
+ type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit';
+ type StdioOptions = IOType | Array;
+ type SerializationType = 'json' | 'advanced';
+ interface MessagingOptions extends Abortable {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType | undefined;
+ /**
+ * The signal value to be used when the spawned process will be killed by the abort signal.
+ * @default 'SIGTERM'
+ */
+ killSignal?: NodeJS.Signals | number | undefined;
+ /**
+ * In milliseconds the maximum amount of time the process is allowed to run.
+ */
+ timeout?: number | undefined;
+ }
+ interface ProcessEnvOptions {
+ uid?: number | undefined;
+ gid?: number | undefined;
+ cwd?: string | URL | undefined;
+ env?: NodeJS.ProcessEnv | undefined;
+ }
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default true
+ */
+ windowsHide?: boolean | undefined;
+ /**
+ * @default 0
+ */
+ timeout?: number | undefined;
+ }
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+ argv0?: string | undefined;
+ stdio?: StdioOptions | undefined;
+ shell?: boolean | string | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean | undefined;
+ }
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+ }
+ type StdioNull = 'inherit' | 'ignore' | Stream;
+ type StdioPipeNamed = 'pipe' | 'overlapped';
+ type StdioPipe = undefined | null | StdioPipeNamed;
+ interface SpawnOptionsWithStdioTuple extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+ /**
+ * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults
+ * to an empty array.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * A third argument may be used to specify additional options, with these defaults:
+ *
+ * ```js
+ * const defaults = {
+ * cwd: undefined,
+ * env: process.env
+ * };
+ * ```
+ *
+ * Use `cwd` to specify the working directory from which the process is spawned.
+ * If not given, the default is to inherit the current working directory. If given,
+ * but the path does not exist, the child process emits an `ENOENT` error
+ * and exits immediately. `ENOENT` is also emitted when the command
+ * does not exist.
+ *
+ * Use `env` to specify environment variables that will be visible to the new
+ * process, the default is `process.env`.
+ *
+ * `undefined` values in `env` will be ignored.
+ *
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+ * exit code:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * Example: A very elaborate way to run `ps ax | grep ssh`
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ps = spawn('ps', ['ax']);
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * ps.stdout.on('data', (data) => {
+ * grep.stdin.write(data);
+ * });
+ *
+ * ps.stderr.on('data', (data) => {
+ * console.error(`ps stderr: ${data}`);
+ * });
+ *
+ * ps.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`ps process exited with code ${code}`);
+ * }
+ * grep.stdin.end();
+ * });
+ *
+ * grep.stdout.on('data', (data) => {
+ * console.log(data.toString());
+ * });
+ *
+ * grep.stderr.on('data', (data) => {
+ * console.error(`grep stderr: ${data}`);
+ * });
+ *
+ * grep.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`grep process exited with code ${code}`);
+ * }
+ * });
+ * ```
+ *
+ * Example of checking for failed `spawn`:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const subprocess = spawn('bad_command');
+ *
+ * subprocess.on('error', (err) => {
+ * console.error('Failed to start subprocess.');
+ * });
+ * ```
+ *
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+ * title while others (Windows, SunOS) will use `command`.
+ *
+ * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent,
+ * retrieve it with the`process.argv0` property instead.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const grep = spawn('grep', ['ssh'], { signal });
+ * grep.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * ```
+ * @since v0.1.90
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+ // overloads of spawn with 'args'
+ function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio;
+ function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess;
+ interface ExecOptions extends CommonOptions {
+ shell?: string | undefined;
+ signal?: AbortSignal | undefined;
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ }
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: BufferEncoding | null; // specify `null`.
+ }
+ interface ExecException extends Error {
+ cmd?: string | undefined;
+ killed?: boolean | undefined;
+ code?: number | undefined;
+ signal?: NodeJS.Signals | undefined;
+ }
+ /**
+ * Spawns a shell then executes the `command` within that shell, buffering any
+ * generated output. The `command` string passed to the exec function is processed
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+ * need to be dealt with accordingly:
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ *
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
+ * // Double quotes are used so that the space in the path is not interpreted as
+ * // a delimiter of multiple arguments.
+ *
+ * exec('echo "The \\$HOME variable is $HOME"');
+ * // The $HOME variable is escaped in the first instance, but not in the second.
+ * ```
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ *
+ * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The
+ * `error.code` property will be
+ * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the
+ * process.
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+ * if (error) {
+ * console.error(`exec error: ${error}`);
+ * return;
+ * }
+ * console.log(`stdout: ${stdout}`);
+ * console.error(`stderr: ${stderr}`);
+ * });
+ * ```
+ *
+ * If `timeout` is greater than `0`, the parent will send the signal
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+ * child runs longer than `timeout` milliseconds.
+ *
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+ * the existing process and uses a shell to execute the command.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('util');
+ * const exec = util.promisify(require('child_process').exec);
+ *
+ * async function lsExample() {
+ * const { stdout, stderr } = await exec('ls');
+ * console.log('stdout:', stdout);
+ * console.error('stderr:', stderr);
+ * }
+ * lsExample();
+ * ```
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = exec('grep ssh', { signal }, (error) => {
+ * console.log(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.90
+ * @param command The command to run, with space-separated arguments.
+ * @param callback called with the output when process terminates.
+ */
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ interface PromiseWithChild extends Promise {
+ child: ChildProcess;
+ }
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options?: (ObjectEncodingOptions & ExecOptions) | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ExecFileOptions extends CommonOptions, Abortable {
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ shell?: boolean | string | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ type ExecFileException = ExecException & NodeJS.ErrnoException;
+ /**
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+ * executable `file` is spawned directly as a new process making it slightly more
+ * efficient than {@link exec}.
+ *
+ * The same options as {@link exec} are supported. Since a shell is
+ * not spawned, behaviors such as I/O redirection and file globbing are not
+ * supported.
+ *
+ * ```js
+ * const { execFile } = require('child_process');
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+ * if (error) {
+ * throw error;
+ * }
+ * console.log(stdout);
+ * });
+ * ```
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('util');
+ * const execFile = util.promisify(require('child_process').execFile);
+ * async function getVersion() {
+ * const { stdout } = await execFile('node', ['--version']);
+ * console.log(stdout);
+ * }
+ * getVersion();
+ * ```
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { execFile } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
+ * console.log(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.91
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @param callback Called with the output when process terminates.
+ */
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray | undefined | null
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+ execPath?: string | undefined;
+ execArgv?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: StdioOptions | undefined;
+ detached?: boolean | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ /**
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
+ * returned `ChildProcess` will have an additional communication channel
+ * built-in that allows messages to be passed back and forth between the parent and
+ * child. See `subprocess.send()` for details.
+ *
+ * Keep in mind that spawned Node.js child processes are
+ * independent of the parent with exception of the IPC communication channel
+ * that is established between the two. Each process has its own memory, with
+ * their own V8 instances. Because of the additional resource allocations
+ * required, spawning a large number of child Node.js processes is not
+ * recommended.
+ *
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative
+ * execution path to be used.
+ *
+ * Node.js processes launched with a custom `execPath` will communicate with the
+ * parent process using the file descriptor (fd) identified using the
+ * environment variable `NODE_CHANNEL_FD` on the child process.
+ *
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+ * current process.
+ *
+ * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * if (process.argv[2] === 'child') {
+ * setTimeout(() => {
+ * console.log(`Hello from ${process.argv[2]}!`);
+ * }, 1_000);
+ * } else {
+ * const { fork } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = fork(__filename, ['child'], { signal });
+ * child.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * }
+ * ```
+ * @since v0.5.0
+ * @param modulePath The module to run in the child.
+ * @param args List of string arguments.
+ */
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess;
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ interface SpawnSyncReturns {
+ pid: number;
+ output: Array;
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error | undefined;
+ }
+ /**
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
+ * and doesn't exit, the parent process will wait until the child process has
+ * exited.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawnSync(command: string): SpawnSyncReturns;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
+ function spawnSync(command: string, args: ReadonlyArray): SpawnSyncReturns;
+ function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns;
+ interface CommonExecOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ stdio?: StdioOptions | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface ExecSyncOptions extends CommonExecOptions {
+ shell?: string | undefined;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ /**
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process
+ * has exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw.
+ * The `Error` object will contain the entire result from {@link spawnSync}.
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @return The stdout from the command.
+ */
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
+ interface ExecFileSyncOptions extends CommonExecOptions {
+ shell?: boolean | string | undefined;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding?: 'buffer' | null; // specify `null`.
+ }
+ /**
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+ * return until the child process has fully closed. When a timeout has been
+ * encountered and `killSignal` is sent, the method won't return until the process
+ * has completely exited.
+ *
+ * If the child process intercepts and handles the `SIGTERM` signal and
+ * does not exit, the parent process will still wait until the child process has
+ * exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @return The stdout from the command.
+ */
+ function execFileSync(file: string): Buffer;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
+ function execFileSync(file: string, args: ReadonlyArray): Buffer;
+ function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): string | Buffer;
+}
+declare module 'node:child_process' {
+ export * from 'child_process';
+}
diff --git a/frontend/node_modules/@types/node/cluster.d.ts b/frontend/node_modules/@types/node/cluster.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7f1614105e30bddeaf56946a6ba1117aa5566ec0
--- /dev/null
+++ b/frontend/node_modules/@types/node/cluster.d.ts
@@ -0,0 +1,414 @@
+/**
+ * A single instance of Node.js runs in a single thread. To take advantage of
+ * multi-core systems, the user will sometimes want to launch a cluster of Node.js
+ * processes to handle the load.
+ *
+ * The cluster module allows easy creation of child processes that all share
+ * server ports.
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import http from 'http';
+ * import { cpus } from 'os';
+ * import process from 'process';
+ *
+ * const numCPUs = cpus().length;
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log(`worker ${worker.process.pid} died`);
+ * });
+ * } else {
+ * // Workers can share any TCP connection
+ * // In this case it is an HTTP server
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ *
+ * console.log(`Worker ${process.pid} started`);
+ * }
+ * ```
+ *
+ * Running Node.js will now share port 8000 between the workers:
+ *
+ * ```console
+ * $ node server.js
+ * Primary 3596 is running
+ * Worker 4324 started
+ * Worker 4520 started
+ * Worker 6056 started
+ * Worker 5644 started
+ * ```
+ *
+ * On Windows, it is not yet possible to set up a named pipe server in a worker.
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/cluster.js)
+ */
+declare module 'cluster' {
+ import * as child from 'node:child_process';
+ import EventEmitter = require('node:events');
+ import * as net from 'node:net';
+ export interface ClusterSettings {
+ execArgv?: string[] | undefined; // default: process.execArgv
+ exec?: string | undefined;
+ args?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: any[] | undefined;
+ uid?: number | undefined;
+ gid?: number | undefined;
+ inspectPort?: number | (() => number) | undefined;
+ }
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
+ }
+ /**
+ * A `Worker` object contains all public information and method about a worker.
+ * In the primary it can be obtained using `cluster.workers`. In a worker
+ * it can be obtained using `cluster.worker`.
+ * @since v0.7.0
+ */
+ export class Worker extends EventEmitter {
+ /**
+ * Each new worker is given its own unique id, this id is stored in the`id`.
+ *
+ * While a worker is alive, this is the key that indexes it in`cluster.workers`.
+ * @since v0.8.0
+ */
+ id: number;
+ /**
+ * All workers are created using `child_process.fork()`, the returned object
+ * from this function is stored as `.process`. In a worker, the global `process`is stored.
+ *
+ * See: `Child Process module`.
+ *
+ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+ * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+ * accidental disconnection.
+ * @since v0.7.0
+ */
+ process: child.ChildProcess;
+ /**
+ * Send a message to a worker or primary, optionally with a handle.
+ *
+ * In the primary this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
+ *
+ * In a worker this sends a message to the primary. It is identical to`process.send()`.
+ *
+ * This example will echo back all messages from the primary:
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * worker.send('hi there');
+ *
+ * } else if (cluster.isWorker) {
+ * process.on('message', (msg) => {
+ * process.send(msg);
+ * });
+ * }
+ * ```
+ * @since v0.7.0
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * This function will kill the worker. In the primary, it does this
+ * by disconnecting the `worker.process`, and once disconnected, killing
+ * with `signal`. In the worker, it does it by disconnecting the channel,
+ * and then exiting with code `0`.
+ *
+ * Because `kill()` attempts to gracefully disconnect the worker process, it is
+ * susceptible to waiting indefinitely for the disconnect to complete. For example,
+ * if the worker enters an infinite loop, a graceful disconnect will never occur.
+ * If the graceful disconnect behavior is not needed, use `worker.process.kill()`.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * This method is aliased as `worker.destroy()` for backward compatibility.
+ *
+ * In a worker, `process.kill()` exists, but it is not this function;
+ * it is `kill()`.
+ * @since v0.9.12
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+ */
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ /**
+ * In a worker, this function will close all servers, wait for the `'close'` event
+ * on those servers, and then disconnect the IPC channel.
+ *
+ * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * After a server is closed, it will no longer accept new connections,
+ * but connections may be accepted by any other listening worker. Existing
+ * connections will be allowed to close as usual. When no more connections exist,
+ * see `server.close()`, the IPC channel to the worker will close allowing it
+ * to die gracefully.
+ *
+ * The above applies _only_ to server connections, client connections are not
+ * automatically closed by workers, and disconnect does not wait for them to close
+ * before exiting.
+ *
+ * In a worker, `process.disconnect` exists, but it is not this function;
+ * it is `disconnect()`.
+ *
+ * Because long living server connections may block workers from disconnecting, it
+ * may be useful to send a message, so application specific actions may be taken to
+ * close them. It also may be useful to implement a timeout, killing a worker if
+ * the `'disconnect'` event has not been emitted after some time.
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * let timeout;
+ *
+ * worker.on('listening', (address) => {
+ * worker.send('shutdown');
+ * worker.disconnect();
+ * timeout = setTimeout(() => {
+ * worker.kill();
+ * }, 2000);
+ * });
+ *
+ * worker.on('disconnect', () => {
+ * clearTimeout(timeout);
+ * });
+ *
+ * } else if (cluster.isWorker) {
+ * const net = require('net');
+ * const server = net.createServer((socket) => {
+ * // Connections never end
+ * });
+ *
+ * server.listen(8000);
+ *
+ * process.on('message', (msg) => {
+ * if (msg === 'shutdown') {
+ * // Initiate graceful close of any connections to server
+ * }
+ * });
+ * }
+ * ```
+ * @since v0.7.7
+ * @return A reference to `worker`.
+ */
+ disconnect(): void;
+ /**
+ * This function returns `true` if the worker is connected to its primary via its
+ * IPC channel, `false` otherwise. A worker is connected to its primary after it
+ * has been created. It is disconnected after the `'disconnect'` event is emitted.
+ * @since v0.11.14
+ */
+ isConnected(): boolean;
+ /**
+ * This function returns `true` if the worker's process has terminated (either
+ * because of exiting or being signaled). Otherwise, it returns `false`.
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import http from 'http';
+ * import { cpus } from 'os';
+ * import process from 'process';
+ *
+ * const numCPUs = cpus().length;
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('fork', (worker) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ * } else {
+ * // Workers can share any TCP connection. In this case, it is an HTTP server.
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end(`Current process\n ${process.pid}`);
+ * process.kill(process.pid);
+ * }).listen(8000);
+ * }
+ * ```
+ * @since v0.11.14
+ */
+ isDead(): boolean;
+ /**
+ * This property is `true` if the worker exited due to `.kill()` or`.disconnect()`. If the worker exited any other way, it is `false`. If the
+ * worker has not exited, it is `undefined`.
+ *
+ * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+ * voluntary and accidental exit, the primary may choose not to respawn a worker
+ * based on this value.
+ *
+ * ```js
+ * cluster.on('exit', (worker, code, signal) => {
+ * if (worker.exitedAfterDisconnect === true) {
+ * console.log('Oh, it was just voluntary – no need to worry');
+ * }
+ * });
+ *
+ * // kill worker
+ * worker.kill();
+ * ```
+ * @since v6.0.0
+ */
+ exitedAfterDisconnect: boolean;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ addListener(event: 'listening', listener: (address: Address) => void): this;
+ addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'exit', code: number, signal: string): boolean;
+ emit(event: 'listening', address: Address): boolean;
+ emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'exit', listener: (code: number, signal: string) => void): this;
+ on(event: 'listening', listener: (address: Address) => void): this;
+ on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'exit', listener: (code: number, signal: string) => void): this;
+ once(event: 'listening', listener: (address: Address) => void): this;
+ once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependListener(event: 'listening', listener: (address: Address) => void): this;
+ prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
+ prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'online', listener: () => void): this;
+ }
+ export interface Cluster extends EventEmitter {
+ disconnect(callback?: () => void): void;
+ fork(env?: any): Worker;
+ /** @deprecated since v16.0.0 - use isPrimary. */
+ readonly isMaster: boolean;
+ readonly isPrimary: boolean;
+ readonly isWorker: boolean;
+ schedulingPolicy: number;
+ readonly settings: ClusterSettings;
+ /** @deprecated since v16.0.0 - use setupPrimary. */
+ setupMaster(settings?: ClusterSettings): void;
+ /**
+ * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
+ */
+ setupPrimary(settings?: ClusterSettings): void;
+ readonly worker?: Worker | undefined;
+ readonly workers?: NodeJS.Dict | undefined;
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: 'fork', listener: (worker: Worker) => void): this;
+ addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: (worker: Worker) => void): this;
+ addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect', worker: Worker): boolean;
+ emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
+ emit(event: 'fork', worker: Worker): boolean;
+ emit(event: 'listening', worker: Worker, address: Address): boolean;
+ emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online', worker: Worker): boolean;
+ emit(event: 'setup', settings: ClusterSettings): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: (worker: Worker) => void): this;
+ on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: 'fork', listener: (worker: Worker) => void): this;
+ on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: (worker: Worker) => void): this;
+ on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: (worker: Worker) => void): this;
+ once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: 'fork', listener: (worker: Worker) => void): this;
+ once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: (worker: Worker) => void): this;
+ once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
+ prependListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ }
+ const cluster: Cluster;
+ export default cluster;
+}
+declare module 'node:cluster' {
+ export * from 'cluster';
+ export { default as default } from 'cluster';
+}
diff --git a/frontend/node_modules/@types/node/console.d.ts b/frontend/node_modules/@types/node/console.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ede7a53f25beea72a20f85cfbbaa6c8ce52805ca
--- /dev/null
+++ b/frontend/node_modules/@types/node/console.d.ts
@@ -0,0 +1,412 @@
+/**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/console.js)
+ */
+declare module 'console' {
+ import console = require('node:console');
+ export = console;
+}
+declare module 'node:console' {
+ import { InspectOptions } from 'node:util';
+ global {
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+ interface Console {
+ Console: console.ConsoleConstructor;
+ /**
+ * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
+ * writes a message and does not otherwise affect execution. The output always
+ * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
+ *
+ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
+ *
+ * ```js
+ * console.assert(true, 'does nothing');
+ *
+ * console.assert(false, 'Whoops %s work', 'didn\'t');
+ * // Assertion failed: Whoops didn't work
+ *
+ * console.assert();
+ * // Assertion failed
+ * ```
+ * @since v0.1.101
+ * @param value The value tested for being truthy.
+ * @param message All arguments besides `value` are used as error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
+ * TTY. When `stdout` is not a TTY, this method does nothing.
+ *
+ * The specific operation of `console.clear()` can vary across operating systems
+ * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
+ * current terminal viewport for the Node.js
+ * binary.
+ * @since v8.3.0
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the
+ * number of times `console.count()` has been called with the given `label`.
+ *
+ * ```js
+ * > console.count()
+ * default: 1
+ * undefined
+ * > console.count('default')
+ * default: 2
+ * undefined
+ * > console.count('abc')
+ * abc: 1
+ * undefined
+ * > console.count('xyz')
+ * xyz: 1
+ * undefined
+ * > console.count('abc')
+ * abc: 2
+ * undefined
+ * > console.count()
+ * default: 3
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ *
+ * ```js
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * > console.countReset('abc');
+ * undefined
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link log}.
+ * @since v8.0.0
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ * @since v0.1.101
+ */
+ dir(obj: any, options?: InspectOptions): void;
+ /**
+ * This method calls `console.log()` passing it the arguments received.
+ * This method does not produce any XML formatting.
+ * @since v8.0.0
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const code = 5;
+ * console.error('error #%d', code);
+ * // Prints: error #5, to stderr
+ * console.error('error', code);
+ * // Prints: error 5, to stderr
+ * ```
+ *
+ * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
+ * values are concatenated. See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by spaces for `groupIndentation`length.
+ *
+ * If one or more `label`s are provided, those are printed first without the
+ * additional indentation.
+ * @since v8.5.0
+ */
+ group(...label: any[]): void;
+ /**
+ * An alias for {@link group}.
+ * @since v8.5.0
+ */
+ groupCollapsed(...label: any[]): void;
+ /**
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
+ * @since v8.5.0
+ */
+ groupEnd(): void;
+ /**
+ * The `console.info()` function is an alias for {@link log}.
+ * @since v0.1.100
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const count = 5;
+ * console.log('count: %d', count);
+ * // Prints: count: 5, to stdout
+ * console.log('count:', count);
+ * // Prints: count: 5, to stdout
+ * ```
+ *
+ * See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
+ * logging the argument if it can’t be parsed as tabular.
+ *
+ * ```js
+ * // These can't be parsed as tabular data
+ * console.table(Symbol());
+ * // Symbol()
+ *
+ * console.table(undefined);
+ * // undefined
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
+ * // ┌─────────┬─────┬─────┐
+ * // │ (index) │ a │ b │
+ * // ├─────────┼─────┼─────┤
+ * // │ 0 │ 1 │ 'Y' │
+ * // │ 1 │ 'Z' │ 2 │
+ * // └─────────┴─────┴─────┘
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
+ * // ┌─────────┬─────┐
+ * // │ (index) │ a │
+ * // ├─────────┼─────┤
+ * // │ 0 │ 1 │
+ * // │ 1 │ 'Z' │
+ * // └─────────┴─────┘
+ * ```
+ * @since v10.0.0
+ * @param properties Alternate properties for constructing the table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers
+ * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
+ * suitable time units to `stdout`. For example, if the elapsed
+ * time is 3869ms, `console.timeEnd()` displays "3.869s".
+ * @since v0.1.104
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link time} and
+ * prints the result to `stdout`:
+ *
+ * ```js
+ * console.time('100-elements');
+ * for (let i = 0; i < 100; i++) {}
+ * console.timeEnd('100-elements');
+ * // prints 100-elements: 225.438ms
+ * ```
+ * @since v0.1.104
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link time}, prints
+ * the elapsed time and other `data` arguments to `stdout`:
+ *
+ * ```js
+ * console.time('process');
+ * const value = expensiveProcess1(); // Returns 42
+ * console.timeLog('process', value);
+ * // Prints "process: 365.227ms 42".
+ * doExpensiveProcess2(value);
+ * console.timeEnd('process');
+ * ```
+ * @since v10.7.0
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
+ *
+ * ```js
+ * console.trace('Show me');
+ * // Prints: (stack trace will vary based on where trace is called)
+ * // Trace: Show me
+ * // at repl:2:9
+ * // at REPLServer.defaultEval (repl.js:248:27)
+ * // at bound (domain.js:287:14)
+ * // at REPLServer.runBound [as eval] (domain.js:300:12)
+ * // at REPLServer. (repl.js:412:12)
+ * // at emitOne (events.js:82:20)
+ * // at REPLServer.emit (events.js:169:7)
+ * // at REPLServer.Interface._onLine (readline.js:210:10)
+ * // at REPLServer.Interface._line (readline.js:549:8)
+ * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
+ * ```
+ * @since v0.1.104
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The `console.warn()` function is an alias for {@link error}.
+ * @since v0.1.100
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ }
+ /**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
+ */
+ namespace console {
+ interface ConsoleConstructorOptions {
+ stdout: NodeJS.WritableStream;
+ stderr?: NodeJS.WritableStream | undefined;
+ ignoreErrors?: boolean | undefined;
+ colorMode?: boolean | 'auto' | undefined;
+ inspectOptions?: InspectOptions | undefined;
+ /**
+ * Set group indentation
+ * @default 2
+ */
+ groupIndentation?: number | undefined;
+ }
+ interface ConsoleConstructor {
+ prototype: Console;
+ new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+ new (options: ConsoleConstructorOptions): Console;
+ }
+ }
+ var console: Console;
+ }
+ export = globalThis.console;
+}
diff --git a/frontend/node_modules/@types/node/constants.d.ts b/frontend/node_modules/@types/node/constants.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..208020dcbab4ebcd7955b2abcb7ae49185f5976e
--- /dev/null
+++ b/frontend/node_modules/@types/node/constants.d.ts
@@ -0,0 +1,18 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'constants' {
+ import { constants as osConstants, SignalConstants } from 'node:os';
+ import { constants as cryptoConstants } from 'node:crypto';
+ import { constants as fsConstants } from 'node:fs';
+
+ const exp: typeof osConstants.errno &
+ typeof osConstants.priority &
+ SignalConstants &
+ typeof cryptoConstants &
+ typeof fsConstants;
+ export = exp;
+}
+
+declare module 'node:constants' {
+ import constants = require('constants');
+ export = constants;
+}
diff --git a/frontend/node_modules/@types/node/crypto.d.ts b/frontend/node_modules/@types/node/crypto.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a896ae713da7992b79df3807864a88781f1c1a20
--- /dev/null
+++ b/frontend/node_modules/@types/node/crypto.d.ts
@@ -0,0 +1,3307 @@
+/**
+ * The `crypto` module provides cryptographic functionality that includes a set of
+ * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.
+ *
+ * ```js
+ * const { createHmac } = await import('crypto');
+ *
+ * const secret = 'abcdefg';
+ * const hash = createHmac('sha256', secret)
+ * .update('I love cupcakes')
+ * .digest('hex');
+ * console.log(hash);
+ * // Prints:
+ * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/crypto.js)
+ */
+declare module 'crypto' {
+ import * as stream from 'node:stream';
+ import { PeerCertificate } from 'node:tls';
+ interface Certificate {
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ const Certificate: Certificate & {
+ /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
+ new (): Certificate;
+ /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
+ (): Certificate;
+ /**
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ };
+ namespace constants {
+ // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
+ const OPENSSL_VERSION_NUMBER: number;
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
+ const SSL_OP_EPHEMERAL_RSA: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
+ const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
+ /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
+ const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
+ const SSL_OP_NETSCAPE_CA_DN_BUG: number;
+ const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
+ const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
+ const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ const SSL_OP_PKCS1_CHECK_1: number;
+ const SSL_OP_PKCS1_CHECK_2: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
+ const SSL_OP_SINGLE_DH_USE: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
+ const SSL_OP_SINGLE_ECDH_USE: number;
+ const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
+ const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
+ const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
+ const SSL_OP_TLS_D5_BUG: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const ALPN_ENABLED: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number | undefined;
+ }
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+ /**
+ * Creates and returns a `Hash` object that can be used to generate hash digests
+ * using the given `algorithm`. Optional `options` argument controls stream
+ * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+ * can be used to specify the desired output length in bytes.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
+ * display the available digest algorithms.
+ *
+ * Example: generating the sha256 sum of a file
+ *
+ * ```js
+ * import {
+ * createReadStream
+ * } from 'fs';
+ * import { argv } from 'process';
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hash.update(data);
+ * else {
+ * console.log(`${hash.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.92
+ * @param options `stream.transform` options
+ */
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ /**
+ * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+ * Optional `options` argument controls stream behavior.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
+ * display the available digest algorithms.
+ *
+ * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+ * a `KeyObject`, its type must be `secret`.
+ *
+ * Example: generating the sha256 HMAC of a file
+ *
+ * ```js
+ * import {
+ * createReadStream
+ * } from 'fs';
+ * import { argv } from 'process';
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hmac.update(data);
+ * else {
+ * console.log(`${hmac.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
+ type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
+ type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+ /**
+ * The `Hash` class is a utility for creating hash digests of data. It can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed hash digest on the readable side, or
+ * * Using the `hash.update()` and `hash.digest()` methods to produce the
+ * computed hash.
+ *
+ * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hash` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hash.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * }
+ * });
+ *
+ * hash.write('some data to hash');
+ * hash.end();
+ * ```
+ *
+ * Example: Using `Hash` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ * import { stdout } from 'process';
+ * const { createHash } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hash).setEncoding('hex').pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hash.update()` and `hash.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('some data to hash');
+ * console.log(hash.digest('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * ```
+ * @since v0.1.92
+ */
+ class Hash extends stream.Transform {
+ private constructor();
+ /**
+ * Creates a new `Hash` object that contains a deep copy of the internal state
+ * of the current `Hash` object.
+ *
+ * The optional `options` argument controls stream behavior. For XOF hash
+ * functions such as `'shake256'`, the `outputLength` option can be used to
+ * specify the desired output length in bytes.
+ *
+ * An error is thrown when an attempt is made to copy the `Hash` object after
+ * its `hash.digest()` method has been called.
+ *
+ * ```js
+ * // Calculate a rolling hash.
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('one');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('two');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('three');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * // Etc.
+ * ```
+ * @since v13.1.0
+ * @param options `stream.transform` options
+ */
+ copy(options?: stream.TransformOptions): Hash;
+ /**
+ * Updates the hash content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hash;
+ update(data: string, inputEncoding: Encoding): Hash;
+ /**
+ * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+ * If `encoding` is provided a string will be returned; otherwise
+ * a `Buffer` is returned.
+ *
+ * The `Hash` object can not be used again after `hash.digest()` method has been
+ * called. Multiple calls will cause an error to be thrown.
+ * @since v0.1.92
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ /**
+ * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+ * be used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed HMAC digest on the readable side, or
+ * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+ * computed HMAC digest.
+ *
+ * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hmac` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hmac.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * }
+ * });
+ *
+ * hmac.write('some data to hash');
+ * hmac.end();
+ * ```
+ *
+ * Example: Using `Hmac` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ * import { stdout } from 'process';
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hmac).pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.update('some data to hash');
+ * console.log(hmac.digest('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * ```
+ * @since v0.1.94
+ */
+ class Hmac extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the `Hmac` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hmac;
+ update(data: string, inputEncoding: Encoding): Hmac;
+ /**
+ * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+ * If `encoding` is
+ * provided a string is returned; otherwise a `Buffer` is returned;
+ *
+ * The `Hmac` object can not be used again after `hmac.digest()` has been
+ * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+ * @since v0.1.94
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ type KeyObjectType = 'secret' | 'public' | 'private';
+ interface KeyExportOptions {
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: 'jwk';
+ }
+ interface JsonWebKey {
+ crv?: string | undefined;
+ d?: string | undefined;
+ dp?: string | undefined;
+ dq?: string | undefined;
+ e?: string | undefined;
+ k?: string | undefined;
+ kty?: string | undefined;
+ n?: string | undefined;
+ p?: string | undefined;
+ q?: string | undefined;
+ qi?: string | undefined;
+ x?: string | undefined;
+ y?: string | undefined;
+ [key: string]: unknown;
+ }
+ interface AsymmetricKeyDetails {
+ /**
+ * Key size in bits (RSA, DSA).
+ */
+ modulusLength?: number | undefined;
+ /**
+ * Public exponent (RSA).
+ */
+ publicExponent?: bigint | undefined;
+ /**
+ * Name of the message digest (RSA-PSS).
+ */
+ hashAlgorithm?: string | undefined;
+ /**
+ * Name of the message digest used by MGF1 (RSA-PSS).
+ */
+ mgf1HashAlgorithm?: string | undefined;
+ /**
+ * Minimal salt length in bytes (RSA-PSS).
+ */
+ saltLength?: number | undefined;
+ /**
+ * Size of q in bits (DSA).
+ */
+ divisorLength?: number | undefined;
+ /**
+ * Name of the curve (EC).
+ */
+ namedCurve?: string | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: 'jwk';
+ }
+ /**
+ * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+ * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+ * objects are not to be created directly using the `new`keyword.
+ *
+ * Most applications should consider using the new `KeyObject` API instead of
+ * passing keys as strings or `Buffer`s due to improved security features.
+ *
+ * `KeyObject` instances can be passed to other threads via `postMessage()`.
+ * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+ * be listed in the `transferList` argument.
+ * @since v11.6.0
+ */
+ class KeyObject {
+ private constructor();
+ /**
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+ *
+ * ```js
+ * const { webcrypto, KeyObject } = await import('crypto');
+ * const { subtle } = webcrypto;
+ *
+ * const key = await subtle.generateKey({
+ * name: 'HMAC',
+ * hash: 'SHA-256',
+ * length: 256
+ * }, true, ['sign', 'verify']);
+ *
+ * const keyObject = KeyObject.from(key);
+ * console.log(keyObject.symmetricKeySize);
+ * // Prints: 32 (symmetric key size in bytes)
+ * ```
+ * @since v15.0.0
+ */
+ static from(key: webcrypto.CryptoKey): KeyObject;
+ /**
+ * For asymmetric keys, this property represents the type of the key. Supported key
+ * types are:
+ *
+ * * `'rsa'` (OID 1.2.840.113549.1.1.1)
+ * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
+ * * `'dsa'` (OID 1.2.840.10040.4.1)
+ * * `'ec'` (OID 1.2.840.10045.2.1)
+ * * `'x25519'` (OID 1.3.101.110)
+ * * `'x448'` (OID 1.3.101.111)
+ * * `'ed25519'` (OID 1.3.101.112)
+ * * `'ed448'` (OID 1.3.101.113)
+ * * `'dh'` (OID 1.2.840.113549.1.3.1)
+ *
+ * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+ * keys.
+ * @since v11.6.0
+ */
+ asymmetricKeyType?: KeyType | undefined;
+ /**
+ * For asymmetric keys, this property represents the size of the embedded key in
+ * bytes. This property is `undefined` for symmetric keys.
+ */
+ asymmetricKeySize?: number | undefined;
+ /**
+ * This property exists only on asymmetric keys. Depending on the type of the key,
+ * this object contains information about the key. None of the information obtained
+ * through this property can be used to uniquely identify a key or to compromise
+ * the security of the key.
+ *
+ * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+ * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+ * set.
+ *
+ * Other key details might be exposed via this API using additional attributes.
+ * @since v15.7.0
+ */
+ asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
+ /**
+ * For symmetric keys, the following encoding options can be used:
+ *
+ * For public keys, the following encoding options can be used:
+ *
+ * For private keys, the following encoding options can be used:
+ *
+ * The result type depends on the selected encoding format, when PEM the
+ * result is a string, when DER it will be a buffer containing the data
+ * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+ *
+ * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+ * ignored.
+ *
+ * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+ * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+ * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+ * encrypted private keys. Since PKCS#8 defines its own
+ * encryption mechanism, PEM-level encryption is not supported when encrypting
+ * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+ * PKCS#1 and SEC1 encryption.
+ * @since v11.6.0
+ */
+ export(options: KeyExportOptions<'pem'>): string | Buffer;
+ export(options?: KeyExportOptions<'der'>): Buffer;
+ export(options?: JwkKeyExportOptions): JsonWebKey;
+ /**
+ * For secret keys, this property represents the size of the key in bytes. This
+ * property is `undefined` for asymmetric keys.
+ * @since v11.6.0
+ */
+ symmetricKeySize?: number | undefined;
+ /**
+ * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+ * or `'private'` for private (asymmetric) keys.
+ * @since v11.6.0
+ */
+ type: KeyObjectType;
+ }
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+ type CipherKey = BinaryLike | KeyObject;
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number | undefined;
+ }
+ /**
+ * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
+ * display the available cipher algorithms.
+ *
+ * The `password` is used to derive the cipher key and initialization vector (IV).
+ * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
+ *
+ * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
+ * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
+ * they are used in order to avoid the risk of IV reuse that causes
+ * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
+ /**
+ * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+ * initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a
+ * given IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): CipherCCM;
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM;
+ function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
+ /**
+ * Instances of the `Cipher` class are used to encrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain unencrypted
+ * data is written to produce encrypted data on the readable side, or
+ * * Using the `cipher.update()` and `cipher.final()` methods to produce
+ * the encrypted data.
+ *
+ * The {@link createCipher} or {@link createCipheriv} methods are
+ * used to create `Cipher` instances. `Cipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Cipher` objects as streams:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * // Once we have the key and iv, we can create and use the cipher...
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = '';
+ * cipher.setEncoding('hex');
+ *
+ * cipher.on('data', (chunk) => encrypted += chunk);
+ * cipher.on('end', () => console.log(encrypted));
+ *
+ * cipher.write('some clear text data');
+ * cipher.end();
+ * });
+ * });
+ * ```
+ *
+ * Example: Using `Cipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'fs';
+ *
+ * import {
+ * pipeline
+ * } from 'stream';
+ *
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.js');
+ * const output = createWriteStream('test.enc');
+ *
+ * pipeline(input, cipher, output, (err) => {
+ * if (err) throw err;
+ * });
+ * });
+ * });
+ * ```
+ *
+ * Example: Using the `cipher.update()` and `cipher.final()` methods:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+ * encrypted += cipher.final('hex');
+ * console.log(encrypted);
+ * });
+ * });
+ * ```
+ * @since v0.1.94
+ */
+ class Cipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
+ * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+ * thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the data.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: BinaryLike): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `cipher.final()` method has been called, the `Cipher` object can no
+ * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+ * once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When using block encryption algorithms, the `Cipher` class will automatically
+ * add padding to the input data to the appropriate block size. To disable the
+ * default padding call `cipher.setAutoPadding(false)`.
+ *
+ * When `autoPadding` is `false`, the length of the entire input data must be a
+ * multiple of the cipher's block size or `cipher.final()` will throw an error.
+ * Disabling automatic padding is useful for non-standard padding, for instance
+ * using `0x0` instead of PKCS padding.
+ *
+ * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(autoPadding?: boolean): this;
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`.
+ *
+ * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
+ * to those with the specified length.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a given
+ * IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): DecipherCCM;
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM;
+ function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
+ /**
+ * Instances of the `Decipher` class are used to decrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain encrypted
+ * data is written to produce unencrypted data on the readable side, or
+ * * Using the `decipher.update()` and `decipher.final()` methods to
+ * produce the unencrypted data.
+ *
+ * The {@link createDecipher} or {@link createDecipheriv} methods are
+ * used to create `Decipher` instances. `Decipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Decipher` objects as streams:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Key length is dependent on the algorithm. In this case for aes192, it is
+ * // 24 bytes (192 bits).
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * let decrypted = '';
+ * decipher.on('readable', () => {
+ * while (null !== (chunk = decipher.read())) {
+ * decrypted += chunk.toString('utf8');
+ * }
+ * });
+ * decipher.on('end', () => {
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * });
+ *
+ * // Encrypted with same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * decipher.write(encrypted, 'hex');
+ * decipher.end();
+ * ```
+ *
+ * Example: Using `Decipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'fs';
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.enc');
+ * const output = createWriteStream('test.js');
+ *
+ * input.pipe(decipher).pipe(output);
+ * ```
+ *
+ * Example: Using the `decipher.update()` and `decipher.final()` methods:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * // Encrypted using same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+ * decrypted += decipher.final('utf8');
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * ```
+ * @since v0.1.94
+ */
+ class Decipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+ * ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+ * being thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: NodeJS.ArrayBufferView): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `decipher.final()` method has been called, the `Decipher` object can
+ * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+ * than once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+ * removing padding.
+ *
+ * Turning auto padding off will only work if the input data's length is a
+ * multiple of the ciphers block size.
+ *
+ * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(auto_padding?: boolean): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'spki' | undefined;
+ }
+ /**
+ * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKey
+ * } = await import('crypto');
+ *
+ * generateKey('hmac', { length: 64 }, (err, key) => {
+ * if (err) throw err;
+ * console.log(key.export().toString('hex')); // 46e..........620
+ * });
+ * ```
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKey(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ },
+ callback: (err: Error | null, key: KeyObject) => void
+ ): void;
+ /**
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKeySync
+ * } = await import('crypto');
+ *
+ * const key = generateKeySync('hmac', { length: 64 });
+ * console.log(key.export().toString('hex')); // e89..........41e
+ * ```
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKeySync(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ }
+ ): KeyObject;
+ interface JsonWebKeyInput {
+ key: JsonWebKey;
+ format: 'jwk';
+ }
+ /**
+ * Creates and returns a new key object containing a private key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
+ *
+ * If the private key is encrypted, a `passphrase` must be specified. The length
+ * of the passphrase is limited to 1024 bytes.
+ * @since v11.6.0
+ */
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a public key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
+ * otherwise, `key` must be an object with the properties described above.
+ *
+ * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+ *
+ * Because public keys can be derived from private keys, a private key may be
+ * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+ * returned `KeyObject` will be `'public'` and that the private key cannot be
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
+ * and it will be impossible to extract the private key from the returned object.
+ * @since v11.6.0
+ */
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a secret key for symmetric
+ * encryption or `Hmac`.
+ * @since v11.6.0
+ * @param encoding The string encoding when `key` is a string.
+ */
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+ function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+ /**
+ * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+ * Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Sign` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+ type DSAEncoding = 'der' | 'ieee-p1363';
+ interface SigningOptions {
+ /**
+ * @See crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number | undefined;
+ saltLength?: number | undefined;
+ dsaEncoding?: DSAEncoding | undefined;
+ }
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ type KeyLike = string | Buffer | KeyObject;
+ /**
+ * The `Sign` class is a utility for generating signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+ * * Using the `sign.update()` and `sign.sign()` methods to produce the
+ * signature.
+ *
+ * The {@link createSign} method is used to create `Sign` instances. The
+ * argument is the string name of the hash function to use. `Sign` objects are not
+ * to be created directly using the `new` keyword.
+ *
+ * Example: Using `Sign` and `Verify` objects as streams:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify
+ * } = await import('crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+ * namedCurve: 'sect239k1'
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.write('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey, 'hex');
+ *
+ * const verify = createVerify('SHA256');
+ * verify.write('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature, 'hex'));
+ * // Prints: true
+ * ```
+ *
+ * Example: Using the `sign.update()` and `verify.update()` methods:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify
+ * } = await import('crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+ * modulusLength: 2048,
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.update('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey);
+ *
+ * const verify = createVerify('SHA256');
+ * verify.update('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature));
+ * // Prints: true
+ * ```
+ * @since v0.1.92
+ */
+ class Sign extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Sign` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): this;
+ update(data: string, inputEncoding: Encoding): this;
+ /**
+ * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * The `Sign` object can not be again used after `sign.sign()` method has been
+ * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+ * @since v0.1.92
+ */
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
+ }
+ /**
+ * Creates and returns a `Verify` object that uses the given algorithm.
+ * Use {@link getHashes} to obtain an array of names of the available
+ * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
+ *
+ * In some cases, a `Verify` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ /**
+ * The `Verify` class is a utility for verifying signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream` where written data is used to validate against the
+ * supplied signature, or
+ * * Using the `verify.update()` and `verify.verify()` methods to verify
+ * the signature.
+ *
+ * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
+ *
+ * See `Sign` for examples.
+ * @since v0.1.92
+ */
+ class Verify extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Verify` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `inputEncoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Verify;
+ update(data: string, inputEncoding: Encoding): Verify;
+ /**
+ * Verifies the provided data using the given `object` and `signature`.
+ *
+ * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the data, in
+ * the `signatureEncoding`.
+ * If a `signatureEncoding` is specified, the `signature` is expected to be a
+ * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * The `verify` object can not be used again after `verify.verify()` has been
+ * called. Multiple calls to `verify.verify()` will result in an error being
+ * thrown.
+ *
+ * Because public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.1.92
+ */
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
+ }
+ /**
+ * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+ * optional specific `generator`.
+ *
+ * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
+ *
+ * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+ * a `Buffer`, `TypedArray`, or `DataView` is expected.
+ *
+ * If `generatorEncoding` is specified, `generator` is expected to be a string;
+ * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+ * @since v0.11.12
+ * @param primeEncoding The `encoding` of the `prime` string.
+ * @param [generator=2]
+ * @param generatorEncoding The `encoding` of the `generator` string.
+ */
+ function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ /**
+ * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+ * exchanges.
+ *
+ * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const {
+ * createDiffieHellman
+ * } = await import('crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createDiffieHellman(2048);
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * // OK
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * ```
+ * @since v0.5.0
+ */
+ class DiffieHellman {
+ private constructor();
+ /**
+ * Generates private and public Diffie-Hellman key values, and returns
+ * the public key in the specified `encoding`. This key should be
+ * transferred to the other party.
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using the specified `inputEncoding`, and secret is
+ * encoded using specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+ * @since v0.5.0
+ * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman prime in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrime(): Buffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman generator in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getGenerator(): Buffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman public key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman private key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
+ * to be a string. If no `encoding` is provided, `publicKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `publicKey` string.
+ */
+ setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+ setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+ /**
+ * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+ * to be a string. If no `encoding` is provided, `privateKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+ /**
+ * A bit field containing any warnings and/or errors resulting from a check
+ * performed during initialization of the `DiffieHellman` object.
+ *
+ * The following values are valid for this property (as defined in `constants`module):
+ *
+ * * `DH_CHECK_P_NOT_SAFE_PRIME`
+ * * `DH_CHECK_P_NOT_PRIME`
+ * * `DH_UNABLE_TO_CHECK_GENERATOR`
+ * * `DH_NOT_SUITABLE_GENERATOR`
+ * @since v0.11.12
+ */
+ verifyError: number;
+ }
+ /**
+ * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+ * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
+ * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
+ * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+ * the keys (with `diffieHellman.setPublicKey()`, for example). The
+ * advantage of using this method is that the parties do not have to
+ * generate nor exchange a group modulus beforehand, saving both processor
+ * and communication time.
+ *
+ * Example (obtaining a shared secret):
+ *
+ * ```js
+ * const {
+ * getDiffieHellman
+ * } = await import('crypto');
+ * const alice = getDiffieHellman('modp14');
+ * const bob = getDiffieHellman('modp14');
+ *
+ * alice.generateKeys();
+ * bob.generateKeys();
+ *
+ * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+ * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+ *
+ * // aliceSecret and bobSecret should be the same
+ * console.log(aliceSecret === bobSecret);
+ * ```
+ * @since v0.7.5
+ */
+ function getDiffieHellman(groupName: string): DiffieHellman;
+ /**
+ * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
+ * thrown if any of the input arguments specify invalid values or types.
+ *
+ * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
+ * please specify a `digest` explicitly.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2
+ * } = await import('crypto');
+ *
+ * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * ```
+ *
+ * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been
+ * deprecated and use should be avoided.
+ *
+ * ```js
+ * import crypto from 'crypto';
+ * crypto.DEFAULT_ENCODING = 'hex';
+ * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey); // '3745e48...aa39b34'
+ * });
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ * @since v0.5.5
+ */
+ function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+ * returned as a `Buffer`.
+ *
+ * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
+ * please specify a `digest` explicitly.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2Sync
+ * } = await import('crypto');
+ *
+ * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+ * console.log(key.toString('hex')); // '3745e48...08d59ae'
+ * ```
+ *
+ * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use
+ * should be avoided.
+ *
+ * ```js
+ * import crypto from 'crypto';
+ * crypto.DEFAULT_ENCODING = 'hex';
+ * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
+ * console.log(key); // '3745e48...aa39b34'
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ * @since v0.9.3
+ */
+ function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
+ /**
+ * Generates cryptographically strong pseudorandom data. The `size` argument
+ * is a number indicating the number of bytes to generate.
+ *
+ * If a `callback` function is provided, the bytes are generated asynchronously
+ * and the `callback` function is invoked with two arguments: `err` and `buf`.
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomBytes
+ * } = await import('crypto');
+ *
+ * randomBytes(256, (err, buf) => {
+ * if (err) throw err;
+ * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * });
+ * ```
+ *
+ * If the `callback` function is not provided, the random bytes are generated
+ * synchronously and returned as a `Buffer`. An error will be thrown if
+ * there is a problem generating the bytes.
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomBytes
+ * } = await import('crypto');
+ *
+ * const buf = randomBytes(256);
+ * console.log(
+ * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * ```
+ *
+ * The `crypto.randomBytes()` method will not complete until there is
+ * sufficient entropy available.
+ * This should normally never take longer than a few milliseconds. The only time
+ * when generating the random bytes may conceivably block for a longer period of
+ * time is right after boot, when the whole system is still low on entropy.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomBytes` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v0.5.8
+ * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+ * @return if the `callback` function is not provided.
+ */
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ /**
+ * Return a random integer `n` such that `min <= n < max`. This
+ * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+ *
+ * The range (`max - min`) must be less than 248. `min` and `max` must
+ * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+ *
+ * If the `callback` function is not provided, the random integer is
+ * generated synchronously.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * randomInt(3, (err, n) => {
+ * if (err) throw err;
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * });
+ * ```
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * const n = randomInt(3);
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * ```
+ *
+ * ```js
+ * // With `min` argument
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * const n = randomInt(1, 7);
+ * console.log(`The dice rolled: ${n}`);
+ * ```
+ * @since v14.10.0, v12.19.0
+ * @param [min=0] Start of random range (inclusive).
+ * @param max End of random range (exclusive).
+ * @param callback `function(err, n) {}`.
+ */
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+ /**
+ * Synchronous version of {@link randomFill}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFillSync } = await import('crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * console.log(randomFillSync(buf).toString('hex'));
+ *
+ * randomFillSync(buf, 5);
+ * console.log(buf.toString('hex'));
+ *
+ * // The above is equivalent to the following:
+ * randomFillSync(buf, 5, 5);
+ * console.log(buf.toString('hex'));
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFillSync } = await import('crypto');
+ *
+ * const a = new Uint32Array(10);
+ * console.log(Buffer.from(randomFillSync(a).buffer,
+ * a.byteOffset, a.byteLength).toString('hex'));
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * console.log(Buffer.from(randomFillSync(b).buffer,
+ * b.byteOffset, b.byteLength).toString('hex'));
+ *
+ * const c = new ArrayBuffer(10);
+ * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+ * ```
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @return The object passed as `buffer` argument.
+ */
+ function randomFillSync(buffer: T, offset?: number, size?: number): T;
+ /**
+ * This function is similar to {@link randomBytes} but requires the first
+ * argument to be a `Buffer` that will be filled. It also
+ * requires that a callback is passed in.
+ *
+ * If the `callback` function is not provided, an error will be thrown.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFill } = await import('crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * randomFill(buf, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * randomFill(buf, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * // The above is equivalent to the following:
+ * randomFill(buf, 5, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
+ *
+ * While this includes instances of `Float32Array` and `Float64Array`, this
+ * function should not be used to generate random floating-point numbers. The
+ * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+ * contains finite numbers only, they are not drawn from a uniform random
+ * distribution and have no meaningful lower or upper bounds.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFill } = await import('crypto');
+ *
+ * const a = new Uint32Array(10);
+ * randomFill(a, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * randomFill(b, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const c = new ArrayBuffer(10);
+ * randomFill(c, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf).toString('hex'));
+ * });
+ * ```
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomFill()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomFill` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @param callback `function(err, buf) {}`.
+ */
+ function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
+ interface ScryptOptions {
+ cost?: number | undefined;
+ blockSize?: number | undefined;
+ parallelization?: number | undefined;
+ N?: number | undefined;
+ r?: number | undefined;
+ p?: number | undefined;
+ maxmem?: number | undefined;
+ }
+ /**
+ * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
+ * callback as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scrypt
+ * } = await import('crypto');
+ *
+ * // Using the factory defaults.
+ * scrypt('password', 'salt', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * // Using a custom N parameter. Must be a power of two.
+ * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
+ * });
+ * ```
+ * @since v10.5.0
+ */
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * An exception is thrown when key derivation fails, otherwise the derived key is
+ * returned as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scryptSync
+ * } = await import('crypto');
+ * // Using the factory defaults.
+ *
+ * const key1 = scryptSync('password', 'salt', 64);
+ * console.log(key1.toString('hex')); // '3745e48...08d59ae'
+ * // Using a custom N parameter. Must be a power of two.
+ * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+ * console.log(key2.toString('hex')); // '3745e48...aa39b34'
+ * ```
+ * @since v10.5.0
+ */
+ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number | undefined;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string | undefined;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string | undefined;
+ oaepLabel?: NodeJS.TypedArray | undefined;
+ padding?: number | undefined;
+ }
+ /**
+ * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+ * the corresponding private key, for example using {@link privateDecrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.11.14
+ */
+ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+ * the corresponding private key, for example using {@link privateEncrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v1.1.0
+ */
+ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+ * the corresponding public key, for example using {@link publicEncrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ * @since v0.11.14
+ */
+ function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+ * the corresponding public key, for example using {@link publicDecrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ * @since v1.1.0
+ */
+ function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * ```js
+ * const {
+ * getCiphers
+ * } = await import('crypto');
+ *
+ * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array with the names of the supported cipher algorithms.
+ */
+ function getCiphers(): string[];
+ /**
+ * ```js
+ * const {
+ * getCurves
+ * } = await import('crypto');
+ *
+ * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+ * ```
+ * @since v2.3.0
+ * @return An array with the names of the supported elliptic curves.
+ */
+ function getCurves(): string[];
+ /**
+ * @since v10.0.0
+ * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+ */
+ function getFips(): 1 | 0;
+ /**
+ * ```js
+ * const {
+ * getHashes
+ * } = await import('crypto');
+ *
+ * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+ */
+ function getHashes(): string[];
+ /**
+ * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+ * key exchanges.
+ *
+ * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const {
+ * createECDH
+ * } = await import('crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createECDH('secp521r1');
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createECDH('secp521r1');
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * // OK
+ * ```
+ * @since v0.11.14
+ */
+ class ECDH {
+ private constructor();
+ /**
+ * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+ * format specified by `format`. The `format` argument specifies point encoding
+ * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+ * interpreted using the specified `inputEncoding`, and the returned key is encoded
+ * using the specified `outputEncoding`.
+ *
+ * Use {@link getCurves} to obtain a list of available curve names.
+ * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+ * the name and description of each available elliptic curve.
+ *
+ * If `format` is not specified the point will be returned in `'uncompressed'`format.
+ *
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * Example (uncompressing a key):
+ *
+ * ```js
+ * const {
+ * createECDH,
+ * ECDH
+ * } = await import('crypto');
+ *
+ * const ecdh = createECDH('secp256k1');
+ * ecdh.generateKeys();
+ *
+ * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+ *
+ * const uncompressedKey = ECDH.convertKey(compressedKey,
+ * 'secp256k1',
+ * 'hex',
+ * 'hex',
+ * 'uncompressed');
+ *
+ * // The converted key and the uncompressed public key should be the same
+ * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+ * ```
+ * @since v10.0.0
+ * @param inputEncoding The `encoding` of the `key` string.
+ * @param outputEncoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
+ format?: 'uncompressed' | 'compressed' | 'hybrid'
+ ): Buffer | string;
+ /**
+ * Generates private and public EC Diffie-Hellman key values, and returns
+ * the public key in the specified `format` and `encoding`. This key should be
+ * transferred to the other party.
+ *
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using specified `inputEncoding`, and the returned secret
+ * is encoded using the specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
+ *
+ * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+ *
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
+ * usually supplied from a remote user over an insecure network,
+ * be sure to handle this exception accordingly.
+ * @since v0.11.14
+ * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @return The EC Diffie-Hellman in the specified `encoding`.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+ */
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Sets the EC Diffie-Hellman private key.
+ * If `encoding` is provided, `privateKey` is expected
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+ * created, an error is thrown. Upon setting the private key, the associated
+ * public point (key) is also generated and set in the `ECDH` object.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+ }
+ /**
+ * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+ * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+ * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+ * and description of each available elliptic curve.
+ * @since v0.11.14
+ */
+ function createECDH(curveName: string): ECDH;
+ /**
+ * This function is based on a constant-time algorithm.
+ * Returns true if `a` is equal to `b`, without leaking timing information that
+ * would allow an attacker to guess one of the values. This is suitable for
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+ *
+ * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+ * must have the same byte length.
+ *
+ * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+ * entry, such as `Uint16Array`, the result will be computed using the platform
+ * byte order.
+ *
+ * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+ * is timing-safe. Care should be taken to ensure that the surrounding code does
+ * not introduce timing vulnerabilities.
+ * @since v6.6.0
+ */
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ /** @deprecated since v10.0.0 */
+ const DEFAULT_ENCODING: BufferEncoding;
+ type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+ type KeyFormat = 'pem' | 'der';
+ interface BasePrivateKeyEncodingOptions {
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | undefined;
+ }
+ interface KeyPairKeyObjectResult {
+ publicKey: KeyObject;
+ privateKey: KeyObject;
+ }
+ interface ED25519KeyPairKeyObjectOptions {}
+ interface ED448KeyPairKeyObjectOptions {}
+ interface X25519KeyPairKeyObjectOptions {}
+ interface X448KeyPairKeyObjectOptions {}
+ interface ECKeyPairKeyObjectOptions {
+ /**
+ * Name of the curve to use
+ */
+ namedCurve: string;
+ }
+ interface RSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ }
+ interface RSAPSSKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ }
+ interface DSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+ interface RSAKeyPairOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+ interface RSAPSSKeyPairOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs8';
+ };
+ }
+ interface DSAKeyPairOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs8';
+ };
+ }
+ interface ECKeyPairOptions {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+ interface ED25519KeyPairOptions {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs8';
+ };
+ }
+ interface ED448KeyPairOptions {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs8';
+ };
+ }
+ interface X25519KeyPairOptions {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs8';
+ };
+ }
+ interface X448KeyPairOptions {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions & {
+ type: 'pkcs8';
+ };
+ }
+ interface KeyPairSyncResult {
+ publicKey: T1;
+ privateKey: T2;
+ }
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * When encoding public keys, it is recommended to use `'spki'`. When encoding
+ * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+ * and to keep the passphrase confidential.
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync
+ * } = await import('crypto');
+ *
+ * const {
+ * publicKey,
+ * privateKey,
+ * } = generateKeyPairSync('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem'
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret'
+ * }
+ * });
+ * ```
+ *
+ * The return value `{ publicKey, privateKey }` represents the generated key pair.
+ * When PEM encoding was selected, the respective key will be a string, otherwise
+ * it will be a buffer containing the data encoded as DER.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult