hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
1857b249f95ce9e4d6ac512a206a6d2de17892b2
133
js
JavaScript
src/Test/Test.react.js
laurentiu1981/material-ui-utils
547b050fc76fc9e9266df08c793d4eec3965c1cc
[ "MIT" ]
null
null
null
src/Test/Test.react.js
laurentiu1981/material-ui-utils
547b050fc76fc9e9266df08c793d4eec3965c1cc
[ "MIT" ]
7
2021-03-10T03:49:04.000Z
2022-03-08T23:08:59.000Z
src/Test/Test.react.js
laurentiu1981/material-ui-utils
547b050fc76fc9e9266df08c793d4eec3965c1cc
[ "MIT" ]
null
null
null
import React from 'react' class Test extends React.Component { render() { return (<div>Test</div>) } } export default Test
13.3
36
0.669173
1858b05109fdad68ddf4f7b031fd2bf4fa72d49a
178
js
JavaScript
api/utils/constants.js
huangcrab/importal_project
50f2b34a8deb110d1812ec7c84620fc6c0cec595
[ "ISC" ]
null
null
null
api/utils/constants.js
huangcrab/importal_project
50f2b34a8deb110d1812ec7c84620fc6c0cec595
[ "ISC" ]
3
2021-03-10T01:44:08.000Z
2022-02-26T21:12:45.000Z
api/utils/constants.js
huangcrab/whale
e9cc7781490b460ac26d74bce01cf0aa16efe63b
[ "ISC" ]
null
null
null
"use strict"; exports.mongoUri = "mongodb://localhost:27017/importal"; exports.PORT = process.env.PORT || 3001; exports.SECRET = process.env.SECRET || "super-secret-passphrase";
35.6
65
0.741573
1858c3447dc39db5f74a6bc1ab42d99ad8bfbadf
2,181
js
JavaScript
arcgis_js_api/library/3.17/3.17compact/dojo/cldr/nls/tr/ethiopic.js
darklilium/PO_Filiales
7d71dcd46b26bd87ef8f0354138b84eeac245bca
[ "MIT" ]
1
2019-11-05T16:47:26.000Z
2019-11-05T16:47:26.000Z
arcgis_js_api/library/3.17/3.17compact/dojo/cldr/nls/tr/ethiopic.js
darklilium/PO_Filiales
7d71dcd46b26bd87ef8f0354138b84eeac245bca
[ "MIT" ]
13
2017-03-23T15:37:01.000Z
2018-08-08T21:10:05.000Z
arcgis_js_api/library/3.17/3.17compact/dojo/cldr/nls/tr/ethiopic.js
darklilium/Factigis
6d0a8957d2ee84dce82731d74afc1f5246fbf494
[ "MIT" ]
null
null
null
/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ //>>built define("dojo/cldr/nls/tr/ethiopic",{"field-sat-relative+0":"bu cumartesi","field-sat-relative+1":"gelecek cumartesi","field-dayperiod":"\u00d6\u00d6/\u00d6S","field-sun-relative+-1":"ge\u00e7en pazar","field-mon-relative+-1":"ge\u00e7en pazartesi","field-minute":"Dakika","field-day-relative+-1":"d\u00fcn","field-weekday":"Haftan\u0131n G\u00fcn\u00fc","field-day-relative+-2":"evvelsi g\u00fcn","field-era":"Miladi D\u00f6nem","field-hour":"Saat","field-sun-relative+0":"bu pazar","field-sun-relative+1":"gelecek pazar", "field-wed-relative+-1":"ge\u00e7en \u00e7ar\u015famba","field-day-relative+0":"bug\u00fcn","field-day-relative+1":"yar\u0131n","field-day-relative+2":"\u00f6b\u00fcr g\u00fcn","field-tue-relative+0":"bu sal\u0131","field-zone":"Saat Dilimi","field-tue-relative+1":"gelecek sal\u0131","field-week-relative+-1":"ge\u00e7en hafta","field-year-relative+0":"bu y\u0131l","field-year-relative+1":"gelecek y\u0131l","field-sat-relative+-1":"ge\u00e7en cumartesi","field-year-relative+-1":"ge\u00e7en y\u0131l", "field-year":"Y\u0131l","field-fri-relative+0":"bu cuma","field-fri-relative+1":"gelecek cuma","field-week":"Hafta","field-week-relative+0":"bu hafta","field-week-relative+1":"gelecek hafta","field-month-relative+0":"bu ay","field-month":"Ay","field-month-relative+1":"gelecek ay","field-fri-relative+-1":"ge\u00e7en cuma","field-second":"Saniye","field-tue-relative+-1":"ge\u00e7en sal\u0131","field-day":"G\u00fcn","field-mon-relative+0":"bu pazartesi","field-mon-relative+1":"gelecek pazartesi","field-thu-relative+0":"bu per\u015fembe", "field-second-relative+0":"\u015fimdi","field-thu-relative+1":"gelecek per\u015fembe","field-wed-relative+0":"bu \u00e7ar\u015famba","months-format-wide":"Meskerem Tikimt Hidar Tahsas Tir Yakatit Magabit Miyazya Ginbot Sene Hamle Nehasa Pagumiene".split(" "),"field-wed-relative+1":"gelecek \u00e7ar\u015famba","field-month-relative+-1":"ge\u00e7en ay","field-thu-relative+-1":"ge\u00e7en per\u015fembe"});
198.272727
540
0.731316
185a11fc544e5f3fbd8396414eb1955f82e7cc23
1,276
js
JavaScript
ObjectStatic.class.js
Remich/2d-game-engine
98a0b663f59c0fe10e50d4eb4e4a163c054d6371
[ "MIT" ]
null
null
null
ObjectStatic.class.js
Remich/2d-game-engine
98a0b663f59c0fe10e50d4eb4e4a163c054d6371
[ "MIT" ]
null
null
null
ObjectStatic.class.js
Remich/2d-game-engine
98a0b663f59c0fe10e50d4eb4e4a163c054d6371
[ "MIT" ]
null
null
null
import { GameObject } from './Object.class.js' var ObjectStatic = function() { var that = new GameObject(); that.sensors_flipped = null; that.heightMaps = []; that.heightMaps_flipped = []; that.default_sensor_height = 42; that.physics = function() { }; that.frame_update = function () { this.frame_speed = 0.2; this.frame += this.frame_speed /** filter_fps_lag()*/; }; that.updateSensors = function() { for (var a in that.sensors) { that.sensors[a].update(that); } }; that.resetSensors = function() { for (var a in that.sensors) { that.sensors[a].colliding_with.clear(); that.sensors[a].colliding = false; } that.colliding_sensors.clear(); }; that.initFlippedHeightMaps = function() { that.heightMaps_flipped['floor'] = that.heightMaps['floor'].slice(0).reverse() ; }; that.flip = function() { var tmp; that.flipped = true; /* * Flip Sensors */ that.initFlippedSensors(); tmp = that.sensors; that.sensors = that.sensors_flipped; that.sensors_flipped = tmp; /* * Flip HeightMaps */ that.initFlippedHeightMaps(); tmp = that.heightMaps; that.heightMaps = that.heightMaps_flipped; that.heightMaps_flipped = tmp; that.updateSensors(); }; return that; }; export { ObjectStatic }
17.971831
82
0.661442
185b5cba4ec23d8ba50aadeb1635d98e8d687f4d
885
js
JavaScript
commands/touch.js
renhao/att
ea4af1c7daff7636ea33bc03507c68d9190389e1
[ "MIT-0" ]
null
null
null
commands/touch.js
renhao/att
ea4af1c7daff7636ea33bc03507c68d9190389e1
[ "MIT-0" ]
null
null
null
commands/touch.js
renhao/att
ea4af1c7daff7636ea33bc03507c68d9190389e1
[ "MIT-0" ]
null
null
null
var fs = require('fs'), path = require('path'), Project = require('../core/Project.js').Project, wrench = require('wrench'); /** * command name */ exports.name = "touch"; /** * @option target {String} */ exports.execute = function(options, callback){ options = options || {}; var target = options.target, dirname, content = options.content || "", charset = options.charset || "utf-8"; if(!target){ return callback(new Error("The target option is required")); } if(Project.currentProject){ target = path.resolve(Project.currentProject.basedir, target); } dirname = path.dirname(target); if(!path.existsSync(dirname)){ try{ wrench.mkdirSyncRecursive(dirname, options.permission || 0777); }catch(err){ return callback(err); } } try{ fs.writeFileSync(target, content, charset); }catch(err){ return callback(err); } return callback(); };
20.113636
66
0.662147
185be009eb80dde2791cf8821dcab1576243f043
2,245
js
JavaScript
webpack.react.js
oslabs-beta/catsnake-electron-security
9d4fbbcf362e9092342f591d5afd1f3e1e7f9787
[ "MIT" ]
1
2021-08-05T07:02:23.000Z
2021-08-05T07:02:23.000Z
webpack.react.js
oslabs-beta/catsnake-electron-security
9d4fbbcf362e9092342f591d5afd1f3e1e7f9787
[ "MIT" ]
null
null
null
webpack.react.js
oslabs-beta/catsnake-electron-security
9d4fbbcf362e9092342f591d5afd1f3e1e7f9787
[ "MIT" ]
null
null
null
const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const path = require('path'); module.exports = { mode: "development", entry: './src/renderer/index.tsx', target: 'electron-renderer', devtool: 'source-map', devServer: { contentBase: path.join(__dirname, 'dist/renderer/index.js'), compress: true, hot: true, port: 8080, }, resolve: { alias: { ['@']: path.resolve(__dirname, 'src') }, extensions: ['.tsx', '.ts', '.js', '.jsx'], }, module: { rules: [ { test: /\.(js(x?)|ts(x?))$/, include: /src/, use: [{ loader: 'ts-loader' }] }, { test: /.(js|jsx)$/, include: /src/, loader: 'babel-loader', options: { presets: ['@babel/preset-env', '@babel/preset-react'], }, }, { test: /\.css$/, use: [ MiniCssExtractPlugin.loader, "css-loader", "postcss-loader", ], }, { test: /\.svg$/, use: [ { loader: 'svg-url-loader', options: { limit: 10000, }, }, ], }, ] }, output: { path: __dirname + '/dist/renderer', filename: 'index.js' }, devServer: { /*The bundled files will be available in the browser under this path. publicPath says that any request made to '/' will be served the development version of our bundle via localhost:8080. publicPath should match where we have index.html */ publicPath: '/dist', hot: true, // Tell the server where to serve content from. contentBase: path.resolve(__dirname, './dist'), watchContentBase: true, // Proxy says taht any request made to '/api' will be routed to our server on localhost:3000 // proxy should match whatever is going to match your fetch request on your frontend. }, plugins: [ new HtmlWebpackPlugin({ template: './index.html', filename: path.join(__dirname, "./dist/index.html") }), new MiniCssExtractPlugin({ filename: "styles.css", chunkFilename: path.join(__dirname, "./dist/src/styles.css") }) ] };
26.411765
170
0.552339
185c4cc901d2eb718b7dc587d1b980f58dd58166
3,039
js
JavaScript
lib/set-script.js
cyntler/cli
62c731545e83f3c7f890d6b4feb6f7544884bd3c
[ "Artistic-2.0" ]
2
2021-12-16T09:20:31.000Z
2021-12-16T15:07:19.000Z
lib/set-script.js
cyntler/cli
62c731545e83f3c7f890d6b4feb6f7544884bd3c
[ "Artistic-2.0" ]
2
2022-01-13T15:57:57.000Z
2022-01-13T15:58:41.000Z
lib/set-script.js
cyntler/cli
62c731545e83f3c7f890d6b4feb6f7544884bd3c
[ "Artistic-2.0" ]
10
2021-11-10T16:39:50.000Z
2022-02-28T07:27:36.000Z
const { resolve } = require('path') const log = require('npmlog') const rpj = require('read-package-json-fast') const PackageJson = require('@npmcli/package-json') const BaseCommand = require('./base-command.js') class SetScript extends BaseCommand { /* istanbul ignore next - see test/lib/load-all-commands.js */ static get description () { return 'Set tasks in the scripts section of package.json' } /* istanbul ignore next - see test/lib/load-all-commands.js */ static get params () { return ['workspace', 'workspaces', 'include-workspace-root'] } /* istanbul ignore next - see test/lib/load-all-commands.js */ static get name () { return 'set-script' } /* istanbul ignore next - see test/lib/load-all-commands.js */ static get usage () { return ['[<script>] [<command>]'] } async completion (opts) { const argv = opts.conf.argv.remain if (argv.length === 2) { // find the script name const json = resolve(this.npm.localPrefix, 'package.json') const { scripts = {} } = await rpj(json).catch(er => ({})) return Object.keys(scripts) } } validate (args) { if (process.env.npm_lifecycle_event === 'postinstall') throw new Error('Scripts can’t set from the postinstall script') // Parse arguments if (args.length !== 2) throw new Error(`Expected 2 arguments: got ${args.length}`) } exec (args, cb) { this.setScript(args).then(() => cb()).catch(cb) } async setScript (args) { this.validate(args) const warn = await this.doSetScript(this.npm.localPrefix, args[0], args[1]) if (warn) log.warn('set-script', `Script "${args[0]}" was overwritten`) } execWorkspaces (args, filters, cb) { this.setScriptWorkspaces(args, filters).then(() => cb()).catch(cb) } async setScriptWorkspaces (args, filters) { this.validate(args) await this.setWorkspaces(filters) for (const [name, path] of this.workspaces) { try { const warn = await this.doSetScript(path, args[0], args[1]) if (warn) { log.warn('set-script', `Script "${args[0]}" was overwritten`) log.warn(` in workspace: ${name}`) log.warn(` at location: ${path}`) } } catch (err) { log.error('set-script', err.message) log.error(` in workspace: ${name}`) log.error(` at location: ${path}`) process.exitCode = 1 } } } // returns a Boolean that will be true if // the requested script was overwritten // and false if it was set as a new script async doSetScript (path, name, value) { let warn = false const pkgJson = await PackageJson.load(path) const { scripts } = pkgJson.content const overwriting = scripts && scripts[name] && scripts[name] !== value if (overwriting) warn = true pkgJson.update({ scripts: { ...scripts, [name]: value, }, }) await pkgJson.save() return warn } } module.exports = SetScript
26.893805
79
0.609082
185d2ef779fa534bfab627e67472d821e2f7f7ce
333
js
JavaScript
wmp2/src/views/NavBarView.js
water-my-plants-app-2/WMP2-FE-1
5528c2a53b64ad1a52a6f2c2862c4a184164dee1
[ "MIT" ]
null
null
null
wmp2/src/views/NavBarView.js
water-my-plants-app-2/WMP2-FE-1
5528c2a53b64ad1a52a6f2c2862c4a184164dee1
[ "MIT" ]
null
null
null
wmp2/src/views/NavBarView.js
water-my-plants-app-2/WMP2-FE-1
5528c2a53b64ad1a52a6f2c2862c4a184164dee1
[ "MIT" ]
null
null
null
import React from 'react'; import NavBar from '../components/NavBar'; class NavBarView extends React.Component { // constructor(props){ // super(props); // } render() { return( <div> <NavBar /> </div> ) } } export default NavBarView;
16.65
42
0.483483
185dd08f7805a84d66b590d1710d61b6f30c3096
314,672
js
JavaScript
dist/index.cjs.js
SirTristanKnightsDefi/TrunksInuUi
ecaad9d7ab052c7cb26c1664bc9dd5fbd3c104b4
[ "MIT" ]
null
null
null
dist/index.cjs.js
SirTristanKnightsDefi/TrunksInuUi
ecaad9d7ab052c7cb26c1664bc9dd5fbd3c104b4
[ "MIT" ]
null
null
null
dist/index.cjs.js
SirTristanKnightsDefi/TrunksInuUi
ecaad9d7ab052c7cb26c1664bc9dd5fbd3c104b4
[ "MIT" ]
null
null
null
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var React = require('react'); var styled = require('styled-components'); var styledSystem = require('styled-system'); var get = require('lodash/get'); var noop = require('lodash/noop'); var debounce = require('lodash/debounce'); var throttle = require('lodash/throttle'); var reactRouterDom = require('react-router-dom'); var reactTransitionGroup = require('react-transition-group'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var React__default = /*#__PURE__*/_interopDefaultLegacy(React); var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled); var get__default = /*#__PURE__*/_interopDefaultLegacy(get); var noop__default = /*#__PURE__*/_interopDefaultLegacy(noop); var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce); var throttle__default = /*#__PURE__*/_interopDefaultLegacy(throttle); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; } var getThemeValue = function (path, fallback) { return function (theme) { return get__default['default'](theme, path, fallback); }; }; var rotate$1 = styled.keyframes(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"], ["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))); var spinStyle = styled.css(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n animation: ", " 2s linear infinite;\n"], ["\n animation: ", " 2s linear infinite;\n"])), rotate$1); var Svg = styled__default['default'].svg(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n fill: ", ";\n flex-shrink: 0;\n\n ", "\n ", "\n"], ["\n fill: ", ";\n flex-shrink: 0;\n\n ", "\n ", "\n"])), function (_a) { var theme = _a.theme, color = _a.color; return getThemeValue("colors." + color, color)(theme); }, function (_a) { var spin = _a.spin; return spin && spinStyle; }, styledSystem.space); Svg.defaultProps = { color: "text", width: "20px", xmlns: "http://www.w3.org/2000/svg", spin: false, }; var templateObject_1$P, templateObject_2$i, templateObject_3$9; var Icon$1d = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM15.88 8.29L10 14.17L8.12 12.29C7.73 11.9 7.1 11.9 6.71 12.29C6.32 12.68 6.32 13.31 6.71 13.7L9.3 16.29C9.69 16.68 10.32 16.68 10.71 16.29L17.3 9.7C17.69 9.31 17.69 8.68 17.3 8.29C16.91 7.9 16.27 7.9 15.88 8.29Z" }))); }; var Icon$1c = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 7C12.55 7 13 7.45 13 8V12C13 12.55 12.55 13 12 13C11.45 13 11 12.55 11 12V8C11 7.45 11.45 7 12 7ZM11.99 2C6.47 2 2 6.48 2 12C2 17.52 6.47 22 11.99 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 11.99 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20ZM13 17H11V15H13V17Z" }))); }; var Icon$1b = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22ZM12 4C16.42 4 20 7.58 20 12C20 13.85 19.37 15.55 18.31 16.9L7.1 5.69C8.45 4.63 10.15 4 12 4ZM5.69 7.1L16.9 18.31C15.55 19.37 13.85 20 12 20C7.58 20 4 16.42 4 12C4 10.15 4.63 8.45 5.69 7.1Z" }))); }; var Icon$1a = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M11 7H13V9H11V7ZM12 17C12.55 17 13 16.55 13 16V12C13 11.45 12.55 11 12 11C11.45 11 11 11.45 11 12V16C11 16.55 11.45 17 12 17ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z" }))); }; var getColor = function (_a) { var color = _a.color, theme = _a.theme; return getThemeValue("colors." + color, color)(theme); }; var getFontSize = function (_a) { var fontSize = _a.fontSize, small = _a.small; return small ? "14px" : fontSize || "16px"; }; var Text = styled__default['default'].div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: 1.5;\n ", "\n ", "\n ", "\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: 1.5;\n ", "\n ", "\n ", "\n"])), getColor, getFontSize, function (_a) { var bold = _a.bold; return (bold ? 600 : 400); }, function (_a) { var textTransform = _a.textTransform; return textTransform && "text-transform: " + textTransform + ";"; }, styledSystem.space, styledSystem.typography); Text.defaultProps = { color: "text", small: false, }; var templateObject_1$O; var getExternalLinkProps = function () { return ({ target: "_blank", rel: "noreferrer noopener", }); }; var scales$5 = { MD: "md", SM: "sm", XS: "xs", }; var variants$3 = { PRIMARY: "primary", SECONDARY: "secondary", TERTIARY: "tertiary", TEXT: "text", DANGER: "danger", SUBTLE: "subtle", SUCCESS: "success", }; var _a$4, _b$1; var scaleVariants$1 = (_a$4 = {}, _a$4[scales$5.MD] = { height: "48px", padding: "0 24px", }, _a$4[scales$5.SM] = { height: "32px", padding: "0 16px", }, _a$4[scales$5.XS] = { height: "20px", fontSize: "12px", padding: "0 8px", }, _a$4); var styleVariants$2 = (_b$1 = {}, _b$1[variants$3.PRIMARY] = { backgroundColor: "primary", color: "white", }, _b$1[variants$3.SECONDARY] = { backgroundColor: "transparent", border: "2px solid", borderColor: "primary", boxShadow: "none", color: "primary", ":disabled": { backgroundColor: "transparent", }, }, _b$1[variants$3.TERTIARY] = { backgroundColor: "tertiary", boxShadow: "none", color: "primary", }, _b$1[variants$3.SUBTLE] = { backgroundColor: "textSubtle", color: "white", }, _b$1[variants$3.DANGER] = { backgroundColor: "failure", color: "white", }, _b$1[variants$3.SUCCESS] = { backgroundColor: "success", color: "white", }, _b$1[variants$3.TEXT] = { backgroundColor: "transparent", color: "primary", boxShadow: "none", }, _b$1); var getDisabledStyles = function (_a) { var isLoading = _a.isLoading, theme = _a.theme; if (isLoading === true) { return "\n &:disabled,\n &.pancake-button--disabled {\n cursor: not-allowed;\n }\n "; } return "\n &:disabled,\n &.pancake-button--disabled {\n background-color: " + theme.colors.backgroundDisabled + ";\n border-color: " + theme.colors.backgroundDisabled + ";\n box-shadow: none;\n color: " + theme.colors.textDisabled + ";\n cursor: not-allowed;\n }\n "; }; var getOpacity = function (_a) { var _b = _a.$isLoading, $isLoading = _b === void 0 ? false : _b; return $isLoading ? ".5" : "1"; }; var StyledButton = styled__default['default'].button(templateObject_1$N || (templateObject_1$N = __makeTemplateObject(["\n align-items: center;\n border: 0;\n border-radius: 16px;\n box-shadow: 0px -1px 0px 0px rgba(14, 14, 44, 0.4) inset;\n cursor: pointer;\n display: inline-flex;\n font-family: inherit;\n font-size: 16px;\n font-weight: 600;\n justify-content: center;\n letter-spacing: 0.03em;\n line-height: 1;\n opacity: ", ";\n outline: 0;\n transition: background-color 0.2s;\n\n &:hover:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled):not(:active) {\n opacity: 0.65;\n }\n\n &:active:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled) {\n opacity: 0.85;\n }\n\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n align-items: center;\n border: 0;\n border-radius: 16px;\n box-shadow: 0px -1px 0px 0px rgba(14, 14, 44, 0.4) inset;\n cursor: pointer;\n display: inline-flex;\n font-family: inherit;\n font-size: 16px;\n font-weight: 600;\n justify-content: center;\n letter-spacing: 0.03em;\n line-height: 1;\n opacity: ", ";\n outline: 0;\n transition: background-color 0.2s;\n\n &:hover:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled):not(:active) {\n opacity: 0.65;\n }\n\n &:active:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled) {\n opacity: 0.85;\n }\n\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), getOpacity, getDisabledStyles, styledSystem.variant({ prop: "scale", variants: scaleVariants$1, }), styledSystem.variant({ variants: styleVariants$2, }), styledSystem.layout, styledSystem.space); var templateObject_1$N; var Button = function (props) { var startIcon = props.startIcon, endIcon = props.endIcon, external = props.external, className = props.className, isLoading = props.isLoading, disabled = props.disabled, children = props.children, rest = __rest(props, ["startIcon", "endIcon", "external", "className", "isLoading", "disabled", "children"]); var internalProps = external ? getExternalLinkProps() : {}; var isDisabled = isLoading || disabled; var classNames = className ? [className] : []; if (isLoading) { classNames.push("pancake-button--loading"); } if (isDisabled && !isLoading) { classNames.push("pancake-button--disabled"); } return (React__default['default'].createElement(StyledButton, __assign({ "$isLoading": isLoading, className: classNames.join(" "), disabled: isDisabled }, internalProps, rest), React__default['default'].createElement(React__default['default'].Fragment, null, React.isValidElement(startIcon) && React.cloneElement(startIcon, { mr: "0.5rem", }), children, React.isValidElement(endIcon) && React.cloneElement(endIcon, { ml: "0.5rem", })))); }; Button.defaultProps = { isLoading: false, external: false, variant: variants$3.PRIMARY, scale: scales$5.MD, disabled: false, }; var IconButton = styled__default['default'](Button)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n padding: 0;\n width: ", ";\n"], ["\n padding: 0;\n width: ", ";\n"])), function (_a) { var scale = _a.scale; return (scale === "sm" ? "32px" : "48px"); }); var templateObject_1$M; var Icon$19 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z" }))); }; var Icon$18 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M19 11H7.82998L12.71 6.12C13.1 5.73 13.1 5.09 12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7L4.70998 11.29C4.31998 11.68 4.31998 12.31 4.70998 12.7L11.3 19.29C11.69 19.68 12.32 19.68 12.71 19.29C13.1 18.9 13.1 18.27 12.71 17.88L7.82998 13H19C19.55 13 20 12.55 20 12C20 11.45 19.55 11 19 11Z" }))); }; var Icon$17 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M11 5V16.17L6.11997 11.29C5.72997 10.9 5.08997 10.9 4.69997 11.29C4.30997 11.68 4.30997 12.31 4.69997 12.7L11.29 19.29C11.68 19.68 12.31 19.68 12.7 19.29L19.29 12.7C19.68 12.31 19.68 11.68 19.29 11.29C18.9 10.9 18.27 10.9 17.88 11.29L13 16.17V5C13 4.45 12.55 4 12 4C11.45 4 11 4.45 11 5Z" }))); }; var Icon$16 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M8.71005 11.71L11.3001 14.3C11.6901 14.69 12.3201 14.69 12.7101 14.3L15.3001 11.71C15.9301 11.08 15.4801 10 14.5901 10H9.41005C8.52005 10 8.08005 11.08 8.71005 11.71Z" }))); }; var Icon$15 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M8.71005 12.29L11.3001 9.69997C11.6901 9.30997 12.3201 9.30997 12.7101 9.69997L15.3001 12.29C15.9301 12.92 15.4801 14 14.5901 14H9.41005C8.52005 14 8.08005 12.92 8.71005 12.29Z" }))); }; var Icon$14 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z" }))); }; var Icon$13 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M13 19V7.83001L17.88 12.71C18.27 13.1 18.91 13.1 19.3 12.71C19.69 12.32 19.69 11.69 19.3 11.3L12.71 4.71001C12.32 4.32001 11.69 4.32001 11.3 4.71001L4.69997 11.29C4.30997 11.68 4.30997 12.31 4.69997 12.7C5.08997 13.09 5.71997 13.09 6.10997 12.7L11 7.83001V19C11 19.55 11.45 20 12 20C12.55 20 13 19.55 13 19Z" }))); }; var Icon$12 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 6V7.79C12 8.24 12.54 8.46 12.85 8.14L15.64 5.35C15.84 5.15 15.84 4.84 15.64 4.64L12.85 1.85C12.54 1.54 12 1.76 12 2.21V4C7.58 4 4 7.58 4 12C4 13.04 4.2 14.04 4.57 14.95C4.84 15.62 5.7 15.8 6.21 15.29C6.48 15.02 6.59 14.61 6.44 14.25C6.15 13.56 6 12.79 6 12C6 8.69 8.69 6 12 6ZM17.79 8.71C17.52 8.98 17.41 9.4 17.56 9.75C17.84 10.45 18 11.21 18 12C18 15.31 15.31 18 12 18V16.21C12 15.76 11.46 15.54 11.15 15.86L8.36 18.65C8.16 18.85 8.16 19.16 8.36 19.36L11.15 22.15C11.46 22.46 12 22.24 12 21.8V20C16.42 20 20 16.42 20 12C20 10.96 19.8 9.96 19.43 9.05C19.16 8.38 18.3 8.2 17.79 8.71Z" }))); }; var Icon$11 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 16 16" }, props), React__default['default'].createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M5.01656 8.00006L3.79256 9.23256L2.56006 8.00006L3.79256 6.76756L5.01656 8.00006ZM8.00006 5.01656L10.1081 7.12456L11.3406 5.89206L9.23256 3.79256L8.00006 2.56006L6.76756 3.79256L4.66806 5.89206L5.90056 7.12456L8.00006 5.01656ZM12.2076 6.76756L10.9836 8.00006L12.2161 9.23256L13.4401 8.00006L12.2076 6.76756ZM8.00006 10.9836L5.89206 8.87556L4.66806 10.1081L6.77606 12.2161L8.00006 13.4401L9.23256 12.2076L11.3406 10.0996L10.1081 8.87556L8.00006 10.9836ZM8.00006 9.23256L9.23256 8.00006L8.00006 6.76756L6.76756 8.00006L8.00006 9.23256Z", fill: "#FFFDFA" }))); }; var Icon$10 = function (props) { var theme = styled.useTheme(); var primaryColor = theme.isDark ? "#3C3742" : "#e9eaeb"; var secondaryColor = theme.isDark ? "#666171" : "#bdc2c4"; return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 72 72" }, props), React__default['default'].createElement("path", { d: "M72 36C72 55.8823 55.8823 72 36 72C16.1177 72 0 55.8823 0 36C0 16.1177 16.1177 0 36 0C55.8823 0 72 16.1177 72 36Z", fill: primaryColor }), React__default['default'].createElement("mask", { id: "mask0", "mask-type": "alpha", maskUnits: "userSpaceOnUse", x: "3", y: "3", width: "66", height: "66" }, React__default['default'].createElement("path", { d: "M68.25 36C68.25 53.8112 53.8112 68.25 36 68.25C18.1888 68.25 3.75 53.8112 3.75 36C3.75 18.1888 18.1888 3.75 36 3.75C53.8112 3.75 68.25 18.1888 68.25 36Z", fill: "#C4C4C4" })), React__default['default'].createElement("g", { mask: "url(#mask0)" }, React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.9927 23.2654C26.1289 23.1362 30.0824 27.7278 29.2039 32.7879L27.6838 41.5445C30.2298 41.0514 32.9304 40.7875 35.7229 40.7875C37.7063 40.7875 39.6424 40.9206 41.5089 41.1741L49.2862 29.5726C51.7713 25.8657 56.7909 24.8751 60.4978 27.3602C64.7827 30.2326 65.3155 36.33 61.5938 39.9021L55.2585 45.9828C59.9045 49.0009 63.1305 53.2977 63.1306 58.4066V62.322C63.1306 67.644 59.6097 72.0998 54.6877 75.1077C49.7272 78.1391 43.0165 79.9412 35.7229 79.9412C28.4292 79.9412 21.7186 78.1391 16.7581 75.1077C11.836 72.0998 8.31519 67.644 8.31519 62.322V58.4067C8.31522 54.4286 10.2963 50.9169 13.3384 48.1585L13.0101 31.6154C12.9208 27.115 16.4929 23.3785 20.9927 23.2654ZM15.617 49.1514C15.6003 49.0112 15.5903 48.8688 15.5874 48.7246L15.2471 31.571C15.1822 28.3014 17.7798 25.5842 21.049 25.502C24.7712 25.4084 27.637 28.733 26.9996 32.4052L24.8971 44.5163C25.6681 44.2915 26.4607 44.0899 27.2726 43.9131C29.9138 43.338 32.7585 43.0248 35.7229 43.0248C38.1625 43.0248 40.5211 43.237 42.7519 43.6326C42.8725 43.2609 43.0459 42.8995 43.2742 42.5589L51.1446 30.8185C52.9416 28.1379 56.5714 27.4216 59.252 29.2186C62.3505 31.2957 62.7358 35.7049 60.0446 38.2879L51.5469 46.4441C52.264 46.7988 52.9486 47.1771 53.5975 47.577C58.1074 50.3568 60.8932 54.1829 60.8932 58.4066V62.322C60.8932 70.8172 49.6241 77.7039 35.7229 77.7039C21.8217 77.7039 10.5525 70.8172 10.5525 62.322V58.4067C10.5526 54.9322 12.4377 51.7266 15.617 49.1514Z", fill: secondaryColor }), React__default['default'].createElement("path", { d: "M60.8932 62.3221C60.8932 70.8173 49.624 77.704 35.7228 77.704C21.8216 77.704 10.5525 70.8173 10.5525 62.3221V58.4067H60.8932V62.3221Z", fill: primaryColor }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M26.9995 32.4051C27.637 28.733 24.7711 25.4083 21.0489 25.5019C17.7797 25.5842 15.1821 28.3013 15.247 31.5709L15.5874 48.7245C15.5903 48.8687 15.6002 49.0111 15.617 49.1513C12.4376 51.7266 10.5525 54.9321 10.5525 58.4066C10.5525 66.9018 21.8216 73.7885 35.7228 73.7885C49.624 73.7885 60.8932 66.9018 60.8932 58.4066C60.8932 53.5752 57.2481 49.264 51.5468 46.444L60.0445 38.2879C62.7358 35.7048 62.3504 31.2956 59.252 29.2185C56.5714 27.4215 52.9416 28.1378 51.1446 30.8184L43.2742 42.5588C43.0458 42.8994 42.8724 43.2609 42.7519 43.6326C40.521 43.2369 38.1625 43.0248 35.7228 43.0248C31.8473 43.0248 28.1763 43.56 24.897 44.5162L26.9995 32.4051Z", fill: primaryColor }), React__default['default'].createElement("path", { d: "M32.0873 57.2881C32.0873 59.6049 30.8352 61.4831 29.2906 61.4831C27.746 61.4831 26.4939 59.6049 26.4939 57.2881C26.4939 54.9712 27.746 53.093 29.2906 53.093C30.8352 53.093 32.0873 54.9712 32.0873 57.2881Z", fill: secondaryColor }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M28.891 54.0353C29.461 54.8903 29.8499 56.1359 29.8499 57.5677C29.8499 58.1855 30.3508 58.6864 30.9686 58.6864C31.5864 58.6864 32.0873 58.1855 32.0873 57.5677C32.0873 55.7558 31.5997 54.0649 30.7526 52.7943C29.9107 51.5314 28.6248 50.5759 27.0532 50.5759C25.4816 50.5759 24.1957 51.5314 23.3538 52.7943C22.5067 54.0649 22.0191 55.7558 22.0191 57.5677C22.0191 58.55 22.1622 59.4908 22.4244 60.3463C22.6055 60.937 23.2311 61.2691 23.8218 61.088C24.4125 60.9069 24.7446 60.2813 24.5635 59.6906C24.3685 59.0543 24.2565 58.3349 24.2565 57.5677C24.2565 56.1359 24.6454 54.8903 25.2154 54.0353C25.7906 53.1725 26.4624 52.8133 27.0532 52.8133C27.644 52.8133 28.3158 53.1725 28.891 54.0353Z", fill: secondaryColor }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M48.1883 54.0353C48.7582 54.8903 49.1472 56.1359 49.1472 57.5677C49.1472 58.1855 49.648 58.6864 50.2658 58.6864C50.8837 58.6864 51.3845 58.1855 51.3845 57.5677C51.3845 55.7558 50.8969 54.0649 50.0498 52.7943C49.208 51.5314 47.9221 50.5759 46.3505 50.5759C44.7788 50.5759 43.4929 51.5314 42.6511 52.7943C41.804 54.0649 41.3164 55.7558 41.3164 57.5677C41.3164 58.55 41.4594 59.4908 41.7216 60.3463C41.9027 60.937 42.5284 61.2691 43.1191 61.088C43.7098 60.9069 44.0418 60.2813 43.8608 59.6906C43.6657 59.0543 43.5538 58.3349 43.5538 57.5677C43.5538 56.1359 43.9427 54.8903 44.5127 54.0353C45.0879 53.1725 45.7597 52.8133 46.3505 52.8133C46.9412 52.8133 47.613 53.1725 48.1883 54.0353Z", fill: secondaryColor }), React__default['default'].createElement("path", { d: "M51.3844 57.2881C51.3844 59.6049 50.1323 61.4831 48.5877 61.4831C47.0431 61.4831 45.791 59.6049 45.791 57.2881C45.791 54.9712 47.0431 53.093 48.5877 53.093C50.1323 53.093 51.3844 54.9712 51.3844 57.2881Z", fill: secondaryColor }), React__default['default'].createElement("path", { d: "M34.0221 25.9463V25.2697C34.0221 24.32 34.2121 23.5247 34.5919 22.8836C34.9956 22.2426 35.5297 21.6134 36.1945 20.9961C36.8118 20.4026 37.4172 19.8921 38.0108 19.4648C38.6043 19.0374 39.091 18.5863 39.4709 18.1115C39.8508 17.6367 40.0407 17.0787 40.0407 16.4377C40.0407 15.5118 39.7083 14.8589 39.0436 14.479C38.4025 14.0754 37.3223 13.8736 35.8028 13.8736C34.8056 13.8736 33.8203 14.0041 32.8469 14.2653C31.8735 14.5027 31.0425 14.8114 30.354 15.1912V10.3835C31.2325 9.95615 32.2652 9.61189 33.4523 9.35073C34.6632 9.08957 35.9808 8.95898 37.4054 8.95898C40.1594 8.95898 42.2606 9.5644 43.7088 10.7752C45.1571 11.9623 45.8812 13.6005 45.8812 15.6898C45.8812 17.0194 45.6082 18.0996 45.0621 18.9306C44.5161 19.7378 43.7207 20.5688 42.6761 21.4235C41.7976 22.1595 41.0616 22.8005 40.4681 23.3466C39.8745 23.8689 39.5777 24.5812 39.5777 25.4834V25.9463H34.0221ZM33.7728 32.2498V28.1187H39.7914V32.2498H33.7728Z", fill: secondaryColor })), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M71.9838 37.09L69.7348 37.0231C69.7449 36.6834 69.75 36.3423 69.75 36C69.75 35.6577 69.7449 35.3166 69.7348 34.9769L71.9838 34.91C71.9946 35.272 72 35.6354 72 36C72 36.3646 71.9946 36.728 71.9838 37.09ZM71.8544 32.7398L69.6134 32.941C69.5523 32.2603 69.471 31.5857 69.3702 30.9176L71.5949 30.5818C71.7025 31.2945 71.7892 32.014 71.8544 32.7398ZM71.2052 28.4414L69.0048 28.9115C68.8622 28.2441 68.6999 27.5841 68.5185 26.932L70.6861 26.3289C70.8798 27.0248 71.053 27.7292 71.2052 28.4414ZM70.0397 24.2525L67.9128 24.9864C67.6906 24.3424 67.4494 23.7072 67.1899 23.0815L69.2683 22.2196C69.5452 22.8874 69.8026 23.5652 70.0397 24.2525ZM68.3746 20.237L66.3524 21.2235C66.0538 20.6114 65.7373 20.0097 65.4034 19.419L67.3622 18.3119C67.7183 18.942 68.0561 19.584 68.3746 20.237ZM66.2353 16.4517L64.347 17.6751C63.977 17.104 63.5901 16.5448 63.1872 15.998L64.9984 14.6631C65.4281 15.2462 65.8407 15.8426 66.2353 16.4517ZM63.656 12.952L61.9283 14.3934C61.4925 13.8711 61.0413 13.3621 60.5752 12.8671L62.2132 11.3246C62.7102 11.8523 63.1914 12.3951 63.656 12.952ZM60.6754 9.78678L59.1329 11.4248C58.6379 10.9587 58.1289 10.5074 57.6066 10.0717L59.048 8.34397C59.6049 8.80865 60.1477 9.28984 60.6754 9.78678ZM57.3369 7.00159L56.002 8.8128C55.4552 8.40985 54.896 8.02303 54.3249 7.65302L55.5482 5.76468C56.1574 6.15933 56.7538 6.57187 57.3369 7.00159ZM53.6881 4.63782L52.581 6.5966C51.9903 6.26271 51.3886 5.94615 50.7765 5.64759L51.7629 3.62536C52.416 3.94392 53.058 4.28165 53.6881 4.63782ZM49.7804 2.7317L48.9185 4.81008C48.2928 4.55061 47.6576 4.30943 47.0136 4.08723L47.7475 1.96028C48.4348 2.19743 49.1126 2.4548 49.7804 2.7317ZM45.6711 1.31385L45.068 3.48152C44.4159 3.3001 43.7559 3.13777 43.0885 2.99517L43.5586 0.794831C44.2708 0.947003 44.9752 1.12024 45.6711 1.31385ZM41.4182 0.405049L41.0824 2.62985C40.4143 2.529 39.7397 2.44772 39.059 2.38662L39.2602 0.14563C39.986 0.210778 40.7055 0.297466 41.4182 0.405049ZM37.09 0.0161859C36.728 0.0054207 36.3646 0 36 0C35.6354 0 35.272 0.00542073 34.91 0.016186L34.9769 2.26519C35.3166 2.25509 35.6577 2.25 36 2.25C36.3423 2.25 36.6834 2.25509 37.0231 2.26519L37.09 0.0161859ZM32.7398 0.145631L32.941 2.38662C32.2603 2.44772 31.5857 2.529 30.9176 2.62985L30.5818 0.405049C31.2945 0.297467 32.014 0.210779 32.7398 0.145631ZM28.4414 0.794832L28.9115 2.99517C28.2441 3.13777 27.5841 3.3001 26.932 3.48152L26.3289 1.31386C27.0248 1.12024 27.7292 0.947004 28.4414 0.794832ZM24.2525 1.96028L24.9864 4.08723C24.3424 4.30944 23.7072 4.55061 23.0815 4.81008L22.2196 2.7317C22.8874 2.45481 23.5652 2.19743 24.2525 1.96028ZM20.237 3.62536L21.2235 5.64759C20.6114 5.94616 20.0097 6.26272 19.419 6.5966L18.3119 4.63783C18.942 4.28165 19.584 3.94392 20.237 3.62536ZM16.4517 5.76469L17.6751 7.65302C17.104 8.02303 16.5448 8.40985 15.998 8.81281L14.6631 7.00159C15.2462 6.57188 15.8426 6.15933 16.4517 5.76469ZM12.952 8.34398L14.3934 10.0717C13.8711 10.5075 13.3621 10.9587 12.8671 11.4248L11.3246 9.78679C11.8523 9.28984 12.3951 8.80865 12.952 8.34398ZM9.78678 11.3246L11.4248 12.8671C10.9587 13.3621 10.5074 13.8711 10.0717 14.3934L8.34397 12.952C8.80865 12.3951 9.28984 11.8523 9.78678 11.3246ZM7.00159 14.6631L8.8128 15.998C8.40985 16.5448 8.02303 17.104 7.65302 17.6751L5.76468 16.4518C6.15933 15.8426 6.57187 15.2462 7.00159 14.6631ZM4.63782 18.3119L6.5966 19.419C6.26271 20.0097 5.94615 20.6114 5.64759 21.2235L3.62536 20.2371C3.94392 19.584 4.28165 18.942 4.63782 18.3119ZM2.7317 22.2196L4.81008 23.0815C4.55061 23.7072 4.30943 24.3424 4.08723 24.9864L1.96028 24.2525C2.19743 23.5652 2.4548 22.8874 2.7317 22.2196ZM1.31385 26.3289L3.48152 26.932C3.3001 27.5841 3.13777 28.2441 2.99517 28.9115L0.794831 28.4414C0.947003 27.7292 1.12024 27.0248 1.31385 26.3289ZM0.405049 30.5818L2.62985 30.9176C2.529 31.5857 2.44772 32.2603 2.38662 32.941L0.14563 32.7398C0.210778 32.014 0.297466 31.2945 0.405049 30.5818ZM0.0161859 34.91C0.0054207 35.272 0 35.6354 0 36C0 36.3646 0.00542073 36.728 0.016186 37.09L2.26519 37.0231C2.25509 36.6834 2.25 36.3423 2.25 36C2.25 35.6577 2.25509 35.3166 2.26519 34.9769L0.0161859 34.91ZM0.145631 39.2602L2.38662 39.059C2.44772 39.7397 2.529 40.4143 2.62985 41.0824L0.40505 41.4182C0.297467 40.7055 0.210779 39.986 0.145631 39.2602ZM0.794833 43.5586L2.99517 43.0885C3.13777 43.7559 3.3001 44.4159 3.48152 45.068L1.31386 45.6711C1.12024 44.9752 0.947004 44.2708 0.794833 43.5586ZM1.96028 47.7475L4.08723 47.0136C4.30944 47.6576 4.55061 48.2928 4.81008 48.9185L2.7317 49.7804C2.45481 49.1126 2.19743 48.4348 1.96028 47.7475ZM3.62536 51.763L5.64759 50.7765C5.94616 51.3886 6.26272 51.9903 6.5966 52.581L4.63783 53.6881C4.28165 53.058 3.94392 52.416 3.62536 51.763ZM5.76469 55.5482L7.65302 54.3249C8.02303 54.896 8.40985 55.4552 8.81281 56.002L7.00159 57.3369C6.57188 56.7538 6.15933 56.1574 5.76469 55.5482ZM8.34398 59.048L10.0717 57.6066C10.5075 58.1289 10.9587 58.6379 11.4248 59.1329L9.78679 60.6754C9.28984 60.1477 8.80865 59.6049 8.34398 59.048ZM11.3246 62.2132L12.8671 60.5752C13.3621 61.0413 13.8711 61.4925 14.3934 61.9283L12.952 63.656C12.3951 63.1914 11.8523 62.7102 11.3246 62.2132ZM14.6631 64.9984L15.998 63.1872C16.5448 63.5901 17.104 63.977 17.6751 64.347L16.4518 66.2353C15.8426 65.8407 15.2462 65.4281 14.6631 64.9984ZM18.3119 67.3622L19.419 65.4034C20.0097 65.7373 20.6114 66.0538 21.2235 66.3524L20.2371 68.3746C19.584 68.0561 18.942 67.7184 18.3119 67.3622ZM22.2196 69.2683L23.0815 67.1899C23.7072 67.4494 24.3424 67.6906 24.9864 67.9128L24.2525 70.0397C23.5652 69.8026 22.8874 69.5452 22.2196 69.2683ZM26.3289 70.6861L26.932 68.5185C27.5841 68.6999 28.2441 68.8622 28.9115 69.0048L28.4414 71.2052C27.7292 71.053 27.0248 70.8798 26.3289 70.6861ZM30.5818 71.595L30.9176 69.3702C31.5857 69.471 32.2603 69.5523 32.941 69.6134L32.7398 71.8544C32.014 71.7892 31.2945 71.7025 30.5818 71.595ZM34.91 71.9838L34.9769 69.7348C35.3166 69.7449 35.6577 69.75 36 69.75C36.3423 69.75 36.6834 69.7449 37.0231 69.7348L37.09 71.9838C36.728 71.9946 36.3646 72 36 72C35.6354 72 35.272 71.9946 34.91 71.9838ZM39.2602 71.8544L39.059 69.6134C39.7397 69.5523 40.4143 69.471 41.0824 69.3702L41.4182 71.5949C40.7055 71.7025 39.986 71.7892 39.2602 71.8544ZM43.5586 71.2052L43.0885 69.0048C43.7559 68.8622 44.4159 68.6999 45.068 68.5185L45.6711 70.6861C44.9752 70.8798 44.2708 71.053 43.5586 71.2052ZM47.7475 70.0397L47.0136 67.9128C47.6576 67.6906 48.2928 67.4494 48.9185 67.1899L49.7804 69.2683C49.1126 69.5452 48.4348 69.8026 47.7475 70.0397ZM51.7629 68.3746L50.7765 66.3524C51.3886 66.0538 51.9903 65.7373 52.581 65.4034L53.6881 67.3622C53.058 67.7183 52.416 68.0561 51.7629 68.3746ZM55.5482 66.2353L54.3249 64.347C54.896 63.977 55.4552 63.5901 56.002 63.1872L57.3369 64.9984C56.7538 65.4281 56.1574 65.8407 55.5482 66.2353ZM59.048 63.656L57.6066 61.9283C58.1289 61.4925 58.6379 61.0413 59.1329 60.5752L60.6754 62.2132C60.1477 62.7102 59.6049 63.1914 59.048 63.656ZM62.2132 60.6754L60.5752 59.1329C61.0413 58.6379 61.4925 58.1289 61.9283 57.6066L63.656 59.048C63.1914 59.6049 62.7102 60.1477 62.2132 60.6754ZM64.9984 57.3369L63.1872 56.002C63.5901 55.4552 63.977 54.896 64.347 54.3249L66.2353 55.5482C65.8407 56.1574 65.4281 56.7538 64.9984 57.3369ZM67.3622 53.6881L65.4034 52.581C65.7373 51.9903 66.0538 51.3886 66.3524 50.7765L68.3746 51.7629C68.0561 52.416 67.7184 53.058 67.3622 53.6881ZM69.2683 49.7804L67.1899 48.9185C67.4494 48.2928 67.6906 47.6576 67.9128 47.0136L70.0397 47.7475C69.8026 48.4348 69.5452 49.1126 69.2683 49.7804ZM70.6861 45.6711L68.5185 45.068C68.6999 44.4159 68.8622 43.7559 69.0048 43.0885L71.2052 43.5586C71.053 44.2708 70.8798 44.9752 70.6861 45.6711ZM71.595 41.4182L69.3702 41.0824C69.471 40.4143 69.5523 39.7397 69.6134 39.059L71.8544 39.2602C71.7892 39.986 71.7025 40.7055 71.595 41.4182Z", fill: secondaryColor }))); }; var Icon$$ = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M4.5 12H7.5C8.05 12 8.5 11.55 8.5 11V7C8.5 6.45 8.05 6 7.5 6H4.5C3.95 6 3.5 6.45 3.5 7V11C3.5 11.55 3.95 12 4.5 12ZM4.5 19H7.5C8.05 19 8.5 18.55 8.5 18V14C8.5 13.45 8.05 13 7.5 13H4.5C3.95 13 3.5 13.45 3.5 14V18C3.5 18.55 3.95 19 4.5 19ZM10.5 19H13.5C14.05 19 14.5 18.55 14.5 18V14C14.5 13.45 14.05 13 13.5 13H10.5C9.95 13 9.5 13.45 9.5 14V18C9.5 18.55 9.95 19 10.5 19ZM16.5 19H19.5C20.05 19 20.5 18.55 20.5 18V14C20.5 13.45 20.05 13 19.5 13H16.5C15.95 13 15.5 13.45 15.5 14V18C15.5 18.55 15.95 19 16.5 19ZM10.5 12H13.5C14.05 12 14.5 11.55 14.5 11V7C14.5 6.45 14.05 6 13.5 6H10.5C9.95 6 9.5 6.45 9.5 7V11C9.5 11.55 9.95 12 10.5 12ZM15.5 7V11C15.5 11.55 15.95 12 16.5 12H19.5C20.05 12 20.5 11.55 20.5 11V7C20.5 6.45 20.05 6 19.5 6H16.5C15.95 6 15.5 6.45 15.5 7Z" }))); }; var Icon$_ = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z" }), React__default['default'].createElement("path", { d: "M11.25 7.72H6.25V9.22H11.25V7.72Z" }), React__default['default'].createElement("path", { d: "M18 15.75H13V17.25H18V15.75Z" }), React__default['default'].createElement("path", { d: "M18 13.25H13V14.75H18V13.25Z" }), React__default['default'].createElement("path", { d: "M8 18H9.5V16H11.5V14.5H9.5V12.5H8V14.5H6V16H8V18Z" }), React__default['default'].createElement("path", { d: "M14.09 10.95L15.5 9.54L16.91 10.95L17.97 9.89L16.56 8.47L17.97 7.06L16.91 6L15.5 7.41L14.09 6L13.03 7.06L14.44 8.47L13.03 9.89L14.09 10.95Z" }))); }; var Icon$Z = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 18 13" }, props), React__default['default'].createElement("path", { d: "M6 10.2001L2.5 6.70007C2.11 6.31007 1.49 6.31007 1.1 6.70007C0.709995 7.09007 0.709995 7.71007 1.1 8.10007L5.29 12.2901C5.68 12.6801 6.31 12.6801 6.7 12.2901L17.3 1.70007C17.69 1.31007 17.69 0.690068 17.3 0.300068C16.91 -0.0899316 16.29 -0.0899316 15.9 0.300068L6 10.2001Z" }))); }; var Icon$Y = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M8.11997 9.29006L12 13.1701L15.88 9.29006C16.27 8.90006 16.9 8.90006 17.29 9.29006C17.68 9.68006 17.68 10.3101 17.29 10.7001L12.7 15.2901C12.31 15.6801 11.68 15.6801 11.29 15.2901L6.69997 10.7001C6.30997 10.3101 6.30997 9.68006 6.69997 9.29006C7.08997 8.91006 7.72997 8.90006 8.11997 9.29006Z" }))); }; var Icon$X = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M14.71 15.88L10.83 12L14.71 8.12001C15.1 7.73001 15.1 7.10001 14.71 6.71001C14.32 6.32001 13.69 6.32001 13.3 6.71001L8.70998 11.3C8.31998 11.69 8.31998 12.32 8.70998 12.71L13.3 17.3C13.69 17.69 14.32 17.69 14.71 17.3C15.09 16.91 15.1 16.27 14.71 15.88Z" }))); }; var Icon$W = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M9.29006 15.88L13.1701 12L9.29006 8.12001C8.90006 7.73001 8.90006 7.10001 9.29006 6.71001C9.68006 6.32001 10.3101 6.32001 10.7001 6.71001L15.2901 11.3C15.6801 11.69 15.6801 12.32 15.2901 12.71L10.7001 17.3C10.3101 17.69 9.68006 17.69 9.29006 17.3C8.91006 16.91 8.90006 16.27 9.29006 15.88Z" }))); }; var Icon$V = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M8.11997 14.7101L12 10.8301L15.88 14.7101C16.27 15.1001 16.9 15.1001 17.29 14.7101C17.68 14.3201 17.68 13.6901 17.29 13.3001L12.7 8.7101C12.31 8.3201 11.68 8.3201 11.29 8.7101L6.69997 13.3001C6.30997 13.6901 6.30997 14.3201 6.69997 14.7101C7.08997 15.0901 7.72997 15.1001 8.11997 14.7101Z" }))); }; var Icon$U = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M18.3 5.70997C17.91 5.31997 17.28 5.31997 16.89 5.70997L12 10.59L7.10997 5.69997C6.71997 5.30997 6.08997 5.30997 5.69997 5.69997C5.30997 6.08997 5.30997 6.71997 5.69997 7.10997L10.59 12L5.69997 16.89C5.30997 17.28 5.30997 17.91 5.69997 18.3C6.08997 18.69 6.71997 18.69 7.10997 18.3L12 13.41L16.89 18.3C17.28 18.69 17.91 18.69 18.3 18.3C18.69 17.91 18.69 17.28 18.3 16.89L13.41 12L18.3 7.10997C18.68 6.72997 18.68 6.08997 18.3 5.70997Z" }))); }; var Icon$T = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M19.43 12.98C19.47 12.66 19.5 12.34 19.5 12C19.5 11.66 19.47 11.34 19.43 11.02L21.54 9.37C21.73 9.22 21.78 8.95 21.66 8.73L19.66 5.27C19.54 5.05 19.27 4.97 19.05 5.05L16.56 6.05C16.04 5.65 15.48 5.32 14.87 5.07L14.49 2.42C14.46 2.18 14.25 2 14 2H9.99996C9.74996 2 9.53996 2.18 9.50996 2.42L9.12996 5.07C8.51996 5.32 7.95996 5.66 7.43996 6.05L4.94996 5.05C4.71996 4.96 4.45996 5.05 4.33996 5.27L2.33996 8.73C2.20996 8.95 2.26996 9.22 2.45996 9.37L4.56996 11.02C4.52996 11.34 4.49996 11.67 4.49996 12C4.49996 12.33 4.52996 12.66 4.56996 12.98L2.45996 14.63C2.26996 14.78 2.21996 15.05 2.33996 15.27L4.33996 18.73C4.45996 18.95 4.72996 19.03 4.94996 18.95L7.43996 17.95C7.95996 18.35 8.51996 18.68 9.12996 18.93L9.50996 21.58C9.53996 21.82 9.74996 22 9.99996 22H14C14.25 22 14.46 21.82 14.49 21.58L14.87 18.93C15.48 18.68 16.04 18.34 16.56 17.95L19.05 18.95C19.28 19.04 19.54 18.95 19.66 18.73L21.66 15.27C21.78 15.05 21.73 14.78 21.54 14.63L19.43 12.98ZM12 15.5C10.07 15.5 8.49996 13.93 8.49996 12C8.49996 10.07 10.07 8.5 12 8.5C13.93 8.5 15.5 10.07 15.5 12C15.5 13.93 13.93 15.5 12 15.5Z" }))); }; var Icon$S = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 12.75C13.63 12.75 15.07 13.14 16.24 13.65C17.32 14.13 18 15.21 18 16.38V17C18 17.55 17.55 18 17 18H7C6.45 18 6 17.55 6 17V16.39C6 15.21 6.68 14.13 7.76 13.66C8.93 13.14 10.37 12.75 12 12.75ZM4 13C5.1 13 6 12.1 6 11C6 9.9 5.1 9 4 9C2.9 9 2 9.9 2 11C2 12.1 2.9 13 4 13ZM5.13 14.1C4.76 14.04 4.39 14 4 14C3.01 14 2.07 14.21 1.22 14.58C0.48 14.9 0 15.62 0 16.43V17C0 17.55 0.45 18 1 18H4.5V16.39C4.5 15.56 4.73 14.78 5.13 14.1ZM20 13C21.1 13 22 12.1 22 11C22 9.9 21.1 9 20 9C18.9 9 18 9.9 18 11C18 12.1 18.9 13 20 13ZM24 16.43C24 15.62 23.52 14.9 22.78 14.58C21.93 14.21 20.99 14 20 14C19.61 14 19.24 14.04 18.87 14.1C19.27 14.78 19.5 15.56 19.5 16.39V18H23C23.55 18 24 17.55 24 17V16.43ZM12 6C13.66 6 15 7.34 15 9C15 10.66 13.66 12 12 12C10.34 12 9 10.66 9 9C9 7.34 10.34 6 12 6Z" }))); }; var Icon$R = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M15 1H4C2.9 1 2 1.9 2 3V16C2 16.55 2.45 17 3 17C3.55 17 4 16.55 4 16V4C4 3.45 4.45 3 5 3H15C15.55 3 16 2.55 16 2C16 1.45 15.55 1 15 1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM18 21H9C8.45 21 8 20.55 8 20V8C8 7.45 8.45 7 9 7H18C18.55 7 19 7.45 19 8V20C19 20.55 18.55 21 18 21Z" }))); }; var Icon$Q = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM11 16H13V18H11V16ZM12.61 6.04C10.55 5.74 8.73 7.01 8.18 8.83C8 9.41 8.44 10 9.05 10H9.25C9.66 10 9.99 9.71 10.13 9.33C10.45 8.44 11.4 7.83 12.43 8.05C13.38 8.25 14.08 9.18 14 10.15C13.9 11.49 12.38 11.78 11.55 13.03C11.55 13.04 11.54 13.04 11.54 13.05C11.53 13.07 11.52 13.08 11.51 13.1C11.42 13.25 11.33 13.42 11.26 13.6C11.25 13.63 11.23 13.65 11.22 13.68C11.21 13.7 11.21 13.72 11.2 13.75C11.08 14.09 11 14.5 11 15H13C13 14.58 13.11 14.23 13.28 13.93C13.3 13.9 13.31 13.87 13.33 13.84C13.41 13.7 13.51 13.57 13.61 13.45C13.62 13.44 13.63 13.42 13.64 13.41C13.74 13.29 13.85 13.18 13.97 13.07C14.93 12.16 16.23 11.42 15.96 9.51C15.72 7.77 14.35 6.3 12.61 6.04Z" }))); }; var Icon$P = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M4.5 14H6.5C7.05 14 7.5 13.55 7.5 13V11C7.5 10.45 7.05 10 6.5 10H4.5C3.95 10 3.5 10.45 3.5 11V13C3.5 13.55 3.95 14 4.5 14ZM4.5 19H6.5C7.05 19 7.5 18.55 7.5 18V16C7.5 15.45 7.05 15 6.5 15H4.5C3.95 15 3.5 15.45 3.5 16V18C3.5 18.55 3.95 19 4.5 19ZM4.5 9H6.5C7.05 9 7.5 8.55 7.5 8V6C7.5 5.45 7.05 5 6.5 5H4.5C3.95 5 3.5 5.45 3.5 6V8C3.5 8.55 3.95 9 4.5 9ZM9.5 14H19.5C20.05 14 20.5 13.55 20.5 13V11C20.5 10.45 20.05 10 19.5 10H9.5C8.95 10 8.5 10.45 8.5 11V13C8.5 13.55 8.95 14 9.5 14ZM9.5 19H19.5C20.05 19 20.5 18.55 20.5 18V16C20.5 15.45 20.05 15 19.5 15H9.5C8.95 15 8.5 15.45 8.5 16V18C8.5 18.55 8.95 19 9.5 19ZM8.5 6V8C8.5 8.55 8.95 9 9.5 9H19.5C20.05 9 20.5 8.55 20.5 8V6C20.5 5.45 20.05 5 19.5 5H9.5C8.95 5 8.5 5.45 8.5 6Z" }))); }; var Icon$O = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 32 32" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.84199 5.00181C5.35647 2.40193 7.35138 0 9.9962 0C12.3302 0 14.2222 1.89206 14.2222 4.22603V9.43607C14.806 9.39487 15.3992 9.37374 16 9.37374C16.5772 9.37374 17.1474 9.39324 17.709 9.43131V4.22603C17.709 1.89206 19.601 0 21.935 0C24.5798 0 26.5747 2.40193 26.0892 5.00181L24.9456 11.1259C28.8705 12.8395 31.8384 15.8157 31.8384 19.5556V21.8182C31.8384 24.8936 29.8038 27.4686 26.9594 29.2068C24.0928 30.9586 20.2149 32 16 32C11.7851 32 7.90719 30.9586 5.04062 29.2068C2.19624 27.4686 0.161621 24.8936 0.161621 21.8182V19.5556C0.161621 15.8355 3.09899 12.8708 6.99084 11.1538L5.84199 5.00181ZM23.48 11.9305L24.8183 4.76446C25.1552 2.96 23.7707 1.29293 21.935 1.29293C20.3151 1.29293 19.0019 2.60612 19.0019 4.22603V10.8562C18.5774 10.8018 18.1462 10.7586 17.709 10.7274C17.1484 10.6873 16.5782 10.6667 16 10.6667C15.3982 10.6667 14.8049 10.689 14.2222 10.7324C13.785 10.765 13.3537 10.8094 12.9293 10.8651V4.22603C12.9293 2.60612 11.6161 1.29293 9.9962 1.29293C8.16055 1.29293 6.77597 2.96 7.11295 4.76446L8.45562 11.9543C4.25822 13.5135 1.45455 16.3344 1.45455 19.5556V21.8182C1.45455 26.7274 7.96677 30.7071 16 30.7071C24.0332 30.7071 30.5455 26.7274 30.5455 21.8182V19.5556C30.5455 16.318 27.7131 13.4847 23.48 11.9305Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M30.5455 21.8183C30.5455 26.7275 24.0333 30.7072 16 30.7072C7.96681 30.7072 1.45459 26.7275 1.45459 21.8183V19.5557H30.5455V21.8183Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.11298 4.7645C6.77601 2.96004 8.16058 1.29297 9.99624 1.29297C11.6161 1.29297 12.9293 2.60616 12.9293 4.22607V10.8652C13.9192 10.7351 14.9466 10.6667 16 10.6667C17.0291 10.6667 18.0333 10.732 19.0019 10.8562V4.22607C19.0019 2.60616 20.3151 1.29297 21.935 1.29297C23.7707 1.29297 25.1553 2.96004 24.8183 4.7645L23.4801 11.9306C27.7131 13.4847 30.5455 16.318 30.5455 19.5556C30.5455 24.4648 24.0333 28.4445 16 28.4445C7.96681 28.4445 1.45459 24.4648 1.45459 19.5556C1.45459 16.3345 4.25826 13.5135 8.45566 11.9543L7.11298 4.7645Z", fill: "#D1884F" }), React__default['default'].createElement("path", { d: "M11.9595 18.9091C11.9595 20.248 11.2359 21.3333 10.3433 21.3333C9.45075 21.3333 8.72717 20.248 8.72717 18.9091C8.72717 17.5702 9.45075 16.4849 10.3433 16.4849C11.2359 16.4849 11.9595 17.5702 11.9595 18.9091Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M23.1111 18.9091C23.1111 20.248 22.3875 21.3333 21.4949 21.3333C20.6024 21.3333 19.8788 20.248 19.8788 18.9091C19.8788 17.5702 20.6024 16.4849 21.4949 16.4849C22.3875 16.4849 23.1111 17.5702 23.1111 18.9091Z", fill: "#633001" }))); }; var Icon$N = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 512 512" }, props), React__default['default'].createElement("circle", { cx: "256", cy: "256", r: "256", fill: "url(#paint0_linear)" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M149.813 139.861C144.738 112.406 165.591 87.0417 193.238 87.0417C217.636 87.0417 237.414 107.022 237.414 131.669V186.687C243.517 186.252 249.718 186.028 255.998 186.028C262.032 186.028 267.992 186.234 273.862 186.636V131.669C273.862 107.022 293.641 87.0417 318.039 87.0417C345.686 87.0417 366.539 112.406 361.464 139.861L349.509 204.532C390.538 222.627 421.562 254.056 421.562 293.548V317.442C421.562 349.919 400.293 377.11 370.56 395.466C340.595 413.965 300.058 424.962 255.998 424.962C211.939 424.962 171.401 413.965 141.436 395.466C111.703 377.11 90.4342 349.919 90.4342 317.442V293.548C90.4342 254.265 121.139 222.957 161.822 204.825L149.813 139.861ZM334.189 213.028L348.178 137.354C351.701 118.299 337.227 100.695 318.039 100.695C301.105 100.695 287.378 114.562 287.378 131.669V201.683C282.941 201.108 278.433 200.653 273.862 200.323C268.003 199.899 262.042 199.682 255.998 199.682C249.707 199.682 243.505 199.918 237.414 200.376C232.844 200.72 228.335 201.189 223.899 201.777V131.669C223.899 114.562 210.172 100.695 193.238 100.695C174.05 100.695 159.576 118.299 163.099 137.354L177.134 213.279C133.257 229.744 103.95 259.533 103.95 293.548V317.442C103.95 369.283 172.024 411.308 255.998 411.308C339.972 411.308 408.047 369.283 408.047 317.442V293.548C408.047 259.36 378.439 229.44 334.189 213.028Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M408.047 317.442C408.047 369.283 339.972 411.308 255.998 411.308C172.024 411.308 103.95 369.283 103.95 317.442V293.548H408.047V317.442Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M163.099 137.354C159.576 118.299 174.05 100.695 193.238 100.695C210.172 100.695 223.899 114.562 223.899 131.669V201.777C234.247 200.404 244.986 199.682 255.998 199.682C266.755 199.682 277.252 200.371 287.378 201.683V131.669C287.378 114.562 301.105 100.695 318.039 100.695C337.227 100.695 351.701 118.299 348.178 137.354L334.189 213.028C378.439 229.44 408.047 259.36 408.047 293.548C408.047 345.389 339.972 387.415 255.998 387.415C172.024 387.415 103.95 345.389 103.95 293.548C103.95 259.533 133.257 229.744 177.134 213.279L163.099 137.354Z", fill: "#D1884F" }), React__default['default'].createElement("path", { d: "M213.762 286.722C213.762 300.86 206.199 312.322 196.868 312.322C187.538 312.322 179.974 300.86 179.974 286.722C179.974 272.583 187.538 261.122 196.868 261.122C206.199 261.122 213.762 272.583 213.762 286.722Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M330.333 286.722C330.333 300.86 322.769 312.322 313.439 312.322C304.108 312.322 296.544 300.86 296.544 286.722C296.544 272.583 304.108 261.122 313.439 261.122C322.769 261.122 330.333 272.583 330.333 286.722Z", fill: "#633001" }), React__default['default'].createElement("defs", null, React__default['default'].createElement("linearGradient", { id: "paint0_linear", x1: "256", y1: "0", x2: "256", y2: "512", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#54DADE" }), React__default['default'].createElement("stop", { offset: "0.762157", stopColor: "#24C7D6" }))))); }; var Icon$M = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 35 33" }, props), React__default['default'].createElement("path", { d: "m32.9582 1-13.1341 9.7183 2.4424-5.72731z", fill: "#e17726", stroke: "#e17726" }), React__default['default'].createElement("g", { fill: "#e27625", stroke: "#e27625" }, React__default['default'].createElement("path", { d: "m2.66296 1 13.01714 9.809-2.3254-5.81802z" }), React__default['default'].createElement("path", { d: "m28.2295 23.5335-3.4947 5.3386 7.4829 2.0603 2.1436-7.2823z" }), React__default['default'].createElement("path", { d: "m1.27281 23.6501 2.13055 7.2823 7.46994-2.0603-3.48166-5.3386z" }), React__default['default'].createElement("path", { d: "m10.4706 14.5149-2.0786 3.1358 7.405.3369-.2469-7.969z" }), React__default['default'].createElement("path", { d: "m25.1505 14.5149-5.1575-4.58704-.1688 8.05974 7.4049-.3369z" }), React__default['default'].createElement("path", { d: "m10.8733 28.8721 4.4819-2.1639-3.8583-3.0062z" }), React__default['default'].createElement("path", { d: "m20.2659 26.7082 4.4689 2.1639-.6105-5.1701z" })), React__default['default'].createElement("path", { d: "m24.7348 28.8721-4.469-2.1639.3638 2.9025-.039 1.231z", fill: "#d5bfb2", stroke: "#d5bfb2" }), React__default['default'].createElement("path", { d: "m10.8732 28.8721 4.1572 1.9696-.026-1.231.3508-2.9025z", fill: "#d5bfb2", stroke: "#d5bfb2" }), React__default['default'].createElement("path", { d: "m15.1084 21.7842-3.7155-1.0884 2.6243-1.2051z", fill: "#233447", stroke: "#233447" }), React__default['default'].createElement("path", { d: "m20.5126 21.7842 1.0913-2.2935 2.6372 1.2051z", fill: "#233447", stroke: "#233447" }), React__default['default'].createElement("path", { d: "m10.8733 28.8721.6495-5.3386-4.13117.1167z", fill: "#cc6228", stroke: "#cc6228" }), React__default['default'].createElement("path", { d: "m24.0982 23.5335.6366 5.3386 3.4946-5.2219z", fill: "#cc6228", stroke: "#cc6228" }), React__default['default'].createElement("path", { d: "m27.2291 17.6507-7.405.3369.6885 3.7966 1.0913-2.2935 2.6372 1.2051z", fill: "#cc6228", stroke: "#cc6228" }), React__default['default'].createElement("path", { d: "m11.3929 20.6958 2.6242-1.2051 1.0913 2.2935.6885-3.7966-7.40495-.3369z", fill: "#cc6228", stroke: "#cc6228" }), React__default['default'].createElement("path", { d: "m8.392 17.6507 3.1049 6.0513-.1039-3.0062z", fill: "#e27525", stroke: "#e27525" }), React__default['default'].createElement("path", { d: "m24.2412 20.6958-.1169 3.0062 3.1049-6.0513z", fill: "#e27525", stroke: "#e27525" }), React__default['default'].createElement("path", { d: "m15.797 17.9876-.6886 3.7967.8704 4.4833.1949-5.9087z", fill: "#e27525", stroke: "#e27525" }), React__default['default'].createElement("path", { d: "m19.8242 17.9876-.3638 2.3584.1819 5.9216.8704-4.4833z", fill: "#e27525", stroke: "#e27525" }), React__default['default'].createElement("path", { d: "m20.5127 21.7842-.8704 4.4834.6236.4406 3.8584-3.0062.1169-3.0062z", fill: "#f5841f", stroke: "#f5841f" }), React__default['default'].createElement("path", { d: "m11.3929 20.6958.104 3.0062 3.8583 3.0062.6236-.4406-.8704-4.4834z", fill: "#f5841f", stroke: "#f5841f" }), React__default['default'].createElement("path", { d: "m20.5906 30.8417.039-1.231-.3378-.2851h-4.9626l-.3248.2851.026 1.231-4.1572-1.9696 1.4551 1.1921 2.9489 2.0344h5.0536l2.962-2.0344 1.442-1.1921z", fill: "#c0ac9d", stroke: "#c0ac9d" }), React__default['default'].createElement("path", { d: "m20.2659 26.7082-.6236-.4406h-3.6635l-.6236.4406-.3508 2.9025.3248-.2851h4.9626l.3378.2851z", fill: "#161616", stroke: "#161616" }), React__default['default'].createElement("path", { d: "m33.5168 11.3532 1.1043-5.36447-1.6629-4.98873-12.6923 9.3944 4.8846 4.1205 6.8983 2.0085 1.52-1.7752-.6626-.4795 1.0523-.9588-.8054-.622 1.0523-.8034z", fill: "#763e1a", stroke: "#763e1a" }), React__default['default'].createElement("path", { d: "m1 5.98873 1.11724 5.36447-.71451.5313 1.06527.8034-.80545.622 1.05228.9588-.66255.4795 1.51997 1.7752 6.89835-2.0085 4.8846-4.1205-12.69233-9.3944z", fill: "#763e1a", stroke: "#763e1a" }), React__default['default'].createElement("path", { d: "m32.0489 16.5234-6.8983-2.0085 2.0786 3.1358-3.1049 6.0513 4.1052-.0519h6.1318z", fill: "#f5841f", stroke: "#f5841f" }), React__default['default'].createElement("path", { d: "m10.4705 14.5149-6.89828 2.0085-2.29944 7.1267h6.11883l4.10519.0519-3.10487-6.0513z", fill: "#f5841f", stroke: "#f5841f" }), React__default['default'].createElement("path", { d: "m19.8241 17.9876.4417-7.5932 2.0007-5.4034h-8.9119l2.0006 5.4034.4417 7.5932.1689 2.3842.013 5.8958h3.6635l.013-5.8958z", fill: "#f5841f", stroke: "#f5841f" }))); }; var Icon$L = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M18 13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z" }))); }; var Icon$K = function (props) { var theme = styled.useTheme(); var primaryColor = theme.isDark ? "#3C3742" : "#e9eaeb"; var secondaryColor = theme.isDark ? "#666171" : "#bdc2c4"; return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 32 32" }, props), React__default['default'].createElement("path", { d: "M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0s16 7.163 16 16z", fill: primaryColor }), React__default['default'].createElement("mask", { id: "A", "mask-type": "alpha", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "32", height: "32" }, React__default['default'].createElement("path", { d: "M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0s16 7.163 16 16z", fill: "#c4c4c4" })), React__default['default'].createElement("g", { mask: "url(#A)" }, React__default['default'].createElement("path", { d: "M25.128 16.436c0 3.115-4.133 5.641-9.231 5.641s-9.231-2.526-9.231-5.641V15h18.461v1.436zm2.205 13.806c0-3.815-5.074-6.908-11.333-6.908S4.667 26.426 4.667 30.242V32h22.667v-1.759z", fill: secondaryColor }), React__default['default'].createElement("path", { fillRule: "evenodd", d: "M10.234 5.601C9.942 4.264 10.96 3 12.328 3c1.184 0 2.143.959 2.143 2.143v3.873l1.427-.067c.589 0 1.166.034 1.724.098V5.143c0-1.184.959-2.143 2.143-2.143 1.368 0 2.386 1.264 2.093 2.601l-.931 4.258c2.529 1.006 4.201 2.749 4.201 4.731 0 3.115-4.133 5.641-9.231 5.641s-9.231-2.526-9.231-5.641c0-2.053 1.794-3.849 4.476-4.836l-.908-4.153z", fill: secondaryColor }), React__default['default'].createElement("ellipse", { cx: "12.308", cy: "14.846", rx: "1.026", ry: "1.538", fill: primaryColor }), React__default['default'].createElement("ellipse", { cx: "19.385", cy: "14.846", rx: "1.026", ry: "1.538", fill: primaryColor })))); }; var Icon$J = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H11C11.55 5 12 4.55 12 4C12 3.45 11.55 3 11 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V13C21 12.45 20.55 12 20 12C19.45 12 19 12.45 19 13V18C19 18.55 18.55 19 18 19ZM14 4C14 4.55 14.45 5 15 5H17.59L8.46 14.13C8.07 14.52 8.07 15.15 8.46 15.54C8.85 15.93 9.48 15.93 9.87 15.54L19 6.41V9C19 9.55 19.45 10 20 10C20.55 10 21 9.55 21 9V4C21 3.45 20.55 3 20 3H15C14.45 3 14 3.45 14 4Z" }))); }; var Icon$I = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 64 64" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.43832 38.1153C2.43048 38.3002 2.42654 38.4857 2.42654 38.6718C2.42654 39.3754 2.48287 40.0702 2.59273 40.7545H2.42654V41.8317C2.42654 42.3575 2.45801 42.8784 2.51976 43.3937C3.7248 53.4491 16.4632 61.3609 32 61.3609C47.5368 61.3609 60.2752 53.4491 61.4802 43.3937C61.542 42.8784 61.5735 42.3575 61.5735 41.8317V40.7545H61.4073C61.5171 40.0702 61.5735 39.3754 61.5735 38.6718C61.5735 38.4857 61.5695 38.3002 61.5617 38.1153C61.1156 27.587 48.0511 19.1426 32 19.1426C15.9489 19.1426 2.88444 27.587 2.43832 38.1153ZM0.00951064 38.1153C0.229456 31.6916 4.24297 26.2955 9.82907 22.6067C15.6197 18.7827 23.4643 16.5034 32 16.5034C40.5358 16.5034 48.3803 18.7827 54.1709 22.6067C59.757 26.2955 63.7705 31.6916 63.9905 38.1153H64V41.8317C64 48.5003 59.9176 54.102 54.1709 57.8969C48.3803 61.7208 40.5358 64.0001 32 64.0001C23.4643 64.0001 15.6197 61.7208 9.82907 57.8969C4.08238 54.102 0 48.5003 0 41.8317V38.1153H0.00951064Z", fill: "#606063" }), React__default['default'].createElement("path", { d: "M61.5734 41.832C61.5734 52.6177 48.3329 61.3612 32 61.3612C15.667 61.3612 2.42651 52.6177 2.42651 41.832V38.7405H61.5734V41.832Z", fill: "#BEBEBE" }), React__default['default'].createElement("path", { d: "M61.5734 38.6718C61.5734 49.4575 48.3329 58.201 32 58.201C15.667 58.201 2.42651 49.4575 2.42651 38.6718C2.42651 27.8861 15.667 19.1426 32 19.1426C48.3329 19.1426 61.5734 27.8861 61.5734 38.6718Z", fill: "#FAF9FA" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.97668 33.1548C6.97663 33.167 6.97661 33.1792 6.97661 33.1915C6.97661 34.0795 7.09495 34.9492 7.32173 35.794H6.97634V36.9377C6.97634 37.4425 7.01459 37.9414 7.08925 38.4332C8.21673 45.8588 17.6492 51.6547 29.1184 51.6547C40.5876 51.6547 50.0201 45.8588 51.1475 38.4332C51.2222 37.9414 51.2604 37.4425 51.2604 36.9377V35.794H50.9156C51.1362 34.9723 51.2542 34.127 51.2604 33.2641C51.2606 33.2399 51.2607 33.2157 51.2607 33.1915C51.2607 33.1792 51.2607 33.167 51.2606 33.1548C51.2309 25.0436 41.329 18.4744 29.1187 18.4744C16.9083 18.4744 7.00645 25.0436 6.97668 33.1548ZM4.55012 33.1548H4.5498V36.9377C4.5498 42.269 7.79116 46.6683 12.1963 49.5962C16.643 52.5518 22.632 54.2939 29.1184 54.2939C35.6048 54.2939 41.5937 52.5518 46.0405 49.5962C50.4456 46.6683 53.687 42.269 53.687 36.9377V33.2739C53.6872 33.2464 53.6872 33.2189 53.6872 33.1915C53.6872 27.8601 50.4459 23.4609 46.0408 20.533C41.594 17.5773 35.6051 15.8352 29.1187 15.8352C22.6322 15.8352 16.6433 17.5773 12.1965 20.533C7.80153 23.4542 4.56495 27.84 4.55012 33.1548Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M51.2604 36.9379C51.2604 45.0659 41.3471 51.6549 29.1184 51.6549C16.8897 51.6549 6.97632 45.0659 6.97632 36.9379V33.4849H51.2604V36.9379Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { d: "M51.2604 33.1914C51.2604 41.3195 41.3471 47.9085 29.1184 47.9085C16.8897 47.9085 6.97632 41.3195 6.97632 33.1914C6.97632 25.0634 16.8897 18.4744 29.1184 18.4744C41.3471 18.4744 51.2604 25.0634 51.2604 33.1914Z", fill: "#D1884F" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.6497 25.2371C13.6496 25.2493 13.6496 25.2615 13.6496 25.2737C13.6496 26.1618 13.7679 27.0315 13.9947 27.8762H13.6493V29.0199C13.6493 29.5248 13.6876 30.0237 13.7622 30.5154C14.8897 37.941 24.3222 43.737 35.7914 43.737C47.2605 43.737 56.693 37.941 57.8205 30.5154C57.8952 30.0237 57.9334 29.5248 57.9334 29.0199V27.8762H57.5886C57.8092 27.0545 57.9271 26.2092 57.9334 25.3464C57.9336 25.3222 57.9337 25.298 57.9337 25.2737C57.9337 25.2615 57.9337 25.2493 57.9336 25.2371C57.9038 17.1259 48.0019 10.5567 35.7916 10.5567C23.5813 10.5567 13.6794 17.1259 13.6497 25.2371ZM11.2231 25.2371H11.2228V29.0199C11.2228 34.3513 14.4641 38.7505 18.8693 41.6785C23.316 44.6341 29.3049 46.3762 35.7914 46.3762C42.2778 46.3762 48.2667 44.6341 52.7135 41.6785C57.1186 38.7505 60.36 34.3513 60.36 29.0199V25.3561C60.3601 25.3287 60.3602 25.3012 60.3602 25.2737C60.3602 19.9424 57.1189 15.5432 52.7137 12.6152C48.267 9.65961 42.2781 7.91748 35.7916 7.91748C29.3052 7.91748 23.3163 9.65961 18.8695 12.6152C14.4745 15.5364 11.2379 19.9222 11.2231 25.2371Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M57.9334 29.0201C57.9334 37.1481 48.0201 43.7372 35.7913 43.7372C23.5626 43.7372 13.6493 37.1481 13.6493 29.0201V25.5671H57.9334V29.0201Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { d: "M57.9334 25.274C57.9334 33.402 48.0201 39.991 35.7913 39.991C23.5626 39.991 13.6493 33.402 13.6493 25.274C13.6493 17.1459 23.5626 10.5569 35.7913 10.5569C48.0201 10.5569 57.9334 17.1459 57.9334 25.274Z", fill: "#D1884F" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.97668 17.3196C6.97663 17.3318 6.97661 17.344 6.97661 17.3563C6.97661 18.2443 7.09495 19.114 7.32173 19.9588H6.97634V21.1025C6.97634 21.6073 7.01459 22.1062 7.08925 22.598C8.21673 30.0236 17.6492 35.8195 29.1184 35.8195C40.5876 35.8195 50.0201 30.0236 51.1475 22.598C51.2222 22.1062 51.2604 21.6073 51.2604 21.1025V19.9588H50.9156C51.1362 19.1371 51.2542 18.2917 51.2604 17.4289C51.2606 17.4047 51.2607 17.3805 51.2607 17.3563C51.2607 17.344 51.2607 17.3318 51.2606 17.3196C51.2309 9.20843 41.329 2.63919 29.1187 2.63919C16.9083 2.63919 7.00645 9.20843 6.97668 17.3196ZM4.55012 17.3196H4.5498V21.1025C4.5498 26.4338 7.79116 30.833 12.1963 33.761C16.643 36.7166 22.632 38.4587 29.1184 38.4587C35.6048 38.4587 41.5937 36.7166 46.0405 33.761C50.4456 30.833 53.687 26.4338 53.687 21.1025V17.4387C53.6872 17.4112 53.6872 17.3837 53.6872 17.3563C53.6872 12.0249 50.4459 7.62568 46.0408 4.69775C41.594 1.74213 35.6051 0 29.1187 0C22.6322 0 16.6433 1.74213 12.1965 4.69775C7.80153 7.61896 4.56495 12.0047 4.55012 17.3196Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M51.2604 21.1027C51.2604 29.2307 41.3471 35.8197 29.1184 35.8197C16.8897 35.8197 6.97632 29.2307 6.97632 21.1027V17.6497H51.2604V21.1027Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { d: "M51.2604 17.3562C51.2604 25.4842 41.3471 32.0733 29.1184 32.0733C16.8897 32.0733 6.97632 25.4842 6.97632 17.3562C6.97632 9.22822 16.8897 2.63916 29.1184 2.63916C41.3471 2.63916 51.2604 9.22822 51.2604 17.3562Z", fill: "#D1884F" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.214 18.272C12.214 20.9856 14.0269 23.4161 16.8871 25.0513L14.9054 28.7844L14.9059 28.7847H14.9054V38.2326C14.9054 39.4819 15.8366 40.4947 16.9853 40.4947C18.134 40.4947 19.0652 39.4819 19.0652 38.2326V30.7188L21.1972 26.7024C22.5605 27.0169 24.0238 27.1876 25.5468 27.1876C32.9103 27.1876 38.8796 23.196 38.8796 18.272C38.8796 13.3481 32.9103 9.35645 25.5468 9.35645C18.1833 9.35645 12.214 13.3481 12.214 18.272Z", fill: "url(#paint0_linear)" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.8871 25.0513C16.5702 24.8701 16.2663 24.6792 15.9762 24.4793C13.6475 22.8741 12.2139 20.685 12.2139 18.272C12.2139 13.3481 18.1832 9.35641 25.5468 9.35641C32.9103 9.35641 38.8796 13.3481 38.8796 18.272C38.8796 23.1959 32.9103 27.1876 25.5468 27.1876C24.0238 27.1876 22.5604 27.0168 21.1972 26.7024L19.0652 30.7187V38.2325C19.0652 39.4819 18.134 40.4947 16.9853 40.4947C15.8366 40.4947 14.9054 39.4819 14.9054 38.2325V28.7847L16.8871 25.0513ZM12.7822 28.8244V38.2325C12.7822 40.7573 14.664 42.804 16.9853 42.804C19.3066 42.804 21.1884 40.7573 21.1884 38.2325V31.3375L22.2942 29.2544C23.3445 29.4135 24.433 29.4969 25.5468 29.4969C29.5564 29.4969 33.2881 28.4148 36.0865 26.5435C38.8503 24.6954 41.0028 21.836 41.0028 18.272C41.0028 14.708 38.8503 11.8486 36.0865 10.0005C33.2881 8.12923 29.5564 7.04712 25.5468 7.04712C21.5371 7.04712 17.8054 8.12923 15.007 10.0005C12.2432 11.8486 10.0907 14.708 10.0907 18.272C10.0907 21.4 11.738 23.9758 14.0266 25.8213L13.0813 27.6021C12.9912 27.7662 12.9192 27.9435 12.8685 28.1307C12.8064 28.3589 12.7783 28.5928 12.7822 28.8244Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M16.3791 14.5156C16.3791 17.0663 19.3667 19.1341 23.0521 19.1341C26.7375 19.1341 29.7251 17.0663 29.7251 14.5156C29.7251 11.9648 26.7375 9.89697 23.0521 9.89697C19.3667 9.89697 16.3791 11.9648 16.3791 14.5156Z", fill: "#9E7200" }), React__default['default'].createElement("path", { d: "M16.3792 12.5361H29.7251V14.5155H16.3792V12.5361Z", fill: "#9E7200" }), React__default['default'].createElement("path", { d: "M16.3791 12.5361C16.3791 15.0868 19.3667 17.1546 23.0521 17.1546C26.7375 17.1546 29.7251 15.0868 29.7251 12.5361C29.7251 9.98529 26.7375 7.91748 23.0521 7.91748C19.3667 7.91748 16.3791 9.98529 16.3791 12.5361Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M20.52 11.9795L22.4008 10.6777C22.7983 10.4027 23.3062 10.4027 23.7036 10.6777L25.5845 11.9795C25.959 12.2388 25.959 12.8336 25.5845 13.0928L23.7036 14.3946C23.3062 14.6697 22.7983 14.6697 22.4008 14.3946L20.52 13.0928C20.1454 12.8336 20.1454 12.2388 20.52 11.9795Z", fill: "#9E7200" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.1938 7.32218C18.7911 6.21664 20.8681 5.6084 23.0522 5.6084C25.2363 5.6084 27.3133 6.21664 28.9106 7.32218C30.4827 8.41029 31.8484 10.1975 31.8484 12.5363V14.5157C31.8484 16.8545 30.4827 18.6417 28.9106 19.7298C27.3133 20.8353 25.2363 21.4435 23.0522 21.4435C20.8681 21.4435 18.7911 20.8353 17.1938 19.7298C15.6217 18.6417 14.256 16.8545 14.256 14.5157V12.5363C14.256 10.1975 15.6217 8.41029 17.1938 7.32218ZM23.0522 7.91769C19.3668 7.91769 16.3792 9.9855 16.3792 12.5363V14.5157C16.3792 17.0664 19.3668 19.1343 23.0522 19.1343C26.7376 19.1343 29.7252 17.0664 29.7252 14.5157V12.5363C29.7252 9.9855 26.7376 7.91769 23.0522 7.91769Z", fill: "#633001" }), React__default['default'].createElement("defs", null, React__default['default'].createElement("linearGradient", { id: "paint0_linear", x1: "25.691", y1: "9.6549", x2: "25.691", y2: "40.2608", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#9F4A08" }), React__default['default'].createElement("stop", { offset: "0.370494", stopColor: "#7D3900" }), React__default['default'].createElement("stop", { offset: "1", stopColor: "#8D4104" }))))); }; var Icon$H = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 90 90" }, props), React__default['default'].createElement("circle", { cx: "45", cy: "45", r: "45", fill: "url(#paint0_linear)" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.7703 49.9442C15.7626 50.1122 15.7587 50.2809 15.7587 50.4501C15.7587 51.0897 15.8144 51.7214 15.923 52.3435H15.7587V53.3228C15.7587 53.8008 15.7898 54.2744 15.8508 54.7428C17.0423 63.8844 29.6377 71.0772 45 71.0772C60.3623 71.0772 72.9577 63.8844 74.1492 54.7428C74.2102 54.2744 74.2413 53.8008 74.2413 53.3228V52.3435H74.077C74.1856 51.7214 74.2413 51.0897 74.2413 50.4501C74.2413 50.2809 74.2374 50.1122 74.2297 49.9442C73.7886 40.3727 60.8709 32.6957 45 32.6957C29.1291 32.6957 16.2114 40.3727 15.7703 49.9442ZM13.3688 49.9442C13.5863 44.1042 17.5547 39.1986 23.0781 35.845C28.8037 32.3686 36.5601 30.2964 45 30.2964C53.4399 30.2964 61.1964 32.3686 66.9219 35.845C72.4453 39.1986 76.4137 44.1042 76.6312 49.9442H76.6406V53.3228C76.6406 59.3853 72.6041 64.4779 66.9219 67.9279C61.1964 71.4043 53.4399 73.4765 45 73.4765C36.5601 73.4765 28.8037 71.4043 23.0781 67.9279C17.3959 64.4779 13.3594 59.3853 13.3594 53.3228V49.9442H13.3688Z", fill: "#606063" }), React__default['default'].createElement("path", { d: "M74.2412 53.3233C74.2412 63.1287 61.1494 71.0776 44.9999 71.0776C28.8503 71.0776 15.7585 63.1287 15.7585 53.3233V50.5127H74.2412V53.3233Z", fill: "#BEBEBE" }), React__default['default'].createElement("path", { d: "M74.2412 50.4502C74.2412 60.2557 61.1494 68.2046 44.9999 68.2046C28.8503 68.2046 15.7585 60.2557 15.7585 50.4502C15.7585 40.6447 28.8503 32.6958 44.9999 32.6958C61.1494 32.6958 74.2412 40.6447 74.2412 50.4502Z", fill: "#FAF9FA" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.2578 45.4345C20.2577 45.4456 20.2577 45.4567 20.2577 45.4679C20.2577 46.2752 20.3747 47.0659 20.5989 47.8338H20.2574V48.8736C20.2574 49.3326 20.2953 49.7861 20.3691 50.2332C21.4839 56.9839 30.8104 62.2532 42.1508 62.2532C53.4912 62.2532 62.8178 56.9839 63.9326 50.2332C64.0064 49.7861 64.0442 49.3326 64.0442 48.8736V47.8338H63.7032C63.9213 47.0868 64.038 46.3183 64.0442 45.5339C64.0444 45.5119 64.0445 45.4899 64.0445 45.4679C64.0445 45.4567 64.0444 45.4456 64.0444 45.4345C64.015 38.0605 54.2243 32.0883 42.1511 32.0883C30.0779 32.0883 20.2872 38.0605 20.2578 45.4345ZM17.8585 45.4345H17.8582V48.8736C17.8582 53.7204 21.0631 57.7199 25.4188 60.3817C29.8156 63.0687 35.7372 64.6525 42.1508 64.6525C48.5644 64.6525 54.4861 63.0687 58.8829 60.3817C63.2385 57.7199 66.4435 53.7204 66.4435 48.8736V45.5428C66.4437 45.5178 66.4438 45.4928 66.4438 45.4679C66.4438 40.621 63.2388 36.6216 58.8832 33.9598C54.4863 31.2728 48.5647 29.689 42.1511 29.689C35.7375 29.689 29.8158 31.2728 25.419 33.9598C21.0734 36.6155 17.8731 40.6027 17.8585 45.4345Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M64.0441 48.8738C64.0441 56.2631 54.2421 62.2534 42.1507 62.2534C30.0593 62.2534 20.2573 56.2631 20.2573 48.8738V45.7346H64.0441V48.8738Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { d: "M64.0441 45.4679C64.0441 52.8573 54.2421 58.8475 42.1507 58.8475C30.0593 58.8475 20.2573 52.8573 20.2573 45.4679C20.2573 38.0786 30.0593 32.0884 42.1507 32.0884C54.2421 32.0884 64.0441 38.0786 64.0441 45.4679Z", fill: "#D1884F" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M26.8557 38.2365C26.8556 38.2476 26.8556 38.2587 26.8556 38.2699C26.8556 39.0772 26.9726 39.8679 27.1968 40.6359H26.8553V41.6756C26.8553 42.1346 26.8932 42.5881 26.967 43.0352C28.0818 49.7859 37.4083 55.0552 48.7487 55.0552C60.0891 55.0552 69.4157 49.7859 70.5305 43.0352C70.6043 42.5881 70.6421 42.1346 70.6421 41.6756V40.6359H70.3011C70.5192 39.8888 70.6359 39.1203 70.6421 38.3359C70.6423 38.3139 70.6424 38.2919 70.6424 38.2699C70.6424 38.2587 70.6423 38.2476 70.6423 38.2365C70.6129 30.8625 60.8222 24.8903 48.749 24.8903C36.6758 24.8903 26.8851 30.8625 26.8557 38.2365ZM24.4564 38.2365H24.4561V41.6756C24.4561 46.5224 27.661 50.5219 32.0167 53.1837C36.4135 55.8707 42.3351 57.4545 48.7487 57.4545C55.1623 57.4545 61.084 55.8707 65.4808 53.1837C69.8364 50.5219 73.0414 46.5224 73.0414 41.6756V38.3448C73.0416 38.3198 73.0417 38.2948 73.0417 38.2699C73.0417 33.4231 69.8367 29.4236 65.4811 26.7618C61.0842 24.0748 55.1626 22.491 48.749 22.491C42.3354 22.491 36.4137 24.0748 32.0169 26.7618C27.6713 29.4175 24.471 33.4047 24.4564 38.2365Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M70.6422 41.6758C70.6422 49.0651 60.8402 55.0554 48.7488 55.0554C36.6575 55.0554 26.8555 49.0651 26.8555 41.6758V38.5366H70.6422V41.6758Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { d: "M70.6422 38.2699C70.6422 45.6593 60.8402 51.6495 48.7488 51.6495C36.6575 51.6495 26.8555 45.6593 26.8555 38.2699C26.8555 30.8806 36.6575 24.8904 48.7488 24.8904C60.8402 24.8904 70.6422 30.8806 70.6422 38.2699Z", fill: "#D1884F" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.2578 31.0385C20.2577 31.0496 20.2577 31.0607 20.2577 31.0719C20.2577 31.8792 20.3747 32.6699 20.5989 33.4379H20.2574V34.4776C20.2574 34.9366 20.2953 35.3901 20.3691 35.8372C21.4839 42.5879 30.8104 47.8572 42.1508 47.8572C53.4912 47.8572 62.8178 42.5879 63.9326 35.8372C64.0064 35.3901 64.0442 34.9366 64.0442 34.4776V33.4379H63.7032C63.9213 32.6908 64.038 31.9223 64.0442 31.1379C64.0444 31.1159 64.0445 31.0939 64.0445 31.0719C64.0445 31.0607 64.0444 31.0496 64.0444 31.0385C64.015 23.6645 54.2243 17.6923 42.1511 17.6923C30.0779 17.6923 20.2872 23.6645 20.2578 31.0385ZM17.8585 31.0385H17.8582V34.4776C17.8582 39.3244 21.0631 43.3239 25.4188 45.9857C29.8156 48.6727 35.7372 50.2565 42.1508 50.2565C48.5644 50.2565 54.4861 48.6727 58.8829 45.9857C63.2385 43.3239 66.4435 39.3244 66.4435 34.4776V31.1468C66.4437 31.1218 66.4438 31.0968 66.4438 31.0719C66.4438 26.2251 63.2388 22.2256 58.8832 19.5638C54.4863 16.8768 48.5647 15.293 42.1511 15.293C35.7375 15.293 29.8158 16.8768 25.419 19.5638C21.0734 22.2195 17.8731 26.2067 17.8585 31.0385Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M64.0441 34.4778C64.0441 41.8671 54.2421 47.8574 42.1507 47.8574C30.0593 47.8574 20.2573 41.8671 20.2573 34.4778V31.3386H64.0441V34.4778Z", fill: "#FEDC90" }), React__default['default'].createElement("path", { d: "M64.0441 31.0719C64.0441 38.4613 54.2421 44.4515 42.1507 44.4515C30.0593 44.4515 20.2573 38.4613 20.2573 31.0719C20.2573 23.6826 30.0593 17.6924 42.1507 17.6924C54.2421 17.6924 64.0441 23.6826 64.0441 31.0719Z", fill: "#D1884F" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M25.4361 31.9044C25.4361 34.3714 27.2287 36.5809 30.0567 38.0676L28.0973 41.4614L28.0977 41.4617H28.0973V50.0509C28.0973 51.1867 29.018 52.1075 30.1538 52.1075C31.2896 52.1075 32.2104 51.1867 32.2104 50.0509V43.22L34.3184 39.5686C35.6663 39.8545 37.1133 40.0097 38.6192 40.0097C45.9 40.0097 51.8022 36.3808 51.8022 31.9044C51.8022 27.428 45.9 23.7991 38.6192 23.7991C31.3383 23.7991 25.4361 27.428 25.4361 31.9044Z", fill: "url(#paint1_linear)" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M30.0569 38.0676C29.7437 37.9029 29.4431 37.7294 29.1563 37.5476C26.8538 36.0883 25.4363 34.0982 25.4363 31.9045C25.4363 27.428 31.3386 23.7991 38.6194 23.7991C45.9002 23.7991 51.8025 27.428 51.8025 31.9045C51.8025 36.3809 45.9002 40.0098 38.6194 40.0098C37.1135 40.0098 35.6666 39.8545 34.3187 39.5687L32.2106 43.22V50.0509C32.2106 51.1868 31.2899 52.1075 30.1541 52.1075C29.0183 52.1075 28.0975 51.1868 28.0975 50.0509V41.4617L30.0569 38.0676ZM25.9981 41.4978V50.0509C25.9981 52.3462 27.8588 54.2069 30.1541 54.2069C32.4493 54.2069 34.31 52.3462 34.31 50.0509V43.7826L35.4034 41.8887C36.4418 42.0334 37.5181 42.1092 38.6194 42.1092C42.584 42.1092 46.2738 41.1254 49.0408 39.4242C51.7735 37.7441 53.9019 35.1446 53.9019 31.9045C53.9019 28.6643 51.7735 26.0648 49.0408 24.3847C46.2738 22.6835 42.584 21.6997 38.6194 21.6997C34.6548 21.6997 30.965 22.6835 28.198 24.3847C25.4652 26.0648 23.3369 28.6643 23.3369 31.9045C23.3369 34.7481 24.9657 37.0898 27.2286 38.7677L26.2939 40.3867C26.2048 40.5358 26.1337 40.697 26.0835 40.8672C26.0221 41.0746 25.9943 41.2873 25.9981 41.4978Z", fill: "#633001" }), React__default['default'].createElement("path", { d: "M29.5544 28.4894C29.5544 30.8083 32.5084 32.6882 36.1524 32.6882C39.7964 32.6882 42.7505 30.8083 42.7505 28.4894C42.7505 26.1704 39.7964 24.2905 36.1524 24.2905C32.5084 24.2905 29.5544 26.1704 29.5544 28.4894Z", fill: "#9E7200" }), React__default['default'].createElement("path", { d: "M29.5547 26.6899H42.7508V28.4894H29.5547V26.6899Z", fill: "#9E7200" }), React__default['default'].createElement("path", { d: "M29.5544 26.6898C29.5544 29.0088 32.5084 30.8887 36.1524 30.8887C39.7964 30.8887 42.7505 29.0088 42.7505 26.6898C42.7505 24.3709 39.7964 22.491 36.1524 22.491C32.5084 22.491 29.5544 24.3709 29.5544 26.6898Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M33.6489 26.1838L35.5086 25.0003C35.9016 24.7502 36.4038 24.7502 36.7968 25.0003L38.6565 26.1838C39.0269 26.4195 39.0269 26.9602 38.6565 27.1959L36.7968 28.3794C36.4038 28.6295 35.9016 28.6295 35.5086 28.3794L33.6489 27.1959C33.2785 26.9602 33.2785 26.4195 33.6489 26.1838Z", fill: "#9E7200" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M30.3599 21.9496C31.9392 20.9446 33.9929 20.3916 36.1525 20.3916C38.3121 20.3916 40.3658 20.9446 41.9451 21.9496C43.4996 22.9389 44.8499 24.5636 44.8499 26.6899V28.4894C44.8499 30.6156 43.4996 32.2404 41.9451 33.2296C40.3658 34.2347 38.3121 34.7876 36.1525 34.7876C33.9929 34.7876 31.9392 34.2347 30.3599 33.2296C28.8054 32.2404 27.4551 30.6156 27.4551 28.4894V26.6899C27.4551 24.5636 28.8054 22.9389 30.3599 21.9496ZM36.1525 22.491C32.5085 22.491 29.5545 24.3709 29.5545 26.6899V28.4894C29.5545 30.8083 32.5085 32.6882 36.1525 32.6882C39.7965 32.6882 42.7505 30.8083 42.7505 28.4894V26.6899C42.7505 24.3709 39.7965 22.491 36.1525 22.491Z", fill: "#633001" }), React__default['default'].createElement("defs", null, React__default['default'].createElement("linearGradient", { id: "paint0_linear", x1: "45", y1: "0", x2: "45", y2: "90", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#54DADE" }), React__default['default'].createElement("stop", { offset: "0.762157", stopColor: "#24C7D6" })), React__default['default'].createElement("linearGradient", { id: "paint1_linear", x1: "38.7618", y1: "24.0704", x2: "38.7618", y2: "51.8948", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#9F4A08" }), React__default['default'].createElement("stop", { offset: "0.370494", stopColor: "#7D3900" }), React__default['default'].createElement("stop", { offset: "1", stopColor: "#8D4104" }))))); }; var Icon$G = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M9 14.7902C9 15.555 9.82366 16.0367 10.4903 15.6617L15.4505 12.8716C16.1302 12.4893 16.1302 11.5107 15.4505 11.1284L10.4903 8.33827C9.82366 7.96331 9 8.44502 9 9.20985V14.7902ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z" }))); }; var Icon$F = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 48 48" }, props), React__default['default'].createElement("path", { d: "M38 10H34C34 7.79086 32.2091 6 30 6H18C15.7909 6 14 7.79086 14 10H10C7.8 10 6 11.8 6 14V16C6 21.1 9.84 25.26 14.78 25.88C16.04 28.88 18.74 31.14 22 31.8V38H16C14.8954 38 14 38.8954 14 40C14 41.1046 14.8954 42 16 42H32C33.1046 42 34 41.1046 34 40C34 38.8954 33.1046 38 32 38H26V31.8C29.26 31.14 31.96 28.88 33.22 25.88C38.16 25.26 42 21.1 42 16V14C42 11.8 40.2 10 38 10ZM10 16V14H14V21.64C11.68 20.8 10 18.6 10 16ZM24 28C20.7 28 18 25.3 18 22V10H30V22C30 25.3 27.3 28 24 28ZM38 16C38 18.6 36.32 20.8 34 21.64V14H38V16Z" }))); }; var Icon$E = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 20 20" }, props), React__default['default'].createElement("path", { d: "M5 10C5 10.55 5.45 11 6 11H14C14.55 11 15 10.55 15 10C15 9.45 14.55 9 14 9H6C5.45 9 5 9.45 5 10ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18Z" }))); }; var Icon$D = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M23 12L20.56 9.21L20.9 5.52L17.29 4.7L15.4 1.5L12 2.96L8.6 1.5L6.71 4.69L3.1 5.5L3.44 9.2L1 12L3.44 14.79L3.1 18.49L6.71 19.31L8.6 22.5L12 21.03L15.4 22.49L17.29 19.3L20.9 18.48L20.56 14.79L23 12ZM9.38 16.01L7 13.61C6.61 13.22 6.61 12.59 7 12.2L7.07 12.13C7.46 11.74 8.1 11.74 8.49 12.13L10.1 13.75L15.25 8.59C15.64 8.2 16.28 8.2 16.67 8.59L16.74 8.66C17.13 9.05 17.13 9.68 16.74 10.07L10.82 16.01C10.41 16.4 9.78 16.4 9.38 16.01Z" }))); }; var Icon$C = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 34 38" }, props), React__default['default'].createElement("rect", { x: "8.83594", width: "5.30132", height: "17.3191", rx: "2.65066", fill: "#D1884F" }), React__default['default'].createElement("rect", { x: "19.4385", width: "5.30132", height: "17.3191", rx: "2.65066", fill: "#D1884F" }), React__default['default'].createElement("path", { d: "M8.5 13.0084C13.1944 8.40751 20.8056 8.40751 25.5 13.0084C30.1944 17.6093 30.1944 25.0689 25.5 29.6698L17.6538 37.3597C17.2927 37.7136 16.7073 37.7136 16.3462 37.3597L8.5 29.6698C3.80558 25.0689 3.80558 17.6093 8.5 13.0084Z", fill: "#D1884F" }), React__default['default'].createElement("ellipse", { cx: "12.3696", cy: "19.9172", rx: "1.76711", ry: "2.59786", fill: "white" }), React__default['default'].createElement("ellipse", { cx: "21.2056", cy: "19.9172", rx: "1.76711", ry: "2.59786", fill: "white" }))); }; var Icon$B = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM12.5 7.75C12.5 7.33579 12.1642 7 11.75 7C11.3358 7 11 7.33579 11 7.75V13L15.5537 15.8022C15.9106 16.0219 16.3781 15.9106 16.5978 15.5537C16.8192 15.1938 16.7041 14.7225 16.3419 14.5051L12.5 12.2V7.75Z" }))); }; var Icon$A = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 80 80" }, props), React__default['default'].createElement("g", { clipPath: "url(#clip0)" }, React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M26.0073 13.3635C24.9476 12.4048 23.2491 12.9058 22.8792 14.286C22.6061 15.3055 23.2111 16.3534 24.2305 16.6266L31.8797 18.6762L26.0073 13.3635ZM18.609 13.1418C19.8344 8.56857 25.4621 6.90878 28.9731 10.0851L41.2257 21.1698C43.051 22.8212 41.4235 25.8102 39.0459 25.1732L23.0863 20.8968C19.7085 19.9917 17.7039 16.5197 18.609 13.1418Z", fill: "#7645D9" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M42.264 10.1052C42.7399 8.62854 44.609 8.17749 45.7061 9.27458C46.5164 10.0849 46.5164 11.3987 45.7061 12.209L39.6263 18.2888L42.264 10.1052ZM49.1002 5.88046C45.4652 2.24548 39.2724 3.73996 37.6954 8.63274L32.192 25.7073C31.3722 28.251 34.5252 30.1781 36.415 28.2883L49.1002 15.6031C51.785 12.9183 51.785 8.5653 49.1002 5.88046Z", fill: "#7645D9" }), React__default['default'].createElement("path", { opacity: "0.6", d: "M70.9047 42.5535C71.2363 43.8171 73.0301 43.8171 73.3617 42.5535L74.3564 38.7636C74.4727 38.3202 74.819 37.9739 75.2624 37.8575L79.0523 36.8629C80.3159 36.5313 80.3159 34.7375 79.0523 34.4059L75.2624 33.4112C74.819 33.2949 74.4727 32.9486 74.3564 32.5051L73.3617 28.7153C73.0301 27.4517 71.2363 27.4517 70.9047 28.7153L69.91 32.5051C69.7937 32.9486 69.4474 33.2949 69.004 33.4112L65.2141 34.4059C63.9505 34.7375 63.9505 36.5313 65.2141 36.8629L69.004 37.8575C69.4474 37.9739 69.7937 38.3202 69.91 38.7636L70.9047 42.5535Z", fill: "#53DEE9" }), React__default['default'].createElement("path", { d: "M67.9738 14.5792C67.9699 15.345 68.9855 15.6172 69.365 14.952L70.5032 12.957C70.6364 12.7235 70.885 12.58 71.1538 12.5814L73.4506 12.5932C74.2164 12.5971 74.4886 11.5814 73.8234 11.202L71.8284 10.0637C71.5949 9.93057 71.4514 9.68195 71.4528 9.41322L71.4646 7.11635C71.4685 6.35056 70.4528 6.07841 70.0734 6.74357L68.9351 8.73862C68.802 8.97203 68.5533 9.11558 68.2846 9.1142L65.9877 9.10239C65.222 9.09846 64.9498 10.1141 65.615 10.4936L67.61 11.6318C67.8434 11.765 67.987 12.0136 67.9856 12.2824L67.9738 14.5792Z", fill: "#53DEE9" }), React__default['default'].createElement("path", { opacity: "0.8", d: "M12.6621 19.7326C13.3806 19.544 13.3806 18.5241 12.6621 18.3356L8.79571 17.3208C8.54359 17.2547 8.34669 17.0578 8.28052 16.8056L7.26579 12.9392C7.07722 12.2208 6.05731 12.2208 5.86875 12.9392L4.85402 16.8056C4.78785 17.0578 4.59095 17.2547 4.33883 17.3208L0.472442 18.3356C-0.246022 18.5241 -0.246022 19.544 0.472441 19.7326L4.33883 20.7473C4.59095 20.8135 4.78785 21.0104 4.85402 21.2625L5.86875 25.1289C6.05731 25.8474 7.07722 25.8474 7.26578 25.1289L8.28052 21.2625C8.34669 21.0104 8.54359 20.8135 8.79571 20.7473L12.6621 19.7326Z", fill: "#53DEE9" }), React__default['default'].createElement("path", { d: "M16.1463 37.3821C17.0611 33.9679 20.5705 31.9418 23.9847 32.8566L57.9852 41.9671C61.3994 42.8819 63.4256 46.3912 62.5107 49.8054L56.8167 71.0558C55.9019 74.47 52.3925 76.4961 48.9783 75.5813L14.9778 66.4709C11.5636 65.556 9.53745 62.0467 10.4523 58.6325L16.1463 37.3821Z", fill: "url(#paint0_linear)" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M57.157 45.058L23.1564 35.9476C21.4493 35.4902 19.6947 36.5032 19.2373 38.2103L13.5432 59.4607C13.0858 61.1678 14.0989 62.9225 15.806 63.3799L49.8066 72.4903C51.5137 72.9477 53.2683 71.9347 53.7257 70.2276L59.4198 48.9772C59.8772 47.2701 58.8641 45.5154 57.157 45.058ZM23.9847 32.8566C20.5705 31.9418 17.0611 33.9679 16.1463 37.3821L10.4523 58.6325C9.53745 62.0467 11.5636 65.556 14.9778 66.4709L48.9783 75.5813C52.3925 76.4961 55.9019 74.47 56.8167 71.0558L62.5107 49.8054C63.4256 46.3912 61.3994 42.8819 57.9852 41.9671L23.9847 32.8566Z", fill: "#0098A1" }), React__default['default'].createElement("path", { d: "M35.9629 36.0654L46.0085 38.7571L37.0016 72.3714L26.956 69.6797L35.9629 36.0654Z", fill: "#7645D9" }), React__default['default'].createElement("path", { d: "M11.8535 53.0029L14.5452 42.9573L61.111 55.4346L58.4193 65.4802L11.8535 53.0029Z", fill: "#7645D9" }), React__default['default'].createElement("g", { style: { mixBlendMode: "multiply" } }, React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M30.0918 57.9047L40.1732 60.606L39.7591 62.1515L29.6777 59.4502L30.0918 57.9047ZM42.8724 50.5325L32.791 47.8312L33.2051 46.2857L43.2865 48.987L42.8724 50.5325Z", fill: "#7645D9" })), React__default['default'].createElement("path", { d: "M11.4611 31.1814C10.775 28.6207 12.2946 25.9887 14.8552 25.3026L58.1287 13.7075C60.6893 13.0214 63.3213 14.541 64.0074 17.1016L65.1462 21.3517C65.8324 23.9123 64.3128 26.5443 61.7521 27.2305L18.4787 38.8256C15.918 39.5117 13.286 37.9921 12.5999 35.4314L11.4611 31.1814Z", fill: "url(#paint1_linear)" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M58.9569 16.7985L15.6834 28.3936C14.8299 28.6223 14.3233 29.4996 14.552 30.3531L15.6908 34.6032C15.9196 35.4568 16.7969 35.9633 17.6504 35.7346L60.9239 24.1395C61.7775 23.9108 62.284 23.0335 62.0553 22.1799L60.9165 17.9298C60.6878 17.0763 59.8104 16.5698 58.9569 16.7985ZM14.8552 25.3026C12.2946 25.9887 10.775 28.6207 11.4611 31.1814L12.5999 35.4314C13.286 37.9921 15.918 39.5117 18.4787 38.8256L61.7521 27.2305C64.3128 26.5443 65.8324 23.9123 65.1462 21.3517L64.0074 17.1016C63.3213 14.541 60.6893 13.0214 58.1287 13.7075L14.8552 25.3026Z", fill: "#0098A1" }), React__default['default'].createElement("path", { d: "M31.4707 20.8506L41.5163 18.1589L45.1398 31.6818L35.0942 34.3735L31.4707 20.8506Z", fill: "#7645D9" }), React__default['default'].createElement("g", { style: { mixBlendMode: "multiply" } }, React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.9671 22.5998L41.9672 19.7998L41.5673 17.9998L31.3975 20.8215L31.9671 22.5998Z", fill: "#7645D9" }))), React__default['default'].createElement("defs", null, React__default['default'].createElement("linearGradient", { id: "paint0_linear", x1: "40.9849", y1: "37.4118", x2: "31.978", y2: "71.0261", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#53DEE9" }), React__default['default'].createElement("stop", { offset: "1", stopColor: "#1FC7D4" })), React__default['default'].createElement("linearGradient", { id: "paint1_linear", x1: "36.4919", y1: "19.505", x2: "40.1154", y2: "33.028", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#53DEE9" }), React__default['default'].createElement("stop", { offset: "1", stopColor: "#1FC7D4" })), React__default['default'].createElement("clipPath", { id: "clip0" }, React__default['default'].createElement("rect", { width: "80", height: "80", fill: "white", transform: "matrix(-1 0 0 1 80 0)" }))))); }; var Icon$z = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 80 80" }, props), React__default['default'].createElement("path", { d: "M76.2856 28.6526C77.0883 29.4553 77.1989 30.7184 76.548 31.6485C64.6385 48.6643 49.9116 63.5221 33.0019 75.5817L31.6665 76.5341C30.6872 77.2325 29.3467 77.121 28.4962 76.2705L22.4847 70.259C26.0334 66.5844 25.9945 60.7286 22.3678 57.1019C18.7411 53.4752 12.8853 53.4362 9.21067 56.985L3.68116 51.4555C2.62962 50.4039 2.77462 48.6597 3.98536 47.7962L5.32156 46.8433C21.8225 35.0751 36.1934 20.5765 47.815 3.97204C48.6291 2.80897 50.296 2.66297 51.2998 3.66682L56.9276 9.29459C53.3922 12.97 53.4356 18.8158 57.0578 22.438C60.6799 26.0601 66.5257 26.1035 70.2011 22.5681L76.2856 28.6526Z", fill: "#DBCDF9" }), React__default['default'].createElement("path", { d: "M78.9507 30.3151L57.459 57.5291L29.6615 78.5708L24.3156 73.1863L22.3868 70.8482L24.3156 68.0575L24.9915 65.2668L24.6194 62.29L23.5031 59.4993L21.6426 57.2668L19.4101 55.7784L16.9915 55.0342H14.0147L10.8519 56.1505L8.99148 57.8249L4.52637 52.4296L11.7898 51.3463C34.3187 47.9863 55.6053 38.8899 73.6048 24.9307L78.9507 30.3151Z", fill: "#A28BD4" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.7724 70.5193C19.7732 69.7287 20.0885 68.971 20.6487 68.4131L20.6586 68.4032C23.1622 65.8996 23.1622 61.8405 20.6586 59.3369C18.155 56.8333 14.0958 56.8333 11.5922 59.3369L11.5823 59.3468C11.0245 59.907 10.2667 60.2223 9.47617 60.2231C8.68561 60.2239 7.92718 59.9103 7.36817 59.3512L1.57656 53.5596C-0.776282 51.2068 -0.451848 47.304 2.25722 45.372L3.59342 44.419L5.32184 46.8426L3.98564 47.7955C2.7749 48.659 2.6299 50.4032 3.68144 51.4548L9.47304 57.2464L9.48735 57.232C9.49192 57.2275 9.49649 57.2229 9.50106 57.2183C13.1682 53.5659 19.1019 53.5705 22.7635 57.232C26.4247 60.8933 26.4295 66.8263 22.778 70.4936C22.7731 70.4984 22.7683 70.5033 22.7635 70.5081L22.7491 70.5224L28.4965 76.2698C29.347 77.1203 30.6875 77.2318 31.6668 76.5334L33.0022 75.581C49.9119 63.5214 64.6388 48.6636 76.5483 31.6478C77.1992 30.7178 77.0886 29.4546 76.2859 28.6519L70.2487 22.6148C70.2268 22.6371 70.2047 22.6594 70.1825 22.6816C70.1603 22.7038 70.138 22.7259 70.1156 22.7479C66.4445 26.3475 60.5503 26.3254 56.9064 22.6816C53.2625 19.0376 53.2405 13.1434 56.8404 9.47221C56.8623 9.44989 56.8843 9.42764 56.9064 9.40548C56.9286 9.38329 56.9509 9.36124 56.9733 9.33932L51.3001 3.66613C50.2962 2.66229 48.6293 2.80829 47.8153 3.97136C36.1937 20.5758 21.8228 35.0744 5.32184 46.8426L3.59342 44.419C19.8185 32.8476 33.9492 18.5913 45.3766 2.26445C47.252 -0.415092 51.0922 -0.751452 53.4049 1.56125L59.0781 7.23444C59.64 7.79626 59.9539 8.55937 59.95 9.35389C59.9461 10.1484 59.6247 10.9084 59.0574 11.4647C59.042 11.4798 59.0267 11.495 59.0113 11.5104C56.5077 14.014 56.5077 18.0731 59.0113 20.5767C61.5149 23.0803 65.5741 23.0803 68.0777 20.5767C68.0929 20.5615 68.1081 20.5461 68.1233 20.5306C68.6796 19.9633 69.4396 19.6419 70.2341 19.6381C71.0287 19.6342 71.7918 19.9481 72.3536 20.5099L78.3907 26.547C80.2148 28.3711 80.4662 31.2413 78.987 33.3547C66.8832 50.648 51.9161 65.7482 34.7306 78.0046L33.3952 78.9569C31.2319 80.4997 28.2705 80.2536 26.3916 78.3747L20.6442 72.6273C20.0852 72.0683 19.7715 71.3099 19.7724 70.5193Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M39.9888 14.0672L41.3044 15.3827C41.8856 15.964 41.8856 16.9064 41.3044 17.4876C40.7231 18.0688 39.7808 18.0688 39.1995 17.4876L37.884 16.1721C37.3027 15.5908 37.3027 14.6484 37.884 14.0672C38.4652 13.4859 39.4076 13.4859 39.9888 14.0672Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M45.5142 19.5926L46.8298 20.9081C47.411 21.4894 47.411 22.4317 46.8298 23.013C46.2485 23.5942 45.3062 23.5942 44.7249 23.013L43.4094 21.6974C42.8281 21.1162 42.8281 20.1738 43.4094 19.5926C43.9906 19.0113 44.933 19.0113 45.5142 19.5926Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M52.3542 28.5384C51.773 29.1196 50.8306 29.1196 50.2493 28.5384L48.6707 26.9597C48.0894 26.3785 48.0894 25.4361 48.6707 24.8549C49.2519 24.2736 50.1943 24.2736 50.7755 24.8549L52.3542 26.4335C52.9354 27.0148 52.9354 27.9571 52.3542 28.5384Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M57.8796 34.0638C57.2983 34.645 56.356 34.645 55.7747 34.0638L54.1961 32.4851C53.6148 31.9039 53.6148 30.9615 54.1961 30.3802C54.7773 29.799 55.7197 29.799 56.3009 30.3802L57.8796 31.9589C58.4608 32.5401 58.4608 33.4825 57.8796 34.0638Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M61.8267 35.9051L63.1423 37.2206C63.7235 37.8019 63.7235 38.7442 63.1423 39.3255C62.561 39.9067 61.6187 39.9067 61.0374 39.3255L59.7219 38.0099C59.1406 37.4287 59.1406 36.4863 59.7219 35.9051C60.3031 35.3238 61.2455 35.3238 61.8267 35.9051Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M67.3521 41.4305L68.6677 42.746C69.2489 43.3273 69.2489 44.2696 68.6677 44.8509C68.0864 45.4321 67.144 45.4321 66.5628 44.8509L65.2472 43.5353C64.666 42.9541 64.666 42.0117 65.2472 41.4305C65.8285 40.8492 66.7709 40.8492 67.3521 41.4305Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M32.2915 37.1288C30.6927 35.53 30.6927 32.9378 32.2915 31.3389C34.1033 29.5272 37.1152 29.806 38.5636 31.9196L42.2107 37.2416C45.3939 36.2204 48.7719 36.3559 51.0104 38.5945C53.0227 40.6067 53.3281 43.5721 52.6459 46.3981C51.9561 49.256 50.2117 52.2664 47.6467 54.8314C45.0817 57.3964 42.0713 59.1408 39.2134 59.8306C36.3874 60.5128 33.422 60.2073 31.4098 58.1951C29.1842 55.9696 29.0377 52.6168 30.0388 49.4519L24.694 45.7892C22.5804 44.3408 22.3016 41.3289 24.1134 39.5171C25.7122 37.9183 28.3044 37.9183 29.9032 39.5171L33.6067 43.2206C33.9734 42.7908 34.3625 42.3691 34.7735 41.9582C35.1704 41.5613 35.5772 41.1847 35.9918 40.8291L32.2915 37.1288Z", fill: "#633001" }), React__default['default'].createElement("ellipse", { cx: "36.9019", cy: "50.5685", rx: "1.79015", ry: "2.60385", transform: "rotate(-45 36.9019 50.5685)", fill: "#DBCDF9" }), React__default['default'].createElement("ellipse", { rx: "1.79015", ry: "2.60385", transform: "matrix(0.707107 -0.707106 0.707107 0.707106 43.5768 43.8947)", fill: "#DBCDF9" }))); }; var Icon$y = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 48 48" }, props), React__default['default'].createElement("circle", { cx: "24", cy: "24", r: "24", fill: "url(#paint0_linear)" }), React__default['default'].createElement("path", { d: "M39.0623 18.9777C39.3983 19.3138 39.4447 19.8426 39.1721 20.232C34.1862 27.3557 28.0207 33.576 20.9413 38.6248L20.3823 39.0235C19.9723 39.3159 19.4111 39.2692 19.055 38.9132L16.5383 36.3964C18.024 34.858 18.0077 32.4065 16.4893 30.8881C14.971 29.3698 12.5194 29.3535 10.981 30.8392L8.66608 28.5242C8.22585 28.084 8.28655 27.3538 8.79343 26.9923L9.35284 26.5933C16.261 21.6665 22.2775 15.5966 27.1429 8.64507C27.4837 8.15815 28.1816 8.09702 28.6019 8.51729L30.958 10.8734C29.4778 12.4121 29.496 14.8595 31.0125 16.3759C32.5289 17.8924 34.9762 17.9105 36.515 16.4304L39.0623 18.9777Z", fill: "#DBCDF9" }), React__default['default'].createElement("path", { d: "M40.1776 19.6742L31.18 31.0674L19.5425 39.8766L17.3044 37.6224L16.4969 36.6435L17.3044 35.4752L17.5873 34.3068L17.4316 33.0606L16.9642 31.8923L16.1853 30.9576L15.2507 30.3345L14.2381 30.0229H12.9919L11.6678 30.4903L10.8889 31.1913L9.01953 28.9325L12.0604 28.4789C21.4923 27.0723 30.404 23.264 37.9396 17.4199L40.1776 19.6742Z", fill: "#A28BD4" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.4028 36.5059C15.4031 36.1749 15.5351 35.8577 15.7697 35.6241L15.7738 35.62C16.822 34.5718 16.822 32.8725 15.7738 31.8243C14.7257 30.7762 13.0263 30.7762 11.9781 31.8243L11.974 31.8285C11.7405 32.063 11.4232 32.195 11.0922 32.1953C10.7613 32.1957 10.4438 32.0643 10.2097 31.8303L7.78504 29.4056C6.80001 28.4206 6.93583 26.7867 8.07 25.9778L8.6294 25.5789L9.35301 26.5935L8.79361 26.9925C8.28673 27.354 8.22602 28.0842 8.66625 28.5244L11.0909 30.9491L11.0969 30.9431C11.0988 30.9412 11.1008 30.9393 11.1027 30.9374C12.638 29.4083 15.1221 29.4102 16.655 30.9431C18.1878 32.4759 18.1899 34.9598 16.6611 36.4951C16.6591 36.4971 16.6571 36.4992 16.655 36.5012L16.649 36.5072L19.0552 38.9134C19.4113 39.2694 19.9725 39.3161 20.3824 39.0237L20.9415 38.625C28.0208 33.5762 34.1863 27.3559 39.1723 20.2321C39.4448 19.8428 39.3985 19.314 39.0625 18.9779L36.535 16.4504C36.5258 16.4598 36.5166 16.4691 36.5073 16.4784C36.498 16.4877 36.4886 16.4969 36.4792 16.5061C34.9423 18.0132 32.4747 18.0039 30.9492 16.4784C29.4236 14.9528 29.4144 12.4852 30.9215 10.9482C30.9307 10.9389 30.9399 10.9296 30.9492 10.9203C30.9585 10.911 30.9678 10.9018 30.9771 10.8926L28.602 8.51747C28.1818 8.0972 27.4839 8.15833 27.1431 8.64525C22.2777 15.5968 16.2612 21.6667 9.35301 26.5935L8.6294 25.5789C15.4221 20.7344 21.338 14.766 26.1221 7.93065C26.9073 6.80885 28.515 6.66803 29.4832 7.63625L31.8584 10.0114C32.0936 10.2466 32.225 10.566 32.2234 10.8987C32.2217 11.2313 32.0872 11.5495 31.8497 11.7824C31.8432 11.7887 31.8368 11.7951 31.8304 11.8015C30.7822 12.8496 30.7822 14.549 31.8304 15.5972C32.8785 16.6453 34.5779 16.6453 35.626 15.5972C35.6324 15.5908 35.6388 15.5844 35.6452 15.5779C35.8781 15.3404 36.1962 15.2058 36.5289 15.2042C36.8615 15.2026 37.181 15.334 37.4162 15.5692L39.9437 18.0967C40.7073 18.8603 40.8126 20.062 40.1933 20.9467C35.126 28.1867 28.8599 34.5084 21.6651 39.6396L21.1061 40.0383C20.2004 40.6842 18.9606 40.5812 18.174 39.7946L15.7678 37.3884C15.5338 37.1544 15.4025 36.8369 15.4028 36.5059Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M23.8664 12.8716L24.4172 13.4223C24.6605 13.6657 24.6605 14.0602 24.4172 14.3035C24.1738 14.5469 23.7793 14.5469 23.536 14.3035L22.9852 13.7528C22.7419 13.5094 22.7419 13.1149 22.9852 12.8716C23.2285 12.6282 23.6231 12.6282 23.8664 12.8716Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M26.1799 15.1841L26.7306 15.7348C26.974 15.9782 26.974 16.3727 26.7306 16.616C26.4873 16.8594 26.0928 16.8594 25.8494 16.616L25.2987 16.0653C25.0553 15.8219 25.0553 15.4274 25.2987 15.1841C25.542 14.9407 25.9365 14.9407 26.1799 15.1841Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M29.0441 18.9295C28.8008 19.1729 28.4062 19.1728 28.1629 18.9295L27.502 18.2686C27.2587 18.0253 27.2587 17.6307 27.502 17.3874C27.7453 17.144 28.1399 17.144 28.3832 17.3874L29.0441 18.0483C29.2875 18.2916 29.2875 18.6862 29.0441 18.9295Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.3576 21.243C31.1143 21.4863 30.7197 21.4863 30.4764 21.243L29.8155 20.5821C29.5721 20.3387 29.5721 19.9442 29.8155 19.7009C30.0588 19.4575 30.4533 19.4575 30.6967 19.7009L31.3576 20.3618C31.6009 20.6051 31.6009 20.9996 31.3576 21.243Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M33.009 22.0141L33.5597 22.5649C33.8031 22.8082 33.8031 23.2028 33.5597 23.4461C33.3164 23.6895 32.9219 23.6895 32.6785 23.4461L32.1278 22.8953C31.8844 22.652 31.8844 22.2575 32.1278 22.0141C32.3711 21.7708 32.7656 21.7708 33.009 22.0141Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M35.3225 24.3266L35.8732 24.8774C36.1166 25.1207 36.1166 25.5153 35.8732 25.7586C35.6299 26.002 35.2354 26.002 34.992 25.7586L34.4412 25.2078C34.1979 24.9645 34.1979 24.57 34.4412 24.3266C34.6846 24.0833 35.0791 24.0833 35.3225 24.3266Z", fill: "#633001" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.6437 22.5266C19.9743 21.8573 19.9743 20.772 20.6437 20.1027C21.4022 19.3442 22.6632 19.4609 23.2695 20.3458L24.7964 22.5738C26.1291 22.1463 27.5433 22.2031 28.4805 23.1402C29.3229 23.9827 29.4507 25.2241 29.1652 26.4073C28.8764 27.6037 28.1461 28.8641 27.0722 29.9379C25.9984 31.0117 24.7381 31.742 23.5416 32.0308C22.3584 32.3164 21.117 32.1886 20.2745 31.3461C19.3428 30.4144 19.2815 29.0108 19.7006 27.6858L17.4629 26.1524C16.5781 25.546 16.4614 24.285 17.2199 23.5265C17.8892 22.8572 18.9745 22.8572 19.6438 23.5265L21.1943 25.077C21.3478 24.897 21.5107 24.7205 21.6828 24.5485C21.8489 24.3823 22.0193 24.2247 22.1928 24.0758L20.6437 22.5266Z", fill: "#633001" }), React__default['default'].createElement("ellipse", { rx: "0.749452", ry: "1.09011", transform: "matrix(0.707107 -0.707106 0.707107 0.707106 22.5742 28.153)", fill: "#DBCDF9" }), React__default['default'].createElement("ellipse", { cx: "25.3682", cy: "25.359", rx: "0.749453", ry: "1.09011", transform: "rotate(-45 25.3682 25.359)", fill: "#DBCDF9" }), React__default['default'].createElement("path", { d: "M40.2095 34.2904C40.0804 34.7825 39.3818 34.7825 39.2527 34.2904L38.5576 31.6422C38.5123 31.4695 38.3775 31.3346 38.2048 31.2893L35.5566 30.5943C35.0645 30.4651 35.0645 29.7666 35.5566 29.6374L38.2048 28.9424C38.3775 28.8971 38.5123 28.7622 38.5576 28.5895L39.2527 25.9413C39.3818 25.4492 40.0804 25.4492 40.2095 25.9413L40.9045 28.5895C40.9499 28.7622 41.0847 28.8971 41.2574 28.9424L43.9056 29.6374C44.3977 29.7666 44.3977 30.4651 43.9056 30.5943L41.2574 31.2893C41.0847 31.3346 40.9499 31.4695 40.9045 31.6422L40.2095 34.2904Z", fill: "#53DEE9" }), React__default['default'].createElement("path", { d: "M16.4183 7.94926C16.5088 7.60415 16.9988 7.60415 17.0893 7.94926L17.5767 9.80644C17.6085 9.92754 17.7031 10.0221 17.8242 10.0539L19.6814 10.5413C20.0265 10.6319 20.0265 11.1218 19.6814 11.2124L17.8242 11.6998C17.7031 11.7316 17.6085 11.8261 17.5767 11.9473L17.0893 13.8044C16.9988 14.1495 16.5088 14.1495 16.4183 13.8044L15.9309 11.9473C15.8991 11.8261 15.8045 11.7316 15.6834 11.6998L13.8262 11.2124C13.4811 11.1218 13.4811 10.6319 13.8262 10.5413L15.6834 10.0539C15.8045 10.0221 15.8991 9.92754 15.9309 9.80644L16.4183 7.94926Z", fill: "#53DEE9" }), React__default['default'].createElement("path", { d: "M10.3511 38.7118C10.2924 38.9355 9.97486 38.9355 9.91616 38.7118L9.60024 37.5081C9.57964 37.4296 9.51834 37.3683 9.43985 37.3477L8.23612 37.0318C8.01244 36.9731 8.01244 36.6555 8.23612 36.5968L9.43985 36.2809C9.51834 36.2603 9.57964 36.199 9.60024 36.1205L9.91616 34.9168C9.97486 34.6931 10.2924 34.6931 10.3511 34.9168L10.667 36.1205C10.6876 36.199 10.7489 36.2603 10.8274 36.2809L12.0311 36.5968C12.2548 36.6555 12.2548 36.9731 12.0311 37.0318L10.8274 37.3477C10.7489 37.3683 10.6876 37.4296 10.667 37.5081L10.3511 38.7118Z", fill: "#53DEE9" }), React__default['default'].createElement("defs", null, React__default['default'].createElement("linearGradient", { id: "paint0_linear", x1: "24", y1: "0", x2: "24", y2: "48", gradientUnits: "userSpaceOnUse" }, React__default['default'].createElement("stop", { stopColor: "#54DADE" }), React__default['default'].createElement("stop", { offset: "0.762157", stopColor: "#24C7D6" }))))); }; var Icon$x = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M15.0701 1.01H9.07007V3.01H15.0701V1.01ZM11.0701 14.01H13.0701V8.01H11.0701V14.01ZM19.1001 7.39L20.5201 5.97C20.0901 5.46 19.6201 4.98 19.1101 4.56L17.6901 5.98C16.1401 4.74 14.1901 4 12.0701 4C7.10007 4 3.07007 8.03 3.07007 13C3.07007 17.97 7.09007 22 12.0701 22C17.0501 22 21.0701 17.97 21.0701 13C21.0701 10.89 20.3301 8.94 19.1001 7.39ZM12.0701 20.01C8.20007 20.01 5.07007 16.88 5.07007 13.01C5.07007 9.14 8.20007 6.01 12.0701 6.01C15.9401 6.01 19.0701 9.14 19.0701 13.01C19.0701 16.88 15.9401 20.01 12.0701 20.01Z" }))); }; var Icon$w = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M15.5 13.9996H14.71L14.43 13.7296C15.63 12.3296 16.25 10.4196 15.91 8.38965C15.44 5.60965 13.12 3.38965 10.32 3.04965C6.09001 2.52965 2.53002 6.08965 3.05002 10.3196C3.39002 13.1196 5.61002 15.4396 8.39002 15.9096C10.42 16.2496 12.33 15.6296 13.73 14.4296L14 14.7096V15.4996L18.25 19.7496C18.66 20.1596 19.33 20.1596 19.74 19.7496C20.15 19.3396 20.15 18.6696 19.74 18.2596L15.5 13.9996ZM9.50002 13.9996C7.01002 13.9996 5.00002 11.9896 5.00002 9.49965C5.00002 7.00965 7.01002 4.99965 9.50002 4.99965C11.99 4.99965 14 7.00965 14 9.49965C14 11.9896 11.99 13.9996 9.50002 13.9996Z" }))); }; var Icon$v = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 25" }, props), React__default['default'].createElement("path", { d: "M16 17.01V11C16 10.45 15.55 10 15 10C14.45 10 14 10.45 14 11V17.01H12.21C11.76 17.01 11.54 17.55 11.86 17.86L14.65 20.64C14.85 20.83 15.16 20.83 15.36 20.64L18.15 17.86C18.47 17.55 18.24 17.01 17.8 17.01H16ZM8.65003 3.35002L5.86003 6.14002C5.54003 6.45002 5.76003 6.99002 6.21003 6.99002H8.00003V13C8.00003 13.55 8.45003 14 9.00003 14C9.55003 14 10 13.55 10 13V6.99002H11.79C12.24 6.99002 12.46 6.45002 12.14 6.14002L9.35003 3.35002C9.16003 3.16002 8.84003 3.16002 8.65003 3.35002Z" }))); }; var Icon$u = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 25" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.86 4.86003L21.65 7.65003C21.84 7.84003 21.84 8.16003 21.64 8.35003L18.85 11.14C18.54 11.46 18 11.24 18 10.79V9.00003H4C3.45 9.00003 3 8.55003 3 8.00003C3 7.45003 3.45 7.00003 4 7.00003H18V5.21003C18 4.76003 18.54 4.54003 18.86 4.86003ZM5.14001 19.14L2.35001 16.35C2.16001 16.16 2.16001 15.84 2.36001 15.65L5.15001 12.86C5.46001 12.54 6.00001 12.76 6.00001 13.21V15H20C20.55 15 21 15.45 21 16C21 16.55 20.55 17 20 17H6.00001V18.79C6.00001 19.24 5.46001 19.46 5.14001 19.14Z" }))); }; var Icon$t = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M4.47 20.9999H19.53C21.07 20.9999 22.03 19.3299 21.26 17.9999L13.73 4.98993C12.96 3.65993 11.04 3.65993 10.27 4.98993L2.74 17.9999C1.97 19.3299 2.93 20.9999 4.47 20.9999ZM12 13.9999C11.45 13.9999 11 13.5499 11 12.9999V10.9999C11 10.4499 11.45 9.99993 12 9.99993C12.55 9.99993 13 10.4499 13 10.9999V12.9999C13 13.5499 12.55 13.9999 12 13.9999ZM13 17.9999H11V15.9999H13V17.9999Z" }))); }; var Box = styled__default['default'].div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), styledSystem.background, styledSystem.border, styledSystem.layout, styledSystem.position, styledSystem.space); var templateObject_1$L; var Flex$1 = styled__default['default'](Box)(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n display: flex;\n ", "\n"], ["\n display: flex;\n ", "\n"])), styledSystem.flexbox); var templateObject_1$K; var variants$2 = { INFO: "info", DANGER: "danger", SUCCESS: "success", WARNING: "warning", }; var getThemeColor = function (_a) { var theme = _a.theme, _b = _a.variant, variant = _b === void 0 ? variants$2.INFO : _b; switch (variant) { case variants$2.DANGER: return theme.colors.failure; case variants$2.WARNING: return theme.colors.warning; case variants$2.SUCCESS: return theme.colors.success; case variants$2.INFO: default: return theme.colors.secondary; } }; var getIcon = function (variant) { if (variant === void 0) { variant = variants$2.INFO; } switch (variant) { case variants$2.DANGER: return Icon$1b; case variants$2.WARNING: return Icon$1c; case variants$2.SUCCESS: return Icon$1d; case variants$2.INFO: default: return Icon$1a; } }; var IconLabel = styled__default['default'].div(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 16px 0 0 16px;\n color: ", ";\n padding: 12px;\n"], ["\n background-color: ", ";\n border-radius: 16px 0 0 16px;\n color: ", ";\n padding: 12px;\n"])), getThemeColor, function (_a) { var theme = _a.theme; return theme.alert.background; }); var withHandlerSpacing = 32 + 12 + 8; // button size + inner spacing + handler position var Details = styled__default['default'].div(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n flex: 1;\n padding-bottom: 12px;\n padding-left: 12px;\n padding-right: ", ";\n padding-top: 12px;\n"], ["\n flex: 1;\n padding-bottom: 12px;\n padding-left: 12px;\n padding-right: ", ";\n padding-top: 12px;\n"])), function (_a) { var hasHandler = _a.hasHandler; return (hasHandler ? withHandlerSpacing + "px" : "12px"); }); var CloseHandler = styled__default['default'].div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n border-radius: 0 16px 16px 0;\n right: 8px;\n position: absolute;\n top: 8px;\n"], ["\n border-radius: 0 16px 16px 0;\n right: 8px;\n position: absolute;\n top: 8px;\n"]))); var StyledAlert = styled__default['default'](Flex$1)(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n border-radius: 16px;\n box-shadow: 0px 20px 36px -8px rgba(14, 14, 44, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.05);\n"], ["\n position: relative;\n background-color: ", ";\n border-radius: 16px;\n box-shadow: 0px 20px 36px -8px rgba(14, 14, 44, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.05);\n"])), function (_a) { var theme = _a.theme; return theme.alert.background; }); var Alert = function (_a) { var title = _a.title, children = _a.children, variant = _a.variant, onClick = _a.onClick; var Icon = getIcon(variant); return (React__default['default'].createElement(StyledAlert, null, React__default['default'].createElement(IconLabel, { variant: variant, hasDescription: !!children }, React__default['default'].createElement(Icon, { color: "currentColor", width: "24px" })), React__default['default'].createElement(Details, { hasHandler: !!onClick }, React__default['default'].createElement(Text, { bold: true }, title), typeof children === "string" ? React__default['default'].createElement(Text, { as: "p" }, children) : children), onClick && (React__default['default'].createElement(CloseHandler, null, React__default['default'].createElement(IconButton, { scale: "sm", variant: "text", onClick: onClick }, React__default['default'].createElement(Icon$U, { width: "24px", color: "currentColor" })))))); }; var templateObject_1$J, templateObject_2$h, templateObject_3$8, templateObject_4$5; var Separator = styled__default['default'].div(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n align-items: center;\n color: currentColor;\n display: flex;\n justify-content: center;\n padding-left: 4px;\n padding-right: 4px;\n\n ", " {\n padding-left: 8px;\n padding-right: 8px;\n }\n\n ", " {\n padding-left: 16px;\n padding-right: 16px;\n }\n"], ["\n align-items: center;\n color: currentColor;\n display: flex;\n justify-content: center;\n padding-left: 4px;\n padding-right: 4px;\n\n ", " {\n padding-left: 8px;\n padding-right: 8px;\n }\n\n ", " {\n padding-left: 16px;\n padding-right: 16px;\n }\n"])), function (_a) { var theme = _a.theme; return theme.mediaQueries.sm; }, function (_a) { var theme = _a.theme; return theme.mediaQueries.md; }); var StyledBreadcrumbs = styled__default['default'].ul(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n align-items: center;\n color: ", ";\n display: flex;\n flex-wrap: wrap;\n list-style-type: none;\n\n ", "\n"], ["\n align-items: center;\n color: ", ";\n display: flex;\n flex-wrap: wrap;\n list-style-type: none;\n\n ", "\n"])), function (_a) { var theme = _a.theme; return theme.colors.textDisabled; }, styledSystem.space); var insertSeparators = function (items, separator) { return items.reduce(function (accum, item, index) { if (index === 0) { return __spreadArrays(accum, [item]); } return __spreadArrays(accum, [ React__default['default'].createElement(Separator, { "aria-hidden": true, key: "seperator-" + index }, separator), item, ]); }, []); }; var DefaultSeparator = React__default['default'].createElement(Icon$W, { color: "currentColor", width: "24px" }); var Breadcrumbs = function (_a) { var _b = _a.separator, separator = _b === void 0 ? DefaultSeparator : _b, children = _a.children; var validItems = React.Children.toArray(children).filter(function (child) { return React.isValidElement(child); }); var items = insertSeparators(validItems, separator); return (React__default['default'].createElement(StyledBreadcrumbs, null, items.map(function (item, index) { return (React__default['default'].createElement("li", { key: "child-" + index }, item)); }))); }; var templateObject_1$I, templateObject_2$g; var getBackgroundColor = function (_a) { var theme = _a.theme, variant = _a.variant; return theme.colors[variant === variants$3.SUBTLE ? "input" : "tertiary"]; }; var StyledButtonMenu = styled__default['default'].div(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 16px;\n display: inline-flex;\n\n & > button + button,\n & > a + a {\n margin-left: 2px; // To avoid focus shadow overlap\n }\n"], ["\n background-color: ", ";\n border-radius: 16px;\n display: inline-flex;\n\n & > button + button,\n & > a + a {\n margin-left: 2px; // To avoid focus shadow overlap\n }\n"])), getBackgroundColor); var templateObject_1$H; var ButtonMenu = function (_a) { var _b = _a.activeIndex, activeIndex = _b === void 0 ? 0 : _b, _c = _a.scale, scale = _c === void 0 ? scales$5.MD : _c, _d = _a.variant, variant = _d === void 0 ? variants$3.PRIMARY : _d, onItemClick = _a.onItemClick, children = _a.children; return (React__default['default'].createElement(StyledButtonMenu, { variant: variant }, React.Children.map(children, function (child, index) { return React.cloneElement(child, { isActive: activeIndex === index, onClick: onItemClick ? function () { return onItemClick(index); } : undefined, scale: scale, variant: variant, }); }))); }; var InactiveButton = styled__default['default'](Button)(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n background-color: transparent;\n color: ", ";\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"], ["\n background-color: transparent;\n color: ", ";\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"])), function (_a) { var theme = _a.theme, colorKey = _a.colorKey; return theme.colors[colorKey]; }); var ButtonMenuItem = function (_a) { var _b = _a.isActive, isActive = _b === void 0 ? false : _b, _c = _a.variant, variant = _c === void 0 ? variants$3.PRIMARY : _c, as = _a.as, props = __rest(_a, ["isActive", "variant", "as"]); if (!isActive) { return (React__default['default'].createElement(InactiveButton, __assign({ forwardedAs: as, variant: "tertiary", colorKey: variant === variants$3.PRIMARY ? "primary" : "textSubtle" }, props))); } return React__default['default'].createElement(Button, __assign({ as: as, variant: variant }, props)); }; var templateObject_1$G; /** * Priority: Warning --> Success --> Active */ var getBoxShadow$1 = function (_a) { var isActive = _a.isActive, isSuccess = _a.isSuccess, isWarning = _a.isWarning, theme = _a.theme; if (isWarning) { return theme.card.boxShadowWarning; } if (isSuccess) { return theme.card.boxShadowSuccess; } if (isActive) { return theme.card.boxShadowActive; } return theme.card.boxShadow; }; var StyledCard = styled__default['default'].div(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: 32px;\n box-shadow: ", ";\n color: ", ";\n overflow: hidden;\n position: relative;\n\n ", "\n"], ["\n background-color: ", ";\n border: ", ";\n border-radius: 32px;\n box-shadow: ", ";\n color: ", ";\n overflow: hidden;\n position: relative;\n\n ", "\n"])), function (_a) { var theme = _a.theme; return theme.card.background; }, function (_a) { var theme = _a.theme; return theme.card.boxShadow; }, getBoxShadow$1, function (_a) { var theme = _a.theme, isDisabled = _a.isDisabled; return theme.colors[isDisabled ? "textDisabled" : "text"]; }, styledSystem.space); StyledCard.defaultProps = { isActive: false, isSuccess: false, isWarning: false, isDisabled: false, }; var templateObject_1$F; var Card = function (_a) { var ribbon = _a.ribbon, children = _a.children, props = __rest(_a, ["ribbon", "children"]); return (React__default['default'].createElement(StyledCard, __assign({}, props), ribbon, children)); }; var CardBody = styled__default['default'].div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styledSystem.space); CardBody.defaultProps = { p: "24px", }; var templateObject_1$E; var CardHeader = styled__default['default'].div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n background: ", ";\n\n ", "\n"], ["\n background: ", ";\n\n ", "\n"])), function (_a) { var theme = _a.theme; return theme.card.cardHeaderBackground; }, styledSystem.space); CardHeader.defaultProps = { p: "24px", }; var templateObject_1$D; var CardFooter = styled__default['default'].div(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n border-top: 1px solid ", ";\n ", "\n"], ["\n border-top: 1px solid ", ";\n ", "\n"])), function (_a) { var theme = _a.theme; return theme.colors.borderColor; }, styledSystem.space); CardFooter.defaultProps = { p: "24px", }; var templateObject_1$C; var StyledCardRibbon = styled__default['default'].div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n background-color: ", ";\n color: white;\n margin: 0;\n padding: 0;\n padding: 8px 0;\n position: absolute;\n right: 0;\n top: 0;\n text-align: center;\n transform: translateX(30%) translateY(0%) rotate(45deg);\n transform-origin: top left;\n width: 96px;\n\n &:before,\n &:after {\n background-color: ", ";\n content: \"\";\n height: 100%;\n margin: 0 -1px; /* Removes tiny gap */\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:before {\n right: 100%;\n }\n\n &:after {\n left: 100%;\n }\n\n & > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 96px;\n }\n"], ["\n background-color: ", ";\n color: white;\n margin: 0;\n padding: 0;\n padding: 8px 0;\n position: absolute;\n right: 0;\n top: 0;\n text-align: center;\n transform: translateX(30%) translateY(0%) rotate(45deg);\n transform-origin: top left;\n width: 96px;\n\n &:before,\n &:after {\n background-color: ", ";\n content: \"\";\n height: 100%;\n margin: 0 -1px; /* Removes tiny gap */\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:before {\n right: 100%;\n }\n\n &:after {\n left: 100%;\n }\n\n & > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 96px;\n }\n"])), function (_a) { var _b = _a.variantColor, variantColor = _b === void 0 ? "secondary" : _b, theme = _a.theme; return theme.colors[variantColor]; }, function (_a) { var _b = _a.variantColor, variantColor = _b === void 0 ? "secondary" : _b, theme = _a.theme; return theme.colors[variantColor]; }); var CardRibbon = function (_a) { var variantColor = _a.variantColor, text = _a.text; return (React__default['default'].createElement(StyledCardRibbon, { variantColor: variantColor }, React__default['default'].createElement("div", { title: text }, text))); }; var templateObject_1$B; var scales$4 = { SM: "sm", MD: "md", }; var getScale$2 = function (_a) { var scale = _a.scale; switch (scale) { case scales$4.SM: return "24px"; case scales$4.MD: default: return "32px"; } }; var Checkbox = styled__default['default'].input.attrs({ type: "checkbox" })(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ", ";\n width: ", ";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 8px;\n background-color: ", ";\n box-shadow: ", ";\n\n &:after {\n content: \"\";\n position: absolute;\n border-bottom: 2px solid;\n border-left: 2px solid;\n border-color: transparent;\n top: 30%;\n left: 0;\n right: 0;\n width: 50%;\n height: 25%;\n margin: auto;\n transform: rotate(-50deg);\n transition: border-color 0.2s ease-in-out;\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ", ";\n }\n\n &:focus {\n outline: none;\n box-shadow: ", ";\n }\n\n &:checked {\n background-color: ", ";\n &:after {\n border-color: white;\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n"], ["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ", ";\n width: ", ";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 8px;\n background-color: ", ";\n box-shadow: ", ";\n\n &:after {\n content: \"\";\n position: absolute;\n border-bottom: 2px solid;\n border-left: 2px solid;\n border-color: transparent;\n top: 30%;\n left: 0;\n right: 0;\n width: 50%;\n height: 25%;\n margin: auto;\n transform: rotate(-50deg);\n transition: border-color 0.2s ease-in-out;\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ", ";\n }\n\n &:focus {\n outline: none;\n box-shadow: ", ";\n }\n\n &:checked {\n background-color: ", ";\n &:after {\n border-color: white;\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n"])), getScale$2, getScale$2, function (_a) { var theme = _a.theme; return theme.colors.input; }, function (_a) { var theme = _a.theme; return theme.shadows.inset; }, function (_a) { var theme = _a.theme; return theme.shadows.focus; }, function (_a) { var theme = _a.theme; return theme.shadows.focus; }, function (_a) { var theme = _a.theme; return theme.colors.success; }); Checkbox.defaultProps = { scale: scales$4.MD, }; var templateObject_1$A; var getLeft = function (_a) { var position = _a.position; if (position === "top-right") { return "100%"; } return "50%"; }; var getBottom = function (_a) { var position = _a.position; if (position === "top" || position === "top-right") { return "100%"; } return "auto"; }; var DropdownContent = styled__default['default'].div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n width: max-content;\n display: none;\n flex-direction: column;\n position: absolute;\n transform: translate(-50%, 0);\n left: ", ";\n bottom: ", ";\n background-color: ", ";\n box-shadow: ", ";\n padding: 16px;\n max-height: 500px;\n overflow-y: auto;\n z-index: ", ";\n border-radius: ", ";\n"], ["\n width: max-content;\n display: none;\n flex-direction: column;\n position: absolute;\n transform: translate(-50%, 0);\n left: ", ";\n bottom: ", ";\n background-color: ", ";\n box-shadow: ", ";\n padding: 16px;\n max-height: 500px;\n overflow-y: auto;\n z-index: ", ";\n border-radius: ", ";\n"])), getLeft, getBottom, function (_a) { var theme = _a.theme; return theme.nav.background; }, function (_a) { var theme = _a.theme; return theme.shadows.level1; }, function (_a) { var theme = _a.theme; return theme.zIndices.dropdown; }, function (_a) { var theme = _a.theme; return theme.radii.small; }); var Container$4 = styled__default['default'].div(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n position: relative;\n &:hover ", ", &:focus-within ", " {\n display: flex;\n }\n"], ["\n position: relative;\n &:hover ", ", &:focus-within ", " {\n display: flex;\n }\n"])), DropdownContent, DropdownContent); var Dropdown = function (_a) { var target = _a.target, _b = _a.position, position = _b === void 0 ? "bottom" : _b, children = _a.children; return (React__default['default'].createElement(Container$4, null, target, React__default['default'].createElement(DropdownContent, { position: position }, children))); }; Dropdown.defaultProps = { position: "bottom", }; var templateObject_1$z, templateObject_2$f; var bunnyFall = styled.keyframes(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n 0% {\n opacity: 1;\n transform: translate(0, -100%) rotateZ(0deg);\n }\n\n 75% {\n opacity: 1;\n transform: translate(100px, 75vh) rotateZ(270deg);\n }\n\n 100% {\n opacity: 0;\n transform: translate(150px, 100vh) rotateZ(360deg);\n }\n"], ["\n 0% {\n opacity: 1;\n transform: translate(0, -100%) rotateZ(0deg);\n }\n\n 75% {\n opacity: 1;\n transform: translate(100px, 75vh) rotateZ(270deg);\n }\n\n 100% {\n opacity: 0;\n transform: translate(150px, 100vh) rotateZ(360deg);\n }\n"]))); var Bunny = styled__default['default'].div(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n display: inline-flex;\n position: fixed;\n top: 0;\n left: ", ";\n transform: translate3d(0, -100%, 0);\n user-select: none;\n pointer-events: none;\n z-index: 99999;\n\n animation-name: ", ";\n animation-duration: ", ";\n animation-timing-function: linear;\n animation-iteration-count: ", ";\n animation-play-state: running;\n\n &:nth-child(5n + 5) {\n animation-delay: ", ";\n }\n\n &:nth-child(3n + 2) {\n animation-delay: ", ";\n }\n\n &:nth-child(2n + 5) {\n animation-delay: ", ";\n }\n\n &:nth-child(3n + 10) {\n animation-delay: ", ";\n }\n\n &:nth-child(7n + 2) {\n animation-delay: ", ";\n }\n\n &:nth-child(4n + 5) {\n animation-delay: ", ";\n }\n\n &:nth-child(3n + 7) {\n animation-delay: ", ";\n }\n"], ["\n display: inline-flex;\n position: fixed;\n top: 0;\n left: ", ";\n transform: translate3d(0, -100%, 0);\n user-select: none;\n pointer-events: none;\n z-index: 99999;\n\n animation-name: ", ";\n animation-duration: ", ";\n animation-timing-function: linear;\n animation-iteration-count: ", ";\n animation-play-state: running;\n\n &:nth-child(5n + 5) {\n animation-delay: ", ";\n }\n\n &:nth-child(3n + 2) {\n animation-delay: ", ";\n }\n\n &:nth-child(2n + 5) {\n animation-delay: ", ";\n }\n\n &:nth-child(3n + 10) {\n animation-delay: ", ";\n }\n\n &:nth-child(7n + 2) {\n animation-delay: ", ";\n }\n\n &:nth-child(4n + 5) {\n animation-delay: ", ";\n }\n\n &:nth-child(3n + 7) {\n animation-delay: ", ";\n }\n"])), function (_a) { var position = _a.position; return position + "vw"; }, bunnyFall, function (_a) { var duration = _a.duration; return duration + "s"; }, function (_a) { var iterations = _a.iterations; return (Number.isFinite(iterations) ? String(iterations) : "infinite"); }, function (_a) { var duration = _a.duration; return (duration / 10) * 1.3 + "s"; }, function (_a) { var duration = _a.duration; return (duration / 10) * 1.5 + "s"; }, function (_a) { var duration = _a.duration; return (duration / 10) * 1.7 + "s"; }, function (_a) { var duration = _a.duration; return (duration / 10) * 2.7 + "s"; }, function (_a) { var duration = _a.duration; return (duration / 10) * 3.5 + "s"; }, function (_a) { var duration = _a.duration; return (duration / 10) * 5.5 + "s"; }, function (_a) { var duration = _a.duration; return (duration / 10) * 8 + "s"; }); var FallingBunnies = function (_a) { var _b = _a.count, count = _b === void 0 ? 30 : _b, _c = _a.size, size = _c === void 0 ? 32 : _c, _d = _a.iterations, iterations = _d === void 0 ? Infinity : _d, _e = _a.duration, duration = _e === void 0 ? 10 : _e; var bunnies = __spreadArrays(Array(count)).map(function (_, index) { return (React__default['default'].createElement(Bunny, { key: String(index), position: Math.random() * 100, iterations: iterations, duration: duration }, React__default['default'].createElement(Icon$O, { width: size, height: size }))); }); return React__default['default'].createElement("div", null, bunnies); }; var templateObject_1$y, templateObject_2$e; var tags = { H1: "h1", H2: "h2", H3: "h3", H4: "h4", H5: "h5", H6: "h6", }; var sizes = { MD: "md", LG: "lg", XL: "xl", XXL: "xxl", }; var _a$3; var style = (_a$3 = {}, _a$3[sizes.MD] = { fontSize: "20px", fontSizeLg: "20px", }, _a$3[sizes.LG] = { fontSize: "24px", fontSizeLg: "24px", }, _a$3[sizes.XL] = { fontSize: "32px", fontSizeLg: "40px", }, _a$3[sizes.XXL] = { fontSize: "48px", fontSizeLg: "64px", }, _a$3); var Heading = styled__default['default'](Text).attrs({ bold: true })(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n font-size: ", ";\n font-weight: 600;\n line-height: 1.1;\n\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n font-weight: 600;\n line-height: 1.1;\n\n ", " {\n font-size: ", ";\n }\n"])), function (_a) { var size = _a.size; return style[size || sizes.MD].fontSize; }, function (_a) { var theme = _a.theme; return theme.mediaQueries.lg; }, function (_a) { var size = _a.size; return style[size || sizes.MD].fontSizeLg; }); Heading.defaultProps = { as: tags.H2, }; var templateObject_1$x; var observerOptions = { root: null, rootMargin: "200px", threshold: 0, }; var Wrapper$1 = styled__default['default'].div(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n position: relative;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n height: ", "px;\n max-width: ", "px;\n max-height: ", "px;\n width: 100%;\n padding-top: ", "%;\n ", "\n"], ["\n position: relative;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n height: ", "px;\n max-width: ", "px;\n max-height: ", "px;\n width: 100%;\n padding-top: ", "%;\n ", "\n"])), function (_a) { var height = _a.height, responsive = _a.responsive; return (responsive ? 0 : height); }, function (_a) { var width = _a.width; return width; }, function (_a) { var height = _a.height; return height; }, function (_a) { var width = _a.width, height = _a.height, responsive = _a.responsive; return (responsive ? (height / width) * 100 : 0); }, styledSystem.space); var templateObject_1$w; var BackgroundImage = function (_a) { var src = _a.src, otherProps = __rest(_a, ["src"]); var imgRef = React.useRef(null); React.useEffect(function () { var img = imgRef.current; var observer = new IntersectionObserver(function (entries) { entries.forEach(function (entry) { var isIntersecting = entry.isIntersecting; if (isIntersecting) { img.style.backgroundImage = "url(\"" + src + "\")"; observer.disconnect(); } }); }, observerOptions); observer.observe(img); return function () { observer.disconnect(); }; }, [src]); return React__default['default'].createElement(Wrapper$1, __assign({ ref: imgRef }, otherProps)); }; var StyledImage = styled__default['default'].img(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n"]))); var Placeholder = styled__default['default'].div(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))); var Image = function (_a) { var src = _a.src, alt = _a.alt, otherProps = __rest(_a, ["src", "alt"]); var imgRef = React.useRef(null); var _b = React.useState(false), isLoaded = _b[0], setIsLoaded = _b[1]; React.useEffect(function () { var img = imgRef.current; var observer = new IntersectionObserver(function (entries) { entries.forEach(function (entry) { var isIntersecting = entry.isIntersecting; if (isIntersecting) { setIsLoaded(true); observer.disconnect(); } }); }, observerOptions); observer.observe(img); return function () { observer.disconnect(); }; }, [src]); return (React__default['default'].createElement(Wrapper$1, __assign({ ref: imgRef }, otherProps), isLoaded ? React__default['default'].createElement(StyledImage, { src: src, alt: alt }) : React__default['default'].createElement(Placeholder, null))); }; var templateObject_1$v, templateObject_2$d; var scales$3 = { SM: "sm", MD: "md", LG: "lg", }; /** * Priority: Warning --> Success */ var getBoxShadow = function (_a) { var _b = _a.isSuccess, isSuccess = _b === void 0 ? false : _b, _c = _a.isWarning, isWarning = _c === void 0 ? false : _c, theme = _a.theme; if (isWarning) { return theme.shadows.warning; } if (isSuccess) { return theme.shadows.success; } return theme.shadows.inset; }; var getHeight = function (_a) { var _b = _a.scale, scale = _b === void 0 ? scales$3.MD : _b; switch (scale) { case scales$3.SM: return "32px"; case scales$3.LG: return "48px"; case scales$3.MD: default: return "40px"; } }; var Input$1 = styled__default['default'].input(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n background-color: ", ";\n border: 0;\n border-radius: 16px;\n box-shadow: ", ";\n color: ", ";\n display: block;\n font-size: 16px;\n height: ", ";\n outline: 0;\n padding: 0 16px;\n width: 100%;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n box-shadow: none;\n color: ", ";\n cursor: not-allowed;\n }\n\n &:focus:not(:disabled) {\n box-shadow: ", ";\n }\n"], ["\n background-color: ", ";\n border: 0;\n border-radius: 16px;\n box-shadow: ", ";\n color: ", ";\n display: block;\n font-size: 16px;\n height: ", ";\n outline: 0;\n padding: 0 16px;\n width: 100%;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n box-shadow: none;\n color: ", ";\n cursor: not-allowed;\n }\n\n &:focus:not(:disabled) {\n box-shadow: ", ";\n }\n"])), function (_a) { var theme = _a.theme; return theme.colors.input; }, getBoxShadow, function (_a) { var theme = _a.theme; return theme.colors.text; }, getHeight, function (_a) { var theme = _a.theme; return theme.colors.textSubtle; }, function (_a) { var theme = _a.theme; return theme.colors.backgroundDisabled; }, function (_a) { var theme = _a.theme; return theme.colors.textDisabled; }, function (_a) { var theme = _a.theme; return theme.shadows.focus; }); Input$1.defaultProps = { scale: scales$3.MD, isSuccess: false, isWarning: false, }; var templateObject_1$u; var GridLayout$1 = styled__default['default'].div(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-gap: 16px;\n ", " {\n grid-template-columns: repeat(8, 1fr);\n grid-gap: 24px;\n }\n ", " {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 24px;\n }\n ", " {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 32px;\n }\n"], ["\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-gap: 16px;\n ", " {\n grid-template-columns: repeat(8, 1fr);\n grid-gap: 24px;\n }\n ", " {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 24px;\n }\n ", " {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 32px;\n }\n"])), function (_a) { var theme = _a.theme; return theme.mediaQueries.sm; }, function (_a) { var theme = _a.theme; return theme.mediaQueries.md; }, function (_a) { var theme = _a.theme; return theme.mediaQueries.lg; }); var templateObject_1$t; var GridLayout = styled__default['default'](GridLayout$1)(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n & > div {\n grid-column: span 6;\n ", " {\n grid-column: span 4;\n }\n }\n"], ["\n & > div {\n grid-column: span 6;\n ", " {\n grid-column: span 4;\n }\n }\n"])), function (_a) { var theme = _a.theme; return theme.mediaQueries.sm; }); var templateObject_1$s; var NotificationDotRoot = styled__default['default'].span(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n display: inline-flex;\n position: relative;\n"], ["\n display: inline-flex;\n position: relative;\n"]))); var Dot = styled__default['default'].span(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n display: ", ";\n position: absolute;\n top: 0;\n right: 0;\n width: 10px;\n height: 10px;\n pointer-events: none;\n border: 2px solid ", ";\n border-radius: 50%;\n background-color: ", ";\n"], ["\n display: ", ";\n position: absolute;\n top: 0;\n right: 0;\n width: 10px;\n height: 10px;\n pointer-events: none;\n border: 2px solid ", ";\n border-radius: 50%;\n background-color: ", ";\n"])), function (_a) { var show = _a.show; return (show ? "inline-flex" : "none"); }, function (_a) { var theme = _a.theme; return theme.colors.invertedContrast; }, function (_a) { var theme = _a.theme; return theme.colors.failure; }); var NotificationDot = function (_a) { var _b = _a.show, show = _b === void 0 ? false : _b, children = _a.children, props = __rest(_a, ["show", "children"]); return (React__default['default'].createElement(NotificationDotRoot, null, React.Children.map(children, function (child) { return React.cloneElement(child, props); }), React__default['default'].createElement(Dot, { show: show }))); }; var templateObject_1$r, templateObject_2$c; var scales$2 = { SM: "sm", MD: "md", }; var getScale$1 = function (_a) { var scale = _a.scale; switch (scale) { case scales$2.SM: return "24px"; case scales$2.MD: default: return "32px"; } }; var getCheckedScale = function (_a) { var scale = _a.scale; switch (scale) { case scales$2.SM: return "12px"; case scales$2.MD: default: return "20px"; } }; var Radio = styled__default['default'].input.attrs({ type: "radio" })(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ", ";\n width: ", ";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 50%;\n background-color: ", ";\n box-shadow: ", ";\n\n &:after {\n border-radius: 50%;\n content: \"\";\n height: ", ";\n left: 6px;\n position: absolute;\n top: 6px;\n width: ", ";\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ", ";\n }\n\n &:focus {\n outline: none;\n box-shadow: ", ";\n }\n\n &:checked {\n background-color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n ", "\n"], ["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ", ";\n width: ", ";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 50%;\n background-color: ", ";\n box-shadow: ", ";\n\n &:after {\n border-radius: 50%;\n content: \"\";\n height: ", ";\n left: 6px;\n position: absolute;\n top: 6px;\n width: ", ";\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ", ";\n }\n\n &:focus {\n outline: none;\n box-shadow: ", ";\n }\n\n &:checked {\n background-color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n ", "\n"])), getScale$1, getScale$1, function (_a) { var theme = _a.theme; return theme.colors.input; }, function (_a) { var theme = _a.theme; return theme.shadows.inset; }, getCheckedScale, getCheckedScale, function (_a) { var theme = _a.theme; return theme.shadows.focus; }, function (_a) { var theme = _a.theme; return theme.shadows.focus; }, function (_a) { var theme = _a.theme; return theme.colors.success; }, function (_a) { var theme = _a.theme; return theme.radio.handleBackground; }, styledSystem.space); Radio.defaultProps = { scale: scales$2.MD, m: 0, }; var templateObject_1$q; var variants$1 = { PRIMARY: "primary", SECONDARY: "secondary", SUCCESS: "success", TEXTDISABLED: "textDisabled", TEXTSUBTLE: "textSubtle", BINANCE: "binance", FAILURE: "failure", }; var scales$1 = { MD: "md", SM: "sm", }; var _a$2, _b; var scaleVariants = (_a$2 = {}, _a$2[scales$1.MD] = { height: "28px", padding: "0 8px", fontSize: "14px", }, _a$2[scales$1.SM] = { height: "24px", padding: "0 4px", fontSize: "12px", }, _a$2); var styleVariants$1 = (_b = {}, _b[variants$1.PRIMARY] = { backgroundColor: "primary", }, _b[variants$1.SECONDARY] = { backgroundColor: "secondary", }, _b[variants$1.SUCCESS] = { backgroundColor: "success", }, _b[variants$1.TEXTDISABLED] = { backgroundColor: "textDisabled", }, _b[variants$1.TEXTSUBTLE] = { backgroundColor: "textSubtle", }, _b[variants$1.BINANCE] = { backgroundColor: "binance", }, _b[variants$1.FAILURE] = { backgroundColor: "failure", }, _b); var getOutlineStyles = function (_a) { var outline = _a.outline, theme = _a.theme, _b = _a.variant, variantKey = _b === void 0 ? variants$1.PRIMARY : _b; if (outline) { var themeColorKey = styleVariants$1[variantKey].backgroundColor; var color = theme.colors[themeColorKey]; return "\n color: " + color + ";\n background: transparent;\n border: 2px solid " + color + ";\n "; } return ""; }; var StyledTag = styled__default['default'].div(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n align-items: center;\n border-radius: 16px;\n color: #ffffff;\n display: inline-flex;\n font-weight: 400;\n white-space: nowrap;\n\n & > svg {\n fill: currentColor;\n }\n\n ", "\n ", "\n ", "\n\n ", "\n"], ["\n align-items: center;\n border-radius: 16px;\n color: #ffffff;\n display: inline-flex;\n font-weight: 400;\n white-space: nowrap;\n\n & > svg {\n fill: currentColor;\n }\n\n ", "\n ", "\n ", "\n\n ", "\n"])), styledSystem.variant({ prop: "scale", variants: scaleVariants, }), styledSystem.variant({ variants: styleVariants$1, }), styledSystem.space, getOutlineStyles); var templateObject_1$p; var Tag = function (_a) { var startIcon = _a.startIcon, endIcon = _a.endIcon, children = _a.children, props = __rest(_a, ["startIcon", "endIcon", "children"]); return (React__default['default'].createElement(StyledTag, __assign({}, props), React__default['default'].isValidElement(startIcon) && React__default['default'].cloneElement(startIcon, { mr: "0.5em", }), children, React__default['default'].isValidElement(endIcon) && React__default['default'].cloneElement(endIcon, { ml: "0.5em", }))); }; Tag.defaultProps = { variant: "primary", scale: scales$1.MD, outline: false, }; var StyledLink$1 = styled__default['default'](Text)(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n display: flex;\n align-items: center;\n width: fit-content;\n &:hover {\n text-decoration: underline;\n }\n"], ["\n display: flex;\n align-items: center;\n width: fit-content;\n &:hover {\n text-decoration: underline;\n }\n"]))); var Link = function (_a) { var external = _a.external, props = __rest(_a, ["external"]); var internalProps = external ? getExternalLinkProps() : {}; return React__default['default'].createElement(StyledLink$1, __assign({ as: "a", bold: true }, internalProps, props)); }; Link.defaultProps = { color: "primary", }; var templateObject_1$o; var LinkExternal = function (_a) { var children = _a.children, props = __rest(_a, ["children"]); return (React__default['default'].createElement(Link, __assign({ external: true }, props), children, React__default['default'].createElement(Icon$J, { color: "primary", ml: "4px" }))); }; var variants = { ROUND: "round", FLAT: "flat", }; var _a$1; var styleVariants = (_a$1 = {}, _a$1[variants.ROUND] = { borderRadius: "32px", }, _a$1[variants.FLAT] = { borderRadius: 0, }, _a$1); var Bar = styled__default['default'].div(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n background-color: ", ";\n height: 16px;\n transition: width 200ms ease;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n background-color: ", ";\n height: 16px;\n transition: width 200ms ease;\n"])), function (props) { return (props.primary ? props.theme.colors.secondary : props.theme.colors.secondary + "80"); }); Bar.defaultProps = { primary: false, }; var StyledProgress = styled__default['default'].div(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n box-shadow: ", ";\n height: 16px;\n overflow: hidden;\n\n ", " {\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n }\n\n ", "\n ", "\n"], ["\n position: relative;\n background-color: ", ";\n box-shadow: ", ";\n height: 16px;\n overflow: hidden;\n\n ", " {\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n }\n\n ", "\n ", "\n"])), function (_a) { var theme = _a.theme; return theme.colors.input; }, function (_a) { var theme = _a.theme; return theme.shadows.inset; }, Bar, function (_a) { var variant = _a.variant; return (variant === variants.FLAT ? "0" : "32px"); }, function (_a) { var variant = _a.variant; return (variant === variants.FLAT ? "0" : "32px"); }, styledSystem.variant({ variants: styleVariants, }), styledSystem.space); var templateObject_1$n, templateObject_2$b; var ProgressBunnyWrapper = styled__default['default'].div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n display: flex;\n z-index: 2;\n top: -65%;\n position: absolute;\n transform: translate(-50%, -50%);\n transition: left 200ms ease-out;\n"], ["\n display: flex;\n z-index: 2;\n top: -65%;\n position: absolute;\n transform: translate(-50%, -50%);\n transition: left 200ms ease-out;\n"]))); var templateObject_1$m; var stepGuard = function (step) { if (step < 0) { return 0; } if (step > 100) { return 100; } return step; }; var Progress = function (_a) { var _b = _a.variant, variant = _b === void 0 ? variants.ROUND : _b, _c = _a.primaryStep, primaryStep = _c === void 0 ? 0 : _c, _d = _a.secondaryStep, secondaryStep = _d === void 0 ? null : _d, _e = _a.showProgressBunny, showProgressBunny = _e === void 0 ? false : _e; return (React__default['default'].createElement(StyledProgress, { variant: variant }, showProgressBunny && (React__default['default'].createElement(ProgressBunnyWrapper, { style: { left: stepGuard(primaryStep) + "%" } }, React__default['default'].createElement(Icon$C, null))), React__default['default'].createElement(Bar, { primary: true, style: { width: stepGuard(primaryStep) + "%" } }), secondaryStep ? React__default['default'].createElement(Bar, { style: { width: stepGuard(secondaryStep) + "%" } }) : null)); }; var img$1 = "data:image/svg+xml,%3csvg width='24' height='32' viewBox='0 0 24 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect y='18' width='17' height='10' fill='%231FC7D4'/%3e%3cpath d='M7.50675 23.7056C6.14677 25.0656 7.73758 27.2292 9.75419 29.2458C11.7708 31.2624 13.9344 32.8532 15.2944 31.4933C16.6543 30.1333 15.9641 27.0691 13.9475 25.0525C11.9309 23.0359 8.86673 22.3457 7.50675 23.7056Z' fill='%231FC7D4'/%3e%3cpath d='M13.507 21.706C12.1463 23.0666 13.7379 25.2313 15.7555 27.2489C17.7731 29.2665 19.9378 30.8581 21.2984 29.4974C22.6591 28.1368 21.9685 25.0711 19.9509 23.0535C17.9333 21.0359 14.8676 20.3453 13.507 21.706Z' fill='%231FC7D4'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.7694 5.63421C11.8457 6.02664 11.9158 6.4375 11.9836 6.85716C11.6151 6.85766 11.2482 6.87522 10.8839 6.90895C10.6029 6.29464 10.2694 5.67199 9.88441 5.05277C7.39613 1.05079 5.06199 0.901096 2.98861 2.01265C0.915239 3.12421 0.810677 5.89597 3.28297 8.59188C3.57049 8.90541 3.86254 9.23841 4.15744 9.58036C1.66027 11.5156 0 14.291 0 17.2695C0 22.8292 5.78518 24 12 24C18.2148 24 24 22.8292 24 17.2695C24 13.8488 21.8101 10.6958 18.6776 8.77602C18.8852 7.81022 19 6.74856 19 5.63421C19 1.17171 17.159 0 14.888 0C12.6171 0 11.1155 2.27116 11.7694 5.63421Z' fill='url(%23paint0_linear)'/%3e%3cpath d='M12.7284 16.4446C12.796 17.3149 12.4446 19.0556 10.498 19.0556' stroke='%23452A7A' stroke-linecap='round'/%3e%3cpath d='M12.7457 16.4446C12.6781 17.3149 13.0296 19.0556 14.9761 19.0556' stroke='%23452A7A' stroke-linecap='round'/%3e%3cpath d='M9 14.5C9 15.6046 8.55228 16 8 16C7.44772 16 7 15.6046 7 14.5C7 13.3954 7.44772 13 8 13C8.55228 13 9 13.3954 9 14.5Z' fill='%23452A7A'/%3e%3cpath d='M18 14.5C18 15.6046 17.5523 16 17 16C16.4477 16 16 15.6046 16 14.5C16 13.3954 16.4477 13 17 13C17.5523 13 18 13.3954 18 14.5Z' fill='%23452A7A'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='12' y1='0' x2='12' y2='24' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2353DEE9'/%3e%3cstop offset='1' stop-color='%231FC7D4'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"; var img = "data:image/svg+xml,%3csvg width='24' height='32' viewBox='0 0 24 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect y='18' width='17' height='10' fill='%231FC7D4'/%3e%3cpath d='M7.50675 23.7056C6.14677 25.0656 7.73758 27.2292 9.75419 29.2458C11.7708 31.2624 13.9344 32.8532 15.2944 31.4933C16.6543 30.1333 15.9641 27.0691 13.9475 25.0525C11.9309 23.0359 8.86673 22.3457 7.50675 23.7056Z' fill='%231FC7D4'/%3e%3cpath d='M13.507 21.706C12.1463 23.0666 13.7379 25.2313 15.7555 27.2489C17.7731 29.2665 19.9378 30.8581 21.2984 29.4974C22.6591 28.1368 21.9685 25.0711 19.9509 23.0535C17.9333 21.0359 14.8676 20.3453 13.507 21.706Z' fill='%231FC7D4'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.146 5.75159C12.2105 6.10896 12.2703 6.48131 12.3281 6.86164C12.2189 6.85865 12.1095 6.85714 12 6.85714C11.3803 6.85714 10.7648 6.90539 10.159 6.99779C9.87904 6.41458 9.55472 5.82246 9.18725 5.23145C6.69897 1.22947 4.53826 0.986793 2.67882 1.98366C0.819381 2.98052 0.856278 5.67644 3.26696 8.40538C3.58076 8.76061 3.90097 9.13983 4.2247 9.52859C1.69013 11.4659 0 14.2644 0 17.2695C0 22.8292 5.78518 24 12 24C18.2148 24 24 22.8292 24 17.2695C24 13.8658 21.8318 10.7272 18.7243 8.80476C18.9022 7.86044 19 6.83019 19 5.75159C19 1.19612 17.2549 0 15.1022 0C12.9495 0 11.5261 2.31847 12.146 5.75159Z' fill='url(%23paint0_linear)'/%3e%3cpath d='M9.50467 15.0634C8.94352 13.4456 6.79685 13.4456 6.08131 15.0635' stroke='%23452A7A' stroke-linecap='round'/%3e%3cpath d='M18.8894 15.0634C18.3283 13.4456 16.1816 13.4456 15.4661 15.0635' stroke='%23452A7A' stroke-linecap='round'/%3e%3cpath d='M12.7284 16.4446C12.796 17.3149 12.4446 19.0556 10.498 19.0556' stroke='%23452A7A' stroke-linecap='round'/%3e%3cpath d='M12.7457 16.4446C12.6781 17.3149 13.0296 19.0556 14.9761 19.0556' stroke='%23452A7A' stroke-linecap='round'/%3e%3cpath d='M11.4505 19.0787C11.4505 20.5097 13.955 20.5097 13.955 19.0787' stroke='%23452A7A' stroke-linecap='round'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='12' y1='0' x2='12' y2='24' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2353DEE9'/%3e%3cstop offset='1' stop-color='%231FC7D4'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"; var SliderContainer = styled__default['default'](Box)(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n position: relative;\n height: 48px;\n"], ["\n position: relative;\n height: 48px;\n"]))); var SliderLabel = styled__default['default'].label(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n margin-left: 16px; // offset the bunny butt width\n left: calc(", "%);\n"], ["\n position: absolute;\n bottom: 0;\n margin-left: 16px; // offset the bunny butt width\n left: calc(", "%);\n"])), function (_a) { var progress = _a.progress; return progress; }); styled__default['default'].img(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n position: absolute;\n"], ["\n position: absolute;\n"]))); var BunnySlider = styled__default['default'].div(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n position: absolute;\n left: 14px;\n width: 100%;\n"], ["\n position: absolute;\n left: 14px;\n width: 100%;\n"]))); var StyledInput = styled__default['default'].input(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n height: 32px;\n position: relative;\n cursor: pointer;\n\n ::-webkit-slider-thumb {\n -webkit-appearance: none;\n background-image: url(", ");\n width: 24px;\n height: 32px;\n cursor: pointer;\n transform: translate(-2px, -2px);\n transition: 0.1s all;\n\n :hover {\n transform: scale(1.1) translate(-3px, -3px);\n }\n }\n ::-moz-range-thumb {\n -webkit-appearance: none;\n background-image: url(", ");\n width: 24px;\n height: 32px;\n cursor: pointer;\n transition: 0.1s all;\n transform: translate(-2px, -2px);\n // custom moz reset\n background-color: transparent;\n border: 0;\n\n :hover {\n transform: scale(1.1) translate(-3px, -3px);\n }\n }\n ::-ms-thumb {\n -webkit-appearance: none;\n background-image: url(", ");\n width: 24px;\n height: 32px;\n cursor: pointer;\n transform: translate(-2px, -2px);\n transition: 0.1s all;\n\n :hover {\n transform: scale(1.1) translate(-3px, -3px);\n }\n }\n"], ["\n height: 32px;\n position: relative;\n cursor: pointer;\n\n ::-webkit-slider-thumb {\n -webkit-appearance: none;\n background-image: url(", ");\n width: 24px;\n height: 32px;\n cursor: pointer;\n transform: translate(-2px, -2px);\n transition: 0.1s all;\n\n :hover {\n transform: scale(1.1) translate(-3px, -3px);\n }\n }\n ::-moz-range-thumb {\n -webkit-appearance: none;\n background-image: url(", ");\n width: 24px;\n height: 32px;\n cursor: pointer;\n transition: 0.1s all;\n transform: translate(-2px, -2px);\n // custom moz reset\n background-color: transparent;\n border: 0;\n\n :hover {\n transform: scale(1.1) translate(-3px, -3px);\n }\n }\n ::-ms-thumb {\n -webkit-appearance: none;\n background-image: url(", ");\n width: 24px;\n height: 32px;\n cursor: pointer;\n transform: translate(-2px, -2px);\n transition: 0.1s all;\n\n :hover {\n transform: scale(1.1) translate(-3px, -3px);\n }\n }\n"])), function (_a) { var isCurrentValueMaxValue = _a.isCurrentValueMaxValue; return (isCurrentValueMaxValue ? img : img$1); }, function (_a) { var isCurrentValueMaxValue = _a.isCurrentValueMaxValue; return (isCurrentValueMaxValue ? img : img$1); }, function (_a) { var isCurrentValueMaxValue = _a.isCurrentValueMaxValue; return (isCurrentValueMaxValue ? img : img$1); }); var BarBackground = styled__default['default'].div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n width: 100%;\n height: 2px;\n top: 18px;\n background-color: ", ";\n"], ["\n position: absolute;\n width: 100%;\n height: 2px;\n top: 18px;\n background-color: ", ";\n"])), function (_a) { var theme = _a.theme; return theme.colors.inputSecondary; }); var BarProgress = styled__default['default'].div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n width: ", ";\n height: 10px;\n top: 18px;\n\n background: ", ";\n"], ["\n position: absolute;\n width: ", ";\n height: 10px;\n top: 18px;\n\n background: ", ";\n"])), function (_a) { var progress = _a.progress, isCurrentValueMaxValue = _a.isCurrentValueMaxValue; return (isCurrentValueMaxValue ? "calc(100% - 16px)" : progress + "%"); }, function (_a) { var theme = _a.theme; return theme.colors.primary; }); var templateObject_1$l, templateObject_2$a, templateObject_3$7, templateObject_4$4, templateObject_5$3, templateObject_6, templateObject_7; var Icon$s = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 15 32", width: 15, height: 32 }, props), React__default['default'].createElement("path", { d: "M9.58803 20.8649C7.72935 21.3629 8.02539 24.0334 8.76388 26.7895C9.50238 29.5456 10.5812 32.0062 12.4399 31.5082C14.2986 31.0102 15.2334 28.0099 14.4949 25.2538C13.7564 22.4978 11.4467 20.3669 9.58803 20.8649Z", fill: "#0098A1" }), React__default['default'].createElement("path", { d: "M1 24.4516C1 20.8885 3.88849 18 7.45161 18H15V28H4.54839C2.58867 28 1 26.4113 1 24.4516Z", fill: "#1FC7D4" }), React__default['default'].createElement("path", { d: "M6.11115 17.2246C6.79693 18.4124 5.77784 19.3343 4.52793 20.0559C3.27802 20.7776 1.97011 21.1992 1.28433 20.0114C0.598546 18.8236 1.1635 17.1151 2.41341 16.3935C3.66332 15.6718 5.42537 16.0368 6.11115 17.2246Z", fill: "#53DEE9" }), React__default['default'].createElement("path", { d: "M1.64665 23.6601C0.285995 25.0207 1.87759 27.1854 3.89519 29.203C5.91279 31.2206 8.07743 32.8122 9.43808 31.4515C10.7987 30.0909 10.1082 27.0252 8.09058 25.0076C6.07298 22.99 3.0073 22.2994 1.64665 23.6601Z", fill: "#1FC7D4" }))); }; // We need to adjust the offset as the percentage increases, as 100% really is 100% - label width. The number 10 is arbitrary, but seems to work... var MOVING_SLIDER_LABEL_OFFSET_FACTOR = 10; var Slider = function (_a) { var min = _a.min, max = _a.max, value = _a.value, onValueChanged = _a.onValueChanged, valueLabel = _a.valueLabel, props = __rest(_a, ["min", "max", "value", "onValueChanged", "valueLabel"]); var handleChange = function (_a) { var target = _a.target; onValueChanged(parseInt(target.value, 10)); }; var progressPercentage = (value / max) * 100; var isCurrentValueMaxValue = value === max; var labelOffset = progressPercentage - progressPercentage / MOVING_SLIDER_LABEL_OFFSET_FACTOR; return (React__default['default'].createElement(SliderContainer, __assign({}, props), React__default['default'].createElement(Icon$s, { style: { position: "absolute" } }), React__default['default'].createElement(BunnySlider, null, React__default['default'].createElement(BarBackground, null), React__default['default'].createElement(BarProgress, { isCurrentValueMaxValue: isCurrentValueMaxValue, progress: progressPercentage }), React__default['default'].createElement(StyledInput, { type: "range", min: min, max: max, value: value, onChange: handleChange, isCurrentValueMaxValue: isCurrentValueMaxValue })), valueLabel && React__default['default'].createElement(SliderLabel, { progress: labelOffset }, valueLabel))); }; var Icon$r = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 256 256" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M166.898 204.279C172.402 190.795 170.197 176.127 166.942 163.633C164.747 155.208 156.522 149.043 143.339 146.339C130.289 143.662 113.23 144.62 95.212 149.658C77.1941 154.696 61.9863 162.761 52.0088 171.877C41.9295 181.085 37.8164 190.7 40.0117 199.126C43.2669 211.619 48.4857 225.444 59.7919 234.228C70.9463 242.894 88.7701 247.193 118.461 238.891C148.152 230.589 161.467 217.582 166.898 204.279ZM119.268 241.986C179.746 225.075 176.514 188.072 169.929 162.798C164.622 142.43 131.106 136.301 94.4056 146.563C57.7053 156.825 31.7183 179.593 37.0251 199.961C43.6102 225.235 58.7891 258.897 119.268 241.986Z", fill: "#464649" }), React__default['default'].createElement("path", { d: "M155.801 175.68C158.653 186.628 180.351 181.576 214.977 171.894C249.604 162.212 257.158 150.578 254.305 139.63C251.453 128.682 244.685 121.053 216.678 128.884C182.051 138.566 152.948 164.732 155.801 175.68Z", fill: "#606063" }), React__default['default'].createElement("path", { d: "M159.97 178.737L175.437 178.709C178.284 178.704 178.523 174.429 177.474 164.815C176.82 158.816 173.457 154.101 171.27 155.477L159.942 163.875L159.97 178.737Z", fill: "#464649" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M162.261 177.996C160.059 177.319 159.158 176.266 158.788 174.845C158.644 174.296 158.636 173.375 159.104 171.965C159.566 170.568 160.432 168.889 161.754 166.98C164.397 163.161 168.612 158.775 174.091 154.332C185.037 145.456 200.6 136.7 217.484 131.979C231.34 128.104 239.201 128.297 243.777 130.191C248.018 131.946 250.005 135.425 251.319 140.465C251.901 142.7 251.928 144.848 251.283 146.962C250.634 149.091 249.235 151.411 246.622 153.858C241.312 158.83 231.342 163.998 214.171 168.799C196.798 173.657 182.967 177.263 173.149 178.336C168.216 178.875 164.644 178.728 162.261 177.996ZM214.977 171.894C180.351 181.576 158.653 186.628 155.801 175.68C152.948 164.732 182.051 138.566 216.678 128.884C244.685 121.053 251.453 128.682 254.305 139.63C257.158 150.578 249.604 162.212 214.977 171.894Z", fill: "#464649" }), React__default['default'].createElement("path", { d: "M169.925 161.024C176.511 186.298 179.743 223.301 119.264 240.212C58.7859 257.123 43.607 223.461 37.022 198.187C31.7151 177.819 57.7022 155.052 94.4024 144.789C131.103 134.527 164.619 140.656 169.925 161.024Z", fill: "#606063" }), React__default['default'].createElement("path", { d: "M62.2322 217.512C45.5076 212.12 42.4613 203.795 40.3848 196.052L41.9594 211.275L50.2352 225.685L64.4374 238.481L80.947 244.327C82.4065 243.612 89.4986 243.299 83.1029 242.028C76.7073 240.758 72.7474 234.756 69.9914 231.378C68.2638 226.484 67.7365 219.287 62.2322 217.512Z", fill: "#464649" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M166.895 202.505C172.399 189.021 170.194 174.353 166.939 161.86C164.744 153.434 156.519 147.269 143.336 144.565C130.286 141.888 113.227 142.846 95.2088 147.884C77.1909 152.922 61.9831 160.987 52.0056 170.103C41.9263 179.311 37.8132 188.926 40.0086 197.352C43.2637 209.845 48.4825 223.67 59.7887 232.454C70.9431 241.12 88.7669 245.419 118.458 237.117C148.149 228.815 161.464 215.809 166.895 202.505ZM119.264 240.212C179.743 223.301 176.511 186.298 169.925 161.024C164.619 140.656 131.103 134.527 94.4024 144.789C57.7022 155.052 31.7151 177.819 37.022 198.187C43.607 223.461 58.7859 257.123 119.264 240.212Z", fill: "#464649" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M164.233 181.686C165.018 182.322 165.157 183.497 164.543 184.311C162.98 186.382 161.187 188.422 159.188 190.412C158.469 191.128 157.327 191.104 156.636 190.36C155.945 189.615 155.968 188.431 156.687 187.716C158.576 185.834 160.252 183.925 161.7 182.007C162.314 181.193 163.448 181.05 164.233 181.686ZM57.4215 216.239C57.6566 215.235 58.6323 214.619 59.6008 214.863C73.2899 218.308 91.7045 217.793 111.035 212.388C120.262 209.808 128.779 206.37 136.271 202.374C137.157 201.901 138.245 202.263 138.701 203.181C139.157 204.099 138.809 205.226 137.923 205.699C130.195 209.821 121.438 213.352 111.976 215.998C92.2044 221.527 73.1589 222.124 58.7494 218.497C57.7809 218.253 57.1863 217.242 57.4215 216.239Z", fill: "#979797" }), React__default['default'].createElement("path", { d: "M159.836 163.292C164.405 180.829 141.059 195.381 109.857 204.106C78.655 212.831 51.4793 212.682 46.8428 194.887C42.2064 177.092 65.6193 162.798 96.8214 154.074C128.024 145.349 155.266 145.755 159.836 163.292Z", fill: "#464649" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M145.831 183.549C154.508 176.998 157.462 170.578 155.854 164.406C154.245 158.233 148.575 154.225 137.894 153.086C127.333 151.96 113.281 153.898 97.8965 158.2C82.4985 162.506 69.3986 168.094 60.8132 174.54C52.1526 181.043 49.1801 187.461 50.825 193.774C52.4698 200.087 58.1557 204.083 68.7987 205.189C79.3491 206.285 93.384 204.285 108.782 199.98C124.166 195.678 137.251 190.028 145.831 183.549ZM110.264 205.113C141.466 196.388 164.405 180.829 159.836 163.292C155.266 145.755 128.024 145.349 96.8214 154.074C65.6193 162.798 42.2064 177.092 46.8428 194.887C51.4793 212.682 79.0614 213.838 110.264 205.113Z", fill: "#737373" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M103.877 181.153C89.0555 185.297 76.4977 192.072 68.1169 199.619C67.3647 200.297 66.2249 200.214 65.5711 199.434C64.9173 198.655 64.997 197.474 65.7492 196.796C74.622 188.806 87.7006 181.803 102.936 177.543C106.034 176.676 109.107 175.955 112.134 175.375C113.114 175.187 114.056 175.858 114.237 176.873C114.419 177.889 113.771 178.864 112.792 179.052C109.86 179.614 106.881 180.313 103.877 181.153ZM123.847 175.658C123.792 174.627 124.554 173.745 125.549 173.688C132.378 173.297 138.774 173.682 144.424 174.797C145.403 174.991 146.046 175.97 145.86 176.984C145.673 177.999 144.728 178.664 143.749 178.471C138.431 177.421 132.333 177.045 125.749 177.422C124.753 177.479 123.902 176.69 123.847 175.658Z", fill: "#606063" }))); }; var Icon$q = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 128 128" }, props), React__default['default'].createElement("svg", { width: "128", height: "128", viewBox: "0 0 128 128", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, React__default['default'].createElement("path", { d: "M56.7204 37.5858C56.7204 45.3822 58.0271 54.1169 60.2906 60.8591C61.4246 64.2369 62.7705 67.0285 64.249 68.946C65.742 70.8826 67.1906 71.7103 68.5307 71.7103C71.1919 71.7103 74.4165 70.5307 77.8384 68.3524C81.235 66.1902 84.7001 63.1234 87.8127 59.5481C94.0844 52.3439 98.6784 43.3694 98.6784 35.942C98.6784 28.1653 97.1567 21.2636 93.9931 16.3543C90.8793 11.5222 86.1363 8.54284 79.3564 8.54284C72.6009 8.54284 66.9825 11.9157 63.0072 17.2564C59.0174 22.6164 56.7204 29.9263 56.7204 37.5858Z", fill: "#FEDC90", stroke: "#D1884F", strokeWidth: "2.89134" }), React__default['default'].createElement("path", { d: "M32.7442 66.7859C39.4364 62.9222 47.2575 60.5211 53.8454 59.9252C57.1411 59.6272 60.0564 59.7876 62.336 60.3933C64.6294 61.0028 66.1079 62.0118 66.8368 63.2742C69.6116 68.0804 69.9429 76.4856 67.7501 84.8501C65.5656 93.1829 61.0085 100.957 54.6069 104.653C47.9434 108.5 40.9505 110.185 34.8292 109.454C28.7533 108.729 23.476 105.626 20.0729 99.7316C16.6658 93.8305 16.5364 87.5528 18.8757 81.7754C21.228 75.9659 26.1018 70.6209 32.7442 66.7859Z", fill: "#D1884F", stroke: "#633001", strokeWidth: "2.89134" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M73.6122 7.76013C69.4145 8.86483 64.8207 11.0867 61.24 16.1556C53.2804 27.4231 51.7006 41.9592 58.5495 60.7386C65.3984 79.518 63.3431 89.9236 56.0487 98.3189C48.7543 106.714 29.475 108.685 23.3482 101.929C21.8481 100.274 17.4954 97.4588 20.3675 102.54C23.2397 107.622 30.7527 111.748 39.59 111.748C48.4273 111.748 55.5943 108.146 61.958 101.338C68.3217 94.5306 74.292 78.3883 68.3268 61.7709C60.6331 40.3385 62.8311 27.508 68.2893 19.7815C71.0879 15.8198 75.5453 12.3629 78.6077 10.5868C81.8233 8.72183 84.8797 8.42294 86.8682 8.42294C83.3332 6.65548 77.8099 6.65542 73.6122 7.76013Z", fill: "#633001" })))); }; var rotate = styled.keyframes(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"], ["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))); var float = styled.keyframes(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n\t0% {\n\t\ttransform: translatey(0px);\n\t}\n\t50% {\n\t\ttransform: translatey(10px);\n\t}\n\t100% {\n\t\ttransform: translatey(0px);\n\t}\n"], ["\n\t0% {\n\t\ttransform: translatey(0px);\n\t}\n\t50% {\n\t\ttransform: translatey(10px);\n\t}\n\t100% {\n\t\ttransform: translatey(0px);\n\t}\n"]))); var Container$3 = styled__default['default'].div(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"]))); var RotatingPancakeIcon = styled__default['default'](Icon$q)(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n animation: ", " 2s linear infinite;\n transform: translate3d(0, 0, 0);\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n animation: ", " 2s linear infinite;\n transform: translate3d(0, 0, 0);\n"])), rotate); var FloatingPanIcon = styled__default['default'](Icon$r)(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n animation: ", " 6s ease-in-out infinite;\n transform: translate3d(0, 0, 0);\n"], ["\n animation: ", " 6s ease-in-out infinite;\n transform: translate3d(0, 0, 0);\n"])), float); var Spinner = function (_a) { var _b = _a.size, size = _b === void 0 ? 128 : _b; return (React__default['default'].createElement(Container$3, null, React__default['default'].createElement(RotatingPancakeIcon, { width: size * 0.5 + "px" }), React__default['default'].createElement(FloatingPanIcon, { width: size + "px" }))); }; var templateObject_1$k, templateObject_2$9, templateObject_3$6, templateObject_4$3, templateObject_5$2; var animation = { WAVES: "waves", PULSE: "pulse", }; var variant = { RECT: "rect", CIRCLE: "circle", }; var waves = styled.keyframes(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n from {\n left: -150px;\n }\n to {\n left: 100%;\n }\n"], ["\n from {\n left: -150px;\n }\n to {\n left: 100%;\n }\n"]))); var pulse = styled.keyframes(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n"], ["\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n"]))); var Root = styled__default['default'].div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n min-height: 20px;\n display: block;\n background-color: ", ";\n border-radius: ", ";\n\n ", "\n ", "\n"], ["\n min-height: 20px;\n display: block;\n background-color: ", ";\n border-radius: ", ";\n\n ", "\n ", "\n"])), function (_a) { var theme = _a.theme; return theme.colors.backgroundDisabled; }, function (_a) { var variant$1 = _a.variant, theme = _a.theme; return (variant$1 === variant.CIRCLE ? theme.radii.circle : theme.radii.small); }, styledSystem.layout, styledSystem.space); var Pulse = styled__default['default'](Root)(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n animation: ", " 2s infinite ease-out;\n transform: translate3d(0, 0, 0);\n"], ["\n animation: ", " 2s infinite ease-out;\n transform: translate3d(0, 0, 0);\n"])), pulse); var Waves = styled__default['default'](Root)(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n position: relative;\n overflow: hidden;\n transform: translate3d(0, 0, 0);\n &:before {\n content: \"\";\n position: absolute;\n background-image: linear-gradient(90deg, transparent, rgba(243, 243, 243, 0.5), transparent);\n top: 0;\n left: -150px;\n height: 100%;\n width: 150px;\n animation: ", " 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n"], ["\n position: relative;\n overflow: hidden;\n transform: translate3d(0, 0, 0);\n &:before {\n content: \"\";\n position: absolute;\n background-image: linear-gradient(90deg, transparent, rgba(243, 243, 243, 0.5), transparent);\n top: 0;\n left: -150px;\n height: 100%;\n width: 150px;\n animation: ", " 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n"])), waves); var Skeleton = function (_a) { var _b = _a.variant, variant$1 = _b === void 0 ? variant.RECT : _b, _c = _a.animation, animation$1 = _c === void 0 ? animation.PULSE : _c, props = __rest(_a, ["variant", "animation"]); if (animation$1 === animation.WAVES) { return React__default['default'].createElement(Waves, __assign({ variant: variant$1 }, props)); } return React__default['default'].createElement(Pulse, __assign({ variant: variant$1 }, props)); }; var templateObject_1$j, templateObject_2$8, templateObject_3$5, templateObject_4$2, templateObject_5$1; var scaleKeyValues = { sm: { handleHeight: "16px", handleWidth: "16px", handleLeft: "2px", handleTop: "2px", checkedLeft: "calc(100% - 18px)", toggleHeight: "20px", toggleWidth: "36px", }, md: { handleHeight: "32px", handleWidth: "32px", handleLeft: "4px", handleTop: "4px", checkedLeft: "calc(100% - 36px)", toggleHeight: "40px", toggleWidth: "72px", }, }; var getScale = function (property) { return function (_a) { var _b = _a.scale, scale = _b === void 0 ? scales$4.MD : _b; return scaleKeyValues[scale][property]; }; }; var Handle = styled__default['default'].div(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n cursor: pointer;\n height: ", ";\n left: ", ";\n position: absolute;\n top: ", ";\n transition: left 200ms ease-in;\n width: ", ";\n z-index: 1;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n cursor: pointer;\n height: ", ";\n left: ", ";\n position: absolute;\n top: ", ";\n transition: left 200ms ease-in;\n width: ", ";\n z-index: 1;\n"])), function (_a) { var theme = _a.theme; return theme.toggle.handleBackground; }, getScale("handleHeight"), getScale("handleLeft"), getScale("handleTop"), getScale("handleWidth")); var Input = styled__default['default'].input(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n cursor: pointer;\n opacity: 0;\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 3;\n\n &:checked + ", " {\n left: ", ";\n }\n\n &:focus + ", " {\n box-shadow: ", ";\n }\n\n &:hover + ", ":not(:disabled):not(:checked) {\n box-shadow: ", ";\n }\n"], ["\n cursor: pointer;\n opacity: 0;\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 3;\n\n &:checked + ", " {\n left: ", ";\n }\n\n &:focus + ", " {\n box-shadow: ", ";\n }\n\n &:hover + ", ":not(:disabled):not(:checked) {\n box-shadow: ", ";\n }\n"])), Handle, getScale("checkedLeft"), Handle, function (_a) { var theme = _a.theme; return theme.shadows.focus; }, Handle, function (_a) { var theme = _a.theme; return theme.shadows.focus; }); var StyledToggle = styled__default['default'].div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: 24px;\n box-shadow: ", ";\n cursor: pointer;\n display: inline-flex;\n height: ", ";\n position: relative;\n transition: background-color 200ms;\n width: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: 24px;\n box-shadow: ", ";\n cursor: pointer;\n display: inline-flex;\n height: ", ";\n position: relative;\n transition: background-color 200ms;\n width: ", ";\n"])), function (_a) { var theme = _a.theme, checked = _a.checked; return theme.colors[checked ? "success" : "input"]; }, function (_a) { var theme = _a.theme; return theme.shadows.inset; }, getScale("toggleHeight"), getScale("toggleWidth")); var templateObject_1$i, templateObject_2$7, templateObject_3$4; var scales = { SM: "sm", MD: "md", }; var Toggle = function (_a) { var checked = _a.checked, _b = _a.scale, scale = _b === void 0 ? scales.MD : _b, props = __rest(_a, ["checked", "scale"]); var isChecked = !!checked; return (React__default['default'].createElement(StyledToggle, { checked: isChecked, scale: scale }, React__default['default'].createElement(Input, __assign({ checked: checked, scale: scale }, props, { type: "checkbox" })), React__default['default'].createElement(Handle, { scale: scale }))); }; Toggle.defaultProps = { scale: scales.MD, }; var byTextAscending = function (getTextProperty) { return function (objectA, objectB) { var upperA = getTextProperty(objectA).toUpperCase(); var upperB = getTextProperty(objectB).toUpperCase(); if (upperA < upperB) { return -1; } if (upperA > upperB) { return 1; } return 0; }; }; var byTextDescending = function (getTextProperty) { return function (objectA, objectB) { var upperA = getTextProperty(objectA).toUpperCase(); var upperB = getTextProperty(objectB).toUpperCase(); if (upperA > upperB) { return -1; } if (upperA < upperB) { return 1; } return 0; }; }; var sortByColumn = function (data, sortColumn, columns) { var isAscending = null; var sortedRows = __spreadArrays(data); columns.forEach(function (column) { // if the row was found if (sortColumn === column.name) { isAscending = column.sorted.asc; if (column.sort) { sortedRows = isAscending ? data.sort(column.sort) : data.sort(column.sort).reverse(); // default to sort by string } else { sortedRows = isAscending ? data.sort(byTextAscending(function (object) { return object.original[sortColumn]; })) : data.sort(byTextDescending(function (object) { return object.original[sortColumn]; })); } } }); return sortedRows; }; var getPaginatedData = function (rows, perPage, page) { var start = (page - 1) * perPage; var end = start + perPage; return rows.slice(start, end); }; var getColumnsByName = function (columns) { var columnsByName = {}; columns.forEach(function (column) { var col = { name: column.name, label: column.label, }; if (column.render) { col.render = column.render; } col.hidden = column.hidden; columnsByName[column.name] = col; }); return columnsByName; }; var createReducer = function () { return function (state, action) { var rows = []; var nextPage = 0; var prevPage = 0; var isAscending = null; var sortedRows = []; var columnCopy = []; var filteredRows = []; var selectedRowsById = {}; var stateCopy = __assign({}, state); var rowIds = {}; switch (action.type) { case "SET_ROWS": rows = __spreadArrays(action.data); // preserve sorting if a sort is already enabled when data changes if (state.sortColumn) { rows = sortByColumn(action.data, state.sortColumn, state.columns); } if (state.paginationEnabled === true) { rows = getPaginatedData(rows, state.pagination.perPage, state.pagination.page); } if (state.paginationEnabled === true) { rows = getPaginatedData(rows, state.pagination.perPage, state.pagination.page); } columnCopy = state.columns.map(function (column) { if (state.sortColumn === column.name) { return __assign(__assign({}, column), { sorted: { on: true, asc: column.sorted.asc, } }); } return column; }); return __assign(__assign({}, state), { rows: rows, originalRows: action.data, columns: columnCopy }); case "NEXT_PAGE": nextPage = state.pagination.page + 1; return __assign(__assign({}, state), { rows: getPaginatedData(state.originalRows, state.pagination.perPage, nextPage), pagination: __assign(__assign({}, state.pagination), { page: nextPage, canNext: nextPage * state.pagination.perPage < state.originalRows.length, canPrev: nextPage !== 1 }) }); case "PREV_PAGE": prevPage = state.pagination.page === 1 ? 1 : state.pagination.page - 1; return __assign(__assign({}, state), { rows: getPaginatedData(state.originalRows, state.pagination.perPage, prevPage), pagination: __assign(__assign({}, state.pagination), { page: prevPage, canNext: prevPage * state.pagination.perPage < state.originalRows.length, canPrev: prevPage !== 1 }) }); case "TOGGLE_SORT": if (!(action.columnName in state.columnsByName)) { throw new Error("Invalid column, " + action.columnName + " not found"); } // loop through all columns and set the sort parameter to off unless // it's the specified column (only one column at a time for ) columnCopy = state.columns.map(function (column) { // if the row was found if (action.columnName === column.name) { if (action.isAscOverride !== undefined) { // force the sort order isAscending = action.isAscOverride; } else { // if it's undefined, start by setting to ascending, otherwise toggle isAscending = column.sorted.asc === undefined ? true : !column.sorted.asc; } if (column.sort) { sortedRows = isAscending ? state.rows.sort(column.sort) : state.rows.sort(column.sort).reverse(); // default to sort by string } else { sortedRows = isAscending ? state.rows.sort(byTextAscending(function (object) { return object.original[action.columnName]; })) : state.rows.sort(byTextDescending(function (object) { return object.original[action.columnName]; })); } return __assign(__assign({}, column), { sorted: { on: true, asc: isAscending, } }); } // set sorting to false for all other columns return __assign(__assign({}, column), { sorted: { on: false, asc: false, } }); }); return __assign(__assign({}, state), { columns: columnCopy, rows: sortedRows, sortColumn: action.columnName, columnsByName: getColumnsByName(columnCopy) }); case "GLOBAL_FILTER": filteredRows = action.filter(state.originalRows); selectedRowsById = {}; state.selectedRows.forEach(function (row) { var _a; selectedRowsById[row.id] = (_a = row.selected) !== null && _a !== void 0 ? _a : false; }); return __assign(__assign({}, state), { rows: filteredRows.map(function (row) { return selectedRowsById[row.id] ? __assign(__assign({}, row), { selected: selectedRowsById[row.id] }) : __assign({}, row); }), filterOn: true }); case "SELECT_ROW": stateCopy = __assign({}, state); stateCopy.rows = stateCopy.rows.map(function (row) { var newRow = __assign({}, row); if (newRow.id === action.rowId) { newRow.selected = !newRow.selected; } return newRow; }); stateCopy.originalRows = stateCopy.originalRows.map(function (row) { var newRow = __assign({}, row); if (newRow.id === action.rowId) { newRow.selected = !newRow.selected; } return newRow; }); stateCopy.selectedRows = stateCopy.originalRows.filter(function (row) { return row.selected === true; }); stateCopy.toggleAllState = stateCopy.selectedRows.length === stateCopy.rows.length ? (stateCopy.toggleAllState = true) : (stateCopy.toggleAllState = false); return stateCopy; case "SEARCH_STRING": stateCopy = __assign({}, state); stateCopy.rows = stateCopy.originalRows.filter(function (row) { return (row.cells.filter(function (cell) { if (cell.value.includes(action.searchString)) { return true; } return false; }).length > 0); }); return stateCopy; case "TOGGLE_ALL": if (state.selectedRows.length < state.rows.length) { stateCopy.rows = stateCopy.rows.map(function (row) { rowIds[row.id] = true; return __assign(__assign({}, row), { selected: true }); }); stateCopy.toggleAllState = true; } else { stateCopy.rows = stateCopy.rows.map(function (row) { rowIds[row.id] = false; return __assign(__assign({}, row), { selected: false }); }); stateCopy.toggleAllState = false; } stateCopy.originalRows = stateCopy.originalRows.map(function (row) { return row.id in rowIds ? __assign(__assign({}, row), { selected: rowIds[row.id] }) : __assign({}, row); }); stateCopy.selectedRows = stateCopy.originalRows.filter(function (row) { return row.selected; }); return stateCopy; default: throw new Error("Invalid reducer action"); } }; }; var sortDataInOrder = function (data, columns) { // eslint-disable-next-line @typescript-eslint/no-explicit-any return data.map(function (row) { // eslint-disable-next-line @typescript-eslint/no-explicit-any var newRow = {}; columns.forEach(function (column) { if (!(column.name in row)) { throw new Error("Invalid row data, " + column.name + " not found"); } newRow[column.name] = row[column.name]; }); return newRow; }); }; var makeRender = function ( // eslint-disable-next-line value, // eslint-disable-next-line @typescript-eslint/no-explicit-any render, row) { return render ? function () { return render({ row: row, value: value }); } : function () { return value; }; }; var makeHeaderRender = function (label, render) { return render ? function () { return render({ label: label }); } : function () { return label; }; }; var useTable = function (columns, data, options) { var columnsWithSorting = React.useMemo(function () { return columns.map(function (column) { return __assign(__assign({}, column), { label: column.label ? column.label : column.name, hidden: column.hidden ? column.hidden : false, sort: column.sort, sorted: { on: false, asc: false, } }); }); }, [columns]); var columnsByName = React.useMemo(function () { return getColumnsByName(columnsWithSorting); }, [columnsWithSorting]); var tableData = React.useMemo(function () { var sortedData = sortDataInOrder(data, columnsWithSorting); var newData = sortedData.map(function (row, idx) { return { id: idx, selected: false, hidden: false, original: row, cells: Object.entries(row) .map(function (_a) { var column = _a[0], value = _a[1]; return { hidden: columnsByName[column].hidden, field: column, value: value, render: makeRender(value, columnsByName[column].render, row), }; }) .filter(function (cell) { return !cell.hidden; }), }; }); return newData; }, [data, columnsWithSorting, columnsByName]); var reducer = createReducer(); var _a = React.useReducer(reducer, { columns: columnsWithSorting, columnsByName: columnsByName, originalRows: tableData, rows: tableData, selectedRows: [], toggleAllState: false, filterOn: !!(options === null || options === void 0 ? void 0 : options.filter), sortColumn: options === null || options === void 0 ? void 0 : options.sortColumn, paginationEnabled: !!(options === null || options === void 0 ? void 0 : options.pagination), pagination: { page: 1, perPage: 10, canNext: true, canPrev: false, // eslint-disable-next-line @typescript-eslint/no-empty-function nextPage: noop__default['default'], // eslint-disable-next-line @typescript-eslint/no-empty-function prevPage: noop__default['default'], }, }), state = _a[0], dispatch = _a[1]; state.pagination.nextPage = React.useCallback(function () { dispatch({ type: "NEXT_PAGE" }); }, [dispatch]); state.pagination.prevPage = React.useCallback(function () { return dispatch({ type: "PREV_PAGE" }); }, [dispatch]); React.useEffect(function () { dispatch({ type: "SET_ROWS", data: tableData }); }, [tableData]); var headers = React.useMemo(function () { return __spreadArrays(state.columns.map(function (column) { var label = column.label ? column.label : column.name; return __assign(__assign({}, column), { render: makeHeaderRender(label, column.headerRender) }); })); }, [state.columns]); React.useEffect(function () { if (options && options.filter) { dispatch({ type: "GLOBAL_FILTER", filter: options.filter }); } }); return { headers: headers.filter(function (column) { return !column.hidden; }), rows: state.rows, originalRows: state.originalRows, selectedRows: state.selectedRows, dispatch: dispatch, selectRow: function (rowId) { return dispatch({ type: "SELECT_ROW", rowId: rowId }); }, toggleAll: function () { return dispatch({ type: "TOGGLE_ALL" }); }, toggleSort: function (columnName, isAscOverride) { return dispatch({ type: "TOGGLE_SORT", columnName: columnName, isAscOverride: isAscOverride }); }, setSearchString: function (searchString) { return dispatch({ type: "SEARCH_STRING", searchString: searchString }); }, pagination: state.pagination, toggleAllState: state.toggleAllState, }; }; var breakpointMap = { xs: 370, sm: 576, md: 852, lg: 968, xl: 1080, }; var breakpoints = Object.values(breakpointMap).map(function (breakpoint) { return breakpoint + "px"; }); var mediaQueries$1 = { xs: "@media screen and (min-width: " + breakpointMap.xs + "px)", sm: "@media screen and (min-width: " + breakpointMap.sm + "px)", md: "@media screen and (min-width: " + breakpointMap.md + "px)", lg: "@media screen and (min-width: " + breakpointMap.lg + "px)", xl: "@media screen and (min-width: " + breakpointMap.xl + "px)", nav: "@media screen and (min-width: " + breakpointMap.lg + "px)", }; var shadows = { level1: "0px 2px 12px -8px rgba(25, 19, 38, 0.1), 0px 1px 1px rgba(25, 19, 38, 0.05)", active: "0px 0px 0px 1px #703DDB, 0px 0px 4px 8px rgba(112, 61, 219, 0.4)", success: "0px 0px 0px 1px #31D0AA, 0px 0px 0px 4px rgba(49, 208, 170, 0.2)", warning: "0px 0px 0px 1px #ED4B9E, 0px 0px 0px 4px rgba(237, 75, 158, 0.2)", focus: "0px 0px 0px 1px #7645D9, 0px 0px 0px 4px rgba(118, 69, 217, 0.6)", inset: "inset 0px 2px 2px -1px rgba(74, 74, 104, 0.1)", }; var spacing = [0, 4, 8, 16, 24, 32, 48, 64]; var radii = { small: "4px", default: "16px", card: "32px", circle: "50%", }; var zIndices = { dropdown: 10, modal: 100, }; var base = { siteWidth: 1200, breakpoints: breakpoints, mediaQueries: mediaQueries$1, spacing: spacing, shadows: shadows, radii: radii, zIndices: zIndices, }; /** * Can't use the media queries from "base.mediaQueries" because of how matchMedia works * In order for the listener to trigger we need have have the media query with a range, e.g. * (min-width: 370px) and (max-width: 576px) * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList */ var mediaQueries = (function () { var prevMinWidth = 0; return Object.keys(breakpointMap).reduce(function (accum, size, index) { var _a, _b; // Largest size is just a min-width of second highest max-width if (index === Object.keys(breakpointMap).length - 1) { return __assign(__assign({}, accum), (_a = {}, _a[size] = "(min-width: " + prevMinWidth + "px)", _a)); } var minWidth = prevMinWidth; var breakpoint = breakpointMap[size]; // Min width for next iteration prevMinWidth = breakpoint + 1; return __assign(__assign({}, accum), (_b = {}, _b[size] = "(min-width: " + minWidth + "px) and (max-width: " + breakpoint + "px)", _b)); }, {}); })(); var getKey = function (size) { return "is" + size.charAt(0).toUpperCase() + size.slice(1); }; var useMatchBreakpoints = function () { var _a = React.useState(function () { return Object.keys(mediaQueries).reduce(function (accum, size) { var _a; var key = getKey(size); var mql = window.matchMedia(mediaQueries[size]); return __assign(__assign({}, accum), (_a = {}, _a[key] = mql.matches, _a)); }, {}); }), state = _a[0], setState = _a[1]; React.useEffect(function () { // Create listeners for each media query returning a function to unsubscribe var handlers = Object.keys(mediaQueries).map(function (size) { var mql = window.matchMedia(mediaQueries[size]); var handler = function (matchMediaQuery) { var key = getKey(size); setState(function (prevState) { var _a; return (__assign(__assign({}, prevState), (_a = {}, _a[key] = matchMediaQuery.matches, _a))); }); }; // Safari < 14 fix if (mql.addEventListener) { mql.addEventListener("change", handler); } return function () { // Safari < 14 fix if (mql.removeEventListener) { mql.removeEventListener("change", handler); } }; }); return function () { handlers.forEach(function (unsubscribe) { unsubscribe(); }); }; }, [setState]); return state; }; var defaultParticleOptions = { size: 30, distance: 500, }; var createParticle = function (x, y, imgSrc, options) { if (options === void 0) { options = {}; } var _a = __assign(__assign({}, defaultParticleOptions), options), size = _a.size, distance = _a.distance; var particle = document.createElement("particle"); document.body.appendChild(particle); var width = Math.floor(Math.random() * size + 8); var height = width; var destinationX = (Math.random() - 0.5) * distance; var destinationY = (Math.random() - 0.5) * distance; var rotation = Math.random() * 520; var delay = Math.random() * 200; particle.style.backgroundRepeat = "no-repeat"; particle.style.backgroundSize = "contain"; particle.style.backgroundImage = "url(" + imgSrc + ")"; particle.style.left = "0"; particle.style.top = "0"; particle.style.opacity = "0"; particle.style.pointerEvents = "none"; particle.style.position = "fixed"; particle.style.width = width + "px"; particle.style.height = height + "px"; var animation = particle.animate([ { transform: "translate(-50%, -50%) translate(" + x + "px, " + y + "px) rotate(0deg)", opacity: 1, }, { transform: "translate(-50%, -50%) translate(" + (x + destinationX) + "px, " + (y + destinationY) + "px) rotate(" + rotation + "deg)", opacity: 0, }, ], { duration: Math.random() * 1000 + 5000, easing: "cubic-bezier(0, .9, .57, 1)", delay: delay, }); animation.onfinish = function () { particle.remove(); }; }; var defaultOptions = { numberOfParticles: 30, debounceDuration: 200, particleOptions: {}, }; /** * @see https://css-tricks.com/playing-with-particles-using-the-web-animations-api/ */ var useParticleBurst = function (options) { var _a = __assign(__assign({}, defaultOptions), options), selector = _a.selector, numberOfParticles = _a.numberOfParticles, debounceDuration = _a.debounceDuration, imgSrc = _a.imgSrc, disableWhen = _a.disableWhen, particleOptions = _a.particleOptions; var makeListener = React.useCallback(function () { return debounce__default['default'](function (event) { var isDisabled = disableWhen && disableWhen(); if (!isDisabled) { var node = event.currentTarget; if (event.clientX === 0 && event.clientY === 0) { var _a = node.getBoundingClientRect(), left = _a.left, width = _a.width, top_1 = _a.top, height = _a.height; var x = left + width / 2; var y = top_1 + height / 2; for (var i = 0; i < numberOfParticles; i += 1) { createParticle(x, y, imgSrc, particleOptions); } } else { for (var i = 0; i < numberOfParticles; i += 1) { createParticle(event.clientX, event.clientY + window.scrollY, imgSrc, particleOptions); } } } }, debounceDuration, { leading: true }); }, [debounceDuration, numberOfParticles, imgSrc, disableWhen, particleOptions]); var listener = makeListener(); var initialize = React.useCallback(function () { if (selector) { document.querySelectorAll(selector).forEach(function (element) { element.addEventListener("click", listener); }); } else { document.addEventListener("click", listener); } }, [selector, listener]); var teardown = React.useCallback(function () { if (selector) { document.querySelectorAll(selector).forEach(function (element) { element.removeEventListener("click", listener); }); } else { document.removeEventListener("click", listener); } }, [selector, listener]); React.useEffect(function () { initialize(); return function () { return teardown(); }; }, [initialize, teardown]); return { initialize: initialize, teardown: teardown }; }; var useKonamiCheatCode = function (matchedCodeHandler) { React.useEffect(function () { var pattern = [ "ArrowUp", "ArrowUp", "ArrowDown", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowLeft", "ArrowRight", ]; var currentIndex = 0; var onKeyUpHandler = function (event) { var key = event.key; // is key in correct order otherwise reset if (key !== pattern[currentIndex]) { currentIndex = 0; return; } currentIndex += 1; if (pattern.length === currentIndex) { currentIndex = 0; matchedCodeHandler(); } }; document.addEventListener("keyup", onKeyUpHandler); return function () { return document.removeEventListener("keyup", onKeyUpHandler); }; }, [matchedCodeHandler]); }; var StyledModal = styled__default['default'].div(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n background: ", ";\n box-shadow: 0px 20px 36px -8px rgba(14, 14, 44, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.05);\n border: 1px solid ", ";\n border-radius: 32px;\n width: 100%;\n z-index: ", ";\n overflow-y: auto;\n ", " {\n width: auto;\n min-width: 360px;\n max-width: 100%;\n }\n"], ["\n background: ", ";\n box-shadow: 0px 20px 36px -8px rgba(14, 14, 44, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.05);\n border: 1px solid ", ";\n border-radius: 32px;\n width: 100%;\n z-index: ", ";\n overflow-y: auto;\n ", " {\n width: auto;\n min-width: 360px;\n max-width: 100%;\n }\n"])), function (_a) { var theme = _a.theme; return theme.modal.background; }, function (_a) { var theme = _a.theme; return theme.colors.borderColor; }, function (_a) { var theme = _a.theme; return theme.zIndices.modal; }, function (_a) { var theme = _a.theme; return theme.mediaQueries.xs; }); var ModalHeader = styled__default['default'].div(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n border-bottom: 1px solid #e9eaeb;\n align-items: center;\n padding: 12px 24px;\n"], ["\n display: flex;\n align-items: center;\n border-bottom: 1px solid #e9eaeb;\n align-items: center;\n padding: 12px 24px;\n"]))); var ModalTitle = styled__default['default'](Flex$1)(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n align-items: center;\n flex: 1;\n"], ["\n align-items: center;\n flex: 1;\n"]))); var Modal = function (_a) { var title = _a.title, onDismiss = _a.onDismiss, onBack = _a.onBack, children = _a.children, _b = _a.hideCloseButton, hideCloseButton = _b === void 0 ? false : _b, _c = _a.bodyPadding, bodyPadding = _c === void 0 ? "24px" : _c; return (React__default['default'].createElement(StyledModal, null, React__default['default'].createElement(ModalHeader, null, React__default['default'].createElement(ModalTitle, null, onBack && (React__default['default'].createElement(IconButton, { variant: "text", onClick: onBack, "area-label": "go back", mr: "8px" }, React__default['default'].createElement(Icon$18, { color: "primary" }))), React__default['default'].createElement(Heading, null, title)), !hideCloseButton && (React__default['default'].createElement(IconButton, { variant: "text", onClick: onDismiss, "aria-label": "Close the dialog" }, React__default['default'].createElement(Icon$U, { color: "primary" })))), React__default['default'].createElement(Flex$1, { flexDirection: "column", p: bodyPadding }, children))); }; var templateObject_1$h, templateObject_2$6, templateObject_3$3; var Overlay = styled__default['default'].div.attrs({ role: "presentation" })(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background-color: #452a7a;\n transition: opacity 0.4s;\n opacity: ", ";\n z-index: ", ";\n pointer-events: ", ";\n"], ["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background-color: #452a7a;\n transition: opacity 0.4s;\n opacity: ", ";\n z-index: ", ";\n pointer-events: ", ";\n"])), function (_a) { var show = _a.show; return (show ? 0.6 : 0); }, function (_a) { var zIndex = _a.zIndex; return zIndex; }, function (_a) { var show = _a.show; return (show ? "initial" : "none"); }); Overlay.defaultProps = { show: false, zIndex: 10, }; var templateObject_1$g; var ModalWrapper = styled__default['default'].div(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ", ";\n"])), function (_a) { var theme = _a.theme; return theme.zIndices.modal - 1; }); var Context = React.createContext({ onPresent: function () { return null; }, onDismiss: function () { return null; }, setCloseOnOverlayClick: function () { return true; }, }); var ModalProvider = function (_a) { var children = _a.children; var _b = React.useState(false), isOpen = _b[0], setIsOpen = _b[1]; var _c = React.useState(), modalNode = _c[0], setModalNode = _c[1]; var _d = React.useState(true), closeOnOverlayClick = _d[0], setCloseOnOverlayClick = _d[1]; var handlePresent = function (node) { setModalNode(node); setIsOpen(true); }; var handleDismiss = function () { setModalNode(undefined); setIsOpen(false); }; var handleOverlayDismiss = function () { if (closeOnOverlayClick) { handleDismiss(); } }; return (React__default['default'].createElement(Context.Provider, { value: { onPresent: handlePresent, onDismiss: handleDismiss, setCloseOnOverlayClick: setCloseOnOverlayClick, } }, isOpen && (React__default['default'].createElement(ModalWrapper, null, React__default['default'].createElement(Overlay, { show: true, onClick: handleOverlayDismiss }), React__default['default'].isValidElement(modalNode) && React__default['default'].cloneElement(modalNode, { onDismiss: handleDismiss, }))), children)); }; var templateObject_1$f; var useModal = function (modal, closeOnOverlayClick) { if (closeOnOverlayClick === void 0) { closeOnOverlayClick = true; } var _a = React.useContext(Context), onPresent = _a.onPresent, onDismiss = _a.onDismiss, setCloseOnOverlayClick = _a.setCloseOnOverlayClick; var onPresentCallback = React.useCallback(function () { onPresent(modal); }, [modal, onPresent]); React.useEffect(function () { setCloseOnOverlayClick(closeOnOverlayClick); }, [closeOnOverlayClick, setCloseOnOverlayClick]); return [onPresentCallback, onDismiss]; }; var Flex = styled__default['default'].div(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n display: flex;\n ", "\n ", "\n"], ["\n display: flex;\n ", "\n ", "\n"])), styledSystem.flexbox, styledSystem.space); var templateObject_1$e; var Icon$p = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M13.7803 2.71967C14.0732 3.01256 14.0732 3.48744 13.7803 3.78033L12.8107 4.75L14.0307 5.96999H20C21.1 5.96999 22 6.86999 22 7.96999V12.73C21.28 12.25 20.43 11.97 19.5 11.97C17.19 11.97 15.3 13.73 15.05 15.97H11.91C11.96 15.64 12 15.31 12 14.97C12 13.43 11.41 12.03 10.46 10.97H11C12.1 10.97 13 10.07 13 8.96999V7.06068L11.75 5.81066L10.7803 6.78033C10.4874 7.07322 10.0126 7.07322 9.71967 6.78033C9.42678 6.48744 9.42678 6.01256 9.71967 5.71967L12.7197 2.71967C13.0126 2.42678 13.4874 2.42678 13.7803 2.71967Z" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 15C11 17.7614 8.76142 20 6 20C3.23858 20 1 17.7614 1 15C1 12.2386 3.23858 10 6 10C8.76142 10 11 12.2386 11 15ZM9 15C9 16.6569 7.65685 18 6 18C4.34315 18 3 16.6569 3 15C3 13.3431 4.34315 12 6 12C7.65685 12 9 13.3431 9 15Z" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 12.97C17.57 12.97 16 14.54 16 16.47C16 18.4 17.57 19.97 19.5 19.97C21.43 19.97 23 18.4 23 16.47C23 14.54 21.43 12.97 19.5 12.97ZM19.5 17.97C18.67 17.97 18 17.3 18 16.47C18 15.64 18.67 14.97 19.5 14.97C20.33 14.97 21 15.64 21 16.47C21 17.3 20.33 17.97 19.5 17.97Z" }), React__default['default'].createElement("path", { d: "M9 8.96997H4C3.45 8.96997 3 8.52997 3 7.96997C3 7.41997 3.45 6.96997 4 6.96997H7C8.1 6.96997 9 7.86997 9 8.96997Z" }))); }; var Icon$o = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 12.75C13.63 12.75 15.07 13.14 16.24 13.65C17.32 14.13 18 15.21 18 16.38V17C18 17.55 17.55 18 17 18H7C6.45 18 6 17.55 6 17V16.39C6 15.21 6.68 14.13 7.76 13.66C8.93 13.14 10.37 12.75 12 12.75ZM4 13C5.1 13 6 12.1 6 11C6 9.9 5.1 9 4 9C2.9 9 2 9.9 2 11C2 12.1 2.9 13 4 13ZM5.13 14.1C4.76 14.04 4.39 14 4 14C3.01 14 2.07 14.21 1.22 14.58C0.48 14.9 0 15.62 0 16.43V17C0 17.55 0.45 18 1 18H4.5V16.39C4.5 15.56 4.73 14.78 5.13 14.1ZM20 13C21.1 13 22 12.1 22 11C22 9.9 21.1 9 20 9C18.9 9 18 9.9 18 11C18 12.1 18.9 13 20 13ZM24 16.43C24 15.62 23.52 14.9 22.78 14.58C21.93 14.21 20.99 14 20 14C19.61 14 19.24 14.04 18.87 14.1C19.27 14.78 19.5 15.56 19.5 16.39V18H23C23.55 18 24 17.55 24 17V16.43ZM12 6C13.66 6 15 7.34 15 9C15 10.66 13.66 12 12 12C10.34 12 9 10.66 9 9C9 7.34 10.34 6 12 6Z" }))); }; var Icon$n = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.45 16 3 16.45 3 17C3 17.55 3.45 18 4 18ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.45 11 3 11.45 3 12C3 12.55 3.45 13 4 13ZM3 7C3 7.55 3.45 8 4 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H4C3.45 6 3 6.45 3 7Z" }))); }; var Icon$m = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M4 18H15C15.55 18 16 17.55 16 17C16 16.45 15.55 16 15 16H4C3.45 16 3 16.45 3 17C3 17.55 3.45 18 4 18ZM4 13H12C12.55 13 13 12.55 13 12C13 11.45 12.55 11 12 11H4C3.45 11 3 11.45 3 12C3 12.55 3.45 13 4 13ZM3 7C3 7.55 3.45 8 4 8H15C15.55 8 16 7.55 16 7C16 6.45 15.55 6 15 6H4C3.45 6 3 6.45 3 7ZM20.3 14.88L17.42 12L20.3 9.12C20.69 8.73 20.69 8.1 20.3 7.71C19.91 7.32 19.28 7.32 18.89 7.71L15.3 11.3C14.91 11.69 14.91 12.32 15.3 12.71L18.89 16.3C19.28 16.69 19.91 16.69 20.3 16.3C20.68 15.91 20.69 15.27 20.3 14.88Z" }))); }; var Icon$l = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M9.99998 19V14H14V19C14 19.55 14.45 20 15 20H18C18.55 20 19 19.55 19 19V12H20.7C21.16 12 21.38 11.43 21.03 11.13L12.67 3.59997C12.29 3.25997 11.71 3.25997 11.33 3.59997L2.96998 11.13C2.62998 11.43 2.83998 12 3.29998 12H4.99998V19C4.99998 19.55 5.44998 20 5.99998 20H8.99998C9.54998 20 9.99998 19.55 9.99998 19Z" }))); }; var Icon$k = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M21.9 8.89L20.85 4.52C20.63 3.62 19.85 3 18.94 3H16.73H14.72H13H11H9.28001H7.26001H5.05001C4.15001 3 3.36001 3.63 3.15001 4.52L2.10001 8.89C1.86001 9.91 2.08001 10.95 2.72001 11.77C2.80001 11.88 2.91001 11.96 3.00001 12.06V19C3.00001 20.1 3.90001 21 5.00001 21H19C20.1 21 21 20.1 21 19V12.06C21.09 11.97 21.2 11.88 21.28 11.78C21.92 10.96 22.15 9.91 21.9 8.89ZM7.02001 5L6.44001 9.86C6.36001 10.51 5.84001 11 5.23001 11C4.74001 11 4.43001 10.71 4.30001 10.53C4.04001 10.2 3.95001 9.77 4.05001 9.36L5.05001 5H7.02001ZM18.91 4.99L19.96 9.36C20.06 9.78 19.97 10.2 19.71 10.53C19.57 10.71 19.27 11 18.77 11C18.16 11 17.63 10.51 17.56 9.86L16.98 5L18.91 4.99ZM15.51 9.52C15.56 9.91 15.44 10.3 15.18 10.59C14.95 10.85 14.63 11 14.22 11C13.55 11 13 10.41 13 9.69V5H14.96L15.51 9.52ZM11 9.69C11 10.41 10.45 11 9.71001 11C9.37001 11 9.06001 10.85 8.82001 10.59C8.57001 10.3 8.45001 9.91 8.49001 9.52L9.04001 5H11V9.69ZM18 19H6.00001C5.45001 19 5.00001 18.55 5.00001 18V12.97C5.08001 12.98 5.15001 13 5.23001 13C6.10001 13 6.89001 12.64 7.47001 12.05C8.07001 12.65 8.87001 13 9.78001 13C10.65 13 11.43 12.64 12.01 12.07C12.6 12.64 13.4 13 14.3 13C15.14 13 15.94 12.65 16.54 12.05C17.12 12.64 17.91 13 18.78 13C18.86 13 18.93 12.98 19.01 12.97V18C19 18.55 18.55 19 18 19Z" }))); }; var Icon$j = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M5 7C5 6.44772 4.55228 6 4 6C3.44772 6 3 6.44772 3 7V18C3 19.1046 3.89543 20 5 20H20C20.5523 20 21 19.5523 21 19C21 18.4477 20.5523 18 20 18H5V7Z" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19 17H7C6.44772 17 6 16.5523 6 16V12C6 11.4477 6.44772 11 7 11H10V10C10 9.44772 10.4477 9 11 9H14V7C14 6.44772 14.4477 6 15 6H19C19.5523 6 20 6.44772 20 7V16C20 16.5523 19.5523 17 19 17ZM16 8H18V15H16V8ZM12 15H14V11H12V15ZM10 13H8V15H10V13Z" }))); }; var Icon$i = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M11.99 2C6.47 2 2 6.48 2 12C2 17.52 6.47 22 11.99 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 11.99 2ZM18.92 8H15.97C15.65 6.75 15.19 5.55 14.59 4.44C16.43 5.07 17.96 6.35 18.92 8ZM12 4.04C12.83 5.24 13.48 6.57 13.91 8H10.09C10.52 6.57 11.17 5.24 12 4.04ZM4.26 14C4.1 13.36 4 12.69 4 12C4 11.31 4.1 10.64 4.26 10H7.64C7.56 10.66 7.5 11.32 7.5 12C7.5 12.68 7.56 13.34 7.64 14H4.26ZM5.08 16H8.03C8.35 17.25 8.81 18.45 9.41 19.56C7.57 18.93 6.04 17.66 5.08 16ZM8.03 8H5.08C6.04 6.34 7.57 5.07 9.41 4.44C8.81 5.55 8.35 6.75 8.03 8ZM12 19.96C11.17 18.76 10.52 17.43 10.09 16H13.91C13.48 17.43 12.83 18.76 12 19.96ZM14.34 14H9.66C9.57 13.34 9.5 12.68 9.5 12C9.5 11.32 9.57 10.65 9.66 10H14.34C14.43 10.65 14.5 11.32 14.5 12C14.5 12.68 14.43 13.34 14.34 14ZM14.59 19.56C15.19 18.45 15.65 17.25 15.97 16H18.92C17.96 17.65 16.43 18.93 14.59 19.56ZM16.36 14C16.44 13.34 16.5 12.68 16.5 12C16.5 11.32 16.44 10.66 16.36 10H19.74C19.9 10.64 20 11.31 20 12C20 12.69 19.9 13.36 19.74 14H16.36Z" }))); }; var Icon$h = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.1534 13.6089L4.15362 13.61C4.77322 16.8113 7.42207 19.3677 10.647 19.8853L10.6502 19.8858C13.0412 20.2736 15.2625 19.6103 16.9422 18.2833C11.3549 16.2878 7.9748 10.3524 9.26266 4.48816C5.69846 5.77194 3.35817 9.51245 4.1534 13.6089ZM10.0083 2.21054C4.76622 3.2533 1.09895 8.36947 2.19006 13.9901C2.97006 18.0201 6.28006 21.2101 10.3301 21.8601C13.8512 22.4311 17.0955 21.1608 19.2662 18.8587C19.2765 18.8478 19.2866 18.837 19.2968 18.8261C19.4385 18.6745 19.5757 18.5184 19.7079 18.3581C19.7105 18.355 19.713 18.3519 19.7156 18.3487C19.8853 18.1426 20.0469 17.9295 20.2001 17.7101C20.4101 17.4001 20.2401 16.9601 19.8701 16.9201C19.5114 16.8796 19.1602 16.8209 18.817 16.7452C18.7964 16.7406 18.7758 16.736 18.7552 16.7313C18.6676 16.7114 18.5804 16.6903 18.4938 16.6681C18.4919 16.6676 18.4901 16.6672 18.4882 16.6667C13.0234 15.2647 9.72516 9.48006 11.4542 4.03417C11.4549 4.03214 11.4555 4.03012 11.4562 4.0281C11.4875 3.92954 11.5205 3.83109 11.5552 3.73278C11.5565 3.72911 11.5578 3.72543 11.5591 3.72175C11.6768 3.38921 11.8136 3.05829 11.9701 2.73005C12.1301 2.39005 11.8501 2.01005 11.4701 2.03005C11.1954 2.04379 10.924 2.06848 10.6561 2.10368C10.6517 2.10427 10.6472 2.10486 10.6428 2.10545C10.4413 2.13221 10.2418 2.16492 10.0446 2.2034C10.0325 2.20576 10.0204 2.20814 10.0083 2.21054Z" }))); }; var Icon$g = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z" }))); }; var Icon$f = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12.8533 3.39627C12.4634 2.75821 11.5366 2.75821 11.1467 3.39627L7.42977 9.47855C7.02256 10.1449 7.50213 11 8.28306 11H15.7169C16.4979 11 16.9774 10.1449 16.5702 9.47855L12.8533 3.39627ZM12 5.84L13.93 9H10.06L12 5.84ZM17.5 13C15.01 13 13 15.01 13 17.5C13 19.99 15.01 22 17.5 22C19.99 22 22 19.99 22 17.5C22 15.01 19.99 13 17.5 13ZM17.5 20C16.12 20 15 18.88 15 17.5C15 16.12 16.12 15 17.5 15C18.88 15 20 16.12 20 17.5C20 18.88 18.88 20 17.5 20ZM3 19.5C3 20.6046 3.89543 21.5 5 21.5H9C10.1046 21.5 11 20.6046 11 19.5V15.5C11 14.3954 10.1046 13.5 9 13.5H5C3.89543 13.5 3 14.3954 3 15.5V19.5ZM5 15.5H9V19.5H5V15.5Z" }))); }; var Icon$e = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M7.5 13C7.5 11.8954 8.39543 11 9.5 11H12.5C13.6046 11 14.5 11.8954 14.5 13V15C14.5 16.1046 13.6046 17 12.5 17H9.5C8.39543 17 7.5 16.1046 7.5 15V13Z" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5 2C8.39543 2 7.5 2.89543 7.5 4V6.49482C7.5 6.93167 7.2113 7.30895 6.81834 7.49981C5.15004 8.31009 4 10.0207 4 12V17C4 19.2091 5.79086 21 8 21H14C16.2091 21 18 19.2091 18 17V12C18 11.4175 17.9004 10.8583 17.7173 10.3385L17.7892 10.297C19.4786 9.32167 20.0574 7.16153 19.082 5.47221C18.1552 3.86682 16.1534 3.25957 14.5 4.05146V4C14.5 2.89543 13.6046 2 12.5 2H9.5ZM9.5 6.25V4H12.5V6.25H9.5ZM9.22663 7.75C8.89473 8.46917 8.30318 9.00205 7.69211 9.29884C6.68638 9.78731 6 10.8154 6 12V17C6 18.1046 6.89543 19 8 19H14C15.1046 19 16 18.1046 16 17V12C16 10.8154 15.3136 9.78731 14.3079 9.29884C13.6968 9.00205 13.1053 8.46917 12.7734 7.75H9.22663ZM14.5 6.3226V6.49482C14.5 6.93167 14.7887 7.30895 15.1817 7.49981C15.7529 7.77726 16.2634 8.16029 16.6878 8.62352L16.7892 8.56495C17.522 8.1419 17.773 7.20495 17.35 6.47221C16.9346 5.75269 16.0213 5.49542 15.2914 5.89229L14.5 6.3226Z" }))); }; var Icon$d = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M5.66 4.2L6.05 4.59C6.44 4.97 6.44 5.61 6.05 5.99L6.04 6C5.65 6.39 5.03 6.39 4.64 6L4.25 5.61C3.86 5.23 3.86 4.6 4.25 4.21L4.26 4.2C4.64 3.82 5.27 3.81 5.66 4.2Z" }), React__default['default'].createElement("path", { d: "M1.99 10.95H3.01C3.56 10.95 4 11.39 4 11.95V11.96C4 12.51 3.56 12.95 3 12.94H1.99C1.44 12.94 1 12.5 1 11.95V11.94C1 11.39 1.44 10.95 1.99 10.95Z" }), React__default['default'].createElement("path", { d: "M12 1H12.01C12.56 1 13 1.44 13 1.99V2.96C13 3.51 12.56 3.95 12 3.94H11.99C11.44 3.94 11 3.5 11 2.95V1.99C11 1.44 11.44 1 12 1Z" }), React__default['default'].createElement("path", { d: "M18.34 4.2C18.73 3.82 19.36 3.82 19.75 4.21C20.14 4.6 20.14 5.22 19.75 5.61L19.36 6C18.98 6.39 18.35 6.39 17.96 6L17.95 5.99C17.56 5.61 17.56 4.98 17.95 4.59L18.34 4.2Z" }), React__default['default'].createElement("path", { d: "M18.33 19.7L17.94 19.31C17.55 18.92 17.55 18.3 17.95 17.9C18.33 17.52 18.96 17.51 19.35 17.9L19.74 18.29C20.13 18.68 20.13 19.31 19.74 19.7C19.35 20.09 18.72 20.09 18.33 19.7Z" }), React__default['default'].createElement("path", { d: "M20 11.95V11.94C20 11.39 20.44 10.95 20.99 10.95H22C22.55 10.95 22.99 11.39 22.99 11.94V11.95C22.99 12.5 22.55 12.94 22 12.94H20.99C20.44 12.94 20 12.5 20 11.95Z" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 11.95C6 8.64 8.69 5.95 12 5.95C15.31 5.95 18 8.64 18 11.95C18 15.26 15.31 17.95 12 17.95C8.69 17.95 6 15.26 6 11.95ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" }), React__default['default'].createElement("path", { d: "M12 22.9H11.99C11.44 22.9 11 22.46 11 21.91V20.95C11 20.4 11.44 19.96 11.99 19.96H12C12.55 19.96 12.99 20.4 12.99 20.95V21.91C12.99 22.46 12.55 22.9 12 22.9Z" }), React__default['default'].createElement("path", { d: "M5.66 19.69C5.27 20.08 4.64 20.08 4.25 19.69C3.86 19.3 3.86 18.68 4.24 18.28L4.63 17.89C5.02 17.5 5.65 17.5 6.04 17.89L6.05 17.9C6.43 18.28 6.44 18.91 6.05 19.3L5.66 19.69Z" }))); }; var Icon$c = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M12 3C7.02985 3 3 7.02985 3 11.9904C3 16.9606 7.02985 21 12 21C16.9701 21 21 16.9606 21 11.9904C21 7.02985 16.9701 3 12 3ZM16.4328 8.65139C16.3753 9.48614 14.8305 15.7228 14.8305 15.7228C14.8305 15.7228 14.7345 16.0874 14.3987 16.097C14.2836 16.097 14.1301 16.0874 13.9574 15.9243C13.6023 15.6269 12.7964 15.0512 12.0384 14.5235C12.0096 14.5522 11.9808 14.581 11.9424 14.6098C11.7697 14.7633 11.5107 14.984 11.2324 15.2527C11.1269 15.3486 11.0117 15.4542 10.8966 15.5693L10.887 15.5789C10.8198 15.6461 10.7623 15.694 10.7143 15.7324C10.3401 16.0394 10.3017 15.7804 10.3017 15.6461L10.5032 13.4488V13.4296L10.5128 13.4104C10.5224 13.3817 10.5416 13.3721 10.5416 13.3721C10.5416 13.3721 14.4659 9.87953 14.5714 9.50533C14.581 9.48614 14.5522 9.46695 14.5043 9.48614C14.2452 9.57249 9.72601 12.4318 9.22708 12.7484C9.19829 12.7676 9.11194 12.758 9.11194 12.758L6.91471 12.0384C6.91471 12.0384 6.65565 11.9328 6.742 11.693C6.76119 11.645 6.78998 11.597 6.89552 11.5299C7.38486 11.1844 15.8955 8.12367 15.8955 8.12367C15.8955 8.12367 16.1354 8.04691 16.2793 8.09488C16.3465 8.12367 16.3849 8.15245 16.4232 8.2484C16.4328 8.28678 16.4424 8.36354 16.4424 8.44989C16.4424 8.49787 16.4328 8.55544 16.4328 8.65139Z" }))); }; var Icon$b = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.3137 3L15.2631 3.94934C14.5597 5.19866 14.7398 6.81097 15.8032 7.87441C16.8667 8.93786 18.479 9.11792 19.7283 8.4146L20.6777 9.36396L17.6569 12.3848L17.1287 11.8566C16.7382 11.4661 16.105 11.4661 15.7145 11.8566C15.3239 12.2471 15.3239 12.8803 15.7145 13.2708L16.2426 13.799L9.36396 20.6777L8.49923 19.8129C9.71921 18.5286 9.69924 16.4983 8.43932 15.2384C7.1794 13.9784 5.14908 13.9585 3.86473 15.1784L3 14.3137L9.87868 7.43503L10.2145 7.77081C10.605 8.16134 11.2382 8.16134 11.6287 7.77081C12.0192 7.38029 12.0192 6.74713 11.6287 6.3566L11.2929 6.02081L14.3137 3ZM12.8995 1.58579C13.6805 0.804738 14.9469 0.804738 15.7279 1.58579L17.299 3.15684C17.6895 3.54736 17.6895 4.18053 17.299 4.57105L17.2175 4.65257C16.7183 5.15173 16.7183 5.96103 17.2175 6.4602C17.7166 6.95936 18.5259 6.95936 19.0251 6.4602L19.1066 6.37868C19.4971 5.98816 20.1303 5.98816 20.5208 6.37868L22.0919 7.94975C22.8729 8.7308 22.8729 9.99713 22.0919 10.7782L10.7782 22.0919C9.99713 22.8729 8.7308 22.8729 7.94975 22.0919L6.37869 20.5208C5.98817 20.1303 5.98817 19.4971 6.37869 19.1066L7.02511 18.4602C7.52427 17.961 7.52427 17.1517 7.02511 16.6526C6.52594 16.1534 5.71664 16.1534 5.21748 16.6526L4.57106 17.299C4.18054 17.6895 3.54737 17.6895 3.15685 17.299L1.58579 15.7279C0.804738 14.9469 0.804738 13.6805 1.58579 12.8995L12.8995 1.58579ZM13.8787 8.6066C13.4882 8.21608 12.855 8.21608 12.4645 8.6066C12.0739 8.99712 12.0739 9.63029 12.4645 10.0208L13.4645 11.0208C13.855 11.4113 14.4882 11.4113 14.8787 11.0208C15.2692 10.6303 15.2692 9.99713 14.8787 9.6066L13.8787 8.6066Z" }))); }; var Icon$a = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.86 4.86003L21.65 7.65003C21.84 7.84003 21.84 8.16003 21.64 8.35003L18.85 11.14C18.54 11.46 18 11.24 18 10.79V9.00003H4C3.45 9.00003 3 8.55003 3 8.00003C3 7.45003 3.45 7.00003 4 7.00003H18V5.21003C18 4.76003 18.54 4.54003 18.86 4.86003ZM5.14001 19.14L2.35001 16.35C2.16001 16.16 2.16001 15.84 2.36001 15.65L5.15001 12.86C5.46001 12.54 6.00001 12.76 6.00001 13.21V15H20C20.55 15 21 15.45 21 16C21 16.55 20.55 17 20 17H6.00001V18.79C6.00001 19.24 5.46001 19.46 5.14001 19.14Z" }))); }; var Icon$9 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 24 24" }, props), React__default['default'].createElement("path", { d: "M8.65854 19C15.4488 19 19.1659 13.2338 19.1659 8.23717C19.1659 8.07728 19.1659 7.91739 19.1561 7.7475C19.878 7.21785 20.5024 6.5483 21 5.78881C20.3366 6.08861 19.6244 6.28847 18.8732 6.38841C19.6341 5.91872 20.2195 5.17921 20.5024 4.28981C19.7902 4.72951 19 5.03931 18.1512 5.20919C17.478 4.45969 16.522 4 15.4585 4C13.4195 4 11.761 5.69887 11.761 7.78747C11.761 8.08728 11.8 8.36709 11.8585 8.6469C8.79512 8.497 6.07317 6.97801 4.24878 4.68954C3.92683 5.25916 3.75122 5.90873 3.75122 6.59827C3.75122 7.90739 4.40488 9.06662 5.39024 9.74617C4.78537 9.72618 4.21951 9.5563 3.72195 9.27648C3.72195 9.28648 3.72195 9.30646 3.72195 9.32645C3.72195 11.1552 5 12.6942 6.67805 13.034C6.36585 13.1239 6.0439 13.1639 5.70244 13.1639C5.46829 13.1639 5.23415 13.1439 5.00976 13.0939C5.47805 14.6029 6.8439 15.6922 8.46341 15.7222C7.19512 16.7415 5.60488 17.3411 3.87805 17.3411C3.58537 17.3411 3.28293 17.3311 3 17.2911C4.62927 18.3704 6.57073 19 8.65854 19Z" }))); }; var Icon$8 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "-60 -30 600 600" }, props), React__default['default'].createElement("g", { id: "surface1" }, React__default['default'].createElement("path", { d: "M 217.996094 158.457031 C 164.203125 158.457031 120.441406 202.21875 120.441406 256.007812 C 120.441406 309.800781 164.203125 353.5625 217.996094 353.5625 C 271.785156 353.5625 315.546875 309.800781 315.546875 256.007812 C 315.546875 202.21875 271.785156 158.457031 217.996094 158.457031 Z M 275.914062 237.636719 L 206.027344 307.523438 C 203.09375 310.457031 199.246094 311.925781 195.402344 311.925781 C 191.558594 311.925781 187.714844 310.460938 184.78125 307.523438 L 158.074219 280.816406 C 152.207031 274.953125 152.207031 265.441406 158.074219 259.574219 C 163.9375 253.707031 173.449219 253.707031 179.316406 259.574219 L 195.402344 275.660156 L 254.671875 216.394531 C 260.535156 210.527344 270.046875 210.527344 275.914062 216.394531 C 281.78125 222.257812 281.78125 231.769531 275.914062 237.636719 Z M 275.914062 237.636719 " }), React__default['default'].createElement("path", { d: "M 435.488281 138.917969 L 435.472656 138.519531 C 435.25 133.601562 435.101562 128.398438 435.011719 122.609375 C 434.59375 94.378906 412.152344 71.027344 383.917969 69.449219 C 325.050781 66.164062 279.511719 46.96875 240.601562 9.042969 L 240.269531 8.726562 C 227.578125 -2.910156 208.433594 -2.910156 195.738281 8.726562 L 195.40625 9.042969 C 156.496094 46.96875 110.957031 66.164062 52.089844 69.453125 C 23.859375 71.027344 1.414062 94.378906 0.996094 122.613281 C 0.910156 128.363281 0.757812 133.566406 0.535156 138.519531 L 0.511719 139.445312 C -0.632812 199.472656 -2.054688 274.179688 22.9375 341.988281 C 36.679688 379.277344 57.492188 411.691406 84.792969 438.335938 C 115.886719 468.679688 156.613281 492.769531 205.839844 509.933594 C 207.441406 510.492188 209.105469 510.945312 210.800781 511.285156 C 213.191406 511.761719 215.597656 512 218.003906 512 C 220.410156 512 222.820312 511.761719 225.207031 511.285156 C 226.902344 510.945312 228.578125 510.488281 230.1875 509.925781 C 279.355469 492.730469 320.039062 468.628906 351.105469 438.289062 C 378.394531 411.636719 399.207031 379.214844 412.960938 341.917969 C 438.046875 273.90625 436.628906 199.058594 435.488281 138.917969 Z M 217.996094 383.605469 C 147.636719 383.605469 90.398438 326.367188 90.398438 256.007812 C 90.398438 185.648438 147.636719 128.410156 217.996094 128.410156 C 288.351562 128.410156 345.59375 185.648438 345.59375 256.007812 C 345.59375 326.367188 288.351562 383.605469 217.996094 383.605469 Z M 217.996094 383.605469 " })))); }; var Icon$7 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 502.436 502.436" }, props), React__default['default'].createElement("g", null, React__default['default'].createElement("path", { d: "M402.481,300.41c0.033-0.051,0.068-0.098,0.102-0.148C402.86,299.793,402.459,300.432,402.481,300.41z" }), React__default['default'].createElement("path", { d: "M402.581,199.504c-0.029-0.055-0.062-0.105-0.094-0.16c0.064,0.113,0.143,0.254,0.201,0.359\r\n\t\t\tC402.651,199.637,402.616,199.571,402.581,199.504z" }), React__default['default'].createElement("path", { d: "M406.079,55.139C406.471,54.674,405.678,55.6,406.079,55.139L406.079,55.139z" }), React__default['default'].createElement("g", null, React__default['default'].createElement("path", { d: "M292.844,383.368C293.102,383.25,293.04,383.279,292.844,383.368L292.844,383.368z" }), React__default['default'].createElement("path", { d: "M465.85,19.072c-1.174-2.404-2.348-4.809-3.521-7.215c-3.99,2.063-7.865,4.352-11.678,6.723\r\n\t\t\t\tc-2.168,1.35-4.312,2.74-6.438,4.156l-2.803,1.896c-0.859-1.303-1.721-2.605-2.578-3.91l2.768-1.709\r\n\t\t\t\tc2.293-1.393,4.604-2.76,6.939-4.078c3.986-2.254,8.037-4.42,12.189-6.348c-0.797-1.635-1.596-3.27-2.395-4.904\r\n\t\t\t\tc-0.473-0.971-0.945-1.939-1.42-2.908c-0.367-0.752-0.23-0.936-1.041-0.643c-7.271,2.625-14.391,5.65-21.355,8.998\r\n\t\t\t\tc-16.805,8.078-33.145,17.945-47.258,30.191c-14.646,12.707-27.654,27.381-36.574,44.721\r\n\t\t\t\tc-8.943,17.389-13.643,36.518-13.912,56.063c-0.133,9.852,1.146,19.521,2.941,29.184c1.818,9.791,5.121,19.123,8.516,28.455\r\n\t\t\t\tc2.318,6.732,5.961,12.953,8.506,19.604c1.656,4.328,2.861,8.682,3.896,13.186c0.953,4.148,1.133,8.771,0.643,12.994\r\n\t\t\t\tc-0.48,4.143-1.887,7.734-3.979,11.306c-2.197,3.748-5.549,6.987-8.752,9.877c-3.389,3.059-7.027,5.823-10.812,8.371\r\n\t\t\t\tc-16.141,10.856-34.52,18.27-52.9,24.368c-0.593,0.197-1.188,0.379-1.781,0.572l-37.776,77.905\r\n\t\t\t\tc0.518-0.172,1.038-0.334,1.556-0.508c9.101-3.029,18.152-6.215,27.103-9.67c3.841-1.482,7.658-3.014,11.472-4.568\r\n\t\t\t\tc0.313-0.129,1.05-0.448,1.05-0.448s0.495,1.215,0.717,1.715c1.938,4.396,3.873,8.787,5.812,13.183\r\n\t\t\t\tc0.8,1.813,1.601,3.629,2.399,5.44c0.138,0.313,0.274,0.629,0.414,0.94c0.006,0.017-2.73,1.261-3.295,1.517\r\n\t\t\t\tc0.129-0.06,0.25-0.114,0.346-0.159c-0.1,0.047-0.235,0.108-0.444,0.204c-15.015,6.884-30.364,13.048-45.89,18.673\r\n\t\t\t\tc-5.586,2.023-11.205,3.959-16.837,5.852l-45.024,92.852c6.834-2.465,13.628-5.039,20.391-7.648\r\n\t\t\t\tc18.019-6.959,35.824-14.482,53.357-22.588c35.633-16.473,70.357-35.328,102.297-58.234\r\n\t\t\t\tc30.525-22.016,59.324-48.219,78.301-81.114c9.527-16.517,16.473-34.782,19.074-53.728c2.66-19.358,0.836-39.19-5.188-57.772\r\n\t\t\t\tc-3.971-12.25-9.643-24.102-16.756-34.852c-3.158-4.773-6.484-9.369-9.947-13.92c-1.967-2.58-4.131-5.012-6.264-7.455\r\n\t\t\t\tc-3.205-3.674-5.84-7.859-8.459-11.953c-4.441-6.939-7.707-14.865-9.32-22.945c-1.992-9.973-1.287-19.959,1.338-29.74\r\n\t\t\t\tc5.035-18.758,16.883-35.439,29.934-49.518c8.021-8.656,16.82-16.625,26.174-23.818c1.865-1.436,3.756-2.84,5.676-4.199\r\n\t\t\t\tC466.758,20.401,466.6,20.608,465.85,19.072z M403.092,299.358c0,0-0.201,0.381-0.51,0.903c-0.072,0.109-0.096,0.144-0.102,0.148\r\n\t\t\t\tc-8.385,12.725-18.254,23.93-29.76,33.943c-10.844,9.438-22.645,17.574-34.791,25.221c-3.59-6.113-7.18-12.229-10.77-18.344\r\n\t\t\t\tc15.223-8.717,30.031-18.301,42.879-30.336c6.33-5.932,11.947-12.385,17.027-19.408l1.197-1.566L403.092,299.358\r\n\t\t\t\t M402.489,199.344c-0.121-0.217-0.18-0.324,0.094,0.16c0.254,0.459,0.215,0.391,0.105,0.199\r\n\t\t\t\tc8.68,15.752,14.639,33.172,14.564,51.32c-5.246-0.1-10.494-0.201-15.74-0.301c0.66-13.469-2.85-26.854-8.238-39.109\r\n\t\t\t\tc-2.982-6.785-6.766-13.166-10.443-19.588c-3.178-5.543-5.941-11.195-8.627-16.988c2.039-0.92,4.078-1.84,6.117-2.758\r\n\t\t\t\tc1.311-0.59,4.99-2.266,4.99-2.266l0.332,0.695c2.414,4.66,4.896,9.178,7.66,13.639\r\n\t\t\t\tC396.393,189.333,399.608,194.237,402.489,199.344z M406.079,55.139c-9.127,10.514-17.299,21.643-23.01,34.42\r\n\t\t\t\tc-5.342,11.959-8.377,24.941-8.166,38.061c-3.402-0.049-6.807-0.098-10.211-0.146c0.506-17.471,6.057-34.4,14.984-49.367\r\n\t\t\t\tc4.535-7.607,9.904-14.607,15.695-21.293c1.395-1.611,2.891-3.137,4.355-4.684c0.527-0.555,2.143-2.352,2.143-2.352\r\n\t\t\t\ts3.311,3.207,4.785,4.619c0.02,0.018,0.035,0.035,0.055,0.053C406.489,54.67,406.28,54.901,406.079,55.139z" })), React__default['default'].createElement("path", { d: "M291.195,210.11c0-70.35-57.233-127.584-127.583-127.584C93.263,82.526,36.03,139.76,36.03,210.11\r\n\t\t\tc0,20.615,4.921,40.1,13.64,57.353l113.942,234.973l113.96-235.01C286.28,250.182,291.195,230.709,291.195,210.11z\r\n\t\t\t M163.612,280.711c-38.931,0-70.604-31.671-70.604-70.602c0-38.932,31.674-70.605,70.604-70.605s70.604,31.674,70.604,70.605\r\n\t\t\tC234.215,249.04,202.542,280.711,163.612,280.711z" })))); }; var IconModule = /*#__PURE__*/Object.freeze({ __proto__: null, FarmIcon: Icon$p, GroupsIcon: Icon$o, HamburgerIcon: Icon$n, HamburgerCloseIcon: Icon$m, HomeIcon: Icon$l, IfoIcon: Icon$k, InfoIcon: Icon$j, LanguageIcon: Icon$i, LogoIcon: Logo, MoonIcon: Icon$h, MoreIcon: Icon$g, NftIcon: Icon$f, PoolIcon: Icon$e, SunIcon: Icon$d, TelegramIcon: Icon$c, TicketIcon: Icon$b, TradeIcon: Icon$a, TwitterIcon: Icon$9, AuditIcon: Icon$8, RoadmapIcon: Icon$7 }); var MenuButton = styled__default['default'](Button)(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n color: ", ";\n padding: 0 8px;\n border-radius: 8px;\n"], ["\n color: ", ";\n padding: 0 8px;\n border-radius: 8px;\n"])), function (_a) { var theme = _a.theme; return theme.colors.text; }); MenuButton.defaultProps = { variant: "text", size: "sm", }; var templateObject_1$d; var StyledLink = styled__default['default'](reactRouterDom.Link)(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n display: flex;\n align-items: center;\n .mobile-icon {\n width: 32px;\n ", " {\n display: none;\n }\n }\n .desktop-icon {\n width: 32px; // update with new banner\n display: none;\n ", " {\n display: block;\n }\n }\n"], ["\n display: flex;\n align-items: center;\n .mobile-icon {\n width: 32px;\n ", " {\n display: none;\n }\n }\n .desktop-icon {\n width: 32px; // update with new banner\n display: none;\n ", " {\n display: block;\n }\n }\n"])), function (_a) { var theme = _a.theme; return theme.mediaQueries.nav; }, function (_a) { var theme = _a.theme; return theme.mediaQueries.nav; }); var Logo = function (_a) { var isPushed = _a.isPushed, togglePush = _a.togglePush, isDark = _a.isDark, href = _a.href, banner = _a.banner; var isAbsoluteUrl = href.startsWith("http"); if (isDark) { banner = 'https://gateway.pinata.cloud/ipfs/QmNojyJuGg7dZM9LVXVpGRF3gM3amCsEz559ha8HQnUN63'; } else { banner = 'https://gateway.pinata.cloud/ipfs/QmNojyJuGg7dZM9LVXVpGRF3gM3amCsEz559ha8HQnUN63'; } return (React__default['default'].createElement(Flex, null, React__default['default'].createElement(MenuButton, { "aria-label": "Toggle menu", onClick: togglePush, mr: "24px" }, isPushed ? (React__default['default'].createElement(Icon$m, { width: "24px", color: "textSubtle" })) : (React__default['default'].createElement(Icon$n, { width: "24px", color: "textSubtle" }))), isAbsoluteUrl ? (React__default['default'].createElement(StyledLink, { as: "a", href: href, "aria-label": "Trunks Inu home page" }, React__default['default'].createElement("img", { src: "https://gateway.pinata.cloud/ipfs/QmNojyJuGg7dZM9LVXVpGRF3gM3amCsEz559ha8HQnUN63", alt: "Trunks Inu Logo", className: "mobile-icon" }), React__default['default'].createElement("img", { src: banner, alt: "Trunks Inu Logo", className: "desktop-icon" }))) : (React__default['default'].createElement(StyledLink, { to: href, "aria-label": "Knights DeFi home page" }, React__default['default'].createElement("img", { src: "https://gateway.pinata.cloud/ipfs/QmNojyJuGg7dZM9LVXVpGRF3gM3amCsEz559ha8HQnUN63", alt: "FesBNB Logo", className: "mobile-icon" }), React__default['default'].createElement("img", { src: banner, alt: "Trunks Inu Logo", className: "desktop-icon" }))))); }; var templateObject_1$c; var links = [ { label: "Home", icon: "HomeIcon", href: "/", }, { label: "Trade", icon: "TradeIcon", items: [ { label: "Exchange", href: "https://exchange.pancakeswap.finance", }, { label: "Liquidity", href: "https://exchange.pancakeswap.finance/#/pool", }, ], }, { label: "Farms", icon: "FarmIcon", href: "/farms", }, { label: "Pools", icon: "PoolIcon", href: "/syrup", }, { label: "Lottery", icon: "TicketIcon", href: "/lottery", }, { label: "NFT", icon: "NftIcon", href: "/nft", }, { label: "Profile & Teams", icon: "GroupsIcon", items: [ { label: "Leaderboard", href: "/teams", }, { label: "YourProfile", href: "/", }, ], calloutClass: "rainbow", }, { label: "Info", icon: "InfoIcon", items: [ { label: "Overview", href: "https://pancakeswap.info", }, { label: "Tokens", href: "https://pancakeswap.info/tokens", }, { label: "Pairs", href: "https://pancakeswap.info/pairs", }, { label: "Accounts", href: "https://pancakeswap.info/accounts", }, ], }, { label: "IFO", icon: "IfoIcon", items: [ { label: "Next", href: "/ifo", }, { label: "History", href: "/ifo/history", }, ], }, { label: "More", icon: "MoreIcon", items: [ { label: "Voting", href: "https://voting.pancakeswap.finance", }, { label: "Github", href: "https://github.com/pancakeswap", }, { label: "Docs", href: "https://docs.pancakeswap.finance", }, { label: "Blog", href: "https://pancakeswap.medium.com", }, ], }, ]; var socials = [ { label: "Telegram", icon: "TelegramIcon", items: [ { label: "English", href: "https://t.me/TrunksInuOfficial", }, ], }, { label: "Twitter", icon: "TwitterIcon", href: "https://twitter.com/inutrunks", }, ]; var MENU_HEIGHT = 64; var MENU_ENTRY_HEIGHT = 48; var SIDEBAR_WIDTH_FULL = 240; var SIDEBAR_WIDTH_REDUCED = 56; var rainbowAnimation = styled.keyframes(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n 0%,\n 100% {\n background-position: 0 0;\n }\n 50% {\n background-position: 100% 0;\n }\n"], ["\n 0%,\n 100% {\n background-position: 0 0;\n }\n 50% {\n background-position: 100% 0;\n }\n"]))); var LinkLabel = styled__default['default'].div(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n color: ", ";\n transition: color 0.4s;\n flex-grow: 1;\n"], ["\n color: ", ";\n transition: color 0.4s;\n flex-grow: 1;\n"])), function (_a) { var isPushed = _a.isPushed, theme = _a.theme; return (isPushed ? theme.colors.textSubtle : "transparent"); }); var MenuEntry = styled__default['default'].div(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n cursor: pointer;\n display: flex;\n align-items: center;\n height: ", "px;\n padding: ", ";\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n a {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n\n svg {\n fill: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n // Safari fix\n flex-shrink: 0;\n\n &.rainbow {\n background-clip: text;\n animation: ", " 3s ease-in-out infinite;\n background: ", ";\n background-size: 400% 100%;\n }\n"], ["\n cursor: pointer;\n display: flex;\n align-items: center;\n height: ", "px;\n padding: ", ";\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n a {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n\n svg {\n fill: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n // Safari fix\n flex-shrink: 0;\n\n &.rainbow {\n background-clip: text;\n animation: ", " 3s ease-in-out infinite;\n background: ", ";\n background-size: 400% 100%;\n }\n"])), MENU_ENTRY_HEIGHT, function (_a) { var secondary = _a.secondary; return (secondary ? "0 32px" : "0 16px"); }, function (_a) { var secondary = _a.secondary; return (secondary ? "14px" : "16px"); }, function (_a) { var secondary = _a.secondary, theme = _a.theme; return (secondary ? theme.colors.background : "transparent"); }, function (_a) { var theme = _a.theme; return theme.colors.textSubtle; }, function (_a) { var isActive = _a.isActive, theme = _a.theme; return (isActive ? "inset 4px 0px 0px " + theme.colors.primary : "none"); }, function (_a) { var theme = _a.theme; return theme.colors.textSubtle; }, function (_a) { var theme = _a.theme; return theme.colors.tertiary; }, rainbowAnimation, function (_a) { var theme = _a.theme; return theme.colors.gradients.bubblegum; }); MenuEntry.defaultProps = { secondary: false, isActive: false, role: "button", }; var LinkLabelMemo = React__default['default'].memo(LinkLabel, function (prev, next) { return prev.isPushed === next.isPushed; }); var templateObject_1$b, templateObject_2$5, templateObject_3$2; var Container$2 = styled__default['default'].div(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n // Safari fix\n flex-shrink: 0;\n"], ["\n display: flex;\n flex-direction: column;\n // Safari fix\n flex-shrink: 0;\n"]))); var AccordionContent = styled__default['default'].div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n max-height: ", ";\n transition: max-height 0.3s ease-out;\n overflow: hidden;\n border-color: ", ";\n border-style: solid;\n border-width: 1px 0;\n"], ["\n max-height: ", ";\n transition: max-height 0.3s ease-out;\n overflow: hidden;\n border-color: ", ";\n border-style: solid;\n border-width: 1px 0;\n"])), function (_a) { var isOpen = _a.isOpen, maxHeight = _a.maxHeight; return (isOpen ? maxHeight + "px" : 0); }, function (_a) { var isOpen = _a.isOpen, isPushed = _a.isPushed; return (isOpen && isPushed ? "rgba(133, 133, 133, 0.1)" : "transparent"); }); var Accordion = function (_a) { var label = _a.label, icon = _a.icon, isPushed = _a.isPushed, pushNav = _a.pushNav, _b = _a.initialOpenState, initialOpenState = _b === void 0 ? false : _b, children = _a.children, className = _a.className, isActive = _a.isActive; var _c = React.useState(initialOpenState), isOpen = _c[0], setIsOpen = _c[1]; var handleClick = function () { if (isPushed) { setIsOpen(function (prevState) { return !prevState; }); } else { pushNav(true); setIsOpen(true); } }; return (React__default['default'].createElement(Container$2, null, React__default['default'].createElement(MenuEntry, { onClick: handleClick, className: className, isActive: isActive }, icon, React__default['default'].createElement(LinkLabelMemo, { isPushed: isPushed }, label), isOpen ? React__default['default'].createElement(Icon$15, null) : React__default['default'].createElement(Icon$16, null)), React__default['default'].createElement(AccordionContent, { isOpen: isOpen, isPushed: isPushed, maxHeight: React__default['default'].Children.count(children) * MENU_ENTRY_HEIGHT }, children))); }; var Accordion$1 = React__default['default'].memo(Accordion, function (prev, next) { return prev.isPushed === next.isPushed; }); var templateObject_1$a, templateObject_2$4; var MenuLink = function (_a) { var href = _a.href, otherProps = __rest(_a, ["href"]); var isHttpLink = href === null || href === void 0 ? void 0 : href.startsWith("http"); // eslint-disable-next-line @typescript-eslint/no-explicit-any var Tag = isHttpLink ? "a" : reactRouterDom.NavLink; var props = isHttpLink ? { href: href } : { to: href }; return React__default['default'].createElement(Tag, __assign({}, props, otherProps)); }; var Icons$2 = IconModule; var Container$1 = styled__default['default'].div(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n height: 100%;\n"]))); var PanelBody = function (_a) { var isPushed = _a.isPushed, pushNav = _a.pushNav, isMobile = _a.isMobile, links = _a.links; var location = reactRouterDom.useLocation(); // Close the menu when a user clicks a link on mobile var handleClick = isMobile ? function () { return pushNav(false); } : undefined; return (React__default['default'].createElement(Container$1, null, links.map(function (entry) { var Icon = Icons$2[entry.icon]; var iconElement = React__default['default'].createElement(Icon, { width: "24px", mr: "8px" }); var calloutClass = entry.calloutClass ? entry.calloutClass : undefined; if (entry.items) { var itemsMatchIndex = entry.items.findIndex(function (item) { return item.href === location.pathname; }); var initialOpenState = entry.initialOpenState === true ? entry.initialOpenState : itemsMatchIndex >= 0; return (React__default['default'].createElement(Accordion$1, { key: entry.label, isPushed: isPushed, pushNav: pushNav, icon: iconElement, label: entry.label, initialOpenState: initialOpenState, className: calloutClass, isActive: entry.items.some(function (item) { return item.href === location.pathname; }) }, isPushed && entry.items.map(function (item) { return (React__default['default'].createElement(MenuEntry, { key: item.href, secondary: true, isActive: item.href === location.pathname, onClick: handleClick }, React__default['default'].createElement(MenuLink, { href: item.href }, item.label))); }))); } return (React__default['default'].createElement(MenuEntry, { key: entry.label, isActive: entry.href === location.pathname, className: calloutClass }, React__default['default'].createElement(MenuLink, { href: entry.href, onClick: handleClick }, iconElement, React__default['default'].createElement(LinkLabelMemo, { isPushed: isPushed }, entry.label)))); }))); }; var templateObject_1$9; var Icons$1 = IconModule; var MoonIcon = Icons$1.MoonIcon, SunIcon = Icons$1.SunIcon; var ThemeSwitcher = function (_a) { var isDark = _a.isDark, toggleTheme = _a.toggleTheme; return (React__default['default'].createElement(Button, { variant: "text", onClick: function () { return toggleTheme(!isDark); } }, React__default['default'].createElement(Flex$1, { alignItems: "center" }, React__default['default'].createElement(SunIcon, { color: isDark ? "textDisabled" : "text", width: "24px" }), React__default['default'].createElement(Text, { color: "textDisabled", mx: "4px" }, "/"), React__default['default'].createElement(MoonIcon, { color: isDark ? "text" : "textDisabled", width: "24px" })))); }; var ThemeSwitcher$1 = React__default['default'].memo(ThemeSwitcher, function (prev, next) { return prev.isDark === next.isDark; }); var Icons = IconModule; var SocialLinks = function () { return (React__default['default'].createElement(Flex$1, null, socials.map(function (social, index) { var Icon = Icons[social.icon]; var iconProps = { width: "24px", color: "textSubtle", style: { cursor: "pointer" } }; var mr = index < socials.length - 1 ? "24px" : 0; if (social.items) { return (React__default['default'].createElement(Dropdown, { key: social.label, position: "top", target: React__default['default'].createElement(Icon, __assign({}, iconProps, { mr: mr })) }, social.items.map(function (item) { return (React__default['default'].createElement(Link, { external: true, key: item.label, href: item.href, "aria-label": item.label, color: "textSubtle" }, item.label)); }))); } return (React__default['default'].createElement(Link, { external: true, key: social.label, href: social.href, "aria-label": social.label, mr: mr }, React__default['default'].createElement(Icon, __assign({}, iconProps)))); }))); }; var SocialLinks$1 = React__default['default'].memo(SocialLinks, function () { return true; }); var Container = styled__default['default'].div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n flex: none;\n padding: 8px 4px;\n background-color: ", ";\n border-top: solid 2px rgba(133, 133, 133, 0.1);\n"], ["\n flex: none;\n padding: 8px 4px;\n background-color: ", ";\n border-top: solid 2px rgba(133, 133, 133, 0.1);\n"])), function (_a) { var theme = _a.theme; return theme.nav.background; }); var PriceLink = styled__default['default'].a(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n svg {\n transition: transform 0.3s;\n }\n :hover {\n svg {\n transform: scale(1.2);\n }\n }\n"], ["\n display: flex;\n align-items: center;\n svg {\n transition: transform 0.3s;\n }\n :hover {\n svg {\n transform: scale(1.2);\n }\n }\n"]))); var SettingsEntry = styled__default['default'].div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: ", "px;\n padding: 0 8px;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: ", "px;\n padding: 0 8px;\n"])), MENU_ENTRY_HEIGHT); var SocialEntry = styled__default['default'].div(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 36px;\n padding: 0 8px;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 36px;\n padding: 0 8px;\n"]))); var PanelFooter = function (_a) { var isPushed = _a.isPushed, pushNav = _a.pushNav, toggleTheme = _a.toggleTheme, isDark = _a.isDark, cakePriceUsd = _a.cakePriceUsd; _a.tablePriceUsd; _a.legendPriceUsd; _a.squirePriceUsd; _a.shillingPriceUsd; _a.currentLang; _a.langs; _a.setLang; if (!isPushed) { return (React__default['default'].createElement(Container, null, React__default['default'].createElement(IconButton, { variant: "text", onClick: function () { return pushNav(true); } }, React__default['default'].createElement(Icon$T, null)))); } return (React__default['default'].createElement(Container, null, React__default['default'].createElement(SocialEntry, null, cakePriceUsd ? (React__default['default'].createElement(PriceLink, { href: "https://pancakeswap.info/token/0x8371a55dBEE669f16bD9e6137e2cE39ee87aE8e2", target: "_blank" }, React__default['default'].createElement("img", { src: "https://gateway.pinata.cloud/ipfs/QmNojyJuGg7dZM9LVXVpGRF3gM3amCsEz559ha8HQnUN63", alt: "Trunks Inu Logo", style: { width: "24px", marginRight: "8px", } }), React__default['default'].createElement(Text, { color: "textSubtle", bold: true }, "$" + cakePriceUsd.toFixed(4)))) : (React__default['default'].createElement(Skeleton, { width: 80, height: 24 }, React__default['default'].createElement("img", { src: "https://gateway.pinata.cloud/ipfs/QmNojyJuGg7dZM9LVXVpGRF3gM3amCsEz559ha8HQnUN63", alt: "Trunks Inu Logo", style: { width: "24px", marginRight: "8px", } })))), React__default['default'].createElement(SettingsEntry, null, React__default['default'].createElement(SocialLinks$1, null), React__default['default'].createElement(ThemeSwitcher$1, { isDark: isDark, toggleTheme: toggleTheme })))); }; var templateObject_1$8, templateObject_2$3, templateObject_3$1, templateObject_4$1; var StyledPanel = styled__default['default'].div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n position: fixed;\n padding-top: ", ";\n top: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-shrink: 0;\n background-color: ", ";\n width: ", ";\n height: 100vh;\n transition: padding-top 0.2s, width 0.2s;\n border-right: ", ";\n z-index: 11;\n overflow: ", ";\n transform: translate3d(0, 0, 0);\n\n ", " {\n border-right: 2px solid rgba(133, 133, 133, 0.1);\n width: ", ";\n }\n"], ["\n position: fixed;\n padding-top: ", ";\n top: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-shrink: 0;\n background-color: ", ";\n width: ", ";\n height: 100vh;\n transition: padding-top 0.2s, width 0.2s;\n border-right: ", ";\n z-index: 11;\n overflow: ", ";\n transform: translate3d(0, 0, 0);\n\n ", " {\n border-right: 2px solid rgba(133, 133, 133, 0.1);\n width: ", ";\n }\n"])), function (_a) { var showMenu = _a.showMenu; return (showMenu ? "80px" : 0); }, function (_a) { var theme = _a.theme; return theme.nav.background; }, function (_a) { var isPushed = _a.isPushed; return (isPushed ? SIDEBAR_WIDTH_FULL + "px" : 0); }, function (_a) { var isPushed = _a.isPushed; return (isPushed ? "2px solid rgba(133, 133, 133, 0.1)" : 0); }, function (_a) { var isPushed = _a.isPushed; return (isPushed ? "initial" : "hidden"); }, function (_a) { var theme = _a.theme; return theme.mediaQueries.nav; }, function (_a) { var isPushed = _a.isPushed; return (isPushed ? SIDEBAR_WIDTH_FULL : SIDEBAR_WIDTH_REDUCED) + "px"; }); var Panel = function (props) { var isPushed = props.isPushed, showMenu = props.showMenu; return (React__default['default'].createElement(StyledPanel, { isPushed: isPushed, showMenu: showMenu }, React__default['default'].createElement(PanelBody, __assign({}, props)), React__default['default'].createElement(PanelFooter, __assign({}, props)))); }; var templateObject_1$7; var Icon$6 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 96 96" }, props), React__default['default'].createElement("circle", { cx: "48", cy: "48", r: "48", fill: "white" }), React__default['default'].createElement("path", { d: "M77.7602 16.9155L51.9419 36.0497L56.7382 24.7733L77.7602 16.9155Z", fill: "#E17726" }), React__default['default'].createElement("path", { d: "M18.2656 16.9155L43.8288 36.2283L39.2622 24.7733L18.2656 16.9155Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M68.4736 61.2808L61.6108 71.7918L76.3059 75.8482L80.4899 61.5104L68.4736 61.2808Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M15.5356 61.5104L19.6941 75.8482L34.3892 71.7918L27.5519 61.2808L15.5356 61.5104Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M33.5984 43.5251L29.491 49.699L44.0584 50.3624L43.5482 34.6724L33.5984 43.5251Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M62.4274 43.525L52.2991 34.4937L51.9419 50.3622L66.5094 49.6989L62.4274 43.525Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M34.3892 71.7922L43.1654 67.5316L35.6137 61.6128L34.3892 71.7922Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M52.8345 67.5316L61.6107 71.7922L60.3861 61.6128L52.8345 67.5316Z", fill: "#E27625" }), React__default['default'].createElement("path", { d: "M61.6107 71.7923L52.8345 67.5317L53.5233 73.2465L53.4468 75.6446L61.6107 71.7923Z", fill: "#D5BFB2" }), React__default['default'].createElement("path", { d: "M34.3892 71.7923L42.5531 75.6446L42.502 73.2465L43.1654 67.5317L34.3892 71.7923Z", fill: "#D5BFB2" }), React__default['default'].createElement("path", { d: "M42.7062 57.8369L35.4097 55.6939L40.5631 53.3213L42.7062 57.8369Z", fill: "#233447" }), React__default['default'].createElement("path", { d: "M53.2937 57.8369L55.4367 53.3213L60.6412 55.6939L53.2937 57.8369Z", fill: "#233447" }), React__default['default'].createElement("path", { d: "M34.3893 71.7918L35.6649 61.2808L27.552 61.5104L34.3893 71.7918Z", fill: "#CC6228" }), React__default['default'].createElement("path", { d: "M60.3352 61.2808L61.6108 71.7918L68.4736 61.5104L60.3352 61.2808Z", fill: "#CC6228" }), React__default['default'].createElement("path", { d: "M66.5094 49.6987L51.9419 50.362L53.294 57.8371L55.4371 53.3215L60.6416 55.6941L66.5094 49.6987Z", fill: "#CC6228" }), React__default['default'].createElement("path", { d: "M35.4098 55.6941L40.5633 53.3215L42.7063 57.8371L44.0584 50.362L29.491 49.6987L35.4098 55.6941Z", fill: "#CC6228" }), React__default['default'].createElement("path", { d: "M29.491 49.6987L35.6139 61.6129L35.4098 55.6941L29.491 49.6987Z", fill: "#E27525" }), React__default['default'].createElement("path", { d: "M60.6414 55.6941L60.3862 61.6129L66.5092 49.6987L60.6414 55.6941Z", fill: "#E27525" }), React__default['default'].createElement("path", { d: "M44.0584 50.3618L42.7063 57.8369L44.4156 66.6641L44.7728 55.0305L44.0584 50.3618Z", fill: "#E27525" }), React__default['default'].createElement("path", { d: "M51.9415 50.3618L51.2527 55.005L51.5843 66.6641L53.2937 57.8369L51.9415 50.3618Z", fill: "#E27525" }), React__default['default'].createElement("path", { d: "M53.2938 57.8374L51.5845 66.6646L52.8346 67.532L60.3862 61.6132L60.6413 55.6943L53.2938 57.8374Z", fill: "#F5841F" }), React__default['default'].createElement("path", { d: "M35.4097 55.6943L35.6138 61.6132L43.1654 67.532L44.4155 66.6646L42.7062 57.8374L35.4097 55.6943Z", fill: "#F5841F" }), React__default['default'].createElement("path", { d: "M53.4468 75.6443L53.5233 73.2462L52.8855 72.6849H43.1143L42.502 73.2462L42.5531 75.6443L34.3892 71.792L37.2465 74.1391L43.0378 78.1445H52.962L58.7533 74.1391L61.6107 71.792L53.4468 75.6443Z", fill: "#C0AC9D" }), React__default['default'].createElement("path", { d: "M52.8346 67.5315L51.5845 66.6641H44.4156L43.1655 67.5315L42.5022 73.2462L43.1145 72.6849H52.8857L53.5235 73.2462L52.8346 67.5315Z", fill: "#161616" }), React__default['default'].createElement("path", { d: "M78.8314 37.2998L80.9999 26.7377L77.7599 16.9155L52.8345 35.4119L62.4271 43.5247L75.9485 47.4791L78.9335 43.984L77.6323 43.04L79.7243 41.1521L78.1426 39.902L80.2091 38.3458L78.8314 37.2998Z", fill: "#763E1A" }), React__default['default'].createElement("path", { d: "M15 26.7377L17.194 37.2998L15.7909 38.3458L17.8574 39.902L16.2756 41.1521L18.3676 43.04L17.0665 43.984L20.0514 47.4791L33.5984 43.5247L43.1655 35.4119L18.2656 16.9155L15 26.7377Z", fill: "#763E1A" }), React__default['default'].createElement("path", { d: "M75.9487 47.4793L62.4272 43.5249L66.5092 49.6989L60.3862 61.613L68.4736 61.511H80.4898L75.9487 47.4793Z", fill: "#F5841F" }), React__default['default'].createElement("path", { d: "M33.5983 43.5249L20.0513 47.4793L15.5356 61.511H27.5519L35.6137 61.613L29.4908 49.6989L33.5983 43.5249Z", fill: "#F5841F" }), React__default['default'].createElement("path", { d: "M51.9415 50.3617L52.8344 35.4115L56.7378 24.7729H39.262L43.1653 35.4115L44.0583 50.3617L44.3899 55.0559L44.4154 66.664H51.5843L51.6099 55.0559L51.9415 50.3617Z", fill: "#F5841F" }))); }; var Icon$5 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 96 96" }, props), React__default['default'].createElement("circle", { cx: "48", cy: "48", r: "48", fill: "white" }), React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M66.4573 43.7107C64.8919 42.1452 64.8919 39.6071 66.4573 38.0416C68.0228 36.4762 70.5609 36.4762 72.1264 38.0416C73.6918 39.6071 73.6918 42.1452 72.1264 43.7107C70.5609 45.2762 68.0228 45.2762 66.4573 43.7107ZM52.9933 57.1747C51.8192 56.0006 51.8192 54.097 52.9933 52.9229C54.1674 51.7488 56.071 51.7488 57.2451 52.9229C58.4192 54.097 58.4192 56.0006 57.2451 57.1747C56.071 58.3488 54.1674 58.3488 52.9933 57.1747ZM74.2523 50.0884C73.0782 48.9143 73.0782 47.0107 74.2523 45.8366C75.4263 44.6625 77.3299 44.6625 78.504 45.8366C79.6781 47.0107 79.6781 48.9143 78.504 50.0884C77.3299 51.2625 75.4263 51.2625 74.2523 50.0884ZM67.166 57.1747C65.9919 56.0006 65.9919 54.097 67.166 52.9229C68.34 51.7488 70.2436 51.7488 71.4177 52.9229C72.5918 54.097 72.5918 56.0006 71.4177 57.1747C70.2436 58.3488 68.34 58.3488 67.166 57.1747ZM82.0472 56.466C81.2645 55.6833 81.2645 54.4142 82.0472 53.6315C82.8299 52.8488 84.099 52.8488 84.8817 53.6315C85.6644 54.4142 85.6644 55.6833 84.8817 56.466C84.099 57.2488 82.8299 57.2488 82.0472 56.466ZM74.9609 63.5523C74.1782 62.7696 74.1782 61.5005 74.9609 60.7178C75.7436 59.9351 77.0127 59.9351 77.7954 60.7178C78.5781 61.5005 78.5781 62.7696 77.7954 63.5523C77.0127 64.3351 75.7436 64.3351 74.9609 63.5523ZM59.371 50.797C57.8056 49.2315 57.8056 46.6934 59.371 45.1279C60.9365 43.5625 63.4746 43.5625 65.0401 45.1279C66.6055 46.6934 66.6055 49.2315 65.0401 50.797C63.4746 52.3625 60.9365 52.3625 59.371 50.797ZM59.371 36.6244C57.8056 35.0589 57.8056 32.5208 59.371 30.9553C60.9365 29.3899 63.4746 29.3899 65.0401 30.9553C66.6055 32.5208 66.6055 35.0589 65.0401 36.6244C63.4746 38.1898 60.9365 38.1898 59.371 36.6244ZM52.2847 43.7107C50.7193 42.1452 50.7193 39.6071 52.2847 38.0416C53.8502 36.4762 56.3883 36.4762 57.9538 38.0416C59.5192 39.6071 59.5192 42.1452 57.9538 43.7107C56.3883 45.2762 53.8502 45.2762 52.2847 43.7107ZM38.0462 43.7107C36.4808 42.1452 36.4808 39.6071 38.0462 38.0416C39.6117 36.4762 42.1498 36.4762 43.7153 38.0416C45.2807 39.6071 45.2807 42.1452 43.7153 43.7107C42.1498 45.2762 39.6117 45.2762 38.0462 43.7107ZM24.5823 57.1747C23.4082 56.0006 23.4082 54.097 24.5823 52.9229C25.7564 51.7488 27.66 51.7488 28.8341 52.9229C30.0081 54.097 30.0081 56.0006 28.8341 57.1747C27.66 58.3488 25.7564 58.3488 24.5823 57.1747ZM45.8412 50.0884C44.6671 48.9143 44.6671 47.0107 45.8412 45.8366C47.0153 44.6625 48.9189 44.6625 50.093 45.8366C51.2671 47.0107 51.2671 48.9143 50.093 50.0884C48.9189 51.2625 47.0153 51.2625 45.8412 50.0884ZM38.7549 57.1747C37.5808 56.0006 37.5808 54.097 38.7549 52.9229C39.929 51.7488 41.8326 51.7488 43.0067 52.9229C44.1807 54.097 44.1807 56.0006 43.0067 57.1747C41.8326 58.3488 39.929 58.3488 38.7549 57.1747ZM11.1183 56.466C10.3356 55.6833 10.3356 54.4142 11.1183 53.6315C11.901 52.8488 13.1701 52.8488 13.9528 53.6315C14.7356 54.4142 14.7356 55.6833 13.9528 56.466C13.1701 57.2488 11.901 57.2488 11.1183 56.466ZM18.2046 63.5523C17.4219 62.7696 17.4219 61.5005 18.2046 60.7178C18.9873 59.9351 20.2564 59.9351 21.0391 60.7178C21.8219 61.5005 21.8219 62.7696 21.0391 63.5523C20.2564 64.3351 18.9873 64.3351 18.2046 63.5523ZM46.5498 63.5523C45.7671 62.7696 45.7671 61.5005 46.5498 60.7178C47.3325 59.9351 48.6016 59.9351 49.3843 60.7178C50.1671 61.5005 50.1671 62.7696 49.3843 63.5523C48.6016 64.3351 47.3325 64.3351 46.5498 63.5523ZM17.496 50.0884C16.3219 48.9143 16.3219 47.0107 17.496 45.8366C18.6701 44.6625 20.5737 44.6625 21.7478 45.8366C22.9218 47.0107 22.9218 48.9143 21.7478 50.0884C20.5737 51.2625 18.6701 51.2625 17.496 50.0884ZM30.9599 50.797C29.3945 49.2315 29.3945 46.6934 30.9599 45.1279C32.5254 43.5625 35.0635 43.5625 36.629 45.1279C38.1944 46.6934 38.1944 49.2315 36.629 50.797C35.0635 52.3625 32.5254 52.3625 30.9599 50.797ZM30.9599 36.6244C29.3945 35.0589 29.3945 32.5208 30.9599 30.9553C32.5254 29.3899 35.0635 29.3899 36.629 30.9553C38.1944 32.5208 38.1944 35.0589 36.629 36.6244C35.0635 38.1898 32.5254 38.1898 30.9599 36.6244ZM23.8736 43.7107C22.3082 42.1452 22.3082 39.6071 23.8736 38.0416C25.4391 36.4762 27.9772 36.4762 29.5427 38.0416C31.1081 39.6071 31.1081 42.1452 29.5427 43.7107C27.9772 45.2762 25.4391 45.2762 23.8736 43.7107Z", fill: "#1D222A" }))); }; var Icon$4 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 96 96" }, props), React__default['default'].createElement("circle", { cx: "48", cy: "48", r: "48", fill: "white" }), React__default['default'].createElement("path", { d: "M44.3288 35.3546V21.7134H19.0926C18.581 21.7134 18.24 22.0544 18.24 22.566V41.8342C18.24 42.3457 18.581 42.6867 19.0926 42.6867H28.8119V77.8129C28.8119 78.3244 29.153 78.6654 29.6645 78.6654H45.5224C46.0339 78.6654 46.375 78.3244 46.375 77.8129V35.3546H44.3288Z", fill: "#29AEFF" }), React__default['default'].createElement("path", { d: "M61.8919 17.2798H55.7534H39.2134C38.7019 17.2798 38.3608 17.6208 38.3608 18.1324V73.3792C38.3608 73.8908 38.7019 74.2318 39.2134 74.2318H55.0713C55.5829 74.2318 55.9239 73.8908 55.9239 73.3792V59.397H62.0624C73.6575 59.397 83.0358 50.0187 83.0358 38.4237C83.0358 26.6581 73.487 17.2798 61.8919 17.2798Z", fill: "#2761E7" }))); }; var Icon$3 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 96 96" }, props), React__default['default'].createElement("g", { clipPath: "url(#clip0)" }, React__default['default'].createElement("path", { d: "M48.0048 96.0097C74.5172 96.0097 96.0097 74.5172 96.0097 48.0048C96.0097 21.4925 74.5172 0 48.0048 0C21.4925 0 0 21.4925 0 48.0048C0 74.5172 21.4925 96.0097 48.0048 96.0097Z", fill: "#3375BB" }), React__default['default'].createElement("path", { d: "M48.0048 22.8922L49.3179 21.1833C48.9399 20.8928 48.4766 20.7354 48 20.7354C47.5233 20.7354 47.06 20.8928 46.682 21.1833L48.0048 22.8922ZM70.5783 29.5252H72.7313C72.7352 29.2396 72.6824 28.9561 72.576 28.6909C72.4696 28.4258 72.3118 28.1844 72.1116 27.9806C71.9114 27.7769 71.6729 27.6148 71.4097 27.5037C71.1465 27.3926 70.8639 27.3348 70.5783 27.3335V29.5252ZM48.0048 75.6377L46.8076 77.4335C47.1604 77.6697 47.5754 77.7958 48 77.7958C48.4245 77.7958 48.8395 77.6697 49.1924 77.4335L48.0048 75.6377ZM25.4506 29.5252V27.3625C25.165 27.3638 24.8824 27.4216 24.6192 27.5327C24.356 27.6437 24.1175 27.8058 23.9173 28.0096C23.7171 28.2134 23.5593 28.4548 23.4529 28.7199C23.3465 28.985 23.2937 29.2686 23.2976 29.5542L25.4506 29.5252ZM46.6917 24.5915C56.4626 32.1611 67.6528 31.6783 70.5879 31.6783V27.3625C67.5466 27.3625 57.8047 27.7487 49.3468 21.1833L46.6917 24.5915ZM68.4348 29.4866C68.2707 39.4892 67.8459 46.5471 67.0349 51.7704C66.2238 56.9938 65.1039 60.0448 63.6266 62.2268C62.1494 64.4089 60.257 65.8282 57.486 67.4792C54.715 69.1302 51.1716 70.9646 46.8076 73.8515L49.2406 77.4335C53.373 74.6818 56.8102 72.9246 59.7357 71.1771C62.6835 69.5717 65.2416 67.3367 67.228 64.6309C69.159 61.7344 70.4817 57.8724 71.3314 52.427C72.181 46.9815 72.6155 39.6534 72.7796 29.5542L68.4348 29.4866ZM49.2406 73.8515C44.9055 70.955 41.3718 69.1592 38.6201 67.4888C35.8684 65.8185 33.976 64.4861 32.4892 62.2268C31.0023 59.9676 29.7954 56.9648 28.9651 51.7704C28.1347 46.576 27.7678 39.4892 27.6037 29.4866L23.2976 29.5542C23.4617 39.6534 23.9058 47.0009 24.7458 52.427C25.5858 57.8531 26.8699 61.7151 28.8395 64.6309C30.8164 67.3382 33.3686 69.5739 36.3125 71.1771C39.2091 72.9246 42.6752 74.6818 46.8076 77.4335L49.2406 73.8515ZM25.4506 31.6783C28.3471 31.6783 39.547 32.1611 49.3179 24.5915L46.682 21.1833C38.2049 27.7487 28.463 27.3625 25.441 27.3625L25.4506 31.6783Z", fill: "white" })), React__default['default'].createElement("defs", null, React__default['default'].createElement("clipPath", { id: "clip0" }, React__default['default'].createElement("rect", { width: "96", height: "96", fill: "white" }))))); }; var Icon$2 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 96 96" }, props), React__default['default'].createElement("path", { d: "M96 48C96 21.4903 74.5097 0 48 0C21.4903 0 0 21.4903 0 48C0 74.5097 21.4903 96 48 96C74.5097 96 96 74.5097 96 48Z", fill: "#3389FB" }), React__default['default'].createElement("path", { d: "M29.6927 35.4245C39.8036 25.5252 56.1965 25.5252 66.3074 35.4245L67.5242 36.6159C68.0298 37.1109 68.0298 37.9134 67.5242 38.4084L63.3616 42.4839C63.1088 42.7314 62.699 42.7314 62.4462 42.4839L60.7717 40.8444C53.7181 33.9384 42.282 33.9384 35.2284 40.8444L33.4351 42.6002C33.1823 42.8477 32.7725 42.8477 32.5197 42.6002L28.3571 38.5247C27.8515 38.0297 27.8515 37.2272 28.3571 36.7322L29.6927 35.4245ZM74.9161 43.8532L78.6208 47.4805C79.1264 47.9755 79.1264 48.778 78.6208 49.2729L61.9159 65.6288C61.4103 66.1237 60.5907 66.1237 60.0851 65.6288C60.0851 65.6288 60.0851 65.6288 60.0851 65.6288L48.229 54.0206C48.1026 53.8968 47.8977 53.8968 47.7713 54.0206C47.7713 54.0206 47.7713 54.0206 47.7713 54.0206L35.9153 65.6288C35.4098 66.1237 34.5902 66.1237 34.0846 65.6288C34.0846 65.6288 34.0846 65.6288 34.0846 65.6288L17.3792 49.2727C16.8736 48.7778 16.8736 47.9753 17.3792 47.4803L21.0839 43.853C21.5895 43.3581 22.4091 43.3581 22.9146 43.853L34.771 55.4614C34.8974 55.5851 35.1023 55.5851 35.2287 55.4614C35.2287 55.4614 35.2287 55.4614 35.2287 55.4614L47.0844 43.853C47.59 43.358 48.4096 43.358 48.9152 43.853C48.9152 43.853 48.9152 43.853 48.9152 43.853L60.7715 55.4614C60.8979 55.5851 61.1028 55.5851 61.2292 55.4614L73.0854 43.8532C73.5909 43.3583 74.4105 43.3583 74.9161 43.8532Z", fill: "white" }))); }; var Icon$1 = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 32 32" }, props), React__default['default'].createElement("path", { d: "M24 0H8C3.58172 0 0 3.58172 0 8V24C0 28.4183 3.58172 32 8 32H24C28.4183 32 32 28.4183 32 24V8C32 3.58172 28.4183 0 24 0Z", fill: "#1E2026" }), React__default['default'].createElement("path", { d: "M16.2857 4L9.97035 7.6761L12.2922 9.03415L16.2857 6.7161L20.2792 9.03415L22.6011 7.6761L16.2857 4Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M20.2792 10.9541L22.6011 12.3122V15.0283L18.6075 17.3463V21.9824L16.2857 23.3405L13.9639 21.9824V17.3463L9.97035 15.0283V12.3122L12.2922 10.9541L16.2857 13.2722L20.2792 10.9541Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M22.6011 16.9483V19.6644L20.2792 21.0224V18.3063L22.6011 16.9483Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M20.2561 22.9424L24.2496 20.6244V15.9883L26.5714 14.6302V21.9824L20.2561 25.6585V22.9424Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M24.2496 11.3522L21.9278 9.99414L24.2496 8.63609L26.5714 9.99414V12.7102L24.2496 14.0683V11.3522Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M13.9639 26.642V23.9259L16.2857 25.2839L18.6075 23.9259V26.642L16.2857 28L13.9639 26.642Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M12.2922 21.0224L9.97035 19.6644V16.9483L12.2922 18.3063V21.0224Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M16.2857 11.3522L13.9639 9.99414L16.2857 8.63609L18.6075 9.99414L16.2857 11.3522Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M10.6437 9.99414L8.32183 11.3522V14.0683L6 12.7102V9.99414L8.32183 8.63609L10.6437 9.99414Z", fill: "#F0B90B" }), React__default['default'].createElement("path", { d: "M6 14.6302L8.32183 15.9883V20.6244L12.3154 22.9424V25.6585L6 21.9824V14.6302Z", fill: "#F0B90B" }))); }; var Icon = function (props) { return (React__default['default'].createElement(Svg, __assign({ viewBox: "0 0 96 96" }, props), React__default['default'].createElement("circle", { cx: "48", cy: "48", r: "48", fill: "#F5F5F5" }), React__default['default'].createElement("path", { d: "M56.5504425,41.9387033 L56.5504425,50.4659601 L47.3948342,50.4659601 L47.3948342,85.5971142 L45.0078131,84.7075452 C43.8992633,84.2955753 42.1136272,83.5937969 39.9052997,82.5918134 L38.8675775,82.1177881 L38.8675775,14.6817622 L47.9569067,11.8769231 L56.5504425,14.5267861 L56.5504425,23.7259307 L47.9569067,21.0669705 L47.3948342,21.2411155 L47.3948342,41.9387033 L56.5504425,41.9387033 Z M16,50.4659926 L16,21.7739797 L36.1702794,15.548296 L36.1702794,24.7052039 L24.526282,28.3200122 L24.526282,41.9387358 L36.1702794,41.9387358 L36.1702794,81.3806284 L33.591244,80.0543973 C25.5662786,75.923652 16,68.9585019 16,59.2339983 L16,54.6496962 L24.526282,54.6496962 L24.526282,59.2339983 C24.526282,61.2460878 25.5734263,63.3605199 27.6426978,65.5373324 L27.6426978,50.4659926 L16,50.4659926 Z M59.1389325,15.3302574 L79.8040306,21.7261873 L79.8040306,50.4659601 L67.6710627,50.4659601 L67.6710627,62.9111544 C67.6710627,62.9111544 64.9581695,66.4674811 59.1464051,69.4451657 C59.1464051,67.0682164 59.1389325,15.3302574 59.1389325,15.3302574 Z M71.2780734,41.9387033 L71.2780734,28.2783928 L67.6710627,27.1649695 L67.6710627,41.9387033 L71.2780734,41.9387033 Z M71.2780734,59.8661186 L71.2780734,54.6495662 L79.8040306,54.6495662 L79.8040306,59.8661186 C79.8040306,74.3588162 58.7760221,82.7005566 52.330058,84.9127828 L49.9859233,85.7230769 L49.9859233,76.7068496 L51.1311866,76.2744112 C61.1591444,72.5004032 71.2780734,65.962818 71.2780734,59.8661186 Z", fill: "#000000" }))); }; exports.ConnectorNames = void 0; (function (ConnectorNames) { ConnectorNames["Injected"] = "injected"; ConnectorNames["WalletConnect"] = "walletconnect"; ConnectorNames["BSC"] = "bsc"; })(exports.ConnectorNames || (exports.ConnectorNames = {})); var connectors = [ { title: "Metamask", icon: Icon$6, connectorId: exports.ConnectorNames.Injected, }, { title: "TrustWallet", icon: Icon$3, connectorId: exports.ConnectorNames.Injected, }, { title: "MathWallet", icon: Icon$5, connectorId: exports.ConnectorNames.Injected, }, { title: "TokenPocket", icon: Icon$4, connectorId: exports.ConnectorNames.Injected, }, { title: "WalletConnect", icon: Icon$2, connectorId: exports.ConnectorNames.WalletConnect, }, { title: "Binance Chain Wallet", icon: Icon$1, connectorId: exports.ConnectorNames.BSC, }, { title: "SafePal Wallet", icon: Icon, connectorId: exports.ConnectorNames.Injected, }, ]; var connectorLocalStorageKey = "connectorId"; var WalletCard = function (_a) { var login = _a.login, walletConfig = _a.walletConfig, onDismiss = _a.onDismiss, mb = _a.mb; var title = walletConfig.title, Icon = walletConfig.icon; return (React__default['default'].createElement(Button, { width: "100%", variant: "tertiary", onClick: function () { login(walletConfig.connectorId); window.localStorage.setItem(connectorLocalStorageKey, walletConfig.connectorId); onDismiss(); }, style: { justifyContent: "space-between" }, mb: mb, id: "wallet-connect-" + title.toLocaleLowerCase() }, React__default['default'].createElement(Text, { bold: true, color: "primary", mr: "16px" }, title), React__default['default'].createElement(Icon, { width: "32px" }))); }; var HelpLink = styled__default['default'](Link)(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n display: flex;\n align-self: center;\n align-items: center;\n margin-top: 24px;\n"], ["\n display: flex;\n align-self: center;\n align-items: center;\n margin-top: 24px;\n"]))); var ConnectModal = function (_a) { var login = _a.login, _b = _a.onDismiss, onDismiss = _b === void 0 ? function () { return null; } : _b; return (React__default['default'].createElement(Modal, { title: "Connect to a wallet", onDismiss: onDismiss }, connectors.map(function (entry, index) { return (React__default['default'].createElement(WalletCard, { key: entry.title, login: login, walletConfig: entry, onDismiss: onDismiss, mb: index < connectors.length - 1 ? "8px" : "0" })); }), React__default['default'].createElement(HelpLink, { href: "https://docs.pancakeswap.finance/guides/faq#how-do-i-set-up-my-wallet-on-binance-smart-chain", external: true }, React__default['default'].createElement(Icon$Q, { color: "primary", mr: "6px" }), "Learn how to connect"))); }; var templateObject_1$6; var StyleButton = styled__default['default'](Text).attrs({ role: "button" })(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n color: ", ";\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n color: ", ";\n"])), function (_a) { var theme = _a.theme; return theme.colors.primary; }); var Tooltip = styled__default['default'].div(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: ", ";\n position: absolute;\n bottom: -22px;\n right: 0;\n left: 0;\n text-align: center;\n background-color: ", ";\n color: ", ";\n border-radius: 16px;\n opacity: 0.7;\n"], ["\n display: ", ";\n position: absolute;\n bottom: -22px;\n right: 0;\n left: 0;\n text-align: center;\n background-color: ", ";\n color: ", ";\n border-radius: 16px;\n opacity: 0.7;\n"])), function (_a) { var isTooltipDisplayed = _a.isTooltipDisplayed; return (isTooltipDisplayed ? "block" : "none"); }, function (_a) { var theme = _a.theme; return theme.colors.contrast; }, function (_a) { var theme = _a.theme; return theme.colors.invertedContrast; }); var CopyToClipboard = function (_a) { var toCopy = _a.toCopy, children = _a.children, props = __rest(_a, ["toCopy", "children"]); var _b = React.useState(false), isTooltipDisplayed = _b[0], setIsTooltipDisplayed = _b[1]; return (React__default['default'].createElement(StyleButton, __assign({ small: true, bold: true, onClick: function () { if (navigator.clipboard) { navigator.clipboard.writeText(toCopy); setIsTooltipDisplayed(true); setTimeout(function () { setIsTooltipDisplayed(false); }, 1000); } } }, props), children, React__default['default'].createElement(Icon$R, { width: "20px", color: "primary", ml: "4px" }), React__default['default'].createElement(Tooltip, { isTooltipDisplayed: isTooltipDisplayed }, "Copied"))); }; var templateObject_1$5, templateObject_2$2; var AccountModal = function (_a) { var account = _a.account, logout = _a.logout, _b = _a.onDismiss, onDismiss = _b === void 0 ? function () { return null; } : _b; return (React__default['default'].createElement(Modal, { title: "Your wallet", onDismiss: onDismiss }, React__default['default'].createElement(Text, { fontSize: "20px", bold: true, style: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", marginBottom: "8px" } }, account), React__default['default'].createElement(Flex$1, { mb: "32px" }, React__default['default'].createElement(LinkExternal, { small: true, href: "https://bscscan.com/address/" + account, mr: "16px" }, "View on BscScan"), React__default['default'].createElement(CopyToClipboard, { toCopy: account }, "Copy Address")), React__default['default'].createElement(Flex$1, { justifyContent: "center" }, React__default['default'].createElement(Button, { scale: "sm", variant: "secondary", onClick: function () { logout(); window.localStorage.removeItem(connectorLocalStorageKey); onDismiss(); } }, "Logout")))); }; var useWalletModal = function (login, logout, account) { var onPresentConnectModal = useModal(React__default['default'].createElement(ConnectModal, { login: login }))[0]; var onPresentAccountModal = useModal(React__default['default'].createElement(AccountModal, { account: account || "", logout: logout }))[0]; return { onPresentConnectModal: onPresentConnectModal, onPresentAccountModal: onPresentAccountModal }; }; var UserBlock = function (_a) { var account = _a.account, login = _a.login, logout = _a.logout; var _b = useWalletModal(login, logout, account), onPresentConnectModal = _b.onPresentConnectModal, onPresentAccountModal = _b.onPresentAccountModal; var accountEllipsis = account ? account.substring(0, 4) + "..." + account.substring(account.length - 4) : null; return (React__default['default'].createElement("div", null, account ? (React__default['default'].createElement(Button, { scale: "sm", variant: "tertiary", onClick: function () { onPresentAccountModal(); } }, accountEllipsis)) : (React__default['default'].createElement(Button, { scale: "sm", onClick: function () { onPresentConnectModal(); } }, "Connect")))); }; var UserBlock$1 = React__default['default'].memo(UserBlock, function (prevProps, nextProps) { return prevProps.account === nextProps.account; }); var StyledAvatar = styled__default['default'].div(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n margin-left: 8px;\n position: relative;\n\n img {\n border-radius: 50%;\n }\n"], ["\n margin-left: 8px;\n position: relative;\n\n img {\n border-radius: 50%;\n }\n"]))); var Pip = styled__default['default'].div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n pointer-events: none;\n height: 8px;\n position: absolute;\n right: 0;\n top: 0;\n width: 8px;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n pointer-events: none;\n height: 8px;\n position: absolute;\n right: 0;\n top: 0;\n width: 8px;\n"])), function (_a) { var theme = _a.theme; return theme.colors.failure; }); var Avatar = function (_a) { var profile = _a.profile; var _b = profile.username, username = _b === void 0 ? "Bunny" : _b, image = profile.image, profileLink = profile.profileLink, noProfileLink = profile.noProfileLink, _c = profile.showPip, showPip = _c === void 0 ? false : _c; var link = profile.username ? profileLink : noProfileLink; var isExternal = link.startsWith("http"); var ariaLabel = "Link to profile"; var icon = image ? (React__default['default'].createElement("img", { src: image, alt: "profile avatar", height: "32px", width: "32px" })) : (React__default['default'].createElement(Icon$K, { width: "32px", height: "32px" })); if (isExternal) { return (React__default['default'].createElement(StyledAvatar, { title: username }, React__default['default'].createElement("a", { href: link, "aria-label": ariaLabel }, icon), showPip && React__default['default'].createElement(Pip, null))); } return (React__default['default'].createElement(StyledAvatar, { title: username }, React__default['default'].createElement(reactRouterDom.Link, { to: link, "aria-label": ariaLabel }, icon), showPip && React__default['default'].createElement(Pip, null))); }; var templateObject_1$4, templateObject_2$1; var Wrapper = styled__default['default'].div(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n"], ["\n position: relative;\n width: 100%;\n"]))); var StyledNav = styled__default['default'].nav(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: fixed;\n top: ", ";\n left: 0;\n transition: top 0.2s;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 8px;\n padding-right: 16px;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n border-bottom: solid 2px rgba(133, 133, 133, 0.1);\n z-index: 20;\n transform: translate3d(0, 0, 0);\n"], ["\n position: fixed;\n top: ", ";\n left: 0;\n transition: top 0.2s;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 8px;\n padding-right: 16px;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n border-bottom: solid 2px rgba(133, 133, 133, 0.1);\n z-index: 20;\n transform: translate3d(0, 0, 0);\n"])), function (_a) { var showMenu = _a.showMenu; return (showMenu ? 0 : "-" + MENU_HEIGHT + "px"); }, MENU_HEIGHT, function (_a) { var theme = _a.theme; return theme.nav.background; }); var BodyWrapper = styled__default['default'].div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n"], ["\n position: relative;\n display: flex;\n"]))); var Inner = styled__default['default'].div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-grow: 1;\n margin-top: ", ";\n transition: margin-top 0.2s;\n transform: translate3d(0, 0, 0);\n max-width: 100%;\n\n ", " {\n margin-left: ", ";\n max-width: ", ";\n }\n"], ["\n flex-grow: 1;\n margin-top: ", ";\n transition: margin-top 0.2s;\n transform: translate3d(0, 0, 0);\n max-width: 100%;\n\n ", " {\n margin-left: ", ";\n max-width: ", ";\n }\n"])), function (_a) { var showMenu = _a.showMenu; return (showMenu ? MENU_HEIGHT + "px" : 0); }, function (_a) { var theme = _a.theme; return theme.mediaQueries.nav; }, function (_a) { var isPushed = _a.isPushed; return (isPushed ? SIDEBAR_WIDTH_FULL : SIDEBAR_WIDTH_REDUCED) + "px"; }, function (_a) { var isPushed = _a.isPushed; return "calc(100% - " + (isPushed ? SIDEBAR_WIDTH_FULL : SIDEBAR_WIDTH_REDUCED) + "px)"; }); var MobileOnlyOverlay = styled__default['default'](Overlay)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: fixed;\n height: 100%;\n\n ", " {\n display: none;\n }\n"], ["\n position: fixed;\n height: 100%;\n\n ", " {\n display: none;\n }\n"])), function (_a) { var theme = _a.theme; return theme.mediaQueries.nav; }); var Menu = function (_a) { var _b; var account = _a.account, login = _a.login, logout = _a.logout, isDark = _a.isDark, toggleTheme = _a.toggleTheme, langs = _a.langs, setLang = _a.setLang, currentLang = _a.currentLang, cakePriceUsd = _a.cakePriceUsd, tablePriceUsd = _a.tablePriceUsd, legendPriceUsd = _a.legendPriceUsd, squirePriceUsd = _a.squirePriceUsd, shillingPriceUsd = _a.shillingPriceUsd, links = _a.links, profile = _a.profile, children = _a.children; var isXl = useMatchBreakpoints().isXl; var isMobile = isXl === false; var _c = React.useState(!isMobile), isPushed = _c[0], setIsPushed = _c[1]; var _d = React.useState(true), showMenu = _d[0], setShowMenu = _d[1]; var refPrevOffset = React.useRef(window.pageYOffset); React.useEffect(function () { var handleScroll = function () { var currentOffset = window.pageYOffset; var isBottomOfPage = window.document.body.clientHeight === currentOffset + window.innerHeight; var isTopOfPage = currentOffset === 0; // Always show the menu when user reach the top if (isTopOfPage) { setShowMenu(true); } // Avoid triggering anything at the bottom because of layout shift else if (!isBottomOfPage) { if (currentOffset < refPrevOffset.current) { // Has scroll up setShowMenu(true); } else { // Has scroll down setShowMenu(false); } } refPrevOffset.current = currentOffset; }; var throttledHandleScroll = throttle__default['default'](handleScroll, 200); window.addEventListener("scroll", throttledHandleScroll); return function () { window.removeEventListener("scroll", throttledHandleScroll); }; }, []); // Find the home link if provided var homeLink = links.find(function (link) { return link.label === "Home"; }); return (React__default['default'].createElement(Wrapper, null, React__default['default'].createElement(StyledNav, { showMenu: showMenu }, React__default['default'].createElement(Logo, { isPushed: isPushed, togglePush: function () { return setIsPushed(function (prevState) { return !prevState; }); }, isDark: isDark, href: (_b = homeLink === null || homeLink === void 0 ? void 0 : homeLink.href) !== null && _b !== void 0 ? _b : "/" }), React__default['default'].createElement(Flex$1, null, React__default['default'].createElement(UserBlock$1, { account: account, login: login, logout: logout }), profile && React__default['default'].createElement(Avatar, { profile: profile }))), React__default['default'].createElement(BodyWrapper, null, React__default['default'].createElement(Panel, { isPushed: isPushed, isMobile: isMobile, showMenu: showMenu, isDark: isDark, toggleTheme: toggleTheme, langs: langs, setLang: setLang, currentLang: currentLang, cakePriceUsd: cakePriceUsd, tablePriceUsd: tablePriceUsd, legendPriceUsd: legendPriceUsd, squirePriceUsd: squirePriceUsd, shillingPriceUsd: shillingPriceUsd, pushNav: setIsPushed, links: links }), React__default['default'].createElement(Inner, { isPushed: isPushed, showMenu: showMenu }, children), React__default['default'].createElement(MobileOnlyOverlay, { show: isPushed, onClick: function () { return setIsPushed(false); }, role: "presentation" })))); }; var templateObject_1$3, templateObject_2, templateObject_3, templateObject_4, templateObject_5; var ToastAction = function (_a) { var action = _a.action; if (action.url.startsWith("http")) { return (React__default['default'].createElement(Button, __assign({ as: "a", scale: "sm", href: action.url }, getExternalLinkProps()), action.text)); } return (React__default['default'].createElement(Button, { as: reactRouterDom.Link, scale: "sm", to: action.url }, action.text)); }; var types = { SUCCESS: "success", DANGER: "danger", WARNING: "warning", INFO: "info", }; var _a; var alertTypeMap = (_a = {}, _a[types.INFO] = variants$2.INFO, _a[types.SUCCESS] = variants$2.SUCCESS, _a[types.DANGER] = variants$2.DANGER, _a[types.WARNING] = variants$2.WARNING, _a); var StyledToast = styled__default['default'].div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n right: 16px;\n position: fixed;\n max-width: calc(100% - 32px);\n transition: all 250ms ease-in;\n width: 100%;\n\n ", " {\n max-width: 400px;\n }\n"], ["\n right: 16px;\n position: fixed;\n max-width: calc(100% - 32px);\n transition: all 250ms ease-in;\n width: 100%;\n\n ", " {\n max-width: 400px;\n }\n"])), function (_a) { var theme = _a.theme; return theme.mediaQueries.sm; }); var Toast = function (_a) { var toast = _a.toast, onRemove = _a.onRemove, style = _a.style, ttl = _a.ttl, props = __rest(_a, ["toast", "onRemove", "style", "ttl"]); var timer = React.useRef(); var ref = React.useRef(null); var removeHandler = React.useRef(onRemove); var id = toast.id, title = toast.title, description = toast.description, type = toast.type, action = toast.action; var handleRemove = React.useCallback(function () { return removeHandler.current(id); }, [id, removeHandler]); var handleMouseEnter = function () { clearTimeout(timer.current); }; var handleMouseLeave = function () { if (timer.current) { clearTimeout(timer.current); } timer.current = window.setTimeout(function () { handleRemove(); }, ttl); }; React.useEffect(function () { if (timer.current) { clearTimeout(timer.current); } timer.current = window.setTimeout(function () { handleRemove(); }, ttl); return function () { clearTimeout(timer.current); }; }, [timer, ttl, handleRemove]); return (React__default['default'].createElement(reactTransitionGroup.CSSTransition, __assign({ nodeRef: ref, timeout: 250, style: style }, props), React__default['default'].createElement(StyledToast, { ref: ref, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, React__default['default'].createElement(Alert, { title: title, variant: alertTypeMap[type], onClick: handleRemove }, action ? (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(Text, { as: "p", mb: "8px" }, description), React__default['default'].createElement(ToastAction, { action: action }))) : (description))))); }; var templateObject_1$2; var ZINDEX = 1000; var TOP_POSITION = 80; // Initial position from the top var StyledToastContainer = styled__default['default'].div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n .enter,\n .appear {\n opacity: 0.01;\n }\n\n .enter.enter-active,\n .appear.appear-active {\n opacity: 1;\n transition: opacity 250ms ease-in;\n }\n\n .exit {\n opacity: 1;\n }\n\n .exit.exit-active {\n opacity: 0.01;\n transition: opacity 250ms ease-out;\n }\n"], ["\n .enter,\n .appear {\n opacity: 0.01;\n }\n\n .enter.enter-active,\n .appear.appear-active {\n opacity: 1;\n transition: opacity 250ms ease-in;\n }\n\n .exit {\n opacity: 1;\n }\n\n .exit.exit-active {\n opacity: 0.01;\n transition: opacity 250ms ease-out;\n }\n"]))); var ToastContainer = function (_a) { var toasts = _a.toasts, onRemove = _a.onRemove, _b = _a.ttl, ttl = _b === void 0 ? 6000 : _b, _c = _a.stackSpacing, stackSpacing = _c === void 0 ? 24 : _c; return (React__default['default'].createElement(StyledToastContainer, null, React__default['default'].createElement(reactTransitionGroup.TransitionGroup, null, toasts.map(function (toast, index) { var zIndex = (ZINDEX - index).toString(); var top = TOP_POSITION + index * stackSpacing; return (React__default['default'].createElement(Toast, { key: toast.id, toast: toast, onRemove: onRemove, ttl: ttl, style: { top: top + "px", zIndex: zIndex } })); })))); }; var templateObject_1$1; var ResetCSS = styled.createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* prettier-ignore */\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n /* prettier-ignore */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n font-size: 16px;\n }\n ol,\n ul {\n list-style: disc;\n list-style-position: inside;\n }\n blockquote,\n q {\n quotes: none;\n }\n blockquote:before,\n blockquote:after,\n q:before,\n q:after {\n content: \"\";\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n a {\n color: inherit;\n text-decoration: none;\n }\n [role=\"button\"] {\n cursor: pointer;\n }\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n * {\n font-family: 'Kanit', sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n /* Scrollbar */\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n background: ", "; \n border-radius: 8px;\n }\n ::-webkit-scrollbar-track {\n box-shadow: inset 0 0 5px ", "; \n border-radius: 10px;\n }\n\n /* Slider */ \n input[type=range] {\n -webkit-appearance: none; /* Hides the slider so that custom slider can be made */\n width: 100%; /* Specific width is required for Firefox. */\n background: transparent; /* Otherwise white in Chrome */\n }\n input[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n }\n input[type=range]:focus {\n outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */\n }\n input[type=range]::-ms-track {\n width: 100%;\n cursor: pointer;\n /* Hides the slider so custom styles can be added */\n background: transparent; \n border-color: transparent;\n color: transparent;\n } \n"], ["\n /* prettier-ignore */\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n /* prettier-ignore */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n font-size: 16px;\n }\n ol,\n ul {\n list-style: disc;\n list-style-position: inside;\n }\n blockquote,\n q {\n quotes: none;\n }\n blockquote:before,\n blockquote:after,\n q:before,\n q:after {\n content: \"\";\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n a {\n color: inherit;\n text-decoration: none;\n }\n [role=\"button\"] {\n cursor: pointer;\n }\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n * {\n font-family: 'Kanit', sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n /* Scrollbar */\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n background: ", "; \n border-radius: 8px;\n }\n ::-webkit-scrollbar-track {\n box-shadow: inset 0 0 5px ", "; \n border-radius: 10px;\n }\n\n /* Slider */ \n input[type=range] {\n -webkit-appearance: none; /* Hides the slider so that custom slider can be made */\n width: 100%; /* Specific width is required for Firefox. */\n background: transparent; /* Otherwise white in Chrome */\n }\n input[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n }\n input[type=range]:focus {\n outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */\n }\n input[type=range]::-ms-track {\n width: 100%;\n cursor: pointer;\n /* Hides the slider so custom styles can be added */\n background: transparent; \n border-color: transparent;\n color: transparent;\n } \n"])), function (_a) { var theme = _a.theme; return theme.colors.textSubtle; }, function (_a) { var theme = _a.theme; return theme.colors.input; }); var templateObject_1; var baseColors = { failure: "#fa113e", primary: "#EFEF00", primaryBright: "#EFEF00", primaryDark: "#4D4BA9", secondary: "#FC8600", success: "#15bd69", warning: "#fa113e", }; var brandColors = { binance: "#F0B90B", }; var lightColors = __assign(__assign(__assign({}, baseColors), brandColors), { background: "#f1f6f8", backgroundDisabled: "#E9EAEB", contrast: "#191326", invertedContrast: "#FFFFFF", input: "#eeeeee", tertiary: "#EFF4F5", text: "#4D4BA9", textDisabled: "#BDC2C4", textSubtle: "#4D4BA9", borderColor: "#E9EAEB", card: "#FFFFFF", gradients: { bubblegum: "linear-gradient(139.73deg, #E6FDFF 0%, #F3EFFF 100%)", } }); var darkColors = __assign(__assign(__assign({}, baseColors), brandColors), { secondary: "#EFEF00", background: "#100C18", backgroundDisabled: "#3c3742", contrast: "#FFFFFF", invertedContrast: "#191326", input: "#483f5a", primaryDark: "#0098A1", tertiary: "#6C6AC1", text: "#6C6AC1", textDisabled: "#666171", textSubtle: "#EFEF00", borderColor: "#524B63", card: "#27262c", gradients: { bubblegum: "linear-gradient(139.73deg, #313D5C 0%, #3D2A54 100%)", } }); var light$6 = { background: lightColors.card, }; var dark$6 = { background: darkColors.card, }; var light$5 = { background: lightColors.card, boxShadow: "0px 2px 12px -8px rgba(112, 61, 219, 0.1), 0px 1px 1px rgba(112, 61, 219, 0.05)", boxShadowActive: shadows.active, boxShadowSuccess: shadows.success, boxShadowWarning: shadows.warning, cardHeaderBackground: "linear-gradient(111.68deg, #F2ECF2 0%, #E8F2F6 100%)", dropShadow: "drop-shadow(0px 1px 4px rgba(112, 61, 219, 0.15))", }; var dark$5 = { background: darkColors.card, boxShadow: "0px 2px 12px -8px rgba(112, 61, 219, 0.1), 0px 1px 1px rgba(112, 61, 219, 0.05)", boxShadowActive: shadows.active, boxShadowSuccess: shadows.success, boxShadowWarning: shadows.warning, cardHeaderBackground: "linear-gradient(166.77deg, #3B4155 0%, #3A3045 100%)", dropShadow: "drop-shadow(0px 1px 4px rgba(112, 61, 219, 0.15))", }; var light$4 = { handleBackground: lightColors.card, }; var dark$4 = { handleBackground: darkColors.card, }; var light$3 = { handleBackground: lightColors.card, }; var dark$3 = { handleBackground: darkColors.card, }; var light$2 = { background: lightColors.card, hover: "#EEEAF4", }; var dark$2 = { background: darkColors.card, hover: "#473d5d", }; var light$1 = { background: lightColors.card, }; var dark$1 = { background: darkColors.card, }; var light = { background: darkColors.card, text: darkColors.text, boxShadow: "0px 0px 2px rgba(0, 0, 0, 0.2), 0px 4px 12px -8px rgba(14, 14, 44, 0.1)", }; var dark = { background: lightColors.card, text: lightColors.text, boxShadow: "0px 0px 2px rgba(0, 0, 0, 0.2), 0px 4px 12px -8px rgba(14, 14, 44, 0.1)", }; var darkTheme = __assign(__assign({}, base), { isDark: true, alert: dark$6, colors: darkColors, card: dark$5, toggle: dark$3, nav: dark$2, modal: dark$1, radio: dark$4, tooltip: dark }); var lightTheme = __assign(__assign({}, base), { isDark: false, alert: light$6, colors: lightColors, card: light$5, toggle: light$3, nav: light$2, modal: light$1, radio: light$4, tooltip: light }); exports.AddIcon = Icon$19; exports.Alert = Alert; exports.ArrowBackIcon = Icon$18; exports.ArrowDownIcon = Icon$17; exports.ArrowDropDownIcon = Icon$16; exports.ArrowDropUpIcon = Icon$15; exports.ArrowForwardIcon = Icon$14; exports.ArrowUpIcon = Icon$13; exports.AutoRenewIcon = Icon$12; exports.BackgroundImage = BackgroundImage; exports.BaseLayout = GridLayout$1; exports.BinanceIcon = Icon$11; exports.BlockIcon = Icon$1b; exports.Box = Box; exports.Breadcrumbs = Breadcrumbs; exports.BunnyPlaceholderIcon = Icon$10; exports.Button = Button; exports.ButtonMenu = ButtonMenu; exports.ButtonMenuItem = ButtonMenuItem; exports.CalculateIcon = Icon$_; exports.Card = Card; exports.CardBody = CardBody; exports.CardFooter = CardFooter; exports.CardHeader = CardHeader; exports.CardRibbon = CardRibbon; exports.CardViewIcon = Icon$$; exports.CardsLayout = GridLayout; exports.Checkbox = Checkbox; exports.CheckmarkCircleIcon = Icon$1d; exports.CheckmarkIcon = Icon$Z; exports.ChevronDownIcon = Icon$Y; exports.ChevronLeftIcon = Icon$X; exports.ChevronRightIcon = Icon$W; exports.ChevronUpIcon = Icon$V; exports.CloseIcon = Icon$U; exports.CogIcon = Icon$T; exports.CommunityIcon = Icon$S; exports.CopyIcon = Icon$R; exports.Dropdown = Dropdown; exports.ErrorIcon = Icon$1c; exports.FallingBunnies = FallingBunnies; exports.Flex = Flex$1; exports.Heading = Heading; exports.HelpIcon = Icon$Q; exports.IconButton = IconButton; exports.Image = Image; exports.InfoIcon = Icon$1a; exports.Input = Input$1; exports.Link = Link; exports.LinkExternal = LinkExternal; exports.ListViewIcon = Icon$P; exports.LogoIcon = Icon$O; exports.LogoRoundIcon = Icon$N; exports.Menu = Menu; exports.MetamaskIcon = Icon$M; exports.MinusIcon = Icon$L; exports.Modal = Modal; exports.ModalProvider = ModalProvider; exports.NoProfileAvatarIcon = Icon$K; exports.NotificationDot = NotificationDot; exports.OpenNewIcon = Icon$J; exports.PancakeRoundIcon = Icon$H; exports.PancakesIcon = Icon$I; exports.PlayCircleOutlineIcon = Icon$G; exports.PrizeIcon = Icon$F; exports.Progress = Progress; exports.ProgressBunny = Icon$C; exports.Radio = Radio; exports.RemoveIcon = Icon$E; exports.ResetCSS = ResetCSS; exports.SearchIcon = Icon$w; exports.Skeleton = Skeleton; exports.Slider = Slider; exports.Spinner = Spinner; exports.Svg = Svg; exports.SwapVertIcon = Icon$v; exports.SyncAltIcon = Icon$u; exports.Tag = Tag; exports.Text = Text; exports.Ticket = Icon$z; exports.TicketRound = Icon$y; exports.TimerIcon = Icon$x; exports.ToastContainer = ToastContainer; exports.Toggle = Toggle; exports.VerifiedIcon = Icon$D; exports.WaitIcon = Icon$B; exports.WarningIcon = Icon$t; exports.Won = Icon$A; exports.alertVariants = variants$2; exports.byTextAscending = byTextAscending; exports.byTextDescending = byTextDescending; exports.connectorLocalStorageKey = connectorLocalStorageKey; exports.dark = darkTheme; exports.darkColors = darkColors; exports.light = lightTheme; exports.lightColors = lightColors; exports.makeRender = makeRender; exports.menuConfig = links; exports.toastTypes = types; exports.useKonamiCheatCode = useKonamiCheatCode; exports.useMatchBreakpoints = useMatchBreakpoints; exports.useModal = useModal; exports.useParticleBurst = useParticleBurst; exports.useTable = useTable; exports.useWalletModal = useWalletModal;
92.98818
7,802
0.668668
185e7ccd608cb6c48011e28cfd5e79165af13fad
846
js
JavaScript
public/views/questions/mine/index.min.js
pwithers/agrippa
7b4755d432285493dc1b32f7e2cf46a2acac9ce2
[ "MIT" ]
null
null
null
public/views/questions/mine/index.min.js
pwithers/agrippa
7b4755d432285493dc1b32f7e2cf46a2acac9ce2
[ "MIT" ]
null
null
null
public/views/questions/mine/index.min.js
pwithers/agrippa
7b4755d432285493dc1b32f7e2cf46a2acac9ce2
[ "MIT" ]
null
null
null
!function(){"use strict";app=app||{},app.Ask=Backbone.Model.extend({url:"/questions/ask/",defaults:{errors:[],errfor:{},text:""}}),app.AskView=Backbone.View.extend({el:"#ask",template:_.template($("#tmpl-ask").html()),events:{"submit form":"preventSubmit","click .btn-ask":"ask"},initialize:function(){this.model=new app.Ask,this.listenTo(this.model,"sync",this.render),this.render()},render:function(){this.$el.html(this.template(this.model.attributes)),this.$el.find('[name="text"]').focus()},preventSubmit:function(a){a.preventDefault()},ask:function(){this.$el.find(".btn-ask").attr("disabled",!0),this.model.save({text:this.$el.find('[name="text"]').val()},{success:function(a,b){b.success?location.href="/questions/mine/":a.set(b)}})}}),$(document).ready(function(){app.signupView=new app.AskView})}(); //# sourceMappingURL=index.min.js.map
423
808
0.704492
185efffdb00d0cd409de8d340d282d38555bc2d5
2,485
js
JavaScript
tasks/test.js
xushuo/gitTest
28a32e1ef13bdaefd1236d962a7af17a224e941a
[ "Apache-2.0" ]
null
null
null
tasks/test.js
xushuo/gitTest
28a32e1ef13bdaefd1236d962a7af17a224e941a
[ "Apache-2.0" ]
2
2015-09-23T20:51:27.000Z
2018-03-20T14:52:49.000Z
tasks/test.js
Bargs/kibana
62264b70d2abe1be4e964e3c4b61ea4b1f195d79
[ "Apache-2.0" ]
null
null
null
import _, { keys } from 'lodash'; const visualRegression = require('../utilities/visual_regression'); module.exports = function (grunt) { grunt.registerTask('test:visualRegression', [ 'intern:visualRegression:takeScreenshots', 'test:visualRegression:buildGallery' ]); grunt.registerTask('test:visualRegression:takeScreenshots', [ 'clean:screenshots', 'intern:visualRegression' ]); grunt.registerTask( 'test:visualRegression:buildGallery', 'Compare screenshots and generate diff images.', function () { const done = this.async(); visualRegression.run(done); } ); grunt.registerTask('test:server', [ 'esvm:test', 'simplemocha:all', 'esvm_shutdown:test' ]); grunt.registerTask('test:browser', ['run:testServer', 'karma:unit']); grunt.registerTask('test:browser-ci', () => { const ciShardTasks = keys(grunt.config.get('karma')) .filter(key => key.startsWith('ciShard-')) .map(key => `karma:${key}`); grunt.log.ok(`Running UI tests in ${ciShardTasks.length} shards`); grunt.task.run([ 'run:testServer', ...ciShardTasks ]); }); grunt.registerTask('test:coverage', [ 'run:testCoverageServer', 'karma:coverage' ]); grunt.registerTask('test:quick', [ 'test:server', 'test:ui', 'test:browser', 'test:api' ]); grunt.registerTask('test:dev', [ 'run:devTestServer', 'karma:dev' ]); grunt.registerTask('test:ui', [ 'esvm:ui', 'run:testUIServer', 'run:chromeDriver', 'clean:screenshots', 'intern:dev', 'esvm_shutdown:ui', 'stop:chromeDriver', 'stop:testUIServer' ]); grunt.registerTask('test:ui:server', [ 'esvm:ui', 'run:testUIDevServer', 'run:devChromeDriver:keepalive' ]); grunt.registerTask('test:ui:runner', [ 'clean:screenshots', 'intern:dev' ]); grunt.registerTask('test:api', [ 'esvm:ui', 'run:apiTestServer', 'intern:api', 'esvm_shutdown:ui', 'stop:apiTestServer' ]); grunt.registerTask('test:api:server', [ 'esvm:ui', 'run:apiTestServer:keepalive' ]); grunt.registerTask('test:api:runner', [ 'intern:api' ]); grunt.registerTask('test', subTask => { if (subTask) grunt.fail.fatal(`invalid task "test:${subTask}"`); grunt.task.run(_.compact([ !grunt.option('quick') && 'eslint:source', 'licenses', 'test:quick' ])); }); grunt.registerTask('quick-test', ['test:quick']); // historical alias };
24.126214
94
0.628169
185f4559a8d16da88f40f3544049b470ad60a756
473
js
JavaScript
app/sequelizeDB/schemas/eventPersons.js
Lexzt/edison-mail-calendar
b797266f45b31681fa01347d66310e04cd589fce
[ "MIT" ]
null
null
null
app/sequelizeDB/schemas/eventPersons.js
Lexzt/edison-mail-calendar
b797266f45b31681fa01347d66310e04cd589fce
[ "MIT" ]
null
null
null
app/sequelizeDB/schemas/eventPersons.js
Lexzt/edison-mail-calendar
b797266f45b31681fa01347d66310e04cd589fce
[ "MIT" ]
2
2019-12-18T18:44:26.000Z
2019-12-18T23:24:16.000Z
import Sequelize, { Model } from 'sequelize'; import getDb from '../index'; const db = getDb(); export default class EventPersons extends Model {} EventPersons.init( { eventPersonId: { type: Sequelize.STRING, primaryKey: true }, eventId: { type: Sequelize.STRING }, personId: { type: Sequelize.STRING } }, { sequelize: db, modelName: 'eventpersons' } ); EventPersons.sync(); db.eventPersons = EventPersons;
17.518519
50
0.625793
185fe3aeb03d2d241bd04f7339a48d600a383c29
185
js
JavaScript
node_modules/vue2-transitions/src/index.test.js
griffinperry/tfs-c360-riogrande
6c7d5fe05b3663e636a1a841f8fb0a806651e040
[ "MIT" ]
520
2018-07-22T11:12:13.000Z
2022-03-31T10:54:42.000Z
node_modules/vue2-transitions/src/index.test.js
griffinperry/tfs-c360-riogrande
6c7d5fe05b3663e636a1a841f8fb0a806651e040
[ "MIT" ]
31
2018-09-10T08:50:16.000Z
2022-02-26T01:35:00.000Z
node_modules/vue2-transitions/src/index.test.js
griffinperry/tfs-c360-riogrande
6c7d5fe05b3663e636a1a841f8fb0a806651e040
[ "MIT" ]
66
2018-07-25T15:21:36.000Z
2022-03-26T16:13:22.000Z
import {mount} from 'vue-test-utils' import Vue2Transitions from './' test('it works', () => { const wrapper = mount(Vue2Transitions) expect(wrapper.isVueInstance()).toBe(true) })
23.125
44
0.697297
186008ddab681002182f42a6da37403bcd3a5025
179
js
JavaScript
src/ui/reducers/index.js
csampson/destiny-weapons
3c8431dd3fd3e4891e2f70ee17fd38d46cf22f60
[ "MIT" ]
1
2017-12-07T10:43:48.000Z
2017-12-07T10:43:48.000Z
src/ui/reducers/index.js
csampson/destiny-weapons
3c8431dd3fd3e4891e2f70ee17fd38d46cf22f60
[ "MIT" ]
3
2017-11-11T14:23:41.000Z
2017-11-11T14:24:23.000Z
src/ui/reducers/index.js
csampson/destiny-weapons
3c8431dd3fd3e4891e2f70ee17fd38d46cf22f60
[ "MIT" ]
null
null
null
/** * @overview Root Redux reducer */ import { combineReducers } from 'redux' import filters from './filters' const root = combineReducers({ filters }) export default root
13.769231
39
0.703911
18600b9d11b76148548ca1b95a6b2f04daa59107
30,286
js
JavaScript
test/controller/spec/controller.spec.js
UKHomeOfficeForms/hof
f5458aab1add5f5ff327d45353be36fd3e9fecd4
[ "MIT" ]
16
2016-11-18T08:34:08.000Z
2021-11-11T11:26:02.000Z
test/controller/spec/controller.spec.js
UKHomeOfficeForms/hof
f5458aab1add5f5ff327d45353be36fd3e9fecd4
[ "MIT" ]
46
2016-11-10T15:02:08.000Z
2022-03-28T08:27:21.000Z
test/controller/spec/controller.spec.js
UKHomeOfficeForms/hof
f5458aab1add5f5ff327d45353be36fd3e9fecd4
[ "MIT" ]
9
2017-05-31T10:18:09.000Z
2021-11-11T16:09:43.000Z
'use strict'; const _ = require('lodash'); const response = require('reqres').res; const request = require('reqres').req; const proxyquire = require('proxyquire'); const ErrorClass = require('../../../controller/validation-error'); const BaseController = require('../../../controller/base-controller'); describe('controller', () => { let Controller; let controller; beforeEach(() => { Controller = proxyquire('../../../controller/controller', { './base-controller': BaseController }); sinon.stub(BaseController.prototype, 'use'); sinon.stub(BaseController.prototype, 'locals').returns({foo: 'bar'}); }); it('sets the correct error class to the instance', () => { controller = new Controller({}); controller.ValidationError.should.equal(ErrorClass); }); afterEach(() => { BaseController.prototype.use.restore(); BaseController.prototype.locals.restore(); }); describe('methods', () => { beforeEach(() => { sinon.stub(BaseController.prototype, 'getNextStep'); }); afterEach(() => { BaseController.prototype.getNextStep.restore(); }); describe('.get()', () => { const req = {}; let res; beforeEach(() => { sinon.stub(BaseController.prototype, 'get'); controller = new Controller({ template: 'foo' }); res = response({ locals: { partials: { step: 'default-template' } } }); }); afterEach(() => { BaseController.prototype.get.restore(); }); it('calls super', () => { controller.get(req, res, _.noop); BaseController.prototype.get.should.have.been.calledOnce .and.calledWithExactly(req, res, _.noop); }); it('calls res.render with the template', () => { controller.get(req, res, _.noop); res.render.should.have.been.calledOnce; }); it('sets template to res.locals.partials.step if view lookup error', () => { res.render = (template, cb) => cb(new Error('Failed to lookup view')); controller.get(req, res, _.noop); controller.options.template.should.be.equal('default-template'); }); }); describe('.getBackLink()', () => { const req = {}; const res = { locals: {} }; beforeEach(() => { res.locals.backLink = ''; req.baseUrl = '/base'; req.params = {}; controller = new Controller({ template: 'foo' }); }); it('returns an empty string if res.locals.backLink is an empty string', () => { controller.getBackLink(req, res).should.be.equal(''); }); it('returns null if res.locals.backLink is null', () => { res.locals.backLink = null; should.not.exist(controller.getBackLink(req, res)); }); it('returns the backLink unaltered if not editing and baseUrl is set', () => { res.locals.backLink = 'backLink'; controller.getBackLink(req, res).should.be.equal('backLink'); }); it('prepends a slash if baseUrl is /', () => { res.locals.backLink = 'backLink'; req.baseUrl = '/'; controller.getBackLink(req, res).should.be.equal('/backLink'); }); it('prepends a slash if baseUrl is an empty string', () => { res.locals.backLink = 'backLink'; req.baseUrl = ''; controller.getBackLink(req, res).should.be.equal('/backLink'); }); it('appends /edit if editing', () => { req.params.action = 'edit'; res.locals.backLink = 'backLink'; controller.getBackLink(req, res).should.be.equal('backLink/edit'); }); it('appends /edit and prepends a slash if editing and baseUrl not set', () => { req.params.action = 'edit'; req.baseUrl = '/'; res.locals.backLink = 'backLink'; controller.getBackLink(req, res).should.be.equal('/backLink/edit'); }); }); describe('.locals()', () => { let req; let res; beforeEach(done => { req = { form: { errors: {} }, translate: () => '', params: {} }; res = response(); sinon.stub(Controller.prototype, 'getBackLink'); controller = new Controller({ template: 'foo', route: '/bar' }); controller._configure(req, res, done); }); afterEach(() => { Controller.prototype.getBackLink.restore(); }); it('always extends from parent locals', () => { controller.locals(req, res).should.have.property('foo').and.always.equal('bar'); }); it('calls getBackLink', () => { controller.locals(req, res); Controller.prototype.getBackLink.should.have.been.calledOnce; }); it('returns errorLength.single if there is one error', () => { req.form.errors = { one: true }; controller.locals(req, res).should.have.property('errorLength') .and.deep.equal({ single: true }); }); it('returns errorLength.multiple if there is more than one error', () => { req.form.errors = { one: true, two: true }; controller.locals(req, res).should.have.property('errorLength') .and.deep.equal({ multiple: true }); }); it('returns errorLength undefined if req.form.errors is not set', () => { delete req.form.errors; controller.locals(req, res).should.have.property('errorLength') .and.be.undefined; }); describe('with fields', () => { let locals; beforeEach(() => { req.form.options.fields = { 'a-field': { mixin: 'input-text', foo: 'bar' }, 'another-field': { mixin: 'input-number', disableRender: true } }; locals = controller.locals(req, res); }); it('should have added a fields array to return object', () => { locals.should.have.property('fields').and.be.an('array'); locals.fields[0].should.be.eql(Object.assign({}, req.form.options.fields['a-field'], { key: 'a-field' })); locals.fields[1].should.be.eql(Object.assign({}, req.form.options.fields['another-field'], { key: 'another-field' } )); }); }); describe('with locals', () => { beforeEach(() => { res.locals = {}; res.locals.values = { 'field-one': 1, 'field-two': 2, 'field-three': 3, 'field-four': 4 }; req.form.options = { steps: { '/one': { fields: ['field-one', 'field-two'] }, '/two': { fields: ['field-three', 'field-four'] } }, locals: { test: 'bar' }, route: '/baz' }; }); it('should expose test in locals', () => { controller.locals(req, res).should.have.property('test').and.equal('bar'); }); }); }); describe('.getNextStep()', () => { let req; let res; let getStub; beforeEach(done => { getStub = sinon.stub(); getStub.returns(['/']); req = request(); res = response(); req.sessionModel = { reset: sinon.stub(), get: getStub }; controller = new Controller({template: 'foo'}); BaseController.prototype.getNextStep.returns('/'); BaseController.prototype.getValues = function (myReq, myRes, callback) { callback(); }; controller._configure(req, res, done); }); describe('when the action is "edit"', () => { it('appends "edit" to the path', () => { req.form.options.continueOnEdit = true; req.params.action = 'edit'; controller.getNextStep(req).should.contain('/edit'); }); }); describe('when the action is "edit" and continueOnEdit option is falsey', () => { it('appends "confirm" to the path', () => { req.form.options.continueOnEdit = false; req.params.action = 'edit'; controller.getNextStep(req).should.contain('/confirm'); }); }); describe('when the action is "edit" and continueOnEdit is truthy', () => { it('appends "/edit" to the path if next page is not /confirm', () => { BaseController.prototype.getNextStep.returns('/step'); req.form.options.continueOnEdit = true; req.params.action = 'edit'; getStub.returns(['/step']); controller.getNextStep(req).should.contain('/edit'); }); it('doesn\'t append "/edit" to the path if next page is /confirm', () => { BaseController.prototype.getNextStep.returns('/confirm'); req.form.options.continueOnEdit = true; req.params.action = 'edit'; controller.getNextStep(req).should.not.contain('/edit'); }); }); describe('with a fork', () => { beforeEach(() => { getStub = sinon.stub(); req.sessionModel = { reset: sinon.stub(), get: getStub }; req.form.values = {}; req.form.historicalValues = {}; BaseController.prototype.getNextStep.returns('/next-page'); }); describe('when the condition config is met', () => { it('the next step is the fork target', () => { req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition: { field: 'example-radio', value: 'superman' } }]; controller.getNextStep(req, {}).should.contain('/target-page'); }); }); describe('when the condition config is met by a historical form', () => { it('the next step is the fork target', () => { req.form.historicalValues = {'example-radio': 'superman'}; req.form.options.forks = [{ target: '/target-page', condition: { field: 'example-radio', value: 'superman' } }]; controller.getNextStep(req, {}).should.contain('/target-page'); }); }); describe('when the condition config is not met', () => { it('the next step is the original next target', () => { req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition: { field: 'example-radio', value: 'lex luther' } }]; controller.getNextStep(req, {}).should.equal('/next-page'); }); }); describe('when the condition config is not met by a historical form', () => { it('the next step is the original next target', () => { req.form.historicalValues = {'example-radio': 'superman'}; req.form.options.forks = [{ target: '/target-page', condition: { field: 'example-radio', value: 'lex luther' } }]; controller.getNextStep(req, {}).should.equal('/next-page'); }); }); describe('when the condition config is not met and historical values are not present', () => { it('the next step is the original next target', () => { req.form.historicalValues = null; req.form.options.forks = [{ target: '/target-page', condition: { field: 'example-radio', value: 'lex luther' } }]; controller.getNextStep(req, {}).should.equal('/next-page'); }); }); describe('when the condition is => met', () => { it('the next step is the fork target', () => { req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; controller.getNextStep(req, {}).should.contain('/target-page'); }); }); describe('when the condition is => not met', () => { it('the next step is the origin next target', () => { req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'batman'; } }]; controller.getNextStep(req, {}).should.equal('/next-page'); }); }); describe('when the action is "edit" and we\'ve been down the fork', () => { it('should return /confirm if baseUrl is not set', () => { getStub.returns(['/target-page']); req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; req.form.options.continueOnEdit = false; req.params.action = 'edit'; controller.getNextStep(req).should.equal('/confirm'); }); it('should follow fork if fork has `continueOnEdit` set to true', () => { getStub.returns(['/target-page']); req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', continueOnEdit: true, condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; req.form.options.continueOnEdit = false; req.params.action = 'edit'; controller.getNextStep(req).should.equal('/target-page/edit'); }); it('should return /a-base-url/confirm if baseUrl is set', () => { getStub.returns(['/target-page']); req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; req.form.options.continueOnEdit = false; req.params.action = 'edit'; req.baseUrl = '/a-base-url'; controller.getNextStep(req).should.equal('/a-base-url/confirm'); }); it('should append "edit" to the path if baseUrl is set and continueOnEdit is false', () => { getStub.returns(['/target-page']); req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; req.form.options.continueOnEdit = true; req.params.action = 'edit'; req.baseUrl = '/a-base-url'; controller.getNextStep(req).should.equal('/a-base-url/target-page/edit'); }); }); describe('when the action is "edit" but we\'ve not been down the fork', () => { it('appends "edit" to the path', () => { req.form.values['example-radio'] = 'superman'; req.form.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; req.form.options.continueOnEdit = false; req.params.action = 'edit'; controller.getNextStep(req).should.contain('/target-page'); }); }); describe('when the action is "edit" and we\'ve been down the standard path', () => { it('appends "edit" to the path', () => { getStub.returns(['/next-page']); req.form.values['example-radio'] = 'clark-kent'; controller.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; controller.options.continueOnEdit = false; req.params.action = 'edit'; controller.getNextStep(req).should.contain('/confirm'); }); }); describe('when the action is "edit" but we\'ve not been down the standard path', () => { it('appends "edit" to the path', () => { req.form.values['example-radio'] = 'clark-kent'; controller.options.forks = [{ target: '/target-page', condition(r) { return r.form.values['example-radio'] === 'superman'; } }]; controller.options.continueOnEdit = false; req.params.action = 'edit'; controller.getNextStep(req).should.contain('/next-page'); }); }); }); describe('with more than one fork', () => { describe('when the fields are the same', () => { beforeEach(() => { req.form.values = { 'example-radio': 'superman' }; req.form.options.forks = [{ target: '/superman-page', condition: { field: 'example-radio', value: 'superman' } }, { target: '/batman-page', condition: { field: 'example-radio', value: 'superman' } }]; }); describe('and each condition is met', () => { it('the last forks\' target becomes the next step', () => { controller.getNextStep(req, {}).should.contain('/batman-page'); }); }); }); describe('when the fields are different', () => { beforeEach(() => { req.form.options.forks = [{ target: '/superman-page', condition: { field: 'example-radio', value: 'superman' } }, { target: '/smallville-page', condition: { field: 'example-email', value: 'clarke@smallville.com' } }]; }); describe('and each condition is met', () => { beforeEach(() => { req.form.values = { 'example-radio': 'superman', 'example-email': 'clarke@smallville.com' }; }); it('the last forks\' target becomes the next step', () => { controller.getNextStep(req, {}).should.contain('/smallville-page'); }); }); describe('and the first condition is met', () => { beforeEach(() => { req.form.values = { 'example-radio': 'superman', 'example-email': 'kent@smallville.com' }; }); it('the first forks\' target becomes the next step', () => { controller.getNextStep(req, {}).should.contain('/superman-page'); }); }); }); }); }); describe('.getErrorStep()', () => { const req = {}; const res = {}; const err = {}; beforeEach(done => { sinon.stub(BaseController.prototype, 'getErrorStep').returns('/'); req.params = {}; controller = new Controller({template: 'foo'}); controller._configure(req, res, done); }); afterEach(() => { BaseController.prototype.getErrorStep.restore(); }); describe('when the action is "edit" and the parent redirect is not edit', () => { it('appends "edit" to the path', () => { req.params.action = 'edit'; controller.getErrorStep(err, req).should.match(/\/edit$/); }); it('doesn\'t append "edit" to the path if "edit" is already present', () => { req.params.action = 'edit'; BaseController.prototype.getErrorStep.returns('/a-path/edit/id'); controller.getErrorStep(err, req).should.not.match(/\/edit$/); }); }); }); describe('getTitle()', () => { let lookup; let fields; beforeEach(() => { lookup = sinon.stub(); fields = { 'field-one': {} }; }); it('calls lookup with the correct list of keys', () => { const expected = [ 'pages.step-one.header', 'fields.field-one.label', 'fields.field-one.legend' ]; controller.getTitle('step-one', lookup, fields); lookup.firstCall.args[0].should.be.deep.equal(expected); }); it('passes the locals hash to lookup as second arg', () => { const locals = {}; controller.getTitle('step-one', lookup, fields, locals); lookup.firstCall.args[1].should.be.equal(locals); }); }); describe('getIntro()', () => { let lookup; beforeEach(() => { lookup = sinon.stub(); }); it('calls lookup with the correct list of keys', () => { const expected = [ 'pages.step-one.intro' ]; controller.getIntro('step-one', lookup); lookup.firstCall.args[0].should.be.deep.equal(expected); }); it('passes locals too lookup as second arg', () => { const locals = {}; controller.getIntro('step-one', lookup, locals); lookup.firstCall.args[1].should.be.equal(locals); }); }); describe('getErrors', () => { let req; let res; let errors; beforeEach(() => { errors = { key1: { key: 'key1', type: 'required' }, key2: { key: 'key2', type: 'maxlength', arguments: [10] }, key3: { key: 'key3', type: 'before', arguments: [3, 'years'] } }; req = request(); req.form = {}; res = response(); sinon.stub(controller, 'getErrors').returns(errors); sinon.stub(controller, 'getErrorMessage').callsFake(e => `error for ${e.key}`); }); afterEach(() => { controller.getErrors.restore(); controller.getErrorMessage.restore(); }); it('sets response from `getErrors` onto req.form.errors', done => { controller._getErrors(req, res, () => { req.form.errors.should.have.keys('key1', 'key2', 'key3'); done(); }); }); it('adds a message property onto each error', done => { controller._getErrors(req, res, () => { req.form.errors.should.have.keys('key1', 'key2', 'key3'); req.form.errors.key1.should.have.a.property('message'); controller.getErrorMessage.should.have.been.calledWith(errors.key1, req, res); req.form.errors.key1.message.should.equal('error for key1'); req.form.errors.key2.should.have.a.property('message'); controller.getErrorMessage.should.have.been.calledWith(errors.key2, req, res); req.form.errors.key2.message.should.equal('error for key2'); req.form.errors.key3.should.have.a.property('message'); controller.getErrorMessage.should.have.been.calledWith(errors.key3, req, res); req.form.errors.key3.message.should.equal('error for key3'); done(); }); }); }); describe('getErrorLength', () => { let req; let res; beforeEach(() => { req = request(); req.form = {}; res = response(); }); it('returns `{single:true}` if only one error is present', () => { req.form.errors = { one: { key: 'one' } }; controller.getErrorLength(req, res).should.eql({ single: true }); }); it('returns `{multiple:true}` if more than one error is present', () => { req.form.errors = { one: { key: 'one' }, two: { key: 'two' } }; controller.getErrorLength(req, res).should.eql({ multiple: true }); }); it('returns undefined if no errors are present', () => { expect(controller.getErrorLength(req, res)).to.equal(undefined); }); }); describe('getErrorMessage', () => { let req; let res; beforeEach(() => { req = request(); res = response(); req.translate = sinon.stub().returns(''); }); it('uses the current error object properties to translate the message', () => { req.translate.withArgs('validation.key.custom').returns('This is a custom message'); const error = new ErrorClass('key', { type: 'custom' }); controller.getErrorMessage(error, req, res).should.equal('This is a custom message'); }); it('uses default error message for field if no field and type specific message is defined', () => { req.translate.withArgs('validation.key.default').returns('Default field message'); const error = new ErrorClass('key', { type: 'required' }); controller.getErrorMessage(error, req, res).should.equal('Default field message'); }); it('uses default error message for validation type if no field level message is defined', () => { req.translate.withArgs('validation.required').returns('Default required message'); const error = new ErrorClass('key', { type: 'required' }); controller.getErrorMessage(error, req, res).should.equal('Default required message'); }); it('uses global default error message if no type of field level messages are defined', () => { req.translate.withArgs('validation.default').returns('Global default'); const error = new ErrorClass('key', { type: 'required' }); controller.getErrorMessage(error, req, res).should.equal('Global default'); }); it('populates messages with field label', () => { req.translate.withArgs('validation.key.required').returns('Your {{label}} is required'); req.translate.withArgs('fields.key.label').returns('Field label'); const error = new ErrorClass('key', { type: 'required' }); controller.getErrorMessage(error, req, res).should.equal('Your field label is required'); }); it('populates messages with legend', () => { req.translate.withArgs('validation.key.required').returns('Your {{legend}} is required'); req.translate.withArgs('fields.key.legend').returns('date'); const error = new ErrorClass('key', { type: 'required' }); controller.getErrorMessage(error, req, res).should.equal('Your date is required'); }); it('populates maxlength messages with the maximum length', () => { req.translate.withArgs('validation.key.maxlength').returns('This must be less than {{maxlength}} characters'); const error = new ErrorClass('key', { type: 'maxlength', arguments: [10] }); controller.getErrorMessage(error, req, res).should.equal('This must be less than 10 characters'); }); it('populates minlength messages with the minimum length', () => { const message = 'This must be no more than {{minlength}} characters'; req.translate.withArgs('validation.key.minlength').returns(message); const error = new ErrorClass('key', { type: 'minlength', arguments: [10] }); controller.getErrorMessage(error, req, res).should.equal('This must be no more than 10 characters'); }); it('populates exactlength messages with the required length', () => { req.translate.withArgs('validation.key.exactlength').returns('This must be {{exactlength}} characters'); const error = new ErrorClass('key', { type: 'exactlength', arguments: [10] }); controller.getErrorMessage(error, req, res).should.equal('This must be 10 characters'); }); it('populates before messages with the required difference', () => { req.translate.withArgs('validation.key.before').returns('This must be more than {{diff}} ago'); const error = new ErrorClass('key', { type: 'before', arguments: [5, 'days'] }); controller.getErrorMessage(error, req, res).should.equal('This must be more than 5 days ago'); }); it('populates after messages with the required difference', () => { req.translate.withArgs('validation.key.after').returns('This must be less than {{diff}} ago'); const error = new ErrorClass('key', { type: 'after', arguments: [5, 'days'] }); controller.getErrorMessage(error, req, res).should.equal('This must be less than 5 days ago'); }); it('populates custom messages with the required constiable', () => { req.translate.withArgs('validation.key.custom').returns('This must be {{custom}}'); const error = new ErrorClass('key', { type: 'custom', arguments: ['dynamic'] }); controller.getErrorMessage(error, req, res).should.equal('This must be dynamic'); }); it('populates messages with values from `res.locals` when present', () => { req.translate.withArgs('validation.key.required').returns('This must be a {{something}}'); res.locals.something = 'value'; const error = new ErrorClass('key', { type: 'required' }); controller.getErrorMessage(error, req, res).should.equal('This must be a value'); }); }); }); });
34.811494
118
0.518755
1860a633eaba07c0f6e57bf80c111e1d99030eff
2,543
js
JavaScript
karma.conf.js
JeffHing/extend-this
e8d0ebb4a5c010b15833c47e92540e49bf551f51
[ "MIT" ]
null
null
null
karma.conf.js
JeffHing/extend-this
e8d0ebb4a5c010b15833c47e92540e49bf551f51
[ "MIT" ]
null
null
null
karma.conf.js
JeffHing/extend-this
e8d0ebb4a5c010b15833c47e92540e49bf551f51
[ "MIT" ]
null
null
null
/* * Copyright 2015. Author: Jeffrey Hing. All Rights Reserved. * * MIT License * * Karma configurations. */ 'use strict'; //------------------------------------- // Module dependencies and variables //------------------------------------- var flags = require('minimist')(process.argv.slice(2)); var path = require('path'); var karmaWebpackPlugin = require('karma-webpack'); var webpackConfig = require('./webpack.config'); /* * Creates a karma configuration. * * @param {string} sourceFile The source file to test * @param {array} loaders An array of loaders to apply to the source file. */ function createConf(sourceFile, loaders) { var allLoaders = []; var testFilesPattern = 'src/**/*.test.js'; if (loaders) { allLoaders.concat(loaders); } // Return a new instance each time. var conf = { browsers: ['PhantomJS'], files: [ // https://github.com/webpack/style-loader/issues/31 'node_modules/phantomjs-polyfill/bind-polyfill.js', testFilesPattern ], frameworks: ['jasmine'], plugins: [ karmaWebpackPlugin, 'karma-jasmine', 'karma-phantomjs-launcher' ], preprocessors: {}, reporters: [ 'dots' ], webpack: { module: { loaders: allLoaders }, resolve: { alias: {} } }, webpackMiddleware: { noInfo: true } }; // Resolve to the correct file for testing. conf.webpack.resolve.alias[webpackConfig.library.projectName] = path.join(__dirname, sourceFile); conf.preprocessors[testFilesPattern] = ['webpack']; return conf; } //------------------------------------- // Module exports //------------------------------------- if (flags['#kdist']) { // Test distribution file. module.exports = function(config) { config.set(createConf( 'dist/' + webpackConfig.library.filename )); }; } else if (flags['#kdistMin']) { // Test minimized distribution file. module.exports = function(config) { config.set(createConf( 'dist/' + webpackConfig.library.filenameMin )); }; } else if (flags['#kdev']) { // Test source file. module.exports = function(config) { config.set(createConf( webpackConfig.library.sourceFile, webpackConfig.library.sourceLoaders )); }; }
22.705357
74
0.533622
1861b3ef48b08d516a91760b9dbc6c0a22f5a2cc
14,653
js
JavaScript
test/unit/language-test.js
functioncreep/jwplayer
2726d0bd2bc65cd233172f6b9b613615d7205060
[ "Apache-2.0" ]
null
null
null
test/unit/language-test.js
functioncreep/jwplayer
2726d0bd2bc65cd233172f6b9b613615d7205060
[ "Apache-2.0" ]
null
null
null
test/unit/language-test.js
functioncreep/jwplayer
2726d0bd2bc65cd233172f6b9b613615d7205060
[ "Apache-2.0" ]
null
null
null
import { getLabel, getCode, getLanguage, translatedLanguageCodes, isTranslationAvailable, loadJsonTranslation, getCustomLocalization, isLocalizationComplete } from 'utils/language'; import * as Browser from 'utils/browser'; import en from 'assets/translations/en'; import sinon from 'sinon'; describe('languageUtils', function() { describe('getLabel from unsupported codes', function() { it('should not change value if there is no matching language code', function() { expect(getLabel()).to.equal(undefined); expect(getLabel(null)).to.equal(undefined); expect(getLabel('po')).to.equal('po'); expect(getLabel('pol')).to.equal('pol'); }); describe('getLabel from ISO 639-1 codes', function() { it('should be English for its codes', function() { const expected = 'English'; expect(getLabel('en')).to.equal(expected); }); it('should be Chinese for its codes', function() { const expected = 'Chinese'; expect(getLabel('zh')).to.equal(expected); }); it('should be Dutch for its codes', function() { const expected = 'Dutch'; expect(getLabel('nl')).to.equal(expected); }); it('should be French for its codes', function() { const expected = 'French'; expect(getLabel('fr')).to.equal(expected); }); it('should be German for its codes', function() { const expected = 'German'; expect(getLabel('de')).to.equal(expected); }); it('should be Japanese for its codes', function() { const expected = 'Japanese'; expect(getLabel('ja')).to.equal(expected); }); it('should be Portuguese for its codes', function() { const expected = 'Portuguese'; expect(getLabel('pt')).to.equal(expected); }); it('should be Italian for its codes', function() { const expected = 'Italian'; expect(getLabel('it')).to.equal(expected); }); it('should be Russian for its codes', function() { const expected = 'Russian'; expect(getLabel('ru')).to.equal(expected); }); it('should be Spanish for its codes', function() { const expected = 'Spanish'; expect(getLabel('es')).to.equal(expected); }); it('should map based only on the first two characters', function() { const expected = 'Portuguese'; expect(getLabel('pt-br')).to.equal(expected); }); }); describe('getLabel from ISO 639-2 codes', function() { it('should not change for its English codes', function() { expect(getLabel('eng')).to.equal('eng'); }); it('should not change for its Chinese codes', function() { expect(getLabel('zho')).to.equal('zho'); expect(getLabel('chi')).to.equal('chi'); }); it('should not change for its Dutch codes', function() { expect(getLabel('nld')).to.equal('nld'); expect(getLabel('dut')).to.equal('dut'); }); it('should not change for its French codes', function() { expect(getLabel('fra')).to.equal('fra'); expect(getLabel('fre')).to.equal('fre'); }); it('should not change for its Herman codes', function() { expect(getLabel('deu')).to.equal('deu'); expect(getLabel('ger')).to.equal('ger'); }); it('should not change for its Japanese codes', function() { expect(getLabel('jpn')).to.equal('jpn'); }); it('should not change for its Portuguese codes', function() { expect(getLabel('por')).to.equal('por'); }); it('should not change for its Italian codes', function() { expect(getLabel('ita')).to.equal('ita'); }); it('should not change for its Russian codes', function() { expect(getLabel('rus')).to.equal('rus'); }); it('should not change for its Spanish codes', function() { expect(getLabel('esp')).to.equal('esp'); expect(getLabel('spa')).to.equal('spa'); }); }); describe('getCode from ISO 639-1 codes', function() { it('should be English for its codes', function() { expect(getCode('English')).to.equal('en'); }); it('should be Chinese for its codes', function() { expect(getCode('Chinese')).to.equal('zh'); }); it('should be Dutch for its codes', function() { expect(getCode('Dutch')).to.equal('nl'); }); it('should be French for its codes', function() { expect(getCode('French')).to.equal('fr'); }); it('should be German for its codes', function() { expect(getCode('German')).to.equal('de'); }); it('should be Japanese for its codes', function() { expect(getCode('Japanese')).to.equal('ja'); }); it('should be Portuguese for its codes', function() { expect(getCode('Portuguese')).to.equal('pt'); }); it('should be Italian for its codes', function() { expect(getCode('Italian')).to.equal('it'); }); it('should be Russian for its codes', function() { expect(getCode('Russian')).to.equal('ru'); }); it('should be Spanish for its codes', function() { expect(getCode('Spanish')).to.equal('es'); }); it('should be Greek for its codes', function() { expect(getCode('Greek')).to.equal('el'); }); }); }); describe('getLanguage', function() { const sandbox = sinon.sandbox.create(); before(function() { if (Browser.isIE()) { this.skip(); } }); afterEach(function() { sandbox.restore(); }); function nullifyNavigatorProperty(property) { if (navigator[property]) { sandbox.stub(navigator, property).value(null); } } function stubNavigatorProperty(property, value) { if (navigator[property]) { sandbox.stub(navigator, property).value(value); } else { navigator[property] = value; } } function stubHtmlLanguage(doc, value) { const htmlTag = doc.querySelector('html'); sandbox.stub(htmlTag, 'getAttribute').withArgs('lang').returns(value); } it('should return the htlm lang attribute', function() { const htmlLanguage = 'htmlLanguage'; stubHtmlLanguage(document, htmlLanguage); expect(getLanguage()).to.equal(htmlLanguage); }); it('should return the top htlm lang attribute when iframe has no lang attribute', function() { const topHtmlLanguage = 'topHtmlLanguage'; stubHtmlLanguage(document, null); stubHtmlLanguage(window.top.document, topHtmlLanguage); sandbox.stub(Browser, 'isIframe').returns(true); expect(getLanguage()).to.equal(topHtmlLanguage); }); it('should fallback to navigator.language when html lang attribute is absent', function() { const language = 'language'; stubHtmlLanguage(document, null); stubNavigatorProperty('language', language); expect(getLanguage()).to.equal(language); }); it('should fallback to en when navigator.language is undefined', function() { stubHtmlLanguage(document, null); nullifyNavigatorProperty('language'); expect(getLanguage()).to.equal('en'); }); }); describe('JSON Translations', function() { const context = require.context('../../src/assets/translations', true, /\.json$/); const languageCodes = context.keys().map(key => key.substring(key.lastIndexOf('/') + 1, key.lastIndexOf('.'))); it('should match the list of supported translations', function() { expect(languageCodes).to.deep.equal(translatedLanguageCodes); }); it('should have same structure as localization default', function() { // TODO: add test that compares the structure of all the translation jsons to that of the default localization block to ensure consistency. // Limitation: require('../../src/assets/translations/fr.json') returns '264cfd10c44360a54a0772a576aa3dfd.json' }); }); describe('translationAvailable', function() { it('should be country code agnostic', function() { const regionalLanguageCode = translatedLanguageCodes[0] + '-HT'; expect(isTranslationAvailable(regionalLanguageCode)).to.be.true; }); it('should be caps agnostic', function() { const capitalizedLanguageCode = translatedLanguageCodes[0].toUpperCase(); expect(isTranslationAvailable(capitalizedLanguageCode)).to.be.true; }); it('should fail for codes that are not in translatedLanguageCodes', function() { expect(isTranslationAvailable('zz')).to.be.false; }); }); describe('Json translation load', function() { this.timeout(8000); it('should successfully fetch Spanish', function() { loadJsonTranslation('/base/test/files/', 'es').then(result => { expect(result).to.have.property('responseType').which.equals('json'); expect(result).to.have.property('status').which.equals(200); expect(result).to.have.property('response').which.is.an('object'); expect(Object.keys(result.response)).to.deep.equal(Object.keys(en)); }); }); }); describe('Get Custom Localization', function() { let intl; let localization; const frPlay = 'frPlay'; const frPause = 'frPause'; const frHtPlay = 'fr-HT-Play'; const localizationPlay = 'localizationPlay'; const localizationPause = 'localizationPause'; const localizationStop = 'localizationStop'; before(function() { localization = { play: localizationPlay, pause: localizationPause, stop: localizationStop }; intl = { fr: { play: frPlay, pause: frPause }, fr_HT: { play: frHtPlay } }; }); it('should override the custom localization with the intl block', function() { const customLocalization = getCustomLocalization(localization, intl, 'fr'); expect(customLocalization.play).to.equal(frPlay); expect(customLocalization.pause).to.equal(frPause); expect(customLocalization.stop).to.equal(localizationStop); }); it('should override the language code intl block with the language-Country code intl block', function() { const customLocalization = getCustomLocalization(localization, intl, 'fr-HT'); expect(customLocalization.play).to.equal(frHtPlay); expect(customLocalization.pause).to.equal(frPause); expect(customLocalization.stop).to.equal(localizationStop); }); it('should fallback to the intl block for the matching language code if the country code is different', function() { const customLocalization = getCustomLocalization(localization, intl, 'fr-CA'); expect(customLocalization.play).to.equal(frPlay); expect(customLocalization.pause).to.equal(frPause); expect(customLocalization.stop).to.equal(localizationStop); }); it('should fallback to localization if country code is not defined in intl block', function() { const customLocalization = getCustomLocalization(localization, intl, 'zz'); expect(customLocalization.play).to.equal(localizationPlay); expect(customLocalization.pause).to.equal(localizationPause); expect(customLocalization.stop).to.equal(localizationStop); }); }); describe('Is Localization Complete check', function() { let customLocalization; beforeEach(function() { customLocalization = en; customLocalization.play = 'customPlay'; customLocalization.pause = 'customPause'; customLocalization.stop = 'customStop'; customLocalization.related.heading = 'customRelatedHeading'; }); it('should be true when custom localization has the same keys as default localization', function() { expect(isLocalizationComplete(customLocalization)).to.be.true; }); it('should be false when custom localization is smaller than defaut localization', function() { customLocalization.play = undefined; expect(isLocalizationComplete(customLocalization)).to.be.false; }); it('should be false when custom localization sub-blocks are smaller than defaut localization', function() { customLocalization.advertising.admessage = undefined; expect(isLocalizationComplete(customLocalization)).to.be.false; }); it('should be false when custom localization has different keys than default localization', function() { customLocalization.play = undefined; customLocalization.newKey = 'new key'; expect(isLocalizationComplete(customLocalization)).to.be.false; }); it('should be false when custom localization sub-blocks have different keys than defaut localization', function() { customLocalization.sharing.copied = undefined; customLocalization.sharing.newKey = 'new key'; expect(isLocalizationComplete(customLocalization)).to.be.false; }); }); });
38.560526
181
0.564185
18623579df6230b85038be13f41afad46f73fb46
556
js
JavaScript
taller3/promedio.js
ernestozann/practico-javascript
2800cbae96cc408088ef48e1a0d9a0f1fdb3a27d
[ "MIT" ]
null
null
null
taller3/promedio.js
ernestozann/practico-javascript
2800cbae96cc408088ef48e1a0d9a0f1fdb3a27d
[ "MIT" ]
null
null
null
taller3/promedio.js
ernestozann/practico-javascript
2800cbae96cc408088ef48e1a0d9a0f1fdb3a27d
[ "MIT" ]
null
null
null
// const lista1 = [ // 100, // 200, // 300, // 400, // 500, // ]; // console.log("el promedio es: " + promedioLista1); function calcularMediaAritmetica(lista) { //Con ciclo for // let sumaLista = 0; // for (let i = 0; i < lista.length; i++) { // sumaLista = sumaLista + lista[i]; // } //con reduce const sumaLista = lista.reduce( function (valorAcumulado = 0, nuevoElemento) { return valorAcumulado + nuevoElemento; } ); const promedioLista = sumaLista / lista.length; console.log("La media de tu lista es: " + promedioLista); }
19.857143
58
0.627698
186277fd667b22ebdade6c5be873ee0e946e8c2d
71
js
JavaScript
isnumber/isnumber.js
themikefuller/issetjs
d1ece198def0fef88aa2c9f82c3f8c08a4f8cba7
[ "MIT" ]
null
null
null
isnumber/isnumber.js
themikefuller/issetjs
d1ece198def0fef88aa2c9f82c3f8c08a4f8cba7
[ "MIT" ]
null
null
null
isnumber/isnumber.js
themikefuller/issetjs
d1ece198def0fef88aa2c9f82c3f8c08a4f8cba7
[ "MIT" ]
null
null
null
module.exports = function(obj) { return !isNaN(parseFloat(obj)); }
17.75
35
0.676056
18627bd9f127dd3348d818bd7929240ff7761baa
712
js
JavaScript
src/handler.js
w10036w/api-gateway-server
78e96609d8095fef35c5f44602ec9f72800f8e2a
[ "Apache-2.0" ]
null
null
null
src/handler.js
w10036w/api-gateway-server
78e96609d8095fef35c5f44602ec9f72800f8e2a
[ "Apache-2.0" ]
null
null
null
src/handler.js
w10036w/api-gateway-server
78e96609d8095fef35c5f44602ec9f72800f8e2a
[ "Apache-2.0" ]
null
null
null
import slHttp from 'serverless-http' import playground from 'graphql-playground-middleware-lambda' import app from './server' exports.graphql = slHttp(app) // https://github.com/dherault/serverless-offline/issues/434#issuecomment-399310526 // exports.playground = async () => { // const service = await playground({ // endpoint: '/graphql', // }) // return service // } exports.playground = playground({ endpoint: '/graphql', }) // import { ApolloServer } from 'apollo-server-lambda' // import playground from 'graphql-playground-middleware-lambda' // import { config as apolloConfig } from './graphql' // const server = new ApolloServer(apolloConfig) // exports.graphql = server.createHandler()
29.666667
83
0.72191
186280fa558ea3303c5fa81dfbda9f697a03ca1d
647
js
JavaScript
tests/helpers/selector-stub.js
ciena-frost/ember-frost-table
3ba79000f9154813eb9c6176142cea0a30042fc8
[ "MIT" ]
1
2017-08-09T06:37:54.000Z
2017-08-09T06:37:54.000Z
tests/helpers/selector-stub.js
ciena-frost/ember-frost-table
3ba79000f9154813eb9c6176142cea0a30042fc8
[ "MIT" ]
57
2016-12-06T12:47:15.000Z
2018-06-29T12:20:18.000Z
tests/helpers/selector-stub.js
ciena-frost/ember-frost-table
3ba79000f9154813eb9c6176142cea0a30042fc8
[ "MIT" ]
11
2016-11-29T10:00:41.000Z
2017-09-06T17:36:49.000Z
/** * Test helper to stub a jQuery selector (something returned by this.$() within a component) * TODO: maybe move to ember-test-utils */ import sinon from 'sinon' const defaultStubbedMethods = [ 'css', 'find', 'on', 'scrollTop', 'scrollLeft' ] /** * @param {String[]} stubbedMethods - the names of methods to stub on this selector stub * @returns {*} a new selector stub */ export function createSelectorStub (...stubbedMethods) { const stub = {} if (stubbedMethods.length === 0) { stubbedMethods = defaultStubbedMethods } stubbedMethods.forEach((method) => { stub[method] = sinon.stub() }) return stub }
20.21875
92
0.666151
186289c9c9c1e48077adf0b761be87c4af49a5e7
323
js
JavaScript
doc/html/search/all_0.js
Loggi-pro/cph-lib
4109dd1d3cc780c9f76aa54c2322bbdcbfdfea67
[ "MIT" ]
null
null
null
doc/html/search/all_0.js
Loggi-pro/cph-lib
4109dd1d3cc780c9f76aa54c2322bbdcbfdfea67
[ "MIT" ]
null
null
null
doc/html/search/all_0.js
Loggi-pro/cph-lib
4109dd1d3cc780c9f76aa54c2322bbdcbfdfea67
[ "MIT" ]
null
null
null
var searchData= [ ['_5f_5falign_5fend_0',['__ALIGN_END',['../group___u_s_b_d___d_e_s_c___private___variables.html#ga542bfea0b6dcf06e06a505bdc49c7e04',1,'__ALIGN_END():&#160;usb_desc.h'],['../group___u_s_b_d___d_e_s_c___private___variables.html#ga542bfea0b6dcf06e06a505bdc49c7e04',1,'__ALIGN_END():&#160;usb_it.cpp']]] ];
64.6
301
0.80805
1862a804ae385e984fbe2cd5d77fa044891dad27
4,627
js
JavaScript
src/components/Button.js
xiaoguoqingxx/react-input
e787098da476442b45bc1df0d3de290acce1e3a0
[ "MIT" ]
1
2019-08-19T09:55:12.000Z
2019-08-19T09:55:12.000Z
src/components/Button.js
xiaoguoqingxx/react-input
e787098da476442b45bc1df0d3de290acce1e3a0
[ "MIT" ]
15
2019-08-16T06:28:01.000Z
2022-02-26T16:37:01.000Z
src/components/Button.js
xiaoguoqingxx/react-input
e787098da476442b45bc1df0d3de290acce1e3a0
[ "MIT" ]
null
null
null
import React, { Component } from 'react'; import '../css/font-awesome.min.css'; import '../css/font.css'; import styled, { css } from 'styled-components'; import PropTypes from 'prop-types'; import { color, initcolor } from '../config'; import { CheckIsColor } from '../common/trans'; import _ from "lodash"; const outer = css`${props => props.allcss}`; const iconcss = css`${props => props.iconCss}`; const Buttons = styled.div` ${props => props.width ? `width:${typeof props.width === "number" ? props.width - props.borderWidth * 2 + "px" : props.width};`:""}; height:${props => typeof props.height === "number" ? props.height - props.borderWidth * 2 + "px" : props.height}; position:relative; ${outer} button{ display: flex; flex-flow: row nowrap; justify-content: center; align-items: center; outline:none; height:100%; box-shadow:${props => props.boxShadow}; border-radius:${props => typeof props.borderRadius === "number" ? props.borderRadius + "px" : props.borderRadius}; border: ${props => props.borderWidth}px solid ${props => { if (props.usetheme) { if (CheckIsColor(props.theme)) { return props.theme } else { return color[props.theme] || props.borderColor } } else { return props.borderColor } }}; i{ color:${props=>props.iconColor}; font-size:${props => typeof props.iconSize === "number" ? props.iconSize + "px" : props.iconSize}; margin-right:5px; ${iconcss} } span{ color:${props => props.iconColor}; font-size:${props => typeof props.iconSize === "number" ? props.iconSize + "px" : props.iconSize}; margin-right:5px; &:before{ color:${props => props.iconColor}; font-size:${props => typeof props.iconSize === "number" ? props.iconSize + "px" : props.iconSize}; } ${iconcss} } background: ${props => { if (props.usetheme) { if (CheckIsColor(props.theme)) { return props.theme } else { return color[props.theme] || props.background } } else { return props.background } }}; ${props => props.width?`width:100%;`:"padding:0 10px;"} color:${props => props.fontColor}; cursor:${props=>props.cursor}; transition:all 0.2s; font-size:${props => typeof props.fontSize === "number" ? props.fontSize + "px" : props.fontSize}; } `; class Button extends Component { handleClick(e){ this.props.doClick && this.props.doClick(e); } render() { return ( <Buttons {...this.props} > <button type={this.props.type?this.props.type:"button"} onClick={this.handleClick.bind(this)}> { this.props.icon!=="" && this.props.icon } {this.props.name} </button> </Buttons> ); } } Button.defaultProps = { usetheme: false, theme: "blue", name: "搜索", height: 30, allcss: "", borderRadius: 2, borderWidth: 1, borderColor: initcolor, background: initcolor, fontSize: 14, fontColor: "#fff", cursor:"pointer", // icon:"", iconSize:14, iconColor:"#fff", iconCss:"", boxShadow:"none" }; Button.propTypes = { usetheme: PropTypes.bool, theme: PropTypes.string, name: PropTypes.string, boxShadow: PropTypes.string, width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]), height: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]), allcss: PropTypes.string, borderRadius: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]), borderWidth: PropTypes.number, borderColor: PropTypes.string, background: PropTypes.string, fontSize: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]), fontColor: PropTypes.string, cursor: PropTypes.string, iconSize: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]), // icon: PropTypes.element, iconColor: PropTypes.string, iconCss: PropTypes.string, }; export default Button;
31.47619
136
0.538146
1862cdaf833935481587ebe409af924eacfb2308
1,999
js
JavaScript
src/views/idp-discovery/IDPDiscoveryForm.js
zhiruidu-okta/okta-signin-widget
4988e112a5f8957be887e95c8436f0f23541513e
[ "Apache-2.0" ]
1
2020-10-22T23:00:55.000Z
2020-10-22T23:00:55.000Z
src/views/idp-discovery/IDPDiscoveryForm.js
zhiruidu-okta/okta-signin-widget
4988e112a5f8957be887e95c8436f0f23541513e
[ "Apache-2.0" ]
20
2020-07-15T19:48:09.000Z
2022-03-08T23:29:25.000Z
src/views/idp-discovery/IDPDiscoveryForm.js
zhiruidu-okta/okta-signin-widget
4988e112a5f8957be887e95c8436f0f23541513e
[ "Apache-2.0" ]
null
null
null
/*! * Copyright (c) 2015-2017, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ define([ 'okta', 'util/Util', 'views/primary-auth/PrimaryAuthForm' ], function (Okta, Util, PrimaryAuthForm) { var _ = Okta._; return PrimaryAuthForm.extend({ className: 'idp-discovery-form', save: function () { return Okta.loc('oform.next', 'login'); }, saveId: 'idp-discovery-submit', initialize: function () { this.listenTo(this, 'save', _.bind(this.model.save, this.model)); this.stateEnableChange(); }, inputs: function () { var inputs = []; var usernameProps = { className: 'margin-btm-30', label: Okta.loc('primaryauth.username.placeholder', 'login'), 'label-top': true, explain: Util.createInputExplain( 'primaryauth.username.tooltip', 'primaryauth.username.placeholder', 'login'), 'explain-top': true, inputId: 'idp-discovery-username', disabled: false }; inputs.push(_.extend(this.getUsernameField(), usernameProps)); if (this.settings.get('features.rememberMe')) { inputs.push(this.getRemeberMeCheckbox()); } return inputs; }, focus: function () { if (!this.model.get('username')) { this.getInputs().first().focus(); } else if(this.getInputs().toArray()[1]) { this.getInputs().toArray()[1].focus(); } } }); });
30.287879
120
0.631816
1863136f43fe7465e268667b4cb1c7876a6648bd
1,181
js
JavaScript
node_modules/vue-graph/src/base/methods-block3d.js
levibarasa/ladha_web
ffb2aeded059370a5d71308c1e37b3228279e1a8
[ "MIT" ]
null
null
null
node_modules/vue-graph/src/base/methods-block3d.js
levibarasa/ladha_web
ffb2aeded059370a5d71308c1e37b3228279e1a8
[ "MIT" ]
null
null
null
node_modules/vue-graph/src/base/methods-block3d.js
levibarasa/ladha_web
ffb2aeded059370a5d71308c1e37b3228279e1a8
[ "MIT" ]
null
null
null
export default { methods: { initGraphAxes: function() { let xAxis = { type : 'block', domain : this.labels, line : this.axisXStyle == "solid", hide : this.axisXStyle == "hidden" } let yAxis = { type : 'range', domain : this.getAxisMinAndMax(), step : this.axisStep, line : this.axisYStyle == "solid", hide : this.axisYStyle == "hidden" } let zAxis = { type : 'block', domain : this.names, line : this.axisZStyle == "solid", hide : this.axisZStyle == "hidden" } return { x : xAxis, y : yAxis, z : zAxis, depth : this.depth, perspective : this.perspective, degree : { x: this.angleX, y: this.angleY, z: this.angleZ }, data : this.convertToData(this.values) } } } }
28.804878
54
0.372566
1864a62c4bc1e76d14a2b7c189e6e4db45ac89e5
993
js
JavaScript
src/pages/index.js
sanny085/miniweb-gatsby
c50d2cb80b882af955b854292d672455e20b5408
[ "RSA-MD" ]
null
null
null
src/pages/index.js
sanny085/miniweb-gatsby
c50d2cb80b882af955b854292d672455e20b5408
[ "RSA-MD" ]
null
null
null
src/pages/index.js
sanny085/miniweb-gatsby
c50d2cb80b882af955b854292d672455e20b5408
[ "RSA-MD" ]
null
null
null
import React from "react" import { Link,graphql } from 'gatsby' import Layout from '../components/Layout' import Img from "gatsby-image" import '../styles/home.css' export default function Home({data}) { console.log("Home",data); // const {title, description} = props.data.site.siteMetadata; return ( <Layout> <section className="header"> <div> <h2>Design</h2> <h3>Develop & Deploy</h3> <p>UX designer & web developer based in Manchester.</p> <Link className="btn" to="/projects">My Portfolio Projects</Link> </div> {/*<img src="/banner.png" alt="Home site banner" style={{maxWidth:'85%'}}/>*/} <Img fluid={data.file.childImageSharp.fluid} /> {/*<p>{title}- {description}</p>*/} </section> </Layout> ) } export const query = graphql` query Banner { file(relativePath: {eq: "banner.png"}) { childImageSharp { fluid { ...GatsbyImageSharpFluid } } } } `;
26.131579
86
0.592145
1865b7c085e52045d905b4efe1039efd18cce8c4
8,695
js
JavaScript
App/Actions/frontPageActions.js
ahermida/Writer
4a54f58dac4951fee724ffa80a2231ae45f80249
[ "Apache-2.0" ]
null
null
null
App/Actions/frontPageActions.js
ahermida/Writer
4a54f58dac4951fee724ffa80a2231ae45f80249
[ "Apache-2.0" ]
null
null
null
App/Actions/frontPageActions.js
ahermida/Writer
4a54f58dac4951fee724ffa80a2231ae45f80249
[ "Apache-2.0" ]
null
null
null
/** * Actions triggered by the frontPage component, utility functions */ import w from '../w'; import store from '../Stores/store'; import frontPage from '../Components/frontPage'; import mainPage from '../Components/mainPage'; var frontPageActions = {}; //goes to the next item on the list /** * Trace Signup Input -- somewhat brute-forced * but the switch helps with edge cases */ frontPageActions.nextInputItem = () => { let formGuide = w.findId('formGuide'); let form = w.findId('formInput'); let note = w.findId('notification'); // set note if note doesn't exist if (!note) { w.insert(w.findId('formInputWrapperInner'), w.html(`<div class="fail" id="notification"></div>`)); note = w.findId('notification'); } switch (store.frontPage.targetItem) { case "username": store.frontPage.targetItem = "password"; form.placeholder = "Password"; form.type = "password"; formGuide.textContent = "New Password:"; note.className = "fail"; note.textContent = "Press Enter"; break; case "password": store.frontPage.targetItem = "firstName"; form.placeholder = "First name"; form.type = "text"; formGuide.textContent = "First Name:"; note.className = "fail"; note.textContent = "Press Enter"; break; case "firstName": store.frontPage.targetItem = "lastName"; form.placeholder = "Last name"; formGuide.textContent = "Last Name:"; note.className = "fail"; note.textContent = "Press Enter"; break; default: store.frontPage.targetItem = "lastName"; form.placeholder = "First name"; formGuide.textContent = "First Name:"; frontPageActions.signup(); break; } } /** * Traces through the previous item on the list */ frontPageActions.previousInputItem = () => { let formGuide = w.findId('formGuide'); let form = w.findId('formInput'); switch (store.frontPage.targetItem) { case "username": store.frontPage.targetItem = "username"; form.placeholder = "writer@villanova.edu"; formGuide.textContent = "Villanova Email:"; break; case "password": store.frontPage.targetItem = "username"; form.type = "text"; form.placeholder = "writer@villanova.edu"; formGuide.textContent = "Villanova Email:"; break; case "firstName": store.frontPage.targetItem = "password"; form.type="password"; form.placeholder = "Password"; formGuide.textContent = "Password:"; break; default: store.frontPage.targetItem = "firstName"; form.placeholder = "First name"; formGuide.textContent = "First Name:"; } } /** * Trace Login Form Input */ //goes to the previous item on the list frontPageActions.nextInputItemLogin = () => { let formGuide = w.findId('formGuide'); let form = w.findId('formInputLogin'); switch (store.frontPage.targetItem) { case "username": store.frontPage.targetItem = "password"; form.type = 'password'; form.placeholder = "Password"; formGuide.textContent = "Password:"; break; case "password": frontPageActions.login(); break; } } frontPageActions.previousInputItemLogin = () => { let formGuide = w.findId('formGuide'); let form = w.findId('formInputLogin'); switch (store.frontPage.targetItem) { case "username": store.frontPage.targetItem = "username"; form.type="text"; form.placeholder = "writer@villanova.edu"; formGuide.textContent = "Villanova Email:"; break; case "password": form.type = 'text'; store.frontPage.targetItem = "username"; form.placeholder = "writer@villanova.edu"; formGuide.textContent = "Villanova Email:"; break; } } /** * Form Validation -- I leave the regex outside of the functions so it doesn't need to re-compile */ let regexpEmail = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@villanova.edu/; function validateEmail(email) { return regexpEmail.test(email); } let regexpPassword = /(?=.*\d)(?=.*[a-zA-Z]).{7,}/; function validatePassword(input) { return regexpPassword.test(input); } let regexpName = /(?=[a-zA-Z]).{2,}/; function validateName(name) { return regexpName.test(name); } /** * Form Validation -- Parsing Input Items */ frontPageActions.parseItem = (input) => { let response = {}; switch (store.frontPage.targetItem) { case "username": response.success = validateEmail(input); response.message = "Invalid email address. It must be a villanova.edu email"; break; case "password": response.success = validatePassword(input); response.message = "Invalid password. It must contain 7+ characters and include letters and numbers"; break; case "firstName": response.success = validateName(input); response.message = "Please input your real name"; break; case "lastName": response.success = validateName(input); response.message = "Please input your real name"; break; } return response; } /** * Enter key is hit and fails validation */ frontPageActions.inputError = (message) => { //display message in notification let found = w.findId('notification'); if (found) { found.textContent = message } else { let inner = w.findId('formInputWrapperInner'); w.insert(inner, w.html(` <div class="success" id="notification">${message}</div> `)); } } /** * AJAX Stuff Here On */ /** POST Login Info */ frontPageActions.login = () => { w.post(`http://${location.host}/users/login`) .attach({ username: store.frontPage.login.username, password: store.frontPage.login.password }) .header('Access-Control-Allow-Headers', '*') .header('Content-Type', "application/json") .end(function(err, res){ if (err) { console.log(err); return; } else { if (res.body.success) { //handle successful login, save token -> load main view localStorage.WriterKey = res.body.token; frontPage.remove(); //load main view here. mainPage.initialize(); return; } else { let formGuide = w.findId('formGuide'); let form = w.findId('formInputLogin'); store.frontPage.targetItem = "username"; form.type = 'text'; form.placeholder = "writer@villanova.edu" formGuide.textContent = "Villanova Email:" //display res.message in notification let found = w.findId('notification'); if (found) { found.textContent = res.body.message; } else { w.insert(w.findId('formInputWrapperInner'), w.html(`<div class="success" id="notification">${res.body.message}</div>`)); } } } }); }; /** POST Signup Info */ frontPageActions.signup = () => { w.post(`http://${location.host}/users/make`) .attach({ username: store.frontPage.signup.username, password: store.frontPage.signup.password, firstName: store.frontPage.signup.firstName, lastName: store.frontPage.signup.lastName }) .header('Access-Control-Allow-Headers', '*') .header('Content-Type', "application/json") .end(function(err, res){ if (err) { console.log(err); return; } else { if (res.body.success) { let formGuide = w.findId('formGuide'); let form = w.findId('formInput'); form.placeholder = "writer@villanova.edu"; store.frontPage.targetItem = "username"; formGuide.textContent = "Villanova Email:"; //handle successful login, save token -> load main view //load main view here. let found = w.findId('notification'); if (found) { found.textContent = res.body.message; } else { w.insert(w.findId('formInputWrapperInner'), w.html(` <div class="success" id="notification">${res.body.message}</div> `)); } return; } else { let formGuide = w.findId('formGuide'); let form = w.findId('formInput'); form.placeholder = "writer@villanova.edu"; store.frontPage.targetItem = "username"; formGuide.textContent = "Villanova Email:"; //display res.body.message in notification let found = w.findId('notification'); if (found) { found.textContent = res.body.message; } else { w.insert(w.findId('formInputWrapperInner'), w.html(` <div class="success" id="notification">${res.body.message}</div> `)); } } } }); }; export default frontPageActions;
29.879725
130
0.615526
1865c746fd6da00c023cad4b2d2e4517f88099c0
2,943
js
JavaScript
app/components/candidate-preamble/Agenda.js
shinjonathan/undebate
935d3006a108eb6d635a66ec43e50a168eb4343e
[ "MIT" ]
19
2019-12-27T23:42:16.000Z
2021-12-21T04:49:45.000Z
app/components/candidate-preamble/Agenda.js
shinjonathan/undebate
935d3006a108eb6d635a66ec43e50a168eb4343e
[ "MIT" ]
224
2019-11-14T01:44:02.000Z
2022-03-04T18:53:51.000Z
app/components/candidate-preamble/Agenda.js
shinjonathan/undebate
935d3006a108eb6d635a66ec43e50a168eb4343e
[ "MIT" ]
17
2019-11-12T02:22:09.000Z
2022-03-08T06:15:43.000Z
'use strict' import React, { useState } from 'react' import { createUseStyles } from 'react-jss' import Button from '../button' import cx from 'classnames' const useStyles = createUseStyles({ container: { padding: '3em', border: '1px solid grey', marginTop: '4em', marginBottom: '3em', //Questions for Candidates '& h2': { marginTop: 0, fontSize: '2em', fontWeight: 700, }, '& h3': { fontSize: '1.33em', color: '#646464', fontWeight: 500, }, }, questionList: { textAlign: 'left', listStyleType: 'upper-alpha', listStylePosition: 'outside', marginTop: 0, marginBottom: 0, padding: '0', paddingLeft: '2em', color: '#3E3E3E', fontSize: '1.5em', fontWeight: '700', '& li': { paddingLeft: '1em', '& strong': { fontSize: '.75em', color: '#646464', }, paddingTop: '0.4em', }, }, questionListInner: { listStyleType: 'none', lineHeight: '2', paddingLeft: '0', color: '#646464', fontWeight: 600, fontSize: '.75em', '& li:not(:last-child):after': { content: '";"', }, '& li:last-child': { paddingBottom: '0', }, }, questionListInnerHeadless: { listStyleType: 'none', paddingLeft: '0', paddingTop: '0', '& li:first-child': { paddingTop: '0', }, '& li:last-child': { paddingBottom: '0', }, }, }) function Agenda({ candidate_questions, timeLimits }) { const classes = useStyles() console.log(candidate_questions) const makeQuestions = (className, questions, keyIndex = 'mq') => { return ( <ul className={className}> {questions.map((question, index) => typeof question === 'string' ? ( <li key={keyIndex + '-' + index}>{question}</li> ) : question.length === 1 ? ( <li key={keyIndex + '-' + index}> {question[0]} <strong> ( {timeLimits[index]} seconds )</strong> </li> ) : question[0][0] >= '0' && question[0][0] <= '9' ? ( <li> {makeQuestions(classes.questionListInnerHeadless, question, keyIndex + index)} <strong> ( {timeLimits[index]} seconds )</strong> </li> ) : ( <li> {question[0]} <strong> ( {timeLimits[index]} seconds )</strong> {makeQuestions(classes.questionListInner, question.slice(1), keyIndex + index)} </li> ) )} </ul> ) } return ( <div className={classes.container}> <h2>Questions for Candidates</h2> <h3>Here{"'"}s what you can expect:</h3> {makeQuestions( classes.questionList, candidate_questions && candidate_questions.slice(0, -1) ) /* the last thing in the list is the moderators closing remarks*/} </div> ) } export default Agenda
24.940678
93
0.530751
1866510630d003ef90188dbd887f3772cf67b71f
602
js
JavaScript
src/apps/finance/admin/views/customers/sales.js
mahaplatform/mahaplatform.com
a96d8f7b12288c7cb01b036077182238c77d5b03
[ "MIT" ]
null
null
null
src/apps/finance/admin/views/customers/sales.js
mahaplatform/mahaplatform.com
a96d8f7b12288c7cb01b036077182238c77d5b03
[ "MIT" ]
52
2019-10-28T15:38:35.000Z
2022-02-28T04:23:48.000Z
src/apps/finance/admin/views/customers/sales.js
mahaplatform/mahaplatform.com
a96d8f7b12288c7cb01b036077182238c77d5b03
[ "MIT" ]
null
null
null
import SalesReport from '../../components/sales_report' import PropTypes from 'prop-types' import React from 'react' class Sales extends React.Component { static propTypes = { customer: PropTypes.object } static defaultProps = {} render() { return <SalesReport { ...this._getSales() } /> } _getSales() { const { customer } = this.props return { endpoint: `/api/admin/finance/customers/${customer.id}/sales`, filter: { customer_id: { $in: [customer.id] } }, start: customer.created_at } } } export default Sales
18.242424
68
0.611296
18667bbaf2d9c2766e0759430a7ccbc74b355e37
2,590
js
JavaScript
config/webpack/loaders/style/loader.js
maxi-team/scripts
1125e551718d1f8f109b650b822a52d99799d52c
[ "MIT" ]
1
2021-08-29T10:45:38.000Z
2021-08-29T10:45:38.000Z
config/webpack/loaders/style/loader.js
maxi-team/scripts
1125e551718d1f8f109b650b822a52d99799d52c
[ "MIT" ]
1
2021-08-04T03:29:20.000Z
2021-08-10T14:59:29.000Z
config/webpack/loaders/style/loader.js
maxi-team/scripts
1125e551718d1f8f109b650b822a52d99799d52c
[ "MIT" ]
null
null
null
const path = require('path'); const createHash = require('webpack/lib/util/createHash'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const safePostCssParser = require('postcss-safe-parser'); const targets = require('../../../targets'); const MODULE_EXT = '.module.css'; const MODULE_SHORT_EXT = '.m.css'; const isModule = (name) => name.endsWith(MODULE_EXT) || name.endsWith(MODULE_SHORT_EXT); const isModuleIndex = (name) => name.includes('index.') && isModule(name); const contentfulName = (context, _, localName) => { if (isModuleIndex(context.resourcePath)) { return `${path.basename(context.context)}__${localName}`; } if (isModule(context.resourcePath)) { return `${path.basename(context.resourcePath, MODULE_EXT)}__${localName}`; } return localName; }; const minimalName = (context, _, localName) => { if (isModule(context.resourcePath)) { const name = path.relative(context.rootContext, context.resourcePath) + localName; const hash = createHash('xxhash64').update(name).digest('hex').slice(0, 7); return `m${hash}`; } return localName; }; /** * @param {'production'|'development'} mode */ module.exports = (mode = 'development') => { const isEnvProduction = mode === 'production'; const emit = isEnvProduction ? { loader: MiniCssExtractPlugin.loader, options: { publicPath: '../' } } : require.resolve('style-loader'); return [emit, { loader: require.resolve('css-loader'), options: { importLoaders: 1, sourceMap: !isEnvProduction, modules: { auto: isModule, exportLocalsConvention: 'asIs', getLocalIdent: isEnvProduction ? minimalName : contentfulName } } }, { loader: require.resolve('postcss-loader'), options: { implementation: require.resolve('postcss'), sourceMap: !isEnvProduction, postcssOptions: { config: false, parser: safePostCssParser, plugins: [ require('postcss-nested'), require('postcss-color-hex-alpha'), require('postcss-color-functional-notation'), require('postcss-overflow-shorthand'), require('postcss-replace-overflow-wrap'), require('postcss-image-set-function'), [require('autoprefixer'), { flexbox: 'no-2009', remove: false, overrideBrowserslist: targets[mode].postcss }], require('postcss-flexbugs-fixes'), require('../../plugins/postcss-warnings-plugin') ] } } }]; };
28.461538
88
0.628185
1866812b3a91822002a864c152e2a8eef6fc6bbd
3,024
js
JavaScript
src_js/enumerables/GroupJoinEnumerable.js
yaorb/linqjs
b22009ec32713d9a8ad346c7c371aef153471fbf
[ "MIT" ]
null
null
null
src_js/enumerables/GroupJoinEnumerable.js
yaorb/linqjs
b22009ec32713d9a8ad346c7c371aef153471fbf
[ "MIT" ]
null
null
null
src_js/enumerables/GroupJoinEnumerable.js
yaorb/linqjs
b22009ec32713d9a8ad346c7c371aef153471fbf
[ "MIT" ]
null
null
null
"use strict"; const IEnumerable = require("../IEnumerable"); const core = require("../core/core"); const methods = require("../methods/methods"); const defaultJoinSelector = require("../methods/defaultJoinSelector"); const defaultEqualityComparer = require("../methods/defaultEqualityComparer"); const defaultSelector = require("../methods/defaultSelector"); const equalityPredicate = require("../methods/equalityPredicate"); const IGrouping = require("./IGrouping"); class GroupJoinEnumerable extends IEnumerable { constructor( outer, inner, resultSelector = defaultJoinSelector, outerKeySelector = defaultSelector, innerKeySelector = defaultSelector, comparer = defaultEqualityComparer, ) { super(outer); outerKeySelector = methods.asSelector(outerKeySelector); innerKeySelector = methods.asSelector(innerKeySelector); comparer = methods.asEqualityComparer(comparer); core.defineProperty(this, Symbol.iterator, function* GroupJoinIterator() { let outerIndex = 0, innerIndex = 0, innerIterator = inner[Symbol.iterator](); let outers = new Map(), inners = new Map(); let noneKey = Symbol("noneKey"); let grouped = false; let isGrouped = () => grouped; let innerHasNext = () => { let next = innerIterator.next(); if (!next.done) { let innerElement = next.value; let innerKey = innerKeySelector(next.value, innerIndex++); let array; if (inners.has(innerKey)) { array = inners.get(innerKey); } else { let outerKey = core .asEnumerable(outers.keys()) .where((outerKey) => comparer(outerKey, innerKey)) .firstOrDefault(noneKey); if (outerKey !== noneKey) { array = outers.get(outerKey).array; } else { array = []; } inners.set(innerKey, array); } array.push(innerElement); } else { grouped = true; } return !next.done; }; let outerKey; let comparerInner = (innerKey) => comparer(outerKey, innerKey); let innerArray = (innerKey) => inners.get(innerKey); for (let outerElement of outer) { outerKey = outerKeySelector(outerElement, outerIndex++); let innerKeys = core .asEnumerable(inners.keys()) .where(comparerInner) .toArray(); let array; if (innerKeys.length) { array = core.asEnumerable(innerKeys).selectMany(innerArray).toArray(); for (let innerKey of innerKeys) { inners.set(innerKey, array); } } else { array = []; } let grouping = new IGrouping(outerKey, array, innerHasNext, isGrouped); outers.set(outerKey, { array, grouping }); yield resultSelector(outerElement, grouping); outerIndex++; } }); } } module.exports = GroupJoinEnumerable;
31.831579
80
0.602844
186755424449f077ed072ab03c5ff02b3a9a1ef3
1,870
js
JavaScript
models/shop.js
chinalijinglun/Mittes_Node
13b8440fbd3e9eabb168fd82d9578fd52501980f
[ "MIT" ]
null
null
null
models/shop.js
chinalijinglun/Mittes_Node
13b8440fbd3e9eabb168fd82d9578fd52501980f
[ "MIT" ]
null
null
null
models/shop.js
chinalijinglun/Mittes_Node
13b8440fbd3e9eabb168fd82d9578fd52501980f
[ "MIT" ]
null
null
null
const db = require("../config/db"); const Sequelize = db.sequelize; const Shop = Sequelize.import("../services/shop.js"); const Brand = Sequelize.import("../services/brand.js"); const CategoryFirst = Sequelize.import("../services/categoryFirst.js"); const CategorySecond = Sequelize.import("../services/categorySecond.js"); CategoryFirst.hasMany(CategorySecond,{foreignKey:'parent_id',as:'children'}); class ShopModel { static async getShopList(type) { return await Shop.findAll({ where:{type} }); } //添加商品 static async addShop(data) { return await Shop.create({ type:data.shopType, name:data.name, img:data.imageUrl, update_time: Date.now(), create_time: Date.now(), price:data.price, property:data.property, brand_name:data.brandName, category_first_name: data.categoryFirstName, category_second_name: data.categorySecondName, total_count:data.count, offer_price: data.offerPrice, volume: 0 }) } //删除商品,type更新为isDelete static async deleteShop(data) { return await Shop.update({ type:'isDelete' },{ where:{id:data.id} }) } //发货后跟新shops表的销量(volume) static async incrementVolume(data) { return await Shop.findById(data.id).then(shop => { shop.increment({ volume:data.volume }); }).catch(err => { console.log(err) }) } //查询一级品类、二级品类名 static async getCategoryNames() { return await CategoryFirst.findAll({ attributes:[['name','label'],['name','value']], include:[{ model:CategorySecond, attributes:[['name','label'],['name','value']], as:'children' }] }) } //查询品类名列表 static async getBrandNames() { return await Brand.findAll({ attributes:[['name','label'],['name','value']] }) } } module.exports = ShopModel;
25.616438
77
0.632086
186814504042b49c11cf1d77341d39340504aa34
1,283
js
JavaScript
src/containers/app.js
meandmycode/react-ideation
aeca365656c58624d58c2f96f0c2e7955b2318f0
[ "MIT" ]
null
null
null
src/containers/app.js
meandmycode/react-ideation
aeca365656c58624d58c2f96f0c2e7955b2318f0
[ "MIT" ]
9
2017-08-15T09:53:15.000Z
2017-08-15T17:11:54.000Z
src/containers/app.js
meandmycode/react-ideation
aeca365656c58624d58c2f96f0c2e7955b2318f0
[ "MIT" ]
3
2017-10-04T10:04:25.000Z
2020-11-20T14:22:21.000Z
import React from 'react'; import { connect } from 'react-redux'; import * as ideaActions from '../actions/ideas'; import * as ideaViewActions from '../actions/ideas-view'; import IdeasView from './ideas-view'; import Shell from '../components/shell'; const createRandomKey = () => Math.random().toString(16); const mapStateToProps = ({ ideasView }) => ({ ideasView }); const mapDispatchToProps = ({ onCreate: ideaActions.create, onSetSortType: ideaViewActions.setSortType, onSetSortDescending: ideaViewActions.setSortDescending, }); class App extends React.Component { handleCreate = () => this.props.onCreate({ title: '' }, createRandomKey(), true) // TODO: remove empty title render() { const { ideasView, onSetSortType, onSetSortDescending } = this.props; return ( <Shell sortType={ideasView.sortType} sortDescending={ideasView.sortDescending} sortTypes={ideasView.sortTypes} onChangeSortType={onSetSortType} onChangeSortDescending={onSetSortDescending} onCreateIdea={this.handleCreate}> <IdeasView /> </Shell> ); } } export default connect(mapStateToProps, mapDispatchToProps)(App);
29.837209
112
0.646921
1868e8cb403c82d14ccc8cc6ad09cfe5f9b19a2c
475
js
JavaScript
src/core/api.js
demonmhon/react-17x-starter
a77c13fe485a22be17c9f115247d25b3514edf86
[ "MIT" ]
null
null
null
src/core/api.js
demonmhon/react-17x-starter
a77c13fe485a22be17c9f115247d25b3514edf86
[ "MIT" ]
6
2021-02-22T15:25:47.000Z
2021-08-19T19:30:17.000Z
src/core/api.js
demonmhon/react-16x-starter
2f816a552e8bf93f8e3955e3d9dc118a1281e66e
[ "MIT" ]
null
null
null
import axios from 'axios'; import { getConfig } from './config'; const getBaseURL = () => { const { api } = getConfig(); const { baseURL, version } = api; const v = version ? `/${version}` : ''; return `${baseURL}${v}`; }; export default { async getHealth() { return await axios .request({ baseURL: getBaseURL(), method: 'get', url: '/health', }) .then((response) => response.data) .catch(() => null); }, };
19.791667
41
0.528421
18692f16626d07a1a79ff570a6596fa01227847a
2,415
js
JavaScript
events/interaction/create.js
scratchaddons-community/scadd
cda05217b186e57a7b60f5b3e7d44a7e02e6c2da
[ "MIT" ]
7
2022-01-23T19:49:32.000Z
2022-03-10T20:35:57.000Z
events/interaction/create.js
scratchaddons-community/scadd
cda05217b186e57a7b60f5b3e7d44a7e02e6c2da
[ "MIT" ]
25
2022-01-17T15:54:35.000Z
2022-03-25T13:32:35.000Z
events/interaction/create.js
scratchaddons-community/scadd
cda05217b186e57a7b60f5b3e7d44a7e02e6c2da
[ "MIT" ]
5
2022-02-03T15:50:49.000Z
2022-03-28T19:54:53.000Z
import { GuildMember } from "discord.js"; import warn from "../../common/moderation/warns.js"; import { censor, badWordsAllowed } from "../../common/moderation/automod.js"; import fetchCommands from "../../common/commands.js"; import { getWarns } from "../../commands/view-warns.js"; /** @type {import("../../types/event").default<"interactionCreate">} */ const event = { async event(interaction) { if ( interaction.isButton() && interaction.customId.endsWith("_strike") && interaction.member instanceof GuildMember ) { return await getWarns( (data) => interaction.reply(data), interaction.customId.split("_strike")[0] ?? null, interaction.member, ); } if (!interaction.isCommand()) return; const command = (await fetchCommands(this)).get(interaction.commandName); if (!command) throw new ReferenceError(`Command \`${interaction.commandName}\` not found.`); try { if ( command.censored === "channel" ? !badWordsAllowed(interaction.channel) : command.censored ?? true ) { const censored = censorOptions(interaction.options.data); if (censored.isBad) { await Promise.all([ interaction.reply({ ephemeral: true, content: "Language!" }), warn( interaction.member instanceof GuildMember ? interaction.member : interaction.user, `Watch your language!`, censored.strikes, censored.words.join("\n"), ), ]); return; } } await command.interaction(interaction); } catch (error) { await interaction[interaction.replied ? "editReply" : "reply"]({ ephemeral: true, content: "An error occurred.", embeds: [], components: [], files: [], }); throw error; } }, }; export default event; /** @param {readonly import("discord.js").CommandInteractionOption[]} options */ function censorOptions(options) { let strikes = 0, isBad = false, /** @type {string[]} */ words = []; options.forEach((option) => { if (typeof option.value === "string") { const censored = censor(option.value); if (censored) { isBad = true; strikes += censored.strikes; words.push(option.value); } } if (option.options) { const censored = censorOptions(option.options); if (censored.isBad) { isBad = true; strikes += censored.strikes; words.push(...censored.words); } } }); return { isBad, strikes, words }; }
26.25
94
0.633126
1869af6ee8a47bc85a8171c0e221c2e060a1b39e
5,938
js
JavaScript
src/components/reader.js
amazing-js/san-cli-ui-widget-reader
72a977669fb239a49f133ebe91f65de983e9e3b1
[ "MIT" ]
null
null
null
src/components/reader.js
amazing-js/san-cli-ui-widget-reader
72a977669fb239a49f133ebe91f65de983e9e3b1
[ "MIT" ]
null
null
null
src/components/reader.js
amazing-js/san-cli-ui-widget-reader
72a977669fb239a49f133ebe91f65de983e9e3b1
[ "MIT" ]
null
null
null
/** * @file 阅读器组件 * @author Lohoyo <824591872@qq.com> */ import './reader.less'; export default { template: /* html */` <div class="reader"> <div s-if="loading" class="widget-loading"> <s-spin spinning="{=loading=}"> <s-icon slot="indicator" type="loading" style="font-size: 24px;" /> </s-spin> </div> <div s-elif="error" class="error"> <s-icon type="{{errIcons[error]}}"/> <div>{{$t('san-cli-ui-widget-reader.errors.' + error)}}</div> </div> <fragment s-else> <nav> <article s-for="item in feed.items" class="news-item {{selectedItem === item ? 'news-item-selected' : ''}}" on-click="handleClick(item)"> <div> <div class="title" title={{item.title}}>{{item.title}}</div> <div class="snippet">{{item.contentSnippet}}</div> <span class="date">{{item.pubDate | dateFormat}}</span> <a href="{{item.link}}" target="_blank" rel="noopener noreferrer"> {{$t('san-cli-ui-widget-reader.origin')}} </a> </div> </article> </nav> <main s-html="selectedItem['content:encoded'] || selectedItem.content"></main> <div s-if="selectedItem.enclosure" class="media"> <img s-if="isImg" src="{{selectedItem.enclosure.url}}"/> <audio s-if="isAudio" src="{{selectedItem.enclosure.url}}" controls></audio> <video s-if="isVideo" src="{{selectedItem.enclosure.url}}" controls></video> </div> </fragment> </div> `, computed: { isImg() { const selectedItem = this.data.get('selectedItem'); return selectedItem && selectedItem.enclosure && selectedItem.enclosure.type.indexOf('image/') === 0; }, isAudio() { const selectedItem = this.data.get('selectedItem'); return selectedItem && selectedItem.enclosure && selectedItem.enclosure.type.indexOf('audio/') === 0; }, isVideo() { const selectedItem = this.data.get('selectedItem'); return selectedItem && selectedItem.enclosure && selectedItem.enclosure.type.indexOf('video/') === 0; } }, filters: { dateFormat(d) { return new Date(d).toLocaleString(); } }, initData() { return { loading: false, feed: null, error: null, selectedItem: null, errIcons: { fetch: 'close', offline: 'disconnect', empty: 'frown' } }; }, created() { this.addAction(); }, attached() { const url = this.data.get('data.config.url'); if (url) { this.fetchFeed(); this.currentUrl = url; } this.watch('data.config.url', value => { const url = this.data.get('data.config.url'); // 有时data.config.url明明没有变化,却监听到了变化,所以这里做了下判断,判断到底有没有变化 if (url === this.currentUrl) { return; } value && this.fetchFeed(); this.currentUrl = url; }); this.watch('loading', value => { !value && this.addAction(); }); }, addAction() { this.dispatch('Widget:addHeaderAction', { id: 'reload', icon: 'reload', disabled: this.data.get('loading'), onCalled: () => this.fetchFeed(true), tooltip: this.$t('san-cli-ui-widget-reader.actionTooltip.reload') }); }, async fetchFeed(force = false) { this.data.set('selectedItem', null); if (!navigator.onLine) { this.data.set('loading', false); this.data.set('error', 'offline'); return; } this.data.set('loading', true); this.data.set('error', false); this.dispatch('Widget:title', null); try { const {results, errors} = await this.$callPluginAction('san-cli-ui-widget-reader.actions.fetch-news', { // 如果是知乎专栏的地址,就转换成对应的RSS,原理见https://rss.lilydjwg.me/ url: this.data.get('data.config.url').replace( /zhuanlan.zhihu.com|www.zhihu.com\/column/, 'rss.lilydjwg.me/zhihuzhuanlan' ), force }); if (errors.length && errors[0]) { throw new Error(errors[0]); } let feed = results[0]; if (feed && feed.items && feed.items.length) { feed.items.forEach(item => this.imgSrcReplace(item)); this.data.set('feed', feed); this.data.set('selectedItem', feed.items[0]); this.dispatch('Widget:title', feed.title); } else { this.data.set('error', 'empty'); } } catch (e) { this.data.set('error', 'fetch'); // eslint-disable-next-line no-console console.error(e); } this.data.set('loading', false); }, handleClick(value) { this.data.set('selectedItem', value); }, imgSrcReplace(item) { let match = item.link.match(/^http(s)?:\/\/(.*?)\//); let domain = match ? match[0] : ''; item.content = item.content.replace(/src=\"\/([^"]*\")/g, (m, s1) => 'src="' + domain + s1); } };
33.738636
115
0.460256
1869d849f9d4586ec82a524c9bfb2388a38ad365
76
js
JavaScript
docs/html/search/pages_0.js
kachark/FormFlight
94189581ecd28ab5d9d30e2b171a3fa3296029a7
[ "MIT" ]
5
2019-11-03T06:35:28.000Z
2021-05-25T16:21:28.000Z
docs/html/search/pages_0.js
kachark/FormFlight
94189581ecd28ab5d9d30e2b171a3fa3296029a7
[ "MIT" ]
null
null
null
docs/html/search/pages_0.js
kachark/FormFlight
94189581ecd28ab5d9d30e2b171a3fa3296029a7
[ "MIT" ]
null
null
null
var searchData= [ ['formflight',['FormFlight',['../index.html',1,'']]] ];
15.2
54
0.565789
186a1152a19304e12cb6cea524475dec8f85cb75
405
js
JavaScript
middlewares/response.middleware.js
montakarlo/work3
bb89ab2c7c8cd31a91abf0ef98069555e22b1f46
[ "MIT" ]
null
null
null
middlewares/response.middleware.js
montakarlo/work3
bb89ab2c7c8cd31a91abf0ef98069555e22b1f46
[ "MIT" ]
3
2021-10-06T19:03:08.000Z
2022-02-27T07:05:23.000Z
middlewares/response.middleware.js
montakarlo/work3
bb89ab2c7c8cd31a91abf0ef98069555e22b1f46
[ "MIT" ]
null
null
null
const responseMiddleware = (req, res, next) => { let obj = req.body if (obj[0] == 404){ res.status(obj[0]); res.json({ error: true, message: obj[1]}) } else if(obj[0] == 400){ res.status(obj[0]); res.json({ error: true, message: obj[1]}) } else { next() }; } exports.responseMiddleware = responseMiddleware;
21.315789
48
0.491358
186a97557046e2d25aee937653baa3c92dad03b1
1,489
js
JavaScript
app/directives/editable.js
remonbonbon/study-angular
31f011a13d6c3a893702600d0587195c89ceb023
[ "MIT" ]
null
null
null
app/directives/editable.js
remonbonbon/study-angular
31f011a13d6c3a893702600d0587195c89ceb023
[ "MIT" ]
null
null
null
app/directives/editable.js
remonbonbon/study-angular
31f011a13d6c3a893702600d0587195c89ceb023
[ "MIT" ]
null
null
null
(function() { 'use strict'; function editable($timeout) { return { restrict: 'A', replace: false, templateUrl: 'directives/editable.html', scope: { editable: '=', onChange: '&', }, link: function(scope, element, attrs) { scope.editing = false; element.bind(attrs.editableOn || 'click', function() { scope.begin(); }); scope.begin = function() { if (scope.editing) return; console.log('editable: begin'); scope.editing = true; scope.editingText = scope.editable; // Focus after the input element is shown. $timeout(function() { element.find('input')[0].focus(); }, 0); }; scope.cancel = function() { if (!scope.editing) return; console.log('editable: cancel'); scope.editing = false; }; scope.done = function() { if (!scope.editing) return; console.log('editable: done'); scope.editing = false; scope.editable = scope.editingText; }; scope.onKeydown = function(event) { var key = event.keyCode || event.which; // On Escape key if (key === 27) return scope.cancel(); // On Enter key if (key === 13) return scope.done(); }; } }; } angular.module('app').directive('editable', [ '$timeout', editable ]); })();
26.589286
62
0.501679
186aad1b664b267d83f55cc607da222600c0bcca
1,651
js
JavaScript
src/hooks/team-member-populate.js
ankemp/br-api
a4e85061d1e9eb0c5a87a731847ec659930acf14
[ "MIT" ]
null
null
null
src/hooks/team-member-populate.js
ankemp/br-api
a4e85061d1e9eb0c5a87a731847ec659930acf14
[ "MIT" ]
null
null
null
src/hooks/team-member-populate.js
ankemp/br-api
a4e85061d1e9eb0c5a87a731847ec659930acf14
[ "MIT" ]
null
null
null
// Use this hook to manipulate incoming or outgoing data. // For more information on hooks see: http://docs.feathersjs.com/api/hooks.html const brApi = require('../battlerite-api'); const map = require('../battlerite-api/entitymapper'); const _ = require('lodash'); const Promise = require('bluebird'); function getPlayersData(playerIds) { return brApi.getPlayers({ playerIds }) .then(response => map.players(response)) } module.exports = function (options = {}) { // eslint-disable-line no-unused-vars return async context => { if (!!context.app && !!context.result) { const sequelizeClient = context.app.get('sequelizeClient'); const teamMembersService = context.app.service('teamMembers'); const playersService = context.app.service('players'); const teamMembers = context.result.members.map(playerId => { return { playerId, teamId: context.result.id }; }); const playerIds = context.result.members; return getPlayersData(playerIds) .then(async players => { await Promise.map(players, player => { return sequelizeClient.models.players.findOrCreate({ where: { id: player.id }, defaults: player }) }) return players; }) .then(async players => { await Promise.map(teamMembers, tm => { return sequelizeClient.models.teamMembers.findOrCreate({ where: { ...tm } }); }); return players; }) .then(players => { context.result.players = _.map(players, p => _.pick(p, ['id', 'name'])); return context; }); } return context }; };
34.395833
110
0.622047
186ba1257bad57d50563f1ee8b76711031a1d13d
4,340
js
JavaScript
final/.history/client/src/pages/Home/components/Files_20191119133106.js
DNature/graphql_api_starter
c926a24741f96ce1b51b0455f064d7b9f5f88554
[ "MIT" ]
null
null
null
final/.history/client/src/pages/Home/components/Files_20191119133106.js
DNature/graphql_api_starter
c926a24741f96ce1b51b0455f064d7b9f5f88554
[ "MIT" ]
14
2021-03-09T22:13:10.000Z
2022-02-27T04:09:57.000Z
final/.history/client/src/pages/Home/components/Files_20191119132706.js
DNature/graphql_api_starter
c926a24741f96ce1b51b0455f064d7b9f5f88554
[ "MIT" ]
1
2019-11-02T17:44:30.000Z
2019-11-02T17:44:30.000Z
import React, { useState, useEffect } from "react"; import gql from "graphql-tag"; import { useQuery } from "@apollo/react-hooks"; import { Container, Card, CardHeader, CardMedia, CardContent, Avatar, Divider, Typography, Button } from "@material-ui/core"; import { withStyles } from "@material-ui/styles"; const UPLOADS_QUERY = gql` query singleFile { singleFile(fileId: "5dd3a77462d69e5387a099b0") { id path description user filename mimetype } } `; const styles = theme => ({ ...theme.theme, avatar: { background: theme.palette.primary.main }, media: { height: 0, paddingTop: "56.25%" // 16:9 }, divider: { marginTop: theme.spacing(3) } }); const Files = props => { const { classes } = props; const { data } = useQuery(UPLOADS_QUERY); const { singleFile } = data.singleFile; if (singleFile) { console.log(singleFile); } return ( <> {/* {singleFile && ( <Container maxWidth="sm" key={singleFile._id}> <Card> <CardHeader avatar={ <Avatar aria-label="recipe" className={classes.avatar}> {singleFile.filename} </Avatar> } title={singleFile.filename} /> {singleFile.mimetype === "image/jpg" || singleFile.mimetype === "image/png" || singleFile.mimetype === "image/jpeg" || singleFile.mimetype === "image/gif" ? ( <CardMedia className={classes.media} image={singleFile.path} title={singleFile.filename} /> ) : ( <Container> <Button component="a" href={singleFile.path} target="_black" variant="outlined" color="primary" > Download </Button> </Container> )} <CardContent> <Typography variant="body2" component="p"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae enim suscipit illum eos iste assumenda soluta iusto voluptate. Dicta pariatur atque consectetur dignissimos architecto ducimus minima fuga veniam quae aliquid. </Typography> </CardContent> </Card> <Divider className={classes.divider} /> </Container> )} */} <h1>hello</h1> </> ); }; export default withStyles(styles)(Files); /*{getFiles && getFiles.map(file => ( <Container maxWidth="sm" key={file._id}> <Card> <CardHeader avatar={ <Avatar aria-label="recipe" className={classes.avatar}> {file.filename[0]} </Avatar> } title={file.filename} /> {file.mimetype === 'image/jpg' || file.mimetype === 'image/png' || file.mimetype === 'image/jpeg' || file.mimetype === 'image/gif' ? ( <CardMedia className={classes.media} image={file.path} title={file.filename} /> ) : ( <Container> <Button component="a" href={file.path} target="_black" variant="outlined" color="primary" > Download </Button> </Container> )} <CardContent> <Typography variant="body2" component="p"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae enim suscipit illum eos iste assumenda soluta iusto voluptate. Dicta pariatur atque consectetur dignissimos architecto ducimus minima fuga veniam quae aliquid. </Typography> </CardContent> </Card> <Divider className={classes.divider} /> </Container> ))} */
28
80
0.473272
186bc83e32f4a2572376a305442af4ec61a5a326
1,132
js
JavaScript
app/dialogs/menu.js
jpalioto/cfsbot
a246fffcd8f23570b8cf72010cfb57f8f873ebd9
[ "MIT" ]
null
null
null
app/dialogs/menu.js
jpalioto/cfsbot
a246fffcd8f23570b8cf72010cfb57f8f873ebd9
[ "MIT" ]
null
null
null
app/dialogs/menu.js
jpalioto/cfsbot
a246fffcd8f23570b8cf72010cfb57f8f873ebd9
[ "MIT" ]
null
null
null
const builder = require('botbuilder'); const cfsApi = require('../utilities/apihandler.js'); const resources = require('../utilities/resources.js') function parseResult(res) { var mealItems = []; res.forEach( e => { e.MealItems.forEach( mi => mealItems.push(mi.Name) ); }); return mealItems; } module.exports = function (bot) { bot.dialog('/menuDialog', [ (s) => { var mealItems; var menu = cfsApi.callApi('menu', null, parseResult); menu .then( mealItems => { builder.Prompts.choice(s, resources.menuIngredients, mealItems.join('|'), { listStyle: builder.ListStyle.list }) } ) }, (s,r) => { if( r.response.entity ) { var choice = r.response.entity; s.send('You chose ' + choice); s.endDialog(); } } ]); };
25.727273
65
0.422261
186dfa27b8b034e14fd4f882a2c751d71b193352
1,665
js
JavaScript
core/modules/filters/compare.js
idotobi/TiddlyWiki5
e71a27ac2d71f2e48f9e4e9156b59bb3ecc2a105
[ "BSD-3-Clause" ]
null
null
null
core/modules/filters/compare.js
idotobi/TiddlyWiki5
e71a27ac2d71f2e48f9e4e9156b59bb3ecc2a105
[ "BSD-3-Clause" ]
null
null
null
core/modules/filters/compare.js
idotobi/TiddlyWiki5
e71a27ac2d71f2e48f9e4e9156b59bb3ecc2a105
[ "BSD-3-Clause" ]
null
null
null
/*\ title: $:/core/modules/filters/compare.js type: application/javascript module-type: filteroperator General purpose comparison operator \*/ (function(){ /*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; exports.compare = function(source,operator,options) { var suffixes = operator.suffixes || [], type = (suffixes[0] || [])[0], mode = (suffixes[1] || [])[0], typeFn = types[type] || types.number, modeFn = modes[mode] || modes.eq, invert = operator.prefix === "!", results = []; source(function(tiddler,title) { if(modeFn(typeFn(title,operator.operand)) !== invert) { results.push(title); } }); return results; }; var types = { "number": function(a,b) { return compare($tw.utils.parseNumber(a),$tw.utils.parseNumber(b)); }, "integer": function(a,b) { return compare($tw.utils.parseInt(a),$tw.utils.parseInt(b)); }, "string": function(a,b) { return compare("" + a,"" +b); }, "date": function(a,b) { var dateA = $tw.utils.parseDate(a), dateB = $tw.utils.parseDate(b); if(!isFinite(dateA)) { dateA = new Date(0); } if(!isFinite(dateB)) { dateB = new Date(0); } return compare(dateA,dateB); }, "version": function(a,b) { return $tw.utils.compareVersions(a,b); } }; function compare(a,b) { if(a > b) { return +1; } else if(a < b) { return -1; } else { return 0; } }; var modes = { "eq": function(value) {return value === 0;}, "ne": function(value) {return value !== 0;}, "gteq": function(value) {return value >= 0;}, "gt": function(value) {return value > 0;}, "lteq": function(value) {return value <= 0;}, "lt": function(value) {return value < 0;} } })();
21.623377
68
0.612012
187013392c790f652eddc76a756bd554b3ca93b5
906
js
JavaScript
src/components/_layouts/main/MusicPlayer/NowPlaying.js
topclassic/react-nextjs-course-2020
50069665931a3a7957b1f5c6695c2ba6903e9360
[ "MIT" ]
null
null
null
src/components/_layouts/main/MusicPlayer/NowPlaying.js
topclassic/react-nextjs-course-2020
50069665931a3a7957b1f5c6695c2ba6903e9360
[ "MIT" ]
null
null
null
src/components/_layouts/main/MusicPlayer/NowPlaying.js
topclassic/react-nextjs-course-2020
50069665931a3a7957b1f5c6695c2ba6903e9360
[ "MIT" ]
null
null
null
import React from 'react' import { Flex, Box } from '@grid' import colors from '@features/_ui/colors' import { inject } from '@lib/store' export default inject('playerStore')(NowPlaying) function NowPlaying({ playerStore }) { const { image, title, subTitle } = playerStore.nowPlaying return ( <Flex css={{ padding: '0 15px', }}> <Box css={{ paddingRight: '15px' }}> <img src={image} alt="" css={{ width: '55px', height: '55px' }} /> </Box> <Box> <Flex css={{ height: '100%', flexDirection: 'column', justifyContent: 'center', }}> <Box> <h3 css={{ color: colors.link, fontSize: '0.9em' }}>{title}</h3> </Box> <Box> <small css={{ fontSize: '0.8em' }}>{subTitle}</small> </Box> </Flex> </Box> </Flex> ) }
25.166667
76
0.496689
1870157501b311a292b80aedc420913ae12e9b98
1,291
js
JavaScript
eagle/web/js/project/util/sync_products.js
Ruchitayadav/erp_opensource
5ebb83f6990dc4a37bca28c3d429eb139441e7c1
[ "Apache-2.0" ]
216
2019-08-23T08:42:36.000Z
2022-03-12T14:58:57.000Z
eagle/web/js/project/util/sync_products.js
BodihTao/erp_opensource
f34c34d9484dca6c10659d6765bbcce82016e81a
[ "Apache-2.0" ]
2
2020-10-02T15:19:22.000Z
2021-06-20T17:03:52.000Z
eagle/web/js/project/util/sync_products.js
BodihTao/erp_opensource
f34c34d9484dca6c10659d6765bbcce82016e81a
[ "Apache-2.0" ]
93
2019-09-06T01:14:29.000Z
2022-03-27T05:18:27.000Z
(function($){ window.LBSyncProducts = function(dom){ var $this = $(dom), $modal = $this.getModal(), $progress = $this.find('progress'), $cancel = $this.find('.modal-close'), $submit = $this.find('.btn-important'); $submit.on('click',function(e){ $submit.attr('disabled','disabled'); var data = $modal.serializeObject(); $.post('/manual_sync/sync/get-queue-by-user',data,function(res){ // 开始同步 var queue_id = res.queue_id, done = function(){ clearInterval(st); $submit.removeAttr('disabled'); $cancel.on('click',function(){ setTimeout(function(){ $.location.reload(); },1000); }); }, getProgress = function(){ return $.get('/manual_sync/sync/get-progress-by-user',{ type:data.type }).then(function(res){ var v = res.progress % 100; $progress.val(v); $modal.find('[data-count]').text(res.progress); if(res.status=='C'){ $progress.val(100); $modal.find('p.text-success').show(); $modal.find('.sending').hide(); done(); } if(res.status=='F'){ $modal.find('p.text-danger').show(); done(); } }); }, st = setInterval(getProgress,3000); }); }); }; })(jQuery);
24.826923
67
0.539117
1870ad14e56c2bc055effa9e4fbe4718ac4ba7fb
3,217
js
JavaScript
.e2e_tests/features/002_colors/step_defs.js
yourorg/IriBluBuilt
ba362ce0c39bbf0bb3e0d205c8e584ceb359c0a9
[ "MIT" ]
null
null
null
.e2e_tests/features/002_colors/step_defs.js
yourorg/IriBluBuilt
ba362ce0c39bbf0bb3e0d205c8e584ceb359c0a9
[ "MIT" ]
null
null
null
.e2e_tests/features/002_colors/step_defs.js
yourorg/IriBluBuilt
ba362ce0c39bbf0bb3e0d205c8e584ceb359c0a9
[ "MIT" ]
null
null
null
/* eslint-disable no-undef */ const cukeBtnSubmit = '//button[@data-cuke="save-item"]'; const cukeInpAge = '//input[@data-cuke="age"]'; const cukeInpTitle = '//input[@data-cuke="title"]'; const cukeInpContent = '//textarea[@data-cuke="content"]'; const cukeAge = '//x-cuke[@id="age"]'; const cukeTitle = '//x-cuke[@id="title"]'; const cukeContent = '//x-cuke[@id="content"]'; const cukeInvalidAge = '//span[@class="help-block error-block"]'; let age = ''; let title = ''; let content = ''; module.exports = function () { // Scenario: Create a new color // ------------------------------------------------------------------------ this.Given(/^I have opened the 'add colors' page : "([^"]*)"$/, function (_url) { browser.setViewportSize({ width: 1024, height: 480 }); browser.timeouts('implicit', 60000); browser.timeouts('page load', 60000); browser.url(_url); server.call('_colors.wipe'); }); this.When(/^I create a "([^"]*)" years old "([^"]*)" item with text "([^"]*)",$/, function (_age, _title, _content) { age = _age; title = _title; content = _content; browser.waitForEnabled( cukeBtnSubmit ); browser.setValue(cukeInpTitle, title); browser.setValue(cukeInpAge, age); browser.setValue(cukeInpContent, content); browser.click(cukeBtnSubmit); }); this.Then(/^I see a new record with the same title, age and contents\.$/, function () { expect(browser.getText(cukeAge)).toEqual(age + ' years old.'); expect(browser.getText(cukeTitle)).toEqual(title); expect(browser.getText(cukeContent)).toEqual(content); }); // ======================================================================= // Scenario: Verify field validation // ------------------------------------------------------------------------ this.Given(/^I have opened the colors list page : "([^"]*)"$/, function (_url) { browser.setViewportSize({ width: 1024, height: 480 }); browser.timeoutsImplicitWait(60000); browser.url(_url); }); this.When(/^I set 'Age' to "([^"]*)"$/, function (_age) { browser.setValue(cukeInpAge, _age); }); this.Then(/^I see the age validation hint "([^"]*)"\.$/, function (_message) { expect(browser.getText(cukeInvalidAge)).toEqual(_message); }); // ======================================================================= // Scenario: Fail to delete color // ------------------------------------------------------------------------ let color = ''; this.Given(/^I have elected to view the "([^"]*)" item,$/, function (_color) { color = _color; const cukeHrefColor = `//a[@data-cuke="${color}"]`; browser.waitForEnabled( cukeHrefColor ); browser.click( cukeHrefColor ); }); // ======================================================================= // Scenario: Prohibited from add and from update // ------------------------------------------------------------------------ this.Given(/^I have opened the colors editor page : "([^"]*)"$/, function (_url) { browser.setViewportSize({ width: 1024, height: 480 }); browser.timeouts('implicit', 60000); browser.timeouts('page load', 60000); browser.url(_url); }); };
29.787037
89
0.522847
1870c8c009482e01ed88897847c592a298f04fa8
2,825
js
JavaScript
packages/shared/ReactSymbols.js
richardcowherd/react
d116818d36498560e7e049e4e478b282bad6d3e6
[ "MIT" ]
2
2020-11-05T19:38:43.000Z
2020-11-05T19:39:30.000Z
packages/shared/ReactSymbols.js
richardcowherd/react
d116818d36498560e7e049e4e478b282bad6d3e6
[ "MIT" ]
31
2021-01-22T02:39:58.000Z
2022-03-08T23:32:12.000Z
packages/shared/ReactSymbols.js
richardcowherd/react
d116818d36498560e7e049e4e478b282bad6d3e6
[ "MIT" ]
4
2017-11-10T14:58:16.000Z
2022-02-23T12:35:17.000Z
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ // ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. export let REACT_ELEMENT_TYPE = 0xeac7; export let REACT_PORTAL_TYPE = 0xeaca; export let REACT_FRAGMENT_TYPE = 0xeacb; export let REACT_STRICT_MODE_TYPE = 0xeacc; export let REACT_PROFILER_TYPE = 0xead2; export let REACT_PROVIDER_TYPE = 0xeacd; export let REACT_CONTEXT_TYPE = 0xeace; export let REACT_FORWARD_REF_TYPE = 0xead0; export let REACT_SUSPENSE_TYPE = 0xead1; export let REACT_SUSPENSE_LIST_TYPE = 0xead8; export let REACT_MEMO_TYPE = 0xead3; export let REACT_LAZY_TYPE = 0xead4; export let REACT_FUNDAMENTAL_TYPE = 0xead5; export let REACT_SCOPE_TYPE = 0xead7; export let REACT_OPAQUE_ID_TYPE = 0xeae0; export let REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; export let REACT_OFFSCREEN_TYPE = 0xeae2; export let REACT_LEGACY_HIDDEN_TYPE = 0xeae3; if (typeof Symbol === 'function' && Symbol.for) { const symbolFor = Symbol.for; REACT_ELEMENT_TYPE = symbolFor('react.element'); REACT_PORTAL_TYPE = symbolFor('react.portal'); REACT_FRAGMENT_TYPE = symbolFor('react.fragment'); REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode'); REACT_PROFILER_TYPE = symbolFor('react.profiler'); REACT_PROVIDER_TYPE = symbolFor('react.provider'); REACT_CONTEXT_TYPE = symbolFor('react.context'); REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); REACT_SUSPENSE_TYPE = symbolFor('react.suspense'); REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); REACT_MEMO_TYPE = symbolFor('react.memo'); REACT_LAZY_TYPE = symbolFor('react.lazy'); REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental'); REACT_SCOPE_TYPE = symbolFor('react.scope'); REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); } const MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; const FAUX_ITERATOR_SYMBOL = '@@iterator'; export function getIteratorFn(maybeIterable: ?any): ?() => ?Iterator<*> { if (maybeIterable === null || typeof maybeIterable !== 'object') { return null; } const maybeIterator = (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === 'function') { return maybeIterator; } return null; }
39.236111
83
0.76708
1870d33ac59cad317cb47be2e3eb32b2b6bf929b
2,173
js
JavaScript
routes/index.js
sangamangreg/myflexsearch
257b47344b6d3d1373ada09c6aaae8d597d522b9
[ "Apache-2.0" ]
1
2021-03-19T10:15:04.000Z
2021-03-19T10:15:04.000Z
routes/index.js
sangamangreg/myflexsearch
257b47344b6d3d1373ada09c6aaae8d597d522b9
[ "Apache-2.0" ]
null
null
null
routes/index.js
sangamangreg/myflexsearch
257b47344b6d3d1373ada09c6aaae8d597d522b9
[ "Apache-2.0" ]
null
null
null
const express = require("express"); const FlexSearch = require("flexsearch"); const wsData = require("../daos/alan_data"); const preset = "score"; const searchIndex = new FlexSearch(preset); const router = express.Router(); function buildIndex() { const data = wsData.data; console.info("Building index starts"); for (let i = 0; i < 100; i++) { const content = data[i].title + " " + data[i].content; const key = i + 1; searchIndex.add(key, content); // console.info(key + " ===== " + content); } console.info("Building index ends"); } buildIndex(); // search API to respond back to client query router.get("/search", async (request, response, next) => { try { if (searchIndex.length === 0) { await buildIndex(); } const phrase = request.query.phrase; if (!phrase) { throw Error("phrase query parameter empty"); } const results = findDocument(phrase); let htmlResult = "<div style='display: inline;'>"; for (let i =0; i<results.length; i++) { htmlResult = htmlResult + "<div style='box-shadow: 1px 1px #dadada;border: 1px solid #dadada;min-height: 250px;width: 30%;float: left;padding: 5px;margin: 15px;'><div style='line-height: 2rem;'><strong>" + results[i].title + "</strong></div>"; htmlResult = htmlResult + "<div class='content'>" + results[i].content + "</div></div>"; } htmlResult = htmlResult + "</div>"; response.writeHead(200,"{Content-Type:text/html}"); response.end(htmlResult); } catch (e) { next(e); } }); // This function to find document function findDocument(str) { console.info("Searching by: " + str); const resultIds = searchIndex.search({ query: str, suggest: true, limit:20 }); console.info("results: " + resultIds.length); console.info(resultIds); const results = getDataByIds(resultIds); return results; } // once we have ids in return we have to get data. function getDataByIds(idsList) { const result = []; const data = wsData.data; for (let i = 0; i < data.length; i++) { if (idsList.includes(i + 1)) { result.push(data[i]); } } return result; } module.exports = router;
28.220779
249
0.630005
1870fe1f5ae0250db5dd6532ac0064ea84c4a83b
219
js
JavaScript
recursion.js
kurapikats/js-patterns-algorithms
bf47a629c900b1dde7f01d3be26c1dd749c2dce7
[ "MIT" ]
null
null
null
recursion.js
kurapikats/js-patterns-algorithms
bf47a629c900b1dde7f01d3be26c1dd749c2dce7
[ "MIT" ]
null
null
null
recursion.js
kurapikats/js-patterns-algorithms
bf47a629c900b1dde7f01d3be26c1dd749c2dce7
[ "MIT" ]
null
null
null
// decompose the problem to small subset // and repeat calling it var factorial = function fac(num) { if (num === 1) { return 1; } return num * fac(num - 1); }; var final = factorial(5); console.log(final);
16.846154
40
0.630137
187263890ca9becb65652ec9a94a110b4aa0974f
487
js
JavaScript
013 - Deployment of Webpack Apps/src/components/video_list.js
oobeya-space/RallyCodingWeekly
acda863ee55fe5af19c3e9e9bceed997dcf0ec0c
[ "MIT" ]
193
2016-05-26T01:09:03.000Z
2021-01-14T16:07:09.000Z
013 - Deployment of Webpack Apps/src/components/video_list.js
mrpanchal/RallyCodingWeekly
acda863ee55fe5af19c3e9e9bceed997dcf0ec0c
[ "MIT" ]
4
2016-08-21T08:19:53.000Z
2018-09-23T16:53:29.000Z
013 - Deployment of Webpack Apps/src/components/video_list.js
mrpanchal/RallyCodingWeekly
acda863ee55fe5af19c3e9e9bceed997dcf0ec0c
[ "MIT" ]
125
2016-06-10T22:47:44.000Z
2021-08-29T22:01:46.000Z
import React, { Component } from 'react'; import VideoItem from './video_item'; export default class VideoList extends Component { render() { return ( <div className="col-md-4 list-group"> {this.videos()} </div> ); } videos() { return this.props.videos.map((video, index) => { return ( <VideoItem onClick={() => this.props.onVideoSelect(index)} key={video.etag} video={video} /> ); }); } }
19.48
57
0.542094
1872784923d653b37ce6274ddc7f45d337a16bfc
6,943
js
JavaScript
pages/init/init.js
fenglui/bicycle
219dee758c5069f0bd78674e5aabad1680f27564
[ "MIT" ]
189
2018-06-10T12:33:00.000Z
2019-01-16T16:18:27.000Z
pages/init/init.js
LiWeipeng88/xiaochengxu
c92140907af9bd3c7e2201ae806a7f948f23b2cb
[ "MIT" ]
1
2020-12-17T13:34:16.000Z
2020-12-17T13:34:16.000Z
pages/init/init.js
LiWeipeng88/xiaochengxu
c92140907af9bd3c7e2201ae806a7f948f23b2cb
[ "MIT" ]
40
2018-06-11T02:46:50.000Z
2018-12-12T06:58:44.000Z
// pages/homepage/index.js // import { BICYCLE } from '../../config/api'; var amapFile = require('../../libs/amap-wx.js'); var myAmapFun = new amapFile.AMapWX({ key: '3ceda24f073cb81026899a937b3c7422' }); const app = getApp(); Page({ data: { //当前经纬度对 longitude: 116.397390, latitude: 39.908860, //单车数组 markers: [], //缩放比 scale: 18, // 记录上一次的经纬度 lastLongitude: 0, lastLatitude: 0, //绘制线路的数组 polyline: [], distanceArr: [] }, /*生命周期函数--监听页面加载*/ onLoad: function(options) { wx.showLoading({ title: '加载中', }) //获取位置信息 wx.getLocation({ type: 'gcj02', success: (res) => { let longitude = res.longitude; let latitude = res.latitude; this.setData({ longitude, latitude }, () => { this.tocreate(res) //生成随机单车 this.mapCtx.getCenterLocation({ type: 'gcj02', success: (res) => { //计算最近的单车 this.nearestBic(res) } }) wx.hideLoading(); //隐藏loading }) } }) }, onReady() { // 创建map上下文 保存map信息的对象 this.mapCtx = wx.createMapContext('myMap'); }, onHide: function() { //清除单车数据 wx.removeStorage({ key: 'bicycle' }) }, //复位按钮 已完成 toReset() { //复位后调整缩放比,提升体验 this.mapCtx.moveToLocation(); this.setData({ scale: 18 }) }, // 跳转到个人中心 toUser() { //模拟鉴权 if (!app.globalData.loginStatus) { return wx.showModal({ title: '提示', content: '请先登录', success: (res) => { if (res.confirm) { wx.navigateTo({ url: '/pages/login/login' }) } } }) } //若为模拟登录状态直接跳转 return wx.navigateTo({ url: '/pages/userCenter/userCenter', }) }, // 跳转到消息 toMsg() { wx.navigateTo({ url: '/pages/messageCenter/messageCenter', }) }, // 扫码开锁 toScan() { if (!app.globalData.loginStatus) { return wx.showModal({ title: '提示', content: '请先登录', success: (res) => { if (res.confirm) { wx.navigateTo({ url: '/pages/login/login' }) } } }) } return wx.scanCode({ success: (res) => { onlyFromCamera: false, console.log('扫码成功'); wx.navigateTo({ url: '/pages/unlock/unlock', }) } }) }, regionchange(e) { this.mapCtx.getCenterLocation({ type: 'gcj02', success: (res) => { if (e.type == 'begin') { // 拿到起点经纬度 this.setData({ lastLongitude: res.longitude, lastLatitude: res.latitude, polyline: [] }) } else { // 拿到当前经纬度 let lon_distance = res.longitude - this.data.lastLongitude; let lat_distance = res.latitude - this.data.lastLatitude; // 判断屏幕移动距离,如果超过设定的阈值,模拟刷新单车 if (Math.abs(lon_distance) >= 0.005 || Math.abs(lat_distance) >= 0.001) { this.setData({ // 清空 markers: [] }) this.tocreate(res) } } this.nearestBic(res) } }) }, //随机函数,根据所在地 模拟单车经纬度数据伪造单车 tocreate(res) { // 随机单车数量设置 let markers = this.data.markers; let ran = Math.ceil(Math.random() * 20 + 5); for (let i = 0; i < ran; i++) { // 定义一个临时单车对象 var t_bic = { "id": 0, "iconPath": "/images/map-bicycle.png", "callout": {}, "latitude": 0, "longitude": 0, "width": 52.5, "height": 30 } // 随机 var sign_a = Math.random(); var sign_b = Math.random(); // 单车分布密集度设置 var a = (Math.ceil(Math.random() * 99)) * 0.00002; var b = (Math.ceil(Math.random() * 99)) * 0.00002; t_bic.id = i; t_bic.longitude = (sign_a > 0.5 ? res.longitude + a : res.longitude - a); t_bic.latitude = (sign_b > 0.5 ? res.latitude + b : res.latitude - b); markers.push(t_bic); } // console.log(markers) //将模拟的单车数据暂时存储到本地 wx.setStorageSync('bicycle', markers); this.setData({ markers }) }, // 自动判断距离最近的单车的方法 nearestBic(res) { // 找出最近的单车 let markers = this.data.markers; let min_index = 0; let distanceArr = []; for (let i = 0; i < markers.length; i++) { let lon = markers[i].longitude; let lat = markers[i].latitude; // 计算距离 let t = Math.sqrt((lon - res.longitude) * (lon - res.longitude) + (lat - res.latitude) * (lat - res.latitude)); let distance = t; // 将每一次计算的距离加入数组 distanceArr distanceArr.push(distance) } //从距离数组中找出最小值,js是弱类型,数字不能直接比较大小。需要进行转换用 parseFloat(小数) | parseInt(整数) let min = distanceArr[0]; for (let i = 0; i < distanceArr.length; i++) { if (parseFloat(distanceArr[i]) < parseFloat(min)) { min = distanceArr[i]; min_index = i; } } // console.log(distanceArr) // console.log(min_index) let callout = `markers[${min_index}].callout`; // 清楚旧的气泡,设置新气泡 wx.getStorage({ key: 'bicycle', success: (res) => { this.setData({ markers: res.data, [callout]: { "content": '离我最近', "color": "#ffffff", "fontSize": "16", "borderRadius": "50", "padding": "10", "bgColor": "#0082FCaa", "display": 'ALWAYS' } }) } }) }, toVisit(e) { let bic = e.markerId; wx.getStorage({ key: 'bicycle', success: (res) => { this.route(res.data[bic]) } }) }, route(bic) { // 获取当前中心经纬度 this.mapCtx.getCenterLocation({ success: (res) => { // 调用高德地图步行路径规划API myAmapFun.getWalkingRoute({ origin: `${res.longitude},${res.latitude}`, destination: `${bic.longitude},${bic.latitude}`, success: (data) => { let points = []; if (data.paths && data.paths[0] && data.paths[0].steps) { let steps = data.paths[0].steps; for (let i = 0; i < steps.length; i++) { let poLen = steps[i].polyline.split(';'); for (let j = 0; j < poLen.length; j++) { points.push({ longitude: parseFloat(poLen[j].split(',')[0]), latitude: parseFloat(poLen[j].split(',')[1]) }) } } } // 设置map组件polyline,绘制线路 this.setData({ polyline: [{ points: points, color: "#ffffffaa", arrowLine: true, borderColor: "#E5B140", borderWidth: 1, width: 5, }] }); } }) } }) } })
24.97482
117
0.476595
1872b3ff3866a18f91cc0c8ac27e5b0cc3773e98
265
js
JavaScript
docs/html-sketchapp.config.js
FastNinja/seek-style-guide
b85195c97da7f226086b5ca485d92ab62f9e6eba
[ "MIT" ]
304
2017-01-13T04:23:52.000Z
2021-12-31T03:16:59.000Z
docs/html-sketchapp.config.js
FastNinja/seek-style-guide
b85195c97da7f226086b5ca485d92ab62f9e6eba
[ "MIT" ]
279
2017-01-13T01:09:49.000Z
2020-07-29T00:05:36.000Z
docs/html-sketchapp.config.js
FastNinja/seek-style-guide
b85195c97da7f226086b5ca485d92ab62f9e6eba
[ "MIT" ]
64
2017-02-13T05:31:19.000Z
2021-12-31T03:16:59.000Z
module.exports = { serve: 'docs/dist', url: '/sketch-exports', outDir: 'dist/asketch', viewports: { Desktop: '1024x768', 'Mobile Plus': '414x736', Mobile: '320x568' }, puppeteerArgs: ['--no-sandbox', '--disable-setuid-sandbox'].join(' ') };
22.083333
71
0.6
1872f0021450daf0cfb1134274939e3a257b340b
662
js
JavaScript
src/http/api.js
danielokoronkwo-coder/Arthemcare
4d667561b596cceb7e09db7b29369116a5b73f41
[ "MIT" ]
null
null
null
src/http/api.js
danielokoronkwo-coder/Arthemcare
4d667561b596cceb7e09db7b29369116a5b73f41
[ "MIT" ]
null
null
null
src/http/api.js
danielokoronkwo-coder/Arthemcare
4d667561b596cceb7e09db7b29369116a5b73f41
[ "MIT" ]
null
null
null
/* eslint-disable */ import * as axios from 'axios'; const token = localStorage.getItem('token') const instance = axios.create({ // baseURL: 'http://localhost:8000/api/v1', baseURL: 'https://arthemcare-api.herokuapp.com/api/v1', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': `Bearer ${token}` } }); instance.interceptors.request.use(function (config) { // console.log("interceptor...") // console.log(config) const token = localStorage.getItem('token') config.headers.Authorization = `Bearer ${token}`; return config; }); export default instance;
25.461538
59
0.645015
18736e816051319fd4e4d0daaf78dd44916f2730
75
js
JavaScript
src/components/register-form/index.js
T-Muller/SE_frontEnd
472e661b7288cd3c1504b7b3b3bb2ceed03e8649
[ "MIT" ]
8
2019-12-23T06:16:24.000Z
2021-04-08T02:26:13.000Z
src/components/register-form/index.js
T-Muller/SE_frontEnd
472e661b7288cd3c1504b7b3b3bb2ceed03e8649
[ "MIT" ]
null
null
null
src/components/register-form/index.js
T-Muller/SE_frontEnd
472e661b7288cd3c1504b7b3b3bb2ceed03e8649
[ "MIT" ]
2
2020-11-04T08:45:36.000Z
2021-01-13T05:06:38.000Z
import registerForm from './register-form.vue' export default registerForm
25
46
0.826667
18742e59f1c044e2a86f5357f43600d4257c1fc0
3,340
js
JavaScript
my_otp.js
FrenzY8/discord-otp-webhook
b2ed33c842ce416c2771c664e0213cdc617f4298
[ "BSD-3-Clause" ]
2
2021-11-27T12:16:34.000Z
2021-11-27T15:56:37.000Z
my_otp.js
FrenzY8/login-otp-nodejs
b2ed33c842ce416c2771c664e0213cdc617f4298
[ "BSD-3-Clause" ]
null
null
null
my_otp.js
FrenzY8/login-otp-nodejs
b2ed33c842ce416c2771c664e0213cdc617f4298
[ "BSD-3-Clause" ]
null
null
null
/*** YOUR TOOLS WITH OTP DISCORD WEBHOOK ***/ // Thanks for use this script but if you wanted to recode/something re-publish // please mention the creator, you can read License Permission for more info // your webhook is never leaked, so ya, use thats (webhook.json) // Impostors will never can get your webhook, cause it Encrypted // Thanks to 'Cryptr' on npm to helps me get it. // Donates me in (saweria.co/FrenzyS6) /*** Thank You For Use This ***/ /*** Load Files ***/ const readline = require('readline'); const Cryptr = require('cryptr') const cryptr = new Cryptr('myTotalySecretKey') var rl = readline.createInterface({ input: process.stdin, output: process.stdout }) const { Webhook } = require('discord-webhook-node') /*** load your webhook ***/ const { headerWeb, bodyWeb, tokenWeb } = require('./webhook.json'); /*** ENCRYPT DECRYPT ***/ // encrypt the Webhook let headerEnc = cryptr.encrypt(headerWeb); let bodyEnc = cryptr.encrypt(bodyWeb); let tokenEnc = cryptr.encrypt(tokenWeb); // decrypt the webhook let headerDec = cryptr.decrypt(headerEnc); let bodyDec = cryptr.decrypt(bodyEnc); let tokenDec = cryptr.decrypt(tokenEnc); /*** create the webhook one ***/ const webhookMsg = new Webhook("" + headerDec + bodyDec + tokenDec + "") let saveall = "Done."; /*** THE OTP FUNCTION ***/ function frenzyOTP(len) { var str = ""; for (var i = 0; i < len; i++) { // Loop the len /*** GENERATE THE OTP ***/ var rand = Math.floor(Math.random() * 62); var charCode = rand += rand > 9 ? (rand < 36 ? 55 : 61) : 48; str += String.fromCharCode(charCode); // (function)) } // then => returned return str; // (str) the function } /*** Example : frenzyOTP( NUMBER )) ***/ // Use : frenzyOTP(6) Normal OTP is 6 Words /*** make let for Readline function ***/ let otpFunction = frenzyOTP(6); // You can set the number/words as you like /*** Send the OTP Code ***/ webhookMsg.send(`Eyo new OTP code has generated.\n> ${otpFunction}`); /*** GAVE THEY NOTIFICATIONS ***/ console.log("[+] Go to your channel webhook to see OTP") rl.question("Enter the OTP : ", rlOtp => { // Anti-Cheat if(rlOtp == "") { console.log("Please enter the otp :3") } else { if(rlOtp == otpFunction) { console.log("True OTP!") // CODE HERE console.log(saveall); } else { console.log("Wrong OTP, you're not Human.") } } }) /********** LICENSE **********/ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /********** END OF LICENSED **********/ // Created by FrenzySG (saweria.co/FrenzyS6) // Idea/Maker : FrenzySG // Encryptor : Cryptr
34.43299
83
0.673952
187573418a50b29e9aaf59200c756ad6f7d84b61
1,036
js
JavaScript
lib/cron.js
illutio-ra/landing-page--realidadaumentada.app
c99fe99c7efac0e21b2c3dfb1742a4af87df3e5c
[ "MIT" ]
null
null
null
lib/cron.js
illutio-ra/landing-page--realidadaumentada.app
c99fe99c7efac0e21b2c3dfb1742a4af87df3e5c
[ "MIT" ]
null
null
null
lib/cron.js
illutio-ra/landing-page--realidadaumentada.app
c99fe99c7efac0e21b2c3dfb1742a4af87df3e5c
[ "MIT" ]
null
null
null
const co = require('co') const cron = require('node-cron') class Cron { constructor (options) { this._fn = options.task this._timeout = options.timeout || 10 this._tick = options.tick } schedule () { console.log('[Cron] Starting at', new Date()) co(this._fn).then(data => { console.log('[Cron] Success:', data) }) .catch(e => { console.error(e.message, e.stack) }) cron.schedule(this._tick, (argument) => { co(this._fn).then(data => { console.log('[Cron] Success:', data) }) .catch(e => { console.error(e.message, e.stack) }) }) } run () { var q = co(this._fn) if (this._cli) { q.then(data => { console.log('Success =>', data) setTimeout(() => process.exit(), this._timeout) }).catch(err => { console.error('=>', err) process.nextTick(() => process.exit(1)) }) } return q } setCliHandlers () { this._cli = true } } module.exports = Cron
19.54717
55
0.519305
18764304ec53691dfc351db11f3522c0568e575d
2,367
js
JavaScript
src/components/Class/components/ClassSketchList.js
ArushRam/TeachLAFrontend
a245209acc80a7a36c74724b16a3e474bf84f547
[ "MIT" ]
null
null
null
src/components/Class/components/ClassSketchList.js
ArushRam/TeachLAFrontend
a245209acc80a7a36c74724b16a3e474bf84f547
[ "MIT" ]
null
null
null
src/components/Class/components/ClassSketchList.js
ArushRam/TeachLAFrontend
a245209acc80a7a36c74724b16a3e474bf84f547
[ "MIT" ]
null
null
null
import React from 'react'; import { faPlus } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { ThumbnailArray } from '../../../constants'; import SketchBox from '../../common/SketchBox'; import CodeDownloader from '../../../util/languages/CodeDownloader'; import '../../../styles/SketchBox.scss'; const SKETCHES_ROW_PADDING = 100; const SKETCH_WIDTH = 220; const ClassSketchList = ({ calculatedWidth, isInstr, programData, setCreateSketchModalOpen, }) => { let newList = programData?.concat([]) || []; newList.sort((a, b) => { if (a.name < b.name) return -1; if (a.name === b.name) return 0; else return 1; }); const getThumbnailSrc = (val) => { if (val === undefined || val === '' || val >= ThumbnailArray.length || val < 0) { return ThumbnailArray[0]; } return ThumbnailArray[val]; }; const sketchList = newList.map(({ uid, name, language, thumbnail, code }) => { return ( <SketchBox key={uid} img={getThumbnailSrc(thumbnail)} icon={language.icon} name={name} downloadFunc={() => { CodeDownloader.download(name, language, code); }} pathname={isInstr ? '/editor' : `/p/${uid}`} /> ) }); // Button for instructors to add a sketch to the class. if (isInstr) { sketchList.push( <div key="add-sketch" className="add-sketch-box sketch-box" onClick={() => setCreateSketchModalOpen(true)} > <div className="add-sketch-box-body sketch-box-body"> <FontAwesomeIcon className="fa-2x add-sketch-plus" icon={faPlus} /> </div> <div className="fa-lg"> <b>Add a sketch</b> </div> </div>, ); } // TODO: This should be a flexbox, instead of this let numSketchesPerRow = Math.floor((calculatedWidth - SKETCHES_ROW_PADDING) / SKETCH_WIDTH); let rows = []; let originalLength = sketchList.length; for (let i = 0; i < originalLength / numSketchesPerRow; i++) { rows.push( <div className="class-sketches-grid-row" key={i}> {sketchList.splice(0, numSketchesPerRow)} </div>, ); } if (rows.length === 0) return 'No sketches found'; return <div className="class-sketches-grid">{rows}</div>; }; export default ClassSketchList;
28.518072
94
0.607098
1876f5dcff90ccd25bbc5f8ebf8fc17b8817f187
1,099
js
JavaScript
src/reducers/lineItemsReducer.js
jack0wsky/fiventhree
cdc3cf63709fa13a907b13c2960a42c367e9eb16
[ "MIT" ]
null
null
null
src/reducers/lineItemsReducer.js
jack0wsky/fiventhree
cdc3cf63709fa13a907b13c2960a42c367e9eb16
[ "MIT" ]
null
null
null
src/reducers/lineItemsReducer.js
jack0wsky/fiventhree
cdc3cf63709fa13a907b13c2960a42c367e9eb16
[ "MIT" ]
null
null
null
const initState = { lineItems: [], } export const handleLineItems = (state = initState.lineItems, action) => { switch (action.type) { case 'ADD_LINE_ITEMS': { const found = state.find((product) => { return product.shopifyId === action.payload.shopifyId }) if (found) { found.quantity += action.payload.quantity return state } return [ ...state, { variantId: action.payload.shopifyId, quantity: action.payload.quantity, }, ] } case 'REMOVE_LINE_ITEMS': { return state.filter((product) => { return product.variantId !== action.payload }) } case 'DECREMENT_QUANTITY': { const found = state.find((item) => { return item.variantId === action.payload }) found.quantity -= 1 return state } case 'INCREMENT_QUANTITY': { const found = state.find((item) => { return item.variantId === action.payload }) found.quantity += 1 return state } default: { return state } } }
23.382979
73
0.55232
18779bdc27702d0a4e713d8f153e64c860791d63
1,625
js
JavaScript
InMemoryCompilers/TypeScript/jsonrepl.js
xet7/onelang_CompilerBackend
348ae80d8c554d1fe87dce9b1dab1abaaa6412c3
[ "MIT" ]
null
null
null
InMemoryCompilers/TypeScript/jsonrepl.js
xet7/onelang_CompilerBackend
348ae80d8c554d1fe87dce9b1dab1abaaa6412c3
[ "MIT" ]
null
null
null
InMemoryCompilers/TypeScript/jsonrepl.js
xet7/onelang_CompilerBackend
348ae80d8c554d1fe87dce9b1dab1abaaa6412c3
[ "MIT" ]
null
null
null
const readline = require("readline"); const process = require("process"); const vm = require("vm"); const ts = require("typescript"); const util = require("util"); function requireFromString(src, filename) { var Module = module.constructor; var m = new Module(); m._compile(src, filename); return m.exports; } function tsCompile(code) { return ts.transpileModule(code, { compilerOptions: { module: ts.ModuleKind.CommonJS } }).outputText; } function resp(result) { result["backendVersion"] = "one:tsjs:jsonrepl:20180122"; console.log(JSON.stringify(result)); } readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }).on('line', requestLine => { try { const requestJson = JSON.parse(requestLine); let code = requestJson.code; let stdlibCode = requestJson.stdlibCode; if (requestJson.lang === "TypeScript") { code = "// TS CODE\n" + tsCompile(code); stdlibCode = tsCompile(stdlibCode); } let result = ""; const script = new vm.Script(code); const context = new vm.createContext({ console: { log: (...args) => result += (util.format(...args) + '\n'), }, require: (...args) => { if (args[0] === 'one') return requireFromString(stdlibCode, 'one.js'); else return require(...args); } }); script.runInContext(context); resp({ result }); } catch(e) { resp({ exceptionText: `${e}\n\n${e.stack}` }); } });
30.092593
119
0.568
187840dbe42359cd661096e26743f3c9731fdfb8
943
js
JavaScript
front-end/src/actions/index.js
african-market-allstars/front-end
d29a3d4fe6e31ba83332e6eb65e794ab994411fe
[ "MIT" ]
null
null
null
front-end/src/actions/index.js
african-market-allstars/front-end
d29a3d4fe6e31ba83332e6eb65e794ab994411fe
[ "MIT" ]
null
null
null
front-end/src/actions/index.js
african-market-allstars/front-end
d29a3d4fe6e31ba83332e6eb65e794ab994411fe
[ "MIT" ]
null
null
null
import axios from 'axios' export const GET_ITEMS = 'GET_ITEMS' export const GET_ITEMS_SUCCESS = 'GET_ITEMS_SUCCESS' export const GET_ITEMS_FAILURE = 'GET_ITEMS_FAILURE' export const UPDATE_ITEM = 'UPDATE_ITEM' export const DELETE_ITEM = 'DELETE_ITEM' export const getItems = () => (dispatch) => { axios.get('https://african-market-allstars.herokuapp.com/api/items') .then( res => { console.log( 'items found', res) dispatch({ type:GET_ITEMS_SUCCESS, payload: { name: res.data.name, category: res.data.category, image: res.data.image_url, price: res.data.price, description: res.data.description } }) }) .catch( err => { console.log('items not found', err.message) dispatch({ type: GET_ITEMS_FAILURE, payload: err.message }) } ) }
27.735294
72
0.576882
1878cd5228fca2f983e623832fc4b020c0371c1a
518
js
JavaScript
app.js
psychesworld/SequelizeDemo
c483a67d638dd1fc87213395913bba20572e9323
[ "MIT" ]
null
null
null
app.js
psychesworld/SequelizeDemo
c483a67d638dd1fc87213395913bba20572e9323
[ "MIT" ]
null
null
null
app.js
psychesworld/SequelizeDemo
c483a67d638dd1fc87213395913bba20572e9323
[ "MIT" ]
null
null
null
const express = require('express') const db = require('./models') const bodyParser = require('body-parser') const player = require('./routes/player') const team = require('./routes/team') db.sequelize.sync({ logging: console.log }).then(function () { const app = express() app.use(bodyParser.json()) app.use('/player', player) app.use('/team', team) app.get('/', function (req, res) { res.send('Hello World!') }) app.listen(3000, function () { console.log('App listening on port 3000!') }) })
27.263158
62
0.646718
18796019127fc83580c96d7d90fa2793168b9148
436
js
JavaScript
karma.conf.js
lawchihon/videojs-dailymotion
b4c261a9564ccc11863908e50f04aeeb4a9b1d96
[ "MIT" ]
null
null
null
karma.conf.js
lawchihon/videojs-dailymotion
b4c261a9564ccc11863908e50f04aeeb4a9b1d96
[ "MIT" ]
null
null
null
karma.conf.js
lawchihon/videojs-dailymotion
b4c261a9564ccc11863908e50f04aeeb4a9b1d96
[ "MIT" ]
null
null
null
module.exports = function(config) { var configuration = { basePath: '', frameworks: ['jasmine'], files: [ 'node_modules/video.js/dist/video.js', 'dist/Dailymotion.min.js', 'tests/**/*.specs.js' ], browsers: ['ChromeHeadless'], customLaunchers: { 'ChromeTravisCI': { base: 'Chrome', flags: ['--no-sandbox'] } } }; config.set(configuration); };
20.761905
44
0.53211
187a12c03f033fc2d97d1331a0f35a00f44c5e95
4,647
js
JavaScript
src/api/index.js
navbhati/azure-statc-web-apps-react-app
3aa6101e44854686df26a26fd07fcdfb5c8d4a93
[ "MIT" ]
2
2020-05-15T15:07:47.000Z
2021-03-02T06:19:50.000Z
src/api/index.js
navbhati/azure-statc-web-apps-react-app
3aa6101e44854686df26a26fd07fcdfb5c8d4a93
[ "MIT" ]
7
2020-06-08T08:03:37.000Z
2022-02-27T05:12:17.000Z
src/api/index.js
navbhati/azure-static-web-apps-react-app
3aa6101e44854686df26a26fd07fcdfb5c8d4a93
[ "MIT" ]
null
null
null
const rapidApiHost = "coronavirus-monitor.p.rapidapi.com" const rapidApiKey = "b6e827b151mshbf3ff40340792ccp1da0ccjsne226ad04c043" const overallUrl = 'https://coronavirus-monitor.p.rapidapi.com/coronavirus/worldstat.php' const casesByCountryUrl = "https://coronavirus-monitor.p.rapidapi.com/coronavirus/cases_by_country.php" const dailydataUrl = "https://coronavirus-monitor.p.rapidapi.com/coronavirus/cases_by_particular_country.php?country=" const affectedCountriesUrl = "https://coronavirus-monitor.p.rapidapi.com/coronavirus/affected.php" export const fetchOverallData = async () => { try { const data = await fetch(overallUrl, { "method": "GET", "headers": { "x-rapidapi-host": rapidApiHost, "x-rapidapi-key": rapidApiKey } }).then(r => r.json()) // console.log(data); return data } catch (error) { console.log(error); } } function convertInt(val) { try { return parseInt(val.replace(/,/g, '')) } catch (error) { console.log(error) return parseInt(val) } } function getDate(date) { let epoch = Date.parse(date) return new Date(epoch).toLocaleDateString() } export const fetchCountriesData = async () => { try { const data = await fetch(casesByCountryUrl, { "method": "GET", "headers": { "x-rapidapi-host": rapidApiHost, "x-rapidapi-key": rapidApiKey } }).then(r => r.json()) // deleting the empty data object delete data.countries_stat[0]; const countries_stat = Object.values(data.countries_stat) // console.log(Object.values(countries_stat)) // adding id property to each object and converting string prop to int prop in the array of objects - no longer needed countries_stat.forEach(function (element, index) { element.id = index; Object.keys(element).forEach(function (el) { el === 'country_name' ? null : element[el] = convertInt(element[el]) }) }) //console.log(countries_stat); return countries_stat } catch (error) { console.log(error); } } export const fetchDailyData = async (country) => { try { const data = await fetch(dailydataUrl + country, { "method": "GET", "headers": { "x-rapidapi-host": rapidApiHost, "x-rapidapi-key": rapidApiKey } }).then(r => r.json()) // console.log(Object.values(data)) // console.log(Object.keys(data)); //let dailyData = Object.values(data) let dailyData = data.stat_by_country // console.log(dailyData) const modifiedData = { country_name: Object.values(dailyData.map(d => (d.country_name))), total_cases: Object.values(dailyData.map(d => (convertInt(d.total_cases)))), new_cases: Object.values(dailyData.map(d => (convertInt(d.new_cases)))), active_cases: Object.values(dailyData.map(d => (convertInt(d.active_cases)))), total_deaths: Object.values(dailyData.map(d => (convertInt(d.total_deaths)))), new_deaths: Object.values(dailyData.map(d => (convertInt(d.new_deaths)))), total_recovered: Object.values(dailyData.map(d => (convertInt(d.total_recovered)))), serious_critical: Object.values(dailyData.map(d => (convertInt(d.serious_critical)))), total_cases_per1m: Object.values(dailyData.map(d => (convertInt(d.total_cases_per1m)))), record_date: Object.values(dailyData.map(d => (getDate(d.record_date)))), } // console.log(modifiedData); return modifiedData } catch (error) { console.log(error); } } export const fetchAffectedCountries = async () => { try { const data = await fetch(affectedCountriesUrl, { "method": "GET", "headers": { "x-rapidapi-host": rapidApiHost, "x-rapidapi-key": rapidApiKey } }).then(r => r.json()) const countries = data.affected_countries //console.log(countries); return countries } catch (error) { console.log(error); } } /* Overall Data Sample - total_cases: "3,326,005" new_cases: "21,785" total_deaths: "234,505" new_deaths: "675" total_recovered: "1,052,180" active_cases: "2,039,320" serious_critical: "50,845" total_cases_per_1m_population: "427" deaths_per_1m_population: "30.1" statistic_taken_at: "2020-05-01 12:06:01" */
33.919708
126
0.608995
187ace8bb0342e84b070e26e72216eab4203b683
7,044
js
JavaScript
modeling/node_modules/onnxjs/lib/backends/cpu/ops/reduce.js
walid-ame/mask-detector
916676c82baab7e9d72feb1d06013d5252725731
[ "MIT" ]
null
null
null
modeling/node_modules/onnxjs/lib/backends/cpu/ops/reduce.js
walid-ame/mask-detector
916676c82baab7e9d72feb1d06013d5252725731
[ "MIT" ]
null
null
null
modeling/node_modules/onnxjs/lib/backends/cpu/ops/reduce.js
walid-ame/mask-detector
916676c82baab7e9d72feb1d06013d5252725731
[ "MIT" ]
null
null
null
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.reduceProd = exports.reduceMean = exports.reduceMin = exports.reduceMax = exports.reduceLogSum = exports.reduceSumSquare = exports.reduceSum = exports.CpuReduceProd = exports.CpuReduceMean = exports.CpuReduceMin = exports.CpuReduceMax = exports.CpuReduceLogSum = exports.CpuReduceSumSquare = exports.CpuReduceSum = void 0; var reduce_op_1 = require("../../../ops/reduce-op"); var util_1 = require("../../../util"); var CpuReduceSum = /** @class */ (function (_super) { __extends(CpuReduceSum, _super); function CpuReduceSum() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceSum.prototype.run = function (inferenceHandler, inputs) { var output = reduceSum(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceSum; }(reduce_op_1.ReduceBase)); exports.CpuReduceSum = CpuReduceSum; var CpuReduceSumSquare = /** @class */ (function (_super) { __extends(CpuReduceSumSquare, _super); function CpuReduceSumSquare() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceSumSquare.prototype.run = function (inferenceHandler, inputs) { var output = reduceSumSquare(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceSumSquare; }(reduce_op_1.ReduceBase)); exports.CpuReduceSumSquare = CpuReduceSumSquare; var CpuReduceLogSum = /** @class */ (function (_super) { __extends(CpuReduceLogSum, _super); function CpuReduceLogSum() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceLogSum.prototype.run = function (inferenceHandler, inputs) { var output = reduceLogSum(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceLogSum; }(reduce_op_1.ReduceBase)); exports.CpuReduceLogSum = CpuReduceLogSum; var CpuReduceMax = /** @class */ (function (_super) { __extends(CpuReduceMax, _super); function CpuReduceMax() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceMax.prototype.run = function (inferenceHandler, inputs) { var output = reduceMax(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceMax; }(reduce_op_1.ReduceBase)); exports.CpuReduceMax = CpuReduceMax; var CpuReduceMin = /** @class */ (function (_super) { __extends(CpuReduceMin, _super); function CpuReduceMin() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceMin.prototype.run = function (inferenceHandler, inputs) { var output = reduceMin(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceMin; }(reduce_op_1.ReduceBase)); exports.CpuReduceMin = CpuReduceMin; var CpuReduceMean = /** @class */ (function (_super) { __extends(CpuReduceMean, _super); function CpuReduceMean() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceMean.prototype.run = function (inferenceHandler, inputs) { var output = reduceMean(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceMean; }(reduce_op_1.ReduceBase)); exports.CpuReduceMean = CpuReduceMean; var CpuReduceProd = /** @class */ (function (_super) { __extends(CpuReduceProd, _super); function CpuReduceProd() { return _super !== null && _super.apply(this, arguments) || this; } CpuReduceProd.prototype.run = function (inferenceHandler, inputs) { var output = reduceProd(inputs[0], util_1.ShapeUtil.normalizeAxes(this.axes, inputs[0].dims.length), this.keepDims); return [output]; }; return CpuReduceProd; }(reduce_op_1.ReduceBase)); exports.CpuReduceProd = CpuReduceProd; // Functions implementing specific reduce operations function reduceSum(input, axes, keepDims) { return util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b; }, function (a, b) { return a + b; }); } exports.reduceSum = reduceSum; function reduceSumSquare(input, axes, keepDims) { return util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b * b; }, function (a, b) { return a + b; }); } exports.reduceSumSquare = reduceSumSquare; function reduceLogSum(input, axes, keepDims) { var output = util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b; }, function (a, b) { return a + b; }); var length = output.floatData.length; for (var i = 0; i < length; i++) { output.floatData[i] = Math.log(output.floatData[i]); } return output; } exports.reduceLogSum = reduceLogSum; function reduceMax(input, axes, keepDims) { return util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b; }, function (a, b) { return Math.max(a, b); }); } exports.reduceMax = reduceMax; function reduceMin(input, axes, keepDims) { return util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b; }, function (a, b) { return Math.min(a, b); }); } exports.reduceMin = reduceMin; function reduceMean(input, axes, keepDims) { var output = util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b; }, function (a, b) { return a + b; }); var outputDims = util_1.ReduceUtil.calcReduceShape(input.dims, axes, keepDims); var inputSize = util_1.ShapeUtil.size(input.dims); var outputSize = util_1.ShapeUtil.size(outputDims); var numItems = inputSize / outputSize; var length = output.floatData.length; for (var i = 0; i < length; i++) { output.floatData[i] = output.floatData[i] / numItems; } return output; } exports.reduceMean = reduceMean; function reduceProd(input, axes, keepDims) { return util_1.ReduceUtil.calcReduce(input, axes, keepDims, function (b) { return b; }, function (a, b) { return a * b; }); } exports.reduceProd = reduceProd; //# sourceMappingURL=reduce.js.map
47.594595
330
0.681999
187afe33ca2c69b66a33e8807a3a3c538e888b4e
3,826
js
JavaScript
superset/assets/node_modules/@airbnb/lunar/lib/components/ResponsiveImage/index.js
kumarss20/superset-neo4j
74f308ab52879c3f5772f377a5769ad33a24946a
[ "Apache-2.0" ]
null
null
null
superset/assets/node_modules/@airbnb/lunar/lib/components/ResponsiveImage/index.js
kumarss20/superset-neo4j
74f308ab52879c3f5772f377a5769ad33a24946a
[ "Apache-2.0" ]
null
null
null
superset/assets/node_modules/@airbnb/lunar/lib/components/ResponsiveImage/index.js
kumarss20/superset-neo4j
74f308ab52879c3f5772f377a5769ad33a24946a
[ "Apache-2.0" ]
null
null
null
"use strict"; exports.__esModule = true; exports.default = exports.ResponsiveImage = exports.DEFAULT_BORDER_RADIUS = void 0; var _propTypes = _interopRequireDefault(require("prop-types")); var _react = _interopRequireDefault(require("react")); var _airbnbPropTypes = require("airbnb-prop-types"); var _withStyles = _interopRequireDefault(require("../../composers/withStyles")); var _styles = require("./styles"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } const DEFAULT_BORDER_RADIUS = 6; exports.DEFAULT_BORDER_RADIUS = DEFAULT_BORDER_RADIUS; const objectFitPropType = (0, _airbnbPropTypes.mutuallyExclusiveTrueProps)('contain', 'cover'); /** An image that is constrained proportionally in one or both dimensions. */ class ResponsiveImage extends _react.default.Component { constructor() { super(...arguments); _defineProperty(this, "image", void 0); _defineProperty(this, "state", { imageLoaded: false }); } componentDidMount() { this.createAsyncImage(); } componentDidUpdate(_ref) { let { src: previousSrc } = _ref; const { src: currentSrc } = this.props; if (currentSrc !== previousSrc) { this.removeImage(); this.setState({ imageLoaded: false }); this.createAsyncImage(); } } componentWillUnmount() { this.removeImage(); } createAsyncImage() { this.image = new Image(); this.image.addEventListener('load', () => { this.handleAsyncImageLoad(); }); this.image.addEventListener('error', () => { this.handleAsyncImageLoad(); }); this.image.src = this.props.src; } removeImage() { if (this.image) { // Prevent these callbacks from being fired if they haven't fired yet. delete this.image.onload; delete this.image.onerror; } } handleAsyncImageLoad() { // We no longer need the Image object, so let's remove it so it can be // garbage collected. delete this.image; this.setState({ imageLoaded: true }); } render() { const { cx, alt, contain, cover, noShadow, maxWidth, maxHeight, src, borderRadius, shimmer, styles } = this.props; const { imageLoaded } = this.state; if (!imageLoaded && shimmer) { return shimmer; } return _react.default.createElement("img", { className: cx(styles.image, contain && styles.image_contain, cover && styles.image_cover, noShadow && styles.image_noShadow, { borderRadius, maxWidth, maxHeight }), src: src, width: "100%", height: "auto", alt: alt }); } } exports.ResponsiveImage = ResponsiveImage; _defineProperty(ResponsiveImage, "defaultProps", { borderRadius: DEFAULT_BORDER_RADIUS, contain: false, cover: false, maxHeight: 'none', maxWidth: 'none', noShadow: false, shimmer: null }); _defineProperty(ResponsiveImage, "propTypes", { shimmer: _propTypes.default.node, src: _propTypes.default.string.isRequired, maxHeight: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), maxWidth: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), noShadow: _propTypes.default.bool, borderRadius: _propTypes.default.number, alt: _propTypes.default.string.isRequired, contain: objectFitPropType, cover: objectFitPropType }); var _default = (0, _withStyles.default)(_styles.styleSheet)(ResponsiveImage); exports.default = _default;
25.171053
209
0.665447
187b230153dcbbec133d53a23ff703e83ad9637d
7,364
js
JavaScript
aspnet-core/src/ABP.TPLMS.Web.Mvc/wwwroot/view-resources/Views/Orgs/Index.js
jackson0720/AbpTest
9af69393539cf0f4c4056bca863c3b00d503b8ba
[ "MIT" ]
14
2020-06-23T09:17:26.000Z
2021-11-16T12:32:39.000Z
aspnet-core/src/ABP.TPLMS.Web.Mvc/wwwroot/view-resources/Views/Orgs/Index.js
jackson0720/AbpTest
9af69393539cf0f4c4056bca863c3b00d503b8ba
[ "MIT" ]
null
null
null
aspnet-core/src/ABP.TPLMS.Web.Mvc/wwwroot/view-resources/Views/Orgs/Index.js
jackson0720/AbpTest
9af69393539cf0f4c4056bca863c3b00d503b8ba
[ "MIT" ]
9
2020-03-16T15:45:29.000Z
2020-05-25T07:04:04.000Z
//------------------------系统管理-->组织信息--------------------------------// //刷新数据 function initable() { $("#dgOrg").treegrid({ url: "/Orgs/List", title: "组织管理", pagination: false, fit: true, fitColumns: false, loadMsg: "正在加载组织信息...", nowarp: false, border: false, idField: "Id", sortName: "Id", sortOrder: "asc", treeField: "Name", frozenColumns: [[//冻结列 { field: "chk", checkbox: true, align: "left", width: 50 } ]], columns: [[ { title: "编号", field: "Id", width: 50, sortable: true }, { title: "组织名称", field: "Name", width: 200, sortable: true }, { title: "代码", field: "BizCode", width: 100, sortable: true }, { title: "海关代码", field: "CustomCode", width: 100, sortable: true }, { title: "状态", field: "Status", width: 80, sortable: false }, { title: "类型", field: "Type", width: 80, sortable: false }, { title: "父节点", field: "ParentName", width: 120, sortable: false }, { title: '创建时间', field: 'CreationTime', width: 130, align: 'center' } ]] }); } function reloaded() { //reload $("#reload").click(function () { $('#dgOrg').treegrid('reload'); }); } //修改点击按钮事件 function updOrgInfo() { $("#edit").click(function () { BindTree(); //判断选择的中 var row = $("#dgOrg").treegrid('getSelected'); if (row) { $.messager.confirm('编辑', '您想要编辑吗?', function (r) { if (r) { //先绑定 showOrg(row); //打开对话框编辑 $("#divAddUpdOrg").dialog({ closed: false, title: "修改组织信息", modal: true, width: 600, height: 450, collapsible: true, minimizable: true, maximizable: true, resizable: true, }); } }); } else { $.messager.alert('提示', ' 请选择要编辑的行!', 'warning'); } }); } //删除 function deleteOrg() { $("#del").click(function () { var rows = $("#dgOrg").datagrid("getSelections"); if (rows.length > 0) { $.messager.confirm("提示", "确定要删除吗?", function (res) { if (res) { var codes = []; //重要不是{} for (var i = 0; i < rows.length; i++) { codes.push(rows[i].Id); _orgService.delete({ id: rows[i].Id }).done(function () { $.messager.alert("提示", "删除成功!"); $("#dgOrg").datagrid("clearChecked"); $("#dgOrg").datagrid("clearSelections"); $('#dgOrg').treegrid('reload'); }); } } }); } }) } //清空文本框 function clearAll() { $("#IDUpdate").val(""); $("#UpdBizCode").val(""); $("#NameUpdate").val(""); $("#UpdCustomCode").val(""); $(':input[name]', this).each(function () { $(this).val(""); }); } var _orgService = abp.services.app.org; var _$modal = $("#divAddUpdOrg").parent(); var _$form = _$modal.find('form'); //弹出 添加对话框 function showOrgDialog() { $("#add").click(function () { clearAll(); BindTree(); $("#divAddUpdOrg").dialog({ closed: false, title: "添加组织信息", modal: true, width: 600, height: 450, collapsible: true, minimizable: true, maximizable: true, resizable: true }); }); $("#btnSave").click(function () { //保存 if (!_$form.valid()) { return; } var id = $("#IDUpdate").val(); if (id == "" || id == undefined || id == "0") { //验证 $.messager.confirm('确认', '您确认要保存吗?', function (r) { if (r) { $("#IDUpdate").val("0"); var postData = _$form.serializeFormToObject(); //serializeFormToObject is defined in main.js if (postData == null || postData == undefined || postData.Name == "" || postData.BizCode == "") { $.messager.alert('提示', ' 请填写相关必填项!', 'warning'); return; } abp.ui.setBusy(_$modal); _orgService.create(postData).done(function () { $.messager.alert("提示", "保存成功!"); $("#IDUpdate").val(""); _$modal.modal('hide'); $("#divAddUpdOrg").dialog("close"); initable(); //reload page to see new user! }).always(function () { abp.ui.clearBusy(_$modal); }); } }) } else { saveDetail(); } }); } function saveDetail() { if (!_$form.valid()) { return; } $.messager.confirm('确认', '您确认要修改吗?', function (r) { var postData = _$form.serializeFormToObject(); if (postData == null || postData == undefined || postData.BizCode == "" || postData.Name == "") { $.messager.alert('提示', ' 请填写相关必填项!', 'warning'); return; } abp.ui.setBusy(_$modal); _orgService.update(postData).done(function () { $.messager.alert("提示", "修改成功!"); _$modal.modal('hide'); $("#divAddUpdOrg").dialog("close"); initable(); //reload page to see new user! }).always(function () { abp.ui.clearBusy(_$modal); }); }) } function showOrg(row) { $("#IDUpdate").val(row.Id); $("#NameUpdate").val(row.Name); $("#UpdBizCode").val(row.BizCode); $("#UpdType").val(row.Type); $("#UpdCustomCode").val(row.CustomCode); $("#UpdIsAutoExpand").val(row.IsAutoExpand); $("#UpdIsLeaf").val(row.IsLeaf); $("#UpdStatus").val(row.Status); $("#UpdHotKey").val(row.HotKey); $("#UpdIconName").val(row.IconName); $("#RemarkUpdate").val(row.Remark); $("#AddTree").combotree('setValue', row.ParentId); $("#AddTree").combotree('setText', row.ParentName); $('#UpdParentId').val(row.ParentId); $('#UpdParentName').val(row.ParentName); } function BindTree() { $('#AddTree').combotree({ url: '/Orgs/GetJsonTree', valueField: 'Id', textField: 'Name', multiple: false, editable: false, method: 'get', panelHeight: 'auto', checkbox: false, //required: true, //全部折叠 onLoadSuccess: function (node, data) { $('#AddTree').combotree('tree').tree("expandAll"); //collapseAll }, onSelect: function (node) { $('#UpdParentName').val(node.text); $("#UpdParentId").val(node.id); } }); } //------------------------系统管理-->组织信息结束------------------------------//
28.992126
117
0.427892
187c0fe110cec01952e2855f64079825dbce57ea
50,899
js
JavaScript
src/gameobjects/rendertexture/RenderTexture.js
Palats/phaser
93543d650ace8bf3f13484c22c4b2ebcf2db9065
[ "MIT" ]
1
2021-06-11T03:11:45.000Z
2021-06-11T03:11:45.000Z
src/gameobjects/rendertexture/RenderTexture.js
Palats/phaser
93543d650ace8bf3f13484c22c4b2ebcf2db9065
[ "MIT" ]
null
null
null
src/gameobjects/rendertexture/RenderTexture.js
Palats/phaser
93543d650ace8bf3f13484c22c4b2ebcf2db9065
[ "MIT" ]
null
null
null
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var BlendModes = require('../../renderer/BlendModes'); var Camera = require('../../cameras/2d/BaseCamera'); var CanvasPool = require('../../display/canvas/CanvasPool'); var Class = require('../../utils/Class'); var Components = require('../components'); var CONST = require('../../const'); var Frame = require('../../textures/Frame'); var GameObject = require('../GameObject'); var NOOP = require('../../utils/NOOP'); var PIPELINE_CONST = require('../../renderer/webgl/pipelines/const'); var Render = require('./RenderTextureRender'); var RenderTarget = require('../../renderer/webgl/RenderTarget'); var Utils = require('../../renderer/webgl/Utils'); var UUID = require('../../utils/string/UUID'); /** * @classdesc * A Render Texture. * * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads. * * Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means * that when drawing objects such as Shapes to a Render Texture they will appear to be drawn with no aliasing, however this * is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that * to the Render Texture. * * @class RenderTexture * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects * @constructor * @since 3.2.0 * * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.ComputedSize * @extends Phaser.GameObjects.Components.Crop * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip * @extends Phaser.GameObjects.Components.GetBounds * @extends Phaser.GameObjects.Components.Mask * @extends Phaser.GameObjects.Components.Origin * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.ScrollFactor * @extends Phaser.GameObjects.Components.Tint * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. * @param {number} [x=0] - The horizontal position of this Game Object in the world. * @param {number} [y=0] - The vertical position of this Game Object in the world. * @param {number} [width=32] - The width of the Render Texture. * @param {number} [height=32] - The height of the Render Texture. * @param {string} [key] - The texture key to make the RenderTexture from. * @param {string} [frame] - The frame to make the RenderTexture from. */ var RenderTexture = new Class({ Extends: GameObject, Mixins: [ Components.Alpha, Components.BlendMode, Components.ComputedSize, Components.Crop, Components.Depth, Components.Flip, Components.GetBounds, Components.Mask, Components.Origin, Components.Pipeline, Components.ScrollFactor, Components.Tint, Components.Transform, Components.Visible, Render ], initialize: function RenderTexture (scene, x, y, width, height, key, frame) { if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } if (width === undefined) { width = 32; } if (height === undefined) { height = 32; } GameObject.call(this, scene, 'RenderTexture'); /** * A reference to either the Canvas or WebGL Renderer that the Game instance is using. * * @name Phaser.GameObjects.RenderTexture#renderer * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} * @since 3.2.0 */ this.renderer = scene.sys.renderer; /** * A reference to the Texture Manager. * * @name Phaser.GameObjects.RenderTexture#textureManager * @type {Phaser.Textures.TextureManager} * @since 3.12.0 */ this.textureManager = scene.sys.textures; /** * The tint of the Render Texture when rendered. * * @name Phaser.GameObjects.RenderTexture#globalTint * @type {number} * @default 0xffffff * @since 3.2.0 */ this.globalTint = 0xffffff; /** * The alpha of the Render Texture when rendered. * * @name Phaser.GameObjects.RenderTexture#globalAlpha * @type {number} * @default 1 * @since 3.2.0 */ this.globalAlpha = 1; /** * The HTML Canvas Element that the Render Texture is drawing to when using the Canvas Renderer. * * @name Phaser.GameObjects.RenderTexture#canvas * @type {HTMLCanvasElement} * @since 3.2.0 */ this.canvas = null; /** * Is this Render Texture dirty or not? If not it won't spend time clearing or filling itself. * * @name Phaser.GameObjects.RenderTexture#dirty * @type {boolean} * @since 3.12.0 */ this.dirty = false; /** * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. * * @name Phaser.GameObjects.RenderTexture#_crop * @type {object} * @private * @since 3.12.0 */ this._crop = this.resetCropObject(); /** * The Texture corresponding to this Render Texture. * * @name Phaser.GameObjects.RenderTexture#texture * @type {Phaser.Textures.Texture} * @since 3.12.0 */ this.texture = null; /** * The Frame corresponding to this Render Texture. * * @name Phaser.GameObjects.RenderTexture#frame * @type {Phaser.Textures.Frame} * @since 3.12.0 */ this.frame = null; /** * Internal saved texture flag. * * @name Phaser.GameObjects.RenderTexture#_saved * @type {boolean} * @private * @since 3.12.0 */ this._saved = false; if (key === undefined) { this.canvas = CanvasPool.create2D(this, width, height); // Create a new Texture for this RenderTexture object this.texture = scene.sys.textures.addCanvas(UUID(), this.canvas); // Get the frame this.frame = this.texture.get(); } else { this.texture = scene.sys.textures.get(key); // Get the frame this.frame = this.texture.get(frame); this.canvas = this.frame.source.image; this._saved = true; this.dirty = true; this.width = this.frame.cutWidth; this.height = this.frame.cutHeight; } /** * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to. * * @name Phaser.GameObjects.RenderTexture#context * @type {CanvasRenderingContext2D} * @since 3.2.0 */ this.context = this.canvas.getContext('2d'); /** * Internal erase mode flag. * * @name Phaser.GameObjects.RenderTexture#_eraseMode * @type {boolean} * @private * @since 3.16.0 */ this._eraseMode = false; /** * An internal Camera that can be used to move around the Render Texture. * Control it just like you would any Scene Camera. The difference is that it only impacts the placement of what * is drawn to the Render Texture. You can scroll, zoom and rotate this Camera. * * @name Phaser.GameObjects.RenderTexture#camera * @type {Phaser.Cameras.Scene2D.BaseCamera} * @since 3.12.0 */ this.camera = new Camera(0, 0, width, height); /** * The Render Target that belongs to this Render Texture. * * A Render Target encapsulates a framebuffer and texture for the WebGL Renderer. * * This property remains `null` under Canvas. * * @name Phaser.GameObjects.RenderTexture#renderTarget * @type {Phaser.Renderer.WebGL.RenderTarget} * @since 3.50.0 */ this.renderTarget = null; var renderer = this.renderer; if (!renderer) { this.drawGameObject = NOOP; } else if (renderer.type === CONST.WEBGL) { this.drawGameObject = this.batchGameObjectWebGL; this.renderTarget = new RenderTarget(renderer, width, height, 1, 0, false); } else if (renderer.type === CONST.CANVAS) { this.drawGameObject = this.batchGameObjectCanvas; } this.camera.setScene(scene); this.setPosition(x, y); if (key === undefined) { this.setSize(width, height); } this.setOrigin(0, 0); this.initPipeline(PIPELINE_CONST.SINGLE_PIPELINE); }, /** * Sets the size of this Game Object. * * @method Phaser.GameObjects.RenderTexture#setSize * @since 3.0.0 * * @param {number} width - The width of this Game Object. * @param {number} height - The height of this Game Object. * * @return {this} This Game Object instance. */ setSize: function (width, height) { return this.resize(width, height); }, /** * Resizes the Render Texture to the new dimensions given. * * If Render Texture was created from specific frame, only the size of the frame will be changed. The size of the source * texture will not change. * * If Render Texture was not created from specific frame, the following will happen: * * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture. * In Canvas it will resize the underlying canvas element. * * Both approaches will erase everything currently drawn to the Render Texture. * * If the dimensions given are the same as those already being used, calling this method will do nothing. * * @method Phaser.GameObjects.RenderTexture#resize * @since 3.10.0 * * @param {number} width - The new width of the Render Texture. * @param {number} [height=width] - The new height of the Render Texture. If not specified, will be set the same as the `width`. * * @return {this} This Render Texture. */ resize: function (width, height) { if (height === undefined) { height = width; } var frame = this.frame; if (width !== this.width || height !== this.height) { if (frame.name === '__BASE') { // Resize the texture this.canvas.width = width; this.canvas.height = height; this.texture.width = width; this.texture.height = height; var renderTarget = this.renderTarget; if (renderTarget) { renderTarget.resize(width, height); frame.glTexture = renderTarget.texture; frame.source.isRenderTexture = true; frame.source.isGLTexture = true; frame.source.glTexture = renderTarget.texture; } this.camera.setSize(width, height); frame.source.width = width; frame.source.height = height; frame.setSize(width, height); this.width = width; this.height = height; } } else { // Resize the frame var baseFrame = this.texture.getSourceImage(); if (frame.cutX + width > baseFrame.width) { width = baseFrame.width - frame.cutX; } if (frame.cutY + height > baseFrame.height) { height = baseFrame.height - frame.cutY; } frame.setSize(width, height, frame.cutX, frame.cutY); } this.updateDisplayOrigin(); var input = this.input; if (input && !input.customHitArea) { input.hitArea.width = width; input.hitArea.height = height; } return this; }, /** * Set the tint to use when rendering this Render Texture. * * @method Phaser.GameObjects.RenderTexture#setGlobalTint * @since 3.2.0 * * @param {number} tint - The tint value. * * @return {this} This Render Texture. */ setGlobalTint: function (tint) { this.globalTint = tint; return this; }, /** * Set the alpha to use when rendering this Render Texture. * * @method Phaser.GameObjects.RenderTexture#setGlobalAlpha * @since 3.2.0 * * @param {number} alpha - The alpha value. * * @return {this} This Render Texture. */ setGlobalAlpha: function (alpha) { this.globalAlpha = alpha; return this; }, /** * Stores a copy of this Render Texture in the Texture Manager using the given key. * * After doing this, any texture based Game Object, such as a Sprite, can use the contents of this * Render Texture by using the texture key: * * ```javascript * var rt = this.add.renderTexture(0, 0, 128, 128); * * // Draw something to the Render Texture * * rt.saveTexture('doodle'); * * this.add.image(400, 300, 'doodle'); * ``` * * Updating the contents of this Render Texture will automatically update _any_ Game Object * that is using it as a texture. Calling `saveTexture` again will not save another copy * of the same texture, it will just rename the key of the existing copy. * * By default it will create a single base texture. You can add frames to the texture * by using the `Texture.add` method. After doing this, you can then allow Game Objects * to use a specific frame from a Render Texture. * * If you destroy this Render Texture, any Game Object using it via the Texture Manager will * stop rendering. Ensure you remove the texture from the Texture Manager and any Game Objects * using it first, before destroying this Render Texture. * * @method Phaser.GameObjects.RenderTexture#saveTexture * @since 3.12.0 * * @param {string} key - The unique key to store the texture as within the global Texture Manager. * * @return {Phaser.Textures.Texture} The Texture that was saved. */ saveTexture: function (key) { this.textureManager.renameTexture(this.texture.key, key); this._saved = true; return this.texture; }, /** * Fills the Render Texture with the given color. * * @method Phaser.GameObjects.RenderTexture#fill * @since 3.2.0 * * @param {number} rgb - The color to fill the Render Texture with. * @param {number} [alpha=1] - The alpha value used by the fill. * @param {number} [x=0] - The left coordinate of the fill rectangle. * @param {number} [y=0] - The top coordinate of the fill rectangle. * @param {number} [width=this.frame.cutWidth] - The width of the fill rectangle. * @param {number} [height=this.frame.cutHeight] - The height of the fill rectangle. * * @return {this} This Render Texture instance. */ fill: function (rgb, alpha, x, y, width, height) { var frame = this.frame; var camera = this.camera; var renderer = this.renderer; if (alpha === undefined) { alpha = 1; } if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } if (width === undefined) { width = frame.cutWidth; } if (height === undefined) { height = frame.cutHeight; } var r = (rgb >> 16 & 0xFF) / 255; var g = (rgb >> 8 & 0xFF) / 255; var b = (rgb & 0xFF) / 255; var renderTarget = this.renderTarget; camera.preRender(); if (renderTarget) { renderTarget.bind(true); var pipeline = this.pipeline; pipeline.manager.set(pipeline); var tw = renderTarget.width; var th = renderTarget.height; var rw = renderer.width; var rh = renderer.height; var sx = rw / tw; var sy = rh / th; pipeline.drawFillRect( x * sx, y * sy, width * sx, height * sy, Utils.getTintFromFloats(b, g, r, 1), alpha ); renderTarget.unbind(true); } else { var ctx = this.context; renderer.setContext(ctx); ctx.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; ctx.fillRect(x + frame.cutX, y + frame.cutY, width, height); renderer.setContext(); } this.dirty = true; return this; }, /** * Clears the Render Texture. * * @method Phaser.GameObjects.RenderTexture#clear * @since 3.2.0 * * @return {this} This Render Texture instance. */ clear: function () { if (this.dirty) { var renderTarget = this.renderTarget; if (renderTarget) { renderTarget.clear(); } else { var ctx = this.context; ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight); ctx.restore(); } this.dirty = false; } return this; }, /** * Draws the given object, or an array of objects, to this Render Texture using a blend mode of ERASE. * This has the effect of erasing any filled pixels in the objects from this Render Texture. * * It can accept any of the following: * * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite. * * Tilemap Layers. * * A Group. The contents of which will be iterated and drawn in turn. * * A Container. The contents of which will be iterated fully, and drawn in turn. * * A Scene's Display List. Pass in `Scene.children` to draw the whole list. * * Another Render Texture. * * A Texture Frame instance. * * A string. This is used to look-up a texture from the Texture Manager. * * Note: You cannot erase a Render Texture from itself. * * If passing in a Group or Container it will only draw children that return `true` * when their `willRender()` method is called. I.e. a Container with 10 children, * 5 of which have `visible=false` will only draw the 5 visible ones. * * If passing in an array of Game Objects it will draw them all, regardless if * they pass a `willRender` check or not. * * You can pass in a string in which case it will look for a texture in the Texture * Manager matching that string, and draw the base frame. * * You can pass in the `x` and `y` coordinates to draw the objects at. The use of * the coordinates differ based on what objects are being drawn. If the object is * a Group, Container or Display List, the coordinates are _added_ to the positions * of the children. For all other types of object, the coordinates are exact. * * Calling this method causes the WebGL batch to flush, so it can write the texture * data to the framebuffer being used internally. The batch is flushed at the end, * after the entries have been iterated. So if you've a bunch of objects to draw, * try and pass them in an array in one single call, rather than making lots of * separate calls. * * @method Phaser.GameObjects.RenderTexture#erase * @since 3.16.0 * * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these. * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object. * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object. * * @return {this} This Render Texture instance. */ erase: function (entries, x, y) { this._eraseMode = true; this.draw(entries, x, y, 1, 16777215); this._eraseMode = false; return this; }, /** * Draws the given object, or an array of objects, to this Render Texture. * * It can accept any of the following: * * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite. * * Tilemap Layers. * * A Group. The contents of which will be iterated and drawn in turn. * * A Container. The contents of which will be iterated fully, and drawn in turn. * * A Scene's Display List. Pass in `Scene.children` to draw the whole list. * * Another Render Texture. * * A Texture Frame instance. * * A string. This is used to look-up a texture from the Texture Manager. * * Note: You cannot draw a Render Texture to itself. * * If passing in a Group or Container it will only draw children that return `true` * when their `willRender()` method is called. I.e. a Container with 10 children, * 5 of which have `visible=false` will only draw the 5 visible ones. * * If passing in an array of Game Objects it will draw them all, regardless if * they pass a `willRender` check or not. * * You can pass in a string in which case it will look for a texture in the Texture * Manager matching that string, and draw the base frame. If you need to specify * exactly which frame to draw then use the method `drawFrame` instead. * * You can pass in the `x` and `y` coordinates to draw the objects at. The use of * the coordinates differ based on what objects are being drawn. If the object is * a Group, Container or Display List, the coordinates are _added_ to the positions * of the children. For all other types of object, the coordinates are exact. * * The `alpha` and `tint` values are only used by Texture Frames. * Game Objects use their own alpha and tint values when being drawn. * * Calling this method causes the WebGL batch to flush, so it can write the texture * data to the framebuffer being used internally. The batch is flushed at the end, * after the entries have been iterated. So if you've a bunch of objects to draw, * try and pass them in an array in one single call, rather than making lots of * separate calls. * * @method Phaser.GameObjects.RenderTexture#draw * @since 3.2.0 * * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these. * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object. * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object. * @param {number} [alpha] - The alpha value. Only used for Texture Frames and if not specified defaults to the `globalAlpha` property. Game Objects use their own current alpha value. * @param {number} [tint] - WebGL only. The tint color value. Only used for Texture Frames and if not specified defaults to the `globalTint` property. Game Objects use their own current tint value. * * @return {this} This Render Texture instance. */ draw: function (entries, x, y, alpha, tint) { this.beginDraw(); this.batchDraw(entries, x, y, alpha, tint); this.endDraw(); return this; }, /** * Draws the Texture Frame to the Render Texture at the given position. * * Textures are referenced by their string-based keys, as stored in the Texture Manager. * * ```javascript * var rt = this.add.renderTexture(0, 0, 800, 600); * rt.drawFrame(key, frame); * ``` * * You can optionally provide a position, alpha and tint value to apply to the frame * before it is drawn. * * Calling this method will cause a batch flush, so if you've got a stack of things to draw * in a tight loop, try using the `draw` method instead. * * If you need to draw a Sprite to this Render Texture, use the `draw` method instead. * * @method Phaser.GameObjects.RenderTexture#drawFrame * @since 3.12.0 * * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. * @param {(string|number)} [frame] - The name or index of the frame within the Texture. * @param {number} [x=0] - The x position to draw the frame at. * @param {number} [y=0] - The y position to draw the frame at. * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property. * @param {number} [tint] - WebGL only. The tint color to use. If not specified it uses the `globalTint` property. * * @return {this} This Render Texture instance. */ drawFrame: function (key, frame, x, y, alpha, tint) { this.beginDraw(); this.batchDrawFrame(key, frame, x, y, alpha, tint); this.endDraw(); return this; }, /** * Use this method if you need to batch draw a large number of Game Objects to * this Render Texture in a single go, or on a frequent basis. * * This method starts the beginning of a batched draw. * * It is faster than calling `draw`, but you must be very careful to manage the * flow of code and remember to call `endDraw()`. If you don't need to draw large * numbers of objects it's much safer and easier to use the `draw` method instead. * * The flow should be: * * ```javascript * // Call once: * RenderTexture.beginDraw(); * * // repeat n times: * RenderTexture.batchDraw(); * // or * RenderTexture.batchDrawFrame(); * * // Call once: * RenderTexture.endDraw(); * ``` * * Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you * have started a batch. Also, be very careful not to destroy this Render Texture while the * batch is still open, or call `beginDraw` again. * * @method Phaser.GameObjects.RenderTexture#beginDraw * @since 3.50.0 * * @return {this} This Render Texture instance. */ beginDraw: function () { var camera = this.camera; var renderer = this.renderer; var renderTarget = this.renderTarget; camera.preRender(); if (renderTarget) { renderer.beginCapture(renderTarget.width, renderTarget.height); } else { renderer.setContext(this.context); } return this; }, /** * Use this method if you have already called `beginDraw` and need to batch * draw a large number of objects to this Render Texture. * * This method batches the drawing of the given objects to this Render Texture, * without causing a bind or batch flush. * * It is faster than calling `draw`, but you must be very careful to manage the * flow of code and remember to call `endDraw()`. If you don't need to draw large * numbers of objects it's much safer and easier to use the `draw` method instead. * * The flow should be: * * ```javascript * // Call once: * RenderTexture.beginDraw(); * * // repeat n times: * RenderTexture.batchDraw(); * // or * RenderTexture.batchDrawFrame(); * * // Call once: * RenderTexture.endDraw(); * ``` * * Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you * have started a batch. Also, be very careful not to destroy this Render Texture while the * batch is still open, or call `beginDraw` again. * * Draws the given object, or an array of objects, to this Render Texture. * * It can accept any of the following: * * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite. * * Tilemap Layers. * * A Group. The contents of which will be iterated and drawn in turn. * * A Container. The contents of which will be iterated fully, and drawn in turn. * * A Scene's Display List. Pass in `Scene.children` to draw the whole list. * * Another Render Texture. * * A Texture Frame instance. * * A string. This is used to look-up a texture from the Texture Manager. * * Note: You cannot draw a Render Texture to itself. * * If passing in a Group or Container it will only draw children that return `true` * when their `willRender()` method is called. I.e. a Container with 10 children, * 5 of which have `visible=false` will only draw the 5 visible ones. * * If passing in an array of Game Objects it will draw them all, regardless if * they pass a `willRender` check or not. * * You can pass in a string in which case it will look for a texture in the Texture * Manager matching that string, and draw the base frame. If you need to specify * exactly which frame to draw then use the method `drawFrame` instead. * * You can pass in the `x` and `y` coordinates to draw the objects at. The use of * the coordinates differ based on what objects are being drawn. If the object is * a Group, Container or Display List, the coordinates are _added_ to the positions * of the children. For all other types of object, the coordinates are exact. * * The `alpha` and `tint` values are only used by Texture Frames. * Game Objects use their own alpha and tint values when being drawn. * * @method Phaser.GameObjects.RenderTexture#batchDraw * @since 3.50.0 * * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these. * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object. * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object. * @param {number} [alpha] - The alpha value. Only used for Texture Frames and if not specified defaults to the `globalAlpha` property. Game Objects use their own current alpha value. * @param {number} [tint] - WebGL only. The tint color value. Only used for Texture Frames and if not specified defaults to the `globalTint` property. Game Objects use their own current tint value. * * @return {this} This Render Texture instance. */ batchDraw: function (entries, x, y, alpha, tint) { if (alpha === undefined) { alpha = this.globalAlpha; } if (tint === undefined) { tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16); } else { tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16); } if (!Array.isArray(entries)) { entries = [ entries ]; } this.batchList(entries, x, y, alpha, tint); return this; }, /** * Use this method if you have already called `beginDraw` and need to batch * draw a large number of texture frames to this Render Texture. * * This method batches the drawing of the given frames to this Render Texture, * without causing a bind or batch flush. * * It is faster than calling `drawFrame`, but you must be very careful to manage the * flow of code and remember to call `endDraw()`. If you don't need to draw large * numbers of frames it's much safer and easier to use the `drawFrame` method instead. * * The flow should be: * * ```javascript * // Call once: * RenderTexture.beginDraw(); * * // repeat n times: * RenderTexture.batchDraw(); * // or * RenderTexture.batchDrawFrame(); * * // Call once: * RenderTexture.endDraw(); * ``` * * Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you * have started a batch. Also, be very careful not to destroy this Render Texture while the * batch is still open, or call `beginDraw` again. * * Draws the Texture Frame to the Render Texture at the given position. * * Textures are referenced by their string-based keys, as stored in the Texture Manager. * * ```javascript * var rt = this.add.renderTexture(0, 0, 800, 600); * rt.drawFrame(key, frame); * ``` * * You can optionally provide a position, alpha and tint value to apply to the frame * before it is drawn. * * Calling this method will cause a batch flush, so if you've got a stack of things to draw * in a tight loop, try using the `draw` method instead. * * If you need to draw a Sprite to this Render Texture, use the `draw` method instead. * * @method Phaser.GameObjects.RenderTexture#batchDrawFrame * @since 3.50.0 * * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. * @param {(string|number)} [frame] - The name or index of the frame within the Texture. * @param {number} [x=0] - The x position to draw the frame at. * @param {number} [y=0] - The y position to draw the frame at. * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property. * @param {number} [tint] - WebGL only. The tint color to use. If not specified it uses the `globalTint` property. * * @return {this} This Render Texture instance. */ batchDrawFrame: function (key, frame, x, y, alpha, tint) { if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } if (alpha === undefined) { alpha = this.globalAlpha; } if (tint === undefined) { tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16); } else { tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16); } var textureFrame = this.textureManager.getFrame(key, frame); if (textureFrame) { if (this.renderTarget) { this.pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null); } else { this.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, alpha, tint); } } return this; }, /** * Use this method to finish batch drawing to this Render Texture. * * Never call this method without first calling `beginDraw`. * * It is faster than calling `draw`, but you must be very careful to manage the * flow of code and remember to call `endDraw()`. If you don't need to draw large * numbers of objects it's much safer and easier to use the `draw` method instead. * * The flow should be: * * ```javascript * // Call once: * RenderTexture.beginDraw(); * * // repeat n times: * RenderTexture.batchDraw(); * // or * RenderTexture.batchDrawFrame(); * * // Call once: * RenderTexture.endDraw(); * ``` * * Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you * have started a batch. Also, be very careful not to destroy this Render Texture while the * batch is still open, or call `beginDraw` again. * * @method Phaser.GameObjects.RenderTexture#endDraw * @since 3.50.0 * * @return {this} This Render Texture instance. */ endDraw: function () { var renderer = this.renderer; var renderTarget = this.renderTarget; if (renderTarget) { var canvasTarget = renderer.endCapture(); var util = renderer.pipelines.setUtility(); util.blitFrame(canvasTarget, renderTarget, 1, false, false, this._eraseMode); renderer.resetScissor(); renderer.resetViewport(); } else { renderer.setContext(); } this.dirty = true; return this; }, /** * Internal method that handles the drawing of an array of children. * * @method Phaser.GameObjects.RenderTexture#batchList * @private * @since 3.12.0 * * @param {array} children - The array of Game Objects to draw. * @param {number} [x] - The x position to offset the Game Object by. * @param {number} [y] - The y position to offset the Game Object by. * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property. * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property. */ batchList: function (children, x, y, alpha, tint) { for (var i = 0; i < children.length; i++) { var entry = children[i]; if (!entry || entry === this) { continue; } if (entry.renderWebGL || entry.renderCanvas) { // Game Objects this.drawGameObject(entry, x, y); } else if (entry.isParent || entry.list) { // Groups / Display Lists this.batchGroup(entry.getChildren(), x, y); } else if (typeof entry === 'string') { // Texture key this.batchTextureFrameKey(entry, null, x, y, alpha, tint); } else if (entry instanceof Frame) { // Texture Frame instance this.batchTextureFrame(entry, x, y, alpha, tint); } else if (Array.isArray(entry)) { // Another Array this.batchList(entry, x, y, alpha, tint); } } }, /** * Internal method that handles drawing a Phaser Group contents. * * @method Phaser.GameObjects.RenderTexture#batchGroup * @private * @since 3.12.0 * * @param {array} children - The array of Game Objects to draw. * @param {number} [x=0] - The x position to offset the Game Object by. * @param {number} [y=0] - The y position to offset the Game Object by. */ batchGroup: function (children, x, y) { if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } x += this.frame.cutX; y += this.frame.cutY; for (var i = 0; i < children.length; i++) { var entry = children[i]; if (entry.willRender(this.camera)) { var tx = entry.x + x; var ty = entry.y + y; this.drawGameObject(entry, tx, ty); } } }, /** * Internal method that handles drawing a single Phaser Game Object to this Render Texture using WebGL. * * @method Phaser.GameObjects.RenderTexture#batchGameObjectWebGL * @private * @since 3.12.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw. * @param {number} [x] - The x position to draw the Game Object at. * @param {number} [y] - The y position to draw the Game Object at. */ batchGameObjectWebGL: function (gameObject, x, y) { if (x === undefined) { x = gameObject.x; } if (y === undefined) { y = gameObject.y; } var prevX = gameObject.x; var prevY = gameObject.y; gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY); if (gameObject.renderDirect) { gameObject.renderDirect(this.renderer, gameObject, this.camera); } else { gameObject.renderWebGL(this.renderer, gameObject, this.camera); } gameObject.setPosition(prevX, prevY); }, /** * Internal method that handles drawing a single Phaser Game Object to this Render Texture using Canvas. * * @method Phaser.GameObjects.RenderTexture#batchGameObjectCanvas * @private * @since 3.12.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw. * @param {number} [x] - The x position to draw the Game Object at. * @param {number} [y] - The y position to draw the Game Object at. */ batchGameObjectCanvas: function (gameObject, x, y) { if (x === undefined) { x = gameObject.x; } if (y === undefined) { y = gameObject.y; } var prevX = gameObject.x; var prevY = gameObject.y; if (this._eraseMode) { var blendMode = gameObject.blendMode; gameObject.blendMode = BlendModes.ERASE; } gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY); gameObject.renderCanvas(this.renderer, gameObject, this.camera, null); gameObject.setPosition(prevX, prevY); if (this._eraseMode) { gameObject.blendMode = blendMode; } }, /** * Internal method that handles the drawing of an array of children. * * @method Phaser.GameObjects.RenderTexture#batchTextureFrameKey * @private * @since 3.12.0 * * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. * @param {(string|number)} [frame] - The name or index of the frame within the Texture. * @param {number} [x=0] - The x position to offset the Game Object by. * @param {number} [y=0] - The y position to offset the Game Object by. * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property. * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property. */ batchTextureFrameKey: function (key, frame, x, y, alpha, tint) { var textureFrame = this.textureManager.getFrame(key, frame); if (textureFrame) { this.batchTextureFrame(textureFrame, x, y, alpha, tint); } }, /** * Internal method that handles the drawing of a Texture Frame to this Render Texture. * * @method Phaser.GameObjects.RenderTexture#batchTextureFrame * @private * @since 3.12.0 * * @param {Phaser.Textures.Frame} textureFrame - The Texture Frame to draw. * @param {number} [x=0] - The x position to draw the Frame at. * @param {number} [y=0] - The y position to draw the Frame at. * @param {number} [tint] - A tint color to be applied to the frame drawn to the Render Texture. */ batchTextureFrame: function (textureFrame, x, y, alpha, tint) { if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } x += this.frame.cutX; y += this.frame.cutY; var renderTarget = this.renderTarget; if (renderTarget) { this.pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null); } else { var ctx = this.context; var cd = textureFrame.canvasData; var source = textureFrame.source.image; var matrix = this.camera.matrix; ctx.save(); ctx.globalCompositeOperation = (this._eraseMode) ? 'destination-out' : 'source-over'; ctx.globalAlpha = alpha; matrix.setToContext(ctx); ctx.drawImage(source, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); ctx.restore(); } }, /** * Takes a snapshot of the given area of this Render Texture. * * The snapshot is taken immediately. * * To capture the whole Render Texture see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`. * * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView. * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it, * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process, * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game. * * @method Phaser.GameObjects.RenderTexture#snapshotArea * @since 3.19.0 * * @param {number} x - The x coordinate to grab from. * @param {number} y - The y coordinate to grab from. * @param {number} width - The width of the area to grab. * @param {number} height - The height of the area to grab. * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created. * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`. * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. * * @return {this} This Render Texture instance. */ snapshotArea: function (x, y, width, height, callback, type, encoderOptions) { if (this.renderTarget) { this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer, this.width, this.height, callback, false, x, y, width, height, type, encoderOptions); } else { this.renderer.snapshotCanvas(this.canvas, callback, false, x, y, width, height, type, encoderOptions); } return this; }, /** * Takes a snapshot of the whole of this Render Texture. * * The snapshot is taken immediately. * * To capture just a portion of the Render Texture see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`. * * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView. * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it, * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process, * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game. * * @method Phaser.GameObjects.RenderTexture#snapshot * @since 3.19.0 * * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created. * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`. * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. * * @return {this} This Render Texture instance. */ snapshot: function (callback, type, encoderOptions) { if (this.renderTarget) { this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer, this.width, this.height, callback, false, 0, 0, this.width, this.height, type, encoderOptions); } else { this.renderer.snapshotCanvas(this.canvas, callback, false, 0, 0, this.width, this.height, type, encoderOptions); } return this; }, /** * Takes a snapshot of the given pixel from this Render Texture. * * The snapshot is taken immediately. * * To capture the whole Render Texture see the `snapshot` method. To capture a specific portion, see `snapshotArea`. * * Unlike the other two snapshot methods, this one will send your callback a `Color` object containing the color data for * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute, * using less memory, than the other snapshot methods. * * @method Phaser.GameObjects.RenderTexture#snapshotPixel * @since 3.19.0 * * @param {number} x - The x coordinate of the pixel to get. * @param {number} y - The y coordinate of the pixel to get. * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted. * * @return {this} This Render Texture instance. */ snapshotPixel: function (x, y, callback) { if (this.renderTarget) { this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer, this.width, this.height, callback, true, x, y); } else { this.renderer.snapshotCanvas(this.canvas, callback, true, x, y); } return this; }, /** * Internal destroy handler, called as part of the destroy process. * * @method Phaser.GameObjects.RenderTexture#preDestroy * @protected * @since 3.9.0 */ preDestroy: function () { if (!this._saved) { CanvasPool.remove(this.canvas); if (this.renderTarget) { this.renderTarget.destroy(); } this.texture.destroy(); this.camera.destroy(); this.canvas = null; this.context = null; this.texture = null; } } }); module.exports = RenderTexture;
35.844366
202
0.602271
187d423edd11a45331c618728272bb37914eb10e
1,262
js
JavaScript
src/store/actions/menuItemActions.js
saiforceone/SARestaurantApp
a028cdbff9a6d7ec8226378eef069b5ad2ef3b18
[ "MIT" ]
2
2022-01-23T03:50:38.000Z
2022-02-09T04:48:07.000Z
src/store/actions/menuItemActions.js
saiforceone/SARestaurantApp
a028cdbff9a6d7ec8226378eef069b5ad2ef3b18
[ "MIT" ]
null
null
null
src/store/actions/menuItemActions.js
saiforceone/SARestaurantApp
a028cdbff9a6d7ec8226378eef069b5ad2ef3b18
[ "MIT" ]
null
null
null
import axios from "axios"; import { API_ENDPOINTS } from "../../constants"; import { MENU_ITEM_ACTIONS as MIA } from "../constants"; import ActionCreatorUtils from "../utils/ActionCreatorUtils"; /** * @function fetchMenuItems * @param {Object} filter - filter by * @returns * @description Retrieves menu items from the API and populates reducer */ export const fetchMenuItems = ({filter = {}}) => { return async dispatch => { try { dispatch(ActionCreatorUtils.buildAction(MIA.SET_ERROR, '')); const url = `${API_ENDPOINTS.BASE_URL}${API_ENDPOINTS.MENU_ITEMS}`; dispatch(ActionCreatorUtils.buildAction(MIA.SET_REQ_IN_PROGRESS, true)); const {data: responseData} = await axios.get(url); dispatch(ActionCreatorUtils.buildAction(MIA.SET_REQ_IN_PROGRESS, false)); const {data, success} = responseData; if (!success || !Array.isArray(data)) return dispatch(ActionCreatorUtils.buildAction(MIA.SET_ERROR, 'unexpected error retrieving menu items')); dispatch(ActionCreatorUtils.buildAction(MIA.SET_DATA, data)); } catch (e) { dispatch(ActionCreatorUtils.buildAction(MIA.SET_ERROR, e.toString())); dispatch(ActionCreatorUtils.buildAction(MIA.SET_REQ_IN_PROGRESS, false)); } } };
38.242424
149
0.709984
187dc1f4ddee176c11586864fbee3d56c2bbe9b7
651
js
JavaScript
src/stores/index.js
Mudassirraza912/Prox
3586a8cf4a89090ba5d1c6d769bea7549ec5dc94
[ "MIT" ]
null
null
null
src/stores/index.js
Mudassirraza912/Prox
3586a8cf4a89090ba5d1c6d769bea7549ec5dc94
[ "MIT" ]
null
null
null
src/stores/index.js
Mudassirraza912/Prox
3586a8cf4a89090ba5d1c6d769bea7549ec5dc94
[ "MIT" ]
null
null
null
import {createStore, compose, applyMiddleware} from 'redux'; import thunk from 'redux-thunk'; import {persistStore, persistReducer} from 'redux-persist'; import AsyncStorage from '@react-native-async-storage/async-storage'; import reducers from './reducers'; const composeEnhancer = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; export const persistConfig = { key: 'root', storage: AsyncStorage, // whitelist: [], }; const persistedReducer = persistReducer(persistConfig, reducers); export const store = createStore( persistedReducer, composeEnhancer(applyMiddleware(thunk)), ); export const persistore = persistStore(store);
28.304348
79
0.774194
187df0bbefc103c20ea7959f456caaef5d77ad90
511
js
JavaScript
lib/findCause.js
jpwilliams/remitrace-mongo
c0066a2f92d39f5c97bbeb23eda35cba5c84187c
[ "MIT" ]
null
null
null
lib/findCause.js
jpwilliams/remitrace-mongo
c0066a2f92d39f5c97bbeb23eda35cba5c84187c
[ "MIT" ]
null
null
null
lib/findCause.js
jpwilliams/remitrace-mongo
c0066a2f92d39f5c97bbeb23eda35cba5c84187c
[ "MIT" ]
null
null
null
const { remit } = require('../utils/singleRemit') const { findCause } = require('../utils/dao') const queueName = 'remitrace.findCause' module.exports = () => remit .endpoint(queueName) .handler(handler) .start() .then(() => { console.log(`${queueName} endpoint booted`) }) async function handler (event) { if (!event.data || !event.data.instanceId) { return Promise.reject({ code: 400, message: 'instanceId is required' }) } return findCause(event.data.instanceId) }
22.217391
49
0.639922
187ee16d83652401841641a56ecaca7cf190fd8f
1,148
js
JavaScript
src/Command/Guild/[guild[-snipe.js
BejorJs/bet4SuperVisor
2d483d493c439c894b5c91d70ffc60714f27cc3e
[ "MIT" ]
19
2021-06-14T08:44:15.000Z
2021-07-17T09:47:19.000Z
src/Command/Guild/[guild[-snipe.js
BejorJs/bet4SuperVisor
2d483d493c439c894b5c91d70ffc60714f27cc3e
[ "MIT" ]
null
null
null
src/Command/Guild/[guild[-snipe.js
BejorJs/bet4SuperVisor
2d483d493c439c894b5c91d70ffc60714f27cc3e
[ "MIT" ]
4
2021-06-14T13:56:31.000Z
2021-07-09T18:22:10.000Z
const { MessageEmbed } = require("discord.js"); const Discord = require("discord.js"); const config = require('../../Settings/Config.json'); const db = require("quick.db"); const moment = require("moment") require('moment-duration-format'); module.exports.beta = async(client, message, args) => { if(![config.Yetkili.AbilityYT,config.Yetkili.registerYT].some(role => message.member.roles.cache.get(role)) && !message.member.hasPermission('ADMINISTRATOR')) return message.react(config.Diger.red) let embed = new MessageEmbed().setColor("BLUE").setAuthor(message.member.nickname, message.author.avatarURL()); let data = db.get(`snipe.${message.guild.id}`); if(!data) return message.react(config.Diger.red) message.channel.send(embed.setDescription(` \`Yazan Kişi:\` <@!${data.mesajyazan}> \`Mesaj:\` (**${data.mesaj}**) \`Silinme Tarihi:\` ${moment.duration(Date.now() - data.starihi).format("D [gün], H [saat], m [dakika], s [saniye]")} \`Kanal:\` <#${data.kanal}> `)).then(x => x.delete({timeout: 15000})); }; module.exports.config = { name: 'snipe', aliases: ['snipe'] };
44.153846
202
0.649826
187f1126ecafa83bb3610ddfea92293b87205599
700
js
JavaScript
assets/ckeditor1/plugins/filetools/lang/sk.js
cekingx/crud-ci
8470591a8697229898eafb0ee2f725b72a99bf6e
[ "MIT" ]
null
null
null
assets/ckeditor1/plugins/filetools/lang/sk.js
cekingx/crud-ci
8470591a8697229898eafb0ee2f725b72a99bf6e
[ "MIT" ]
null
null
null
assets/ckeditor1/plugins/filetools/lang/sk.js
cekingx/crud-ci
8470591a8697229898eafb0ee2f725b72a99bf6e
[ "MIT" ]
null
null
null
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'filetools', 'sk', { loadError: 'Počas čítania súboru nastala chyba.', networkError: 'Počas nahrávania súboru nastala chyba siete.', httpError404: 'Počas nahrávania súboru nastala HTTP chyba (404: Súbor nebol nájdený).', httpError403: 'Počas nahrávania súboru nastala HTTP chyba (403: Zakázaný).', httpError: 'Počas nahrávania súboru nastala HTTP chyba (error status: %1).', noUrlError: 'URL nahrávania nie je definovaný.', responseError: 'Nesprávna odpoveď servera.' } );
50
89
0.734286
187f336bb61b583b23038a878c687e940e23248c
32,933
js
JavaScript
src/PrisonWorld.js
srichs/prison-world
e105b5cea4db08d14cdcb64593f10c984cd1ba3e
[ "MIT" ]
null
null
null
src/PrisonWorld.js
srichs/prison-world
e105b5cea4db08d14cdcb64593f10c984cd1ba3e
[ "MIT" ]
null
null
null
src/PrisonWorld.js
srichs/prison-world
e105b5cea4db08d14cdcb64593f10c984cd1ba3e
[ "MIT" ]
null
null
null
/** * Filename: PrisonWorld.js * Date: 4 Mar 2020 <p> * * Purpose: This javascript file creates a 3D graphics scene using the WebGL * library. * * @author srichs */ "use strict"; var gl; // The webgl context. var a_coords_loc; // Location of the a_coords attribute variable in the shader program. var a_normal_loc; // Location of a_normal attribute var u_modelview; // Locations for uniform matrices var u_projection; var u_normalMatrix; var u_material; // An object tolds uniform locations for the material. var u_lights; // An array of objects that holds uniform locations for light properties. var projection = mat4.create(); // projection matrix var modelview; // modelview matrix; value comes from rotator var normalMatrix = mat3.create(); // matrix, derived from modelview matrix, for transforming normal vectors var rotator; // A TrackballRotator to implement rotation by mouse. var flashCount = 0; var frameNumber = 0; // frame number during animation (actually only goes up by 0.5 per frame) var frameSpeed = 1; var torus, sphere, cone, cylinder, disk, ring, cube; // basic objects, created using function createModel var matrixStack = []; // A stack of matrices for implementing hierarchical graphics. var currentColor = [1, 1, 1, 1]; var sunAngle = Math.PI / 2; // rotation of the sun about the z-axis. var daytime = false; var headLightsOn = true; var prisonLightsOn = true; var emergencyLightsOn = true; /** Draws the image, which consists of the world. */ function draw() { gl.clearColor(0, 0, 0, 1); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); mat4.perspective(projection, Math.PI / 4, 1, 1, 50); gl.uniformMatrix4fv(u_projection, false, projection); modelview = rotator.getViewMatrix(); mat4.scale(modelview, modelview, [0.5, 0.5, 0.5]); lights(); world(); } /* Set the direction vector of a light, in eye coordinates. * (Note: This function sets the value of the global variable normalMatrix.) * @param modelview the matrix that does object-to-eye coordinate transforms * @param u_direction_loc the uniform variable location for the spotDirection property of the light * @param lightDirection a vector that points in the direction that the spotlight is pointing (a vec3) */ function setSpotlightDirection(u_direction_loc, modelview, lightDirection) { mat3.normalFromMat4(normalMatrix, modelview); var transformedDirection = new Float32Array(3); vec3.transformMat3(transformedDirection, lightDirection, normalMatrix); gl.uniform3fv(u_direction_loc, transformedDirection); } /* Set the position of a light, in eye coordinates. * @param u_position_loc the uniform variable location for the position property of the light * @param modelview the matrix that does object-to-eye coordinate transforms * @param lightPosition the location of the light, in object coordinates (a vec4) */ function setLightPosition(u_position_loc, modelview, lightPosition) { var transformedPosition = new Float32Array(4); vec4.transformMat4(transformedPosition, lightPosition, modelview); gl.uniform4fv(u_position_loc, transformedPosition); } /** This function handles the lights of the scene. */ function lights() { if (daytime) { // light 1 is the sun gl.uniform3f(u_lights[1].color, 0.7, 0.7, 0.4); // light 1 is the sun during the day gl.uniform1f(u_lights[1].attenuation, 0); } else { gl.uniform3f(u_lights[1].color, 1, 1, 0.8); // light 1 is the moon at night gl.uniform1f(u_lights[1].attenuation, 1); } currentColor = [0.3, 0.3, 0.3, 1]; pushMatrix(); // draw the sun, with yellow emissive color during the day, dim white at night; NB: sun won't be illuminated by other lights mat4.rotateZ(modelview, modelview, sunAngle); mat4.translate(modelview, modelview, [12, 6, 0]); mat4.scale(modelview, modelview, [0.4, 0.4, 0.4]); if (daytime) { gl.uniform3f(u_material.emissiveColor, 0.7, 0.7, 0.1); setLightPosition(u_lights[1].position, modelview, [1, 0, 0, 0]); } else { gl.uniform3f(u_material.emissiveColor, 0.1, 0.1, 0.1); } sphere.render(); gl.uniform3f(u_material.emissiveColor, 0, 0, 0); popMatrix(); pushMatrix(); // draw the moon, with emissive color at night mat4.translate(modelview, modelview, [6, 12, 0]); mat4.scale(modelview, modelview, [0.4, 0.4, 0.4]); if (!daytime) { setLightPosition(u_lights[1].position, modelview, [4, 2, 0, 1]); gl.uniform3f(u_material.emissiveColor, 0.7, 0.7, 1); } sphere.render(); gl.uniform3f(u_material.emissiveColor, 0, 0, 0); popMatrix(); if (!headLightsOn) { gl.uniform1f(u_lights[2].enabled, 0); gl.uniform1f(u_lights[3].enabled, 0); } else { gl.uniform1f(u_lights[2].enabled, 1); gl.uniform1f(u_lights[3].enabled, 1); pushMatrix(); mat4.rotate(modelview, modelview, (-frameNumber) / 180 * Math.PI, [0, 1, 0]); mat4.translate(modelview, modelview, [0, 0.3, 10]); mat4.scale(modelview, modelview, [0.3, 0.3, .3]); pushMatrix(); mat4.translate(modelview, modelview, [-3, 0.6, -1]); mat4.rotateY(modelview, modelview, -Math.PI / 12); // (bogus rotation to point headlights more along road) setLightPosition(u_lights[2].position, modelview, [0, 0, 0, 1]); setSpotlightDirection(u_lights[2].spotDirection, modelview, [-1, 0, 0]); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-3, 0.6, 1]); mat4.rotateY(modelview, modelview, -Math.PI / 12); setLightPosition(u_lights[3].position, modelview, [0, 0, 0, 1]); setSpotlightDirection(u_lights[3].spotDirection, modelview, [-1, 0, 0]); popMatrix(); popMatrix(); } if (!prisonLightsOn) { gl.uniform1f(u_lights[4].enabled, 0); gl.uniform1f(u_lights[5].enabled, 0); gl.uniform1f(u_lights[6].enabled, 0); gl.uniform1f(u_lights[7].enabled, 0); } else { gl.uniform1f(u_lights[4].enabled, 1); gl.uniform1f(u_lights[5].enabled, 1); pushMatrix(); mat4.translate(modelview, modelview, [5, 6, 10]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [6, 0, 4]); mat4.scale(modelview, modelview, [0.3, 0.3, .3]); pushMatrix(); mat4.translate(modelview, modelview, [-3, 10, -1]); setLightPosition(u_lights[4].position, modelview, [0, 0, 0, 1]); setSpotlightDirection(u_lights[4].spotDirection, modelview, [-4, 0, 0]); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-3, 0.6, 1]); mat4.rotateY(modelview, modelview, -Math.PI / 12); setLightPosition(u_lights[5].position, modelview, [0, 0, 0, 1]); setSpotlightDirection(u_lights[5].spotDirection, modelview, [-1, 0, 0]); popMatrix(); popMatrix(); gl.uniform1f(u_lights[6].enabled, 1); gl.uniform1f(u_lights[7].enabled, 1); pushMatrix(); mat4.translate(modelview, modelview, [-5, 6, -10]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-6, 0, -4]); mat4.scale(modelview, modelview, [0.3, 0.3, .3]); pushMatrix(); mat4.translate(modelview, modelview, [3, 10, 1]); setLightPosition(u_lights[6].position, modelview, [0, 0, 0, 1]); setSpotlightDirection(u_lights[6].spotDirection, modelview, [4, 0, 0]); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-3, 0.6, 1]); mat4.rotateY(modelview, modelview, -Math.PI / 12); setLightPosition(u_lights[7].position, modelview, [0, 0, 0, 1]); setSpotlightDirection(u_lights[7].spotDirection, modelview, [-1, 0, 0]); popMatrix(); popMatrix(); } } /** * Draws a "world" consisting of a disk holding some trees and a road, and a car that * drives along the road. A tree in the middle grows from frame 0 to frame 1000. */ function world() { pushMatrix(); // the disk that the world is on mat4.translate(modelview, modelview, [0, -0.05, 0]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [1, 0, 0]); mat4.scale(modelview, modelview, [2, 2, 2]); currentColor = [0.1, 0.4, 0.1, 1]; disk.render(); popMatrix(); prison(); pushMatrix(); mat4.translate(modelview, modelview, [3.5, 3, 5]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, -1, 0]) guardTower(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-3.5, 3, -5]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 1, 0]) guardTower(); popMatrix(); pushMatrix(); // creates perimeter road currentColor = [0.3, 0.3, 0.3, 1]; mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]); ring.render(); popMatrix(); pushMatrix(); // creates the patrol car mat4.rotate(modelview, modelview, (-frameNumber) / 180 * Math.PI, [0, 1, 0]); mat4.translate(modelview, modelview, [0.3, 0.3, 10]); mat4.scale(modelview, modelview, [0.3, 0.3, .3]); patrolCar(); popMatrix(); createTrees(); } /** This function creates the trees for the scene. */ function createTrees() { pushMatrix(); mat4.translate(modelview, modelview, [-1, 0, 5.2]); mat4.scale(modelview, modelview, [0.25, 0.25, 0.25]); tree(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [5.3, 0, 0]); mat4.scale(modelview, modelview, [0.5, 0.5, 0.5]); tree(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-6.5, 0, 0]); mat4.scale(modelview, modelview, [0.75, 0.75, 0.75]); tree(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [5.1, 0, 0.5]); mat4.scale(modelview, modelview, [0.3, 0.3, 0.3]); tree(); popMatrix(); mat4.rotate(modelview, modelview, (53) / 180 * Math.PI, [0, 1, 0]); pushMatrix(); mat4.translate(modelview, modelview, [5.3, 0, 0]); mat4.scale(modelview, modelview, [0.5, 0.5, 0.5]); tree(); popMatrix(); } /** This function creates a guard tower. */ function guardTower() { pushMatrix(); // base of the tower mat4.scale(modelview, modelview, [1, 6, 1]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // base of the tower mat4.translate(modelview, modelview, [0, 4, 0]); mat4.scale(modelview, modelview, [2, 3, 2]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); currentColor = [1, 1, 0.3, 1]; if (prisonLightsOn) { gl.uniform3f(u_material.emissiveColor, 0.4, 0.4, 0.4); } pushMatrix(); mat4.translate(modelview, modelview, [1, 4, 0]); mat4.scale(modelview, modelview, [0.1, 0.25, 0.25]); sphere.render(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [0, 4, 1]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 1, 0]) mat4.scale(modelview, modelview, [0.1, 0.25, 0.25]); sphere.render(); popMatrix(); gl.uniform3f(u_material.emissiveColor, 0, 0, 0); } /** This function creates a prison and walls. */ function prison() { pushMatrix(); // the prison mat4.translate(modelview, modelview, [0, 1.5, 0]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]); mat4.scale(modelview, modelview, [5, 5, 3]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // right side wall mat4.translate(modelview, modelview, [4.5, 0.75, 0]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 0, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 12]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // left side wall mat4.translate(modelview, modelview, [-4.5, 0.75, 0]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 0, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 12]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // rear wall mat4.translate(modelview, modelview, [0, 0.75, -6]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 1, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 9.25]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // front left wall mat4.translate(modelview, modelview, [-2.625, 0.75, 6]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 1, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 4]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // front right wall mat4.translate(modelview, modelview, [2.625, 0.75, 6]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 1, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 4]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // front walkway left wall mat4.translate(modelview, modelview, [-0.5, 0.75, 4.125]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 0, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 4]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // front walkway right wall mat4.translate(modelview, modelview, [0.5, 0.75, 4.125]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 0, 0]); mat4.scale(modelview, modelview, [0.25, 1.5, 4]); currentColor = [1, 1, 1, 1]; cube.render(); popMatrix(); pushMatrix(); // prison door mat4.translate(modelview, modelview, [0, 1.25, 2.5]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [0, 1, 0]); mat4.scale(modelview, modelview, [0.25, 2.5, 0.75]); currentColor = [0.1, 0.1, 0.1, 1]; cube.render(); popMatrix(); } /** Draws a tree consisting of a green cone with a brown cylinder for a trunk. */ function tree() { pushMatrix(); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]); pushMatrix(); currentColor = [0.5, 0.3, 0.1, 1]; mat4.scale(modelview, modelview, [0.5, 0.5, 1]); cylinder.render(); popMatrix(); pushMatrix(); currentColor = [0, 0.8, 0, 1]; mat4.translate(modelview, modelview, [0, 0, 0.8]); mat4.scale(modelview, modelview, [1.5, 1.5, 2]); cone.render(); popMatrix(); popMatrix(); } /** * Draws a car consisting of two scaled blue cubes with headlights * and four wheels on two axels. */ function patrolCar() { pushMatrix(); mat4.translate(modelview, modelview, [2.5, 0, 0]); axle(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-2.5, 0, 0]); axle(); popMatrix(); currentColor = [0, 0, 1, 1]; pushMatrix(); mat4.translate(modelview, modelview, [0, 0.6, 0]); mat4.scale(modelview, modelview, [6, 1.2, 3]); cube.render(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [0.5, 1.4, 0]); mat4.scale(modelview, modelview, [3, 1, 2.8]); cube.render(); popMatrix(); currentColor = [1, 1, 0.3, 1]; if (headLightsOn) { gl.uniform3f(u_material.emissiveColor, 0.4, 0.4, 0); } pushMatrix(); mat4.translate(modelview, modelview, [-3, 0.6, -1]); mat4.scale(modelview, modelview, [0.1, 0.25, 0.25]); sphere.render(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [-3, 0.6, 1]); mat4.scale(modelview, modelview, [0.1, 0.25, 0.25]); sphere.render(); popMatrix(); gl.uniform3f(u_material.emissiveColor, 0, 0, 0); currentColor = [1, 0, 0, 1]; if(emergencyLightsOn) { if(flashCount % 6 == 0) { gl.uniform3f(u_material.emissiveColor, 1, 0, 0); } else { gl.uniform3f(u_material.emissiveColor, 0, 0, 0); } } else { gl.uniform3f(u_material.emissiveColor, 0, 0, 0); } pushMatrix(); mat4.translate(modelview, modelview, [0, 2, 0]); mat4.scale(modelview, modelview, [0.5, 0.5, 0.5]); sphere.render(); popMatrix(); gl.uniform3f(u_material.emissiveColor, 0, 0, 0); } /** * Draw an axle that consists of a long yellow cylinder with * a wheel on each end. */ function axle() { currentColor = [0.8, 0.7, 0, 1]; pushMatrix(); mat4.scale(modelview, modelview, [0.2, 0.2, 4.3]); mat4.translate(modelview, modelview, [0, 0, -0.5]); cylinder.render(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [0, 0, 2]); wheel(); popMatrix(); pushMatrix(); mat4.translate(modelview, modelview, [0, 0, -2]); wheel(); popMatrix(); } /** * Draw a rotating wheel that consists of a torus with three * cylinders to make the spokes of the wheel. */ function wheel() { pushMatrix(); mat4.rotate(modelview, modelview, (frameNumber * 10) / 180 * Math.PI, [0, 0, 1]); currentColor = [0, 0, 0.7, 1]; torus.render(); currentColor = [0.9, 0.9, 0.6, 1]; pushMatrix(); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]); mat4.scale(modelview, modelview, [0.1, 0.1, 1.8]); mat4.translate(modelview, modelview, [0, 0, -0.5]); cylinder.render(); popMatrix(); pushMatrix(); mat4.rotate(modelview, modelview, (60) / 180 * Math.PI, [0, 0, 1]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]); mat4.scale(modelview, modelview, [0.1, 0.1, 1.8]); mat4.translate(modelview, modelview, [0, 0, -0.5]); cylinder.render(); popMatrix(); pushMatrix(); mat4.rotate(modelview, modelview, (-60) / 180 * Math.PI, [0, 0, 1]); mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]); mat4.scale(modelview, modelview, [0.1, 0.1, 1.8]); mat4.translate(modelview, modelview, [0, 0, -0.5]); cylinder.render(); popMatrix(); popMatrix(); } /** Push a copy of the current modelview matrix onto the matrix stack. */ function pushMatrix() { matrixStack.push(mat4.clone(modelview)); } /** Restore the modelview matrix to a value popped from the matrix stack. */ function popMatrix() { modelview = matrixStack.pop(); } /** * Create one of the basic objects. The modelData holds the data for * an IFS using the structure from basic-objects-IFS.js. This function * creates VBOs to hold the coordinates, normal vectors, and indices * from the IFS, and it loads the data into those buffers. The function * creates a new object whose properties are the identifies of the * VBOs. The new object also has a function, render(), that can be called to * render the object, using all the data from the buffers. That object * is returned as the value of the function. (The second parameter, * xtraTranslate, is there because this program was ported from a Java * version where cylinders were created in a different position, with * the base on the xy-plane instead of with their center at the origin. * The xtraTranslate parameter is a 3-vector that is applied as a * translation to the rendered object. It is used to move the cylinders * into the position expected by the code that was ported from Java.) */ function createModel(modelData, xtraTranslate) { var model = {}; model.coordsBuffer = gl.createBuffer(); model.normalBuffer = gl.createBuffer(); model.indexBuffer = gl.createBuffer(); model.count = modelData.indices.length; if (xtraTranslate) model.xtraTranslate = xtraTranslate; else model.xtraTranslate = null; gl.bindBuffer(gl.ARRAY_BUFFER, model.coordsBuffer); gl.bufferData(gl.ARRAY_BUFFER, modelData.vertexPositions, gl.STATIC_DRAW); gl.bindBuffer(gl.ARRAY_BUFFER, model.normalBuffer); gl.bufferData(gl.ARRAY_BUFFER, modelData.vertexNormals, gl.STATIC_DRAW); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, model.indexBuffer); gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, modelData.indices, gl.STATIC_DRAW); model.render = function() { // This function will render the object. // Since the buffer from which we are taking the coordinates and normals // change each time an object is drawn, we have to use gl.vertexAttribPointer // to specify the location of the data. And to do that, we must first // bind the buffer that contains the data. Similarly, we have to // bind this object's index buffer before calling gl.drawElements. gl.bindBuffer(gl.ARRAY_BUFFER, this.coordsBuffer); gl.vertexAttribPointer(a_coords_loc, 3, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, this.normalBuffer); gl.vertexAttribPointer(a_normal_loc, 3, gl.FLOAT, false, 0, 0); gl.uniform4fv(u_material.diffuseColor, currentColor); if (this.xtraTranslate) { pushMatrix(); mat4.translate(modelview, modelview, this.xtraTranslate); } gl.uniformMatrix4fv(u_modelview, false, modelview); mat3.normalFromMat4(normalMatrix, modelview); gl.uniformMatrix3fv(u_normalMatrix, false, normalMatrix); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer); gl.drawElements(gl.TRIANGLES, this.count, gl.UNSIGNED_SHORT, 0); if (this.xtraTranslate) { popMatrix(); } } return model; } /* Creates a program for use in the WebGL context gl, and returns the * identifier for that program. If an error occurs while compiling or * linking the program, an exception of type String is thrown. The error * string contains the compilation or linking error. If no error occurs, * the program identifier is the return value of the function. * The second and third parameters are the id attributes for <script> * elementst that contain the source code for the vertex and fragment * shaders. */ function createProgram(gl, vertexShaderID, fragmentShaderID) { function getTextContent(elementID) { // This nested function retrieves the text content of an // element on the web page. It is used here to get the shader // source code from the script elements that contain it. var element = document.getElementById(elementID); var node = element.firstChild; var str = ""; while (node) { if (node.nodeType == 3) // this is a text node str += node.textContent; node = node.nextSibling; } return str; } try { var vertexShaderSource = getTextContent(vertexShaderID); var fragmentShaderSource = getTextContent(fragmentShaderID); } catch (e) { throw "Error: Could not get shader source code from script elements."; } var vsh = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vsh, vertexShaderSource); gl.compileShader(vsh); if (!gl.getShaderParameter(vsh, gl.COMPILE_STATUS)) { throw "Error in vertex shader: " + gl.getShaderInfoLog(vsh); } var fsh = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fsh, fragmentShaderSource); gl.compileShader(fsh); if (!gl.getShaderParameter(fsh, gl.COMPILE_STATUS)) { throw "Error in fragment shader: " + gl.getShaderInfoLog(fsh); } var prog = gl.createProgram(); gl.attachShader(prog, vsh); gl.attachShader(prog, fsh); gl.linkProgram(prog); if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) { throw "Link error in program: " + gl.getProgramInfoLog(prog); } return prog; } /** * Loads a texture image asynchronously. The first paramter is the url * from which the image is to be loaded. The second parameter is the * texture object into which the image is to be loaded. When the image * has finished loading, the draw() function will be called to draw the * triangle with the texture. (Also, if an error occurs during loading, * an error message is displayed on the page, and draw() is called to * draw the triangle without the texture.) */ function loadTexture( url, textureObject ) { var img = new Image(); // A DOM image element to represent the image. img.onload = function() { // This function will be called after the image loads successfully. // We have to bind the texture object to the TEXTURE_2D target before // loading the image into the texture object. gl.bindTexture(gl.TEXTURE_2D, textureObject); gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,img); gl.generateMipmap(gl.TEXTURE_2D); // Create mipmaps; you must either // do this or change the minification filter. draw(); // Draw the canvas, with the texture. } img.onerror = function(e,f) { // This function will be called if an error occurs while loading. document.getElementById("headline").innerHTML = "<p>Sorry, texture image could not be loaded.</p>"; draw(); // Draw without the texture; triangle will be black. } img.crossOrigin = ""; img.src = url; // Start loading of the image. // This must be done after setting onload and onerror. } /* Initialize the WebGL context. Called from init() */ function initGL() { var prog = createProgram(gl, "vshader-source", "fshader-source"); gl.useProgram(prog); gl.enable(gl.DEPTH_TEST); /* Get attribute and uniform locations */ a_coords_loc = gl.getAttribLocation(prog, "a_coords"); a_normal_loc = gl.getAttribLocation(prog, "a_normal"); gl.enableVertexAttribArray(a_coords_loc); gl.enableVertexAttribArray(a_normal_loc); u_modelview = gl.getUniformLocation(prog, "modelview"); u_projection = gl.getUniformLocation(prog, "projection"); u_normalMatrix = gl.getUniformLocation(prog, "normalMatrix"); u_material = { diffuseColor: gl.getUniformLocation(prog, "material.diffuseColor"), specularColor: gl.getUniformLocation(prog, "material.specularColor"), emissiveColor: gl.getUniformLocation(prog, "material.emissiveColor"), specularExponent: gl.getUniformLocation(prog, "material.specularExponent") }; u_lights = new Array(8); for (var i = 0; i < 8; i++) { u_lights[i] = { enabled: gl.getUniformLocation(prog, "lights[" + i + "].enabled"), position: gl.getUniformLocation(prog, "lights[" + i + "].position"), color: gl.getUniformLocation(prog, "lights[" + i + "].color"), spotDirection: gl.getUniformLocation(prog, "lights[" + i + "].spotDirection"), spotCosineCutoff: gl.getUniformLocation(prog, "lights[" + i + "].spotCosineCutoff"), spotExponent: gl.getUniformLocation(prog, "lights[" + i + "].spotExponent"), attenuation: gl.getUniformLocation(prog, "lights[" + i + "].attenuation") }; } gl.uniform3f(u_material.specularColor, 0.1, 0.1, 0.1); // specular properties don't change gl.uniform1f(u_material.specularExponent, 16); gl.uniform3f(u_material.emissiveColor, 0, 0, 0); // default, will be changed temporarily for some objects for (var i = 1; i < 4; i++) { // set defaults for lights gl.uniform1i(u_lights[i].enabled, 0); gl.uniform4f(u_lights[i].position, 0, 0, 1, 0); gl.uniform1f(u_lights[i].spotCosineCutoff, 0); // not a spotlight gl.uniform3f(u_lights[i].spotDirection, 0, 0, -1); gl.uniform1f(u_lights[i].spotExponent, 5); gl.uniform1f(u_lights[i].attenuation, 0); // no attenuation gl.uniform3f(u_lights[i].color, 1, 1, 1); } gl.uniform1i(u_lights[0].enabled, 1); // viewpoint light gl.uniform4f(u_lights[0].position, 0, 0, 0, 1); // positional, at viewpoint gl.uniform3f(u_lights[0].color, 0.2, 0.2, 0.2); // dim gl.uniform1i(u_lights[1].enabled, 1); // the sun during the day, the lamp at night gl.uniform1f(u_lights[2].spotCosineCutoff, Math.cos(Math.PI / 8)); // lights 2 and 3 are headlights, gl.uniform1f(u_lights[3].spotCosineCutoff, Math.cos(Math.PI / 8)); // which are spotlights gl.uniform3f(u_lights[2].color, 0.5, 0.5, 0.4); gl.uniform3f(u_lights[3].color, 0.5, 0.5, 0.4); gl.uniform1f(u_lights[4].spotCosineCutoff, Math.cos(Math.PI / 8)); gl.uniform1f(u_lights[5].spotCosineCutoff, Math.cos(Math.PI / 8)); // which are spotlights gl.uniform3f(u_lights[4].color, 0.5, 0.5, 0.4); gl.uniform3f(u_lights[5].color, 0.5, 0.5, 0.4); gl.uniform1f(u_lights[6].spotCosineCutoff, Math.cos(Math.PI / 8)); gl.uniform1f(u_lights[7].spotCosineCutoff, Math.cos(Math.PI / 8)); // which are spotlights gl.uniform3f(u_lights[6].color, 0.5, 0.5, 0.4); gl.uniform3f(u_lights[7].color, 0.5, 0.5, 0.4); // Note: position and spot direction for lights 1 to 4 are managed by modeling transforms. } // end initGL() //--------------------------------- animation framework ------------------------------ function frame() { flashCount += 1; frameNumber += frameSpeed; draw(); requestAnimationFrame(frame); } /** This function changes the time of day. */ function changeTOD(num) { if(num == 0) { daytime = true; } else { daytime = false; } draw(); } /** This function handles the slider changes. */ function doSlideChange() { frameSpeed = document.getElementById("range1").value * 0.01; } /** This function turns on and off the headlights. */ function changeHeadLights() { if (headLightsOn) { headLightsOn = false; } else { headLightsOn = true; } draw(); } /** This function turns on and off the prison spotlights. */ function changePrisonLights() { if (prisonLightsOn) { prisonLightsOn = false; } else { prisonLightsOn = true; } } /** This function turns on and off the prison emergency lights. */ function changeEmergencyLights() { if (emergencyLightsOn) { emergencyLightsOn = false; } else { emergencyLightsOn = true; } } //------------------------------ init scene --------------------------------- /** * initialization function that will be called when the page has loaded */ function init() { try { var canvas = document.getElementById("webglcanvas"); gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl"); if (!gl) { throw "Browser does not support WebGL"; } } catch (e) { document.getElementById("message").innerHTML = "<p>Sorry, could not get a WebGL graphics context.</p>"; return; } try { initGL(); // initialize the WebGL graphics context } catch (e) { document.getElementById("message").innerHTML = "<p>Sorry, could not initialize the WebGL graphics context:" + e + "</p>"; return; } document.getElementById("r2").checked = true; document.getElementById("r1").onclick = function() {changeTOD(0);}; document.getElementById("r2").onclick = function() {changeTOD(1);}; document.getElementById("light1").checked = headLightsOn; document.getElementById("light1").onchange = function() {changeHeadLights();}; document.getElementById("light2").checked = prisonLightsOn; document.getElementById("light2").onchange = function() {changePrisonLights();}; document.getElementById("light3").checked = emergencyLightsOn; document.getElementById("light3").onchange = function() {changeEmergencyLights();}; document.getElementById("range1").oninput = function() {doSlideChange();}; torus = createModel(uvTorus(0.5, 1, 16, 8)); // Create all the basic objects. sphere = createModel(uvSphere(1)); cone = createModel(uvCone(), [0, 0, .5]); cylinder = createModel(uvCylinder(), [0, 0, .5]); disk = createModel(uvCylinder(5.5, 0.5, 64), [0, 0, .25]); ring = createModel(ring(9.0, 11, 40)); cube = createModel(cube()); rotator = new TrackballRotator(canvas, function() { draw(); }, 17, [0, 1, 2]); draw(); requestAnimationFrame(frame); }
39.726176
143
0.62196
187f4c972856c42e8affd87860616fe78eb5b837
1,665
js
JavaScript
src/renderer/account/components/Portfolio/index.js
Splyse/nos-client
51844a9b9eeb4820409a1a92318e91e010e46aee
[ "MIT" ]
254
2018-04-14T13:50:54.000Z
2022-02-26T02:12:32.000Z
src/renderer/account/components/Portfolio/index.js
Splyse/nos-client
51844a9b9eeb4820409a1a92318e91e010e46aee
[ "MIT" ]
1,192
2018-04-15T10:55:57.000Z
2022-03-25T18:53:38.000Z
src/renderer/account/components/Portfolio/index.js
Splyse/nos-client
51844a9b9eeb4820409a1a92318e91e010e46aee
[ "MIT" ]
88
2018-04-14T22:00:35.000Z
2021-04-15T18:16:01.000Z
import { compose } from 'recompose'; import { withData, withActions, withError } from 'spunky'; import claimableActions from 'shared/actions/claimableActions'; import blockActions from 'shared/actions/blockActions'; import currencyActions from 'settings/actions/currencyActions'; import withInitialCall from 'shared/hocs/withInitialCall'; import withAuthData from 'shared/hocs/withAuthData'; import withNetworkData from 'shared/hocs/withNetworkData'; import { withErrorToast } from 'shared/hocs/withToast'; import withLoadingProp from 'shared/hocs/withLoadingProp'; import withActiveWallet from 'shared/hocs/withActiveWallet'; import Portfolio from './Portfolio'; import balanceWithPricesActions from '../../actions/balanceWithPricesActions'; const mapBlockDataToProps = (block) => ({ block }); const mapBlockErrorToProps = (blockError) => ({ blockError }); const mapCurrencyDataToProps = (currency) => ({ currency }); const mapbalanceWithPricesActionsToProps = (actions) => ({ balancesWithPrices: (data) => actions.call(data) }); export default compose( withData(currencyActions, mapCurrencyDataToProps), withAuthData(), withNetworkData(), withActiveWallet(), withInitialCall(claimableActions, ({ net, address }) => ({ net, address })), withInitialCall(balanceWithPricesActions, ({ currency, net, address }) => ({ currency, net, address })), withActions(balanceWithPricesActions, mapbalanceWithPricesActionsToProps), withData(blockActions, mapBlockDataToProps), withError(blockActions, mapBlockErrorToProps), withLoadingProp(claimableActions), withLoadingProp(balanceWithPricesActions), withErrorToast() )(Portfolio);
37.840909
78
0.774775
187fb5c39ba43c251a4e52e3d44a6a323bb43bed
157
js
JavaScript
data/js/00/50/c2/eb/f0/00.36.js
p-g-krish/deepmac-tracker
44d625a6b1ec30bf52f8d12a44b0afc594eb5f94
[ "CC-BY-4.0", "MIT" ]
null
null
null
data/js/00/50/c2/eb/f0/00.36.js
p-g-krish/deepmac-tracker
44d625a6b1ec30bf52f8d12a44b0afc594eb5f94
[ "CC-BY-4.0", "MIT" ]
null
null
null
data/js/00/50/c2/eb/f0/00.36.js
p-g-krish/deepmac-tracker
44d625a6b1ec30bf52f8d12a44b0afc594eb5f94
[ "CC-BY-4.0", "MIT" ]
null
null
null
deepmacDetailCallback("0050c2ebf000/36",[{"a":"HIGH TECH CAMPUS 9 EINDHOVEN NL 5656 AE","o":"CIVOLUTION","d":"2011-10-16","t":"add","s":"ieee","c":"AE"}]);
78.5
156
0.636943
188005adcf216faa7dba698fa6e41cabca85fb83
309
js
JavaScript
src/features/articles/services/ArticlesServiceRoot.js
helabenkhalfallah/master-class-react-redux-saga
94d3f77d26d1d53c5e8f3c329360e8e5da7596ec
[ "Apache-2.0" ]
null
null
null
src/features/articles/services/ArticlesServiceRoot.js
helabenkhalfallah/master-class-react-redux-saga
94d3f77d26d1d53c5e8f3c329360e8e5da7596ec
[ "Apache-2.0" ]
null
null
null
src/features/articles/services/ArticlesServiceRoot.js
helabenkhalfallah/master-class-react-redux-saga
94d3f77d26d1d53c5e8f3c329360e8e5da7596ec
[ "Apache-2.0" ]
null
null
null
import { takeLatest, } from 'redux-saga/effects'; import ArticlesActions from '../redux/ArticlesActions'; import ArticlesListService from './ArticlesListService'; const ArticlesServiceRoot = [ takeLatest(ArticlesActions.ARTICLE_LIST_REQUEST, ArticlesListService), ]; export default ArticlesServiceRoot;
25.75
72
0.805825
18808c94ca28a048d03ee63e0d1ca3ec73dba7e4
2,328
js
JavaScript
server/calculateSafety.js
ksapru/nwHacks2021
4fceebe8c53d2aa43a039d48f695e4dc94746f60
[ "MIT" ]
null
null
null
server/calculateSafety.js
ksapru/nwHacks2021
4fceebe8c53d2aa43a039d48f695e4dc94746f60
[ "MIT" ]
null
null
null
server/calculateSafety.js
ksapru/nwHacks2021
4fceebe8c53d2aa43a039d48f695e4dc94746f60
[ "MIT" ]
null
null
null
module.exports = (workLocation) => { let safetyStars = 0; if (typeof workLocation == 'undefined') { return 0 } switch(workLocation.toLowerCase()) { case "arbutus ridge": //21 cases total safetyStars = 5; break; case "downtown"://804 cases total safetyStars = 0; break; case "dunbar - southlands": //29 safetyStars = 5; break; case "fairview": //187 safetyStars = 2; break; case "grandview - woodland": //157 safetyStars = 2; break; case "hastings - sunrise": //101 safetyStars = 3; break; case "kensington - cedar cottage": // 118 safetyStars = 3; break; case "kerrisdale": //24 safetyStars = 5; break; case "killarney": // 37 safetyStars = 4; break; case "kitsilano": // 125 safetyStars = 3; break; case "marpole": // 64 safetyStars = 4; break; case "mount pleasant": // 162 safetyStars = 2; break; case "musqueam": // 5 safetyStars = 5; break; case "oakridge": // 37 safetyStars = 4; break; case "renfrew - collingwood": //190 safetyStars = 5; break; case "riley park": //53 safetyStars = 4; break; case "shaughnessy": // 33 safetyStars = 4; break; case "south cambie": // 53 safetyStars = 4; break; case "stanley park": //6 safetyStars = 5; break; case "strathcona": //226 safetyStars = 1; break; case "sunset": // 78 safetyStars = 4; break; case "victoria - fraserview": // 53 safetyStars = 4; break; case "west end": //192 safetyStars = 1; break; case "west point grey": // 41 safetyStars = 4; break; default: safetyStars = 0; break; } return safetyStars };
27.069767
49
0.430412
188104247214ed2224cc618fcdb186a3ddb88330
9,202
js
JavaScript
out/_next/static/4yqkFENLAsOlV81-rxnYw/pages/index.js
jacobsenanaizabel/anajacobsen
d60e4181eda0c0bf8b84c7243a94628c5d848d8e
[ "MIT" ]
1
2020-06-26T13:05:02.000Z
2020-06-26T13:05:02.000Z
out/_next/static/4yqkFENLAsOlV81-rxnYw/pages/index.js
jacobsenanaizabel/anajacobsen
d60e4181eda0c0bf8b84c7243a94628c5d848d8e
[ "MIT" ]
1
2021-12-09T01:41:36.000Z
2021-12-09T01:41:36.000Z
out/_next/static/4yqkFENLAsOlV81-rxnYw/pages/index.js
jacobsenanaizabel/anajacobsen
d60e4181eda0c0bf8b84c7243a94628c5d848d8e
[ "MIT" ]
null
null
null
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{RNiq:function(e,l,a){"use strict";a.r(l),a.d(l,"__N_SSG",(function(){return d})),a.d(l,"default",(function(){return h}));var t=a("q1tI"),i=a.n(t),n=(a("YFqc"),i.a.createElement),s=function(){return n(i.a.Fragment,null,n("section",{id:"intro",class:"wrapper style1 fullscreen fade-up"},n("div",{class:"inner"},n("div",{class:"row gtr-uniform"},n("div",{class:"col-5"},n("span",{class:"image fit"},n("img",{src:"images/logo.png",alt:""}))),n("div",{class:"col-7"},n("h1",null,"Ol\xe1. seja bem-vindo"),n("label",{class:"text-about"},"Etiam ullamcorper ultrices ipsum non faucibus. Pellentesque sagittis eget lacus iaculis tempor. Nunc pellentesque sem eget congue porttitor. Proin arcu purus, accumsan a metus non, porta consequat elit. Curabitur placerat pharetra maximus. Curabitur aliquet ex vitae augue ultrices ultrices. Nunc porttitor mi ligula, rhoncus dignissim dolor condimentum nec. Ut pellentesque dolor sit amet urna fringilla euismod. Duis vitae ante a neque sollicitudin placerat."))))))},r=i.a.createElement,u=function(){return r(i.a.Fragment,null,r("section",{id:"one",class:"wrapper style2 spotlights"},r("section",null,r("a",{href:"#",class:"image"},r("img",{src:"images/pic01.jpg",alt:"","data-position":"center center"})),r("div",{class:"content"},r("div",{class:"inner"},r("h2",null,"Sed ipsum dolor"),r("p",null,"Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus."))))),r("section",{id:"two",class:"wrapper style3 fade-up"},r("div",{class:"inner"},r("h2",null,"What we do"),r("p",null,"Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus, lacus eget hendrerit bibendum, urna est aliquam sem, sit amet imperdiet est velit quis lorem."),r("div",{class:"features"},r("section",null,r("span",{class:"icon solid major fa-code"}),r("h3",null,"Lorem ipsum amet"),r("p",null,"Phasellus convallis elit id ullam corper amet et pulvinar. Duis aliquam turpis mauris, sed ultricies erat dapibus.")),r("section",null,r("span",{class:"icon solid major fa-lock"}),r("h3",null,"Aliquam sed nullam"),r("p",null,"Phasellus convallis elit id ullam corper amet et pulvinar. Duis aliquam turpis mauris, sed ultricies erat dapibus.")),r("section",null,r("span",{class:"icon solid major fa-cog"}),r("h3",null,"Sed erat ullam corper"),r("p",null,"Phasellus convallis elit id ullam corper amet et pulvinar. Duis aliquam turpis mauris, sed ultricies erat dapibus.")),r("section",null,r("span",{class:"icon solid major fa-desktop"}),r("h3",null,"Veroeros quis lorem"),r("p",null,"Phasellus convallis elit id ullam corper amet et pulvinar. Duis aliquam turpis mauris, sed ultricies erat dapibus.")),r("section",null,r("span",{class:"icon solid major fa-link"}),r("h3",null,"Urna quis bibendum"),r("p",null,"Phasellus convallis elit id ullam corper amet et pulvinar. Duis aliquam turpis mauris, sed ultricies erat dapibus.")),r("section",null,r("span",{class:"icon major fa-gem"}),r("h3",null,"Aliquam urna dapibus"),r("p",null,"Phasellus convallis elit id ullam corper amet et pulvinar. Duis aliquam turpis mauris, sed ultricies erat dapibus."))))),r("section",{id:"three",class:"wrapper style1 fade-up"},r("div",{class:"inner"},r("div",{class:"row gtr-uniform"},r("div",{class:"col-3"},r("h2",null,"Get in touch")),r("div",{class:"col-8"},r("div",{class:"coffe-img"},r("div",{class:"cup"},r("img",{class:"mug",src:"./images/mug.svg",alt:"mug icon"}),r("span",{class:"smoke"}))))),r("p",null,"Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus, lacus eget hendrerit bibendum, urna est aliquam sem, sit amet imperdiet est velit quis lorem."),r("div",{class:"split style1"},r("section",null,r("form",{method:"post",action:"#"},r("div",{class:"fields"},r("div",{class:"field half"},r("label",{for:"name"},"Name"),r("input",{type:"text",name:"name",id:"name"})),r("div",{class:"field half"},r("label",{for:"email"},"Email"),r("input",{type:"text",name:"email",id:"email"})),r("div",{class:"field"},r("label",{for:"message"},"Message"),r("textarea",{name:"message",id:"message",rows:"5"}))),r("ul",{class:"actions"},r("li",null,r("a",{href:"",class:"button submit"},"Send Message"))))),r("section",null,r("ul",{class:"contact"},r("li",null,r("h3",null,"Email"),r("a",{href:"#"},"jacobsenanaizabel@gmail.com")),r("li",null,r("h3",null,"Social"),r("ul",{class:"icons"},r("li",null,r("a",{href:"#",class:"icon brands fa-github"},r("span",{class:"label"},"GitHub"))),r("li",null,r("a",{href:"#",class:"icon brands fa-linkedin-in"},r("span",{class:"label"},"LinkedIn")))))))))))},o=i.a.createElement,c=function(){return o(i.a.Fragment,null,o("section",{id:"sidebar"},o("div",{class:"inner"},o("nav",null,o("ul",null,o("li",null,o("a",{href:"#intro"},"Bem-vindo")),o("li",null,o("a",{href:"#one"},"Sobre")),o("li",null,o("a",{href:"#two"},"Como")),o("li",null,o("a",{href:"#three"},"Contato")),o("li",null,o("a",{href:"https://medium.com/@anaizabeljacobsen"},"Blog")))))))},p=i.a.createElement,f=function(){return p(i.a.Fragment,null,p("footer",{id:"footer",class:"wrapper style1-alt"},p("div",{class:"inner"},p("ul",{class:"menu"},p("li",null,"\xa9 ana jacobsen ")))))},m=i.a.createElement,d=!0;function h(e){e.pokemons;return m("div",null,m(c,null),m("div",{class:"wrapper"},m(s,null),m(u,null)),m(f,null))}},YFqc:function(e,l,a){e.exports=a("cTJO")},cTJO:function(e,l,a){"use strict";var t=a("lwsE"),i=a("W8MJ"),n=a("7W2i"),s=a("a1gu"),r=a("Nsbk");function u(e){var l=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,t=r(e);if(l){var i=r(this).constructor;a=Reflect.construct(t,arguments,i)}else a=t.apply(this,arguments);return s(this,a)}}var o=a("TqRt"),c=a("284h");l.__esModule=!0,l.default=void 0;var p,f=c(a("q1tI")),m=a("QmWs"),d=a("g/15"),h=o(a("nOHt")),v=a("elyg");function g(e){return e&&"object"===typeof e?(0,d.formatWithValidation)(e):e}var b=new Map,q=window.IntersectionObserver,w={};function y(){return p||(q?p=new q((function(e){e.forEach((function(e){if(b.has(e.target)){var l=b.get(e.target);(e.isIntersecting||e.intersectionRatio>0)&&(p.unobserve(e.target),b.delete(e.target),l())}}))}),{rootMargin:"200px"}):void 0)}var k=function(e){n(a,e);var l=u(a);function a(e){var i;return t(this,a),(i=l.call(this,e)).p=void 0,i.cleanUpListeners=function(){},i.formatUrls=function(e){var l=null,a=null,t=null;return function(i,n){if(t&&i===l&&n===a)return t;var s=e(i,n);return l=i,a=n,t=s,s}}((function(e,l){return{href:(0,v.addBasePath)(g(e)),as:l?(0,v.addBasePath)(g(l)):l}})),i.linkClicked=function(e){var l=e.currentTarget,a=l.nodeName,t=l.target;if("A"!==a||!(t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.nativeEvent&&2===e.nativeEvent.which)){var n=i.formatUrls(i.props.href,i.props.as),s=n.href,r=n.as;if(function(e){var l=(0,m.parse)(e,!1,!0),a=(0,m.parse)((0,d.getLocationOrigin)(),!1,!0);return!l.host||l.protocol===a.protocol&&l.host===a.host}(s)){var u=window.location.pathname;s=(0,m.resolve)(u,s),r=r?(0,m.resolve)(u,r):s,e.preventDefault();var o=i.props.scroll;null==o&&(o=r.indexOf("#")<0),h.default[i.props.replace?"replace":"push"](s,r,{shallow:i.props.shallow}).then((function(e){e&&o&&(window.scrollTo(0,0),document.body.focus())}))}}},i.p=!1!==e.prefetch,i}return i(a,[{key:"componentWillUnmount",value:function(){this.cleanUpListeners()}},{key:"getPaths",value:function(){var e=window.location.pathname,l=this.formatUrls(this.props.href,this.props.as),a=l.href,t=l.as,i=(0,m.resolve)(e,a);return[i,t?(0,m.resolve)(e,t):i]}},{key:"handleRef",value:function(e){var l=this;this.p&&q&&e&&e.tagName&&(this.cleanUpListeners(),w[this.getPaths().join("%")]||(this.cleanUpListeners=function(e,l){var a=y();return a?(a.observe(e),b.set(e,l),function(){try{a.unobserve(e)}catch(l){console.error(l)}b.delete(e)}):function(){}}(e,(function(){l.prefetch()}))))}},{key:"prefetch",value:function(e){if(this.p){var l=this.getPaths();h.default.prefetch(l[0],l[1],e).catch((function(e){0})),w[l.join("%")]=!0}}},{key:"render",value:function(){var e=this,l=this.props.children,a=this.formatUrls(this.props.href,this.props.as),t=a.href,i=a.as;"string"===typeof l&&(l=f.default.createElement("a",null,l));var n=f.Children.only(l),s={ref:function(l){e.handleRef(l),n&&"object"===typeof n&&n.ref&&("function"===typeof n.ref?n.ref(l):"object"===typeof n.ref&&(n.ref.current=l))},onMouseEnter:function(l){n.props&&"function"===typeof n.props.onMouseEnter&&n.props.onMouseEnter(l),e.prefetch({priority:!0})},onClick:function(l){n.props&&"function"===typeof n.props.onClick&&n.props.onClick(l),l.defaultPrevented||e.linkClicked(l)}};return!this.props.passHref&&("a"!==n.type||"href"in n.props)||(s.href=i||t),f.default.cloneElement(n,s)}}]),a}(f.Component);l.default=k},vlRD:function(e,l,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return a("RNiq")}])}},[["vlRD",0,2,1]]]);
9,202
9,202
0.683438
18810770757dd56f79965a7eaf5978f07a1f3825
8,311
js
JavaScript
src/annotation/AnnotationList.js
andaleebroomy/waveform-playlist
1fce986c105b78a2bb723f3743016ed5dda7a953
[ "MIT" ]
155
2019-04-14T12:13:54.000Z
2022-02-28T08:13:26.000Z
src/annotation/AnnotationList.js
andaleebroomy/waveform-playlist
1fce986c105b78a2bb723f3743016ed5dda7a953
[ "MIT" ]
49
2019-04-25T23:59:35.000Z
2022-02-12T08:44:46.000Z
src/annotation/AnnotationList.js
andaleebroomy/waveform-playlist
1fce986c105b78a2bb723f3743016ed5dda7a953
[ "MIT" ]
45
2019-04-15T02:58:06.000Z
2022-03-11T14:40:16.000Z
import h from 'virtual-dom/h'; import inputAeneas from './input/aeneas'; import outputAeneas from './output/aeneas'; import { secondsToPixels } from '../utils/conversions'; import DragInteraction from '../interaction/DragInteraction'; import ScrollTopHook from './render/ScrollTopHook'; import timeformat from '../utils/timeformat'; class AnnotationList { constructor(playlist, annotations, controls = [], editable = false, linkEndpoints = false, isContinuousPlay = false) { this.playlist = playlist; this.resizeHandlers = []; this.editable = editable; this.annotations = annotations.map(a => // TODO support different formats later on. inputAeneas(a), ); this.setupInteractions(); this.controls = controls; this.setupEE(playlist.ee); // TODO actually make a real plugin system that's not terrible. this.playlist.isContinuousPlay = isContinuousPlay; this.playlist.linkEndpoints = linkEndpoints; this.length = this.annotations.length; } setupInteractions() { this.annotations.forEach((a, i) => { const leftShift = new DragInteraction(this.playlist, { direction: 'left', index: i, }); const rightShift = new DragInteraction(this.playlist, { direction: 'right', index: i, }); this.resizeHandlers.push(leftShift); this.resizeHandlers.push(rightShift); }); } setupEE(ee) { ee.on('dragged', (deltaTime, data) => { const annotationIndex = data.index; const annotations = this.annotations; const note = annotations[annotationIndex]; // resizing to the left if (data.direction === 'left') { const originalVal = note.start; note.start += deltaTime; if (note.start < 0) { note.start = 0; } if (annotationIndex && (annotations[annotationIndex - 1].end > note.start)) { annotations[annotationIndex - 1].end = note.start; } if (this.playlist.linkEndpoints && annotationIndex && (annotations[annotationIndex - 1].end === originalVal)) { annotations[annotationIndex - 1].end = note.start; } } else { // resizing to the right const originalVal = note.end; note.end += deltaTime; if (note.end > this.playlist.duration) { note.end = this.playlist.duration; } if (annotationIndex < (annotations.length - 1) && (annotations[annotationIndex + 1].start < note.end)) { annotations[annotationIndex + 1].start = note.end; } if (this.playlist.linkEndpoints && (annotationIndex < (annotations.length - 1)) && (annotations[annotationIndex + 1].start === originalVal)) { annotations[annotationIndex + 1].start = note.end; } } this.playlist.drawRequest(); }); ee.on('continuousplay', (val) => { this.playlist.isContinuousPlay = val; }); ee.on('linkendpoints', (val) => { this.playlist.linkEndpoints = val; }); ee.on('annotationsrequest', () => { this.export(); }); return ee; } export() { const output = this.annotations.map(a => outputAeneas(a)); const dataStr = `data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(output))}`; const a = document.createElement('a'); document.body.appendChild(a); a.href = dataStr; a.download = 'annotations.json'; a.click(); document.body.removeChild(a); } renderResizeLeft(i) { const events = DragInteraction.getEvents(); const config = { attributes: { style: 'position: absolute; height: 30px; width: 10px; top: 0; left: -2px', draggable: true, } }; const handler = this.resizeHandlers[i * 2]; events.forEach((event) => { config[`on${event}`] = handler[event].bind(handler); }); return h('div.resize-handle.resize-w', config); } renderResizeRight(i) { const events = DragInteraction.getEvents(); const config = { attributes: { style: 'position: absolute; height: 30px; width: 10px; top: 0; right: -2px', draggable: true, } }; const handler = this.resizeHandlers[(i * 2) + 1]; events.forEach((event) => { config[`on${event}`] = handler[event].bind(handler); }); return h('div.resize-handle.resize-e', config); } renderControls(note, i) { // seems to be a bug with references, or I'm missing something. const that = this; return this.controls.map(ctrl => h(`i.${ctrl.class}`, { attributes: { title: ctrl.title, }, onclick: () => { ctrl.action(note, i, that.annotations, { linkEndpoints: that.playlist.linkEndpoints, }); this.setupInteractions(); that.playlist.drawRequest(); }, }), ); } render() { const boxes = h('div.annotations-boxes', { attributes: { style: 'height: 30px;', }, }, this.annotations.map((note, i) => { const samplesPerPixel = this.playlist.samplesPerPixel; const sampleRate = this.playlist.sampleRate; const pixPerSec = sampleRate / samplesPerPixel; const pixOffset = secondsToPixels(this.playlist.scrollLeft, samplesPerPixel, sampleRate); const left = Math.floor((note.start * pixPerSec) - pixOffset); const width = Math.ceil((note.end * pixPerSec) - (note.start * pixPerSec)); return h('div.annotation-box', { attributes: { style: `position: absolute; height: 30px; width: ${width}px; left: ${left}px`, 'data-id': note.id, }, }, [ this.renderResizeLeft(i), h('span.id', { onclick: () => { if (this.playlist.isContinuousPlay) { this.playlist.ee.emit('play', this.annotations[i].start); } else { this.playlist.ee.emit('play', this.annotations[i].start, this.annotations[i].end); } }, }, [ note.id, ], ), this.renderResizeRight(i), ], ); }), ); const boxesWrapper = h('div.annotations-boxes-wrapper', { attributes: { style: 'overflow: hidden;', }, }, [ boxes, ], ); const text = h('div.annotations-text', { hook: new ScrollTopHook(), }, this.annotations.map((note, i) => { const format = timeformat(this.playlist.durationFormat); const start = format(note.start); const end = format(note.end); let segmentClass = ''; if (this.playlist.isPlaying() && (this.playlist.playbackSeconds >= note.start) && (this.playlist.playbackSeconds <= note.end)) { segmentClass = '.current'; } const editableConfig = { attributes: { contenteditable: true, }, oninput: (e) => { // needed currently for references // eslint-disable-next-line no-param-reassign note.lines = [e.target.innerText]; }, onkeypress: (e) => { if (e.which === 13 || e.keyCode === 13) { e.target.blur(); e.preventDefault(); } }, }; const linesConfig = this.editable ? editableConfig : {}; return h(`div.annotation${segmentClass}`, [ h('span.annotation-id', [ note.id, ]), h('span.annotation-start', [ start, ]), h('span.annotation-end', [ end, ]), h('span.annotation-lines', linesConfig, [ note.lines, ], ), h('span.annotation-actions', this.renderControls(note, i), ), ], ); }), ); return h('div.annotations', [ boxesWrapper, text, ], ); } } export default AnnotationList;
27.889262
102
0.54097
188138b3d1e1971fdb94e13810b6f4a3c929c25b
1,591
js
JavaScript
admin/src/containers/View/components/NavigationItemForm/utils/form.js
mstrag/strapi-plugin-navigation
52d7f5e00b086699a307abdbe0cba5bd2eb3ed42
[ "MIT" ]
null
null
null
admin/src/containers/View/components/NavigationItemForm/utils/form.js
mstrag/strapi-plugin-navigation
52d7f5e00b086699a307abdbe0cba5bd2eb3ed42
[ "MIT" ]
null
null
null
admin/src/containers/View/components/NavigationItemForm/utils/form.js
mstrag/strapi-plugin-navigation
52d7f5e00b086699a307abdbe0cba5bd2eb3ed42
[ "MIT" ]
null
null
null
import * as yup from "yup"; import { isNil } from "lodash"; import { translatedErrors } from "strapi-helper-plugin"; import { navigationItemType } from "../../../utils/enums"; import pluginId from "../../../../../pluginId"; export const form = { fieldsToDisable: [], fieldsToOmit: [], schema: yup.object({ title: yup.string().required(translatedErrors.required), uiRouterKey: yup.string().required(translatedErrors.required), type: yup.string().required(translatedErrors.required), path: yup.string() .when('type', { is: val => val === navigationItemType.INTERNAL || isNil(val), then: yup.string().required(translatedErrors.required), otherwise: yup.string().notRequired(), }), externalPath: yup.string() .when('type', { is: val => val === navigationItemType.EXTERNAL, then: yup.string() .required(translatedErrors.required) .url(`${pluginId}.popup.item.form.externalPath.validation.type`), otherwise: yup.string().notRequired(), }), menuAttached: yup.boolean(), relatedType: yup.mixed() .when('type', { is: val => val === navigationItemType.INTERNAL || isNil(val), then: yup.mixed().required(translatedErrors.required), otherwise: yup.mixed().notRequired(), }), related: yup.mixed() .when('type', { is: val => val === navigationItemType.INTERNAL || isNil(val), then: yup.mixed().required(translatedErrors.required), otherwise: yup.mixed().notRequired(), }), }), inputsPrefix: "", };
36.159091
75
0.61785
1881612989c5464383fd0140b7659aee3179ec94
3,143
js
JavaScript
app/containers/TeamPage/index.js
Lopatovas/footballClient
73f5519b0c0020099a41a35beb2f0b6e4c382ff7
[ "MIT" ]
null
null
null
app/containers/TeamPage/index.js
Lopatovas/footballClient
73f5519b0c0020099a41a35beb2f0b6e4c382ff7
[ "MIT" ]
null
null
null
app/containers/TeamPage/index.js
Lopatovas/footballClient
73f5519b0c0020099a41a35beb2f0b6e4c382ff7
[ "MIT" ]
null
null
null
import React from 'react'; import PlayerList from 'components/PlayerList'; import Card from 'components/Card'; import StatisticsField from 'components/StatisticsField'; import StatisticsTable from 'components/StatisticsTable'; import injectReducer from 'utils/injectReducer'; import injectSaga from 'utils/injectSaga'; import { compose } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import Style from './style.css'; import makeSelect from './selectors'; import { getTeam, getStanding } from './actions'; import reducer from './reducer'; import saga from './saga'; class TeamPage extends React.Component { componentDidMount() { window.scrollTo(0, 0); this.props.getTeam(this.props.match.params.name); this.props.getStanding(this.props.match.params.name); } render() { const { players, team, standing } = this.props; return ( <div className={Style.bgTeam}> <div className="container"> <div className="row"> <div className="col"> <Card pictureUrl={team.crestUrl} title={team.name} info={`${team.name} was found in ${ team.founded }. The clubs colors are ${team.clubColors}`} /> <StatisticsTable> <StatisticsField name="Position" value={standing.position} /> <StatisticsField name="Points" value={standing.points} /> <StatisticsField name="Games played" value={standing.playedGames} /> <StatisticsField name="Won" value={standing.won} /> <StatisticsField name="Lost" value={standing.lost} /> <StatisticsField name="Draw" value={standing.draw} /> <StatisticsField name="Goals for" value={standing.goalsFor} /> <StatisticsField name="Goals against" value={standing.goalsAgainst} /> <StatisticsField name="Goal difference" value={standing.goalDifference} /> </StatisticsTable> </div> <div className="col"> <PlayerList data={players} /> </div> </div> <br /> </div> </div> ); } } TeamPage.propTypes = { players: PropTypes.array.isRequired, team: PropTypes.object.isRequired, standing: PropTypes.object.isRequired, getTeam: PropTypes.func.isRequired, match: PropTypes.object.isRequired, getStanding: PropTypes.func.isRequired, }; const mapStateToProps = makeSelect(); function mapDispatchToProps(dispatch) { return { getTeam: id => dispatch(getTeam(id)), getStanding: teamId => dispatch(getStanding(teamId)), }; } const withConnect = connect( mapStateToProps, mapDispatchToProps, ); const withReducer = injectReducer({ key: 'teamPage', reducer }); const withSaga = injectSaga({ key: 'teamPage', saga }); export default compose( withReducer, withSaga, withConnect, )(TeamPage);
31.118812
78
0.602927
188183d8148db5fffe2edec292f847e2967b7089
990
js
JavaScript
lib/app/boot/stage/listen.js
quenktechnologies/tendril
1ccfdb02972a0cfc868e981307937e7aa2c0196d
[ "Apache-2.0" ]
1
2020-08-24T12:03:33.000Z
2020-08-24T12:03:33.000Z
lib/app/boot/stage/listen.js
quenktechnologies/tendril
1ccfdb02972a0cfc868e981307937e7aa2c0196d
[ "Apache-2.0" ]
70
2018-11-09T02:40:32.000Z
2022-03-23T03:12:19.000Z
lib/app/boot/stage/listen.js
quenktechnologies/tendril
1ccfdb02972a0cfc868e981307937e7aa2c0196d
[ "Apache-2.0" ]
1
2020-07-15T12:21:17.000Z
2020-07-15T12:21:17.000Z
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListenStage = void 0; const future_1 = require("@quenk/noni/lib/control/monad/future"); const monad_1 = require("@quenk/noni/lib/control/monad"); /** * ListenStage starts the HTTP server to accept remote connections. * * This will also dispatch the "started" event. */ class ListenStage { constructor(server, hooks, mainProvider) { this.server = server; this.hooks = hooks; this.mainProvider = mainProvider; this.name = 'listen'; } execute() { let { mainProvider, server, hooks } = this; return monad_1.doN(function* () { let module = mainProvider(); yield future_1.parallel([ server.listen(module.app).map(() => { }), hooks.started() ]); return future_1.pure(undefined); }); } } exports.ListenStage = ListenStage; //# sourceMappingURL=listen.js.map
31.935484
67
0.611111
1881f4f553d87a32bd016b62474cef1f609f233e
442
js
JavaScript
lib/sortedMerge/sortedMergeRightSemiJoin.js
claycephas/lodash-joins
14e860bcf532c32875fa30ce4966b414107bede0
[ "Apache-2.0" ]
null
null
null
lib/sortedMerge/sortedMergeRightSemiJoin.js
claycephas/lodash-joins
14e860bcf532c32875fa30ce4966b414107bede0
[ "Apache-2.0" ]
null
null
null
lib/sortedMerge/sortedMergeRightSemiJoin.js
claycephas/lodash-joins
14e860bcf532c32875fa30ce4966b414107bede0
[ "Apache-2.0" ]
null
null
null
var sortedMergeLeftSemiJoin = require('./sortedMergeLeftSemiJoin'); /** * Sorted merge right semi join. Returns the b-array reference. * @param {*[]} a * @param {Function} aAccessor * @param {*[]} b * @param {Function} bAccessor * @return {*[]} */ var sortedMergeRightSemiJoin = function (a, aAccessor, b, bAccessor) { return sortedMergeLeftSemiJoin(b, bAccessor, a, aAccessor); }; module.exports = sortedMergeRightSemiJoin;
29.466667
70
0.696833
188256adb55ecae74d907b3ee46de2a68ec0396c
838
js
JavaScript
client/src/components/SearchBar.js
mlmccor/concert_collector
0c52c3c742515fe0a9f0fe2af23ba340118899f6
[ "MIT" ]
null
null
null
client/src/components/SearchBar.js
mlmccor/concert_collector
0c52c3c742515fe0a9f0fe2af23ba340118899f6
[ "MIT" ]
11
2020-02-29T04:25:00.000Z
2022-03-30T23:42:42.000Z
client/src/components/SearchBar.js
mlmccor/concert_collector
0c52c3c742515fe0a9f0fe2af23ba340118899f6
[ "MIT" ]
null
null
null
import React, { Component } from 'react' class SearchBar extends Component { constructor() { super() this.state = { text:'' } this.handleSubmit= this.handleSubmit.bind(this) } handleChange = (e) => { this.setState({ [e.target.name]:e.target.value }) } handleSubmit = (e) => { e.preventDefault() this.props.getArtist(this.state.text) this.setState({ text:'' }) } render() { return( <div> <p>Search for a new Artist Here</p> <form onSubmit={this.handleSubmit}> <label>Artist Name </label> <input name='text' onChange={this.handleChange} value={this.state.text} /> <input type='submit' name='search'/> </form> </div> ) } } export default SearchBar
18.622222
51
0.534606
1882db35436bf8daf8515b26452b8f477fedfc6b
6,267
js
JavaScript
lib/orbit-firebase/operation-decomposer.js
lytbulb/orbit-firebase
67e95a41fb4db7294a95ef04c3fed8cc4bf0e7cd
[ "MIT" ]
1
2015-06-04T01:08:10.000Z
2015-06-04T01:08:10.000Z
lib/orbit-firebase/operation-decomposer.js
lytbulb/orbit-firebase
67e95a41fb4db7294a95ef04c3fed8cc4bf0e7cd
[ "MIT" ]
null
null
null
lib/orbit-firebase/operation-decomposer.js
lytbulb/orbit-firebase
67e95a41fb4db7294a95ef04c3fed8cc4bf0e7cd
[ "MIT" ]
null
null
null
import { Class } from 'orbit/lib/objects'; import OperationMatcher from './operation-matcher'; import SchemaUtils from './lib/schema-utils'; import CacheUtils from './lib/cache-utils'; import Operation from 'orbit/operation'; import { asHash } from './lib/object-utils'; function buildObject(keys, value){ var hash = {}; keys.forEach(function(key){ hash[key] = value; }); return hash; } var ChangeDetails = Class.extend({ init: function(path, value, schema, cache){ this.path = path; this.value = value; this.schema = schema; this.schemaUtils = new SchemaUtils(schema); this.cache = cache; }, model: function(){ return this.path[0]; }, modelId: function(){ return this.path[1]; }, link: function(){ return this.path[3]; }, currentValue: function(){ return this.cache.retrieve(this.path); }, linkDef: function(){ return this.schemaUtils.lookupLinkDef(this.model(), this.link()); }, originalInversePath: function(){ return [this.linkDef().model, this.currentValue(), "__rel", this.linkDef().inverse]; }, inverseLinkDef: function(){ return this.schemaUtils.lookupRelatedLinkDef(this.model(), this.link()); }, newInversePath: function(){ return [this.linkDef().model, this.value, "__rel", this.linkDef().inverse]; } }); var RelationshipResolver = Class.extend({ init: function(schema, cache){ this.visited = []; this.schema = schema; this.schemaUtils = new SchemaUtils(schema); this.cache = cache; this.cacheUtils = new CacheUtils(cache); this.operations = []; }, visit: function(op, path, value){ if(this.hasVisited(path)) return; this.markVisited(path); var linkType = this.schemaUtils.linkTypeFor(path[0], path[3]); if(!path[1]) throw new Error("invalid modelId: " + op + "|" + path + "|" + value); this[linkType][op].call(this, path, value); }, hasVisited: function(path){ return this.visited.indexOf(path.join("/")) !== -1; }, markVisited: function(path){ this.visited.push(path.join("/")); }, hasOne: { add: function(path, value){ var changeDetails = new ChangeDetails(path, value, this.schema, this.cache); this.operations.push(new Operation({ op: 'add', path: changeDetails.path, value: changeDetails.value })); if(changeDetails.currentValue()){ this.visit("remove", changeDetails.originalInversePath(), changeDetails.modelId()); } this.visit("add", changeDetails.newInversePath(), changeDetails.modelId()); }, remove: function(path, value){ var changeDetails = new ChangeDetails(path, value, this.schema, this.cache); if(!value) return; this.operations.push(new Operation({ op: 'remove', path: changeDetails.path})); this.visit("remove", changeDetails.originalInversePath(), changeDetails.modelId()); }, replace: function(path, value){ var changeDetails = new ChangeDetails(path, value, this.schema, this.cache); this.operations.push(new Operation({ op: 'replace', path: changeDetails.path, value: changeDetails.value })); if(changeDetails.currentValue()){ this.visit("remove", changeDetails.originalInversePath(), changeDetails.modelId()); } this.visit("add", changeDetails.newInversePath(), changeDetails.modelId()); } }, hasMany: { add: function(path, value){ var linkDef = this.schemaUtils.lookupLinkDef(path[0], path[3]); var inversePath = [linkDef.model, value, "__rel", linkDef.inverse]; this.operations.push(new Operation({ op: 'add', path: path.concat(value), value: true })); this.visit("add", inversePath, path[1]); }, remove: function(path, value){ var linkDef = this.schemaUtils.lookupLinkDef(path[0], path[3]); var inversePath = [linkDef.model, value, "__rel", linkDef.inverse]; this.operations.push(new Operation({ op: 'remove', path: path.concat(value) })); this.visit("remove", inversePath, path[1]); }, replace: function(path, value){ var _this = this, relatedLinkDef = this.schemaUtils.lookupRelatedLinkDef(path[0], path[3]); this.operations.push(new Operation({ op: 'replace', path: path, value: buildObject(value, true) })); if(relatedLinkDef.type === 'hasMany') return; var linkValue = this.cache.retrieve(path), currentValue = linkValue ? Object.keys(linkValue) : [], modelId = path[1], linkDef = this.schemaUtils.lookupLinkDef(path[0], path[3]); var added = value.filter(function(id){ return currentValue.indexOf(id) === -1; }); var removed = currentValue.filter(function(id){ return value.indexOf(id) === -1; }); added.forEach(function(id){ var inversePath = [linkDef.model, id, "__rel", linkDef.inverse]; _this.visit("add", inversePath, modelId); }); removed.forEach(function(id){ var inversePath = [linkDef.model, id, "__rel", linkDef.inverse]; _this.visit("remove", inversePath, modelId); }); } } }); export default Class.extend({ init: function(schema, cache){ this.schema = schema; this.schemaUtils = new SchemaUtils(schema); this.cache = cache; this.cacheUtils = new CacheUtils(cache); }, decompose: function(operation){ if(operation.path[2] !== "__rel") return [operation]; var relationshipResolver = new RelationshipResolver(this.schema, this.cache); var normalized = this.normalize(operation); relationshipResolver.visit(normalized.op, normalized.path, normalized.value); return relationshipResolver.operations; }, normalize: function(operation){ var linkDef = this.schemaUtils.lookupLinkDef(operation.path[0], operation.path[3]); var path = operation.path; if(["hasMany", "hasOne"].indexOf(linkDef.type) === -1) throw new Error("unsupported link type: " + linkDef.type); if(linkDef.type === "hasOne" && operation.op === "add") return operation; if(linkDef.type === "hasOne" && operation.op === "remove"){ return { op: operation.op, path: path, value: this.cache.retrieve(path) }; } if(linkDef.type === "hasMany" && (['add', 'remove'].indexOf(operation.op) !== -1)) { return { op: operation.op, path: path.slice(0,-1), value: path[path.length-1] }; } if(linkDef.type === "hasMany" && operation.op === "replace"){ return { op: operation.op, path: operation.path, value: Object.keys(operation.value) }; } return operation; } });
29.285047
115
0.67656
1884604386e427f2d8e87878ed125c8aeb977d84
1,165
js
JavaScript
source/SA.Web.UI/app/offlinePersistanceStrategy.js
jigneshnarain/ELEN7064
6b9743f5e8f2c5265a3e0b51dfd74a0a86dcceae
[ "MIT" ]
null
null
null
source/SA.Web.UI/app/offlinePersistanceStrategy.js
jigneshnarain/ELEN7064
6b9743f5e8f2c5265a3e0b51dfd74a0a86dcceae
[ "MIT" ]
null
null
null
source/SA.Web.UI/app/offlinePersistanceStrategy.js
jigneshnarain/ELEN7064
6b9743f5e8f2c5265a3e0b51dfd74a0a86dcceae
[ "MIT" ]
null
null
null
'use strict' app.factory('offlinePersistanceStrategy', function ($q, $localForage) { $localForage.createInstance({ name: 'survey' }); return { getAll: function (service) { var deferred = $q.defer(); var result = [], instance = $localForage.instance(service), promise = instance.iterate(function (value, key) { result.push(value); }).then(function (data) { deferred.resolve(result); }, function error(data) { deferred.reject(data); }); return deferred.promise; }, getCountByInstance: function (service) { var instance = $localForage.instance(service); return instance.length(); }, deleteByInstance: function (service, key) { var instance = $localForage.instance(service); return instance.removeItem(key); }, save: function (service, data) { var instance = $localForage.instance(service); return instance.setItem(data.id, data); } } })
31.486486
69
0.525322
18856525d1ee95e274596cc4aae70be1ca1e646b
941
js
JavaScript
out-tsc/src/redux/reducers/blog.js
DevopsChina/conf
62b97d9ed987de12af688c78ee5dd0b093f8e5b8
[ "MIT" ]
null
null
null
out-tsc/src/redux/reducers/blog.js
DevopsChina/conf
62b97d9ed987de12af688c78ee5dd0b093f8e5b8
[ "MIT" ]
null
null
null
out-tsc/src/redux/reducers/blog.js
DevopsChina/conf
62b97d9ed987de12af688c78ee5dd0b093f8e5b8
[ "MIT" ]
null
null
null
import { FETCH_BLOG_LIST, FETCH_BLOG_LIST_FAILURE, FETCH_BLOG_LIST_SUCCESS } from '../constants'; import { initialState } from '../initial-state'; export const blogReducer = (state = initialState.blog, action) => { switch (action.type) { case FETCH_BLOG_LIST: return Object.assign({}, state, { fetching: true, fetchingError: null, list: [], obj: {}, }); case FETCH_BLOG_LIST_FAILURE: return Object.assign({}, state, { fetching: false, fetchingError: action.payload.error, }); case FETCH_BLOG_LIST_SUCCESS: return Object.assign({}, state, { fetching: false, list: action.payload.list, obj: action.payload.obj, }); default: return state; } }; //# sourceMappingURL=blog.js.map
34.851852
97
0.528162
180293490f2c407bc03647b4dd8db4d7d2dca070
4,534
js
JavaScript
packages/react/src/components/MultiSelect/next/MultiSelect.stories.js
brnnnfx/carbon
020bf8437c48d6037b78ebeadb414a70ed5414da
[ "Apache-2.0" ]
4,233
2018-01-26T21:58:14.000Z
2022-03-31T10:51:14.000Z
packages/react/src/components/MultiSelect/next/MultiSelect.stories.js
brnnnfx/carbon
020bf8437c48d6037b78ebeadb414a70ed5414da
[ "Apache-2.0" ]
8,658
2018-01-29T16:24:38.000Z
2022-03-31T22:28:57.000Z
packages/react/src/components/MultiSelect/next/MultiSelect.stories.js
brnnnfx/carbon
020bf8437c48d6037b78ebeadb414a70ed5414da
[ "Apache-2.0" ]
1,288
2018-01-30T07:53:37.000Z
2022-03-30T20:45:05.000Z
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import MultiSelect from '../'; import FilterableMultiSelect from './FilterableMultiSelect'; import { Layer } from '../../Layer'; const items = [ { id: 'downshift-1-item-0', text: 'Option 1', }, { id: 'downshift-1-item-1', text: 'Option 2', }, { id: 'downshift-1-item-2', text: 'Option 3 - a disabled item', disabled: true, }, { id: 'downshift-1-item-3', text: 'Option 4', }, { id: 'downshift-1-item-4', text: 'An example option that is really long to show what should be done to handle long text', }, { id: 'downshift-1-item-5', text: 'Option 5', }, ]; export default { title: 'Components/MultiSelect', parameters: { component: MultiSelect, subcomponents: { 'MultiSelect.Filterable': MultiSelect.Filterable, }, }, }; export const Default = () => { return ( <div style={{ width: 300 }}> <MultiSelect label="Multiselect Label" id="carbon-multiselect-example" titleText="Multiselect title" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} selectionFeedback="top-after-reopen" /> </div> ); }; export const WithInitialSelectedItems = () => { return ( <div style={{ width: 300 }}> <MultiSelect id="carbon-multiselect-example-2" titleText="Multiselect title" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} initialSelectedItems={[items[0], items[1]]} selectionFeedback="top-after-reopen" /> </div> ); }; export const _Filterable = () => { return ( <div style={{ width: 300 }}> <FilterableMultiSelect id="carbon-multiselect-example-3" titleText="Multiselect title" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} placeholder="Filter" selectionFeedback="top-after-reopen" /> </div> ); }; export const withLayer = () => { return ( <div style={{ width: 300 }}> <MultiSelect label="First Layer" id="carbon-multiselect-example" titleText="Multiselect title" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} selectionFeedback="top-after-reopen" /> <Layer> <MultiSelect label="Second Layer" id="carbon-multiselect-example" titleText="Multiselect title" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} selectionFeedback="top-after-reopen" /> <Layer> <MultiSelect label="Third Layer" id="carbon-multiselect-example" titleText="Multiselect title" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} selectionFeedback="top-after-reopen" /> </Layer> </Layer> </div> ); }; export const _FilterableWithLayer = () => { return ( <div style={{ width: 300 }}> <FilterableMultiSelect id="carbon-multiselect-example-3" titleText="First Layer" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} placeholder="Filter" selectionFeedback="top-after-reopen" /> <Layer> <FilterableMultiSelect id="carbon-multiselect-example-3" titleText="Second Layer" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} placeholder="Filter" selectionFeedback="top-after-reopen" /> <Layer> <FilterableMultiSelect id="carbon-multiselect-example-3" titleText="Third Layer" helperText="This is helper text" items={items} itemToString={(item) => (item ? item.text : '')} placeholder="Filter" selectionFeedback="top-after-reopen" /> </Layer> </Layer> </div> ); };
25.761364
94
0.557345
1802ae93cde5941763558f68db6d453a4f96607f
112
js
JavaScript
crates/swc/tests/tsc-references/preserveValueImports_es2015.2.minified.js
ArturAralin/swc
c1493dd4f471433c0e300af9f0395b7bae6848e1
[ "Apache-2.0" ]
null
null
null
crates/swc/tests/tsc-references/preserveValueImports_es2015.2.minified.js
ArturAralin/swc
c1493dd4f471433c0e300af9f0395b7bae6848e1
[ "Apache-2.0" ]
null
null
null
crates/swc/tests/tsc-references/preserveValueImports_es2015.2.minified.js
ArturAralin/swc
c1493dd4f471433c0e300af9f0395b7bae6848e1
[ "Apache-2.0" ]
null
null
null
export default {}; export const b = 0; export const c = 1; require("./d"), require("./d"), module.exports = {};
22.4
52
0.607143
18033ffbed2acb4fe9df526421230407fe9e1122
932
js
JavaScript
drivers/kraken.js
abdul/exchanges
b03ffb62577df1643543e149f9cb944af0cb8481
[ "MIT" ]
null
null
null
drivers/kraken.js
abdul/exchanges
b03ffb62577df1643543e149f9cb944af0cb8481
[ "MIT" ]
null
null
null
drivers/kraken.js
abdul/exchanges
b03ffb62577df1643543e149f9cb944af0cb8481
[ "MIT" ]
null
null
null
const request = require('../lib/request'); const Ticker = require('../models/ticker'); const { parseToFloat } = require('../lib/utils.js'); module.exports = async () => { const marketData = await request('https://api.kraken.com/0/public/AssetPairs'); const markets = marketData.result; const pairs = Object.keys(marketData.result); const tickerData = await request(`https://api.kraken.com/0/public/Ticker?pair=${pairs.join(',')}`); const tickers = tickerData.result; return pairs.map((pair) => { const ticker = tickers[pair]; if (!ticker) return undefined; const market = markets[pair]; if (!market) return undefined; const [base, quote] = market.wsname.split('/'); return new Ticker({ base, quote, baseVolume: parseToFloat(ticker.v[1]), close: parseToFloat(ticker.c[0]), high: parseToFloat(ticker.h[1]), low: parseToFloat(ticker.l[1]), }); }); };
29.125
101
0.642704
180350c462f2b99b112c4cc0538b7e44806141dd
63
js
JavaScript
src/config/env.js
mreorhan/React-with-Redux
62a9972dc4c7a62481d13a90c03dcad67b7cc150
[ "Apache-2.0" ]
null
null
null
src/config/env.js
mreorhan/React-with-Redux
62a9972dc4c7a62481d13a90c03dcad67b7cc150
[ "Apache-2.0" ]
null
null
null
src/config/env.js
mreorhan/React-with-Redux
62a9972dc4c7a62481d13a90c03dcad67b7cc150
[ "Apache-2.0" ]
null
null
null
export const API_BASE = "https://locationmobile.herokuapp.com";
63
63
0.793651
18035caa02f08776e97724060c89cc53114f3b45
1,337
js
JavaScript
grunt/config/webpack.js
WarpWorks/warpjs-map-plugin
951d9851b141ea063b9855bd7345933fc4704bd5
[ "MIT" ]
null
null
null
grunt/config/webpack.js
WarpWorks/warpjs-map-plugin
951d9851b141ea063b9855bd7345933fc4704bd5
[ "MIT" ]
5
2017-11-01T14:05:17.000Z
2021-06-22T13:35:01.000Z
grunt/config/webpack.js
WarpWorks/warpjs-map-plugin
951d9851b141ea063b9855bd7345933fc4704bd5
[ "MIT" ]
null
null
null
const path = require('path'); const warpjsUtils = require('@warp-works/warpjs-utils'); const webpack = require('webpack'); const constants = require('./../../server/constants'); const projectDir = path.dirname(require.resolve('./../../package.json')); module.exports = { build: { target: 'web', devtool: 'source-map', entry: { [constants.versionedName]: './client/index.js' }, node: { fs: 'empty' }, output: { path: `${projectDir}/assets`, filename: '[name].min.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compress: true }) ], module: { loaders: [ { test: /\.js$/, loader: 'babel-loader' }, { test: /\.hbs$/, loader: 'handlebars-loader', query: { helperDirs: [ warpjsUtils.getHandlebarsHelpersDir() ], partialDirs: [ warpjsUtils.getHandlebarsPartialsDir() ] } } ] } } };
27.285714
73
0.391922
18043b896a7484dfa05b300d4849ef23692c69a3
180
js
JavaScript
crates/swc/tests/tsc-references/es6/computedProperties/computedPropertyNames28_ES6/input.ts/es2015.1.normal/output.js
maxxcs/swc
a2a0b63c6297de039a5703a549eae62ae20b48c8
[ "Apache-2.0", "MIT" ]
21,008
2017-04-01T04:06:55.000Z
2022-03-31T23:11:05.000Z
tests/tsc-references/es6/computedProperties/computedPropertyNames28_ES6/input.ts/es2015.1.normal/output.js
sventschui/swc
cd2a2777d9459ba0f67774ed8a37e2b070b51e81
[ "Apache-2.0", "MIT" ]
2,309
2018-01-14T05:54:44.000Z
2022-03-31T15:48:40.000Z
tests/tsc-references/es6/computedProperties/computedPropertyNames28_ES6/input.ts/es2015.1.normal/output.js
sventschui/swc
cd2a2777d9459ba0f67774ed8a37e2b070b51e81
[ "Apache-2.0", "MIT" ]
768
2018-01-14T05:15:43.000Z
2022-03-30T11:29:42.000Z
// @target: es6 class Base { } class C extends Base { constructor(){ super(); var obj = { [(super(), "prop")] () { } }; } }
13.846154
36
0.366667
18046eb5c059e6d96dffd73d7b5715e7c244c3c3
206
js
JavaScript
app/containers/Battle/actions.js
njoncode/github-battle-with-hooks-and-saga
49f7c364462176430d70918252b87820f151687b
[ "MIT" ]
null
null
null
app/containers/Battle/actions.js
njoncode/github-battle-with-hooks-and-saga
49f7c364462176430d70918252b87820f151687b
[ "MIT" ]
null
null
null
app/containers/Battle/actions.js
njoncode/github-battle-with-hooks-and-saga
49f7c364462176430d70918252b87820f151687b
[ "MIT" ]
null
null
null
/* * * Battle actions * */ import { USERNAME_INPUT_REQUEST } from './constants'; export function usernameInputRequestAction(payload) { return { type: USERNAME_INPUT_REQUEST, payload, }; }
13.733333
53
0.679612
1804ac6486c9eab6682cf1e46b2302e92e7d7f66
3,827
js
JavaScript
cypress/integration/soleSpecs/sole.cst-02.js
Scottish-Tech-Army/SOLE-Automated-Testing-pub
33347f4fea6e8e542a0cb8b00f378ac483d4b406
[ "MIT" ]
null
null
null
cypress/integration/soleSpecs/sole.cst-02.js
Scottish-Tech-Army/SOLE-Automated-Testing-pub
33347f4fea6e8e542a0cb8b00f378ac483d4b406
[ "MIT" ]
null
null
null
cypress/integration/soleSpecs/sole.cst-02.js
Scottish-Tech-Army/SOLE-Automated-Testing-pub
33347f4fea6e8e542a0cb8b00f378ac483d4b406
[ "MIT" ]
null
null
null
import "cypress-iframe"; describe("This is a test for search functionality", () => { var email = Cypress.env("email"), pwd = Cypress.env("password"), existingEmail = Cypress.env("existingEmail"), existingEmailPwd = Cypress.env("existingEmailPwd"), orgAddressURL = Cypress.env("orgAddressURL"); const getIframeDocument = () => { return ( cy .get("#frame_id") // Cypress yields jQuery element, which has the real // DOM element under property "0". // From the real DOM iframe element we can get // the "document" element, it is stored in "contentDocument" property // Cypress "its" command can access deep properties using dot notation // https://on.cypress.io/its .its("0.contentDocument") .should("exist") ); }; const getIframeBody = () => { // get the document return ( getIframeDocument() // automatically retries until body is loaded .its("body") .should("not.be.undefined") // wraps "body" DOM element to allow // chaining more Cypress commands, like ".find(...)" .then(cy.wrap) ); }; it("Can hide/show address", () => { // This assumes the address is shown by default cy.visit("/"); cy.adminLogin(existingEmail, existingEmailPwd); // Disables the address in the admin cy.clickAddressCheckboxInAdmin(); // Waits 5 seconds because of the iframe loading cy.wait(5000); // Checks the address doesn't show in the preview // This will fail if the address doesn't contain Riverside getIframeBody().find(".right-sidebar").should("not.contain", "Riverside"); cy.visit(orgAddressURL); cy.get(".right-sidebar").should("not.contain", "Riverside"); cy.visit("/"); cy.adminLogin(existingEmail, existingEmailPwd); // Disables the address in the admin cy.clickAddressCheckboxInAdmin(); // Waits 5 seconds because of the iframe loading cy.wait(5000); // Checks the address doesn't show in the preview // This will fail if the address doesn't contain Riverside getIframeBody().find(".right-sidebar").should("contain", "Riverside"); cy.visit(orgAddressURL); cy.get(".right-sidebar").should("contain", "Riverside"); }); it("Can search for specific community post, not logged in", () => { cy.visit(Cypress.env("cstUrl")); cy.get("#search-global").type("210421{enter}"); cy.get(".post-info > h3").should("contain", "210421"); }); it("Can search for specific community post, logged in", () => { cy.visit(Cypress.env("cstUrl")); cy.get(".header_menu").click(); cy.get(`input[type='email']`).type(email); cy.get("#psd").type(pwd); cy.get(`button[type='submit']`).click(); cy.get(".dropbtn > span").should("contain", "Dunbar High"); cy.get("#search-global").type("210421{enter}"); cy.get(".post-info > h3").should("contain", "210421"); }); it("Can search for specific community post and like it, logged in", () => { cy.visit(Cypress.env("cstUrl")); cy.get(".header_menu").click(); cy.get(`input[type='email']`).type(email); cy.get("#psd").type(pwd); cy.get(`button[type='submit']`).click(); cy.get(".dropbtn > span").should("contain", "Dunbar High"); cy.get("#search-global").type("210421{enter}"); cy.get(".post-info > h3").should("contain", "210421"); cy.get(".post-info > h3").click(); // Grabs the like div, extracts the contents, adds one to it and compares the value after liking the post cy.get("#singlepostlike > div").then(($el) => { const originalLike = Number($el.text()); const newLike = originalLike + 1; cy.get("#singlepostlike > div").click(); cy.get("#singlepostlike > div").should("contain", newLike); }); }); });
35.435185
109
0.622681
1804e8285e30f357be27ea66bb1071c835abb215
2,521
js
JavaScript
__tests__/integration/auth.test.js
EdsoonJr/CompassLisa-API
eb047997dd56d86c999bb77d5513ef8fc2ca7588
[ "MIT" ]
1
2022-02-04T17:17:40.000Z
2022-02-04T17:17:40.000Z
__tests__/integration/auth.test.js
EdsoonJr/CompassLisa-API
eb047997dd56d86c999bb77d5513ef8fc2ca7588
[ "MIT" ]
null
null
null
__tests__/integration/auth.test.js
EdsoonJr/CompassLisa-API
eb047997dd56d86c999bb77d5513ef8fc2ca7588
[ "MIT" ]
3
2022-02-04T01:29:38.000Z
2022-02-06T19:42:08.000Z
const mongoose = require('mongoose'); const supertest = require('supertest'); const app = require('../dbTest/database/app'); const peopleService = require('../../src/app/service/PeopleService'); const Auth = {}; describe('Test All Routes Auths', () => { beforeAll(async () => { Auth.ath = await peopleService.create({ nome: 'Juinim do Token', cpf: '91945328002', data_nascimento: '26/03/2003', email: 'juinimtk2@email.com', senha: '654321', habilitado: 'sim' }); }); afterAll(async () => { await mongoose.connection.dropDatabase(); await mongoose.connection.close(); }); it('Test Route Post', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: 'juinimtk2@email.com', senha: '654321' }); expect(result.statusCode).toBe(200); }); it('Test Route Post *USER NOT Found*', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: 'notfound@email.com', senha: '654321' }); expect(result.statusCode).toBe(404); }); it('Test Route Post *Invalid URL*', async () => { const result = await supertest(app).post('/api/v1/authenticationnn').send({ email: 'juinimtk2@email.com', senha: '654321' }); expect(result.statusCode).toBe(404); }); it('Test Route Post *INVALID EMAIL*', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: 'juinimtemail.com', senha: '654321' }); expect(result.statusCode).toBe(400); }); it('Test Route Post *INVALID SENHA*', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: 'juinimtk2@email.com', senha: '65' }); expect(result.statusCode).toBe(400); }); it('Test Route Post *NO EMPTY EMAIL*', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: 'juinimtk2@email.com', senha: '' }); expect(result.statusCode).toBe(400); }); it('Test Route Post *NO EMPTY PW*', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: '', senha: '654321' }); expect(result.statusCode).toBe(400); }); it('Test Route Post *NO EMPTY*', async () => { const result = await supertest(app).post('/api/v1/authenticate').send({ email: '', senha: '' }); expect(result.statusCode).toBe(400); }); });
28.325843
79
0.595795
1805091cc08c0184bb4b43fd1761573219926ff0
1,882
js
JavaScript
src/containers/home/components/Coin.js
marcusviniciusf/virtual-wallet
737bd785ce31faa1126cb6081e9e5b10c37101fa
[ "MIT" ]
null
null
null
src/containers/home/components/Coin.js
marcusviniciusf/virtual-wallet
737bd785ce31faa1126cb6081e9e5b10c37101fa
[ "MIT" ]
3
2021-10-05T21:28:14.000Z
2022-02-26T10:48:26.000Z
src/containers/home/components/Coin.js
MarcwL22/virtual-wallet
737bd785ce31faa1126cb6081e9e5b10c37101fa
[ "MIT" ]
null
null
null
// @flow import * as React from 'react'; import styled from 'styled-components'; import { colors, breakpoints } from '~/styles'; import { Text, Heading2, SmallText } from '~/components/'; const Card = styled.div` display: flex; flex-direction: column; justify-content: flex-end; border-radius: 5px; overflow: hidden; position: relative; color: var(--color-white); padding: 1rem 2rem; width: 100%; min-height: 12rem; box-shadow: var(--box-shadow-1); background-color: ${({ bgColor }) => bgColor || 'var(--color-white)'}; @media (max-width: ${breakpoints.small}) { min-height: initial; justify-content: initial; } `; const CoinView = styled.div` z-index: 2; display: flex; align-items: flex-end; margin-top: 0.5rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; span { font-weight: bold; margin-left: 0.4rem; } @media (max-width: ${breakpoints.small}) { margin: 0; } `; const CoinImageView = styled.div` position: absolute; right: -2rem; bottom: -2rem; transform: rotate(10deg); width: 10rem; height: 10rem; border-radius: 5rem; background-color: rgba(255, 255, 255, 0.3); display: flex; justify-content: center; align-items: center; svg { font-size: 7rem; fill: ${props => props.color || colors.white}; } h1 { font-size: 7rem; color: ${props => props.color || colors.white}; } `; type Props = { color: string, value: string, name: string, icon: React.Element<*>, }; const Coin = (props: Props) => { const { color, value, name, icon, } = props; return ( <Card bgColor={color}> <Text>Saldo</Text> <CoinView> <Heading2>{value}</Heading2> <SmallText>{name.toUpperCase()}</SmallText> </CoinView> <CoinImageView color={color}>{icon}</CoinImageView> </Card> ); }; export default Coin;
21.146067
72
0.623804
180570f1371f89050c246bfd2674097993587d7f
2,237
js
JavaScript
reminder-tags/client/src/components/hooks/stylesheet.js
Jammasterk/desktop-apps-1989
152871e18f3227f919b42c6f97d2c0d8c477658e
[ "MIT" ]
null
null
null
reminder-tags/client/src/components/hooks/stylesheet.js
Jammasterk/desktop-apps-1989
152871e18f3227f919b42c6f97d2c0d8c477658e
[ "MIT" ]
null
null
null
reminder-tags/client/src/components/hooks/stylesheet.js
Jammasterk/desktop-apps-1989
152871e18f3227f919b42c6f97d2c0d8c477658e
[ "MIT" ]
null
null
null
import styled from "styled-components"; import color from "randomcolor"; const Nav = styled.div` width: 100vw; height: 60px; background: #0d0d0d; display: grid; grid-template-columns: repeat(3, 1fr); justify-content: center; padding-top: 0.5em; h1 { color: #f3f3f3; font-family: "Open Sans", sans-serif; padding-left: 0.25em; } .flex { display: flex; justify-content: space-between; padding-right: 8px; height: 40px; position: absolute; right: 0; } img { width: 36px; height: 36px; } `; // NOTE COMPONENTS const Form = styled.div` .container { height: 100%; width: 100vw; background: hsl(217.09, 100%, 89.22%); } form { box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.18); width: 90%; height: 125px; margin: 0 auto; padding-top: 0.5em; } .input_container { width: 100%; padding: 0 0.75em; } input { width: 100%; display: flex; background: transparent; border: 3px solid white; height: 36px; border-radius: 25px; margin-top: 0.5em; padding-left: .75em } button { // width: 50%; border-radius: 25px; margin-top: 0.75em; border: none; background: none } input:focus { outline: none; padding-left: 1em; font-size: 12px; font-family: "Open Sans", sans-serif; font-weight: 700; color: ${color}; } .button_container{ width: 100%; display: flex; justify-content: space-between } `; const NoteData = styled.div` li { font-family: "Open Sans", sans-serif; padding: 0.75em 0.5em; border-radius: 5px; opacity: 0.6; font-weight: 700; display: flex; justify-content: space-between; font-size: 14px; width: 100%; margin: 0 auto; list-style: square; font-weight: 700 } ul { margin: 0 auto; } img { width: 18px; } .inner_list { z-index: 2; display: flex; justify-content: space-between; margin: 1.5em 0; } .icons { padding-top: 0.75em; // width: 100px; padding-right: 0.5em; } `; export { Nav, Form, NoteData };
18.487603
53
0.594099
1805b30f8ab069ef45f1988d45b630dee12ebcc9
3,985
js
JavaScript
media/RadJavAppPreview/dependencies/dojo/dojo/nls/sl/colors.js
FogChainInc/vscode-radjav
80bc5c51c121ddb97dd3cc10871a87ad8662830e
[ "MIT" ]
null
null
null
media/RadJavAppPreview/dependencies/dojo/dojo/nls/sl/colors.js
FogChainInc/vscode-radjav
80bc5c51c121ddb97dd3cc10871a87ad8662830e
[ "MIT" ]
null
null
null
media/RadJavAppPreview/dependencies/dojo/dojo/nls/sl/colors.js
FogChainInc/vscode-radjav
80bc5c51c121ddb97dd3cc10871a87ad8662830e
[ "MIT" ]
null
null
null
/* Copyright (c) 2004-2016, The JS Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ //>>built define("dojo/nls/sl/colors",({aliceblue:"alice blue modra",antiquewhite:"antično bela",aqua:"svetlo modra",aquamarine:"akvamarin",azure:"azurno modra",beige:"bež",bisque:"porcelanasta",black:"črna",blanchedalmond:"obledelo mandljeva",blue:"modra",blueviolet:"modro vijolična",brown:"rjava",burlywood:"peščeno sivo-rjava",cadetblue:"kadetsko modra",chartreuse:"chartreuse",chocolate:"čokoladna",coral:"koralna",cornflowerblue:"plavičasto modra",cornsilk:"koruzna",crimson:"karminasta",cyan:"cijan",darkblue:"temno modra",darkcyan:"temno cijan",darkgoldenrod:"temna zlata rozga",darkgray:"temno siva",darkgreen:"temno zelena",darkgrey:"temno siva",darkkhaki:"temno kaki",darkmagenta:"temna magenta",darkolivegreen:"temna olivno zelena",darkorange:"temno oranžna",darkorchid:"temno orhidejasta",darkred:"temno rdeča",darksalmon:"temno lososova",darkseagreen:"temno morsko zelena",darkslateblue:"temno skrilasto modra",darkslategray:"temno skrilasto siva",darkslategrey:"temno skrilasto siva",darkturquoise:"temno turkizna",darkviolet:"temno vijolična",deeppink:"temno rožnata",deepskyblue:"temno nebeško modra",dimgray:"pepelnato siva",dimgrey:"pepelnato siva",dodgerblue:"dodgersko modra",firebrick:"opečnata",floralwhite:"cvetno bela",forestgreen:"gozdno zelena",fuchsia:"roza",gainsboro:"gainsboro",ghostwhite:"senčnato bela",gold:"zlata",goldenrod:"zlata rozga",gray:"siva",green:"zelena",greenyellow:"zeleno-rumena",grey:"siva",honeydew:"medena rosa",hotpink:"kričeče rožnata",indianred:"indijansko rdeča",indigo:"indigo",ivory:"slonokoščena",khaki:"kaki",lavender:"sivka",lavenderblush:"rožnato sivka",lawngreen:"travniško zelena",lemonchiffon:"limonast šifon",lightblue:"svetlo modra",lightcoral:"svetlo koralna",lightcyan:"svetlo cijan",lightgoldenrodyellow:"svetlo rumena zlata rozga",lightgray:"svetlo siva",lightgreen:"svetlo zelena",lightgrey:"svetlo siva",lightpink:"svetlo rožnata",lightsalmon:"svetlo lososova",lightseagreen:"svetlo morsko zelena",lightskyblue:"svetlo nebeško modra",lightslategray:"svetlo skrilasto siva",lightslategrey:"svetlo skrilasto siva",lightsteelblue:"svetlo kovinsko modra",lightyellow:"svetlo rumena",lime:"svetlo zelena",limegreen:"apneno zelena",linen:"lanena",magenta:"magenta",maroon:"kostanjeva",mediumaquamarine:"srednji akvamarin",mediumblue:"srednje modra",mediumorchid:"srednje orhidejasta",mediumpurple:"srednje škrlatna",mediumseagreen:"srednje morsko zelena",mediumslateblue:"srednje skrilasto modra",mediumspringgreen:"srednje pomladno zelena",mediumturquoise:"srednje turkizna",mediumvioletred:"srednje vijolično rdeča",midnightblue:"polnočno modra",mintcream:"metina krema",mistyrose:"megleno rožnata",moccasin:"mokasinasta",navajowhite:"navajo bela",navy:"mornarsko modra",oldlace:"stara čipka",olive:"olivno zelena",olivedrab:"umazano olivna",orange:"oranžna",orangered:"oranžno-rdeča",orchid:"orhidejasta",palegoldenrod:"bleda zlata rozga",palegreen:"bledo zelena",paleturquoise:"bledo turkizna",palevioletred:"bledo vijolično-rdeča",papayawhip:"papaja",peachpuff:"breskova",peru:"perujska",pink:"rožnata",plum:"slivova",powderblue:"kobaltovo modra",purple:"škrlatna",red:"rdeča",rosybrown:"rožnato rjava",royalblue:"kraljevsko modra",saddlebrown:"sedlasto rjava",salmon:"lososova",sandybrown:"peščeno rjava",seagreen:"morsko zelena",seashell:"morska lupina",sienna:"sienna",silver:"srebrna",skyblue:"nebeško modra",slateblue:"skrilasto modra",slategray:"skrilasto siva",slategrey:"skrilasto siva",snow:"snežena",springgreen:"pomladno zelena",steelblue:"kovinsko modra",tan:"rumeno-rjava",teal:"modrozelena",thistle:"osatna",tomato:"paradižnikova",transparent:"prosojno",turquoise:"turkizna",violet:"vijolična",wheat:"pšenična",white:"bela",whitesmoke:"megleno bela",yellow:"rumena",yellowgreen:"rumeno-zelena"}));
442.777778
3,773
0.802008
1805cd9908fb454ce3748dcee5aa4e589030834a
501
js
JavaScript
src/layouts/gallery.js
TomyToast/malinaLayout_gatsbyJS
987e60147c1702130f21c9d3873c747b5a6bfc55
[ "MIT" ]
null
null
null
src/layouts/gallery.js
TomyToast/malinaLayout_gatsbyJS
987e60147c1702130f21c9d3873c747b5a6bfc55
[ "MIT" ]
null
null
null
src/layouts/gallery.js
TomyToast/malinaLayout_gatsbyJS
987e60147c1702130f21c9d3873c747b5a6bfc55
[ "MIT" ]
null
null
null
import React from 'react'; import Container from '../components/hero/container/container'; import Col from '../components/Col/Col'; import img1 from '../images/img-m-1.jpg'; import img2 from '../images/img-m-2.jpg'; import img3 from '../images/img-m-3.jpg'; import img4 from '../images/img-m-4.jpg'; const Gallery = () => ( <Container> <Col foto={ img1 }/> <Col foto={ img2 }/> <Col foto={ img3 }/> <Col foto={ img4 }/> </Container> ) export default Gallery;
26.368421
63
0.610778