├── .editorconfig ├── .env.example ├── .eslintignore ├── .eslintrc.json ├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .gitmodules ├── .mailmap ├── .prettierrc ├── .vscode ├── extensions.json └── settings.json ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── _config.yml ├── _config_development.yml ├── _data ├── methods.yml └── options.yml ├── _includes └── highlight-js │ ├── LICENSE │ └── styles │ ├── hljs-line-numbers.css │ └── hljs-theme.css ├── _layouts └── default.html ├── _sass └── magic-check │ ├── LICENSE │ └── sass │ ├── _checkbox.scss │ ├── _common.scss │ ├── _radio.scss │ ├── _variable.scss │ └── magic-check.scss ├── assets ├── css │ └── style.scss └── images │ ├── buttons │ ├── copy-document.png │ ├── download.png │ └── external-link-symbol.png │ └── icons │ ├── icon-128x128.png │ ├── icon-144x144.png │ ├── icon-152x152.png │ ├── icon-192x192.png │ ├── icon-384x384.png │ ├── icon-512x512.png │ ├── icon-72x72.png │ └── icon-96x96.png ├── docker-compose.yml ├── docker-entrypoint.sh ├── favicon.ico ├── lib ├── arraydecode.js ├── cleansource.js ├── evaldecode.js ├── jsfuckdecode.js ├── numberdecode.js ├── obfuscatorio.js └── utils.js ├── main.js ├── manifest.webmanifest ├── package-lock.json ├── package.json ├── sw.js ├── sw.js.map ├── third_party ├── cat-in-136 │ └── aadecode.js ├── clipboard-js │ ├── LICENSE │ └── clipboard.min.js ├── decoder-jjencode │ └── jjdecode.js ├── highlight-js │ ├── LICENSE │ └── highlight.min.js ├── js-beautify │ ├── LICENSE │ ├── beautify.min.js │ └── unpackers │ │ ├── javascriptobfuscator_unpacker.js │ │ ├── myobfuscate_unpacker.js │ │ ├── p_a_c_k_e_r_unpacker.js │ │ └── urlencode_unpacker.js ├── mathjs │ ├── LICENSE │ └── math.min.js └── workbox │ └── workbox-v5.1.4 │ ├── workbox-background-sync.dev.js │ ├── workbox-background-sync.dev.js.map │ ├── workbox-background-sync.prod.js │ ├── workbox-background-sync.prod.js.map │ ├── workbox-broadcast-update.dev.js │ ├── workbox-broadcast-update.dev.js.map │ ├── workbox-broadcast-update.prod.js │ ├── workbox-broadcast-update.prod.js.map │ ├── workbox-cacheable-response.dev.js │ ├── workbox-cacheable-response.dev.js.map │ ├── workbox-cacheable-response.prod.js │ ├── workbox-cacheable-response.prod.js.map │ ├── workbox-core.dev.js │ ├── workbox-core.dev.js.map │ ├── workbox-core.prod.js │ ├── workbox-core.prod.js.map │ ├── workbox-expiration.dev.js │ ├── workbox-expiration.dev.js.map │ ├── workbox-expiration.prod.js │ ├── workbox-expiration.prod.js.map │ ├── workbox-navigation-preload.dev.js │ ├── workbox-navigation-preload.dev.js.map │ ├── workbox-navigation-preload.prod.js │ ├── workbox-navigation-preload.prod.js.map │ ├── workbox-offline-ga.dev.js │ ├── workbox-offline-ga.dev.js.map │ ├── workbox-offline-ga.prod.js │ ├── workbox-offline-ga.prod.js.map │ ├── workbox-precaching.dev.js │ ├── workbox-precaching.dev.js.map │ ├── workbox-precaching.prod.js │ ├── workbox-precaching.prod.js.map │ ├── workbox-range-requests.dev.js │ ├── workbox-range-requests.dev.js.map │ ├── workbox-range-requests.prod.js │ ├── workbox-range-requests.prod.js.map │ ├── workbox-routing.dev.js │ ├── workbox-routing.dev.js.map │ ├── workbox-routing.prod.js │ ├── workbox-routing.prod.js.map │ ├── workbox-strategies.dev.js │ ├── workbox-strategies.dev.js.map │ ├── workbox-strategies.prod.js │ ├── workbox-strategies.prod.js.map │ ├── workbox-streams.dev.js │ ├── workbox-streams.dev.js.map │ ├── workbox-streams.prod.js │ ├── workbox-streams.prod.js.map │ ├── workbox-sw.js │ ├── workbox-sw.js.map │ ├── workbox-window.dev.es5.mjs │ ├── workbox-window.dev.es5.mjs.map │ ├── workbox-window.dev.mjs │ ├── workbox-window.dev.mjs.map │ ├── workbox-window.dev.umd.js │ ├── workbox-window.dev.umd.js.map │ ├── workbox-window.prod.es5.mjs │ ├── workbox-window.prod.es5.mjs.map │ ├── workbox-window.prod.mjs │ ├── workbox-window.prod.mjs.map │ ├── workbox-window.prod.umd.js │ └── workbox-window.prod.umd.js.map ├── userscript ├── de4js_helper.meta.js └── de4js_helper.user.js ├── workbox-08e0b74e.js ├── workbox-08e0b74e.js.map ├── workbox-a82ab0ba.js ├── workbox-a82ab0ba.js.map ├── workbox-config.js ├── workbox-e1834b40.js ├── workbox-e1834b40.js.map └── worker ├── decode.js └── format.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{min.js,meta.js,css}] 15 | insert_final_newline = false 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_PORT=4000 2 | WATCH_PORT=35729 3 | CONFIG="_config.yml" 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | third_party 2 | _site 3 | sw.js 4 | workbox-*.js 5 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "frontmatter" 4 | ], 5 | "env": { 6 | "browser": true, 7 | "greasemonkey": true 8 | }, 9 | "extends": "eslint:recommended", 10 | "parserOptions": { 11 | "ecmaVersion": 2018, 12 | "sourceType": "module" 13 | }, 14 | "rules": { 15 | "indent": [ 16 | "error", 17 | 2, 18 | { 19 | "SwitchCase": 1 20 | } 21 | ], 22 | "linebreak-style": [ 23 | "error", 24 | "unix" 25 | ], 26 | "quotes": [ 27 | "error", 28 | "single", 29 | { 30 | "avoidEscape": true 31 | } 32 | ], 33 | "semi": [ 34 | "error" 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # AUTO-DETECT 2 | * text=auto 3 | * text eol=lf 4 | 5 | ## SOURCE CODE 6 | *.css text 7 | *.scss text 8 | *.html text 9 | *.js text 10 | *.json text 11 | *.yml text 12 | 13 | ## DOCUMENTATION 14 | *.md text 15 | LICENSE text 16 | 17 | ## LINTERS 18 | .eslintignore text 19 | 20 | ## CONFIGS 21 | .editorconfig text 22 | .gitattributes text 23 | .gitignore text 24 | *.yml text 25 | Gemfile text 26 | *.lock text 27 | 28 | ## GRAPHICS 29 | *.ico binary 30 | *.png binary 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | # temporary files which can be created if a process still has a handle open of a deleted file 4 | .fuse_hidden* 5 | 6 | # KDE directory preferences 7 | .directory 8 | 9 | # Linux trash folder which might appear on any partition or disk 10 | .Trash-* 11 | 12 | # .nfs files are created when an open file is removed but is still being accessed 13 | .nfs* 14 | 15 | # Windows thumbnail cache files 16 | Thumbs.db 17 | ehthumbs.db 18 | ehthumbs_vista.db 19 | 20 | # Dump file 21 | *.stackdump 22 | 23 | # Folder config file 24 | Desktop.ini 25 | 26 | # Recycle Bin used on file shares 27 | $RECYCLE.BIN/ 28 | 29 | # Windows Installer files 30 | *.cab 31 | *.msi 32 | *.msm 33 | *.msp 34 | 35 | # Windows shortcuts 36 | *.lnk 37 | 38 | # General 39 | .DS_Store 40 | .AppleDouble 41 | .LSOverride 42 | 43 | # Icon must end with two \r 44 | Icon 45 | 46 | # Thumbnails 47 | ._* 48 | 49 | # Files that might appear in the root of a volume 50 | .DocumentRevisions-V100 51 | .fseventsd 52 | .Spotlight-V100 53 | .TemporaryItems 54 | .Trashes 55 | .VolumeIcon.icns 56 | .com.apple.timemachine.donotpresent 57 | 58 | # Directories potentially created on remote AFP share 59 | .AppleDB 60 | .AppleDesktop 61 | Network Trash Folder 62 | Temporary Items 63 | .apdisk 64 | 65 | .vscode/* 66 | !.vscode/settings.json 67 | !.vscode/tasks.json 68 | !.vscode/launch.json 69 | !.vscode/extensions.json 70 | 71 | # Cache files for Sublime Text 72 | *.tmlanguage.cache 73 | *.tmPreferences.cache 74 | *.stTheme.cache 75 | 76 | # Workspace files are user-specific 77 | *.sublime-workspace 78 | 79 | # Project files should be checked into the repository, unless a significant 80 | # proportion of contributors will probably not be using Sublime Text 81 | # *.sublime-project 82 | 83 | # SFTP configuration file 84 | sftp-config.json 85 | 86 | # Package control specific files 87 | Package Control.last-run 88 | Package Control.ca-list 89 | Package Control.ca-bundle 90 | Package Control.system-ca-bundle 91 | Package Control.cache/ 92 | Package Control.ca-certs/ 93 | Package Control.merged-ca-bundle 94 | Package Control.user-ca-bundle 95 | oscrypto-ca-bundle.crt 96 | bh_unicode_properties.cache 97 | 98 | # Sublime-github package stores a github token in this file 99 | # https://packagecontrol.io/packages/sublime-github 100 | GitHub.sublime-settings 101 | 102 | _site/ 103 | .sass-cache/ 104 | .jekyll-metadata 105 | 106 | *.gem 107 | *.rbc 108 | /.config 109 | /coverage/ 110 | /InstalledFiles 111 | /pkg/ 112 | /spec/reports/ 113 | /spec/examples.txt 114 | /test/tmp/ 115 | /test/version_tmp/ 116 | /tmp/ 117 | 118 | # Used by dotenv library to load environment variables. 119 | # .env 120 | 121 | ## Specific to RubyMotion: 122 | .dat* 123 | .repl_history 124 | build/ 125 | *.bridgesupport 126 | build-iPhoneOS/ 127 | build-iPhoneSimulator/ 128 | 129 | ## Specific to RubyMotion (use of CocoaPods): 130 | # 131 | # We recommend against adding the Pods directory to your .gitignore. However 132 | # you should judge for yourself, the pros and cons are mentioned at: 133 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 134 | # 135 | # vendor/Pods/ 136 | 137 | ## Documentation cache and generated files: 138 | /.yardoc/ 139 | /_yardoc/ 140 | /doc/ 141 | /rdoc/ 142 | 143 | ## Environment normalization: 144 | /.bundle/ 145 | /vendor/bundle 146 | /lib/bundler/man/ 147 | 148 | # for a library or gem, you might want to ignore these files since the code is 149 | # intended to run in multiple environments; otherwise, check them in: 150 | # Gemfile.lock 151 | # .ruby-version 152 | # .ruby-gemset 153 | 154 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: 155 | .rvmrc 156 | 157 | # Logs 158 | logs 159 | *.log 160 | npm-debug.log* 161 | yarn-debug.log* 162 | yarn-error.log* 163 | 164 | # Runtime data 165 | pids 166 | *.pid 167 | *.seed 168 | *.pid.lock 169 | 170 | # Directory for instrumented libs generated by jscoverage/JSCover 171 | lib-cov 172 | 173 | # Coverage directory used by tools like istanbul 174 | coverage 175 | 176 | # nyc test coverage 177 | .nyc_output 178 | 179 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 180 | .grunt 181 | 182 | # Bower dependency directory (https://bower.io/) 183 | bower_components 184 | 185 | # node-waf configuration 186 | .lock-wscript 187 | 188 | # Compiled binary addons (https://nodejs.org/api/addons.html) 189 | build/Release 190 | 191 | # Dependency directories 192 | node_modules/ 193 | jspm_packages/ 194 | 195 | # Typescript v1 declaration files 196 | typings/ 197 | 198 | # Optional npm cache directory 199 | .npm 200 | 201 | # Optional eslint cache 202 | .eslintcache 203 | 204 | # Optional REPL history 205 | .node_repl_history 206 | 207 | # Output of 'npm pack' 208 | *.tgz 209 | 210 | # Yarn Integrity file 211 | .yarn-integrity 212 | 213 | # dotenv environment variables file 214 | .env 215 | 216 | *.lock 217 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "third_party/NotSoWise"] 2 | path = third_party/NotSoWise 3 | url = https://github.com/FAKE1007/NotSoWise.git 4 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | lelinhtinh 2 | lelinhtinh <5460915+lelinhtinh@users.noreply.github.com> 3 | lelinhtinh 4 | lelinhtinh 5 | lelinhtinh 6 | lelinhtinh 7 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "singleQuote": true, 4 | "useTabs": false, 5 | "printWidth": 120, 6 | "semi": true, 7 | "bracketSpacing": true, 8 | "proseWrap": "never", 9 | "trailingComma": "all" 10 | } 11 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "hookyqr.beautify", 4 | "editorconfig.editorconfig", 5 | "dbaeumer.vscode-eslint", 6 | "ms-azuretools.vscode-docker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript.validate.enable": false, 3 | "files.watcherExclude": { 4 | "_site": true, 5 | "third_partye": true, 6 | }, 7 | "search.exclude": { 8 | "third_partye": true, 9 | "workbox-*.js": true, 10 | "sw.js": true, 11 | "**/*.min.*": true, 12 | "**/*.map": true 13 | }, 14 | "docker.commands.composeUp": "docker-compose up", 15 | "docker.commands.composeDown": "docker-compose down", 16 | } 17 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.7-alpine 2 | 3 | RUN apk add --no-cache build-base gcc bash cmake git 4 | 5 | WORKDIR /srv/jekyll 6 | 7 | COPY docker-entrypoint.sh /usr/local/bin/ 8 | 9 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 10 | 11 | RUN gem install bundler 12 | 13 | ENTRYPOINT [ "docker-entrypoint.sh" ] 14 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'github-pages', group: :jekyll_plugins 3 | gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i 4 | gem 'nokogiri', '>= 1.8.5' 5 | gem 'ffi', '>= 1.9.24' 6 | gem 'jekyll', '>= 3.6.3' 7 | gem 'kramdown', '>= 2.3.0' 8 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (6.0.3.4) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (>= 0.7, < 2) 7 | minitest (~> 5.1) 8 | tzinfo (~> 1.1) 9 | zeitwerk (~> 2.2, >= 2.2.2) 10 | addressable (2.8.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | coffee-script (2.4.1) 13 | coffee-script-source 14 | execjs 15 | coffee-script-source (1.11.1) 16 | colorator (1.1.0) 17 | commonmarker (0.17.13) 18 | ruby-enum (~> 0.5) 19 | concurrent-ruby (1.1.7) 20 | dnsruby (1.61.5) 21 | simpleidn (~> 0.1) 22 | em-websocket (0.5.2) 23 | eventmachine (>= 0.12.9) 24 | http_parser.rb (~> 0.6.0) 25 | ethon (0.12.0) 26 | ffi (>= 1.3.0) 27 | eventmachine (1.2.7) 28 | eventmachine (1.2.7-x64-mingw32) 29 | execjs (2.7.0) 30 | faraday (1.1.0) 31 | multipart-post (>= 1.2, < 3) 32 | ruby2_keywords 33 | ffi (1.13.1) 34 | ffi (1.13.1-x64-mingw32) 35 | forwardable-extended (2.6.0) 36 | gemoji (3.0.1) 37 | github-pages (209) 38 | github-pages-health-check (= 1.16.1) 39 | jekyll (= 3.9.0) 40 | jekyll-avatar (= 0.7.0) 41 | jekyll-coffeescript (= 1.1.1) 42 | jekyll-commonmark-ghpages (= 0.1.6) 43 | jekyll-default-layout (= 0.1.4) 44 | jekyll-feed (= 0.15.1) 45 | jekyll-gist (= 1.5.0) 46 | jekyll-github-metadata (= 2.13.0) 47 | jekyll-mentions (= 1.6.0) 48 | jekyll-optional-front-matter (= 0.3.2) 49 | jekyll-paginate (= 1.1.0) 50 | jekyll-readme-index (= 0.3.0) 51 | jekyll-redirect-from (= 0.16.0) 52 | jekyll-relative-links (= 0.6.1) 53 | jekyll-remote-theme (= 0.4.2) 54 | jekyll-sass-converter (= 1.5.2) 55 | jekyll-seo-tag (= 2.6.1) 56 | jekyll-sitemap (= 1.4.0) 57 | jekyll-swiss (= 1.0.0) 58 | jekyll-theme-architect (= 0.1.1) 59 | jekyll-theme-cayman (= 0.1.1) 60 | jekyll-theme-dinky (= 0.1.1) 61 | jekyll-theme-hacker (= 0.1.2) 62 | jekyll-theme-leap-day (= 0.1.1) 63 | jekyll-theme-merlot (= 0.1.1) 64 | jekyll-theme-midnight (= 0.1.1) 65 | jekyll-theme-minimal (= 0.1.1) 66 | jekyll-theme-modernist (= 0.1.1) 67 | jekyll-theme-primer (= 0.5.4) 68 | jekyll-theme-slate (= 0.1.1) 69 | jekyll-theme-tactile (= 0.1.1) 70 | jekyll-theme-time-machine (= 0.1.1) 71 | jekyll-titles-from-headings (= 0.5.3) 72 | jemoji (= 0.12.0) 73 | kramdown (= 2.3.0) 74 | kramdown-parser-gfm (= 1.1.0) 75 | liquid (= 4.0.3) 76 | mercenary (~> 0.3) 77 | minima (= 2.5.1) 78 | nokogiri (>= 1.10.4, < 2.0) 79 | rouge (= 3.23.0) 80 | terminal-table (~> 1.4) 81 | github-pages-health-check (1.16.1) 82 | addressable (~> 2.3) 83 | dnsruby (~> 1.60) 84 | octokit (~> 4.0) 85 | public_suffix (~> 3.0) 86 | typhoeus (~> 1.3) 87 | html-pipeline (2.14.0) 88 | activesupport (>= 2) 89 | nokogiri (>= 1.4) 90 | http_parser.rb (0.6.0) 91 | i18n (0.9.5) 92 | concurrent-ruby (~> 1.0) 93 | jekyll (3.9.0) 94 | addressable (~> 2.4) 95 | colorator (~> 1.0) 96 | em-websocket (~> 0.5) 97 | i18n (~> 0.7) 98 | jekyll-sass-converter (~> 1.0) 99 | jekyll-watch (~> 2.0) 100 | kramdown (>= 1.17, < 3) 101 | liquid (~> 4.0) 102 | mercenary (~> 0.3.3) 103 | pathutil (~> 0.9) 104 | rouge (>= 1.7, < 4) 105 | safe_yaml (~> 1.0) 106 | jekyll-avatar (0.7.0) 107 | jekyll (>= 3.0, < 5.0) 108 | jekyll-coffeescript (1.1.1) 109 | coffee-script (~> 2.2) 110 | coffee-script-source (~> 1.11.1) 111 | jekyll-commonmark (1.3.1) 112 | commonmarker (~> 0.14) 113 | jekyll (>= 3.7, < 5.0) 114 | jekyll-commonmark-ghpages (0.1.6) 115 | commonmarker (~> 0.17.6) 116 | jekyll-commonmark (~> 1.2) 117 | rouge (>= 2.0, < 4.0) 118 | jekyll-default-layout (0.1.4) 119 | jekyll (~> 3.0) 120 | jekyll-feed (0.15.1) 121 | jekyll (>= 3.7, < 5.0) 122 | jekyll-gist (1.5.0) 123 | octokit (~> 4.2) 124 | jekyll-github-metadata (2.13.0) 125 | jekyll (>= 3.4, < 5.0) 126 | octokit (~> 4.0, != 4.4.0) 127 | jekyll-mentions (1.6.0) 128 | html-pipeline (~> 2.3) 129 | jekyll (>= 3.7, < 5.0) 130 | jekyll-optional-front-matter (0.3.2) 131 | jekyll (>= 3.0, < 5.0) 132 | jekyll-paginate (1.1.0) 133 | jekyll-readme-index (0.3.0) 134 | jekyll (>= 3.0, < 5.0) 135 | jekyll-redirect-from (0.16.0) 136 | jekyll (>= 3.3, < 5.0) 137 | jekyll-relative-links (0.6.1) 138 | jekyll (>= 3.3, < 5.0) 139 | jekyll-remote-theme (0.4.2) 140 | addressable (~> 2.0) 141 | jekyll (>= 3.5, < 5.0) 142 | jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) 143 | rubyzip (>= 1.3.0, < 3.0) 144 | jekyll-sass-converter (1.5.2) 145 | sass (~> 3.4) 146 | jekyll-seo-tag (2.6.1) 147 | jekyll (>= 3.3, < 5.0) 148 | jekyll-sitemap (1.4.0) 149 | jekyll (>= 3.7, < 5.0) 150 | jekyll-swiss (1.0.0) 151 | jekyll-theme-architect (0.1.1) 152 | jekyll (~> 3.5) 153 | jekyll-seo-tag (~> 2.0) 154 | jekyll-theme-cayman (0.1.1) 155 | jekyll (~> 3.5) 156 | jekyll-seo-tag (~> 2.0) 157 | jekyll-theme-dinky (0.1.1) 158 | jekyll (~> 3.5) 159 | jekyll-seo-tag (~> 2.0) 160 | jekyll-theme-hacker (0.1.2) 161 | jekyll (> 3.5, < 5.0) 162 | jekyll-seo-tag (~> 2.0) 163 | jekyll-theme-leap-day (0.1.1) 164 | jekyll (~> 3.5) 165 | jekyll-seo-tag (~> 2.0) 166 | jekyll-theme-merlot (0.1.1) 167 | jekyll (~> 3.5) 168 | jekyll-seo-tag (~> 2.0) 169 | jekyll-theme-midnight (0.1.1) 170 | jekyll (~> 3.5) 171 | jekyll-seo-tag (~> 2.0) 172 | jekyll-theme-minimal (0.1.1) 173 | jekyll (~> 3.5) 174 | jekyll-seo-tag (~> 2.0) 175 | jekyll-theme-modernist (0.1.1) 176 | jekyll (~> 3.5) 177 | jekyll-seo-tag (~> 2.0) 178 | jekyll-theme-primer (0.5.4) 179 | jekyll (> 3.5, < 5.0) 180 | jekyll-github-metadata (~> 2.9) 181 | jekyll-seo-tag (~> 2.0) 182 | jekyll-theme-slate (0.1.1) 183 | jekyll (~> 3.5) 184 | jekyll-seo-tag (~> 2.0) 185 | jekyll-theme-tactile (0.1.1) 186 | jekyll (~> 3.5) 187 | jekyll-seo-tag (~> 2.0) 188 | jekyll-theme-time-machine (0.1.1) 189 | jekyll (~> 3.5) 190 | jekyll-seo-tag (~> 2.0) 191 | jekyll-titles-from-headings (0.5.3) 192 | jekyll (>= 3.3, < 5.0) 193 | jekyll-watch (2.2.1) 194 | listen (~> 3.0) 195 | jemoji (0.12.0) 196 | gemoji (~> 3.0) 197 | html-pipeline (~> 2.2) 198 | jekyll (>= 3.0, < 5.0) 199 | kramdown (2.3.0) 200 | rexml 201 | kramdown-parser-gfm (1.1.0) 202 | kramdown (~> 2.0) 203 | liquid (4.0.3) 204 | listen (3.3.1) 205 | rb-fsevent (~> 0.10, >= 0.10.3) 206 | rb-inotify (~> 0.9, >= 0.9.10) 207 | mercenary (0.3.6) 208 | mini_portile2 (2.6.1) 209 | minima (2.5.1) 210 | jekyll (>= 3.5, < 5.0) 211 | jekyll-feed (~> 0.9) 212 | jekyll-seo-tag (~> 2.1) 213 | minitest (5.14.2) 214 | multipart-post (2.1.1) 215 | nokogiri (1.12.5) 216 | mini_portile2 (~> 2.6.1) 217 | racc (~> 1.4) 218 | nokogiri (1.12.5-x64-mingw32) 219 | racc (~> 1.4) 220 | octokit (4.19.0) 221 | faraday (>= 0.9) 222 | sawyer (~> 0.8.0, >= 0.5.3) 223 | pathutil (0.16.2) 224 | forwardable-extended (~> 2.6) 225 | public_suffix (3.1.1) 226 | racc (1.5.2) 227 | rb-fsevent (0.10.4) 228 | rb-inotify (0.10.1) 229 | ffi (~> 1.0) 230 | rexml (3.2.5) 231 | rouge (3.23.0) 232 | ruby-enum (0.8.0) 233 | i18n 234 | ruby2_keywords (0.0.2) 235 | rubyzip (2.3.0) 236 | safe_yaml (1.0.5) 237 | sass (3.7.4) 238 | sass-listen (~> 4.0.0) 239 | sass-listen (4.0.0) 240 | rb-fsevent (~> 0.9, >= 0.9.4) 241 | rb-inotify (~> 0.9, >= 0.9.7) 242 | sawyer (0.8.2) 243 | addressable (>= 2.3.5) 244 | faraday (> 0.8, < 2.0) 245 | simpleidn (0.1.1) 246 | unf (~> 0.1.4) 247 | terminal-table (1.8.0) 248 | unicode-display_width (~> 1.1, >= 1.1.1) 249 | thread_safe (0.3.6) 250 | typhoeus (1.4.0) 251 | ethon (>= 0.9.0) 252 | tzinfo (1.2.8) 253 | thread_safe (~> 0.1) 254 | unf (0.1.4) 255 | unf_ext 256 | unf_ext (0.0.7.7) 257 | unf_ext (0.0.7.7-x64-mingw32) 258 | unicode-display_width (1.7.0) 259 | zeitwerk (2.4.1) 260 | 261 | PLATFORMS 262 | ruby 263 | x64-mingw32 264 | 265 | DEPENDENCIES 266 | ffi (>= 1.9.24) 267 | github-pages 268 | jekyll (>= 3.6.3) 269 | kramdown (>= 2.3.0) 270 | nokogiri (>= 1.8.5) 271 | 272 | BUNDLED WITH 273 | 2.1.4 274 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2016 Zzbaivong 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # de4js 2 | 3 | ![Logo](assets/images/icons/icon-128x128.png) 4 | 5 | JavaScript Deobfuscator and Unpacker 6 | 7 | ## Helper 8 | 9 | The **Unreadable** option is disabled by default, because it uses data from [JS Nice](http://www.jsnice.org/). This cannot be done with JavaScript. You need to install UserScript [de4js_helper.user.js](https://github.com/lelinhtinh/de4js/blob/master/userscript/de4js_helper.user.js) to enable it. 10 | 11 | Install one of the following links: 12 | 13 | - [Open User JS](https://openuserjs.org/scripts/baivong/de4js_helper) 14 | - [Greasy Fork](https://greasyfork.org/vi/scripts/33479-de4js-helper) 15 | - [Github](https://lelinhtinh.github.io/de4js/userscript/de4js_helper.user.js) 16 | 17 | `*` _**de4js helper** doesn't work offline._ 18 | 19 | ## Features 20 | 21 | - Works offline. 22 | - Source code beautifier / syntax highlighter. 23 | - Makes obfuscated code [readable](#helper). 24 | - Performance unpackers: 25 | - **Eval**, e.g. Packer, WiseLoop 26 | - **Array**, e.g. Javascript Obfuscator, Free JS Obfuscator 27 | - [_Number](https://jsfiddle.net/ps5anL99/embedded/result,js,html,css/) _(not correct name)_ 28 | - [Packer](http://dean.edwards.name/packer/) 29 | - [Javascript Obfuscator](https://javascriptobfuscator.com/Javascript-Obfuscator.aspx) 30 | - [Free JS Obfuscator](http://www.freejsobfuscator.com/) 31 | - [Obfuscator.IO](https://obfuscator.io/) _(but not all cases)_ 32 | - [My Obfuscate](http://myobfuscate.com/) 33 | - **URL encode**, e.g. bookmarklet 34 | - [JSFuck](https://github.com/aemkei/jsfuck) 35 | - [JJencode](http://utf-8.jp/public/jjencode.html) 36 | - [AAencode](http://utf-8.jp/public/aaencode.html) 37 | - [WiseLoop](http://wiseloop.com/demo/php-javascript-obfuscator) 38 | 39 | ## Running with Docker 40 | 41 | docker-compose up 42 | 43 | Preview **de4js** in your web browser at 44 | 45 | ### Attach Shell 46 | 47 | docker exec -it de4js_app bash 48 | bundle exec jekyll build 49 | 50 | ## Local Development 51 | 52 | ### Install 53 | 54 | git clone https://github.com/lelinhtinh/de4js.git 55 | cd de4js 56 | 57 | If you don't have Ruby installed, install [Ruby 2.1.0 or higher](https://www.ruby-lang.org/en/downloads/). 58 | 59 | Fix missing libraries on **Ubuntu**: 60 | 61 | sudo apt install ruby-dev zlib1g-dev 62 | 63 | Install **Bundler**: 64 | 65 | gem install bundler 66 | 67 | Install **Jekyll** and other [dependencies](https://pages.github.com/versions/) from the GitHub Pages gem: 68 | 69 | bundle install 70 | 71 | Fix EventMachine C extension not loading on **Windows 10**: 72 | 73 | gem uninstall eventmachine 74 | gem install eventmachine --platform ruby 75 | 76 | Install Workbox CLI: 77 | 78 | npm install workbox-cli --global 79 | 80 | ### Start serve 81 | 82 | npm start 83 | 84 | Or, with livereload: 85 | 86 | npm run watch 87 | 88 | Preview **de4js** in your web browser at 89 | 90 | ### Build 91 | 92 | npm run build 93 | 94 | ## License 95 | 96 | [MIT License](https://baivong.mit-license.org/) © [lelinhtinh](https://github.com/lelinhtinh) 97 | 98 | ## Credits 99 | 100 | ### Active Contributors 101 | 102 | - [lelinhtinh](https://github.com/lelinhtinh) 103 | - [Himura2la](https://github.com/Himura2la) 104 | - [Flleeppyy](https://github.com/flleeppyy) 105 | 106 | ### Open Source Contributors 107 | 108 | - [mathjs](https://github.com/josdejong/mathjs) 109 | - [js-beautify](https://github.com/beautify-web/js-beautify) 110 | - [highlight.js](https://github.com/isagalaev/highlight.js) 111 | - [clipboard.js](https://github.com/zenorocha/clipboard.js) 112 | - [magic-check](https://github.com/forsigner/magic-check) 113 | - [cat-in-136](https://cat-in-136.github.io/2010/12/aadecode-decode-encoded-as-aaencode.html) 114 | - [Decoder-JJEncode](https://github.com/jacobsoo/Decoder-JJEncode) 115 | - [NotSoWise](https://github.com/FAKE1007/NotSoWise) 116 | 117 | ### Resources 118 | 119 | - Icons made by [Eucalyp](https://www.flaticon.com/free-icon/artificial-intelligence_653469) from [Flaticon](https://www.flaticon.com/). 120 | 121 | ## Related projects 122 | 123 | - [IlluminateJS](https://github.com/geeksonsecurity/illuminatejs): A static JavaScript deobfuscator. 124 | - [JStillery](https://github.com/mindedsecurity/JStillery): Advanced JavaScript Deobfuscation via Partial Evaluation. 125 | - [Akamai Deobfuscator](https://github.com/char/akamai-deobfuscator): A tool to help you deobfuscate Akamai scripts. 126 | - [Nice2Predict](https://github.com/eth-sri/Nice2Predict): Learning framework for program property prediction. 127 | - [Javascript deobfuscation AMA](https://github.com/jsoverson/javascript-deobfuscation-AMA): General questions about deobfuscating JavaScript. 128 | - [Deobfuscator IO](https://github.com/sd-soleaio/deobfuscator-io): A (incomplete) deobfuscator for scripts obfuscated with obfuscator.io (Archived). 129 | - [JavaScript Deobfuscator](https://github.com/LostMyCode/javascript-deobfuscator): Deobfuscation tool for obfuscated JavaScript using obfuscator.io. 130 | - [Prepack](https://github.com/facebook/prepack): A JavaScript bundle optimizer. 131 | - [JS Deobfuscate](https://github.com/RuochenLyu/js-deobfuscate): JavaScript deobfuscate for JSjiami, Sojson, ... 132 | - [JSDec](https://github.com/liulihaocai/JSDec): Online JavaScript decoder. Supported sojson v4/Premium/v5 and more (No longer update). 133 | - [Synchrony](https://github.com/uwu/synchrony): Kavascript-obfuscator cleaner & deobfuscator. 134 | 135 | `*` _[**Obfuscator.IO**](https://obfuscator.io/) is always up to date. The automatic deobfuscation tools (including this project) will usually not match its latest version. But that doesn't mean it's a safe tool to secure your source code._ 136 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | name: de4js 2 | title: de4js 3 | description: JavaScript Deobfuscator and Unpacker 4 | version: 1.12.0 5 | author: Zzbaivong 6 | author_email: Zzbaivong@gmail.com 7 | url: https://lelinhtinh.github.io 8 | baseurl: /de4js 9 | repository: lelinhtinh/de4js 10 | license: MIT 11 | 12 | theme: jekyll-theme-hacker 13 | show_downloads: false 14 | google_analytics: UA-106940288-1 15 | sass: 16 | style: compressed 17 | 18 | exclude: 19 | [ 20 | "Gemfile", 21 | "Gemfile.lock", 22 | "node_modules", 23 | "package.json", 24 | "package-lock.json", 25 | "Dockerfile", 26 | "docker-compose.yml", 27 | "docker-entrypoint.sh", 28 | "workbox-config.js" 29 | ] 30 | incremental: false 31 | 32 | environment: production 33 | -------------------------------------------------------------------------------- /_config_development.yml: -------------------------------------------------------------------------------- 1 | title: "dev mode" 2 | 3 | environment: development 4 | -------------------------------------------------------------------------------- /_data/methods.yml: -------------------------------------------------------------------------------- 1 | - key: evalencode 2 | name: Eval 3 | - key: arrayencode 4 | name: Array 5 | - key: obfuscatorio 6 | name: Obfuscator IO 7 | - key: _numberencode 8 | name: _Number 9 | - key: jsfuck 10 | name: JSFuck 11 | - key: jjencode 12 | name: JJencode 13 | - key: aaencode 14 | name: AAencode 15 | - key: urlencode 16 | name: URLencode 17 | - key: p_a_c_k_e_r 18 | name: Packer 19 | - key: javascriptobfuscator 20 | name: JS Obfuscator 21 | - key: myobfuscate 22 | name: My Obfuscate 23 | - key: wiseeval 24 | name: Wise Eval 25 | - key: wisefunction 26 | name: Wise Function 27 | - key: cleansource 28 | name: Clean Source 29 | -------------------------------------------------------------------------------- /_data/options.yml: -------------------------------------------------------------------------------- 1 | - key: lineNumbers 2 | name: Line numbers 3 | checked: false 4 | - key: formatCode 5 | name: Format Code 6 | checked: true 7 | - key: _unescape 8 | name: Unescape strings 9 | checked: false 10 | - key: methodChain 11 | name: Recover object-path 12 | checked: true 13 | - key: calc 14 | name: Execute expression 15 | checked: false 16 | - key: strMerge 17 | name: Merge strings 18 | checked: true 19 | - key: removeGrouping 20 | name: Remove grouping 21 | checked: false 22 | -------------------------------------------------------------------------------- /_includes/highlight-js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /_includes/highlight-js/styles/hljs-line-numbers.css: -------------------------------------------------------------------------------- 1 | pre{counter-reset:line-numbers;padding:.5em .5em .5em 5em;border-left:1px solid #1d1f21}pre.hljs{padding-left:.5em;border-left:0 none}code::before{counter-increment:line-numbers;content:counter(line-numbers);display:block;position:absolute;left:-3.5em;top:0;width:3em;text-align:right;color:#60686f;white-space:pre;direction:rtl}code{display:block;position:relative;margin-left:3em;padding-left:.5em;min-height:1em;border-left:1px solid #32363b}code::after{content:".";visibility:hidden} -------------------------------------------------------------------------------- /_includes/highlight-js/styles/hljs-theme.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#969896}.hljs-variable,.hljs-template-variable,.hljs-tag,.hljs-name,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-deletion{color:#d54e53}.hljs-number,.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-type,.hljs-params,.hljs-meta,.hljs-link{color:#e78c45}.hljs-attribute{color:#e7c547}.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#b9ca4a}.hljs-title,.hljs-section{color:#7aa6da}.hljs-keyword,.hljs-selector-tag{color:#c397d8}.hljs{display:block;overflow-x:auto;background:black;color:#eaeaea;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {% seo %} 14 | 15 | {% if site.google_analytics %} 16 | 17 | 28 | {% endif %} 29 | 30 | 31 | 32 | 33 |
34 |
35 |

{{ site.name }}{{ site.version }}

36 |

{{ site.description }}

37 | 38 |
39 | {% if site.show_downloads %} 40 | Download as .zip 41 | Download as .tar.gz {% endif %} 42 | 43 | 44 | View on GitHub 45 | 46 |
47 |
48 |
49 | 50 |
51 |
52 |
53 |
String
54 |
Local File
55 |
Remote File
56 |
57 |
58 |
59 |
60 | 61 |
62 |
63 |
64 | 65 | 69 |
70 |

 71 |         
72 |
73 |
74 | 75 | 76 |
77 | Cross-origin requests require Access-Control-Allow-Origin header 78 |

 79 |         
80 |
81 | 82 |
83 |
84 |
85 | 86 | 87 | {% for opt in site.data.methods %} 88 | 89 | 90 | {% endfor %} 91 | 92 | 96 |
97 |
98 | {% for opt in site.data.options %} 99 | 101 | 102 | {% endfor %} 103 |
104 |
105 |
106 | 107 |
108 | 111 | 114 |
115 | 116 |
117 |
118 | 122 | 123 | Download file 124 | 125 | 126 | Open in new tab 128 | 129 |
130 | 131 |

132 |       
133 |
134 | 135 |
136 |
137 |

Sponsors

138 |

Secure stores, happy shoppers. We are Sansec.

140 |
141 |
142 |

Credits

143 |

Project maintained by lelinhtinh 144 |
Hosted on GitHub Pages 145 |

146 |

Icons made by Eucalyp

148 |
149 |
150 |
151 | 152 | 153 | 154 | 155 | {% if site.environment == "production" or jekyll.environment == "production" %} 156 | 182 | {% endif %} 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /_sass/magic-check/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 forsigner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /_sass/magic-check/sass/_checkbox.scss: -------------------------------------------------------------------------------- 1 | .magic-checkbox + label { 2 | &:before { 3 | border-radius: 3px; 4 | } 5 | &:after { 6 | top: 2px; 7 | left: 7px; 8 | box-sizing: border-box; 9 | width: 6px; 10 | height: 12px; 11 | transform: rotate(45deg); 12 | border-width: 2px; 13 | border-style: solid; 14 | border-color: #fff; 15 | 16 | border-top: 0; 17 | border-left: 0; 18 | } 19 | } 20 | .magic-checkbox:checked + label { 21 | &:before { 22 | border: $magic-main-color; 23 | background: $magic-main-color; 24 | } 25 | } 26 | .magic-checkbox:checked[disabled] + label { 27 | &:before { 28 | border: $magic-disabled-checked-color; 29 | background: $magic-disabled-checked-color; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /_sass/magic-check/sass/_common.scss: -------------------------------------------------------------------------------- 1 | @keyframes hover-color { 2 | from { 3 | border-color: $magic-border-color; 4 | } 5 | 6 | to { 7 | border-color: $magic-main-color; 8 | } 9 | } 10 | 11 | .magic-radio, 12 | .magic-checkbox { 13 | position: absolute; 14 | display: none; 15 | } 16 | .magic-radio[disabled], 17 | .magic-checkbox[disabled] { 18 | cursor: not-allowed; 19 | } 20 | 21 | .magic-radio + label, 22 | .magic-checkbox + label { 23 | position: relative; 24 | display: block; 25 | padding-left: 30px; 26 | cursor: pointer; 27 | 28 | &:hover { 29 | &:before { 30 | animation-duration: 0.4s; 31 | animation-fill-mode: both; 32 | animation-name: hover-color; 33 | } 34 | } 35 | &:before { 36 | position: absolute; 37 | top: 0; 38 | left: 0; 39 | display: inline-block; 40 | width: $magic-checkbox-size; 41 | height: $magic-checkbox-size; 42 | content: ''; 43 | border: 1px solid $magic-border-color; 44 | } 45 | &:after { 46 | position: absolute; 47 | display: none; 48 | content: ''; 49 | } 50 | } 51 | 52 | .magic-radio[disabled] + label, 53 | .magic-checkbox[disabled] + label { 54 | cursor: not-allowed; 55 | color: $magic-disabled-color; 56 | &:hover, 57 | &:before, 58 | &:after { 59 | cursor: not-allowed; 60 | } 61 | &:hover { 62 | &:before { 63 | border: 1px solid $magic-disabled-color; 64 | animation-name: none; 65 | } 66 | } 67 | &:before { 68 | border-color: $magic-disabled-color; 69 | } 70 | } 71 | 72 | 73 | .magic-radio:checked + label, 74 | .magic-checkbox:checked + label { 75 | &:before { 76 | animation-name: none; 77 | } 78 | &:after { 79 | display: block; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /_sass/magic-check/sass/_radio.scss: -------------------------------------------------------------------------------- 1 | .magic-radio + label { 2 | &:before { 3 | border-radius: 50%; 4 | } 5 | &:after { 6 | top: 7px; 7 | left: 7px; 8 | width: $magic-dot-size; 9 | height: $magic-dot-size; 10 | border-radius: 50%; 11 | background: $magic-main-color; 12 | } 13 | } 14 | 15 | .magic-radio:checked + label { 16 | &:before { 17 | border: 1px solid $magic-main-color; 18 | } 19 | } 20 | .magic-radio:checked[disabled] + label { 21 | &:before { 22 | border: 1px solid $magic-disabled-checked-color; 23 | } 24 | &:after { 25 | background: $magic-disabled-checked-color; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /_sass/magic-check/sass/_variable.scss: -------------------------------------------------------------------------------- 1 | $magic-radio-size: 20px !default; 2 | $magic-checkbox-size: 20px !default; 3 | $magic-dot-size: 8px !default; 4 | $magic-border-color: #5A5A5A !default; 5 | $magic-main-color: #b5e853 !default; 6 | $magic-disabled-color: lighten($magic-border-color, 14%) !default; 7 | $magic-disabled-checked-color: lighten($magic-main-color, 30%) !default; 8 | -------------------------------------------------------------------------------- /_sass/magic-check/sass/magic-check.scss: -------------------------------------------------------------------------------- 1 | @import 'variable'; 2 | @import 'common'; 3 | @import 'radio'; 4 | @import 'checkbox'; 5 | -------------------------------------------------------------------------------- /assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | $base-color: #eaeaea; 4 | $primary-color: #b5e853; 5 | $disabled-color: #ff2323; 6 | 7 | $special-base-color: #ffeb3b; 8 | $special-primary-color: #9C27B0; 9 | $special-disabled-color: #000000; 10 | 11 | @import "{{ site.theme }}"; 12 | {% include highlight-js/styles/hljs-theme.css %} 13 | {% include highlight-js/styles/hljs-line-numbers.css %} 14 | .hljs { 15 | background: #030303; 16 | } 17 | @import "magic-check/sass/magic-check.scss"; 18 | 19 | body, 20 | textarea, 21 | code { 22 | font-family: 'Roboto Mono', monospace; 23 | } 24 | 25 | .container { 26 | max-width: 1280px; 27 | } 28 | 29 | .content { 30 | box-sizing: border-box; 31 | background: rgba(0, 0, 0, 0.9); 32 | color: $base-color; 33 | display: block; 34 | width: 100% !important; 35 | padding: 0.5rem; 36 | border: 1px solid rgba(255, 255, 255, 0.15); 37 | resize: vertical; 38 | } 39 | 40 | .config { 41 | font-size: smaller; 42 | color: #595656; 43 | 44 | &.tab-content { 45 | padding: 0 1rem 0; 46 | text-align: center; 47 | } 48 | 49 | .methods-wrap { 50 | border-bottom: 1px solid #292929; 51 | margin-bottom: 1rem; 52 | } 53 | 54 | input { 55 | margin-right: 4px; 56 | vertical-align: middle; 57 | 58 | &:checked + label { 59 | color: $base-color; 60 | } 61 | } 62 | 63 | label { 64 | display: inline-block; 65 | margin: 0 1rem 1rem 0; 66 | } 67 | } 68 | 69 | .center { 70 | text-align: center; 71 | margin: 20px 0; 72 | } 73 | 74 | .btn { 75 | cursor: pointer; 76 | 77 | &:active, 78 | &:focus, 79 | &:hover { 80 | outline: 0 none; 81 | } 82 | 83 | &:active { 84 | background: rgba(0, 0, 0, 0.8); 85 | color: $primary-color; 86 | } 87 | 88 | &::-moz-focus-inner { 89 | border: 0 none; 90 | } 91 | 92 | &:disabled { 93 | cursor: not-allowed; 94 | background: #141414; 95 | border-color: #1b1b1b; 96 | color: #525252; 97 | } 98 | } 99 | 100 | #view { 101 | transition: opacity ease-in-out 0.2s; 102 | 103 | &.waiting { 104 | opacity: 0.3; 105 | 106 | &:empty:before { 107 | content: 'Please wait...'; 108 | } 109 | } 110 | 111 | &:empty:before { 112 | content: 'Please choose a right encoding type!'; 113 | } 114 | } 115 | 116 | .magic-radio[disabled] + label { 117 | color: $disabled-color; 118 | 119 | &:before, 120 | &:hover:before { 121 | border-color: $disabled-color; 122 | } 123 | } 124 | 125 | sup { 126 | font-size: 0.7rem; 127 | text-transform: uppercase; 128 | color: #afafaf; 129 | margin-left: 1rem; 130 | padding: 1px 4px; 131 | border: 1px solid #111; 132 | background: #444; 133 | border-radius: 4px; 134 | text-shadow: initial; 135 | } 136 | 137 | #nicify { 138 | & + label { 139 | color: $special-base-color; 140 | 141 | &:before { 142 | border-color: $special-base-color; 143 | } 144 | 145 | &:hover:before { 146 | animation-name: special-hover-color; 147 | } 148 | 149 | &:after { 150 | background: $special-primary-color; 151 | } 152 | } 153 | 154 | &[disabled] + label { 155 | color: $special-disabled-color; 156 | 157 | &:before { 158 | border-color: $special-disabled-color; 159 | } 160 | 161 | &:hover:before { 162 | animation: initial; 163 | } 164 | } 165 | 166 | &:checked + label { 167 | color: $special-primary-color; 168 | 169 | &:before { 170 | border-color: $special-primary-color; 171 | } 172 | } 173 | } 174 | 175 | @keyframes special-hover-color { 176 | from { 177 | border-color: $special-base-color; 178 | } 179 | 180 | to { 181 | border-color: $special-primary-color; 182 | } 183 | } 184 | 185 | pre { 186 | white-space: pre-wrap; 187 | word-wrap: break-word; 188 | word-break: break-all; 189 | padding: 0.5rem; 190 | margin-bottom: 0; 191 | color: #6a707e; 192 | } 193 | 194 | .view-wrap { 195 | position: relative; 196 | 197 | &:hover .view-control { 198 | opacity: 1; 199 | } 200 | } 201 | 202 | .view-control { 203 | position: absolute; 204 | right: 1px; 205 | top: 1px; 206 | z-index: 10; 207 | opacity: 0; 208 | transition: opacity 200ms; 209 | 210 | .btn { 211 | display: block; 212 | background: #000; 213 | border: 0 none; 214 | box-shadow: initial; 215 | border-radius: 0; 216 | cursor: pointer; 217 | width: 40px; 218 | height: 40px; 219 | padding: 0; 220 | line-height: 40px; 221 | transition: background 200ms; 222 | text-align: center; 223 | float: right; 224 | 225 | &:hover { 226 | background: #444; 227 | } 228 | 229 | &:active { 230 | background: #222; 231 | } 232 | 233 | .btn-icon { 234 | width: 16px; 235 | height: 16px; 236 | vertical-align: middle; 237 | } 238 | } 239 | } 240 | 241 | #copyjs { 242 | &.copied { 243 | background: $primary-color; 244 | } 245 | 246 | &.selected { 247 | background: $disabled-color; 248 | } 249 | } 250 | 251 | #preview, 252 | #download, 253 | .tab-content { 254 | display: none; 255 | 256 | &.show { 257 | display: block; 258 | } 259 | } 260 | 261 | .tab-content { 262 | padding: 1rem; 263 | background: rgba(0, 0, 0, 0.2); 264 | } 265 | 266 | .tab { 267 | cursor: pointer; 268 | text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(181, 232, 83, 0.1), 0 0 10px rgba(181, 232, 83, 0.1); 269 | color: #999; 270 | font-size: 30px; 271 | float: left; 272 | margin-bottom: 0.5rem; 273 | margin-right: 1.5rem; 274 | 275 | &:last-child { 276 | margin-right: 0; 277 | } 278 | 279 | &.active, 280 | &:hover, 281 | &:focus { 282 | color: #b5e853; 283 | } 284 | } 285 | 286 | .inputfile { 287 | width: 0.1px; 288 | height: 0.1px; 289 | opacity: 0; 290 | overflow: hidden; 291 | position: absolute; 292 | z-index: -1; 293 | 294 | & + label { 295 | color: #eee; 296 | border: 2px solid rgba(0, 0, 0, 0.7); 297 | background-color: rgba(0, 0, 0, 0.7); 298 | cursor: pointer; 299 | display: block; 300 | position: relative; 301 | border-radius: 50px; 302 | overflow: hidden; 303 | 304 | span { 305 | display: block; 306 | padding: 0 245px 0 20px; 307 | text-overflow: ellipsis; 308 | white-space: nowrap; 309 | overflow: hidden; 310 | height: 40px; 311 | line-height: 40px; 312 | } 313 | 314 | strong { 315 | display: block; 316 | width: 225px; 317 | position: absolute; 318 | right: 2px; 319 | top: 2px; 320 | height: 36px; 321 | line-height: 36px; 322 | padding: 0; 323 | text-align: center; 324 | border-radius: 50px; 325 | background: #222; 326 | } 327 | } 328 | 329 | &:focus + label, 330 | &.has-focus + label, 331 | & + label:hover { 332 | border-color: #b5e853; 333 | 334 | strong { 335 | background: #b5e853; 336 | color: #111; 337 | } 338 | } 339 | } 340 | 341 | .drop-zone { 342 | border: 2px solid #eee; 343 | 344 | &:after { 345 | content: 'Drop file here'; 346 | color: #eee; 347 | } 348 | 349 | .box, 350 | .render { 351 | visibility: hidden; 352 | } 353 | 354 | &.drop-enter { 355 | border-color: #b5e853; 356 | background: rgba(0, 0, 0, 0.4); 357 | 358 | &:after { 359 | color: #b5e853; 360 | } 361 | } 362 | } 363 | 364 | .render { 365 | max-height: 150px; 366 | font-size: 12px; 367 | overflow-x: none; 368 | overflow-y: auto; 369 | user-select: none; 370 | } 371 | 372 | .read-only { 373 | cursor: not-allowed; 374 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAJ0lEQVQYV2NkQAP////nZUQWAwswMn6GC8IEQIrAgsgCYEF0AZAgALq9ExAOJBu5AAAAAElFTkSuQmCC); 375 | } 376 | 377 | .form-wrapper { 378 | width: 100%; 379 | 380 | input { 381 | width: 70%; 382 | height: 40px; 383 | padding: 0 20px; 384 | float: left; 385 | border: 2px solid rgba(0, 0, 0, 0.7); 386 | background: rgba(0, 0, 0, 0.7); 387 | box-sizing: border-box; 388 | border-radius: 50px 0 0 50px; 389 | color: #eee; 390 | box-shadow: initial; 391 | 392 | &::placeholder { 393 | color: #999; 394 | font-weight: normal; 395 | font-style: italic; 396 | } 397 | 398 | &:focus { 399 | outline: 0; 400 | background: #5d5c5c; 401 | box-shadow: 0 0 2px rgba(0, 0, 0, 0.8) inset; 402 | } 403 | } 404 | 405 | button { 406 | position: relative; 407 | float: right; 408 | height: 40px; 409 | width: 30%; 410 | border-radius: 0 50px 50px 0; 411 | } 412 | } 413 | 414 | small { 415 | color: #333; 416 | font-style: italic; 417 | } 418 | 419 | .help { 420 | cursor: help; 421 | text-decoration: none; 422 | } 423 | 424 | #readable { 425 | display: none; 426 | } 427 | 428 | #title.offline { 429 | color: $disabled-color; 430 | } 431 | 432 | #footer { 433 | color: #666; 434 | font-size: small; 435 | margin-top: 80px; 436 | 437 | a { 438 | text-decoration: none; 439 | color: $special-primary-color; 440 | } 441 | 442 | .sponsors { 443 | float: left; 444 | } 445 | 446 | .credits { 447 | float: right; 448 | text-align: right; 449 | } 450 | } 451 | -------------------------------------------------------------------------------- /assets/images/buttons/copy-document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/buttons/copy-document.png -------------------------------------------------------------------------------- /assets/images/buttons/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/buttons/download.png -------------------------------------------------------------------------------- /assets/images/buttons/external-link-symbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/buttons/external-link-symbol.png -------------------------------------------------------------------------------- /assets/images/icons/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-128x128.png -------------------------------------------------------------------------------- /assets/images/icons/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-144x144.png -------------------------------------------------------------------------------- /assets/images/icons/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-152x152.png -------------------------------------------------------------------------------- /assets/images/icons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-192x192.png -------------------------------------------------------------------------------- /assets/images/icons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-384x384.png -------------------------------------------------------------------------------- /assets/images/icons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-512x512.png -------------------------------------------------------------------------------- /assets/images/icons/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-72x72.png -------------------------------------------------------------------------------- /assets/images/icons/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/assets/images/icons/icon-96x96.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | app: 5 | container_name: de4js_app 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | ports: 10 | - '${APP_PORT}:4000' 11 | - '${WATCH_PORT}:35729' 12 | volumes: 13 | - .:/srv/jekyll 14 | command: bundle exec jekyll serve --force_polling --host 0.0.0.0 --port 4000 --config ${CONFIG:-'_config.yml,_config_development.yml'} --livereload 15 | -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | bundle install --retry 5 --jobs 20 5 | 6 | exec "$@" 7 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lelinhtinh/de4js/b06fff977739dd50eeaf42f602a712348aa01c84/favicon.ico -------------------------------------------------------------------------------- /lib/arraydecode.js: -------------------------------------------------------------------------------- 1 | /* global utils */ 2 | // eslint-disable-next-line no-unused-vars 3 | function ArrayDecode(source, options) { 4 | const detectPattern = /^(var|const|let)\s+((?![^_a-zA-Z$])[\w$]*)\s*=\s*\[.*?\];/; 5 | let _var = source.match(detectPattern); 6 | 7 | if (!_var || _var.length !== 3) throw 'Not matched'; 8 | 9 | const _name = _var[2], 10 | keyPattern = new RegExp(_name.replace(/\$/g, '\\$') + '\\[(\\d+)\\]', 'g'); 11 | let _code = source.replace(detectPattern, ''); 12 | 13 | _var = _var[0].replace(/[\s\S]*?\[/, '['); 14 | _var = eval(_var); 15 | 16 | _code = _code.split(';'); 17 | _code = _code.map((piece) => 18 | piece.replace(keyPattern, (key, index) => { 19 | const item = _var[index], 20 | q = utils.strWrap(item); 21 | 22 | return q + utils.escapeRegExp(item, q) + q; 23 | }), 24 | ); 25 | _code = _code.join(';'); 26 | 27 | if (options.methodChain) _code = utils.methodChain(_code); 28 | 29 | return _code; 30 | } 31 | -------------------------------------------------------------------------------- /lib/cleansource.js: -------------------------------------------------------------------------------- 1 | /* global utils */ 2 | // eslint-disable-next-line no-unused-vars 3 | function CleanSource(source, options) { 4 | var _code = source; 5 | 6 | _code = _code.split(';'); 7 | _code = _code.map((piece) => { 8 | if (options.calc) piece = utils.calcHex(piece); 9 | if (options._unescape) piece = utils._unescape(piece); 10 | piece = utils.toBool(piece); 11 | piece = utils.propArr(piece); 12 | 13 | return piece; 14 | }); 15 | _code = _code.join(';'); 16 | 17 | if (options.strMerge) _code = utils.strMerge(_code); 18 | if (options.calc) _code = utils.calcNumber(_code); 19 | if (options.methodChain) _code = utils.methodChain(_code); 20 | if (options.removeGrouping) _code = utils.removeGrouping(_code); 21 | 22 | return _code; 23 | } 24 | -------------------------------------------------------------------------------- /lib/evaldecode.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars 2 | function EvalDecode(source) { 3 | self._eval = self.eval; 4 | 5 | self.eval = (_code) => { 6 | self.eval = self._eval; 7 | return _code; 8 | }; 9 | 10 | return self._eval(source); 11 | } 12 | -------------------------------------------------------------------------------- /lib/jsfuckdecode.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars 2 | function JSFuckDecode(source) { 3 | const detectPattern = /\)[\s\n]*\(('.*?'|".*?")?\)[\s\n;]*$/, 4 | anonPattern = /^[\s\n]*function\sanonymous\([\s\n]+\)\s\{[\s\n]+/; 5 | let _code = source; 6 | 7 | if (detectPattern.test(source)) _code = _code.replace(detectPattern, ')'); 8 | _code = eval(_code + '.toString()'); 9 | 10 | if (anonPattern.test(_code)) { 11 | _code = _code.replace(anonPattern, ''); 12 | _code = _code.replace(/[\s\n]+\}[\s\n]*$/, ''); 13 | } 14 | 15 | return _code; 16 | } 17 | -------------------------------------------------------------------------------- /lib/numberdecode.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars 2 | function _NumberDecode(source) { 3 | const detectPattern = /_\d{4}\((_\d{4})\);\}/; 4 | let _code = source; 5 | 6 | if (!detectPattern.test(_code)) throw 'Not matched'; 7 | 8 | _code = _code.replace(/var\s/g, 'this.'); 9 | _code = _code.replace(/function\s(_\d{4})\(/, 'this.$1=function('); 10 | _code = _code.replace(detectPattern, 'self.underscoreNumberSource=$1;};'); 11 | 12 | _code = '(function(){' + _code + '})();'; 13 | eval(_code); 14 | 15 | return self.underscoreNumberSource; 16 | } 17 | -------------------------------------------------------------------------------- /lib/obfuscatorio.js: -------------------------------------------------------------------------------- 1 | /* global utils */ 2 | // eslint-disable-next-line no-unused-vars 3 | function ObfuscatorIO(source, options) { 4 | const detectPattern = /((?![^_a-zA-Z$])[\w$]*)\(-?('|")(0x[a-f\d]+|\\x30\\x78[\\xa-f\d]+)\2(\s*,\s*('|").+?\5)?\)/gi; 5 | let detectMatch = source.match(detectPattern); 6 | 7 | if (!detectMatch) throw 'Not matched'; 8 | 9 | detectMatch = detectMatch.map((i) => i.replace(/\(.+?\)$/, '')); 10 | detectMatch = detectMatch.filter((i, pos) => detectMatch.indexOf(i) === pos && i !== ''); 11 | 12 | if (detectMatch.length === 1) { 13 | const varIndex = source.search(funcDefinerPattern(detectMatch[0])); 14 | let { headVar, mainCode } = getHeadVar(varIndex, source); 15 | 16 | if (funcDefinerPattern(detectMatch[0]).test(headVar)) { 17 | return decode( 18 | { 19 | headCode: headVar, 20 | mainCode, 21 | }, 22 | options, 23 | detectPattern, 24 | ); 25 | } 26 | } 27 | 28 | return decode(splitMultiVar(detectMatch, source), options, detectPattern); 29 | } 30 | 31 | function decode({ headCode, mainCode }, options, detectPattern) { 32 | headCode = headCode.replace(/\b(const|let)(\s*(?![^_a-zA-Z$])[\w$]*=)/gi, 'var $2'); 33 | eval(headCode); 34 | 35 | mainCode = mainCode.split(';'); 36 | mainCode = mainCode.map((piece) => { 37 | piece = piece.replace(detectPattern, (key) => { 38 | const item = eval(key), 39 | q = utils.strWrap(item); 40 | return q + utils.escapeRegExp(item, q) + q; 41 | }); 42 | 43 | if (options.calc) piece = utils.calcHex(piece); 44 | if (options._unescape) piece = utils._unescape(piece); 45 | piece = utils.toBool(piece); 46 | piece = utils.propArr(piece); 47 | 48 | return piece; 49 | }); 50 | mainCode = mainCode.join(';'); 51 | 52 | if (options.strMerge) mainCode = utils.strMerge(mainCode); 53 | if (options.calc) mainCode = utils.calcNumber(mainCode); 54 | if (options.methodChain) mainCode = utils.methodChain(mainCode); 55 | 56 | return mainCode; 57 | } 58 | 59 | function funcDefinerPattern(key, flags = 'i') { 60 | return new RegExp('\\b(var|const|let)\\s+' + key + '\\s*=\\s*function\\s*\\(.*?\\)\\s*', flags); 61 | } 62 | 63 | function splitMultiVar(detectMatch, source) { 64 | let keyStore = []; 65 | 66 | for (const key of detectMatch) { 67 | const { sourceVar, keyVar } = getVarDefiner(key, source); 68 | source = sourceVar; 69 | keyStore = keyStore.concat(keyVar); 70 | 71 | const { sourceFunc, keyFunc } = getFuncDefiner(key, source); 72 | source = sourceFunc; 73 | keyStore = keyStore.concat(keyFunc); 74 | } 75 | 76 | if (!keyStore.length) throw 'Key not found'; 77 | 78 | let bodyVar = '', 79 | headVarStore = {}; 80 | for (const obj of keyStore) { 81 | bodyVar += obj.code; 82 | const returnIndex = source.search(funcDefinerPattern(obj.return)); 83 | if (returnIndex !== -1) { 84 | headVarStore[obj.return] = returnIndex; 85 | } 86 | } 87 | 88 | if (Object.keys(headVarStore).length !== 1) throw 'sanex3339'; 89 | 90 | let { headVar, mainCode } = getHeadVar(Object.values(headVarStore)[0], source); 91 | 92 | return { 93 | headCode: headVar + bodyVar, 94 | mainCode, 95 | }; 96 | } 97 | 98 | function getHeadVar(pos, source) { 99 | let bo = 0, 100 | bc = 0, 101 | sourceSize = source.length, 102 | headVar, 103 | mainCode; 104 | 105 | const splitSource = (pos) => { 106 | headVar = source.slice(0, pos); 107 | mainCode = source.slice(pos); 108 | }; 109 | 110 | while (pos < sourceSize) { 111 | if (source.charAt(pos) === '{') bo++; 112 | if (source.charAt(pos) === '}') bc++; 113 | if (bc === bo && bo !== 0) { 114 | splitSource(pos + 2); 115 | break; 116 | } 117 | pos++; 118 | } 119 | 120 | if (!mainCode) throw 'Not splits'; 121 | return { headVar, mainCode }; 122 | } 123 | 124 | function getVarDefiner(key, source) { 125 | const varPattern = '\\b(var|const|let)\\s+' + key + '\\s*=\\s*((?!\\d)[a-z\\d_$]*?)(;|,)'; 126 | const varGroupPattern = new RegExp(varPattern, 'gi'); 127 | 128 | let keyVar = []; 129 | let sourceVar = source; 130 | 131 | if (varGroupPattern.test(source)) { 132 | sourceVar = source.replace(varGroupPattern, (m) => { 133 | const varMatch = m.match(new RegExp(varPattern, 'i')); 134 | keyVar.push({ 135 | key, 136 | return: varMatch[2], 137 | code: varMatch[0].replace(/,$/, ';'), 138 | }); 139 | 140 | if (m.slice(-1) === ';') return ''; 141 | return varMatch[1] + ' '; 142 | }); 143 | } 144 | 145 | return { sourceVar, keyVar }; 146 | } 147 | 148 | function getFuncDefiner(key, source) { 149 | const funcGroupPattern = funcDefinerPattern(key, 'gi'); 150 | 151 | let keyFunc = []; 152 | let sourceFunc = source; 153 | 154 | while (funcGroupPattern.test(source)) { 155 | const varIndex = source.search(funcDefinerPattern(key)), 156 | sourceSize = source.length; 157 | 158 | if (varIndex === -1) throw 'Not found'; 159 | 160 | let pos = varIndex, 161 | bo = 0, 162 | bc = 0; 163 | 164 | const splitSource = (pos) => { 165 | sourceFunc = source.slice(0, varIndex) + source.slice(pos); 166 | const varFunc = source.slice(varIndex, pos); 167 | const returnMatch = varFunc.match(/(return\s+((?![^_a-zA-Z$])[\w$]*))(?![\s\S]*return)/i); 168 | keyFunc.push({ 169 | key, 170 | return: returnMatch[2], 171 | code: varFunc, 172 | }); 173 | 174 | source = sourceFunc; 175 | }; 176 | 177 | while (pos < sourceSize) { 178 | if (source.charAt(pos) === '{') bo++; 179 | if (source.charAt(pos) === '}') bc++; 180 | if (bc === bo && bo !== 0) { 181 | splitSource(pos + 2); 182 | break; 183 | } 184 | pos++; 185 | } 186 | } 187 | 188 | return { sourceFunc, keyFunc }; 189 | } 190 | -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- 1 | /* global math */ 2 | /* eslint-disable no-unused-vars */ 3 | var utils = { 4 | strWrap: (str) => { 5 | if (str.includes('\n') || (str.includes('"') && str.includes("'"))) return '`'; 6 | return !str.includes("'") ? "'" : '"'; 7 | }, 8 | 9 | escapeRegExp: (str, q) => str.replace(new RegExp(`[\\\\${q}\\n]`, 'g'), '\\$&').replace(/-/g, '\\x2d'), 10 | 11 | _unescape: (str) => { 12 | for (let i = 32; i < 128; i++) { 13 | str = str.replace(new RegExp('\\\\x' + i.toString(16), 'ig'), String.fromCharCode(i)); 14 | } 15 | str = str.replace(/\\x09/g, '\t'); 16 | return str; 17 | }, 18 | 19 | strMerge: (str) => str.replace(/(?,!?:|&+\-*/])('|")\s*\+\s*\1(?!([\])=<>,?:|&!+\-*/]|$))/g, ''), 20 | 21 | methodChain: (str) => { 22 | str = str.replace( 23 | /(?<=(\b(return|throw|in|of|new|delete|default|function|async|await|get|set)|\{|\*))\s*\[('|")((?![^_a-zA-Z$])[\w$]*)\3\]\s*\(/g, 24 | ' $4( ', 25 | ); 26 | str = str.replace(/(?<=((?![^_a-zA-Z$])[\w$]*)|\]|\))\[('|")((?![^_a-zA-Z$])[\w$]*)\2\]/gi, ' .$3 '); 27 | return str; 28 | }, 29 | 30 | calcHex: (str) => { 31 | str = str.replace( 32 | /(? math.format(eval(m), 14), 34 | ); 35 | str = str.replace(/(?<=[[(=<>,!?:|&+\-*/])\s*0x[a-f\d]+\s*(?=([\])=<>,?:|&+\-*/]|$))/gi, (m) => parseInt(m)); 36 | return str; 37 | }, 38 | 39 | calcNumber: (str) => { 40 | str = str.replace(/(? { 41 | if (!/[+\-*/]/.test(m)) return m; 42 | return math.format(math.evaluate(m), 14); 43 | }); 44 | return str; 45 | }, 46 | 47 | removeGrouping: (str) => { 48 | str = str.replace(/(? 54 | str.replace( 55 | /((?<=([=:(,|&[]|return|=>))|^)[\s\n]*!{1,2}(\[\]|0|1)[\s\n]*((?=[;,)}|&\]])|$)/g, 56 | (m) => ' ' + Boolean(eval(m)), 57 | ), 58 | 59 | propArr: (str) => str.replace(/\[\((['"])((?![^_a-zA-Z$])[\w$]*)['"]\)\]/gi, '[$1$2$1]'), 60 | }; 61 | -------------------------------------------------------------------------------- /manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "de4js", 3 | "short_name": "de4js", 4 | "description": "JavaScript Deobfuscator and Unpacker", 5 | "theme_color": "#b5e853", 6 | "background_color": "#151515", 7 | "display": "standalone", 8 | "scope": "/de4js/", 9 | "start_url": "/de4js/", 10 | "icons": [ 11 | { 12 | "src": "assets/images/icons/icon-72x72.png", 13 | "sizes": "72x72", 14 | "type": "image/png" 15 | }, 16 | { 17 | "src": "assets/images/icons/icon-96x96.png", 18 | "sizes": "96x96", 19 | "type": "image/png" 20 | }, 21 | { 22 | "src": "assets/images/icons/icon-128x128.png", 23 | "sizes": "128x128", 24 | "type": "image/png" 25 | }, 26 | { 27 | "src": "assets/images/icons/icon-144x144.png", 28 | "sizes": "144x144", 29 | "type": "image/png" 30 | }, 31 | { 32 | "src": "assets/images/icons/icon-152x152.png", 33 | "sizes": "152x152", 34 | "type": "image/png" 35 | }, 36 | { 37 | "src": "assets/images/icons/icon-192x192.png", 38 | "sizes": "192x192", 39 | "type": "image/png" 40 | }, 41 | { 42 | "src": "assets/images/icons/icon-384x384.png", 43 | "sizes": "384x384", 44 | "type": "image/png" 45 | }, 46 | { 47 | "src": "assets/images/icons/icon-512x512.png", 48 | "sizes": "512x512", 49 | "type": "image/png" 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "de4js", 3 | "version": "1.12.0", 4 | "description": "JavaScript Deobfuscator and Unpacker", 5 | "main": "main.js", 6 | "scripts": { 7 | "build": "bundle exec jekyll build && workbox generateSW workbox-config.js", 8 | "d-build": "docker exec -it de4js_app bundle exec jekyll build && workbox generateSW workbox-config.js", 9 | "start": "bundle exec jekyll serve --watch --config _config.yml", 10 | "watch": "bundle exec jekyll serve --watch --config _config.yml,_config_development.yml --livereload", 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/lelinhtinh/de4js.git" 16 | }, 17 | "keywords": [ 18 | "deobfuscator", 19 | "deobfuscate", 20 | "deobfuscation", 21 | "unpacker", 22 | "decode", 23 | "decrypt", 24 | "javascript", 25 | "online-tools" 26 | ], 27 | "author": "Zzbaivong", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/lelinhtinh/de4js/issues" 31 | }, 32 | "homepage": "https://lelinhtinh.github.io/de4js/", 33 | "funding": { 34 | "type": "opencollective", 35 | "url": "https://opencollective.com/de4js" 36 | }, 37 | "devDependencies": { 38 | "eslint-plugin-frontmatter": "0.0.8", 39 | "workbox-cli": "^6.0.2" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /sw.js: -------------------------------------------------------------------------------- 1 | if(!self.define){const r=r=>{"require"!==r&&(r+=".js");let e=Promise.resolve();return o[r]||(e=new Promise((async e=>{if("document"in self){const o=document.createElement("script");o.src=r,document.head.appendChild(o),o.onload=e}else importScripts(r),e()}))),e.then((()=>{if(!o[r])throw new Error(`Module ${r} didn’t register its module`);return o[r]}))},e=(e,o)=>{Promise.all(e.map(r)).then((r=>o(1===r.length?r[0]:r)))},o={require:Promise.resolve(e)};self.define=(e,a,i)=>{o[e]||(o[e]=Promise.resolve().then((()=>{let o={};const s={uri:location.origin+e.slice(1)};return Promise.all(a.map((e=>{switch(e){case"exports":return o;case"module":return s;default:return r(e)}}))).then((r=>{const e=i(...r);return o.default||(o.default=e),o}))})))}}define("./sw.js",["./workbox-08e0b74e"],(function(r){"use strict";self.addEventListener("message",(r=>{r.data&&"SKIP_WAITING"===r.data.type&&self.skipWaiting()})),r.precacheAndRoute([{url:"assets/css/style.css",revision:"a6289c3765438ab486bb87f2939a2790"},{url:"assets/images/bkg.png",revision:"360842dce3f69f728aa77ae005424fe8"},{url:"assets/images/blacktocat.png",revision:"63f291a3168cc5e02daaa6156756b122"},{url:"assets/images/bullet.png",revision:"03ac3148397e2db4a517b649dda1473b"},{url:"assets/images/buttons/copy-document.png",revision:"383595543e61ac2796b290749fcc52ef"},{url:"assets/images/buttons/download.png",revision:"d2dedf6d77957db5a7bfb6a53295e7d6"},{url:"assets/images/buttons/external-link-symbol.png",revision:"2de11a499c90ac4ae01e216b1f80177b"},{url:"assets/images/icons/icon-128x128.png",revision:"6f14d711cf80097b078497193ea4ac30"},{url:"assets/images/icons/icon-144x144.png",revision:"e67b5b9ba8858a5d7db314fb36c038a5"},{url:"assets/images/icons/icon-152x152.png",revision:"4ced623ede1d3cf81710a7e19037a2f7"},{url:"assets/images/icons/icon-192x192.png",revision:"f1b40ddd6aef720f988681573c295218"},{url:"assets/images/icons/icon-384x384.png",revision:"5ba82586ea5c9a813117f132eb348fe7"},{url:"assets/images/icons/icon-512x512.png",revision:"e6bdac56bd1b6144f2a134d5828b1f87"},{url:"assets/images/icons/icon-72x72.png",revision:"f2e958dff8f4adead85d6d2ed4691807"},{url:"assets/images/icons/icon-96x96.png",revision:"515f261f32a0fd0e6a1bc6487a377979"},{url:"favicon.ico",revision:"9023cfc9b056b1e214bed25cfc018a33"},{url:"index.html",revision:"63f5fa4e0d83b9fe8275a07b4b8f5409"},{url:"lib/arraydecode.js",revision:"68512e5b55e2c08676f42807928315e2"},{url:"lib/cleansource.js",revision:"0d2627fe2a363b3fc880fd33611db090"},{url:"lib/evaldecode.js",revision:"ed14919cf01e5c67802fc4f72d6a682f"},{url:"lib/jsfuckdecode.js",revision:"7fe99e9044d95fde7ee9ec0df51b8882"},{url:"lib/numberdecode.js",revision:"9b100f205b5ed0b77c3a8196034e1d09"},{url:"lib/obfuscatorio.js",revision:"f8cfb122fa62dcb7447555f79db9b9bc"},{url:"lib/utils.js",revision:"cadd9aedeef5181271190fb46afad569"},{url:"main.js",revision:"1e2b839d48aed23700c7a340f4e32ba6"},{url:"manifest.webmanifest",revision:"b94102b1340367613a5b168b57ba94d3"},{url:"sw.js",revision:"f34464084bf1c8e225426d0b5f7049e8"},{url:"third_party/cat-in-136/aadecode.js",revision:"06ea6b7f3cc57abf9bf111be19f10c7c"},{url:"third_party/clipboard-js/clipboard.min.js",revision:"aeaeb6ab463cb8140a72103aedb01d74"},{url:"third_party/decoder-jjencode/jjdecode.js",revision:"27abc7cdeee1be4a891678eb72c46880"},{url:"third_party/highlight-js/highlight.min.js",revision:"9a99fc600014ee54d144c4e643fdfb05"},{url:"third_party/js-beautify/beautify.min.js",revision:"62a28a3187b18814899cf0813a718cb2"},{url:"third_party/js-beautify/unpackers/javascriptobfuscator_unpacker.js",revision:"939ead8257cdb38a0556ba8a0f79feda"},{url:"third_party/js-beautify/unpackers/myobfuscate_unpacker.js",revision:"9c2d3d994e406d3ca73419978ccfff26"},{url:"third_party/js-beautify/unpackers/p_a_c_k_e_r_unpacker.js",revision:"0303e930789facfc4d8a764ffcfb6d30"},{url:"third_party/js-beautify/unpackers/urlencode_unpacker.js",revision:"6c4a9f54d4a766f6d085fff7bd7c88fb"},{url:"third_party/mathjs/math.min.js",revision:"b5d0fab60a09c4aee005deba57498470"},{url:"third_party/NotSoWise/index.html",revision:"cb94c50427515f9559e18d2f1cdd045f"},{url:"third_party/NotSoWise/oldBase/notsowise.js",revision:"4ee7ca328997d2c690444d79c6b48629"},{url:"third_party/NotSoWise/unpacker.js",revision:"cec0d3d5c82d0e4e1bf55b632d4fc543"},{url:"third_party/workbox/workbox-v5.1.4/workbox-background-sync.dev.js",revision:"292540f6dfbf73613fee69c4daa34768"},{url:"third_party/workbox/workbox-v5.1.4/workbox-background-sync.prod.js",revision:"1477337d11af8f727e9203690ef10cfc"},{url:"third_party/workbox/workbox-v5.1.4/workbox-broadcast-update.dev.js",revision:"c8aec116b72d5a6f4fbdf895cbe9a6a2"},{url:"third_party/workbox/workbox-v5.1.4/workbox-broadcast-update.prod.js",revision:"3b28d76111687065750273c7ac7f4c97"},{url:"third_party/workbox/workbox-v5.1.4/workbox-cacheable-response.dev.js",revision:"22b01a882fa59ca2dc95581a863d6543"},{url:"third_party/workbox/workbox-v5.1.4/workbox-cacheable-response.prod.js",revision:"baa5a06eb89620c714728d9292895824"},{url:"third_party/workbox/workbox-v5.1.4/workbox-core.dev.js",revision:"4da76fb060d4145b55f770ef2ba1916e"},{url:"third_party/workbox/workbox-v5.1.4/workbox-core.prod.js",revision:"2002e39bc413245e9466646856a3a1a0"},{url:"third_party/workbox/workbox-v5.1.4/workbox-expiration.dev.js",revision:"2b6ecefe6b4de33b232b1d4f3f6f2d4d"},{url:"third_party/workbox/workbox-v5.1.4/workbox-expiration.prod.js",revision:"3c39521fc764b9952c819c8be6bdee40"},{url:"third_party/workbox/workbox-v5.1.4/workbox-navigation-preload.dev.js",revision:"79bf2718a2ad92bc4b16e90df9a6813e"},{url:"third_party/workbox/workbox-v5.1.4/workbox-navigation-preload.prod.js",revision:"b08e45df331d747386f7a9d3ce8d6f35"},{url:"third_party/workbox/workbox-v5.1.4/workbox-offline-ga.dev.js",revision:"3bfac87afd96631ca169f1580340bb09"},{url:"third_party/workbox/workbox-v5.1.4/workbox-offline-ga.prod.js",revision:"291d35c6a2d5e4e63240804f3da93dff"},{url:"third_party/workbox/workbox-v5.1.4/workbox-precaching.dev.js",revision:"fe30d3ca56741cc350362b551cc81ea6"},{url:"third_party/workbox/workbox-v5.1.4/workbox-precaching.prod.js",revision:"aad79f6fd69e76afce9a9bc0444fb4b1"},{url:"third_party/workbox/workbox-v5.1.4/workbox-range-requests.dev.js",revision:"0aba977d2b293ce947ace319edfff93f"},{url:"third_party/workbox/workbox-v5.1.4/workbox-range-requests.prod.js",revision:"05a4f56357fc7bc48478d8048df4f0e3"},{url:"third_party/workbox/workbox-v5.1.4/workbox-routing.dev.js",revision:"eb2ee6155e0c721707d9fa05e4590f28"},{url:"third_party/workbox/workbox-v5.1.4/workbox-routing.prod.js",revision:"65baaf497738a14f1b694a9cff829d4d"},{url:"third_party/workbox/workbox-v5.1.4/workbox-strategies.dev.js",revision:"929f436eeb0effe772037b7afb8ab1db"},{url:"third_party/workbox/workbox-v5.1.4/workbox-strategies.prod.js",revision:"2a12ac7e1932c797cb3084c2543066c9"},{url:"third_party/workbox/workbox-v5.1.4/workbox-streams.dev.js",revision:"1ebc21ea730f92a3ea3e2698f9449a65"},{url:"third_party/workbox/workbox-v5.1.4/workbox-streams.prod.js",revision:"e1ce8b87604c3265fcca4504f1b97814"},{url:"third_party/workbox/workbox-v5.1.4/workbox-sw.js",revision:"dc277aae8a000c27df99aba092aa1832"},{url:"third_party/workbox/workbox-v5.1.4/workbox-window.dev.umd.js",revision:"80d6025c59787e3fbdbd4e55ef08d7f3"},{url:"third_party/workbox/workbox-v5.1.4/workbox-window.prod.umd.js",revision:"a416894a85a10c88abd525b50d27ffed"},{url:"userscript/de4js_helper.meta.js",revision:"91af28e5488b6d5941a595e115e97eb1"},{url:"userscript/de4js_helper.user.js",revision:"fd9dd72ca3c520f1bfe2b6a271116235"},{url:"workbox-08e0b74e.js",revision:"32d57f52bc256eb51141bc0aa91b2245"},{url:"workbox-a82ab0ba.js",revision:"b2f1b8a1271c7a1fc759abacf420d082"},{url:"workbox-e1834b40.js",revision:"c07d9aae0fac68e4354b6fe1087e0db2"},{url:"worker/decode.js",revision:"90fd8544875e33a960c28041d8fcb6bc"},{url:"worker/format.js",revision:"d24d3cd9ad805b279155095a6e688eee"}],{})})); 2 | //# sourceMappingURL=sw.js.map 3 | -------------------------------------------------------------------------------- /third_party/cat-in-136/aadecode.js: -------------------------------------------------------------------------------- 1 | // 80c24cd | https://github.com/cat-in-136/blog/blob/master/_posts/2010-12-04-aadecode-decode-encoded-as-aaencode.html 2 | 3 | /* AADecode - Decode encoded-as-aaencode JavaScript program. 4 | * 5 | * Copyright (C) 2010 @cat_in_136 6 | * 7 | * This software is released under the MIT License. 8 | * http://opensource.org/licenses/mit-license.php 9 | */ 10 | var AADecode = { 11 | decode: function (text) { 12 | var evalPreamble = "(\uFF9F\u0414\uFF9F) ['_'] ( (\uFF9F\u0414\uFF9F) ['_'] ("; 13 | var decodePreamble = "( (\uFF9F\u0414\uFF9F) ['_'] ("; 14 | var evalPostamble = ") (\uFF9F\u0398\uFF9F)) ('_');"; 15 | var decodePostamble = ") ());"; 16 | // strip beginning/ending space. 17 | text = text.replace(/^\s*/, "").replace(/\s*$/, ""); 18 | // returns empty text for empty input. 19 | if (/^\s*$/.test(text)) { 20 | return ""; 21 | } 22 | // check if it is encoded. 23 | if (text.lastIndexOf(evalPreamble) < 0) { 24 | throw new Error("Given code is not encoded as aaencode."); 25 | } 26 | if (text.lastIndexOf(evalPostamble) != text.length - evalPostamble.length) { 27 | throw new Error("Given code is not encoded as aaencode."); 28 | } 29 | var decodingScript = text.replace(evalPreamble, decodePreamble) 30 | .replace(evalPostamble, decodePostamble); 31 | return eval(decodingScript); 32 | }, 33 | doDecode: function () { 34 | var oEncoded = document.getElementById("aadecode_encoded"); 35 | var oDecoded = document.getElementById("aadecode_decoded"); 36 | try { 37 | oDecoded.value = AADecode.decode(oEncoded.value); 38 | } catch (ex) { 39 | oDecoded.value = "****Error:\n" + ex.toString(); 40 | } 41 | }, 42 | dummy: null 43 | }; 44 | -------------------------------------------------------------------------------- /third_party/clipboard-js/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright © 2017 Zeno Rocha 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /third_party/clipboard-js/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.6 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return o={},r.m=n=[function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o 31 | // 32 | // usage: 33 | // 34 | // if (JavascriptObfuscator.detect(some_string)) { 35 | // var unpacked = JavascriptObfuscator.unpack(some_string); 36 | // } 37 | // 38 | // 39 | 40 | /*jshint strict:false */ 41 | 42 | var JavascriptObfuscator = { 43 | detect: function(str) { 44 | return /^var _0x[a-f0-9]+ ?\= ?\[/.test(str); 45 | }, 46 | 47 | unpack: function(str) { 48 | if (JavascriptObfuscator.detect(str)) { 49 | var matches = /var (_0x[a-f\d]+) ?\= ?\[(.*?)\];/.exec(str); 50 | if (matches) { 51 | var var_name = matches[1]; 52 | var strings = JavascriptObfuscator._smart_split(matches[2]); 53 | str = str.substring(matches[0].length); 54 | for (var k in strings) { 55 | str = str.replace(new RegExp(var_name + '\\[' + k + '\\]', 'g'), 56 | JavascriptObfuscator._fix_quotes(JavascriptObfuscator._unescape(strings[k]))); 57 | } 58 | } 59 | } 60 | return str; 61 | }, 62 | 63 | _fix_quotes: function(str) { 64 | var matches = /^"(.*)"$/.exec(str); 65 | if (matches) { 66 | str = matches[1]; 67 | str = "'" + str.replace(/'/g, "\\'") + "'"; 68 | } 69 | return str; 70 | }, 71 | 72 | _smart_split: function(str) { 73 | var strings = []; 74 | var pos = 0; 75 | while (pos < str.length) { 76 | if (str.charAt(pos) === '"') { 77 | // new word 78 | var word = ''; 79 | pos += 1; 80 | while (pos < str.length) { 81 | if (str.charAt(pos) === '"') { 82 | break; 83 | } 84 | if (str.charAt(pos) === '\\') { 85 | word += '\\'; 86 | pos++; 87 | } 88 | word += str.charAt(pos); 89 | pos++; 90 | } 91 | strings.push('"' + word + '"'); 92 | } 93 | pos += 1; 94 | } 95 | return strings; 96 | }, 97 | 98 | 99 | _unescape: function(str) { 100 | // inefficient if used repeatedly or on small strings, but wonderful on single large chunk of text 101 | for (var i = 32; i < 128; i++) { 102 | str = str.replace(new RegExp('\\\\x' + i.toString(16), 'ig'), String.fromCharCode(i)); 103 | } 104 | str = str.replace(/\\x09/g, "\t"); 105 | return str; 106 | }, 107 | 108 | run_tests: function(sanity_test) { 109 | var t = sanity_test || new SanityTest(); 110 | 111 | t.test_function(JavascriptObfuscator._smart_split, "JavascriptObfuscator._smart_split"); 112 | t.expect('', []); 113 | t.expect('"a", "b"', ['"a"', '"b"']); 114 | t.expect('"aaa","bbbb"', ['"aaa"', '"bbbb"']); 115 | t.expect('"a", "b\\\""', ['"a"', '"b\\\""']); 116 | t.test_function(JavascriptObfuscator._unescape, 'JavascriptObfuscator._unescape'); 117 | t.expect('\\x40', '@'); 118 | t.expect('\\x10', '\\x10'); 119 | t.expect('\\x1', '\\x1'); 120 | t.expect("\\x61\\x62\\x22\\x63\\x64", 'ab"cd'); 121 | t.test_function(JavascriptObfuscator.detect, 'JavascriptObfuscator.detect'); 122 | t.expect('', false); 123 | t.expect('abcd', false); 124 | t.expect('var _0xaaaa', false); 125 | t.expect('var _0xaaaa = ["a", "b"]', true); 126 | t.expect('var _0xaaaa=["a", "b"]', true); 127 | t.expect('var _0x1234=["a","b"]', true); 128 | return t; 129 | } 130 | 131 | 132 | }; 133 | -------------------------------------------------------------------------------- /third_party/js-beautify/unpackers/myobfuscate_unpacker.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. 6 | 7 | Permission is hereby granted, free of charge, to any person 8 | obtaining a copy of this software and associated documentation files 9 | (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, 11 | publish, distribute, sublicense, and/or sell copies of the Software, 12 | and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 22 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 23 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | */ 27 | 28 | // 29 | // simple unpacker/deobfuscator for scripts messed up with myobfuscate.com 30 | // You really don't want to obfuscate your scripts there: they're tracking 31 | // your unpackings, your script gets turned into something like this, 32 | // as of 2011-04-25: 33 | /* 34 | 35 | var _escape = 'your_script_escaped'; 36 | var _111 = document.createElement('script'); 37 | _111.src = 'http://api.www.myobfuscate.com/?getsrc=ok' + 38 | '&ref=' + encodeURIComponent(document.referrer) + 39 | '&url=' + encodeURIComponent(document.URL); 40 | var 000 = document.getElementsByTagName('head')[0]; 41 | 000.appendChild(_111); 42 | document.write(unescape(_escape)); 43 | 44 | */ 45 | // 46 | // written by Einar Lielmanis 47 | // 48 | // usage: 49 | // 50 | // if (MyObfuscate.detect(some_string)) { 51 | // var unpacked = MyObfuscate.unpack(some_string); 52 | // } 53 | // 54 | // 55 | 56 | /*jshint strict:false */ 57 | 58 | var MyObfuscate = { 59 | detect: function(str) { 60 | if (/^var _?[0O1lI]{3}\=('|\[).*\)\)\);/.test(str)) { 61 | return true; 62 | } 63 | if (/^function _?[0O1lI]{3}\(_/.test(str) && /eval\(/.test(str)) { 64 | return true; 65 | } 66 | return false; 67 | }, 68 | 69 | unpack: function(str) { 70 | if (MyObfuscate.detect(str)) { 71 | var __eval = eval; 72 | try { 73 | eval = function(unpacked) { // jshint ignore:line 74 | if (MyObfuscate.starts_with(unpacked, 'var _escape')) { 75 | // fetch the urlencoded stuff from the script, 76 | var matches = /'([^']*)'/.exec(unpacked); 77 | var unescaped = unescape(matches[1]); 78 | if (MyObfuscate.starts_with(unescaped, '')) { 82 | unescaped = unescaped.substr(0, unescaped.length - 9); 83 | } 84 | unpacked = unescaped; 85 | } 86 | // throw to terminate the script 87 | unpacked = "// Unpacker warning: be careful when using myobfuscate.com for your projects:\n" + 88 | "// scripts obfuscated by the free online version may call back home.\n" + 89 | "\n//\n" + unpacked; 90 | throw unpacked; 91 | }; // jshint ignore:line 92 | __eval(str); // should throw 93 | } catch (e) { 94 | // well, it failed. we'll just return the original, instead of crashing on user. 95 | if (typeof e === "string") { 96 | str = e; 97 | } 98 | } 99 | eval = __eval; // jshint ignore:line 100 | } 101 | return str; 102 | }, 103 | 104 | starts_with: function(str, what) { 105 | return str.substr(0, what.length) === what; 106 | }, 107 | 108 | ends_with: function(str, what) { 109 | return str.substr(str.length - what.length, what.length) === what; 110 | }, 111 | 112 | run_tests: function(sanity_test) { 113 | var t = sanity_test || new SanityTest(); 114 | 115 | return t; 116 | } 117 | 118 | 119 | }; 120 | -------------------------------------------------------------------------------- /third_party/js-beautify/unpackers/p_a_c_k_e_r_unpacker.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. 6 | 7 | Permission is hereby granted, free of charge, to any person 8 | obtaining a copy of this software and associated documentation files 9 | (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, 11 | publish, distribute, sublicense, and/or sell copies of the Software, 12 | and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 22 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 23 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | */ 27 | 28 | // 29 | // Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier 30 | // 31 | // Coincidentally, it can defeat a couple of other eval-based compressors. 32 | // 33 | // usage: 34 | // 35 | // if (P_A_C_K_E_R.detect(some_string)) { 36 | // var unpacked = P_A_C_K_E_R.unpack(some_string); 37 | // } 38 | // 39 | // 40 | 41 | /*jshint strict:false */ 42 | 43 | var P_A_C_K_E_R = { 44 | detect: function(str) { 45 | return (P_A_C_K_E_R.get_chunks(str).length > 0); 46 | }, 47 | 48 | get_chunks: function(str) { 49 | var chunks = str.match(/eval\(\(?function\(.*?(,0,\{\}\)\)|split\('\|'\)\)\))($|\n)/g); 50 | return chunks ? chunks : []; 51 | }, 52 | 53 | unpack: function(str) { 54 | var chunks = P_A_C_K_E_R.get_chunks(str), 55 | chunk; 56 | for (var i = 0; i < chunks.length; i++) { 57 | chunk = chunks[i].replace(/\n$/, ''); 58 | str = str.split(chunk).join(P_A_C_K_E_R.unpack_chunk(chunk)); 59 | } 60 | return str; 61 | }, 62 | 63 | unpack_chunk: function(str) { 64 | var unpacked_source = ''; 65 | var __eval = eval; 66 | if (P_A_C_K_E_R.detect(str)) { 67 | try { 68 | eval = function(s) { // jshint ignore:line 69 | unpacked_source += s; 70 | return unpacked_source; 71 | }; // jshint ignore:line 72 | __eval(str); 73 | if (typeof unpacked_source === 'string' && unpacked_source) { 74 | str = unpacked_source; 75 | } 76 | } catch (e) { 77 | // well, it failed. we'll just return the original, instead of crashing on user. 78 | } 79 | } 80 | eval = __eval; // jshint ignore:line 81 | return str; 82 | }, 83 | 84 | run_tests: function(sanity_test) { 85 | var t = sanity_test || new SanityTest(); 86 | 87 | var pk1 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))"; 88 | var unpk1 = 'var a=1'; 89 | var pk2 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'foo||b'.split('|'),0,{}))"; 90 | var unpk2 = 'foo b=1'; 91 | var pk_broken = "eval(function(p,a,c,k,e,r){BORKBORK;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))"; 92 | var pk3 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1{}))',3,3,'var||a'.split('|'),0,{}))"; 93 | var unpk3 = 'var a=1{}))'; 94 | 95 | t.test_function(P_A_C_K_E_R.detect, "P_A_C_K_E_R.detect"); 96 | t.expect('', false); 97 | t.expect('var a = b', false); 98 | t.test_function(P_A_C_K_E_R.unpack, "P_A_C_K_E_R.unpack"); 99 | t.expect(pk_broken, pk_broken); 100 | t.expect(pk1, unpk1); 101 | t.expect(pk2, unpk2); 102 | t.expect(pk3, unpk3); 103 | 104 | var filler = '\nfiller\n'; 105 | t.expect(filler + pk1 + "\n" + pk_broken + filler + pk2 + filler, filler + unpk1 + "\n" + pk_broken + filler + unpk2 + filler); 106 | 107 | return t; 108 | } 109 | 110 | 111 | }; 112 | -------------------------------------------------------------------------------- /third_party/js-beautify/unpackers/urlencode_unpacker.js: -------------------------------------------------------------------------------- 1 | /*global unescape */ 2 | /*jshint curly: false, scripturl: true */ 3 | 4 | /* 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. 9 | 10 | Permission is hereby granted, free of charge, to any person 11 | obtaining a copy of this software and associated documentation files 12 | (the "Software"), to deal in the Software without restriction, 13 | including without limitation the rights to use, copy, modify, merge, 14 | publish, distribute, sublicense, and/or sell copies of the Software, 15 | and to permit persons to whom the Software is furnished to do so, 16 | subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 25 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 26 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | SOFTWARE. 29 | */ 30 | 31 | // 32 | // trivial bookmarklet/escaped script detector for the javascript beautifier 33 | // written by Einar Lielmanis 34 | // 35 | // usage: 36 | // 37 | // if (Urlencoded.detect(some_string)) { 38 | // var unpacked = Urlencoded.unpack(some_string); 39 | // } 40 | // 41 | // 42 | 43 | /*jshint strict:false */ 44 | 45 | 46 | var isNode = (typeof module !== 'undefined' && module.exports); 47 | if (isNode) { 48 | var SanityTest = require(__dirname + '/../../test/sanitytest'); 49 | } 50 | 51 | var Urlencoded = { 52 | detect: function(str) { 53 | // the fact that script doesn't contain any space, but has %20 instead 54 | // should be sufficient check for now. 55 | if (str.indexOf(' ') === -1) { 56 | if (str.indexOf('%2') !== -1) return true; 57 | if (str.replace(/[^%]+/g, '').length > 3) return true; 58 | } 59 | return false; 60 | }, 61 | 62 | unpack: function(str) { 63 | if (Urlencoded.detect(str)) { 64 | if (str.indexOf('%2B') !== -1 || str.indexOf('%2b') !== -1) { 65 | // "+" escaped as "%2B" 66 | return unescape(str.replace(/\+/g, '%20')); 67 | } else { 68 | return unescape(str); 69 | } 70 | } 71 | return str; 72 | }, 73 | 74 | 75 | 76 | run_tests: function(sanity_test) { 77 | var t = sanity_test || new SanityTest(); 78 | t.test_function(Urlencoded.detect, "Urlencoded.detect"); 79 | t.expect('', false); 80 | t.expect('var a = b', false); 81 | t.expect('var%20a+=+b', true); 82 | t.expect('var%20a=b', true); 83 | t.expect('var%20%21%22', true); 84 | t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', true); 85 | t.test_function(Urlencoded.unpack, 'Urlencoded.unpack'); 86 | 87 | t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', 88 | 'javascript:(function(){var whatever={init:function(){alert("a"+"b")}};whatever.init()})();' 89 | ); 90 | t.expect('', ''); 91 | t.expect('abcd', 'abcd'); 92 | t.expect('var a = b', 'var a = b'); 93 | t.expect('var%20a=b', 'var a=b'); 94 | t.expect('var%20a=b+1', 'var a=b+1'); 95 | t.expect('var%20a=b%2b1', 'var a=b+1'); 96 | return t; 97 | } 98 | 99 | 100 | }; 101 | 102 | if (isNode) { 103 | module.exports = Urlencoded; 104 | } 105 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-background-sync.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.backgroundSync=function(t,e,s,i,n){"use strict";try{self["workbox:background-sync:5.1.4"]&&_()}catch(t){}class a{constructor(t){this.t=t,this.s=new n.DBWrapper("workbox-background-sync",3,{onupgradeneeded:this.i})}async pushEntry(t){delete t.id,t.queueName=this.t,await this.s.add("requests",t)}async unshiftEntry(t){const[e]=await this.s.getAllMatching("requests",{count:1});e?t.id=e.id-1:delete t.id,t.queueName=this.t,await this.s.add("requests",t)}async popEntry(){return this.h({direction:"prev"})}async shiftEntry(){return this.h({direction:"next"})}async getAll(){return await this.s.getAllMatching("requests",{index:"queueName",query:IDBKeyRange.only(this.t)})}async deleteEntry(t){await this.s.delete("requests",t)}async h({direction:t}){const[e]=await this.s.getAllMatching("requests",{direction:t,index:"queueName",query:IDBKeyRange.only(this.t),count:1});if(e)return await this.deleteEntry(e.id),e}i(t){const e=t.target.result;t.oldVersion>0&&t.oldVersion<3&&e.objectStoreNames.contains("requests")&&e.deleteObjectStore("requests");e.createObjectStore("requests",{autoIncrement:!0,keyPath:"id"}).createIndex("queueName","queueName",{unique:!1})}}const r=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"];class c{constructor(t){"navigate"===t.mode&&(t.mode="same-origin"),this.u=t}static async fromRequest(t){const e={url:t.url,headers:{}};"GET"!==t.method&&(e.body=await t.clone().arrayBuffer());for(const[s,i]of t.headers.entries())e.headers[s]=i;for(const s of r)void 0!==t[s]&&(e[s]=t[s]);return new c(e)}toObject(){const t=Object.assign({},this.u);return t.headers=Object.assign({},this.u.headers),t.body&&(t.body=t.body.slice(0)),t}toRequest(){return new Request(this.u.url,this.u)}clone(){return new c(this.toObject())}}const h=new Set,u=t=>{const e={request:new c(t.requestData).toRequest(),timestamp:t.timestamp};return t.metadata&&(e.metadata=t.metadata),e};class o{constructor(t,{onSync:s,maxRetentionTime:i}={}){if(this.o=!1,this.q=!1,h.has(t))throw new e.WorkboxError("duplicate-queue-name",{name:t});h.add(t),this.l=t,this.m=s||this.replayRequests,this.p=i||10080,this.g=new a(this.l),this.R()}get name(){return this.l}async pushRequest(t){await this.k(t,"push")}async unshiftRequest(t){await this.k(t,"unshift")}async popRequest(){return this.D("pop")}async shiftRequest(){return this.D("shift")}async getAll(){const t=await this.g.getAll(),e=Date.now(),s=[];for(const i of t){const t=60*this.p*1e3;e-i.timestamp>t?await this.g.deleteEntry(i.id):s.push(u(i))}return s}async k({request:t,metadata:e,timestamp:s=Date.now()},i){const n={requestData:(await c.fromRequest(t.clone())).toObject(),timestamp:s};e&&(n.metadata=e),await this.g[i+"Entry"](n),this.o?this.q=!0:await this.registerSync()}async D(t){const e=Date.now(),s=await this.g[t+"Entry"]();if(s){const i=60*this.p*1e3;return e-s.timestamp>i?this.D(t):u(s)}}async replayRequests(){let t;for(;t=await this.shiftRequest();)try{await fetch(t.request.clone())}catch(s){throw await this.unshiftRequest(t),new e.WorkboxError("queue-replay-failed",{name:this.l})}}async registerSync(){if("sync"in self.registration)try{await self.registration.sync.register("workbox-background-sync:"+this.l)}catch(t){}}R(){"sync"in self.registration?self.addEventListener("sync",t=>{if(t.tag==="workbox-background-sync:"+this.l){const e=async()=>{let e;this.o=!0;try{await this.m({queue:this})}catch(t){throw e=t,e}finally{!this.q||e&&!t.lastChance||await this.registerSync(),this.o=!1,this.q=!1}};t.waitUntil(e())}}):this.m({queue:this})}static get _(){return h}}return t.BackgroundSyncPlugin=class{constructor(t,e){this.fetchDidFail=async({request:t})=>{await this.v.pushRequest({request:t})},this.v=new o(t,e)}},t.Queue=o,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private); 2 | //# sourceMappingURL=workbox-background-sync.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-broadcast-update.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(t,a,o,s){"use strict";try{self["workbox:broadcast-update:5.1.4"]&&_()}catch(t){}const e=(t,a,o)=>!o.some(o=>t.headers.has(o)&&a.headers.has(o))||o.every(o=>{const s=t.headers.has(o)===a.headers.has(o),e=t.headers.get(o)===a.headers.get(o);return s&&e}),n=["content-length","etag","last-modified"],i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function c(t){return{cacheName:t.cacheName,updatedURL:t.request.url}}class r{constructor({headersToCheck:t,generatePayload:a}={}){this.t=t||n,this.o=a||c}async notifyIfUpdated(t){if(t.oldResponse&&!e(t.oldResponse,t.newResponse,this.t)){const s={type:"CACHE_UPDATED",meta:"workbox-broadcast-update",payload:this.o(t)};if("navigate"===t.request.mode){let s;t.event instanceof FetchEvent&&(s=t.event.resultingClientId);await o.resultingClientExists(s)&&!i||await a.timeout(3500)}const e=await self.clients.matchAll({type:"window"});for(const t of e)t.postMessage(s)}}}return t.BroadcastCacheUpdate=r,t.BroadcastUpdatePlugin=class{constructor(t){this.cacheDidUpdate=async t=>{s.dontWaitFor(this.s.notifyIfUpdated(t))},this.s=new r(t)}},t.responsesAreSame=e,t}({},workbox.core._private,workbox.core._private,workbox.core._private); 2 | //# sourceMappingURL=workbox-broadcast-update.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-cacheable-response.dev.js: -------------------------------------------------------------------------------- 1 | this.workbox = this.workbox || {}; 2 | this.workbox.cacheableResponse = (function (exports, assert_js, WorkboxError_js, getFriendlyURL_js, logger_js) { 3 | 'use strict'; 4 | 5 | try { 6 | self['workbox:cacheable-response:5.1.4'] && _(); 7 | } catch (e) {} 8 | 9 | /* 10 | Copyright 2018 Google LLC 11 | 12 | Use of this source code is governed by an MIT-style 13 | license that can be found in the LICENSE file or at 14 | https://opensource.org/licenses/MIT. 15 | */ 16 | /** 17 | * This class allows you to set up rules determining what 18 | * status codes and/or headers need to be present in order for a 19 | * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) 20 | * to be considered cacheable. 21 | * 22 | * @memberof module:workbox-cacheable-response 23 | */ 24 | 25 | class CacheableResponse { 26 | /** 27 | * To construct a new CacheableResponse instance you must provide at least 28 | * one of the `config` properties. 29 | * 30 | * If both `statuses` and `headers` are specified, then both conditions must 31 | * be met for the `Response` to be considered cacheable. 32 | * 33 | * @param {Object} config 34 | * @param {Array} [config.statuses] One or more status codes that a 35 | * `Response` can have and be considered cacheable. 36 | * @param {Object} [config.headers] A mapping of header names 37 | * and expected values that a `Response` can have and be considered cacheable. 38 | * If multiple headers are provided, only one needs to be present. 39 | */ 40 | constructor(config = {}) { 41 | { 42 | if (!(config.statuses || config.headers)) { 43 | throw new WorkboxError_js.WorkboxError('statuses-or-headers-required', { 44 | moduleName: 'workbox-cacheable-response', 45 | className: 'CacheableResponse', 46 | funcName: 'constructor' 47 | }); 48 | } 49 | 50 | if (config.statuses) { 51 | assert_js.assert.isArray(config.statuses, { 52 | moduleName: 'workbox-cacheable-response', 53 | className: 'CacheableResponse', 54 | funcName: 'constructor', 55 | paramName: 'config.statuses' 56 | }); 57 | } 58 | 59 | if (config.headers) { 60 | assert_js.assert.isType(config.headers, 'object', { 61 | moduleName: 'workbox-cacheable-response', 62 | className: 'CacheableResponse', 63 | funcName: 'constructor', 64 | paramName: 'config.headers' 65 | }); 66 | } 67 | } 68 | 69 | this._statuses = config.statuses; 70 | this._headers = config.headers; 71 | } 72 | /** 73 | * Checks a response to see whether it's cacheable or not, based on this 74 | * object's configuration. 75 | * 76 | * @param {Response} response The response whose cacheability is being 77 | * checked. 78 | * @return {boolean} `true` if the `Response` is cacheable, and `false` 79 | * otherwise. 80 | */ 81 | 82 | 83 | isResponseCacheable(response) { 84 | { 85 | assert_js.assert.isInstance(response, Response, { 86 | moduleName: 'workbox-cacheable-response', 87 | className: 'CacheableResponse', 88 | funcName: 'isResponseCacheable', 89 | paramName: 'response' 90 | }); 91 | } 92 | 93 | let cacheable = true; 94 | 95 | if (this._statuses) { 96 | cacheable = this._statuses.includes(response.status); 97 | } 98 | 99 | if (this._headers && cacheable) { 100 | cacheable = Object.keys(this._headers).some(headerName => { 101 | return response.headers.get(headerName) === this._headers[headerName]; 102 | }); 103 | } 104 | 105 | { 106 | if (!cacheable) { 107 | logger_js.logger.groupCollapsed(`The request for ` + `'${getFriendlyURL_js.getFriendlyURL(response.url)}' returned a response that does ` + `not meet the criteria for being cached.`); 108 | logger_js.logger.groupCollapsed(`View cacheability criteria here.`); 109 | logger_js.logger.log(`Cacheable statuses: ` + JSON.stringify(this._statuses)); 110 | logger_js.logger.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2)); 111 | logger_js.logger.groupEnd(); 112 | const logFriendlyHeaders = {}; 113 | response.headers.forEach((value, key) => { 114 | logFriendlyHeaders[key] = value; 115 | }); 116 | logger_js.logger.groupCollapsed(`View response status and headers here.`); 117 | logger_js.logger.log(`Response status: ` + response.status); 118 | logger_js.logger.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2)); 119 | logger_js.logger.groupEnd(); 120 | logger_js.logger.groupCollapsed(`View full response details here.`); 121 | logger_js.logger.log(response.headers); 122 | logger_js.logger.log(response); 123 | logger_js.logger.groupEnd(); 124 | logger_js.logger.groupEnd(); 125 | } 126 | } 127 | 128 | return cacheable; 129 | } 130 | 131 | } 132 | 133 | /* 134 | Copyright 2018 Google LLC 135 | 136 | Use of this source code is governed by an MIT-style 137 | license that can be found in the LICENSE file or at 138 | https://opensource.org/licenses/MIT. 139 | */ 140 | /** 141 | * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it 142 | * easier to add in cacheability checks to requests made via Workbox's built-in 143 | * strategies. 144 | * 145 | * @memberof module:workbox-cacheable-response 146 | */ 147 | 148 | class CacheableResponsePlugin { 149 | /** 150 | * To construct a new CacheableResponsePlugin instance you must provide at 151 | * least one of the `config` properties. 152 | * 153 | * If both `statuses` and `headers` are specified, then both conditions must 154 | * be met for the `Response` to be considered cacheable. 155 | * 156 | * @param {Object} config 157 | * @param {Array} [config.statuses] One or more status codes that a 158 | * `Response` can have and be considered cacheable. 159 | * @param {Object} [config.headers] A mapping of header names 160 | * and expected values that a `Response` can have and be considered cacheable. 161 | * If multiple headers are provided, only one needs to be present. 162 | */ 163 | constructor(config) { 164 | /** 165 | * @param {Object} options 166 | * @param {Response} options.response 167 | * @return {Response|null} 168 | * @private 169 | */ 170 | this.cacheWillUpdate = async ({ 171 | response 172 | }) => { 173 | if (this._cacheableResponse.isResponseCacheable(response)) { 174 | return response; 175 | } 176 | 177 | return null; 178 | }; 179 | 180 | this._cacheableResponse = new CacheableResponse(config); 181 | } 182 | 183 | } 184 | 185 | exports.CacheableResponse = CacheableResponse; 186 | exports.CacheableResponsePlugin = CacheableResponsePlugin; 187 | 188 | return exports; 189 | 190 | }({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); 191 | //# sourceMappingURL=workbox-cacheable-response.dev.js.map 192 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-cacheable-response.dev.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"workbox-cacheable-response.dev.js","sources":["../_version.js","../CacheableResponse.js","../CacheableResponsePlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:cacheable-response:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport './_version.js';\n/**\n * This class allows you to set up rules determining what\n * status codes and/or headers need to be present in order for a\n * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * to be considered cacheable.\n *\n * @memberof module:workbox-cacheable-response\n */\nclass CacheableResponse {\n /**\n * To construct a new CacheableResponse instance you must provide at least\n * one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.statuses || config.headers)) {\n throw new WorkboxError('statuses-or-headers-required', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n });\n }\n if (config.statuses) {\n assert.isArray(config.statuses, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.statuses',\n });\n }\n if (config.headers) {\n assert.isType(config.headers, 'object', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.headers',\n });\n }\n }\n this._statuses = config.statuses;\n this._headers = config.headers;\n }\n /**\n * Checks a response to see whether it's cacheable or not, based on this\n * object's configuration.\n *\n * @param {Response} response The response whose cacheability is being\n * checked.\n * @return {boolean} `true` if the `Response` is cacheable, and `false`\n * otherwise.\n */\n isResponseCacheable(response) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(response, Response, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'isResponseCacheable',\n paramName: 'response',\n });\n }\n let cacheable = true;\n if (this._statuses) {\n cacheable = this._statuses.includes(response.status);\n }\n if (this._headers && cacheable) {\n cacheable = Object.keys(this._headers).some((headerName) => {\n return response.headers.get(headerName) === this._headers[headerName];\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!cacheable) {\n logger.groupCollapsed(`The request for ` +\n `'${getFriendlyURL(response.url)}' returned a response that does ` +\n `not meet the criteria for being cached.`);\n logger.groupCollapsed(`View cacheability criteria here.`);\n logger.log(`Cacheable statuses: ` +\n JSON.stringify(this._statuses));\n logger.log(`Cacheable headers: ` +\n JSON.stringify(this._headers, null, 2));\n logger.groupEnd();\n const logFriendlyHeaders = {};\n response.headers.forEach((value, key) => {\n logFriendlyHeaders[key] = value;\n });\n logger.groupCollapsed(`View response status and headers here.`);\n logger.log(`Response status: ` + response.status);\n logger.log(`Response headers: ` +\n JSON.stringify(logFriendlyHeaders, null, 2));\n logger.groupEnd();\n logger.groupCollapsed(`View full response details here.`);\n logger.log(response.headers);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n }\n return cacheable;\n }\n}\nexport { CacheableResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { CacheableResponse } from './CacheableResponse.js';\nimport './_version.js';\n/**\n * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n * easier to add in cacheability checks to requests made via Workbox's built-in\n * strategies.\n *\n * @memberof module:workbox-cacheable-response\n */\nclass CacheableResponsePlugin {\n /**\n * To construct a new CacheableResponsePlugin instance you must provide at\n * least one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config) {\n /**\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n * @private\n */\n this.cacheWillUpdate = async ({ response }) => {\n if (this._cacheableResponse.isResponseCacheable(response)) {\n return response;\n }\n return null;\n };\n this._cacheableResponse = new CacheableResponse(config);\n }\n}\nexport { CacheableResponsePlugin };\n"],"names":["self","_","e","CacheableResponse","constructor","config","statuses","headers","WorkboxError","moduleName","className","funcName","assert","isArray","paramName","isType","_statuses","_headers","isResponseCacheable","response","isInstance","Response","cacheable","includes","status","Object","keys","some","headerName","get","logger","groupCollapsed","getFriendlyURL","url","log","JSON","stringify","groupEnd","logFriendlyHeaders","forEach","value","key","CacheableResponsePlugin","cacheWillUpdate","_cacheableResponse"],"mappings":";;;;IAEA,IAAI;IACAA,EAAAA,IAAI,CAAC,kCAAD,CAAJ,IAA4CC,CAAC,EAA7C;IACH,CAFD,CAGA,OAAOC,CAAP,EAAU;;ICLV;;;;;;;AAOA,IAKA;;;;;;;;;IAQA,MAAMC,iBAAN,CAAwB;IACpB;;;;;;;;;;;;;;IAcAC,EAAAA,WAAW,CAACC,MAAM,GAAG,EAAV,EAAc;IACrB,IAA2C;IACvC,UAAI,EAAEA,MAAM,CAACC,QAAP,IAAmBD,MAAM,CAACE,OAA5B,CAAJ,EAA0C;IACtC,cAAM,IAAIC,4BAAJ,CAAiB,8BAAjB,EAAiD;IACnDC,UAAAA,UAAU,EAAE,4BADuC;IAEnDC,UAAAA,SAAS,EAAE,mBAFwC;IAGnDC,UAAAA,QAAQ,EAAE;IAHyC,SAAjD,CAAN;IAKH;;IACD,UAAIN,MAAM,CAACC,QAAX,EAAqB;IACjBM,QAAAA,gBAAM,CAACC,OAAP,CAAeR,MAAM,CAACC,QAAtB,EAAgC;IAC5BG,UAAAA,UAAU,EAAE,4BADgB;IAE5BC,UAAAA,SAAS,EAAE,mBAFiB;IAG5BC,UAAAA,QAAQ,EAAE,aAHkB;IAI5BG,UAAAA,SAAS,EAAE;IAJiB,SAAhC;IAMH;;IACD,UAAIT,MAAM,CAACE,OAAX,EAAoB;IAChBK,QAAAA,gBAAM,CAACG,MAAP,CAAcV,MAAM,CAACE,OAArB,EAA8B,QAA9B,EAAwC;IACpCE,UAAAA,UAAU,EAAE,4BADwB;IAEpCC,UAAAA,SAAS,EAAE,mBAFyB;IAGpCC,UAAAA,QAAQ,EAAE,aAH0B;IAIpCG,UAAAA,SAAS,EAAE;IAJyB,SAAxC;IAMH;IACJ;;IACD,SAAKE,SAAL,GAAiBX,MAAM,CAACC,QAAxB;IACA,SAAKW,QAAL,GAAgBZ,MAAM,CAACE,OAAvB;IACH;IACD;;;;;;;;;;;IASAW,EAAAA,mBAAmB,CAACC,QAAD,EAAW;IAC1B,IAA2C;IACvCP,MAAAA,gBAAM,CAACQ,UAAP,CAAkBD,QAAlB,EAA4BE,QAA5B,EAAsC;IAClCZ,QAAAA,UAAU,EAAE,4BADsB;IAElCC,QAAAA,SAAS,EAAE,mBAFuB;IAGlCC,QAAAA,QAAQ,EAAE,qBAHwB;IAIlCG,QAAAA,SAAS,EAAE;IAJuB,OAAtC;IAMH;;IACD,QAAIQ,SAAS,GAAG,IAAhB;;IACA,QAAI,KAAKN,SAAT,EAAoB;IAChBM,MAAAA,SAAS,GAAG,KAAKN,SAAL,CAAeO,QAAf,CAAwBJ,QAAQ,CAACK,MAAjC,CAAZ;IACH;;IACD,QAAI,KAAKP,QAAL,IAAiBK,SAArB,EAAgC;IAC5BA,MAAAA,SAAS,GAAGG,MAAM,CAACC,IAAP,CAAY,KAAKT,QAAjB,EAA2BU,IAA3B,CAAiCC,UAAD,IAAgB;IACxD,eAAOT,QAAQ,CAACZ,OAAT,CAAiBsB,GAAjB,CAAqBD,UAArB,MAAqC,KAAKX,QAAL,CAAcW,UAAd,CAA5C;IACH,OAFW,CAAZ;IAGH;;IACD,IAA2C;IACvC,UAAI,CAACN,SAAL,EAAgB;IACZQ,QAAAA,gBAAM,CAACC,cAAP,CAAuB,kBAAD,GACjB,IAAGC,gCAAc,CAACb,QAAQ,CAACc,GAAV,CAAe,kCADf,GAEjB,yCAFL;IAGAH,QAAAA,gBAAM,CAACC,cAAP,CAAuB,kCAAvB;IACAD,QAAAA,gBAAM,CAACI,GAAP,CAAY,sBAAD,GACPC,IAAI,CAACC,SAAL,CAAe,KAAKpB,SAApB,CADJ;IAEAc,QAAAA,gBAAM,CAACI,GAAP,CAAY,qBAAD,GACPC,IAAI,CAACC,SAAL,CAAe,KAAKnB,QAApB,EAA8B,IAA9B,EAAoC,CAApC,CADJ;IAEAa,QAAAA,gBAAM,CAACO,QAAP;IACA,cAAMC,kBAAkB,GAAG,EAA3B;IACAnB,QAAAA,QAAQ,CAACZ,OAAT,CAAiBgC,OAAjB,CAAyB,CAACC,KAAD,EAAQC,GAAR,KAAgB;IACrCH,UAAAA,kBAAkB,CAACG,GAAD,CAAlB,GAA0BD,KAA1B;IACH,SAFD;IAGAV,QAAAA,gBAAM,CAACC,cAAP,CAAuB,wCAAvB;IACAD,QAAAA,gBAAM,CAACI,GAAP,CAAY,mBAAD,GAAsBf,QAAQ,CAACK,MAA1C;IACAM,QAAAA,gBAAM,CAACI,GAAP,CAAY,oBAAD,GACPC,IAAI,CAACC,SAAL,CAAeE,kBAAf,EAAmC,IAAnC,EAAyC,CAAzC,CADJ;IAEAR,QAAAA,gBAAM,CAACO,QAAP;IACAP,QAAAA,gBAAM,CAACC,cAAP,CAAuB,kCAAvB;IACAD,QAAAA,gBAAM,CAACI,GAAP,CAAWf,QAAQ,CAACZ,OAApB;IACAuB,QAAAA,gBAAM,CAACI,GAAP,CAAWf,QAAX;IACAW,QAAAA,gBAAM,CAACO,QAAP;IACAP,QAAAA,gBAAM,CAACO,QAAP;IACH;IACJ;;IACD,WAAOf,SAAP;IACH;;IAnGmB;;ICpBxB;;;;;;;AAOA,IAEA;;;;;;;;IAOA,MAAMoB,uBAAN,CAA8B;IAC1B;;;;;;;;;;;;;;IAcAtC,EAAAA,WAAW,CAACC,MAAD,EAAS;IAChB;;;;;;IAMA,SAAKsC,eAAL,GAAuB,OAAO;IAAExB,MAAAA;IAAF,KAAP,KAAwB;IAC3C,UAAI,KAAKyB,kBAAL,CAAwB1B,mBAAxB,CAA4CC,QAA5C,CAAJ,EAA2D;IACvD,eAAOA,QAAP;IACH;;IACD,aAAO,IAAP;IACH,KALD;;IAMA,SAAKyB,kBAAL,GAA0B,IAAIzC,iBAAJ,CAAsBE,MAAtB,CAA1B;IACH;;IA7ByB;;;;;;;;;;;"} -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-cacheable-response.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(s){"use strict";try{self["workbox:cacheable-response:5.1.4"]&&_()}catch(s){}class t{constructor(s={}){this.s=s.statuses,this.t=s.headers}isResponseCacheable(s){let t=!0;return this.s&&(t=this.s.includes(s.status)),this.t&&t&&(t=Object.keys(this.t).some(t=>s.headers.get(t)===this.t[t])),t}}return s.CacheableResponse=t,s.CacheableResponsePlugin=class{constructor(s){this.cacheWillUpdate=async({response:s})=>this.i.isResponseCacheable(s)?s:null,this.i=new t(s)}},s}({}); 2 | //# sourceMappingURL=workbox-cacheable-response.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-cacheable-response.prod.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"workbox-cacheable-response.prod.js","sources":["../_version.js","../CacheableResponse.js","../CacheableResponsePlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:cacheable-response:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport './_version.js';\n/**\n * This class allows you to set up rules determining what\n * status codes and/or headers need to be present in order for a\n * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * to be considered cacheable.\n *\n * @memberof module:workbox-cacheable-response\n */\nclass CacheableResponse {\n /**\n * To construct a new CacheableResponse instance you must provide at least\n * one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.statuses || config.headers)) {\n throw new WorkboxError('statuses-or-headers-required', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n });\n }\n if (config.statuses) {\n assert.isArray(config.statuses, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.statuses',\n });\n }\n if (config.headers) {\n assert.isType(config.headers, 'object', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.headers',\n });\n }\n }\n this._statuses = config.statuses;\n this._headers = config.headers;\n }\n /**\n * Checks a response to see whether it's cacheable or not, based on this\n * object's configuration.\n *\n * @param {Response} response The response whose cacheability is being\n * checked.\n * @return {boolean} `true` if the `Response` is cacheable, and `false`\n * otherwise.\n */\n isResponseCacheable(response) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(response, Response, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'isResponseCacheable',\n paramName: 'response',\n });\n }\n let cacheable = true;\n if (this._statuses) {\n cacheable = this._statuses.includes(response.status);\n }\n if (this._headers && cacheable) {\n cacheable = Object.keys(this._headers).some((headerName) => {\n return response.headers.get(headerName) === this._headers[headerName];\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!cacheable) {\n logger.groupCollapsed(`The request for ` +\n `'${getFriendlyURL(response.url)}' returned a response that does ` +\n `not meet the criteria for being cached.`);\n logger.groupCollapsed(`View cacheability criteria here.`);\n logger.log(`Cacheable statuses: ` +\n JSON.stringify(this._statuses));\n logger.log(`Cacheable headers: ` +\n JSON.stringify(this._headers, null, 2));\n logger.groupEnd();\n const logFriendlyHeaders = {};\n response.headers.forEach((value, key) => {\n logFriendlyHeaders[key] = value;\n });\n logger.groupCollapsed(`View response status and headers here.`);\n logger.log(`Response status: ` + response.status);\n logger.log(`Response headers: ` +\n JSON.stringify(logFriendlyHeaders, null, 2));\n logger.groupEnd();\n logger.groupCollapsed(`View full response details here.`);\n logger.log(response.headers);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n }\n return cacheable;\n }\n}\nexport { CacheableResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { CacheableResponse } from './CacheableResponse.js';\nimport './_version.js';\n/**\n * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n * easier to add in cacheability checks to requests made via Workbox's built-in\n * strategies.\n *\n * @memberof module:workbox-cacheable-response\n */\nclass CacheableResponsePlugin {\n /**\n * To construct a new CacheableResponsePlugin instance you must provide at\n * least one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config) {\n /**\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n * @private\n */\n this.cacheWillUpdate = async ({ response }) => {\n if (this._cacheableResponse.isResponseCacheable(response)) {\n return response;\n }\n return null;\n };\n this._cacheableResponse = new CacheableResponse(config);\n }\n}\nexport { CacheableResponsePlugin };\n"],"names":["self","_","e","CacheableResponse","constructor","config","_statuses","statuses","_headers","headers","isResponseCacheable","response","cacheable","this","includes","status","Object","keys","some","headerName","get","cacheWillUpdate","async","_cacheableResponse"],"mappings":"sFAEA,IACIA,KAAK,qCAAuCC,IAEhD,MAAOC,ICeP,MAAMC,EAeFC,YAAYC,EAAS,SA0BZC,EAAYD,EAAOE,cACnBC,EAAWH,EAAOI,QAW3BC,oBAAoBC,OASZC,GAAY,SACZC,KAAKP,IACLM,EAAYC,KAAKP,EAAUQ,SAASH,EAASI,SAE7CF,KAAKL,GAAYI,IACjBA,EAAYI,OAAOC,KAAKJ,KAAKL,GAAUU,KAAMC,GAClCR,EAASF,QAAQW,IAAID,KAAgBN,KAAKL,EAASW,KA8B3DP,0DCtGf,MAeIR,YAAYC,QAOHgB,gBAAkBC,OAASX,SAAAA,KACxBE,KAAKU,EAAmBb,oBAAoBC,GACrCA,EAEJ,UAENY,EAAqB,IAAIpB,EAAkBE"} -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-core.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.core=function(e){"use strict";try{self["workbox:core:5.1.4"]&&_()}catch(e){}const t=(e,...t)=>{let n=e;return t.length>0&&(n+=" :: "+JSON.stringify(t)),n};class n extends Error{constructor(e,n){super(t(e,n)),this.name=e,this.details=n}}const s=new Set;const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},i=e=>[r.prefix,e,r.suffix].filter(e=>e&&e.length>0).join("-"),o={updateDetails:e=>{(e=>{for(const t of Object.keys(r))e(t)})(t=>{"string"==typeof e[t]&&(r[t]=e[t])})},getGoogleAnalyticsName:e=>e||i(r.googleAnalytics),getPrecacheName:e=>e||i(r.precache),getPrefix:()=>r.prefix,getRuntimeName:e=>e||i(r.runtime),getSuffix:()=>r.suffix};async function a(){for(const e of s)await e()}const c=e=>new URL(String(e),location.href).href.replace(new RegExp("^"+location.origin),""),u=(e,t)=>e.filter(e=>t in e),l=async({request:e,mode:t,plugins:n=[]})=>{const s=u(n,"cacheKeyWillBeUsed");let r=e;for(const e of s)r=await e.cacheKeyWillBeUsed.call(e,{mode:t,request:r}),"string"==typeof r&&(r=new Request(r));return r},f=async({cacheName:e,request:t,event:n,matchOptions:s,plugins:r=[]})=>{const i=await self.caches.open(e),o=await l({plugins:r,request:t,mode:"read"});let a=await i.match(o,s);for(const t of r)if("cachedResponseWillBeUsed"in t){const r=t.cachedResponseWillBeUsed;a=await r.call(t,{cacheName:e,event:n,matchOptions:s,cachedResponse:a,request:o})}return a},h={put:async({cacheName:e,request:t,response:s,event:r,plugins:i=[],matchOptions:o})=>{const h=await l({plugins:i,request:t,mode:"write"});if(!s)throw new n("cache-put-with-no-response",{url:c(h.url)});const w=await(async({request:e,response:t,event:n,plugins:s=[]})=>{let r=t,i=!1;for(const t of s)if("cacheWillUpdate"in t){i=!0;const s=t.cacheWillUpdate;if(r=await s.call(t,{request:e,response:r,event:n}),!r)break}return i||(r=r&&200===r.status?r:void 0),r||null})({event:r,plugins:i,response:s,request:h});if(!w)return;const p=await self.caches.open(e),d=u(i,"cacheDidUpdate"),g=d.length>0?await f({cacheName:e,matchOptions:o,request:h}):null;try{await p.put(h,w)}catch(e){throw"QuotaExceededError"===e.name&&await a(),e}for(const t of d)await t.cacheDidUpdate.call(t,{cacheName:e,event:r,oldResponse:g,newResponse:w,request:h})},match:f};let w,p;function d(){if(void 0===p){const e=new Response("");if("body"in e)try{new Response(e.body),p=!0}catch(e){p=!1}p=!1}return p}class g{constructor(e,t,{onupgradeneeded:n,onversionchange:s}={}){this.t=null,this.s=e,this.i=t,this.o=n,this.u=s||(()=>this.close())}get db(){return this.t}async open(){if(!this.t)return this.t=await new Promise((e,t)=>{let n=!1;setTimeout(()=>{n=!0,t(new Error("The open request was blocked and timed out"))},this.OPEN_TIMEOUT);const s=indexedDB.open(this.s,this.i);s.onerror=()=>t(s.error),s.onupgradeneeded=e=>{n?(s.transaction.abort(),s.result.close()):"function"==typeof this.o&&this.o(e)},s.onsuccess=()=>{const t=s.result;n?t.close():(t.onversionchange=this.u.bind(this),e(t))}}),this}async getKey(e,t){return(await this.getAllKeys(e,t,1))[0]}async getAll(e,t,n){return await this.getAllMatching(e,{query:t,count:n})}async getAllKeys(e,t,n){return(await this.getAllMatching(e,{query:t,count:n,includeKeys:!0})).map(e=>e.key)}async getAllMatching(e,{index:t,query:n=null,direction:s="next",count:r,includeKeys:i=!1}={}){return await this.transaction([e],"readonly",(o,a)=>{const c=o.objectStore(e),u=t?c.index(t):c,l=[],f=u.openCursor(n,s);f.onsuccess=()=>{const e=f.result;e?(l.push(i?e:e.value),r&&l.length>=r?a(l):e.continue()):a(l)}})}async transaction(e,t,n){return await this.open(),await new Promise((s,r)=>{const i=this.t.transaction(e,t);i.onabort=()=>r(i.error),i.oncomplete=()=>s(),n(i,e=>s(e))})}async l(e,t,n,...s){return await this.transaction([t],n,(n,r)=>{const i=n.objectStore(t),o=i[e].apply(i,s);o.onsuccess=()=>r(o.result)})}close(){this.t&&(this.t.close(),this.t=null)}}g.prototype.OPEN_TIMEOUT=2e3;const y={readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]};for(const[e,t]of Object.entries(y))for(const n of t)n in IDBObjectStore.prototype&&(g.prototype[n]=async function(t,...s){return await this.l(n,t,e,...s)});const m={fetch:async({request:e,fetchOptions:t,event:s,plugins:r=[]})=>{if("string"==typeof e&&(e=new Request(e)),s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const i=u(r,"fetchDidFail"),o=i.length>0?e.clone():null;try{for(const t of r)if("requestWillFetch"in t){const n=t.requestWillFetch,r=e.clone();e=await n.call(t,{request:r,event:s})}}catch(e){throw new n("plugin-error-request-will-fetch",{thrownError:e})}const a=e.clone();try{let n;n="navigate"===e.mode?await fetch(e):await fetch(e,t);for(const e of r)"fetchDidSucceed"in e&&(n=await e.fetchDidSucceed.call(e,{event:s,request:a,response:n}));return n}catch(e){for(const t of i)await t.fetchDidFail.call(t,{error:e,event:s,originalRequest:o.clone(),request:a.clone()});throw e}}};function q(e){return new Promise(t=>setTimeout(t,e))}var v=Object.freeze({__proto__:null,assert:null,cacheNames:o,cacheWrapper:h,canConstructReadableStream:function(){if(void 0===w)try{new ReadableStream({start(){}}),w=!0}catch(e){w=!1}return w},canConstructResponseFromBodyStream:d,dontWaitFor:function(e){e.then(()=>{})},DBWrapper:g,Deferred:class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},deleteDatabase:async e=>{await new Promise((t,n)=>{const s=indexedDB.deleteDatabase(e);s.onerror=()=>{n(s.error)},s.onblocked=()=>{n(new Error("Delete blocked"))},s.onsuccess=()=>{t()}})},executeQuotaErrorCallbacks:a,fetchWrapper:m,getFriendlyURL:c,logger:null,resultingClientExists:async function(e){if(!e)return;let t=await self.clients.matchAll({type:"window"});const n=new Set(t.map(e=>e.id));let s;const r=performance.now();for(;performance.now()-r<2e3&&(t=await self.clients.matchAll({type:"window"}),s=t.find(t=>e?t.id===e:!n.has(t.id)),!s);)await q(100);return s},timeout:q,WorkboxError:n});const x={get googleAnalytics(){return o.getGoogleAnalyticsName()},get precache(){return o.getPrecacheName()},get prefix(){return o.getPrefix()},get runtime(){return o.getRuntimeName()},get suffix(){return o.getSuffix()}};return e._private=v,e.cacheNames=x,e.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},e.copyResponse=async function(e,t){const n=e.clone(),s={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=t?t(s):s,i=d()?n.body:await n.blob();return new Response(i,r)},e.registerQuotaErrorCallback=function(e){s.add(e)},e.setCacheNameDetails=function(e){o.updateDetails(e)},e.skipWaiting=function(){self.addEventListener("install",()=>self.skipWaiting())},e}({}); 2 | //# sourceMappingURL=workbox-core.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-expiration.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.expiration=function(t,e,s,i,a,n,h){"use strict";try{self["workbox:expiration:5.1.4"]&&_()}catch(t){}const r=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class c{constructor(t){this.t=t,this.s=new i.DBWrapper("workbox-expiration",1,{onupgradeneeded:t=>this.i(t)})}i(t){const e=t.target.result.createObjectStore("cache-entries",{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1}),a.deleteDatabase(this.t)}async setTimestamp(t,e){const s={url:t=r(t),timestamp:e,cacheName:this.t,id:this.h(t)};await this.s.put("cache-entries",s)}async getTimestamp(t){return(await this.s.get("cache-entries",this.h(t))).timestamp}async expireEntries(t,e){const s=await this.s.transaction("cache-entries","readwrite",(s,i)=>{const a=s.objectStore("cache-entries").index("timestamp").openCursor(null,"prev"),n=[];let h=0;a.onsuccess=()=>{const s=a.result;if(s){const i=s.value;i.cacheName===this.t&&(t&&i.timestamp=e?n.push(s.value):h++),s.continue()}else i(n)}}),i=[];for(const t of s)await this.s.delete("cache-entries",t.id),i.push(t.url);return i}h(t){return this.t+"|"+r(t)}}class o{constructor(t,e={}){this.o=!1,this.u=!1,this.l=e.maxEntries,this.m=e.maxAgeSeconds,this.t=t,this.p=new c(t)}async expireEntries(){if(this.o)return void(this.u=!0);this.o=!0;const t=this.m?Date.now()-1e3*this.m:0,s=await this.p.expireEntries(t,this.l),i=await self.caches.open(this.t);for(const t of s)await i.delete(t);this.o=!1,this.u&&(this.u=!1,e.dontWaitFor(this.expireEntries()))}async updateTimestamp(t){await this.p.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.m){return await this.p.getTimestamp(t){if(!a)return null;const n=this.k(a),h=this.D(i);e.dontWaitFor(h.expireEntries());const r=h.updateTimestamp(s.url);if(t)try{t.waitUntil(r)}catch(t){}return n?a:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.D(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.N=t,this.m=t.maxAgeSeconds,this.g=new Map,t.purgeOnQuotaError&&h.registerQuotaErrorCallback(()=>this.deleteCacheAndMetadata())}D(t){if(t===n.cacheNames.getRuntimeName())throw new s.WorkboxError("expire-custom-caches-only");let e=this.g.get(t);return e||(e=new o(t,this.N),this.g.set(t,e)),e}k(t){if(!this.m)return!0;const e=this._(t);if(null===e)return!0;return e>=Date.now()-1e3*this.m}_(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.g)await self.caches.delete(t),await e.delete();this.g=new Map}},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core); 2 | //# sourceMappingURL=workbox-expiration.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-navigation-preload.dev.js: -------------------------------------------------------------------------------- 1 | this.workbox = this.workbox || {}; 2 | this.workbox.navigationPreload = (function (exports, logger_js) { 3 | 'use strict'; 4 | 5 | try { 6 | self['workbox:navigation-preload:5.1.4'] && _(); 7 | } catch (e) {} 8 | 9 | /* 10 | Copyright 2018 Google LLC 11 | 12 | Use of this source code is governed by an MIT-style 13 | license that can be found in the LICENSE file or at 14 | https://opensource.org/licenses/MIT. 15 | */ 16 | /** 17 | * @return {boolean} Whether or not the current browser supports enabling 18 | * navigation preload. 19 | * 20 | * @memberof module:workbox-navigation-preload 21 | */ 22 | 23 | function isSupported() { 24 | return Boolean(self.registration && self.registration.navigationPreload); 25 | } 26 | 27 | /* 28 | Copyright 2018 Google LLC 29 | 30 | Use of this source code is governed by an MIT-style 31 | license that can be found in the LICENSE file or at 32 | https://opensource.org/licenses/MIT. 33 | */ 34 | /** 35 | * If the browser supports Navigation Preload, then this will disable it. 36 | * 37 | * @memberof module:workbox-navigation-preload 38 | */ 39 | 40 | function disable() { 41 | if (isSupported()) { 42 | self.addEventListener('activate', event => { 43 | event.waitUntil(self.registration.navigationPreload.disable().then(() => { 44 | { 45 | logger_js.logger.log(`Navigation preload is disabled.`); 46 | } 47 | })); 48 | }); 49 | } else { 50 | { 51 | logger_js.logger.log(`Navigation preload is not supported in this browser.`); 52 | } 53 | } 54 | } 55 | 56 | /* 57 | Copyright 2018 Google LLC 58 | 59 | Use of this source code is governed by an MIT-style 60 | license that can be found in the LICENSE file or at 61 | https://opensource.org/licenses/MIT. 62 | */ 63 | /** 64 | * If the browser supports Navigation Preload, then this will enable it. 65 | * 66 | * @param {string} [headerValue] Optionally, allows developers to 67 | * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header) 68 | * the value of the `Service-Worker-Navigation-Preload` header which will be 69 | * sent to the server when making the navigation request. 70 | * 71 | * @memberof module:workbox-navigation-preload 72 | */ 73 | 74 | function enable(headerValue) { 75 | if (isSupported()) { 76 | self.addEventListener('activate', event => { 77 | event.waitUntil(self.registration.navigationPreload.enable().then(() => { 78 | // Defaults to Service-Worker-Navigation-Preload: true if not set. 79 | if (headerValue) { 80 | self.registration.navigationPreload.setHeaderValue(headerValue); 81 | } 82 | 83 | { 84 | logger_js.logger.log(`Navigation preload is enabled.`); 85 | } 86 | })); 87 | }); 88 | } else { 89 | { 90 | logger_js.logger.log(`Navigation preload is not supported in this browser.`); 91 | } 92 | } 93 | } 94 | 95 | exports.disable = disable; 96 | exports.enable = enable; 97 | exports.isSupported = isSupported; 98 | 99 | return exports; 100 | 101 | }({}, workbox.core._private)); 102 | //# sourceMappingURL=workbox-navigation-preload.dev.js.map 103 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-navigation-preload.dev.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"workbox-navigation-preload.dev.js","sources":["../_version.js","../isSupported.js","../disable.js","../enable.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:navigation-preload:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof module:workbox-navigation-preload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof module:workbox-navigation-preload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { disable };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof module:workbox-navigation-preload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { enable };\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","disable","addEventListener","event","waitUntil","then","logger","log","enable","headerValue","setHeaderValue"],"mappings":";;;;IAEA,IAAI;IACAA,EAAAA,IAAI,CAAC,kCAAD,CAAJ,IAA4CC,CAAC,EAA7C;IACH,CAFD,CAGA,OAAOC,CAAP,EAAU;;ICLV;;;;;;;AAOA,IACA;;;;;;;IAMA,SAASC,WAAT,GAAuB;IACnB,SAAOC,OAAO,CAACJ,IAAI,CAACK,YAAL,IAAqBL,IAAI,CAACK,YAAL,CAAkBC,iBAAxC,CAAd;IACH;;IChBD;;;;;;;AAOA,IAGA;;;;;;IAKA,SAASC,OAAT,GAAmB;IACf,MAAIJ,WAAW,EAAf,EAAmB;IACfH,IAAAA,IAAI,CAACQ,gBAAL,CAAsB,UAAtB,EAAmCC,KAAD,IAAW;IACzCA,MAAAA,KAAK,CAACC,SAAN,CAAgBV,IAAI,CAACK,YAAL,CAAkBC,iBAAlB,CAAoCC,OAApC,GAA8CI,IAA9C,CAAmD,MAAM;IACrE,QAA2C;IACvCC,UAAAA,gBAAM,CAACC,GAAP,CAAY,iCAAZ;IACH;IACJ,OAJe,CAAhB;IAKH,KAND;IAOH,GARD,MASK;IACD,IAA2C;IACvCD,MAAAA,gBAAM,CAACC,GAAP,CAAY,sDAAZ;IACH;IACJ;IACJ;;IC9BD;;;;;;;AAOA,IAGA;;;;;;;;;;;IAUA,SAASC,MAAT,CAAgBC,WAAhB,EAA6B;IACzB,MAAIZ,WAAW,EAAf,EAAmB;IACfH,IAAAA,IAAI,CAACQ,gBAAL,CAAsB,UAAtB,EAAmCC,KAAD,IAAW;IACzCA,MAAAA,KAAK,CAACC,SAAN,CAAgBV,IAAI,CAACK,YAAL,CAAkBC,iBAAlB,CAAoCQ,MAApC,GAA6CH,IAA7C,CAAkD,MAAM;IACpE;IACA,YAAII,WAAJ,EAAiB;IACbf,UAAAA,IAAI,CAACK,YAAL,CAAkBC,iBAAlB,CAAoCU,cAApC,CAAmDD,WAAnD;IACH;;IACD,QAA2C;IACvCH,UAAAA,gBAAM,CAACC,GAAP,CAAY,gCAAZ;IACH;IACJ,OARe,CAAhB;IASH,KAVD;IAWH,GAZD,MAaK;IACD,IAA2C;IACvCD,MAAAA,gBAAM,CAACC,GAAP,CAAY,sDAAZ;IACH;IACJ;IACJ;;;;;;;;;;;;"} -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-navigation-preload.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:5.1.4"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",t=>{t.waitUntil(self.registration.navigationPreload.disable().then(()=>{}))})},t.enable=function(t){e()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{t&&self.registration.navigationPreload.setHeaderValue(t)}))})},t.isSupported=e,t}({}); 2 | //# sourceMappingURL=workbox-navigation-preload.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-navigation-preload.prod.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"workbox-navigation-preload.prod.js","sources":["../_version.js","../isSupported.js","../disable.js","../enable.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:navigation-preload:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof module:workbox-navigation-preload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof module:workbox-navigation-preload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { disable };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof module:workbox-navigation-preload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { enable };\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","addEventListener","event","waitUntil","disable","then","headerValue","enable","setHeaderValue"],"mappings":"sFAEA,IACIA,KAAK,qCAAuCC,IAEhD,MAAOC,ICSP,SAASC,WACEC,QAAQJ,KAAKK,cAAgBL,KAAKK,aAAaC,oCCA1D,WACQH,KACAH,KAAKO,iBAAiB,WAAaC,IAC/BA,EAAMC,UAAUT,KAAKK,aAAaC,kBAAkBI,UAAUC,KAAK,qBCE/E,SAAgBC,GACRT,KACAH,KAAKO,iBAAiB,WAAaC,IAC/BA,EAAMC,UAAUT,KAAKK,aAAaC,kBAAkBO,SAASF,KAAK,KAE1DC,GACAZ,KAAKK,aAAaC,kBAAkBQ,eAAeF"} -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-offline-ga.dev.js: -------------------------------------------------------------------------------- 1 | this.workbox = this.workbox || {}; 2 | this.workbox.googleAnalytics = (function (exports, BackgroundSyncPlugin_js, cacheNames_js, getFriendlyURL_js, logger_js, Route_js, Router_js, NetworkFirst_js, NetworkOnly_js) { 3 | 'use strict'; 4 | 5 | try { 6 | self['workbox:google-analytics:5.1.4'] && _(); 7 | } catch (e) {} 8 | 9 | /* 10 | Copyright 2018 Google LLC 11 | 12 | Use of this source code is governed by an MIT-style 13 | license that can be found in the LICENSE file or at 14 | https://opensource.org/licenses/MIT. 15 | */ 16 | const QUEUE_NAME = 'workbox-google-analytics'; 17 | const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes 18 | 19 | const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com'; 20 | const GTM_HOST = 'www.googletagmanager.com'; 21 | const ANALYTICS_JS_PATH = '/analytics.js'; 22 | const GTAG_JS_PATH = '/gtag/js'; 23 | const GTM_JS_PATH = '/gtm.js'; 24 | // endpoints. Most of the time the default path (/collect) is used, but 25 | // occasionally an experimental endpoint is used when testing new features, 26 | // (e.g. /r/collect or /j/collect) 27 | 28 | const COLLECT_PATHS_REGEX = /^\/(\w+\/)?collect/; 29 | 30 | /* 31 | Copyright 2018 Google LLC 32 | 33 | Use of this source code is governed by an MIT-style 34 | license that can be found in the LICENSE file or at 35 | https://opensource.org/licenses/MIT. 36 | */ 37 | /** 38 | * Creates the requestWillDequeue callback to be used with the background 39 | * sync plugin. The callback takes the failed request and adds the 40 | * `qt` param based on the current time, as well as applies any other 41 | * user-defined hit modifications. 42 | * 43 | * @param {Object} config See {@link module:workbox-google-analytics.initialize}. 44 | * @return {Function} The requestWillDequeue callback function. 45 | * 46 | * @private 47 | */ 48 | 49 | const createOnSyncCallback = config => { 50 | return async ({ 51 | queue 52 | }) => { 53 | let entry; 54 | 55 | while (entry = await queue.shiftRequest()) { 56 | const { 57 | request, 58 | timestamp 59 | } = entry; 60 | const url = new URL(request.url); 61 | 62 | try { 63 | // Measurement protocol requests can set their payload parameters in 64 | // either the URL query string (for GET requests) or the POST body. 65 | const params = request.method === 'POST' ? new URLSearchParams(await request.clone().text()) : url.searchParams; // Calculate the qt param, accounting for the fact that an existing 66 | // qt param may be present and should be updated rather than replaced. 67 | 68 | const originalHitTime = timestamp - (Number(params.get('qt')) || 0); 69 | const queueTime = Date.now() - originalHitTime; // Set the qt param prior to applying hitFilter or parameterOverrides. 70 | 71 | params.set('qt', String(queueTime)); // Apply `parameterOverrides`, if set. 72 | 73 | if (config.parameterOverrides) { 74 | for (const param of Object.keys(config.parameterOverrides)) { 75 | const value = config.parameterOverrides[param]; 76 | params.set(param, value); 77 | } 78 | } // Apply `hitFilter`, if set. 79 | 80 | 81 | if (typeof config.hitFilter === 'function') { 82 | config.hitFilter.call(null, params); 83 | } // Retry the fetch. Ignore URL search params from the URL as they're 84 | // now in the post body. 85 | 86 | 87 | await fetch(new Request(url.origin + url.pathname, { 88 | body: params.toString(), 89 | method: 'POST', 90 | mode: 'cors', 91 | credentials: 'omit', 92 | headers: { 93 | 'Content-Type': 'text/plain' 94 | } 95 | })); 96 | 97 | if ("dev" !== 'production') { 98 | logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(url.href)}'` + `has been replayed`); 99 | } 100 | } catch (err) { 101 | await queue.unshiftRequest(entry); 102 | 103 | { 104 | logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(url.href)}'` + `failed to replay, putting it back in the queue.`); 105 | } 106 | 107 | throw err; 108 | } 109 | } 110 | 111 | { 112 | logger_js.logger.log(`All Google Analytics request successfully replayed; ` + `the queue is now empty!`); 113 | } 114 | }; 115 | }; 116 | /** 117 | * Creates GET and POST routes to catch failed Measurement Protocol hits. 118 | * 119 | * @param {BackgroundSyncPlugin} bgSyncPlugin 120 | * @return {Array} The created routes. 121 | * 122 | * @private 123 | */ 124 | 125 | 126 | const createCollectRoutes = bgSyncPlugin => { 127 | const match = ({ 128 | url 129 | }) => url.hostname === GOOGLE_ANALYTICS_HOST && COLLECT_PATHS_REGEX.test(url.pathname); 130 | 131 | const handler = new NetworkOnly_js.NetworkOnly({ 132 | plugins: [bgSyncPlugin] 133 | }); 134 | return [new Route_js.Route(match, handler, 'GET'), new Route_js.Route(match, handler, 'POST')]; 135 | }; 136 | /** 137 | * Creates a route with a network first strategy for the analytics.js script. 138 | * 139 | * @param {string} cacheName 140 | * @return {Route} The created route. 141 | * 142 | * @private 143 | */ 144 | 145 | 146 | const createAnalyticsJsRoute = cacheName => { 147 | const match = ({ 148 | url 149 | }) => url.hostname === GOOGLE_ANALYTICS_HOST && url.pathname === ANALYTICS_JS_PATH; 150 | 151 | const handler = new NetworkFirst_js.NetworkFirst({ 152 | cacheName 153 | }); 154 | return new Route_js.Route(match, handler, 'GET'); 155 | }; 156 | /** 157 | * Creates a route with a network first strategy for the gtag.js script. 158 | * 159 | * @param {string} cacheName 160 | * @return {Route} The created route. 161 | * 162 | * @private 163 | */ 164 | 165 | 166 | const createGtagJsRoute = cacheName => { 167 | const match = ({ 168 | url 169 | }) => url.hostname === GTM_HOST && url.pathname === GTAG_JS_PATH; 170 | 171 | const handler = new NetworkFirst_js.NetworkFirst({ 172 | cacheName 173 | }); 174 | return new Route_js.Route(match, handler, 'GET'); 175 | }; 176 | /** 177 | * Creates a route with a network first strategy for the gtm.js script. 178 | * 179 | * @param {string} cacheName 180 | * @return {Route} The created route. 181 | * 182 | * @private 183 | */ 184 | 185 | 186 | const createGtmJsRoute = cacheName => { 187 | const match = ({ 188 | url 189 | }) => url.hostname === GTM_HOST && url.pathname === GTM_JS_PATH; 190 | 191 | const handler = new NetworkFirst_js.NetworkFirst({ 192 | cacheName 193 | }); 194 | return new Route_js.Route(match, handler, 'GET'); 195 | }; 196 | /** 197 | * @param {Object=} [options] 198 | * @param {Object} [options.cacheName] The cache name to store and retrieve 199 | * analytics.js. Defaults to the cache names provided by `workbox-core`. 200 | * @param {Object} [options.parameterOverrides] 201 | * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters), 202 | * expressed as key/value pairs, to be added to replayed Google Analytics 203 | * requests. This can be used to, e.g., set a custom dimension indicating 204 | * that the request was replayed. 205 | * @param {Function} [options.hitFilter] A function that allows you to modify 206 | * the hit parameters prior to replaying 207 | * the hit. The function is invoked with the original hit's URLSearchParams 208 | * object as its only argument. 209 | * 210 | * @memberof module:workbox-google-analytics 211 | */ 212 | 213 | 214 | const initialize = (options = {}) => { 215 | const cacheName = cacheNames_js.cacheNames.getGoogleAnalyticsName(options.cacheName); 216 | const bgSyncPlugin = new BackgroundSyncPlugin_js.BackgroundSyncPlugin(QUEUE_NAME, { 217 | maxRetentionTime: MAX_RETENTION_TIME, 218 | onSync: createOnSyncCallback(options) 219 | }); 220 | const routes = [createGtmJsRoute(cacheName), createAnalyticsJsRoute(cacheName), createGtagJsRoute(cacheName), ...createCollectRoutes(bgSyncPlugin)]; 221 | const router = new Router_js.Router(); 222 | 223 | for (const route of routes) { 224 | router.registerRoute(route); 225 | } 226 | 227 | router.addFetchListener(); 228 | }; 229 | 230 | exports.initialize = initialize; 231 | 232 | return exports; 233 | 234 | }({}, workbox.backgroundSync, workbox.core._private, workbox.core._private, workbox.core._private, workbox.routing, workbox.routing, workbox.strategies, workbox.strategies)); 235 | //# sourceMappingURL=workbox-offline-ga.dev.js.map 236 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-offline-ga.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(t,o,e,n,a,c,r,w,s){"use strict";try{self["workbox:google-analytics:5.1.4"]&&_()}catch(t){}const i=/^\/(\w+\/)?collect/,l=t=>{const o=({url:t})=>"www.google-analytics.com"===t.hostname&&i.test(t.pathname),e=new s.NetworkOnly({plugins:[t]});return[new c.Route(o,e,"GET"),new c.Route(o,e,"POST")]},g=t=>{const o=new w.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.google-analytics.com"===t.hostname&&"/analytics.js"===t.pathname,o,"GET")},m=t=>{const o=new w.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.googletagmanager.com"===t.hostname&&"/gtag/js"===t.pathname,o,"GET")},u=t=>{const o=new w.NetworkFirst({cacheName:t});return new c.Route(({url:t})=>"www.googletagmanager.com"===t.hostname&&"/gtm.js"===t.pathname,o,"GET")};return t.initialize=(t={})=>{const n=e.cacheNames.getGoogleAnalyticsName(t.cacheName),a=new o.BackgroundSyncPlugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:(c=t,async({queue:t})=>{let o;for(;o=await t.shiftRequest();){const{request:e,timestamp:n}=o,a=new URL(e.url);try{const t="POST"===e.method?new URLSearchParams(await e.clone().text()):a.searchParams,o=n-(Number(t.get("qt"))||0),r=Date.now()-o;if(t.set("qt",String(r)),c.parameterOverrides)for(const o of Object.keys(c.parameterOverrides)){const e=c.parameterOverrides[o];t.set(o,e)}"function"==typeof c.hitFilter&&c.hitFilter.call(null,t),await fetch(new Request(a.origin+a.pathname,{body:t.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(e){throw await t.unshiftRequest(o),e}}})});var c;const w=[u(n),g(n),m(n),...l(a)],s=new r.Router;for(const t of w)s.registerRoute(t);s.addFetchListener()},t}({},workbox.backgroundSync,workbox.core._private,workbox.core._private,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies); 2 | //# sourceMappingURL=workbox-offline-ga.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-precaching.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.precaching=function(t,e,n,i,s,c){"use strict";try{self["workbox:precaching:5.1.4"]&&_()}catch(t){}const r=[],o={get:()=>r,add(t){r.push(...t)}};function a(t){if(!t)throw new s.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),c=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:c.href}}class h{constructor(t){this.t=e.cacheNames.getPrecacheName(t),this.i=new Map,this.s=new Map,this.o=new Map}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=a(n),c="string"!=typeof n&&n.revision?"reload":"default";if(this.i.has(i)&&this.i.get(i)!==t)throw new s.WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this.i.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.o.has(t)&&this.o.get(t)!==n.integrity)throw new s.WorkboxError("add-to-cache-list-conflicting-integrities",{url:i});this.o.set(t,n.integrity)}if(this.i.set(i,t),this.s.set(i,c),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}async install({event:t,plugins:e}={}){const n=[],i=[],s=await self.caches.open(this.t),c=await s.keys(),r=new Set(c.map(t=>t.url));for(const[t,e]of this.i)r.has(e)?i.push(t):n.push({cacheKey:e,url:t});const o=n.map(({cacheKey:n,url:i})=>{const s=this.o.get(n),c=this.s.get(i);return this.h({cacheKey:n,cacheMode:c,event:t,integrity:s,plugins:e,url:i})});await Promise.all(o);return{updatedURLs:n.map(t=>t.url),notUpdatedURLs:i}}async activate(){const t=await self.caches.open(this.t),e=await t.keys(),n=new Set(this.i.values()),i=[];for(const s of e)n.has(s.url)||(await t.delete(s),i.push(s.url));return{deletedURLs:i}}async h({cacheKey:t,url:e,cacheMode:r,event:o,plugins:a,integrity:h}){const u=new Request(e,{integrity:h,cache:r,credentials:"same-origin"});let l,f=await i.fetchWrapper.fetch({event:o,plugins:a,request:u});for(const t of a||[])"cacheWillUpdate"in t&&(l=t);if(!(l?await l.cacheWillUpdate({event:o,request:u,response:f}):f.status<400))throw new s.WorkboxError("bad-precaching-response",{url:e,status:f.status});f.redirected&&(f=await c.copyResponse(f)),await n.cacheWrapper.put({event:o,plugins:a,response:f,request:t===e?u:new Request(t),cacheName:this.t,matchOptions:{ignoreSearch:!0}})}getURLsToCacheKeys(){return this.i}getCachedURLs(){return[...this.i.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.i.get(e.href)}async matchPrecache(t){const e=t instanceof Request?t.url:t,n=this.getCacheKeyForURL(e);if(n){return(await self.caches.open(this.t)).match(n)}}createHandler(t=!0){return async({request:e})=>{try{const t=await this.matchPrecache(e);if(t)return t;throw new s.WorkboxError("missing-precache-entry",{cacheName:this.t,url:e instanceof Request?e.url:e})}catch(n){if(t)return fetch(e);throw n}}}createHandlerBoundToURL(t,e=!0){if(!this.getCacheKeyForURL(t))throw new s.WorkboxError("non-precached-url",{url:t});const n=this.createHandler(e),i=new Request(t);return()=>n({request:i})}}let u;const l=()=>(u||(u=new h),u);const f=(t,e)=>{const n=l().getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e,directoryIndex:n,cleanURLs:i,urlManipulation:s}={}){const c=new URL(t,location.href);c.hash="",yield c.href;const r=function(t,e=[]){for(const n of[...t.searchParams.keys()])e.some(t=>t.test(n))&&t.searchParams.delete(n);return t}(c,e);if(yield r.href,n&&r.pathname.endsWith("/")){const t=new URL(r.href);t.pathname+=n,yield t.href}if(i){const t=new URL(r.href);t.pathname+=".html",yield t.href}if(s){const t=s({url:c});for(const e of t)yield e.href}}(t,e)){const t=n.get(i);if(t)return t}};let w=!1;function d(t){w||((({ignoreURLParametersMatching:t=[/^utm_/],directoryIndex:n="index.html",cleanURLs:i=!0,urlManipulation:s}={})=>{const c=e.cacheNames.getPrecacheName();self.addEventListener("fetch",e=>{const r=f(e.request.url,{cleanURLs:i,directoryIndex:n,ignoreURLParametersMatching:t,urlManipulation:s});if(!r)return;let o=self.caches.open(c).then(t=>t.match(r)).then(t=>t||fetch(r));e.respondWith(o)})})(t),w=!0)}const y=t=>{const e=l(),n=o.get();t.waitUntil(e.install({event:t,plugins:n}).catch(t=>{throw t}))},p=t=>{const e=l();t.waitUntil(e.activate())};function g(t){l().addToCacheList(t),t.length>0&&(self.addEventListener("install",y),self.addEventListener("activate",p))}return t.PrecacheController=h,t.addPlugins=function(t){o.add(t)},t.addRoute=d,t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const n=e.cacheNames.getPrecacheName();t.waitUntil((async(t,e="-precache-")=>{const n=(await self.caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==t);return await Promise.all(n.map(t=>self.caches.delete(t))),n})(n).then(t=>{}))})},t.createHandler=function(t=!0){return l().createHandler(t)},t.createHandlerBoundToURL=function(t){return l().createHandlerBoundToURL(t)},t.getCacheKeyForURL=function(t){return l().getCacheKeyForURL(t)},t.matchPrecache=function(t){return l().matchPrecache(t)},t.precache=g,t.precacheAndRoute=function(t,e){g(t),d(e)},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core); 2 | //# sourceMappingURL=workbox-precaching.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-range-requests.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.rangeRequests=function(t,e,n){"use strict";try{self["workbox:range-requests:5.1.4"]&&_()}catch(t){}async function r(t,n){try{if(206===n.status)return n;const r=t.headers.get("range");if(!r)throw new e.WorkboxError("no-range-header");const s=function(t){const n=t.trim().toLowerCase();if(!n.startsWith("bytes="))throw new e.WorkboxError("unit-must-be-bytes",{normalizedRangeHeader:n});if(n.includes(","))throw new e.WorkboxError("single-range-only",{normalizedRangeHeader:n});const r=/(\d*)-(\d*)/.exec(n);if(!r||!r[1]&&!r[2])throw new e.WorkboxError("invalid-range-values",{normalizedRangeHeader:n});return{start:""===r[1]?void 0:Number(r[1]),end:""===r[2]?void 0:Number(r[2])}}(r),a=await n.blob(),o=function(t,n,r){const s=t.size;if(r&&r>s||n&&n<0)throw new e.WorkboxError("range-not-satisfiable",{size:s,end:r,start:n});let a,o;return void 0!==n&&void 0!==r?(a=n,o=r+1):void 0!==n&&void 0===r?(a=n,o=s):void 0!==r&&void 0===n&&(a=s-r,o=s),{start:a,end:o}}(a,s.start,s.end),i=a.slice(o.start,o.end),d=i.size,u=new Response(i,{status:206,statusText:"Partial Content",headers:n.headers});return u.headers.set("Content-Length",String(d)),u.headers.set("Content-Range",`bytes ${o.start}-${o.end-1}/`+a.size),u}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}return t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await r(t,e):e}},t.createPartialResponse=r,t}({},workbox.core._private,workbox.core._private); 2 | //# sourceMappingURL=workbox-range-requests.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-routing.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.routing=function(t,e){"use strict";try{self["workbox:routing:5.1.4"]&&_()}catch(t){}const s=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,r="GET"){this.handler=s(e),this.match=t,this.method=r}}class n extends r{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class o{constructor(){this.t=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);const e=new Request(...t);return this.handleRequest({request:e})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const{params:r,route:n}=this.findMatchingRoute({url:s,request:t,event:e});let o,i=n&&n.handler;if(!i&&this.s&&(i=this.s),i){try{o=i.handle({url:s,request:t,event:e,params:r})}catch(t){o=Promise.reject(t)}return o instanceof Promise&&this.o&&(o=o.catch(r=>this.o.handle({url:s,request:t,event:e}))),o}}findMatchingRoute({url:t,request:e,event:s}){const r=this.t.get(e.method)||[];for(const n of r){let r;const o=n.match({url:t,request:e,event:s});if(o)return r=o,(Array.isArray(o)&&0===o.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(r=void 0),{route:n,params:r}}return{}}setDefaultHandler(t){this.s=s(t)}setCatchHandler(t){this.o=s(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new e.WorkboxError("unregister-route-but-not-found-with-method",{method:t.method});const s=this.t.get(t.method).indexOf(t);if(!(s>-1))throw new e.WorkboxError("unregister-route-route-not-registered");this.t.get(t.method).splice(s,1)}}let i;const u=()=>(i||(i=new o,i.addFetchListener(),i.addCacheListener()),i);return t.NavigationRoute=class extends r{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super(t=>this.i(t),t),this.u=e,this.h=s}i({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.h)if(t.test(s))return!1;return!!this.u.some(t=>t.test(s))}},t.RegExpRoute=n,t.Route=r,t.Router=o,t.registerRoute=function(t,s,o){let i;if("string"==typeof t){const e=new URL(t,location.href);i=new r(({url:t})=>t.href===e.href,s,o)}else if(t instanceof RegExp)i=new n(t,s,o);else if("function"==typeof t)i=new r(t,s,o);else{if(!(t instanceof r))throw new e.WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});i=t}return u().registerRoute(i),i},t.setCatchHandler=function(t){u().setCatchHandler(t)},t.setDefaultHandler=function(t){u().setDefaultHandler(t)},t}({},workbox.core._private); 2 | //# sourceMappingURL=workbox-routing.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-strategies.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.strategies=function(t,e,s,i,n){"use strict";try{self["workbox:strategies:5.1.4"]&&_()}catch(t){}const r={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};return t.CacheFirst=class{constructor(t={}){this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){"string"==typeof e&&(e=new Request(e));let i,r=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(!r)try{r=await this.o(e,t)}catch(t){i=t}if(!r)throw new n.WorkboxError("no-response",{url:e.url,error:i});return r}async o(t,e){const n=await i.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s}),r=n.clone(),h=s.cacheWrapper.put({cacheName:this.t,request:t,response:r,event:e,plugins:this.s});if(e)try{e.waitUntil(h)}catch(t){}return n}},t.CacheOnly=class{constructor(t={}){this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],this.h=t.matchOptions}async handle({event:t,request:e}){"string"==typeof e&&(e=new Request(e));const i=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(!i)throw new n.WorkboxError("no-response",{url:e.url});return i}},t.NetworkFirst=class{constructor(t={}){if(this.t=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){const e=t.plugins.some(t=>!!t.cacheWillUpdate);this.s=e?t.plugins:[r,...t.plugins]}else this.s=[r];this.u=t.networkTimeoutSeconds||0,this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){const s=[];"string"==typeof e&&(e=new Request(e));const i=[];let r;if(this.u){const{id:n,promise:h}=this.l({request:e,event:t,logs:s});r=n,i.push(h)}const h=this.p({timeoutId:r,request:e,event:t,logs:s});i.push(h);let o=await Promise.race(i);if(o||(o=await h),!o)throw new n.WorkboxError("no-response",{url:e.url});return o}l({request:t,logs:e,event:s}){let i;return{promise:new Promise(e=>{i=setTimeout(async()=>{e(await this.q({request:t,event:s}))},1e3*this.u)}),id:i}}async p({timeoutId:t,request:e,logs:n,event:r}){let h,o;try{o=await i.fetchWrapper.fetch({request:e,event:r,fetchOptions:this.i,plugins:this.s})}catch(t){h=t}if(t&&clearTimeout(t),h||!o)o=await this.q({request:e,event:r});else{const t=o.clone(),i=s.cacheWrapper.put({cacheName:this.t,request:e,response:t,event:r,plugins:this.s});if(r)try{r.waitUntil(i)}catch(t){}}return o}q({event:t,request:e}){return s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s})}},t.NetworkOnly=class{constructor(t={}){this.s=t.plugins||[],this.i=t.fetchOptions}async handle({event:t,request:e}){let s,r;"string"==typeof e&&(e=new Request(e));try{r=await i.fetchWrapper.fetch({request:e,event:t,fetchOptions:this.i,plugins:this.s})}catch(t){s=t}if(!r)throw new n.WorkboxError("no-response",{url:e.url,error:s});return r}},t.StaleWhileRevalidate=class{constructor(t={}){if(this.t=e.cacheNames.getRuntimeName(t.cacheName),this.s=t.plugins||[],t.plugins){const e=t.plugins.some(t=>!!t.cacheWillUpdate);this.s=e?t.plugins:[r,...t.plugins]}else this.s=[r];this.i=t.fetchOptions,this.h=t.matchOptions}async handle({event:t,request:e}){"string"==typeof e&&(e=new Request(e));const i=this.o({request:e,event:t});let r,h=await s.cacheWrapper.match({cacheName:this.t,request:e,event:t,matchOptions:this.h,plugins:this.s});if(h){if(t)try{t.waitUntil(i)}catch(r){}}else try{h=await i}catch(t){r=t}if(!h)throw new n.WorkboxError("no-response",{url:e.url,error:r});return h}async o({request:t,event:e}){const n=await i.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s}),r=s.cacheWrapper.put({cacheName:this.t,request:t,response:n.clone(),event:e,plugins:this.s});if(e)try{e.waitUntil(r)}catch(t){}return n}},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private); 2 | //# sourceMappingURL=workbox-strategies.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-streams.prod.js: -------------------------------------------------------------------------------- 1 | this.workbox=this.workbox||{},this.workbox.streams=function(e,n,t){"use strict";try{self["workbox:streams:5.1.4"]&&_()}catch(e){}function s(e){const t=e.map(e=>Promise.resolve(e).then(e=>function(e){return e instanceof Response?e.body.getReader():e instanceof ReadableStream?e.getReader():new Response(e).body.getReader()}(e))),s=new n.Deferred;let r=0;const o=new ReadableStream({pull(e){return t[r].then(e=>e.read()).then(n=>{if(n.done)return r++,r>=t.length?(e.close(),void s.resolve()):this.pull(e);e.enqueue(n.value)}).catch(e=>{throw s.reject(e),e})},cancel(){s.resolve()}});return{done:s.promise,stream:o}}function r(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function o(e,n){const{done:t,stream:o}=s(e),c=r(n);return{done:t,response:new Response(o,{headers:c})}}function c(){return t.canConstructReadableStream()}return e.concatenate=s,e.concatenateToResponse=o,e.isSupported=c,e.strategy=function(e,n){return async({event:t,request:s,url:a,params:u})=>{const i=e.map(e=>Promise.resolve(e({event:t,request:s,url:a,params:u})));if(c()){const{done:e,response:s}=o(i,n);return t&&t.waitUntil(e),s}const f=i.map(async e=>{const n=await e;return n instanceof Response?n.blob():new Response(n).blob()}),p=await Promise.all(f),w=r(n);return new Response(new Blob(p),{headers:w})}},e}({},workbox.core._private,workbox.core._private); 2 | //# sourceMappingURL=workbox-streams.prod.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-sw.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";try{self["workbox:sw:5.1.4"]&&_()}catch(t){}const t={backgroundSync:"background-sync",broadcastUpdate:"broadcast-update",cacheableResponse:"cacheable-response",core:"core",expiration:"expiration",googleAnalytics:"offline-ga",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};self.workbox=new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.s=this.t.debug?"dev":"prod",this.o=!1,new Proxy(this,{get(e,s){if(e[s])return e[s];const o=t[s];return o&&e.loadModule("workbox-"+o),e[s]}})}setConfig(t={}){if(this.o)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.s=this.t.debug?"dev":"prod"}loadModule(t){const e=this.i(t);try{importScripts(e),this.o=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}i(t){if(this.t.modulePathCb)return this.t.modulePathCb(t,this.t.debug);let e=["https://storage.googleapis.com/workbox-cdn/releases/5.1.4"];const s=`${t}.${this.s}.js`,o=this.t.modulePathPrefix;return o&&(e=o.split("/"),""===e[e.length-1]&&e.splice(e.length-1,1)),e.push(s),e.join("/")}}}(); 2 | //# sourceMappingURL=workbox-sw.js.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-sw.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"workbox-sw.js","sources":["../_version.mjs","../controllers/WorkboxSW.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:sw:5.1.4']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst CDN_PATH = `WORKBOX_CDN_ROOT_URL`;\n\nconst MODULE_KEY_TO_NAME_MAPPING = {\n /**\n * @name backgroundSync\n * @memberof workbox\n * @see module:workbox-background-sync\n */\n backgroundSync: 'background-sync',\n /**\n * @name broadcastUpdate\n * @memberof workbox\n * @see module:workbox-broadcast-update\n */\n broadcastUpdate: 'broadcast-update',\n /**\n * @name cacheableResponse\n * @memberof workbox\n * @see module:workbox-cacheable-response\n */\n cacheableResponse: 'cacheable-response',\n /**\n * @name core\n * @memberof workbox\n * @see module:workbox-core\n */\n core: 'core',\n /**\n * @name expiration\n * @memberof workbox\n * @see module:workbox-expiration\n */\n expiration: 'expiration',\n /**\n * @name googleAnalytics\n * @memberof workbox\n * @see module:workbox-google-analytics\n */\n googleAnalytics: 'offline-ga',\n /**\n * @name navigationPreload\n * @memberof workbox\n * @see module:workbox-navigation-preload\n */\n navigationPreload: 'navigation-preload',\n /**\n * @name precaching\n * @memberof workbox\n * @see module:workbox-precaching\n */\n precaching: 'precaching',\n /**\n * @name rangeRequests\n * @memberof workbox\n * @see module:workbox-range-requests\n */\n rangeRequests: 'range-requests',\n /**\n * @name routing\n * @memberof workbox\n * @see module:workbox-routing\n */\n routing: 'routing',\n /**\n * @name strategies\n * @memberof workbox\n * @see module:workbox-strategies\n */\n strategies: 'strategies',\n /**\n * @name streams\n * @memberof workbox\n * @see module:workbox-streams\n */\n streams: 'streams',\n};\n\n/**\n * This class can be used to make it easy to use the various parts of\n * Workbox.\n *\n * @private\n */\nexport class WorkboxSW {\n /**\n * Creates a proxy that automatically loads workbox namespaces on demand.\n *\n * @private\n */\n constructor() {\n this.v = {};\n this._options = {\n debug: self.location.hostname === 'localhost',\n modulePathPrefix: null,\n modulePathCb: null,\n };\n\n this._env = this._options.debug ? 'dev' : 'prod';\n this._modulesLoaded = false;\n\n return new Proxy(this, {\n get(target, key) {\n if (target[key]) {\n return target[key];\n }\n\n const moduleName = MODULE_KEY_TO_NAME_MAPPING[key];\n if (moduleName) {\n target.loadModule(`workbox-${moduleName}`);\n }\n\n return target[key];\n },\n });\n }\n\n /**\n * Updates the configuration options. You can specify whether to treat as a\n * debug build and whether to use a CDN or a specific path when importing\n * other workbox-modules\n *\n * @param {Object} [options]\n * @param {boolean} [options.debug] If true, `dev` builds are using, otherwise\n * `prod` builds are used. By default, `prod` is used unless on localhost.\n * @param {Function} [options.modulePathPrefix] To avoid using the CDN with\n * `workbox-sw` set the path prefix of where modules should be loaded from.\n * For example `modulePathPrefix: '/third_party/workbox/v3.0.0/'`.\n * @param {workbox~ModulePathCallback} [options.modulePathCb] If defined,\n * this callback will be responsible for determining the path of each\n * workbox module.\n *\n * @alias workbox.setConfig\n */\n setConfig(options = {}) {\n if (!this._modulesLoaded) {\n Object.assign(this._options, options);\n this._env = this._options.debug ? 'dev' : 'prod';\n } else {\n throw new Error('Config must be set before accessing workbox.* modules');\n }\n }\n\n /**\n * Load a Workbox module by passing in the appropriate module name.\n *\n * This is not generally needed unless you know there are modules that are\n * dynamically used and you want to safe guard use of the module while the\n * user may be offline.\n *\n * @param {string} moduleName\n *\n * @alias workbox.loadModule\n */\n loadModule(moduleName) {\n const modulePath = this._getImportPath(moduleName);\n try {\n importScripts(modulePath);\n this._modulesLoaded = true;\n } catch (err) {\n // TODO Add context of this error if using the CDN vs the local file.\n\n // We can't rely on workbox-core being loaded so using console\n // eslint-disable-next-line\n console.error(\n `Unable to import module '${moduleName}' from '${modulePath}'.`);\n throw err;\n }\n }\n\n /**\n * This method will get the path / CDN URL to be used for importScript calls.\n *\n * @param {string} moduleName\n * @return {string} URL to the desired module.\n *\n * @private\n */\n _getImportPath(moduleName) {\n if (this._options.modulePathCb) {\n return this._options.modulePathCb(moduleName, this._options.debug);\n }\n\n // TODO: This needs to be dynamic some how.\n let pathParts = [CDN_PATH];\n\n const fileName = `${moduleName}.${this._env}.js`;\n\n const pathPrefix = this._options.modulePathPrefix;\n if (pathPrefix) {\n // Split to avoid issues with developers ending / not ending with slash\n pathParts = pathPrefix.split('/');\n\n // We don't need a slash at the end as we will be adding\n // a filename regardless\n if (pathParts[pathParts.length - 1] === '') {\n pathParts.splice(pathParts.length - 1, 1);\n }\n }\n\n pathParts.push(fileName);\n\n return pathParts.join('/');\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxSW} from './controllers/WorkboxSW.mjs';\nimport './_version.mjs';\n\n/**\n * @namespace workbox\n */\n\n// Don't export anything, just expose a global.\nself.workbox = new WorkboxSW();\n"],"names":["self","_","e","MODULE_KEY_TO_NAME_MAPPING","backgroundSync","broadcastUpdate","cacheableResponse","core","expiration","googleAnalytics","navigationPreload","precaching","rangeRequests","routing","strategies","streams","workbox","constructor","v","_options","debug","location","hostname","modulePathPrefix","modulePathCb","_env","this","_modulesLoaded","Proxy","get","target","key","moduleName","loadModule","setConfig","options","Error","Object","assign","modulePath","_getImportPath","importScripts","err","console","error","pathParts","fileName","pathPrefix","split","length","splice","push","join"],"mappings":"yBAAA,IAAIA,KAAK,qBAAqBC,IAAI,MAAMC,ICUxC,MAEMC,EAA6B,CAMjCC,eAAgB,kBAMhBC,gBAAiB,mBAMjBC,kBAAmB,qBAMnBC,KAAM,OAMNC,WAAY,aAMZC,gBAAiB,aAMjBC,kBAAmB,qBAMnBC,WAAY,aAMZC,cAAe,iBAMfC,QAAS,UAMTC,WAAY,aAMZC,QAAS,WCpEXf,KAAKgB,QAAU,ID6ER,MAMLC,0BACOC,EAAI,QACJC,EAAW,CACdC,MAAkC,cAA3BpB,KAAKqB,SAASC,SACrBC,iBAAkB,KAClBC,aAAc,WAGXC,EAAOC,KAAKP,EAASC,MAAQ,MAAQ,YACrCO,GAAiB,EAEf,IAAIC,MAAMF,KAAM,CACrBG,IAAIC,EAAQC,MACND,EAAOC,UACFD,EAAOC,SAGVC,EAAa7B,EAA2B4B,UAC1CC,GACFF,EAAOG,WAAY,WAAUD,GAGxBF,EAAOC,MAsBpBG,UAAUC,EAAU,OACbT,KAAKC,QAIF,IAAIS,MAAM,yDAHhBC,OAAOC,OAAOZ,KAAKP,EAAUgB,QACxBV,EAAOC,KAAKP,EAASC,MAAQ,MAAQ,OAiB9Ca,WAAWD,SACHO,EAAab,KAAKc,EAAeR,OAErCS,cAAcF,QACTZ,GAAiB,EACtB,MAAOe,SAKPC,QAAQC,MACH,4BAA2BZ,YAAqBO,OAC/CG,GAYVF,EAAeR,MACTN,KAAKP,EAASK,oBACTE,KAAKP,EAASK,aAAaQ,EAAYN,KAAKP,EAASC,WAI1DyB,EAAY,CAvLF,mEAyLRC,EAAY,GAAEd,KAAcN,KAAKD,OAEjCsB,EAAarB,KAAKP,EAASI,wBAC7BwB,IAEFF,EAAYE,EAAWC,MAAM,KAIW,KAApCH,EAAUA,EAAUI,OAAS,IAC/BJ,EAAUK,OAAOL,EAAUI,OAAS,EAAG,IAI3CJ,EAAUM,KAAKL,GAERD,EAAUO,KAAK"} -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-window.prod.es5.mjs: -------------------------------------------------------------------------------- 1 | try{self["workbox:window:5.1.4"]&&_()}catch(n){}function n(n,t){return new Promise((function(r){var e=new MessageChannel;e.port1.onmessage=function(n){r(n.data)},n.postMessage(t,[e.port2])}))}function t(n,t){for(var r=0;rn.length)&&(t=n.length);for(var r=0,e=new Array(t);r=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=n[Symbol.iterator]()).next.bind(e)}try{self["workbox:core:5.1.4"]&&_()}catch(n){}var i=function(){var n=this;this.promise=new Promise((function(t,r){n.resolve=t,n.reject=r}))};function o(n,t){var r=location.href;return new URL(n,r).href===new URL(t,r).href}var u=function(n,t){this.type=n,Object.assign(this,t)};function a(n,t,r){return r?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function c(){}var f=function(r){var e,c;function f(n,t){var e,c;return void 0===t&&(t={}),(e=r.call(this)||this).t={},e.i=0,e.o=new i,e.u=new i,e.s=new i,e.v=0,e.h=new Set,e.l=function(){var n=e.m,t=n.installing;e.i>0||!o(t.scriptURL,e.g)||performance.now()>e.v+6e4?(e.p=t,n.removeEventListener("updatefound",e.l)):(e.P=t,e.h.add(t),e.o.resolve(t)),++e.i,t.addEventListener("statechange",e.S)},e.S=function(n){var t=e.m,r=n.target,i=r.state,o=r===e.p,a=o?"external":"",c={sw:r,originalEvent:n};!o&&e.j&&(c.isUpdate=!0),e.dispatchEvent(new u(a+i,c)),"installed"===i?e.A=self.setTimeout((function(){"installed"===i&&t.waiting===r&&e.dispatchEvent(new u(a+"waiting",c))}),200):"activating"===i&&(clearTimeout(e.A),o||e.u.resolve(r))},e.O=function(n){var t=e.P;t===navigator.serviceWorker.controller&&(e.dispatchEvent(new u("controlling",{sw:t,originalEvent:n,isUpdate:e.j})),e.s.resolve(t))},e.U=(c=function(n){var t=n.data,r=n.source;return a(e.getSW(),(function(){e.h.has(r)&&e.dispatchEvent(new u("message",{data:t,sw:r,originalEvent:n}))}))},function(){for(var n=[],t=0;t{const e=new MessageChannel;e.port1.onmessage=t=>{i(t.data)},t.postMessage(s,[e.port2])})}try{self["workbox:core:5.1.4"]&&_()}catch(t){}class s{constructor(){this.promise=new Promise((t,s)=>{this.resolve=t,this.reject=s})}}function i(t,s){const{href:i}=location;return new URL(t,i).href===new URL(s,i).href}class e{constructor(t,s){this.type=t,Object.assign(this,s)}}class h extends class{constructor(){this.t=new Map}addEventListener(t,s){this.s(t).add(s)}removeEventListener(t,s){this.s(t).delete(s)}dispatchEvent(t){t.target=this;const s=this.s(t.type);for(const i of s)i(t)}s(t){return this.t.has(t)||this.t.set(t,new Set),this.t.get(t)}}{constructor(t,h={}){super(),this.i={},this.h=0,this.o=new s,this.g=new s,this.l=new s,this.u=0,this.v=new Set,this.m=()=>{const t=this.p,s=t.installing;this.h>0||!i(s.scriptURL,this.S)||performance.now()>this.u+6e4?(this.L=s,t.removeEventListener("updatefound",this.m)):(this._=s,this.v.add(s),this.o.resolve(s)),++this.h,s.addEventListener("statechange",this.P)},this.P=t=>{const s=this.p,i=t.target,{state:h}=i,n=i===this.L,a=n?"external":"",r={sw:i,originalEvent:t};!n&&this.W&&(r.isUpdate=!0),this.dispatchEvent(new e(a+h,r)),"installed"===h?this.B=self.setTimeout(()=>{"installed"===h&&s.waiting===i&&this.dispatchEvent(new e(a+"waiting",r))},200):"activating"===h&&(clearTimeout(this.B),n||this.g.resolve(i))},this.C=t=>{const s=this._;s===navigator.serviceWorker.controller&&(this.dispatchEvent(new e("controlling",{sw:s,originalEvent:t,isUpdate:this.W})),this.l.resolve(s))},this.R=async t=>{const{data:s,source:i}=t;await this.getSW(),this.v.has(i)&&this.dispatchEvent(new e("message",{data:s,sw:i,originalEvent:t}))},this.S=t,this.i=h,navigator.serviceWorker.addEventListener("message",this.R)}async register({immediate:t=!1}={}){t||"complete"===document.readyState||await new Promise(t=>window.addEventListener("load",t)),this.W=Boolean(navigator.serviceWorker.controller),this.U=this.M(),this.p=await this.T(),this.U&&(this._=this.U,this.g.resolve(this.U),this.l.resolve(this.U),this.U.addEventListener("statechange",this.P,{once:!0}));const s=this.p.waiting;return s&&i(s.scriptURL,this.S)&&(this._=s,Promise.resolve().then(()=>{this.dispatchEvent(new e("waiting",{sw:s,wasWaitingBeforeRegister:!0}))}).then(()=>{})),this._&&(this.o.resolve(this._),this.v.add(this._)),this.p.addEventListener("updatefound",this.m),navigator.serviceWorker.addEventListener("controllerchange",this.C,{once:!0}),this.p}async update(){this.p&&await this.p.update()}get active(){return this.g.promise}get controlling(){return this.l.promise}async getSW(){return void 0!==this._?this._:this.o.promise}async messageSW(s){return t(await this.getSW(),s)}M(){const t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.S)?t:void 0}async T(){try{const t=await navigator.serviceWorker.register(this.S,this.i);return this.u=performance.now(),t}catch(t){throw t}}}export{h as Workbox,t as messageSW}; 2 | //# sourceMappingURL=workbox-window.prod.mjs.map 3 | -------------------------------------------------------------------------------- /third_party/workbox/workbox-v5.1.4/workbox-window.prod.umd.js: -------------------------------------------------------------------------------- 1 | !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).workbox={})}(this,(function(n){"use strict";try{self["workbox:window:5.1.4"]&&_()}catch(n){}function t(n,t){return new Promise((function(r){var e=new MessageChannel;e.port1.onmessage=function(n){r(n.data)},n.postMessage(t,[e.port2])}))}function r(n,t){for(var r=0;rn.length)&&(t=n.length);for(var r=0,e=new Array(t);r=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=n[Symbol.iterator]()).next.bind(r)}try{self["workbox:core:5.1.4"]&&_()}catch(n){}var o=function(){var n=this;this.promise=new Promise((function(t,r){n.resolve=t,n.reject=r}))};function u(n,t){var r=location.href;return new URL(n,r).href===new URL(t,r).href}var a=function(n,t){this.type=n,Object.assign(this,t)};function c(n,t,r){return r?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function f(){}var s=function(n){var e,i;function f(t,r){var e,i;return void 0===r&&(r={}),(e=n.call(this)||this).t={},e.i=0,e.o=new o,e.u=new o,e.s=new o,e.v=0,e.h=new Set,e.l=function(){var n=e.m,t=n.installing;e.i>0||!u(t.scriptURL,e.g)||performance.now()>e.v+6e4?(e.p=t,n.removeEventListener("updatefound",e.l)):(e.P=t,e.h.add(t),e.o.resolve(t)),++e.i,t.addEventListener("statechange",e.j)},e.j=function(n){var t=e.m,r=n.target,i=r.state,o=r===e.p,u=o?"external":"",c={sw:r,originalEvent:n};!o&&e.S&&(c.isUpdate=!0),e.dispatchEvent(new a(u+i,c)),"installed"===i?e.O=self.setTimeout((function(){"installed"===i&&t.waiting===r&&e.dispatchEvent(new a(u+"waiting",c))}),200):"activating"===i&&(clearTimeout(e.O),o||e.u.resolve(r))},e.A=function(n){var t=e.P;t===navigator.serviceWorker.controller&&(e.dispatchEvent(new a("controlling",{sw:t,originalEvent:n,isUpdate:e.S})),e.s.resolve(t))},e.M=(i=function(n){var t=n.data,r=n.source;return c(e.getSW(),(function(){e.h.has(r)&&e.dispatchEvent(new a("message",{data:t,sw:r,originalEvent:n}))}))},function(){for(var n=[],t=0;t { 44 | let source; 45 | 46 | if (response.response && response.response.js) { 47 | source = response.response.js; 48 | } 49 | 50 | nicify.checked = false; 51 | none.checked = true; 52 | 53 | if (!source) { 54 | view.textContent = 'Unknown error'; 55 | } else { 56 | output.value = source; 57 | output.onchange(); 58 | } 59 | }, 60 | onerror: (err) => { 61 | console.error(err); // eslint-disable-line no-console 62 | }, 63 | }); 64 | } 65 | 66 | function isOnine() { 67 | nicify.disabled = !navigator.onLine; 68 | return navigator.onLine; 69 | } 70 | 71 | nicify.disabled = false; 72 | nicify.nextSibling.nextSibling.textContent = label; 73 | 74 | input.addEventListener('input', () => { 75 | if (nicify.checked) jsnice(); 76 | }); 77 | 78 | nicify.addEventListener('click', () => { 79 | if (nicify.checked) jsnice(); 80 | }); 81 | 82 | nicify.addEventListener('onchange', () => { 83 | if (nicify.checked) jsnice(); 84 | }); 85 | 86 | window.addEventListener('online', isOnine); 87 | window.addEventListener('offline', isOnine); 88 | isOnine(); 89 | -------------------------------------------------------------------------------- /workbox-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "globDirectory": "_site/", 3 | "globPatterns": [ 4 | "**/*.{css,png,js,ico,html,webmanifest}" 5 | ], 6 | "swDest": "sw.js" 7 | }; 8 | -------------------------------------------------------------------------------- /worker/decode.js: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | /** 4 | * @name {{ site.name }} 5 | * @description {{ site.description }} 6 | * @author {{ site.author }} <{{ site.author_email }}> ({{ site.url }}) 7 | * @version {{ site.version }} 8 | * @copyright {{ site.author }} 2017 9 | * @license {{ site.license }} 10 | */ 11 | 12 | /* globals EvalDecode, ArrayDecode, _NumberDecode, JSFuckDecode, ObfuscatorIO, CleanSource, AADecode, JJdecode, Urlencoded, P_A_C_K_E_R, JavascriptObfuscator, MyObfuscate, Wise_EvalDecode, Wise_FunctionalDecode */ 13 | /* eslint-disable no-console */ 14 | 15 | self.addEventListener('message', (e) => { 16 | self.importScripts('{{ "third_party/mathjs/math.min.js" | relative_url }}'); 17 | self.importScripts('{{ "lib/utils.js" | relative_url }}'); 18 | 19 | let source = e.data.source; 20 | const packer = e.data.packer; 21 | const options = e.data.options; 22 | 23 | const methods = { 24 | evalencode: () => { 25 | self.importScripts('{{ "lib/evaldecode.js" | relative_url }}'); 26 | return EvalDecode(source); 27 | }, 28 | _numberencode: () => { 29 | self.importScripts('{{ "lib/numberdecode.js" | relative_url }}'); 30 | return _NumberDecode(source); 31 | }, 32 | arrayencode: () => { 33 | self.importScripts('{{ "lib/arraydecode.js" | relative_url }}'); 34 | return ArrayDecode(source, options); 35 | }, 36 | jsfuck: () => { 37 | self.importScripts('{{ "lib/jsfuckdecode.js" | relative_url }}'); 38 | return JSFuckDecode(source); 39 | }, 40 | obfuscatorio: () => { 41 | self.importScripts('{{ "lib/obfuscatorio.js" | relative_url }}'); 42 | return ObfuscatorIO(source, options); 43 | }, 44 | cleansource: () => { 45 | self.importScripts('{{ "lib/cleansource.js" | relative_url }}'); 46 | return CleanSource(source, options); 47 | }, 48 | aaencode: () => { 49 | self.importScripts('{{ "third_party/cat-in-136/aadecode.js" | relative_url }}'); 50 | return AADecode.decode(source); 51 | }, 52 | jjencode: () => { 53 | self.importScripts('{{ "third_party/decoder-jjencode/jjdecode.js" | relative_url }}'); 54 | return JJdecode.decode(source); 55 | }, 56 | urlencode: () => { 57 | self.importScripts('{{ "third_party/js-beautify/unpackers/urlencode_unpacker.js" | relative_url }}'); 58 | if (Urlencoded.detect(source)) return Urlencoded.unpack(source); 59 | throw 'Not matched'; 60 | }, 61 | p_a_c_k_e_r: () => { 62 | self.importScripts('{{ "third_party/js-beautify/unpackers/p_a_c_k_e_r_unpacker.js" | relative_url }}'); 63 | if (P_A_C_K_E_R.detect(source)) return P_A_C_K_E_R.unpack(source); 64 | throw 'Not matched'; 65 | }, 66 | javascriptobfuscator: () => { 67 | self.importScripts('{{ "third_party/js-beautify/unpackers/javascriptobfuscator_unpacker.js" | relative_url }}'); 68 | if (JavascriptObfuscator.detect(source)) return JavascriptObfuscator.unpack(source); 69 | throw 'Not matched'; 70 | }, 71 | myobfuscate: () => { 72 | self.importScripts('{{ "third_party/js-beautify/unpackers/myobfuscate_unpacker.js" | relative_url }}'); 73 | if (MyObfuscate.detect(source)) return MyObfuscate.unpack(source); 74 | throw 'Not matched'; 75 | }, 76 | wiseeval: () => { 77 | self.importScripts('{{ "third_party/NotSoWise/unpacker.js" | relative_url }}'); 78 | return Wise_EvalDecode(source); 79 | }, 80 | wisefunction: () => { 81 | self.importScripts('{{ "third_party/NotSoWise/unpacker.js" | relative_url }}'); 82 | return Wise_FunctionalDecode(source); 83 | }, 84 | }; 85 | 86 | try { 87 | source = methods[packer](); 88 | } catch (err) { 89 | throw new Error(err); 90 | } 91 | 92 | self.postMessage(source); 93 | }); 94 | -------------------------------------------------------------------------------- /worker/format.js: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | /** 4 | * @name {{ site.name }} 5 | * @description {{ site.description }} 6 | * @author {{ site.author }} <{{ site.author_email }}> ({{ site.url }}) 7 | * @version {{ site.version }} 8 | * @copyright {{ site.author }} 2017 9 | * @license {{ site.license }} 10 | */ 11 | 12 | self.addEventListener('message', (e) => { 13 | let source = e.data.source; 14 | const options = e.data.options; 15 | 16 | if (!options.formatCode) { 17 | self.postMessage({ 18 | result: source, 19 | highlight: true, 20 | }); 21 | return; 22 | } 23 | 24 | try { 25 | self._window = self.window; 26 | self.window = {}; 27 | 28 | self.importScripts('{{ "third_party/js-beautify/beautify.min.js" | relative_url }}'); 29 | 30 | source = self.window.js_beautify(source, { 31 | unescape_strings: true, 32 | jslint_happy: true, 33 | }); 34 | 35 | self.window = self._window; 36 | } catch (err) { 37 | console.error(err); 38 | } 39 | 40 | self.postMessage({ 41 | result: source, 42 | highlight: false, 43 | }); 44 | 45 | try { 46 | self.importScripts('{{ "third_party/highlight-js/highlight.min.js" | relative_url }}'); 47 | 48 | source = self.hljs.highlight('javascript', source).value; 49 | 50 | if (options.lineNumbers) { 51 | source = source.split('\n'); 52 | source = source.join(''); 53 | source = `${source}`; 54 | } 55 | } catch (err) { 56 | throw new Error(err); 57 | } 58 | 59 | self.postMessage({ 60 | result: source, 61 | highlight: true, 62 | }); 63 | }); 64 | --------------------------------------------------------------------------------