├── .browserslistrc ├── babel.config.js ├── postcss.config.js ├── nuxt ├── plugin.js └── index.js ├── .gitignore ├── dist ├── demo.html ├── vue-browser-detect-plugin.umd.min.js ├── vue-browser-detect-plugin.common.js └── vue-browser-detect-plugin.umd.js ├── public └── demo.html ├── index.d.ts ├── .eslintrc.js ├── LICENSE ├── package.json ├── README.md ├── src └── main.js └── CHANGELOG.md /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"] 3 | }; 4 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /nuxt/plugin.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueBrowserDetect from 'vue-browser-detect-plugin' 3 | 4 | Vue.use(VueBrowserDetect) 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.sw* 21 | -------------------------------------------------------------------------------- /nuxt/index.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require('path') 2 | 3 | module.exports = function nuxtBrowserDetect() { 4 | this.addPlugin({ 5 | ssr: false, 6 | src: resolve(__dirname, 'plugin.js'), 7 | fileName: 'browser-detect-plugin.js' 8 | }) 9 | } 10 | 11 | module.exports.meta = require('../package.json') -------------------------------------------------------------------------------- /dist/demo.html: -------------------------------------------------------------------------------- 1 | vue-tour demo 2 | 3 | 4 | 5 |
6 |

{{ msg }}

7 |
{{ $browserDetect }}
8 |
9 | 10 | 19 | -------------------------------------------------------------------------------- /public/demo.html: -------------------------------------------------------------------------------- 1 | vue-tour demo 2 | 3 | 4 | 5 |
6 |

{{ msg }}

