├── .browserslistrc ├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── babel.config.js ├── docs ├── css │ ├── app.a80ad6e5.css │ └── chunk-vendors.5dab068c.css ├── favicon.ico ├── fonts │ ├── Material-Design-Iconic-Font.0a121b5a.woff │ ├── Material-Design-Iconic-Font.ab076669.woff2 │ ├── Material-Design-Iconic-Font.ca2a27da.ttf │ ├── fa-brands-400.43f3639e.eot │ ├── fa-brands-400.4f19a040.woff2 │ ├── fa-brands-400.82c01c57.woff │ ├── fa-brands-400.e982da71.ttf │ ├── fa-regular-400.65fe1aaf.woff2 │ ├── fa-regular-400.96c7ccec.ttf │ ├── fa-regular-400.d1b0f28e.eot │ ├── fa-regular-400.f8fa5ead.woff │ ├── fa-solid-900.0cfd35a1.eot │ ├── fa-solid-900.5399a6c9.woff │ ├── fa-solid-900.94634175.woff2 │ ├── fa-solid-900.9bbe6838.ttf │ ├── ionicons.3cf90f29.woff │ ├── ionicons.57e1007e.ttf │ ├── ionicons.5ea9fc10.woff2 │ └── ionicons.c475170c.eot ├── img │ ├── fa-brands-400.16d74910.svg │ ├── fa-regular-400.07677cd8.svg │ ├── fa-solid-900.d3db2dbe.svg │ └── ionicons.cdb8d581.svg ├── index.html ├── js │ ├── app.662bffbd.js │ ├── app.662bffbd.js.map │ ├── chunk-vendors.eda312f4.js │ └── chunk-vendors.eda312f4.js.map ├── openMenu.jpg ├── pagesUI.jpg ├── selectBackup.jpg ├── shapeUpdate.jpg ├── sql-wasm.wasm └── worker.sql-wasm.js ├── package.json ├── public ├── favicon.ico ├── index.html ├── sql-wasm.wasm └── worker.sql-wasm.js ├── src ├── App.vue ├── AppSplitter.vue ├── _store │ ├── alert.module.js │ ├── index.js │ ├── loader.module.js │ └── splitter.module.js ├── components │ ├── Home.vue │ ├── Menu.vue │ └── Toolbar.vue └── main.js ├── vue.config.js └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | end_of_line = lf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true 7 | max_line_length = 100 8 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: [ 7 | 'plugin:vue/essential', 8 | '@vue/airbnb', 9 | ], 10 | parserOptions: { 11 | parser: '@babel/eslint-parser', 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 16 | 'no-shadow': [ 17 | 'error', 18 | { allow: ['state', 'getters'] }, 19 | ], 20 | 'no-plusplus': [ 21 | 'error', 22 | { allowForLoopAfterthoughts: true }, 23 | ], 24 | 'no-bitwise': 'off', 25 | }, 26 | }; 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | pnpm-debug.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Note Viewer 2 | 3 | A simple webapp to load your Onyx Boox Note backups. All the code is running on the client side. 4 | 5 | You can find an online demo running [here](https://billyledev.github.io/note-viewer/index.html). 6 | 7 | It is based on Vue.js framework and uses OnsenUI components. 8 | Additionally, this project uses [SQL.js](https://github.com/sql-js/sql.js) and [JSZip](https://github.com/Stuk/jszip) libs. 9 | Linting is done with ESLint using the AirBnB style. 10 | 11 |
12 |
13 | 14 | ## News 15 | 16 | Added support for circles, rectangles, triangles, lines, colors and thicknesses! 17 | 18 | ![Shape update image](https://billyledev.github.io/note-viewer/shapeUpdate.jpg) 19 | 20 |
21 |
22 | 23 | ## How to use 24 | 25 | First, click on the file icon to open the backup selection window. You can then select your notes backup (*.zip format). 26 | 27 | ![Open backup image](https://billyledev.github.io/note-viewer/selectBackup.jpg) 28 | 29 |
30 | 31 | Once the backup is loaded, you can open the menu by clicking on the top left icon. 32 | You can then select the note you want to load. 33 | 34 | ![Open menu image](https://billyledev.github.io/note-viewer/openMenu.jpg) 35 | 36 |
37 | 38 | After selecting the note, you can navigate between the pages by using the arrows. 39 | You will also find the current page and the number of pages at the bottom of the window. 40 | 41 | ![Note pages navigation](https://billyledev.github.io/note-viewer/pagesUI.jpg) 42 | 43 |
44 |
45 | 46 | ## Limitations 47 | 48 | The project is still in development and some functionalities might be missing. 49 | 50 |
51 |
52 | 53 | ## Project setup 54 | ``` 55 | yarn install 56 | ``` 57 | 58 | Remember to set CI_PROJECT_NAME environment variable for production build. 59 | 60 |
61 | 62 | ### Compiles and hot-reloads for development 63 | ``` 64 | yarn serve 65 | ``` 66 | 67 | ### Compiles and minifies for production 68 | ``` 69 | yarn build 70 | ``` 71 | 72 | ### Lints and fixes files 73 | ``` 74 | yarn lint 75 | ``` 76 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset', 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /docs/css/app.a80ad6e5.css: -------------------------------------------------------------------------------- 1 | .flex-container[data-v-9ece5aba]{display:flex;flex-direction:column;align-items:stretch;height:100%}.page-center[data-v-9ece5aba]{order:0;flex:1 1 auto;align-self:auto;display:flex;flex-direction:column;justify-content:center;align-items:center}.arrow-icon[data-v-9ece5aba]{margin:0 10px}.arrow-right[data-v-9ece5aba]{text-align:right}.pagination[data-v-9ece5aba]{display:flex;justify-content:center;align-self:center}canvas[data-v-9ece5aba]{width:100%} -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/favicon.ico -------------------------------------------------------------------------------- /docs/fonts/Material-Design-Iconic-Font.0a121b5a.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/Material-Design-Iconic-Font.0a121b5a.woff -------------------------------------------------------------------------------- /docs/fonts/Material-Design-Iconic-Font.ab076669.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/Material-Design-Iconic-Font.ab076669.woff2 -------------------------------------------------------------------------------- /docs/fonts/Material-Design-Iconic-Font.ca2a27da.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/Material-Design-Iconic-Font.ca2a27da.ttf -------------------------------------------------------------------------------- /docs/fonts/fa-brands-400.43f3639e.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-brands-400.43f3639e.eot -------------------------------------------------------------------------------- /docs/fonts/fa-brands-400.4f19a040.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-brands-400.4f19a040.woff2 -------------------------------------------------------------------------------- /docs/fonts/fa-brands-400.82c01c57.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-brands-400.82c01c57.woff -------------------------------------------------------------------------------- /docs/fonts/fa-brands-400.e982da71.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-brands-400.e982da71.ttf -------------------------------------------------------------------------------- /docs/fonts/fa-regular-400.65fe1aaf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-regular-400.65fe1aaf.woff2 -------------------------------------------------------------------------------- /docs/fonts/fa-regular-400.96c7ccec.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-regular-400.96c7ccec.ttf -------------------------------------------------------------------------------- /docs/fonts/fa-regular-400.d1b0f28e.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-regular-400.d1b0f28e.eot -------------------------------------------------------------------------------- /docs/fonts/fa-regular-400.f8fa5ead.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-regular-400.f8fa5ead.woff -------------------------------------------------------------------------------- /docs/fonts/fa-solid-900.0cfd35a1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-solid-900.0cfd35a1.eot -------------------------------------------------------------------------------- /docs/fonts/fa-solid-900.5399a6c9.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-solid-900.5399a6c9.woff -------------------------------------------------------------------------------- /docs/fonts/fa-solid-900.94634175.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-solid-900.94634175.woff2 -------------------------------------------------------------------------------- /docs/fonts/fa-solid-900.9bbe6838.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/fa-solid-900.9bbe6838.ttf -------------------------------------------------------------------------------- /docs/fonts/ionicons.3cf90f29.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/ionicons.3cf90f29.woff -------------------------------------------------------------------------------- /docs/fonts/ionicons.57e1007e.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/ionicons.57e1007e.ttf -------------------------------------------------------------------------------- /docs/fonts/ionicons.5ea9fc10.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/ionicons.5ea9fc10.woff2 -------------------------------------------------------------------------------- /docs/fonts/ionicons.c475170c.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/fonts/ionicons.c475170c.eot -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | note-viewer
-------------------------------------------------------------------------------- /docs/js/app.662bffbd.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";var e={6612:function(e,t,s){var o=s(144),a=s(4430),i=s.n(a),n=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("app-splitter"),t("v-ons-toast",{attrs:{visible:e.visible},on:{"update:visible":function(t){e.visible=t}}},[e._v(" "+e._s(e.visible?e.active.message:"")+" ")])],1)},r=[],l=s(629),c=function(){var e=this,t=e._self._c;return t("v-ons-splitter",[t("v-ons-splitter-side",{attrs:{swipeable:"",side:"left",collapse:"",width:"80%",animation:e.md?"overlay":"reveal","swipe-target-width":e.md&&25,open:e.isOpen},on:{"update:open":function(t){e.isOpen=t}}},[t("Menu")],1),t("v-ons-splitter-content",[t("Home")],1)],1)},d=[],u=function(){var e=this,t=e._self._c;return t("v-ons-page",[t("v-ons-list",[e.rootNotes.length?t("div",[t("ons-list-header",[e._v("Root")]),e._l(e.rootNotes,(function(s){return t("ons-list-item",{key:s.id,attrs:{modifier:"chevron",tappable:""},on:{click:function(t){return e.selectNote(s.id)}}},[e._v(" "+e._s(s.title)+" ")])}))],2):e._e(),e._l(e.notesItems,(function(s){return[s.folder?t("ons-list-header",{key:`folder-${s.id}`},[e._v(" "+e._s(s.title)+" ")]):t("ons-list-item",{key:`note-${s.id}`,attrs:{modifier:"chevron",tappable:""},on:{click:function(t){return e.selectNote(s.id)}}},[e._v(" "+e._s(s.title)+" ")])]}))],2)],1)},h=[],p={name:"MenuView",computed:{...(0,l.Se)("loader",["notesItems","rootNotes"])},methods:{...(0,l.nv)("loader",["selectNote"])}},g=p,m=s(1001),f=(0,m.Z)(g,u,h,!1,null,null,null),v=f.exports,b=function(){var e=this,t=e._self._c;return t("v-ons-page",[t("input",{staticStyle:{display:"none"},attrs:{id:"file-input",type:"file",name:"name",accept:"application/zip",label:""}}),t("toolbar",e._b({},"toolbar",e.toolbarInfo,!1)),t("div",{staticClass:"flex-container"},[t("div",{staticClass:"page-center"},[t("canvas",{directives:[{name:"show",rawName:"v-show",value:e.status.shapeDBLoaded,expression:"status.shapeDBLoaded"}],attrs:{id:"note-canvas"}}),t("v-ons-row",{directives:[{name:"show",rawName:"v-show",value:e.status.shapeDBLoaded&&e.selected,expression:"status.shapeDBLoaded && selected"}]},[t("v-ons-col",[t("v-ons-icon",{staticClass:"arrow-icon",attrs:{size:"2em",icon:"ion-ios-arrow-back, material:md-arrow-left"},on:{click:function(t){return e.navigatePage(!1)}}})],1),t("v-ons-col",{staticClass:"pagination"},[e._v(e._s(e.pagination))]),t("v-ons-col",{staticClass:"arrow-right"},[t("v-ons-icon",{staticClass:"arrow-icon",attrs:{size:"2em",icon:"ion-ios-arrow-forward, material:md-arrow-right"},on:{click:function(t){return e.navigatePage(!0)}}})],1)],1),t("v-ons-icon",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.status.shapeDBLoaded,expression:"!loading && !status.shapeDBLoaded"}],attrs:{size:"2em",icon:"ion-ios-document, material:md-file"},on:{click:function(t){return e.openFileDialog()}}}),t("v-ons-progress-circular",{directives:[{name:"show",rawName:"v-show",value:e.loading&&!e.status.shapeDBLoaded,expression:"loading && !status.shapeDBLoaded"}],attrs:{indeterminate:""}})],1)])],1)},w=[],x=(s(7658),s(5733)),y=s.n(x),k=function(){var e=this,t=e._self._c;return t("v-ons-toolbar",[t("div",{staticClass:"left"},[t("v-ons-toolbar-button",{on:{click:function(t){return e.$store.commit("splitter/toggle")}}},[t("v-ons-icon",{attrs:{icon:"ion-ios-menu, material:md-menu"}})],1)],1),t("div",{staticClass:"center"},[e._v(" "+e._s(e.title)+" ")])])},D=[],_={name:"ToolbarComponent",props:["title"]},B=_,S=(0,m.Z)(B,k,D,!1,null,null,null),L=S.exports,O={name:"HomeView",components:{Toolbar:L},data(){return{toolbarInfo:{title:"Note Viewer"},zip:null,worker:null,pages:null,currentPage:null,pagination:"",canvas:null,width:null,height:null,ctx:null}},computed:{...(0,l.rn)("loader",["status","loading","shapeDB","selected"])},methods:{...(0,l.nv)("loader",["startLoading","zipLoaded","badZipFile","badDatabaseFile","shapeDBLoaded","badNoteFile"]),openFileDialog(){document.getElementById("file-input").click()},loadShapeDB(){const e=this.zip.file("ShapeDatabase.db");e?e.async("uint8array").then((e=>{this.worker.postMessage({id:"openShapeDB",action:"open",buffer:e})})):this.badDatabaseFile()},parseShapeDB(e){const t=[];for(let s=0;s{this.worker.postMessage({id:"openNote",action:"open",buffer:e})})):this.badNoteFile()},parseShapeModel(e){const t=e.columns.indexOf("pageUniqueId"),s=e.columns.indexOf("color"),o=e.columns.indexOf("thickness"),a=e.columns.indexOf("points"),i=e.columns.indexOf("shapeType"),n=e.values,r={};for(let d=0;d>>0).toString(16).substring(2);r[e].shapes.push({color:l,thickness:n[d][o],points:n[d][a],type:n[d][i]})}this.pages=r;const l=Object.keys(r);[this.currentPage]=l,this.pagination=`1/${l.length}`;const c=this.pages[this.currentPage];this.drawPage(c)},navigatePage(e){const t=Object.keys(this.pages);let s=t.indexOf(this.currentPage);s=e?s+1:s-1,s=s<0?t.length-1:s,s=s===t.length?0:s,this.currentPage=t[s],this.pagination=`${s+1}/${t.length}`;const o=this.pages[this.currentPage];this.drawPage(o)},getValues(e,t){const s={};return s.x=e.getFloat32(t),s.y=e.getFloat32(t+4),s.pressure=e.getFloat32(t+8),s.size=e.getFloat32(t+12),s.timestamp=Number(e.getBigInt64(t+16)),s},drawPage(e){this.ctx.clearRect(0,0,this.width,this.height);for(let t=0;t{const{data:t}=e;switch(t.id){case"openShapeDB":this.worker.postMessage({id:"loadShapeDB",action:"exec",sql:"SELECT * FROM NoteModel"});break;case"loadShapeDB":{const e=t.results[0].values;this.parseShapeDB(e);break}case"openNote":this.worker.postMessage({id:"loadShapeModel",action:"exec",sql:"SELECT * FROM NewShapeModel"});break;case"loadShapeModel":this.parseShapeModel(t.results[0]);break;default:break}}},mounted(){const e=document.getElementById("file-input");e.addEventListener("change",(()=>{this.startLoading();const t=e.files[0];y().loadAsync(t).then((e=>{this.zip=e,this.zipLoaded()}),(()=>{this.badZipFile()}))})),this.canvas=document.getElementById("note-canvas"),this.ctx=this.canvas.getContext("2d");const t=window.innerWidth,s=t*(4/3);this.width=t,this.height=s,this.canvas.width=t,this.canvas.height=s},watch:{status(e){e.zipLoaded&&this.loadShapeDB()},selected(e){this.loadNote(e)}}},P=O,N=(0,m.Z)(P,b,w,!1,null,"9ece5aba",null),T=N.exports,F={name:"AppSplitter",components:{Menu:v,Home:T},computed:{isOpen:{get(){return this.$store.state.splitter.open},set(e){this.$store.commit("splitter/toggle",e)}}}},M=F,I=(0,m.Z)(M,c,d,!1,null,null,null),Z=I.exports,z={name:"App",components:{AppSplitter:Z},computed:{...(0,l.Se)("alert",["visible"]),...(0,l.rn)("alert",["active"])}},C=z,q=(0,m.Z)(C,n,r,!1,null,null,null),E=q.exports;const $=3e3,j=e=>setTimeout(e,$),V={queue:[],active:void 0,timeoutId:void 0},A={visible:e=>!!e.active},R={enqueue(e,{toast:t}){e.queue.push(t)},dequeue(e,{timeoutId:t}){const s=e.queue.shift();e.active=s,e.timeoutId=t},reset(e){const{timeoutId:t}=e;t&&clearTimeout(t),e.active=void 0,e.timeoutId=void 0}},H={pushToast({state:e,commit:t,dispatch:s},o){t("enqueue",{toast:o}),e.active||s("processQueue")},processQueue({state:e,commit:t,dispatch:s}){if(!e.queue.length&&!e.active)return;if(!e.queue.length&&e.active)return j((()=>t("reset")));const o=j((()=>s("processQueue")));t("dequeue",{timeoutId:o})}},Q={};var W={namespaced:!0,state:V,getters:A,mutations:R,actions:H,modules:Q};const J={open:!1},U={},G={toggle(e,t){e.open="boolean"===typeof t?t:!e.open}},K={},X={};var Y={namespaced:!0,state:J,getters:U,mutations:G,actions:K,modules:X};const ee={status:{},loading:!1,shapeDB:[],selected:""},te={notesItems:(e,t)=>{const{folders:s}=t;let o=[];for(let a=0;ae.parent===t.id));i=JSON.parse(JSON.stringify(i)),o=o.concat(i)}return o},folders:e=>e.shapeDB.filter((e=>e.folder)),rootNotes:e=>e.shapeDB.filter((e=>null===e.parent))},se={startLoading(e){e.loading=!0},zipLoaded(e){e.status={},e.status.zipLoaded=!0},badZipFile(e){e.status={},e.loading=!1},badDatabaseFile(e){e.status={},e.loading=!1},shapeDBLoaded(e,t){e.status={},e.status.shapeDBLoaded=!0,e.loading=!1,e.shapeDB=t},selectNote(e,t){e.selected=t,e.loading=!0}},oe={startLoading({commit:e}){e("startLoading")},zipLoaded({commit:e}){e("zipLoaded")},badZipFile({commit:e,dispatch:t}){t("alert/pushToast",{message:"Error while loading backup file!"},{root:!0}),e("badZipFile")},badDatabaseFile({commit:e,dispatch:t}){t("alert/pushToast",{message:"Error while loading notes database!"},{root:!0}),e("badDatabaseFile")},shapeDBLoaded({commit:e},t){e("shapeDBLoaded",t)},selectNote({commit:e},t){e("splitter/toggle",{},{root:!0}),e("selectNote",t)},badNoteFile({dispatch:e}){e("alert/pushToast",{message:"Error while loading this note data!"},{root:!0})}},ae={};var ie={namespaced:!0,state:ee,getters:te,mutations:se,actions:oe,modules:ae};o.ZP.use(l.ZP);var ne=new l.ZP.Store({strict:!1,namespaced:!0,state:{},getters:{},mutations:{},actions:{},modules:{alert:W,splitter:Y,loader:ie}});o.ZP.use(i()),o.ZP.config.productionTip=!1,new o.ZP({store:ne,render:e=>e(E),beforeCreate(){o.ZP.prototype.md=this.$ons.platform.isAndroid()}}).$mount("#app")}},t={};function s(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,s),i.exports}s.m=e,function(){var e=[];s.O=function(t,o,a,i){if(!o){var n=1/0;for(d=0;d=i)&&Object.keys(s.O).every((function(e){return s.O[e](o[l])}))?o.splice(l--,1):(r=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[o,a,i]}}(),function(){s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,{a:t}),t}}(),function(){s.d=function(e,t){for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){var e={143:0};s.O.j=function(t){return 0===e[t]};var t=function(t,o){var a,i,n=o[0],r=o[1],l=o[2],c=0;if(n.some((function(t){return 0!==e[t]}))){for(a in r)s.o(r,a)&&(s.m[a]=r[a]);if(l)var d=l(s)}for(t&&t(o);c\n \n \n \n
\n Root\n \n {{ item.title }}\n \n
\n \n \n
\n
\n\n\n\n","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Menu.vue?vue&type=template&id=7891183b&\"\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-ons-page',[_c('input',{staticStyle:{\"display\":\"none\"},attrs:{\"id\":\"file-input\",\"type\":\"file\",\"name\":\"name\",\"accept\":\"application/zip\",\"label\":\"\"}}),_c('toolbar',_vm._b({},'toolbar',_vm.toolbarInfo,false)),_c('div',{staticClass:\"flex-container\"},[_c('div',{staticClass:\"page-center\"},[_c('canvas',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.status.shapeDBLoaded),expression:\"status.shapeDBLoaded\"}],attrs:{\"id\":\"note-canvas\"}}),_c('v-ons-row',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.status.shapeDBLoaded && _vm.selected),expression:\"status.shapeDBLoaded && selected\"}]},[_c('v-ons-col',[_c('v-ons-icon',{staticClass:\"arrow-icon\",attrs:{\"size\":\"2em\",\"icon\":\"ion-ios-arrow-back, material:md-arrow-left\"},on:{\"click\":function($event){return _vm.navigatePage(false)}}})],1),_c('v-ons-col',{staticClass:\"pagination\"},[_vm._v(_vm._s(_vm.pagination))]),_c('v-ons-col',{staticClass:\"arrow-right\"},[_c('v-ons-icon',{staticClass:\"arrow-icon\",attrs:{\"size\":\"2em\",\"icon\":\"ion-ios-arrow-forward, material:md-arrow-right\"},on:{\"click\":function($event){return _vm.navigatePage(true)}}})],1)],1),_c('v-ons-icon',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.loading && !_vm.status.shapeDBLoaded),expression:\"!loading && !status.shapeDBLoaded\"}],attrs:{\"size\":\"2em\",\"icon\":\"ion-ios-document, material:md-file\"},on:{\"click\":function($event){return _vm.openFileDialog()}}}),_c('v-ons-progress-circular',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.loading && !_vm.status.shapeDBLoaded),expression:\"loading && !status.shapeDBLoaded\"}],attrs:{\"indeterminate\":\"\"}})],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-ons-toolbar',[_c('div',{staticClass:\"left\"},[_c('v-ons-toolbar-button',{on:{\"click\":function($event){return _vm.$store.commit('splitter/toggle')}}},[_c('v-ons-icon',{attrs:{\"icon\":\"ion-ios-menu, material:md-menu\"}})],1)],1),_c('div',{staticClass:\"center\"},[_vm._v(\" \"+_vm._s(_vm.title)+\" \")])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Toolbar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Toolbar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Toolbar.vue?vue&type=template&id=5d4c9106&\"\nimport script from \"./Toolbar.vue?vue&type=script&lang=js&\"\nexport * from \"./Toolbar.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Home.vue?vue&type=template&id=9ece5aba&scoped=true&\"\nimport script from \"./Home.vue?vue&type=script&lang=js&\"\nexport * from \"./Home.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Home.vue?vue&type=style&index=0&id=9ece5aba&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"9ece5aba\",\n null\n \n)\n\nexport default component.exports","\n\n\n","import mod from \"-!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./AppSplitter.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./AppSplitter.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AppSplitter.vue?vue&type=template&id=06c24692&\"\nimport script from \"./AppSplitter.vue?vue&type=script&lang=js&\"\nexport * from \"./AppSplitter.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n\n","import mod from \"-!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=678dd71c&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","// https://www.reddit.com/r/vuejs/comments/dfbv35/vuex_toast_notification_queue/f32bwfc/\n\n/*\nUse with :\n\nthis.$store.dispatch('pushToast', {\n message: 'The message',\n})\n*/\n\nconst TOAST_DURATION = 3000;\nconst toastTimeout = (callback) => setTimeout(callback, TOAST_DURATION);\n\nconst state = {\n queue: [],\n active: undefined,\n timeoutId: undefined,\n};\n\nconst getters = {\n visible: (state) => !!state.active,\n};\n\nconst mutations = {\n enqueue(state, { toast }) {\n state.queue.push(toast);\n },\n dequeue(state, { timeoutId }) {\n const active = state.queue.shift();\n\n state.active = active;\n state.timeoutId = timeoutId;\n },\n reset(state) {\n const { timeoutId } = state;\n if (timeoutId) clearTimeout(timeoutId);\n\n state.active = undefined;\n state.timeoutId = undefined;\n },\n};\n\nconst actions = {\n pushToast({ state, commit, dispatch }, toast) {\n commit('enqueue', { toast });\n if (!state.active) dispatch('processQueue');\n },\n processQueue({ state, commit, dispatch }) {\n if (!state.queue.length && !state.active) return;\n if (!state.queue.length && state.active) {\n /* eslint-disable consistent-return */\n return toastTimeout(() => commit('reset'));\n }\n\n const timeoutId = toastTimeout(() => dispatch('processQueue'));\n\n commit('dequeue', { timeoutId });\n },\n};\n\nconst modules = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n mutations,\n actions,\n modules,\n};\n","const state = {\n open: false,\n};\n\nconst getters = {};\n\nconst mutations = {\n toggle(state, shouldOpen) {\n if (typeof shouldOpen === 'boolean') {\n state.open = shouldOpen;\n } else {\n state.open = !state.open;\n }\n },\n};\n\nconst actions = {};\n\nconst modules = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n mutations,\n actions,\n modules,\n};\n","const state = {\n status: {},\n loading: false,\n shapeDB: [],\n selected: '',\n};\n\nconst getters = {\n // Returns the folders and notes ordered by folder\n notesItems: (state, getters) => {\n const { folders } = getters;\n let items = [];\n\n for (let i = 0; i < folders.length; i++) {\n // Clone folder\n const folder = { ...folders[i] };\n items.push(folder);\n\n // Clone child notes\n let childNotes = state.shapeDB.filter((item) => item.parent === folder.id);\n childNotes = JSON.parse(JSON.stringify(childNotes));\n items = items.concat(childNotes);\n }\n\n return items;\n },\n // Returns the folders\n folders: (state) => state.shapeDB.filter((item) => item.folder),\n // Returns the root folder notes (notes without parent folder)\n rootNotes: (state) => state.shapeDB.filter((item) => item.parent === null),\n};\n\nconst mutations = {\n startLoading(state) {\n state.loading = true;\n },\n zipLoaded(state) {\n state.status = {};\n state.status.zipLoaded = true;\n },\n badZipFile(state) {\n state.status = {};\n state.loading = false;\n },\n badDatabaseFile(state) {\n state.status = {};\n state.loading = false;\n },\n shapeDBLoaded(state, shapeDB) {\n state.status = {};\n state.status.shapeDBLoaded = true;\n state.loading = false;\n state.shapeDB = shapeDB;\n },\n selectNote(state, id) {\n state.selected = id;\n state.loading = true;\n },\n};\n\nconst actions = {\n startLoading({ commit }) {\n commit('startLoading');\n },\n zipLoaded({ commit }) {\n commit('zipLoaded');\n },\n badZipFile({ commit, dispatch }) {\n dispatch('alert/pushToast', {\n message: 'Error while loading backup file!',\n }, { root: true });\n commit('badZipFile');\n },\n badDatabaseFile({ commit, dispatch }) {\n dispatch('alert/pushToast', {\n message: 'Error while loading notes database!',\n }, { root: true });\n commit('badDatabaseFile');\n },\n shapeDBLoaded({ commit }, shapeDB) {\n commit('shapeDBLoaded', shapeDB);\n },\n selectNote({ commit }, id) {\n commit('splitter/toggle', {}, { root: true });\n commit('selectNote', id);\n },\n badNoteFile({ dispatch }) {\n dispatch('alert/pushToast', {\n message: 'Error while loading this note data!',\n }, { root: true });\n },\n};\n\nconst modules = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n mutations,\n actions,\n modules,\n};\n","import Vue from 'vue';\nimport Vuex from 'vuex';\n\nimport alert from './alert.module';\nimport splitter from './splitter.module';\nimport loader from './loader.module';\n\nVue.use(Vuex);\n\nexport default new Vuex.Store({\n strict: process.env.NODE_ENV !== 'production',\n namespaced: true,\n state: {\n },\n getters: {\n },\n mutations: {\n },\n actions: {\n },\n modules: {\n alert,\n splitter,\n loader,\n },\n});\n","import 'onsenui/css/onsenui.css';\nimport 'onsenui/css/onsen-css-components.css';\n\nimport Vue from 'vue';\nimport VueOnsen from 'vue-onsenui';\nimport App from './App.vue';\nimport store from './_store';\n\nVue.use(VueOnsen);\n\nVue.config.productionTip = false;\n\nnew Vue({\n store,\n render: (h) => h(App),\n beforeCreate() {\n // Shortcut for Material Design\n Vue.prototype.md = this.$ons.platform.isAndroid();\n },\n}).$mount('#app');\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknote_viewer\"] = self[\"webpackChunknote_viewer\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(6612); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["render","_vm","this","_c","_self","attrs","visible","on","$event","_v","_s","active","message","staticRenderFns","md","isOpen","rootNotes","length","_l","item","key","id","selectNote","title","_e","notesItems","folder","name","computed","mapGetters","methods","mapActions","component","staticStyle","_b","toolbarInfo","staticClass","directives","rawName","value","status","shapeDBLoaded","expression","selected","navigatePage","pagination","loading","openFileDialog","$store","commit","props","components","Toolbar","data","zip","worker","pages","currentPage","canvas","width","height","ctx","mapState","document","getElementById","click","loadShapeDB","file","async","then","postMessage","action","buffer","badDatabaseFile","parseShapeDB","lines","notesIndex","i","line","note","createdAt","Date","updatedAt","parent","push","loadNote","badNoteFile","parseShapeModel","pageIdIndex","columns","indexOf","colorIndex","thicknessIndex","pointsIndex","typeIndex","values","pageId","shapes","color","toString","substring","thickness","points","type","keys","Object","page","drawPage","forward","index","getValues","dataView","offset","x","getFloat32","y","pressure","size","timestamp","Number","getBigInt64","clearRect","shapeData","DataView","strokeStyle","lineWidth","p1","p2","projectedP1","projectedP2","center","radiusX","Math","abs","radiusY","beginPath","ellipse","PI","stroke","strokeRect","moveTo","lineTo","halfWidth","projectedP3","closePath","j","vals","created","Worker","onmessage","event","sql","results","mounted","chooser","addEventListener","startLoading","files","JSZip","zipLoaded","badZipFile","getContext","window","innerWidth","watch","Menu","Home","get","state","splitter","open","set","newValue","AppSplitter","TOAST_DURATION","toastTimeout","callback","setTimeout","queue","undefined","timeoutId","getters","mutations","enqueue","toast","dequeue","shift","reset","clearTimeout","actions","pushToast","dispatch","processQueue","modules","namespaced","toggle","shouldOpen","shapeDB","folders","items","childNotes","filter","JSON","parse","stringify","concat","root","Vue","use","Vuex","strict","process","alert","loader","VueOnsen","config","productionTip","store","h","App","beforeCreate","prototype","$ons","platform","isAndroid","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","m","deferred","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","obj","prop","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","forEach","bind","__webpack_exports__"],"sourceRoot":""} -------------------------------------------------------------------------------- /docs/openMenu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/openMenu.jpg -------------------------------------------------------------------------------- /docs/pagesUI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/pagesUI.jpg -------------------------------------------------------------------------------- /docs/selectBackup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/selectBackup.jpg -------------------------------------------------------------------------------- /docs/shapeUpdate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/shapeUpdate.jpg -------------------------------------------------------------------------------- /docs/sql-wasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/docs/sql-wasm.wasm -------------------------------------------------------------------------------- /docs/worker.sql-wasm.js: -------------------------------------------------------------------------------- 1 | 2 | // We are modularizing this manually because the current modularize setting in Emscripten has some issues: 3 | // https://github.com/kripken/emscripten/issues/5820 4 | // In addition, When you use emcc's modularization, it still expects to export a global object called `Module`, 5 | // which is able to be used/called before the WASM is loaded. 6 | // The modularization below exports a promise that loads and resolves to the actual sql.js module. 7 | // That way, this module can't be used before the WASM is finished loading. 8 | 9 | // We are going to define a function that a user will call to start loading initializing our Sql.js library 10 | // However, that function might be called multiple times, and on subsequent calls, we don't actually want it to instantiate a new instance of the Module 11 | // Instead, we want to return the previously loaded module 12 | 13 | // TODO: Make this not declare a global if used in the browser 14 | var initSqlJsPromise = undefined; 15 | 16 | var initSqlJs = function (moduleConfig) { 17 | 18 | if (initSqlJsPromise){ 19 | return initSqlJsPromise; 20 | } 21 | // If we're here, we've never called this function before 22 | initSqlJsPromise = new Promise(function (resolveModule, reject) { 23 | 24 | // We are modularizing this manually because the current modularize setting in Emscripten has some issues: 25 | // https://github.com/kripken/emscripten/issues/5820 26 | 27 | // The way to affect the loading of emcc compiled modules is to create a variable called `Module` and add 28 | // properties to it, like `preRun`, `postRun`, etc 29 | // We are using that to get notified when the WASM has finished loading. 30 | // Only then will we return our promise 31 | 32 | // If they passed in a moduleConfig object, use that 33 | // Otherwise, initialize Module to the empty object 34 | var Module = typeof moduleConfig !== 'undefined' ? moduleConfig : {}; 35 | 36 | // EMCC only allows for a single onAbort function (not an array of functions) 37 | // So if the user defined their own onAbort function, we remember it and call it 38 | var originalOnAbortFunction = Module['onAbort']; 39 | Module['onAbort'] = function (errorThatCausedAbort) { 40 | reject(new Error(errorThatCausedAbort)); 41 | if (originalOnAbortFunction){ 42 | originalOnAbortFunction(errorThatCausedAbort); 43 | } 44 | }; 45 | 46 | Module['postRun'] = Module['postRun'] || []; 47 | Module['postRun'].push(function () { 48 | // When Emscripted calls postRun, this promise resolves with the built Module 49 | resolveModule(Module); 50 | }); 51 | 52 | // There is a section of code in the emcc-generated code below that looks like this: 53 | // (Note that this is lowercase `module`) 54 | // if (typeof module !== 'undefined') { 55 | // module['exports'] = Module; 56 | // } 57 | // When that runs, it's going to overwrite our own modularization export efforts in shell-post.js! 58 | // The only way to tell emcc not to emit it is to pass the MODULARIZE=1 or MODULARIZE_INSTANCE=1 flags, 59 | // but that carries with it additional unnecessary baggage/bugs we don't want either. 60 | // So, we have three options: 61 | // 1) We undefine `module` 62 | // 2) We remember what `module['exports']` was at the beginning of this function and we restore it later 63 | // 3) We write a script to remove those lines of code as part of the Make process. 64 | // 65 | // Since those are the only lines of code that care about module, we will undefine it. It's the most straightforward 66 | // of the options, and has the side effect of reducing emcc's efforts to modify the module if its output were to change in the future. 67 | // That's a nice side effect since we're handling the modularization efforts ourselves 68 | module = undefined; 69 | 70 | // The emcc-generated code and shell-post.js code goes below, 71 | // meaning that all of it runs inside of this promise. If anything throws an exception, our promise will abort 72 | 73 | var e;e||(e=typeof Module !== 'undefined' ? Module : {});null; 74 | e.onRuntimeInitialized=function(){function a(h,l){this.Ra=h;this.db=l;this.Qa=1;this.lb=[]}function b(h,l){this.db=l;l=aa(h)+1;this.eb=ba(l);if(null===this.eb)throw Error("Unable to allocate memory for the SQL string");k(h,m,this.eb,l);this.jb=this.eb;this.$a=this.pb=null}function c(h){this.filename="dbfile_"+(4294967295*Math.random()>>>0);if(null!=h){var l=this.filename,p=l?r("//"+l):"/";l=ca(!0,!0);p=da(p,(void 0!==l?l:438)&4095|32768,0);if(h){if("string"===typeof h){for(var q=Array(h.length),B= 75 | 0,ha=h.length;Bd;++d)g.parameters.push(f["viii"[d]]); 96 | d=new WebAssembly.Function(g,a)}else{f=[1,0,1,96];g={i:127,j:126,f:125,d:124};f.push(3);for(d=0;3>d;++d)f.push(g["iii"[d]]);f.push(0);f[1]=f.length-2;d=new Uint8Array([0,97,115,109,1,0,0,0].concat(f,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));d=new WebAssembly.Module(d);d=(new WebAssembly.Instance(d,{e:{f:a}})).exports.f}b.set(c,d)}Ia.set(a,c);a=c}return a}function ra(a){ua(a)}var Ka;e.wasmBinary&&(Ka=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime); 97 | "object"!==typeof WebAssembly&&K("no native wasm support detected"); 98 | function pa(a){var b="i32";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":z[a>>0]=0;break;case "i8":z[a>>0]=0;break;case "i16":La[a>>1]=0;break;case "i32":L[a>>2]=0;break;case "i64":M=[0,(N=0,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[a>>2]=M[0];L[a+4>>2]=M[1];break;case "float":Ma[a>>2]=0;break;case "double":Na[a>>3]=0;break;default:K("invalid type for setValue: "+b)}} 99 | function x(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return z[a>>0];case "i8":return z[a>>0];case "i16":return La[a>>1];case "i32":return L[a>>2];case "i64":return L[a>>2];case "float":return Ma[a>>2];case "double":return Na[a>>3];default:K("invalid type for getValue: "+b)}return null}var Oa,Ja,Pa=!1;function assert(a,b){a||K("Assertion failed: "+b)}function Qa(a){var b=e["_"+a];assert(b,"Cannot call unknown function "+a+", make sure it is exported");return b} 100 | function Ra(a,b,c,d){var f={string:function(v){var C=0;if(null!==v&&void 0!==v&&0!==v){var H=(v.length<<2)+1;C=y(H);k(v,m,C,H)}return C},array:function(v){var C=y(v.length);z.set(v,C);return C}},g=Qa(a),n=[];a=0;if(d)for(var t=0;t=d);)++c;if(16f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function A(a,b){return a?Va(m,a,b):""} 103 | function k(a,b,c,d){if(!(0=n){var t=a.charCodeAt(++g);n=65536+((n&1023)<<10)|t&1023}if(127>=n){if(c>=d)break;b[c++]=n}else{if(2047>=n){if(c+1>=d)break;b[c++]=192|n>>6}else{if(65535>=n){if(c+2>=d)break;b[c++]=224|n>>12}else{if(c+3>=d)break;b[c++]=240|n>>18;b[c++]=128|n>>12&63}b[c++]=128|n>>6&63}b[c++]=128|n&63}}b[c]=0;return c-f} 104 | function aa(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function Wa(a){var b=aa(a)+1,c=ba(b);c&&k(a,z,c,b);return c}var Xa,z,m,La,L,Ma,Na; 105 | function Ya(a){Xa=a;e.HEAP8=z=new Int8Array(a);e.HEAP16=La=new Int16Array(a);e.HEAP32=L=new Int32Array(a);e.HEAPU8=m=new Uint8Array(a);e.HEAPU16=new Uint16Array(a);e.HEAPU32=new Uint32Array(a);e.HEAPF32=Ma=new Float32Array(a);e.HEAPF64=Na=new Float64Array(a)}var Za=e.INITIAL_MEMORY||16777216;e.wasmMemory?Oa=e.wasmMemory:Oa=new WebAssembly.Memory({initial:Za/65536,maximum:32768});Oa&&(Xa=Oa.buffer);Za=Xa.byteLength;Ya(Xa);var $a=[],ab=[],bb=[],cb=[]; 106 | function db(){var a=e.preRun.shift();$a.unshift(a)}var eb=0,fb=null,gb=null;e.preloadedImages={};e.preloadedAudios={};function K(a){if(e.onAbort)e.onAbort(a);J(a);Pa=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function hb(a){var b=ib;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function jb(){return hb("data:application/octet-stream;base64,")}var ib="sql-wasm.wasm"; 107 | if(!jb()){var kb=ib;ib=e.locateFile?e.locateFile(kb,I):I+kb}function lb(){try{if(Ka)return new Uint8Array(Ka);if(Ca)return Ca(ib);throw"both async and sync fetching of the wasm failed";}catch(a){K(a)}}function mb(){return Ka||!ya&&!G||"function"!==typeof fetch||hb("file://")?Promise.resolve().then(lb):fetch(ib,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+ib+"'";return a.arrayBuffer()}).catch(function(){return lb()})}var N,M; 108 | function nb(a){for(;0>2]=60*(new Date).getTimezoneOffset();var b=(new Date).getFullYear(),c=new Date(b,0,1);b=new Date(b,6,1);L[vb()>>2]=Number(c.getTimezoneOffset()!=b.getTimezoneOffset());var d=a(c),f=a(b);d=Wa(d);f=Wa(f);b.getTimezoneOffset()>2]=d,L[xb()+4>>2]=f):(L[xb()>>2]=f,L[xb()+4>>2]=d)}}var tb; 110 | function yb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function r(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=yb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} 111 | function zb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Ab(a){if("/"===a)return"/";a=r(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Bb(a){L[Cb()>>2]=a} 112 | function Db(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(za)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){K("randomDevice")}} 113 | function Eb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=yb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var Fb=[];function Gb(a,b){Fb[a]={input:[],output:[],cb:b};Hb(a,Ib)} 114 | var Ib={open:function(a){var b=Fb[a.node.rdev];if(!b)throw new O(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.cb.flush(a.tty)},flush:function(a){a.tty.cb.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.cb.xb)throw new O(60);for(var f=0,g=0;g=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ma,a.Ma=new Uint8Array(b),0b)a.Ma.length=b;else for(;a.Ma.length=a.node.Sa)return 0;a=Math.min(a.node.Sa-f,d);if(8b)throw new O(28);return b},sb:function(a,b,c){P.vb(a.node,b+c);a.node.Sa=Math.max(a.node.Sa,b+c)},hb:function(a,b,c,d,f,g){assert(0===b);if(32768!==(a.node.mode&61440))throw new O(43);a=a.node.Ma; 124 | if(g&2||a.buffer!==Xa){if(0>>0)%T.length}function Wb(a){var b=Vb(a.parent.id,a.name);if(T[b]===a)T[b]=a.bb;else for(b=T[b];b;){if(b.bb===a){b.bb=a.bb;break}b=b.bb}} 127 | function Ob(a,b){var c;if(c=(c=Xb(a,"x"))?c:a.Na.lookup?0:2)throw new O(c,a);for(c=T[Vb(a.id,b)];c;c=c.bb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Na.lookup(a,b)}function Mb(a,b,c,d){a=new Yb(a,b,c,d);b=Vb(a.parent.id,a.name);a.bb=T[b];return T[b]=a}function Q(a){return 16384===(a&61440)}var Zb={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218}; 128 | function $b(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Xb(a,b){if(Sb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0}function ac(a,b){try{return Ob(a,b),20}catch(c){}return Xb(a,"wx")}function bc(a,b,c){try{var d=Ob(a,b)}catch(f){return f.Pa}if(a=Xb(a,"wx"))return a;if(c){if(!Q(d.mode))return 54;if(d===d.parent||"/"===Ub(d))return 10}else if(Q(d.mode))return 31;return 0} 129 | function cc(a){var b=4096;for(a=a||0;a<=b;a++)if(!S[a])return a;throw new O(33);}function dc(a,b){ec||(ec=function(){},ec.prototype={});var c=new ec,d;for(d in a)c[d]=a[d];a=c;b=cc(b);a.fd=b;return S[b]=a}var Lb={open:function(a){a.Oa=Qb[a.node.rdev].Oa;a.Oa.open&&a.Oa.open(a)},Za:function(){throw new O(70);}};function Hb(a,b){Qb[a]={Oa:b}} 130 | function fc(a,b){var c="/"===b,d=!b;if(c&&Pb)throw new O(10);if(!c&&!d){var f=V(b,{wb:!1});b=f.path;f=f.node;if(f.ab)throw new O(10);if(!Q(f.mode))throw new O(54);}b={type:a,Ub:{},yb:b,Mb:[]};a=a.Wa(b);a.Wa=b;b.root=a;c?Pb=a:f&&(f.ab=b,f.Wa&&f.Wa.Mb.push(b))}function da(a,b,c){var d=V(a,{parent:!0}).node;a=Ab(a);if(!a||"."===a||".."===a)throw new O(28);var f=ac(d,a);if(f)throw new O(f);if(!d.Na.gb)throw new O(63);return d.Na.gb(d,a,b,c)}function W(a,b){da(a,(void 0!==b?b:511)&1023|16384,0)} 131 | function hc(a,b,c){"undefined"===typeof c&&(c=b,b=438);da(a,b|8192,c)}function ic(a,b){if(!Eb(a))throw new O(44);var c=V(b,{parent:!0}).node;if(!c)throw new O(44);b=Ab(b);var d=ac(c,b);if(d)throw new O(d);if(!c.Na.symlink)throw new O(63);c.Na.symlink(c,b,a)} 132 | function ta(a){var b=V(a,{parent:!0}).node,c=Ab(a),d=Ob(b,c),f=bc(b,c,!1);if(f)throw new O(f);if(!b.Na.unlink)throw new O(63);if(d.ab)throw new O(10);try{U.willDeletePath&&U.willDeletePath(a)}catch(g){J("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.Na.unlink(b,c);Wb(d);try{if(U.onDeletePath)U.onDeletePath(a)}catch(g){J("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}} 133 | function Tb(a){a=V(a).node;if(!a)throw new O(44);if(!a.Na.readlink)throw new O(28);return Eb(Ub(a.parent),a.Na.readlink(a))}function jc(a,b){a=V(a,{Ya:!b}).node;if(!a)throw new O(44);if(!a.Na.Ua)throw new O(63);return a.Na.Ua(a)}function kc(a){return jc(a,!0)}function ea(a,b){var c;"string"===typeof a?c=V(a,{Ya:!0}).node:c=a;if(!c.Na.Ta)throw new O(63);c.Na.Ta(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})} 134 | function lc(a){var b;"string"===typeof a?b=V(a,{Ya:!0}).node:b=a;if(!b.Na.Ta)throw new O(63);b.Na.Ta(b,{timestamp:Date.now()})}function mc(a,b){if(0>b)throw new O(28);var c;"string"===typeof a?c=V(a,{Ya:!0}).node:c=a;if(!c.Na.Ta)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);if(a=Xb(c,"w"))throw new O(a);c.Na.Ta(c,{size:b,timestamp:Date.now()})} 135 | function u(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var f=Zb[b];if("undefined"===typeof f)throw Error("Unknown file open mode: "+b);b=f}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=r(a);try{g=V(a,{Ya:!(b&131072)}).node}catch(n){}}f=!1;if(b&64)if(g){if(b&128)throw new O(20);}else g=da(a,c,0),f=!0;if(!g)throw new O(44);8192===(g.mode&61440)&&(b&=-513);if(b&65536&&!Q(g.mode))throw new O(54);if(!f&&(c=g?40960===(g.mode&61440)?32:Q(g.mode)&& 136 | ("r"!==$b(b)||b&512)?31:Xb(g,$b(b)):44))throw new O(c);b&512&&mc(g,0);b&=-131713;d=dc({node:g,path:Ub(g),flags:b,seekable:!0,position:0,Oa:g.Oa,Rb:[],error:!1},d);d.Oa.open&&d.Oa.open(d);!e.logReadFiles||b&1||(Pc||(Pc={}),a in Pc||(Pc[a]=1,J("FS.trackingDelegate error on read file: "+a)));try{U.onOpenFile&&(g=0,1!==(b&2097155)&&(g|=1),0!==(b&2097155)&&(g|=2),U.onOpenFile(a,g))}catch(n){J("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+n.message)}return d} 137 | function ka(a){if(null===a.fd)throw new O(8);a.ob&&(a.ob=null);try{a.Oa.close&&a.Oa.close(a)}catch(b){throw b;}finally{S[a.fd]=null}a.fd=null}function Qc(a,b,c){if(null===a.fd)throw new O(8);if(!a.seekable||!a.Oa.Za)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Oa.Za(a,b,c);a.Rb=[]} 138 | function Sc(a,b,c,d,f){if(0>d||0>f)throw new O(28);if(null===a.fd)throw new O(8);if(1===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.read)throw new O(28);var g="undefined"!==typeof f;if(!g)f=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.read(a,b,c,d,f);g||(a.position+=b);return b} 139 | function fa(a,b,c,d,f,g){if(0>d||0>f)throw new O(28);if(null===a.fd)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.write)throw new O(28);a.seekable&&a.flags&1024&&Qc(a,0,2);var n="undefined"!==typeof f;if(!n)f=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.write(a,b,c,d,f,g);n||(a.position+=b);try{if(a.path&&U.onWriteToFile)U.onWriteToFile(a.path)}catch(t){J("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+t.message)}return b} 140 | function sa(a){var b={encoding:"binary"};b=b||{};b.flags=b.flags||"r";b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=u(a,b.flags);a=jc(a).size;var f=new Uint8Array(a);Sc(d,f,0,a,0);"utf8"===b.encoding?c=Va(f,0):"binary"===b.encoding&&(c=f);ka(d);return c} 141 | function Tc(){O||(O=function(a,b){this.node=b;this.Qb=function(c){this.Pa=c};this.Qb(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){Nb[a]=new O(a);Nb[a].stack=""}))}var Uc;function ca(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c} 142 | function Vc(a,b,c){a=r("/dev/"+a);var d=ca(!!b,!!c);Wc||(Wc=64);var f=Wc++<<8|0;Hb(f,{open:function(g){g.seekable=!1},close:function(){c&&c.buffer&&c.buffer.length&&c(10)},read:function(g,n,t,w){for(var v=0,C=0;C>2]=d.dev;L[c+4>>2]=0;L[c+8>>2]=d.ino;L[c+12>>2]=d.mode;L[c+16>>2]=d.nlink;L[c+20>>2]=d.uid;L[c+24>>2]=d.gid;L[c+28>>2]=d.rdev;L[c+32>>2]=0;M=[d.size>>>0,(N=d.size,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[c+40>>2]=M[0];L[c+44>>2]=M[1];L[c+48>>2]=4096;L[c+52>>2]=d.blocks;L[c+56>>2]=d.atime.getTime()/1E3|0;L[c+60>>2]= 145 | 0;L[c+64>>2]=d.mtime.getTime()/1E3|0;L[c+68>>2]=0;L[c+72>>2]=d.ctime.getTime()/1E3|0;L[c+76>>2]=0;M=[d.ino>>>0,(N=d.ino,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[c+80>>2]=M[0];L[c+84>>2]=M[1];return 0}var Zc=void 0;function $c(){Zc+=4;return L[Zc-4>>2]}function Z(a){a=S[a];if(!a)throw new O(8);return a}var ad={}; 146 | function bd(){if(!cd){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",_:xa||"./this.program"},b;for(b in ad)a[b]=ad[b];var c=[];for(b in a)c.push(b+"="+a[b]);cd=c}return cd}var cd,dd;za?dd=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:"undefined"!==typeof dateNow?dd=dateNow:dd=function(){return performance.now()}; 147 | function ed(a){for(var b=dd();dd()-b>2]);L[b>>2]=a.getSeconds();L[b+4>>2]=a.getMinutes();L[b+8>>2]=a.getHours();L[b+12>>2]=a.getDate();L[b+16>>2]=a.getMonth();L[b+20>>2]=a.getFullYear()-1900;L[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);L[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;L[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset(); 151 | c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;L[b+32>>2]=a;a=L[xb()+(a?4:0)>>2];L[b+40>>2]=a;return b},j:function(a,b){try{a=A(a);if(b&-8)var c=-28;else{var d;(d=V(a,{Ya:!0}).node)?(a="",b&4&&(a+="r"),b&2&&(a+="w"),b&1&&(a+="x"),c=a&&Xb(d,a)?-2:0):c=-44}return c}catch(f){return"undefined"!==typeof X&&f instanceof O||K(f),-f.Pa}},v:function(a,b){try{return a=A(a),ea(a,b),0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},D:function(a){try{return a=A(a), 152 | lc(a),0}catch(b){return"undefined"!==typeof X&&b instanceof O||K(b),-b.Pa}},w:function(a,b){try{var c=S[a];if(!c)throw new O(8);ea(c.node,b);return 0}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),-d.Pa}},E:function(a){try{var b=S[a];if(!b)throw new O(8);lc(b.node);return 0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},c:function(a,b,c){Zc=c;try{var d=Z(a);switch(b){case 0:var f=$c();return 0>f?-28:u(d.path,d.flags,0,f).fd;case 1:case 2:return 0;case 3:return d.flags; 153 | case 4:return f=$c(),d.flags|=f,0;case 12:return f=$c(),La[f+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Bb(28),-1;default:return-28}}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},x:function(a,b){try{var c=Z(a);return Yc(jc,c.path,b)}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),-d.Pa}},i:function(a,b,c){try{var d=S[a];if(!d)throw new O(8);if(0===(d.flags&2097155))throw new O(28);mc(d.node,c);return 0}catch(f){return"undefined"!==typeof X&& 154 | f instanceof O||K(f),-f.Pa}},J:function(a,b){try{if(0===b)return-28;if(b=c)var d=-28;else{var f=Tb(a),g=Math.min(c,aa(f)),n=z[b+g];k(f,m,b,c+1);z[b+g]=n;d=g}return d}catch(t){return"undefined"!==typeof X&&t instanceof O||K(t),-t.Pa}},C:function(a){try{a=A(a);var b=V(a,{parent:!0}).node,c=Ab(a),d=Ob(b,c),f=bc(b,c,!0);if(f)throw new O(f);if(!b.Na.rmdir)throw new O(63);if(d.ab)throw new O(10);try{U.willDeletePath&&U.willDeletePath(a)}catch(g){J("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+ 158 | g.message)}b.Na.rmdir(b,c);Wb(d);try{if(U.onDeletePath)U.onDeletePath(a)}catch(g){J("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}return 0}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},f:function(a,b){try{return a=A(a),Yc(jc,a,b)}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},H:function(a){try{return a=A(a),ta(a),0}catch(b){return"undefined"!==typeof X&&b instanceof O||K(b),-b.Pa}},n:function(a,b,c){m.copyWithin(a,b,b+c)}, 159 | d:function(a){a>>>=0;var b=m.length;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0>>16);Ya(Oa.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},p:function(a,b){var c=0;bd().forEach(function(d,f){var g=b+c;f=L[a+4*f>>2]=g;for(g=0;g>0]=d.charCodeAt(g);z[f>>0]=0;c+=d.length+1});return 0},q:function(a,b){var c= 160 | bd();L[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});L[b>>2]=d;return 0},g:function(a){try{var b=Z(a);ka(b);return 0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),c.Pa}},o:function(a,b){try{var c=Z(a);z[b>>0]=c.tty?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),d.Pa}},m:function(a,b,c,d,f){try{var g=Z(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Qc(g,a,d);M=[g.position>>> 161 | 0,(N=g.position,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[f>>2]=M[0];L[f+4>>2]=M[1];g.ob&&0===a&&0===d&&(g.ob=null);return 0}catch(n){return"undefined"!==typeof X&&n instanceof O||K(n),n.Pa}},K:function(a){try{var b=Z(a);return b.Oa&&b.Oa.fsync?-b.Oa.fsync(b):0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),c.Pa}},I:function(a,b,c,d){try{a:{for(var f=Z(a),g=a=0;g>2],L[b+(8* 162 | g+4)>>2],void 0);if(0>n){var t=-1;break a}a+=n}t=a}L[d>>2]=t;return 0}catch(w){return"undefined"!==typeof X&&w instanceof O||K(w),w.Pa}},h:function(a){var b=Date.now();L[a>>2]=b/1E3|0;L[a+4>>2]=b%1E3*1E3|0;return 0},a:Oa,k:function(a,b){if(0===a)return Bb(28),-1;var c=L[a>>2];a=L[a+4>>2];if(0>a||999999999c)return Bb(28),-1;0!==b&&(L[b>>2]=0,L[b+4>>2]=0);return ed(1E6*c+a/1E3)},B:function(a){switch(a){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809; 163 | case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32; 164 | case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}Bb(28);return-1}, 165 | L:function(a){var b=Date.now()/1E3|0;a&&(L[a>>2]=b);return b},s:function(a,b){if(b){var c=1E3*L[b+8>>2];c+=L[b+12>>2]/1E3}else c=Date.now();a=A(a);try{b=c;var d=V(a,{Ya:!0}).node;d.Na.Ta(d,{timestamp:Math.max(b,c)});return 0}catch(f){a=f;if(!(a instanceof O)){a+=" : ";a:{d=Error();if(!d.stack){try{throw Error();}catch(g){d=g}if(!d.stack){d="(no stack trace available)";break a}}d=d.stack.toString()}e.extraStackTrace&&(d+="\n"+e.extraStackTrace());d=ob(d);throw a+d;}Bb(a.Pa);return-1}}}; 166 | (function(){function a(f){e.asm=f.exports;Ja=e.asm.M;eb--;e.monitorRunDependencies&&e.monitorRunDependencies(eb);0==eb&&(null!==fb&&(clearInterval(fb),fb=null),gb&&(f=gb,gb=null,f()))}function b(f){a(f.instance)}function c(f){return mb().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){J("failed to asynchronously prepare wasm: "+g);K(g)})}var d={a:id};eb++;e.monitorRunDependencies&&e.monitorRunDependencies(eb);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return J("Module.instantiateWasm callback failed with error: "+ 167 | f),!1}(function(){if(Ka||"function"!==typeof WebAssembly.instantiateStreaming||jb()||hb("file://")||"function"!==typeof fetch)return c(b);fetch(ib,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){J("wasm streaming compile failed: "+g);J("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})(); 168 | var fd=e.___wasm_call_ctors=function(){return(fd=e.___wasm_call_ctors=e.asm.N).apply(null,arguments)},hd=e._memset=function(){return(hd=e._memset=e.asm.O).apply(null,arguments)};e._sqlite3_free=function(){return(e._sqlite3_free=e.asm.P).apply(null,arguments)};var Cb=e.___errno_location=function(){return(Cb=e.___errno_location=e.asm.Q).apply(null,arguments)};e._sqlite3_finalize=function(){return(e._sqlite3_finalize=e.asm.R).apply(null,arguments)}; 169 | e._sqlite3_reset=function(){return(e._sqlite3_reset=e.asm.S).apply(null,arguments)};e._sqlite3_clear_bindings=function(){return(e._sqlite3_clear_bindings=e.asm.T).apply(null,arguments)};e._sqlite3_value_blob=function(){return(e._sqlite3_value_blob=e.asm.U).apply(null,arguments)};e._sqlite3_value_text=function(){return(e._sqlite3_value_text=e.asm.V).apply(null,arguments)};e._sqlite3_value_bytes=function(){return(e._sqlite3_value_bytes=e.asm.W).apply(null,arguments)}; 170 | e._sqlite3_value_double=function(){return(e._sqlite3_value_double=e.asm.X).apply(null,arguments)};e._sqlite3_value_int=function(){return(e._sqlite3_value_int=e.asm.Y).apply(null,arguments)};e._sqlite3_value_type=function(){return(e._sqlite3_value_type=e.asm.Z).apply(null,arguments)};e._sqlite3_result_blob=function(){return(e._sqlite3_result_blob=e.asm._).apply(null,arguments)};e._sqlite3_result_double=function(){return(e._sqlite3_result_double=e.asm.$).apply(null,arguments)}; 171 | e._sqlite3_result_error=function(){return(e._sqlite3_result_error=e.asm.aa).apply(null,arguments)};e._sqlite3_result_int=function(){return(e._sqlite3_result_int=e.asm.ba).apply(null,arguments)};e._sqlite3_result_int64=function(){return(e._sqlite3_result_int64=e.asm.ca).apply(null,arguments)};e._sqlite3_result_null=function(){return(e._sqlite3_result_null=e.asm.da).apply(null,arguments)};e._sqlite3_result_text=function(){return(e._sqlite3_result_text=e.asm.ea).apply(null,arguments)}; 172 | e._sqlite3_step=function(){return(e._sqlite3_step=e.asm.fa).apply(null,arguments)};e._sqlite3_column_count=function(){return(e._sqlite3_column_count=e.asm.ga).apply(null,arguments)};e._sqlite3_data_count=function(){return(e._sqlite3_data_count=e.asm.ha).apply(null,arguments)};e._sqlite3_column_blob=function(){return(e._sqlite3_column_blob=e.asm.ia).apply(null,arguments)};e._sqlite3_column_bytes=function(){return(e._sqlite3_column_bytes=e.asm.ja).apply(null,arguments)}; 173 | e._sqlite3_column_double=function(){return(e._sqlite3_column_double=e.asm.ka).apply(null,arguments)};e._sqlite3_column_text=function(){return(e._sqlite3_column_text=e.asm.la).apply(null,arguments)};e._sqlite3_column_type=function(){return(e._sqlite3_column_type=e.asm.ma).apply(null,arguments)};e._sqlite3_column_name=function(){return(e._sqlite3_column_name=e.asm.na).apply(null,arguments)};e._sqlite3_bind_blob=function(){return(e._sqlite3_bind_blob=e.asm.oa).apply(null,arguments)}; 174 | e._sqlite3_bind_double=function(){return(e._sqlite3_bind_double=e.asm.pa).apply(null,arguments)};e._sqlite3_bind_int=function(){return(e._sqlite3_bind_int=e.asm.qa).apply(null,arguments)};e._sqlite3_bind_text=function(){return(e._sqlite3_bind_text=e.asm.ra).apply(null,arguments)};e._sqlite3_bind_parameter_index=function(){return(e._sqlite3_bind_parameter_index=e.asm.sa).apply(null,arguments)};e._sqlite3_sql=function(){return(e._sqlite3_sql=e.asm.ta).apply(null,arguments)}; 175 | e._sqlite3_normalized_sql=function(){return(e._sqlite3_normalized_sql=e.asm.ua).apply(null,arguments)};e._sqlite3_errmsg=function(){return(e._sqlite3_errmsg=e.asm.va).apply(null,arguments)};e._sqlite3_exec=function(){return(e._sqlite3_exec=e.asm.wa).apply(null,arguments)};e._sqlite3_prepare_v2=function(){return(e._sqlite3_prepare_v2=e.asm.xa).apply(null,arguments)};e._sqlite3_changes=function(){return(e._sqlite3_changes=e.asm.ya).apply(null,arguments)}; 176 | e._sqlite3_close_v2=function(){return(e._sqlite3_close_v2=e.asm.za).apply(null,arguments)};e._sqlite3_create_function_v2=function(){return(e._sqlite3_create_function_v2=e.asm.Aa).apply(null,arguments)};e._sqlite3_open=function(){return(e._sqlite3_open=e.asm.Ba).apply(null,arguments)};var ba=e._malloc=function(){return(ba=e._malloc=e.asm.Ca).apply(null,arguments)},na=e._free=function(){return(na=e._free=e.asm.Da).apply(null,arguments)}; 177 | e._RegisterExtensionFunctions=function(){return(e._RegisterExtensionFunctions=e.asm.Ea).apply(null,arguments)}; 178 | var xb=e.__get_tzname=function(){return(xb=e.__get_tzname=e.asm.Fa).apply(null,arguments)},vb=e.__get_daylight=function(){return(vb=e.__get_daylight=e.asm.Ga).apply(null,arguments)},ub=e.__get_timezone=function(){return(ub=e.__get_timezone=e.asm.Ha).apply(null,arguments)},oa=e.stackSave=function(){return(oa=e.stackSave=e.asm.Ia).apply(null,arguments)},qa=e.stackRestore=function(){return(qa=e.stackRestore=e.asm.Ja).apply(null,arguments)},y=e.stackAlloc=function(){return(y=e.stackAlloc=e.asm.Ka).apply(null, 179 | arguments)},gd=e._memalign=function(){return(gd=e._memalign=e.asm.La).apply(null,arguments)};e.cwrap=function(a,b,c,d){c=c||[];var f=c.every(function(g){return"number"===g});return"string"!==b&&f&&!d?Qa(a):function(){return Ra(a,b,c,arguments)}};e.UTF8ToString=A;e.stackSave=oa;e.stackRestore=qa;e.stackAlloc=y;var jd;gb=function kd(){jd||ld();jd||(gb=kd)}; 180 | function ld(){function a(){if(!jd&&(jd=!0,e.calledRun=!0,!Pa)){e.noFSInit||Uc||(Uc=!0,Tc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?Vc("stdin",e.stdin):ic("/dev/tty","/dev/stdin"),e.stdout?Vc("stdout",null,e.stdout):ic("/dev/tty","/dev/stdout"),e.stderr?Vc("stderr",null,e.stderr):ic("/dev/tty1","/dev/stderr"),u("/dev/stdin","r"),u("/dev/stdout","w"),u("/dev/stderr","w"));nb(ab);Sb=!1;nb(bb);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&& 181 | (e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();cb.unshift(b)}nb(cb)}}if(!(0 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/sql-wasm.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billyledev/note-viewer/efcf6e1df3bdfb9c34164b04d3f0ba030902cdaf/public/sql-wasm.wasm -------------------------------------------------------------------------------- /public/worker.sql-wasm.js: -------------------------------------------------------------------------------- 1 | 2 | // We are modularizing this manually because the current modularize setting in Emscripten has some issues: 3 | // https://github.com/kripken/emscripten/issues/5820 4 | // In addition, When you use emcc's modularization, it still expects to export a global object called `Module`, 5 | // which is able to be used/called before the WASM is loaded. 6 | // The modularization below exports a promise that loads and resolves to the actual sql.js module. 7 | // That way, this module can't be used before the WASM is finished loading. 8 | 9 | // We are going to define a function that a user will call to start loading initializing our Sql.js library 10 | // However, that function might be called multiple times, and on subsequent calls, we don't actually want it to instantiate a new instance of the Module 11 | // Instead, we want to return the previously loaded module 12 | 13 | // TODO: Make this not declare a global if used in the browser 14 | var initSqlJsPromise = undefined; 15 | 16 | var initSqlJs = function (moduleConfig) { 17 | 18 | if (initSqlJsPromise){ 19 | return initSqlJsPromise; 20 | } 21 | // If we're here, we've never called this function before 22 | initSqlJsPromise = new Promise(function (resolveModule, reject) { 23 | 24 | // We are modularizing this manually because the current modularize setting in Emscripten has some issues: 25 | // https://github.com/kripken/emscripten/issues/5820 26 | 27 | // The way to affect the loading of emcc compiled modules is to create a variable called `Module` and add 28 | // properties to it, like `preRun`, `postRun`, etc 29 | // We are using that to get notified when the WASM has finished loading. 30 | // Only then will we return our promise 31 | 32 | // If they passed in a moduleConfig object, use that 33 | // Otherwise, initialize Module to the empty object 34 | var Module = typeof moduleConfig !== 'undefined' ? moduleConfig : {}; 35 | 36 | // EMCC only allows for a single onAbort function (not an array of functions) 37 | // So if the user defined their own onAbort function, we remember it and call it 38 | var originalOnAbortFunction = Module['onAbort']; 39 | Module['onAbort'] = function (errorThatCausedAbort) { 40 | reject(new Error(errorThatCausedAbort)); 41 | if (originalOnAbortFunction){ 42 | originalOnAbortFunction(errorThatCausedAbort); 43 | } 44 | }; 45 | 46 | Module['postRun'] = Module['postRun'] || []; 47 | Module['postRun'].push(function () { 48 | // When Emscripted calls postRun, this promise resolves with the built Module 49 | resolveModule(Module); 50 | }); 51 | 52 | // There is a section of code in the emcc-generated code below that looks like this: 53 | // (Note that this is lowercase `module`) 54 | // if (typeof module !== 'undefined') { 55 | // module['exports'] = Module; 56 | // } 57 | // When that runs, it's going to overwrite our own modularization export efforts in shell-post.js! 58 | // The only way to tell emcc not to emit it is to pass the MODULARIZE=1 or MODULARIZE_INSTANCE=1 flags, 59 | // but that carries with it additional unnecessary baggage/bugs we don't want either. 60 | // So, we have three options: 61 | // 1) We undefine `module` 62 | // 2) We remember what `module['exports']` was at the beginning of this function and we restore it later 63 | // 3) We write a script to remove those lines of code as part of the Make process. 64 | // 65 | // Since those are the only lines of code that care about module, we will undefine it. It's the most straightforward 66 | // of the options, and has the side effect of reducing emcc's efforts to modify the module if its output were to change in the future. 67 | // That's a nice side effect since we're handling the modularization efforts ourselves 68 | module = undefined; 69 | 70 | // The emcc-generated code and shell-post.js code goes below, 71 | // meaning that all of it runs inside of this promise. If anything throws an exception, our promise will abort 72 | 73 | var e;e||(e=typeof Module !== 'undefined' ? Module : {});null; 74 | e.onRuntimeInitialized=function(){function a(h,l){this.Ra=h;this.db=l;this.Qa=1;this.lb=[]}function b(h,l){this.db=l;l=aa(h)+1;this.eb=ba(l);if(null===this.eb)throw Error("Unable to allocate memory for the SQL string");k(h,m,this.eb,l);this.jb=this.eb;this.$a=this.pb=null}function c(h){this.filename="dbfile_"+(4294967295*Math.random()>>>0);if(null!=h){var l=this.filename,p=l?r("//"+l):"/";l=ca(!0,!0);p=da(p,(void 0!==l?l:438)&4095|32768,0);if(h){if("string"===typeof h){for(var q=Array(h.length),B= 75 | 0,ha=h.length;Bd;++d)g.parameters.push(f["viii"[d]]); 96 | d=new WebAssembly.Function(g,a)}else{f=[1,0,1,96];g={i:127,j:126,f:125,d:124};f.push(3);for(d=0;3>d;++d)f.push(g["iii"[d]]);f.push(0);f[1]=f.length-2;d=new Uint8Array([0,97,115,109,1,0,0,0].concat(f,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));d=new WebAssembly.Module(d);d=(new WebAssembly.Instance(d,{e:{f:a}})).exports.f}b.set(c,d)}Ia.set(a,c);a=c}return a}function ra(a){ua(a)}var Ka;e.wasmBinary&&(Ka=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime); 97 | "object"!==typeof WebAssembly&&K("no native wasm support detected"); 98 | function pa(a){var b="i32";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":z[a>>0]=0;break;case "i8":z[a>>0]=0;break;case "i16":La[a>>1]=0;break;case "i32":L[a>>2]=0;break;case "i64":M=[0,(N=0,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[a>>2]=M[0];L[a+4>>2]=M[1];break;case "float":Ma[a>>2]=0;break;case "double":Na[a>>3]=0;break;default:K("invalid type for setValue: "+b)}} 99 | function x(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return z[a>>0];case "i8":return z[a>>0];case "i16":return La[a>>1];case "i32":return L[a>>2];case "i64":return L[a>>2];case "float":return Ma[a>>2];case "double":return Na[a>>3];default:K("invalid type for getValue: "+b)}return null}var Oa,Ja,Pa=!1;function assert(a,b){a||K("Assertion failed: "+b)}function Qa(a){var b=e["_"+a];assert(b,"Cannot call unknown function "+a+", make sure it is exported");return b} 100 | function Ra(a,b,c,d){var f={string:function(v){var C=0;if(null!==v&&void 0!==v&&0!==v){var H=(v.length<<2)+1;C=y(H);k(v,m,C,H)}return C},array:function(v){var C=y(v.length);z.set(v,C);return C}},g=Qa(a),n=[];a=0;if(d)for(var t=0;t=d);)++c;if(16f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function A(a,b){return a?Va(m,a,b):""} 103 | function k(a,b,c,d){if(!(0=n){var t=a.charCodeAt(++g);n=65536+((n&1023)<<10)|t&1023}if(127>=n){if(c>=d)break;b[c++]=n}else{if(2047>=n){if(c+1>=d)break;b[c++]=192|n>>6}else{if(65535>=n){if(c+2>=d)break;b[c++]=224|n>>12}else{if(c+3>=d)break;b[c++]=240|n>>18;b[c++]=128|n>>12&63}b[c++]=128|n>>6&63}b[c++]=128|n&63}}b[c]=0;return c-f} 104 | function aa(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function Wa(a){var b=aa(a)+1,c=ba(b);c&&k(a,z,c,b);return c}var Xa,z,m,La,L,Ma,Na; 105 | function Ya(a){Xa=a;e.HEAP8=z=new Int8Array(a);e.HEAP16=La=new Int16Array(a);e.HEAP32=L=new Int32Array(a);e.HEAPU8=m=new Uint8Array(a);e.HEAPU16=new Uint16Array(a);e.HEAPU32=new Uint32Array(a);e.HEAPF32=Ma=new Float32Array(a);e.HEAPF64=Na=new Float64Array(a)}var Za=e.INITIAL_MEMORY||16777216;e.wasmMemory?Oa=e.wasmMemory:Oa=new WebAssembly.Memory({initial:Za/65536,maximum:32768});Oa&&(Xa=Oa.buffer);Za=Xa.byteLength;Ya(Xa);var $a=[],ab=[],bb=[],cb=[]; 106 | function db(){var a=e.preRun.shift();$a.unshift(a)}var eb=0,fb=null,gb=null;e.preloadedImages={};e.preloadedAudios={};function K(a){if(e.onAbort)e.onAbort(a);J(a);Pa=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function hb(a){var b=ib;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function jb(){return hb("data:application/octet-stream;base64,")}var ib="sql-wasm.wasm"; 107 | if(!jb()){var kb=ib;ib=e.locateFile?e.locateFile(kb,I):I+kb}function lb(){try{if(Ka)return new Uint8Array(Ka);if(Ca)return Ca(ib);throw"both async and sync fetching of the wasm failed";}catch(a){K(a)}}function mb(){return Ka||!ya&&!G||"function"!==typeof fetch||hb("file://")?Promise.resolve().then(lb):fetch(ib,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+ib+"'";return a.arrayBuffer()}).catch(function(){return lb()})}var N,M; 108 | function nb(a){for(;0>2]=60*(new Date).getTimezoneOffset();var b=(new Date).getFullYear(),c=new Date(b,0,1);b=new Date(b,6,1);L[vb()>>2]=Number(c.getTimezoneOffset()!=b.getTimezoneOffset());var d=a(c),f=a(b);d=Wa(d);f=Wa(f);b.getTimezoneOffset()>2]=d,L[xb()+4>>2]=f):(L[xb()>>2]=f,L[xb()+4>>2]=d)}}var tb; 110 | function yb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function r(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=yb(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} 111 | function zb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Ab(a){if("/"===a)return"/";a=r(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Bb(a){L[Cb()>>2]=a} 112 | function Db(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(za)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){K("randomDevice")}} 113 | function Eb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=yb(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var Fb=[];function Gb(a,b){Fb[a]={input:[],output:[],cb:b};Hb(a,Ib)} 114 | var Ib={open:function(a){var b=Fb[a.node.rdev];if(!b)throw new O(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.cb.flush(a.tty)},flush:function(a){a.tty.cb.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.cb.xb)throw new O(60);for(var f=0,g=0;g=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ma,a.Ma=new Uint8Array(b),0b)a.Ma.length=b;else for(;a.Ma.length=a.node.Sa)return 0;a=Math.min(a.node.Sa-f,d);if(8b)throw new O(28);return b},sb:function(a,b,c){P.vb(a.node,b+c);a.node.Sa=Math.max(a.node.Sa,b+c)},hb:function(a,b,c,d,f,g){assert(0===b);if(32768!==(a.node.mode&61440))throw new O(43);a=a.node.Ma; 124 | if(g&2||a.buffer!==Xa){if(0>>0)%T.length}function Wb(a){var b=Vb(a.parent.id,a.name);if(T[b]===a)T[b]=a.bb;else for(b=T[b];b;){if(b.bb===a){b.bb=a.bb;break}b=b.bb}} 127 | function Ob(a,b){var c;if(c=(c=Xb(a,"x"))?c:a.Na.lookup?0:2)throw new O(c,a);for(c=T[Vb(a.id,b)];c;c=c.bb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Na.lookup(a,b)}function Mb(a,b,c,d){a=new Yb(a,b,c,d);b=Vb(a.parent.id,a.name);a.bb=T[b];return T[b]=a}function Q(a){return 16384===(a&61440)}var Zb={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218}; 128 | function $b(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Xb(a,b){if(Sb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0}function ac(a,b){try{return Ob(a,b),20}catch(c){}return Xb(a,"wx")}function bc(a,b,c){try{var d=Ob(a,b)}catch(f){return f.Pa}if(a=Xb(a,"wx"))return a;if(c){if(!Q(d.mode))return 54;if(d===d.parent||"/"===Ub(d))return 10}else if(Q(d.mode))return 31;return 0} 129 | function cc(a){var b=4096;for(a=a||0;a<=b;a++)if(!S[a])return a;throw new O(33);}function dc(a,b){ec||(ec=function(){},ec.prototype={});var c=new ec,d;for(d in a)c[d]=a[d];a=c;b=cc(b);a.fd=b;return S[b]=a}var Lb={open:function(a){a.Oa=Qb[a.node.rdev].Oa;a.Oa.open&&a.Oa.open(a)},Za:function(){throw new O(70);}};function Hb(a,b){Qb[a]={Oa:b}} 130 | function fc(a,b){var c="/"===b,d=!b;if(c&&Pb)throw new O(10);if(!c&&!d){var f=V(b,{wb:!1});b=f.path;f=f.node;if(f.ab)throw new O(10);if(!Q(f.mode))throw new O(54);}b={type:a,Ub:{},yb:b,Mb:[]};a=a.Wa(b);a.Wa=b;b.root=a;c?Pb=a:f&&(f.ab=b,f.Wa&&f.Wa.Mb.push(b))}function da(a,b,c){var d=V(a,{parent:!0}).node;a=Ab(a);if(!a||"."===a||".."===a)throw new O(28);var f=ac(d,a);if(f)throw new O(f);if(!d.Na.gb)throw new O(63);return d.Na.gb(d,a,b,c)}function W(a,b){da(a,(void 0!==b?b:511)&1023|16384,0)} 131 | function hc(a,b,c){"undefined"===typeof c&&(c=b,b=438);da(a,b|8192,c)}function ic(a,b){if(!Eb(a))throw new O(44);var c=V(b,{parent:!0}).node;if(!c)throw new O(44);b=Ab(b);var d=ac(c,b);if(d)throw new O(d);if(!c.Na.symlink)throw new O(63);c.Na.symlink(c,b,a)} 132 | function ta(a){var b=V(a,{parent:!0}).node,c=Ab(a),d=Ob(b,c),f=bc(b,c,!1);if(f)throw new O(f);if(!b.Na.unlink)throw new O(63);if(d.ab)throw new O(10);try{U.willDeletePath&&U.willDeletePath(a)}catch(g){J("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.Na.unlink(b,c);Wb(d);try{if(U.onDeletePath)U.onDeletePath(a)}catch(g){J("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}} 133 | function Tb(a){a=V(a).node;if(!a)throw new O(44);if(!a.Na.readlink)throw new O(28);return Eb(Ub(a.parent),a.Na.readlink(a))}function jc(a,b){a=V(a,{Ya:!b}).node;if(!a)throw new O(44);if(!a.Na.Ua)throw new O(63);return a.Na.Ua(a)}function kc(a){return jc(a,!0)}function ea(a,b){var c;"string"===typeof a?c=V(a,{Ya:!0}).node:c=a;if(!c.Na.Ta)throw new O(63);c.Na.Ta(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})} 134 | function lc(a){var b;"string"===typeof a?b=V(a,{Ya:!0}).node:b=a;if(!b.Na.Ta)throw new O(63);b.Na.Ta(b,{timestamp:Date.now()})}function mc(a,b){if(0>b)throw new O(28);var c;"string"===typeof a?c=V(a,{Ya:!0}).node:c=a;if(!c.Na.Ta)throw new O(63);if(Q(c.mode))throw new O(31);if(32768!==(c.mode&61440))throw new O(28);if(a=Xb(c,"w"))throw new O(a);c.Na.Ta(c,{size:b,timestamp:Date.now()})} 135 | function u(a,b,c,d){if(""===a)throw new O(44);if("string"===typeof b){var f=Zb[b];if("undefined"===typeof f)throw Error("Unknown file open mode: "+b);b=f}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=r(a);try{g=V(a,{Ya:!(b&131072)}).node}catch(n){}}f=!1;if(b&64)if(g){if(b&128)throw new O(20);}else g=da(a,c,0),f=!0;if(!g)throw new O(44);8192===(g.mode&61440)&&(b&=-513);if(b&65536&&!Q(g.mode))throw new O(54);if(!f&&(c=g?40960===(g.mode&61440)?32:Q(g.mode)&& 136 | ("r"!==$b(b)||b&512)?31:Xb(g,$b(b)):44))throw new O(c);b&512&&mc(g,0);b&=-131713;d=dc({node:g,path:Ub(g),flags:b,seekable:!0,position:0,Oa:g.Oa,Rb:[],error:!1},d);d.Oa.open&&d.Oa.open(d);!e.logReadFiles||b&1||(Pc||(Pc={}),a in Pc||(Pc[a]=1,J("FS.trackingDelegate error on read file: "+a)));try{U.onOpenFile&&(g=0,1!==(b&2097155)&&(g|=1),0!==(b&2097155)&&(g|=2),U.onOpenFile(a,g))}catch(n){J("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+n.message)}return d} 137 | function ka(a){if(null===a.fd)throw new O(8);a.ob&&(a.ob=null);try{a.Oa.close&&a.Oa.close(a)}catch(b){throw b;}finally{S[a.fd]=null}a.fd=null}function Qc(a,b,c){if(null===a.fd)throw new O(8);if(!a.seekable||!a.Oa.Za)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.Oa.Za(a,b,c);a.Rb=[]} 138 | function Sc(a,b,c,d,f){if(0>d||0>f)throw new O(28);if(null===a.fd)throw new O(8);if(1===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.read)throw new O(28);var g="undefined"!==typeof f;if(!g)f=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.read(a,b,c,d,f);g||(a.position+=b);return b} 139 | function fa(a,b,c,d,f,g){if(0>d||0>f)throw new O(28);if(null===a.fd)throw new O(8);if(0===(a.flags&2097155))throw new O(8);if(Q(a.node.mode))throw new O(31);if(!a.Oa.write)throw new O(28);a.seekable&&a.flags&1024&&Qc(a,0,2);var n="undefined"!==typeof f;if(!n)f=a.position;else if(!a.seekable)throw new O(70);b=a.Oa.write(a,b,c,d,f,g);n||(a.position+=b);try{if(a.path&&U.onWriteToFile)U.onWriteToFile(a.path)}catch(t){J("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+t.message)}return b} 140 | function sa(a){var b={encoding:"binary"};b=b||{};b.flags=b.flags||"r";b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=u(a,b.flags);a=jc(a).size;var f=new Uint8Array(a);Sc(d,f,0,a,0);"utf8"===b.encoding?c=Va(f,0):"binary"===b.encoding&&(c=f);ka(d);return c} 141 | function Tc(){O||(O=function(a,b){this.node=b;this.Qb=function(c){this.Pa=c};this.Qb(a);this.message="FS error"},O.prototype=Error(),O.prototype.constructor=O,[44].forEach(function(a){Nb[a]=new O(a);Nb[a].stack=""}))}var Uc;function ca(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c} 142 | function Vc(a,b,c){a=r("/dev/"+a);var d=ca(!!b,!!c);Wc||(Wc=64);var f=Wc++<<8|0;Hb(f,{open:function(g){g.seekable=!1},close:function(){c&&c.buffer&&c.buffer.length&&c(10)},read:function(g,n,t,w){for(var v=0,C=0;C>2]=d.dev;L[c+4>>2]=0;L[c+8>>2]=d.ino;L[c+12>>2]=d.mode;L[c+16>>2]=d.nlink;L[c+20>>2]=d.uid;L[c+24>>2]=d.gid;L[c+28>>2]=d.rdev;L[c+32>>2]=0;M=[d.size>>>0,(N=d.size,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[c+40>>2]=M[0];L[c+44>>2]=M[1];L[c+48>>2]=4096;L[c+52>>2]=d.blocks;L[c+56>>2]=d.atime.getTime()/1E3|0;L[c+60>>2]= 145 | 0;L[c+64>>2]=d.mtime.getTime()/1E3|0;L[c+68>>2]=0;L[c+72>>2]=d.ctime.getTime()/1E3|0;L[c+76>>2]=0;M=[d.ino>>>0,(N=d.ino,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[c+80>>2]=M[0];L[c+84>>2]=M[1];return 0}var Zc=void 0;function $c(){Zc+=4;return L[Zc-4>>2]}function Z(a){a=S[a];if(!a)throw new O(8);return a}var ad={}; 146 | function bd(){if(!cd){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",_:xa||"./this.program"},b;for(b in ad)a[b]=ad[b];var c=[];for(b in a)c.push(b+"="+a[b]);cd=c}return cd}var cd,dd;za?dd=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:"undefined"!==typeof dateNow?dd=dateNow:dd=function(){return performance.now()}; 147 | function ed(a){for(var b=dd();dd()-b
>2]);L[b>>2]=a.getSeconds();L[b+4>>2]=a.getMinutes();L[b+8>>2]=a.getHours();L[b+12>>2]=a.getDate();L[b+16>>2]=a.getMonth();L[b+20>>2]=a.getFullYear()-1900;L[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);L[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;L[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset(); 151 | c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;L[b+32>>2]=a;a=L[xb()+(a?4:0)>>2];L[b+40>>2]=a;return b},j:function(a,b){try{a=A(a);if(b&-8)var c=-28;else{var d;(d=V(a,{Ya:!0}).node)?(a="",b&4&&(a+="r"),b&2&&(a+="w"),b&1&&(a+="x"),c=a&&Xb(d,a)?-2:0):c=-44}return c}catch(f){return"undefined"!==typeof X&&f instanceof O||K(f),-f.Pa}},v:function(a,b){try{return a=A(a),ea(a,b),0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},D:function(a){try{return a=A(a), 152 | lc(a),0}catch(b){return"undefined"!==typeof X&&b instanceof O||K(b),-b.Pa}},w:function(a,b){try{var c=S[a];if(!c)throw new O(8);ea(c.node,b);return 0}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),-d.Pa}},E:function(a){try{var b=S[a];if(!b)throw new O(8);lc(b.node);return 0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},c:function(a,b,c){Zc=c;try{var d=Z(a);switch(b){case 0:var f=$c();return 0>f?-28:u(d.path,d.flags,0,f).fd;case 1:case 2:return 0;case 3:return d.flags; 153 | case 4:return f=$c(),d.flags|=f,0;case 12:return f=$c(),La[f+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Bb(28),-1;default:return-28}}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},x:function(a,b){try{var c=Z(a);return Yc(jc,c.path,b)}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),-d.Pa}},i:function(a,b,c){try{var d=S[a];if(!d)throw new O(8);if(0===(d.flags&2097155))throw new O(28);mc(d.node,c);return 0}catch(f){return"undefined"!==typeof X&& 154 | f instanceof O||K(f),-f.Pa}},J:function(a,b){try{if(0===b)return-28;if(b=c)var d=-28;else{var f=Tb(a),g=Math.min(c,aa(f)),n=z[b+g];k(f,m,b,c+1);z[b+g]=n;d=g}return d}catch(t){return"undefined"!==typeof X&&t instanceof O||K(t),-t.Pa}},C:function(a){try{a=A(a);var b=V(a,{parent:!0}).node,c=Ab(a),d=Ob(b,c),f=bc(b,c,!0);if(f)throw new O(f);if(!b.Na.rmdir)throw new O(63);if(d.ab)throw new O(10);try{U.willDeletePath&&U.willDeletePath(a)}catch(g){J("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+ 158 | g.message)}b.Na.rmdir(b,c);Wb(d);try{if(U.onDeletePath)U.onDeletePath(a)}catch(g){J("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}return 0}catch(g){return"undefined"!==typeof X&&g instanceof O||K(g),-g.Pa}},f:function(a,b){try{return a=A(a),Yc(jc,a,b)}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),-c.Pa}},H:function(a){try{return a=A(a),ta(a),0}catch(b){return"undefined"!==typeof X&&b instanceof O||K(b),-b.Pa}},n:function(a,b,c){m.copyWithin(a,b,b+c)}, 159 | d:function(a){a>>>=0;var b=m.length;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0>>16);Ya(Oa.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},p:function(a,b){var c=0;bd().forEach(function(d,f){var g=b+c;f=L[a+4*f>>2]=g;for(g=0;g>0]=d.charCodeAt(g);z[f>>0]=0;c+=d.length+1});return 0},q:function(a,b){var c= 160 | bd();L[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});L[b>>2]=d;return 0},g:function(a){try{var b=Z(a);ka(b);return 0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),c.Pa}},o:function(a,b){try{var c=Z(a);z[b>>0]=c.tty?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){return"undefined"!==typeof X&&d instanceof O||K(d),d.Pa}},m:function(a,b,c,d,f){try{var g=Z(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Qc(g,a,d);M=[g.position>>> 161 | 0,(N=g.position,1<=+Math.abs(N)?0>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];L[f>>2]=M[0];L[f+4>>2]=M[1];g.ob&&0===a&&0===d&&(g.ob=null);return 0}catch(n){return"undefined"!==typeof X&&n instanceof O||K(n),n.Pa}},K:function(a){try{var b=Z(a);return b.Oa&&b.Oa.fsync?-b.Oa.fsync(b):0}catch(c){return"undefined"!==typeof X&&c instanceof O||K(c),c.Pa}},I:function(a,b,c,d){try{a:{for(var f=Z(a),g=a=0;g>2],L[b+(8* 162 | g+4)>>2],void 0);if(0>n){var t=-1;break a}a+=n}t=a}L[d>>2]=t;return 0}catch(w){return"undefined"!==typeof X&&w instanceof O||K(w),w.Pa}},h:function(a){var b=Date.now();L[a>>2]=b/1E3|0;L[a+4>>2]=b%1E3*1E3|0;return 0},a:Oa,k:function(a,b){if(0===a)return Bb(28),-1;var c=L[a>>2];a=L[a+4>>2];if(0>a||999999999c)return Bb(28),-1;0!==b&&(L[b>>2]=0,L[b+4>>2]=0);return ed(1E6*c+a/1E3)},B:function(a){switch(a){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809; 163 | case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32; 164 | case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}Bb(28);return-1}, 165 | L:function(a){var b=Date.now()/1E3|0;a&&(L[a>>2]=b);return b},s:function(a,b){if(b){var c=1E3*L[b+8>>2];c+=L[b+12>>2]/1E3}else c=Date.now();a=A(a);try{b=c;var d=V(a,{Ya:!0}).node;d.Na.Ta(d,{timestamp:Math.max(b,c)});return 0}catch(f){a=f;if(!(a instanceof O)){a+=" : ";a:{d=Error();if(!d.stack){try{throw Error();}catch(g){d=g}if(!d.stack){d="(no stack trace available)";break a}}d=d.stack.toString()}e.extraStackTrace&&(d+="\n"+e.extraStackTrace());d=ob(d);throw a+d;}Bb(a.Pa);return-1}}}; 166 | (function(){function a(f){e.asm=f.exports;Ja=e.asm.M;eb--;e.monitorRunDependencies&&e.monitorRunDependencies(eb);0==eb&&(null!==fb&&(clearInterval(fb),fb=null),gb&&(f=gb,gb=null,f()))}function b(f){a(f.instance)}function c(f){return mb().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){J("failed to asynchronously prepare wasm: "+g);K(g)})}var d={a:id};eb++;e.monitorRunDependencies&&e.monitorRunDependencies(eb);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return J("Module.instantiateWasm callback failed with error: "+ 167 | f),!1}(function(){if(Ka||"function"!==typeof WebAssembly.instantiateStreaming||jb()||hb("file://")||"function"!==typeof fetch)return c(b);fetch(ib,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){J("wasm streaming compile failed: "+g);J("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})(); 168 | var fd=e.___wasm_call_ctors=function(){return(fd=e.___wasm_call_ctors=e.asm.N).apply(null,arguments)},hd=e._memset=function(){return(hd=e._memset=e.asm.O).apply(null,arguments)};e._sqlite3_free=function(){return(e._sqlite3_free=e.asm.P).apply(null,arguments)};var Cb=e.___errno_location=function(){return(Cb=e.___errno_location=e.asm.Q).apply(null,arguments)};e._sqlite3_finalize=function(){return(e._sqlite3_finalize=e.asm.R).apply(null,arguments)}; 169 | e._sqlite3_reset=function(){return(e._sqlite3_reset=e.asm.S).apply(null,arguments)};e._sqlite3_clear_bindings=function(){return(e._sqlite3_clear_bindings=e.asm.T).apply(null,arguments)};e._sqlite3_value_blob=function(){return(e._sqlite3_value_blob=e.asm.U).apply(null,arguments)};e._sqlite3_value_text=function(){return(e._sqlite3_value_text=e.asm.V).apply(null,arguments)};e._sqlite3_value_bytes=function(){return(e._sqlite3_value_bytes=e.asm.W).apply(null,arguments)}; 170 | e._sqlite3_value_double=function(){return(e._sqlite3_value_double=e.asm.X).apply(null,arguments)};e._sqlite3_value_int=function(){return(e._sqlite3_value_int=e.asm.Y).apply(null,arguments)};e._sqlite3_value_type=function(){return(e._sqlite3_value_type=e.asm.Z).apply(null,arguments)};e._sqlite3_result_blob=function(){return(e._sqlite3_result_blob=e.asm._).apply(null,arguments)};e._sqlite3_result_double=function(){return(e._sqlite3_result_double=e.asm.$).apply(null,arguments)}; 171 | e._sqlite3_result_error=function(){return(e._sqlite3_result_error=e.asm.aa).apply(null,arguments)};e._sqlite3_result_int=function(){return(e._sqlite3_result_int=e.asm.ba).apply(null,arguments)};e._sqlite3_result_int64=function(){return(e._sqlite3_result_int64=e.asm.ca).apply(null,arguments)};e._sqlite3_result_null=function(){return(e._sqlite3_result_null=e.asm.da).apply(null,arguments)};e._sqlite3_result_text=function(){return(e._sqlite3_result_text=e.asm.ea).apply(null,arguments)}; 172 | e._sqlite3_step=function(){return(e._sqlite3_step=e.asm.fa).apply(null,arguments)};e._sqlite3_column_count=function(){return(e._sqlite3_column_count=e.asm.ga).apply(null,arguments)};e._sqlite3_data_count=function(){return(e._sqlite3_data_count=e.asm.ha).apply(null,arguments)};e._sqlite3_column_blob=function(){return(e._sqlite3_column_blob=e.asm.ia).apply(null,arguments)};e._sqlite3_column_bytes=function(){return(e._sqlite3_column_bytes=e.asm.ja).apply(null,arguments)}; 173 | e._sqlite3_column_double=function(){return(e._sqlite3_column_double=e.asm.ka).apply(null,arguments)};e._sqlite3_column_text=function(){return(e._sqlite3_column_text=e.asm.la).apply(null,arguments)};e._sqlite3_column_type=function(){return(e._sqlite3_column_type=e.asm.ma).apply(null,arguments)};e._sqlite3_column_name=function(){return(e._sqlite3_column_name=e.asm.na).apply(null,arguments)};e._sqlite3_bind_blob=function(){return(e._sqlite3_bind_blob=e.asm.oa).apply(null,arguments)}; 174 | e._sqlite3_bind_double=function(){return(e._sqlite3_bind_double=e.asm.pa).apply(null,arguments)};e._sqlite3_bind_int=function(){return(e._sqlite3_bind_int=e.asm.qa).apply(null,arguments)};e._sqlite3_bind_text=function(){return(e._sqlite3_bind_text=e.asm.ra).apply(null,arguments)};e._sqlite3_bind_parameter_index=function(){return(e._sqlite3_bind_parameter_index=e.asm.sa).apply(null,arguments)};e._sqlite3_sql=function(){return(e._sqlite3_sql=e.asm.ta).apply(null,arguments)}; 175 | e._sqlite3_normalized_sql=function(){return(e._sqlite3_normalized_sql=e.asm.ua).apply(null,arguments)};e._sqlite3_errmsg=function(){return(e._sqlite3_errmsg=e.asm.va).apply(null,arguments)};e._sqlite3_exec=function(){return(e._sqlite3_exec=e.asm.wa).apply(null,arguments)};e._sqlite3_prepare_v2=function(){return(e._sqlite3_prepare_v2=e.asm.xa).apply(null,arguments)};e._sqlite3_changes=function(){return(e._sqlite3_changes=e.asm.ya).apply(null,arguments)}; 176 | e._sqlite3_close_v2=function(){return(e._sqlite3_close_v2=e.asm.za).apply(null,arguments)};e._sqlite3_create_function_v2=function(){return(e._sqlite3_create_function_v2=e.asm.Aa).apply(null,arguments)};e._sqlite3_open=function(){return(e._sqlite3_open=e.asm.Ba).apply(null,arguments)};var ba=e._malloc=function(){return(ba=e._malloc=e.asm.Ca).apply(null,arguments)},na=e._free=function(){return(na=e._free=e.asm.Da).apply(null,arguments)}; 177 | e._RegisterExtensionFunctions=function(){return(e._RegisterExtensionFunctions=e.asm.Ea).apply(null,arguments)}; 178 | var xb=e.__get_tzname=function(){return(xb=e.__get_tzname=e.asm.Fa).apply(null,arguments)},vb=e.__get_daylight=function(){return(vb=e.__get_daylight=e.asm.Ga).apply(null,arguments)},ub=e.__get_timezone=function(){return(ub=e.__get_timezone=e.asm.Ha).apply(null,arguments)},oa=e.stackSave=function(){return(oa=e.stackSave=e.asm.Ia).apply(null,arguments)},qa=e.stackRestore=function(){return(qa=e.stackRestore=e.asm.Ja).apply(null,arguments)},y=e.stackAlloc=function(){return(y=e.stackAlloc=e.asm.Ka).apply(null, 179 | arguments)},gd=e._memalign=function(){return(gd=e._memalign=e.asm.La).apply(null,arguments)};e.cwrap=function(a,b,c,d){c=c||[];var f=c.every(function(g){return"number"===g});return"string"!==b&&f&&!d?Qa(a):function(){return Ra(a,b,c,arguments)}};e.UTF8ToString=A;e.stackSave=oa;e.stackRestore=qa;e.stackAlloc=y;var jd;gb=function kd(){jd||ld();jd||(gb=kd)}; 180 | function ld(){function a(){if(!jd&&(jd=!0,e.calledRun=!0,!Pa)){e.noFSInit||Uc||(Uc=!0,Tc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?Vc("stdin",e.stdin):ic("/dev/tty","/dev/stdin"),e.stdout?Vc("stdout",null,e.stdout):ic("/dev/tty","/dev/stdout"),e.stderr?Vc("stderr",null,e.stderr):ic("/dev/tty1","/dev/stderr"),u("/dev/stdin","r"),u("/dev/stdout","w"),u("/dev/stderr","w"));nb(ab);Sb=!1;nb(bb);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&& 181 | (e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();cb.unshift(b)}nb(cb)}}if(!(0 2 |
3 | 4 | 5 | {{ visible ? active.message : '' }} 6 | 7 |
8 | 9 | 10 | 26 | -------------------------------------------------------------------------------- /src/AppSplitter.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 38 | -------------------------------------------------------------------------------- /src/_store/alert.module.js: -------------------------------------------------------------------------------- 1 | // https://www.reddit.com/r/vuejs/comments/dfbv35/vuex_toast_notification_queue/f32bwfc/ 2 | 3 | /* 4 | Use with : 5 | 6 | this.$store.dispatch('pushToast', { 7 | message: 'The message', 8 | }) 9 | */ 10 | 11 | const TOAST_DURATION = 3000; 12 | const toastTimeout = (callback) => setTimeout(callback, TOAST_DURATION); 13 | 14 | const state = { 15 | queue: [], 16 | active: undefined, 17 | timeoutId: undefined, 18 | }; 19 | 20 | const getters = { 21 | visible: (state) => !!state.active, 22 | }; 23 | 24 | const mutations = { 25 | enqueue(state, { toast }) { 26 | state.queue.push(toast); 27 | }, 28 | dequeue(state, { timeoutId }) { 29 | const active = state.queue.shift(); 30 | 31 | state.active = active; 32 | state.timeoutId = timeoutId; 33 | }, 34 | reset(state) { 35 | const { timeoutId } = state; 36 | if (timeoutId) clearTimeout(timeoutId); 37 | 38 | state.active = undefined; 39 | state.timeoutId = undefined; 40 | }, 41 | }; 42 | 43 | const actions = { 44 | pushToast({ state, commit, dispatch }, toast) { 45 | commit('enqueue', { toast }); 46 | if (!state.active) dispatch('processQueue'); 47 | }, 48 | processQueue({ state, commit, dispatch }) { 49 | if (!state.queue.length && !state.active) return; 50 | if (!state.queue.length && state.active) { 51 | /* eslint-disable consistent-return */ 52 | return toastTimeout(() => commit('reset')); 53 | } 54 | 55 | const timeoutId = toastTimeout(() => dispatch('processQueue')); 56 | 57 | commit('dequeue', { timeoutId }); 58 | }, 59 | }; 60 | 61 | const modules = {}; 62 | 63 | export default { 64 | namespaced: true, 65 | state, 66 | getters, 67 | mutations, 68 | actions, 69 | modules, 70 | }; 71 | -------------------------------------------------------------------------------- /src/_store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | 4 | import alert from './alert.module'; 5 | import splitter from './splitter.module'; 6 | import loader from './loader.module'; 7 | 8 | Vue.use(Vuex); 9 | 10 | export default new Vuex.Store({ 11 | strict: process.env.NODE_ENV !== 'production', 12 | namespaced: true, 13 | state: { 14 | }, 15 | getters: { 16 | }, 17 | mutations: { 18 | }, 19 | actions: { 20 | }, 21 | modules: { 22 | alert, 23 | splitter, 24 | loader, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /src/_store/loader.module.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | status: {}, 3 | loading: false, 4 | shapeDB: [], 5 | selected: '', 6 | }; 7 | 8 | const getters = { 9 | // Returns the folders and notes ordered by folder 10 | notesItems: (state, getters) => { 11 | const { folders } = getters; 12 | let items = []; 13 | 14 | for (let i = 0; i < folders.length; i++) { 15 | // Clone folder 16 | const folder = { ...folders[i] }; 17 | items.push(folder); 18 | 19 | // Clone child notes 20 | let childNotes = state.shapeDB.filter((item) => item.parent === folder.id); 21 | childNotes = JSON.parse(JSON.stringify(childNotes)); 22 | items = items.concat(childNotes); 23 | } 24 | 25 | return items; 26 | }, 27 | // Returns the folders 28 | folders: (state) => state.shapeDB.filter((item) => item.folder), 29 | // Returns the root folder notes (notes without parent folder) 30 | rootNotes: (state) => state.shapeDB.filter((item) => item.parent === null), 31 | }; 32 | 33 | const mutations = { 34 | startLoading(state) { 35 | state.loading = true; 36 | }, 37 | zipLoaded(state) { 38 | state.status = {}; 39 | state.status.zipLoaded = true; 40 | }, 41 | badZipFile(state) { 42 | state.status = {}; 43 | state.loading = false; 44 | }, 45 | badDatabaseFile(state) { 46 | state.status = {}; 47 | state.loading = false; 48 | }, 49 | shapeDBLoaded(state, shapeDB) { 50 | state.status = {}; 51 | state.status.shapeDBLoaded = true; 52 | state.loading = false; 53 | state.shapeDB = shapeDB; 54 | }, 55 | selectNote(state, id) { 56 | state.selected = id; 57 | state.loading = true; 58 | }, 59 | }; 60 | 61 | const actions = { 62 | startLoading({ commit }) { 63 | commit('startLoading'); 64 | }, 65 | zipLoaded({ commit }) { 66 | commit('zipLoaded'); 67 | }, 68 | badZipFile({ commit, dispatch }) { 69 | dispatch('alert/pushToast', { 70 | message: 'Error while loading backup file!', 71 | }, { root: true }); 72 | commit('badZipFile'); 73 | }, 74 | badDatabaseFile({ commit, dispatch }) { 75 | dispatch('alert/pushToast', { 76 | message: 'Error while loading notes database!', 77 | }, { root: true }); 78 | commit('badDatabaseFile'); 79 | }, 80 | shapeDBLoaded({ commit }, shapeDB) { 81 | commit('shapeDBLoaded', shapeDB); 82 | }, 83 | selectNote({ commit }, id) { 84 | commit('splitter/toggle', {}, { root: true }); 85 | commit('selectNote', id); 86 | }, 87 | badNoteFile({ dispatch }) { 88 | dispatch('alert/pushToast', { 89 | message: 'Error while loading this note data!', 90 | }, { root: true }); 91 | }, 92 | }; 93 | 94 | const modules = {}; 95 | 96 | export default { 97 | namespaced: true, 98 | state, 99 | getters, 100 | mutations, 101 | actions, 102 | modules, 103 | }; 104 | -------------------------------------------------------------------------------- /src/_store/splitter.module.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | open: false, 3 | }; 4 | 5 | const getters = {}; 6 | 7 | const mutations = { 8 | toggle(state, shouldOpen) { 9 | if (typeof shouldOpen === 'boolean') { 10 | state.open = shouldOpen; 11 | } else { 12 | state.open = !state.open; 13 | } 14 | }, 15 | }; 16 | 17 | const actions = {}; 18 | 19 | const modules = {}; 20 | 21 | export default { 22 | namespaced: true, 23 | state, 24 | getters, 25 | mutations, 26 | actions, 27 | modules, 28 | }; 29 | -------------------------------------------------------------------------------- /src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 403 | 404 | 441 | -------------------------------------------------------------------------------- /src/components/Menu.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 45 | -------------------------------------------------------------------------------- /src/components/Toolbar.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 20 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import 'onsenui/css/onsenui.css'; 2 | import 'onsenui/css/onsen-css-components.css'; 3 | 4 | import Vue from 'vue'; 5 | import VueOnsen from 'vue-onsenui'; 6 | import App from './App.vue'; 7 | import store from './_store'; 8 | 9 | Vue.use(VueOnsen); 10 | 11 | Vue.config.productionTip = false; 12 | 13 | new Vue({ 14 | store, 15 | render: (h) => h(App), 16 | beforeCreate() { 17 | // Shortcut for Material Design 18 | Vue.prototype.md = this.$ons.platform.isAndroid(); 19 | }, 20 | }).$mount('#app'); 21 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicPath: process.env.NODE_ENV === 'production' 3 | ? `/${process.env.CI_PROJECT_NAME}/` 4 | : '/', 5 | }; 6 | --------------------------------------------------------------------------------