Compare commits

...

171 Commits

Author SHA1 Message Date
Ammar Ahmed
261674ce80 mobile: support android 16 2025-06-16 13:33:55 +05:00
Abdullah Atta
0bd8779144 core: fix group header for search results hidden 2025-06-16 11:16:38 +05:00
01zulfi
1a89678560 docs: add monograph size limit (#8206)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-16 10:55:03 +05:00
Abdullah Atta
0280561459 web: bump version to v3.2.0-beta.9 2025-06-13 12:51:58 +05:00
Abdullah Atta
236b015c38 core: remove search results count
it was inaccurate and confused users
2025-06-12 11:25:57 +05:00
Abdullah Atta
a6a49d5f49 web: reduce trial2pro discount to 30% 2025-06-12 09:45:53 +05:00
Abdullah Atta
717bae6968 desktop: do not use native menu for tag suggestions on macos 2025-06-12 09:08:42 +05:00
Ammar Ahmed
1826166c92 mobile: release beta 4 2025-06-11 14:07:35 +05:00
Ammar Ahmed
bf440f32c9 mobile: make adding notebook a dialog
* make manage tags sheet a screen
2025-06-11 13:57:36 +05:00
Abdullah Atta
fecda3838f editor: fix search popup removed on link hover 2025-06-11 10:40:48 +05:00
Abdullah Atta
3b54e62495 core: fix search results sorting not working 2025-06-11 08:55:20 +05:00
Abdullah Atta
3fe6cd503c web: bump version to v3.2.0-beta.8 2025-06-10 11:34:36 +05:00
Abdullah Atta
7dd581d175 core: take into account boolean parameters in query 2025-06-05 15:19:55 +05:00
Ammar Ahmed
f7d1d92613 mobile: default tag 2025-06-05 12:08:44 +05:00
01zulfi
55e1f6922e web: fix navigation commands in command palette (#8070)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-05 11:51:32 +05:00
01zulfi
f408cdff02 web: add move notebook dialog (#8099)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-06-05 11:44:04 +05:00
Ammar Ahmed
be7a140877 mobile: fix ci build 2025-06-05 10:08:28 +05:00
Abdullah Atta
00691fa43b web: bump version to v3.2.0-beta.7 2025-06-05 10:05:17 +05:00
Ammar Ahmed
8e6db4d81c mobile: fix mmkv patch 2025-06-05 09:49:46 +05:00
Ammar Ahmed
489f0d376d mobile: beta release 2025-06-04 15:09:54 +05:00
Abdullah Atta
6e6be63e7b core: fix false positives appearing in search 2025-06-04 14:55:57 +05:00
Ammar Ahmed
228951da49 mobile: update deps 2025-06-04 12:59:32 +05:00
Abdullah Atta
e806812593 core: remove porter tokenizer for stemming
it didn't work very well. It was stemming things like "one" into "on"
2025-06-04 12:59:15 +05:00
Ammar Ahmed
3b92c401f3 mobile: fix key missing warning in search-result item 2025-06-04 12:38:19 +05:00
Abdullah Atta
c1a684f14a core: fix lookup tests 2025-06-04 12:23:40 +05:00
Abdullah Atta
21cbc75b93 core: update htmlparser2 2025-06-04 12:23:40 +05:00
Ammar Ahmed
6c2d95abe1 core: skip decodine entities when parsing html 2025-06-04 12:17:49 +05:00
Ammar Ahmed
00460f84ee mobile: update lockfiles 2025-06-03 09:44:49 +05:00
Ammar Ahmed
eedbded335 mobile: fix android build 2025-06-03 09:44:49 +05:00
Ammar Ahmed
843178b8cf mobile: fix ios build on rn 77 2025-06-03 09:44:49 +05:00
Ammar Ahmed
d5ca8d70b7 mobile: update fts5-html patch 2025-06-03 09:44:49 +05:00
Ammar Ahmed
7baaeda722 mobile: remove patch 2025-06-03 09:44:49 +05:00
Ammar Ahmed
1388e77828 mobile: update patches 2025-06-03 09:44:49 +05:00
Ammar Ahmed
caca30240d mobile: upgrade to RN 0.77.2 2025-06-03 09:44:49 +05:00
Abdullah Atta
fc476828e8 core: sort content matches 2025-06-02 15:32:47 +05:00
Abdullah Atta
a76c35356d core: only expand matching callout & outline list items 2025-06-02 15:32:15 +05:00
Abdullah Atta
d6584664f3 ci: fix prerelease not setting correctly on gh release 2025-06-02 12:51:18 +05:00
Abdullah Atta
25fec5afeb web: bump version to 3.2.0-beta.6 2025-06-02 12:04:41 +05:00
01zulfi
512e412b19 web: add support for setting a tag as default (#8060)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-02 11:17:46 +05:00
01zulfi
be615b9b75 editor: remove styling for sibling elements of double spaced paragraphs (#8144)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-06-02 11:04:01 +05:00
Ammar Ahmed
0d6c693dd1 mobile: release new beta 2025-06-02 10:11:48 +05:00
Ammar Ahmed
ea7473f757 mobile: skip rendering if query changed during search 2025-06-02 09:42:56 +05:00
Abdullah Atta
bebb70bf23 web: discard results if query changed during search 2025-06-02 09:42:37 +05:00
Abdullah Atta
f683f63abd core: auto expand outline & callout in search result 2025-06-02 09:35:12 +05:00
Abdullah Atta
6f9ff0e427 core: fix phrase queries not getting highlighted 2025-06-02 09:10:58 +05:00
Abdullah Atta
3dbb4cd1d5 web: fix click on match no opening note at desired location 2025-06-02 09:10:58 +05:00
Ammar Ahmed
b33046a2c7 mobile: enable regexp in sqlite 2025-06-02 08:47:46 +05:00
Ammar Ahmed
53ecdd0c0f mobile: fix tab gets focused in loop 2025-06-02 08:47:46 +05:00
Abdullah Atta
971a490292 desktop: add SQLITE_ENABLE_REGEXP define to better-sqlite3 2025-05-31 13:28:00 +05:00
Abdullah Atta
c9c6ee88d8 desktop: do not gitignore *.patch 2025-05-31 13:26:58 +05:00
Abdullah Atta
3d31c7d7bb web: bump version to 3.2.0-beta.5 2025-05-30 19:28:30 +05:00
Abdullah Atta
ed079d2efb core: use intl for showing search results count 2025-05-30 19:27:10 +05:00
Abdullah Atta
6de57c79f3 core: install @notesnook/intl 2025-05-30 19:27:10 +05:00
Abdullah Atta
fc1cb19014 web: use plain list instead of tree for showing search results 2025-05-30 19:27:10 +05:00
Abdullah Atta
097963dbba web: enable regexp in sqlite 2025-05-30 19:27:10 +05:00
Abdullah Atta
6e33932a2f desktop: enable regexp in sqlite 2025-05-30 19:27:10 +05:00
Abdullah Atta
bf0d43d3a2 core: speed up search 2025-05-30 19:27:05 +05:00
Ammar Ahmed
0effa01ef7 core: fix stop-words import 2025-05-29 11:09:47 +05:00
Abdullah Atta
edacdbcbae core: filter out stop words in search query 2025-05-28 14:57:09 +05:00
Abdullah Atta
0e9953ed87 web: bump version to v3.2.0-beta.4 2025-05-28 13:02:38 +05:00
Abdullah Atta
cba713990b ci: build desktop app on ubuntu-22-04
this fixes `Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38'
not found` error
2025-05-28 13:01:48 +05:00
Abdullah Atta
2bce6d3b01 web: fix editor not jumping to search result 2025-05-28 12:31:57 +05:00
Abdullah Atta
4ae4376897 web: fix various type errors causing crashes 2025-05-28 11:30:35 +05:00
Abdullah Atta
2b9bcb2fe2 core: bring back limit in lookup 2025-05-28 11:30:35 +05:00
Ammar Ahmed
590c6c28c2 mobile: release v3.2.0-beta.1 2025-05-27 14:04:09 +05:00
Ammar Ahmed
29229d1372 mobile: fix note search 2025-05-27 13:10:41 +05:00
Abdullah Atta
81be2fad9d web: use notesWithHighlighting for full notes search 2025-05-27 12:38:00 +05:00
Abdullah Atta
2c45cea746 core: bring back old notes search 2025-05-27 12:38:00 +05:00
Ammar Ahmed
4c9fe1e58a mobile: release v3.2.0-beta.0 2025-05-23 15:14:38 +05:00
Abdullah Atta
b21fb195d1 web: bump version to 3.2.0-beta.3 2025-05-23 15:07:11 +05:00
Ammar Ahmed
3850ad414b mobile: search and sorting 2025-05-23 14:59:01 +05:00
Abdullah Atta
22ae09f926 web: localize search results count 2025-05-23 14:59:01 +05:00
Abdullah Atta
7fe3feef22 web: hide search results on editor focus & search cancel 2025-05-23 14:59:01 +05:00
Abdullah Atta
9b70853c57 editor: make search results style toggleable 2025-05-23 14:59:01 +05:00
Abdullah Atta
175cf92e74 web: fix note not scrolling to selected match 2025-05-23 14:59:01 +05:00
Abdullah Atta
8c6476545b web: fix note not opening from search results if its already opened 2025-05-23 14:59:01 +05:00
Abdullah Atta
a0bf06db90 web: use same search ux for notes everywhere 2025-05-23 14:59:01 +05:00
Abdullah Atta
3889aa291b web: improve search results ui 2025-05-23 14:59:01 +05:00
Abdullah Atta
c1aa727a6d core: improve prefix/suffix generation for matches 2025-05-23 14:59:01 +05:00
Abdullah Atta
23de5d2229 web: add full support for highlighting results in notes search 2025-05-23 14:59:01 +05:00
Abdullah Atta
4aab23b117 editor: add support for nn-search-result node 2025-05-23 14:59:01 +05:00
Abdullah Atta
10f6501951 core: add raw html content with highlighting in results 2025-05-23 14:59:01 +05:00
Abdullah Atta
2e8173f6ca web: add support for highlighting in search results 2025-05-23 14:59:01 +05:00
Abdullah Atta
33b6e3a19d core: add console.time tracing for notes search 2025-05-23 14:59:01 +05:00
Abdullah Atta
0fb115df0b core: improve search results highlighting 2025-05-23 14:59:01 +05:00
Abdullah Atta
f1b875b1dd core: fix title matches not merged when query contains short tokens 2025-05-23 14:59:01 +05:00
Abdullah Atta
c3604da0c1 core: bring back search result sorting for notes 2025-05-23 14:59:01 +05:00
Abdullah Atta
c61706d4f1 core: add support for highlighting search results 2025-05-23 14:59:01 +05:00
Ammar Ahmed
fa39f2e75d mobile: fix archive count not shown 2025-05-23 14:59:01 +05:00
Ammar Ahmed
8a283baeaf mobile: update fts5-html lib 2025-05-23 14:59:01 +05:00
Ammar Ahmed
4ddc21d783 mobile: support sorting search results 2025-05-23 14:59:01 +05:00
Abdullah Atta
5b828a71a9 core: add a new migration to reindex fts5 2025-05-23 14:59:01 +05:00
Abdullah Atta
c3b0d0feb9 web: update sqlite3-fts5-html to v0.0.3 2025-05-23 14:59:01 +05:00
Abdullah Atta
a4468271f4 web: show date created on search results if sort by is set to date created 2025-05-23 14:59:01 +05:00
Abdullah Atta
0127de1290 web: add support for sorting in search 2025-05-23 14:59:01 +05:00
Abdullah Atta
3e270a3906 core: add support for sortable search 2025-05-23 14:59:01 +05:00
01zulfi
76a7e9318e editor: support ctrl/cmd+click to open internal links in new tab (#8131)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-23 10:36:10 +05:00
01zulfi
527b6ca1a3 web: add 'move to top' for sub-notebooks (#8066)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-21 11:31:12 +05:00
Ammar Ahmed
d3f8b06fcb mobile: handle crash in background on device boot 2025-05-20 11:32:20 +05:00
Ammar Ahmed
7d34993d84 mobile: fix new reminder title/headline is not autofill 2025-05-17 12:42:38 +05:00
Ammar Ahmed
be5a1605b7 mobile: add line break when appending to note 2025-05-17 12:14:57 +05:00
Ammar Ahmed
3e86167842 mobile: fix crash in settings -> user subscription 2025-05-17 10:05:35 +05:00
01zulfi
93713d58d4 web: persist double spaced lines config on logout (#8097)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-16 15:21:26 +05:00
01zulfi
7da18de68c web: fix readonly note not locking when vault is locked (#8092)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-16 15:21:10 +05:00
01zulfi
fccf2a7b3e web: add support for drag/dropping notes on tab strip (#8090)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-16 15:20:28 +05:00
Abdullah Atta
b200180684 web: bump version to 3.2.0-beta.2 2025-05-16 15:05:40 +05:00
Abdullah Atta
0a5ea5d448 core: fix `expected previously executed migration 2 to be at index 1 but
10 was found in its place.`
2025-05-16 15:04:27 +05:00
01zulfi
739906dbe4 core: fix db.settings.getTrashCleanupInterval return type (#8076)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-16 14:48:28 +05:00
01zulfi
4326552ccc web: add support for removing recents in command palette using delete key (#8069)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-16 14:44:11 +05:00
01zulfi
1ee1ceef73 web: press shift+enter to create note in quick open (#8068)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-16 14:43:24 +05:00
Ammar Ahmed
4d83666fed editor: fix alignment items in callout heading (#8101)
* editor: fix alignment items in callout heading

* Update packages/editor/styles/styles.css

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

---------

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-05-16 14:36:29 +05:00
Abdullah Atta
86b8a2ae8c desktop: update patched better-sqlite3-multiple-ciphers to 11.6.1 2025-05-16 12:52:11 +05:00
Abdullah Atta
c8c21d210b global: regenerate package-lock.json for theme & ui packages 2025-05-16 11:22:21 +05:00
Ammar Ahmed
96343a3b1f mobile: fix error in build 2025-05-16 11:03:16 +05:00
Ammar Ahmed
74ebc4c82e mobile: add option to disable auto update check 2025-05-16 10:58:15 +05:00
Abdullah Atta
3acd3a87a9 misc: include @notesnook/theme package when generating flatpak sources 2025-05-16 10:24:54 +05:00
Abdullah Atta
94888ad94d desktop: downgrade playwright 2025-05-16 10:15:21 +05:00
Abdullah Atta
030daf12f2 desktop: fix flatpak sources generation 2025-05-15 12:17:28 +05:00
Abdullah Atta
d599a0836f desktop: regenerate package-lock.json 2025-05-15 10:36:42 +05:00
Abdullah Atta
7f901e7e75 web: update package-lock.json 2025-05-15 10:28:54 +05:00
Abdullah Atta
0a5e235e50 global: fix dependencies version differences 2025-05-15 09:59:39 +05:00
Abdullah Atta
aec3530d8a global: update package-lock.json 2025-05-15 09:47:41 +05:00
01zulfi
732e79dd60 web: fix list pane not expanding (#7963)
* web: fix list pane not expanding
* fix list pane not expanding to saved width on reload
* fix list pane not expanding to saved width on collapse

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* web: collapse pane and set size to 0 when applicable
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-15 09:25:29 +05:00
01zulfi
ca5c596158 core: segregate logic for note headline and note headline title generation (#7968)
* core: segregate logic for note headline and note headline title generation
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* core: minor refactor note headline title
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-15 09:25:29 +05:00
Ammar Ahmed
9e8e9c54d4 ci: fix build ios
Signed-off-by: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com>
2025-05-15 09:25:29 +05:00
Ammar Ahmed
2c2a79104b ci: fix build ios
Signed-off-by: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com>
2025-05-15 09:25:29 +05:00
Ammar Ahmed
27769f8682 ci: fix build ios
Signed-off-by: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com>
2025-05-15 09:25:29 +05:00
Ammar Ahmed
f150637e3a mobile: fix crash when going from trash -> search 2025-05-15 09:25:29 +05:00
Ammar Ahmed
f04661e32a mobile: release v3.1.1 2025-05-15 09:25:29 +05:00
Ammar Ahmed
db65e80dbc mobile: fix crash on delete item 2025-05-15 09:25:29 +05:00
Ammar Ahmed
4e65bbb7bf mobile: fix crash in list 2025-05-15 09:25:29 +05:00
Ammar Ahmed
d5ec302bf6 mobile: fix cursor bug on ios 2025-05-15 09:25:29 +05:00
Ammar Ahmed
51692a67e7 mobile: fix typing in editor title input 2025-05-15 09:25:29 +05:00
Ammar Ahmed
ee97d71f09 mobile: archive notes 2025-05-12 12:17:29 +05:00
Abdullah Atta
6d089c7332 web: bump version to 3.2.0-beta.1 2025-05-06 13:34:16 +05:00
Abdullah Atta
ab1b45bd50 core: fix query-transformer tests 2025-05-06 13:28:24 +05:00
Ammar Ahmed
fff8b61f71 mobile: add sqlite3-fts5-html module 2025-05-06 13:28:24 +05:00
Abdullah Atta
2c4f262fbc desktop: install sqlite3-fts5-html 2025-05-06 13:28:24 +05:00
Abdullah Atta
e5a7e08efb web: update wa-sqlite to use sqlite3-fts5-html for stripping html 2025-05-06 13:28:24 +05:00
Abdullah Atta
b4ef01c688 core: fix short queries search 2025-05-06 13:28:24 +05:00
Abdullah Atta
e6d6194b66 core: remove @orama/stopwords 2025-05-06 13:28:24 +05:00
Abdullah Atta
b6ee0989e5 core: strip html when searching notes
this commit also properly fixes search queries containing
words less than 3 characters in length
2025-05-06 13:28:24 +05:00
Abdullah Atta
e4230a0709 core: fix warnings in tests 2025-05-06 13:28:24 +05:00
Ammar Ahmed
0b17588e5d mobile: update better trigram 2025-05-06 13:28:24 +05:00
Abdullah Atta
8498f35b95 core: fix db migration 2025-05-06 13:28:24 +05:00
Abdullah Atta
8eecc995fc core: wrap query with invalid symbols in quotes 2025-05-06 13:28:24 +05:00
Abdullah Atta
1bbc01346b core: update sqlite-better-trigram to v0.0.3 2025-05-06 13:28:24 +05:00
01zulfi
2f3a895ddc core: fix trash cleanup interval setting retrieval (#8045)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-02 12:15:00 +05:00
01zulfi
5caa18543a web: add more archive test cases (#8040)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-02 10:11:53 +05:00
Abdullah Atta
33c493b317 desktop: no need to externalize @resvg/resvg-js 2025-05-02 10:11:08 +05:00
Abdullah Atta
ca497f3815 desktop: remove icon from native menu 2025-05-02 10:11:08 +05:00
Abdullah Atta
d796795c40 desktop: only show native menus on macos 2025-05-02 10:11:08 +05:00
Abdullah Atta
5c9d98d5d6 desktop: show native menus where possible 2025-05-02 10:11:08 +05:00
01zulfi
3b47d97314 web: assign accent color to links (#8041)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-01 13:14:40 +05:00
Abdullah Atta
4360d4b155 desktop: update packages 2025-05-01 13:13:38 +05:00
01zulfi
24d8bfe9bd desktop: upgrade electron to v34.0.0 (#8038)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-01 10:23:54 +05:00
01zulfi
832506b836 web: fix automatic backup reminder setting reverting to never (#8037)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-05-01 09:07:30 +05:00
01zulfi
795f38b4b8 web: fix focus last active tab method (#8034)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-30 11:30:24 +05:00
01zulfi
d42813b262 editor: improve hover link popup position (#8011)
* move it down so it doesn't block the link

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-29 09:32:38 +05:00
Abdullah Atta
d522c65d49 web: bump version to 3.2.0-beta.0 2025-04-28 11:18:25 +05:00
Abdullah Atta
4b7cecccbe web: update @notesnook-imoporter/core to 2.2.2 2025-04-28 11:09:51 +05:00
01zulfi
151abb94e1 web: fix notestore is not defined error (#8012)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-28 11:09:05 +05:00
Abdullah Atta
b67a307453 web: update @notesnook-importer/core to 2.2.1 2025-04-28 10:31:54 +05:00
Abdullah Atta
bf83c87911 web: update @notesnook-importer/core to 2.2.0 2025-04-28 09:59:57 +05:00
Abdullah Atta
8e67d3dc23 web: open settings with importer page instead of importer.notesnook.com 2025-04-28 09:59:57 +05:00
Ammar Ahmed
4b24f2c4b6 mobile: fix default font setting not followed 2025-04-28 09:59:57 +05:00
01zulfi
6cd14a5a78 web: make nav menu header draggable (#7985)
* web: make part of nav menu header draggable
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* Update apps/web/src/app.css

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

* Update apps/web/src/components/navigation-menu/index.tsx

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>

---------

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
2025-04-28 09:59:57 +05:00
Ammar Ahmed
6edae50960 mobile: remove READ_MEDIA_IMAGES permission 2025-04-28 09:59:57 +05:00
Abdullah Atta
2a6a377d06 web: refresh app after import 2025-04-28 09:59:57 +05:00
Abdullah Atta
c569dbd778 web: move importer into web/desktop app (#7472)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-28 09:59:57 +05:00
01zulfi
36022df189 web: add support for archiving notes (#7810)
* web: archive notes
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>

* global: arhives -> archived
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2025-04-28 09:45:59 +05:00
204 changed files with 39328 additions and 15283 deletions

View File

@@ -69,8 +69,6 @@ jobs:
run: |
sed -i -e 's/arguments/arguments "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",/g' apps/mobile/node_modules/react-native-mmkv-storage/android/build.gradle
sed -i -e 's/arguments/arguments "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",/g' apps/mobile/node_modules/react-native-reanimated/android/build.gradle
sed -i -e 's/defaultConfig {/ndkVersion safeExtGet('ndkVersion', "25.2.9519653")\n defaultConfig {/g' apps/mobile/node_modules/react-native-reanimated//android/build.gradle
sed -i -e 's/defaultConfig {/ndkVersion safeExtGet('ndkVersion', "25.2.9519653")\n defaultConfig {/g' apps/mobile/node_modules/react-native-mmkv-storage/android/build.gradle
- name: CCache Stats Before Build
run: ccache -sv

View File

@@ -69,8 +69,6 @@ jobs:
run: |
sed -i -e 's/arguments/arguments "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",/g' apps/mobile/node_modules/react-native-mmkv-storage/android/build.gradle
sed -i -e 's/arguments/arguments "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",/g' apps/mobile/node_modules/react-native-reanimated/android/build.gradle
sed -i -e 's/defaultConfig {/ndkVersion safeExtGet('ndkVersion', "25.2.9519653")\n defaultConfig {/g' apps/mobile/node_modules/react-native-reanimated//android/build.gradle
sed -i -e 's/defaultConfig {/ndkVersion safeExtGet('ndkVersion', "25.2.9519653")\n defaultConfig {/g' apps/mobile/node_modules/react-native-mmkv-storage/android/build.gradle
- name: CCache Stats Before Build
run: ccache -sv

View File

@@ -45,7 +45,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -107,7 +107,8 @@ jobs:
name: Notesnook Desktop v${{ steps.app_metadata.outputs.app_version }}
tag_name: v${{ steps.app_metadata.outputs.app_version }}
files: ./notesnook_build_v${{ steps.app_metadata.outputs.app_version }}.zip
prerelease: ${{ endsWith(steps.app_metadata.outputs.app_version, '-beta') }}
prerelease: ${{ inputs.release-track == 'beta' }}
target_commitish: ${{ github.ref }}
- name: Generate flatpak sources
if: inputs.publish-github && inputs.build-linux
@@ -232,7 +233,7 @@ jobs:
xcrun altool --upload-package $package -t osx --apiKey $API_KEY_ID --apiIssuer $API_KEY_ISSUER_ID --apple-id ${{ steps.app_metadata.outputs.apple_app_id }} --bundle-id ${{ steps.app_metadata.outputs.app_bundle_id }} --bundle-short-version-string ${{ steps.app_metadata.outputs.app_version }} --bundle-version ${{ steps.app_metadata.outputs.bundle_version }}
working-directory: ./apps/desktop
build-linux:
build-linux-x64:
name: Build for Linux
needs: build
if: inputs.build-linux
@@ -266,7 +267,6 @@ jobs:
- name: Install sqlite-better-trigram for all arch
run: |
npm i --cpu arm64 sqlite-better-trigram
npm i --cpu x64 sqlite-better-trigram
working-directory: ./apps/desktop
@@ -285,9 +285,9 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ${{ inputs.publish-github }} == true ]; then
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 AppImage:arm64 -p always
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 -p always
else
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 AppImage:arm64 -p never
yarn electron-builder --config=electron-builder.config.js --linux AppImage:x64 -p never
fi
working-directory: ./apps/desktop
@@ -297,6 +297,70 @@ jobs:
snapcraft upload --release=stable ./output/notesnook_linux_amd64.snap
working-directory: ./apps/desktop
build-linux-arm64:
name: Build for Linux
needs: build
if: inputs.build-linux
runs-on: ubuntu-22.04-arm
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup Node
uses: ./.github/actions/setup-node-with-cache
- name: Setup Snapcraft Auth
if: inputs.publish-snap
run: echo "SNAPCRAFT_STORE_CREDENTIALS=${{ secrets.snapcraft_token }}" >> $GITHUB_ENV
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
if: inputs.publish-snap
- name: Download build
uses: actions/download-artifact@v4
with:
name: build
path: ./apps/web/build
- name: Install packages
run: |
npm ci --ignore-scripts --prefer-offline --no-audit
npm run bootstrap -- --scope=desktop
- name: Install sqlite-better-trigram for all arch
run: |
npm i --cpu arm64 sqlite-better-trigram
working-directory: ./apps/desktop
- name: Build Electron wrapper
run: npx nx run release --project @notesnook/desktop
working-directory: ./apps/desktop
- name: Build snap
if: inputs.publish-snap
run: |
yarn electron-builder --config=electron-builder.config.js --linux snap:arm64 -p never
working-directory: ./apps/desktop
- name: Build AppImage
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ${{ inputs.publish-github }} == true ]; then
yarn electron-builder --config=electron-builder.config.js --linux AppImage:arm64 -p always
else
yarn electron-builder --config=electron-builder.config.js --linux AppImage:arm64 -p never
fi
working-directory: ./apps/desktop
- name: Publish on Snapcraft
if: inputs.publish-snap
run: |
snapcraft upload --release=stable ./output/notesnook_linux_arm64.snap
working-directory: ./apps/desktop
build-windows:
name: Build for Windows
needs: build

View File

@@ -4,7 +4,7 @@ on: workflow_dispatch
jobs:
build:
runs-on: macos-latest
runs-on: macos-14
timeout-minutes: 60
steps:
@@ -14,6 +14,11 @@ jobs:
- name: Setup Node
uses: ./.github/actions/setup-node-with-cache
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.1"
- name: Install node modules
run: |
npm ci --ignore-scripts --prefer-offline --no-audit

2
.gitignore vendored
View File

@@ -11,4 +11,4 @@ nx-cloud.env
site
node_modules.backup
.nx
*.patch
/*.patch

View File

@@ -57,6 +57,7 @@ module.exports = {
"node_modules/bindings",
"node_modules/node-gyp-build",
"node_modules/sqlite-better-trigram",
"node_modules/sqlite3-fts5-html",
"node_modules/sodium-native/prebuilds/${platform}-${arch}",
{
from: "node_modules/sqlite-better-trigram-linux-${arch}",
@@ -70,6 +71,20 @@ module.exports = {
from: "node_modules/sqlite-better-trigram-windows-${arch}",
to: "node_modules/sqlite-better-trigram-windows-${arch}"
},
{
from: "node_modules/sqlite3-fts5-html-linux-${arch}",
to: "node_modules/sqlite3-fts5-html-linux-${arch}"
},
{
from: "node_modules/sqlite3-fts5-html-darwin-${arch}",
to: "node_modules/sqlite3-fts5-html-darwin-${arch}"
},
{
from: "node_modules/sqlite3-fts5-html-windows-${arch}",
to: "node_modules/sqlite3-fts5-html-windows-${arch}"
},
"node_modules/sodium-native/index.js",
"node_modules/sodium-native/package.json"
],
@@ -160,23 +175,20 @@ module.exports = {
description: "Your private note taking space",
executableName: linuxExecutableName,
desktop: {
actions: [
{
id: "new-note",
name: "New note",
args: "new note"
desktopActions: {
"new-note": {
Name: "New note",
Exec: `${linuxExecutableName} new note`
},
{
id: "new-notebook",
name: "New notebook",
args: "new notebook"
"new-notebook": {
Name: "New notebook",
Exec: `${linuxExecutableName} new notebook`
},
{
id: "new-reminder",
name: "New reminder",
args: "new reminder"
"new-reminder": {
Name: "New reminder",
Exec: `${linuxExecutableName} new reminder`
}
]
}
}
},
snap: {

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "@notesnook/desktop",
"productName": "Notesnook",
"description": "Your private note taking space",
"version": "3.1.0",
"version": "3.2.0-beta.9",
"appAppleId": "1544027013",
"private": true,
"main": "./dist/cjs/index.js",
@@ -27,37 +27,42 @@
"dependencies": {
"@lingui/core": "5.1.2",
"@notesnook/intl": "file:../../packages/intl",
"@notesnook/ui": "file:../../packages/ui",
"@trpc/client": "10.45.2",
"@trpc/server": "10.45.2",
"better-sqlite3-multiple-ciphers": "11.5.0",
"better-sqlite3-multiple-ciphers": "11.3.0",
"electron-trpc": "0.7.1",
"electron-updater": "^6.3.4",
"icojs": "^0.19.4",
"sqlite-better-trigram": "0.0.2",
"electron-updater": "^6.6.2",
"icojs": "^0.19.5",
"sqlite-better-trigram": "0.0.3",
"sqlite3-fts5-html": "^0.0.3",
"typed-emitter": "^2.1.0",
"yargs": "^17.7.2",
"zod": "3.23.8"
"zod": "3.24.3"
},
"devDependencies": {
"@streetwriters/kysely": "^0.27.4",
"@types/node": "22.7.0",
"@types/node": "22.15.3",
"@types/yargs": "^17.0.33",
"chokidar": "^4.0.1",
"electron": "^31.7.4",
"electron-builder": "^25.1.8",
"chokidar": "^4.0.3",
"electron": "^34.0.0",
"electron-builder": "^26.0.12",
"esbuild": "0.21.5",
"node-abi": "^3.68.0",
"node-gyp-build": "^4.8.2",
"playwright": "^1.48.2",
"node-abi": "^4.5.0",
"node-gyp-build": "^4.8.4",
"playwright": "1.48.2",
"prebuildify": "^6.0.1",
"slugify": "1.6.6",
"tree-kill": "^1.2.2",
"undici": "^6.19.8",
"vitest": "^2.1.8"
"undici": "^7.8.0",
"vitest": "2.1.8"
},
"optionalDependencies": {
"dmg-license": "^1.0.11"
},
"overrides": {
"@electron/node-gyp": "^10.2.0-electron.2"
},
"scripts": {
"start": "node scripts/dev.mjs",
"staging": "node scripts/build.mjs --run",

View File

@@ -1,36 +0,0 @@
diff --git a/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js b/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
index 739a48c..7a7b4af 100644
--- a/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
+++ b/node_modules/app-builder-lib/out/targets/LinuxTargetHelper.js
@@ -117,6 +117,7 @@ class LinuxTargetHelper {
StartupWMClass: appInfo.productName,
...extra,
...targetSpecificOptions.desktop,
+ actions: undefined
};
const description = this.getDescription(targetSpecificOptions);
if (!(0, builder_util_1.isEmptyOrSpaces)(description)) {
@@ -160,6 +161,23 @@ class LinuxTargetHelper {
data += `\n${name}=${desktopMeta[name]}`;
}
data += "\n";
+
+ if (targetSpecificOptions.desktop.actions) {
+ let actionsData = "";
+ const validActions = [];
+ for (const action of targetSpecificOptions.desktop.actions) {
+ if (!action.id || !action.name || !action.args) continue;
+ actionsData += "\n";
+ actionsData += `[Desktop Action ${action.id}]
+Name=${action.name}
+Exec=${desktopMeta.Exec} ${action.args}`;
+ actionsData += "\n";
+
+ validActions.push(action.id);
+ }
+
+ data += `Actions=${validActions.join(";")};\n${actionsData}`
+ }
return Promise.resolve(data);
}
}

View File

@@ -0,0 +1,11 @@
diff --git a/node_modules/better-sqlite3-multiple-ciphers/deps/defines.gypi b/node_modules/better-sqlite3-multiple-ciphers/deps/defines.gypi
index 1a14ecd..dabcce2 100644
--- a/node_modules/better-sqlite3-multiple-ciphers/deps/defines.gypi
+++ b/node_modules/better-sqlite3-multiple-ciphers/deps/defines.gypi
@@ -38,5 +38,6 @@
'SQLITE_TRACE_SIZE_LIMIT=32',
'SQLITE_USER_AUTHENTICATION=0',
'SQLITE_USE_URI=0',
+ 'SQLITE_ENABLE_REGEXP',
],
}

View File

@@ -1,39 +0,0 @@
diff --git a/node_modules/electron-trpc/dist/main.mjs b/node_modules/electron-trpc/dist/main.mjs
index 07971db..b67a3cf 100644
--- a/node_modules/electron-trpc/dist/main.mjs
+++ b/node_modules/electron-trpc/dist/main.mjs
@@ -537,8 +537,15 @@ class be {
attachWindow(r) {
F(this, w).includes(r) || (y("Attaching window", r.id), F(this, w).push(r), v(this, N, Z).call(this, r));
}
- detachWindow(r) {
- y("Detaching window", r.id), L(this, w, F(this, w).filter((e) => e !== r)), v(this, R, M).call(this, { webContentsId: r.webContents.id });
+ detachWindow(r, webContentsId) {
+ y("Detaching window", r.id);
+
+ if (r.isDestroyed() && webContentsId === undefined) {
+ throw new Error('webContentsId is required when calling detachWindow on a destroyed window');
+ }
+
+ L(this, w, F(this, w).filter((e) => e !== r));
+ v(this, R, M).call(this, { webContentsId: webContentsId ?? r.webContents.id });
}
}
w = new WeakMap(), E = new WeakMap(), R = new WeakSet(), M = function({
@@ -548,6 +555,7 @@ w = new WeakMap(), E = new WeakMap(), R = new WeakSet(), M = function({
for (const [i, a] of F(this, E).entries())
i.startsWith(`${r}-${e ?? ""}`) && (y("Closing subscription", i), a.unsubscribe(), F(this, E).delete(i));
}, N = new WeakSet(), Z = function(r) {
+ const webContentsId = r.webContents.id;
r.webContents.on("did-start-navigation", ({ frame: e }) => {
y(
"Handling webContents `did-start-navigation` event",
@@ -558,7 +566,7 @@ w = new WeakMap(), E = new WeakMap(), R = new WeakSet(), M = function({
frameRoutingId: e.routingId
});
}), r.webContents.on("destroyed", () => {
- y("Handling webContents `destroyed` event"), this.detachWindow(r);
+ y("Handling webContents `destroyed` event"), this.detachWindow(r, webContentsId);
});
};
const me = ({

View File

@@ -43,8 +43,7 @@ if (args.rebuild || !existsSync(path.join(webAppPath, "build"))) {
);
}
// temporary until there's support for prebuilt binaries for linux ARM
if (os.platform() === "linux") await patchBetterSQLite3();
await patchBetterSQLite3();
await fs.cp(path.join(webAppPath, "build"), path.join(root, "build"), {
recursive: true,

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { readFile, writeFile } from "fs/promises";
import { readFile, rm, writeFile } from "fs/promises";
import path from "path";
import { fileURLToPath } from "url";
@@ -25,6 +25,8 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export async function patchBetterSQLite3() {
console.log("Patching better-sqlite3");
const jsonPath = path.join(
__dirname,
"..",
@@ -34,15 +36,23 @@ export async function patchBetterSQLite3() {
);
const json = JSON.parse(await readFile(jsonPath, "utf-8"));
json.version = "11.5.1";
json.homepage = "https://github.com/thecodrr/better-sqlite3-multiple-ciphers";
json.repository.url =
"git://github.com/thecodrr/better-sqlite3-multiple-ciphers.git";
delete json.homepage;
delete json.repository;
await writeFile(jsonPath, JSON.stringify(json));
await rm(
path.join(
__dirname,
"..",
"node_modules",
"better-sqlite3-multiple-ciphers",
"build"
),
{ force: true, recursive: true }
);
}
if (process.argv[1] === __filename) {
console.log("Patching better-sqlite3");
patchBetterSQLite3();
}

View File

@@ -19,7 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { initTRPC } from "@trpc/server";
import { z } from "zod";
import { app, dialog, nativeTheme, Notification, shell } from "electron";
import {
app,
dialog,
Menu,
MenuItem,
nativeImage,
nativeTheme,
Notification,
shell
} from "electron";
import { AutoLaunch } from "../utils/autolaunch";
import { config, DesktopIntegration } from "../utils/config";
import { bringToFront } from "../utils/bring-to-front";
@@ -33,6 +42,7 @@ import { isFlatpak, isSnap } from "../utils";
import { setupDesktopIntegration } from "../utils/desktop-integration";
import { rm } from "fs/promises";
import { disableCustomDns, enableCustomDns } from "../utils/custom-dns";
import type { MenuItem as NNMenuItem } from "@notesnook/ui";
const t = initTRPC.create();
@@ -225,5 +235,63 @@ export const osIntegrationRouter = t.router({
nativeTheme.off("updated", updated);
};
})
)
),
showMenu: t.procedure
.input(
z.object({
menuItems: z.array(z.any())
})
)
.subscription(({ input: { menuItems } }) =>
observable<string[]>((emit) => {
const items = menuItems as NNMenuItem[];
const menu = new Menu();
for (const item of items) {
const menuItem = toMenuItem(item, (id) => emit.next(id));
if (menuItem) menu.append(menuItem);
}
if (menu.items.length > 0) menu.popup();
return () => {
menu.removeAllListeners();
menu.closePopup();
};
})
)
});
function toMenuItem(
item: NNMenuItem,
onClick: (id: string[]) => void,
parentKey?: string
): MenuItem | undefined {
switch (item.type) {
case "lazy-loader":
return undefined;
case "separator":
return new MenuItem({ type: "separator" });
case "button": {
const submenu = item.menu ? new Menu() : undefined;
if (submenu && item.menu) {
for (const subitem of item.menu.items) {
const subMenuItem = toMenuItem(subitem, onClick, item.key);
if (subMenuItem) submenu.append(subMenuItem);
}
}
return new MenuItem({
label: item.title,
enabled: !item.isDisabled,
visible: !item.isHidden,
toolTip: item.tooltip,
sublabel: item.tooltip,
checked: item.isChecked,
type: submenu ? "submenu" : item.isChecked ? "checkbox" : "normal",
id: item.key,
submenu,
click: () => onClick(parentKey ? [parentKey, item.key] : [item.key]),
accelerator: item.modifier?.replace("Mod", "CommandOrControl")
});
}
}
}

View File

@@ -47,7 +47,9 @@ export class SQLite {
filePath
).unsafeMode(true);
const betterTrigram = require("sqlite-better-trigram");
const fts5Html = require("sqlite3-fts5-html");
betterTrigram.load(this.sqlite);
fts5Html.load(this.sqlite);
}
/**

View File

@@ -143,16 +143,44 @@ function setupMenu() {
})
);
if (params.isEditable)
if (params.isEditable) {
menu.append(
new MenuItem({
label: strings.paste(),
role: "pasteAndMatchStyle",
role: "paste",
enabled: clipboard.readText("clipboard").length > 0,
accelerator: "CommandOrControl+V"
})
);
menu.append(
new MenuItem({
label:
process.platform === "darwin"
? strings.pasteAndMatchStyle()
: strings.pasteWithoutFormatting(),
role: "pasteAndMatchStyle",
enabled: clipboard.readText("clipboard").length > 0,
accelerator:
process.platform === "darwin"
? "Option+Shift+Command+V"
: "Shift+CommandOrControl+V"
})
);
menu.append(
new MenuItem({
type: "separator"
})
);
menu.append(
new MenuItem({
label: strings.spellCheck(),
role: "toggleSpellChecker"
})
);
}
if (menu.items.length > 0) menu.popup();
});
}

View File

@@ -69,6 +69,7 @@ buck-out/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
native/vendor
# Bundle artifact
*.jsbundle

View File

@@ -167,6 +167,7 @@ const Actions = ({
setAttachments();
eSendEvent(eDBItemUpdate, attachment.id);
}
return true;
},
positiveText: strings.rename()
});

View File

@@ -26,7 +26,7 @@ import { notesnook } from "../../../e2e/test.ids";
import { getColorLinearShade } from "../../utils/colors";
import { AppFontSize } from "../../utils/size";
import { DefaultAppStyles } from "../../utils/styles";
import { Button } from "../ui/button";
import { Button, ButtonProps } from "../ui/button";
import Paragraph from "../ui/typography/paragraph";
const DialogButtons = ({
@@ -37,6 +37,14 @@ const DialogButtons = ({
loading,
doneText,
positiveType
}: {
onPressPositive?: () => void;
onPressNegative: () => void;
positiveTitle: string;
negativeTitle?: string;
loading?: boolean;
doneText?: string;
positiveType?: ButtonProps["type"];
}) => {
const { colors, isDark } = useThemeColors();

View File

@@ -17,15 +17,17 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { KeyboardTypeOptions } from "react-native";
import { eSendEvent } from "../../services/event-manager";
import { eCloseSimpleDialog, eOpenSimpleDialog } from "../../utils/events";
import { ButtonProps } from "../ui/button";
type DialogInfo = {
export type DialogInfo = {
title?: string;
paragraph?: string;
positiveText?: string;
negativeText?: string;
positivePress?: (...args: any[]) => void;
positiveText: string;
negativeText: string;
positivePress?: (...args: any[]) => Promise<any>;
onClose?: () => void;
positiveType?:
| "transparent"
@@ -44,16 +46,18 @@ type DialogInfo = {
// eslint-disable-next-line @typescript-eslint/ban-types
context: "global" | "local" | (string & {});
secureTextEntry?: boolean;
keyboardType?: string;
keyboardType?: KeyboardTypeOptions;
check?: {
info: string;
type?: string;
type?: ButtonProps["type"];
defaultValue?: boolean;
};
notice: {
text: string;
type: "alert" | "information";
};
disableBackdropClosing: boolean;
component: JSX.Element | ((close?: () => void) => JSX.Element);
};
export function presentDialog(data: Partial<DialogInfo>): void {

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { strings } from "@notesnook/intl";
import { useThemeColors } from "@notesnook/theme";
import React, { useCallback, useEffect, useRef, useState } from "react";
import { View } from "react-native";
import { TextInput, View, ViewStyle } from "react-native";
import { DDS } from "../../services/device-detection";
import {
eSubscribeEvent,
@@ -40,42 +40,26 @@ import Seperator from "../ui/seperator";
import BaseDialog from "./base-dialog";
import DialogButtons from "./dialog-buttons";
import DialogHeader from "./dialog-header";
import { DialogInfo } from "./functions";
export const Dialog = ({ context = "global" }) => {
export const Dialog = ({ context = "global" }: { context?: string }) => {
const { colors } = useThemeColors();
const [visible, setVisible] = useState(false);
const [checked, setChecked] = useState(false);
const [loading, setLoading] = useState(false);
const values = useRef({
const [visible, setVisible] = useState<boolean>();
const [checked, setChecked] = useState<boolean>();
const [loading, setLoading] = useState<boolean>();
const values = useRef<{
inputValue?: string;
}>({
inputValue: undefined
});
const inputRef = useRef();
const [dialogInfo, setDialogInfo] = useState({
title: "",
paragraph: "",
positiveText: strings.done(),
negativeText: strings.cancel(),
positivePress: () => {},
onClose: () => {},
positiveType: "transparent",
icon: null,
paragraphColor: colors.primary.paragraph,
input: false,
inputPlaceholder: "Enter some text",
defaultValue: "",
disableBackdropClosing: false,
check: {
info: "Check",
type: "transparent",
defaultValue: false
}
});
const inputRef = useRef<TextInput>(null);
const [dialogInfo, setDialogInfo] = useState<DialogInfo>();
const onPressPositive = async () => {
if (dialogInfo.positivePress) {
if (dialogInfo?.positivePress) {
inputRef.current?.blur();
setLoading(true);
let result;
let result = false;
try {
result = await dialogInfo.positivePress(
values.current.inputValue || dialogInfo.defaultValue,
@@ -97,7 +81,7 @@ export const Dialog = ({ context = "global" }) => {
};
const show = useCallback(
(data) => {
(data: DialogInfo) => {
if (!data.context) data.context = "global";
if (data.context !== context) return;
setDialogInfo(data);
@@ -108,6 +92,14 @@ export const Dialog = ({ context = "global" }) => {
[context]
);
const hide = React.useCallback(() => {
setChecked(false);
values.current.inputValue = undefined;
setVisible(false);
setDialogInfo(undefined);
dialogInfo?.onClose?.();
}, [dialogInfo]);
useEffect(() => {
eSubscribeEvent(eOpenSimpleDialog, show);
eSubscribeEvent(eCloseSimpleDialog, hide);
@@ -118,21 +110,14 @@ export const Dialog = ({ context = "global" }) => {
};
}, [hide, show]);
const hide = React.useCallback(() => {
setChecked(false);
values.current.inputValue = undefined;
setVisible(false);
dialogInfo.onClose?.();
}, [dialogInfo]);
const onNegativePress = async () => {
if (dialogInfo.onClose) {
if (dialogInfo?.onClose) {
await dialogInfo.onClose();
}
hide();
};
const style = {
const style: ViewStyle = {
...getElevationStyle(5),
width: DDS.isTab ? 400 : "85%",
maxHeight: 450,
@@ -143,7 +128,7 @@ export const Dialog = ({ context = "global" }) => {
overflow: "hidden"
};
return visible ? (
return visible && dialogInfo ? (
<BaseDialog
statusBarTranslucent={false}
bounce={!dialogInfo.input}
@@ -160,89 +145,99 @@ export const Dialog = ({ context = "global" }) => {
visible={true}
onRequestClose={hide}
>
<View style={style}>
<DialogHeader
title={dialogInfo.title}
icon={dialogInfo.icon}
paragraph={dialogInfo.paragraph}
paragraphColor={dialogInfo.paragraphColor}
padding={12}
style={{
minHeight: 0
}}
/>
<Seperator half />
{typeof dialogInfo.component === "function"
? dialogInfo.component(() => hide())
: dialogInfo.component}
{dialogInfo.input ? (
<View
{dialogInfo.component ? null : (
<View style={style}>
<DialogHeader
title={dialogInfo.title}
icon={dialogInfo.icon}
paragraph={dialogInfo.paragraph}
paragraphColor={dialogInfo.paragraphColor}
padding={12}
style={{
paddingHorizontal: DefaultAppStyles.GAP
minHeight: 0
}}
>
<Input
fwdRef={inputRef}
autoCapitalize="none"
onChangeText={(value) => {
values.current.inputValue = value;
}}
testID="input-value"
secureTextEntry={dialogInfo.secureTextEntry}
//defaultValue={dialogInfo.defaultValue}
onSubmit={onPressPositive}
returnKeyLabel="Done"
returnKeyType="done"
keyboardType={dialogInfo.keyboardType || "default"}
placeholder={dialogInfo.inputPlaceholder}
/>
</View>
) : null}
/>
<Seperator half />
{dialogInfo?.notice ? (
<View
style={{
paddingHorizontal: DefaultAppStyles.GAP
}}
>
<Notice
type={dialogInfo.notice.type || "information"}
text={dialogInfo.notice.text}
/>
</View>
) : null}
{dialogInfo.check ? (
<>
<Button
onPress={() => {
setChecked(!checked);
}}
icon={
checked
? "check-circle-outline"
: "checkbox-blank-circle-outline"
}
iconColor={checked ? colors.secondary.icon : colors.primary.icon}
{dialogInfo.input ? (
<View
style={{
justifyContent: "flex-start"
paddingHorizontal: DefaultAppStyles.GAP
}}
height={35}
iconSize={20}
width="100%"
title={dialogInfo.check.info}
type={checked ? dialogInfo.check.type || "plain" : "plain"}
/>
</>
) : null}
>
<Input
fwdRef={inputRef}
autoCapitalize="none"
onChangeText={(value) => {
values.current.inputValue = value;
}}
testID="input-value"
secureTextEntry={dialogInfo.secureTextEntry}
//defaultValue={dialogInfo.defaultValue}
onSubmit={() => {
onPressPositive();
}}
returnKeyLabel="Done"
returnKeyType="done"
keyboardType={dialogInfo.keyboardType || "default"}
placeholder={dialogInfo.inputPlaceholder}
/>
</View>
) : null}
<DialogButtons
onPressNegative={onNegativePress}
onPressPositive={dialogInfo.positivePress && onPressPositive}
loading={loading}
positiveTitle={dialogInfo.positiveText}
negativeTitle={dialogInfo.negativeText}
positiveType={dialogInfo.positiveType}
/>
</View>
{dialogInfo?.notice ? (
<View
style={{
paddingHorizontal: DefaultAppStyles.GAP
}}
>
<Notice
type={dialogInfo.notice.type || "information"}
text={dialogInfo.notice.text}
/>
</View>
) : null}
{dialogInfo.check ? (
<>
<Button
onPress={() => {
setChecked(!checked);
}}
icon={
checked
? "check-circle-outline"
: "checkbox-blank-circle-outline"
}
iconColor={
checked ? colors.secondary.icon : colors.primary.icon
}
style={{
justifyContent: "flex-start"
}}
height={35}
iconSize={20}
width="100%"
title={dialogInfo.check.info}
type={checked ? dialogInfo.check.type || "plain" : "plain"}
/>
</>
) : null}
<DialogButtons
onPressNegative={onNegativePress}
onPressPositive={dialogInfo.positivePress && onPressPositive}
loading={loading}
positiveTitle={dialogInfo.positiveText}
negativeTitle={dialogInfo.negativeText}
positiveType={dialogInfo.positiveType}
/>
</View>
)}
<Toast context="local" />
</BaseDialog>
) : null;

View File

@@ -133,7 +133,9 @@ export const SectionHeader = React.memo<
<Sort
screen={screen}
type={dataType}
hideGroupOptions={screen === "Reminders"}
hideGroupOptions={
screen === "Reminders" || screen === "Search"
}
/>
)
});

View File

@@ -0,0 +1,181 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from "react";
import { HighlightedResult } from "@notesnook/core";
import { View } from "react-native";
import { Pressable } from "../../ui/pressable";
import Paragraph from "../../ui/typography/paragraph";
import { useThemeColors } from "@notesnook/theme";
import { DefaultAppStyles } from "../../../utils/styles";
import Heading from "../../ui/typography/heading";
import { AppFontSize } from "../../../utils/size";
import { Properties } from "../../properties";
import { db } from "../../../common/database";
import { eSendEvent } from "../../../services/event-manager";
import { eOnLoadNote } from "../../../utils/events";
import { IconButton } from "../../ui/icon-button";
import { fluidTabsRef } from "../../../utils/global-refs";
type SearchResultProps = {
item: HighlightedResult;
};
export const SearchResult = (props: SearchResultProps) => {
const [expanded, setExpanded] = React.useState(true);
const { colors } = useThemeColors();
const openNote = async (index?: number) => {
const note = await db.notes.note(props.item.id);
eSendEvent(eOnLoadNote, {
item: {
...note,
content: props.item.rawContent
? {
data: props.item.rawContent || "",
type: "tiptap"
}
: undefined
},
searchResultIndex: index
});
fluidTabsRef.current?.goToPage("editor");
};
return (
<Pressable
style={{
alignSelf: "flex-start",
alignItems: "flex-start",
paddingHorizontal: DefaultAppStyles.GAP,
paddingVertical: DefaultAppStyles.GAP_VERTICAL_SMALL,
borderRadius: 0
}}
onLongPress={async () => {
const note = await db.notes.note(props.item.id);
Properties.present(note);
}}
onPress={async () => openNote()}
>
<View
style={{
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
width: "100%"
}}
>
<View
style={{
flexDirection: "row",
alignItems: "center",
gap: DefaultAppStyles.GAP_SMALL / 2,
flexShrink: 1
}}
>
{props.item.content?.length ? (
<IconButton
name={!expanded ? "chevron-right" : "chevron-down"}
onPress={() => setExpanded((prev) => !prev)}
size={AppFontSize.md + 2}
color={colors.secondary.icon}
style={{
width: 23,
height: 23
}}
/>
) : null}
<Heading
size={AppFontSize.sm}
style={{
flexShrink: 1
}}
>
{props.item.title.map((title, index) => (
<React.Fragment key={props.item.id + index + "-srt"}>
{title.prefix}
<Heading
size={AppFontSize.sm}
style={{
backgroundColor: colors.secondary.accent,
color: colors.secondary.accentForeground
}}
>
{title.match}
</Heading>
{title.suffix}
</React.Fragment>
))}
</Heading>
</View>
{props.item.content?.length ? (
<Paragraph size={AppFontSize.xxs} color={colors.secondary.paragraph}>
{props.item.content.length}
</Paragraph>
) : null}
</View>
{expanded &&
props.item.content.map((content, index) => (
<Pressable
key={props.item.id + index}
style={{
alignSelf: "flex-start",
alignItems: "flex-start",
paddingVertical: DefaultAppStyles.GAP_VERTICAL_SMALL,
borderColor: colors.primary.border,
borderWidth: 0,
borderRadius: 0,
borderBottomWidth: 1,
borderBottomColor: colors.primary.border,
width: "100%"
}}
onLongPress={async () => {
const note = await db.notes.note(props.item.id);
Properties.present(note);
}}
onPress={() => {
let activeIndex = 0;
for (let i = 0; i <= index; i++) {
activeIndex += props.item.content[i].length;
}
console.log(activeIndex);
openNote(activeIndex);
}}
>
<Paragraph>
{content.map((match, index) => (
<React.Fragment key={props.item.id + index + "src"}>
{match.prefix}
<Paragraph
size={AppFontSize.sm}
style={{
backgroundColor: colors.secondary.accent,
color: colors.secondary.accentForeground
}}
>
{match.match}
</Paragraph>
{match.suffix}
</React.Fragment>
))}
</Paragraph>
</Pressable>
))}
</Pressable>
);
};

View File

@@ -73,7 +73,7 @@ export default function List(props: ListProps) {
? "home"
: props.renderedInRoute === "Favorites"
? "favorites"
: props.renderedInRoute === "Trash"
: props.renderedInRoute === "Trash" || props.dataType === "trash"
? "trash"
: `${props.dataType}s`;
@@ -150,7 +150,7 @@ export default function List(props: ListProps) {
flex: 1
}}
>
{props.data?.placeholders?.length === 0 ? (
{props.data?.placeholders?.length === 0 || !props.data ? (
<>
{props.CustomLisHeader ? (
props.CustomLisHeader

View File

@@ -27,6 +27,7 @@ import {
GroupHeader,
GroupOptions,
GroupingKey,
HighlightedResult,
Item,
ItemType,
Note,
@@ -49,6 +50,7 @@ import { NoteWrapper } from "../list-items/note/wrapper";
import { NotebookWrapper } from "../list-items/notebook/wrapper";
import ReminderItem from "../list-items/reminder";
import TagItem from "../list-items/tag";
import { SearchResult } from "../list-items/search-result";
type ListItemWrapperProps<TItem = Item> = {
group?: GroupingKey;
@@ -153,7 +155,9 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
},
items?.cacheItem(index) ? 100 : 0
);
} catch (e) {}
} catch (e) {
/** empty */
}
})();
}, [index, items, refreshItem]);
@@ -196,7 +200,7 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
notebooks={notebooks.current}
reminder={reminder.current}
attachmentsCount={attachmentsCount.current}
date={getDate(item, group)}
date={getDate(item as Note, group)}
isRenderedInActionSheet={isSheet}
index={index}
locked={locked.current}
@@ -227,7 +231,7 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
<NotebookWrapper
item={item as Notebook}
totalNotes={totalNotes.current}
date={getDate(item, group)}
date={getDate(item as Notebook, group)}
index={index}
/>
</>
@@ -285,12 +289,34 @@ export function ListItemWrapper(props: ListItemWrapperProps) {
/>
</>
);
case "searchResult":
return (
<>
{groupHeader && previousIndex.current === index && !isSheet ? (
<SectionHeader
screen={props.renderedInRoute}
item={groupHeader}
index={index}
dataType={item.type}
color={props.customAccentColor}
groupOptions={groupOptions}
onOpenJumpToDialog={() => {
eSendEvent(eOpenJumpToDialog, {
ref: props.scrollRef,
data: items
});
}}
/>
) : null}
<SearchResult item={item as HighlightedResult} />
</>
);
default:
return null;
}
}
function getDate(item: Item, groupType?: GroupingKey): number {
function getDate(item: Notebook | Note, groupType?: GroupingKey): number {
return (
getSortValue(
groupType

View File

@@ -58,7 +58,6 @@ const Line = ({ top = 6, bottom = 6 }) => {
export const Properties = ({ close = () => {}, item, buttons = [] }) => {
const { colors } = useThemeColors();
const isColor = !!ColorValues[item.title];
if (!item || !item.id) {
return (
<Paragraph style={{ marginVertical: 10, alignSelf: "center" }}>

View File

@@ -36,6 +36,7 @@ import Paragraph from "../ui/typography/paragraph";
const TOP_BAR_ITEMS: ActionId[] = [
"pin",
"favorite",
"archive",
"lock-unlock",
"publish",
"local-only",
@@ -66,6 +67,7 @@ const COLUMN_BAR_ITEMS: ActionId[] = [
"move-notebook",
"pin",
"default-notebook",
"default-tag",
"default-homepage",
"add-shortcut",
"reorder",

View File

@@ -24,11 +24,11 @@ import { TaggedNotes } from "../../screens/notes/tagged";
import { useThemeColors } from "@notesnook/theme";
import { AppFontSize } from "../../utils/size";
import { sleep } from "../../utils/time";
import ManageTagsSheet from "../sheets/manage-tags";
import { Button } from "../ui/button";
import { ColorTags } from "./color-tags";
import { strings } from "@notesnook/intl";
import { DefaultAppStyles } from "../../utils/styles";
import ManageTags from "../../screens/manage-tags";
export const Tags = ({ item, close }) => {
const { colors } = useThemeColors();
@@ -47,7 +47,8 @@ export const Tags = ({ item, close }) => {
>
<Button
onPress={async () => {
ManageTagsSheet.present([item.id]);
ManageTags.present([item.id]);
close();
}}
buttonType={{
text: colors.primary.accent

View File

@@ -42,10 +42,11 @@ import { DefaultAppStyles } from "../../utils/styles";
import { sleep } from "../../utils/time";
import { presentDialog } from "../dialog/functions";
import ExportNotesSheet from "../sheets/export-notes";
import ManageTagsSheet from "../sheets/manage-tags";
import { MoveNotebook } from "../../screens/move-notebook";
import { IconButton } from "../ui/icon-button";
import NativeTooltip from "../../utils/tooltip";
import ManageTags from "../../screens/manage-tags";
export const SelectionHeader = React.memo(
({
@@ -209,7 +210,7 @@ export const SelectionHeader = React.memo(
{
title: strings.manageTags(),
onPress: async () => {
ManageTagsSheet.present(selectedItemsList);
ManageTags.present(selectedItemsList);
},
visible: type === "note",
icon: "pound"

View File

@@ -24,23 +24,22 @@ import { TextInput, View } from "react-native";
import { notesnook } from "../../../../e2e/test.ids";
import { db } from "../../../common/database";
import { DDS } from "../../../services/device-detection";
import {
ToastManager,
eSendEvent,
presentSheet
} from "../../../services/event-manager";
import { ToastManager, eSendEvent } from "../../../services/event-manager";
import Navigation from "../../../services/navigation";
import { useMenuStore } from "../../../stores/use-menu-store";
import { useNotebookStore } from "../../../stores/use-notebook-store";
import { useRelationStore } from "../../../stores/use-relation-store";
import { eOnNotebookUpdated } from "../../../utils/events";
import { getParentNotebookId } from "../../../utils/notebooks";
import { AppFontSize } from "../../../utils/size";
import { Button } from "../../ui/button";
import Input from "../../ui/input";
import Seperator from "../../ui/seperator";
import Heading from "../../ui/typography/heading";
import { DefaultAppStyles } from "../../../utils/styles";
import { useSettingStore } from "../../../stores/use-setting-store";
import DialogHeader from "../../dialog/dialog-header";
import DialogButtons from "../../dialog/dialog-buttons";
import { presentDialog } from "../../dialog/functions";
import { getElevationStyle } from "../../../utils/elevation";
import { defaultBorderRadius } from "../../../utils/size";
import { useThemeColors } from "@notesnook/theme";
import { getContainerBorder } from "../../../utils/colors";
export const AddNotebookSheet = ({
notebook,
@@ -55,6 +54,7 @@ export const AddNotebookSheet = ({
showMoveNotesOnComplete: boolean;
defaultTitle?: string;
}) => {
const { colors } = useThemeColors();
const title = useRef(notebook?.title || defaultTitle);
const description = useRef(notebook?.description);
const titleInput = useRef<TextInput>(null);
@@ -124,57 +124,66 @@ export const AddNotebookSheet = ({
return (
<View
style={{
maxHeight: DDS.isTab ? "90%" : "97%",
borderRadius: DDS.isTab ? 5 : 0,
paddingHorizontal: DefaultAppStyles.GAP
...getElevationStyle(5),
width: DDS.isTab ? 400 : "85%",
maxHeight: 450,
borderRadius: defaultBorderRadius,
backgroundColor: colors.primary.background,
paddingTop: 12,
...getContainerBorder(colors.primary.border, 0.5),
overflow: "hidden"
}}
>
<Heading size={AppFontSize.lg}>
{notebook ? strings.editNotebook() : strings.newNotebook()}
</Heading>
<Seperator />
<Input
fwdRef={titleInput}
testID={notesnook.ids.dialogs.notebook.inputs.title}
onChangeText={(value) => {
title.current = value;
}}
onLayout={() => {
setImmediate(() => {
titleInput?.current?.focus();
});
}}
placeholder={strings.enterNotebookTitle()}
onSubmit={() => {
descriptionInput.current?.focus();
}}
returnKeyLabel="Next"
returnKeyType="next"
defaultValue={notebook ? notebook.title : title.current}
/>
<Input
fwdRef={descriptionInput}
testID={notesnook.ids.dialogs.notebook.inputs.description}
onChangeText={(value) => {
description.current = value;
}}
placeholder={strings.enterNotebookDescription()}
returnKeyLabel={strings.next()}
returnKeyType="next"
defaultValue={notebook ? notebook.description : ""}
/>
<Button
title={notebook ? strings.save() : strings.add()}
type="accent"
<View
style={{
paddingHorizontal: DefaultAppStyles.GAP * 2,
width: "100%"
paddingHorizontal: 12
}}
onPress={onSaveChanges}
>
<DialogHeader
title={notebook ? strings.editNotebook() : strings.newNotebook()}
/>
<Input
fwdRef={titleInput}
testID={notesnook.ids.dialogs.notebook.inputs.title}
onChangeText={(value) => {
title.current = value;
}}
onLayout={() => {
setTimeout(() => {
titleInput?.current?.focus();
}, 300);
}}
placeholder={strings.enterNotebookTitle()}
onSubmit={() => {
descriptionInput.current?.focus();
}}
returnKeyLabel="Next"
returnKeyType="next"
defaultValue={notebook ? notebook.title : title.current}
/>
<Input
fwdRef={descriptionInput}
testID={notesnook.ids.dialogs.notebook.inputs.description}
onChangeText={(value) => {
description.current = value;
}}
placeholder={strings.enterNotebookDescription()}
returnKeyLabel={strings.next()}
returnKeyType="next"
defaultValue={notebook ? notebook.description : ""}
/>
</View>
<DialogButtons
onPressNegative={() => {
title.current = undefined;
close?.(false);
useSettingStore.getState().setSheetKeyboardHandler(true);
}}
positiveTitle={notebook ? strings.save() : strings.add()}
negativeTitle={strings.cancel()}
onPressPositive={onSaveChanges}
/>
</View>
);
@@ -188,9 +197,9 @@ AddNotebookSheet.present = (
showMoveNotesOnComplete = true,
defaultTitle?: string
) => {
presentSheet({
presentDialog({
context: context,
component: (ref, close) => (
component: (close) => (
<AddNotebookSheet
notebook={notebook}
parentNotebook={parentNotebook}

View File

@@ -283,7 +283,14 @@ export default function LinkNote(props: {
width: "100%"
}}
>
<Paragraph numberOfLines={1}>{selectedNote?.title}</Paragraph>
<Paragraph
style={{
flexShrink: 1
}}
numberOfLines={1}
>
{selectedNote?.title}
</Paragraph>
<Paragraph
color={colors.secondary.paragraph}

View File

@@ -48,7 +48,7 @@ import { Dialog } from "../../dialog";
import { ReminderTime } from "../../ui/reminder-time";
import Heading from "../../ui/typography/heading";
import Paragraph from "../../ui/typography/paragraph";
import { ItemReference, Note, Reminder } from "@notesnook/core";
import { Note, Reminder } from "@notesnook/core";
import { strings } from "@notesnook/intl";
import { DefaultAppStyles } from "../../../utils/styles";
@@ -57,7 +57,7 @@ type ReminderSheetProps = {
close?: (ctx?: string) => void;
update?: (options: PresentSheetOptions) => void;
reminder?: Reminder;
reference?: ItemReference;
reference?: Note;
};
const ReminderModes =
@@ -612,7 +612,7 @@ export default function ReminderSheet({
ReminderSheet.present = (
reminder?: Reminder,
reference?: ItemReference,
reference?: Note,
isSheet?: boolean
) => {
presentSheet({

View File

@@ -52,23 +52,42 @@ const Sort = ({
hideGroupOptions?: boolean;
}) => {
const { colors } = useThemeColors();
const groupType =
screen === "Archive"
? "archive"
: screen === "Search"
? "search"
: screen === "Notes"
? "home"
: screen === "Trash" || type === "trash"
? "trash"
: ((type + "s") as GroupingKey);
const [groupOptions, setGroupOptions] = useState(
db.settings.getGroupOptions(
screen === "Notes"
? "home"
: screen === "Trash"
? "trash"
: ((type + "s") as GroupingKey)
)
db.settings.getGroupOptions(groupType)
);
const getSortButtonTitle = () => {
const { sortDirection, groupBy, sortBy } = groupOptions || {};
const isAlphabetical = groupBy === "abc" || sortBy === "title";
const isDueDate = sortBy === "dueDate";
const isRelevance = sortBy === "relevance";
if (sortDirection === "asc") {
if (isAlphabetical) return strings.aToZ();
if (isDueDate) return strings.earliestFirst();
if (isRelevance) return strings.leastRelevantFirst();
return strings.oldNew();
} else {
if (isAlphabetical) return strings.zToA();
if (isDueDate) return strings.latestFirst();
if (isRelevance) return strings.mostRelevantFirst();
return strings.newOld();
}
};
const updateGroupOptions = async (_groupOptions: GroupOptions) => {
const groupType =
screen === "Notes"
? "home"
: screen === "Trash"
? "trash"
: ((type + "s") as GroupingKey);
console.log("updateGroupOptions for group", groupType, "in", screen);
await db.settings.setGroupOptions(groupType, _groupOptions);
setGroupOptions(_groupOptions);
setTimeout(() => {
@@ -109,31 +128,10 @@ const Sort = ({
paddingHorizontal: DefaultAppStyles.GAP
}}
>
<Heading
size={AppFontSize.lg}
style={{
alignSelf: "center"
}}
>
{strings.sortBy()}
</Heading>
<Heading size={AppFontSize.lg}>{strings.sortBy()}</Heading>
<Button
title={
groupOptions?.sortDirection === "asc"
? groupOptions?.groupBy === "abc" ||
groupOptions?.sortBy === "title"
? strings.aToZ()
: groupOptions?.sortBy === "dueDate"
? strings.earliestFirst()
: strings.oldNew()
: groupOptions?.groupBy === "abc" ||
groupOptions?.sortBy === "title"
? strings.zToA()
: groupOptions?.sortBy === "dueDate"
? strings.latestFirst()
: strings.newOld()
}
title={getSortButtonTitle()}
icon={
groupOptions?.sortDirection === "asc"
? "sort-ascending"
@@ -157,13 +155,24 @@ const Sort = ({
borderBottomColor: colors.primary.border
}}
>
{Object.keys(SORT).map((item) =>
(item === "dueDate" && screen !== "Reminders") ||
(screen !== "Tags" &&
screen !== "Reminders" &&
item === "dateModified") ||
((screen === "Tags" || screen === "Reminders") &&
item === "dateEdited") ? null : (
{Object.keys(SORT).map((item) => {
const sortOptionVisibility = {
relevance: screen === "Search",
dueDate: screen === "Reminders",
dateModified: screen === "Tags" || screen === "Reminders",
dateEdited: screen !== "Tags" && screen !== "Reminders"
};
// Check if this sort option should be skipped for the current screen
const shouldSkip =
item in sortOptionVisibility &&
!sortOptionVisibility[item as keyof typeof sortOptionVisibility];
if (shouldSkip) {
return null;
}
return (
<Pressable
key={item}
type={groupOptions?.sortBy === item ? "selected" : "plain"}
@@ -201,8 +210,8 @@ const Sort = ({
/>
) : null}
</Pressable>
)
)}
);
})}
</View>
{!hideGroupOptions ? (

View File

@@ -80,6 +80,9 @@ function _MenuItem({
case "Monographs":
setItemCount(await db.monographs.all.count());
break;
case "Archive":
setItemCount(await db.notes.archived.count());
break;
case "Trash":
setItemCount((await db.trash.all()).length);
break;

View File

@@ -93,7 +93,11 @@ export const NotebookItem = ({
<View
style={{
paddingLeft:
item.depth > 0 && item.depth < 6 ? 15 * item.depth : undefined,
item.depth === 0
? undefined
: item.depth < 6
? 15 * item.depth
: 15 * 5,
width: "100%",
marginTop: 2
}}

View File

@@ -321,6 +321,9 @@ const Input = ({
bottom={10}
onPress={button.onPress}
color={button.color}
style={{
marginRight: -8
}}
/>
)}

View File

@@ -19,13 +19,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { FeatureType } from "./components/sheets/new-feature";
export const features: FeatureType[] = [
{
title: "Notebook Tree View",
body: "Notebooks are now displayed in a tree view for better organization and user experience."
},
{
title: "New SideBar",
body: "Sidebar now contains tabs for Notebooks and Tags for easy navigation."
}
];
export const features: FeatureType[] = [];

View File

@@ -66,9 +66,11 @@ import { convertNoteToText } from "../utils/note-to-text";
import { sleep } from "../utils/time";
import SettingsService from "../services/settings";
import { useSettingStore } from "../stores/use-setting-store";
import { useArchivedStore } from "../stores/use-archived-store";
export type ActionId =
| "select"
| "archive"
| "restore"
| "delete"
| "reorder"
@@ -108,7 +110,8 @@ export type ActionId =
| "favorite"
| "remove-from-notebook"
| "trash"
| "default-homepage";
| "default-homepage"
| "default-tag";
export type Action = {
id: ActionId;
@@ -156,6 +159,8 @@ export const useActions = ({
const [defaultNotebook, setDefaultNotebook] = useState(
db.settings.getDefaultNotebook()
);
const [defaultTag, setDefaultTag] = useState(db.settings.getDefaultTag());
const [noteInCurrentNotebook, setNoteInCurrentNotebook] = useState(false);
const [locked, setLocked] = useState(false);
const isHomepage = useSettingStore(
@@ -467,15 +472,39 @@ export const useActions = ({
}
if (item.type === "tag" || item.type === "notebook") {
actions.push({
id: "add-shortcut",
title: isPinnedToMenu ? strings.removeShortcut() : strings.addShortcut(),
icon: isPinnedToMenu ? "link-variant-remove" : "link-variant",
onPress: createMenuShortcut,
isToggle: true,
checked: isPinnedToMenu,
activeColor: colors.error.paragraph
});
actions.push(
{
id: "add-shortcut",
title: isPinnedToMenu
? strings.removeShortcut()
: strings.addShortcut(),
icon: isPinnedToMenu ? "link-variant-remove" : "link-variant",
onPress: createMenuShortcut,
isToggle: true,
checked: isPinnedToMenu,
activeColor: colors.error.paragraph
},
{
id: "default-tag",
title:
defaultTag === item.id
? strings.removeAsDefault()
: strings.setAsDefault(),
hidden: item.type !== "tag",
icon: "pound",
onPress: async () => {
if (defaultTag === item.id) {
await db.settings.setDefaultTag(undefined);
setDefaultTag(undefined);
} else {
await db.settings.setDefaultTag(item.id);
setDefaultTag(item.id);
}
close();
},
checked: defaultTag === item.id
}
);
}
if (item.type === "notebook") {
@@ -926,7 +955,7 @@ export const useActions = ({
title: strings.remindMe(),
icon: "clock-plus-outline",
onPress: () => {
ReminderSheet.present(undefined, { id: item.id, type: "note" });
ReminderSheet.present(undefined, item);
}
},
{
@@ -972,6 +1001,19 @@ export const useActions = ({
reference: item as ItemReference
});
}
},
{
id: "archive",
title: !item.archived ? strings.archive() : strings.unarchive(),
icon: "archive",
onPress: async () => {
db.notes.archive(!item.archived, item.id);
setItem((await db.notes.note(item.id)) as Item);
Navigation.queueRoutesForUpdate();
useArchivedStore.getState().refresh();
},
checked: item.archived,
isToggle: true
}
);

View File

@@ -341,8 +341,15 @@ const doAppLoadActions = async () => {
};
const checkAppUpdateAvailable = async () => {
if (__DEV__ || Config.isTesting === "true" || Config.FDROID_BUILD || BETA)
if (
__DEV__ ||
Config.isTesting === "true" ||
Config.FDROID_BUILD ||
BETA ||
!SettingsService.getProperty("checkForUpdates")
)
return;
try {
const version =
Config.GITHUB_RELEASE === "true"

View File

@@ -32,7 +32,7 @@ export function useGroupOptions(type: any) {
const onUpdate = (groupType: string) => {
if (groupType !== type) return;
const options = db.settings?.getGroupOptions(type) as any;
if (!options) return;
if (
groupOptions?.groupBy !== options.groupBy ||
groupOptions?.sortBy !== options.sortBy ||

View File

@@ -43,7 +43,7 @@ let Reminders: any = null;
let Monographs: any = null;
let TaggedNotes: any = null;
let ColoredNotes: any = null;
let Archive: any = null;
const AppNavigation = React.memo(
() => {
const { colors } = useThemeColors();
@@ -192,6 +192,14 @@ const AppNavigation = React.memo(
initialParams={home.name === "ColoredNotes" ? home.params : undefined}
/>
<AppStack.Screen
name="Archive"
getComponent={() => {
Archive = Archive || require("../screens/archive").default;
return Archive;
}}
/>
<AppStack.Screen
name="Reminders"
getComponent={() => {
@@ -239,6 +247,7 @@ let LinkNotebooks: any = null;
let MoveNotebook: any = null;
let MoveNotes: any = null;
let Settings: any = null;
let ManageTags: any = null;
export const RootNavigation = () => {
const introCompleted = useSettingStore(
@@ -318,6 +327,15 @@ export const RootNavigation = () => {
return Settings;
}}
/>
<RootStack.Screen
name="ManageTags"
getComponent={() => {
ManageTags =
ManageTags || require("../screens/manage-tags").default;
return ManageTags;
}}
/>
</RootStack.Navigator>
</NavigationContainer>
);

View File

@@ -0,0 +1,88 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from "react";
import DelayLayout from "../../components/delay-layout";
import { Header } from "../../components/header";
import List from "../../components/list";
import SelectionHeader from "../../components/selection-header";
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
import Navigation, { NavigationProps } from "../../services/navigation";
import SettingsService from "../../services/settings";
import useNavigationStore from "../../stores/use-navigation-store";
import { db } from "../../common/database";
import { strings } from "@notesnook/intl";
import { useArchived } from "../../stores/use-archived-store";
export const Archive = ({ navigation, route }: NavigationProps<"Archive">) => {
const [archive, loading, refresh] = useArchived();
const isFocused = useNavigationFocus(navigation, {
onFocus: (prev) => {
Navigation.routeNeedsUpdate(
route.name,
Navigation.routeUpdateFunctions[route.name]
);
useNavigationStore.getState().setFocusedRouteId(route?.name);
return false;
},
onBlur: () => false,
delay: SettingsService.get().homepage === route.name ? 1 : -1
});
return (
<>
<SelectionHeader id={route.name} items={archive} type="note" />
<Header
renderedInRoute={route.name}
title={strings.routes[route.name]()}
canGoBack={false}
hasSearch={true}
id={route.name}
onSearch={() => {
Navigation.push("Search", {
placeholder: strings.searchInRoute(route.name),
type: "note",
title: route.name,
route: route.name,
items: db.notes.archived
});
}}
/>
<DelayLayout wait={loading}>
<List
data={archive}
dataType="note"
onRefresh={() => {
refresh();
}}
renderedInRoute="Archive"
loading={loading}
placeholder={{
title: strings.yourArchive(),
paragraph: strings.yourArchiveIsEmpty(),
loading: strings.loadingArchive()
}}
headerTitle={strings.routes.Archive()}
/>
</DelayLayout>
</>
);
};
export default Archive;

View File

@@ -236,6 +236,11 @@ class Commands {
const tabId = useTabStore.getState().currentTab;
return this.sendCommand("scrollIntoViewById", id, tabId);
};
scrollToSearchResult = (index: number) => {
const tabId = useTabStore.getState().currentTab;
return this.sendCommand("scrollToSearchResult", index, tabId);
};
}
export default Commands;

View File

@@ -41,7 +41,6 @@ import { AuthMode } from "../../../components/auth/common";
import EditorTabs from "../../../components/sheets/editor-tabs";
import { Issue } from "../../../components/sheets/github/issue";
import LinkNote from "../../../components/sheets/link-note";
import ManageTagsSheet from "../../../components/sheets/manage-tags";
import { RelationsList } from "../../../components/sheets/relations-list";
import ReminderSheet from "../../../components/sheets/reminder";
import TableOfContents from "../../../components/sheets/toc";
@@ -79,6 +78,8 @@ import { EditorMessage, EditorProps, useEditorType } from "./types";
import { useTabStore } from "./use-tab-store";
import { editorState, openInternalLink } from "./utils";
import { Properties } from "../../../components/properties";
import { sleep } from "../../../utils/time";
import ManageTags from "../../manage-tags";
const publishNote = async () => {
const user = useUserStore.getState().user;
@@ -177,7 +178,7 @@ export const useEditorEvents = (
useEffect(() => {
const handleKeyboardDidShow: KeyboardEventListener = () => {
editor.commands.keyboardShown(true);
//editor.postMessage(NativeEvents.keyboardShown, undefined);
editor.postMessage(NativeEvents.keyboardShown, undefined);
};
const handleKeyboardDidHide: KeyboardEventListener = () => {
editor.commands.keyboardShown(false);
@@ -448,7 +449,7 @@ export const useEditorEvents = (
});
return;
}
ManageTagsSheet.present([noteId]);
ManageTags.present([noteId]);
break;
case EditorEvents.tag:
if (editorMessage.value) {
@@ -613,6 +614,10 @@ export const useEditorEvents = (
eSendEvent(eEditorTabFocused, editorMessage.tabId);
if (!editor.state.current.initialLoadCalled) break;
if (editorMessage.noteId) {
// Wait for next tick to ensure the tab is not changed.
await sleep(1);
if (useTabStore.getState().currentTab !== editorMessage.tabId)
return;
if (!useSettingStore.getState().isAppLoading) {
const note = await db.notes.note(editorMessage.noteId);
if (note) {

View File

@@ -352,7 +352,7 @@ export const useEditor = (
DatabaseLogger.log(`Note saved: ${id}...`);
clearTimeout(saveTimer);
const oldNote = currentNotes.current[id];
if (id) {
currentNotes.current[id] = await db.notes?.note(id);
}
@@ -365,22 +365,37 @@ export const useEditor = (
}
});
const defaultNotebook = db.settings.getDefaultNotebook();
if (!state.current.onNoteCreated && defaultNotebook) {
onNoteCreated(id, {
type: "notebook",
id: defaultNotebook
});
if (!state.current.onNoteCreated) {
const defaultNotebook = db.settings.getDefaultNotebook();
if (defaultNotebook) {
onNoteCreated(id, {
type: "notebook",
id: defaultNotebook
});
}
const defaultTag = db.settings.getDefaultTag();
if (defaultTag) {
onNoteCreated(id, {
type: "tag",
id: defaultTag
});
}
} else {
state.current?.onNoteCreated && state.current.onNoteCreated(id);
state.current.onNoteCreated(id);
}
}
postMessage(
NativeEvents.title,
currentNotes.current[id]?.title,
tabId
);
if (
oldNote?.title !== currentNotes.current[id]?.title &&
!noteData.title
) {
postMessage(
NativeEvents.title,
currentNotes.current[id]?.title,
tabId
);
}
if (Notifications.isNotePinned(id as string)) {
Notifications.pinNote(id as string);
@@ -464,8 +479,7 @@ export const useEditor = (
}
) => {
currentNotes.current[note.id] = note;
const locked = note && (await db.vaults.itemExists(note));
if ((locked || note.content) && note.content?.data) {
if (note.content && note.content?.data) {
currentContents.current[note.id] = {
data: note.content?.data,
type: note.content?.type || "tiptap",
@@ -493,6 +507,7 @@ export const useEditor = (
session?: TabSessionItem;
newTab?: boolean;
refresh?: boolean;
searchResultIndex?: number;
}) => {
loadNoteMutex.runExclusive(async () => {
if (!event) return;
@@ -678,13 +693,17 @@ export const useEditor = (
{
data: currentContents.current[item.id]?.data || "",
scrollTop: tab?.session?.scrollTop,
selection: tab?.session?.selection
selection: tab?.session?.selection,
searchResultIndex: event.searchResultIndex
},
tabId,
10000
);
setTimeout(() => {
if (event.searchResultIndex !== undefined) {
commands.scrollToSearchResult(event.searchResultIndex);
}
if (blockIdRef.current) {
commands.scrollIntoViewById(blockIdRef.current);
blockIdRef.current = undefined;

View File

@@ -29,27 +29,30 @@ import React, {
useRef,
useState
} from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import { TextInput, View, useWindowDimensions } from "react-native";
import { ActionSheetRef } from "react-native-actions-sheet";
import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import { db } from "../../../common/database";
import { useDBItem } from "../../../hooks/use-db-item";
import { ToastManager, presentSheet } from "../../../services/event-manager";
import Navigation from "../../../services/navigation";
import { db } from "../../common/database";
import { useDBItem } from "../../hooks/use-db-item";
import { ToastManager } from "../../services/event-manager";
import Navigation, { NavigationProps } from "../../services/navigation";
import {
ItemSelection,
createItemSelectionStore
} from "../../../stores/item-selection-store";
import { useRelationStore } from "../../../stores/use-relation-store";
import { useTagStore } from "../../../stores/use-tag-store";
import { defaultBorderRadius, AppFontSize } from "../../../utils/size";
import Input from "../../ui/input";
import { Pressable } from "../../ui/pressable";
import Heading from "../../ui/typography/heading";
import Paragraph from "../../ui/typography/paragraph";
} from "../../stores/item-selection-store";
import { useRelationStore } from "../../stores/use-relation-store";
import { useTagStore } from "../../stores/use-tag-store";
import { defaultBorderRadius, AppFontSize } from "../../utils/size";
import Input from "../../components/ui/input";
import { Pressable } from "../../components/ui/pressable";
import Heading from "../../components/ui/typography/heading";
import Paragraph from "../../components/ui/typography/paragraph";
import { strings } from "@notesnook/intl";
import { DefaultAppStyles } from "../../../utils/styles";
import { DefaultAppStyles } from "../../utils/styles";
import { Header } from "../../components/header";
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
async function updateInitialSelectionState(items: string[]) {
const relations = await db.relations
@@ -85,16 +88,14 @@ async function updateInitialSelectionState(items: string[]) {
const useTagItemSelection = createItemSelectionStore(true);
const ManageTagsSheet = (props: {
ids?: string[];
actionSheetRef: RefObject<ActionSheetRef>;
}) => {
const ManageTags = (props: NavigationProps<"ManageTags">) => {
const { colors } = useThemeColors();
const ids = useMemo(() => props.ids || [], [props.ids]);
const ids = props.route.params.ids || [];
const [tags, setTags] = useState<VirtualizedGrouping<Tag>>();
const [query, setQuery] = useState<string>();
const inputRef = useRef<TextInput>(null);
const [focus, setFocus] = useState(false);
useNavigationFocus(props.navigation, { focusOnInit: true });
const [queryExists, setQueryExists] = useState(false);
const dimensions = useWindowDimensions();
const refreshSelection = useCallback(() => {
@@ -239,112 +240,117 @@ const ManageTagsSheet = (props: {
);
return (
<View
<SafeAreaView
style={{
width: "100%",
alignSelf: "center",
paddingHorizontal: DefaultAppStyles.GAP,
maxHeight: dimensions.height * 0.85
backgroundColor: colors.primary.background,
gap: DefaultAppStyles.GAP_VERTICAL
}}
>
<Input
button={{
icon: "magnify",
color: colors.primary.accent,
size: AppFontSize.lg,
onPress: () => {}
}}
testID="tag-input"
fwdRef={inputRef}
autoCapitalize="none"
onChangeText={(v) => {
setQuery(sanitizeTag(v));
checkQueryExists(sanitizeTag(v));
}}
onFocusInput={() => {
setFocus(true);
}}
onBlurInput={() => {
setFocus(false);
}}
onSubmit={() => {
onSubmit();
}}
placeholder={strings.searchForTags()}
/>
{query && !queryExists ? (
<Pressable
key={"query_item"}
style={{
flexDirection: "row",
marginVertical: 5,
justifyContent: "space-between",
padding: DefaultAppStyles.GAP
}}
onPress={onSubmit}
type="selected"
>
<Heading size={AppFontSize.sm} color={colors.selected.heading}>
{strings.add()} {'"' + "#" + query + '"'}
</Heading>
<Icon
name="plus"
color={colors.selected.icon}
size={AppFontSize.lg}
/>
</Pressable>
) : null}
<Header title={strings.manageTags()} canGoBack />
<View
style={{
width: "100%",
flexGrow: 1,
height: "100%"
paddingHorizontal: DefaultAppStyles.GAP
}}
>
<FlashList
data={tags?.placeholders}
keyboardShouldPersistTaps
keyboardDismissMode="interactive"
estimatedItemSize={50}
renderItem={renderTag}
ListEmptyComponent={
<View
style={{
width: "100%",
height: 200,
justifyContent: "center",
alignItems: "center"
}}
>
<Heading size={50} color={colors.secondary.heading}>
#
</Heading>
<Paragraph
textBreakStrategy="balanced"
color={colors.secondary.paragraph}
>
{strings.emptyPlaceholders("tag")}
</Paragraph>
</View>
}
ListFooterComponent={<View style={{ height: 50 }} />}
<Input
button={{
icon: "magnify",
color: colors.primary.accent,
size: AppFontSize.lg,
onPress: () => {}
}}
testID="tag-input"
fwdRef={inputRef}
autoCapitalize="none"
onChangeText={(v) => {
setQuery(sanitizeTag(v));
checkQueryExists(sanitizeTag(v));
}}
onFocusInput={() => {
setFocus(true);
}}
onBlurInput={() => {
setFocus(false);
}}
onSubmit={() => {
onSubmit();
}}
placeholder={strings.searchForTags()}
/>
{query && !queryExists ? (
<Pressable
key={"query_item"}
style={{
flexDirection: "row",
justifyContent: "space-between",
paddingHorizontal: DefaultAppStyles.GAP,
paddingVertical: DefaultAppStyles.GAP_VERTICAL
}}
onPress={onSubmit}
type="selected"
>
<Heading size={AppFontSize.sm} color={colors.selected.heading}>
{strings.add()} {'"' + "#" + query + '"'}
</Heading>
<Icon
name="plus"
color={colors.selected.icon}
size={AppFontSize.lg}
/>
</Pressable>
) : null}
<View
style={{
width: "100%",
flexGrow: 1,
height: "100%"
}}
>
<FlashList
data={tags?.placeholders}
keyboardShouldPersistTaps
keyboardDismissMode="interactive"
estimatedItemSize={50}
renderItem={renderTag}
ListEmptyComponent={
<View
style={{
width: "100%",
height: 200,
justifyContent: "center",
alignItems: "center"
}}
>
<Heading size={50} color={colors.secondary.heading}>
#
</Heading>
<Paragraph
textBreakStrategy="balanced"
color={colors.secondary.paragraph}
>
{strings.emptyPlaceholders("tag")}
</Paragraph>
</View>
}
ListFooterComponent={<View style={{ height: 50 }} />}
/>
</View>
</View>
</View>
</SafeAreaView>
);
};
ManageTagsSheet.present = (ids?: string[]) => {
presentSheet({
component: (ref) => {
return <ManageTagsSheet actionSheetRef={ref} ids={ids} />;
}
ManageTags.present = (ids?: string[]) => {
Navigation.push("ManageTags", {
ids: ids
});
};
export default ManageTagsSheet;
export default ManageTags;
const TagItem = ({
id,

View File

@@ -248,7 +248,13 @@ const SelectableNoteItem = React.memo(
flexGrow: 1
}}
>
<Heading size={AppFontSize.sm} numberOfLines={1}>
<Heading
size={AppFontSize.sm}
numberOfLines={1}
style={{
maxWidth: "93%"
}}
>
{item?.title}
</Heading>
{item.type == "note" && item.headline ? (
@@ -256,6 +262,9 @@ const SelectableNoteItem = React.memo(
numberOfLines={1}
color={colors?.secondary.paragraph}
size={AppFontSize.sm}
style={{
maxWidth: "93%"
}}
>
{item.headline}
</Paragraph>

View File

@@ -17,35 +17,37 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Item, Note, VirtualizedGrouping } from "@notesnook/core";
import {
FilteredSelector,
Item,
Note,
VirtualizedGrouping
} from "@notesnook/core";
import { strings } from "@notesnook/intl";
import React, { useEffect, useRef, useState } from "react";
import { DatabaseLogger, db } from "../../common/database";
import List from "../../components/list";
import SelectionHeader from "../../components/selection-header";
import { useNavigationFocus } from "../../hooks/use-navigation-focus";
import {
ToastManager,
eSubscribeEvent,
eUnSubscribeEvent
} from "../../services/event-manager";
import { ToastManager, eSubscribeEvent } from "../../services/event-manager";
import { NavigationProps } from "../../services/navigation";
import useNavigationStore from "../../stores/use-navigation-store";
import { eOnRefreshSearch } from "../../utils/events";
import { eGroupOptionsUpdated, eOnRefreshSearch } from "../../utils/events";
import { SearchBar } from "./search-bar";
import { FilteredSelector } from "@notesnook/core";
import { strings } from "@notesnook/intl";
export const Search = ({ route, navigation }: NavigationProps<"Search">) => {
const [results, setResults] = useState<VirtualizedGrouping<Item>>();
const [loading, setLoading] = useState(false);
const [searchStatus, setSearchStatus] = useState<string>();
const currentQuery = useRef<string>();
const timer = useRef<NodeJS.Timeout>();
const isFocused = useNavigationFocus(navigation, {
useNavigationFocus(navigation, {
onFocus: (prev) => {
useNavigationStore.getState().setFocusedRouteId(route.name);
return !prev?.current;
},
onBlur: () => false
onBlur: () => {
return false;
}
});
const onSearch = React.useCallback(
@@ -60,32 +62,35 @@ export const Search = ({ route, navigation }: NavigationProps<"Search">) => {
try {
setLoading(true);
let results: VirtualizedGrouping<Item> | undefined;
const groupOptions = db.settings.getGroupOptions("search");
switch (route.params.type) {
case "note":
results = await db.lookup
.notes(query, route.params.items as FilteredSelector<Note>)
.sorted();
results = await db.lookup.notesWithHighlighting(
query,
groupOptions,
route.params.items as FilteredSelector<Note>
);
break;
case "notebook":
results = await db.lookup.notebooks(query).sorted();
results = await db.lookup.notebooks(query).sorted(groupOptions);
break;
case "tag":
results = await db.lookup.tags(query).sorted();
results = await db.lookup.tags(query).sorted(groupOptions);
break;
case "reminder":
results = await db.lookup.reminders(query).sorted();
results = await db.lookup.reminders(query).sorted(groupOptions);
break;
case "trash":
results = await db.lookup.trash(query).sorted();
results = await db.lookup.trash(query).sorted(groupOptions);
break;
case "attachment":
results = await db.lookup.attachments(query).sorted();
results = await db.lookup.attachments(query).sorted(groupOptions);
break;
default:
results = undefined;
}
if (currentQuery.current !== query) return;
if (!results) {
setSearchStatus(strings.noResultsFound(query));
setLoading(false);
@@ -97,6 +102,7 @@ export const Search = ({ route, navigation }: NavigationProps<"Search">) => {
);
if (currentQuery.current !== query) return;
await results.item(0);
if (currentQuery.current !== query) return;
setResults(results);
if (results.placeholders?.length === 0) {
setSearchStatus(strings.noResultsFound(query));
@@ -118,9 +124,18 @@ export const Search = ({ route, navigation }: NavigationProps<"Search">) => {
onSearch(currentQuery.current);
}
};
eSubscribeEvent(eOnRefreshSearch, onRefreshSearch);
const subs = [
eSubscribeEvent(eGroupOptionsUpdated, (groupType) => {
if (groupType === "search") {
onSearch(currentQuery.current);
}
}),
eSubscribeEvent(eOnRefreshSearch, onRefreshSearch)
];
return () => {
eUnSubscribeEvent(eOnRefreshSearch, onRefreshSearch);
subs.forEach((sub) => sub?.unsubscribe());
};
}, [onSearch, route.params?.type]);
@@ -137,7 +152,7 @@ export const Search = ({ route, navigation }: NavigationProps<"Search">) => {
clearTimeout(timer.current);
timer.current = setTimeout(() => {
onSearch(query);
}, 300);
}, 500);
}}
loading={loading}
/>

View File

@@ -82,7 +82,8 @@ export const settingsGroups: SettingSection[] = [
useHook: () => useUserStore((state) => state.user),
hidden: (current) => !current,
name: (current) => {
const user = current as User;
const user = (current as User) || useUserStore.getState().user;
if (!user) return strings.subscribeToPro();
const isBasic = user.subscription?.type === SUBSCRIPTION_STATUS.BASIC;
const isTrial = user.subscription?.type === SUBSCRIPTION_STATUS.TRIAL;
return isBasic || !user.subscription?.type
@@ -96,6 +97,7 @@ export const settingsGroups: SettingSection[] = [
icon: "crown",
description: (current) => {
const user = current as User;
if (!user) return strings.neverHesitate();
const subscriptionDaysLeft =
user &&
getTimeLeft(
@@ -670,6 +672,13 @@ export const settingsGroups: SettingSection[] = [
});
},
disabled: () => !db.settings.getDefaultNotebook()
},
{
id: "disable-update-check",
type: "switch",
name: strings.autoUpdateCheck(),
description: strings.autoUpdateCheckDesc(),
property: "checkForUpdates"
}
]
},

View File

@@ -37,6 +37,7 @@ import {
rootNavigatorRef
} from "../utils/global-refs";
import { eSendEvent } from "./event-manager";
import { useArchivedStore } from "../stores/use-archived-store";
/**
* Routes that should be updated on focus
@@ -66,7 +67,9 @@ const routeNames = {
Reminders: "Reminders",
MoveNotebook: "MoveNotebook",
LinkNotebooks: "LinkNotebooks",
MoveNotes: "MoveNotes"
MoveNotes: "MoveNotes",
Archive: "Archive",
ManageTags: "ManageTags"
};
export type NavigationProps<T extends RouteName> = NativeStackScreenProps<
@@ -92,7 +95,8 @@ const routeUpdateFunctions: {
TopicNotes: (params) => eSendEvent("TopicNotes", params),
Monographs: (params) => eSendEvent("Monographs", params),
Reminders: () => useReminderStore.getState().refresh(),
Search: () => eSendEvent(eOnRefreshSearch)
Search: () => eSendEvent(eOnRefreshSearch),
Archive: () => useArchivedStore.getState().refresh()
};
function clearRouteFromQueue(routeName: RouteName) {

View File

@@ -0,0 +1,30 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { db } from "../common/database";
import createDBCollectionStore from "./create-db-collection-store";
const { useStore: useArchivedStore, useCollection: useArchived } =
createDBCollectionStore({
getCollection: () =>
db.notes.archived.grouped(db.settings.getGroupOptions("archive")),
eagerlyFetchFirstBatch: true
});
export { useArchivedStore, useArchived };

View File

@@ -74,6 +74,7 @@ export interface RouteParams extends ParamListBase {
TaggedNotes: NotesScreenParams;
ColoredNotes: NotesScreenParams;
TopicNotes: NotesScreenParams;
Archive: GenericRouteParam;
Monographs: NotesScreenParams;
Reminders: GenericRouteParam;
SettingsGroup: GenericRouteParam;
@@ -90,6 +91,9 @@ export interface RouteParams extends ParamListBase {
MoveNotes: {
notebook: Notebook;
};
ManageTags: {
ids?: string[];
};
}
export type RouteName = keyof RouteParams;

View File

@@ -98,6 +98,7 @@ export type Settings = {
lastFullBackupDate?: number;
serverUrls?: Record<HostId, string>;
defaultSidebarTab: number;
checkForUpdates?: boolean;
};
type DimensionsType = {
@@ -196,7 +197,8 @@ export const defaultSettings: SettingStore["settings"] = {
settingsVersion: 0,
backupType: "partial",
fullBackupReminder: "never",
lastFullBackupDate: 0
lastFullBackupDate: 0,
checkForUpdates: true
};
export const useSettingStore = create<SettingStore>((set, get) => ({

View File

@@ -45,7 +45,8 @@ export const SORT = {
dateEdited: "Date edited",
dateCreated: "Date created",
title: "Title",
dueDate: "Due date"
dueDate: "Due date",
relevance: "Relevance"
};
export const itemSkus = [

View File

@@ -77,12 +77,13 @@ export const MenuItemsList: SideMenuItem[] = [
},
type: "side-menu-item"
},
// {
// dataType: "note",
// id: "Archive",
// title: "Archive",
// icon: "archive"
// },
{
dataType: "note",
id: "Archive",
title: "Archive",
icon: "archive",
type: "side-menu-item"
},
{
dataType: "note",
id: "Trash",

View File

@@ -1,7 +1,10 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

View File

@@ -1,30 +1,41 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.5)
CFPropertyList (3.0.7)
base64
nkf
rexml
activesupport (6.1.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.1)
claide (1.1.0)
cocoapods (1.11.3)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.3)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
@@ -32,10 +43,10 @@ GEM
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
@@ -45,7 +56,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@@ -54,47 +65,56 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
concurrent-ruby (1.3.3)
connection_pool (2.5.3)
drb (2.2.3)
escape (0.0.4)
ethon (0.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.5)
ffi (1.17.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.10.0)
httpclient (2.9.0)
mutex_m
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.6.1)
minitest (5.15.0)
json (2.12.2)
logger (1.7.0)
minitest (5.25.5)
molinillo (0.8.0)
mutex_m (0.3.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
nkf (0.2.0)
public_suffix (4.0.7)
rexml (3.2.5)
rexml (3.4.1)
ruby-macho (2.5.1)
typhoeus (1.4.0)
securerandom (0.4.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.5.4)
rexml (>= 3.3.6, < 4.0)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
concurrent-ruby (< 1.3.4)
xcodeproj (< 1.26.0)
RUBY VERSION
ruby 2.7.4p191
ruby 3.4.1p0
BUNDLED WITH
2.2.27
2.6.2

View File

@@ -48,6 +48,9 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
hermesFlags = ["-O", "-output-source-map"]
/* Autolinking */
autolinkLibrariesWithApp()
}
/**
@@ -121,7 +124,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
versionCode 3049
versionCode 3055
versionName getNpmVersion()
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
@@ -258,7 +261,3 @@ copyFontFiles.dependsOn(copyEditorBundle);
copyPlainEditorBundle.dependsOn(copyFontFiles);
preBuild.dependsOn(copyPlainEditorBundle)
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

View File

@@ -15,7 +15,6 @@
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" tools:node="remove" />
@@ -59,9 +58,8 @@
android:requestLegacyExternalStorage="true"
android:theme="@style/BootTheme"
android:largeHeap="true"
android:supportsRtl="false"
android:networkSecurityConfig="@xml/network_security_config"
tools:replace="android:supportsRtl">
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config">
<receiver android:exported="false" android:label="@string/reminders_title" android:name=".ReminderWidgetProvider">
<intent-filter>

View File

@@ -14,19 +14,21 @@ public class BootRecieverService extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (!isAppOnForeground((context))) {
/**
We will start our service and send extra info about
network connections
**/
Intent serviceIntent = new Intent(context, BootTaskService.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.startForegroundService(serviceIntent);
} else {
context.startService(serviceIntent);
}
HeadlessJsTaskService.acquireWakeLockNow(context);
}
try {
if (!isAppOnForeground((context))) {
/**
We will start our service and send extra info about
network connections
**/
Intent serviceIntent = new Intent(context, BootTaskService.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.startForegroundService(serviceIntent);
} else {
context.startService(serviceIntent);
}
HeadlessJsTaskService.acquireWakeLockNow(context);
}
} catch (Exception ignored) {}
}
private boolean isAppOnForeground(Context context) {

View File

@@ -10,6 +10,7 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader
import com.facebook.react.soloader.OpenSourceMergedSoMapping
class MainApplication : Application(), ReactApplication {
@@ -36,7 +37,7 @@ class MainApplication : Application(), ReactApplication {
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()

View File

@@ -3,16 +3,16 @@ import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
kotlinVersion = '1.9.22'
kotlinVersion = '2.0.21'
androidXAnnotation = "1.1.0"
androidXCoreVersion = "1.7.0"
androidXCore = "1.7.0"
androidXBrowser = "1.0.0"
ndkVersion = "23.2.8568313"
ndkVersion = "27.1.12297006"
}
repositories {

View File

@@ -23,7 +23,7 @@ org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# android.enableJetifier=true
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
@@ -47,4 +47,4 @@ hermesEnabled=true
# fdroid
fdroidBuild=false
# -DSQLITE_USER_AUTHENTICATION=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1
quickSqliteFlags=-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC=0 -DHAVE_CIPHER_AES_256_CBC=0 -DHAVE_CIPHER_SQLCIPHER=0 -DHAVE_CIPHER_RC4=0 -DHAVE_CIPHER_CHACHA20=1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_USE_ALLOCA=1
quickSqliteFlags=-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC=0 -DHAVE_CIPHER_AES_256_CBC=0 -DHAVE_CIPHER_SQLCIPHER=0 -DHAVE_CIPHER_RC4=0 -DHAVE_CIPHER_CHACHA20=1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_USE_ALLOCA=1 -DSQLITE_ENABLE_REGEXP=1

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################

View File

@@ -1,8 +1,3 @@
- v3.1.0 brings new features and improvements to enhance your Notesnook experience.
- Notebooks and Tags are not located in the Sidebar
- Tree view for notebooks
- Improved list view UI for better user experience
- Improved notebook related actions by integrating tree view in most places
- You can set any notebook, tag or colors as home screen
- Bug fixes
Thank you for using Notesnook!

View File

@@ -1,4 +1,6 @@
pluginManagement { includeBuild("../../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'Notesnook'
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../../node_modules/@react-native/gradle-plugin')

View File

@@ -6,7 +6,7 @@ module.exports = function (api, opts) {
if (!PROCESS_ENV) PROCESS_ENV = 'production';
const env = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
plugins: [
'@babel/plugin-transform-named-capturing-groups-regex',
'react-native-reanimated/plugin',

View File

@@ -653,15 +653,25 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook/Pods-Notesnook-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -810,15 +820,25 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook-NotesnookTests/Pods-Notesnook-NotesnookTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -854,11 +874,19 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Make Note/Pods-Make Note-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -1063,7 +1091,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2132;
CURRENT_PROJECT_VERSION = 2133;
DEVELOPMENT_TEAM = 53CWBG3QUC;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1137,7 +1165,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -1168,7 +1196,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2132;
CURRENT_PROJECT_VERSION = 2133;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1242,7 +1270,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -1401,7 +1429,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2132;
CURRENT_PROJECT_VERSION = 2133;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1413,7 +1441,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
@@ -1444,7 +1472,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2132;
CURRENT_PROJECT_VERSION = 2133;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
@@ -1457,7 +1485,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1487,7 +1515,7 @@
CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2132;
CURRENT_PROJECT_VERSION = 2133;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1561,7 +1589,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
@@ -1592,7 +1620,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2132;
CURRENT_PROJECT_VERSION = 2133;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
@@ -1667,7 +1695,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1750,6 +1778,7 @@
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
USE_HERMES = true;
};
name = Debug;

View File

@@ -4,12 +4,14 @@
#import <React/RCTLinkingManager.h>
#import "RNShortcuts.h"
#import "RNBootSplash.h"
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.dependencyProvider = [RCTAppDependencyProvider new];
self.moduleName = @"Notesnook";
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.

View File

@@ -114,7 +114,7 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "react-native-quick-sqlite" then
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = 'SQLITE_CORE=1 SQLITE_ENABLE_FTS5=1 SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT=1 HAVE_CIPHER_AES_128_CBC=0 HAVE_CIPHER_AES_256_CBC=0 HAVE_CIPHER_SQLCIPHER=0 HAVE_CIPHER_RC4=0 HAVE_CIPHER_CHACHA20=1 SQLITE_OMIT_PROGRESS_CALLBACK=1 SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS=1 SQLITE_DQS=0 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_USE_ALLOCA=1'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = 'SQLITE_CORE=1 SQLITE_ENABLE_FTS5=1 SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT=1 HAVE_CIPHER_AES_128_CBC=0 HAVE_CIPHER_AES_256_CBC=0 HAVE_CIPHER_SQLCIPHER=0 HAVE_CIPHER_RC4=0 HAVE_CIPHER_CHACHA20=1 SQLITE_OMIT_PROGRESS_CALLBACK=1 SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS=1 SQLITE_DQS=0 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_USE_ALLOCA=1 SQLITE_ENABLE_REGEXP=1'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -5,13 +5,13 @@
"main": "index.js",
"license": "GPL-3.0-or-later",
"overrides": {
"react-native": "0.74.5",
"react-native": "0.77.2",
"react": "18.2.0"
},
"dependencies": {
"@ammarahmed/notifee-react-native": "7.4.7",
"@callstack/repack": "~5.0.0",
"@bam.tech/react-native-image-resizer": "3.0.5",
"dependencies": {
"@ammarahmed/notifee-react-native": "7.4.9",
"@callstack/repack": "~5.1.2",
"@bam.tech/react-native-image-resizer": "3.0.11",
"@react-native-clipboard/clipboard": "^1.9.0",
"@react-native-community/checkbox": "^0.5.8",
"@react-native-community/netinfo": "^9.3.7",
@@ -20,9 +20,9 @@
"@react-navigation/elements": "^1.3.3",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "6.6.2",
"@sayem314/react-native-keep-awake": "^1.0.4",
"@sayem314/react-native-keep-awake": "^1.3.1",
"react": "18.2.0",
"react-native": "0.74.5",
"react-native": "0.77.2",
"react-native-actions-shortcuts": "^1.0.1",
"react-native-background-actions": "^2.6.6",
"react-native-blob-util": "^0.18.3",
@@ -33,31 +33,32 @@
"react-native-document-picker": "^7.1.1",
"@ammarahmed/react-native-eventsource": "1.1.0",
"react-native-file-viewer": "^2.1.1",
"react-native-gesture-handler": "^2.18.0",
"react-native-reanimated": "3.14.0",
"react-native-safe-area-context": "^4.10.8",
"react-native-screens": "^3.33.0",
"react-native-webview": "^13.10.0",
"@shopify/flash-list": "1.7.0",
"react-native-gesture-handler": "^2.25.0",
"react-native-reanimated": "3.17.5",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.10.0",
"react-native-vector-icons": "9.2.0",
"react-native-get-random-values": "^1.7.0",
"react-native-gzip": "1.1.0",
"react-native-html-to-pdf-lite": "^0.9.1",
"react-native-iap": "12.15.1",
"react-native-iap": "12.16.2",
"react-native-in-app-review": "4.3.3",
"react-native-keychain": "4.0.5",
"react-native-modal-datetime-picker": "14.0.0",
"react-native-navigation-bar-color": "2.0.2",
"react-native-notification-sounds": "0.5.5",
"react-native-pdf": "6.6.2",
"@shopify/flash-list": "^1.8.0",
"react-native-mmkv-storage": "^0.11.2",
"react-native-quick-sqlite": "^8.2.7",
"react-native-svg": "^15.12.0",
"react-native-webview": "^13.13.5",
"react-native-pdf": "6.7.7",
"react-native-scoped-storage": "^1.9.5",
"react-native-securerandom": "^1.0.1",
"react-native-share": "^12.0.3",
"react-native-svg": "^12.3.0",
"react-native-swiper-flatlist": "3.2.2",
"react-native-tooltips": "^1.0.3",
"react-native-zip-archive": "6.0.9",
"react-native-quick-sqlite": "^8.0.6",
"react-native-theme-switch-animation": "^0.6.0",
"@ammarahmed/react-native-background-fetch": "^4.2.2",
"react-native-image-crop-picker": "^0.40.2",
@@ -65,8 +66,7 @@
"react-native-screenguard": "^1.0.0",
"@formatjs/intl-locale": "4.0.0",
"@formatjs/intl-pluralrules": "5.2.14",
"@ammarahmed/react-native-sodium": "^1.6.1",
"react-native-mmkv-storage": "^0.10.2",
"@ammarahmed/react-native-sodium": "^1.6.2",
"@react-native-community/datetimepicker": "^8.2.0",
"react-native-exit-app": "github:ammarahm-ed/react-native-exit-app",
"react-native-begin-background-task": "github:blockfirm/react-native-begin-background-task",
@@ -78,19 +78,26 @@
"react-native-orientation-locker": "^1.7.0"
},
"devDependencies": {
"@rspack/core": "^1.2.7",
"@babel/core": "^7.27.1",
"@babel/preset-env": "^7.27.2",
"@babel/runtime": "^7.27.1",
"@react-native-community/cli": "15.0.1",
"@rspack/core": "^1.3.15",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.77.2",
"@react-native/eslint-config": "0.77.2",
"@react-native/metro-config": "0.77.2",
"@react-native/typescript-config": "0.77.2",
"@types/jest": "^29.5.13",
"react-test-renderer": "18.2.0",
"babel-loader": "^10.0.0",
"@babel/plugin-transform-unicode-property-regex": "^7.25.9",
"@callstack/repack-plugin-reanimated": "^5.0.0",
"@callstack/repack-plugin-reanimated": "^5.1.2",
"babel-plugin-syntax-hermes-parser": "^0.26.0",
"@swc/helpers": "^0.5.15",
"detox": "^20.27.6",
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.16.5",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "0.74.86",
"@react-native/metro-config": "0.74.86",
"@tsconfig/react-native": "^3.0.2",
"@types/html-to-text": "^8.0.1",
"@types/metro-config": "^0.76.3",
@@ -98,22 +105,20 @@
"@types/react-native": "^0.69.1",
"@types/react-native-vector-icons": "^6.4.10",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.32.1",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"@react-native/babel-preset": "0.74.86",
"prettier": "2.8.8",
"eslint": "^9.27.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-prettier": "^5.4.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-native": "^5.0.0",
"eslint-plugin-unused-imports": "^4.1.4",
"prettier": "3.5.3",
"react-native-actions-shortcuts": "^1.0.1",
"react-native-bundle-visualizer": "^3.1.1",
"react-native-cli-bump-version": "^1.3.0",
"react-refresh": "0.14.0",
"react-test-renderer": "18.2.0",
"metro-react-native-babel-preset": "0.77.0",
"acorn-import-attributes": "1.9.5",
"expect": "^29.7.0",
@@ -122,7 +127,6 @@
"jest-image-snapshot": "^6.4.0",
"ts-jest": "^29.2.5",
"pixelmatch": "^6.0.0",
"@types/jest": "^29.5.14",
"@messageformat/parser": "^5.1.1"
}
}

View File

@@ -228,16 +228,6 @@ module.exports = (env) => {
* from `Repack.plugins`.
*/
new Repack.RepackPlugin({
logger: {
console: false,
listener: (e => {
if (e.message[0].includes("Bundle built with warnings")) {
console.warn(` ` + e.message[0] + " time: " + e.message[1].time);
return;
}
})
},
extraChunks: [
{
type: "local",

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@notesnook/mobile",
"version": "3.1.0",
"version": "3.2.0-beta.4",
"private": true,
"license": "GPL-3.0-or-later",
"workspaces": [
@@ -34,7 +34,7 @@
"react-refresh": "0.14.0"
},
"overrides": {
"react-native": "0.74.5",
"react-native": "0.77.2",
"react": "18.2.0"
},
"dependencies": {
@@ -54,6 +54,6 @@
"@types/validator": "^13.12.2",
"diffblazer": "^1.0.1",
"react": "18.2.0",
"react-native": "0.74.5"
"react-native": "0.77.2"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js b/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js
index 636c0d8..87f4ee6 100644
index c0749e1..bbcb97e 100644
--- a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js
+++ b/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js
@@ -105,5 +105,6 @@ This warning will be removed in future (https://github.com/facebook/metro/issues
@@ -83,5 +83,6 @@ This warning will be removed in future (https://github.com/facebook/metro/issues
...options,
});
const overrideConfig = getOverrideConfig(ctx, config);

View File

@@ -0,0 +1,14 @@
diff --git a/node_modules/react-native-mmkv-storage/android/build.gradle b/node_modules/react-native-mmkv-storage/android/build.gradle
index abb696e..ba35baa 100644
--- a/node_modules/react-native-mmkv-storage/android/build.gradle
+++ b/node_modules/react-native-mmkv-storage/android/build.gradle
@@ -98,7 +98,8 @@ android {
cmake {
cppFlags "-O3 -frtti -fexceptions -Wall -fstack-protector-all"
arguments "-DANDROID_STL=c++_shared",
- "-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}"
+ "-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}",
+ "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
abiFilters (*reactNativeArchitectures())
}
}

View File

@@ -1,70 +0,0 @@
diff --git a/node_modules/react-native-svg/__tests__/css.test.tsx b/node_modules/react-native-svg/__tests__/css.test.tsx
index 579c357..57acc09 100644
--- a/node_modules/react-native-svg/__tests__/css.test.tsx
+++ b/node_modules/react-native-svg/__tests__/css.test.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';
-import { SvgCss, parse, inlineStyles } from '../src/ReactNativeSVG';
+import { parse } from '../src/ReactNativeSVG';
+import { SvgCss, inlineStyles } from '../css';
const xml = `<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
diff --git a/node_modules/react-native-svg/css/index.ts b/node_modules/react-native-svg/css/index.ts
new file mode 100644
index 0000000..3b268af
--- /dev/null
+++ b/node_modules/react-native-svg/css/index.ts
@@ -0,0 +1,2 @@
+export * from '../src/css';
+export { LocalSvg, WithLocalSvg, loadLocalRawResource } from '../src/LocalSvg';
\ No newline at end of file
diff --git a/node_modules/react-native-svg/src/LocalSvg.tsx b/node_modules/react-native-svg/src/LocalSvg.tsx
index f13c46f..0457159 100644
--- a/node_modules/react-native-svg/src/LocalSvg.tsx
+++ b/node_modules/react-native-svg/src/LocalSvg.tsx
@@ -7,7 +7,7 @@ import {
} from 'react-native';
import { fetchText } from './xml';
-import { SvgCss, SvgWithCss } from './css';
+import { SvgCss, SvgWithCss } from '../css';
import { SvgProps } from './elements/Svg';
const { getRawResource } = NativeModules.RNSVGRenderableManager || {};
diff --git a/node_modules/react-native-svg/src/ReactNativeSVG.ts b/node_modules/react-native-svg/src/ReactNativeSVG.ts
index 6b72423..1daca6c 100644
--- a/node_modules/react-native-svg/src/ReactNativeSVG.ts
+++ b/node_modules/react-native-svg/src/ReactNativeSVG.ts
@@ -25,14 +25,7 @@ import Marker from './elements/Marker';
import ForeignObject from './elements/ForeignObject';
import { parse, SvgAst, SvgFromUri, SvgFromXml, SvgUri, SvgXml } from './xml';
-import {
- SvgCss,
- SvgCssUri,
- SvgWithCss,
- SvgWithCssUri,
- inlineStyles,
-} from './css';
-import { LocalSvg, WithLocalSvg, loadLocalRawResource } from './LocalSvg';
+
import {
RNSVGCircle,
RNSVGClipPath,
@@ -116,14 +109,6 @@ export {
SvgFromXml,
SvgUri,
SvgXml,
- SvgCss,
- SvgCssUri,
- SvgWithCss,
- SvgWithCssUri,
- inlineStyles,
- LocalSvg,
- WithLocalSvg,
- loadLocalRawResource,
Shape,
RNSVGMarker,
RNSVGMask,

View File

@@ -307,7 +307,7 @@ const ShareView = () => {
noteData = {
content: {
data: (rawContent?.data || "") + noteContent.current,
data: (rawContent?.data || "") + "<br/>" + noteContent.current,
type: "tiptap"
},
id: note.id,

View File

@@ -108,6 +108,12 @@ export class AppModel {
return new TrashViewModel(this.page);
}
async goToArchive() {
await this.page.locator(getTestId("tab-home")).click();
await this.navigateTo("Archive");
return new NotesViewModel(this.page, "notes", "archive");
}
async goToSettings() {
await this.profileDropdown.open(
this.page.locator(getTestId("profile-dropdown")),
@@ -153,12 +159,8 @@ export class AppModel {
async search(query: string, type: string) {
const searchinput = this.page.locator(getTestId("search-input"));
const searchButton = this.page.locator(getTestId("search-button"));
const openSearch = this.page.locator(getTestId("open-search"));
await openSearch.click();
await searchinput.fill(query);
await searchButton.click();
return new SearchViewModel(this.page, type);
}
}

View File

@@ -84,4 +84,9 @@ export class ItemModel extends BaseItemModel {
await this.contextMenu.close();
return state;
}
async setAsDefault() {
await this.contextMenu.open(this.locator);
await this.contextMenu.clickOnItem("set-as-default");
}
}

View File

@@ -77,4 +77,11 @@ export class NoteItemModel extends BaseItemModel {
}
return tags;
}
async isLockedNotePasswordFieldVisible() {
return this.page
.locator(".active")
.locator(getTestId("unlock-note-password"))
.isVisible();
}
}

View File

@@ -37,6 +37,7 @@ abstract class BaseProperties {
private readonly pinToggle: ToggleModel;
private readonly favoriteToggle: ToggleModel;
private readonly lockToggle: ToggleModel;
private readonly archiveToggle: ToggleModel;
constructor(
page: Page,
@@ -47,6 +48,7 @@ abstract class BaseProperties {
this.pinToggle = new ToggleModel(page, `${itemPrefix}-pin`);
this.lockToggle = new ToggleModel(page, `${itemPrefix}-lock`);
this.favoriteToggle = new ToggleModel(page, `${itemPrefix}-favorite`);
this.archiveToggle = new ToggleModel(page, `${itemPrefix}-archive`);
}
async isPinned() {
@@ -126,6 +128,25 @@ abstract class BaseProperties {
await this.close();
}
async isArchived() {
await this.open();
const state = await this.archiveToggle.isToggled();
await this.close();
return state;
}
async archive() {
await this.open();
await this.archiveToggle.on();
await this.close();
}
async unarchive() {
await this.open();
await this.archiveToggle.off();
await this.close();
}
abstract isColored(color: string): Promise<boolean>;
abstract color(color: string): Promise<void>;
abstract open(): Promise<void>;

View File

@@ -113,4 +113,11 @@ export class NotebookItemModel extends BaseItemModel {
await this.contextMenu.open(this.locator);
await new ToggleModel(this.page, "menu-button-set-as-default").on();
}
async isMoveToTopVisible() {
await this.contextMenu.open(this.locator);
return this.contextMenu.menuContainer
.locator(getTestId("menu-button-move-to-top"))
.isVisible();
}
}

View File

@@ -324,3 +324,30 @@ test("when default notebook is set, created note in colors context should go to
expect(await openedNotebook?.findNote(coloredNote)).toBeDefined();
});
test("move to top option should not be available for root notebook", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notebooks = await app.goToNotebooks();
const notebook = await notebooks.createNotebook(NOTEBOOK);
expect(await notebook?.isMoveToTopVisible()).toBe(false);
});
test("move to top option should be available for sub-notebook", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notebooks = await app.goToNotebooks();
const notebook = await notebooks.createNotebook(NOTEBOOK);
const subNotebook = await notebook?.createSubnotebook({
title: "Subnotebook 1"
});
expect(await subNotebook?.isMoveToTopVisible()).toBe(true);
});

View File

@@ -201,6 +201,37 @@ for (const actor of actors) {
expect(await note?.getDescription()).toContain(NOTE.content);
expect(await note?.contextMenu.isLocked()).toBe(false);
});
test(`archive a note using ${actor}`, async ({ page }) => {
const app = new AppModel(page);
await app.goto();
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
await note?.[actor].archive();
const archive = await app.goToArchive();
const archivedNote = await archive.findNote(NOTE);
expect(await archivedNote?.contextMenu.isArchived()).toBe(true);
expect(await archivedNote?.properties.isArchived()).toBe(true);
});
test(`unarchive a note using ${actor}`, async ({ page }) => {
const app = new AppModel(page);
await app.goto();
let notes = await app.goToNotes();
let note = await notes.createNote(NOTE);
await note?.contextMenu.archive();
const archive = await app.goToArchive();
const archivedNote = await archive.findNote(NOTE);
await archivedNote?.[actor].unarchive();
notes = await app.goToNotes();
note = await notes.findNote(NOTE);
expect(await note?.contextMenu.isArchived()).toBe(false);
expect(await note?.properties.isArchived()).toBe(false);
});
}
test("open a locked note", async ({ page }) => {
@@ -339,3 +370,80 @@ test(`sort notes`, async ({ page }, info) => {
}
}
});
test("archived favorite note shouldn't be in favorites note list", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
await note?.contextMenu.favorite();
await note?.contextMenu.archive();
const favorites = await app.goToFavorites();
expect(await favorites.findNote(NOTE)).toBeUndefined();
});
test("archived tag note shouldn't be in tags note list", async ({ page }) => {
const app = new AppModel(page);
await app.goto();
const tags = await app.goToTags();
const tag = await tags.createItem({ title: "my-tag" });
const notes = await tag?.open();
const note = await notes?.createNote(NOTE);
expect(await notes?.findNote(NOTE)).toBeDefined();
await note?.contextMenu.archive();
expect(await notes?.findNote(NOTE)).toBeUndefined();
});
test("archived notebook note shouldn't be in notebooks note list", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notebooks = await app.goToNotebooks();
const notebook = await notebooks.createNotebook({ title: "my-notebook" });
const notes = await notebook?.openNotebook();
const note = await notes?.createNote(NOTE);
expect(await notes?.findNote(NOTE)).toBeDefined();
await note?.contextMenu.archive();
expect(await notes?.findNote(NOTE)).toBeUndefined();
});
test("archived colored note shouldn't be in colors note list", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notes = await app.goToNotes();
let note = await notes.createNote(NOTE);
await note?.contextMenu.newColor({ title: "red", color: "#ff0000" });
const color = await app.goToColor("red");
note = await color.findNote(NOTE);
expect(note).toBeDefined();
await note?.contextMenu.archive();
expect(await color.findNote(NOTE)).toBeUndefined();
});
test("archived note shouldn't appear in search results", async ({ page }) => {
const app = new AppModel(page);
await app.goto();
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
await app.search(NOTE.title, "notes");
expect(await notes.findNote(NOTE)).toBeDefined();
await note?.contextMenu.archive();
await app.search(NOTE.title, "notes");
const searchedNote = await notes.findNote(NOTE);
expect(searchedNote).toBeUndefined();
});

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { test, expect } from "@playwright/test";
import { AppModel } from "./models/app.model";
import { Item } from "./models/types";
import { groupByOptions, NOTE, orderByOptions, sortByOptions } from "./utils";
import { NOTE, orderByOptions, sortByOptions } from "./utils";
const TAG: Item = { title: "hello-world" };
const EDITED_TAG: Item = { title: "hello-world-2" };
@@ -236,3 +236,84 @@ test("creating more than 5 tags shouldn't be possible on basic plan", async ({
]);
expect(result).toBe(true);
});
test("when default tag is set, created note in notes context should have default tag", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
let tags = await app.goToTags();
let tag = await tags.createItem(TAG);
await tag?.setAsDefault();
const notes = await app.goToNotes();
await notes?.createNote(NOTE);
tags = await app.goToTags();
tag = await tags.findItem(TAG);
const openedTag = await tag?.open();
expect(await openedTag?.findNote(NOTE)).toBeDefined();
});
test("when default tag is set, created note in other tag's context should not have default tag", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
let tags = await app.goToTags();
let tag = await tags.createItem(TAG);
await tag?.setAsDefault();
const otherTag = await tags.createItem({
title: "Other Tag"
});
const openedOtherTag = await otherTag?.open();
await openedOtherTag?.createNote(NOTE);
tags = await app.goToTags();
tag = await tags.findItem(TAG);
const openedTag = await tag?.open();
expect(await openedTag?.findNote(NOTE)).toBeUndefined();
});
test("when default tag is set, created note in notebooks context should have default tag", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
let tags = await app.goToTags();
let tag = await tags.createItem(TAG);
await tag?.setAsDefault();
const notebooks = await app.goToNotebooks();
const notebook = await notebooks.createNotebook({ title: "Test Notebook" });
const openedNotebook = await notebook?.openNotebook();
await openedNotebook?.createNote(NOTE);
tags = await app.goToTags();
tag = await tags.findItem(TAG);
const openedTag = await tag?.open();
expect(await openedTag?.findNote(NOTE)).toBeDefined();
});
test("when default tag is set, created note in colors context should have default tag", async ({
page
}) => {
const coloredNote = { title: "Red note", content: NOTE.content };
const app = new AppModel(page);
await app.goto();
let tags = await app.goToTags();
let tag = await tags.createItem(TAG);
await tag?.setAsDefault();
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
await note?.contextMenu.newColor({ color: "#ff0000", title: "red" });
const color = await app.goToColor("red");
await color?.createNote(coloredNote);
tags = await app.goToTags();
tag = await tags.findItem(TAG);
const openedTag = await tag?.open();
expect(await openedTag?.findNote(coloredNote)).toBeDefined();
});

View File

@@ -86,3 +86,42 @@ test("unlocking a note permanently should not show vault unlocked status", async
await expect(vaultUnlockedStatus).toBeHidden();
});
test("clicking on vault unlocked status should lock the note", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
await note?.contextMenu.lock(PASSWORD);
await note?.openLockedNote(PASSWORD);
expect(await note?.isLockedNotePasswordFieldVisible()).toBe(false);
const vaultUnlockedStatus = page.locator(getTestId("vault-unlocked"));
await vaultUnlockedStatus.waitFor({ state: "visible" });
await vaultUnlockedStatus.click();
expect(await note?.isLockedNotePasswordFieldVisible()).toBe(true);
});
test("clicking on vault unlocked status should lock the readonly note", async ({
page
}) => {
const app = new AppModel(page);
await app.goto();
const notes = await app.goToNotes();
const note = await notes.createNote(NOTE);
await note?.properties.readonly();
await note?.contextMenu.lock(PASSWORD);
await note?.openLockedNote(PASSWORD);
expect(await note?.isLockedNotePasswordFieldVisible()).toBe(false);
const vaultUnlockedStatus = page.locator(getTestId("vault-unlocked"));
await vaultUnlockedStatus.waitFor({ state: "visible" });
await vaultUnlockedStatus.click();
expect(await note?.isLockedNotePasswordFieldVisible()).toBe(true);
});

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "@notesnook/web",
"description": "Your private note taking space",
"version": "3.1.0",
"version": "3.2.0-beta.9",
"private": true,
"main": "./src/app.js",
"homepage": "https://notesnook.com/",
@@ -19,7 +19,7 @@
"@lingui/react": "5.1.2",
"@mdi/js": "7.4.47",
"@mdi/react": "1.6.1",
"@notesnook-importer/core": "^2.1.1",
"@notesnook-importer/core": "^2.2.2",
"@notesnook/common": "file:../../packages/common",
"@notesnook/core": "file:../../packages/core",
"@notesnook/crypto": "file:../../packages/crypto",
@@ -43,7 +43,7 @@
"@theme-ui/core": "0.16.1",
"@trpc/client": "10.45.2",
"@trpc/react-query": "10.45.2",
"@zip.js/zip.js": "^2.7.54",
"@zip.js/zip.js": "^2.7.62",
"async-mutex": "0.5.0",
"axios": "^1.7.9",
"clipboard-polyfill": "4.1.0",
@@ -51,7 +51,7 @@
"cronosjs": "^1.7.1",
"dayjs": "1.11.13",
"diffblazer": "^1.0.1",
"electron-trpc": "0.6.1",
"electron-trpc": "0.7.1",
"event-source-polyfill": "1.0.31",
"fflate": "^0.8.0",
"file-saver": "^2.0.5",

View File

@@ -1,6 +1,7 @@
.tabsScroll,
.titlebarLogo,
.theme-scope-titleBar,
.navigation-menu-header,
.route-container-header {
-webkit-app-region: drag;
}
@@ -205,6 +206,10 @@ textarea,
display: none;
}
a {
color: var(--accent);
}
.flash {
animation: flash 1s;
}

View File

@@ -164,8 +164,11 @@ function DesktopAppContents() {
useEffect(() => {
if (isListPaneVisible) {
navPane.current?.expand(1);
navPane.current?.reset(1);
if (navPane.current?.hasExpandedSize(1)) {
navPane.current?.expand(1);
} else {
navPane.current?.reset(1);
}
} else {
navPane.current?.collapse(1);
}

View File

@@ -86,9 +86,12 @@ export async function scheduleFullBackups() {
);
}
export function shouldAddAutoBackupsDisabledNotice() {
export async function shouldAddAutoBackupsDisabledNotice() {
const user = await db.user.getUser();
if (!user) return false;
const backupInterval = Config.get("backupReminderOffset", 0);
if (!isUserPremium() && backupInterval) {
if (!isUserPremium(user) && backupInterval) {
Config.set("backupReminderOffset", 0);
return true;
}
@@ -177,7 +180,7 @@ export const NoticesData: Record<NoticeType, NoticeData> = {
export async function resetNotices() {
const notices: Notice[] = [];
if (shouldAddAutoBackupsDisabledNotice()) {
if (await shouldAddAutoBackupsDisabledNotice()) {
notices.push({ type: "autoBackupsOff", priority: 3 });
}
if (await shouldAddBackupNotice()) {

View File

@@ -563,6 +563,7 @@ export function Factory(Module) {
Module.ccall("RegisterExtensionFunctions", "void", ["number"], [db]);
Module.ccall("sqlite3Fts5BetterTrigramInit", "void", ["number"], [db]);
Module.ccall("sqlite3Fts5HtmlInit", "void", ["number"], [db]);
check(fname, result);
return db;
};

View File

@@ -1,148 +1,169 @@
var Module = (() => {
var _scriptName = import.meta.url;
var _scriptDir = import.meta.url;
return (
function(moduleArg = {}) {
var moduleRtn;
var d=moduleArg,aa,ba,ca=new Promise((a,b)=>{aa=a;ba=b}),da="object"==typeof window,ea="undefined"!=typeof WorkerGlobalScope,fa=Object.assign({},d),ha="./this.program",g="",ia,ja;
if(da||ea)ea?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),_scriptName&&(g=_scriptName),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),ea&&(ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ia=a=>fetch(a,{credentials:"same-origin"}).then(b=>b.ok?b.arrayBuffer():Promise.reject(Error(b.status+" : "+b.url)));
var la=d.print||console.log.bind(console),r=d.printErr||console.error.bind(console);Object.assign(d,fa);fa=null;d.thisProgram&&(ha=d.thisProgram);var ma=d.wasmBinary,na,oa=!1,pa,u,v,w,qa,x,z,ra,sa;function ta(){var a=na.buffer;d.HEAP8=u=new Int8Array(a);d.HEAP16=w=new Int16Array(a);d.HEAPU8=v=new Uint8Array(a);d.HEAPU16=qa=new Uint16Array(a);d.HEAP32=x=new Int32Array(a);d.HEAPU32=z=new Uint32Array(a);d.HEAPF32=ra=new Float32Array(a);d.HEAPF64=sa=new Float64Array(a)}var ua=[],va=[],wa=[],xa=[];
function ya(){var a=d.preRun.shift();ua.unshift(a)}var za=0,Aa=null,Ba=null;function B(a){d.onAbort?.(a);a="Aborted("+a+")";r(a);oa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ca=a=>a.startsWith("data:application/octet-stream;base64,"),Da;function Ea(a){if(a==Da&&ma)return new Uint8Array(ma);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}
function Fa(a){return ma?Promise.resolve().then(()=>Ea(a)):ia(a).then(b=>new Uint8Array(b),()=>Ea(a))}function Ga(a,b,c){return Fa(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);B(e)})}
function Ha(a,b){var c=Da;return ma||"function"!=typeof WebAssembly.instantiateStreaming||Ca(c)||"function"!=typeof fetch?Ga(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Ga(c,a,b)}))}var C,D;class Ia{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}var Ja=a=>{for(;0<a.length;)a.shift()(d)};
function F(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return u[a];case "i8":return u[a];case "i16":return w[a>>1];case "i32":return x[a>>2];case "i64":B("to do getValue(i64) use WASM_BIGINT");case "float":return ra[a>>2];case "double":return sa[a>>3];case "*":return z[a>>2];default:B(`invalid type for getValue: ${b}`)}}var Ka=d.noExitRuntime||!0;
function H(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":u[a]=b;break;case "i8":u[a]=b;break;case "i16":w[a>>1]=b;break;case "i32":x[a>>2]=b;break;case "i64":B("to do setValue(i64) use WASM_BIGINT");case "float":ra[a>>2]=b;break;case "double":sa[a>>3]=b;break;case "*":z[a>>2]=b;break;default:B(`invalid type for setValue: ${c}`)}}
var La="undefined"!=typeof TextDecoder?new TextDecoder:void 0,I=(a,b=0,c=NaN)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&La)return La.decode(a.subarray(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var h=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|h);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|h<<6|k:(f&7)<<18|h<<12|k<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},
Ma=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Na=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ma(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Oa=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},Pa=a=>{if("/"===
a)return"/";a=Na(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Qa=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);B("initRandomDevice")},Ra=a=>(Ra=Qa())(a),Sa=(...a)=>{for(var b="",c=!1,e=a.length-1;-1<=e&&!c;e--){c=0<=e?a[e]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Ma(b.split("/").filter(f=>!!f),!c).join("/");
return(c?"/":"")+b||"."},Ta=[],Ua=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);127>=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},J=(a,b,c,e)=>{if(!(0<e))return 0;var f=c;e=c+e-1;for(var h=0;h<a.length;++h){var k=a.charCodeAt(h);if(55296<=k&&57343>=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)break;b[c++]=240|
k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f};function Va(a,b,c){c=Array(0<c?c:Ua(a)+1);a=J(a,c,0,c.length);b&&(c.length=a);return c}var Wa=[];function Xa(a,b){Wa[a]={input:[],Tf:[],dg:b};Ya(a,Za)}
var Za={open(a){var b=Wa[a.node.gg];if(!b)throw new K(43);a.Uf=b;a.seekable=!1},close(a){a.Uf.dg.jg(a.Uf)},jg(a){a.Uf.dg.jg(a.Uf)},read(a,b,c,e){if(!a.Uf||!a.Uf.dg.xg)throw new K(60);for(var f=0,h=0;h<e;h++){try{var k=a.Uf.dg.xg(a.Uf)}catch(n){throw new K(29);}if(void 0===k&&0===f)throw new K(6);if(null===k||void 0===k)break;f++;b[c+h]=k}f&&(a.node.timestamp=Date.now());return f},write(a,b,c,e){if(!a.Uf||!a.Uf.dg.rg)throw new K(60);try{for(var f=0;f<e;f++)a.Uf.dg.rg(a.Uf,b[c+f])}catch(h){throw new K(29);
}e&&(a.node.timestamp=Date.now());return f}},$a={xg(){a:{if(!Ta.length){var a=null;"undefined"!=typeof window&&"function"==typeof window.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){a=null;break a}Ta=Va(a,!0)}a=Ta.shift()}return a},rg(a,b){null===b||10===b?(la(I(a.Tf)),a.Tf=[]):0!=b&&a.Tf.push(b)},jg(a){a.Tf&&0<a.Tf.length&&(la(I(a.Tf)),a.Tf=[])},Zg(){return{Ug:25856,Wg:5,Tg:191,Vg:35387,Sg:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},$g(){return 0},
ah(){return[24,80]}},ab={rg(a,b){null===b||10===b?(r(I(a.Tf)),a.Tf=[]):0!=b&&a.Tf.push(b)},jg(a){a.Tf&&0<a.Tf.length&&(r(I(a.Tf)),a.Tf=[])}};function bb(a,b){var c=a.Pf?a.Pf.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Pf,a.Pf=new Uint8Array(b),0<a.Rf&&a.Pf.set(c.subarray(0,a.Rf),0))}
var M={Xf:null,Wf(){return M.createNode(null,"/",16895,0)},createNode(a,b,c,e){if(24576===(c&61440)||4096===(c&61440))throw new K(63);M.Xf||(M.Xf={dir:{node:{Vf:M.Nf.Vf,Sf:M.Nf.Sf,eg:M.Nf.eg,kg:M.Nf.kg,Cg:M.Nf.Cg,pg:M.Nf.pg,ng:M.Nf.ng,Bg:M.Nf.Bg,og:M.Nf.og},stream:{ag:M.Of.ag}},file:{node:{Vf:M.Nf.Vf,Sf:M.Nf.Sf},stream:{ag:M.Of.ag,read:M.Of.read,write:M.Of.write,ug:M.Of.ug,lg:M.Of.lg,mg:M.Of.mg}},link:{node:{Vf:M.Nf.Vf,Sf:M.Nf.Sf,hg:M.Nf.hg},stream:{}},vg:{node:{Vf:M.Nf.Vf,Sf:M.Nf.Sf},stream:cb}});
c=db(a,b,c,e);O(c.mode)?(c.Nf=M.Xf.dir.node,c.Of=M.Xf.dir.stream,c.Pf={}):32768===(c.mode&61440)?(c.Nf=M.Xf.file.node,c.Of=M.Xf.file.stream,c.Rf=0,c.Pf=null):40960===(c.mode&61440)?(c.Nf=M.Xf.link.node,c.Of=M.Xf.link.stream):8192===(c.mode&61440)&&(c.Nf=M.Xf.vg.node,c.Of=M.Xf.vg.stream);c.timestamp=Date.now();a&&(a.Pf[b]=c,a.timestamp=c.timestamp);return c},Yg(a){return a.Pf?a.Pf.subarray?a.Pf.subarray(0,a.Rf):new Uint8Array(a.Pf):new Uint8Array(0)},Nf:{Vf(a){var b={};b.Ig=8192===(a.mode&61440)?a.id:
1;b.yg=a.id;b.mode=a.mode;b.Og=1;b.uid=0;b.Lg=0;b.gg=a.gg;O(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.Rf:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.Eg=new Date(a.timestamp);b.Ng=new Date(a.timestamp);b.Hg=new Date(a.timestamp);b.Fg=4096;b.Gg=Math.ceil(b.size/b.Fg);return b},Sf(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);if(void 0!==b.size&&(b=b.size,a.Rf!=b))if(0==b)a.Pf=null,a.Rf=0;else{var c=a.Pf;a.Pf=new Uint8Array(b);c&&a.Pf.set(c.subarray(0,
Math.min(b,a.Rf)));a.Rf=b}},eg(){throw eb[44];},kg(a,b,c,e){return M.createNode(a,b,c,e)},Cg(a,b,c){if(O(a.mode)){try{var e=fb(b,c)}catch(h){}if(e)for(var f in e.Pf)throw new K(55);}delete a.parent.Pf[a.name];a.parent.timestamp=Date.now();a.name=c;b.Pf[c]=a;b.timestamp=a.parent.timestamp},pg(a,b){delete a.Pf[b];a.timestamp=Date.now()},ng(a,b){var c=fb(a,b),e;for(e in c.Pf)throw new K(55);delete a.Pf[b];a.timestamp=Date.now()},Bg(a){var b=[".",".."],c;for(c of Object.keys(a.Pf))b.push(c);return b},
og(a,b,c){a=M.createNode(a,b,41471,0);a.link=c;return a},hg(a){if(40960!==(a.mode&61440))throw new K(28);return a.link}},Of:{read(a,b,c,e,f){var h=a.node.Pf;if(f>=a.node.Rf)return 0;a=Math.min(a.node.Rf-f,e);if(8<a&&h.subarray)b.set(h.subarray(f,f+a),c);else for(e=0;e<a;e++)b[c+e]=h[f+e];return a},write(a,b,c,e,f,h){b.buffer===u.buffer&&(h=!1);if(!e)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Pf||a.Pf.subarray)){if(h)return a.Pf=b.subarray(c,c+e),a.Rf=e;if(0===a.Rf&&0===f)return a.Pf=
b.slice(c,c+e),a.Rf=e;if(f+e<=a.Rf)return a.Pf.set(b.subarray(c,c+e),f),e}bb(a,f+e);if(a.Pf.subarray&&b.subarray)a.Pf.set(b.subarray(c,c+e),f);else for(h=0;h<e;h++)a.Pf[f+h]=b[c+h];a.Rf=Math.max(a.Rf,f+e);return e},ag(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Rf);if(0>b)throw new K(28);return b},ug(a,b,c){bb(a.node,b+c);a.node.Rf=Math.max(a.node.Rf,b+c)},lg(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new K(43);a=a.node.Pf;if(f&2||!a||a.buffer!==u.buffer){f=!0;e=
65536*Math.ceil(b/65536);var h=gb(65536,e);h&&v.fill(0,h,h+e);e=h;if(!e)throw new K(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);u.set(a,e)}}else f=!1,e=a.byteOffset;return{Pg:e,Dg:f}},mg(a,b,c,e){M.Of.write(a,b,0,e,c,!1);return 0}}},hb=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},ib=null,jb={},kb=[],lb=1,P=null,mb=!1,nb=!0,K=class{name="ErrnoError";constructor(a){this.Qf=a}},eb={},ob={},pb=class{ig={};node=null;get flags(){return this.ig.flags}set flags(a){this.ig.flags=
a}get position(){return this.ig.position}set position(a){this.ig.position=a}},qb=class{Nf={};Of={};bg=null;constructor(a,b,c,e){a||=this;this.parent=a;this.Wf=a.Wf;this.id=lb++;this.name=b;this.mode=c;this.gg=e}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}};
function Q(a,b={}){a=Sa(a);if(!a)return{path:"",node:null};b=Object.assign({wg:!0,sg:0},b);if(8<b.sg)throw new K(32);a=a.split("/").filter(k=>!!k);for(var c=ib,e="/",f=0;f<a.length;f++){var h=f===a.length-1;if(h&&b.parent)break;c=fb(c,a[f]);e=Na(e+"/"+a[f]);c.bg&&(!h||h&&b.wg)&&(c=c.bg.root);if(!h||b.$f)for(h=0;40960===(c.mode&61440);)if(c=rb(e),e=Sa(Oa(e),c),c=Q(e,{sg:b.sg+1}).node,40<h++)throw new K(32);}return{path:e,node:c}}
function sb(a){for(var b;;){if(a===a.parent)return a=a.Wf.Ag,b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}}function tb(a,b){for(var c=0,e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)|0;return(a+c>>>0)%P.length}function ub(a){var b=tb(a.parent.id,a.name);if(P[b]===a)P[b]=a.cg;else for(b=P[b];b;){if(b.cg===a){b.cg=a.cg;break}b=b.cg}}
function fb(a,b){var c=O(a.mode)?(c=vb(a,"x"))?c:a.Nf.eg?0:2:54;if(c)throw new K(c);for(c=P[tb(a.id,b)];c;c=c.cg){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.Nf.eg(a,b)}function db(a,b,c,e){a=new qb(a,b,c,e);b=tb(a.parent.id,a.name);a.cg=P[b];return P[b]=a}function O(a){return 16384===(a&61440)}function wb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}
function vb(a,b){if(nb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function xb(a,b){try{return fb(a,b),20}catch(c){}return vb(a,"wx")}function yb(a,b,c){try{var e=fb(a,b)}catch(f){return f.Qf}if(a=vb(a,"wx"))return a;if(c){if(!O(e.mode))return 54;if(e===e.parent||"/"===sb(e))return 10}else if(O(e.mode))return 31;return 0}function R(a){a=kb[a];if(!a)throw new K(8);return a}
function zb(a,b=-1){a=Object.assign(new pb,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!kb[b])break a;throw new K(33);}a.Yf=b;return kb[b]=a}function Ab(a,b=-1){a=zb(a,b);a.Of?.Xg?.(a);return a}var cb={open(a){a.Of=jb[a.node.gg].Of;a.Of.open?.(a)},ag(){throw new K(70);}};function Ya(a,b){jb[a]={Of:b}}
function Bb(a,b){var c="/"===b;if(c&&ib)throw new K(10);if(!c&&b){var e=Q(b,{wg:!1});b=e.path;e=e.node;if(e.bg)throw new K(10);if(!O(e.mode))throw new K(54);}b={type:a,bh:{},Ag:b,Mg:[]};a=a.Wf(b);a.Wf=b;b.root=a;c?ib=a:e&&(e.bg=b,e.Wf&&e.Wf.Mg.push(b))}function Cb(a,b,c){var e=Q(a,{parent:!0}).node;a=Pa(a);if(!a||"."===a||".."===a)throw new K(28);var f=xb(e,a);if(f)throw new K(f);if(!e.Nf.kg)throw new K(63);return e.Nf.kg(e,a,b,c)}function S(a,b){return Cb(a,(void 0!==b?b:511)&1023|16384,0)}
function Db(a,b,c){"undefined"==typeof c&&(c=b,b=438);Cb(a,b|8192,c)}function Eb(a,b){if(!Sa(a))throw new K(44);var c=Q(b,{parent:!0}).node;if(!c)throw new K(44);b=Pa(b);var e=xb(c,b);if(e)throw new K(e);if(!c.Nf.og)throw new K(63);c.Nf.og(c,b,a)}function Fb(a){var b=Q(a,{parent:!0}).node;a=Pa(a);var c=fb(b,a),e=yb(b,a,!0);if(e)throw new K(e);if(!b.Nf.ng)throw new K(63);if(c.bg)throw new K(10);b.Nf.ng(b,a);ub(c)}
function rb(a){a=Q(a).node;if(!a)throw new K(44);if(!a.Nf.hg)throw new K(28);return Sa(sb(a.parent),a.Nf.hg(a))}function Gb(a,b){a=Q(a,{$f:!b}).node;if(!a)throw new K(44);if(!a.Nf.Vf)throw new K(63);return a.Nf.Vf(a)}function Hb(a){return Gb(a,!0)}function Ib(a,b){a="string"==typeof a?Q(a,{$f:!0}).node:a;if(!a.Nf.Sf)throw new K(63);a.Nf.Sf(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})}
function Jb(a,b){if(0>b)throw new K(28);a="string"==typeof a?Q(a,{$f:!0}).node:a;if(!a.Nf.Sf)throw new K(63);if(O(a.mode))throw new K(31);if(32768!==(a.mode&61440))throw new K(28);var c=vb(a,"w");if(c)throw new K(c);a.Nf.Sf(a,{size:b,timestamp:Date.now()})}
function Kb(a,b,c){if(""===a)throw new K(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=Na(a);try{f=Q(a,{$f:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new K(20);}else f=Cb(a,c,0),e=!0;if(!f)throw new K(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!O(f.mode))throw new K(54);if(!e&&(c=
f?40960===(f.mode&61440)?32:O(f.mode)&&("r"!==wb(b)||b&512)?31:vb(f,wb(b)):44))throw new K(c);b&512&&!e&&Jb(f,0);b&=-131713;f=zb({node:f,path:sb(f),flags:b,seekable:!0,position:0,Of:f.Of,Rg:[],error:!1});f.Of.open&&f.Of.open(f);!d.logReadFiles||b&1||a in ob||(ob[a]=1);return f}function Lb(a,b,c){if(null===a.Yf)throw new K(8);if(!a.seekable||!a.Of.ag)throw new K(70);if(0!=c&&1!=c&&2!=c)throw new K(28);a.position=a.Of.ag(a,b,c);a.Rg=[]}
function T(a,b,c){a=Na("/dev/"+a);var e=hb(!!b,!!c);T.zg??(T.zg=64);var f=T.zg++<<8|0;Ya(f,{open(h){h.seekable=!1},close(){c?.buffer?.length&&c(10)},read(h,k,n,l){for(var m=0,p=0;p<l;p++){try{var q=b()}catch(t){throw new K(29);}if(void 0===q&&0===m)throw new K(6);if(null===q||void 0===q)break;m++;k[n+p]=q}m&&(h.node.timestamp=Date.now());return m},write(h,k,n,l){for(var m=0;m<l;m++)try{c(k[n+m])}catch(p){throw new K(29);}l&&(h.node.timestamp=Date.now());return m}});Db(a,e,f)}var U={};
function Mb(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?"/":R(a).path;if(0==b.length){if(!c)throw new K(44);return a}return Na(a+"/"+b)}
function Nb(a,b,c){a=a(b);x[c>>2]=a.Ig;x[c+4>>2]=a.mode;z[c+8>>2]=a.Og;x[c+12>>2]=a.uid;x[c+16>>2]=a.Lg;x[c+20>>2]=a.gg;D=[a.size>>>0,(C=a.size,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[c+24>>2]=D[0];x[c+28>>2]=D[1];x[c+32>>2]=4096;x[c+36>>2]=a.Gg;b=a.Eg.getTime();var e=a.Ng.getTime(),f=a.Hg.getTime();D=[Math.floor(b/1E3)>>>0,(C=Math.floor(b/1E3),1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:
0)];x[c+40>>2]=D[0];x[c+44>>2]=D[1];z[c+48>>2]=b%1E3*1E6;D=[Math.floor(e/1E3)>>>0,(C=Math.floor(e/1E3),1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[c+56>>2]=D[0];x[c+60>>2]=D[1];z[c+64>>2]=e%1E3*1E6;D=[Math.floor(f/1E3)>>>0,(C=Math.floor(f/1E3),1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[c+72>>2]=D[0];x[c+76>>2]=D[1];z[c+80>>2]=f%1E3*1E6;D=[a.yg>>>0,(C=a.yg,1<=+Math.abs(C)?0<C?+Math.floor(C/
4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[c+88>>2]=D[0];x[c+92>>2]=D[1];return 0}
var Ob=void 0,Pb=()=>{var a=x[+Ob>>2];Ob+=4;return a},Qb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Rb=0,Sb=[0,31,60,91,121,152,182,213,244,274,305,335],Tb=[0,31,59,90,120,151,181,212,243,273,304,334],Ub={},Vb=a=>{if(!(a instanceof Ia||"unwind"==a))throw a;},Wb=a=>{pa=a;Ka||0<Rb||(d.onExit?.(a),oa=!0);throw new Ia(a);},Xb=a=>{if(!oa)try{if(a(),!(Ka||0<Rb))try{pa=a=pa,Wb(a)}catch(b){Vb(b)}}catch(b){Vb(b)}},Yb={},$b=()=>{if(!Zb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",
HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ha||"./this.program"},b;for(b in Yb)void 0===Yb[b]?delete a[b]:a[b]=Yb[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Zb=c}return Zb},Zb;function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}
function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){}function Gc(){}function Hc(){}function Ic(){}function Jc(){}function Kc(){}function Lc(){}function Mc(){}var Nc=a=>{try{a()}catch(b){B(b)}};
function Oc(){var a=V,b={};for(let [c,e]of Object.entries(a))b[c]="function"==typeof e?(...f)=>{Pc.push(c);try{return e(...f)}finally{oa||(Pc.pop(),W&&1===X&&0===Pc.length&&(X=0,Nc(Qc),"undefined"!=typeof Fibers&&Fibers.eh()))}}:e;return b}var X=0,W=null,Rc=0,Pc=[],Sc={},Tc={},Uc=0,Vc=null,Wc=[];function Xc(){return new Promise((a,b)=>{Vc={resolve:a,reject:b}})}
function Yc(){var a=Zc(16396),b=a+12;z[a>>2]=b;z[a+4>>2]=b+16384;b=Pc[0];var c=Sc[b];void 0===c&&(c=Uc++,Sc[b]=c,Tc[c]=b);x[a+8>>2]=c;return a}
function $c(a){if(!oa){if(0===X){var b=!1,c=!1;a((e=0)=>{if(!oa&&(Rc=e,b=!0,c)){X=2;Nc(()=>ad(W));"undefined"!=typeof MainLoop&&MainLoop.Kg&&MainLoop.resume();e=!1;try{var f=(0,V[Tc[x[W+8>>2]]])()}catch(n){f=n,e=!0}var h=!1;if(!W){var k=Vc;k&&(Vc=null,(e?k.reject:k.resolve)(f),h=!0)}if(e&&!h)throw f;}});c=!0;b||(X=1,W=Yc(),"undefined"!=typeof MainLoop&&MainLoop.Kg&&MainLoop.pause(),Nc(()=>bd(W)))}else 2===X?(X=0,Nc(cd),dd(W),W=null,Wc.forEach(Xb)):B(`invalid state: ${X}`);return Rc}}
function ed(a){return $c(b=>{a().then(b)})}
var fd={},gd,hd,jd=[],Z=(a,b,c,e,f)=>{function h(q){--Rb;0!==l&&kd(l);return"string"===b?q?I(v,q):"":"boolean"===b?!!q:q}var k={string:q=>{var t=0;if(null!==q&&void 0!==q&&0!==q){t=Ua(q)+1;var y=ld(t);J(q,v,y,t);t=y}return t},array:q=>{var t=ld(q.length);u.set(q,t);return t}};a=d["_"+a];var n=[],l=0;if(e)for(var m=0;m<e.length;m++){var p=k[c[m]];p?(0===l&&(l=md()),n[m]=p(e[m])):n[m]=e[m]}c=W;e=a(...n);f=f?.async;Rb+=1;if(W!=c)return Xc().then(h);e=h(e);return f?Promise.resolve(e):e},nd="undefined"!=
typeof TextDecoder?new TextDecoder("utf-16le"):void 0;[44].forEach(a=>{eb[a]=new K(a);eb[a].stack="<generic error, no stack>"});P=Array(4096);Bb(M,"/");S("/tmp");S("/home");S("/home/web_user");(function(){S("/dev");Ya(259,{read:()=>0,write:(e,f,h,k)=>k});Db("/dev/null",259);Xa(1280,$a);Xa(1536,ab);Db("/dev/tty",1280);Db("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Ra(a).byteLength);return a[--b]};T("random",c);T("urandom",c);S("/dev/shm");S("/dev/shm/tmp")})();
(function(){S("/proc");var a=S("/proc/self");S("/proc/self/fd");Bb({Wf(){var b=db(a,"fd",16895,73);b.Nf={eg(c,e){var f=R(+e);c={parent:null,Wf:{Ag:"fake"},Nf:{hg:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})();
(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,tg:e}):a.delete(b);return Z("set_authorizer","number",["number"],[b])};ac=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,tg:l}=a.get(b);return n(l,c,e?e?I(v,e):"":null,f?f?I(v,f):"":null,h?h?I(v,h):"":null,k?k?I(v,k):"":null)}return 0}})();
(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,Zf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,Jg:l,Zf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};cc=function(c,e,f,h){c=a.get(c);b.set(e,
c.Zf);c.f(e,new Uint32Array(v.buffer,h,f));b.delete(e)};ec=function(c,e,f,h){c=a.get(c);b.set(e,c.Zf);c.step(e,new Uint32Array(v.buffer,h,f));b.delete(e)};bc=function(c,e){c=a.get(c);b.set(e,c.Zf);c.Jg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,tg:f}):a.delete(b);return Z("progress_handler",null,["number","number"],[b,c])};dc=function(b){if(a.has(b)){const {f:c,tg:e}=a.get(b);return c(e)}return 0}})();
(function(){function a(l,m){const p=`get${l}`,q=`set${l}`;return new Proxy(new DataView(v.buffer,m,"Int32"===l?4:8),{get(t,y){if(y===p)return function(A,G){if(!G)throw Error("must be little endian");return t[y](A,G)};if(y===q)return function(A,G,E){if(!E)throw Error("must be little endian");return t[y](A,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return t[y]}})}const b="object"===typeof fd,c=new Map,e=new Map,f=new Map,h=b?new Set:null,k=b?new Set:null,n=new Map;
vc=function(l,m,p,q){n.set(l?I(v,l):"",{size:m,fg:Array.from(new Uint32Array(v.buffer,q,p))})};d.createModule=function(l,m,p,q){b&&(p.handleAsync=ed);const t=c.size;c.set(t,{module:p,Zf:q});q=0;p.xCreate&&(q|=1);p.xConnect&&(q|=2);p.xBestIndex&&(q|=4);p.xDisconnect&&(q|=8);p.xDestroy&&(q|=16);p.xOpen&&(q|=32);p.xClose&&(q|=64);p.xFilter&&(q|=128);p.xNext&&(q|=256);p.xEof&&(q|=512);p.xColumn&&(q|=1024);p.xRowid&&(q|=2048);p.xUpdate&&(q|=4096);p.xBegin&&(q|=8192);p.xSync&&(q|=16384);p.xCommit&&(q|=
32768);p.xRollback&&(q|=65536);p.xFindFunction&&(q|=131072);p.xRename&&(q|=262144);return Z("create_module","number",["number","string","number","number"],[l,m,t,q])};lc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(v.buffer,q,p)).map(A=>A?I(v,A):"");return m.module.xCreate(l,m.Zf,q,t,a("Int32",y))};kc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(v.buffer,
q,p)).map(A=>A?I(v,A):"");return m.module.xConnect(l,m.Zf,q,t,a("Int32",y))};gc=function(l,m){var p=e.get(l),q=n.get("sqlite3_index_info").fg;const t={};t.nConstraint=F(m+q[0],"i32");t.aConstraint=[];var y=F(m+q[1],"*"),A=n.get("sqlite3_index_constraint").size;for(var G=0;G<t.nConstraint;++G){var E=t.aConstraint,N=E.push,L=y+G*A,ka=n.get("sqlite3_index_constraint").fg,Y={};Y.iColumn=F(L+ka[0],"i32");Y.op=F(L+ka[1],"i8");Y.usable=!!F(L+ka[2],"i8");N.call(E,Y)}t.nOrderBy=F(m+q[2],"i32");t.aOrderBy=
[];y=F(m+q[3],"*");A=n.get("sqlite3_index_orderby").size;for(G=0;G<t.nOrderBy;++G)E=t.aOrderBy,N=E.push,L=y+G*A,ka=n.get("sqlite3_index_orderby").fg,Y={},Y.iColumn=F(L+ka[0],"i32"),Y.desc=!!F(L+ka[1],"i8"),N.call(E,Y);t.aConstraintUsage=[];for(y=0;y<t.nConstraint;++y)t.aConstraintUsage.push({argvIndex:0,omit:!1});t.idxNum=F(m+q[5],"i32");t.idxStr=null;t.orderByConsumed=!!F(m+q[8],"i8");t.estimatedCost=F(m+q[9],"double");t.estimatedRows=F(m+q[10],"i32");t.idxFlags=F(m+q[11],"i32");t.colUsed=F(m+q[12],
"i32");l=p.module.xBestIndex(l,t);p=n.get("sqlite3_index_info").fg;q=F(m+p[4],"*");y=n.get("sqlite3_index_constraint_usage").size;for(N=0;N<t.nConstraint;++N)A=q+N*y,E=t.aConstraintUsage[N],L=n.get("sqlite3_index_constraint_usage").fg,H(A+L[0],E.argvIndex,"i32"),H(A+L[1],E.omit?1:0,"i8");H(m+p[5],t.idxNum,"i32");"string"===typeof t.idxStr&&(q=Ua(t.idxStr),y=Z("sqlite3_malloc","number",["number"],[q+1]),J(t.idxStr,v,y,q+1),H(m+p[6],y,"*"),H(m+p[7],1,"i32"));H(m+p[8],t.orderByConsumed,"i32");H(m+p[9],
t.estimatedCost,"double");H(m+p[10],t.estimatedRows,"i32");H(m+p[11],t.idxFlags,"i32");return l};nc=function(l){const m=e.get(l);b?h.add(l):e.delete(l);return m.module.xDisconnect(l)};mc=function(l){const m=e.get(l);b?h.add(l):e.delete(l);return m.module.xDestroy(l)};rc=function(l,m){const p=e.get(l);f.set(m,p);if(b){k.delete(m);for(const q of k)f.delete(q)}return p.module.xOpen(l,m)};hc=function(l){const m=f.get(l);b?k.add(l):f.delete(l);return m.module.xClose(l)};oc=function(l){return f.get(l).module.xEof(l)?
1:0};pc=function(l,m,p,q,t){const y=f.get(l);p=p?p?I(v,p):"":null;t=new Uint32Array(v.buffer,t,q);return y.module.xFilter(l,m,p,t)};qc=function(l){return f.get(l).module.xNext(l)};ic=function(l,m,p){return f.get(l).module.xColumn(l,m,p)};uc=function(l,m){return f.get(l).module.xRowid(l,a("BigInt64",m))};xc=function(l,m,p,q){const t=e.get(l);p=new Uint32Array(v.buffer,p,m);return t.module.xUpdate(l,p,a("BigInt64",q))};fc=function(l){return e.get(l).module.xBegin(l)};wc=function(l){return e.get(l).module.xSync(l)};
jc=function(l){return e.get(l).module.xCommit(l)};tc=function(l){return e.get(l).module.xRollback(l)};sc=function(l,m){const p=e.get(l);m=m?I(v,m):"";return p.module.xRename(l,m)}})();
(function(){function a(h,k){const n=`get${h}`,l=`set${h}`;return new Proxy(new DataView(v.buffer,k,"Int32"===h?4:8),{get(m,p){if(p===n)return function(q,t){if(!t)throw Error("must be little endian");return m[p](q,t)};if(p===l)return function(q,t,y){if(!y)throw Error("must be little endian");return m[p](q,t,y)};if("string"===typeof p&&p.match(/^(get)|(set)/))throw Error("invalid type");return m[p]}})}const b="object"===typeof fd;b&&(d.handleAsync=ed);const c=new Map,e=new Map;d.registerVFS=function(h,
k){if(Z("sqlite3_vfs_find","number",["string"],[h.name]))throw Error(`VFS '${h.name}' already registered`);b&&(h.handleAsync=ed);var n=h.mxPathName??64;const l=d._malloc(4);k=Z("register_vfs","number",["string","number","number","number"],[h.name,n,k?1:0,l]);k||(n=F(l,"*"),c.set(n,h));d._free(l);return k};const f=b?new Set:null;Ac=function(h){const k=e.get(h);b?f.add(h):e.delete(h);return k.xClose(h)};Hc=function(h,k,n,l,m){return e.get(h).xRead(h,v.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};
Mc=function(h,k,n,l,m){return e.get(h).xWrite(h,v.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Kc=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Jc=function(h,k){return e.get(h).xSync(h,k)};Ec=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};Fc=function(h,k){return e.get(h).xLock(h,k)};Lc=function(h,k){return e.get(h).xUnlock(h,k)};zc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};Dc=function(h,k,n){const l=e.get(h);
n=new DataView(v.buffer,n);return l.xFileControl(h,k,n)};Ic=function(h){return e.get(h).xSectorSize(h)};Cc=function(h){return e.get(h).xDeviceCharacteristics(h)};Gc=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var p of f)e.delete(p)}p=null;if(l&64){p=1;const q=[];for(;p;){const t=v[k++];if(t)q.push(t);else switch(v[k]||(p=null),p){case 1:q.push(63);p=2;break;case 2:q.push(61);p=3;break;case 3:q.push(38),p=2}}p=(new TextDecoder).decode(new Uint8Array(q))}else k&&(p=k?I(v,k):"");
m=a("Int32",m);return h.xOpen(p,n,l,m)};Bc=function(h,k,n){return c.get(h).xDelete(k?I(v,k):"",n)};yc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?I(v,k):"",n,l)}})();
var pd={a:(a,b,c,e)=>{B(`Assertion failed: ${a?I(v,a):""}, at: `+[b?b?I(v,b):"":"unknown filename",c,e?e?I(v,e):"":"unknown function"])},R:function(a,b){try{return a=a?I(v,a):"",Ib(a,b),0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Qf}},U:function(a,b,c){try{b=b?I(v,b):"";b=Mb(a,b);if(c&-8)return-28;var e=Q(b,{$f:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&vb(e,a)?-2:0}catch(f){if("undefined"==typeof U||"ErrnoError"!==f.name)throw f;
return-f.Qf}},S:function(a,b){try{var c=R(a);Ib(c.node,b);return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Qf}},Q:function(a){try{var b=R(a).node;var c="string"==typeof b?Q(b,{$f:!0}).node:b;if(!c.Nf.Sf)throw new K(63);c.Nf.Sf(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Qf}},b:function(a,b,c){Ob=c;try{var e=R(a);switch(b){case 0:var f=Pb();if(0>f)break;for(;kb[f];)f++;return Ab(e,f).Yf;case 1:case 2:return 0;
case 3:return e.flags;case 4:return f=Pb(),e.flags|=f,0;case 12:return f=Pb(),w[f+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Qf}},P:function(a,b){try{var c=R(a);return Nb(Gb,c.path,b)}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Qf}},m:function(a,b,c){b=Qb(b,c);try{if(isNaN(b))return 61;var e=R(a);if(0===(e.flags&2097155))throw new K(28);Jb(e.node,b);return 0}catch(f){if("undefined"==typeof U||
"ErrnoError"!==f.name)throw f;return-f.Qf}},J:function(a,b){try{if(0===b)return-28;var c=Ua("/")+1;if(b<c)return-68;J("/",v,a,b);return c}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Qf}},N:function(a,b){try{return a=a?I(v,a):"",Nb(Hb,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Qf}},F:function(a,b,c){try{return b=b?I(v,b):"",b=Mb(a,b),b=Na(b),"/"===b[b.length-1]&&(b=b.substr(0,b.length-1)),S(b,c),0}catch(e){if("undefined"==typeof U||
"ErrnoError"!==e.name)throw e;return-e.Qf}},M:function(a,b,c,e){try{b=b?I(v,b):"";var f=e&256;b=Mb(a,b,e&4096);return Nb(f?Hb:Gb,b,c)}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Qf}},D:function(a,b,c,e){Ob=e;try{b=b?I(v,b):"";b=Mb(a,b);var f=e?Pb():0;return Kb(b,c,f).Yf}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Qf}},B:function(a,b,c,e){try{b=b?I(v,b):"";b=Mb(a,b);if(0>=e)return-28;var f=rb(b),h=Math.min(e,Ua(f)),k=u[c+h];J(f,v,c,e+1);u[c+
h]=k;return h}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Qf}},z:function(a){try{return a=a?I(v,a):"",Fb(a),0}catch(b){if("undefined"==typeof U||"ErrnoError"!==b.name)throw b;return-b.Qf}},O:function(a,b){try{return a=a?I(v,a):"",Nb(Gb,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Qf}},x:function(a,b,c){try{b=b?I(v,b):"";b=Mb(a,b);if(0===c){a=b;var e=Q(a,{parent:!0}).node;if(!e)throw new K(44);var f=Pa(a),h=fb(e,f),k=yb(e,f,!1);if(k)throw new K(k);
if(!e.Nf.pg)throw new K(63);if(h.bg)throw new K(10);e.Nf.pg(e,f);ub(h)}else 512===c?Fb(b):B("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Qf}},w:function(a,b,c){try{b=b?I(v,b):"";b=Mb(a,b,!0);var e=Date.now();if(c){var f=z[c>>2]+4294967296*x[c+4>>2],h=x[c+8>>2];var k=1073741823==h?e:1073741822==h?-1:1E3*f+h/1E6;c+=16;f=z[c>>2]+4294967296*x[c+4>>2];h=x[c+8>>2];var n=1073741823==h?e:1073741822==h?-1:1E3*f+h/1E6}else n=k=e;if(-1!=
n||-1!=k){a=k;var l=Q(b,{$f:!0}).node;l.Nf.Sf(l,{timestamp:Math.max(a,n)})}return 0}catch(m){if("undefined"==typeof U||"ErrnoError"!==m.name)throw m;return-m.Qf}},V:()=>{B("")},s:()=>{Ka=!1;Rb=0},k:function(a,b,c){a=new Date(1E3*Qb(a,b));x[c>>2]=a.getSeconds();x[c+4>>2]=a.getMinutes();x[c+8>>2]=a.getHours();x[c+12>>2]=a.getDate();x[c+16>>2]=a.getMonth();x[c+20>>2]=a.getFullYear()-1900;x[c+24>>2]=a.getDay();b=a.getFullYear();x[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Tb:Sb)[a.getMonth()]+a.getDate()-
1|0;x[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();x[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},i:function(a,b,c,e,f,h,k,n){f=Qb(f,h);try{if(isNaN(f))return 61;var l=R(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new K(2);if(1===(l.flags&2097155))throw new K(2);if(!l.Of.lg)throw new K(43);if(!a)throw new K(28);var m=l.Of.lg(l,a,f,b,c);var p=m.Pg;x[k>>2]=m.Dg;z[n>>2]=p;return 0}catch(q){if("undefined"==
typeof U||"ErrnoError"!==q.name)throw q;return-q.Qf}},j:function(a,b,c,e,f,h,k){h=Qb(h,k);try{var n=R(f);if(c&2){if(32768!==(n.node.mode&61440))throw new K(43);e&2||n.Of.mg&&n.Of.mg(n,v.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof U||"ErrnoError"!==l.name)throw l;return-l.Qf}},t:(a,b)=>{Ub[a]&&(clearTimeout(Ub[a].id),delete Ub[a]);if(!b)return 0;var c=setTimeout(()=>{delete Ub[a];Xb(()=>od(a,performance.now()))},b);Ub[a]={id:c,dh:b};return 0},E:(a,b,c,e)=>{var f=(new Date).getFullYear(),h=
(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();z[a>>2]=60*Math.max(h,f);x[b>>2]=Number(h!=f);b=k=>{var n=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`};a=b(h);b=b(f);f<h?(J(a,v,c,17),J(b,v,e,17)):(J(a,v,e,17),J(b,v,c,17))},e:()=>Date.now(),d:()=>performance.now(),u:a=>{var b=v.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);a:{e=(Math.min(2147483648,
65536*Math.ceil(Math.max(a,e)/65536))-na.buffer.byteLength+65535)/65536|0;try{na.grow(e);ta();var f=1;break a}catch(h){}f=void 0}if(f)return!0}return!1},G:(a,b)=>{var c=0;$b().forEach((e,f)=>{var h=b+c;f=z[a+4*f>>2]=h;for(h=0;h<e.length;++h)u[f++]=e.charCodeAt(h);u[f]=0;c+=e.length+1});return 0},H:(a,b)=>{var c=$b();z[a>>2]=c.length;var e=0;c.forEach(f=>e+=f.length+1);z[b>>2]=e;return 0},f:function(a){try{var b=R(a);if(null===b.Yf)throw new K(8);b.qg&&(b.qg=null);try{b.Of.close&&b.Of.close(b)}catch(c){throw c;
}finally{kb[b.Yf]=null}b.Yf=null;return 0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Qf}},v:function(a,b){try{var c=R(a);u[b]=c.Uf?2:O(c.mode)?3:40960===(c.mode&61440)?7:4;w[b+2>>1]=0;D=[0,(C=0,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[b+8>>2]=D[0];x[b+12>>2]=D[1];D=[0,(C=0,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[b+16>>2]=D[0];x[b+20>>2]=D[1];return 0}catch(e){if("undefined"==
typeof U||"ErrnoError"!==e.name)throw e;return e.Qf}},C:function(a,b,c,e){try{a:{var f=R(a);a=b;for(var h,k=b=0;k<c;k++){var n=z[a>>2],l=z[a+4>>2];a+=8;var m=f,p=h,q=u;if(0>l||0>p)throw new K(28);if(null===m.Yf)throw new K(8);if(1===(m.flags&2097155))throw new K(8);if(O(m.node.mode))throw new K(31);if(!m.Of.read)throw new K(28);var t="undefined"!=typeof p;if(!t)p=m.position;else if(!m.seekable)throw new K(70);var y=m.Of.read(m,q,n,l,p);t||(m.position+=y);var A=y;if(0>A){var G=-1;break a}b+=A;if(A<
l)break;"undefined"!=typeof h&&(h+=A)}G=b}z[e>>2]=G;return 0}catch(E){if("undefined"==typeof U||"ErrnoError"!==E.name)throw E;return E.Qf}},l:function(a,b,c,e,f){b=Qb(b,c);try{if(isNaN(b))return 61;var h=R(a);Lb(h,b,e);D=[h.position>>>0,(C=h.position,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];x[f>>2]=D[0];x[f+4>>2]=D[1];h.qg&&0===b&&0===e&&(h.qg=null);return 0}catch(k){if("undefined"==typeof U||"ErrnoError"!==k.name)throw k;return k.Qf}},K:function(a){try{var b=
R(a);return $c(c=>{var e=b.node.Wf;e.type.Qg?e.type.Qg(e,!1,f=>{f?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Qf}},y:function(a,b,c,e){try{a:{var f=R(a);a=b;for(var h,k=b=0;k<c;k++){var n=z[a>>2],l=z[a+4>>2];a+=8;var m=f,p=n,q=l,t=h,y=u;if(0>q||0>t)throw new K(28);if(null===m.Yf)throw new K(8);if(0===(m.flags&2097155))throw new K(8);if(O(m.node.mode))throw new K(31);if(!m.Of.write)throw new K(28);m.seekable&&m.flags&1024&&Lb(m,0,2);var A="undefined"!=
typeof t;if(!A)t=m.position;else if(!m.seekable)throw new K(70);var G=m.Of.write(m,y,p,q,t,void 0);A||(m.position+=G);var E=G;if(0>E){var N=-1;break a}b+=E;if(E<l)break;"undefined"!=typeof h&&(h+=E)}N=b}z[e>>2]=N;return 0}catch(L){if("undefined"==typeof U||"ErrnoError"!==L.name)throw L;return L.Qf}},wa:ac,T:bc,la:cc,ha:dc,ba:ec,qa:fc,L:gc,h:hc,ta:ic,oa:jc,ja:kc,ka:lc,p:mc,A:nc,ua:oc,g:pc,va:qc,ia:rc,ma:sc,na:tc,sa:uc,c:vc,pa:wc,ra:xc,r:Wb,I:function(a,b){try{return Ra(v.subarray(a,a+b)),0}catch(c){if("undefined"==
typeof U||"ErrnoError"!==c.name)throw c;return c.Qf}},fa:yc,_:zc,ea:Ac,ga:Bc,X:Cc,Z:Dc,ca:Ec,aa:Fc,W:Gc,q:Hc,Y:Ic,da:Jc,n:Kc,$:Lc,o:Mc},V=function(){function a(c){V=c.exports;V=Oc();na=V.xa;ta();gd=V.Cf;va.unshift(V.ya);za--;d.monitorRunDependencies?.(za);0==za&&(null!==Aa&&(clearInterval(Aa),Aa=null),Ba&&(c=Ba,Ba=null,c()));return V}var b={a:pd};za++;d.monitorRunDependencies?.(za);if(d.instantiateWasm)try{return d.instantiateWasm(b,a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),
ba(c)}Da??=d.locateFile?Ca("wa-sqlite-async.wasm")?"wa-sqlite-async.wasm":d.locateFile?d.locateFile("wa-sqlite-async.wasm",g):g+"wa-sqlite-async.wasm":(new URL("wa-sqlite-async.wasm",import.meta.url)).href;Ha(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=V.za)(a,b,c,e);d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=V.Aa)(a,b,c,e);d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=V.Ba)(a,b,c,e,f);
d._sqlite3_msize=a=>(d._sqlite3_msize=V.Ca)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=V.Da)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=V.Ea)(a,b);d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=V.Fa)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=V.Ga)(a);d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=V.Ha)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=V.Ia)();
d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=V.Ja)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=V.Ka)(a);d._sqlite3_malloc=a=>(d._sqlite3_malloc=V.La)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=V.Ma)(a,b);d._sqlite3_free=a=>(d._sqlite3_free=V.Na)(a);d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=V.Oa)(a,b);d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=V.Pa)(a,b,c);d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=V.Qa)(a,b,c);
d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=V.Ra)(a,b,c);d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=V.Sa)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=V.Ta)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=V.Ua)(a,b,c);d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=V.Va)(a);d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=V.Wa)(a);d._sqlite3_str_length=a=>(d._sqlite3_str_length=V.Xa)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=V.Ya)(a);
d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=V.Za)(a);d._sqlite3_str_new=a=>(d._sqlite3_str_new=V._a)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=V.$a)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=V.ab)(a,b);d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=V.bb)(a,b,c,e);d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=V.cb)(a,b,c,e);d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=V.db)(a,b,c);d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=V.eb)(a,b);
d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=V.fb)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=V.gb)(a,b,c);d._sqlite3_os_init=()=>(d._sqlite3_os_init=V.hb)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=V.ib)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=V.jb)(a,b,c,e);d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=V.kb)(a,b,c,e,f);d._sqlite3_step=a=>(d._sqlite3_step=V.lb)(a);d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=V.mb)(a,b);
d._sqlite3_reset=a=>(d._sqlite3_reset=V.nb)(a);d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=V.ob)(a,b,c,e,f);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=V.pb)(a,b);d._sqlite3_finalize=a=>(d._sqlite3_finalize=V.qb)(a);d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=V.rb)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=V.sb)(a);d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=V.tb)(a,b,c,e);
d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=V.ub)(a,b);d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=V.vb)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=V.wb)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=V.xb)(a);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=V.yb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=V.zb)(a);d._sqlite3_value_text=a=>(d._sqlite3_value_text=V.Ab)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=V.Bb)(a);
d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=V.Cb)(a);d._sqlite3_value_double=a=>(d._sqlite3_value_double=V.Db)(a);d._sqlite3_value_int=a=>(d._sqlite3_value_int=V.Eb)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=V.Fb)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=V.Gb)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=V.Hb)(a,b);d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=V.Ib)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=V.Jb)(a);
d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=V.Kb)(a);d._sqlite3_value_type=a=>(d._sqlite3_value_type=V.Lb)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=V.Mb)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=V.Nb)(a);d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=V.Ob)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=V.Pb)(a);d._sqlite3_value_free=a=>(d._sqlite3_value_free=V.Qb)(a);d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=V.Rb)(a,b,c,e);
d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=V.Sb)(a,b,c,e,f);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=V.Tb)(a,b);d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=V.Ub)(a,b,c);d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=V.Vb)(a,b,c);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=V.Wb)(a,b);d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=V.Xb)(a,b,c);d._sqlite3_result_null=a=>(d._sqlite3_result_null=V.Yb)(a);
d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=V.Zb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=V._b)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=V.$b)(a,b,c,e);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=V.ac)(a,b,c,e,f,h);d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=V.bc)(a,b,c,e);d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=V.cc)(a,b,c,e);
d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=V.dc)(a,b,c,e);d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=V.ec)(a,b);d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=V.fc)(a);d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=V.gc)(a,b);d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=V.hc)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=V.ic)(a,b);
d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=V.jc)(a);d._sqlite3_user_data=a=>(d._sqlite3_user_data=V.kc)(a);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=V.lc)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=V.mc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=V.nc)(a,b);d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=V.oc)(a,b);d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=V.pc)(a,b);
d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=V.qc)(a,b);d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=V.rc)(a,b,c,e);d._sqlite3_column_count=a=>(d._sqlite3_column_count=V.sc)(a);d._sqlite3_data_count=a=>(d._sqlite3_data_count=V.tc)(a);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=V.uc)(a,b);d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=V.vc)(a,b);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=V.wc)(a,b);
d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=V.xc)(a,b);d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=V.yc)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=V.zc)(a,b);d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=V.Ac)(a,b);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=V.Bc)(a,b);d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=V.Cc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=V.Dc)(a,b);
d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=V.Ec)(a,b,c,e,f);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=V.Fc)(a,b,c,e,f,h);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=V.Gc)(a,b,c);d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=V.Hc)(a,b,c);d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=V.Ic)(a,b,c,e);d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=V.Jc)(a,b);d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=V.Kc)(a,b,c,e,f);
d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=V.Lc)(a,b,c,e,f);d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=V.Mc)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=V.Nc)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=V.Oc)(a,b,c);d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=V.Pc)(a,b,c);d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=V.Qc)(a,b,c,e);
d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=V.Rc)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=V.Sc)(a,b);d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=V.Tc)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=V.Uc)(a);d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=V.Vc)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=V.Wc)(a);d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=V.Xc)(a,b);
d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=V.Yc)(a);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=V.Zc)(a,b);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=V._c)(a,b,c);d._sqlite3_sql=a=>(d._sqlite3_sql=V.$c)(a);d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=V.ad)(a);d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=V.bd)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=V.cd)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=V.dd)(a);
d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=V.ed)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=V.fd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=V.gd)(a);d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=V.hd)(a,b,c);d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=V.id)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=V.jd)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=V.kd)(a,b,c);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=V.ld)(a);
d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=V.md)(a);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=V.nd)(a);d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=V.od)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=V.pd)(a,b,c,e,f);d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=V.qd)(a,b,c,e,f,h);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=V.rd)(a,b,c,e,f);
d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=V.sd)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=V.td)(a,b,c,e,f,h);d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=V.ud)(a,b,c,e,f,h);d._sqlite3_free_table=a=>(d._sqlite3_free_table=V.vd)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=V.wd)(a,b,c,e);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=V.xd)(a,b,c,e,f);
d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=V.yd)(a,b);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=V.zd)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=V.Ad)(a);d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=V.Bd)(a,b,c);d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=V.Cd)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=V.Dd)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=V.Ed)(a,b,c);
d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=V.Fd)(a);d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=V.Gd)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=V.Hd)();d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=V.Id)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=V.Jd)(a);d._sqlite3_complete16=a=>(d._sqlite3_complete16=V.Kd)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=V.Ld)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=V.Md)();
d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=V.Nd)();d._sqlite3_initialize=()=>(d._sqlite3_initialize=V.Od)();d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=V.Pd)();d._sqlite3_config=(a,b)=>(d._sqlite3_config=V.Qd)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=V.Rd)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=V.Sd)(a);d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=V.Td)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=V.Ud)(a,b,c);
d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=V.Vd)(a);d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=V.Wd)(a,b,c);d._sqlite3_changes64=a=>(d._sqlite3_changes64=V.Xd)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=V.Yd)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=V.Zd)(a);d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=V._d)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=V.$d)(a,b);d._sqlite3_close=a=>(d._sqlite3_close=V.ae)(a);
d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=V.be)(a);d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=V.ce)(a,b,c);d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=V.de)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=V.ee)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=V.fe)(a);d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=V.ge)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=V.he)(a,b,c,e,f,h,k,n);
d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=V.ie)(a,b,c,e,f,h,k,n,l);d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=V.je)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=V.ke)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=V.le)(a,b,c);d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=V.me)(a,b,c,e);
d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=V.ne)(a,b,c);d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=V.oe)(a,b,c);d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=V.pe)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=V.qe)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=V.re)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=V.se)(a,b,c);
d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=V.te)(a,b,c,e,f);d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=V.ue)(a,b);d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=V.ve)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=V.we)(a);d._sqlite3_errcode=a=>(d._sqlite3_errcode=V.xe)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=V.ye)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=V.ze)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=V.Ae)(a);
d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=V.Be)(a,b,c);d._sqlite3_open=(a,b)=>(d._sqlite3_open=V.Ce)(a,b);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=V.De)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=V.Ee)(a,b);d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=V.Fe)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=V.Ge)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=V.He)(a,b,c,e,f);
d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=V.Ie)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=V.Je)(a,b,c);d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=V.Ke)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=V.Le)(a,b,c,e);d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=V.Me)(a);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=V.Ne)(a,b,c,e,f,h,k,n,l);
d._sqlite3_sleep=a=>(d._sqlite3_sleep=V.Oe)(a);d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=V.Pe)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=V.Qe)(a,b,c,e);d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=V.Re)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=V.Se)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=V.Te)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=V.Ue)(a,b);
d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=V.Ve)(a,b);d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=V.We)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=V.Xe)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=V.Ye)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=V.Ze)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=V._e)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=V.$e)(a,b);
d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=V.af)(a,b);d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=V.bf)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=V.cf)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=V.df)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=V.ef)();d._sqlite3mc_config=(a,b,c)=>(d._sqlite3mc_config=V.ff)(a,b,c);d._sqlite3mc_cipher_count=()=>(d._sqlite3mc_cipher_count=V.gf)();
d._sqlite3mc_cipher_index=a=>(d._sqlite3mc_cipher_index=V.hf)(a);d._sqlite3mc_cipher_name=a=>(d._sqlite3mc_cipher_name=V.jf)(a);d._sqlite3mc_config_cipher=(a,b,c,e)=>(d._sqlite3mc_config_cipher=V.kf)(a,b,c,e);d._sqlite3mc_codec_data=(a,b,c)=>(d._sqlite3mc_codec_data=V.lf)(a,b,c);d._sqlite3_key=(a,b,c)=>(d._sqlite3_key=V.mf)(a,b,c);d._sqlite3_key_v2=(a,b,c,e)=>(d._sqlite3_key_v2=V.nf)(a,b,c,e);d._sqlite3_rekey_v2=(a,b,c,e)=>(d._sqlite3_rekey_v2=V.of)(a,b,c,e);
d._sqlite3_rekey=(a,b,c)=>(d._sqlite3_rekey=V.pf)(a,b,c);d._sqlite3mc_register_cipher=(a,b,c)=>(d._sqlite3mc_register_cipher=V.qf)(a,b,c);var Zc=d._malloc=a=>(Zc=d._malloc=V.rf)(a),dd=d._free=a=>(dd=d._free=V.sf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=V.tf)(a);d._sqlite3Fts5BetterTrigramInit=a=>(d._sqlite3Fts5BetterTrigramInit=V.uf)(a);d._set_authorizer=a=>(d._set_authorizer=V.vf)(a);d._create_function=(a,b,c,e,f,h)=>(d._create_function=V.wf)(a,b,c,e,f,h);
d._create_module=(a,b,c,e)=>(d._create_module=V.xf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=V.yf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=V.zf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=V.Af)();var qd=d._main=(a,b)=>(qd=d._main=V.Bf)(a,b),gb=(a,b)=>(gb=V.Df)(a,b),od=(a,b)=>(od=V.Ef)(a,b),rd=()=>(rd=V.Ff)(),kd=a=>(kd=V.Gf)(a),ld=a=>(ld=V.Hf)(a),md=()=>(md=V.If)(),bd=a=>(bd=V.Jf)(a),Qc=()=>(Qc=V.Kf)(),ad=a=>(ad=V.Lf)(a),cd=()=>(cd=V.Mf)();d._sqlite3_version=5472;
d.getTempRet0=()=>rd();d.ccall=Z;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Z(a,b,c,h,e)};
d.addFunction=(a,b)=>{if(!hd){hd=new WeakMap;var c=gd.length;if(hd)for(var e=0;e<0+c;e++){var f=gd.get(e);f&&hd.set(f,e)}}if(c=hd.get(a)||0)return c;if(jd.length)c=jd.pop();else{try{gd.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=gd.length-1}try{gd.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h=
{parameters:[],results:"v"==b[0]?[]:[f[b[0]]]},k=1;k<b.length;++k)h.parameters.push(f[b[k]]);b=new e(h,a)}else{e=[1];f=b.slice(0,1);b=b.slice(1);h={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96);k=b.length;128>k?e.push(k):e.push(k%128|128,k>>7);for(k=0;k<b.length;++k)e.push(h[b[k]]);"v"==f?e.push(0):e.push(1,h[f]);b=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?b.push(f):b.push(f%128|128,f>>7);b.push(...e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b,
{e:{f:a}})).exports.f}gd.set(c,b)}hd.set(a,c);return c};d.setValue=H;d.getValue=F;d.UTF8ToString=(a,b)=>a?I(v,a,b):"";d.stringToUTF8=(a,b,c)=>J(a,v,b,c);d.lengthBytesUTF8=Ua;d.intArrayFromString=Va;d.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];255<e&&(e&=255);b.push(String.fromCharCode(e))}return b.join("")};d.AsciiToString=a=>{for(var b="";;){var c=v[a++];if(!c)return b;b+=String.fromCharCode(c)}};
d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&qa[c];)++c;c<<=1;if(32<c-a&&nd)return nd.decode(v.subarray(a,c));c="";for(e=0;!(e>=b/2);++e){var f=w[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)w[b>>1]=a.charCodeAt(f),b+=2;w[b>>1]=0;return b-e};
d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=x[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f<a.length;++f){var h=a.charCodeAt(f);if(55296<=h&&57343>=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}x[b>>2]=h;b+=4;if(b+4>c)break}x[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{u.set(a,b)};var sd;
Ba=function td(){sd||ud();sd||(Ba=td)};
function ud(){function a(){if(!sd&&(sd=!0,d.calledRun=!0,!oa)){if(!d.noFSInit&&!mb){var b,c;mb=!0;e??=d.stdin;b??=d.stdout;c??=d.stderr;e?T("stdin",e):Eb("/dev/tty","/dev/stdin");b?T("stdout",null,b):Eb("/dev/tty","/dev/stdout");c?T("stderr",null,c):Eb("/dev/tty1","/dev/stderr");Kb("/dev/stdin",0);Kb("/dev/stdout",1);Kb("/dev/stderr",1)}nb=!1;Ja(va);Ja(wa);aa(d);d.onRuntimeInitialized?.();if(vd){var e=qd;try{var f=e(0,0);pa=f;Wb(f)}catch(h){Vb(h)}}if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=
[d.postRun]);d.postRun.length;)f=d.postRun.shift(),xa.unshift(f);Ja(xa)}}if(!(0<za)){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)ya();Ja(ua);0<za||(d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1);a()},1)):a())}}if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.pop()();var vd=!0;d.noInitialRun&&(vd=!1);ud();moduleRtn=ca;
function(config) {
var Module = config || {};
return moduleRtn;
var a;a||(a=typeof Module !== 'undefined' ? Module : {});var aa,ba;a.ready=new Promise(function(b,c){aa=b;ba=c});var ca=Object.assign({},a),da="./this.program",ea=(b,c)=>{throw c;},fa="object"==typeof window,ha="function"==typeof importScripts,m="",ia;
if(fa||ha)ha?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),_scriptDir&&(m=_scriptDir),0!==m.indexOf("blob:")?m=m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):m="",ha&&(ia=b=>{var c=new XMLHttpRequest;c.open("GET",b,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});var ka=a.print||console.log.bind(console),t=a.printErr||console.warn.bind(console);Object.assign(a,ca);ca=null;a.thisProgram&&(da=a.thisProgram);
a.quit&&(ea=a.quit);var la;a.wasmBinary&&(la=a.wasmBinary);var noExitRuntime=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,v=!1,na="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
function oa(b,c,d){var e=c+d;for(d=c;b[d]&&!(d>=e);)++d;if(16<d-c&&b.buffer&&na)return na.decode(b.subarray(c,d));for(e="";c<d;){var f=b[c++];if(f&128){var g=b[c++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|g);else{var h=b[c++]&63;f=224==(f&240)?(f&15)<<12|g<<6|h:(f&7)<<18|g<<12|h<<6|b[c++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e}function x(b,c){return b?oa(y,b,c):""}
function pa(b,c,d,e){if(!(0<e))return 0;var f=d;e=d+e-1;for(var g=0;g<b.length;++g){var h=b.charCodeAt(g);if(55296<=h&&57343>=h){var n=b.charCodeAt(++g);h=65536+((h&1023)<<10)|n&1023}if(127>=h){if(d>=e)break;c[d++]=h}else{if(2047>=h){if(d+1>=e)break;c[d++]=192|h>>6}else{if(65535>=h){if(d+2>=e)break;c[d++]=224|h>>12}else{if(d+3>=e)break;c[d++]=240|h>>18;c[d++]=128|h>>12&63}c[d++]=128|h>>6&63}c[d++]=128|h&63}}c[d]=0;return d-f}function qa(b,c,d){return pa(b,y,c,d)}
function ra(b){for(var c=0,d=0;d<b.length;++d){var e=b.charCodeAt(d);127>=e?c++:2047>=e?c+=2:55296<=e&&57343>=e?(c+=4,++d):c+=3}return c}var A,y,B,sa,C,E,ta,ua;function va(){var b=ma.buffer;a.HEAP8=A=new Int8Array(b);a.HEAP16=B=new Int16Array(b);a.HEAP32=C=new Int32Array(b);a.HEAPU8=y=new Uint8Array(b);a.HEAPU16=sa=new Uint16Array(b);a.HEAPU32=E=new Uint32Array(b);a.HEAPF32=ta=new Float32Array(b);a.HEAPF64=ua=new Float64Array(b)}var wa,xa=[],ya=[],za=[],Aa=[];
function Ba(){var b=a.preRun.shift();xa.unshift(b)}var Ca=0,Da=null,Ea=null;function u(b){if(a.onAbort)a.onAbort(b);b="Aborted("+b+")";t(b);v=!0;b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info.");ba(b);throw b;}function Fa(){return F.startsWith("data:application/octet-stream;base64,")}var F;if(a.locateFile){if(F="wa-sqlite-async.wasm",!Fa()){var Ga=F;F=a.locateFile?a.locateFile(Ga,m):m+Ga}}else F=(new URL("wa-sqlite-async.wasm",import.meta.url)).href;
function Ha(){var b=F;try{if(b==F&&la)return new Uint8Array(la);if(ia)return ia(b);throw"both async and sync fetching of the wasm failed";}catch(c){u(c)}}function Ia(){return la||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(function(){return Ha()}):fetch(F,{credentials:"same-origin"}).then(function(b){if(!b.ok)throw"failed to load wasm binary file at '"+F+"'";return b.arrayBuffer()}).catch(function(){return Ha()})}var I,K;
function Ja(b){this.name="ExitStatus";this.message="Program terminated with exit("+b+")";this.status=b}function Ka(b){for(;0<b.length;)b.shift()(a)}function L(b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":return A[b>>0];case "i8":return A[b>>0];case "i16":return B[b>>1];case "i32":return C[b>>2];case "i64":return C[b>>2];case "float":return ta[b>>2];case "double":return ua[b>>3];case "*":return E[b>>2];default:u("invalid type for getValue: "+c)}return null}
function M(b,c,d="i8"){d.endsWith("*")&&(d="*");switch(d){case "i1":A[b>>0]=c;break;case "i8":A[b>>0]=c;break;case "i16":B[b>>1]=c;break;case "i32":C[b>>2]=c;break;case "i64":K=[c>>>0,(I=c,1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[b>>2]=K[0];C[b+4>>2]=K[1];break;case "float":ta[b>>2]=c;break;case "double":ua[b>>3]=c;break;case "*":E[b>>2]=c;break;default:u("invalid type for setValue: "+d)}}
var La=(b,c)=>{for(var d=0,e=b.length-1;0<=e;e--){var f=b[e];"."===f?b.splice(e,1):".."===f?(b.splice(e,1),d++):d&&(b.splice(e,1),d--)}if(c)for(;d;d--)b.unshift("..");return b},N=b=>{var c="/"===b.charAt(0),d="/"===b.substr(-1);(b=La(b.split("/").filter(e=>!!e),!c).join("/"))||c||(b=".");b&&d&&(b+="/");return(c?"/":"")+b},Ma=b=>{var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(b).slice(1);b=c[0];c=c[1];if(!b&&!c)return".";c&&(c=c.substr(0,c.length-1));return b+c},Na=b=>{if("/"===
b)return"/";b=N(b);b=b.replace(/\/$/,"");var c=b.lastIndexOf("/");return-1===c?b:b.substr(c+1)};function Oa(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var b=new Uint8Array(1);return()=>{crypto.getRandomValues(b);return b[0]}}return()=>u("randomDevice")}
function Pa(){for(var b="",c=!1,d=arguments.length-1;-1<=d&&!c;d--){c=0<=d?arguments[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=La(b.split("/").filter(e=>!!e),!c).join("/");return(c?"/":"")+b||"."}function Qa(b,c,d){d=Array(0<d?d:ra(b)+1);b=pa(b,d,0,d.length);c&&(d.length=b);return d}var Ra=[];function Sa(b,c){Ra[b]={input:[],Sf:[],cg:c};Ta(b,Ua)}
var Ua={open:function(b){var c=Ra[b.node.fg];if(!c)throw new O(43);b.Tf=c;b.seekable=!1},close:function(b){b.Tf.cg.ig(b.Tf)},ig:function(b){b.Tf.cg.ig(b.Tf)},read:function(b,c,d,e){if(!b.Tf||!b.Tf.cg.zg)throw new O(60);for(var f=0,g=0;g<e;g++){try{var h=b.Tf.cg.zg(b.Tf)}catch(n){throw new O(29);}if(void 0===h&&0===f)throw new O(6);if(null===h||void 0===h)break;f++;c[d+g]=h}f&&(b.node.timestamp=Date.now());return f},write:function(b,c,d,e){if(!b.Tf||!b.Tf.cg.sg)throw new O(60);try{for(var f=0;f<e;f++)b.Tf.cg.sg(b.Tf,
c[d+f])}catch(g){throw new O(29);}e&&(b.node.timestamp=Date.now());return f}},Va={zg:function(b){if(!b.input.length){var c=null;"undefined"!=typeof window&&"function"==typeof window.prompt?(c=window.prompt("Input: "),null!==c&&(c+="\n")):"function"==typeof readline&&(c=readline(),null!==c&&(c+="\n"));if(!c)return null;b.input=Qa(c,!0)}return b.input.shift()},sg:function(b,c){null===c||10===c?(ka(oa(b.Sf,0)),b.Sf=[]):0!=c&&b.Sf.push(c)},ig:function(b){b.Sf&&0<b.Sf.length&&(ka(oa(b.Sf,0)),b.Sf=[])}},
Wa={sg:function(b,c){null===c||10===c?(t(oa(b.Sf,0)),b.Sf=[]):0!=c&&b.Sf.push(c)},ig:function(b){b.Sf&&0<b.Sf.length&&(t(oa(b.Sf,0)),b.Sf=[])}},P={Wf:null,Vf:function(){return P.createNode(null,"/",16895,0)},createNode:function(b,c,d,e){if(24576===(d&61440)||4096===(d&61440))throw new O(63);P.Wf||(P.Wf={dir:{node:{Uf:P.Mf.Uf,Rf:P.Mf.Rf,dg:P.Mf.dg,jg:P.Mf.jg,Dg:P.Mf.Dg,og:P.Mf.og,mg:P.Mf.mg,Cg:P.Mf.Cg,ng:P.Mf.ng},stream:{$f:P.Nf.$f}},file:{node:{Uf:P.Mf.Uf,Rf:P.Mf.Rf},stream:{$f:P.Nf.$f,read:P.Nf.read,
write:P.Nf.write,vg:P.Nf.vg,kg:P.Nf.kg,lg:P.Nf.lg}},link:{node:{Uf:P.Mf.Uf,Rf:P.Mf.Rf,gg:P.Mf.gg},stream:{}},wg:{node:{Uf:P.Mf.Uf,Rf:P.Mf.Rf},stream:Xa}});d=Ya(b,c,d,e);16384===(d.mode&61440)?(d.Mf=P.Wf.dir.node,d.Nf=P.Wf.dir.stream,d.Of={}):32768===(d.mode&61440)?(d.Mf=P.Wf.file.node,d.Nf=P.Wf.file.stream,d.Qf=0,d.Of=null):40960===(d.mode&61440)?(d.Mf=P.Wf.link.node,d.Nf=P.Wf.link.stream):8192===(d.mode&61440)&&(d.Mf=P.Wf.wg.node,d.Nf=P.Wf.wg.stream);d.timestamp=Date.now();b&&(b.Of[c]=d,b.timestamp=
d.timestamp);return d},Vg:function(b){return b.Of?b.Of.subarray?b.Of.subarray(0,b.Qf):new Uint8Array(b.Of):new Uint8Array(0)},xg:function(b,c){var d=b.Of?b.Of.length:0;d>=c||(c=Math.max(c,d*(1048576>d?2:1.125)>>>0),0!=d&&(c=Math.max(c,256)),d=b.Of,b.Of=new Uint8Array(c),0<b.Qf&&b.Of.set(d.subarray(0,b.Qf),0))},Rg:function(b,c){if(b.Qf!=c)if(0==c)b.Of=null,b.Qf=0;else{var d=b.Of;b.Of=new Uint8Array(c);d&&b.Of.set(d.subarray(0,Math.min(c,b.Qf)));b.Qf=c}},Mf:{Uf:function(b){var c={};c.Jg=8192===(b.mode&
61440)?b.id:1;c.qg=b.id;c.mode=b.mode;c.Pg=1;c.uid=0;c.Mg=0;c.fg=b.fg;16384===(b.mode&61440)?c.size=4096:32768===(b.mode&61440)?c.size=b.Qf:40960===(b.mode&61440)?c.size=b.link.length:c.size=0;c.Fg=new Date(b.timestamp);c.Og=new Date(b.timestamp);c.Ig=new Date(b.timestamp);c.Gg=4096;c.Hg=Math.ceil(c.size/c.Gg);return c},Rf:function(b,c){void 0!==c.mode&&(b.mode=c.mode);void 0!==c.timestamp&&(b.timestamp=c.timestamp);void 0!==c.size&&P.Rg(b,c.size)},dg:function(){throw Za[44];},jg:function(b,c,d,e){return P.createNode(b,
c,d,e)},Dg:function(b,c,d){if(16384===(b.mode&61440)){try{var e=$a(c,d)}catch(g){}if(e)for(var f in e.Of)throw new O(55);}delete b.parent.Of[b.name];b.parent.timestamp=Date.now();b.name=d;c.Of[d]=b;c.timestamp=b.parent.timestamp;b.parent=c},og:function(b,c){delete b.Of[c];b.timestamp=Date.now()},mg:function(b,c){var d=$a(b,c),e;for(e in d.Of)throw new O(55);delete b.Of[c];b.timestamp=Date.now()},Cg:function(b){var c=[".",".."],d;for(d in b.Of)b.Of.hasOwnProperty(d)&&c.push(d);return c},ng:function(b,
c,d){b=P.createNode(b,c,41471,0);b.link=d;return b},gg:function(b){if(40960!==(b.mode&61440))throw new O(28);return b.link}},Nf:{read:function(b,c,d,e,f){var g=b.node.Of;if(f>=b.node.Qf)return 0;b=Math.min(b.node.Qf-f,e);if(8<b&&g.subarray)c.set(g.subarray(f,f+b),d);else for(e=0;e<b;e++)c[d+e]=g[f+e];return b},write:function(b,c,d,e,f,g){c.buffer===A.buffer&&(g=!1);if(!e)return 0;b=b.node;b.timestamp=Date.now();if(c.subarray&&(!b.Of||b.Of.subarray)){if(g)return b.Of=c.subarray(d,d+e),b.Qf=e;if(0===
b.Qf&&0===f)return b.Of=c.slice(d,d+e),b.Qf=e;if(f+e<=b.Qf)return b.Of.set(c.subarray(d,d+e),f),e}P.xg(b,f+e);if(b.Of.subarray&&c.subarray)b.Of.set(c.subarray(d,d+e),f);else for(g=0;g<e;g++)b.Of[f+g]=c[d+g];b.Qf=Math.max(b.Qf,f+e);return e},$f:function(b,c,d){1===d?c+=b.position:2===d&&32768===(b.node.mode&61440)&&(c+=b.node.Qf);if(0>c)throw new O(28);return c},vg:function(b,c,d){P.xg(b.node,c+d);b.node.Qf=Math.max(b.node.Qf,c+d)},kg:function(b,c,d,e,f){if(32768!==(b.node.mode&61440))throw new O(43);
b=b.node.Of;if(f&2||b.buffer!==A.buffer){if(0<d||d+c<b.length)b.subarray?b=b.subarray(d,d+c):b=Array.prototype.slice.call(b,d,d+c);d=!0;c=65536*Math.ceil(c/65536);(f=ab(65536,c))?(y.fill(0,f,f+c),c=f):c=0;if(!c)throw new O(48);A.set(b,c)}else d=!1,c=b.byteOffset;return{Qg:c,Eg:d}},lg:function(b,c,d,e){P.Nf.write(b,c,0,e,d,!1);return 0}}},bb=null,cb={},Q=[],db=1,R=null,eb=!0,O=null,Za={},S=(b,c={})=>{b=Pa(b);if(!b)return{path:"",node:null};c=Object.assign({yg:!0,tg:0},c);if(8<c.tg)throw new O(32);
b=b.split("/").filter(h=>!!h);for(var d=bb,e="/",f=0;f<b.length;f++){var g=f===b.length-1;if(g&&c.parent)break;d=$a(d,b[f]);e=N(e+"/"+b[f]);d.ag&&(!g||g&&c.yg)&&(d=d.ag.root);if(!g||c.Zf)for(g=0;40960===(d.mode&61440);)if(d=fb(e),e=Pa(Ma(e),d),d=S(e,{tg:c.tg+1}).node,40<g++)throw new O(32);}return{path:e,node:d}},gb=b=>{for(var c;;){if(b===b.parent)return b=b.Vf.Ag,c?"/"!==b[b.length-1]?b+"/"+c:b+c:b;c=c?b.name+"/"+c:b.name;b=b.parent}},hb=(b,c)=>{for(var d=0,e=0;e<c.length;e++)d=(d<<5)-d+c.charCodeAt(e)|
0;return(b+d>>>0)%R.length},ib=b=>{var c=hb(b.parent.id,b.name);if(R[c]===b)R[c]=b.bg;else for(c=R[c];c;){if(c.bg===b){c.bg=b.bg;break}c=c.bg}},$a=(b,c)=>{var d;if(d=(d=jb(b,"x"))?d:b.Mf.dg?0:2)throw new O(d,b);for(d=R[hb(b.id,c)];d;d=d.bg){var e=d.name;if(d.parent.id===b.id&&e===c)return d}return b.Mf.dg(b,c)},Ya=(b,c,d,e)=>{b=new kb(b,c,d,e);c=hb(b.parent.id,b.name);b.bg=R[c];return R[c]=b},lb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},mb=b=>{var c=["r","w","rw"][b&3];b&512&&(c+="w");return c},
jb=(b,c)=>{if(eb)return 0;if(!c.includes("r")||b.mode&292){if(c.includes("w")&&!(b.mode&146)||c.includes("x")&&!(b.mode&73))return 2}else return 2;return 0},nb=(b,c)=>{try{return $a(b,c),20}catch(d){}return jb(b,"wx")},ob=(b,c,d)=>{try{var e=$a(b,c)}catch(f){return f.Pf}if(b=jb(b,"wx"))return b;if(d){if(16384!==(e.mode&61440))return 54;if(e===e.parent||"/"===gb(e))return 10}else if(16384===(e.mode&61440))return 31;return 0},pb=(b=0)=>{for(;4096>=b;b++)if(!Q[b])return b;throw new O(33);},rb=(b,c)=>
{qb||(qb=function(){this.hg={}},qb.prototype={},Object.defineProperties(qb.prototype,{object:{get:function(){return this.node},set:function(d){this.node=d}},flags:{get:function(){return this.hg.flags},set:function(d){this.hg.flags=d}},position:{get:function(){return this.hg.position},set:function(d){this.hg.position=d}}}));b=Object.assign(new qb,b);c=pb(c);b.Xf=c;return Q[c]=b},Xa={open:b=>{b.Nf=cb[b.node.fg].Nf;b.Nf.open&&b.Nf.open(b)},$f:()=>{throw new O(70);}},Ta=(b,c)=>{cb[b]={Nf:c}},sb=(b,c)=>
{var d="/"===c,e=!c;if(d&&bb)throw new O(10);if(!d&&!e){var f=S(c,{yg:!1});c=f.path;f=f.node;if(f.ag)throw new O(10);if(16384!==(f.mode&61440))throw new O(54);}c={type:b,Wg:{},Ag:c,Ng:[]};b=b.Vf(c);b.Vf=c;c.root=b;d?bb=b:f&&(f.ag=c,f.Vf&&f.Vf.Ng.push(c))},tb=(b,c,d)=>{var e=S(b,{parent:!0}).node;b=Na(b);if(!b||"."===b||".."===b)throw new O(28);var f=nb(e,b);if(f)throw new O(f);if(!e.Mf.jg)throw new O(63);return e.Mf.jg(e,b,c,d)},T=(b,c)=>tb(b,(void 0!==c?c:511)&1023|16384,0),ub=(b,c,d)=>{"undefined"==
typeof d&&(d=c,c=438);tb(b,c|8192,d)},vb=(b,c)=>{if(!Pa(b))throw new O(44);var d=S(c,{parent:!0}).node;if(!d)throw new O(44);c=Na(c);var e=nb(d,c);if(e)throw new O(e);if(!d.Mf.ng)throw new O(63);d.Mf.ng(d,c,b)},wb=b=>{var c=S(b,{parent:!0}).node;b=Na(b);var d=$a(c,b),e=ob(c,b,!0);if(e)throw new O(e);if(!c.Mf.mg)throw new O(63);if(d.ag)throw new O(10);c.Mf.mg(c,b);ib(d)},fb=b=>{b=S(b).node;if(!b)throw new O(44);if(!b.Mf.gg)throw new O(28);return Pa(gb(b.parent),b.Mf.gg(b))},xb=(b,c)=>{b=S(b,{Zf:!c}).node;
if(!b)throw new O(44);if(!b.Mf.Uf)throw new O(63);return b.Mf.Uf(b)},yb=b=>xb(b,!0),zb=(b,c)=>{b="string"==typeof b?S(b,{Zf:!0}).node:b;if(!b.Mf.Rf)throw new O(63);b.Mf.Rf(b,{mode:c&4095|b.mode&-4096,timestamp:Date.now()})},Ab=(b,c)=>{if(0>c)throw new O(28);b="string"==typeof b?S(b,{Zf:!0}).node:b;if(!b.Mf.Rf)throw new O(63);if(16384===(b.mode&61440))throw new O(31);if(32768!==(b.mode&61440))throw new O(28);var d=jb(b,"w");if(d)throw new O(d);b.Mf.Rf(b,{size:c,timestamp:Date.now()})},Cb=(b,c,d)=>
{if(""===b)throw new O(44);if("string"==typeof c){var e=lb[c];if("undefined"==typeof e)throw Error("Unknown file open mode: "+c);c=e}d=c&64?("undefined"==typeof d?438:d)&4095|32768:0;if("object"==typeof b)var f=b;else{b=N(b);try{f=S(b,{Zf:!(c&131072)}).node}catch(g){}}e=!1;if(c&64)if(f){if(c&128)throw new O(20);}else f=tb(b,d,0),e=!0;if(!f)throw new O(44);8192===(f.mode&61440)&&(c&=-513);if(c&65536&&16384!==(f.mode&61440))throw new O(54);if(!e&&(d=f?40960===(f.mode&61440)?32:16384===(f.mode&61440)&&
("r"!==mb(c)||c&512)?31:jb(f,mb(c)):44))throw new O(d);c&512&&!e&&Ab(f,0);c&=-131713;f=rb({node:f,path:gb(f),flags:c,seekable:!0,position:0,Nf:f.Nf,Ug:[],error:!1});f.Nf.open&&f.Nf.open(f);!a.logReadFiles||c&1||(Bb||(Bb={}),b in Bb||(Bb[b]=1));return f},Db=(b,c,d)=>{if(null===b.Xf)throw new O(8);if(!b.seekable||!b.Nf.$f)throw new O(70);if(0!=d&&1!=d&&2!=d)throw new O(28);b.position=b.Nf.$f(b,c,d);b.Ug=[]},Eb=()=>{O||(O=function(b,c){this.node=c;this.Sg=function(d){this.Pf=d};this.Sg(b);this.message=
"FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(b=>{Za[b]=new O(b);Za[b].stack="<generic error, no stack>"}))},Fb,Gb=(b,c)=>{var d=0;b&&(d|=365);c&&(d|=146);return d},Ib=(b,c,d)=>{b=N("/dev/"+b);var e=Gb(!!c,!!d);Hb||(Hb=64);var f=Hb++<<8|0;Ta(f,{open:g=>{g.seekable=!1},close:()=>{d&&d.buffer&&d.buffer.length&&d(10)},read:(g,h,n,k)=>{for(var l=0,p=0;p<k;p++){try{var q=c()}catch(r){throw new O(29);}if(void 0===q&&0===l)throw new O(6);if(null===q||void 0===q)break;l++;h[n+p]=
q}l&&(g.node.timestamp=Date.now());return l},write:(g,h,n,k)=>{for(var l=0;l<k;l++)try{d(h[n+l])}catch(p){throw new O(29);}k&&(g.node.timestamp=Date.now());return l}});ub(b,e,f)},Hb,U={},qb,Bb;function Jb(b,c,d){if("/"===c.charAt(0))return c;b=-100===b?"/":V(b).path;if(0==c.length){if(!d)throw new O(44);return b}return N(b+"/"+c)}
function Kb(b,c,d){try{var e=b(c)}catch(g){if(g&&g.node&&N(c)!==N(gb(g.node)))return-54;throw g;}C[d>>2]=e.Jg;C[d+8>>2]=e.qg;C[d+12>>2]=e.mode;E[d+16>>2]=e.Pg;C[d+20>>2]=e.uid;C[d+24>>2]=e.Mg;C[d+28>>2]=e.fg;K=[e.size>>>0,(I=e.size,1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[d+40>>2]=K[0];C[d+44>>2]=K[1];C[d+48>>2]=4096;C[d+52>>2]=e.Hg;b=e.Fg.getTime();c=e.Og.getTime();var f=e.Ig.getTime();K=[Math.floor(b/1E3)>>>0,(I=
Math.floor(b/1E3),1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[d+56>>2]=K[0];C[d+60>>2]=K[1];E[d+64>>2]=b%1E3*1E3;K=[Math.floor(c/1E3)>>>0,(I=Math.floor(c/1E3),1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[d+72>>2]=K[0];C[d+76>>2]=K[1];E[d+80>>2]=c%1E3*1E3;K=[Math.floor(f/1E3)>>>0,(I=Math.floor(f/1E3),1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/
4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[d+88>>2]=K[0];C[d+92>>2]=K[1];E[d+96>>2]=f%1E3*1E3;K=[e.qg>>>0,(I=e.qg,1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[d+104>>2]=K[0];C[d+108>>2]=K[1];return 0}var Lb=void 0;function Mb(){Lb+=4;return C[Lb-4>>2]}function V(b){b=Q[b];if(!b)throw new O(8);return b}function Nb(b){return E[b>>2]+4294967296*C[b+4>>2]}
var Ob=[0,31,60,91,121,152,182,213,244,274,305,335],Pb=[0,31,59,90,120,151,181,212,243,273,304,334];function Qb(b){var c=ra(b)+1,d=Rb(c);d&&pa(b,A,d,c);return d}var Sb={};
function Tb(){if(!Ub){var b={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},c;for(c in Sb)void 0===Sb[c]?delete b[c]:b[c]=Sb[c];var d=[];for(c in b)d.push(c+"="+b[c]);Ub=d}return Ub}var Ub;function Vb(b,c){Vb.Bg||(Vb.Bg=Oa());for(var d=0;d<c;d++)A[b+d>>0]=Vb.Bg();return 0}function Wb(){}function Xb(){}function Yb(){}function Zb(){}
function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){}
function Gc(){}function Hc(){}function Ic(b){b instanceof Ja||"unwind"==b||ea(1,b)}function Jc(b){try{b()}catch(c){u(c)}}function Kc(b){var c={},d;for(d in b)(function(e){var f=b[e];c[e]="function"==typeof f?function(){Lc.push(e);try{return f.apply(null,arguments)}finally{v||(Lc.pop()===e||u(),X&&1===Y&&0===Lc.length&&(Y=0,Jc(Mc),"undefined"!=typeof Fibers&&Fibers.Xg()))}}:f})(d);return c}var Y=0,X=null,Nc=0,Lc=[],Oc={},Pc={},Qc=0,Rc=null,Sc=[];
function Tc(){return new Promise((b,c)=>{Rc={resolve:b,reject:c}})}function Uc(){var b=Rb(16396),c=b+12;C[b>>2]=c;C[b+4>>2]=c+16384;c=Lc[0];var d=Oc[c];void 0===d&&(d=Qc++,Oc[c]=d,Pc[d]=c);C[b+8>>2]=d;return b}
function Vc(b){if(!v){if(0===Y){var c=!1,d=!1;b(e=>{if(!v&&(Nc=e||0,c=!0,d)){Y=2;Jc(()=>Wc(X));"undefined"!=typeof Xc&&Xc.rg.Lg&&Xc.rg.resume();e=!1;try{var f=(0,a.asm[Pc[C[X+8>>2]]])()}catch(n){f=n,e=!0}var g=!1;if(!X){var h=Rc;h&&(Rc=null,(e?h.reject:h.resolve)(f),g=!0)}if(e&&!g)throw f;}});d=!0;c||(Y=1,X=Uc(),"undefined"!=typeof Xc&&Xc.rg.Lg&&Xc.rg.pause(),Jc(()=>Yc(X)))}else 2===Y?(Y=0,Jc(Zc),$c(X),X=null,Sc.forEach(e=>{if(!v)try{e()}catch(f){Ic(f)}})):u("invalid state: "+Y);return Nc}}
function ad(b){return Vc(c=>{b().then(c)})}var bd={},cd=void 0,dd=[];function ed(b,c){A.set(b,c)}
function Z(b,c,d,e,f){function g(q){0!==k&&fd(k);return"string"===c?x(q):"boolean"===c?!!q:q}var h={string:q=>{var r=0;if(null!==q&&void 0!==q&&0!==q){var w=(q.length<<2)+1;r=gd(w);qa(q,r,w)}return r},array:q=>{var r=gd(q.length);ed(q,r);return r}};b=a["_"+b];var n=[],k=0;if(e)for(var l=0;l<e.length;l++){var p=h[d[l]];p?(0===k&&(k=hd()),n[l]=p(e[l])):n[l]=e[l]}d=X;e=b.apply(null,n);f=f&&f.async;if(X!=d)return Tc().then(g);e=g(e);return f?Promise.resolve(e):e}
var jd="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function kb(b,c,d,e){b||(b=this);this.parent=b;this.Vf=b.Vf;this.ag=null;this.id=db++;this.name=c;this.mode=d;this.Mf={};this.Nf={};this.fg=e}Object.defineProperties(kb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(b){b?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(b){b?this.mode|=146:this.mode&=-147}}});Eb();R=Array(4096);sb(P,"/");T("/tmp");T("/home");
T("/home/web_user");(()=>{T("/dev");Ta(259,{read:()=>0,write:(c,d,e,f)=>f});ub("/dev/null",259);Sa(1280,Va);Sa(1536,Wa);ub("/dev/tty",1280);ub("/dev/tty1",1536);var b=Oa();Ib("random",b);Ib("urandom",b);T("/dev/shm");T("/dev/shm/tmp")})();(()=>{T("/proc");var b=T("/proc/self");T("/proc/self/fd");sb({Vf:()=>{var c=Ya(b,"fd",16895,73);c.Mf={dg:(d,e)=>{var f=Q[+e];if(!f)throw new O(8);d={parent:null,Vf:{Ag:"fake"},Mf:{gg:()=>f.path}};return d.parent=d}};return c}},"/proc/self/fd")})();var Xc;
(function(){const b=new Map;a.setAuthorizer=function(c,d,e){d?b.set(c,{f:d,ug:e}):b.delete(c);return Z("set_authorizer","number",["number"],[c])};Wb=function(c,d,e,f,g,h){if(b.has(c)){const {f:n,ug:k}=b.get(c);return n(k,d,e?x(e):null,f?x(f):null,g?x(g):null,h?x(h):null)}return 0}})();
(function(){const b=new Map,c=new Map;a.createFunction=function(d,e,f,g,h,n){const k=b.size;b.set(k,{f:n,Yf:h});return Z("create_function","number","number string number number number number".split(" "),[d,e,f,g,k,0])};a.createAggregate=function(d,e,f,g,h,n,k){const l=b.size;b.set(l,{step:n,Kg:k,Yf:h});return Z("create_function","number","number string number number number number".split(" "),[d,e,f,g,l,1])};a.getFunctionUserData=function(d){return c.get(d)};Yb=function(d,e,f,g){d=b.get(d);c.set(e,
d.Yf);d.f(e,new Uint32Array(y.buffer,g,f));c.delete(e)};$b=function(d,e,f,g){d=b.get(d);c.set(e,d.Yf);d.step(e,new Uint32Array(y.buffer,g,f));c.delete(e)};Xb=function(d,e){d=b.get(d);c.set(e,d.Yf);d.Kg(e);c.delete(e)}})();(function(){const b=new Map;a.progressHandler=function(c,d,e,f){e?b.set(c,{f:e,ug:f}):b.delete(c);return Z("progress_handler",null,["number","number"],[c,d])};Zb=function(c){if(b.has(c)){const {f:d,ug:e}=b.get(c);return d(e)}return 0}})();
(function(){function b(k,l){const p=`get${k}`,q=`set${k}`;return new Proxy(new DataView(y.buffer,l,"Int32"===k?4:8),{get(r,w){if(w===p)return function(z,G){if(!G)throw Error("must be little endian");return r[w](z,G)};if(w===q)return function(z,G,D){if(!D)throw Error("must be little endian");return r[w](z,G,D)};if("string"===typeof w&&w.match(/^(get)|(set)/))throw Error("invalid type");return r[w]}})}const c="object"===typeof bd,d=new Map,e=new Map,f=new Map,g=c?new Set:null,h=c?new Set:null,n=new Map;
qc=function(k,l,p,q){n.set(x(k),{size:l,eg:Array.from(new Uint32Array(y.buffer,q,p))})};a.createModule=function(k,l,p,q){c&&(p.handleAsync=ad);const r=d.size;d.set(r,{module:p,Yf:q});q=0;p.xCreate&&(q|=1);p.xConnect&&(q|=2);p.xBestIndex&&(q|=4);p.xDisconnect&&(q|=8);p.xDestroy&&(q|=16);p.xOpen&&(q|=32);p.xClose&&(q|=64);p.xFilter&&(q|=128);p.xNext&&(q|=256);p.xEof&&(q|=512);p.xColumn&&(q|=1024);p.xRowid&&(q|=2048);p.xUpdate&&(q|=4096);p.xBegin&&(q|=8192);p.xSync&&(q|=16384);p.xCommit&&(q|=32768);
p.xRollback&&(q|=65536);p.xFindFunction&&(q|=131072);p.xRename&&(q|=262144);return Z("create_module","number",["number","string","number","number"],[k,l,r,q])};gc=function(k,l,p,q,r,w){l=d.get(l);e.set(r,l);if(c){g.delete(r);for(const z of g)e.delete(z)}q=Array.from(new Uint32Array(y.buffer,q,p)).map(z=>x(z));return l.module.xCreate(k,l.Yf,q,r,b("Int32",w))};fc=function(k,l,p,q,r,w){l=d.get(l);e.set(r,l);if(c){g.delete(r);for(const z of g)e.delete(z)}q=Array.from(new Uint32Array(y.buffer,q,p)).map(z=>
x(z));return l.module.xConnect(k,l.Yf,q,r,b("Int32",w))};bc=function(k,l){var p=e.get(k),q=n.get("sqlite3_index_info").eg;const r={};r.nConstraint=L(l+q[0],"i32");r.aConstraint=[];var w=L(l+q[1],"*"),z=n.get("sqlite3_index_constraint").size;for(var G=0;G<r.nConstraint;++G){var D=r.aConstraint,J=D.push,H=w+G*z,ja=n.get("sqlite3_index_constraint").eg,W={};W.iColumn=L(H+ja[0],"i32");W.op=L(H+ja[1],"i8");W.usable=!!L(H+ja[2],"i8");J.call(D,W)}r.nOrderBy=L(l+q[2],"i32");r.aOrderBy=[];w=L(l+q[3],"*");z=
n.get("sqlite3_index_orderby").size;for(G=0;G<r.nOrderBy;++G)D=r.aOrderBy,J=D.push,H=w+G*z,ja=n.get("sqlite3_index_orderby").eg,W={},W.iColumn=L(H+ja[0],"i32"),W.desc=!!L(H+ja[1],"i8"),J.call(D,W);r.aConstraintUsage=[];for(w=0;w<r.nConstraint;++w)r.aConstraintUsage.push({argvIndex:0,omit:!1});r.idxNum=L(l+q[5],"i32");r.idxStr=null;r.orderByConsumed=!!L(l+q[8],"i8");r.estimatedCost=L(l+q[9],"double");r.estimatedRows=L(l+q[10],"i32");r.idxFlags=L(l+q[11],"i32");r.colUsed=L(l+q[12],"i32");k=p.module.xBestIndex(k,
r);p=n.get("sqlite3_index_info").eg;q=L(l+p[4],"*");w=n.get("sqlite3_index_constraint_usage").size;for(J=0;J<r.nConstraint;++J)z=q+J*w,D=r.aConstraintUsage[J],H=n.get("sqlite3_index_constraint_usage").eg,M(z+H[0],D.argvIndex,"i32"),M(z+H[1],D.omit?1:0,"i8");M(l+p[5],r.idxNum,"i32");"string"===typeof r.idxStr&&(q=ra(r.idxStr),w=Z("sqlite3_malloc","number",["number"],[q+1]),qa(r.idxStr,w,q+1),M(l+p[6],w,"*"),M(l+p[7],1,"i32"));M(l+p[8],r.orderByConsumed,"i32");M(l+p[9],r.estimatedCost,"double");M(l+
p[10],r.estimatedRows,"i32");M(l+p[11],r.idxFlags,"i32");return k};ic=function(k){const l=e.get(k);c?g.add(k):e.delete(k);return l.module.xDisconnect(k)};hc=function(k){const l=e.get(k);c?g.add(k):e.delete(k);return l.module.xDestroy(k)};mc=function(k,l){const p=e.get(k);f.set(l,p);if(c){h.delete(l);for(const q of h)f.delete(q)}return p.module.xOpen(k,l)};cc=function(k){const l=f.get(k);c?h.add(k):f.delete(k);return l.module.xClose(k)};jc=function(k){return f.get(k).module.xEof(k)?1:0};kc=function(k,
l,p,q,r){const w=f.get(k);p=p?x(p):null;r=new Uint32Array(y.buffer,r,q);return w.module.xFilter(k,l,p,r)};lc=function(k){return f.get(k).module.xNext(k)};dc=function(k,l,p){return f.get(k).module.xColumn(k,l,p)};pc=function(k,l){return f.get(k).module.xRowid(k,b("BigInt64",l))};sc=function(k,l,p,q){const r=e.get(k);p=new Uint32Array(y.buffer,p,l);return r.module.xUpdate(k,p,b("BigInt64",q))};ac=function(k){return e.get(k).module.xBegin(k)};rc=function(k){return e.get(k).module.xSync(k)};ec=function(k){return e.get(k).module.xCommit(k)};
oc=function(k){return e.get(k).module.xRollback(k)};nc=function(k,l){const p=e.get(k);l=x(l);return p.module.xRename(k,l)}})();
(function(){function b(g,h){const n=`get${g}`,k=`set${g}`;return new Proxy(new DataView(y.buffer,h,"Int32"===g?4:8),{get(l,p){if(p===n)return function(q,r){if(!r)throw Error("must be little endian");return l[p](q,r)};if(p===k)return function(q,r,w){if(!w)throw Error("must be little endian");return l[p](q,r,w)};if("string"===typeof p&&p.match(/^(get)|(set)/))throw Error("invalid type");return l[p]}})}const c="object"===typeof bd;c&&(a.handleAsync=ad);const d=new Map,e=new Map;a.registerVFS=function(g,
h){if(Z("sqlite3_vfs_find","number",["string"],[g.name]))throw Error(`VFS '${g.name}' already registered`);c&&(g.handleAsync=ad);var n=g.mxPathName??64;const k=a._malloc(4);h=Z("register_vfs","number",["string","number","number","number"],[g.name,n,h?1:0,k]);h||(n=L(k,"*"),d.set(n,g));a._free(k);return h};const f=c?new Set:null;vc=function(g){const h=e.get(g);c?f.add(g):e.delete(g);return h.xClose(g)};Cc=function(g,h,n,k,l){return e.get(g).xRead(g,y.subarray(h,h+n),4294967296*l+k+(0>k?2**32:0))};
Hc=function(g,h,n,k,l){return e.get(g).xWrite(g,y.subarray(h,h+n),4294967296*l+k+(0>k?2**32:0))};Fc=function(g,h,n){return e.get(g).xTruncate(g,4294967296*n+h+(0>h?2**32:0))};Ec=function(g,h){return e.get(g).xSync(g,h)};zc=function(g,h){const n=e.get(g);h=b("BigInt64",h);return n.xFileSize(g,h)};Ac=function(g,h){return e.get(g).xLock(g,h)};Gc=function(g,h){return e.get(g).xUnlock(g,h)};uc=function(g,h){const n=e.get(g);h=b("Int32",h);return n.xCheckReservedLock(g,h)};yc=function(g,h,n){const k=e.get(g);
n=new DataView(y.buffer,n);return k.xFileControl(g,h,n)};Dc=function(g){return e.get(g).xSectorSize(g)};xc=function(g){return e.get(g).xDeviceCharacteristics(g)};Bc=function(g,h,n,k,l){g=d.get(g);e.set(n,g);if(c){f.delete(n);for(var p of f)e.delete(p)}p=null;if(k&64){p=1;const q=[];for(;p;){const r=y[h++];if(r)q.push(r);else switch(y[h]||(p=null),p){case 1:q.push(63);p=2;break;case 2:q.push(61);p=3;break;case 3:q.push(38),p=2}}p=(new TextDecoder).decode(new Uint8Array(q))}else h&&(p=x(h));l=b("Int32",
l);return g.xOpen(p,n,k,l)};wc=function(g,h,n){return d.get(g).xDelete(x(h),n)};tc=function(g,h,n,k){g=d.get(g);k=b("Int32",k);return g.xAccess(x(h),n,k)}})();
var ld={a:function(b,c,d,e){u("Assertion failed: "+x(b)+", at: "+[c?x(c):"unknown filename",d,e?x(e):"unknown function"])},L:function(b,c){try{return b=x(b),zb(b,c),0}catch(d){if("undefined"==typeof U||!(d instanceof O))throw d;return-d.Pf}},Q:function(b,c,d){try{c=x(c);c=Jb(b,c);if(d&-8)return-28;var e=S(c,{Zf:!0}).node;if(!e)return-44;b="";d&4&&(b+="r");d&2&&(b+="w");d&1&&(b+="x");return b&&jb(e,b)?-2:0}catch(f){if("undefined"==typeof U||!(f instanceof O))throw f;return-f.Pf}},M:function(b,c){try{var d=
Q[b];if(!d)throw new O(8);zb(d.node,c);return 0}catch(e){if("undefined"==typeof U||!(e instanceof O))throw e;return-e.Pf}},K:function(b){try{var c=Q[b];if(!c)throw new O(8);var d=c.node;var e="string"==typeof d?S(d,{Zf:!0}).node:d;if(!e.Mf.Rf)throw new O(63);e.Mf.Rf(e,{timestamp:Date.now()});return 0}catch(f){if("undefined"==typeof U||!(f instanceof O))throw f;return-f.Pf}},b:function(b,c,d){Lb=d;try{var e=V(b);switch(c){case 0:var f=Mb();return 0>f?-28:rb(e,f).Xf;case 1:case 2:return 0;case 3:return e.flags;
case 4:return f=Mb(),e.flags|=f,0;case 5:return f=Mb(),B[f+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return C[kd()>>2]=28,-1;default:return-28}}catch(g){if("undefined"==typeof U||!(g instanceof O))throw g;return-g.Pf}},J:function(b,c){try{var d=V(b);return Kb(xb,d.path,c)}catch(e){if("undefined"==typeof U||!(e instanceof O))throw e;return-e.Pf}},j:function(b,c,d){try{c=d+2097152>>>0<4194305-!!c?(c>>>0)+4294967296*d:NaN;if(isNaN(c))return-61;var e=Q[b];if(!e)throw new O(8);if(0===
(e.flags&2097155))throw new O(28);Ab(e.node,c);return 0}catch(f){if("undefined"==typeof U||!(f instanceof O))throw f;return-f.Pf}},D:function(b,c){try{if(0===c)return-28;var d=ra("/")+1;if(c<d)return-68;qa("/",b,c);return d}catch(e){if("undefined"==typeof U||!(e instanceof O))throw e;return-e.Pf}},G:function(b,c){try{return b=x(b),Kb(yb,b,c)}catch(d){if("undefined"==typeof U||!(d instanceof O))throw d;return-d.Pf}},A:function(b,c,d){try{return c=x(c),c=Jb(b,c),c=N(c),"/"===c[c.length-1]&&(c=c.substr(0,
c.length-1)),T(c,d),0}catch(e){if("undefined"==typeof U||!(e instanceof O))throw e;return-e.Pf}},F:function(b,c,d,e){try{c=x(c);var f=e&256;c=Jb(b,c,e&4096);return Kb(f?yb:xb,c,d)}catch(g){if("undefined"==typeof U||!(g instanceof O))throw g;return-g.Pf}},w:function(b,c,d,e){Lb=e;try{c=x(c);c=Jb(b,c);var f=e?Mb():0;return Cb(c,d,f).Xf}catch(g){if("undefined"==typeof U||!(g instanceof O))throw g;return-g.Pf}},u:function(b,c,d,e){try{c=x(c);c=Jb(b,c);if(0>=e)return-28;var f=fb(c),g=Math.min(e,ra(f)),
h=A[d+g];qa(f,d,e+1);A[d+g]=h;return g}catch(n){if("undefined"==typeof U||!(n instanceof O))throw n;return-n.Pf}},t:function(b){try{return b=x(b),wb(b),0}catch(c){if("undefined"==typeof U||!(c instanceof O))throw c;return-c.Pf}},H:function(b,c){try{return b=x(b),Kb(xb,b,c)}catch(d){if("undefined"==typeof U||!(d instanceof O))throw d;return-d.Pf}},r:function(b,c,d){try{c=x(c);c=Jb(b,c);if(0===d){b=c;var e=S(b,{parent:!0}).node;if(!e)throw new O(44);var f=Na(b),g=$a(e,f),h=ob(e,f,!1);if(h)throw new O(h);
if(!e.Mf.og)throw new O(63);if(g.ag)throw new O(10);e.Mf.og(e,f);ib(g)}else 512===d?wb(c):u("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof U||!(n instanceof O))throw n;return-n.Pf}},q:function(b,c,d){try{c=x(c);c=Jb(b,c,!0);if(d){var e=Nb(d),f=C[d+8>>2];g=1E3*e+f/1E6;d+=16;e=Nb(d);f=C[d+8>>2];h=1E3*e+f/1E6}else var g=Date.now(),h=g;b=g;var n=S(c,{Zf:!0}).node;n.Mf.Rf(n,{timestamp:Math.max(b,h)});return 0}catch(k){if("undefined"==typeof U||!(k instanceof O))throw k;return-k.Pf}},
N:function(b,c){b=new Date(1E3*Nb(b));C[c>>2]=b.getSeconds();C[c+4>>2]=b.getMinutes();C[c+8>>2]=b.getHours();C[c+12>>2]=b.getDate();C[c+16>>2]=b.getMonth();C[c+20>>2]=b.getFullYear()-1900;C[c+24>>2]=b.getDay();var d=b.getFullYear();C[c+28>>2]=(0!==d%4||0===d%100&&0!==d%400?Pb:Ob)[b.getMonth()]+b.getDate()-1|0;C[c+36>>2]=-(60*b.getTimezoneOffset());d=(new Date(b.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(b.getFullYear(),0,1)).getTimezoneOffset();C[c+32>>2]=(d!=e&&b.getTimezoneOffset()==
Math.min(e,d))|0},y:function(b,c,d,e,f,g,h){try{var n=V(e);if(0!==(c&2)&&0===(d&2)&&2!==(n.flags&2097155))throw new O(2);if(1===(n.flags&2097155))throw new O(2);if(!n.Nf.kg)throw new O(43);var k=n.Nf.kg(n,b,f,c,d);var l=k.Qg;C[g>>2]=k.Eg;E[h>>2]=l;return 0}catch(p){if("undefined"==typeof U||!(p instanceof O))throw p;return-p.Pf}},z:function(b,c,d,e,f,g){try{var h=V(f);if(d&2){if(32768!==(h.node.mode&61440))throw new O(43);e&2||h.Nf.lg&&h.Nf.lg(h,y.slice(b,b+c),g,c,e)}}catch(n){if("undefined"==typeof U||
!(n instanceof O))throw n;return-n.Pf}},O:function(b,c,d){function e(k){return(k=k.toTimeString().match(/\(([A-Za-z ]+)\)$/))?k[1]:"GMT"}var f=(new Date).getFullYear(),g=new Date(f,0,1),h=new Date(f,6,1);f=g.getTimezoneOffset();var n=h.getTimezoneOffset();E[b>>2]=60*Math.max(f,n);C[c>>2]=Number(f!=n);b=e(g);c=e(h);b=Qb(b);c=Qb(c);n<f?(E[d>>2]=b,E[d+4>>2]=c):(E[d>>2]=c,E[d+4>>2]=b)},ta:function(){u("")},e:function(){return Date.now()},d:()=>performance.now(),o:function(b){var c=y.length;b>>>=0;if(2147483648<
b)return!1;for(var d=1;4>=d;d*=2){var e=c*(1+.2/d);e=Math.min(e,b+100663296);var f=Math,g=f.min;e=Math.max(b,e);e+=(65536-e%65536)%65536;a:{var h=ma.buffer;try{ma.grow(g.call(f,2147483648,e)-h.byteLength+65535>>>16);va();var n=1;break a}catch(k){}n=void 0}if(n)return!0}return!1},B:function(b,c){var d=0;Tb().forEach(function(e,f){var g=c+d;f=E[b+4*f>>2]=g;for(g=0;g<e.length;++g)A[f++>>0]=e.charCodeAt(g);A[f>>0]=0;d+=e.length+1});return 0},C:function(b,c){var d=Tb();E[b>>2]=d.length;var e=0;d.forEach(function(f){e+=
f.length+1});E[c>>2]=e;return 0},f:function(b){try{var c=V(b);if(null===c.Xf)throw new O(8);c.pg&&(c.pg=null);try{c.Nf.close&&c.Nf.close(c)}catch(d){throw d;}finally{Q[c.Xf]=null}c.Xf=null;return 0}catch(d){if("undefined"==typeof U||!(d instanceof O))throw d;return d.Pf}},p:function(b,c){try{var d=V(b);A[c>>0]=d.Tf?2:16384===(d.mode&61440)?3:40960===(d.mode&61440)?7:4;return 0}catch(e){if("undefined"==typeof U||!(e instanceof O))throw e;return e.Pf}},v:function(b,c,d,e){try{a:{var f=V(b);b=c;for(var g,
h=c=0;h<d;h++){var n=E[b>>2],k=E[b+4>>2];b+=8;var l=f,p=n,q=k,r=g,w=A;if(0>q||0>r)throw new O(28);if(null===l.Xf)throw new O(8);if(1===(l.flags&2097155))throw new O(8);if(16384===(l.node.mode&61440))throw new O(31);if(!l.Nf.read)throw new O(28);var z="undefined"!=typeof r;if(!z)r=l.position;else if(!l.seekable)throw new O(70);var G=l.Nf.read(l,w,p,q,r);z||(l.position+=G);var D=G;if(0>D){var J=-1;break a}c+=D;if(D<k)break;"undefined"!==typeof g&&(g+=D)}J=c}E[e>>2]=J;return 0}catch(H){if("undefined"==
typeof U||!(H instanceof O))throw H;return H.Pf}},i:function(b,c,d,e,f){try{c=d+2097152>>>0<4194305-!!c?(c>>>0)+4294967296*d:NaN;if(isNaN(c))return 61;var g=V(b);Db(g,c,e);K=[g.position>>>0,(I=g.position,1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[f>>2]=K[0];C[f+4>>2]=K[1];g.pg&&0===c&&0===e&&(g.pg=null);return 0}catch(h){if("undefined"==typeof U||!(h instanceof O))throw h;return h.Pf}},E:function(b){try{var c=V(b);return Vc(function(d){var e=
c.node.Vf;e.type.Tg?e.type.Tg(e,!1,function(f){f?d(function(){return 29}):d(0)}):d(0)})}catch(d){if("undefined"==typeof U||!(d instanceof O))throw d;return d.Pf}},s:function(b,c,d,e){try{a:{var f=V(b);b=c;for(var g,h=c=0;h<d;h++){var n=E[b>>2],k=E[b+4>>2];b+=8;var l=f,p=n,q=k,r=g,w=A;if(0>q||0>r)throw new O(28);if(null===l.Xf)throw new O(8);if(0===(l.flags&2097155))throw new O(8);if(16384===(l.node.mode&61440))throw new O(31);if(!l.Nf.write)throw new O(28);l.seekable&&l.flags&1024&&Db(l,0,2);var z=
"undefined"!=typeof r;if(!z)r=l.position;else if(!l.seekable)throw new O(70);var G=l.Nf.write(l,w,p,q,r,void 0);z||(l.position+=G);var D=G;if(0>D){var J=-1;break a}c+=D;"undefined"!==typeof g&&(g+=D)}J=c}E[e>>2]=J;return 0}catch(H){if("undefined"==typeof U||!(H instanceof O))throw H;return H.Pf}},sa:Vb,_:Wb,x:Xb,P:Yb,ca:Zb,I:$b,ka:ac,m:bc,ra:cc,na:dc,ia:ec,ea:fc,fa:gc,g:hc,h:ic,oa:jc,qa:kc,pa:lc,da:mc,ga:nc,ha:oc,ma:pc,c:qc,ja:rc,la:sc,aa:tc,V:uc,$:vc,ba:wc,S:xc,U:yc,Y:zc,X:Ac,R:Bc,n:Cc,T:Dc,Z:Ec,
k:Fc,W:Gc,l:Hc};
(function(){function b(g){g=g.exports;g=Kc(g);a.asm=g;ma=a.asm.ua;va();wa=a.asm.Df;ya.unshift(a.asm.va);Ca--;a.monitorRunDependencies&&a.monitorRunDependencies(Ca);0==Ca&&(null!==Da&&(clearInterval(Da),Da=null),Ea&&(g=Ea,Ea=null,g()))}function c(g){b(g.instance)}function d(g){return Ia().then(function(h){return WebAssembly.instantiate(h,e)}).then(function(h){return h}).then(g,function(h){t("failed to asynchronously prepare wasm: "+h);u(h)})}var e={a:ld};Ca++;a.monitorRunDependencies&&a.monitorRunDependencies(Ca);
if(a.instantiateWasm)try{var f=a.instantiateWasm(e,b);return f=Kc(f)}catch(g){t("Module.instantiateWasm callback failed with error: "+g),ba(g)}(function(){return la||"function"!=typeof WebAssembly.instantiateStreaming||Fa()||"function"!=typeof fetch?d(c):fetch(F,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,e).then(c,function(h){t("wasm streaming compile failed: "+h);t("falling back to ArrayBuffer instantiation");return d(c)})})})().catch(ba);return{}})();
a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.va).apply(null,arguments)};a._sqlite3_status64=function(){return(a._sqlite3_status64=a.asm.wa).apply(null,arguments)};a._sqlite3_status=function(){return(a._sqlite3_status=a.asm.xa).apply(null,arguments)};a._sqlite3_db_status=function(){return(a._sqlite3_db_status=a.asm.ya).apply(null,arguments)};a._sqlite3_msize=function(){return(a._sqlite3_msize=a.asm.za).apply(null,arguments)};
a._sqlite3_vfs_find=function(){return(a._sqlite3_vfs_find=a.asm.Aa).apply(null,arguments)};a._sqlite3_vfs_register=function(){return(a._sqlite3_vfs_register=a.asm.Ba).apply(null,arguments)};a._sqlite3_vfs_unregister=function(){return(a._sqlite3_vfs_unregister=a.asm.Ca).apply(null,arguments)};a._sqlite3_release_memory=function(){return(a._sqlite3_release_memory=a.asm.Da).apply(null,arguments)};a._sqlite3_soft_heap_limit64=function(){return(a._sqlite3_soft_heap_limit64=a.asm.Ea).apply(null,arguments)};
a._sqlite3_memory_used=function(){return(a._sqlite3_memory_used=a.asm.Fa).apply(null,arguments)};a._sqlite3_hard_heap_limit64=function(){return(a._sqlite3_hard_heap_limit64=a.asm.Ga).apply(null,arguments)};a._sqlite3_memory_highwater=function(){return(a._sqlite3_memory_highwater=a.asm.Ha).apply(null,arguments)};a._sqlite3_malloc=function(){return(a._sqlite3_malloc=a.asm.Ia).apply(null,arguments)};a._sqlite3_malloc64=function(){return(a._sqlite3_malloc64=a.asm.Ja).apply(null,arguments)};
a._sqlite3_free=function(){return(a._sqlite3_free=a.asm.Ka).apply(null,arguments)};a._sqlite3_realloc=function(){return(a._sqlite3_realloc=a.asm.La).apply(null,arguments)};a._sqlite3_realloc64=function(){return(a._sqlite3_realloc64=a.asm.Ma).apply(null,arguments)};a._sqlite3_str_vappendf=function(){return(a._sqlite3_str_vappendf=a.asm.Na).apply(null,arguments)};a._sqlite3_str_append=function(){return(a._sqlite3_str_append=a.asm.Oa).apply(null,arguments)};
a._sqlite3_str_appendchar=function(){return(a._sqlite3_str_appendchar=a.asm.Pa).apply(null,arguments)};a._sqlite3_str_appendall=function(){return(a._sqlite3_str_appendall=a.asm.Qa).apply(null,arguments)};a._sqlite3_str_appendf=function(){return(a._sqlite3_str_appendf=a.asm.Ra).apply(null,arguments)};a._sqlite3_str_finish=function(){return(a._sqlite3_str_finish=a.asm.Sa).apply(null,arguments)};a._sqlite3_str_errcode=function(){return(a._sqlite3_str_errcode=a.asm.Ta).apply(null,arguments)};
a._sqlite3_str_length=function(){return(a._sqlite3_str_length=a.asm.Ua).apply(null,arguments)};a._sqlite3_str_value=function(){return(a._sqlite3_str_value=a.asm.Va).apply(null,arguments)};a._sqlite3_str_reset=function(){return(a._sqlite3_str_reset=a.asm.Wa).apply(null,arguments)};a._sqlite3_str_new=function(){return(a._sqlite3_str_new=a.asm.Xa).apply(null,arguments)};a._sqlite3_vmprintf=function(){return(a._sqlite3_vmprintf=a.asm.Ya).apply(null,arguments)};
a._sqlite3_mprintf=function(){return(a._sqlite3_mprintf=a.asm.Za).apply(null,arguments)};a._sqlite3_vsnprintf=function(){return(a._sqlite3_vsnprintf=a.asm._a).apply(null,arguments)};a._sqlite3_snprintf=function(){return(a._sqlite3_snprintf=a.asm.$a).apply(null,arguments)};a._sqlite3_log=function(){return(a._sqlite3_log=a.asm.ab).apply(null,arguments)};a._sqlite3_randomness=function(){return(a._sqlite3_randomness=a.asm.bb).apply(null,arguments)};
a._sqlite3_stricmp=function(){return(a._sqlite3_stricmp=a.asm.cb).apply(null,arguments)};a._sqlite3_strnicmp=function(){return(a._sqlite3_strnicmp=a.asm.db).apply(null,arguments)};a._sqlite3_os_init=function(){return(a._sqlite3_os_init=a.asm.eb).apply(null,arguments)};a._sqlite3_os_end=function(){return(a._sqlite3_os_end=a.asm.fb).apply(null,arguments)};a._sqlite3_serialize=function(){return(a._sqlite3_serialize=a.asm.gb).apply(null,arguments)};
a._sqlite3_prepare_v2=function(){return(a._sqlite3_prepare_v2=a.asm.hb).apply(null,arguments)};a._sqlite3_step=function(){return(a._sqlite3_step=a.asm.ib).apply(null,arguments)};a._sqlite3_column_int64=function(){return(a._sqlite3_column_int64=a.asm.jb).apply(null,arguments)};a._sqlite3_reset=function(){return(a._sqlite3_reset=a.asm.kb).apply(null,arguments)};a._sqlite3_exec=function(){return(a._sqlite3_exec=a.asm.lb).apply(null,arguments)};
a._sqlite3_column_int=function(){return(a._sqlite3_column_int=a.asm.mb).apply(null,arguments)};a._sqlite3_finalize=function(){return(a._sqlite3_finalize=a.asm.nb).apply(null,arguments)};a._sqlite3_deserialize=function(){return(a._sqlite3_deserialize=a.asm.ob).apply(null,arguments)};a._sqlite3_database_file_object=function(){return(a._sqlite3_database_file_object=a.asm.pb).apply(null,arguments)};a._sqlite3_backup_init=function(){return(a._sqlite3_backup_init=a.asm.qb).apply(null,arguments)};
a._sqlite3_backup_step=function(){return(a._sqlite3_backup_step=a.asm.rb).apply(null,arguments)};a._sqlite3_backup_finish=function(){return(a._sqlite3_backup_finish=a.asm.sb).apply(null,arguments)};a._sqlite3_backup_remaining=function(){return(a._sqlite3_backup_remaining=a.asm.tb).apply(null,arguments)};a._sqlite3_backup_pagecount=function(){return(a._sqlite3_backup_pagecount=a.asm.ub).apply(null,arguments)};
a._sqlite3_clear_bindings=function(){return(a._sqlite3_clear_bindings=a.asm.vb).apply(null,arguments)};a._sqlite3_value_blob=function(){return(a._sqlite3_value_blob=a.asm.wb).apply(null,arguments)};a._sqlite3_value_text=function(){return(a._sqlite3_value_text=a.asm.xb).apply(null,arguments)};a._sqlite3_value_bytes=function(){return(a._sqlite3_value_bytes=a.asm.yb).apply(null,arguments)};a._sqlite3_value_bytes16=function(){return(a._sqlite3_value_bytes16=a.asm.zb).apply(null,arguments)};
a._sqlite3_value_double=function(){return(a._sqlite3_value_double=a.asm.Ab).apply(null,arguments)};a._sqlite3_value_int=function(){return(a._sqlite3_value_int=a.asm.Bb).apply(null,arguments)};a._sqlite3_value_int64=function(){return(a._sqlite3_value_int64=a.asm.Cb).apply(null,arguments)};a._sqlite3_value_subtype=function(){return(a._sqlite3_value_subtype=a.asm.Db).apply(null,arguments)};a._sqlite3_value_pointer=function(){return(a._sqlite3_value_pointer=a.asm.Eb).apply(null,arguments)};
a._sqlite3_value_text16=function(){return(a._sqlite3_value_text16=a.asm.Fb).apply(null,arguments)};a._sqlite3_value_text16be=function(){return(a._sqlite3_value_text16be=a.asm.Gb).apply(null,arguments)};a._sqlite3_value_text16le=function(){return(a._sqlite3_value_text16le=a.asm.Hb).apply(null,arguments)};a._sqlite3_value_type=function(){return(a._sqlite3_value_type=a.asm.Ib).apply(null,arguments)};a._sqlite3_value_encoding=function(){return(a._sqlite3_value_encoding=a.asm.Jb).apply(null,arguments)};
a._sqlite3_value_nochange=function(){return(a._sqlite3_value_nochange=a.asm.Kb).apply(null,arguments)};a._sqlite3_value_frombind=function(){return(a._sqlite3_value_frombind=a.asm.Lb).apply(null,arguments)};a._sqlite3_value_dup=function(){return(a._sqlite3_value_dup=a.asm.Mb).apply(null,arguments)};a._sqlite3_value_free=function(){return(a._sqlite3_value_free=a.asm.Nb).apply(null,arguments)};a._sqlite3_result_blob=function(){return(a._sqlite3_result_blob=a.asm.Ob).apply(null,arguments)};
a._sqlite3_result_blob64=function(){return(a._sqlite3_result_blob64=a.asm.Pb).apply(null,arguments)};a._sqlite3_result_double=function(){return(a._sqlite3_result_double=a.asm.Qb).apply(null,arguments)};a._sqlite3_result_error=function(){return(a._sqlite3_result_error=a.asm.Rb).apply(null,arguments)};a._sqlite3_result_error16=function(){return(a._sqlite3_result_error16=a.asm.Sb).apply(null,arguments)};a._sqlite3_result_int=function(){return(a._sqlite3_result_int=a.asm.Tb).apply(null,arguments)};
a._sqlite3_result_int64=function(){return(a._sqlite3_result_int64=a.asm.Ub).apply(null,arguments)};a._sqlite3_result_null=function(){return(a._sqlite3_result_null=a.asm.Vb).apply(null,arguments)};a._sqlite3_result_pointer=function(){return(a._sqlite3_result_pointer=a.asm.Wb).apply(null,arguments)};a._sqlite3_result_subtype=function(){return(a._sqlite3_result_subtype=a.asm.Xb).apply(null,arguments)};a._sqlite3_result_text=function(){return(a._sqlite3_result_text=a.asm.Yb).apply(null,arguments)};
a._sqlite3_result_text64=function(){return(a._sqlite3_result_text64=a.asm.Zb).apply(null,arguments)};a._sqlite3_result_text16=function(){return(a._sqlite3_result_text16=a.asm._b).apply(null,arguments)};a._sqlite3_result_text16be=function(){return(a._sqlite3_result_text16be=a.asm.$b).apply(null,arguments)};a._sqlite3_result_text16le=function(){return(a._sqlite3_result_text16le=a.asm.ac).apply(null,arguments)};a._sqlite3_result_value=function(){return(a._sqlite3_result_value=a.asm.bc).apply(null,arguments)};
a._sqlite3_result_error_toobig=function(){return(a._sqlite3_result_error_toobig=a.asm.cc).apply(null,arguments)};a._sqlite3_result_zeroblob=function(){return(a._sqlite3_result_zeroblob=a.asm.dc).apply(null,arguments)};a._sqlite3_result_zeroblob64=function(){return(a._sqlite3_result_zeroblob64=a.asm.ec).apply(null,arguments)};a._sqlite3_result_error_code=function(){return(a._sqlite3_result_error_code=a.asm.fc).apply(null,arguments)};
a._sqlite3_result_error_nomem=function(){return(a._sqlite3_result_error_nomem=a.asm.gc).apply(null,arguments)};a._sqlite3_user_data=function(){return(a._sqlite3_user_data=a.asm.hc).apply(null,arguments)};a._sqlite3_context_db_handle=function(){return(a._sqlite3_context_db_handle=a.asm.ic).apply(null,arguments)};a._sqlite3_vtab_nochange=function(){return(a._sqlite3_vtab_nochange=a.asm.jc).apply(null,arguments)};
a._sqlite3_vtab_in_first=function(){return(a._sqlite3_vtab_in_first=a.asm.kc).apply(null,arguments)};a._sqlite3_vtab_in_next=function(){return(a._sqlite3_vtab_in_next=a.asm.lc).apply(null,arguments)};a._sqlite3_aggregate_context=function(){return(a._sqlite3_aggregate_context=a.asm.mc).apply(null,arguments)};a._sqlite3_get_auxdata=function(){return(a._sqlite3_get_auxdata=a.asm.nc).apply(null,arguments)};a._sqlite3_set_auxdata=function(){return(a._sqlite3_set_auxdata=a.asm.oc).apply(null,arguments)};
a._sqlite3_column_count=function(){return(a._sqlite3_column_count=a.asm.pc).apply(null,arguments)};a._sqlite3_data_count=function(){return(a._sqlite3_data_count=a.asm.qc).apply(null,arguments)};a._sqlite3_column_blob=function(){return(a._sqlite3_column_blob=a.asm.rc).apply(null,arguments)};a._sqlite3_column_bytes=function(){return(a._sqlite3_column_bytes=a.asm.sc).apply(null,arguments)};a._sqlite3_column_bytes16=function(){return(a._sqlite3_column_bytes16=a.asm.tc).apply(null,arguments)};
a._sqlite3_column_double=function(){return(a._sqlite3_column_double=a.asm.uc).apply(null,arguments)};a._sqlite3_column_text=function(){return(a._sqlite3_column_text=a.asm.vc).apply(null,arguments)};a._sqlite3_column_value=function(){return(a._sqlite3_column_value=a.asm.wc).apply(null,arguments)};a._sqlite3_column_text16=function(){return(a._sqlite3_column_text16=a.asm.xc).apply(null,arguments)};a._sqlite3_column_type=function(){return(a._sqlite3_column_type=a.asm.yc).apply(null,arguments)};
a._sqlite3_column_name=function(){return(a._sqlite3_column_name=a.asm.zc).apply(null,arguments)};a._sqlite3_column_name16=function(){return(a._sqlite3_column_name16=a.asm.Ac).apply(null,arguments)};a._sqlite3_bind_blob=function(){return(a._sqlite3_bind_blob=a.asm.Bc).apply(null,arguments)};a._sqlite3_bind_blob64=function(){return(a._sqlite3_bind_blob64=a.asm.Cc).apply(null,arguments)};a._sqlite3_bind_double=function(){return(a._sqlite3_bind_double=a.asm.Dc).apply(null,arguments)};
a._sqlite3_bind_int=function(){return(a._sqlite3_bind_int=a.asm.Ec).apply(null,arguments)};a._sqlite3_bind_int64=function(){return(a._sqlite3_bind_int64=a.asm.Fc).apply(null,arguments)};a._sqlite3_bind_null=function(){return(a._sqlite3_bind_null=a.asm.Gc).apply(null,arguments)};a._sqlite3_bind_pointer=function(){return(a._sqlite3_bind_pointer=a.asm.Hc).apply(null,arguments)};a._sqlite3_bind_text=function(){return(a._sqlite3_bind_text=a.asm.Ic).apply(null,arguments)};
a._sqlite3_bind_text64=function(){return(a._sqlite3_bind_text64=a.asm.Jc).apply(null,arguments)};a._sqlite3_bind_text16=function(){return(a._sqlite3_bind_text16=a.asm.Kc).apply(null,arguments)};a._sqlite3_bind_value=function(){return(a._sqlite3_bind_value=a.asm.Lc).apply(null,arguments)};a._sqlite3_bind_zeroblob=function(){return(a._sqlite3_bind_zeroblob=a.asm.Mc).apply(null,arguments)};a._sqlite3_bind_zeroblob64=function(){return(a._sqlite3_bind_zeroblob64=a.asm.Nc).apply(null,arguments)};
a._sqlite3_bind_parameter_count=function(){return(a._sqlite3_bind_parameter_count=a.asm.Oc).apply(null,arguments)};a._sqlite3_bind_parameter_name=function(){return(a._sqlite3_bind_parameter_name=a.asm.Pc).apply(null,arguments)};a._sqlite3_bind_parameter_index=function(){return(a._sqlite3_bind_parameter_index=a.asm.Qc).apply(null,arguments)};a._sqlite3_db_handle=function(){return(a._sqlite3_db_handle=a.asm.Rc).apply(null,arguments)};
a._sqlite3_stmt_readonly=function(){return(a._sqlite3_stmt_readonly=a.asm.Sc).apply(null,arguments)};a._sqlite3_stmt_isexplain=function(){return(a._sqlite3_stmt_isexplain=a.asm.Tc).apply(null,arguments)};a._sqlite3_stmt_explain=function(){return(a._sqlite3_stmt_explain=a.asm.Uc).apply(null,arguments)};a._sqlite3_stmt_busy=function(){return(a._sqlite3_stmt_busy=a.asm.Vc).apply(null,arguments)};a._sqlite3_next_stmt=function(){return(a._sqlite3_next_stmt=a.asm.Wc).apply(null,arguments)};
a._sqlite3_stmt_status=function(){return(a._sqlite3_stmt_status=a.asm.Xc).apply(null,arguments)};a._sqlite3_sql=function(){return(a._sqlite3_sql=a.asm.Yc).apply(null,arguments)};a._sqlite3_expanded_sql=function(){return(a._sqlite3_expanded_sql=a.asm.Zc).apply(null,arguments)};a._sqlite3_value_numeric_type=function(){return(a._sqlite3_value_numeric_type=a.asm._c).apply(null,arguments)};a._sqlite3_blob_open=function(){return(a._sqlite3_blob_open=a.asm.$c).apply(null,arguments)};
a._sqlite3_blob_close=function(){return(a._sqlite3_blob_close=a.asm.ad).apply(null,arguments)};a._sqlite3_blob_read=function(){return(a._sqlite3_blob_read=a.asm.bd).apply(null,arguments)};a._sqlite3_blob_write=function(){return(a._sqlite3_blob_write=a.asm.cd).apply(null,arguments)};a._sqlite3_blob_bytes=function(){return(a._sqlite3_blob_bytes=a.asm.dd).apply(null,arguments)};a._sqlite3_blob_reopen=function(){return(a._sqlite3_blob_reopen=a.asm.ed).apply(null,arguments)};
a._sqlite3_set_authorizer=function(){return(a._sqlite3_set_authorizer=a.asm.fd).apply(null,arguments)};a._sqlite3_strglob=function(){return(a._sqlite3_strglob=a.asm.gd).apply(null,arguments)};a._sqlite3_strlike=function(){return(a._sqlite3_strlike=a.asm.hd).apply(null,arguments)};a._sqlite3_errmsg=function(){return(a._sqlite3_errmsg=a.asm.id).apply(null,arguments)};a._sqlite3_auto_extension=function(){return(a._sqlite3_auto_extension=a.asm.jd).apply(null,arguments)};
a._sqlite3_cancel_auto_extension=function(){return(a._sqlite3_cancel_auto_extension=a.asm.kd).apply(null,arguments)};a._sqlite3_reset_auto_extension=function(){return(a._sqlite3_reset_auto_extension=a.asm.ld).apply(null,arguments)};a._sqlite3_prepare=function(){return(a._sqlite3_prepare=a.asm.md).apply(null,arguments)};a._sqlite3_prepare_v3=function(){return(a._sqlite3_prepare_v3=a.asm.nd).apply(null,arguments)};a._sqlite3_prepare16=function(){return(a._sqlite3_prepare16=a.asm.od).apply(null,arguments)};
a._sqlite3_prepare16_v2=function(){return(a._sqlite3_prepare16_v2=a.asm.pd).apply(null,arguments)};a._sqlite3_prepare16_v3=function(){return(a._sqlite3_prepare16_v3=a.asm.qd).apply(null,arguments)};a._sqlite3_get_table=function(){return(a._sqlite3_get_table=a.asm.rd).apply(null,arguments)};a._sqlite3_free_table=function(){return(a._sqlite3_free_table=a.asm.sd).apply(null,arguments)};a._sqlite3_create_module=function(){return(a._sqlite3_create_module=a.asm.td).apply(null,arguments)};
a._sqlite3_create_module_v2=function(){return(a._sqlite3_create_module_v2=a.asm.ud).apply(null,arguments)};a._sqlite3_drop_modules=function(){return(a._sqlite3_drop_modules=a.asm.vd).apply(null,arguments)};a._sqlite3_declare_vtab=function(){return(a._sqlite3_declare_vtab=a.asm.wd).apply(null,arguments)};a._sqlite3_vtab_on_conflict=function(){return(a._sqlite3_vtab_on_conflict=a.asm.xd).apply(null,arguments)};a._sqlite3_vtab_config=function(){return(a._sqlite3_vtab_config=a.asm.yd).apply(null,arguments)};
a._sqlite3_vtab_collation=function(){return(a._sqlite3_vtab_collation=a.asm.zd).apply(null,arguments)};a._sqlite3_vtab_in=function(){return(a._sqlite3_vtab_in=a.asm.Ad).apply(null,arguments)};a._sqlite3_vtab_rhs_value=function(){return(a._sqlite3_vtab_rhs_value=a.asm.Bd).apply(null,arguments)};a._sqlite3_vtab_distinct=function(){return(a._sqlite3_vtab_distinct=a.asm.Cd).apply(null,arguments)};a._sqlite3_keyword_name=function(){return(a._sqlite3_keyword_name=a.asm.Dd).apply(null,arguments)};
a._sqlite3_keyword_count=function(){return(a._sqlite3_keyword_count=a.asm.Ed).apply(null,arguments)};a._sqlite3_keyword_check=function(){return(a._sqlite3_keyword_check=a.asm.Fd).apply(null,arguments)};a._sqlite3_complete=function(){return(a._sqlite3_complete=a.asm.Gd).apply(null,arguments)};a._sqlite3_complete16=function(){return(a._sqlite3_complete16=a.asm.Hd).apply(null,arguments)};a._sqlite3_libversion=function(){return(a._sqlite3_libversion=a.asm.Id).apply(null,arguments)};
a._sqlite3_libversion_number=function(){return(a._sqlite3_libversion_number=a.asm.Jd).apply(null,arguments)};a._sqlite3_threadsafe=function(){return(a._sqlite3_threadsafe=a.asm.Kd).apply(null,arguments)};a._sqlite3_initialize=function(){return(a._sqlite3_initialize=a.asm.Ld).apply(null,arguments)};a._sqlite3_shutdown=function(){return(a._sqlite3_shutdown=a.asm.Md).apply(null,arguments)};a._sqlite3_config=function(){return(a._sqlite3_config=a.asm.Nd).apply(null,arguments)};
a._sqlite3_db_mutex=function(){return(a._sqlite3_db_mutex=a.asm.Od).apply(null,arguments)};a._sqlite3_db_release_memory=function(){return(a._sqlite3_db_release_memory=a.asm.Pd).apply(null,arguments)};a._sqlite3_db_cacheflush=function(){return(a._sqlite3_db_cacheflush=a.asm.Qd).apply(null,arguments)};a._sqlite3_db_config=function(){return(a._sqlite3_db_config=a.asm.Rd).apply(null,arguments)};a._sqlite3_last_insert_rowid=function(){return(a._sqlite3_last_insert_rowid=a.asm.Sd).apply(null,arguments)};
a._sqlite3_set_last_insert_rowid=function(){return(a._sqlite3_set_last_insert_rowid=a.asm.Td).apply(null,arguments)};a._sqlite3_changes64=function(){return(a._sqlite3_changes64=a.asm.Ud).apply(null,arguments)};a._sqlite3_changes=function(){return(a._sqlite3_changes=a.asm.Vd).apply(null,arguments)};a._sqlite3_total_changes64=function(){return(a._sqlite3_total_changes64=a.asm.Wd).apply(null,arguments)};a._sqlite3_total_changes=function(){return(a._sqlite3_total_changes=a.asm.Xd).apply(null,arguments)};
a._sqlite3_txn_state=function(){return(a._sqlite3_txn_state=a.asm.Yd).apply(null,arguments)};a._sqlite3_close=function(){return(a._sqlite3_close=a.asm.Zd).apply(null,arguments)};a._sqlite3_close_v2=function(){return(a._sqlite3_close_v2=a.asm._d).apply(null,arguments)};a._sqlite3_busy_handler=function(){return(a._sqlite3_busy_handler=a.asm.$d).apply(null,arguments)};a._sqlite3_progress_handler=function(){return(a._sqlite3_progress_handler=a.asm.ae).apply(null,arguments)};
a._sqlite3_busy_timeout=function(){return(a._sqlite3_busy_timeout=a.asm.be).apply(null,arguments)};a._sqlite3_interrupt=function(){return(a._sqlite3_interrupt=a.asm.ce).apply(null,arguments)};a._sqlite3_is_interrupted=function(){return(a._sqlite3_is_interrupted=a.asm.de).apply(null,arguments)};a._sqlite3_create_function=function(){return(a._sqlite3_create_function=a.asm.ee).apply(null,arguments)};a._sqlite3_create_function_v2=function(){return(a._sqlite3_create_function_v2=a.asm.fe).apply(null,arguments)};
a._sqlite3_create_window_function=function(){return(a._sqlite3_create_window_function=a.asm.ge).apply(null,arguments)};a._sqlite3_create_function16=function(){return(a._sqlite3_create_function16=a.asm.he).apply(null,arguments)};a._sqlite3_overload_function=function(){return(a._sqlite3_overload_function=a.asm.ie).apply(null,arguments)};a._sqlite3_trace_v2=function(){return(a._sqlite3_trace_v2=a.asm.je).apply(null,arguments)};
a._sqlite3_commit_hook=function(){return(a._sqlite3_commit_hook=a.asm.ke).apply(null,arguments)};a._sqlite3_update_hook=function(){return(a._sqlite3_update_hook=a.asm.le).apply(null,arguments)};a._sqlite3_rollback_hook=function(){return(a._sqlite3_rollback_hook=a.asm.me).apply(null,arguments)};a._sqlite3_autovacuum_pages=function(){return(a._sqlite3_autovacuum_pages=a.asm.ne).apply(null,arguments)};
a._sqlite3_wal_autocheckpoint=function(){return(a._sqlite3_wal_autocheckpoint=a.asm.oe).apply(null,arguments)};a._sqlite3_wal_hook=function(){return(a._sqlite3_wal_hook=a.asm.pe).apply(null,arguments)};a._sqlite3_wal_checkpoint_v2=function(){return(a._sqlite3_wal_checkpoint_v2=a.asm.qe).apply(null,arguments)};a._sqlite3_wal_checkpoint=function(){return(a._sqlite3_wal_checkpoint=a.asm.re).apply(null,arguments)};
a._sqlite3_error_offset=function(){return(a._sqlite3_error_offset=a.asm.se).apply(null,arguments)};a._sqlite3_errmsg16=function(){return(a._sqlite3_errmsg16=a.asm.te).apply(null,arguments)};a._sqlite3_errcode=function(){return(a._sqlite3_errcode=a.asm.ue).apply(null,arguments)};a._sqlite3_extended_errcode=function(){return(a._sqlite3_extended_errcode=a.asm.ve).apply(null,arguments)};a._sqlite3_system_errno=function(){return(a._sqlite3_system_errno=a.asm.we).apply(null,arguments)};
a._sqlite3_errstr=function(){return(a._sqlite3_errstr=a.asm.xe).apply(null,arguments)};a._sqlite3_limit=function(){return(a._sqlite3_limit=a.asm.ye).apply(null,arguments)};a._sqlite3_open=function(){return(a._sqlite3_open=a.asm.ze).apply(null,arguments)};a._sqlite3_open_v2=function(){return(a._sqlite3_open_v2=a.asm.Ae).apply(null,arguments)};a._sqlite3_open16=function(){return(a._sqlite3_open16=a.asm.Be).apply(null,arguments)};
a._sqlite3_create_collation=function(){return(a._sqlite3_create_collation=a.asm.Ce).apply(null,arguments)};a._sqlite3_create_collation_v2=function(){return(a._sqlite3_create_collation_v2=a.asm.De).apply(null,arguments)};a._sqlite3_create_collation16=function(){return(a._sqlite3_create_collation16=a.asm.Ee).apply(null,arguments)};a._sqlite3_collation_needed=function(){return(a._sqlite3_collation_needed=a.asm.Fe).apply(null,arguments)};
a._sqlite3_collation_needed16=function(){return(a._sqlite3_collation_needed16=a.asm.Ge).apply(null,arguments)};a._sqlite3_get_clientdata=function(){return(a._sqlite3_get_clientdata=a.asm.He).apply(null,arguments)};a._sqlite3_set_clientdata=function(){return(a._sqlite3_set_clientdata=a.asm.Ie).apply(null,arguments)};a._sqlite3_get_autocommit=function(){return(a._sqlite3_get_autocommit=a.asm.Je).apply(null,arguments)};
a._sqlite3_table_column_metadata=function(){return(a._sqlite3_table_column_metadata=a.asm.Ke).apply(null,arguments)};a._sqlite3_sleep=function(){return(a._sqlite3_sleep=a.asm.Le).apply(null,arguments)};a._sqlite3_extended_result_codes=function(){return(a._sqlite3_extended_result_codes=a.asm.Me).apply(null,arguments)};a._sqlite3_file_control=function(){return(a._sqlite3_file_control=a.asm.Ne).apply(null,arguments)};
a._sqlite3_test_control=function(){return(a._sqlite3_test_control=a.asm.Oe).apply(null,arguments)};a._sqlite3_create_filename=function(){return(a._sqlite3_create_filename=a.asm.Pe).apply(null,arguments)};a._sqlite3_free_filename=function(){return(a._sqlite3_free_filename=a.asm.Qe).apply(null,arguments)};a._sqlite3_uri_parameter=function(){return(a._sqlite3_uri_parameter=a.asm.Re).apply(null,arguments)};a._sqlite3_uri_key=function(){return(a._sqlite3_uri_key=a.asm.Se).apply(null,arguments)};
a._sqlite3_uri_boolean=function(){return(a._sqlite3_uri_boolean=a.asm.Te).apply(null,arguments)};a._sqlite3_uri_int64=function(){return(a._sqlite3_uri_int64=a.asm.Ue).apply(null,arguments)};a._sqlite3_filename_database=function(){return(a._sqlite3_filename_database=a.asm.Ve).apply(null,arguments)};a._sqlite3_filename_journal=function(){return(a._sqlite3_filename_journal=a.asm.We).apply(null,arguments)};a._sqlite3_filename_wal=function(){return(a._sqlite3_filename_wal=a.asm.Xe).apply(null,arguments)};
a._sqlite3_db_name=function(){return(a._sqlite3_db_name=a.asm.Ye).apply(null,arguments)};a._sqlite3_db_filename=function(){return(a._sqlite3_db_filename=a.asm.Ze).apply(null,arguments)};a._sqlite3_db_readonly=function(){return(a._sqlite3_db_readonly=a.asm._e).apply(null,arguments)};a._sqlite3_compileoption_used=function(){return(a._sqlite3_compileoption_used=a.asm.$e).apply(null,arguments)};a._sqlite3_compileoption_get=function(){return(a._sqlite3_compileoption_get=a.asm.af).apply(null,arguments)};
a._sqlite3_sourceid=function(){return(a._sqlite3_sourceid=a.asm.bf).apply(null,arguments)};a._sqlite3mc_config=function(){return(a._sqlite3mc_config=a.asm.cf).apply(null,arguments)};a._sqlite3mc_cipher_count=function(){return(a._sqlite3mc_cipher_count=a.asm.df).apply(null,arguments)};a._sqlite3mc_cipher_index=function(){return(a._sqlite3mc_cipher_index=a.asm.ef).apply(null,arguments)};a._sqlite3mc_cipher_name=function(){return(a._sqlite3mc_cipher_name=a.asm.ff).apply(null,arguments)};
a._sqlite3mc_config_cipher=function(){return(a._sqlite3mc_config_cipher=a.asm.gf).apply(null,arguments)};a._sqlite3mc_codec_data=function(){return(a._sqlite3mc_codec_data=a.asm.hf).apply(null,arguments)};a._sqlite3_key=function(){return(a._sqlite3_key=a.asm.jf).apply(null,arguments)};a._sqlite3_key_v2=function(){return(a._sqlite3_key_v2=a.asm.kf).apply(null,arguments)};a._sqlite3_rekey_v2=function(){return(a._sqlite3_rekey_v2=a.asm.lf).apply(null,arguments)};
a._sqlite3_rekey=function(){return(a._sqlite3_rekey=a.asm.mf).apply(null,arguments)};a._sqlite3_regexp_init=function(){return(a._sqlite3_regexp_init=a.asm.nf).apply(null,arguments)};a._sqlite3mc_register_cipher=function(){return(a._sqlite3mc_register_cipher=a.asm.of).apply(null,arguments)};
var kd=a.___errno_location=function(){return(kd=a.___errno_location=a.asm.pf).apply(null,arguments)},Rb=a._malloc=function(){return(Rb=a._malloc=a.asm.qf).apply(null,arguments)},$c=a._free=function(){return($c=a._free=a.asm.rf).apply(null,arguments)};a._RegisterExtensionFunctions=function(){return(a._RegisterExtensionFunctions=a.asm.sf).apply(null,arguments)};a._sqlite3Fts5BetterTrigramInit=function(){return(a._sqlite3Fts5BetterTrigramInit=a.asm.tf).apply(null,arguments)};
a._sqlite3Fts5HtmlInit=function(){return(a._sqlite3Fts5HtmlInit=a.asm.uf).apply(null,arguments)};a._set_authorizer=function(){return(a._set_authorizer=a.asm.vf).apply(null,arguments)};a._create_function=function(){return(a._create_function=a.asm.wf).apply(null,arguments)};a._create_module=function(){return(a._create_module=a.asm.xf).apply(null,arguments)};a._progress_handler=function(){return(a._progress_handler=a.asm.yf).apply(null,arguments)};
a._register_vfs=function(){return(a._register_vfs=a.asm.zf).apply(null,arguments)};a._getSqliteFree=function(){return(a._getSqliteFree=a.asm.Af).apply(null,arguments)};a._main=function(){return(a._main=a.asm.Bf).apply(null,arguments)};
var ab=a._emscripten_builtin_memalign=function(){return(ab=a._emscripten_builtin_memalign=a.asm.Cf).apply(null,arguments)},md=a.getTempRet0=function(){return(md=a.getTempRet0=a.asm.Ef).apply(null,arguments)},hd=a.stackSave=function(){return(hd=a.stackSave=a.asm.Ff).apply(null,arguments)},fd=a.stackRestore=function(){return(fd=a.stackRestore=a.asm.Gf).apply(null,arguments)},gd=a.stackAlloc=function(){return(gd=a.stackAlloc=a.asm.Hf).apply(null,arguments)},Yc=a._asyncify_start_unwind=function(){return(Yc=
a._asyncify_start_unwind=a.asm.If).apply(null,arguments)},Mc=a._asyncify_stop_unwind=function(){return(Mc=a._asyncify_stop_unwind=a.asm.Jf).apply(null,arguments)},Wc=a._asyncify_start_rewind=function(){return(Wc=a._asyncify_start_rewind=a.asm.Kf).apply(null,arguments)},Zc=a._asyncify_stop_rewind=function(){return(Zc=a._asyncify_stop_rewind=a.asm.Lf).apply(null,arguments)};a._sqlite3_version=3232;a.UTF8ToString=x;a.stringToUTF8=qa;a.lengthBytesUTF8=ra;a.getTempRet0=md;a.ccall=Z;
a.cwrap=function(b,c,d,e){d=d||[];var f=d.every(g=>"number"===g||"boolean"===g);return"string"!==c&&f&&!e?a["_"+b]:function(){return Z(b,c,d,arguments,e)}};
a.addFunction=function(b,c){if(!cd){cd=new WeakMap;var d=wa.length;if(cd)for(var e=0;e<0+d;e++){var f=wa.get(e);f&&cd.set(f,e)}}if(cd.has(b))return cd.get(b);if(dd.length)d=dd.pop();else{try{wa.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}d=wa.length-1}try{wa.set(d,b)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i32",f:"f32",d:"f64",p:"i32"};for(var g=
{parameters:[],results:"v"==c[0]?[]:[f[c[0]]]},h=1;h<c.length;++h)g.parameters.push(f[c[h]]),"j"===c[h]&&g.parameters.push("i32");c=new e(g,b)}else{e=[1];f=c.slice(0,1);c=c.slice(1);g={i:127,p:127,j:126,f:125,d:124};e.push(96);h=c.length;128>h?e.push(h):e.push(h%128|128,h>>7);for(h=0;h<c.length;++h)e.push(g[c[h]]);"v"==f?e.push(0):e.push(1,g[f]);c=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?c.push(f):c.push(f%128|128,f>>7);c.push.apply(c,e);c.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);c=new WebAssembly.Module(new Uint8Array(c));
c=(new WebAssembly.Instance(c,{e:{f:b}})).exports.f}wa.set(d,c)}cd.set(b,d);return d};a.setValue=M;a.getValue=L;a.intArrayFromString=Qa;a.intArrayToString=function(b){for(var c=[],d=0;d<b.length;d++){var e=b[d];255<e&&(e&=255);c.push(String.fromCharCode(e))}return c.join("")};a.AsciiToString=function(b){for(var c="";;){var d=y[b++>>0];if(!d)return c;c+=String.fromCharCode(d)}};
a.UTF16ToString=function(b,c){var d=b>>1;for(var e=d+c/2;!(d>=e)&&sa[d];)++d;d<<=1;if(32<d-b&&jd)return jd.decode(y.subarray(b,d));d="";for(e=0;!(e>=c/2);++e){var f=B[b+2*e>>1];if(0==f)break;d+=String.fromCharCode(f)}return d};a.stringToUTF16=function(b,c,d){void 0===d&&(d=2147483647);if(2>d)return 0;d-=2;var e=c;d=d<2*b.length?d/2:b.length;for(var f=0;f<d;++f)B[c>>1]=b.charCodeAt(f),c+=2;B[c>>1]=0;return c-e};
a.UTF32ToString=function(b,c){for(var d=0,e="";!(d>=c/4);){var f=C[b+4*d>>2];if(0==f)break;++d;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};a.stringToUTF32=function(b,c,d){void 0===d&&(d=2147483647);if(4>d)return 0;var e=c;d=e+d-4;for(var f=0;f<b.length;++f){var g=b.charCodeAt(f);if(55296<=g&&57343>=g){var h=b.charCodeAt(++f);g=65536+((g&1023)<<10)|h&1023}C[c>>2]=g;c+=4;if(c+4>d)break}C[c>>2]=0;return c-e};a.writeArrayToMemory=ed;var nd;
Ea=function od(){nd||pd();nd||(Ea=od)};
function pd(){function b(){if(!nd&&(nd=!0,a.calledRun=!0,!v)){a.noFSInit||Fb||(Fb=!0,Eb(),a.stdin=a.stdin,a.stdout=a.stdout,a.stderr=a.stderr,a.stdin?Ib("stdin",a.stdin):vb("/dev/tty","/dev/stdin"),a.stdout?Ib("stdout",null,a.stdout):vb("/dev/tty","/dev/stdout"),a.stderr?Ib("stderr",null,a.stderr):vb("/dev/tty1","/dev/stderr"),Cb("/dev/stdin",0),Cb("/dev/stdout",1),Cb("/dev/stderr",1));eb=!1;Ka(ya);Ka(za);aa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(qd){var c=a._main;try{var d=c(0,
0);if(!noExitRuntime){if(a.onExit)a.onExit(d);v=!0}ea(d,new Ja(d))}catch(e){Ic(e)}}if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)c=a.postRun.shift(),Aa.unshift(c);Ka(Aa)}}if(!(0<Ca)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Ba();Ka(xa);0<Ca||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}
if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();var qd=!0;a.noInitialRun&&(qd=!1);pd();
return Module.ready
}
);
})();
export default Module;
export default Module;

Some files were not shown because too many files have changed in this diff Show More