7 |
{{ $browserDetect }}
8 |
9 | 10 | 19 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { PluginFunction } from 'vue'; 2 | 3 | export interface BrowserDetectMeta { 4 | name: string; 5 | version: string; 6 | ua: string; 7 | } 8 | 9 | export interface BrowserDetect { 10 | isIE: boolean; 11 | isChrome: boolean; 12 | isBrave: boolean; 13 | isFirefox: boolean; 14 | isOpera: boolean; 15 | isSafari: boolean; 16 | isEdge: boolean; 17 | isChromeIOS: boolean; 18 | isIOS: boolean; 19 | meta: BrowserDetectMeta; 20 | } 21 | 22 | declare const plugin: PluginFunction; 23 | 24 | export default plugin; 25 | 26 | declare module 'vue/types/vue' { 27 | interface Vue { 28 | $browserDetect: BrowserDetect; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ["plugin:vue/essential", "eslint:recommended"], 7 | parserOptions: { 8 | parser: "babel-eslint", 9 | }, 10 | 11 | rules: { 12 | "vue/experimental-script-setup-vars": "off", 13 | 14 | "vue/valid-v-slot": "off", 15 | "no-console": process.env.NODE_ENV === "production" ? "off" : "off", 16 | "no-debugger": process.env.NODE_ENV === "production" ? "off" : "off", 17 | 18 | }, 19 | plugins: [], 20 | overrides: [ 21 | { 22 | files: [ 23 | "**/__tests__/*.{j,t}s?(x)", 24 | "**/tests/unit/**/*.spec.{j,t}s?(x)", 25 | ], 26 | env: { 27 | jest: true, 28 | }, 29 | }, 30 | ], 31 | }; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Illinois Criminal Justice Information Authority 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. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-browser-detect-plugin", 3 | "version": "0.1.18", 4 | "description": "Simple browser detection plugin for Vue.", 5 | "scripts": { 6 | "serve": "vue-cli-service serve --open", 7 | "build": "vue-cli-service build --target lib src/main.js && npm run postbuild", 8 | "lint": "vue-cli-service lint", 9 | "version": "auto-changelog -p --commit-limit false --sort-commits date && git add CHANGELOG.md", 10 | "postbuild": "cp ./public/demo.html ./dist" 11 | }, 12 | "main": "dist/vue-browser-detect-plugin.common.js", 13 | "module": "dist/vue-browser-detect-plugin.umd.js", 14 | "dependencies": { 15 | "feed": "^4.2.2", 16 | "vue": "^2.6.11", 17 | "vue-eslint-parser": "^7.10.0" 18 | }, 19 | "devDependencies": { 20 | "@vue/cli-plugin-babel": "^4.5.13", 21 | "@vue/cli-plugin-eslint": "^4.5.13", 22 | "@vue/cli-service": "^4.5.13", 23 | "@vue/eslint-config-prettier": "^6.0.0", 24 | "auto-changelog": "^2.3.0", 25 | "babel-eslint": "^10.1.0", 26 | "core-js": "^3.17.2", 27 | "eslint": "^7.32.0", 28 | "eslint-config-prettier": "^8.3.0", 29 | "eslint-plugin-prettier": "^4.0.0", 30 | "eslint-plugin-vue": "^7.17.0", 31 | "prettier-eslint": "^13.0.0", 32 | "vue-template-compiler": "^2.6.14" 33 | }, 34 | "homepage": "https://github.com/ICJIA/vue-browser-detect-plugin#readme", 35 | "keywords": [ 36 | "Vue", 37 | "browser detection" 38 | ], 39 | "license": "MIT" 40 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Browser Detect Plugin 2 | 3 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 4 | 5 | > Simple plugin for Vue that detects browser name, version, and user-agent. 6 | 7 | ## Installation 8 | 9 | ```bash 10 | npm install vue-browser-detect-plugin 11 | ``` 12 | 13 | In your `main.js:` 14 | 15 | ```bash 16 | import browserDetect from "vue-browser-detect-plugin"; 17 | Vue.use(browserDetect); 18 | ``` 19 | 20 | ## Usage 21 | 22 | ### Browser info: 23 | 24 | - **vm.\$browserDetect.isIE** `boolean` 25 | 26 | - **vm.\$browserDetect.isChrome** `boolean` 27 | 28 | - Note: This is Chrome desktop. 29 | 30 | - **vm.\$browserDetect.isFirefox** `boolean` 31 | 32 | - **vm.\$browserDetect.isOpera** `boolean` 33 | 34 | - **vm.\$browserDetect.isSafari** `boolean` 35 | 36 | - **vm.\$browserDetect.isEdge** `boolean` 37 | 38 | - **vm.\$browserDetect.isChromeIOS** `boolean` 39 | 40 | - **vm.\$browserDetect.isIOS** `boolean` 41 | 42 | ### Additional meta info: 43 | 44 | - **vm.\$browserDetect.meta.name** `Chrome, IE, Edge, etc.` 45 | 46 | - **vm.\$browserDetect.meta.version** `Version` 47 | 48 | - **vm.\$browserDetect.meta.ua** `user-agent` 49 | 50 | ## Demo 51 | 52 | https://vue-browser-detect.netlify.com/ 53 | 54 | ## Nuxt.js 55 | 56 | Add `vue-browser-detect-plugin/nuxt` to the `buildModules` section of `nuxt.config.js` 57 | 58 | ```js 59 | export default { 60 | buildModules: [ 61 | 'vue-browser-detect-plugin/nuxt' 62 | ] 63 | } 64 | ``` 65 | 66 | :warning: If you are using Nuxt **< v2.9** you have to install the module as a `dependency` (No `--dev` or `--save-dev` flags) and use `modules` section in `nuxt.config.js` instead of `buildModules`. 67 | 68 | ## CHANGLOG 69 | 70 | [See CHANGELOG.md](https://github.com/ICJIA/vue-browser-detect-plugin/blob/master/CHANGELOG.md) 71 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | const VueBrowserDetect = { 2 | install: Vue => { 3 | let ua = window.navigator.userAgent; 4 | let browserObj = {}; 5 | 6 | // Opera 8.0+ (UA detection to detect Blink/v8-powered Opera) 7 | browserObj.isOpera = 8 | !!window.opera || navigator.userAgent.indexOf(" OPR/") >= 0; 9 | // Firefox 1.0+ 10 | browserObj.isEdge = /Edg/.test(navigator.userAgent); 11 | browserObj.isFirefox = /Firefox/.test(navigator.userAgent); 12 | // Safari 3.0+ 13 | /*eslint-disable */ 14 | browserObj.isSafari = 15 | /constructor/i.test(window.HTMLElement) || 16 | (function(p) { 17 | return p.toString() === "[object SafariRemoteNotification]"; 18 | })(!window["safari"] || safari.pushNotification); 19 | /*eslint-ensable */ 20 | // Internet Explorer 6-11 21 | browserObj.isIE = /*@cc_on!@*/ false || !!document.documentMode; 22 | // Edge 20+ 23 | 24 | browserObj.isChrome = /Google Inc/.test(navigator.vendor) && !browserObj.isEdge; 25 | browserObj.isChromeIOS = /CriOS/.test(navigator.userAgent); 26 | browserObj.isIOS = 27 | /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; 28 | 29 | browserObj.isBrave = (typeof navigator.brave !== "undefined"); 30 | 31 | browserObj.meta = browserSpecs(); 32 | browserObj.meta.ua = ua; 33 | 34 | function browserSpecs() { 35 | /** 36 | * https://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser 37 | */ 38 | var tem, 39 | M = 40 | ua.match( 41 | /(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i 42 | ) || []; 43 | if (/trident/i.test(M[1])) { 44 | tem = /\brv[ :]+(\d+)/g.exec(ua) || []; 45 | return { name: "IE", version: tem[1] || "" }; 46 | } 47 | if (M[1] === "Chrome") { 48 | tem = ua.match(/\b(OPR|Edge)\/(\d+)/); 49 | if (tem != null) 50 | return { name: tem[1].replace("OPR", "Opera"), version: tem[2] }; 51 | } 52 | M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, "-?"]; 53 | if ((tem = ua.match(/version\/(\d+)/i)) != null) M.splice(1, 1, tem[1]); 54 | return { name: M[0], version: M[1] }; 55 | } 56 | 57 | Vue.prototype.$browserDetect = browserObj; 58 | } 59 | }; 60 | 61 | export default VueBrowserDetect; 62 | 63 | if (typeof window !== "undefined" && window.Vue) { 64 | window.Vue.use(VueBrowserDetect); 65 | } 66 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Changelog 2 | 3 | All notable changes to this project will be documented in this file. Dates are displayed in UTC. 4 | 5 | Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). 6 | 7 | #### [0.1.12](https://github.com/ICJIA/vue-browser-detect-plugin/compare/0.1.10...0.1.12) 8 | 9 | > 14 May 2020 10 | 11 | - fix: dependencies [`#15`](https://github.com/ICJIA/vue-browser-detect-plugin/pull/15) 12 | - chore: update deps / add changelog / MIT license [`7c50544`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/7c50544fc833fa40f6810c51371aa98cbdf1646c) 13 | 14 | #### [0.1.10](https://github.com/ICJIA/vue-browser-detect-plugin/compare/0.1.8...0.1.10) 15 | 16 | > 14 May 2020 17 | 18 | - feat: add nuxt module [`#14`](https://github.com/ICJIA/vue-browser-detect-plugin/pull/14) 19 | - add index.d.ts for typescript support [`#13`](https://github.com/ICJIA/vue-browser-detect-plugin/pull/13) 20 | - chore: bump release [`412489c`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/412489c7624439660f7d806c0c2bb0367efb80c4) 21 | 22 | #### [0.1.8](https://github.com/ICJIA/vue-browser-detect-plugin/compare/0.1.6...0.1.8) 23 | 24 | > 6 February 2020 25 | 26 | - chore: fix README [`80d0a40`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/80d0a4016dc98061301ee0c519b8b66c09c4ff07) 27 | - fix: changed casing for iOS key [`435b011`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/435b011bb9da14b5e714b13a990a1109a72388a8) 28 | 29 | #### [0.1.6](https://github.com/ICJIA/vue-browser-detect-plugin/compare/0.1.5...0.1.6) 30 | 31 | > 6 February 2020 32 | 33 | - chore: README fix [`08bcb4c`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/08bcb4c1e351d0d1f78dba3078daec1d8fa17a7f) 34 | - chore: edit README with demo [`a2ebf5e`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/a2ebf5e28a97d32d762e6b3f3e91d7beb0047751) 35 | - chore: README edit [`872e76c`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/872e76c886ecd6342e55899f2844f91dd636d157) 36 | - feat: detect iOS [`dc617b0`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/dc617b094245bbf2cd798d6c00e17a70fc3bc33a) 37 | 38 | #### [0.1.5](https://github.com/ICJIA/vue-browser-detect-plugin/compare/0.1.4...0.1.5) 39 | 40 | > 14 May 2020 41 | 42 | #### 0.1.4 43 | 44 | > 26 July 2019 45 | 46 | - feat: initial commit [`a66a097`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/a66a097d0b11f3f5306821427e1dd18fb476ad63) 47 | - feat: create README with basic info [`41b5bbd`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/41b5bbd15ea68c7ee2c2039b746711e82f226820) 48 | - fix: update package.json [`2367d5b`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/2367d5b2b02f935a1e8454905b8eb989dda6aabf) 49 | - fix: update demo.html [`c36cf79`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/c36cf795a446b6ddb1509ebd0ecce9302e3c9ae6) 50 | - fix: update README and build [`d772be1`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/d772be1666f1a0950def645f37a5ec4c8c460914) 51 | - chore: update version [`00b00e2`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/00b00e2a4b3878ed620b61ed7d9903b1b0af8fdd) 52 | - fix: check for chrome [`8a8247f`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/8a8247fcc24ac5c2e9d897e6a354db5503f55688) 53 | - fix: chrome check [`f71dc44`](https://github.com/ICJIA/vue-browser-detect-plugin/commit/f71dc4462adf14d78213c4fb8f54f5f21c3f86c7) 54 | -------------------------------------------------------------------------------- /dist/vue-browser-detect-plugin.umd.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-browser-detect-plugin"]=e():t["vue-browser-detect-plugin"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),c=n("fc6a"),a=n("a04b"),u=n("5135"),f=n("0cfb"),s=Object.getOwnPropertyDescriptor;e.f=r?s:function(t,e){if(t=c(t),e=a(e),f)try{return s(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"0b42":function(t,e,n){var r=n("861d"),o=n("e8b5"),i=n("b622"),c=i("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)?r(e)&&(e=e[c],null===e&&(e=void 0)):e=void 0),void 0===e?Array:e}},"0cb2":function(t,e,n){var r=n("7b0b"),o=Math.floor,i="".replace,c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,u,f,s){var l=n+t.length,d=u.length,p=a;return void 0!==f&&(f=r(f),p=c),i.call(s,p,(function(r,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":c=f[i.slice(1,-1)];break;default:var a=+i;if(0===a)return r;if(a>d){var s=o(a/10);return 0===s?r:s<=d?void 0===u[s-1]?i.charAt(1):u[s-1]+i.charAt(1):r}c=u[a-1]}return void 0===c?"":c}))}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"107c":function(t,e,n){var r=n("d039"),o=n("da84"),i=o.RegExp;t.exports=r((function(){var t=i("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},"14c3":function(t,e,n){var r=n("c6b6"),o=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),o=n("b622"),i=n("2d00"),c=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[],n=e.constructor={};return n[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),c=n("6eeb"),a=n("ce4e"),u=n("e893"),f=n("94ca");t.exports=function(t,e){var n,s,l,d,p,v,b=t.target,g=t.global,x=t.stat;if(s=g?r:x?r[b]||a(b,{}):(r[b]||{}).prototype,s)for(l in e){if(p=e[l],t.noTargetGet?(v=o(s,l),d=v&&v.value):d=s[l],n=f(g?l:b+(x?".":"#")+l,t.forced),!n&&void 0!==d){if(typeof p===typeof d)continue;u(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),c(s,l,p,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),o=n("825a"),i=n("577e"),c=n("d039"),a=n("ad6d"),u="toString",f=RegExp.prototype,s=f[u],l=c((function(){return"/a/b"!=s.call({source:"a",flags:"b"})})),d=s.name!=u;(l||d)&&r(RegExp.prototype,u,(function(){var t=o(this),e=i(t.source),n=t.flags,r=i(void 0===n&&t instanceof RegExp&&!("flags"in f)?a.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},"2d00":function(t,e,n){var r,o,i=n("da84"),c=n("342f"),a=i.process,u=i.Deno,f=a&&a.versions||u&&u.version,s=f&&f.v8;s?(r=s.split("."),o=r[0]<4?1:r[0]+r[1]):c&&(r=c.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),c=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=c(e),a=r.length,u=0;while(a>u)o.f(t,n=r[u++],e[n]);return t}},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"466d":function(t,e,n){"use strict";var r=n("d784"),o=n("825a"),i=n("50c4"),c=n("577e"),a=n("1d80"),u=n("8aa5"),f=n("14c3");r("match",(function(t,e,n){return[function(e){var n=a(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](c(n))},function(t){var r=o(this),a=c(t),s=n(e,r,a);if(s.done)return s.value;if(!r.global)return f(r,a);var l=r.unicode;r.lastIndex=0;var d,p=[],v=0;while(null!==(d=f(r,a))){var b=c(d[0]);p[v]=b,""===b&&(r.lastIndex=u(a,i(r.lastIndex),l)),v++}return 0===v?null:p}]}))},"485a":function(t,e,n){var r=n("861d");t.exports=function(t,e){var n,o;if("string"===e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if("string"!==e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4930:function(t,e,n){var r=n("2d00"),o=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),c=function(t){return function(e,n,c){var a,u=r(e),f=o(u.length),s=i(c,f);if(t&&n!=n){while(f>s)if(a=u[s++],a!=a)return!0}else for(;f>s;s++)if((t||s in u)&&u[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e,n){var r=n("7b0b"),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},5319:function(t,e,n){"use strict";var r=n("d784"),o=n("d039"),i=n("825a"),c=n("a691"),a=n("50c4"),u=n("577e"),f=n("1d80"),s=n("8aa5"),l=n("0cb2"),d=n("14c3"),p=n("b622"),v=p("replace"),b=Math.max,g=Math.min,x=function(t){return void 0===t?t:String(t)},h=function(){return"$0"==="a".replace(/./,"$0")}(),y=function(){return!!/./[v]&&""===/./[v]("a","$0")}(),m=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}));r("replace",(function(t,e,n){var r=y?"$":"$0";return[function(t,n){var r=f(this),o=void 0==t?void 0:t[v];return void 0!==o?o.call(t,r,n):e.call(u(r),t,n)},function(t,o){var f=i(this),p=u(t);if("string"===typeof o&&-1===o.indexOf(r)&&-1===o.indexOf("$<")){var v=n(e,f,p,o);if(v.done)return v.value}var h="function"===typeof o;h||(o=u(o));var y=f.global;if(y){var m=f.unicode;f.lastIndex=0}var w=[];while(1){var O=d(f,p);if(null===O)break;if(w.push(O),!y)break;var S=u(O[0]);""===S&&(f.lastIndex=s(p,a(f.lastIndex),m))}for(var j="",E=0,I=0;I=E&&(j+=p.slice(E,A)+_,E=A+P.length)}return j+p.slice(E)}]}),!m||!h||y)},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),c=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(c(t)),n=i.f;return n?e.concat(n(t)):e}},"577e":function(t,e,n){var r=n("d9b5");t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6547:function(t,e,n){var r=n("a691"),o=n("577e"),i=n("1d80"),c=function(t){return function(e,n){var c,a,u=o(i(e)),f=r(n),s=u.length;return f<0||f>=s?t?"":void 0:(c=u.charCodeAt(f),c<55296||c>56319||f+1===s||(a=u.charCodeAt(f+1))<56320||a>57343?t?u.charAt(f):c:t?u.slice(f,f+2):a-56320+(c-55296<<10)+65536)}};t.exports={codeAt:c(!1),charAt:c(!0)}},"65f0":function(t,e,n){var r=n("0b42");t.exports=function(t,e){return new(r(t))(0===e?0:e)}},"69f3":function(t,e,n){var r,o,i,c=n("7f9a"),a=n("da84"),u=n("861d"),f=n("9112"),s=n("5135"),l=n("c6cd"),d=n("f772"),p=n("d012"),v="Object already initialized",b=a.WeakMap,g=function(t){return i(t)?o(t):r(t,{})},x=function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(c||l.state){var h=l.state||(l.state=new b),y=h.get,m=h.has,w=h.set;r=function(t,e){if(m.call(h,t))throw new TypeError(v);return e.facade=t,w.call(h,t,e),e},o=function(t){return y.call(h,t)||{}},i=function(t){return m.call(h,t)}}else{var O=d("state");p[O]=!0,r=function(t,e){if(s(t,O))throw new TypeError(v);return e.facade=t,f(t,O,e),e},o=function(t){return s(t,O)?t[O]:{}},i=function(t){return s(t,O)}}t.exports={set:r,get:o,has:i,enforce:g,getterFor:x}},"6eeb":function(t,e,n){var r=n("da84"),o=n("9112"),i=n("5135"),c=n("ce4e"),a=n("8925"),u=n("69f3"),f=u.get,s=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,a){var u,f=!!a&&!!a.unsafe,d=!!a&&!!a.enumerable,p=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),u=s(n),u.source||(u.source=l.join("string"==typeof e?e:""))),t!==r?(f?!p&&t[e]&&(d=!0):delete t[e],d?t[e]=n:o(t,e,n)):d?t[e]=n:c(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||a(this)}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),c=n("7839"),a=n("d012"),u=n("1be4"),f=n("cc12"),s=n("f772"),l=">",d="<",p="prototype",v="script",b=s("IE_PROTO"),g=function(){},x=function(t){return d+v+l+t+d+"/"+v+l},h=function(t){t.write(x("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){var t,e=f("iframe"),n="java"+v+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(x("document.F=Object")),t.close(),t.F},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}m="undefined"!=typeof document?document.domain&&r?h(r):y():h(r);var t=c.length;while(t--)delete m[p][c[t]];return m()};a[b]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[p]=o(t),n=new g,g[p]=null,n[b]=t):n=m(),void 0===e?n:i(n,e)}},"7f9a":function(t,e,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("a04b"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var c=r(e);c in t?o.f(t,c,i(0,n)):t[c]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){if(document.currentScript)return document.currentScript;try{throw new Error}catch(l){var t,e,n,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,o=/@([^@]*):(\d+):(\d+)\s*$/gi,i=r.exec(l.stack)||o.exec(l.stack),c=i&&i[1]||!1,a=i&&i[2]||!1,u=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");c===u&&(t=document.documentElement.outerHTML,e=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*