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
ac6aa7c1bafcfe5dd2ff918c557343d5d307e116
5,190
js
JavaScript
packages/docusaurus/docusaurus.config.js
tobiaslins/rooks
919697f7d4d9c5af0eb7488d239cf64308b3fc65
[ "MIT" ]
1
2021-11-14T09:27:31.000Z
2021-11-14T09:27:31.000Z
packages/docusaurus/docusaurus.config.js
tobiaslins/rooks
919697f7d4d9c5af0eb7488d239cf64308b3fc65
[ "MIT" ]
null
null
null
packages/docusaurus/docusaurus.config.js
tobiaslins/rooks
919697f7d4d9c5af0eb7488d239cf64308b3fc65
[ "MIT" ]
null
null
null
module.exports={ "title": "Rooks", "tagline": "Collection of React hooks ⚓ for everyone. ", "url": "https://react-hooks.org", "baseUrl": "/", "organizationName": "imbhargav5", "projectName": "rooks", "scripts": [ { src: "https://buttons.github.io/buttons.js", async: true, defer: true },{ src:"https://cdn.splitbee.io/sb.js", async: true }, { src: "https://cdn.jsdelivr.net/npm/@widgetbot/crate@3", async: true, defer: true, } ], "favicon": "https://github.com/imbhargav5/rooks/raw/master/.github/assets/favicon-24x24.png", "customFields": { "users": [ { "caption": "User1", "image": "/img/undraw_open_source.svg", "infoLink": "https://www.facebook.com", "pinned": true } ], "repoUrl": "https://github.com/imbhargav5/rooks" }, "onBrokenLinks": "log", "presets": [ [ "@docusaurus/preset-classic", { "docs": { "showLastUpdateAuthor": true, "showLastUpdateTime": true, "path": "docs", "sidebarPath": require.resolve("./sidebars.json") }, "blog": { "path": "blog" }, "theme": { "customCss": [require.resolve("./src/css/customTheme.css")] } } ] ], "plugins": [], "themeConfig": { "navbar": { "title": "Rooks", logo: { alt: 'Site Logo', src: 'https://github.com/imbhargav5/rooks/raw/master/.github/assets/icon.png', href: '/', // Default to `siteConfig.baseUrl`. target: '_self', // By default, this value is calculated based on the `href` attribute (the external link will open in a new tab, all others in the current one). }, "items": [ { "to": "/docs/getting-started/", "label": "Getting Started", "position": "left" }, { "to": "/docs/", "label": "Documentation", "position": "left" }, { "href": "https://github.com/imbhargav5/rooks", "label": "Github", "position": "right" }, { "href": "/docs/hooks-list/", "label": "Hooks List", "position": "left" }, { "href": "/docs/motivation/", "label": "Motivation", "position": "right" }, // { // "to": "/help", // "label": "Help", // "position": "left" // }, { type: 'docsVersionDropdown', "position": "right", dropdownItemsBefore: [], dropdownItemsAfter: [{to: '/versions', label: 'All versions'}], } ] }, "image": "img/undraw_online.svg", "footer": { "links": [ { // Label of the section of these links title: 'Docs', items: [ { // Label of the link label: 'All in one', // Client-side routing, used for navigating within the website. // The baseUrl will be automatically prepended to this value. to: 'docs/', }, { label: 'use-counter', to: 'docs/use-counter/', }, { label: 'use-did-mount', to: 'docs/use-did-mount/', }, ], },{ // Label of the section of these links title: 'Community', items: [ { // Label of the link label: 'Stack overflow', // Client-side routing, used for navigating within the website. // The baseUrl will be automatically prepended to this value. to: 'https://stackoverflow.com/questions/tagged/rooks', }, { label: 'Twitter', to: 'https://twitter.com/imbhargav5', }, ], }, { title: 'More', items: [ { label: 'Github', to: 'https://github.com/imbhargav5/rooks', }, // { // html: ` // <!-- Place this tag where you want the button to render. --> // <a class="github-button" href="https://github.com/imbhargav5/rooks" data-icon="octicon-star" aria-label="Star imbhargav5/rooks on GitHub">Star</a> // ` // }, { html : ` <a href="https://www.netlify.com"> <img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" /> </a>` }, { html : ` <a href="https://splitbee.io/?ref=reacthooks"> <img src="https://splitbee.io/splitbee-badge.svg" alt="Analytics by Splitbee.io" /> </a>` } ] }], "copyright": "MIT© 2020 Bhargav Ponnapalli", "logo": { } }, algolia: { apiKey: process.env.ALGOLIA_API_KEY, indexName: 'react-hooks', // Optional: see doc section bellow, contextual: true, // searchParameters: { // facetFilters: ["type:$TYPE"] // } //... other Algolia params }, } }
28.360656
169
0.472254
ac6b4b67f7be73833b44d02c212b20aed6c9771c
1,390
js
JavaScript
app/core/config.route.js
siddharthJadhav/Library-management-system
521dea50088b3276bfc20cd5191ce4e341b5c49c
[ "MIT" ]
null
null
null
app/core/config.route.js
siddharthJadhav/Library-management-system
521dea50088b3276bfc20cd5191ce4e341b5c49c
[ "MIT" ]
null
null
null
app/core/config.route.js
siddharthJadhav/Library-management-system
521dea50088b3276bfc20cd5191ce4e341b5c49c
[ "MIT" ]
null
null
null
angular .module('seed').config(['$ocLazyLoadProvider', 'APP_REQUIRES', function($ocLazyLoadProvider, APP_REQUIRES) { 'use strict'; // Lazy Load modules configuration $ocLazyLoadProvider.config({ debug: false, events: true, modules: APP_REQUIRES.modules }); }]).config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', function($controllerProvider, $compileProvider, $filterProvider, $provide) { 'use strict'; // registering components after bootstrap App.controller = $controllerProvider.register; App.directive = $compileProvider.directive; App.filter = $filterProvider.register; App.factory = $provide.factory; App.service = $provide.service; App.constant = $provide.constant; App.value = $provide.value; } ]).config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) { cfpLoadingBarProvider.includeBar = true; cfpLoadingBarProvider.includeSpinner = false; cfpLoadingBarProvider.latencyThreshold = 500; cfpLoadingBarProvider.parentSelector = '.wrapper > section'; }]).config(['$tooltipProvider', function($tooltipProvider) { $tooltipProvider.options({ appendToBody: true }); }]);
38.611111
112
0.623022
ac6c34f4a49ab66b8efcaa0092b5e463cb1dec88
1,426
js
JavaScript
src/components/bcl-icon/icon.story.js
claudiu-cristea/bootstrap-component-library
87ec400b5a5e5243ec140da1ff2f992dd88e2af9
[ "MIT" ]
null
null
null
src/components/bcl-icon/icon.story.js
claudiu-cristea/bootstrap-component-library
87ec400b5a5e5243ec140da1ff2f992dd88e2af9
[ "MIT" ]
null
null
null
src/components/bcl-icon/icon.story.js
claudiu-cristea/bootstrap-component-library
87ec400b5a5e5243ec140da1ff2f992dd88e2af9
[ "MIT" ]
null
null
null
import { withDesign } from "storybook-addon-designs"; import demoData from "@openeuropa/bcl-data-icon/data.js"; import defaultSprite from "@openeuropa/bcl-bootstrap/bootstrap-icons.svg"; import icon from "@openeuropa/bcl-icon/icon.html.twig"; import "!!null-loader!@openeuropa/bcl-theme-default/src/scss/_icon.scss"; import { getIconControls } from "@openeuropa/bcl-story-utils"; const getArgs = (data) => { return { name: data.name || "", transformation: "", size: "s", }; }; const getArgTypes = (data) => { return { ...getIconControls("icon", data), }; }; const applyArgs = (data, args) => { return Object.assign(data, args); }; export default { title: "Components/Icon", decorators: [withDesign], parameters: { design: [ { name: "Wireframe", type: "figma", url: "https://www.figma.com/file/Ug1zpiazvPT8la7ySWZy47/OEL-Wireframe-kit?node-id=2892%3A1152", }, { name: "Mockup", type: "figma", url: "https://www.figma.com/file/MPL8vE2LF4RQKLY4HcxHTs/OEL-Mockup-kit?node-id=2892%3A7237", }, { name: "Bootstrap docs", type: "iframe", url: "https://getbootstrap.com/docs/5.0/extend/icons/", }, ], }, }; export const Default = (args) => icon(applyArgs({ ...demoData, path: defaultSprite }, args)); Default.args = getArgs(demoData); Default.argTypes = getArgTypes(demoData);
25.927273
103
0.62763
ac6cbc077d8ec5e715b23b5805093199f1bd7ad1
651
js
JavaScript
examples/vanilla/index.js
kfeagle/weex-devtool-iOS
b6aff4d11c38b45c84fcb59354eb0349c979f8f6
[ "Apache-2.0" ]
null
null
null
examples/vanilla/index.js
kfeagle/weex-devtool-iOS
b6aff4d11c38b45c84fcb59354eb0349c979f8f6
[ "Apache-2.0" ]
null
null
null
examples/vanilla/index.js
kfeagle/weex-devtool-iOS
b6aff4d11c38b45c84fcb59354eb0349c979f8f6
[ "Apache-2.0" ]
null
null
null
// { "framework": "Vanilla" } var body = document.createElement('div', { classStyle: { alignItems: 'center', marginTop: 120 } }) var image = document.createElement('image', { attr: { src: 'http://alibaba.github.io/weex/img/weex_logo_blue@3x.png' }, classStyle: { width: 360, height: 82 } }) var text = document.createElement('text', { attr: { value: 'Hello World' }, classStyle: { fontSize: 48 } }) body.appendChild(image) body.appendChild(text) document.documentElement.appendChild(body) body.addEvent('click', function () { text.setAttr('value', 'Hello Weex') }) sendTasks(id, [{ module: 'dom', method: 'createFinish', args: []}])
25.038462
75
0.671275
ac6d04742a034ece882e4e3fc3bd9c1f7fb82cdf
13,673
js
JavaScript
engine/engine.particles.js
maryrosecook/pistolslut
00383aeb7c699b667790045aa27543e159f663d2
[ "MIT" ]
28
2015-06-15T09:59:18.000Z
2021-05-07T15:45:52.000Z
engine/engine.particles.js
maryrosecook/pistolslut
00383aeb7c699b667790045aa27543e159f663d2
[ "MIT" ]
null
null
null
engine/engine.particles.js
maryrosecook/pistolslut
00383aeb7c699b667790045aa27543e159f663d2
[ "MIT" ]
8
2015-01-30T00:49:18.000Z
2021-12-02T22:38:11.000Z
/** * The Render Engine * ParticleEngine * * @fileoverview The particle engine and base particle class. * * @author: Brett Fattori (brettf@renderengine.com) * * @author: $Author: bfattori $ * @version: $Revision: 1216 $ * * Copyright (c) 2010 Brett Fattori (brettf@renderengine.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ // Includes Engine.include("/engine/engine.pooledobject.js"); Engine.include("/engine/engine.baseobject.js"); Engine.initObject("Particle", "PooledObject", function() { /** * @class Base particle class. A particle only needs to implement the * <tt>draw()</tt> method. The remainder of the functionality is * handled by this abstract class. * * @param lifetime {Number} The life of the particle, in milliseconds * @extends PooledObject * @constructor * @description Create a particle */ var Particle = PooledObject.extend(/** @scope Particle.prototype */{ life: 0, engine: null, birth: 0, dead: false, /** * @private */ constructor: function(lifetime) { this.base("Particle"); this.life = lifetime; this.birth = 0; this.dead = false; }, /** * Release the object back into the pool. */ release: function() { this.base(); this.life = 0; this.engine = null; this.birth = 0; this.dead = true; }, /** * Initializes the object within the <tt>ParticleEngine</tt> * @param pEngine {ParticleEngine} The particle engine which owns the particle * @param time {Number} The world time when the particle was created * @private */ init: function(pEngine, time) { this.engine = pEngine; this.life += time; this.birth = time; this.dead = false; }, /** * Update the particle in the render context, calling its draw method. * @param renderContext {RenderContext} The context where the particle is drawn * @param time {Number} The world time, in milliseconds */ update: function(renderContext, time) { if (time < this.life) { // Draw it ( I think this is an optimization point ) this.draw(renderContext, time); return true; } else { return false; } }, /** * Get the time-to-live for the particle (when it will expire) * @return {Number} milliseconds */ getTTL: function() { return this.life; }, /** * Get the time at which the particle was created * @return {Number} milliseconds */ getBirth: function() { return this.birth; }, /** * [ABSTRACT] Draw the particle * @param renderContext {RenderContext} The context to render the particle to * @param time {Number} The world time, in milliseconds */ draw: function(renderContext, time) { // ABSTRACT } }, /** @scope Particle.prototype */{ /** * Get the class name of this object * * @return {String} "Particle" */ getClassName: function() { return "Particle"; } }); return Particle; }); Engine.initObject("ParticleEngine", "BaseObject", function() { /** * @class The particle engine is a simple system for updating, and expiring * particles within a game environment. This is registered with the * render context so it will be updated at regular intervals. The maximum * number of supported particles can be configured, but defaults to 120. * * @extends BaseObject * @constructor * @description Create a particle engine */ var ParticleEngine = BaseObject.extend(/** @scope ParticleEngine.prototype */{ particles: null, liveParticles: 0, lastTime: 0, maximum: 0, force: 0, /** * @private */ constructor: function() { this.base("ParticleEngine"); this.particles = []; this.maximum = ParticleEngine.MAX_PARTICLES; // Initialize the particles for (var u = 0; u < this.maximum; u++) { this.particles[u] = null; } this.liveParticles = 0; }, /** * @private */ destroy: function() { while (this.particles.length > 0) { var p = this.particles.shift(); if (p) p.destroy(); } this.base(); }, /** * Releases the object back into the pool. */ release: function() { this.base(); this.particles = null, this.lastTime = 0; this.maximum = 0; this.liveParticles = 0; }, /** * Add a group of particles at one time. This reduces the number of calls * to {@link #addParticle} which resorts the array of particles each time. * @param particleArray {Particle[]} A group of particles to add at one time */ addParticles: function(particleArray) { var i = 0,u; // If the new particles exceed the size of the engine's // maximum, truncate the remainder if (particleArray > this.maximum) { particleArray.length = this.maximum; } // Sort the particles by remaining life, with empty slots at the end this.sortParticles(); // Find the first available empty slot for a particle from // the group of particles being added for (var p in this.particles) { if (this.particles[p] == null) { break; } i++; } // Initialize all of the new particles for (var n in particleArray) { particleArray[n].init(this, this.lastTime); } // The maximum number of particles to animate this.liveParticles += particleArray.length; if (this.liveParticles > this.maximum) { this.liveParticles = this.maximum; } // If the remaining slots of the array will contain the entire group of // particles, we can use some native methods to speed up adding them to // the engine if (i + particleArray.length < this.maximum) { // There's enough space, bulk add the particles this.particles.length = i; this.particles = this.particles.concat(particleArray); // Clean up the particle array this.particles.length = this.maximum; for (u = i + particleArray.length; u < this.maximum; u++) { this.particles[u] = null; } } else { // There aren't enough free slots. Split the operation into two // calls. The first will insert what we can fit without forcing // any particles out. The second will force existing particles to // be destroyed and put new particles in place. var avail = this.maximum - i; if (avail > 0) { // Insert what we can this.particles.length = i; this.particles = this.particles.concat(particleArray.slice(0, avail)); particleArray = particleArray.slice(avail); // Clean up the particle array this.particles.length = this.maximum; for (u = i + particleArray.length; u < this.maximum; u++) { this.particles[u] = null; } } // Take the remainder of the particles and force into // the engine, overwriting the existing particles and // destroying them if (particleArray.length > 0) { var oldParticles = this.particles.splice(0, particleArray.length); this.particles = particleArray.concat(this.particles); // Destroy the particles which were forced out for (var o in oldParticles) { oldParticles[o].destroy(); } } // Resort the particles this.sortParticles(); } }, /** * Add a single particle to the engine. If many particles are being * added at one time, use {@link #addParticles} instead to add an * array of particles. * * @param particle {Particle} A particle to animate */ addParticle: function(particle) { this.addParticles([particle]); }, /** * Set the absolute maximum number of particles the engine will allow. * @param maximum {Number} The maximum particles the particle engine allows */ setMaximum: function(maximum) { var oldMax = this.maximum; this.maximum = maximum; // Adjust the particle array if (this.maximum < oldMax) { this.particles.length = this.maximum; } else if (this.maximum > oldMax) { // Add new empty slots for (var u = oldMax; u < this.maximum; u++) { this.particles[u] = null; } } }, /** * Get the maximum number of particles allowed in the particle engine. * @return {Number} */ getMaximum: function() { return this.maximum; }, /** * Sort live particles to the beginning of the list, ordered by remaining life. * Particles with a shorter lifespan should be sorted to the beginning of the list * with longer lived particles toward the end. * @private */ sortParticles: function() { this.particles.sort(function(a,b) { return a && b ? (a.getTTL() - Engine.worldTime) - (b.getTTL() - Engine.worldTime) : !a ? 1 : !b ? -1 : 0; }); }, /** * Update a particle, removing it and nulling its reference * if it is dead. Only live particles are updated * @private */ runParticle: function(idx, renderContext, time) { if (this.particles[idx] != null && !this.particles[idx].update(renderContext, time)) { this.particles[idx].destroy(); this.particles[idx] = null; } }, /** * Update the particles within the render context, and for the specified time. * * @param renderContext {RenderContext} The context the particles will be rendered within. * @param time {Number} The global time within the engine. */ update: function(renderContext, time) { var p = 1; this.lastTime = time; Engine.addMetric("particles", this.liveParticles, false, "#"); // If there are no live particles, don't do anything if (this.liveParticles == 0) { return; } renderContext.pushTransform(); // Using Duff's device with loop inversion for speed switch((this.liveParticles) & 0x3) { case 3: this.runParticle(p++,renderContext,time); case 2: this.runParticle(p++,renderContext,time); case 1: this.runParticle(p++,renderContext,time); } if (p < this.liveParticles) { do { this.runParticle(p++,renderContext,time); this.runParticle(p++,renderContext,time); this.runParticle(p++,renderContext,time); this.runParticle(p++,renderContext,time); } while (p < this.liveParticles); } renderContext.popTransform(); // Subtract the dead particles from the live so we can update // only when necessary. Collapse the particles so that the // nulls are at the end this.particles = EngineSupport.filter(this.particles, function(v) { return (v != null); }); this.liveParticles = this.particles.length; // Clean up particle list this.particles.length = this.maximum; for (var u = this.liveParticles; u < this.maximum; u++) { this.particles[u] = null; } }, /** * Get the properties object for the particle engine * @return {Object} */ getProperties: function() { var self = this; var prop = this.base(self); return $.extend(prop, { "Count" : [function() { return self.particles.length; }, null, false] }); } }, /** @scope ParticleEngine.prototype */{ /** * Get the class name of this object * * @return {String} "ParticleEngine" */ getClassName: function() { return "ParticleEngine"; }, /** * Default maximum number of particles in the system. To change * the value, see {@link ParticleEngine#setMaximum} * @type Number */ MAX_PARTICLES: 500 }); return ParticleEngine; });
30.725843
115
0.587216
ac6d263bcb22804fa89a5e373ddf766e45fc7f4d
6,073
js
JavaScript
studio/node_modules/@sanity/block-tools/lib/converters/editorValueToBlocks.js
AjDigitalDesign/portfoliov1
bc11376087799fb31560f2abf54e79df5c92e4b0
[ "MIT" ]
null
null
null
studio/node_modules/@sanity/block-tools/lib/converters/editorValueToBlocks.js
AjDigitalDesign/portfoliov1
bc11376087799fb31560f2abf54e79df5c92e4b0
[ "MIT" ]
26
2020-07-21T06:38:39.000Z
2022-03-26T23:23:58.000Z
studio/node_modules/@sanity/block-tools/lib/converters/editorValueToBlocks.js
CloudMunk/yumtash
3f03c66542d4d9f0557efe569c5326730d62c5b0
[ "MIT" ]
null
null
null
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = editorValueToBlocks; var _uniqBy2 = _interopRequireDefault(require("lodash/uniqBy")); var _uniq2 = _interopRequireDefault(require("lodash/uniq")); var _flatten2 = _interopRequireDefault(require("lodash/flatten")); var _get2 = _interopRequireDefault(require("lodash/get")); var _randomKey = _interopRequireDefault(require("../util/randomKey")); var _normalizeBlock = _interopRequireDefault(require("../util/normalizeBlock")); var _constants = require("../constants"); var _blockContentTypeFeatures = _interopRequireDefault(require("../util/blockContentTypeFeatures")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 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; } function createCustomBlockFromData(block) { var value = block.data.value; if (!value) { throw new Error("Data got no value: ".concat(JSON.stringify(block.data))); } var finalBlock = _objectSpread({}, value); finalBlock._key = block.key || (0, _randomKey.default)(12); if (!finalBlock._type) { throw new Error("The block must have a _type: ".concat(JSON.stringify(value))); } return finalBlock; } function toSanitySpan(node, sanityBlock, spanIndex, blockContentFeatures) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; var allowedDecorators = blockContentFeatures.decorators.map(decorator => decorator.value); if (node.object === 'text') { return node.leaves.map(leaf => { return { _type: 'span', _key: "".concat(sanityBlock._key).concat(spanIndex()), text: leaf.text, marks: (0, _uniq2.default)(leaf.marks.map(mark => mark.type).filter(markType => allowedDecorators.includes(markType))) }; }); } if (node.object === 'inline') { var nodes = node.nodes, data = node.data; var annotations = data.annotations; var annotationKeys = []; if (annotations) { Object.keys(annotations).forEach(name => { var annotation = annotations[name]; var annotationKey = annotation._key; if (annotation && annotationKey) { sanityBlock.markDefs.push(annotation); annotationKeys.push(annotationKey); } }); } return (0, _flatten2.default)(nodes.map(nodesNode => { if (nodesNode.object !== 'text') { throw new Error("Unexpected non-text child node for inline text: ".concat(nodesNode.object)); } if (node.type !== 'span') { return node.data.value; } return nodesNode.leaves.map(leaf => ({ _type: 'span', _key: "".concat(sanityBlock._key).concat(spanIndex()), text: leaf.text, marks: (0, _uniq2.default)(leaf.marks.map(mark => mark.type).filter(markType => allowedDecorators.includes(markType)).concat(annotationKeys)) })); })); } throw new Error("Unsupported object ".concat(node.object)); } function toSanityBlock(block, blockContentFeatures) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; // Handle block type if (block.type === 'contentBlock') { var sanityBlock = _objectSpread(_objectSpread({}, block.data), {}, { _type: 'block', markDefs: [] }); var index = 0; var spanIndex = () => { return index++; }; sanityBlock._key = block.key || (0, _randomKey.default)(12); if (!sanityBlock.style) { sanityBlock.style = _constants.BLOCK_DEFAULT_STYLE; } sanityBlock.children = (0, _flatten2.default)(block.nodes.map(node => toSanitySpan(node, sanityBlock, spanIndex, blockContentFeatures, options))); sanityBlock.markDefs = (0, _uniqBy2.default)(sanityBlock.markDefs, def => def._key); return sanityBlock; } // Handle block objects if (blockContentFeatures.types.blockObjects.map(bObj => bObj.name).includes(block.type)) { return createCustomBlockFromData(block); } // Put the right type back on the block if marked as __unknown from blocksToEditorValue if (block.type === '__unknown') { block.type = block.data.value._type; return createCustomBlockFromData(_objectSpread(_objectSpread({}, block), {}, { type: block.data.value._type })); } // A block that is not in the schema, so we don't know what to do with it throw new Error("Unknown block type: '".concat(block.type, "'")); } function editorValueToBlocks(value, type) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var blockContentFeatures = (0, _blockContentTypeFeatures.default)(type); var nodes = (0, _get2.default)(value, 'document.nodes'); if (!nodes || nodes.length === 0) { return []; } return nodes.map(node => toSanityBlock(node, blockContentFeatures, options)).filter(Boolean).map(block => (0, _normalizeBlock.default)(block, { allowedDecorators: blockContentFeatures.decorators.map(decorator => decorator.value) })); }
37.95625
534
0.67973
ac6d76e23b3903bb8d01be1299d5c1219e35db93
908
js
JavaScript
api/automate.js
nabudaldah/documents
9f39f0679a13cc8b5c27e260a76ab39eadf69ff6
[ "MIT" ]
1
2020-05-25T01:11:21.000Z
2020-05-25T01:11:21.000Z
api/automate.js
nabudaldah/documents
9f39f0679a13cc8b5c27e260a76ab39eadf69ff6
[ "MIT" ]
null
null
null
api/automate.js
nabudaldah/documents
9f39f0679a13cc8b5c27e260a76ab39eadf69ff6
[ "MIT" ]
null
null
null
module.exports = function(context){ var stdout = context.stdout; var stderr = context.stderr; var config = context.config; var db = context.db; var app = context.app; var channel = context.channel; var trigger = context.trigger; stdout('Initializing automate API ...') /* Get all of users' automate items */ app.get('/api/automate', function (req, res) { var collection = db.collection('automate'); collection.find({ user: req.username }).toArray(function (err, data) { if(err) { stderr(err); res.status(500).end(); return; } res.send(data); }); }); /* Post automate item */ app.post('/api/automate', function (req, res) { var collection = db.collection('automate'); collection.find({ user: req.username }).toArray(function (err, data) { if(err) { stderr(err); res.status(500).end(); return; } res.send(data); }); }); };
29.290323
73
0.623348
ac6e2f2e8eb70381ce6654ece82cabc491a298e3
504
js
JavaScript
src/components/AbsoluteLoader/AbsoluteLoader.styles.js
TonikX/sqllearn_project_v2_frontend
52c9f6d9a59ef965051b9e221269b06e284a8e62
[ "MIT" ]
null
null
null
src/components/AbsoluteLoader/AbsoluteLoader.styles.js
TonikX/sqllearn_project_v2_frontend
52c9f6d9a59ef965051b9e221269b06e284a8e62
[ "MIT" ]
null
null
null
src/components/AbsoluteLoader/AbsoluteLoader.styles.js
TonikX/sqllearn_project_v2_frontend
52c9f6d9a59ef965051b9e221269b06e284a8e62
[ "MIT" ]
4
2021-05-12T19:49:54.000Z
2022-03-26T09:37:42.000Z
export default (theme) => ({ loaderContainer: { position: 'fixed', width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center', top: 0, left: 0, }, showLoader: { zIndex: 1000, backgroundColor: '#ffffff8f', transition: '0.4s all ease-out', }, hideLoader: { zIndex: -20, backgroundColor: 'none', transition: '0.2s all ease-out' }, });
21.913043
40
0.486111
ac6f49fdf4a8131cbd2e429ac7ac75f71f6885b2
1,984
js
JavaScript
fiddles/extjs6/fiddle-0026-PivotDashBoard/src/packages/exporter/file/Worksheet.min.js
oneorthomedical/house
03bc23075f4d7a18362f596f96fabddcb237af30
[ "MIT" ]
48
2016-01-06T14:34:26.000Z
2021-07-14T16:10:36.000Z
fiddles/extjs6/fiddle-0026-PivotDashBoard/src/packages/exporter/file/Worksheet.min.js
oneorthomedical/house
03bc23075f4d7a18362f596f96fabddcb237af30
[ "MIT" ]
311
2016-05-28T12:35:22.000Z
2022-03-25T14:57:06.000Z
fiddles/extjs6/fiddle-0026-PivotDashBoard/src/packages/exporter/file/Worksheet.min.js
oneorthomedical/house
03bc23075f4d7a18362f596f96fabddcb237af30
[ "MIT" ]
33
2015-11-07T06:39:17.000Z
2020-12-22T18:59:14.000Z
Ext.define("Ext.exporter.file.excel.Worksheet",{extend:"Ext.exporter.file.Base",config:{name:"Sheet",protection:null,rightToLeft:null,showGridLines:true,tables:[]},tpl:[' <Worksheet ss:Name="{name:htmlEncode}"','<tpl if="this.exists(protection)"> ss:Protected="{protection:this.toNumber}"</tpl>','<tpl if="this.exists(rightToLeft)"> ss:RightToLeft="{rightToLeft:this.toNumber}"</tpl>',">\n",'<tpl for="tables">{[values.render()]}</tpl>',' <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">\n'," <PageSetup>\n",' <Layout x:CenterHorizontal="1" x:Orientation="Portrait" />\n',' <Header x:Margin="0.3" />\n',' <Footer x:Margin="0.3" x:Data="Page &amp;P of &amp;N" />\n',' <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75" />\n'," </PageSetup>\n"," <FitToPage />\n"," <Print>\n"," <PrintErrors>Blank</PrintErrors>\n"," <FitWidth>1</FitWidth>\n"," <FitHeight>32767</FitHeight>\n"," <ValidPrinterInfo />\n"," <VerticalResolution>600</VerticalResolution>\n"," </Print>\n"," <Selected />\n",'<tpl if="!showGridLines">'," <DoNotDisplayGridlines />\n","</tpl>"," <ProtectObjects>False</ProtectObjects>\n"," <ProtectScenarios>False</ProtectScenarios>\n"," </WorksheetOptions>\n"," </Worksheet>\n",{exists:function(a){return !Ext.isEmpty(a)},toNumber:function(a){return Number(Boolean(a))}}],destroy:function(){this.getTables().destroy();return this.callParent(arguments)},applyTables:function(b,a){return this.checkCollection(b,a,"Ext.exporter.file.excel.Table")},addTable:function(a){return this.getTables().add(a||{})},getTable:function(a){return this.getTables().get(a)},applyName:function(a){return Ext.String.ellipsis(String(a),31)},getRenderData:function(){return Ext.apply(this.callParent(arguments),{tables:this.getTables().getRange()})}});
1,984
1,984
0.631048
ac6fdeee2433ca8378ca5076ba5b256d252153fa
1,356
js
JavaScript
www/js/app/searchBar.js
OpenSourceLibraryManagement/previous_version
85c03c7dd2d017d71323a04a6b1f483c533b1a80
[ "Apache-2.0" ]
null
null
null
www/js/app/searchBar.js
OpenSourceLibraryManagement/previous_version
85c03c7dd2d017d71323a04a6b1f483c533b1a80
[ "Apache-2.0" ]
null
null
null
www/js/app/searchBar.js
OpenSourceLibraryManagement/previous_version
85c03c7dd2d017d71323a04a6b1f483c533b1a80
[ "Apache-2.0" ]
null
null
null
!function(){ 'use strict'; document.querySelector('.mdh-toggle-search').addEventListener('click', function(){ if(this.querySelector('i').innerText == 'search'){ this.querySelector('i').innerText = 'cancel'; this.classList.remove('mdl-cell--hide-tablet', 'mdl-cell--hide-desktop'); [].forEach.call( document.querySelectorAll('.mdl-layout__drawer-button, .mdl-layout-title, .mdl-badge, .nav-button, .mdl-layout-spacer'), function(elem){ elem.style.display = 'none'; } ); document.querySelector('.mdl-layout__header-row').style.paddingLeft = '16px'; var expSearch = document.querySelector('.mdh-expandable-search'); expSearch.classList.remove('mdl-cell--hide-phone'); expSearch.style.margin = '0 16px 0 0'; } else{ this.querySelector('i').innerText = 'search'; this.classList.add('mdl-cell--hide-tablet', 'mdl-cell--hide-desktop'); [].forEach.call( document.querySelectorAll('.mdl-layout__drawer-button, .mdl-layout-title, .mdl-badge, .nav-button, .mdl-layout-spacer'), function(elem){ elem.style.display = 'block'; } ); document.querySelector('.mdl-layout__header-row').style.paddingLeft = ''; var expSearch = document.querySelector('.mdh-expandable-search'); expSearch.classList.add('mdl-cell--hide-phone'); expSearch.style.margin = '0 50px'; } }); }();
39.882353
125
0.675516
ac7031ac7390e8f36e5ea2db5f9e947d8a928a4d
10,738
js
JavaScript
src/services/TableService.js
BA-MBSE/ve
4a5b6deb6973ff774b85f913b5825de1708d2c1a
[ "Apache-2.0" ]
19
2018-07-29T01:04:45.000Z
2022-02-22T14:11:48.000Z
src/services/TableService.js
BA-MBSE/ve
4a5b6deb6973ff774b85f913b5825de1708d2c1a
[ "Apache-2.0" ]
46
2018-06-20T19:02:07.000Z
2022-03-01T18:22:19.000Z
src/services/TableService.js
BA-MBSE/ve
4a5b6deb6973ff774b85f913b5825de1708d2c1a
[ "Apache-2.0" ]
13
2015-01-31T21:28:59.000Z
2018-03-22T14:36:36.000Z
'use strict'; angular.module('mms') .factory('TableService', ['$q', '$http', 'URLService', 'UtilsService', 'CacheService', '_', 'ElementService', TableService]); function TableService($q, $http, URLService, UtilsService, CacheService, _, ElementService) { function readvalues2(plot, projectId, refId, commitId){ var deferred = $q.defer(); var aMmsEid = {projectId: projectId, refId: refId, commitId: commitId}; var isHeader = (plot.table.header !== undefined && plot.table.header.length > 0 ? true : false); if (isHeader) { var aheader = asyncReadTableHeader(aMmsEid, plot.table.header[0]); aheader.then( function(tableheader){ var abody = asyncReadTableBody2(aMmsEid, plot.table.body, tableheader); abody.then( function(tablebody){ var r = {tableheader: tableheader, tablebody: tablebody, isHeader: isHeader}; deferred.resolve(r); }); }); } else { var abody = asyncReadTableBody(aMmsEid, plot.table.body); abody.then( function(tablebody){ var r = {tablebody: tablebody, isHeader:isHeader}; deferred.resolve(r); }); } return deferred.promise; } //end of readValues function readvalues(plot, projectId, refId, commitId){ var deferred = $q.defer(); var aMmsEid = {projectId: projectId, refId: refId, commitId: commitId}; var isHeader = (plot.table.header !== undefined && plot.table.header.length > 0 ? true : false); if (isHeader) { var aheader = asyncReadTableHeader(aMmsEid, plot.table.header[0]); aheader.then( function(tableheader){ var abody = asyncReadTableBody(aMmsEid, plot.table.body); abody.then( function(tablebody){ var r = {tableheader: tableheader, tablebody: tablebody, isHeader: isHeader}; deferred.resolve(r); }); }); } else { var abody = asyncReadTableBody(aMmsEid, plot.table.body); abody.then( function(tablebody){ var r = {tablebody: tablebody, isHeader:isHeader}; deferred.resolve(r); }); } return deferred.promise; } //end of readValues function asyncReadTableHeader(aMmsEid, header){ return $q( function(resolve){ readRowValues(header, aMmsEid) .then(function(tableheader) { tableheader.values.shift(); //remove 1st element resolve(tableheader.values); }); }); } function asyncReadTableBody(aMmsEid, tablebody) { return $q( function (resolve){ var c3_data = []; var valuesO = []; tablebody.forEach(function(row){ readRowValues(row, aMmsEid) .then(function (yyvalue){ c3_data.push(yyvalue.values); valuesO.push(yyvalue.valuesO); if ( c3_data.length === tablebody.length) { var r = { c3_data: c3_data, valuesO: valuesO }; resolve(r); } }); }); }); } function asyncReadTableBody2(aMmsEid, tablebody, tableheader) { return $q( function (resolve){ var c3_data = []; var valuesO = []; //adding "rowheader" so length of header and rowvalues will be the same. var mtableheader = tableheader.slice(0); mtableheader.splice(0, 0, "rowheader"); tablebody.forEach(function(row){ readRowValues2(row, aMmsEid, mtableheader) .then(function (yyvalue){ c3_data.push(yyvalue.valuesx); valuesO.push(yyvalue.valuesO); if ( valuesO.length === tablebody.length) { var r = { c3_data: c3_data, valuesO: valuesO }; resolve(r); } }); }); }); } function getValue(datavalue){ if (datavalue && datavalue.type === "LiteralString"){ if ( isNaN(datavalue.value)) return datavalue.value; else return Number(datavalue.value); } else if (datavalue && (datavalue.type === "LiteralReal" || datavalue.type === "LiteralInteger")){ return datavalue.value; } } function readParagraphValue(e,aMmsEid, index){ return $q( function(resolve){ if (e.content[0].sourceType == 'text'){ //console.log("text"); var tv = e.content[0].text.replace("<p>","").replace("</p>","").trim(); if ( !isNaN(tv)) tv = Number(tv); resolve( { index: index, value: tv, valueO: e}); } else if (e.content[0].sourceType === 'reference'){ aMmsEid.elementId =e.content[0].source; if ( e.content[0].sourceProperty === 'name'){ //console.log("name"); ElementService.getElement(aMmsEid, 1, false) .then(function(refe) { //value = refe.name; //valueO= refe; var nameModified = refe.name; if ( !isNaN(nameModified)) //means it is a number nameModified = Number(nameModified); resolve( { index: index, value: nameModified, valueO: refe}); }); } else if ( e.content[0].sourceProperty === 'documentation'){ //console.log("doc"); ElementService.getElement(aMmsEid, 1, false) .then(function(refe) { var docModified = refe.documentation.replace("<p>","").replace("</p>","").trim(); //seems adding \n at the end when modified at vieweditor so if number goahead to conver to number //i.e., "5\n" will be a number. if ( !isNaN(docModified)) //means it is a number docModified = Number(docModified); resolve( { index: index, value: docModified, valueO: refe}); }); } else { //sourceProperty === 'value' //console.log('value'); ElementService.getElement(aMmsEid, 1, false) .then(function(refe) { var valueO= refe; var value = ""; if (refe.type === 'Property' || refe.type === 'Port') { if (refe.defaultValue) { value = getValue(refe.defaultValue); //default value } else { value= ""; } } if (refe.type === 'Slot') { value = getValue(refe.value[0]); //scope.element.value } /* not sure what to do if (refe.type === 'Constraint' && refe.specification) { value = refe.specification; } if (refe.type === 'Expression') { value = refe.operand; } */ resolve( { index: index, value: value, valueO: valueO}); }); }//end of else } //reference }); } function readRowValues ( row, aMmsEid ){ return $q( function (resolve) { var values = []; var valuesO = []; var index = 0; row.forEach(function(e){ if (e.content.length === 0){ values[index] = null; valuesO[index] = null; index++; } else { if (e.content[0].type == 'Paragraph'){ readParagraphValue(e, aMmsEid, index++) .then( function(r){ values[r.index] =r.value; valuesO[r.index] = r.valueO; if ( values.length === row.length){ var result = { values: values, valuesO: valuesO }; resolve(result); } }); } // Paragraph } //end of else }); //for each row }); } //end of function function readRowValues2 (row, aMmsEid, mtableheader){ return $q( function (resolve) { var valuesx = []; //named index instead of number index var valuesO = []; var index = 0; row.forEach(function(e){ if (e.content.length === 0){ valuesx[mtableheader[index]] = null; valuesO[index] = null; index++; } else { if (e.content[0].type == 'Paragraph'){ readParagraphValue(e, aMmsEid, index++) .then( function(r){ valuesx[mtableheader[r.index]] = r.value; valuesO[r.index] = r.valueO; if ( valuesO.length === row.length){ var result = { valuesx: valuesx, valuesO: valuesO }; resolve(result); } }); } // Paragraph } //end of else }); //for each row }); } //end of function //make only a-zA-Z0-9_ because id or class does not support special characters(ie., ()) var toValidId = function(original) { return original.replace(/[^a-zA-Z0-9_]/gi, ''); }; /** * @param {Object} clientConfig The size width, height and margin info from magicDraw * @param {Object} defaultPlotConfig The size width, height and margin from the plot directive */ var plotConfig = function(clientConfig, defaultPlotConfig){ var plotConfig = defaultPlotConfig; if (clientConfig !== undefined){ if (clientConfig.size !== undefined) { if( clientConfig.size.width != undefined && !isNaN(clientConfig.size.width)) plotConfig.width = Number(clientConfig.size.width); if( clientConfig.size.height != undefined && !isNaN(clientConfig.size.height)) plotConfig.height = Number(clientConfig.size.height); } if (clientConfig.padding !== undefined) { if (clientConfig.padding.top != undefined && !isNaN(clientConfig.padding.top)) plotConfig.marginTop = Number(clientConfig.padding.top); if (clientConfig.padding.right != undefined && !isNaN(clientConfig.padding.right)) plotConfig.marginRight = Number(clientConfig.padding.right); if (clientConfig.padding.left != undefined && !isNaN(clientConfig.padding.left)) plotConfig.marginLeft = Number(clientConfig.padding.left); if (clientConfig.padding.bottom != undefined && !isNaN(clientConfig.padding.bottom)) plotConfig.marginBottom = Number(clientConfig.padding.bottom); } } return plotConfig; }; return { toValidId : toValidId, plotConfig: plotConfig, readvalues: readvalues, //for row values in number index readvalues2: readvalues2 //for row values with named(header) index }; }
35.091503
127
0.540883
ac71230c9d605c6026fe582456b61ccafed6856f
2,342
js
JavaScript
plantilla/basica/app-assets/js/scripts/charts/d3/bar/bar.min.js
ingllinasramirez/sia
a36693a5f52eacb7192097bd380022daa4a47122
[ "Apache-2.0" ]
112
2020-05-31T20:27:21.000Z
2022-03-18T09:55:53.000Z
plantilla/basica/app-assets/js/scripts/charts/d3/bar/bar.min.js
ingllinasramirez/sia
a36693a5f52eacb7192097bd380022daa4a47122
[ "Apache-2.0" ]
141
2020-06-22T05:15:15.000Z
2022-03-10T14:10:43.000Z
plantilla/basica/app-assets/js/scripts/charts/d3/bar/bar.min.js
ingllinasramirez/sia
a36693a5f52eacb7192097bd380022daa4a47122
[ "Apache-2.0" ]
190
2020-06-01T01:04:45.000Z
2022-03-30T08:34:47.000Z
/*! * stack-admin-theme (https://pixinvent.com/bootstrap-admin-template/stack) * Copyright 2018 PIXINVENT * Licensed under the Themeforest Standard Licenses */ $(window).on("load",function(){function type(d){return d.frequency=+d.frequency,d}function resize(){width=ele.node().getBoundingClientRect().width-margin.left-margin.right,container.attr("width",width+margin.left+margin.right),svg.attr("width",width+margin.left+margin.right),x.rangeRoundBands([0,width],.1),svg.selectAll(".d3-xaxis").call(xAxis),svg.selectAll(".d3-bar").attr("x",function(d){return x(d.letter)}).attr("width",x.rangeBand())}var ele=d3.select("#bar-chart"),margin={top:20,right:20,bottom:30,left:50},width=ele.node().getBoundingClientRect().width-margin.left-margin.right,height=500-margin.top-margin.bottom,formatPercent=d3.format(".0%"),x=d3.scale.ordinal().rangeRoundBands([0,width],.1),y=d3.scale.linear().range([height,0]),xAxis=d3.svg.axis().scale(x).orient("bottom"),yAxis=d3.svg.axis().scale(y).orient("left").tickFormat(formatPercent),tip=d3.tip().attr("class","d3-tip").offset([-10,0]).html(function(d){return"<strong>Frequency:</strong> <span style='color:#FF847C'>"+d.frequency+"</span>"}),container=ele.append("svg"),svg=container.attr("width",width+margin.left+margin.right).attr("height",height+margin.top+margin.bottom).append("g").attr("transform","translate("+margin.left+","+margin.top+")");svg.call(tip),d3.tsv("../../../app-assets/data/d3/bar/bar.tsv",type,function(error,data){if(error)throw error;x.domain(data.map(function(d){return d.letter})),y.domain([0,d3.max(data,function(d){return d.frequency})]),svg.append("g").attr("class","d3-axis d3-xaxis").attr("transform","translate(0,"+height+")").call(xAxis),svg.append("g").attr("class","d3-axis d3-yaxis").call(yAxis).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".71em").style("text-anchor","end").style("fill","#1DE9B6").style("font-size",12).text("Frequency"),svg.selectAll(".d3-bar").data(data).enter().append("rect").attr("class","d3-bar").attr("x",function(d){return x(d.letter)}).attr("width",x.rangeBand()).attr("y",function(d){return y(d.frequency)}).attr("height",function(d){return height-y(d.frequency)}).on("mouseover",tip.show).on("mouseout",tip.hide).style("fill","#1DE9B6")}),$(window).on("resize",resize),$(".menu-toggle").on("click",resize)});
390.333333
2,178
0.711358
ac713d897b654fb204b550c58c2f90cc9d2d7bf2
15,445
js
JavaScript
questionnaire/src/assets/iconfont/iconfont.js
fangdadashen/questionnaire
8ef065da2df0e29b7955c661ff63363961de812a
[ "0BSD" ]
null
null
null
questionnaire/src/assets/iconfont/iconfont.js
fangdadashen/questionnaire
8ef065da2df0e29b7955c661ff63363961de812a
[ "0BSD" ]
6
2021-03-10T03:15:38.000Z
2022-02-26T21:55:28.000Z
questionnaire/src/assets/iconfont/iconfont.js
fangdadashen/questionnaire
8ef065da2df0e29b7955c661ff63363961de812a
[ "0BSD" ]
null
null
null
!function(a){var c,i='<svg><symbol id="icon-jia" viewBox="0 0 1024 1024"><path d="M512 128c102.4 0 198.4 38.4 268.8 115.2C857.6 313.6 896 409.6 896 505.6 896 608 857.6 704 780.8 780.8 710.4 857.6 614.4 896 512 896s-198.4-38.4-268.8-115.2C166.4 710.4 128 614.4 128 512s38.4-198.4 115.2-268.8C313.6 166.4 409.6 128 512 128m0-64c-115.2 0-224 44.8-313.6 134.4-179.2 179.2-179.2 448 0 627.2C288 915.2 396.8 960 512 960s224-44.8 313.6-134.4c179.2-179.2 179.2-454.4 0-627.2C736 108.8 627.2 64 512 64z m288 480H544v256c0 19.2-12.8 32-32 32s-32-12.8-32-32V544H224c-19.2 0-32-12.8-32-32s12.8-32 32-32h256V224c0-19.2 12.8-32 32-32s32 12.8 32 32v256h256c19.2 0 32 12.8 32 32s-12.8 32-32 32z" ></path></symbol><symbol id="icon-20151209tubiaolianxizhuanhuan09" viewBox="0 0 1024 1024"><path d="M851.968 352.256c0 5.24-1.999 10.486-6.001 14.479l-319.488 319.488c-7.995 7.999-20.963 7.999-28.959 0l-319.488-319.488c-7.995-7.991-7.995-20.967 0-28.959 7.999-7.999 20.967-7.999 28.963 0l305.005 305.005 305.009-305.005c7.995-7.999 20.963-7.999 28.959 0 4.002 3.998 6.001 9.241 6.001 14.479z" ></path></symbol><symbol id="icon-20151209tubiaolianxizhuanhuan09-copy" viewBox="0 0 1024 1024"><path d="M352.256 172.032c5.24 0 10.486 1.999 14.479 6.001l319.488 319.488c7.999 7.995 7.999 20.963 0 28.959l-319.488 319.488c-7.991 7.995-20.967 7.995-28.959 0-7.999-7.999-7.999-20.967 0-28.963l305.005-305.005-305.005-305.009c-7.999-7.995-7.999-20.963 0-28.959 3.998-4.002 9.241-6.001 14.479-6.001z" ></path></symbol><symbol id="icon-fuzhi" viewBox="0 0 1024 1024"><path d="M170.667 0v170.667H0V1024h853.333V853.333H1024V0H170.667z m625.777 967.111H56.89V227.556h113.778v625.777h625.777v113.778z m170.667-170.667H227.556V56.89H967.11v739.555z" ></path><path d="M369.778 455.111h199.11v199.111c0 17.067 11.379 28.445 28.445 28.445s28.445-11.378 28.445-28.445v-199.11h199.11c17.068 0 28.445-11.379 28.445-28.445s-11.377-28.445-28.444-28.445H625.778v-199.11c0-17.068-11.378-28.445-28.445-28.445s-28.444 11.377-28.444 28.444v199.111H369.778c-17.067 0-28.445 11.378-28.445 28.445s11.378 28.444 28.445 28.444z" ></path></symbol><symbol id="icon-left-arrow" viewBox="0 0 1024 1024"><path d="M671.744 851.968c-5.24 0-10.486-1.999-14.479-6.001l-319.48799999-319.488c-7.999-7.995-7.999-20.963-1e-8-28.959l319.488-319.488c7.991-7.995 20.96700001-7.995 28.959 1e-8 7.999 7.999 7.999 20.967 0 28.96299999l-305.005 305.005 305.005 305.009c7.999 7.995 7.999 20.963 0 28.95899999-3.998 4.002-9.241 6.001-14.479 6.00100001z" ></path></symbol><symbol id="icon-chuangjian" viewBox="0 0 1024 1024"><path d="M97.52381 48.761905h731.428571c29.257143 0 48.761905 19.504762 48.761905 48.761905v828.95238c0 29.257143-19.504762 48.761905-48.761905 48.761905h-731.428571c-29.257143 0-48.761905-19.504762-48.761905-48.761905v-828.95238c0-29.257143 19.504762-48.761905 48.761905-48.761905z" fill="#E6EFF9" ></path><path d="M999.619048 814.32381h-185.295238v185.295238c0 4.87619-4.87619 9.752381-4.876191 14.628571-4.87619 4.87619-9.752381 4.87619-14.628571 4.876191h-24.380953c-14.628571 0-24.380952-9.752381-24.380952-24.380953v-185.295238h-185.295238c-14.628571 0-24.380952-9.752381-24.380953-24.380952v-24.380953c0-14.628571 9.752381-24.380952 24.380953-24.380952h185.295238v-185.295238c0-14.628571 9.752381-24.380952 24.380952-24.380953h24.380953c14.628571 0 24.380952 9.752381 24.380952 24.380953v185.295238h185.295238c4.87619 0 9.752381 4.87619 14.628572 4.87619 4.87619 4.87619 4.87619 9.752381 4.87619 14.628572v24.380952c0 24.380952-9.752381 34.133333-24.380952 34.133334z m-131.657143-702.171429c0-14.628571-4.87619-24.380952-14.628572-34.133333-9.752381-9.752381-19.504762-14.628571-34.133333-14.628572h-707.047619c-14.628571 0-24.380952 4.87619-34.133333 14.628572-9.752381 9.752381-14.628571 19.504762-14.628572 34.133333v799.695238c0 24.380952 19.504762 48.761905 48.761905 48.761905h375.466667c29.257143 0 43.885714 9.752381 43.885714 29.257143s-14.628571 34.133333-43.885714 34.133333h-375.466667c-63.390476 0-112.152381-48.761905-112.152381-112.152381v-799.695238c0-29.257143 9.752381-58.514286 34.133333-78.019048s48.761905-34.133333 78.019048-34.133333h707.047619c29.257143 0 58.514286 9.752381 78.019048 34.133333 19.504762 19.504762 34.133333 48.761905 34.133333 78.019048v375.466667c0 19.504762-14.628571 29.257143-34.133333 29.257142-19.504762 0-29.257143-9.752381-34.133334-29.257142v-375.466667z m-716.8 516.87619h258.438095c4.87619 0 4.87619 0 9.752381 4.876191 0 0 4.87619 4.87619 4.87619 9.752381v24.380952c0 4.87619-4.87619 9.752381-9.752381 9.752381h-258.438095c-4.87619 0-4.87619 0-9.752381-4.87619 0 0-4.87619-4.87619-4.87619-9.752381v-24.380953c0-4.87619 0-4.87619 4.87619-9.752381h4.876191z m443.733333-282.819047h-443.733333c-4.87619 0-4.87619 0-9.752381-4.876191 0 0-4.87619-4.87619-4.876191-9.752381v-24.380952c0-4.87619 0-4.87619 4.876191-9.752381 0 0 4.87619-4.87619 9.752381-4.87619h443.733333c4.87619 0 4.87619 0 9.752381 4.87619 0 0 4.87619 4.87619 4.876191 9.752381v24.380952c0 4.87619 0 4.87619-4.876191 9.752381s-9.752381 4.87619-9.752381 4.876191z m175.542857-43.885714c4.87619 0 9.752381 0 9.752381 4.87619 4.87619 4.87619 4.87619 4.87619 4.876191 9.752381v14.628571c0 9.752381-9.752381 14.628571-14.628572 14.628572s-14.628571-4.87619-14.628571-14.628572v-14.628571c-4.87619-4.87619 4.87619-14.628571 14.628571-14.628571z m-19.504762-97.52381c0-43.885714-24.380952-43.885714-34.133333-43.885714h-229.180952c-9.752381 0-14.628571-4.87619-14.628572-14.628572s4.87619-14.628571 14.628572-14.628571h229.180952c19.504762 0 68.266667 9.752381 68.266667 78.019047v68.266667c0 9.752381-9.752381 14.628571-14.628572 14.628572s-14.628571-4.87619-14.628571-14.628572l-4.876191-73.142857z m-609.523809 297.447619v-24.380952c0-4.87619 0-4.87619 4.87619-9.752381 0 0 4.87619-4.87619 9.752381-4.876191h351.085715c4.87619 0 9.752381 4.87619 9.75238 9.752381v24.380953c0 4.87619 0 4.87619-4.87619 9.752381 0 0-4.87619 4.87619-9.752381 4.87619h-351.085714c-4.87619 0-4.87619 0-9.752381-4.87619v-4.876191z" fill="#2F7DCD" ></path></symbol><symbol id="icon-shang" viewBox="0 0 1024 1024"><path d="M827.5 633L513 356.2 198.5 633l-32.9-37.4 330.9-291.3c9.4-8.3 23.5-8.3 32.9 0l330.9 291.3-32.8 37.4z" fill="#909090" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M735.488 704.064h-448c-17.6 0-32 14.4-32 32s14.4 32 32 32h448c17.6 0 32-14.4 32-32s-14.4-32-32-32zM735.488 512h-448c-17.6 0-32 14.4-32 32s14.4 32 32 32h448c17.6 0 32-14.4 32-32s-14.4-32-32-32zM288.512 320h192c17.6 0 32-14.4 32-32s-14.4-32-32-32h-192c-17.6 0-32 14.4-32 32s14.4 32 32 32z" ></path><path d="M886.144 328.32L631.168 73.344A31.744 31.744 0 0 0 608.64 64H192.512c-35.2 0-64 28.8-64 64v768c0 35.2 28.8 64 64 64h638.976c35.2 0 64-28.8 64-64V352h-0.192a31.616 31.616 0 0 0-9.152-23.68zM787.328 320h-114.304a32.832 32.832 0 0 1-32.96-32l-0.448-115.712L787.328 320z m12.16 576H224.512a32.064 32.064 0 0 1-32-32v-704c0-17.6 14.4-32 32-32h351.04l0.128 202.688A53.248 53.248 0 0 0 628.992 384h202.496v480c0 17.6-14.4 32-32 32z" ></path></symbol><symbol id="icon-Time" viewBox="0 0 1024 1024"><path d="M512.04516 848.034576c185.584476 0 336.034576-150.450099 336.034575-336.034576S697.629636 175.965424 512.04516 175.965424 176.010584 326.415524 176.010584 512 326.460684 848.034576 512.04516 848.034576z m0 48.004939C299.951841 896.039515 128.005645 724.093319 128.005645 512S299.951841 127.960485 512.04516 127.960485 896.084675 299.906681 896.084675 512 724.138479 896.039515 512.04516 896.039515z" ></path><path d="M512.04516 512m-230.428225 0a230.428225 230.428225 0 1 0 460.85645 0 230.428225 230.428225 0 1 0-460.85645 0Z" ></path></symbol><symbol id="icon-wenjian1" viewBox="0 0 1024 1024"><path d="M147.91111147 26.54814827h546.13333333l182.04444373 182.0444448v788.85925866H147.91111147V26.54814827z m60.6814816 60.6814816v849.54074026h606.81481386V232.86518507L669.77185173 87.22962987H208.59259307z" fill="#333333" ></path><path d="M754.7259264 694.0444448v60.6814816H269.2740736v-60.6814816h485.4518528z m0-182.0444448v60.6814816H269.2740736V512h485.4518528z m-121.3629632-242.7259264V26.54814827h-60.6814816v303.40740693h303.40740693V269.2740736h-242.72592533z" fill="#333333" ></path></symbol><symbol id="icon-checkbox-checked" viewBox="0 0 1026 1024"><path d="M853.276444 1009.436444l-853.333333 0 0-853.333333 853.333333 0L853.276444 1009.436444zM56.832 952.547556l739.555556 0 0-739.555556-739.555556 0L56.832 952.547556z" fill="#707070" ></path><path d="M317.553778 563.825778 243.370667 628.963556 500.110222 919.381333 998.001778 409.884444 936.96 350.094222 501.248 785.464889Z" fill="#707070" ></path></symbol><symbol id="icon-GooglePlaylogo" viewBox="0 0 1024 1024"><path d="M46.592 953.856V70.144c0-29.696 16.896-57.344 44.032-70.144l516.608 512L90.624 1024c-27.136-13.312-44.032-40.448-44.032-70.144" fill="#00D8FF" ></path><path d="M771.072 674.304L206.336 997.376l445.44-441.344 119.296 118.272" fill="#FF003C" ></path><path d="M946.688 450.048c19.456 14.848 30.72 37.376 30.72 61.952 0.512 24.064-10.752 46.592-29.696 61.44l-120.32 68.608L696.32 512l131.072-130.048 119.296 68.096" fill="#FFCA00" ></path><path d="M206.336 26.624l564.736 323.072-119.296 118.272z" fill="#00F765" ></path></symbol><symbol id="icon-top" viewBox="0 0 1024 1024"><path d="M550.28896726 261.82745182l0 423.48957975L511.07696904 685.31703157 511.07696903 261.82745182l39.21199823 0z" fill="" ></path><path d="M589.50096549 664.92679253L531.4672081 763.74102802l-59.6022373-98.81423549 117.63599469 0z" fill="" ></path></symbol><symbol id="icon-radio-checked" viewBox="0 0 1024 1024"><path d="M511.998179 4.270218C236.804641 4.270218 13.716798 227.086004 13.716798 501.948803 13.716798 776.805514 236.804641 999.6213 511.998179 999.6213 787.195364 999.6213 1010.28321 776.805514 1010.28321 501.948803 1010.28321 227.086004 787.195364 4.270218 511.998179 4.270218L511.998179 4.270218ZM780.780691 374.702384 443.744488 711.322707C437.096243 717.962849 425.563698 717.208327 417.978739 709.632609L395.388087 687.069516C395.388087 687.064645 395.383221 687.064645 395.383221 687.059774L244.378652 536.244224C236.799776 528.669724 236.799776 516.395506 244.378652 508.821006L285.560057 467.689832C293.143801 460.115331 305.433019 460.115331 313.016763 467.689832L431.708307 586.236624 712.142582 306.147992C718.790828 299.50785 730.323373 300.262372 737.903467 307.83809L779.088522 348.968074C786.673481 356.538922 787.428936 368.062243 780.780691 374.702384L780.780691 374.702384Z" fill="#2c2c2c" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M401.42 521.352H218.979v36.486H401.42v-36.486z m0-109.465H218.979v36.488H401.42v-36.488zM218.979 776.768H620.35v-36.486H218.979v36.486z m523.736-304.806L517.522 229.444H164.247c-40.303 0-72.976 32.673-72.976 72.977v583.812c0 40.305 32.673 72.977 72.976 72.977h510.835c40.305 0 72.977-32.672 72.977-72.977V484.862l-6.45-6.45 1.106-6.45zM529.129 296.243l159.726 170.375H565.618c-20.151 0-36.488-16.336-36.488-36.488V296.243z m182.441 589.99c0 20.152-16.336 36.49-36.488 36.49H164.247c-20.151 0-36.488-16.338-36.488-36.49V302.421c0-20.151 16.338-36.486 36.488-36.486h328.394V430.13c0 40.305 32.673 72.977 72.977 72.977H711.57v383.126zM218.979 667.305H620.35v-36.49H218.979v36.49z m705.07-298.357l1.107-6.451-225.194-242.516H346.688c-40.303 0-72.976 32.672-72.976 72.977h36.49c0-20.152 16.334-36.49 36.486-36.49h328.394v164.199c0 40.303 32.673 72.977 72.977 72.977h145.953v383.125c0 20.152-16.336 36.49-36.488 36.49h-72.977v36.488h72.977c40.305 0 72.977-32.675 72.977-72.978V375.398l-6.452-6.45z m-175.99-11.795c-20.152 0-36.488-16.336-36.488-36.486V186.779l159.727 170.375H748.059z" fill="#278CE9" ></path></symbol><symbol id="icon-top1" viewBox="0 0 1024 1024"><path d="M473.71103274 762.17254818l0-423.48957975L512.92303096 338.68296843 512.92303097 762.17254818l-39.21199823 0z" fill="" ></path><path d="M434.49903451 359.07320747L492.5327919 260.25897198l59.6022373 98.81423549-117.63599469 0z" fill="" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.305143 861.622857c0 34.377143-28.013714 62.390857-62.390857 62.390857H287.305143a62.464 62.464 0 0 1-62.464-62.390857V199.168h574.464v662.454857zM349.696 87.186286c0-7.168 5.558857-12.8 12.8-12.8h299.958857c7.241143 0 12.8 5.632 12.8 12.8v37.595428H349.696v-37.595428z m636.781714 37.595428h-236.836571v-37.595428C749.641143 39.204571 710.509714 0 662.454857 0H362.496a87.405714 87.405714 0 0 0-87.186286 87.186286v37.595428H37.668571a37.522286 37.522286 0 1 0 0 75.190857h111.981715v661.650286c0 75.995429 61.659429 137.581714 137.654857 137.581714h449.536a137.581714 137.581714 0 0 0 137.654857-137.581714V199.168h111.981714c20.772571 0 37.595429-16.822857 37.595429-37.595429a36.864 36.864 0 0 0-37.595429-36.790857zM512.073143 811.227429c20.772571 0 37.595429-16.822857 37.595428-37.595429v-400.091429a37.522286 37.522286 0 1 0-75.190857 0v400.091429c0 20.772571 16.822857 37.595429 37.595429 37.595429z m-175.177143 0c20.772571 0 37.595429-16.822857 37.595429-37.595429v-400.091429a37.522286 37.522286 0 1 0-75.190858 0v400.091429c0.731429 20.772571 17.554286 37.595429 37.595429 37.595429z m350.354286 0c20.845714 0 37.668571-16.822857 37.668571-37.595429v-400.091429a37.595429 37.595429 0 1 0-75.264 0v400.091429c0 20.772571 16.822857 37.595429 37.595429 37.595429z" ></path></symbol><symbol id="icon-iconfontcha" viewBox="0 0 1024 1024"><path d="M534.39365234 511.81964844l285.48307618-285.48307617c6.17783203-6.17862305 6.17783203-16.19525391 0-22.37308594-6.17862305-6.17862305-16.19604492-6.17862305-22.37387696 0L512.02056641 489.44577148 226.5612207 203.98800781c-6.17862305-6.17862305-16.19525391-6.17862305-22.37308593 0s-6.17862305 16.19525391 0 22.37308594l285.45776367 285.45776367L204.21186523 797.25447266c-6.17862305 6.17862305-6.17862305 16.19604492 0 22.37387695 3.08891602 3.08891602 7.13733398 4.63297851 11.18654297 4.63297853s8.09762695-1.5440625 11.18654297-4.63297853l285.43561524-285.43561523 285.46013672 285.46013671c3.08891602 3.08891602 7.138125 4.63297851 11.18733398 4.63297852s8.09762695-1.5440625 11.18733398-4.63297852c6.17783203-6.17862305 6.17783203-16.19604492 0-22.37387695L534.39365234 511.81964844z" ></path></symbol></svg>',t=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var t=function(){document.removeEventListener("DOMContentLoaded",t,!1),c()};document.addEventListener("DOMContentLoaded",t,!1)}else document.attachEvent&&(h=c,o=a.document,e=!1,(i=function(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(i,50)}l()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,l())});function l(){e||(e=!0,h())}var h,o,e,i}(function(){var c,t,l,h,o,e;(c=document.createElement("div")).innerHTML=i,i=null,(t=c.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",l=t,(h=document.body).firstChild?(o=l,(e=h.firstChild).parentNode.insertBefore(o,e)):h.appendChild(l))})}(window);
15,445
15,445
0.768339
ac716c8897451e1d768de4fd80d679b86ce7422b
3,166
js
JavaScript
plugins/jobs/update.js
ysaakpr/screwdriver
fca6486cabfc73254261f830f6fb9c7d648e0394
[ "BSD-3-Clause" ]
null
null
null
plugins/jobs/update.js
ysaakpr/screwdriver
fca6486cabfc73254261f830f6fb9c7d648e0394
[ "BSD-3-Clause" ]
null
null
null
plugins/jobs/update.js
ysaakpr/screwdriver
fca6486cabfc73254261f830f6fb9c7d648e0394
[ "BSD-3-Clause" ]
null
null
null
'use strict'; const boom = require('@hapi/boom'); const joi = require('joi'); const schema = require('screwdriver-data-schema'); const idSchema = schema.models.job.base.extract('id'); module.exports = () => ({ method: 'PUT', path: '/jobs/{id}', options: { description: 'Update a job', notes: 'Update a specific job', tags: ['api', 'jobs'], auth: { strategies: ['token'], scope: ['user', '!guest', 'pipeline'] }, plugins: { 'hapi-swagger': { security: [{ token: [] }] } }, handler: async (request, h) => { const { jobFactory, pipelineFactory, userFactory } = request.server.app; const { id } = request.params; const { username } = request.auth.credentials; const { scmContext } = request.auth.credentials; const { isValidToken } = request.server.plugins.pipelines; return jobFactory .get(id) .then(job => { if (!job) { throw boom.notFound(`Job ${id} does not exist`); } return Promise.all([ pipelineFactory.get(job.pipelineId), userFactory.get({ username, scmContext }) ]).then(([pipeline, user]) => { if (!pipeline) { throw boom.notFound('Pipeline does not exist'); } // In pipeline scope, check if the token is allowed to the pipeline if (!isValidToken(pipeline.id, request.auth.credentials)) { throw boom.unauthorized('Token does not have permission to this pipeline'); } // ask the user for permissions on this repo return ( user .getPermissions(pipeline.scmUri) // check if user has push access .then(permissions => { if (!permissions.push) { throw boom.forbidden( `User ${username} does not have write permission for this repo` ); } Object.keys(request.payload).forEach(key => { job[key] = request.payload[key]; }); return job.update(); }) ); }); }) .then(job => h.response(job.toJson()).code(200)) .catch(err => { throw err; }); }, validate: { params: joi.object({ id: idSchema }), payload: schema.models.job.update } } });
37.247059
107
0.396715
ac71ee6c85cba07fec421b70dd9fe67b59bf22ab
36,019
js
JavaScript
dist/main.4c055b3c87de25641f2a.bundle.js
fn-code/simfus
ea9662eecbe358c184bd21a0c6afeb4d97f82140
[ "MIT" ]
2
2017-10-10T12:47:32.000Z
2019-01-31T09:08:12.000Z
dist/main.4c055b3c87de25641f2a.bundle.js
fn-code/simfus
ea9662eecbe358c184bd21a0c6afeb4d97f82140
[ "MIT" ]
null
null
null
dist/main.4c055b3c87de25641f2a.bundle.js
fn-code/simfus
ea9662eecbe358c184bd21a0c6afeb4d97f82140
[ "MIT" ]
null
null
null
webpackJsonp([2,5],{"/sTN":function(t,n,e){"use strict";var o=e("3j3K"),a=e("rRjW"),i=e("fYnu");e.d(n,"b",function(){return l}),e.d(n,"a",function(){return d});var r=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},s=this&&this.__metadata||function(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},l=function(){function t(t,n){this.fs=t,this.dialog=n}return t.prototype.ngOnInit=function(){var t=this;this.fs.getDataInfus(2).subscribe(function(n){t.infus=n}),this.fs.getDataPemberitahuan(1).subscribe(function(n){t.pemberitahuan=n;var e=0;n.forEach(function(t){e++}),t.cntPemberitahuan=e})},t.prototype.detail=function(t){this.dialog.open(d).componentInstance.idinfus=t},t.prototype.tindaki=function(t){this.fs.statusPemberitahuan(t)},t}();l=r([e.i(o.Component)({selector:"app-monitoring",template:e("GLUH"),styles:[e("S2fb")]}),s("design:paramtypes",["function"==typeof(p=void 0!==a.a&&a.a)&&p||Object,"function"==typeof(c=void 0!==i.b&&i.b)&&c||Object])],l);var d=function(){function t(t){this.fs=t}return t.prototype.ngOnInit=function(){var t=this;this.fs.getDetailInfus(this.idinfus).subscribe(function(n){t.InfusData=n})},t.prototype.off=function(t,n,e){this.fs.statusAlat(t),this.fs.statusInfus(n)},t}();d=r([e.i(o.Component)({selector:"demo-content-element-dialog-detail-pasien",styles:[".mat-card {\n padding: 0;\n margin: 16px;\n width:100%;\n}\n\n.mat-toolbar {\n margin: 0;\n}\n\n.mat-card-content {\n padding: 24px;\n}\n\n.card-scroll {\n position: relative;\n overflow-x: auto;\n}\n\n.card-scroll::-webkit-scrollbar {\n height: 8px;\n background-color: #EAEAEA;\n}\n\n.card-scroll::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background-color: #82e290;\n}\n\n.card-scroll::-webkit-scrollbar-thumb:hover {\n border-radius: 10px;\n background-color: #4cd964;\n}\n\n.card-scroll::-webkit-scrollbar-track {\n border-radius: 10px;\n background-color: #EAEAEA;\n}\n\n.table-width {\n width: 100%;\n}\n\n.demo-toolbar-icon {\n padding: 0 14px;\n}\n\n.demo-fill-remaining {\n flex: 1 1 auto;\n}\n\n.content-left p {\n font-size: 16px;\n color: #666;\n}\n\n.content-left>.title {\n font-size: 24px;\n letter-spacing: 0.09em;\n}\n }"],template:'\n <div md-dialog-title style="width:100%;">\n <h3 style="width:100%;color:#666;"><md-icon class="md-24" style="top:4px; position:relative;">receipt</md-icon> {{InfusData.NamaPasien}}</h3>\n <button md-raised-button md-dialog-close (click)=\'off(InfusData.IDAlat, InfusData.IDInfus)\' style="background-color: #EF5350;color:#fff; border-radius:20px;box-shadow:0px 2px 5px 1px #EAEAEA;position:absolute;right:0;margin-right:20px;top:0;margin-top:20px;">\n <span>Non Aktifkan</span>\n </button>\n </div>\n\n <md-dialog-content style="width:900px;padding-right:50px;">\n <div class="chips-demo">\n <md-card style="box-shadow:0px 0px 0px 0px #FFF;" >\n\n <md-card-content style="width:100%;">\n <div class="card-scroll">\n <div class="content-left">\n <div style="padding-bottom:2px;">\n <button md-icon-button style="font-size: 24px;letter-spacing: 0.09em; color:#666;color:#666;position:relative;top:-10px;" class="title">\n <md-icon class="md-24">perm_identity</md-icon>\n <span>{{InfusData.NamaPasien}}</span>\n </button>\n <p style="margin-left:26px;position:relative;top:-2px;">\n <span style="background:#5C6BC0; border-radius:20px;padding-top:2px;padding-bottom:6px;padding-left:12px;padding-right:12px;">\n <span class=\'mdl-chip__text \' style="color:#fff;font-weight:bold;"> NO CM : {{InfusData.IDCm}}</span>\n </span>\n </p>\n <div style="position:absolute;right:0px;top:0;">\n <p style="font-size: 24px;letter-spacing: 0.09em; color:#666;" class="title">{{InfusData.TetesanAlat}} Tetesan/Menit</p>\n <p style="position:absolute;right:0;">\n <span *ngIf="InfusData.TetesanAlat == 0" style="background:#ffcc00; border-radius:20px;\n padding-top:2px;padding-bottom:6px;padding-left:12px;padding-right:12px;">\n <span class=\'mdl-chip__text \' style="color:#666;font-weight:bold;">Mengambil Data</span>\n </span>\n <span *ngIf="InfusData.TetesanAlat != 0 && InfusData.TetesanAlat != InfusData.Tetesan" style="background:#EF5350; border-radius:20px;\n padding-top:2px;padding-bottom:6px;padding-left:12px;padding-right:12px;">\n <span class=\'mdl-chip__text \' style="color:#FFF;font-weight:bold;">Infus Bermasalah</span>\n </span>\n <span *ngIf="InfusData.Tetesan == InfusData.TetesanAlat" style="background:#82e290; border-radius:20px;\n padding-top:2px;padding-bottom:6px;padding-left:12px;padding-right:12px;">\n <span class=\'mdl-chip__text\' style="color:#666;font-weight:bold;">Tetesan Sesuai</span>\n </span>\n <span style="background:#82e290; border-radius:20px; margin-left:8px;\n padding-top:2px;padding-bottom:6px;padding-left:12px;padding-right:12px;">\n <span class=\'mdl-chip__text \' style="color:#666;font-weight:bold;">AKTIF</span>\n </span>\n </p>\n </div>\n </div>\n <hr>\n <p style="margin-left:26px;"> Alat : {{InfusData.Alat}}</p>\n <p style="margin-left:26px;"> Gedung : {{InfusData.Gedung}}</p>\n <p style="margin-left:26px;"> Ruangan : {{InfusData.Ruangan}}</p>\n <hr>\n <p style="margin-left:26px;"> Jenis Obat Tambahan : {{InfusData.Jenis}} </p>\n <p style="margin-left:26px;"> Tetesan Yang Di Tetntukan : {{InfusData.Tetesan}}</p>\n <p style="margin-left:26px;"> Penyakit : {{InfusData.Penyakit}}</p>\n <p style="margin-left:26px;"> Waktu Mulai : {{InfusData.Waktu}}</p>\n </div>\n </div>\n </md-card-content>\n </md-card>\n</div>\n </md-dialog-content>\n\n <md-dialog-actions align="end">\n <button\n md-raised-button\n color="warn"\n md-dialog-close>Keluar</button>\n\n </md-dialog-actions>\n '}),s("design:paramtypes",["function"==typeof(u=void 0!==a.a&&a.a)&&u||Object])],d);var p,c,u},0:function(t,n,e){t.exports=e("x35b")},"4I9T":function(t,n,e){n=t.exports=e("FZ+f")(!1),n.push([t.i,"#content-full{background:#f6f6f6;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:auto;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100vh}.full-width{width:100%}.conten-card{padding:20px;width:400px;margin:0 auto}.demo-card-wide{border-radius:10px;box-shadow:0 10px 30px 0 #d8d8d8}.left{right:0}#content-full::-webkit-scrollbar{width:8px;background-color:#eaeaea}#content-full::-webkit-scrollbar-thumb{border-radius:10px;background-color:#82e290}#content-full::-webkit-scrollbar-thumb:hover{border-radius:10px;background-color:#4cd964}#content-full::-webkit-scrollbar-track{border-radius:10px;background-color:#eaeaea}",""]),t.exports=t.exports.toString()},"5xMp":function(t,n){t.exports="<router-outlet></router-outlet>\n"},Ftuy:function(t,n,e){n=t.exports=e("FZ+f")(!1),n.push([t.i,"",""]),t.exports=t.exports.toString()},GLUH:function(t,n){t.exports='<div class="content-cover">\n <div class="toolbar">\n <md-toolbar style="z-index:20;">\n <button md-icon-button class="toolbar-text">\n <md-icon class="md-24">local_hospital</md-icon>\n </button>\n <span class="toolbar-text"> Rumah Sakit Aloei Saboe </span>\n </md-toolbar>\n </div>\n <md-tab-group md-tab-header class="demo-tab-group">\n <md-tab style="background:#fff;">\n\n <ng-template md-tab-label>Alat Aktif</ng-template>\n <div style="width:100%;display:flex;position:relative;flex-direction:row; align-items: center;\n justify-content: center;list-style: none;flex-flow:row wrap; padding:20px;" align="center">\n <div *ngFor="let di of infus">\n <div class="alat" style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:#FFF;position:relative;display:flex;flex-direction:column;width:230px;">\n <span style="padding-top:20px;letter-spacing: 1px; font-size:18px;font-weight:bold;color:#666; margin:0 auto; ">{{di.Gedung}} - {{di.Ruangan}}</span>\n <hr>\n <div style="display:flex;flex-direction:column;padding-bottom:16px;">\n <span style=" letter-spacing: 1px;color:#666;font-size:15px; ">{{di.NamaPasien}}</span>\n <span style="letter-spacing: 1px;color:#666;font-size:15px; ">Alat : {{di.Alat}}</span>\n <span style="letter-spacing: 1px;color:#666;font-size:15px; ">Tetesan : {{di.Tetesan}}</span>\n </div>\n <button (click)="detail(di.IDInfus)" style="background-color: #5C6BC0;color:#FFFFFF; box-shadow:0px 0px 0px 0px #FFF; height:50px;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary ">\n Detail\n </button>\n </div>\n\n </div>\n\n </div>\n </md-tab>\n <md-tab>\n <ng-template md-tab-label>Infus Bermasalah & Darurat Pasien <span style="padding-left:4px;padding-right:4px;background:#F03; color:#fff;border-radius:6px;font-weight:bold;">{{cntPemberitahuan}}</span></ng-template>\n <div style="width:100%;display:flex;position:relative;flex-direction:row; align-items: center;\n justify-content: center;list-style: none;flex-flow:row wrap; padding:20px;" align="center">\n <div *ngFor="let dp of pemberitahuan">\n <div class="alat" style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:#FFF;position:relative;display:flex;flex-direction:column;width:230px;">\n <span style="padding-top:20px;letter-spacing: 1px; font-size:18px;font-weight:bold;color:#666; margin:0 auto; ">{{dp.Gedung}} - {{dp.Ruangan}}</span>\n <hr>\n <div style="display:flex;flex-direction:column;padding-bottom:16px;">\n <span style=" letter-spacing: 1px;color:#666;font-size:15px; ">{{dp.NamaPasien}}</span>\n <span style="letter-spacing: 1px;color:#666;font-size:15px; ">Alat : {{dp.Alat}}</span>\n <span *ngIf="dp.Jenis == 2">\n <span style="letter-spacing: 1px;color:#666;font-size:15px;">Infus Bermasalah</span>\n </span>\n\n <span *ngIf="dp.Jenis == 3">\n <span style="letter-spacing: 1px;color:#666;font-size:15px;">Darurat Pasien</span>\n </span>\n </div>\n <button (click)="tindaki(dp.$key)" style="background-color: #EF5350;color:#FFF; box-shadow:0px 0px 0px 0px #FFF; height:50px;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary ">\n Tindak Lanjuti\n </button>\n </div>\n </div>\n </div>\n </md-tab>\n </md-tab-group>\n\n</div>\n\n<div *ngIf="cntPemberitahuan > 0" style="z-index:100 " hidden>\n <audio controls autoplay loop>\n <source src="../../assets/audio/audio3.mp3" type="audio/mpeg">\n </audio>\n</div>\n\n<div class="notif-cover">\n <div *ngFor="let dp of pemberitahuan" class="notif" style="">\n <div class="notif-img"><img src="./../../assets/img/administrator.png" alt="Notif Icon" height="50" width="50"></div>\n <div class="notif-ket">\n <span style="letter-spacing: 1px;font-weight:bold; width:auto;display:table;">{{dp.NamaPasien}}</span>\n \x3c!-- <span>Infus Bermasalah</span> --\x3e\n <div style="display:flex;flex-direction:row;">\n <span style="background:#5C6BC0; font-size:8px; padding-left:10px;padding-right:10px; border-radius:20px;width:auto;display:table;"><span class=\'mdl-chip__text \' style="font-size:12px;color:#fff;font-weight:bold;">{{dp.Gedung}}</span>\n </span>\n <span style="background:#82e290; font-size:8px; padding-left:10px;padding-right:10px; border-radius:20px;width:auto;display:table;"><span class=\'mdl-chip__text \' style="font-size:12px;color:#333;font-weight:bold;">{{dp.Ruangan}}</span>\n </span>\n </div>\n <span *ngIf="dp.Jenis==2" style="background:rgb(255, 211, 68); font-size:8px; padding-left:10px;padding-right:10px; border-radius:20px;width:auto;display:table;"><span class=\'mdl-chip__text \' style="font-size:12px;color:#666;font-weight:bold;">Infus Bermasalah</span>\n </span>\n <span *ngIf="dp.Jenis==3" style="background:rgb(255, 211, 68); font-size:8px; padding-left:10px;padding-right:10px; border-radius:20px;width:auto;display:table;"><span class=\'mdl-chip__text \' style="font-size:12px;color:#666;font-weight:bold;">Darurat Pasien</span>\n </span>\n </div>\n <div class="notif-waktu" align="center" (click)="tindaki(dp.$key)">\n <md-icon class="md-24">keyboard_arrow_right</md-icon>\n </div>\n </div>\n</div>'},Iksp:function(t,n,e){"use strict";var o=e("Qbdm"),a=e("3j3K"),i=e("NVOs"),r=e("Fzro"),s=e("Kzh3"),l=e("fYnu"),d=e("KN8t"),p=e("rxKx"),c=(e.n(p),e("iKb+")),u=e("4SaG"),f=e("JGyx"),b=e("rRjW"),g=e("t+nU"),x=e("YWx4"),h=e("zhGp"),m=e("r/11"),y=e("rULD"),v=e("/sTN");e.d(n,"a",function(){return k});var w=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},k=function(){function t(){}return t}();k=w([e.i(a.NgModule)({declarations:[x.a,h.a,m.a,y.a,v.a,v.b],imports:[o.BrowserModule,i.a,r.a,l.a,s.a,d.a,c.a.initializeApp(g.a.firebase),u.a,f.a],entryComponents:[v.a],providers:[b.a],bootstrap:[x.a]})],k)},Kzh3:function(t,n,e){"use strict";var o=e("3j3K"),a=e("5oXY"),i=e("ZPwd"),r=e("zhGp"),s=e("r/11"),l=e("rULD"),d=e("/sTN");e.d(n,"a",function(){return u});var p=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},c=[{path:"login",component:r.a},{path:"selamat-datang",component:s.a},{path:"info-grafis",component:l.a},{path:"monitoring-infus",component:d.b},{path:"page",loadChildren:"app/page/page.module#PageModule",data:{preload:!0}}],u=(a.a.forRoot(c),function(){function t(){}return t}());u=p([e.i(o.NgModule)({imports:[a.a.forRoot(c,{preloadingStrategy:i.a})],exports:[a.a],providers:[i.a]})],u)},MOVZ:function(t,n,e){function o(t){var n=a[t];return n?e.e(n[1]).then(function(){return e(n[0])}):Promise.reject(new Error("Cannot find module '"+t+"'."))}var a={"app/page/page.module":["G+F7",0]};o.keys=function(){return Object.keys(a)},t.exports=o,o.id="MOVZ"},S2fb:function(t,n,e){n=t.exports=e("FZ+f")(!1),n.push([t.i,".content-cover,body{background:#f5f5f5}.content-cover{width:100%;display:table;height:100vh;z-index:10}.toolbar-card{padding:0;margin:0;z-index:5;position:relative}.demo-toolbar-icon{padding:0 14px}.demo-fill-remaining{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}md-toolbar{position:relative;color:#666;font-size:16px;max-height:5px;top:-8px;background:#fff;border-bottom:1px solid #eaeaea}.toolbar-text{position:relative;top:4px}.notif-cover{position:absolute;bottom:0;margin-right:20px;margin-bottom:20px;right:0;z-index:20}.notif{margin:5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;background:linear-gradient(-100deg,#ff4e74,#ff6131,#f53535,#fc2074);background-size:400% 400%;-webkit-animation:Gradient 15s ease-in-out infinite .5ms;animation:Gradient 15s ease-in-out infinite .5ms;width:380px;box-shadow:0 0 10px 1px #d1cfcf}.notif-img{padding:14px;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0}.notif-ket{color:#fff;-webkit-box-flex:1;-ms-flex:1 0;flex:1 0;position:relative;padding:14px;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center}.notif-ket,.notif-waktu{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;justify-content:center}.notif-waktu{-webkit-box-flex:0;-ms-flex:0 1;flex:0 1;background:#fff;padding-top:14px;padding-bottom:14px;padding-left:14px;padding-right:14px;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center}.notif-waktu:hover{background:#eaeaea}@-webkit-keyframes Gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}@keyframes Gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}md-tab-group{top:-8px;position:relative}md-tab-group md-tab-header{background:#fff}",""]),t.exports=t.exports.toString()},YWx4:function(t,n,e){"use strict";var o=e("3j3K"),a=e("5oXY"),i=e("JGyx");e.d(n,"a",function(){return l});var r=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},s=this&&this.__metadata||function(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},l=function(){function t(t,n){var e=this;this.router=t,this.afAuth=n,this.afAuth.authState.subscribe(function(t){null==t?e.router.navigate(["selamat-datang"]):e.router.navigate(["page/home"])})}return t}();l=r([e.i(o.Component)({selector:"app-root",template:e("5xMp"),styles:[e("okgc")]}),s("design:paramtypes",["function"==typeof(d=void 0!==a.c&&a.c)&&d||Object,"function"==typeof(p=void 0!==i.b&&i.b)&&p||Object])],l);var d,p},ZPwd:function(t,n,e){"use strict";var o=e("1APj"),a=(e.n(o),e("3j3K")),i=e("rCTf");e.n(i);e.d(n,"a",function(){return s});var r=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},s=function(){function t(){this.preloadedModules=[]}return t.prototype.preload=function(t,n){return t.data&&t.data.preload?(this.preloadedModules.push(t.path),n()):i.Observable.of(null)},t}();s=r([e.i(a.Injectable)()],s)},erZa:function(t,n,e){n=t.exports=e("FZ+f")(!1),n.push([t.i,"#content-full{height:100vh;background:#f6f6f6;overflow:auto;padding-top:0}.left{right:0}.full-width{width:100%}.conten-card{position:relative;width:100%;height:75vh}.demo-card-wide{border-radius:6px}.masuk{border:2px solid #4cd964;color:#4cd964;border-radius:80px;box-shadow:0 2px 6px 1px #eaeaea;font-size:14px;font-weight:700;background:none}.masuk:hover{background:#4cd964;color:#fff}#content-full::-webkit-scrollbar{width:8px;background-color:#eaeaea}#content-full::-webkit-scrollbar-thumb{border-radius:10px;background-color:#82e290}#content-full::-webkit-scrollbar-thumb:hover{border-radius:10px;background-color:#4cd964}#content-full::-webkit-scrollbar-track{border-radius:10px;background-color:#eaeaea}.title{letter-spacing:.2em}",""]),t.exports=t.exports.toString()},hcWD:function(t,n){t.exports='<div id="content-full">\n <div class="full-width">\n <div class="conten-card">\n <div class="">\n\n <div class="mdl-card__title title" style="width:100%;">\n <h2 style="color:rgb(117, 115, 115); margin:0px auto; top:6px; position:relative; font-size:200%;text-align:center;" class="mdl-card__title-text ">Selamat datang di aplikasi SIMFUS</h2>\n </div>\n <div style="width:100%;color:rgb(117, 115, 115);latter-spacing:0.1em" align="center">\n <p>Aplikasi moitoring dan pengolahan data infus pasien, yang berada di rumah sakit aloei saboe gorontalo.</p>\n </div>\n <hr>\n <div style="width:100%;position:relative;display:table;">\n <div style="display:table;position:relative;margin:0 auto; background:none;">\n <img src="assets/img/patient.jpg " style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:none;position:relative;display:inline-block;" height="180 " width="300">\n <img src="assets/img/welcome.png " style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:none;position:relative;display:inline-block;" height="180 " width="300">\n <img src="assets/img/sg_resume_dribbble.png " style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:none;position:relative;display:inline-block;" height="180 " width="300">\n </div>\n\n <div style="display:table;position:relative;margin:0 auto; background:none;">\n\n <img src="assets/img/watcher_dribbble-01.png" style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:none;position:relative;display:inline-block;" height="180 " width="300">\n <img src="assets/img/dribbble_export_1.gif " style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:none;position:relative;display:inline-block;" height="180 " width="300">\n <img src="assets/img/riberasalud_characters.png" style="box-shadow: 0px 4px 10px 0px rgb(216, 216, 216);margin:6px; background:none;position:relative;display:inline-block;" height="180 " width="300">\n\n </div>\n\n </div>\n </div>\n\n </div>\n <div style="padding:35px;margin-top:30px;">\n <table class="full-width " cellspacing="0 " cellpadding="12 ">\n <tr>\n <td colspan="2 " align="center">\n <button [routerLink]="[\'\',\'info-grafis\']" style="background-color: #5C6BC0;color:#FFFFFF; border-radius:20px;box-shadow:0px 4px 8px 2px #EAEAEA;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary ">\n Lebih Lanjut\n </button>\n <button [routerLink]="[\'\',\'login\']" style="background-color: #4cd964;color:#FFF; border-radius:20px;box-shadow:0px 4px 8px 2px #EAEAEA;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">\n Masuk\n </button>\n </td>\n </tr>\n </table>\n\n </div>\n </div>\n</div>'},kZql:function(t,n,e){"use strict";e.d(n,"a",function(){return o});var o={production:!0}},khTa:function(t,n){t.exports='<div align="center" style="width:100%;padding-left:20px;padding-right:20px;padding-top:50px;padding-bottom:50px;background:#f6f6f6;">\n <table class="full-width " cellspacing="0 " cellpadding="12" style="position:relative;top:-20px;width:100%;">\n <tr>\n <td colspan="2 " align="left">\n <button [routerLink]="[\'\',\'selamat-datang\']" style="background-color: #f6f6f6;color:#5C6BC0; border-radius:20px;box-shadow:0px 4px 8px 2px #EAEAEA;border: 1px solid #5C6BC0;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary ">\n Kembali\n </button></td>\n <td colspan="2 " align="right">\n\n <button [routerLink]="[\'\',\'login\']" style="background-color: #f6f6f6;color:#4cd964; border-radius:20px;box-shadow:0px 4px 8px 2px #EAEAEA; border: 1px solid #4cd964;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">\n Masuk\n </button>\n </td>\n </tr>\n </table>\n <img src="./../../assets/img/infografis no background.png" width="600">\n</div>'},okgc:function(t,n,e){n=t.exports=e("FZ+f")(!1),n.push([t.i,"",""]),t.exports=t.exports.toString()},qGi7:function(t,n){t.exports='<div id="content-full">\n <div class="full-width">\n <div class="conten-card">\n <div class="demo-card-wide mdl-card ">\n\n <div class="mdl-card__title" style="width:100%;">\n <h2 style="color:#666; margin:0px auto; top:6px; position:relative; font-size:24px;text-align:center;" class="mdl-card__title-text ">Login</h2>\n </div>\n <hr>\n <img md-card-image src="assets/img/chars.png" style="width:80%;display:table;position:relative;margin:0 auto;" height="200 " alt="Photo of a Shiba Inu ">\n <hr>\n <div class="mdl-cell mdl-cell--12-col ">\n <form (submit)="loginWithEmail($event, email.value, password.value) ">\n <table class="full-width " cellspacing="0 " cellpadding="12 ">\n <tr>\n <td colspan="2 ">\n <md-input-container class="full-width ">\n <input mdInput placeholder="Email " #email>\n </md-input-container>\n </td>\n </tr>\n <tr>\n <td colspan="2 ">\n <md-input-container class="full-width ">\n <input mdInput placeholder="Password " #password type="password">\n </md-input-container>\n </td>\n </tr>\n <tr>\n <td colspan="2 " align="center">\n <button [routerLink]="[\'\',\'selamat-datang\']" style="background-color: #5C6BC0;color:#FFFFFF; border-radius:20px;box-shadow:0px 4px 8px 2px #EAEAEA;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary ">\n Kembali\n </button>\n <button type="submit" style="background-color: #4cd964;color:#FFF; border-radius:20px;box-shadow:0px 4px 8px 2px #EAEAEA;" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">\n Masuk\n </button>\n </td>\n </tr>\n </table>\n </form>\n\n </div>\n </div>\n </div>\n </div>\n</div>'},"r/11":function(t,n,e){"use strict";var o=e("3j3K");e.d(n,"a",function(){return r});var a=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},i=this&&this.__metadata||function(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},r=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();r=a([e.i(o.Component)({selector:"app-index-page",template:e("hcWD"),styles:[e("erZa")]}),i("design:paramtypes",[])],r)},rRjW:function(t,n,e){"use strict";var o=e("3j3K"),a=e("4SaG"),i=e("JGyx"),r=e("uCY4"),s=(e.n(r),e("Gvdl")),l=(e.n(s),e("1APj")),d=(e.n(l),e("EnA3")),p=(e.n(d),e("94IA"));e.n(p);e.d(n,"a",function(){return f});var c=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},u=this&&this.__metadata||function(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},f=function(){function t(t,n){this.db=t,this.auth=n}return t.prototype.logout=function(){this.auth.auth.signOut()},t.prototype.getAlat=function(t){return this.db.list("/alat",{query:{orderByChild:"IDRuangan",equalTo:t}})},t.prototype.getAllAlat=function(t){return this.db.list("/alat",{query:{orderByChild:"IDGedung",equalTo:t}})},t.prototype.getDataInfus=function(t){return this.db.list("/infus",{query:{orderByChild:"Status",equalTo:t}})},t.prototype.getDataPemberitahuan=function(t){return this.db.list("/pemberitahuan",{query:{orderByChild:"Status",equalTo:t}})},t.prototype.getAllDataAlat=function(){return this.db.list("/alat")},t.prototype.getAllUsers=function(){return this.db.list("/users")},t.prototype.getAllPasien=function(t){return this.db.list("/infus",{query:{orderByChild:"IDGedung",equalTo:t}})},t.prototype.getAllInfus=function(){return this.db.list("/infus",{query:{orderByChild:"Status",equalTo:1}})},t.prototype.getInfusPasien=function(t){return this.db.list("/infus",{query:{orderByChild:"IDCm",equalTo:t}})},t.prototype.getOnPemberitahuan=function(){return this.db.list("/pemberitahuan",{query:{orderByChild:"Status",equalTo:1}})},t.prototype.getAllPemberitahuan=function(){return this.db.list("/pemberitahuan",{query:{orderByChild:"Status",equalTo:2}})},t.prototype.getPemberitahuan=function(){return this.db.list("/pemberitahuan",{query:{orderByChild:"Status",equalTo:1,limitToLast:1}})},t.prototype.getUserID=function(t){return this.db.object("users/"+t)},t.prototype.getDetailInfus=function(t){return this.db.object("infus/"+t)},t.prototype.getAlatID=function(t){return this.db.object("alat/"+t)},t.prototype.aktifAlat=function(t){this.db.list("alat").update(t,{Status:2})},t.prototype.updateUsers=function(t,n,e){this.db.list("users").update(t,{Nama:n,Level:e})},t.prototype.updateAlat=function(t,n,e,o,a){this.db.list("alat").update(t,{Alat:n,IDRuangan:e,Ruangan:o,Ket:a})},t.prototype.deleteAlat=function(t){this.db.list("alat").remove(t)},t.prototype.deleteUser=function(t){this.db.list("users").remove(t)},t.prototype.statusAlat=function(t){this.db.list("alat").update(t,{Status:1})},t.prototype.statusInfus=function(t){this.db.list("infus").update(t,{Status:1})},t.prototype.statusPemberitahuan=function(t){this.db.list("pemberitahuan").update(t,{Status:2})},t.prototype.loginWithEmail=function(t,n){return this.auth.auth.signInWithEmailAndPassword(t,n)},t.prototype.registerUser=function(t,n,e,o){var a=this;this.auth.auth.createUserWithEmailAndPassword(n,e).then(function(i){a.saveUser(i.uid,t,n,e,o)})},t.prototype.saveUser=function(t,n,e,o,a){return this.db.database.ref("users/"+t).set({idUser:t,Nama:n,Username:e,Password:o,Level:a})},t.prototype.registerAlat=function(t,n,e,o,a,i,r){return this.db.database.ref("/alat").push({Alat:t,IDGedung:n,IDRuangan:o,Gedung:e,Ruangan:a,Status:i,Ket:r})},t.prototype.saveDataAlat=function(t,n,e,o,a,i,r,s){return this.db.database.ref("alat/"+t).set({IDAlat:t,Alat:n,IDGedung:e,Gedung:o,IDRuangan:a,Ruangan:i,Status:r,Ket:s})},t}();f=c([e.i(o.Injectable)(),u("design:paramtypes",["function"==typeof(b=void 0!==a.b&&a.b)&&b||Object,"function"==typeof(g=void 0!==i.b&&i.b)&&g||Object])],f);var b,g},rULD:function(t,n,e){"use strict";var o=e("3j3K");e.d(n,"a",function(){return r});var a=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},i=this&&this.__metadata||function(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},r=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();r=a([e.i(o.Component)({selector:"app-info-grafis",template:e("khTa"),styles:[e("Ftuy")]}),i("design:paramtypes",[])],r)},"t+nU":function(t,n,e){"use strict";e.d(n,"a",function(){return o});var o={production:!1,firebase:{apiKey:"AIzaSyCJnzs4O75wPW84hLY60emfEsNZNQpwSo4",authDomain:"simfus-99f7c.firebaseapp.com",databaseURL:"https://simfus-99f7c.firebaseio.com",projectId:"simfus-99f7c",storageBucket:"",messagingSenderId:"92041910717"}}},x35b:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("3j3K"),a=e("O61y"),i=e("Iksp");e("kZql").a.production&&e.i(o.enableProdMode)(),e.i(a.a)().bootstrapModule(i.a)},zhGp:function(t,n,e){"use strict";var o=e("3j3K"),a=e("5oXY"),i=e("rRjW");e.d(n,"a",function(){return l});var r=this&&this.__decorate||function(t,n,e,o){var a,i=arguments.length,r=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,e,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(n,e,r):a(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},s=this&&this.__metadata||function(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},l=function(){function t(t,n){this.firebaseService=t,this.router=n}return t.prototype.ngOnInit=function(){},t.prototype.loginWithEmail=function(t,n,e){var o=this;t.preventDefault(),this.firebaseService.loginWithEmail(n,e).then(function(){o.router.navigate(["page","home"])}).catch(function(t){t&&(o.error=t,console.log(o.error))})},t}();l=r([e.i(o.Component)({selector:"app-login",template:e("qGi7"),styles:[e("4I9T")]}),s("design:paramtypes",["function"==typeof(d=void 0!==i.a&&i.a)&&d||Object,"function"==typeof(p=void 0!==a.c&&a.c)&&p||Object])],l);var d,p}},[0]);
36,019
36,019
0.624309
ac7231194d084955c2dc22c5b1f295b99bb45bb6
60
js
JavaScript
packages/visualizations/app/models/table.js
EddieVilla/navi
a236f1798cc0c0f6750443995ad01bf901100b19
[ "MIT" ]
1
2018-08-16T15:41:26.000Z
2018-08-16T15:41:26.000Z
packages/visualizations/app/models/table.js
EddieVilla/navi
a236f1798cc0c0f6750443995ad01bf901100b19
[ "MIT" ]
null
null
null
packages/visualizations/app/models/table.js
EddieVilla/navi
a236f1798cc0c0f6750443995ad01bf901100b19
[ "MIT" ]
null
null
null
export { default } from 'navi-visualizations/models/table';
30
59
0.766667
ac7264f15e576a8170a90924475edb5c1fac66ce
421
js
JavaScript
oauth/url.js
ArnaudBuchholz/training-oauth-imgur
5b46ebd6778ce0b822e81949c291ba8311b6d898
[ "MIT" ]
null
null
null
oauth/url.js
ArnaudBuchholz/training-oauth-imgur
5b46ebd6778ce0b822e81949c291ba8311b6d898
[ "MIT" ]
null
null
null
oauth/url.js
ArnaudBuchholz/training-oauth-imgur
5b46ebd6778ce0b822e81949c291ba8311b6d898
[ "MIT" ]
null
null
null
'use strict' require('dotenv').config() const { allocate } = require('./state') const authUrl = 'https://api.imgur.com/oauth2/authorize' module.exports = async (request, response) => { const state = allocate() const url = `${authUrl}?client_id=${process.env.IMGUR_APP_CLIENT_ID}&response_type=code&state=${state}` console.log({ url, state }) response.writeHead(302, { location: url }) response.end() }
24.764706
105
0.68171
ac7276cadd3251a9208b6e9e084f696e3f39cbf2
1,325
js
JavaScript
lib/protocol/messages.js
indutny/hyperbloom-protocol
d370761fe2aa3c2924f0011cf4054ae4c5d2b726
[ "MIT", "Unlicense" ]
35
2017-04-23T09:46:39.000Z
2020-12-27T16:06:12.000Z
lib/protocol/messages.js
indutny/hyperbloom-protocol
d370761fe2aa3c2924f0011cf4054ae4c5d2b726
[ "MIT", "Unlicense" ]
null
null
null
lib/protocol/messages.js
indutny/hyperbloom-protocol
d370761fe2aa3c2924f0011cf4054ae4c5d2b726
[ "MIT", "Unlicense" ]
9
2017-06-19T16:45:00.000Z
2018-07-20T08:38:55.000Z
'use strict'; const protobuf = require('protocol-buffers'); const p = protobuf(` message Open { required bytes feed = 1; required bytes nonce = 2; } message Handshake { required bytes id = 1; repeated string extensions = 2; required bytes signature = 3; repeated bytes chain = 4; } message Sync { message Range { required bytes start = 1; optional bytes end = 2; } required bytes filter = 1; required uint32 size = 2; required uint32 n = 3; required uint32 seed = 4; optional uint32 limit = 5; optional Range range = 6; } message FilterOptions { required uint32 size = 1; required uint32 n = 1; } message Data { repeated bytes values = 1; required bytes signature = 2; } message Request { required bytes start = 1; optional bytes end = 2; optional uint32 limit = 3; } message Link { required bytes link = 1; } `); exports.id = { HANDSHAKE: 0, SYNC: 1, FILTER_OPTIONS: 2, DATA: 3, REQUEST: 4, LINK: 5 }; exports.Open = p.Open; exports.Handshake = p.Handshake; exports.Sync = p.Sync; exports.FilterOptions = p.FilterOptions; exports.Data = p.Data; exports.Request = p.Request; exports.Link = p.Link;
19.202899
45
0.594717
ac72da34d70075270c8cf4fc9bd8f8a679ca3544
2,156
js
JavaScript
05.- Eventos/14.- Eventos y triggers/hello.js
jesuscuesta/Backbone
45948a30d6d87ead67552d57a69c6a83884001a1
[ "MIT" ]
null
null
null
05.- Eventos/14.- Eventos y triggers/hello.js
jesuscuesta/Backbone
45948a30d6d87ead67552d57a69c6a83884001a1
[ "MIT" ]
null
null
null
05.- Eventos/14.- Eventos y triggers/hello.js
jesuscuesta/Backbone
45948a30d6d87ead67552d57a69c6a83884001a1
[ "MIT" ]
null
null
null
//Esta variable será la encargada de recoger el click del botón, y enlazarlo. var UserInputView = Backbone.View.extend({ //Indicamos el segmento donde encuadrarenos los eventos. el : '#UserInput', initialize : function() { //Añadimos la varible, que luego lo inicializaremos. this.helloListView = new HelloListView(); }, events : { 'click button' : 'addToHelloCollection' }, //Añadimos el valor del input dentro del objeto Hello. addToHelloCollection : function(e) { var hello = new Hello({ name : this.$('input').val() }); this.helloListView.collection.add(hello); } }); //Este objeto será el encargado de guardar la variable del formulario. //Creamos la estructura del objeto Hello, que añadiremos luego a la vista. var Hello = Backbone.Model.extend({ initialize : function() { this.name = 'name' } }); //Esta variable será la encargada de añadir la variable al documento. var HelloView = Backbone.View.extend({ tagName : 'li', render : function() { $(this.el).html('Hello ' + this.model.get('name')); return this; } }); //Creamos una colección con el modelo Hello. var HelloList = Backbone.Collection.extend({ model : Hello }); var HelloListView = Backbone.View.extend({ el : '#HelloList', initialize : function() { _.bindAll(this, 'render', 'appendToHelloUL'); this.collection = new HelloList(); this.collection.bind('add', this.appendToHelloUL); }, render:function(){ $.each(this.collection.models, function(i, helloModel){ self.appendToHelloUL(helloModel); }); }, appendToHelloUL : function(helloModel) { var helloView = new HelloView({ model : helloModel }); $(this.el).append(helloView.render().el); } }); new UserInputView();
29.534247
81
0.552412
ac735da1c1527b2999e46bb1143851d68958be2f
11,148
js
JavaScript
src/__tests__/extensions/sessionrecording.js
david-Kaholo/posthog-js
d88ff0897e835b5314333003a9d69c7d52b94e48
[ "Apache-2.0" ]
null
null
null
src/__tests__/extensions/sessionrecording.js
david-Kaholo/posthog-js
d88ff0897e835b5314333003a9d69c7d52b94e48
[ "Apache-2.0" ]
null
null
null
src/__tests__/extensions/sessionrecording.js
david-Kaholo/posthog-js
d88ff0897e835b5314333003a9d69c7d52b94e48
[ "Apache-2.0" ]
null
null
null
import { loadScript } from '../../autocapture-utils' import { INCREMENTAL_SNAPSHOT_EVENT_TYPE, META_EVENT_TYPE, MUTATION_SOURCE_TYPE, SessionRecording, } from '../../extensions/sessionrecording' import { SESSION_RECORDING_ENABLED } from '../../posthog-persistence' jest.mock('../../autocapture-utils') jest.mock('../../config', () => ({ LIB_VERSION: 'v0.0.1' })) describe('SessionRecording', () => { let _emit given('sessionRecording', () => new SessionRecording(given.posthog)) given('incomingSessionAndWindowId', () => ({ sessionId: 'sessionId', windowId: 'windowId' })) given('posthog', () => ({ get_property: () => given.$session_recording_enabled, get_config: jest.fn().mockImplementation((key) => given.config[key]), capture: jest.fn(), persistence: { register: jest.fn() }, _captureMetrics: { incr: jest.fn() }, sessionManager: { getSessionAndWindowId: jest.fn().mockImplementation(() => given.incomingSessionAndWindowId), }, _addCaptureHook: jest.fn(), })) given('config', () => ({ api_host: 'https://test.com', disable_session_recording: given.disabled, autocapture: false, // Assert that session recording works even if `autocapture = false` session_recording: { maskAllInputs: true, recordCanvas: true, someUnregisteredProp: 'abc', }, })) beforeEach(() => { window.rrweb = { record: jest.fn(), } }) describe('afterDecideResponse()', () => { given('subject', () => () => given.sessionRecording.afterDecideResponse(given.response)) beforeEach(() => { jest.spyOn(given.sessionRecording, 'submitRecordings') }) it('starts session recording, saves setting when enabled', () => { given('response', () => ({ sessionRecording: true })) given.subject() expect(given.sessionRecording.submitRecordings).toHaveBeenCalled() expect(given.posthog.persistence.register).toHaveBeenCalledWith({ [SESSION_RECORDING_ENABLED]: true }) }) it('starts session recording, saves setting and endpoint when enabled', () => { given('response', () => ({ sessionRecording: { endpoint: '/ses/' } })) given.subject() expect(given.sessionRecording.submitRecordings).toHaveBeenCalled() expect(given.posthog.persistence.register).toHaveBeenCalledWith({ [SESSION_RECORDING_ENABLED]: true }) expect(given.sessionRecording.endpoint).toEqual('/ses/') }) it('does not start recording if not allowed', () => { given('response', () => ({})) given.subject() expect(given.sessionRecording.submitRecordings).not.toHaveBeenCalled() expect(given.posthog.persistence.register).toHaveBeenCalledWith({ [SESSION_RECORDING_ENABLED]: false }) }) it('does not start session recording if enabled via server but not client', () => { given('response', () => ({ sessionRecording: { endpoint: '/ses/' } })) given('disabled', () => true) given.subject() expect(given.sessionRecording.submitRecordings).not.toHaveBeenCalled() expect(given.posthog.persistence.register).toHaveBeenCalledWith({ [SESSION_RECORDING_ENABLED]: false }) }) }) describe('recording', () => { given('disabled', () => false) given('$session_recording_enabled', () => true) beforeEach(() => { const mockFullSnapshot = jest.fn() window.rrweb = { record: jest.fn(({ emit }) => { _emit = emit return () => {} }), } window.rrweb.record.takeFullSnapshot = mockFullSnapshot loadScript.mockImplementation((path, callback) => callback()) }) it('calls rrweb.record with the right options', () => { given.sessionRecording._onScriptLoaded() // maskAllInputs should change from default // someUnregisteredProp should not be present expect(window.rrweb.record).toHaveBeenCalledWith({ emit: expect.anything(), maskAllInputs: true, blockClass: 'ph-no-capture', blockSelector: null, ignoreClass: 'ph-ignore-input', maskInputOptions: {}, maskInputFn: null, slimDOMOptions: {}, collectFonts: false, }) }) it('records events emitted before and after starting recording', () => { given.sessionRecording.startRecordingIfEnabled() expect(loadScript).toHaveBeenCalled() _emit({ event: 1 }) expect(given.posthog.capture).not.toHaveBeenCalled() given.sessionRecording.submitRecordings() _emit({ event: 2 }) expect(given.posthog.capture).toHaveBeenCalledTimes(2) expect(given.posthog.capture).toHaveBeenCalledWith( '$snapshot', { $session_id: 'sessionId', $window_id: 'windowId', $snapshot_data: { event: 1 }, }, { method: 'POST', transport: 'XHR', endpoint: '/e/', _forceCompression: true, _noTruncate: true, _batchKey: 'sessionRecording', _metrics: expect.anything(), } ) expect(given.posthog.capture).toHaveBeenCalledWith( '$snapshot', { $session_id: 'sessionId', $window_id: 'windowId', $snapshot_data: { event: 2 }, }, { method: 'POST', transport: 'XHR', endpoint: '/e/', _forceCompression: true, _noTruncate: true, _batchKey: 'sessionRecording', _metrics: expect.anything(), } ) }) it('loads recording script from right place', () => { given.sessionRecording.startRecordingIfEnabled() expect(loadScript).toHaveBeenCalledWith('https://test.com/static/recorder.js?v=v0.0.1', expect.anything()) }) it('loads script after `submitRecordings` if not previously loaded', () => { given('$session_recording_enabled', () => false) given.sessionRecording.startRecordingIfEnabled() expect(loadScript).not.toHaveBeenCalled() given.sessionRecording.submitRecordings() expect(loadScript).toHaveBeenCalled() }) it('does not load script if disable_session_recording passed', () => { given('disabled', () => true) given.sessionRecording.startRecordingIfEnabled() given.sessionRecording.submitRecordings() expect(loadScript).not.toHaveBeenCalled() }) it('session recording can be turned on and off', () => { expect(given.sessionRecording.stopRrweb).toEqual(null) given.sessionRecording.startRecordingIfEnabled() expect(given.sessionRecording.started()).toEqual(true) expect(given.sessionRecording.captureStarted).toEqual(true) expect(given.sessionRecording.stopRrweb).not.toEqual(null) given.sessionRecording.stopRecording() expect(given.sessionRecording.stopRrweb).toEqual(null) expect(given.sessionRecording.captureStarted).toEqual(false) }) describe('session and window ids', () => { beforeEach(() => { given.sessionRecording.sessionId = 'old-session-id' given.sessionRecording.windowId = 'old-window-id' given.sessionRecording.startRecordingIfEnabled() given.sessionRecording.submitRecordings() }) it('sends a full snapshot if there is a new session/window id and the event is not type FullSnapshot or Meta', () => { given('incomingSessionAndWindowId', () => ({ sessionId: 'new-session-id', windowId: 'new-window-id' })) _emit({ event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE }) expect(window.rrweb.record.takeFullSnapshot).toHaveBeenCalled() }) it('sends a full snapshot if there is a new window id and the event is not type FullSnapshot or Meta', () => { given('incomingSessionAndWindowId', () => ({ sessionId: 'old-session-id', windowId: 'new-window-id' })) _emit({ event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE }) expect(window.rrweb.record.takeFullSnapshot).toHaveBeenCalled() }) it('does not send a full snapshot if there is a new session/window id and the event is type FullSnapshot or Meta', () => { given('incomingSessionAndWindowId', () => ({ sessionId: 'new-session-id', windowId: 'new-window-id' })) _emit({ event: 123, type: META_EVENT_TYPE }) expect(window.rrweb.record.takeFullSnapshot).not.toHaveBeenCalled() }) it('does not send a full snapshot if there is not a new session or window id', () => { given('incomingSessionAndWindowId', () => ({ sessionId: 'old-session-id', windowId: 'old-window-id' })) _emit({ event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE }) expect(window.rrweb.record.takeFullSnapshot).not.toHaveBeenCalled() }) it('it uses the current timestamp if the event does not have one', () => { const mockDate = new Date(1602107460000) jest.spyOn(global, 'Date').mockImplementation(() => mockDate) _emit({ event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE }) expect(given.posthog.sessionManager.getSessionAndWindowId).toHaveBeenCalledWith(1602107460000, { event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE, }) }) it('sends its timestamp and event data to getSessionAndWindowId', () => { _emit({ event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE, data: { source: MUTATION_SOURCE_TYPE }, timestamp: 1602107460000, }) expect(given.posthog.sessionManager.getSessionAndWindowId).toHaveBeenCalledWith(1602107460000, { event: 123, type: INCREMENTAL_SNAPSHOT_EVENT_TYPE, data: { source: MUTATION_SOURCE_TYPE }, timestamp: 1602107460000, }) }) }) }) })
40.538182
134
0.561177
ac761f5628cf180c1129cc2474771e4622d050ce
1,039
js
JavaScript
packages/admin-web-angular/src/app/pages/+maintenance-info/maintenance-info.module.js
Bravedragon0313/dolglo313
5cbb4796c32bcf27f643ca0134f509a1a36bbc67
[ "MIT" ]
null
null
null
packages/admin-web-angular/src/app/pages/+maintenance-info/maintenance-info.module.js
Bravedragon0313/dolglo313
5cbb4796c32bcf27f643ca0134f509a1a36bbc67
[ "MIT" ]
1
2022-03-02T08:17:57.000Z
2022-03-02T08:17:57.000Z
packages/admin-web-angular/src/app/pages/+maintenance-info/maintenance-info.module.js
Bravedragon0313/newdolce
88ea552dae0cd4a9286aa0cfbccf8b7af1131866
[ "MIT" ]
null
null
null
import { __decorate } from "tslib"; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule } from '@angular/router'; import { MaintenanceService } from '@modules/client.common.angular2/services/maintenance.service'; import { MaintenanceInfoComponent } from './maintenance-info.component'; import { PipesModule } from '@modules/client.common.angular2/pipes/pipes.module'; import { ThemeModule } from '@app/@theme'; const routes = [ { path: '', component: MaintenanceInfoComponent, }, ]; let MaintenanceInfoModule = class MaintenanceInfoModule { }; MaintenanceInfoModule = __decorate([ NgModule({ imports: [ CommonModule, RouterModule.forChild(routes), PipesModule, ThemeModule, ], providers: [MaintenanceService], declarations: [MaintenanceInfoComponent], }) ], MaintenanceInfoModule); export { MaintenanceInfoModule }; //# sourceMappingURL=maintenance-info.module.js.map
34.633333
98
0.686237
ac7640371d315b54b41722432fb2a1d8b91473c0
1,356
js
JavaScript
test/tests/io/VideoWriterTests.js
whwnsdlr1/opencv4nodejs
756d64c4c7fde0852df85d73685bd1845cc8c4fc
[ "MIT" ]
4,653
2017-09-01T22:03:59.000Z
2022-03-31T03:36:43.000Z
test/tests/io/VideoWriterTests.js
whwnsdlr1/opencv4nodejs
756d64c4c7fde0852df85d73685bd1845cc8c4fc
[ "MIT" ]
816
2017-09-08T19:22:48.000Z
2022-03-24T18:40:35.000Z
test/tests/io/VideoWriterTests.js
whwnsdlr1/opencv4nodejs
756d64c4c7fde0852df85d73685bd1845cc8c4fc
[ "MIT" ]
809
2017-08-29T02:52:44.000Z
2022-03-24T19:55:07.000Z
const { expect } = require('chai'); module.exports = function ({ cv, utils }) { const { clearTmpData, fileExists, getTmpDataFilePath } = utils; describe('constructor', () => { beforeEach(() => { clearTmpData(); }); afterEach(() => { clearTmpData(); }); it('can be opened from valid video file and codec', () => { const code = cv.VideoWriter.fourcc('MJPG'); const file = getTmpDataFilePath('video.avi'); const fps = 24; const writer = new cv.VideoWriter(file, code, fps, new cv.Size(800, 600)); writer.release(); expect(fileExists(file)).to.be.true; }); }); describe('write', () => { let writer; before(() => { clearTmpData(); writer = new cv.VideoWriter( getTmpDataFilePath('video.avi'), cv.VideoWriter.fourcc('MJPG'), 24, new cv.Size(800, 600) ); }); after(() => { writer.release(); clearTmpData(); }); describe('sync', () => { it('should read a frame', () => { expect(writer.write(new cv.Mat(600, 800, cv.CV_8UC3))).to.not.throw(); }); }); describe('async', () => { it('should read a frame', (done) => { expect(writer.writeAsync(new cv.Mat(600, 800, cv.CV_8UC3), () => { done(); })).to.not.throw(); }); }); }); };
23.789474
80
0.519174
ac76c0b16afc0e888a949ebeac6bc2e467e73a3d
978
js
JavaScript
2_FrontEnd/3_Javascript/3_Javascript_Tooling/4_React/Testes/app-crud/react-crud/src/components/Aside/Aside.js
Marcelosmbrr/Aprendizado_Full_Stack
9f15040d9c2af9dead6e6ad4fe2fb2df6abd136e
[ "MIT" ]
1
2021-01-27T06:30:22.000Z
2021-01-27T06:30:22.000Z
2_FrontEnd/3_Javascript/3_Javascript_Tooling/4_React/Testes/app-crud/react-crud/src/components/Aside/Aside.js
Marcelosmbrr/Aprendizado_Full_Stack
9f15040d9c2af9dead6e6ad4fe2fb2df6abd136e
[ "MIT" ]
null
null
null
2_FrontEnd/3_Javascript/3_Javascript_Tooling/4_React/Testes/app-crud/react-crud/src/components/Aside/Aside.js
Marcelosmbrr/Aprendizado_Full_Stack
9f15040d9c2af9dead6e6ad4fe2fb2df6abd136e
[ "MIT" ]
1
2021-04-27T02:37:00.000Z
2021-04-27T02:37:00.000Z
import './Aside.css'; import Lottie from 'react-lottie'; import reactLogo from '../../assets/lotties/react-logo.json'; export function Aside({window}){ const defaultOptions = { loop: true, autoplay: true, animationData: reactLogo, }; return( <> <aside> <navbar className = "aside_navbar"> <ul className = "nav_list nav-aside"> <li><Lottie options={defaultOptions} /></li> <li><i className="fas fa-database"></i></li> <li><i className="fas fa-code-branch"></i></li> <li><i className="far fa-chart-bar"></i></li> <li><i className="fas fa-hourglass-start"></i></li> </ul> <div className = "aside-content"> </div> </navbar> </aside> </> ) }
30.5625
75
0.437628
ac787050270c5402d2cecc15482c022c1adb7f9e
1,953
js
JavaScript
src/js/qrcode.js
nuintun/qrcode-uri
1ec777c9b4dce91a9067ba2e237326fa13091393
[ "MIT" ]
null
null
null
src/js/qrcode.js
nuintun/qrcode-uri
1ec777c9b4dce91a9067ba2e237326fa13091393
[ "MIT" ]
null
null
null
src/js/qrcode.js
nuintun/qrcode-uri
1ec777c9b4dce91a9067ba2e237326fa13091393
[ "MIT" ]
null
null
null
/** * QREncode */ 'use strict'; (function ($, window, document, undefined){ $.QREncode = { /** * 配置 */ config: { text: 'QRCode', // 默认文字 render: 'canvas', bgColor: '#FFF', // 背景色 moduleColor: '#000', // 前景色 moduleSize: 5, // 模块大小 mode: 4, // 编码格式,默认8字节编码 ECLevel: 2, // 纠错码等级,默认30% margin: 4, // 留白 logo: '', // logo; error: $.noop }, Render: [] }; /** * 二维码编码 * @param config * @param callback * @returns {*} * @constructor */ function Encode(config, callback){ this.config = config; // 初始化 return this._init(callback); } Encode.prototype = { _init: function (callback){ var config = this.config; this.qr = new QREncode(); // 含有 Logo,使用最大容错 if (config.logo) { config.ECLevel = 2; } try { this.version = this.qr.getVersionFromLength(config.ECLevel, config.mode, config.text); this.pixArr = this.qr.encodeToPix(config.mode, config.text, this.version, config.ECLevel); } catch (e) { $.isFunction(config.error) && config.error(e); } this.pixArr && $.QREncode.Render[config.render](this, callback); } }; /** * 二维码编码 * @param cfg * @constructor */ $.fn.QREncode = function (cfg){ var that = this, config = {}; if (typeof(cfg) === 'string') { config.text = cfg; } else { config = $.extend({}, $.QREncode.config, cfg); } config.moduleSize = Math.round(config.moduleSize); config.margin = Math.round(config.margin); config.moduleSize = config.moduleSize > 0 ? config.moduleSize : $.QREncode.config.moduleSize; config.margin = config.margin < 0 ? $.QREncode.config.margin : config.margin; new Encode(config, function (qrdom){ that.each(function (i, item){ $(item).empty().append(qrdom); }); }); }; })(jQuery, window, document);
21.94382
98
0.550947
ac787773e029349974690b3907d1b0ba665aedbe
484
js
JavaScript
Datasets/MODIS_006_MCD43A1.js
giswqs/earthengine-js-examples
f283e5cda9a79c550f51c03dfa43163790dff1e1
[ "MIT" ]
6
2020-02-24T18:58:51.000Z
2022-02-27T14:39:07.000Z
Datasets/MODIS_006_MCD43A1.js
giswqs/earthengine-js-examples
f283e5cda9a79c550f51c03dfa43163790dff1e1
[ "MIT" ]
null
null
null
Datasets/MODIS_006_MCD43A1.js
giswqs/earthengine-js-examples
f283e5cda9a79c550f51c03dfa43163790dff1e1
[ "MIT" ]
5
2020-10-16T00:50:49.000Z
2021-12-24T15:15:39.000Z
var dataset = ee.ImageCollection('MODIS/006/MCD43A1') .filter(ee.Filter.Date('2018-05-01', '2018-07-01')); var defaultVisualization = dataset.select([ 'BRDF_Albedo_Parameters_Band1_iso', 'BRDF_Albedo_Parameters_Band4_iso', 'BRDF_Albedo_Parameters_Band3_iso' ]); var defaultVisualizationVis = { min: 0.0, max: 1400.0, gamma: 2.0, }; Map.setCenter(6.746, 46.529, 6); Map.addLayer( defaultVisualization, defaultVisualizationVis, 'Default visualization');
32.266667
76
0.72314
ac78918fd8b79495a19aff37f95b88e65984ae5c
48
js
JavaScript
packages/core/src/ScrollTo/Horizontal/index.js
zettca/hv-uikit-react-old
4e0a8503f4f64aacd691d8b37e1f4afaf30cb3eb
[ "Apache-2.0" ]
17
2022-01-20T16:49:02.000Z
2022-03-29T16:07:31.000Z
packages/core/src/ScrollTo/Horizontal/index.js
zettca/hv-uikit-react-old
4e0a8503f4f64aacd691d8b37e1f4afaf30cb3eb
[ "Apache-2.0" ]
31
2022-01-28T15:57:05.000Z
2022-03-31T10:09:48.000Z
packages/core/src/ScrollTo/Horizontal/index.js
zettca/hv-uikit-react-old
4e0a8503f4f64aacd691d8b37e1f4afaf30cb3eb
[ "Apache-2.0" ]
4
2022-01-21T12:27:01.000Z
2022-03-29T09:06:43.000Z
export { default } from "./ScrollToHorizontal";
24
47
0.729167
ac78dd9411caa3fb161fd81ad2ee7f38a040a9b1
4,678
js
JavaScript
server/api/books/books.integration.js
sergiomgaspar/smg-book-trade
3cdefd7cfdf3fd99e48187e679e905ce43dc9080
[ "MIT" ]
2
2018-05-29T17:16:11.000Z
2019-09-24T02:32:22.000Z
server/api/books/books.integration.js
sergiomgaspar/smg-book-trade
3cdefd7cfdf3fd99e48187e679e905ce43dc9080
[ "MIT" ]
null
null
null
server/api/books/books.integration.js
sergiomgaspar/smg-book-trade
3cdefd7cfdf3fd99e48187e679e905ce43dc9080
[ "MIT" ]
null
null
null
'use strict'; /* globals describe, expect, it, beforeEach, afterEach */ var app = require('../..'); import request from 'supertest'; var newBooks; describe('Books API:', function() { describe('GET /api/books', function() { var bookss; beforeEach(function(done) { request(app) .get('/api/books') .expect(200) .expect('Content-Type', /json/) .end((err, res) => { if(err) { return done(err); } bookss = res.body; done(); }); }); it('should respond with JSON array', function() { expect(bookss).to.be.instanceOf(Array); }); }); describe('POST /api/books', function() { beforeEach(function(done) { request(app) .post('/api/books') .send({ name: 'New Books', info: 'This is the brand new books!!!' }) .expect(201) .expect('Content-Type', /json/) .end((err, res) => { if(err) { return done(err); } newBooks = res.body; done(); }); }); it('should respond with the newly created books', function() { expect(newBooks.name).to.equal('New Books'); expect(newBooks.info).to.equal('This is the brand new books!!!'); }); }); describe('GET /api/books/:id', function() { var books; beforeEach(function(done) { request(app) .get(`/api/books/${newBooks._id}`) .expect(200) .expect('Content-Type', /json/) .end((err, res) => { if(err) { return done(err); } books = res.body; done(); }); }); afterEach(function() { books = {}; }); it('should respond with the requested books', function() { expect(books.name).to.equal('New Books'); expect(books.info).to.equal('This is the brand new books!!!'); }); }); describe('PUT /api/books/:id', function() { var updatedBooks; beforeEach(function(done) { request(app) .put(`/api/books/${newBooks._id}`) .send({ name: 'Updated Books', info: 'This is the updated books!!!' }) .expect(200) .expect('Content-Type', /json/) .end(function(err, res) { if(err) { return done(err); } updatedBooks = res.body; done(); }); }); afterEach(function() { updatedBooks = {}; }); it('should respond with the updated books', function() { expect(updatedBooks.name).to.equal('Updated Books'); expect(updatedBooks.info).to.equal('This is the updated books!!!'); }); it('should respond with the updated books on a subsequent GET', function(done) { request(app) .get(`/api/books/${newBooks._id}`) .expect(200) .expect('Content-Type', /json/) .end((err, res) => { if(err) { return done(err); } let books = res.body; expect(books.name).to.equal('Updated Books'); expect(books.info).to.equal('This is the updated books!!!'); done(); }); }); }); describe('PATCH /api/books/:id', function() { var patchedBooks; beforeEach(function(done) { request(app) .patch(`/api/books/${newBooks._id}`) .send([ { op: 'replace', path: '/name', value: 'Patched Books' }, { op: 'replace', path: '/info', value: 'This is the patched books!!!' } ]) .expect(200) .expect('Content-Type', /json/) .end(function(err, res) { if(err) { return done(err); } patchedBooks = res.body; done(); }); }); afterEach(function() { patchedBooks = {}; }); it('should respond with the patched books', function() { expect(patchedBooks.name).to.equal('Patched Books'); expect(patchedBooks.info).to.equal('This is the patched books!!!'); }); }); describe('DELETE /api/books/:id', function() { it('should respond with 204 on successful removal', function(done) { request(app) .delete(`/api/books/${newBooks._id}`) .expect(204) .end(err => { if(err) { return done(err); } done(); }); }); it('should respond with 404 when books does not exist', function(done) { request(app) .delete(`/api/books/${newBooks._id}`) .expect(404) .end(err => { if(err) { return done(err); } done(); }); }); }); });
24.492147
84
0.49658
ac78f4ef1c29726ff1ed393da5fce10c1f85d62b
25,261
js
JavaScript
components/dropdown/Dropdown.js
fernandesrenan/primereact
3bbfe4889538b2106004edbbb1a1904d60616dff
[ "MIT" ]
null
null
null
components/dropdown/Dropdown.js
fernandesrenan/primereact
3bbfe4889538b2106004edbbb1a1904d60616dff
[ "MIT" ]
null
null
null
components/dropdown/Dropdown.js
fernandesrenan/primereact
3bbfe4889538b2106004edbbb1a1904d60616dff
[ "MIT" ]
null
null
null
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Dropdown = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _propTypes = require('prop-types'); var _propTypes2 = _interopRequireDefault(_propTypes); var _DomHandler = require('../utils/DomHandler'); var _DomHandler2 = _interopRequireDefault(_DomHandler); var _ObjectUtils = require('../utils/ObjectUtils'); var _ObjectUtils2 = _interopRequireDefault(_ObjectUtils); var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames); var _DropdownPanel = require('./DropdownPanel'); var _DropdownItem = require('./DropdownItem'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Dropdown = exports.Dropdown = function (_Component) { _inherits(Dropdown, _Component); function Dropdown(props) { _classCallCheck(this, Dropdown); var _this = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, props)); _this.state = { filter: '' }; _this.onClick = _this.onClick.bind(_this); _this.onInputFocus = _this.onInputFocus.bind(_this); _this.onInputBlur = _this.onInputBlur.bind(_this); _this.onInputKeyDown = _this.onInputKeyDown.bind(_this); _this.onEditableInputClick = _this.onEditableInputClick.bind(_this); _this.onEditableInputChange = _this.onEditableInputChange.bind(_this); _this.onEditableInputFocus = _this.onEditableInputFocus.bind(_this); _this.onOptionClick = _this.onOptionClick.bind(_this); _this.onFilterInputChange = _this.onFilterInputChange.bind(_this); _this.onFilterInputKeyDown = _this.onFilterInputKeyDown.bind(_this); _this.panelClick = _this.panelClick.bind(_this); _this.clear = _this.clear.bind(_this); return _this; } _createClass(Dropdown, [{ key: 'onClick', value: function onClick(event) { var _this2 = this; if (this.props.disabled) { return; } if (this.documentClickListener) { this.selfClick = true; } var clearClick = _DomHandler2.default.hasClass(event.target, 'ui-dropdown-clear-icon'); if (!this.overlayClick && !this.editableInputClick && !clearClick) { this.focusInput.focus(); if (this.panel.element.offsetParent) { this.hide(); } else { this.show(); if (this.props.filter) { setTimeout(function () { _this2.filterInput.focus(); }, 200); } } } if (this.editableInputClick) { this.expeditableInputClick = false; } } }, { key: 'panelClick', value: function panelClick() { this.overlayClick = true; } }, { key: 'onInputFocus', value: function onInputFocus(event) { _DomHandler2.default.addClass(this.container, 'ui-state-focus'); } }, { key: 'onInputBlur', value: function onInputBlur(event) { _DomHandler2.default.removeClass(this.container, 'ui-state-focus'); } }, { key: 'onUpKey', value: function onUpKey(event) { if (!this.panel.element.offsetParent && event.altKey) { this.show(); } else { var selectedItemIndex = this.findOptionIndex(this.props.value); if (selectedItemIndex !== -1) { var nextItemIndex = selectedItemIndex + 1; if (nextItemIndex !== this.props.options.length) { this.selectItem({ originalEvent: event, option: this.props.options[nextItemIndex] }); } } if (selectedItemIndex === -1) { this.selectItem({ originalEvent: event, option: this.props.options[0] }); } } event.preventDefault(); } }, { key: 'onDownKey', value: function onDownKey(event) { var selectedItemIndex = this.findOptionIndex(this.props.value); if (selectedItemIndex > 0) { var prevItemIndex = selectedItemIndex - 1; this.selectItem({ originalEvent: event, option: this.props.options[prevItemIndex] }); } event.preventDefault(); } }, { key: 'onInputKeyDown', value: function onInputKeyDown(event) { switch (event.which) { //down case 40: this.onUpKey(event); break; //up case 38: this.onDownKey(event); break; //space case 32: if (!this.panel.element.offsetParent) { this.show(); event.preventDefault(); } break; //enter case 13: this.hide(); this.unbindDocumentClickListener(); event.preventDefault(); break; //escape and tab case 27: case 9: this.hide(); this.unbindDocumentClickListener(); break; default: break; } } }, { key: 'onEditableInputClick', value: function onEditableInputClick(event) { this.editableInputClick = true; this.bindDocumentClickListener(); } }, { key: 'onEditableInputChange', value: function onEditableInputChange(event) { this.props.onChange({ originalEvent: event.originalEvent, value: event.target.value }); } }, { key: 'onEditableInputFocus', value: function onEditableInputFocus(event) { _DomHandler2.default.addClass(this.container, 'ui-state-focus'); this.hide(); } }, { key: 'onOptionClick', value: function onOptionClick(event) { this.selectItem(event); this.focusInput.focus(); this.hide(); event.originalEvent.stopPropagation(); } }, { key: 'onFilterInputChange', value: function onFilterInputChange(event) { this.setState({ filter: event.target.value }); } }, { key: 'onFilterInputKeyDown', value: function onFilterInputKeyDown(event) { switch (event.which) { //down case 40: this.onUpKey(event); break; //up case 38: this.onDownKey(event); break; //enter case 13: event.preventDefault(); break; default: break; } } }, { key: 'clear', value: function clear(event) { this.props.onChange({ originalEvent: event, value: null }); this.updateEditableLabel(); } }, { key: 'selectItem', value: function selectItem(event) { var selectedOption = this.findOption(this.props.value); if (selectedOption !== event.option) { this.updateEditableLabel(event.option); this.props.onChange({ originalEvent: event.originalEvent, value: this.props.optionLabel ? event.option : event.option.value }); } } }, { key: 'findOptionIndex', value: function findOptionIndex(value) { var index = -1; if (this.props.options) { for (var i = 0; i < this.props.options.length; i++) { var optionValue = this.props.optionLabel ? this.props.options[i] : this.props.options[i].value; if (value === null && optionValue == null || _ObjectUtils2.default.equals(value, optionValue, this.props.dataKey)) { index = i; break; } } } return index; } }, { key: 'findOption', value: function findOption(value) { var index = this.findOptionIndex(value); return index !== -1 ? this.props.options[index] : null; } }, { key: 'show', value: function show() { this.panel.element.style.zIndex = String(_DomHandler2.default.generateZIndex()); this.panel.element.style.display = 'block'; this.alignPanel(); _DomHandler2.default.fadeIn(this.panel.element, 250); this.bindDocumentClickListener(); } }, { key: 'hide', value: function hide() { this.panel.element.style.display = 'none'; this.unbindDocumentClickListener(); this.clearClickState(); } }, { key: 'alignPanel', value: function alignPanel() { if (this.props.appendTo) { _DomHandler2.default.absolutePosition(this.panel.element, this.container); this.panel.element.style.minWidth = _DomHandler2.default.getWidth(this.container) + 'px'; } else { _DomHandler2.default.relativePosition(this.panel.element, this.container); } } }, { key: 'bindDocumentClickListener', value: function bindDocumentClickListener() { var _this3 = this; if (!this.documentClickListener) { this.documentClickListener = function () { if (!_this3.selfClick && !_this3.overlayClick) { _this3.hide(); } _this3.clearClickState(); }; document.addEventListener('click', this.documentClickListener); } } }, { key: 'unbindDocumentClickListener', value: function unbindDocumentClickListener() { if (this.documentClickListener) { document.removeEventListener('click', this.documentClickListener); this.documentClickListener = null; } } }, { key: 'clearClickState', value: function clearClickState() { this.selfClick = false; this.editableInputClick = false; this.overlayClick = false; } }, { key: 'updateEditableLabel', value: function updateEditableLabel(option) { if (this.editableInput) { this.editableInput.value = option ? this.getOptionLabel(option) : this.props.value || ''; } } }, { key: 'filter', value: function filter(option) { var filterValue = this.state.filter.trim().toLowerCase(); var optionLabel = this.getOptionLabel(option); return optionLabel.toLowerCase().indexOf(filterValue.toLowerCase()) > -1; } }, { key: 'hasFilter', value: function hasFilter() { return this.state.filter && this.state.filter.trim().length > 0; } }, { key: 'renderHiddenSelect', value: function renderHiddenSelect() { var _this4 = this; if (this.props.autoWidth) { var options = this.props.options && this.props.options.map(function (option, i) { return _react2.default.createElement( 'option', { key: _this4.getOptionLabel(option), value: option.value }, _this4.getOptionLabel(option) ); }); return _react2.default.createElement( 'div', { className: 'ui-helper-hidden-accessible' }, _react2.default.createElement( 'select', { ref: function ref(el) { return _this4.nativeSelect = el; }, required: this.props.required, tabIndex: '-1', 'aria-hidden': 'true' }, options ) ); } else { return null; } } }, { key: 'renderKeyboardHelper', value: function renderKeyboardHelper() { var _this5 = this; return _react2.default.createElement( 'div', { className: 'ui-helper-hidden-accessible' }, _react2.default.createElement('input', { ref: function ref(el) { return _this5.focusInput = el; }, id: this.props.inputId, type: 'text', role: 'listbox', onFocus: this.onInputFocus, onBlur: this.onInputBlur, onKeyDown: this.onInputKeyDown, disabled: this.props.disabled, tabIndex: this.props.tabIndex }) ); } }, { key: 'renderLabel', value: function renderLabel(label) { var _this6 = this; if (this.props.editable) { var value = label || this.props.value || ''; return _react2.default.createElement('input', { ref: function ref(el) { return _this6.editableInput = el; }, type: 'text', defaultValue: value, className: 'ui-dropdown-label ui-inputtext ui-corner-all', disabled: this.props.disabled, placeholder: this.props.placeholder, onClick: this.onEditableInputClick, onInput: this.onEditableInputChange, onFocus: this.onEditableInputFocus, onBlur: this.onInputBlur }); } else { var className = (0, _classnames2.default)('ui-dropdown-label ui-inputtext ui-corner-all', { 'ui-placeholder': label === null && this.props.placeholder, 'ui-dropdown-label-empty': label === null && !this.props.placeholder }); return _react2.default.createElement( 'label', { className: className }, label || this.props.placeholder || 'empty' ); } } }, { key: 'renderClearIcon', value: function renderClearIcon() { if (this.props.value && this.props.showClear && !this.props.disabled) { return _react2.default.createElement('i', { className: 'ui-dropdown-clear-icon pi pi-times', onClick: this.clear }); } else { return null; } } }, { key: 'renderDropdownIcon', value: function renderDropdownIcon() { return _react2.default.createElement( 'div', { className: 'ui-dropdown-trigger ui-state-default ui-corner-right' }, _react2.default.createElement('span', { className: 'ui-dropdown-trigger-icon pi pi-caret-down ui-clickable' }) ); } }, { key: 'renderItems', value: function renderItems(selectedOption) { var _this7 = this; var items = this.props.options; if (items && this.hasFilter()) { items = items && items.filter(function (option) { return _this7.filter(option); }); } if (items) { return items.map(function (option, index) { var optionLabel = _this7.getOptionLabel(option); return _react2.default.createElement(_DropdownItem.DropdownItem, { key: optionLabel, label: optionLabel, option: option, template: _this7.props.itemTemplate, selected: selectedOption === option, onClick: _this7.onOptionClick }); }); } else { return null; } } }, { key: 'renderFilter', value: function renderFilter() { var _this8 = this; if (this.props.filter) { return _react2.default.createElement( 'div', { className: 'ui-dropdown-filter-container' }, _react2.default.createElement('input', { ref: function ref(el) { return _this8.filterInput = el; }, type: 'text', autoComplete: 'off', className: 'ui-dropdown-filter ui-inputtext ui-widget ui-state-default ui-corner-all', placeholder: this.props.filterPlaceholder, onKeyDown: this.onFilterInputKeyDown, onChange: this.onFilterInputChange }), _react2.default.createElement('span', { className: 'ui-dropdown-filter-icon pi pi-search' }) ); } else { return null; } } }, { key: 'getOptionLabel', value: function getOptionLabel(option) { return this.props.optionLabel ? _ObjectUtils2.default.resolveFieldData(option, this.props.optionLabel) : option.label; } }, { key: 'unbindWindowLoadListener', value: function unbindWindowLoadListener() { if (this.windowLoadListener) { window.removeEventListener('load', this.windowLoadListener); } } }, { key: 'componentDidMount', value: function componentDidMount() { var _this9 = this; if (this.props.autoWidth) { // Added setTimeout to render it with the correct width value in hidden container components such as TabView and Accordion. setTimeout(function () { if (!_this9.props.style || !_this9.props.style['width'] && !_this9.props.style['min-width']) { _this9.container.style.width = _this9.nativeSelect.offsetWidth + 30 + 'px'; } }, 0); } if (this.props.autoFocus && this.focusInput) { this.windowLoadListener = function () { _this9.focusInput.focus(); }; window.addEventListener('load', this.windowLoadListener); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.unbindDocumentClickListener(); this.unbindWindowLoadListener(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { if (this.props.filter) { this.alignPanel(); } if (this.panel.element.offsetParent) { var highlightItem = _DomHandler2.default.findSingle(this.panel.element, 'li.ui-state-highlight'); if (highlightItem) { _DomHandler2.default.scrollInView(this.panel.itemsWrapper, highlightItem); } } } }, { key: 'render', value: function render() { var _this10 = this; var className = (0, _classnames2.default)('ui-dropdown ui-widget ui-state-default ui-corner-all ui-helper-clearfix', this.props.className, { 'ui-state-disabled': this.props.disabled, 'ui-dropdown-clearable': this.props.showClear && !this.props.disabled }); var selectedOption = this.findOption(this.props.value); var label = selectedOption ? this.getOptionLabel(selectedOption) : null; var hiddenSelect = this.renderHiddenSelect(); var keyboardHelper = this.renderKeyboardHelper(); var labelElement = this.renderLabel(label); var dropdownIcon = this.renderDropdownIcon(); var items = this.renderItems(selectedOption); var filterElement = this.renderFilter(); var clearIcon = this.renderClearIcon(); if (this.props.editable && this.editableInput) { var value = label || this.props.value || ''; this.editableInput.value = value; } return _react2.default.createElement( 'div', { id: this.props.id, ref: function ref(el) { return _this10.container = el; }, className: className, style: this.props.style, onClick: this.onClick, onMouseDown: this.props.onMouseDown, onContextMenu: this.props.onContextMenu }, hiddenSelect, keyboardHelper, labelElement, clearIcon, dropdownIcon, _react2.default.createElement( _DropdownPanel.DropdownPanel, { ref: function ref(el) { return _this10.panel = el; }, appendTo: this.props.appendTo, panelStyle: this.props.panelStyle, panelClassName: this.props.panelClassName, scrollHeight: this.props.scrollHeight, onClick: this.panelClick, filter: filterElement }, items ) ); } }]); return Dropdown; }(_react.Component); Dropdown.defaultProps = { id: null, value: null, options: null, optionLabel: null, itemTemplate: null, style: null, className: null, autoWidth: true, scrollHeight: '200px', filter: false, filterPlaceholder: null, editable: false, placeholder: null, required: false, disabled: false, appendTo: null, tabIndex: null, autoFocus: false, panelClassName: null, panelStyle: null, dataKey: null, inputId: null, showClear: false, onChange: null, onMouseDown: null, onContextMenu: null }; Dropdown.propTypes = { id: _propTypes2.default.string, value: _propTypes2.default.any, options: _propTypes2.default.array, optionLabel: _propTypes2.default.string, itemTemplate: _propTypes2.default.func, style: _propTypes2.default.object, className: _propTypes2.default.string, autoWidth: _propTypes2.default.bool, scrollHeight: _propTypes2.default.string, filter: _propTypes2.default.bool, filterPlaceholder: _propTypes2.default.string, editable: _propTypes2.default.bool, placeholder: _propTypes2.default.string, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, appendTo: _propTypes2.default.any, tabIndex: _propTypes2.default.number, autoFocus: _propTypes2.default.bool, lazy: _propTypes2.default.bool, panelClassName: _propTypes2.default.string, panelstyle: _propTypes2.default.object, dataKey: _propTypes2.default.string, inputId: _propTypes2.default.string, showClear: _propTypes2.default.bool, onChange: _propTypes2.default.func, onMouseDown: _propTypes2.default.func, onContextMenu: _propTypes2.default.func };
37.815868
564
0.543051
ac79c9664e9d25797e096077cb5b9597059b9268
960
js
JavaScript
resources/assets/js/news/news.js
nipeharefa/menitcom
86a8e78a951e283249c230c212d69447d09a62c2
[ "MIT" ]
null
null
null
resources/assets/js/news/news.js
nipeharefa/menitcom
86a8e78a951e283249c230c212d69447d09a62c2
[ "MIT" ]
null
null
null
resources/assets/js/news/news.js
nipeharefa/menitcom
86a8e78a951e283249c230c212d69447d09a62c2
[ "MIT" ]
null
null
null
import { sync } from 'vuex-router-sync' import Vue from 'vue' import VueRouter from 'vue-router' import store from './vuex/store' import routes from './routes/' import { setNews } from './vuex/action' import { mapGetters, mapActions } from 'vuex' import VueResource from 'vue-resource' Vue.use(VueRouter) Vue.use(VueResource) const router = new VueRouter({ routes }) sync(store, router) Vue.http.interceptors.push((request, next) => { request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken); next(); }); new Vue({ store, router, mounted() { const self = this //this.increment(); this.$http.get('/news', []).then((res) => { self.setNews(res.data) }) }, render (h) { return ( <div class="container"> <router-view></router-view> </div> ) }, computed: mapGetters({ products: 'allnews' }), methods: { setNews(data) { this.$store.dispatch('increment', data); } } }).$mount('#app')
18.461538
59
0.625
ac7a377105ef8f02de414cf69ff0d0f7d64928dc
386
js
JavaScript
src/main/webapp/app/entities/terrain/terrain.search.service.js
nicolas1729/cactus
ca4d2cef9510d433e2621e8caa1fc41617f5c7c2
[ "CC0-1.0" ]
null
null
null
src/main/webapp/app/entities/terrain/terrain.search.service.js
nicolas1729/cactus
ca4d2cef9510d433e2621e8caa1fc41617f5c7c2
[ "CC0-1.0" ]
null
null
null
src/main/webapp/app/entities/terrain/terrain.search.service.js
nicolas1729/cactus
ca4d2cef9510d433e2621e8caa1fc41617f5c7c2
[ "CC0-1.0" ]
null
null
null
(function() { 'use strict'; angular .module('cactusApp') .factory('TerrainSearch', TerrainSearch); TerrainSearch.$inject = ['$resource']; function TerrainSearch($resource) { var resourceUrl = 'api/_search/terrains/:id'; return $resource(resourceUrl, {}, { 'query': { method: 'GET', isArray: true} }); } })();
21.444444
54
0.549223
ac7ade97437d7148e38457e184e424e8ec733737
115
js
JavaScript
src/controllers/home.js
weberliu/koa-skeleton
ffc597ad1f52544cc3c6f2de1bc3d68ecb8f695e
[ "RSA-MD" ]
null
null
null
src/controllers/home.js
weberliu/koa-skeleton
ffc597ad1f52544cc3c6f2de1bc3d68ecb8f695e
[ "RSA-MD" ]
null
null
null
src/controllers/home.js
weberliu/koa-skeleton
ffc597ad1f52544cc3c6f2de1bc3d68ecb8f695e
[ "RSA-MD" ]
null
null
null
export default async (ctx, next) => { const title = 'Hello Koa2' await ctx.render('index', { title }) }
14.375
37
0.591304
ac7bca36a8e475e66f39198fdeec050e6cde72a4
1,012
js
JavaScript
App/js/utilidades.js
iatechdev/constructora-bolivar
f3f28a479473e47957519d925609956810488afd
[ "MIT" ]
null
null
null
App/js/utilidades.js
iatechdev/constructora-bolivar
f3f28a479473e47957519d925609956810488afd
[ "MIT" ]
null
null
null
App/js/utilidades.js
iatechdev/constructora-bolivar
f3f28a479473e47957519d925609956810488afd
[ "MIT" ]
null
null
null
// let imageRotateCurrencyState = 1; function cambiarImagenMoneda() { if(event.currentTarget.dataset.moneda == "0"){ document.getElementById("imageCurrency").src="../assets/images/Component 1677 – 1.png"; event.currentTarget.setAttribute('data-moneda','1'); // event.currentTarget.dataset.moneda = '' }else{ document.getElementById("imageCurrency").src="../assets/images/Component 1678 – 1.svg"; event.currentTarget.setAttribute('data-moneda','0'); } //0-USD data atributo //1-COP data atributo // if (imageRotateCurrencyState==1) // { // document.getElementById("imageCurrency").src="../assets/images/Component 1677 – 1.png"; // imageRotateCurrencyState = imageRotateCurrencyState + 1; // } // else { // document.getElementById("imageCurrency").src="../assets/images/Component 1678 – 1.svg"; // imageRotateCurrencyState = 1; // } }
34.896552
107
0.603755
ac7c255ec2d613b118ec0f79fce7d131f97f8e06
1,391
js
JavaScript
med-cabinet/src/utils/Testcode.js
Build-Week-Med-Cabinet-3/Front-End
88537896e165b5db59938cac023b42c251e879a1
[ "MIT" ]
null
null
null
med-cabinet/src/utils/Testcode.js
Build-Week-Med-Cabinet-3/Front-End
88537896e165b5db59938cac023b42c251e879a1
[ "MIT" ]
28
2020-03-04T07:26:55.000Z
2022-02-27T00:29:51.000Z
med-cabinet/src/utils/Testcode.js
Build-Week-Med-Cabinet-3/Front-End
88537896e165b5db59938cac023b42c251e879a1
[ "MIT" ]
3
2020-07-25T15:44:56.000Z
2020-10-16T22:59:51.000Z
import React from "react"; // import axiosWithAuth from "./axiosWithAuth"; export default function Testcode(props) { console.log("register props", props); // grabbing current user // axiosWithAuth() // .get(`/users/${localStorage.getItem('ID')}`) // .then(response => { // console.log(response); // }) // .catch(error => { // console.log(error); // }); // recommendations from backend // axiosWithAuth() // .get(`recs`) // .then(response => { // console.log('recommendations:', response); // }) // .catch(error => { // console.log('recommendations error:', error); // }); // retrieving recommendations from ds // const [recommendation, setRecommendation] = useState(""); // const [results, setResults] = useState([]); // const handleChange = event => { // setRecommendation({ // ...recommendation, // [event.target.name]: event.target.value // }); // }; //post request for ds api information // const rec = "test recommendation" // axios // .post( // `https://cors-anywhere.herokuapp.com/https://med-cab-app.herokuapp.com`, // rec // ) // .then(response => { // console.log("ds api response", response); // }) // .catch(error => { // console.log("ds api error", error); // }); return <div></div>; }
24.839286
81
0.554996
ac7cacc46700578dee11a2c4446b124c9ddd5182
1,488
js
JavaScript
app/components/modal-delete-member.js
belalMAli/belalMAli.github.io
95ebf608d46a162e5121d435dc3f2d2648b8ba8c
[ "MIT" ]
1
2020-12-01T08:37:04.000Z
2020-12-01T08:37:04.000Z
app/components/modal-delete-member.js
belalMAli/belalMAli.github.io
95ebf608d46a162e5121d435dc3f2d2648b8ba8c
[ "MIT" ]
null
null
null
app/components/modal-delete-member.js
belalMAli/belalMAli.github.io
95ebf608d46a162e5121d435dc3f2d2648b8ba8c
[ "MIT" ]
null
null
null
import ModalComponent from 'ghost-admin/components/modal-base'; import {alias} from '@ember/object/computed'; import {computed} from '@ember/object'; import {reads} from '@ember/object/computed'; import {inject as service} from '@ember/service'; import {task} from 'ember-concurrency'; export default ModalComponent.extend({ membersStats: service(), shouldCancelSubscriptions: false, // Allowed actions confirm: () => {}, member: alias('model'), cancelSubscriptions: reads('shouldCancelSubscriptions'), hasActiveStripeSubscriptions: computed('member', function () { let subscriptions = this.member.get('stripe'); if (!subscriptions || subscriptions.length === 0) { return false; } let firstActiveStripeSubscription = subscriptions.find((subscription) => { return subscription.status === 'active' || subscription.status === 'trialing'; }); return firstActiveStripeSubscription !== undefined; }), actions: { confirm() { this.deleteMember.perform(); }, toggleShouldCancelSubscriptions() { this.set('shouldCancelSubscriptions', !this.shouldCancelSubscriptions); } }, deleteMember: task(function* () { try { yield this.confirm(this.shouldCancelSubscriptions); this.membersStats.invalidate(); } finally { this.send('closeModal'); } }).drop() });
28.075472
90
0.627016
ac7d4ee0971f37de80b3e04ed80f29ff7d1fc0aa
1,151
js
JavaScript
app/assets/javascripts/app/payment.js
dragonken/producerun
e17504b4dc37a41196681d41ca73f157e9441aa5
[ "MIT" ]
1
2016-10-23T15:46:40.000Z
2016-10-23T15:46:40.000Z
app/assets/javascripts/app/payment.js
dragonken/producerun
e17504b4dc37a41196681d41ca73f157e9441aa5
[ "MIT" ]
null
null
null
app/assets/javascripts/app/payment.js
dragonken/producerun
e17504b4dc37a41196681d41ca73f157e9441aa5
[ "MIT" ]
1
2021-01-02T07:01:47.000Z
2021-01-02T07:01:47.000Z
App.addChild('Payment', _.extend({ el: '#payment-engines', events: { 'click .nav-tab' : 'onClickPayment' }, onClickPayment: function(event){ this.$('.tab-loader img').show(); this.onTabClick(event); }, activate: function(){ }, show: function(){ this.$el.slideDown('slow'); }, updatePaymentMethod: function() { var $selected_tab = this.$('.nav-tab.selected'); $.ajax({ url: this.$el.data('update-info-path'), type: 'PUT', data: { contribution: { payment_method: $selected_tab.prop('id') } } }); }, hideNationalPayment: function() { this.$('#MoIP').hide(); this.$('.payments_type#MoIP_payment').hide(); }, selectInternationalPayment: function() { this.onTabClick({currentTarget: this.$('#PayPal')}); }, loadPaymentChoices: function() { if($('#contribution_country_id').val() == '36') { this.$('#MoIP').show(); this.onTabClick({currentTarget: this.$('.nav-tab:first')}); } else { this.hideNationalPayment(); this.selectInternationalPayment(); } this.on('selectTab', this.updatePaymentMethod); } }, Skull.Tabs));
22.568627
74
0.597741
ac7d69c3325e39b0b980ee816906df02e14caaab
3,217
js
JavaScript
app/libs/angular-logging/test/spec/angular-logging.js
Mind-Hackers/BeautyMap
4bdb8ed9ebb6b465255f523db721f42f70203580
[ "MIT" ]
null
null
null
app/libs/angular-logging/test/spec/angular-logging.js
Mind-Hackers/BeautyMap
4bdb8ed9ebb6b465255f523db721f42f70203580
[ "MIT" ]
null
null
null
app/libs/angular-logging/test/spec/angular-logging.js
Mind-Hackers/BeautyMap
4bdb8ed9ebb6b465255f523db721f42f70203580
[ "MIT" ]
null
null
null
'use strict'; describe('Module: avaughan.logging', function() { var logger; var level; // load the controller's module beforeEach(module('avaughan.logging')); beforeEach(inject(function(avLog, avLevel) { logger = avLog; level = avLevel; console.log('avLogger injected', avLog); console.log('avLevel injected', JSON.stringify(avLevel), avLevel); })); afterEach(function() { //scope.$destroy(); }); it('should correctly get default values and injection should work', inject(function() { //check that injection works expect(logger).toBeDefined(); expect(level).toBeDefined(); //fetch the default log level //console.log('checking config default loglevel', logger.getConfig().loglevel); expect(logger.getConfig().loglevel).toEqual(level.INFO); //fetch a category that does not exist (should get default) //console.log('checking default level is transferred to non-registered channel'); expect(logger.getLogLevel('unregisteredCategory')).toEqual(level.INFO); //fetch the example category expect(logger.getLogLevel('exampleCategory')).toEqual(level.ERROR); //fetch the $log injected //console.log('checking logger.$log is defined', logger.getLog()); expect(logger.getLog()).toBeDefined(); })); it('should handle thresholding', inject(function() { var log = logger.getLogger('unregisteredCategory'); //console.log('got logger', log); var $logSpy = spyOn(log.getLog(), 'info'); //console.log('level is', log.getLevel()); expect(log.getLevel()).toEqual(level.INFO); //info is the default level so we should expect both to be called.... //console.log('calling log.info', log); log.info('log.info from logger called!!!!', {}); //check that we passed threshold and logged the message //console.log('testing $log call'); expect($logSpy).toHaveBeenCalledWith('[unregisteredCategory] - INFO: log.info from logger called!!!!', {}); //ok - now log something under threshold $logSpy = spyOn(log.getLog(), 'debug'); log.debug('a debug message should not be printed'); expect($logSpy).not.toHaveBeenCalledWith('[unregisteredCateogry] - DEBUG: a debug message should not be printed'); })); it('should correctly handle configuration setting', inject(function() { //check that injection works expect(logger).toBeDefined(); expect(level).toBeDefined(); logger.setConfig({ loglevel: level.DEBUG, category: { myCategory: level.WARN } }); //fetch the default log level expect(logger.getConfig().loglevel).toEqual(level.DEBUG); //fetch a category that does not exist (should get default) //console.log('checking default level is transferred to non-registered channel'); expect(logger.getLogLevel('unregisteredCategory')).toEqual(level.DEBUG); //fetch the configured category expect(logger.getLogLevel('myCategory')).toEqual(level.WARN); })); });
35.351648
122
0.631955
ac7e1cfd0ba1bf1e06523e06243a0f94e56d2684
225
js
JavaScript
src/derived/index.js
helpscout/helix
7b006e4171e06ff845d1fcd4b1c620175f59aa2c
[ "MIT" ]
23
2017-11-02T19:07:22.000Z
2022-03-28T09:08:19.000Z
src/derived/index.js
helpscout/helix
7b006e4171e06ff845d1fcd4b1c620175f59aa2c
[ "MIT" ]
28
2017-11-02T22:12:16.000Z
2021-05-18T16:15:15.000Z
src/derived/index.js
helpscout/helix
7b006e4171e06ff845d1fcd4b1c620175f59aa2c
[ "MIT" ]
4
2019-04-15T16:19:33.000Z
2022-03-17T06:29:39.000Z
export const isDerivedValue = (generator) => generator.isDerivedValue const derived = (mapper) => { const generator = (shape) => mapper(shape) generator.isDerivedValue = true return generator } export default derived
22.5
69
0.742222
ac7e447c20a14b3e50f1f4cebeaba1684763ab1a
1,969
js
JavaScript
Dich_vu_Du_lieu/3-Doi_tuong_va_Xu_ly/XL_LUU_TRU.js
tqbdev/tv-shop-xml
0e7f4655244177149b845c8574f6a4e8073fe665
[ "Apache-2.0" ]
null
null
null
Dich_vu_Du_lieu/3-Doi_tuong_va_Xu_ly/XL_LUU_TRU.js
tqbdev/tv-shop-xml
0e7f4655244177149b845c8574f6a4e8073fe665
[ "Apache-2.0" ]
null
null
null
Dich_vu_Du_lieu/3-Doi_tuong_va_Xu_ly/XL_LUU_TRU.js
tqbdev/tv-shop-xml
0e7f4655244177149b845c8574f6a4e8073fe665
[ "Apache-2.0" ]
null
null
null
var File = require("fs"); var format = require("pretty-data").pd; var DOMParser = require("xmldom").DOMParser; var XMLSerializer = require("xmldom").XMLSerializer; const Duong_dan_Thu_muc_Du_lieu_Tivi = "..//2-Du_lieu_Luu_tru//Tivi//"; const Duong_dan_Thu_muc_Du_lieu_Cuahang = "..//2-Du_lieu_Luu_tru//Cua_hang//"; const Ten_Tap_tin_Cuahang = "Cua_hang.xml"; const Ten_Tap_tin_Nhanvien = "Nhan_vien.xml"; class XL_LUU_TRU { Doc_Du_lieu_Cua_hang() { var Chuoi_XML = File.readFileSync(Duong_dan_Thu_muc_Du_lieu_Cuahang + Ten_Tap_tin_Cuahang, "UTF-8"); var Du_lieu = new DOMParser().parseFromString(Chuoi_XML, "text/xml"); return Du_lieu; } Doc_Du_lieu_Nhan_vien() { var Chuoi_XML = File.readFileSync(Duong_dan_Thu_muc_Du_lieu_Cuahang + Ten_Tap_tin_Nhanvien, "UTF-8"); var Du_lieu = new DOMParser().parseFromString(Chuoi_XML, "text/xml"); return Du_lieu; } Doc_Du_lieu_Danh_sach_Tivi() { var Du_lieu = [] File.readdirSync(Duong_dan_Thu_muc_Du_lieu_Tivi).forEach(file => { var Chuoi_XML = File.readFileSync(Duong_dan_Thu_muc_Du_lieu_Tivi + file, "UTF-8"); Du_lieu.push(new DOMParser().parseFromString(Chuoi_XML, "text/xml")) }) return Du_lieu; } Doc_Du_lieu_Tivi(Ma_so_Tivi) { var Chuoi_XML = File.readFileSync(Duong_dan_Thu_muc_Du_lieu_Tivi + Ma_so_Tivi + ".xml", "UTF-8"); var Du_lieu = new DOMParser().parseFromString(Chuoi_XML, "text/xml"); return Du_lieu; } Luu_Du_lieu(Du_lieu, Ma_so_Tivi) { var formattedXml = format.xml(new XMLSerializer().serializeToString(Du_lieu)); File.writeFileSync(Duong_dan_Thu_muc_Du_lieu_Tivi + Ma_so_Tivi + ".xml", formattedXml); } Luu_Du_lieu_Nhan_vien(Du_lieu) { var formattedXml = format.xml(new XMLSerializer().serializeToString(Du_lieu)); File.writeFileSync(Duong_dan_Thu_muc_Du_lieu_Cuahang + Ten_Tap_tin_Nhanvien, formattedXml); } } //============================= var Xu_ly = new XL_LUU_TRU(); module.exports = Xu_ly;
37.150943
105
0.728796
ac7ef4711c98b60e5b6513f37cba926e597d267c
524
js
JavaScript
webpack.config.local.js
beginner789/react-button-slider
44e072b44e087aab97f9afb19534a40191be6f9c
[ "MIT" ]
4
2021-02-08T07:35:55.000Z
2022-03-03T05:58:55.000Z
webpack.config.local.js
beginner789/react-button-slider
44e072b44e087aab97f9afb19534a40191be6f9c
[ "MIT" ]
null
null
null
webpack.config.local.js
beginner789/react-button-slider
44e072b44e087aab97f9afb19534a40191be6f9c
[ "MIT" ]
1
2021-02-24T09:16:20.000Z
2021-02-24T09:16:20.000Z
const path = require('path'); const { merge } = require('webpack-merge'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const config = require('./webpack.config'); module.exports = merge(config, { mode: 'development', entry: { main: './src/App.tsx', }, output: { publicPath: '/', filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist'), }, plugins: [ new HtmlWebpackPlugin({ template: './src/template.html', }), ], devServer: { open: true, }, });
20.96
57
0.599237
ac810e52e2fa936111369bb7ebfa57540eebb6bb
471
js
JavaScript
.storybook/webpack.config.js
bradtaniguchi/bradtaniguchi.github.io
34776bce19e27cb439659b005d10908ec9bcb135
[ "MIT" ]
1
2021-07-05T22:23:02.000Z
2021-07-05T22:23:02.000Z
.storybook/webpack.config.js
bradtaniguchi/bradtaniguchi.github.io
34776bce19e27cb439659b005d10908ec9bcb135
[ "MIT" ]
98
2021-05-29T23:52:13.000Z
2022-03-05T22:18:11.000Z
.storybook/webpack.config.js
bradtaniguchi/bradtaniguchi.github.io
34776bce19e27cb439659b005d10908ec9bcb135
[ "MIT" ]
null
null
null
/** * Export a function. Accept the base config as the only param. * @param {Object} options * @param {Required<import('webpack').Configuration>} options.config * @param {'DEVELOPMENT' | 'PRODUCTION'} options.mode - change the build configuration. 'PRODUCTION' is used when building the static version of storybook. */ module.exports = async ({ config, mode }) => { // Make whatever fine-grained changes you need // Return the altered config return config; };
39.25
155
0.713376
ac8138eb3c32c360a107f31a6189b6c6049e8db7
653
js
JavaScript
src/index.js
kenneth15/facturacion-kenneth
b73658392877f7e395ac4ca46f2de38f00d8154d
[ "MIT" ]
null
null
null
src/index.js
kenneth15/facturacion-kenneth
b73658392877f7e395ac4ca46f2de38f00d8154d
[ "MIT" ]
1
2022-01-22T12:26:08.000Z
2022-01-22T12:26:08.000Z
src/index.js
kenneth15/facturacion-kenneth
b73658392877f7e395ac4ca46f2de38f00d8154d
[ "MIT" ]
null
null
null
var User = require('../model/User') var root = { hello: () => 'Hello world agein!', me:() => { return {id: 5, name: 'YoniTores'} }, user: () => {return 'any user'}, setUser: ({username, password}) => { return new Promise((resolve, reject) => { const userYTorres = new User({username: username, password: password}); userYTorres.save().then((response)=>{ console.log('guarde user!'); console.log(response); resolve('saved u:'+ username + ' *:' + password); }).catch((error) => { console.error(error); }) }) } }; module.exports = root
26.12
77
0.514548
ac825d284416e830b9a1bccc0867e3a29d66eb95
1,394
js
JavaScript
app/Components/Children/Form.js
MonicaSzabo/CaptainCaption
df7715f87100a4b9d49d3155213763b73fa15115
[ "MIT" ]
null
null
null
app/Components/Children/Form.js
MonicaSzabo/CaptainCaption
df7715f87100a4b9d49d3155213763b73fa15115
[ "MIT" ]
null
null
null
app/Components/Children/Form.js
MonicaSzabo/CaptainCaption
df7715f87100a4b9d49d3155213763b73fa15115
[ "MIT" ]
null
null
null
// Include React var React = require('react'); // Component creation var Form = React.createClass({ // Here we set a generic state associated with the text being searched for getInitialState: function(){ return { topic: "", } }, // This function will respond to the user input handleChange: function(event){ // Here we create syntax to capture any change in text to the query terms (pre-search). var newState = {}; newState[event.target.id] = event.target.value; this.setState(newState); }, // When a user submits... handleClick: function(e){ e.preventDefault(); // Set the parent to have the search term this.props.setTerm(this.state.topic); }, // Here we render the function render: function(){ return( <div className="searchForm"> <form id="searching" onSubmit={this.handleClick}> <div className="input-field col s12"> <i className="material-icons prefix">search</i> <input id="topic" type="text" className="validate" onChange= {this.handleChange}/> <label htmlFor="topic">Search by Topic</label> </div> <div className="row center-align"> <button type="submit" className="btn btn-primary waves-effect waves-light btn" style={{backgroundColor:'#0081af'}}>Search</button> </div> </form> </div> ) } }); // Export the component back for use in other files module.exports = Form;
27.88
136
0.66858
ac8290e7c8ece0fd5cae875369df55c5925b3b93
708
js
JavaScript
studio/dashboardConfig.js
ctrleffive/chandujs.dev
0a7f8f72a77c1c34e5ba40dd22bb6c5721c5bdf1
[ "MIT" ]
7
2020-04-26T04:14:45.000Z
2020-12-24T13:14:22.000Z
studio/dashboardConfig.js
ctrleffive/chandujs.dev
0a7f8f72a77c1c34e5ba40dd22bb6c5721c5bdf1
[ "MIT" ]
3
2021-08-14T07:27:28.000Z
2021-08-14T07:27:29.000Z
studio/dashboardConfig.js
ctrleffive/ctrleffive
0a7f8f72a77c1c34e5ba40dd22bb6c5721c5bdf1
[ "MIT" ]
3
2020-04-26T04:14:54.000Z
2020-07-05T23:10:28.000Z
export default { widgets: [ {name: 'structure-menu'}, { name: 'document-list', options: {title: 'Work', order: '_createdAt desc', types: ['work']}, layout: {width: 'large'} }, { name: 'project-info', options: { data: [ { title: 'GitHub Repo', value: 'https://github.com/ctrleffive/chandujs.dev', category: 'Code' }, { title: 'Website', value: 'https://chandujs.dev', category: 'Website' }, { title: 'Blog', value: 'https://dev.to', category: 'Website' } ] } } ] }
21.454545
74
0.413842
ac833f30fcf228b5404b509fee3c25f077152f82
454
js
JavaScript
__tests__/foodModel.test.js
tripppdx/basic-api-server
7eaa759c0238b90adbd99ed4c743cf4de032da2a
[ "MIT" ]
null
null
null
__tests__/foodModel.test.js
tripppdx/basic-api-server
7eaa759c0238b90adbd99ed4c743cf4de032da2a
[ "MIT" ]
null
null
null
__tests__/foodModel.test.js
tripppdx/basic-api-server
7eaa759c0238b90adbd99ed4c743cf4de032da2a
[ "MIT" ]
1
2021-10-22T02:14:16.000Z
2021-10-22T02:14:16.000Z
'use strict'; const { db, food } = require('../model'); beforeAll(async () => { await db.sync(); }); afterAll(async () => { await db.drop(); }); describe('Testing our sequelize model', () => { it('Should be able to create a Food', async () => { let newFood = await food.create({ name: 'banana', calories: 200, }); console.log(newFood); expect(newFood.id).toBe(1); expect(newFood.name).toBe('banana'); }); });
18.16
53
0.561674
ac8399dfcacebf35eb50c679fb8922d96f66fdcf
3,835
js
JavaScript
src/main/webapp/META-INF/resources/js/feedbackanalysissummary.js
moveatis/moveo
8dd51ab9e65b09b541baeffa69b1f8523dba3729
[ "BSD-3-Clause" ]
null
null
null
src/main/webapp/META-INF/resources/js/feedbackanalysissummary.js
moveatis/moveo
8dd51ab9e65b09b541baeffa69b1f8523dba3729
[ "BSD-3-Clause" ]
1
2020-09-09T19:37:53.000Z
2020-09-09T19:37:53.000Z
src/main/webapp/META-INF/resources/js/feedbackanalysissummary.js
moveatis/moveo
8dd51ab9e65b09b541baeffa69b1f8523dba3729
[ "BSD-3-Clause" ]
null
null
null
/** * @fileOverview JavaScript methods for feedbackanalysis summary view. * @module feedbackanalysissummary * @author Tuomas Moisio * @author Visa Nykänen */ var URI; var arr = []; function save() { let checkBoxImage = document.getElementById('saveForm:basic:1'); let checkBoxImage2 = document .getElementById('saveForm:anonymityUserBoxes:1'); let filename = document.getElementById('saveForm:input-name').value; if (filename === "") { return; } if (checkBoxImage != null) { if (checkBoxImage.checked) { for (let i = 0; i < arr.length; i++) { saveAsImage(arr[i]); } } } if (checkBoxImage2 != null) { if (checkBoxImage2.checked) { for (let j = 0; j < arr.length; j++) { saveAsImage(arr[j]); } } } } function createImage() { exportChart2(); html2canvas(document.getElementById('tableImage')).then(function(canvas) { let array = []; arr = array; arr.push(canvas.toDataURL()); }); if (document.getElementById('charts:barChart_input').checked) { html2canvas(document.getElementById('barimages')).then( function(canvas) { arr.push(canvas.toDataURL()); }); } if (document.getElementById('charts:pieChart_input').checked) { html2canvas(document.getElementById('pieimages')).then( function(canvas) { arr.push(canvas.toDataURL()); }); } } /** * Sends an image through ajax to the servlet that handles images. * * @param URI * the base64-encoded image to be sent */ function sendImage(URI) { $.ajax({ url : "../../webapi/summary/image", type : "POST", dataType : "text", contentType : "text/plain", cache : false, data : URI, success : function(data) { }, error : function(xhr, status, error) { showError(msg.obs_errorCouldntSendData + ": " + error); this_.waiting = false; } }); } /** * Sends all the images created on the summary-page to the servlet that handles * them */ function sendImages() { html2canvas(document.getElementById('tableImage')).then(function(canvas) { let URI = "analtable," + canvas.toDataURL(); sendImage(URI) }); try { html2canvas(document.getElementById('piechartimage')).then( function(canvas) { let URI = "analpie," + canvas.toDataURL(); sendImage(URI) }); } catch (err) { } try { html2canvas(document.getElementById('barchartimage')).then( function(canvas) { let URI = "analbar," + canvas.toDataURL(); sendImage(URI) }); } catch (err) { } } $(document).ready(function() { sendImages(); }) $(window).load(function() { $('td.jqplot-table-legend-label').each(function(index) { $(this).attr('title', $(this).text()); }); $(document).tooltip(); }); function saveAsImage(dataURL) { var filename; var filenameRaw; try { filenameRaw = document.getElementById('saveForm:input-name').value; if (filenameRaw === "") { return; } filename = filenameRaw.replace(/\./g, '-'); } catch (err) { filename = 'summary.png'; } var link = document.createElement('a'); if (typeof link.download === 'string') { link.href = dataURL; link.download = filename; // Firefox requires the link to be in the body document.body.appendChild(link); // simulate click link.click(); // remove the link when done document.body.removeChild(link); } else { window.open(URI); } } function exportChart2() { let count = document.getElementById('chartCount').innerHTML; for (let index = 0; index < count; index++) { let b = 'piechart' + index; let a = 'barchart' + index; let linebreak = document.createElement('br'); if (document.getElementById('charts:pieChart_input').checked) { document.getElementById('pieimages').append(PF(b).exportAsImage()); } if (document.getElementById('charts:barChart_input').checked) { document.getElementById('barimages').append(PF(a).exportAsImage()); } } }
23.67284
79
0.656063
ac839fa7d845673f430c27c7e6a0de06538343f8
2,190
js
JavaScript
frontend/src/app/utils/focus-utils.js
eshelmarc/noobaa-core
a1db60038170f253ebc7049860b652999bea9d25
[ "Apache-2.0" ]
178
2019-05-07T21:09:12.000Z
2022-03-24T06:17:51.000Z
frontend/src/app/utils/focus-utils.js
eshelmarc/noobaa-core
a1db60038170f253ebc7049860b652999bea9d25
[ "Apache-2.0" ]
761
2019-05-13T09:35:59.000Z
2022-03-31T18:18:06.000Z
frontend/src/app/utils/focus-utils.js
eshelmarc/noobaa-core
a1db60038170f253ebc7049860b652999bea9d25
[ "Apache-2.0" ]
57
2019-05-30T13:41:29.000Z
2022-02-20T17:13:01.000Z
/* Copyright (C) 2016 NooBaa */ const query = [ 'input', 'select', 'textarea', 'a', 'button', '[tabindex]' ].join(','); function _compareFocusOrder(p1, p2) { return false || (p1[0] === p2[0] && p1[1] - p2[1]) || (p1[0] === 0 && 1) || (p2[0] === 0 && -1) || (p1[0] - p2[0]); } function _listFocusable(container) { const focusables = Array.from(container.querySelectorAll(query)); return focusables .map((elm, i) => [elm.tabIndex, i]) .sort(_compareFocusOrder) .map(([,i]) => focusables[i]); } function _canBeFocused(elm) { const { tabIndex, disabled, offsetParent } = elm; return Boolean(offsetParent) && tabIndex !== null && tabIndex >= 0 && !disabled; } function _findFocusableIn(container, fromElm, dir, n, cyclic) { const focusables = _listFocusable(container); const count = focusables.length; let index = focusables.findIndex(other => fromElm === other); let candidate = null; let last = null; do { index = cyclic ? (count + index + dir) % count : index + dir; candidate = focusables[index]; if (candidate && _canBeFocused(candidate)) { last = candidate; --n; } } while (candidate && candidate !== fromElm && n > 0); return last; } export function findFirstFocusableIn(container) { return _listFocusable(container) .find(_canBeFocused); } export function findLastFocusableIn(container) { return _listFocusable(container) .reverse() .find(_canBeFocused); } export function findPrevFocusableIn(container, fromElm, cyclic = false) { return _findFocusableIn(container, fromElm, -1, 1, cyclic); } export function findNextFocusableIn(container, fromElm, cyclic = false) { return _findFocusableIn(container, fromElm, 1, 1, cyclic); } export function findNthPrevFocusableIn(container, fromElm, n, cyclic = false) { return _findFocusableIn(container, fromElm, -1, n, cyclic); } export function findNthNextFocusableIn(container, fromElm, n, cyclic = false) { return _findFocusableIn(container, fromElm, 1, n, cyclic); }
26.385542
79
0.621461
ac8418ef85ad5749228647b4a737e2a038eb9809
2,220
js
JavaScript
client.js
jfseb/jfseb-rgb-colorgradient
387c011c63c310ea4f085edde355c976c8fe21ed
[ "Apache-2.0" ]
null
null
null
client.js
jfseb/jfseb-rgb-colorgradient
387c011c63c310ea4f085edde355c976c8fe21ed
[ "Apache-2.0" ]
null
null
null
client.js
jfseb/jfseb-rgb-colorgradient
387c011c63c310ea4f085edde355c976c8fe21ed
[ "Apache-2.0" ]
null
null
null
//alert("what"); function RGB2Color(r,g,b) { return '#' + byte2Hex(r) + byte2Hex(g) + byte2Hex(b); } function byte2Hex(n) { var nybHexString = "0123456789ABCDEF"; return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1); } function makeColorP(frequency1, frequency2, frequency3, phase1, phase2, phase3, center, width, i) { if (center == undefined) center = 128; if (width == undefined) width = 127; var red = Math.sin(frequency1*i + phase1) * width + center; var grn = Math.sin(frequency2*i + phase2) * width + center; var blu = Math.sin(frequency3*i + phase3) * width + center; return RGB2Color(red,grn,blu); } function makeColorGradient(frequency1, frequency2, frequency3, phase1, phase2, phase3, center, width, len) { if (center == undefined) center = 128; if (width == undefined) width = 127; if (len == undefined) len = 50; for (var i = 0; i < len; ++i) { var red = Math.sin(frequency1*i + phase1) * width + center; var grn = Math.sin(frequency2*i + phase2) * width + center; var blu = Math.sin(frequency3*i + phase3) * width + center; document.write( '<font color="' + RGB2Color(red,grn,blu) + '">&#9608;</font>'); } } var freq = Math.PI/50; // makeColorGradient(freq,freq,freq,0,2,4,127,127,50); // document.write('<br/>'); // makeColorGradient(freq,freq,freq,0,2,4,200,55,50); function makeColor(sF) { var freq = Math.PI/50; return makeColorP(freq,freq,freq,0,2,4,127,127, sF *50.0); }; function makeGradientHTML() { var s = ""; for( var k = 0; k < 1; k += 0.05) { s = s + '<font color="' + makeColor(k) + '">&#9608;</font>'; } return s; } /** * Escape special characters in the given string of html. * * @param {String} html * @return {String} */ module.exports = { makeColor : makeColor, /** * Unescape special characters in the given string of html. * * @param {String} html * @return {String} */ makeGradientHTML : makeGradientHTML };
26.746988
92
0.566667
ac844dfef759b1afda368921a85be9bd9599fe67
551
js
JavaScript
dataBase/util/db.js
qiuChengleiy/node-mysql-package
a71c52b8656c45806bf08c736e7f732880bac5d9
[ "Apache-2.0" ]
2
2018-04-07T07:04:51.000Z
2019-08-28T16:24:11.000Z
dataBase/util/db.js
qiuChengleiy/node-mysql-package
a71c52b8656c45806bf08c736e7f732880bac5d9
[ "Apache-2.0" ]
null
null
null
dataBase/util/db.js
qiuChengleiy/node-mysql-package
a71c52b8656c45806bf08c736e7f732880bac5d9
[ "Apache-2.0" ]
null
null
null
//引入模块 const mysql = require('mysql'); //创建链接池 const pool = mysql.createPool({ host: '127.0.0.1', user: 'root', password: 'root', port: '3306', database: 'nodejs' }); //数据库操作接口封装 let query = function( sql, value ) { return new Promise(( resolve, reject ) => { pool.getConnection(function( err, connection ) { if( err ) { reject( err ) } else { connection.query( sql, value, ( err, rows ) => { if ( err ) { reject( err ) } else { resolve( rows ) } }); } }) }) }; module.exports = { query }
16.205882
52
0.548094
ac84a8a6c4de9b2d1cb270732f2453d006781f4c
41,191
js
JavaScript
static/lib/dhtmlx/codebase/dhtmlx_deprecated.js
dariomatiasportal/consesionaria
2417985ac7bd6973925151992a1c5351d7178df8
[ "MIT" ]
null
null
null
static/lib/dhtmlx/codebase/dhtmlx_deprecated.js
dariomatiasportal/consesionaria
2417985ac7bd6973925151992a1c5351d7178df8
[ "MIT" ]
null
null
null
static/lib/dhtmlx/codebase/dhtmlx_deprecated.js
dariomatiasportal/consesionaria
2417985ac7bd6973925151992a1c5351d7178df8
[ "MIT" ]
null
null
null
/* Product Name: dhtmlxSuite Version: 4.2.1 Edition: Standard License: content of this file is covered by GPL. Usage outside GPL terms is prohibited. To obtain Commercial or Enterprise license contact sales@dhtmlx.com Copyright UAB Dinamenta http://www.dhtmlx.com */ dhtmlXCalendarObject.prototype.draw=function(){this.show()};dhtmlXCalendarObject.prototype.close=function(){this.hide()};dhtmlXCalendarObject.prototype.setYearsRange=function(){};dhtmlXCombo.prototype.loadXML=function(a,b){this.load(a,b)};dhtmlXCombo.prototype.loadXMLString=function(a){this.load(a)};dhtmlXCombo.prototype.enableOptionAutoHeight=function(){};dhtmlXCombo.prototype.enableOptionAutoPositioning=function(){};dhtmlXCombo.prototype.enableOptionAutoWidth=function(){};dhtmlXCombo.prototype.destructor=function(){this.unload()};dhtmlXCombo.prototype.render=function(){};dhtmlXCombo.prototype.setOptionHeight=function(){};dhtmlXCombo.prototype.attachChildCombo=function(){};dhtmlXCombo.prototype.setAutoSubCombo=function(){};window.dhtmlXColorPickerInput=function(){return dhtmlXColorPicker.apply(window,arguments)};dhtmlXColorPicker.prototype.init=function(){};dhtmlXColorPicker.prototype.setOnSelectHandler=function(a){if(typeof a=="function"){this.attachEvent("onSelect",a)}};dhtmlXColorPicker.prototype.setOnCancelHandler=function(a){if(typeof a=="function"){this.attachEvent("onCancel",a)}};dhtmlXColorPicker.prototype._mergeLangModules=function(){if(typeof dhtmlxColorPickerLangModules!="object"){return}for(var a in dhtmlxColorPickerLangModules){this.i18n[a]=dhtmlxColorPickerLangModules[a]}};window.dhtmlxColorPickerLangModules=dhtmlXColorPicker.prototype.i18n;dhtmlXColorPicker.prototype.close=function(){this.hide()};dhtmlXColorPicker.prototype.setImagePath=function(a){};dhtmlXMenuObject.prototype.loadXML=function(a,b){this.loadStruct(a,b)};dhtmlXMenuObject.prototype.loadXMLString=function(b,a){this.loadStruct(b,a)};dhtmlXMenuObject.prototype.setIconPath=function(a){this.setIconsPath(a)};dhtmlXMenuObject.prototype.setImagePath=function(){};dhtmlXToolbarObject.prototype.loadXML=function(a,b){this.loadStruct(a,b)};dhtmlXToolbarObject.prototype.loadXMLString=function(b,a){this.loadStruct(b,a)};dhtmlXToolbarObject.prototype.setIconPath=function(a){this.setIconsPath(a)};dhtmlXTreeObject.prototype.addPath=function(b,e,c,h){this.activatePaths();c=c||{};var d=[];var g=null;var f=this._idpull[e];var a=this._idpull[b];while(a!=g){d.push({open:this._getOpenState(f),from:f.id,size:(g?this._getIndex(g):0),to:(g?g.id:null),style:"border-left:"+(c.width||1)+"px "+(c.mode||"solid")+" "+(c.color||"red")+"; border-bottom:"+(c.width||1)+"px "+(c.mode||"solid")+" "+(c.color||"red")+";"});g=f;f=f.parentObject}while(!h||this._pathspull[h]){h=(h||0)+1}this._pathspull[h]={path:d,id:h};this._paths.push(this._pathspull[h]);this._renderPath(this._pathspull[h])};dhtmlXTreeObject.prototype.activatePaths=function(a){var b=this;this.attachEvent("onOpenEnd",function(){for(var c=0;c<b._paths.length;c++){b._clearPath(b._paths[c]);b._renderPath(b._paths[c])}});this.attachEvent("onXLE",function(e){var d=dhx4.ajax.xpath("//pathend",e);var h=dhx4.ajax.xpath("//pathstart",e);var g={};for(var f=0;f<h.length;f++){g[h[f].getAttribute("id")]=h[f]}for(var f=0;f<h.length;f++){var c=d[f].parentNode;var j=g[d[f].getAttribute("id")];this.addPath(j.parentNode.getAttribute("id"),c.getAttribute("id"),{color:j.getAttribute("color"),mode:j.getAttribute("mode"),width:j.getAttribute("width")},j.getAttribute("id"))}});if(a){this._halfHeight=a}else{if(this._idpull[0].childsCount){this._halfHeight=Math.floor(this._idpull[0].childNodes[0].span.parentNode.offsetHeight/2)}}if(!this._halfHeight){this._halfHeight=9}this.activatePaths=function(){}};dhtmlXTreeObject.prototype._clearPath=function(c){for(var b=c.path.length-1;b>0;b--){var a=c.path[b];if(a._html){a._html.parentNode.removeChild(a._html)}a._html=null}};dhtmlXTreeObject.prototype._renderPath=function(g){var k=this._idpull[g.path[g.path.length-1].from].span.parentNode.parentNode;var f=(_isIE?9:8)+this._halfHeight;var e=(_isIE?27:27);while(k.offsetParent!=this.allTree){f+=k.offsetTop;e+=k.offsetLeft;k=k.offsetParent}for(var b=g.path.length-1;b>0;b--){var a=g.path[b];var h=document.createElement("div");if(!this._idpull[a.to].tr.offsetHeight){return}var j=this._idpull[a.to].tr.offsetTop;h.style.cssText="position:absolute; z-index:1; width:"+(_isIE?10:8)+"px; height:"+(j-9)+"px; left:"+e+"px; top:"+f+"px;"+a.style;f+=j;e+=18;this.allTree.appendChild(h);a._html=h}};dhtmlXTreeObject.prototype.deletePath=function(c){var b=this._pathspull[c];if(b){this._clearPath(b);delete this._pathspull[c];for(var a=0;a<this._paths.length;a++){if(this._paths[a]==b){return this._paths.splice(a,1)}}}};dhtmlXTreeObject.prototype.deleteAllPaths=function(b){for(var a=this._paths.length-1;a>=0;a--){this.deletePath(this._paths[a].id)}};dhtmlXTreeObject.prototype._paths=[];dhtmlXTreeObject.prototype._pathspull={};dhtmlXTreeObject.prototype.enableSmartRendering=function(){this.enableSmartXMLParsing(true);this._srnd=true;this.itemHeight=18;var a=this;this.allTree.onscroll=function(){if(a._srndT){return}a._srndT=window.setTimeout(function(){a._srndT=null;a._renderState()},300)};this.attachEvent("onXLE",function(){a._renderState()});this._singleTimeSRND()};dhtmlXTreeObject.prototype._renderState=function(){if(!this._idpull[this.rootId]._sready){this.prepareSR(this.rootId,true)}var b=this.allTree.scrollTop;var c=Math.floor(b/this.itemHeight);var a=Math.ceil(this.allTree.offsetHeight/this.itemHeight);this._group_render=true;this._getItemByPos(b,this.itemHeight,a,null,false,this._renderItemSRND);this._group_render=false};dhtmlXTreeObject.prototype._renderItemSRND=function(k,j){if(!k.span){k.span=-1;var f=k.parentObject.htmlNode.childNodes[0].childNodes;var e=j*this.itemHeight;var l=null;for(var c=1;c<f.length;c++){l=f[c];var g=l.nodem?this.itemHeight:(l.offsetHeight||parseInt(l.childNodes[1].firstChild.style.height));e-=g;if(e<0){if(e==-1){e++;continue}var d=l.childNodes[1].firstChild;d.style.height=(parseInt(d.style.height)-(g-Math.abs(e)+this.itemHeight))+"px";if(Math.abs(e)!=g){var n=this._drawNewHolder(e+g,true);l.parentNode.insertBefore(n,l)}l.tr={nextSibling:l};break}}if(d&&d.style.height!="0px"&&!l.offsetHeight){var m=this._hAdI;this._hAdI=true}this._parseItem(k._sxml,k.parentObject,null,l);if(d&&d.style.height!="0px"&&!l.offsetHeight){this._hAdI=m}if(k.unParsed){this._correctPlus(k)}if(d&&d.style.height=="0px"){l.parentNode.removeChild(l)}}};dhtmlXTreeObject.prototype._buildSRND=function(b,a){if(b.parentObject){this._globalIdStorageFind(b.parentObject.id)}if(!this._idpull[this.rootId]._sready){this.prepareSR(this.rootId,true)}this._renderItemSRND(b,this._getIndex(b));if((b.unParsed)&&(!a)){this.reParse(b,0)}if(!b.prepareSR){this.prepareSR(b.id)}};dhtmlXTreeObject.prototype._getIndex=function(c){for(var b=0;b<c.parentObject.childsCount;b++){if(c.parentObject.childNodes[b]==c){return b}}};dhtmlXTreeObject.prototype.prepareSR=function(a,c){a=this._idpull[a];if(a._sready){return}var b=this._drawNewHolder(this.itemHeight*a.childsCount,c);a.htmlNode.childNodes[0].appendChild(b);a._sready=true};dhtmlXTreeObject.prototype._drawNewHolder=function(e,g){var d=document.createElement("TR");var a=document.createElement("TD");var c=document.createElement("TD");var f=document.createElement("DIV");f.innerHTML="&nbsp;";a.appendChild(f);d.appendChild(c);d.appendChild(a);if(!g){d.style.display="none"}f.style.height=e+"px";return d};dhtmlXTreeObject.prototype._getNextNodeSR=function(a,b){if((!b)&&(a.childsCount)){return a.childNodes[0]}if(a==this.htmlNode){return -1}if((a.tr)&&(a.tr.nextSibling)&&(a.tr.nextSibling.nodem)){return a.tr.nextSibling.nodem}return this._getNextNode(a.parentObject,true)};dhtmlXTreeObject.prototype._getItemByPos=function(k,e,b,d,a,g){if(!d){this._pos_c=k;d=this._idpull[this.rootId]}for(var c=0;c<d.childsCount;c++){this._pos_c-=e;if(this._pos_c<=0){a=true}if(a){g.apply(this,[d.childNodes[c],c]);b--}if(b<0){return b}if(d.childNodes[c]._open){b=this._getItemByPos(null,e,b,d.childNodes[c],a,g);if(b<0){return b}}}return b};dhtmlXTreeObject.prototype._addItemSRND=function(b,f,e){var c=this._idpull[b];var a=c.childsCount;var d=c.childNodes;d[a]=new dhtmlXTreeItemObject(f,"",c,this,null,1);itemId=d[a].id;d[a]._sxml=e.clone();c.childsCount++};dhtmlXTreeObject.prototype._singleTimeSRND=function(){this._redrawFrom=function(){};var a=dhtmlXTreeItemObject;this._singleTimeSRND=function(){};window.dhtmlXTreeItemObject=function(g,c,d,b,e,f){if(!b._srnd){return a.call(this,g,c,d,b,e,f)}this.htmlNode="";this.acolor="";this.scolor="";this.tr=0;this.childsCount=0;this.tempDOMM=0;this.tempDOMU=0;this.dragSpan=0;this.dragMove=0;this.span=0;this.closeble=1;this.childNodes=new Array();this.userData=new cObject();this.checkstate=0;this.treeNod=b;this.label=c;this.parentObject=d;this.actionHandler=e;this.images=new Array(b.imageArray[0],b.imageArray[1],b.imageArray[2]);this.id=b._globalIdStorageAdd(g,this);if(g==b.rootId){if(this.treeNod.checkBoxOff){this.htmlNode=this.treeNod._createItem(1,this,f)}else{this.htmlNode=this.treeNod._createItem(0,this,f)}this.htmlNode.objBelong=this}return this};this.setCheckSR=this.setCheck;this.setCheck=function(c,b){this._globalIdStorageFind(c);return this.setCheckSR(c,b)};this._get_srnd_p=function(e){var d=[];while(e!=this.rootId){var b=this.getParentId(e);for(var c=0;c<this._idpull[b].childsCount;c++){if(this._idpull[b].childNodes[c].id==e){d.push([b,c]);break}}e=b}d.reverse();return d};this._get_srnd_p_last=function(f,d,b){d=d||[];var e=0;while(true){var c=this._idpull[f];if(c._sxml&&this.findStrInXML(c._sxml.d,"text",b)){this._globalIdStorageFind(c.id)}var e=c.childsCount;if(!e){break}d.push([f,e-1]);f=c.childNodes[e-1].id}return d};this._get_prev_srnd=function(e,b){var c;if(!e.length){e.push.apply(e,this._get_srnd_p_last(this.rootId,null,b));c=e[e.length-1];return this._idpull[c[0]].childNodes[c[1]]}c=e[e.length-1];if(c[1]){c[1]--;var d=this._idpull[c[0]].childNodes[c[1]];this._get_srnd_p_last(d.id,e,b);var c=e[e.length-1];return this._idpull[c[0]].childNodes[c[1]]}else{e.pop();if(!e.length){return this._get_prev_srnd(e,b)}var c=e[e.length-1];return this._idpull[c[0]].childNodes[c[1]]}};this._get_next_srnd=function(e,c){if(!e.length){e.push([this.rootId,0]);return this._idpull[this.rootId].childNodes[0]}var b=e[e.length-1];var d=this._idpull[b[0]].childNodes[b[1]];if(d.childsCount&&!c){e.push([d.id,0]);return d.childNodes[0]}b[1]++;var d=this._idpull[b[0]].childNodes[b[1]];if(d){return d}e.pop();if(!e.length){return this.htmlNode}return this._get_next_srnd(e,true)};this._findNodeByLabel=function(b,f,d){var b=b.replace(new RegExp("^( )+"),"").replace(new RegExp("( )+$"),"");b=new RegExp(b.replace(/([\*\+\\\[\]\(\)]{1})/gi,"\\$1").replace(/ /gi,".*"),"gi");if(!d){d=this._selected[0];if(!d){d=this.htmlNode}}var c=d;var e=this._get_srnd_p(c.id);while(d=(f?this._get_prev_srnd(e,b):this._get_next_srnd(e))){if(d.label){if(d.label.search(b)!=-1){return d}}else{if(d._sxml){if(d._sxml.get("text").search(b)!=-1){return d}if(this.findStrInXML(d._sxml.d,"text",b)){this._globalIdStorageFind(d.id)}}}if((d.unParsed)&&(this.findStrInXML(d.unParsed.d,"text",b))){this.reParse(d)}if(c.id==d.id){break}if(f&&e.length==1&&e[0][1]==0){break}}return null};this.deleteChildItems=function(b){if(this.rootId==b){this._selected=new Array();this._idpull={};this._p=this._pos_c=this._pullSize=null;this.allTree.removeChild(this.htmlNode.htmlNode);this.htmlNode=new dhtmlXTreeItemObject(this.rootId,"",0,this);this.htmlNode.htmlNode.childNodes[0].childNodes[0].style.display="none";this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[0].className="hiddenRow";this.allTree.insertBefore(this.htmlNode.htmlNode,this.selectionBar);if(_isFF){this.allTree.childNodes[0].width="100%";this.allTree.childNodes[0].style.overflow="hidden"}}};this._HideShow=function(c,g){if((this.XMLsource)&&(!c.XMLload)){if(g==1){return}c.XMLload=1;this._loadDynXML(c.id);return}if(!c.span){this._buildSRND(c)}if(c.unParsed){this.reParse(c);this.prepareSR(c.id)}if(c.childsCount==0){return}var f=c.htmlNode.childNodes[0].childNodes;var b=f.length;if(b>1){if(((f[1].style.display!="none")||(g==1))&&(g!=2)){this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";var e="none";c._open=false}else{var e="";c._open=true}for(var d=1;d<b;d++){f[d].style.display=e}this._renderState()}this._correctPlus(c)}};dhtmlXGridObject.prototype.hidePivot=function(a){if(this._pgridCont){if(this._pgrid){this._pgrid.destructor()}var b=this._pgridCont.parentNode;b.innerHTML="";if(b.parentNode==this.entBox){this.entBox.removeChild(b)}this._pgrid=this._pgridSelect=this._pUNI=this._pgridCont=null}};dhtmlXGridObject.prototype.makePivot=function(j,a){a=a||{};this.hidePivot();if(!j){var j=document.createElement("DIV");j.style.cssText="position:absolute; top:0px; left:0px;background-color:white;";j.style.height=this.entBox.offsetHeight+"px";j.style.width=this.entBox.offsetWidth+"px";if(this.entBox.style.position!="absolute"){this.entBox.style.position="relative"}this.entBox.appendChild(j)}if(typeof(j)!="object"){j=document.getElementById(j)}if(a.column_list){this._column_list=a.column_list}else{this._column_list=[];for(var g=0;g<this.hdr.rows[1].cells.length;g++){this._column_list.push(this.hdr.rows[1].cells[g][_isIE?"innerText":"textContent"])}}var h=this;j.innerHTML="<table cellspacing='0' cellpadding='0'><tr><td style='width:160px' align='center'></td><td>&nbsp;&nbsp;&nbsp;</td><td></td></tr></table><div></div>";var f=this.makePivotSelect(this._column_list);f.style.width="80px";f.onchange=function(){if(this.value!=-1){h._pivotS.value=this.value}else{h._pivotS.value=""}h._reFillPivotLists();h._renderPivot2()};var e=this.makePivotSelect(this._column_list);e.onchange=function(){if(this.value!=-1){h._pivotS.x=this.value}else{h._pivotS.x=""}h._reFillPivotLists();h._renderPivot()};var d=this.makePivotSelect(this._column_list);d.onchange=function(){if(this.value!=-1){h._pivotS.y=this.value}else{h._pivotS.y=""}h._reFillPivotLists();h._renderPivot()};var c=this.makePivotSelect(["Sum","Min","Max","Average","Count"],-1);c.style.width="70px";c.onchange=function(){if(this.value!=-1){h._pivotS.action=this.value}else{h._pivotS.action=null}h._renderPivot2()};if(a.readonly){f.disabled=e.disabled=d.disabled=c.disabled=true}j.firstChild.rows[0].cells[0].appendChild(c);j.firstChild.rows[0].cells[0].appendChild(f);j.firstChild.rows[0].cells[2].appendChild(e);var b=j.childNodes[1];b.style.width=j.offsetWidth+"px";b.style.height=j.offsetHeight-20+"px";b.style.overflow="hidden";this._pgridCont=b;this._pgridSelect=[f,e,d,c];this._pData=this._fetchPivotData();this._pUNI=[];this._pivotS={action:(a.action||"0"),value:(typeof a.value!="undefined"?(a.value||"0"):null),x:(typeof a.x!="undefined"?(a.x||"0"):null),y:(typeof a.y!="undefined"?(a.y||"0"):null)};f.value=this._pivotS.value;e.value=this._pivotS.x;d.value=this._pivotS.y;c.value=this._pivotS.action;h._reFillPivotLists();this._renderPivot()};dhtmlXGridObject.prototype._fetchPivotData=function(){var e=[];for(var b=0;b<this._cCount;b++){var c=[];for(var a=0;a<this.rowsCol.length;a++){if(this.rowsCol[a]._cntr){continue}c.push(this.cells2(a,b).getValue())}e.push(c)}return e};dhtmlXGridObject.prototype._renderPivot=function(){if(_isIE){this._pgridSelect[2].removeNode(true)}if(this._pgrid){this._pgrid.destructor()}this._pgrid=new dhtmlXGridObject(this._pgridCont);this._pgrid.setImagePath(this.imgURL);this._pgrid.attachEvent("onBeforeSelect",function(){return false});if(this._pivotS.x){var a=this._getUniList(this._pivotS.x);var d=[160];for(var c=0;c<a.length;c++){d.push(100)}a=[""].concat(a);this._pgrid.setHeader(a);this._pgrid.setInitWidths(d.join(","))}else{this._pgrid.setHeader("");this._pgrid.setInitWidths("160")}this._pgrid.init();this._pgrid.setEditable(false);this._pgrid.setSkin(this.entBox.className.replace("gridbox gridbox_",""));var b=this._pgrid.hdr.rows[1].cells[0];if(b.firstChild&&b.firstChild.tagName=="DIV"){b=b.firstChild}b.appendChild(this._pgridSelect[2]);this._pgrid.setSizes();if(this._pivotS.y){var a=this._getUniList(this._pivotS.y);for(var c=0;c<a.length;c++){this._pgrid.addRow(this._pgrid.uid(),[a[c]],-1)}}else{this._pgrid.addRow(1,"not ready",1)}this._renderPivot2()};dhtmlXGridObject.prototype._pivot_action_0=function(n,m,l,d,o,j){var k=0;var g=j[n];var f=j[m];var e=j[l];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==o){k+=this.parseFloat(e[h])}}return k};dhtmlXGridObject.prototype._pivot_action_1=function(m,l,k,d,n,j){ret=9999999999;var g=j[m];var f=j[l];var e=j[k];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==n){ret=Math.min(this.parseFloat(e[h]),ret)}}if(ret==9999999999){ret=""}return ret};dhtmlXGridObject.prototype._pivot_action_2=function(m,l,k,d,n,j){ret=-9999999999;var g=j[m];var f=j[l];var e=j[k];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==n){ret=Math.max(this.parseFloat(e[h]),ret)}}if(ret==-9999999999){ret=""}return ret};dhtmlXGridObject.prototype._pivot_action_3=function(o,n,m,d,p,j){var l=0;var k=0;var g=j[o];var f=j[n];var e=j[m];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==p){l+=this.parseFloat(e[h]);k++}}return k?l/k:""};dhtmlXGridObject.prototype._pivot_action_4=function(o,n,m,d,p,j){var l=0;var k=0;var g=j[o];var f=j[n];var e=j[m];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==p){l++}}return l};dhtmlXGridObject.prototype.parseFloat=function(a){a=parseFloat(a);if(isNaN(a)){return 0}return a};dhtmlXGridObject.prototype._renderPivot2=function(){if(!(this._pivotS.x&&this._pivotS.y&&this._pivotS.value&&this._pivotS.action)){return}var d=this["_pivot_action_"+this._pivotS.action];var a=this._getUniList(this._pivotS.x);var e=this._getUniList(this._pivotS.y);for(var c=0;c<a.length;c++){for(var b=0;b<e.length;b++){this._pgrid.cells2(b,c+1).setValue(Math.round(d(this._pivotS.x,this._pivotS.y,this._pivotS.value,a[c],e[b],this._pData)*100)/100)}}};dhtmlXGridObject.prototype._getUniList=function(c){if(!this._pUNI[c]){var e={};var b=[];for(var d=this._pData[c].length-1;d>=0;d--){e[this._pData[c][d]]=true}for(var f in e){if(e[f]===true){b.push(f)}}this._pUNI[c]=b.sort()}return this._pUNI[c]};dhtmlXGridObject.prototype._fillPivotList=function(e,d,c,a){if(!c){c={};a=-1}e.innerHTML="";e.options[e.options.length]=new Option("-select-",-1);for(var b=0;b<d.length;b++){if(c[b]||d[b]===null){continue}e.options[e.options.length]=new Option(d[b],b)}e.value=parseInt(a)};dhtmlXGridObject.prototype._reFillPivotLists=function(){var e=[];var b=[];for(var d=0;d<3;d++){e.push(this._pgridSelect[d]);b.push(e[d].value)}var c=this._reFfillPivotLists;var a={};a[b[1]]=a[b[2]]=true;this._fillPivotList(e[0],this._column_list,a,b[0]);a={};a[b[0]]=a[b[2]]=true;this._fillPivotList(e[1],this._column_list,a,b[1]);a={};a[b[1]]=a[b[0]]=true;this._fillPivotList(e[2],this._column_list,a,b[2]);this._reFfillPivotLists=c};dhtmlXGridObject.prototype.makePivotSelect=function(b,a){var c=document.createElement("SELECT");this._fillPivotList(c,b,a);c.style.cssText="width:150px; height:20px; font-family:Tahoma; font-size:8pt; font-weight:normal;";return c};function eXcell_dec(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.getValue=function(){return parseFloat(this.cell.innerHTML.replace(/,/g,""))};this.setValue=function(h){var f="0,000.00";if(h=="0"){this.setCValue(f.replace(/.*(0\.[0]+)/,"$1"),h);return}var g=f.substr(f.indexOf(".")+1).length;h=Math.round(h*Math.pow(10,g)).toString();var b="";var d=0;var e=false;for(var c=h.length-1;c>=0;c--){d++;b=h.charAt(c)+b;if(!e&&d==g){b="."+b;d=0;e=true}if(e&&d==3&&c!=0&&h.charAt(c-1)!="-"){b=","+b;d=0}}this.setCValue(b,h)}}eXcell_dec.prototype=new eXcell_ed;function eXcell_cor(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid;this.combo=this.grid.getCombo(this.cell._cellIndex);this.editable=true}this.shiftNext=function(){var b=this.list.options[this.list.selectedIndex+1];if(b){b.selected=true}this.obj.value=this.list.value;return true};this.shiftPrev=function(){var b=this.list.options[this.list.selectedIndex-1];if(b){b.selected=true}this.obj.value=this.list.value;return true};this.edit=function(){this.val=this.getValue();this.text=this.cell.innerHTML._dhx_trim();var d=this.grid.getPosition(this.cell);this.obj=document.createElement("TEXTAREA");this.obj.className="dhx_combo_edit";this.obj.style.height=(this.cell.offsetHeight-4)+"px";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(g){(g||event).cancelBubble=true};this.obj.value=this.text;this.list=document.createElement("SELECT");this.list.editor_obj=this;this.list.className="dhx_combo_select";this.list.style.width=this.cell.offsetWidth+"px";this.list.style.left=d[0]+"px";this.list.style.top=d[1]+this.cell.offsetHeight+"px";this.list.onclick=function(i){var h=i||window.event;var g=h.target||h.srcElement;if(g.tagName=="OPTION"){g=g.parentNode}if(g.value!=-1){g.editor_obj._byClick=true;g.editor_obj.editable=false;g.editor_obj.grid.editStop()}else{h.cancelBubble=true;g.editor_obj.obj.value="";g.editor_obj.obj.focus()}};var b=this.combo.getKeys();var f=0;this.list.options[0]=new Option(this.combo.get(b[0]),b[0]);this.list.options[0].selected=true;for(var c=1;c<b.length;c++){var e=this.combo.get(b[c]);this.list.options[this.list.options.length]=new Option(e,b[c]);if(b[c]==this.val){f=this.list.options.length-1}}document.body.appendChild(this.list);this.list.size="6";this.cstate=1;if(this.editable){this.cell.innerHTML=""}else{this.obj.style.width="1px";this.obj.style.height="1px"}this.cell.appendChild(this.obj);this.list.options[f].selected=true;if(this.editable){this.obj.focus();this.obj.focus()}if(!this.editable){this.obj.style.visibility="hidden"}};this.getValue=function(){return((this.cell.combo_value==window.undefined)?"":this.cell.combo_value)};this.getText=function(){return this.cell.innerHTML};this.getState=function(){return{prev:this.cell.__prev,now:this.cell.__now}};this.detach=function(){if(this.val!=this.getValue()){this.cell.wasChanged=true}if(this.list.parentNode!=null){if((this.obj.value._dhx_trim()!=this.text)||(this._byClick)){var b=this.list.value;if(!this._byClick){this.combo.values[this.combo.keys._dhx_find(b)]=this.obj.value}this.setValue(b)}else{this.setValue(this.val)}}if(this.list.parentNode){this.list.parentNode.removeChild(this.list)}if(this.obj.parentNode){this.obj.parentNode.removeChild(this.obj)}return this.val!=this.getValue()}}eXcell_cor.prototype=new eXcell;eXcell_cor.prototype.setValue=function(b){if((b||"").toString()._dhx_trim()==""){b=null}var a=this.grid.getCombo(this.cell._cellIndex).get(b);if((b==-1)&&(a=="")){this.combo.values[this.combo.keys._dhx_find(-1)]="Create new value";b=null}if(b!==null){this.setCValue(a,b)}else{this.setCValue("&nbsp;",b)}this.cell.__prev=this.cell.__now;this.cell.__now={key:b,value:a};this.cell.combo_value=b};function eXcell_wbut(a){this.cell=a;this.grid=this.cell.parentNode.grid;this.edit=function(){var h=this.getValue().toString();this.obj=document.createElement("INPUT");this.obj.readOnly=true;this.obj.style.width="60px";this.obj.style.height=(this.cell.offsetHeight-(this.grid.multiLine?5:4))+"px";this.obj.style.border="0px";this.obj.style.margin="0px";this.obj.style.padding="0px";this.obj.style.overflow="hidden";this.obj.style.fontSize=_isKHTML?"10px":"12px";this.obj.style.fontFamily="Arial";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(i){(i||event).cancelBubble=true};this.cell.innerHTML="";this.cell.appendChild(this.obj);this.obj.onselectstart=function(i){if(!i){i=event}i.cancelBubble=true;return true};this.obj.style.textAlign=this.cell.align;this.obj.value=h;this.obj.focus();this.obj.focus();this.cell.appendChild(document.createTextNode(" "));var e=document.createElement("input");if(_isIE){e.style.height=(this.cell.offsetHeight-(this.grid.multiLine?5:4))+"px";e.style.lineHeight="5px"}else{e.style.fontSize="8px";e.style.width="10px";e.style.marginTop="-5px"}e.type="button";e.name="Lookup";e.value="...";var f=this.obj;var b=this.cell.cellIndex;var d=this.cell.parentNode.idd;var g=this.grid;var c=this;this.dhx_m_func=this.grid.getWButFunction(this.cell._cellIndex);e.onclick=function(i){c.dhx_m_func(c,c.cell.parentNode.idd,c.cell._cellIndex,h)};this.cell.appendChild(e)};this.detach=function(){this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_wbut.prototype=new eXcell;dhtmlXGridObject.prototype.getWButFunction=function(a){if(this._wbtfna){return this._wbtfna[a]}else{return(function(){})}};dhtmlXGridObject.prototype.setWButFunction=function(a,b){if(!this._wbtfna){this._wbtfna=new Array()}this._wbtfna[a]=b};function eXcell_passw(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.innerHTML="";this.cell.atag="INPUT";this.val=this.getValue();this.obj=document.createElement(this.cell.atag);this.obj.style.height=(this.cell.offsetHeight-(_isIE?6:4))+"px";this.obj.className="dhx_combo_edit";this.obj.type="password";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(b){(b||event).cancelBubble=true};this.obj.onmousedown=function(b){(b||event).cancelBubble=true};this.obj.value=this.cell._rval||"";this.cell.appendChild(this.obj);if(_isFF){this.obj.style.overflow="visible";if((this.grid.multiLine)&&(this.obj.offsetHeight>=18)&&(this.obj.offsetHeight<40)){this.obj.style.height="36px";this.obj.style.overflow="scroll"}}this.obj.onselectstart=function(b){if(!b){b=event}b.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){return this.cell._rval};this.setValue=function(c){var b="*****";this.cell.innerHTML=b;this.cell._rval=c};this.detach=function(){this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_passw.prototype=new eXcell;function eXcell_num(a){try{this.cell=a;this.grid=this.cell.parentNode.grid}catch(b){}this.edit=function(){this.val=this.getValue();this.obj=document.createElement(_isKHTML?"INPUT":"TEXTAREA");this.obj.className="dhx_combo_edit";this.obj.style.height=(this.cell.offsetHeight-4)+"px";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(c){(c||event).cancelBubble=true};this.obj.value=this.val;this.cell.innerHTML="";this.cell.appendChild(this.obj);this.obj.onselectstart=function(c){if(!c){c=event}c.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){if((this.cell.firstChild)&&(this.cell.firstChild.tagName=="TEXTAREA")){return this.cell.firstChild.value}else{return this.grid._aplNFb(this.cell.innerHTML.toString()._dhx_trim(),this.cell._cellIndex)}};this.setValue=function(d){var c=new RegExp("[a-z]|[A-Z]","i");if(d.match(c)){d="&nbsp;"}this.cell.innerHTML=d};this.detach=function(){var c=this.obj.value;this.setValue(c);return this.val!=this.getValue()}}eXcell_num.prototype=new eXcell;function eXcell_mro(a){this.cell=a;this.grid=this.cell.parentNode.grid;this.edit=function(){}}eXcell_mro.prototype=new eXcell;eXcell_mro.prototype.getValue=function(){return this.cell.childNodes[0].innerHTML._dhx_trim()};eXcell_mro.prototype.setValue=function(a){if(!this.cell.childNodes.length){this.cell.style.whiteSpace="normal";this.cell.innerHTML="<div style='height:100%; white-space:nowrap; overflow:hidden;'></div>"}if(!a||a.toString()._dhx_trim()==""){a="&nbsp;"}this.cell.childNodes[0].innerHTML=a};function eXcell_liveedit(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.inputObj.focus();this.cell.inputObj.focus()};this.detach=function(){this.setValue(this.cell.inputObj.value)};this.getValue=function(){return this.cell.inputObj?this.cell.inputObj.value:""};this.destructor=function(){};this.onFocus=function(){var b=this.grid.callEvent("onEditCell",[0,this.cell.parentNode.idd,this.cell._cellIndex]);if(b===false){this.cell.inputObj.blur()}};this.onBlur=function(){var b=this.grid.callEvent("onEditCell",[2,this.cell.parentNode.idd,this.cell._cellIndex]);this.detach()};this.onChange=function(){var b=this.grid.callEvent("onCellChanged",[this.cell.parentNode.idd,this.cell._cellIndex,this.cell.inputObj.value]);this.detach()}}eXcell_liveedit.prototype=new eXcell_ed;eXcell_liveedit.prototype.setValue=function(b){var a=this;this.cell.innerHTML='<input type="text" value="" style="width:100%;" />';this.cell.inputObj=this.cell.firstChild;this.cell.inputObj=this.cell.firstChild;this.cell.inputObj.value=b;this.cell.inputObj.onfocus=function(){a.onFocus()};this.cell.inputObj.onblur=function(){a.onFocus()};this.cell.inputObj.onchange=function(){a.onChange()}};if(window.eXcell_math){eXcell_liveedit.prototype.setValueA=eXcell_liveedit.prototype.setValue;eXcell_liveedit.prototype.setValue=eXcell_math.prototype._NsetValue}function eXcell_limit(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.atag=((!this.grid.multiLine)&&(_isKHTML||_isMacOS||_isFF))?"INPUT":"TEXTAREA";this.val=this.getValue();this.obj=document.createElement(this.cell.atag);this.obj.style.height=(this.cell.offsetHeight-(_isIE?6:4))+"px";this.obj.className="dhx_combo_edit";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(b){(b||event).cancelBubble=true};this.obj.onmousedown=function(b){(b||event).cancelBubble=true};this.obj.value=this.val;this.cell.innerHTML="";this.cell.appendChild(this.obj);if(_isFF){this.obj.style.overflow="visible";if((this.grid.multiLine)&&(this.obj.offsetHeight>=18)&&(this.obj.offsetHeight<40)){this.obj.style.height="36px";this.obj.style.overflow="scroll"}}this.obj.onkeypress=function(b){if(this.value.length>=15){return false}};this.obj.onselectstart=function(b){if(!b){b=event}b.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){if((this.cell.firstChild)&&((this.cell.atag)&&(this.cell.firstChild.tagName==this.cell.atag))){return this.cell.firstChild.value}else{return this.cell.innerHTML.toString()._dhx_trim()}};this.setValue=function(b){if(b.length>15){this.cell.innerHTML=b.substring(0,14)}else{this.cell.innerHTML=b}};this.detach=function(){this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_limit.prototype=new eXcell;if(window.dhtmlxHierarchy){if(window.dhtmlXCellObject){dhtmlXCellObject.prototype.attachPropertyGrid=function(){var a=this.attachGrid();new dhtmlXPropertyGrid(a);return a}}function eXcell_tree_property(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.isDisabled=function(){return true};this.getValue=function(){return this.cell.parentNode.valTag.innerHTML}}eXcell_tree_property.prototype=new eXcell_tree;eXcell_tree_property.prototype.setValue=function(a){if(this.cell.parentNode.imgTag){return this.setLabel(a)}if((this.grid._tgc.iconTree==null)||(this.grid._tgc.iconTree!=this.grid.iconTree)){var d={};d.imst="<img src='"+this.grid.iconTree;d.imsti="<img src='"+(this.grid.iconURL||this.grid.iconTree);d.imact="' align='absmiddle' onclick='this."+(_isKHTML?"":"parentNode.")+"parentNode.parentNode.parentNode.parentNode.grid.doExpand(this);event.cancelBubble=true;' class='property_image'>";d.plus=d.imst+"plus.gif"+d.imact;d.minus=d.imst+"minus.gif"+d.imact;d.blank=d.imst+"blank.gif"+d.imact;d.start="<div style=' overflow:hidden; white-space : nowrap; height:"+(_isIE?20:19)+"px;'>";d.itemim="<span "+(_isFF?"style='position:relative; top:2px;'":"")+"id='nodeval'>";d.close="</span><div class='property_space'></div></div>";this.grid._tgc=d}var e=this.grid._h2;var d=this.grid._tgc;var c=this.cell.parentNode.idd;var f=this.grid._h2.get[c];if(this.grid.kidsXmlFile||this.grid._slowParse){f.has_kids=(f.has_kids||(this.cell.parentNode._attrs.xmlkids&&(f.state!="minus")));f._xml_await=!!f.has_kids}f.image=f.image||(this.cell._attrs.image||"leaf.gif");f.label=a;var b=[d.start];if(f.has_kids){b.push(d.plus);f.state="plus"}else{b.push(d.imst+f.state+".gif"+d.imact+d.itemim)}b.push(f.label);b.push(d.close);this.cell.innerHTML=b.join("");this.cell.style.paddingLeft="0px";this.cell.parentNode.imgTag=this.cell.childNodes[0].childNodes[0];this.cell.parentNode.valTag=this.cell.childNodes[0].childNodes[1];if(f.childs.length){this.grid.getRowById(this.cell.parentNode.idd)._attrs["class"]=" dhx_parent_row ";this.cell.nextSibling.style.borderLeft="1px solid #D4D0C8"}if(_isKHTML){this.cell.vAlign="top"}if(f.parent.id!=0&&f.parent.state=="plus"){this.grid._updateTGRState(f.parent,false);this.cell.parentNode._skipInsert=true}this.grid.callEvent("onCellChanged",[c,this.cell._cellIndex,a])}}function eXcell_list(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.innerHTML="<select style='width:100%;' ></select>";this.obj=this.cell.firstChild;this.obj.onclick=function(f){(f||event).cancelBubble=true};this.obj.onmousedown=function(f){(f||event).cancelBubble=true};this.obj.onkeydown=function(g){var f=(g||event);if(f.keyCode==9||f.keyCode==13){globalActiveDHTMLGridObject.entBox.focus();globalActiveDHTMLGridObject.doKey({keyCode:f.keyCode,shiftKey:f.shiftKey,srcElement:"0"});return false}f.cancelBubble=true};var b=this;this.obj.onchange=function(){b.grid.editStop();b=null};var d=this.getAttribute("values").split(",");for(var c=0;c<d.length;c++){this.obj.options[c]=new Option(d[c],d[c])}this.obj.value=this.cell._val;this.obj.focus()};this.getValue=function(){return this.cell._val};this.detach=function(){var c=this.obj.value;var b=this.obj.selectedIndex;this.setValue(b==-1?"":this.obj.options[b].value);return c!=this.getValue()}}eXcell_list.prototype=new eXcell;eXcell_list.prototype.setValue=function(a){this.cell._val=a;if(!a||a.toString()._dhx_trim()==""){this.cell._clearCell=true;this.setCValue("&nbsp","")}else{this.cell._clearCell=false;this.setCValue(this.grid._aplNF(a,this.cell._cellIndex))}};function dhtmlXPropertyGrid(a){var b;if(a.objBox){b=a}else{b=new dhtmlXGridObject(a)}b.setHeader("Name,Value");b.setColAlign("left,left");if(window.dhtmlxHierarchy){b.setColTypes("tree_property,ro");b.isTreeGrid=function(){return true};b.enableSmartXMLParsing(false)}else{b.setColTypes("ro,ro")}b.setColSorting("na,na");b.setInitWidths("*,*");b.setNoHeader(true);b.setSkin("dhx_skyblue");b.entBox.className+=" gridbox_property";b.i18n.validation_error="Value is incorrect";b.attachEvent("onRowSelect",function(d,c){if(!this.editor){this.selectCell(this.getRowIndex(d),1);this.editCell()}});b.attachEvent("onBeforeSelect",function(c){if(this._block_selection){return false}return true});b.attachEvent("onRowCreated",function(d,c){if(!this._h2||!this._h2.get[d].childs.length){c.childNodes[1].style.backgroundColor="white"}});b.attachEvent("onEditCell",function(f,j,h,e,g){if(f==1&&this.editor&&this.editor.obj&&this.editor.obj.select){this.editor.obj.select()}if(f==2&&g!=e){var i=this.cells(j,1).getAttribute("validate");var c=true;switch(i){case"int":c=(parseFloat(e)==e);break}if(c){this._block_selection=false;this.callEvent("onPropertyChanged",[this.cells(j,0).getValue(),e,g])}else{alert(this.i18n.validation_error);this._block_selection=true;var d=this;window.setTimeout(function(){d.selectCell(j,h);d.editCell()},1)}}return true});b._key_events.k13_0_0=b._key_events.k9_0_0=b._key_events.k40_0_0;b.getProperties=function(){this.editStop(true);var c={};this.forEachRow(function(d){c[this.cells(d,0).getValue()]=this.cells(d,1).getValue()});return c};b.setProperties=function(c){this.editStop();this.forEachRow(function(e){var d=this.cells(e,0).getValue();if(typeof c[d]!="undefined"){this.cells(e,1).setValue(c[d])}});this.callEvent("onPropertyChanged",[])};return b}dhtmlXForm.prototype.getItemsList=function(){var d=[];var c=[];for(var b in this.itemPull){var e=null;if(this.itemPull[b]._group){e=this.itemPull[b]._group}else{e=b.replace(this.idPrefix,"")}if(c[e]!=true){d.push(e)}c[e]=true}return d};dhtmlXForm.prototype.setItemText=function(){this.setItemLabel.apply(this,arguments)};dhtmlXForm.prototype.getItemText=function(){return this.getItemLabel.apply(this,arguments)};dhtmlXForm.prototype.loadStructString=function(b,a){this.loadStruct(b,a)};dhtmlXAccordion.prototype.setEffect=function(a){};dhtmlXAccordion.prototype.setIcon=function(b,a){this.cells(b).setIcon(a)};dhtmlXAccordion.prototype.clearIcon=function(a){this.cells(a).clearIcon()};dhtmlXAccordion.prototype.setActive=function(a){this.cells(a).open()};dhtmlXAccordion.prototype.isActive=function(a){return this.cells(a).isOpened()};dhtmlXAccordion.prototype.openItem=function(a){this.cells(a).open()};dhtmlXAccordion.prototype.closeItem=function(a){this.cells(a).close()};dhtmlXAccordion.prototype.moveOnTop=function(a){this.cells(a).moveOnTop()};dhtmlXAccordion.prototype.setItemHeight=function(a){this.cells(id).setHeight(a)};dhtmlXAccordion.prototype.setText=function(b,a){this.cells(b).setText(a)};dhtmlXAccordion.prototype.getText=function(){return this.cells(id).getText()};dhtmlXAccordion.prototype.showItem=function(a){this.cells(a).show()};dhtmlXAccordion.prototype.hideItem=function(a){this.cells(a).hide()};dhtmlXAccordion.prototype.isItemHidden=function(a){return !this.cells(a).isVisible()};dhtmlXAccordion.prototype.loadJSON=function(a,b){this.loadStruct(a,b)};dhtmlXAccordion.prototype.loadXML=function(a,b){this.loadStruct(a,b)};dhtmlXAccordion.prototype.setSkinParameters=function(a,b){if(a!=null){this.setOffset(a)}};dhtmlXLayoutObject.prototype.listViews=function(){return this.listPatterns()};dhtmlXLayoutObject.prototype.setEffect=function(){};dhtmlXLayoutObject.prototype.getEffect=function(){};dhtmlXLayoutObject.prototype.dockWindow=function(a){this.cells(a).dock()};dhtmlXLayoutObject.prototype.unDockWindow=function(a){this.cells(a).undock()};dhtmlXLayoutObject.prototype.setCollapsedText=function(b,a){this.cells(b).setCollapsedText(a)};dhtmlXLayoutObject.prototype.getIdByIndex=function(a){if(a<0||a>this.items.length-1){return null}var b=null;this.forEachItem(function(c){if(b==null&&c==this.items[a]){b=c.conf.name}});return b};dhtmlXLayoutObject.prototype.getIndexById=function(d){var a=this.cells(d);var b=-1;for(var c=0;c<this.items.length;c++){if(a==this.items[c]){b=c}}return b};dhtmlXLayoutObject.prototype.showPanel=function(a){this.cells(a).showHeader()};dhtmlXLayoutObject.prototype.hidePanel=function(a){this.cells(a).hideHeader()};dhtmlXLayoutObject.prototype.isPanelVisible=function(a){return this.cells(a).isHeaderVisible()};dhtmlXLayoutObject.prototype.setImagePath=function(){};dhtmlXLayoutCell.prototype.getIndex=function(){return this.conf.index};dhtmlXTabBar.prototype.destructor=function(){this.unload()};dhtmlXTabBar.prototype.normalize=function(){};dhtmlXTabBar.prototype.setStyle=function(){};dhtmlXTabBar.prototype.setContent=function(b,a){this.cells(b).attachObject(a)};dhtmlXTabBar.prototype.setContentHTML=function(b,a){this.cells(b).attachHTMLString(a)};dhtmlXTabBar.prototype.setHrefMode=function(a){this._hrfmode=a};dhtmlXTabBar.prototype.setContentHref=function(b,a){if(!this._hrfmode){this._hrfmode="iframe"}switch(this._hrfmode){case"iframes":case"iframe":case"iframes-on-demand":this.cells(b).attachURL(a);break;case"ajax":case"ajax-html":this.cells(b).attachURL(a,true);break}};dhtmlXTabBar.prototype.setMargin=function(){};dhtmlXTabBar.prototype.setOffset=function(){};dhtmlXTabBar.prototype.setImagePath=function(b,a){};dhtmlXTabBar.prototype.setSkinColors=function(b,a){};dhtmlXTabBar.prototype.tabWindow=function(a){return this.cells(a).getFrame()};dhtmlXTabBar.prototype.setCustomStyle=function(){};dhtmlXTabBar.prototype.enableScroll=function(){};dhtmlXTabBar.prototype.enableForceHiding=function(){};dhtmlXTabBar.prototype.setSize=function(a,b){this.base.style.width=a+"px";this.base.style.height=b+"px";this.setSizes()};dhtmlXTabBar.prototype.enableAutoSize=function(){};dhtmlXTabBar.prototype.adjustOuterSize=function(){this.setSizes()};dhtmlXTabBar.prototype.showInnerScroll=function(c){for(var b in this.t){if(c==null||c==b){this.t[b].cell.showInnerScroll()}}};dhtmlXTabBar.prototype.loadXML=function(a,b){this.loadStruct.apply(this,[a,b])};dhtmlXTabBar.prototype.loadXMLString=function(b,a){this.loadStruct.apply(this,[b,a])};dhtmlXTabBar.prototype.hideTab=function(b,a){this.tabs(b).hide(a)};dhtmlXTabBar.prototype.showTab=function(b,a){this.tabs(b).show(a)};dhtmlXTabBar.prototype.enableTab=function(a){this.tabs(a).enable()};dhtmlXTabBar.prototype.disableTab=function(a){this.tabs(a).disable()};dhtmlXTabBar.prototype.getIndex=function(a){return this.tabs(a).getIndex()};dhtmlXTabBar.prototype.getLabel=function(a){return this.tabs(a).getText()};dhtmlXTabBar.prototype.setLabel=function(b,a){this.tabs(b).setText(a)};dhtmlXTabBar.prototype.setTabActive=function(a){this.tabs(a).setActive()};dhtmlXTabBar.prototype.removeTab=function(a){this.tabs(a).close()};dhtmlXTabBar.prototype.forceLoad=function(a){this.tabs(a).reloadURL()};dhtmlXWindows.prototype.enableAutoViewport=function(){};dhtmlXWindows.prototype.setImagePath=function(){};dhtmlXWindows.prototype.setEffect=function(){};dhtmlXWindows.prototype.getEffect=function(){};dhtmlXWindowsCell.prototype.setToFullScreen=function(){};dhtmlXWindowsCell.prototype.setIcon=function(){};dhtmlXWindowsCell.prototype.getIcon=function(){};dhtmlXWindowsCell.prototype.restoreIcon=function(){};dhtmlXWindowsCell.prototype.clearIcon=function(){};
4,576.777778
40,920
0.763079
ac856b88890bff28002e974d78cc79e36540d89f
1,593
js
JavaScript
src/templates/radio-archive.js
kevin-roark/inw-netlify-gatsby
b043776753640bc3538333c27a280e776c530e50
[ "MIT" ]
null
null
null
src/templates/radio-archive.js
kevin-roark/inw-netlify-gatsby
b043776753640bc3538333c27a280e776c530e50
[ "MIT" ]
null
null
null
src/templates/radio-archive.js
kevin-roark/inw-netlify-gatsby
b043776753640bc3538333c27a280e776c530e50
[ "MIT" ]
null
null
null
import React from 'react' import PropTypes from 'prop-types' import { Helmet } from 'react-helmet' import { graphql } from 'gatsby' import Layout from '../components/Layout' import RadioArchiveContent, { RadioArchiveContentDataShape, } from '../components/RadioArchiveContent' export const RadioArchiveTemplate = ({ data, helmet }) => { return ( <section className="section"> {helmet || ''} <div className="container content"> <div className="columns"> <RadioArchiveContent data={data} className="column is-10 is-offset-1" /> </div> </div> </section> ) } RadioArchiveTemplate.propTypes = { data: RadioArchiveContentDataShape, helmet: PropTypes.object, } const RadioArchive = ({ data }) => { const { markdownRemark: post } = data return ( <Layout> <RadioArchiveTemplate data={post} helmet={ <Helmet titleTemplate="%s | Blog"> <title>{`Radio Archive | ${post.frontmatter.title}`}</title> <meta name="description" content={`${post.frontmatter.description}`} /> </Helmet> } /> </Layout> ) } RadioArchive.propTypes = { data: PropTypes.shape({ markdownRemark: RadioArchiveContentDataShape, }), } export default RadioArchive export const pageQuery = graphql` query RadioArchiveByID($id: String!) { markdownRemark(id: { eq: $id }) { id html fields { slug } ...RadioArchiveContentFrontmatterFragment } } `
21.821918
72
0.595731
ac861b2c8c491288377abd582c43087f6f0080a4
86,620
js
JavaScript
code/3.9.5_0/snippets.js
Mohamed-Jeafer/crawl
7bdff55b61672d19241f7de1eade6a063673af1b
[ "MIT" ]
null
null
null
code/3.9.5_0/snippets.js
Mohamed-Jeafer/crawl
7bdff55b61672d19241f7de1eade6a063673af1b
[ "MIT" ]
null
null
null
code/3.9.5_0/snippets.js
Mohamed-Jeafer/crawl
7bdff55b61672d19241f7de1eade6a063673af1b
[ "MIT" ]
null
null
null
/* * This file is part of Adblock Plus <https://adblockplus.org/>, * Copyright (C) 2006-present eyeo GmbH * * Adblock Plus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * Adblock Plus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. */ /** @module */ /* global environment */ /* eslint-env webextensions */ /* eslint no-console: "off" */ "use strict"; let [uniqueIdentifier] = URL.createObjectURL(new Blob()).match(/[^/]+$/); // secured env and secured global variables let ABP = getABPNamespace(); let {Object, utils, DOM} = ABP; let {getComputedStyle, setInterval, setTimeout, performance} = ABP.window; /** * @typedef {object} FetchContentInfo * @property {function} remove * @property {Promise} result * @property {number} timer * @private */ /** * @type {Map.<string, FetchContentInfo>} * @private */ let fetchContentMap = new Map(); /** * @type {Map.<function, Array.<function>>} * @private */ let dependencyGraph = new Map(); /** * Extract utilities from globals and return a deep-frozen object with those. * @return {object} An object namespace with all the global utilities used by * our snippets. * @private */ function getABPNamespace() { /* eslint-disable no-shadow */ let {Object} = window; let {assign, defineProperty, freeze, getOwnPropertyDescriptor, values} = window.Object; let getParentNode = getOwnPropertyDescriptor(window.Node.prototype, "parentNode").get; let {getComputedStyle, setInterval, setTimeout, performance} = window; /* eslint-enable no-shadow */ // the bind is needed in Firefox or it breaks return freeze({ Object: freeze({ assign: assign.bind(Object), defineProperty: defineProperty.bind(Object), getOwnPropertyDescriptor: getOwnPropertyDescriptor.bind(Object), values: (values || function(object) { return this.keys(object).map(key => object[key]); }).bind(Object) }), utils: freeze({ isOwnProperty: Function.call.bind(Object.prototype.hasOwnProperty) }), window: freeze({ getComputedStyle: getComputedStyle.bind(window), setInterval: setInterval.bind(window), setTimeout: setTimeout.bind(window), performance }), DOM: freeze({ getParentNode, frozen: freeze(new WeakMap()) }) }); } /** * Register one or more dependencies for a specific function. * @param {function} func The function that requires dependencies. * @param {...function} dependencies The function function dependencies. * @private */ function registerDependencies(func, ...dependencies) { if (dependencyGraph.has(func)) throw new Error(`duplicated ${func.name} dependencies`); dependencyGraph.set(func, dependencies); } /** * Returns a list of requirements for a function being injected as a script. * @param {function} func A function with dependencies. * @param {Set} [dependencies] An object that collects the unique set of * dependencies. * @returns {Array.<function>} All dependencies needed for the function. * @private */ function resolveDependencies(func, dependencies = new Set()) { let root = dependencies.size === 0; if (root) dependencies.add(func); for (let dependency of dependencyGraph.get(func) || []) { if (!dependencies.has(dependency)) { dependencies.add(dependency); resolveDependencies(dependency, dependencies); } } if (root) return [...dependencies].slice(1); } /** * Returns a potentially already resolved fetch auto cleaning, if not requested * again, after a certain amount of milliseconds. * * The resolved fetch is by default `arrayBuffer` but it can be any other kind * through the configuration object. * * @param {string} url The url to fetch * @param {object} [options] Optional configuration options. * By default is {as: "arrayBuffer", cleanup: 60000} * @param {string} [options.as] The fetch type: "arrayBuffer", "json", "text".. * @param {number} [options.cleanup] The cache auto-cleanup delay in ms: 60000 * * @returns {Promise} The fetched result as Uint8Array|string. * * @example * fetchContent('https://any.url.com').then(arrayBuffer => { ... }) * @example * fetchContent('https://a.com', {as: 'json'}).then(json => { ... }) * @example * fetchContent('https://a.com', {as: 'text'}).then(text => { ... }) * @private */ function fetchContent(url, {as = "arrayBuffer", cleanup = 60000} = {}) { // make sure the fetch type is unique as the url fetching text or arrayBuffer // will fetch same url twice but it will resolve it as expected instead of // keeping the fetch potentially hanging forever. let uid = as + ":" + url; let details = fetchContentMap.get(uid) || { remove: () => fetchContentMap.delete(uid), result: null, timer: 0 }; clearTimeout(details.timer); details.timer = setTimeout(details.remove, cleanup); if (!details.result) { details.result = fetch(url).then(response => response[as]()); details.result.catch(details.remove); fetchContentMap.set(uid, details); } return details.result; } /** * Escapes regular expression special characters in a string. * * The returned string may be passed to the `RegExp` constructor to match the * original string. * * @param {string} string The string in which to escape special characters. * * @returns {string} A new string with the special characters escaped. * @private */ function regexEscape(string) { return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"); } /** * Converts a given pattern to a regular expression. * * @param {string} pattern The pattern to convert. If the pattern begins and * ends with a slash (`/`), the text in between is treated as a regular * expression; otherwise the pattern is treated as raw text. * * @returns {RegExp} A `RegExp` object based on the given pattern. * @private */ function toRegExp(pattern) { if (pattern.length >= 2 && pattern[0] == "/" && pattern[pattern.length - 1] == "/") return new RegExp(pattern.substring(1, pattern.length - 1)); return new RegExp(regexEscape(pattern)); } registerDependencies(toRegExp, regexEscape); /** * Converts a number to its hexadecimal representation. * * @param {number} number The number to convert. * @param {number} [length] The <em>minimum</em> length of the hexadecimal * representation. For example, given the number `1024` and the length `8`, * the function returns the value `"00000400"`. * * @returns {string} The hexadecimal representation of the given number. * @private */ function toHex(number, length = 2) { let hex = number.toString(16); if (hex.length < length) hex = "0".repeat(length - hex.length) + hex; return hex; } /** * Converts a `Uint8Array` object into its hexadecimal representation. * * @param {Uint8Array} uint8Array The `Uint8Array` object to convert. * * @returns {string} The hexadecimal representation of the given `Uint8Array` * object. * @private */ function uint8ArrayToHex(uint8Array) { return uint8Array.reduce((hex, byte) => hex + toHex(byte), ""); } /** * Returns the value of the `cssText` property of the object returned by * `getComputedStyle` for the given element. * * If the value of the `cssText` property is blank, this function computes the * value out of the properties available in the object. * * @param {Element} element The element for which to get the computed CSS text. * * @returns {string} The computed CSS text. * @private */ function getComputedCSSText(element) { let style = getComputedStyle(element); let {cssText} = style; if (cssText) return cssText; for (let property of style) cssText += `${property}: ${style[property]}; `; return cssText.trim(); } /** * Injects JavaScript code into the document using a temporary * `script` element. * * @param {string} code The code to inject. * @param {Array.<function|string>} [dependencies] A list of dependencies * to inject along with the code. A dependency may be either a function or a * string containing some executable code. * @private */ function injectCode(code, dependencies = []) { let executable = ` (function() { "use strict"; let environment = ${JSON.stringify(environment)}; let ABP = window["${uniqueIdentifier}"]; if (!ABP) { ABP = (${getABPNamespace})(); ABP.Object.defineProperty(window, "${uniqueIdentifier}", {value: ABP}); } let {Object, utils, DOM} = ABP; let {getComputedStyle, setInterval, setTimeout, performance} = ABP.window; let debug = ${debug}; let inactiveProfile = ${inactiveProfile}; let noopProfile = ${noopProfile}; ${dependencies.join("\n")} ${code} })(); `; let script = document.createElement("script"); script.type = "application/javascript"; script.async = false; // Firefox 58 only bypasses site CSPs when assigning to 'src', // while Chrome 67 and Microsoft Edge (tested on 44.17763.1.0) // only bypass site CSPs when using 'textContent'. if (browser.runtime.getURL("").startsWith("moz-extension://")) { let url = URL.createObjectURL(new Blob([executable])); script.src = url; document.documentElement.appendChild(script); URL.revokeObjectURL(url); } else { script.textContent = executable; document.documentElement.appendChild(script); } document.documentElement.removeChild(script); } /** * Converts a function and an optional list of arguments into a string of code * containing a function call. * * The function is converted to its string representation using the * `Function.prototype.toString` method. Each argument is stringified using * `JSON.stringify`. * * @param {function} func The function to convert. * @param {...*} [params] The arguments to convert. * * @returns {string} The generated code containing the function call. * @private */ function stringifyFunctionCall(func, ...params) { // Call JSON.stringify on the arguments to avoid any arbitrary code // execution. return `(${func})(${params.map(JSON.stringify).join(",")});`; } /** * Wraps a function and its dependencies into an injector. * * The injector, when called with zero or more arguments, generates code that * calls the function, with the given arguments, if any, and injects the code, * along with any dependencies, into the document using a temporary `script` * element. * * @param {function} injectable The function to wrap into an injector. * @param {...(function|string)} [dependencies] Any dependencies of the * function. A dependency may be either a function or a string containing * some executable code. * * @returns {function} The generated injector. * @private */ function makeInjector(injectable) { return (...args) => injectCode(stringifyFunctionCall(injectable, ...args), resolveDependencies(injectable)); } /** * Hides an HTML element by setting its `style` attribute to * `display: none !important`. * * @param {HTMLElement} element The HTML element to hide. * @private */ function hideElement(element) { let {style} = element; let hide = () => { for (let [key, value] of environment.debugCSSProperties || [["display", "none"]]) { if (style.getPropertyValue(key) != value || style.getPropertyPriority(key) != "important") style.setProperty(key, value, "important"); } }; hide(); // Listen for changes to the style property and if our values are unset // then reset them. new MutationObserver(hide).observe(element, { attributes: true, attributeFilter: ["style"] }); } /** * Observes changes to a DOM node using a `MutationObserver`. * * @param {Node} target The DOM node to observe for changes. * @param {MutationObserverInit?} [options] Options that describe what DOM * mutations should be reported to the callback. * @param {function} callback A function that will be called on each DOM * mutation, taking a `MutationRecord` as its parameter. * @private */ function observe(target, options, callback) { new MutationObserver(mutations => { for (let mutation of mutations) callback(mutation); }) .observe(target, options); } /** * Logs its arguments to the console. * * This may be used for testing and debugging. * * @alias module:content/snippets.log * * @param {...*} [args] The arguments to log. * * @since Adblock Plus 3.3 */ function log(...args) { let {mark, end} = profile("log"); if (debug) args.unshift("%c DEBUG", "font-weight: bold"); mark(); console.log(...args); end(); } registerDependencies(log, profile); exports.log = log; /** * Similar to `log`, but does the logging in the context of the document rather * than the content script. * * This may be used for testing and debugging, especially to verify that the * injection of snippets into the document is working without any errors. * * @param {...*} [args] The arguments to log. * * @since Adblock Plus 3.3 */ function trace(...args) { // We could simply use console.log here, but the goal is to demonstrate the // usage of snippet dependencies. log(...args); } registerDependencies(trace, log); exports.trace = makeInjector(trace); /** * This is an implementation of the `uabinject-defuser` technique used by * [uBlock Origin](https://github.com/uBlockOrigin/uAssets/blob/c091f861b63cd2254b8e9e4628f6bdcd89d43caa/filters/resources.txt#L640). * @alias module:content/snippets.uabinject-defuser * * @since Adblock Plus 3.3 */ function uabinjectDefuser() { window.trckd = true; window.uabpdl = true; window.uabInject = true; window.uabDetect = true; } exports["uabinject-defuser"] = makeInjector(uabinjectDefuser); /** * Hides any HTML element or one of its ancestors matching a CSS selector if * the text content of the element's shadow contains a given string. * @alias module:content/snippets.hide-if-shadow-contains * * @param {string} search The string to look for in every HTML element's * shadow. If the string begins and ends with a slash (`/`), the text in * between is treated as a regular expression. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * * @since Adblock Plus 3.3 */ function hideIfShadowContains(search, selector = "*") { let originalAttachShadow = Element.prototype.attachShadow; // If there's no Element.attachShadow API present then we don't care, it must // be Firefox or an older version of Chrome. if (!originalAttachShadow) return; let re = toRegExp(search); // Mutation observers mapped to their corresponding shadow roots and their // hosts. let shadows = new WeakMap(); function observeShadow(mutations, observer) { let {host, root} = shadows.get(observer) || {}; // Since it's a weak map, it's possible that either the element or its // shadow has been removed. if (!host || !root) return; // If the shadow contains the given text, check if the host or one of its // ancestors matches the selector; if a matching element is found, hide // it. if (re.test(root.textContent)) { let closest = host.closest(selector); if (closest) hideElement(closest); } } Object.defineProperty(Element.prototype, "attachShadow", { value(...args) { // Create the shadow root first. It doesn't matter if it's a closed // shadow root, we keep the reference in a weak map. let root = originalAttachShadow.apply(this, args); // Listen for relevant DOM mutations in the shadow. let observer = new MutationObserver(observeShadow); observer.observe(root, { childList: true, characterData: true, subtree: true }); // Keep references to the shadow root and its host in a weak map. If // either the shadow is detached or the host itself is removed from the // DOM, the mutation observer too will be freed eventually and the entry // will be removed. shadows.set(observer, {host: this, root}); return root; } }); } registerDependencies(hideIfShadowContains, toRegExp, hideElement); exports["hide-if-shadow-contains"] = makeInjector(hideIfShadowContains); /** * Hides any HTML element or one of its ancestors matching a CSS selector if * it matches the provided condition. * * @param {function} match The function that provides the matching condition. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * @param {?string} [searchSelector] The CSS selector that an HTML element * containing the given string must match. Defaults to the value of the * `selector` argument. * @private */ function hideIfMatches(match, selector, searchSelector) { if (searchSelector == null) searchSelector = selector; let callback = () => { for (let element of document.querySelectorAll(searchSelector)) { let closest = element.closest(selector); if (closest && match(element, closest)) hideElement(closest); } }; new MutationObserver(callback) .observe(document, {childList: true, characterData: true, subtree: true}); callback(); } /** * Hides any HTML element or one of its ancestors matching a CSS selector if * the text content of the element contains a given string. * @alias module:content/snippets.hide-if-contains * * @param {string} search The string to look for in HTML elements. If the * string begins and ends with a slash (`/`), the text in between is treated * as a regular expression. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * @param {?string} [searchSelector] The CSS selector that an HTML element * containing the given string must match. Defaults to the value of the * `selector` argument. * * @since Adblock Plus 3.3 */ function hideIfContains(search, selector = "*", searchSelector = null) { let re = toRegExp(search); hideIfMatches(element => re.test(element.textContent), selector, searchSelector); } exports["hide-if-contains"] = hideIfContains; /** * Check if an element is visible * * @param {Element} element The element to check visibility of. * @param {CSSStyleDeclaration} style The computed style of element. * @param {?Element} closest The closest parent to reach. * @return {bool} Whether the element is visible. * @private */ function isVisible(element, style, closest) { if (style.getPropertyValue("display") == "none") return false; let visibility = style.getPropertyValue("visibility"); if (visibility == "hidden" || visibility == "collapse") return false; if (!closest || element == closest) return true; let parent = element.parentElement; if (!parent) return true; return isVisible(parent, getComputedStyle(parent), closest); } /** * Hides any HTML element matching a CSS selector if the visible text content * of the element contains a given string. * @alias module:content/snippets.hide-if-contains-visible-text * * @param {string} search The string to match to the visible text. Is considered * visible text that isn't hidden by CSS properties or other means. * If the string begins and ends with a slash (`/`), the text in between is * treated as a regular expression. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * @param {?string} [searchSelector] The CSS selector that an HTML element * containing the given string must match. Defaults to the value of the * `selector` argument. * * @since Adblock Plus 3.6 */ function hideIfContainsVisibleText(search, selector, searchSelector = null) { /** * Determines if the text inside the element is visible. * * @param {Element} element The element we are checking. * @param {?CSSStyleDeclaration} style The computed style of element. If * falsey it will be queried. * @returns {bool} Whether the text is visible. * @private */ function isTextVisible(element, style) { if (!style) style = getComputedStyle(element); if (style.getPropertyValue("opacity") == "0") return false; if (style.getPropertyValue("font-size") == "0px") return false; let color = style.getPropertyValue("color"); // if color is transparent... if (color == "rgba(0, 0, 0, 0)") return false; if (style.getPropertyValue("background-color") == color) return false; return true; } /** * Check if a pseudo element has visible text via `content`. * * @param {Element} element The element to check visibility of. * @param {string} pseudo The `::before` or `::after` pseudo selector. * @return {string} The pseudo content or an empty string. * @private */ function getPseudoContent(element, pseudo) { let style = getComputedStyle(element, pseudo); if (!isVisible(element, style) || !isTextVisible(element, style)) return ""; let {content} = style; if (content && content !== "none") { let strings = []; // remove all strings, in quotes, including escaping chars, putting // instead `\x01${string-index}` in place, which is not valid CSS, // so that it's safe to parse it back at the end of the operation. content = content.trim().replace( /(["'])(?:(?=(\\?))\2.)*?\1/g, value => `\x01${strings.push(value.slice(1, -1)) - 1}` ); // replace attr(...) with the attribute value or an empty string, // ignoring units and fallback values, as these do not work, or have, // any meaning in the CSS `content` property value. content = content.replace( /\s*attr\(\s*([^\s,)]+)[^)]*?\)\s*/g, (_, name) => element.getAttribute(name) || "" ); // replace back all `\x01${string-index}` values with their corresponding // strings, so that the outcome is a real, cleaned up, `content` value. return content.replace(/\x01(\d+)/g, (_, index) => strings[index]); } return ""; } /** * Returns the visible text content from an element and its descendants. * * @param {Element} element The element whose visible text we want. * @param {Element} closest The closest parent to reach while checking * for visibility. * @param {?CSSStyleDeclaration} style The computed style of element. If * falsey it will be queried. * @returns {string} The text that is visible. * @private */ function getVisibleContent(element, closest, style) { let checkClosest = !style; if (checkClosest) style = getComputedStyle(element); if (!isVisible(element, style, checkClosest && closest)) return ""; let text = getPseudoContent(element, ":before"); for (let node of element.childNodes) { switch (node.nodeType) { case Node.ELEMENT_NODE: text += getVisibleContent(node, element, getComputedStyle(node)); break; case Node.TEXT_NODE: if (isTextVisible(element, style)) text += node.nodeValue; break; } } return text + getPseudoContent(element, ":after"); } let re = toRegExp(search); let seen = new WeakSet(); hideIfMatches( (element, closest) => { if (seen.has(element)) return false; seen.add(element); let text = getVisibleContent(element, closest); let result = re.test(text); if (debug && text.length) log(result, re, text); return result; }, selector, searchSelector ); } exports["hide-if-contains-visible-text"] = hideIfContainsVisibleText; /** * Hides any HTML element or one of its ancestors matching a CSS selector if * the text content of the element contains a given string and, optionally, if * the element's computed style contains a given string. * @alias module:content/snippets.hide-if-contains-and-matches-style * * @param {string} search The string to look for in HTML elements. If the * string begins and ends with a slash (`/`), the text in between is treated * as a regular expression. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * @param {string?} [searchSelector] The CSS selector that an HTML element * containing the given string must match. Defaults to the value of the * `selector` argument. * @param {string?} [style] The string that the computed style of an HTML * element matching `selector` must contain. If the string begins and ends * with a slash (`/`), the text in between is treated as a regular * expression. * @param {string?} [searchStyle] The string that the computed style of an HTML * element matching `searchSelector` must contain. If the string begins and * ends with a slash (`/`), the text in between is treated as a regular * expression. * * @since Adblock Plus 3.3.2 */ function hideIfContainsAndMatchesStyle(search, selector = "*", searchSelector = null, style = null, searchStyle = null) { if (searchSelector == null) searchSelector = selector; let searchRegExp = toRegExp(search); let styleRegExp = style ? toRegExp(style) : null; let searchStyleRegExp = searchStyle ? toRegExp(searchStyle) : null; new MutationObserver(() => { for (let element of document.querySelectorAll(searchSelector)) { if (searchRegExp.test(element.textContent) && (!searchStyleRegExp || searchStyleRegExp.test(getComputedCSSText(element)))) { let closest = element.closest(selector); if (closest && (!styleRegExp || styleRegExp.test(getComputedCSSText(closest)))) hideElement(closest); } } }) .observe(document, {childList: true, characterData: true, subtree: true}); } exports["hide-if-contains-and-matches-style"] = hideIfContainsAndMatchesStyle; /** * Hides any HTML element or one of its ancestors matching a CSS selector if a * descendant of the element matches a given CSS selector and, optionally, if * the element's computed style contains a given string. * @alias module:content/snippets.hide-if-has-and-matches-style * * @param {string} search The CSS selector against which to match the * descendants of HTML elements. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * @param {?string} [searchSelector] The CSS selector that an HTML element * containing the specified descendants must match. Defaults to the value of * the `selector` argument. * @param {?string} [style] The string that the computed style of an HTML * element matching `selector` must contain. If the string begins and ends * with a slash (`/`), the text in between is treated as a regular * expression. * @param {?string} [searchStyle] The string that the computed style of an HTML * element matching `searchSelector` must contain. If the string begins and * ends with a slash (`/`), the text in between is treated as a regular * expression. * * @since Adblock Plus 3.4.2 */ function hideIfHasAndMatchesStyle(search, selector = "*", searchSelector = null, style = null, searchStyle = null) { if (searchSelector == null) searchSelector = selector; let styleRegExp = style ? toRegExp(style) : null; let searchStyleRegExp = searchStyle ? toRegExp(searchStyle) : null; new MutationObserver(() => { for (let element of document.querySelectorAll(searchSelector)) { if (element.querySelector(search) && (!searchStyleRegExp || searchStyleRegExp.test(getComputedCSSText(element)))) { let closest = element.closest(selector); if (closest && (!styleRegExp || styleRegExp.test(getComputedCSSText(closest)))) hideElement(closest); } } }) .observe(document, {childList: true, subtree: true}); } exports["hide-if-has-and-matches-style"] = hideIfHasAndMatchesStyle; /** * Hides any HTML element or one of its ancestors matching a CSS selector if * the background image of the element matches a given pattern. * @alias module:content/snippets.hide-if-contains-image * * @param {string} search The pattern to look for in the background images of * HTML elements. This must be the hexadecimal representation of the image * data for which to look. If the string begins and ends with a slash (`/`), * the text in between is treated as a regular expression. * @param {string} selector The CSS selector that an HTML element must match * for it to be hidden. * @param {?string} [searchSelector] The CSS selector that an HTML element * containing the given pattern must match. Defaults to the value of the * `selector` argument. * * @since Adblock Plus 3.4.2 */ function hideIfContainsImage(search, selector, searchSelector) { if (searchSelector == null) searchSelector = selector; let searchRegExp = toRegExp(search); new MutationObserver(() => { for (let element of document.querySelectorAll(searchSelector)) { let style = getComputedStyle(element); let match = style["background-image"].match(/^url\("(.*)"\)$/); if (match) { fetchContent(match[1]).then(content => { if (searchRegExp.test(uint8ArrayToHex(new Uint8Array(content)))) { let closest = element.closest(selector); if (closest) hideElement(closest); } }); } } }) .observe(document, {childList: true, subtree: true}); } exports["hide-if-contains-image"] = hideIfContainsImage; /** * Readds to the document any removed HTML elements that match a CSS selector. * * @param {string} selector The CSS selector that a removed HTML element should * match for it to be added back. * @param {string?} [parentSelector] The CSS selector that a removed HTML * element's former parent should match for it to be added back. * * @since Adblock Plus 3.3 */ function readd(selector, parentSelector = null) { observe(document, {childList: true, subtree: true}, mutation => { if (mutation.removedNodes && (!parentSelector || (mutation.target instanceof Element && mutation.target.matches(parentSelector)))) { for (let node of mutation.removedNodes) { if (node instanceof HTMLElement && node.matches(selector)) { // We don't have the location of the element in its former parent, // but it's usually OK to just add it at the end. mutation.target.appendChild(node); } } } }); } exports.readd = readd; /** * Wraps the `console.dir` API to call the `toString` method of the argument. * @alias module:content/snippets.dir-string * * @param {string} [times=1] The number of times to call the `toString` method * of the argument to `console.dir`. * * @since Adblock Plus 3.4 */ function dirString(times = "1") { let {dir} = console; console.dir = function(object) { for (let i = 0; i < times; i++) object + ""; if (typeof dir == "function") dir.call(this, object); }; } exports["dir-string"] = makeInjector(dirString); /** * Generates a random alphanumeric ID consisting of 6 base-36 digits * from the range 100000..zzzzzz (both inclusive). * * @returns {string} The random ID. * @private */ function randomId() { // 2176782336 is 36^6 which mean 6 chars [a-z0-9] // 60466176 is 36^5 // 2176782336 - 60466176 = 2116316160. This ensure to always have 6 // chars even if Math.random() returns its minimum value 0.0 // return Math.floor(Math.random() * 2116316160 + 60466176).toString(36); } function wrapPropertyAccess(object, property, descriptor) { let dotIndex = property.indexOf("."); if (dotIndex == -1) { // simple property case. let currentDescriptor = Object.getOwnPropertyDescriptor(object, property); if (currentDescriptor && !currentDescriptor.configurable) return; // Keep it configurable because the same property can be wrapped via // multiple snippet filters (#7373). let newDescriptor = Object.assign({}, descriptor, {configurable: true}); if (!currentDescriptor && !newDescriptor.get && newDescriptor.set) { let propertyValue = object[property]; newDescriptor.get = () => propertyValue; } Object.defineProperty(object, property, newDescriptor); return; } let name = property.slice(0, dotIndex); property = property.slice(dotIndex + 1); let value = object[name]; if (value && (typeof value == "object" || typeof value == "function")) wrapPropertyAccess(value, property, descriptor); let currentDescriptor = Object.getOwnPropertyDescriptor(object, name); if (currentDescriptor && !currentDescriptor.configurable) return; let setter = newValue => { value = newValue; if (newValue && (typeof newValue == "object" || typeof value == "function")) wrapPropertyAccess(newValue, property, descriptor); }; Object.defineProperty(object, name, { get: () => value, set: setter, configurable: true }); } /** * Overrides the `onerror` handler to discard tagged error messages from our * property wrapping. * * @param {string} magic The magic string that tags the error message. * @private */ function overrideOnError(magic) { let {onerror} = window; window.onerror = (message, ...rest) => { if (typeof message == "string" && message.includes(magic)) return true; if (typeof onerror == "function") return (() => {}).call.call(onerror, this, message, ...rest); }; } /** * Patches a property on the window object to abort execution when the * property is read. * * No error is printed to the console. * * The idea originates from * [uBlock Origin](https://github.com/uBlockOrigin/uAssets/blob/80b195436f8f8d78ba713237bfc268ecfc9d9d2b/filters/resources.txt#L1703). * @alias module:content/snippets.abort-on-property-read * * @param {string} property The name of the property. * * @since Adblock Plus 3.4.1 */ function abortOnPropertyRead(property) { let debugLog = (debug ? log : () => {}) .bind(null, "abort-on-property-read"); if (!property) { debugLog("no property to abort on read"); return; } let rid = randomId(); function abort() { debugLog(`${property} access aborted`); throw new ReferenceError(rid); } debugLog(`aborting on ${property} access`); wrapPropertyAccess(window, property, {get: abort, set() {}}); overrideOnError(rid); } registerDependencies(abortOnPropertyRead, log, overrideOnError, randomId, wrapPropertyAccess); exports["abort-on-property-read"] = makeInjector(abortOnPropertyRead); /** * Patches a property on the window object to abort execution when the * property is written. * * No error is printed to the console. * * The idea originates from * [uBlock Origin](https://github.com/uBlockOrigin/uAssets/blob/80b195436f8f8d78ba713237bfc268ecfc9d9d2b/filters/resources.txt#L1671). * @alias module:content/snippets.abort-on-property-write * * @param {string} property The name of the property. * * @since Adblock Plus 3.4.3 */ function abortOnPropertyWrite(property) { let debugLog = (debug ? log : () => {}) .bind(null, "abort-on-property-write"); if (!property) { debugLog("no property to abort on write"); return; } let rid = randomId(); function abort() { debugLog(`setting ${property} aborted`); throw new ReferenceError(rid); } debugLog(`aborting when setting ${property}`); wrapPropertyAccess(window, property, {set: abort}); overrideOnError(rid); } registerDependencies(abortOnPropertyWrite, log, overrideOnError, randomId, wrapPropertyAccess); exports["abort-on-property-write"] = makeInjector(abortOnPropertyWrite); /** * Aborts the execution of an inline script. * @alias module:content/snippets.abort-current-inline-script * * @param {string} api API function or property name to anchor on. * @param {?string} [search] If specified, only scripts containing the given * string are prevented from executing. If the string begins and ends with a * slash (`/`), the text in between is treated as a regular expression. * * @since Adblock Plus 3.4.3 */ function abortCurrentInlineScript(api, search = null) { let re = search ? toRegExp(search) : null; let rid = randomId(); let us = document.currentScript; let object = window; let path = api.split("."); let name = path.pop(); for (let node of path) { object = object[node]; if (!object || !(typeof object == "object" || typeof object == "function")) return; } let {get: prevGetter, set: prevSetter} = Object.getOwnPropertyDescriptor(object, name) || {}; let currentValue = object[name]; let abort = () => { let element = document.currentScript; if (element instanceof HTMLScriptElement && element.src == "" && element != us && (!re || re.test(element.textContent))) throw new ReferenceError(rid); }; let descriptor = { get() { abort(); if (prevGetter) return prevGetter.call(this); return currentValue; }, set(value) { abort(); if (prevSetter) prevSetter.call(this, value); else currentValue = value; } }; wrapPropertyAccess(object, name, descriptor); overrideOnError(rid); } registerDependencies(abortCurrentInlineScript, overrideOnError, randomId, toRegExp, wrapPropertyAccess); exports["abort-current-inline-script"] = makeInjector(abortCurrentInlineScript); /** * Traps calls to JSON.parse, and if the result of the parsing is an Object, it * will remove specified properties from the result before returning to the * caller. * * The idea originates from * [uBlock Origin](https://github.com/gorhill/uBlock/commit/2fd86a66). * @alias module:content/snippets.json-prune * * @param {string} rawPrunePaths A list of space-separated properties to remove. * @param {?string} [rawNeedlePaths] A list of space-separated properties which * must be all present for the pruning to occur. * * @since Adblock Plus 3.9.0 */ function jsonPrune(rawPrunePaths, rawNeedlePaths = "") { if (!rawPrunePaths) throw new Error("Missing paths to prune"); let prunePaths = rawPrunePaths.split(/ +/); let needlePaths = rawNeedlePaths !== "" ? rawNeedlePaths.split(/ +/) : []; let currentValue = JSON.parse; let descriptor = { value(...args) { let result; result = currentValue.apply(this, args); if (needlePaths.length > 0 && needlePaths.some(path => !findOwner(result, path))) return result; for (let path of prunePaths) { let details = findOwner(result, path); if (typeof details != "undefined") delete details[0][details[1]]; } return result; } }; Object.defineProperty(JSON, "parse", descriptor); function findOwner(root, path) { if (!(root instanceof window.Object)) return; let object = root; let chain = path.split("."); if (chain.length === 0) return; for (let i = 0; i < chain.length - 1; i++) { let prop = chain[i]; if (!utils.isOwnProperty(object, prop)) return; object = object[prop]; if (!(object instanceof window.Object)) return; } let prop = chain[chain.length - 1]; if (utils.isOwnProperty(object, prop)) return [object, prop]; } } exports["json-prune"] = makeInjector(jsonPrune); /** * Overrides a property's value on the window object with a set of * available properties. * * Possible values to override the property with: * undefined * false * true * null * noopFunc - function with empty body * trueFunc - function returning true * falseFunc - function returning false * '' - empty string * positive decimal integer, no sign, with maximum value of 0x7FFF * * The idea originates from * [uBlock Origin](https://github.com/uBlockOrigin/uAssets/blob/80b195436f8f8d78ba713237bfc268ecfc9d9d2b/filters/resources.txt#L2105). * @alias module:content/snippets.override-property-read * * @param {string} property The name of the property. * @param {string} value The value to override the property with. * * @since Adblock Plus 3.9.4 */ function overridePropertyRead(property, value) { if (!property) { throw new Error("[override-property-read snippet]: " + "No property to override."); } if (typeof value === "undefined") { throw new Error("[override-property-read snippet]: " + "No value to override with."); } let cValue; let debugLog = (debug ? log : () => {}) .bind(null, "override-property-read"); if (value === "false") { cValue = false; } else if (value === "true") { cValue = true; } else if (value === "null") { cValue = null; } else if (value === "noopFunc") { cValue = () => {}; } else if (value === "trueFunc") { cValue = () => true; } else if (value === "falseFunc") { cValue = () => false; } else if (/^\d+$/.test(value)) { cValue = parseFloat(value); } else if (value === "") { cValue = value; } else if (value !== "undefined") { throw new Error("[override-property-read snippet]: " + `Value "${value}" is not valid.`); } let newGetter = () => { debugLog(`${property} override done.`); return cValue; }; debugLog(`Overriding ${property}.`); wrapPropertyAccess(window, property, {get: newGetter, set() {}}); } registerDependencies(overridePropertyRead, log, wrapPropertyAccess); exports["override-property-read"] = makeInjector(overridePropertyRead); /** * Freezes a DOM element so it prevents adding new nodes inside it. * @alias module:content/snippets.freeze-element * * @param {string} selector The CSS selector for the parent element that * we want to freeze * @param {string?} [options] A single parameter for snippet's options. * A string containing all the options we want to pass, each of them * separated by a plus character (`+`). Empty single quotes if none (`''`). * Available options: * **subtree** (if we want to freeze all the element's children as well); * **abort** (throw an error every time an child element gets added); * @param {string?} [exceptions] An array of regex/selectors used to specify * the nodes we don't want to prevent being added. * Each array item can be: * **selector** (targeting Element nodes); * **regex** (targeting Text nodes, identified by slash); * * @since Adblock Plus 3.10 */ function freezeElement(selector, options = "", ...exceptions) { let observer; let subtree = false; let shouldAbort = false; let exceptionSelectors = exceptions.filter(e => !isRegex(e)); let regexExceptions = exceptions.filter(isRegex).map(toRegExp); let rid = randomId(); let targetNodes; checkOptions(); let data = { selector, shouldAbort, rid, exceptionSelectors, regexExceptions, changeId: 0 }; if (!ABP.DOM.frozen.has(document)) { ABP.DOM.frozen.set(document, true); proxyNativeProperties(); } observer = new MutationObserver(searchAndAttach); observer.observe(document, {childList: true, subtree: true}); searchAndAttach(); function isRegex(s) { return s.length >= 2 && s[0] == "/" && s[s.length - 1] == "/"; } function checkOptions() { let optionsChunks = options.split("+"); if (optionsChunks.length === 1 && optionsChunks[0] === "") optionsChunks = []; for (let chunk of optionsChunks) { switch (chunk) { case "subtree": subtree = true; break; case "abort": shouldAbort = true; break; default: throw new Error("[freeze] Unknown option passed to the snippet." + " [selector]: " + selector + " [option]: " + chunk); } } } function proxyNativeProperties() { let descriptor; descriptor = getAppendChildDescriptor(Node.prototype, "appendChild", isFrozen, getSnippetData); wrapPropertyAccess(Node.prototype, "appendChild", descriptor); descriptor = getAppendChildDescriptor(Node.prototype, "insertBefore", isFrozen, getSnippetData); wrapPropertyAccess(Node.prototype, "insertBefore", descriptor); descriptor = getAppendChildDescriptor(Node.prototype, "replaceChild", isFrozen, getSnippetData); wrapPropertyAccess(Node.prototype, "replaceChild", descriptor); descriptor = getAppendDescriptor(Element.prototype, "append", isFrozen, getSnippetData); wrapPropertyAccess(Element.prototype, "append", descriptor); descriptor = getAppendDescriptor(Element.prototype, "prepend", isFrozen, getSnippetData); wrapPropertyAccess(Element.prototype, "prepend", descriptor); descriptor = getAppendDescriptor(Element.prototype, "replaceWith", isFrozenOrHasFrozenParent, getSnippetDataFromNodeOrParent); wrapPropertyAccess(Element.prototype, "replaceWith", descriptor); descriptor = getAppendDescriptor(Element.prototype, "after", isFrozenOrHasFrozenParent, getSnippetDataFromNodeOrParent); wrapPropertyAccess(Element.prototype, "after", descriptor); descriptor = getAppendDescriptor(Element.prototype, "before", isFrozenOrHasFrozenParent, getSnippetDataFromNodeOrParent); wrapPropertyAccess(Element.prototype, "before", descriptor); descriptor = getInsertAdjacentDescriptor(Element.prototype, "insertAdjacentElement", isFrozenAndInsideTarget, getSnippetDataBasedOnTarget); wrapPropertyAccess(Element.prototype, "insertAdjacentElement", descriptor); descriptor = getInsertAdjacentDescriptor(Element.prototype, "insertAdjacentHTML", isFrozenAndInsideTarget, getSnippetDataBasedOnTarget); wrapPropertyAccess(Element.prototype, "insertAdjacentHTML", descriptor); descriptor = getInsertAdjacentDescriptor(Element.prototype, "insertAdjacentText", isFrozenAndInsideTarget, getSnippetDataBasedOnTarget); wrapPropertyAccess(Element.prototype, "insertAdjacentText", descriptor); descriptor = getInnerHTMLDescriptor(Element.prototype, "innerHTML", isFrozen, getSnippetData); wrapPropertyAccess(Element.prototype, "innerHTML", descriptor); descriptor = getInnerHTMLDescriptor(Element.prototype, "outerHTML", isFrozenOrHasFrozenParent, getSnippetDataFromNodeOrParent); wrapPropertyAccess(Element.prototype, "outerHTML", descriptor); descriptor = getTextContentDescriptor(Node.prototype, "textContent", isFrozen, getSnippetData); wrapPropertyAccess(Node.prototype, "textContent", descriptor); descriptor = getTextContentDescriptor(HTMLElement.prototype, "innerText", isFrozen, getSnippetData); wrapPropertyAccess(HTMLElement.prototype, "innerText", descriptor); descriptor = getTextContentDescriptor(Node.prototype, "nodeValue", isFrozen, getSnippetData); wrapPropertyAccess(Node.prototype, "nodeValue", descriptor); function isFrozen(node) { return node && ABP.DOM.frozen.has(node); } function isFrozenOrHasFrozenParent(node) { try { return node && (ABP.DOM.frozen.has(node) || ABP.DOM.frozen.has(DOM.getParentNode.call(node))); } catch (error) { return false; } } function isFrozenAndInsideTarget(node, isInsideTarget) { try { return node && (ABP.DOM.frozen.has(node) && isInsideTarget || ABP.DOM.frozen.has(DOM.getParentNode.call(node)) && !isInsideTarget); } catch (error) { return false; } } function getSnippetData(node) { return ABP.DOM.frozen.get(node); } function getSnippetDataFromNodeOrParent(node) { try { if (ABP.DOM.frozen.has(node)) return ABP.DOM.frozen.get(node); let parent = DOM.getParentNode.call(node); return ABP.DOM.frozen.get(parent); } catch (error) {} } function getSnippetDataBasedOnTarget(node, isInsideTarget) { try { if (ABP.DOM.frozen.has(node) && isInsideTarget) return ABP.DOM.frozen.get(node); let parent = DOM.getParentNode.call(node); return ABP.DOM.frozen.get(parent); } catch (error) {} } } function searchAndAttach() { targetNodes = document.querySelectorAll(selector); markNodes(targetNodes, false); } function markNodes(nodes, isChild = true) { for (let node of nodes) { if (!ABP.DOM.frozen.has(node)) { ABP.DOM.frozen.set(node, data); if (!isChild && subtree) { new MutationObserver(mutationsList => { for (let mutation of mutationsList) markNodes(mutation.addedNodes); }).observe(node, {childList: true, subtree: true}); } if (subtree && node.nodeType === Node.ELEMENT_NODE) markNodes(node.childNodes); } } } // utilities function logPrefixed(id, ...args) { log(`[freeze][${id}] `, ...args); } function logChange(nodeOrDOMString, target, property, snippetData) { let targetSelector = snippetData.selector; let chgId = snippetData.changeId; let isDOMString = typeof nodeOrDOMString == "string"; let action = snippetData.shouldAbort ? "aborting" : "watching"; console.groupCollapsed(`[freeze][${chgId}] ${action}: ${targetSelector}`); switch (property) { case "appendChild": case "append": case "prepend": case "insertBefore": case "replaceChild": case "insertAdjacentElement": case "insertAdjacentHTML": case "insertAdjacentText": case "innerHTML": case "outerHTML": logPrefixed(chgId, isDOMString ? "text: " : "node: ", nodeOrDOMString); logPrefixed(chgId, "added to node: ", target); break; case "replaceWith": case "after": case "before": logPrefixed(chgId, isDOMString ? "text: " : "node: ", nodeOrDOMString); logPrefixed(chgId, "added to node: ", target.parentNode); break; case "textContent": case "innerText": case "nodeValue": logPrefixed(chgId, "content of node: ", target); logPrefixed(chgId, "changed to: ", nodeOrDOMString); break; default: break; } logPrefixed(chgId, `using the function "${property}"`); console.groupEnd(); snippetData.changeId++; } function isExceptionNode(element, expSelectors) { if (expSelectors) { for (let exception of expSelectors) { if (element.matches(exception)) return true; } } return false; } function isExceptionText(string, regExceptions) { if (regExceptions) { for (let exception of regExceptions) { if (exception.test(string)) return true; } } return false; } function abort(id) { throw new ReferenceError(id); } // check inserted content function checkHTML(htmlText, parent, property, snippetData) { let finalValue = ""; let domparser = new DOMParser(); let doc = domparser.parseFromString(htmlText, "text/html"); let nodes = doc.body.childNodes; let accepted = checkMultiple(nodes, parent, property, snippetData); let content = accepted.map(node => { switch (node.nodeType) { case Node.ELEMENT_NODE: return node.outerHTML; case Node.TEXT_NODE: return node.textContent; default: return ""; } }); finalValue = content.join(""); return finalValue; } function checkMultiple(nodesOrDOMStrings, parent, property, snippetData) { let accepted = []; for (let nodeOrDOMString of nodesOrDOMStrings) { if (checkShouldInsert(nodeOrDOMString, parent, property, snippetData)) accepted.push(nodeOrDOMString); } return accepted; } function checkShouldInsert(nodeOrDOMString, parent, property, snippetData) { let aborting = snippetData.shouldAbort; let regExceptions = snippetData.regexExceptions; let expSelectors = snippetData.exceptionSelectors; let id = snippetData.rid; if (typeof nodeOrDOMString == "string") { let domString = nodeOrDOMString; if (isExceptionText(domString, regExceptions)) return true; if (debug) logChange(domString, parent, property, snippetData); if (aborting) abort(id); return debug; } let node = nodeOrDOMString; switch (node.nodeType) { case Node.ELEMENT_NODE: if (isExceptionNode(node, expSelectors)) return true; if (aborting) { if (debug) logChange(node, parent, property, snippetData); abort(id); } if (debug) { hideElement(node); logChange(node, parent, property, snippetData); return true; } return false; case Node.TEXT_NODE: if (isExceptionText(node.textContent, regExceptions)) return true; if (debug) logChange(node, parent, property, snippetData); if (aborting) abort(id); return false; default: return true; } } // descriptors function getAppendChildDescriptor(target, property, shouldValidate, getSnippetData) { let desc = Object.getOwnPropertyDescriptor(target, property) || {}; let origin = desc.get || desc.value; if (!origin) return; return { get() { return function(...args) { if (shouldValidate(this)) { let snippetData = getSnippetData(this); if (snippetData) { let incomingNode = args[0]; if (!checkShouldInsert(incomingNode, this, property, snippetData)) return incomingNode; } } return origin.apply(this, args); }; } }; } function getAppendDescriptor(target, property, shouldValidate, getSnippetData) { let desc = Object.getOwnPropertyDescriptor(target, property) || {}; let origin = desc.get || desc.value; if (!origin) return; return { get() { return function(...nodesOrDOMStrings) { if (!shouldValidate(this)) return origin.apply(this, nodesOrDOMStrings); let snippetData = getSnippetData(this); if (!snippetData) return origin.apply(this, nodesOrDOMStrings); let accepted = checkMultiple(nodesOrDOMStrings, this, property, snippetData); if (accepted.length > 0) return origin.apply(this, accepted); }; } }; } function getInsertAdjacentDescriptor(target, property, shouldValidate, getSnippetData) { let desc = Object.getOwnPropertyDescriptor(target, property) || {}; let origin = desc.get || desc.value; if (!origin) return; return { get() { return function(...args) { let [position, value] = args; let isInsideTarget = position === "afterbegin" || position === "beforeend"; if (shouldValidate(this, isInsideTarget)) { let snippetData = getSnippetData(this, isInsideTarget); if (snippetData) { let parent = isInsideTarget ? this : DOM.getParentNode.call(this); let finalValue; switch (property) { case "insertAdjacentElement": if (!checkShouldInsert(value, parent, property, snippetData)) return value; break; case "insertAdjacentHTML": finalValue = checkHTML(value, parent, property, snippetData); if (finalValue) return origin.call(this, position, finalValue); return; case "insertAdjacentText": if (!checkShouldInsert(value, parent, property, snippetData)) return; break; default: break; } } } return origin.apply(this, args); }; } }; } function getInnerHTMLDescriptor(target, property, shouldValidate, getSnippetData) { let desc = Object.getOwnPropertyDescriptor(target, property) || {}; let {set: prevSetter} = desc; if (!prevSetter) return; return { set(htmlText) { if (!shouldValidate(this)) return prevSetter.call(this, htmlText); let snippetData = getSnippetData(this); if (!snippetData) return prevSetter.call(this, htmlText); let finalValue = checkHTML(htmlText, this, property, snippetData); if (finalValue) return prevSetter.call(this, finalValue); } }; } function getTextContentDescriptor(target, property, shouldValidate, getSnippetData) { let desc = Object.getOwnPropertyDescriptor(target, property) || {}; let {set: prevSetter} = desc; if (!prevSetter) return; return { set(domString) { if (!shouldValidate(this)) return prevSetter.call(this, domString); let snippetData = getSnippetData(this); if (!snippetData) return prevSetter.call(this, domString); if (checkShouldInsert(domString, this, property, snippetData)) return prevSetter.call(this, domString); } }; } } registerDependencies(freezeElement, hideElement, overrideOnError, randomId, toRegExp, log, wrapPropertyAccess); exports["freeze-element"] = makeInjector(freezeElement); /** * Strips a query string parameter from `fetch()` calls. * @alias module:content/snippets.strip-fetch-query-parameter * * @param {string} name The name of the parameter. * @param {?string} [urlPattern] An optional pattern that the URL must match. * * @since Adblock Plus 3.5.1 */ function stripFetchQueryParameter(name, urlPattern = null) { let fetch_ = window.fetch; if (typeof fetch_ != "function") return; let urlRegExp = urlPattern ? toRegExp(urlPattern) : null; window.fetch = function fetch(...args) { let [source] = args; if (typeof source == "string" && (!urlRegExp || urlRegExp.test(source))) { let url = new URL(source); url.searchParams.delete(name); args[0] = url.href; } return fetch_.apply(this, args); }; } registerDependencies(stripFetchQueryParameter, toRegExp); exports["strip-fetch-query-parameter"] = makeInjector(stripFetchQueryParameter); /** * Represents an undirected graph. Used for producing adjacency and feature * matrices. */ class UndirectedGraph { /** * Initialize an empty graph of a predefined size * @param {number} numOfVertices - size of a new graph * @private */ constructor(numOfVertices) { // Create adjacency matrix and initialize it with '0's let emptyMatrix = new Array(numOfVertices); for (let i = 0; i < numOfVertices; i++) emptyMatrix[i] = new Array(numOfVertices).fill(0); this.adjacencyMatrix = emptyMatrix; } /** * Add an edge from node A to node B * @param {number} posA - number of a node from which to add an edge * @param {number} posB - number of a node into which to add an edge * @return {bool} whether operation was succesful * @private */ addEdge(posA, posB) { if (posA < 0 || posB < 0) throw new Error("Can't add an Edge to vertex at negative position "); let numOfVertices = this.adjacencyMatrix.length; if (posA >= numOfVertices || posB >= numOfVertices) return false; this.adjacencyMatrix[posA][posB] = 1; // We want to be symmetric, as this is undirected graph this.adjacencyMatrix[posB][posA] = 1; return true; } } // Source: https://github.com/sindresorhus/html-tags/blob/master/html-tags.json let htmlTags = [ "a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr" ]; const GRAPH_CUT_OFF = 200; const THRESHOLD = 0.5; /** * A (tag, int) Map of all HTML tags with values reflecting the number of a tag * in alphabetical enumeration. * @type {Map} */ let htmlTagsMap = new Map( htmlTags.map((name, index) => [name.toUpperCase(), index + 1]) ); /** * Builds an adjecency matrix and a feature matrix based on an input element. * @param {Element} target Input element to convert. * @param {string} tagName An HTML tag name to filter mutations. * @returns {Tuple} (adjMatrix, elementTags) - a 2D array that represent an * adjacency matrix of an element. HTML elements are undirected trees, so the * adjacency matrix is symmetric. * elementTags - a 1D feature matrix, where each element is represents a type * of a node. * @private */ function processElement(target) { let {mark, end} = profile("ml:addEdges"); let elementGraph = new UndirectedGraph(GRAPH_CUT_OFF); let numOfElements = 1; let elementTags = new Array(GRAPH_CUT_OFF).fill(0); let addEdges = (parentElement, parentPos) => { let children = parentElement.children; for (let child of children) { if (numOfElements > GRAPH_CUT_OFF) break; elementTags[numOfElements] = htmlTagsMap.get(child.tagName) || 0; elementGraph.addEdge(parentPos, numOfElements); addEdges(child, numOfElements++); } }; elementTags[0] = (htmlTagsMap.get(target.tagName) || 0); // Kick off recursive graph building mark(); addEdges(target, 0); end(); let adjMatrix = elementGraph.adjacencyMatrix; return {adjMatrix, elementTags}; } /** * Runs a ML prediction on each element that matches a selector. * @param {string} selector A selector to use for finding candidates. * @param {WeakSet} seenMlTargets Matched elements to ignore. * * @private */ function predictAds(selector, seenMlTargets) { let debugLog = (debug ? log : () => {}) .bind(null, "ml-hide-if-graph-matches"); let targets = document.querySelectorAll(selector); for (let target of targets) { if (seenMlTargets.has(target)) continue; if (target.innerText == "") continue; seenMlTargets.add(target); let processedElement = processElement(target); // as this call is asynchronous, ensure the id is unique let {mark, end} = profile(`ml:inference:${randomId()}`); mark(); browser.runtime.sendMessage({ type: "ml.inference", inputs: [ { data: [processedElement.elementTags], preprocess: [ {funcName: "cast", args: "int32"}, {funcName: "pad", args: GRAPH_CUT_OFF}, {funcName: "oneHot", args: htmlTags.length}, {funcName: "cast", args: "float32"} ] }, { data: [processedElement.adjMatrix], preprocess: [ {funcName: "pad", args: GRAPH_CUT_OFF}, {funcName: "unstack"}, {funcName: "localPooling"}, {funcName: "stack"} ] } ], model: "mlHideIfGraphMatches" }).then(rawPrediction => { end(true); debugLog(rawPrediction); let predictionValues = Object.values(rawPrediction); if (!predictionValues.some(value => value > 0)) throw new Error("ML prediction results are corrupted"); let result = predictionValues.filter((element, index) => index % 2 == 0 ).map(element => element > THRESHOLD); if (!result[0]) { debugLog("Detected ad: " + target.innerText); hideElement(target); } }).catch(() => { // ensure the metric is sent even on possible ML failures end(true); }); } } /** * Hides any HTML element if its structure (graph) is classified as an ad * by a built-in machine learning model. * @alias module:content/snippets.ml-hide-if-graph-matches * * @param {string} selector A selector that produces a list of targets to * classify. * @param {string} tagName An HTML tag name to filter mutations. * * @since Adblock Plus 3.8 */ function mlHideIfGraphMatches(selector, tagName) { let scheduled = false; let seenMlTargets = new WeakSet(); if (typeof browser === "undefined") self.browser = chrome; let relevantTagName = tagName; let callback = mutations => { for (let mutation of mutations) { if (mutation.target.tagName == relevantTagName) { if (!scheduled) { scheduled = true; requestAnimationFrame(() => { scheduled = false; predictAds(selector, seenMlTargets); }); } break; } } }; new MutationObserver(callback) .observe(document, {childList: true, characterData: true, subtree: true}); predictAds(selector, seenMlTargets); } exports["ml-hide-if-graph-matches"] = mlHideIfGraphMatches; /** * Calculates and returns the perceptual hash of the supplied image. * * The following lines are based off the blockhash-js library which is * licensed under the MIT licence * {@link https://github.com/commonsmachinery/blockhash-js/tree/2084417e40005e37f4ad957dbd2bca08ddc222bc Blockhash.js} * * @param {object} imageData ImageData object containing the image data of the * image for which a hash should be calculated * @param {?number} [blockBits] The block width used to generate the perceptual * image hash, a number of 4 will split the image into 16 blocks * (width/4 * height/4). Defaults to 8. * @returns {string} The resulting hash * @private */ function hashImage(imageData, blockBits) { function median(mdarr) { mdarr.sort((a, b) => a - b); let {length} = mdarr; if (length % 2 === 0) return (mdarr[length / 2 - 1] + mdarr[length / 2]) / 2.0; return mdarr[(length / 2) | 0]; } function translateBlocksToBits(blocks, pixelsPerBlock) { let halfBlockValue = pixelsPerBlock * 256 * 3 / 2; let bandsize = blocks.length / 4; // Compare medians across four horizontal bands for (let i = 0; i < 4; i++) { let index = i * bandsize; let length = (i + 1) * bandsize; let m = median(blocks.slice(index, length)); for (let j = index; j < length; j++) { let v = blocks[j]; // Output a 1 if the block is brighter than the median. // With images dominated by black or white, the median may // end up being 0 or the max value, and thus having a lot // of blocks of value equal to the median. To avoid // generating hashes of all zeros or ones, in that case output // 0 if the median is in the lower value space, 1 otherwise blocks[j] = (v > m || (m - v < 1 && m > halfBlockValue)) ? 1 : 0; } } } function bitsToHexhash(bitsArray) { let hex = []; let {length} = bitsArray; for (let i = 0; i < length; i += 4) { let nibble = bitsArray.slice(i, i + 4); hex.push(parseInt(nibble.join(""), 2).toString(16)); } return hex.join(""); } function bmvbhashEven(data, bits) { let {width, height, data: imgData} = data; let blocksizeX = (width / bits) | 0; let blocksizeY = (height / bits) | 0; let result = new Array(bits * bits); for (let y = 0; y < bits; y++) { for (let x = 0; x < bits; x++) { let total = 0; for (let iy = 0; iy < blocksizeY; iy++) { let ii = ((y * blocksizeY + iy) * width + x * blocksizeX) * 4; for (let ix = 0; ix < blocksizeX; ix++) { let alpha = imgData[ii + 3]; if (alpha === 0) total += 765; else total += imgData[ii] + imgData[ii + 1] + imgData[ii + 2]; ii += 4; } } result[y * bits + x] = total; } } translateBlocksToBits(result, blocksizeX * blocksizeY); return bitsToHexhash(result); } function bmvbhash(data, bits) { let x; let y; let blockWidth; let blockHeight; let weightTop; let weightBottom; let weightLeft; let weightRight; let blockTop; let blockBottom; let blockLeft; let blockRight; let yMult; let yFrac; let yInt; let xMult; let xFrac; let xInt; let {width, height, data: imgData} = data; let evenX = width % bits === 0; let evenY = height % bits === 0; if (evenX && evenY) return bmvbhashEven(data, bits); // initialize blocks array with 0s let result = new Array(bits * bits).fill(0); blockWidth = width / bits; blockHeight = height / bits; yInt = 1; yFrac = 0; yMult = blockHeight; weightTop = 1; weightBottom = 0; let ii = 0; for (y = 0; y < height; y++) { if (evenY) { blockTop = blockBottom = (y / blockHeight) | 0; } else { if (y + 1 >= yMult) { let mod = (y + 1) % blockHeight; yInt = mod | 0; yFrac = mod - yInt; if (blockHeight > 1) yMult = Math.ceil((y + 1) / blockHeight) * blockHeight; weightTop = (1 - yFrac); weightBottom = (yFrac); } // yInt will be 0 on bottom/right borders and on block boundaries if (yInt > 0 || (y + 1) === height) { blockTop = blockBottom = (y / blockHeight) | 0; } else { let div = y / blockHeight; blockTop = div | 0; blockBottom = blockTop === div ? blockTop : blockTop + 1; } } xInt = 1; xFrac = 0; xMult = blockWidth; weightLeft = 1; weightRight = 0; for (x = 0; x < width; x++) { let avgvalue = 765; let alpha = imgData[ii + 3]; if (alpha !== 0) avgvalue = imgData[ii] + imgData[ii + 1] + imgData[ii + 2]; if (evenX) { blockLeft = blockRight = (x / blockWidth) | 0; } else { if (x + 1 >= xMult) { let mod = (x + 1) % blockWidth; xInt = mod | 0; xFrac = mod - xInt; if (blockWidth > 1) xMult = Math.ceil((x + 1) / blockWidth) * blockWidth; weightLeft = 1 - xFrac; weightRight = xFrac; } // xInt will be 0 on bottom/right borders and on block boundaries if (xInt > 0 || (x + 1) === width) { blockLeft = blockRight = (x / blockWidth) | 0; } else { let div = x / blockWidth; blockLeft = div | 0; blockRight = blockLeft === div ? blockLeft : blockLeft + 1; } } // add weighted pixel value to relevant blocks result[blockTop * bits + blockLeft] += avgvalue * weightTop * weightLeft; result[blockTop * bits + blockRight] += avgvalue * weightTop * weightRight; result[blockBottom * bits + blockLeft] += avgvalue * weightBottom * weightLeft; result[blockBottom * bits + blockRight] += avgvalue * weightBottom * weightRight; ii += 4; xInt++; } yInt++; } translateBlocksToBits(result, blockWidth * blockHeight); return bitsToHexhash(result); } return bmvbhash(imageData, blockBits); } /** * Calculate the hamming distance for two hashes in hex format * * The following lines are based off the blockhash-js library which is * licensed under the MIT licence * {@link https://github.com/commonsmachinery/blockhash-js/tree/2084417e40005e37f4ad957dbd2bca08ddc222bc Blockhash.js} * * @param {string} hash1 the first hash of the comparison * @param {string} hash2 the second hash of the comparison * @returns {number} The resulting hamming distance between hash1 and hash2 * @private */ function hammingDistance(hash1, hash2) { let oneBits = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4]; let d = 0; let i; if (hash1.length !== hash2.length) throw new Error("Can't compare hashes with different length"); for (i = 0; i < hash1.length; i++) { let n1 = parseInt(hash1[i], 16); let n2 = parseInt(hash2[i], 16); d += oneBits[n1 ^ n2]; } return d; } /** * Hides any HTML element or one of its ancestors matching a CSS selector if * the perceptual hash of the image src or background image of the element * matches the given perceptual hash. * @alias module:content/snippets.hide-if-contains-image-hash * * @param {string} hashes List of comma seperated perceptual hashes of the * images that should be blocked, see also `maxDistance`. * @param {?string} [selector] The CSS selector that an HTML element * containing the given pattern must match. If empty or omitted, defaults * to the image element itself. * @param {?string} [maxDistance] The maximum hamming distance between `hash` * and the perceptual hash of the image to be considered a match. Defaults * to 0. * @param {?number} [blockBits] The block width used to generate the perceptual * image hash, a number of 4 will split the image into 16 blocks * (width/4 * height/4). Defaults to 8. The maximum value allowed is 64. * @param {?string} [selection] A string with image coordinates in the format * XxYxWIDTHxHEIGHT for which a perceptual hash should be computated. If * ommitted the entire image will be hashed. The X and Y values can be * negative, in this case they will be relative to the right/bottom corner. * * @since Adblock Plus 3.6.2 */ function hideIfContainsImageHash(hashes, selector, maxDistance, blockBits, selection) { if (selector == null || selector === "") selector = "img"; if (maxDistance == null) maxDistance = 0; if (blockBits == null) blockBits = 8; if (isNaN(maxDistance) || isNaN(blockBits)) return; blockBits |= 0; if (blockBits < 1 || blockBits > 64) return; selection = (selection || "").split("x"); let seenImages = new Set(); let callback = images => { for (let image of images) { seenImages.add(image.src); let imageElement = new Image(); imageElement.crossOrigin = "anonymous"; imageElement.onload = () => { let canvas = document.createElement("canvas"); let context = canvas.getContext("2d"); let {width, height} = imageElement; // If a selection is present we are only going to look at that // part of the image let sX = parseInt(selection[0], 10) || 0; let sY = parseInt(selection[1], 10) || 0; let sWidth = parseInt(selection[2], 10) || width; let sHeight = parseInt(selection[3], 10) || height; if (sWidth == 0 || sHeight == 0) return; // if sX or sY is negative start from the right/bottom respectively if (sX < 0) sX = width + sX; if (sY < 0) sY = height + sY; if (sX < 0) sX = 0; if (sY < 0) sY = 0; if (sWidth > width) sWidth = width; if (sHeight > height) sHeight = height; canvas.width = sWidth; canvas.height = sHeight; context.drawImage( imageElement, sX, sY, sWidth, sHeight, 0, 0, sWidth, sHeight); let imageData = context.getImageData(0, 0, sWidth, sHeight); let result = hashImage(imageData, blockBits); for (let hash of hashes.split(",")) { if (result.length == hash.length) { if (hammingDistance(result, hash) <= maxDistance) { let closest = image.closest(selector); if (closest) { hideElement(closest); return; } } } } }; imageElement.src = image.src; } }; callback(document.images); new MutationObserver(records => { let images = new Set(); for (let img of document.images) { if (!seenImages.has(img.src)) images.add(img); } if (images.size) callback(images); }).observe(document, {childList: true, subtree: true, attributes: true}); } exports["hide-if-contains-image-hash"] = hideIfContainsImageHash; /** * Hides any HTML element that uses an `aria-labelledby`, or one of its * ancestors, if the related aria element contains the searched text. * @alias module:content/snippets.hide-if-labelled-by * * @param {string} search The string to look for in HTML elements. If the * string begins and ends with a slash (`/`), the text in between is treated * as a regular expression. * @param {string} selector The CSS selector of an HTML element that uses as * `aria-labelledby` attribute. * @param {?string} [searchSelector] The CSS selector of an ancestor of the * HTML element that uses as `aria-labelledby` attribute. Defaults to the * value of the `selector` argument. * * @since Adblock Plus 3.9 */ function hideIfLabelledBy(search, selector, searchSelector = null) { let sameSelector = searchSelector == null; let searchRegExp = toRegExp(search); let hidden = new WeakSet(); let callback = () => { for (let node of document.querySelectorAll(selector)) { let closest = sameSelector ? node : node.closest(searchSelector); if (!closest || !isVisible(node, getComputedStyle(node), closest)) continue; let attr = node.getAttribute("aria-labelledby"); let fallback = () => { if (hidden.has(closest)) return; if (searchRegExp.test(node.getAttribute("aria-label") || "")) { hidden.add(closest); hideElement(closest); } }; if (attr) { for (let label of attr.split(/\s+/)) { let target = document.getElementById(label); if (target) { if (!hidden.has(target) && searchRegExp.test(target.innerText)) { hidden.add(target); hideElement(closest); } } else { fallback(); } } } else { fallback(); } } }; let options = {characterData: true, childList: true, subtree: true}; new MutationObserver(callback).observe(document, options); callback(); } exports["hide-if-labelled-by"] = hideIfLabelledBy; /** * Hide a specific element through a XPath 1.0 query string. * @alias module:content/snippets.hide-if-matches-xpath * * @param {string} query The XPath query that targets the element to hide. * * @since Adblock Plus 3.9.0 */ function hideIfMatchesXPath(query) { let hidden = new WeakSet(); let callback = () => { // do not use ORDERED_NODE_ITERATOR_TYPE or the test env will fail let result = document.evaluate(query, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (let i = 0, {snapshotLength} = result; i < snapshotLength; i++) { let element = result.snapshotItem(i); if (hidden.has(element)) continue; hidden.add(element); if (element.nodeType === Node.ELEMENT_NODE) hideElement(element); else element.textContent = ""; } }; let options = {characterData: true, childList: true, subtree: true}; new MutationObserver(callback).observe(document, options); callback(); } exports["hide-if-matches-xpath"] = hideIfMatchesXPath; /** * Whether debug mode is enabled. * @type {boolean} * @private */ let debug = false; /** * Enables debug mode. * @alias module:content/snippets.debug * * @example * example.com#$#debug; log 'Hello, world!' * * @since Adblock Plus 3.8 */ function setDebug() { debug = true; } exports["debug"] = setDebug; /** * Default profile("...") returned object when profile mode is disabled. * @type {Profiler} * @private */ let noopProfile = { mark() {}, end() {}, toString() { return "{mark(){},end(){}}"; } }; /** * Whether profile mode is inactive. * @type {boolean} * @private */ let inactiveProfile = true; /** * Enables profile mode. * @alias module:content/snippets.profile * @since Adblock Plus 3.9 * * @example * example.com#$#profile; log 'Hello, world!' */ function setProfile() { inactiveProfile = false; } exports["profile"] = setProfile; /** * @typedef {object} Profiler * @property {function} mark Add a `performance.mark(uniqueId)` entry. * @property {function} end Measure and clear `uniqueId` related marks. If a * `true` value is passed as argument, clear related interval and process all * collected samples since the creation of the profiler. * @private */ /** * Create an object with `mark()` and `end()` methods to either keep marking a * specific profiled name, or ending it. * * @example * let {mark, end} = profile('console.log'); * mark(); * console.log(1, 2, 3); * end(); * * @param {string} id the callback name or unique ID to profile. * @param {number} [rate] The number of times per minute to process samples. * @returns {Profiler} The profiler with `mark()` and `end(clear = false)` * methods. * @private */ function profile(id, rate = 10) { if (inactiveProfile) return noopProfile; function sendMessage(message) { let {runtime} = (typeof browser == "undefined" ? chrome : browser); runtime.sendMessage(message); } function processSamples() { let samples = []; for (let {name, duration} of performance.getEntriesByType("measure")) samples.push({name, duration}); if (samples.length) { performance.clearMeasures(); sendMessage({ type: "profiler.sample", category: "snippets", samples }); } } // avoid creation of N intervals when the same id is used // over and over (i.e. within loops or multiple profile calls) if (!profile[id]) { profile[id] = setInterval(processSamples, Math.round(60000 / Math.min(60, rate))); } return { mark() { performance.mark(id); }, end(clear = false) { performance.measure(id, id); performance.clearMarks(id); if (clear) { clearInterval(profile[id]); delete profile[id]; processSamples(); } } }; }
29.02815
134
0.621427
ac863d98b71742d6e53a622c771b0dcc3a703b0c
280
js
JavaScript
learning-node/streams/file-server.js
sntwandy/Backend-NodeJS
c9fcf7df679bb7df74fa005c28d5be0c164d41d0
[ "MIT" ]
null
null
null
learning-node/streams/file-server.js
sntwandy/Backend-NodeJS
c9fcf7df679bb7df74fa005c28d5be0c164d41d0
[ "MIT" ]
null
null
null
learning-node/streams/file-server.js
sntwandy/Backend-NodeJS
c9fcf7df679bb7df74fa005c28d5be0c164d41d0
[ "MIT" ]
null
null
null
const fs = require('fs'); const server = require('http').createServer(); server.on('request', (req, res) => { fs.readFile(__dirname + '/big.txt', (err, data) => { if (err) { console.error(err); } else { res.end(data); }; }); }); server.listen(3000);
20
54
0.546429
ac86aed55baebb8df4f8c40482cd1aca8bbd4ded
3,156
js
JavaScript
src/Administration/Resources/app/administration/test/module/sw-cms/elements/product-description-reviews/config/sw-cms-el-config-product-description-reviews.spec.js
tc-innovations/platform
ed877804fadb732af421e625293683f03556a124
[ "MIT" ]
1
2021-03-25T09:16:08.000Z
2021-03-25T09:16:08.000Z
src/Administration/Resources/app/administration/test/module/sw-cms/elements/product-description-reviews/config/sw-cms-el-config-product-description-reviews.spec.js
tc-innovations/platform
ed877804fadb732af421e625293683f03556a124
[ "MIT" ]
null
null
null
src/Administration/Resources/app/administration/test/module/sw-cms/elements/product-description-reviews/config/sw-cms-el-config-product-description-reviews.spec.js
tc-innovations/platform
ed877804fadb732af421e625293683f03556a124
[ "MIT" ]
1
2021-04-06T07:47:39.000Z
2021-04-06T07:47:39.000Z
import { createLocalVue, shallowMount } from '@vue/test-utils'; import 'src/module/sw-cms/mixin/sw-cms-element.mixin'; import 'src/module/sw-cms/elements/product-description-reviews/config'; const productMock = { name: 'Awesome Product', description: 'This product is awesome' }; function createWrapper() { const localVue = createLocalVue(); return shallowMount(Shopware.Component.build('sw-cms-el-config-product-description-reviews'), { localVue, sync: false, mocks: { $tc: v => v }, stubs: { 'sw-tabs': { template: '<div class="sw-tabs"><slot></slot><slot name="content" active="content"></slot></div>' }, 'sw-container': { template: '<div class="sw-container"><slot></slot></div>' }, 'sw-tabs-item': true, 'sw-entity-single-select': true, 'sw-alert': true }, provide: { feature: { isActive: () => true }, cmsService: { getCmsBlockRegistry: () => { return {}; }, getCmsElementRegistry: () => { return { 'product-description-reviews': {} }; } }, repositoryFactory: { create: () => { return { get: () => Promise.resolve(productMock), search: () => Promise.resolve(productMock) }; } } }, propsData: { element: { config: {}, data: {} }, defaultConfig: { product: { value: null }, alignment: { value: null } } }, data() { return { cmsPageState: { currentPage: { type: 'ladingpage' } } }; } }); } describe('src/module/sw-cms/elements/product-description-reviews/config', () => { it('should show product selector if page type is not product detail', async () => { const wrapper = createWrapper(); const productSelector = wrapper.find('sw-entity-single-select-stub'); const alert = wrapper.find('sw-alert-stub'); expect(productSelector.exists()).toBeTruthy(); expect(alert.exists()).toBeFalsy(); }); it('should show alert information if page type is product detail', async () => { const wrapper = createWrapper(); await wrapper.setData({ cmsPageState: { currentPage: { type: 'product_detail' } } }); const productSelector = wrapper.find('sw-entity-single-select-stub'); const alert = wrapper.find('sw-alert-stub'); expect(productSelector.exists()).toBeFalsy(); expect(alert.exists()).toBeTruthy(); }); });
30.346154
113
0.459442
ac87507d8bb86dae9ad290ebf00c27501c5ab0c7
2,264
js
JavaScript
deployments/slave/test/index.test.js
conorturner/bach
049ab058ebed0d7d9c2c17e1b7793d3a1225aa25
[ "MIT" ]
null
null
null
deployments/slave/test/index.test.js
conorturner/bach
049ab058ebed0d7d9c2c17e1b7793d3a1225aa25
[ "MIT" ]
7
2020-07-16T16:54:46.000Z
2022-01-22T10:28:29.000Z
deployments/slave/test/index.test.js
conorturner/bach
049ab058ebed0d7d9c2c17e1b7793d3a1225aa25
[ "MIT" ]
null
null
null
/* eslint-disable no-undef */ const http = require("http"); const childProcess = require("child_process"); const tar = require("tar-fs"); const PORT = 9001; describe("Test Docker Wrapper", () => { beforeAll((done) => { childProcess.execSync("rm -rf ./app"); done(); }); it("Slave should request application code", (done) => { const N_BYTES = 70e6; let echoedBytes = 0, consumed; const server = http.createServer(); server.listen(PORT); server.on("request", (req, res) => { // console.log(req.url, req.headers) const type = req.url.split("/").pop(); switch (type) { // SSR - super simple routing :D case "app": { const tarStream = tar.pack("./test/src"); tarStream.pipe(res); // res.end(); break; } case "heartbeat": { res.end(); break; } case "config": { res.end(JSON.stringify({ BINARY: "node", ARGS: ["./src/echo.js"], TASK_TYPE: "mapper", DATA_URI: "https://storage.googleapis.com/public-stuff/GDELT1MIL.dat", DATA_START: 0, DATA_END: N_BYTES - 1 })); break; } case "callback": { let buffer = []; // this only supports 1 request const clientEnd = () => { buffer = Buffer.concat(buffer); echoedBytes = buffer.length; }; req.on("data", (data) => { buffer.push(data); }); req.on("end", () => { clientEnd(); res.end(); }); req.on("aborted", clientEnd); break; } case "close": { consumed = parseInt(req.headers.consumed, 10); if (consumed === N_BYTES) console.log("slave read all bytes"); else console.log("slave did not complete", consumed); res.end(); break; } default: { done(new Error("Unexpected request: " + type)); break; } } }); // const cmd = `docker run -e CALLBACK_ENDPOINT=http://192.168.0.10:${PORT}/uuid-1234 bach-slave`; const cmd = `CALLBACK_ENDPOINT=http://localhost:${PORT}/uuid-1234 node index`; childProcess.exec(cmd, (err, stdout, stderr) => { if (err) return console.error(err); if (stderr) console.error(stderr); console.log(stdout); console.log(stderr); server.close(); expect(consumed).toBe(echoedBytes); done(); }); }); });
22.868687
100
0.574647
ac88ca36a0b224df1ab5431d2baaac0f03cdc804
8,223
js
JavaScript
Website/Scripts/WebSharper/WebSharper.UI.Next.CSharp.js
jonadler/TwitterMashup
627f72d7544b53aca16eb2a188d4256b494d072d
[ "MIT" ]
24
2017-06-26T14:45:36.000Z
2020-05-04T13:45:23.000Z
Website/Scripts/WebSharper/WebSharper.UI.Next.CSharp.js
jonadler/TweetMashup
627f72d7544b53aca16eb2a188d4256b494d072d
[ "MIT" ]
8
2017-07-01T10:50:40.000Z
2021-01-18T03:10:29.000Z
Website/Scripts/WebSharper/WebSharper.UI.Next.CSharp.js
jonadler/TweetMashup
627f72d7544b53aca16eb2a188d4256b494d072d
[ "MIT" ]
1
2017-06-26T14:45:41.000Z
2017-06-26T14:45:41.000Z
(function() { "use strict"; var Global,WebSharper,UI,Next,CSharp,ViewExtensions,DocExtension,Client,Helpers,Obj,RouteMapBuilder,RouteItemParsers,View,Doc,Var,List,IntelliFactory,Runtime,RouteMap,Seq,Unchecked,Arrays,Collections,Map,Nullable,Operators,FSharpMap,Option; Global=self; WebSharper=Global.WebSharper=Global.WebSharper||{}; UI=WebSharper.UI=WebSharper.UI||{}; Next=UI.Next=UI.Next||{}; CSharp=Next.CSharp=Next.CSharp||{}; ViewExtensions=CSharp.ViewExtensions=CSharp.ViewExtensions||{}; DocExtension=CSharp.DocExtension=CSharp.DocExtension||{}; Client=CSharp.Client=CSharp.Client||{}; Helpers=Client.Helpers=Client.Helpers||{}; Obj=WebSharper&&WebSharper.Obj; RouteMapBuilder=Client.RouteMapBuilder=Client.RouteMapBuilder||{}; RouteItemParsers=Client.RouteItemParsers=Client.RouteItemParsers||{}; View=Next&&Next.View; Doc=Next&&Next.Doc; Var=Next&&Next.Var; List=WebSharper&&WebSharper.List; IntelliFactory=Global.IntelliFactory; Runtime=IntelliFactory&&IntelliFactory.Runtime; RouteMap=Next&&Next.RouteMap; Seq=WebSharper&&WebSharper.Seq; Unchecked=WebSharper&&WebSharper.Unchecked; Arrays=WebSharper&&WebSharper.Arrays; Collections=WebSharper&&WebSharper.Collections; Map=Collections&&Collections.Map; Nullable=WebSharper&&WebSharper.Nullable; Operators=WebSharper&&WebSharper.Operators; FSharpMap=Collections&&Collections.FSharpMap; Option=WebSharper&&WebSharper.Option; ViewExtensions.UpdateWhile=function(va,a,vb) { return View.UpdateWhile(a,vb,va); }; DocExtension.DocSeqCached=function(v,f,g) { return Doc.ConvertSeqBy(f,function(a) { return function(b) { return g(a,b); }; },v); }; Helpers.seqRefToListRef=function(l) { return Var.Lens(l,List.ofSeq,function(a,b) { return b; }); }; RouteMapBuilder=Client.RouteMapBuilder=Runtime.Class({ Install:function() { var _var,renders; function m(f,r) { return f(function(d) { return Var.Set(_var,d); },r); } _var=RouteMap.Install(this.ToRouteMap()); renders=List.map(function($1) { return function($2) { return m($1,$2); }; },List.rev(this.renders)); return Doc.BindView(function(r) { return Seq.pick(function(f) { return f(r); },renders); },_var.v); }, ToRouteMap:function() { var links,routes; links=List.rev(this.links); routes=List.rev(this.routes); return RouteMap.CreateWithQuery(function(a) { return Seq.pick(function(f) { return f(a); },links); },function(r) { return Seq.pick(function(f) { return f(r); },routes); }); }, AddRender:function(r) { this.renders=new List.T({ $:1, $0:r, $1:this.renders }); }, AddLink:function(l) { this.links=new List.T({ $:1, $0:l, $1:this.links }); }, AddRoute:function(r) { this.routes=new List.T({ $:1, $0:r, $1:this.routes }); } },Obj,RouteMapBuilder); RouteMapBuilder.New=Runtime.Ctor(function() { Obj.New.call(this); this.links=List.T.Empty; this.routes=List.T.Empty; this.renders=List.T.Empty; },RouteMapBuilder); RouteItemParsers["System.Double"]=function(a) { var x,m; x=a[0]; return x.$==1?(m=(new Global.RegExp("^[0-9](?:\\.[0-9]*)?$")).exec(x.$0),Unchecked.Equals(m,null)?null:{ $:1, $0:[Global.parseFloat(Arrays.get(m,0)),x.$1] }):null; }; RouteItemParsers["System.Int32"]=function(a) { var x,m; x=a[0]; return x.$==1?(m=(new Global.RegExp("^[0-9]+$")).exec(x.$0),Unchecked.Equals(m,null)?null:{ $:1, $0:[Global.parseInt(Arrays.get(m,0),Global.$radix),x.$1] }):null; }; RouteItemParsers["System.String"]=function(a) { var x; x=a[0]; return x.$==1?{ $:1, $0:[x.$0,x.$1] }:null; }; RouteItemParsers.MakeLink=function(shape) { return function(value) { var map,f; function m(name,queryItem,a,link) { var p,v,m$2,v$1,v$2,v$3; return queryItem===0?(p=link(value[name]),(map[0]=Map.FoldBack(function($1,$2,$3) { return $3.Add($1,$2); },p[1],map[0]),p[0])):queryItem===1?(map[0]=(v=List.head((link(value[name]))[0]),map[0].Add(name,v)),List.T.Empty):queryItem===2?(m$2=value[name],m$2!=null&&m$2.$==1?map[0]=(v$1=List.head((link(m$2.$0))[0]),map[0].Add(name,v$1)):void 0,List.T.Empty):queryItem===3?(v$2=value[name],(v$2!=null?map[0]=(v$3=List.head((link(Nullable.get(v$2)))[0]),map[0].Add(name,v$3)):void 0,List.T.Empty)):Operators.FailWith("invalid QueryItem enum value"); } function g(t) { return t[0]; } function m$1(a,link) { return function(x) { return(link(x))[0]; }; } return shape.$==1?(map=[new FSharpMap.New([])],[List.append(Option.toList(shape.$1),List.ofSeq(Seq.collect(function($1) { return m($1[0],$1[1],$1[2],$1[3]); },shape.$2))),map[0]]):shape.$==2?[new List.T({ $:1, $0:Global.String(Seq.length(value)), $1:List.ofSeq(Seq.collect((f=shape.$2,function(x) { return g(f(x)); }),value)) }),new FSharpMap.New([])]:shape.$==3?[List.ofSeq(Seq.concat((((Runtime.Curried3(Seq.map2))(function($1,$2) { return(function($3) { return m$1($3[0],$3[1]); }($1))($2); }))(shape.$0))(value))),new FSharpMap.New([])]:[List.ofArray([Global.String(value)]),new FSharpMap.New([])]; }; }; RouteItemParsers.ParseRoute=function(shape) { var f,g; function b($1,$2) { return $2.$==0?{ $:1, $0:$1 }:null; } f=RouteItemParsers.ParseShape(shape); g=function(o) { var $1; return o==null?null:($1=o.$0,b($1[0],$1[1])); }; return function(x) { return g(f(x)); }; }; RouteItemParsers.ParseShape=function(shape) { return function(t) { var path,query,$1,fromArray,parseItem,o,$2,length,rest,arr,t$1,o$1; function parseArgs(init,rest$1,args) { var v,o$2; function f$1(rest$2,t$2) { var name,queryItem,parse,rest$3,m,m$1,m$2,m$3,m$4,m$5; name=t$2[0]; queryItem=t$2[1]; parse=t$2[2]; return rest$2!=null&&rest$2.$==1?(rest$3=rest$2.$0,queryItem===0?(m=parse([rest$3,query]),m!=null&&m.$==1?(v[name]=m.$0[0],{ $:1, $0:m.$0[1] }):null):queryItem===1?(m$1=Map.TryFind(name,query),m$1==null?null:(v[name]=m$1.$0,{ $:1, $0:rest$3 })):queryItem===2?(m$2=Map.TryFind(name,query),m$2!=null&&m$2.$==1?(m$3=parse([List.ofArray([m$2.$0]),new FSharpMap.New([])]),m$3!=null&&m$3.$==1?(v[name]={ $:1, $0:m$3.$0[0] },{ $:1, $0:rest$3 }):null):(v[name]=null,{ $:1, $0:rest$3 })):queryItem===3?(m$4=Map.TryFind(name,query),m$4!=null&&m$4.$==1?(m$5=parse([List.ofArray([m$4.$0]),new FSharpMap.New([])]),m$5!=null&&m$5.$==1?(v[name]=m$5.$0[0],{ $:1, $0:rest$3 }):null):(v[name]=null,{ $:1, $0:rest$3 })):Operators.FailWith("invalid QueryItem enum value")):null; } v=init(); o$2=(((Runtime.Curried3(Arrays.fold))(f$1))({ $:1, $0:rest$1 }))(args); return o$2==null?null:{ $:1, $0:[v,o$2.$0] }; } function f(rest$1,t$2) { var o$2,$3,parsed,rest$2; return rest$1==null?null:(o$2=t$2[0]([rest$1.$0,query]),o$2==null?null:{ $:1, $0:($3=o$2.$0,(parsed=$3[0],(rest$2=$3[1],(t$1.push(parsed),rest$2)))) }); } path=t[0]; query=t[1]; return shape.$==1?shape.$1==null?parseArgs(shape.$0,path,shape.$2):path.$==1&&(path.$0===shape.$1.$0&&($1=[path.$1,path.$0],true))?parseArgs(shape.$0,$1[0],shape.$2):null:shape.$==2?(fromArray=shape.$0,(parseItem=shape.$1,(o=RouteItemParsers["System.Int32"]([path,query]),o==null?null:($2=o.$0,(length=$2[0],(rest=$2[1],(arr=Arrays.create(length,null),function(i,rest$1) { var m; while(true) if(i===length) return{ $:1, $0:[fromArray(arr),rest$1] }; else { m=parseItem([rest$1,query]); if(m!=null&&m.$==1) { Arrays.set(arr,i,m.$0[0]); i=i+1; rest$1=m.$0[1]; } else return null; } }(0,rest)))))))):shape.$==3?(t$1=[],(o$1=(((Runtime.Curried3(Arrays.fold))(f))({ $:1, $0:path }))(shape.$0),o$1==null?null:{ $:1, $0:[t$1,o$1.$0] })):shape.$0([path,query]); }; }; }());
26.440514
443
0.586161
ac892896841ac7633f11040160dfb4e68eb69259
723
js
JavaScript
src/components/Layout.js
Ozymandias9000/murphyblog
6b6a6fed52cdfc8757fca97516e45c83afdf046c
[ "MIT" ]
null
null
null
src/components/Layout.js
Ozymandias9000/murphyblog
6b6a6fed52cdfc8757fca97516e45c83afdf046c
[ "MIT" ]
null
null
null
src/components/Layout.js
Ozymandias9000/murphyblog
6b6a6fed52cdfc8757fca97516e45c83afdf046c
[ "MIT" ]
null
null
null
import React from "react"; import MainDiv from "../styles/MainDiv"; import Header from "./Header"; import { createGlobalStyle } from "styled-components"; const GlobalStyle = createGlobalStyle` @import url("https://fonts.googleapis.com/css?family=Prompt"); :root { font-size: 20px; } * { box-sizing: border-box; } html, body { padding: 0; margin: 0; font-family: "Prompt", sans-serif; } div { font-family: "prompt", sans-serif; } a { color: #3355dd; text-decoration: none; opacity: 0.7; } `; const Layout = ({ children }) => { return ( <> <GlobalStyle /> <Header /> <MainDiv>{children}</MainDiv> </> ); }; export default Layout;
16.431818
64
0.590595
ac8c56f9372e964f5b5be1f56447312fd665bde2
684
js
JavaScript
src/styles/DefaultTheme.js
technologiestiftung/react-map-boilerplate
fc74d0c2f0fa99868b84d119797275ec3384b261
[ "MIT" ]
2
2021-07-06T22:46:17.000Z
2021-07-13T12:26:57.000Z
src/styles/DefaultTheme.js
technologiestiftung/berlin-shade-map
e76c5f83328e46f0fc72d218e6e4b4a113523ebb
[ "MIT" ]
20
2020-07-29T10:58:20.000Z
2021-07-28T06:31:40.000Z
src/styles/DefaultTheme.js
technologiestiftung/react-map-boilerplate
fc74d0c2f0fa99868b84d119797275ec3384b261
[ "MIT" ]
null
null
null
const px = (d) => { return `${d}px`; }; export default { fonts: { sans: "Clan Book", serif: "Georgia, Times, Times New Roman, serif", mono: "monospace", sansBold: "Clan Bold", sansMedium: "Clan Medium", }, fontSizes: [12, 14, 15, 19, 24, 32, 48, 64].map(px), boxShadow: `0 2px 40px 0 rgba(30,55,145,0.15)`, borderRadius: "2px", colors: { primary: "#000000", secondary: "#e60005", lightgrey: "#f5f5f5", midgrey: "#d8d8d8", textgrey: "#777", }, lineHeight: "160%", margin: [10, 15, 25, 50, 75, 100].map(px), letterSpacing: [0.25, 0.5, 1].map(px), padding: [5, 10, 15].map(px), breakpoints: ["40em", "64em", "80em"], };
23.586207
54
0.55848
ac8c5b0b409ed38d4bdbe36fb9fd8f8008d1d221
1,217
js
JavaScript
src/components/JButton.js
jouni/j-elements
2d82712cfaafc70a90030c3300b99dfd0e86720b
[ "Apache-2.0" ]
8
2018-10-30T14:35:51.000Z
2022-02-23T13:21:08.000Z
src/components/JButton.js
jouni/j-elements
2d82712cfaafc70a90030c3300b99dfd0e86720b
[ "Apache-2.0" ]
16
2018-03-27T05:41:45.000Z
2022-02-03T13:06:32.000Z
src/components/JButton.js
jouni/j-elements
2d82712cfaafc70a90030c3300b99dfd0e86720b
[ "Apache-2.0" ]
4
2018-02-12T13:14:42.000Z
2019-03-02T03:42:35.000Z
import NativeElementWrapper from '../util/NativeElementWrapper'; import bemToShadow from '../util/bemToShadow'; import style from '../styles/button.css'; export class JButton extends NativeElementWrapper { static get template() { const template = super.template; template.innerHTML += ` <style> :host { position: relative; } button { opacity: 0; position: absolute; top: 0; left: 0; width: 100%; height: 100%; } :host { display: inline-flex; cursor: default; } ${bemToShadow(style, '.j-button')} </style> <button native-element></button> <slot></slot>`; return template; } constructor() { super(); this.__boundFocusInListener = this._onFocusIn.bind(this); } connectedCallback() { super.connectedCallback(); this.addEventListener('focusin', this.__boundFocusInListener); } _onFocusIn() { if (!this.hasAttribute('aria-label')) { this._nativeElement.setAttribute('aria-label', this.textContent.trim()); } } } window.customElements.define('j-button', JButton); export default JButton;
22.537037
78
0.596549
ac8cf4d718a55f2241f1335f15d2ecebbad5008c
1,607
js
JavaScript
dist/static/js/27.96422294d097bba388c1.js
jokersk/panel
bd94a179d15be1b764dac6b12a846664c57ff53f
[ "MIT" ]
null
null
null
dist/static/js/27.96422294d097bba388c1.js
jokersk/panel
bd94a179d15be1b764dac6b12a846664c57ff53f
[ "MIT" ]
null
null
null
dist/static/js/27.96422294d097bba388c1.js
jokersk/panel
bd94a179d15be1b764dac6b12a846664c57ff53f
[ "MIT" ]
null
null
null
webpackJsonp([27],{ATTc:function(e,t,r){var n=r("DUsX");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);r("rjj0")("37d319e9",n,!0)},DUsX:function(e,t,r){(e.exports=r("FZ+f")(!1)).push([e.i,"\n.errPage-container[data-v-fd38daba] {\n padding: 30px;\n}\n",""])},o25k:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={render:function(){var e=this.$createElement;return(this._self._c||e)("div",[this._v("\n "+this._s(this.a.a)+"\n ")])},staticRenderFns:[]},s={created:function(){this.b=b}},a={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]},i={name:"errorLog",components:{errorA:r("VU/8")({name:"errorTestA"},n,!1,null,null,null).exports,errorB:r("VU/8")(s,a,!1,null,null,null).exports}},o={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"errPage-container"},[r("errorA"),e._v(" "),r("errorB"),e._v(" "),r("h3",[e._v(e._s(e.$t("errorLog.tips")))]),e._v(" "),r("code",[e._v("\n "+e._s(e.$t("errorLog.description"))+"\n "),r("a",{staticClass:"link-type",attrs:{target:"_blank",href:"https://panjiachen.github.io/vue-element-admin-site/#/error?id=%e4%bb%a3%e7%a0%81"}},[e._v("\n "+e._s(e.$t("errorLog.documentation"))+"\n ")])]),e._v(" "),e._m(0)],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("a",{attrs:{href:"#"}},[t("img",{attrs:{src:"https://wpimg.wallstcn.com/360e4842-4db5-42d0-b078-f9a84a825546.gif"}})])}]};var c=r("VU/8")(i,o,!1,function(e){r("ATTc")},"data-v-fd38daba",null);t.default=c.exports}});
1,607
1,607
0.639079
ac8e2cf741181b3c05959a1e97fa2e9171f1db50
134
js
JavaScript
tailwind.config.js
mgerasika/stay-for-night-react
893f07d99b5c554f6d32496e33c1a1baaca82754
[ "MIT" ]
null
null
null
tailwind.config.js
mgerasika/stay-for-night-react
893f07d99b5c554f6d32496e33c1a1baaca82754
[ "MIT" ]
null
null
null
tailwind.config.js
mgerasika/stay-for-night-react
893f07d99b5c554f6d32496e33c1a1baaca82754
[ "MIT" ]
null
null
null
module.exports = { theme: { extend: { colors: { electric: '#db00ff', ribbon: '#0047ff', }, }, }, plugins: [], }
12.181818
24
0.470149
ac8ef85eb086b9d3e35163ee4527b10bb8fcc715
374
js
JavaScript
packages/marko/src/core-tags/migrate/all-tags/ref.js
Prateekweb/marko
2fc678aa54de79d85c9520ae4dac322124ae32f1
[ "MIT" ]
1
2020-04-30T11:31:50.000Z
2020-04-30T11:31:50.000Z
packages/marko/src/core-tags/migrate/all-tags/ref.js
Prateekweb/marko
2fc678aa54de79d85c9520ae4dac322124ae32f1
[ "MIT" ]
null
null
null
packages/marko/src/core-tags/migrate/all-tags/ref.js
Prateekweb/marko
2fc678aa54de79d85c9520ae4dac322124ae32f1
[ "MIT" ]
1
2020-12-04T23:52:51.000Z
2020-12-04T23:52:51.000Z
module.exports = function migrate(el, context) { const attr = el.getAttribute("ref"); if (!attr) { return; } context.deprecate( `The "ref" attribute is deprecated. Please use "key" attribute instead. See: https://github.com/marko-js/marko/wiki/Deprecation:-ref-attribute` ); el.setAttributeValue("key", attr.value); el.removeAttribute(attr.name); };
26.714286
147
0.68984
ac8f10815f6be9368e561f5bb457f83bd838e680
20,828
js
JavaScript
src/odata-client/sfo-data-service/PayrollConfigurationCategoryLink.js
robypag/sdk-gen-sfsf
ce9b613ee3e85dd8ed4e42ffe200df1a2decf835
[ "MIT" ]
null
null
null
src/odata-client/sfo-data-service/PayrollConfigurationCategoryLink.js
robypag/sdk-gen-sfsf
ce9b613ee3e85dd8ed4e42ffe200df1a2decf835
[ "MIT" ]
null
null
null
src/odata-client/sfo-data-service/PayrollConfigurationCategoryLink.js
robypag/sdk-gen-sfsf
ce9b613ee3e85dd8ed4e42ffe200df1a2decf835
[ "MIT" ]
null
null
null
"use strict"; 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 __()); }; })(); var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(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); }; Object.defineProperty(exports, "__esModule", { value: true }); /* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. * * This is a generated file powered by the SAP Cloud SDK for JavaScript. */ var PayrollConfigurationCategoryLinkRequestBuilder_1 = require("./PayrollConfigurationCategoryLinkRequestBuilder"); var core_1 = require("@sap-cloud-sdk/core"); /** * This class represents the entity "PayrollConfigurationCategoryLink" of service "SFOData". */ var PayrollConfigurationCategoryLink = /** @class */ (function (_super) { __extends(PayrollConfigurationCategoryLink, _super); function PayrollConfigurationCategoryLink() { return _super !== null && _super.apply(this, arguments) || this; } /** * Returns an entity builder to construct instances `PayrollConfigurationCategoryLink`. * @returns A builder that constructs instances of entity type `PayrollConfigurationCategoryLink`. */ PayrollConfigurationCategoryLink.builder = function () { return core_1.Entity.entityBuilder(PayrollConfigurationCategoryLink); }; /** * Returns a request builder to construct requests for operations on the `PayrollConfigurationCategoryLink` entity type. * @returns A `PayrollConfigurationCategoryLink` request builder. */ PayrollConfigurationCategoryLink.requestBuilder = function () { return new PayrollConfigurationCategoryLinkRequestBuilder_1.PayrollConfigurationCategoryLinkRequestBuilder(); }; /** * Returns a selectable object that allows the selection of custom field in a get request for the entity `PayrollConfigurationCategoryLink`. * @param fieldName Name of the custom field to select * @returns A builder that constructs instances of entity type `PayrollConfigurationCategoryLink`. */ PayrollConfigurationCategoryLink.customField = function (fieldName) { return core_1.Entity.customFieldSelector(fieldName, PayrollConfigurationCategoryLink); }; /** * Overwrites the default toJSON method so that all instance variables as well as all custom fields of the entity are returned. * @returns An object containing all instance variables + custom fields. */ PayrollConfigurationCategoryLink.prototype.toJSON = function () { return __assign(__assign({}, this), this._customFields); }; /** * Technical entity name for PayrollConfigurationCategoryLink. */ PayrollConfigurationCategoryLink._entityName = 'PayrollConfigurationCategoryLink'; /** * @deprecated Since v1.0.1 Use [[_defaultServicePath]] instead. * Technical service name for PayrollConfigurationCategoryLink. */ PayrollConfigurationCategoryLink._serviceName = 'SFOData'; /** * Default url path for the according service. */ PayrollConfigurationCategoryLink._defaultServicePath = 'VALUE_IS_UNDEFINED'; return PayrollConfigurationCategoryLink; }(core_1.Entity)); exports.PayrollConfigurationCategoryLink = PayrollConfigurationCategoryLink; var User_1 = require("./User"); var MdfLocalizedValue_1 = require("./MdfLocalizedValue"); var MdfEnumValue_1 = require("./MdfEnumValue"); var PickListValueV2_1 = require("./PickListValueV2"); (function (PayrollConfigurationCategoryLink) { /** * Static representation of the [[payrollConfigurationCategoryExternalCode]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.PAYROLL_CONFIGURATION_CATEGORY_EXTERNAL_CODE = new core_1.StringField('PayrollConfigurationCategory_externalCode', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[payrollSystemConfigurationExternalCode]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.PAYROLL_SYSTEM_CONFIGURATION_EXTERNAL_CODE = new core_1.StringField('PayrollSystemConfiguration_externalCode', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[adminService]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.ADMIN_SERVICE = new core_1.BooleanField('adminService', PayrollConfigurationCategoryLink, 'Edm.Boolean'); /** * Static representation of the [[createdBy]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.CREATED_BY = new core_1.StringField('createdBy', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[createdDateTime]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.CREATED_DATE_TIME = new core_1.DateField('createdDateTime', PayrollConfigurationCategoryLink, 'Edm.DateTimeOffset'); /** * Static representation of the [[externalCode]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_CODE = new core_1.StringField('externalCode', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameDeDe]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_DE_DE = new core_1.StringField('externalLinkName_de_DE', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameDefaultValue]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_DEFAULT_VALUE = new core_1.StringField('externalLinkName_defaultValue', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameEnDebug]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_EN_DEBUG = new core_1.StringField('externalLinkName_en_DEBUG', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameEnGb]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_EN_GB = new core_1.StringField('externalLinkName_en_GB', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameEnUs]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_EN_US = new core_1.StringField('externalLinkName_en_US', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameEsEs]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_ES_ES = new core_1.StringField('externalLinkName_es_ES', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameEsMx]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_ES_MX = new core_1.StringField('externalLinkName_es_MX', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameFrCa]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_FR_CA = new core_1.StringField('externalLinkName_fr_CA', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameFrFr]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_FR_FR = new core_1.StringField('externalLinkName_fr_FR', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameItIt]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_IT_IT = new core_1.StringField('externalLinkName_it_IT', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameLocalized]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_LOCALIZED = new core_1.StringField('externalLinkName_localized', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameNlNl]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_NL_NL = new core_1.StringField('externalLinkName_nl_NL', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNamePtBr]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_PT_BR = new core_1.StringField('externalLinkName_pt_BR', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[externalLinkNameZhCn]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_ZH_CN = new core_1.StringField('externalLinkName_zh_CN', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[infotypeNumber]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.INFOTYPE_NUMBER = new core_1.BigNumberField('infotypeNumber', PayrollConfigurationCategoryLink, 'Edm.Int64'); /** * Static representation of the [[isRequiredForPayroll]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.IS_REQUIRED_FOR_PAYROLL = new core_1.BooleanField('isRequiredForPayroll', PayrollConfigurationCategoryLink, 'Edm.Boolean'); /** * Static representation of the [[lastModifiedBy]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.LAST_MODIFIED_BY = new core_1.StringField('lastModifiedBy', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[lastModifiedDateTime]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.LAST_MODIFIED_DATE_TIME = new core_1.DateField('lastModifiedDateTime', PayrollConfigurationCategoryLink, 'Edm.DateTimeOffset'); /** * Static representation of the [[mdfSystemRecordStatus]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.MDF_SYSTEM_RECORD_STATUS = new core_1.StringField('mdfSystemRecordStatus', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[selfService]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.SELF_SERVICE = new core_1.BooleanField('selfService', PayrollConfigurationCategoryLink, 'Edm.Boolean'); /** * Static representation of the [[service]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.SERVICE = new core_1.StringField('service', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[typeOfUrl]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.TYPE_OF_URL = new core_1.StringField('typeOfUrl', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the [[url]] property for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.URL = new core_1.StringField('url', PayrollConfigurationCategoryLink, 'Edm.String'); /** * Static representation of the one-to-one navigation property [[createdByNav]] for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.CREATED_BY_NAV = new core_1.OneToOneLink('createdByNav', PayrollConfigurationCategoryLink, User_1.User); /** * Static representation of the one-to-many navigation property [[externalLinkNameTranslationTextNav]] for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_TRANSLATION_TEXT_NAV = new core_1.Link('externalLinkNameTranslationTextNav', PayrollConfigurationCategoryLink, MdfLocalizedValue_1.MdfLocalizedValue); /** * Static representation of the one-to-one navigation property [[lastModifiedByNav]] for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.LAST_MODIFIED_BY_NAV = new core_1.OneToOneLink('lastModifiedByNav', PayrollConfigurationCategoryLink, User_1.User); /** * Static representation of the one-to-one navigation property [[mdfSystemRecordStatusNav]] for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.MDF_SYSTEM_RECORD_STATUS_NAV = new core_1.OneToOneLink('mdfSystemRecordStatusNav', PayrollConfigurationCategoryLink, MdfEnumValue_1.MdfEnumValue); /** * Static representation of the one-to-many navigation property [[serviceNav]] for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.SERVICE_NAV = new core_1.Link('serviceNav', PayrollConfigurationCategoryLink, PickListValueV2_1.PickListValueV2); /** * Static representation of the one-to-many navigation property [[typeOfUrlNav]] for query construction. * Use to reference this property in query operations such as 'select' in the fluent request API. */ PayrollConfigurationCategoryLink.TYPE_OF_URL_NAV = new core_1.Link('typeOfUrlNav', PayrollConfigurationCategoryLink, PickListValueV2_1.PickListValueV2); /** * All fields of the PayrollConfigurationCategoryLink entity. */ PayrollConfigurationCategoryLink._allFields = [ PayrollConfigurationCategoryLink.PAYROLL_CONFIGURATION_CATEGORY_EXTERNAL_CODE, PayrollConfigurationCategoryLink.PAYROLL_SYSTEM_CONFIGURATION_EXTERNAL_CODE, PayrollConfigurationCategoryLink.ADMIN_SERVICE, PayrollConfigurationCategoryLink.CREATED_BY, PayrollConfigurationCategoryLink.CREATED_DATE_TIME, PayrollConfigurationCategoryLink.EXTERNAL_CODE, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_DE_DE, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_DEFAULT_VALUE, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_EN_DEBUG, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_EN_GB, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_EN_US, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_ES_ES, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_ES_MX, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_FR_CA, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_FR_FR, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_IT_IT, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_LOCALIZED, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_NL_NL, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_PT_BR, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_ZH_CN, PayrollConfigurationCategoryLink.INFOTYPE_NUMBER, PayrollConfigurationCategoryLink.IS_REQUIRED_FOR_PAYROLL, PayrollConfigurationCategoryLink.LAST_MODIFIED_BY, PayrollConfigurationCategoryLink.LAST_MODIFIED_DATE_TIME, PayrollConfigurationCategoryLink.MDF_SYSTEM_RECORD_STATUS, PayrollConfigurationCategoryLink.SELF_SERVICE, PayrollConfigurationCategoryLink.SERVICE, PayrollConfigurationCategoryLink.TYPE_OF_URL, PayrollConfigurationCategoryLink.URL, PayrollConfigurationCategoryLink.CREATED_BY_NAV, PayrollConfigurationCategoryLink.EXTERNAL_LINK_NAME_TRANSLATION_TEXT_NAV, PayrollConfigurationCategoryLink.LAST_MODIFIED_BY_NAV, PayrollConfigurationCategoryLink.MDF_SYSTEM_RECORD_STATUS_NAV, PayrollConfigurationCategoryLink.SERVICE_NAV, PayrollConfigurationCategoryLink.TYPE_OF_URL_NAV ]; /** * All fields selector. */ PayrollConfigurationCategoryLink.ALL_FIELDS = new core_1.AllFields('*', PayrollConfigurationCategoryLink); /** * All key fields of the PayrollConfigurationCategoryLink entity. */ PayrollConfigurationCategoryLink._keyFields = [PayrollConfigurationCategoryLink.PAYROLL_CONFIGURATION_CATEGORY_EXTERNAL_CODE, PayrollConfigurationCategoryLink.PAYROLL_SYSTEM_CONFIGURATION_EXTERNAL_CODE, PayrollConfigurationCategoryLink.EXTERNAL_CODE]; /** * Mapping of all key field names to the respective static field property PayrollConfigurationCategoryLink. */ PayrollConfigurationCategoryLink._keys = PayrollConfigurationCategoryLink._keyFields.reduce(function (acc, field) { acc[field._fieldName] = field; return acc; }, {}); })(PayrollConfigurationCategoryLink = exports.PayrollConfigurationCategoryLink || (exports.PayrollConfigurationCategoryLink = {})); exports.PayrollConfigurationCategoryLink = PayrollConfigurationCategoryLink; //# sourceMappingURL=PayrollConfigurationCategoryLink.js.map
64.283951
255
0.761427
ac8f3af3df67c6f844e3604f00550356044a9960
1,068
js
JavaScript
Non-Trackable Content/Code year/Cash Register Part II/#2 - Dollars and Cents/script.js
rhyep/Python_tutorials
f5c8a64b91802b005dfe7dd9035f8d8daae8c3e3
[ "MIT" ]
346
2016-02-22T20:21:10.000Z
2022-01-27T20:55:53.000Z
Non-Trackable Content/Code year/Cash Register Part II/#2 - Dollars and Cents/script.js
vpstudios/Codecademy-Exercise-Answers
ebd0ee8197a8001465636f52c69592ea6745aa0c
[ "MIT" ]
55
2016-04-07T13:58:44.000Z
2020-06-25T12:20:24.000Z
Non-Trackable Content/Code year/Cash Register Part II/#2 - Dollars and Cents/script.js
vpstudios/Codecademy-Exercise-Answers
ebd0ee8197a8001465636f52c69592ea6745aa0c
[ "MIT" ]
477
2016-02-21T06:17:02.000Z
2021-12-22T10:08:01.000Z
var cashRegisterWithChange = { total: 0, change: 0, setTotal: function (amount) { this.total = amount; }, getPaid: function (amountPaid) { if (this.total > amountPaid) { console.log ("Not enough!"); } else { this.change = amountPaid - this.total; console.log ("Give them:"); //this line will change the value of this.change var numDollars = this.howManyDollars(this.change); console.log (numDollars + " dollar bills"); //update the change variable for outputting pennies this.change -= numDollars; this.change = this.change.toFixed(2); //so that here change will tell us the number of pennies console.log ("and " + this.change * 100 + " pennies"); this.change = 0; } }, howManyDollars: function(amountOfMoney) { if(amountOfMoney < 1){ return 0; }else{ return 1+this.howManyDollars(amountOfMoney-1); } } }; cashRegisterWithChange.setTotal(4.55); cashRegisterWithChange.getPaid(2); cashRegisterWithChange.getPaid(6);
27.384615
63
0.631086
ac8fab4575cb02a800405ca30c33d9353953f67d
794
js
JavaScript
source/routes/authRoutes.js
thanhdinh98/Book-Store
f334d2da1813cd40b30cc84928d5f3e25826ab88
[ "MIT" ]
null
null
null
source/routes/authRoutes.js
thanhdinh98/Book-Store
f334d2da1813cd40b30cc84928d5f3e25826ab88
[ "MIT" ]
4
2020-07-20T07:00:32.000Z
2021-10-06T15:30:43.000Z
source/routes/authRoutes.js
thanhdinh98/Book-Store
f334d2da1813cd40b30cc84928d5f3e25826ab88
[ "MIT" ]
null
null
null
import {LoginPage} from '../gui/pages/LoginPage'; import {loginUtils} from '../utils/loginUtils'; import {RegisterPage} from '../gui/pages/RegisterPage'; import {registerUtils} from '../utils/registerUtils'; import {Logout} from '../handle/authHandle'; import {ErrorPage} from '../gui/pages/404'; export const authRoutes = async (parentPath, pathName)=>{ if(pathName === `${parentPath}/login`){ document.querySelector('#main').innerHTML = LoginPage(); loginUtils(); }else if(pathName === `${parentPath}/register`){ document.querySelector('#main').innerHTML = RegisterPage(); registerUtils(); }else if(pathName === `${parentPath}/logout`){ await Logout(); }else{ document.querySelector('#main').innerHTML = ErrorPage(); } }
34.521739
67
0.651134
ac911297629e0564f075c8fa52aa4074c8c9e1f3
398
js
JavaScript
public/js/utils/url.js
WhiskyChoy/ImgViewerUseNodeJS
e5274ba4bc47284af37a9699196ee9c6082794b2
[ "MIT" ]
null
null
null
public/js/utils/url.js
WhiskyChoy/ImgViewerUseNodeJS
e5274ba4bc47284af37a9699196ee9c6082794b2
[ "MIT" ]
null
null
null
public/js/utils/url.js
WhiskyChoy/ImgViewerUseNodeJS
e5274ba4bc47284af37a9699196ee9c6082794b2
[ "MIT" ]
null
null
null
export function getRequest() { let url = location.search; //获取url中"?"符后的字串 let request; if (url.indexOf("?") !== -1) { request = {}; let str = url.substr(1); let str_s = str.split("&"); for (let i = 0; i < str_s.length; i++) { request[str_s[i].split("=")[0]] = decodeURIComponent(str_s[i].split("=")[1]); } } return request; }
30.615385
89
0.502513
ac9141339e0ffb8b3eacff52ae0300c86915c313
74,782
js
JavaScript
dist/bundle.min.js
eren-ck/viccex
8263e069d10cb59ea23fc5796cea02afadcdc1c2
[ "MIT" ]
1
2018-12-15T17:39:33.000Z
2018-12-15T17:39:33.000Z
dist/bundle.min.js
eren-ck/viccex
8263e069d10cb59ea23fc5796cea02afadcdc1c2
[ "MIT" ]
null
null
null
dist/bundle.min.js
eren-ck/viccex
8263e069d10cb59ea23fc5796cea02afadcdc1c2
[ "MIT" ]
null
null
null
!function(t){function e(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var a in t)e.d(r,a,function(e){return t[e]}.bind(null,a));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./src/js/app.js")}({"./node_modules/css-loader/index.js!./src/css/style.css":function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);\n// imports\n\n\n// module\nexports.push([module.i, "html {\\r\\n position: relative;\\r\\n min-height: 100%;\\r\\n}\\r\\n\\r\\nbody {\\r\\n /* Margin bottom by footer height */\\r\\n /* margin-bottom: 60px; */\\r\\n}\\r\\n\\r\\n.svg-container {\\r\\n display: inline-block;\\r\\n position: relative;\\r\\n width: 100%;\\r\\n /* aspect ratio */\\r\\n vertical-align: top;\\r\\n overflow: visible;\\r\\n}\\r\\n\\r\\n.axis {\\r\\n stroke-width: 0.5px;\\r\\n stroke: #888;\\r\\n font: 10px avenir next, sans-serif;\\r\\n}\\r\\n\\r\\n.axis>path {\\r\\n stroke: #888;\\r\\n}\\r\\n\\r\\n.zoom {\\r\\n cursor: move;\\r\\n fill: none;\\r\\n pointer-events: all;\\r\\n}\\r\\n\\r\\n.timeseriesline {\\r\\n fill: none;\\r\\n stroke: steelblue;\\r\\n stroke-width: 1.5px;\\r\\n}\\r\\n\\r\\n#metadata-river-network>svg:nth-child(1) {\\r\\n border: 1px solid black;\\r\\n stroke: #737373;\\r\\n stroke-width: 2px;\\r\\n}\\r\\n\\r\\n.highlight {\\r\\n border: 5px solid black;\\r\\n}\\r\\n\\r\\n.modal-lg {\\r\\n max-width: 95%;\\r\\n}\\r\\n\\r\\n.blank-row {\\r\\n height: 15px !important;\\r\\n /* overwrites any other rules */\\r\\n background-color: #FFFFFF;\\r\\n}\\r\\n\\r\\n.timeline {\\r\\n fill: none;\\r\\n stroke: steelblue;\\r\\n stroke-width: 1.5px;\\r\\n}", ""]);\n\n// exports\n\n\n//# sourceURL=webpack:///./src/css/style.css?./node_modules/css-loader')},"./node_modules/css-loader/lib/css-base.js":function(module,exports){eval('/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn "@media " + item[2] + "{" + content + "}";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join("");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === "string")\n\t\t\tmodules = [[null, modules, ""]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === "number")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = "(" + item[2] + ") and (" + mediaQuery + ")";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || \'\';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === \'function\') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn \'/*# sourceURL=\' + cssMapping.sourceRoot + source + \' */\'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join(\'\\n\');\n\t}\n\n\treturn [content].join(\'\\n\');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = \'sourceMappingURL=data:application/json;charset=utf-8;base64,\' + base64;\n\n\treturn \'/*# \' + data + \' */\';\n}\n\n\n//# sourceURL=webpack:///./node_modules/css-loader/lib/css-base.js?')},"./node_modules/style-loader/lib/addStyles.js":function(module,exports,__webpack_require__){eval('/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === "undefined") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n // If passing function in options, then use it for resolve "head" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector("#foo").shadowRoot }\n // }\n if (typeof target === \'function\') {\n return target();\n }\n if (typeof memo[target] === "undefined") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== "undefined" && DEBUG) {\n\t\tif (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === "object" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = "head";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = "bottom";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error("Couldn\'t find a style target. This probably means that the value for the \'insertInto\' parameter is invalid.");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === "top") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === "bottom") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === "object" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertInto + " " + options.insertAt.before);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error("[Style Loader]\\n\\n Invalid value for parameter \'insertAt\' (\'options.insertAt\') found.\\n Must be \'top\', \'bottom\', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement("style");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = "text/css";\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement("link");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = "text/css";\n\t}\n\toptions.attrs.rel = "stylesheet";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = options.transform(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don\'t add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === "function" &&\n\t\ttypeof URL.createObjectURL === "function" &&\n\t\ttypeof URL.revokeObjectURL === "function" &&\n\t\ttypeof Blob === "function" &&\n\t\ttypeof btoa === "function"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join(\'\\n\');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? "" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute("media", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn\'t defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += "\\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";\n\t}\n\n\tvar blob = new Blob([css], { type: "text/css" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/addStyles.js?')},"./node_modules/style-loader/lib/urls.js":function(module,exports){eval('\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function "fixes" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== "undefined" && window.location;\n\n if (!location) {\n throw new Error("fixUrls requires window.location");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== "string") {\n\t return css;\n }\n\n var baseUrl = location.protocol + "//" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, "/");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word "url" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn\'t a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn\'t a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn\'t a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^"(.*)"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^\'(.*)\'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf("//") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf("/") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with \'/\'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, ""); // Strip leading \'./\'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn "url(" + JSON.stringify(newUrl) + ")";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/urls.js?')},"./src/css/style.css":function(module,exports,__webpack_require__){eval('\nvar content = __webpack_require__(/*! !../../node_modules/css-loader!./style.css */ "./node_modules/css-loader/index.js!./src/css/style.css");\n\nif(typeof content === \'string\') content = [[module.i, content, \'\']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {"hmr":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./src/css/style.css?')},"./src/js/app.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _load_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./load-data.js */ "./src/js/load-data.js");\n/* harmony import */ var _sampling_strategy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sampling-strategy.js */ "./src/js/sampling-strategy.js");\n/* harmony import */ var _timeseries_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./timeseries.js */ "./src/js/timeseries.js");\n/* harmony import */ var _metadata_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./metadata.js */ "./src/js/metadata.js");\n/* harmony import */ var _tsne_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tsne.js */ "./src/js/tsne.js");\n/* harmony import */ var _css_style_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css/style.css */ "./src/css/style.css");\n/* harmony import */ var _css_style_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_css_style_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data.js */ "./src/js/data.js");\n/* harmony import */ var _statistics_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./statistics.js */ "./src/js/statistics.js");\n/*eslint-disable no-unused-lets*/\r\n/*global $*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n$(document).ready(function() {\r\n let path = \'./data/data.json\';\r\n Object(_load_data_js__WEBPACK_IMPORTED_MODULE_0__["parseDataJSON"])(path);\r\n path = \'./data/metadata.json\';\r\n Object(_load_data_js__WEBPACK_IMPORTED_MODULE_0__["parseMetadataJSON"])(path);\r\n path = \'./data/tsne_data3.csv\';\r\n Object(_load_data_js__WEBPACK_IMPORTED_MODULE_0__["parseTSNEData"])(path);\r\n\r\n initVis();\r\n});\r\n\r\n/**\r\n * Init the visualizations\r\n */\r\nfunction initVis() {\r\n setTimeout(function() {\r\n if (Object(_data_js__WEBPACK_IMPORTED_MODULE_6__["getData"])() && Object(_data_js__WEBPACK_IMPORTED_MODULE_6__["getMetaData"])() && Object(_data_js__WEBPACK_IMPORTED_MODULE_6__["getDataMeasurements"])() && Object(_data_js__WEBPACK_IMPORTED_MODULE_6__["getTSNEData"])()) {\r\n // init the different visualizations after the\r\n // succesfully loading the data\r\n // console.log(data);\r\n // console.log(metadata);\r\n // console.log(dataMeasurements);\r\n Object(_sampling_strategy_js__WEBPACK_IMPORTED_MODULE_1__["initSamplingStrategy"])(\'#sampling-stragety-div\');\r\n Object(_timeseries_js__WEBPACK_IMPORTED_MODULE_2__["initTimeSeries"])();\r\n Object(_tsne_js__WEBPACK_IMPORTED_MODULE_4__["initTSNE"])(\'#t-sne-vis\');\r\n Object(_metadata_js__WEBPACK_IMPORTED_MODULE_3__["initMetadata"])();\r\n return;\r\n }\r\n initVis();\r\n }, 500);\r\n}\n\n//# sourceURL=webpack:///./src/js/app.js?')},"./src/js/data.js":function(module,__webpack_exports__,__webpack_require__){"use strict" ;eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getData\", function() { return getData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setData\", function() { return setData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMetaData\", function() { return getMetaData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMetaData\", function() { return setMetaData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDataMeasurements\", function() { return getDataMeasurements; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateDataMeasurements\", function() { return updateDataMeasurements; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getStatisticData\", function() { return getStatisticData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTimeSeriesData\", function() { return getTimeSeriesData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDataMeasurements\", function() { return setDataMeasurements; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTSNEData\", function() { return setTSNEData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTSNEData\", function() { return getTSNEData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSelectedLocations\", function() { return getSelectedLocations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setSelectedLocations\", function() { return setSelectedLocations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSelectedMeasurements\", function() { return getSelectedMeasurements; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setSelectedMeasurements\", function() { return setSelectedMeasurements; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCurrentMinMax\", function() { return getCurrentMinMax; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setCurrentMinMax\", function() { return setCurrentMinMax; });\n/* harmony import */ var _sampling_strategy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sampling-strategy */ \"./src/js/sampling-strategy.js\");\n/* harmony import */ var _timeseries_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeseries.js */ \"./src/js/timeseries.js\");\n/* harmony import */ var _tsne_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsne.js */ \"./src/js/tsne.js\");\n/*eslint-disable no-unused-lets*/\r\n/*global $, d3*/\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet data; // the basic data with the extracted features\r\nlet metadata; // basic metadata - see metadata json file\r\nlet dataMeasurements; // measurements per day per location\r\nlet tSNEData; // tSNE data\r\n\r\nlet selectedLocations; // used for filters\r\nlet selectedMeasurements;\r\n\r\nlet currentMinMax; // current min max date of the specific zoom level\r\n\r\n/** Getter and Setter ** /\r\n\r\n/**\r\n * Get data variable\r\n */\r\nfunction getData() {\r\n return data;\r\n}\r\n\r\n/**\r\n * Set the parsed csv data\r\n */\r\nfunction setData(d) {\r\n data = d;\r\n // compute for the first time the measurements per day\r\n updateDataMeasurements();\r\n}\r\n\r\n/**\r\n * Get the metadata\r\n */\r\nfunction getMetaData() {\r\n return metadata;\r\n}\r\n\r\n/**\r\n * Set the metadata variable\r\n */\r\nfunction setMetaData(d) {\r\n metadata = d;\r\n selectedLocations = metadata['locations'];\r\n selectedMeasurements = Object.keys(metadata['measureUnit']);\r\n // set min max for the overall time slot\r\n let parseTime = d3.timeParse('%Y-%m-%d');\r\n currentMinMax = [parseTime(metadata['date']['min']), parseTime(metadata['date']['max'])];\r\n}\r\n\r\n/**\r\n * Get parsed csv data measurements\r\n */\r\nfunction getDataMeasurements() {\r\n return dataMeasurements.filter(d => d['date'] >= currentMinMax[0] && d['date'] <= currentMinMax[1]);\r\n}\r\n\r\nfunction updateDataMeasurements() {\r\n let tmp_result = {};\r\n let parseTime = d3.timeParse('%Y-%m-%d');\r\n // filter using selected Measurements and selected Locations\r\n let tmpData = Object.keys(data)\r\n .filter(key => selectedMeasurements.includes(key))\r\n .reduce((obj, key) => {\r\n obj[key] = data[key]['values'];\r\n obj[key] = Object.keys(obj[key])\r\n .filter(key2 => selectedLocations.includes(key2))\r\n .reduce((obj2, key2) => {\r\n obj2[key2] = obj[key][key2];\r\n return obj2;\r\n }, {});\r\n return obj;\r\n }, {});\r\n // console.log(tmpData);\r\n // count the number of measurements per day\r\n for (let key in tmpData) {\r\n // console.log(key);\r\n for (let key2 in tmpData[key]) {\r\n if (!tmp_result.hasOwnProperty(key2)) {\r\n tmp_result[key2] = {};\r\n }\r\n tmpData[key][key2].forEach(function(d) {\r\n // count number of measurements\r\n if (!tmp_result[key2].hasOwnProperty(d['time'])) {\r\n tmp_result[key2][d['time']] = {};\r\n tmp_result[key2][d['time']]['count'] = 0;\r\n // add the chemical measurement\r\n tmp_result[key2][d['time']]['measurements'] = {};\r\n tmp_result[key2][d['time']]['measurements'][key] = [d['value']];\r\n } else {\r\n tmp_result[key2][d['time']]['count']++;\r\n // add the chemical measurement\r\n if (tmp_result[key2][d['time']]['measurements'].hasOwnProperty(key)) {\r\n tmp_result[key2][d['time']]['measurements'][key].push(d['value']);\r\n } else {\r\n tmp_result[key2][d['time']]['measurements'][key] = [d['value']];\r\n }\r\n }\r\n });\r\n }\r\n }\r\n // console.log(tmp_result);\r\n // change data format into list of objects\r\n let result = [];\r\n for (let key in tmp_result) {\r\n for (let key2 in tmp_result[key]) {\r\n result.push({\r\n 'location': key,\r\n 'date': parseTime(key2),\r\n 'count': tmp_result[key][key2]['count'],\r\n 'measurements': tmp_result[key][key2]['measurements']\r\n });\r\n }\r\n }\r\n setDataMeasurements(result);\r\n // console.log(result);\r\n}\r\n\r\n/**\r\n * Get parsed csv data measurements\r\n */\r\nfunction getStatisticData() {\r\n let stats = [\r\n 'length', 'mean', 'median', 'maximum', 'minimum', 'kurtosis', 'skewness',\r\n 'variance', 'abs_energy', 'mean_change', 'sample_entropy', 'count_above_mean',\r\n 'count_below_mean', 'standard_deviation', 'sum_of_reoccurring_data_points',\r\n 'variance_larger_than_standard_deviation', 'ratio_value_number_to_time_series_length'\r\n ];\r\n // filter with the selected measurements and locations\r\n let tmp_result = {};\r\n for (let key in data) {\r\n if (selectedMeasurements.includes(key)) {\r\n tmp_result[key] = {};\r\n stats.forEach(function(d) {\r\n let stat = data[key]['features_w_null_relevant'][d];\r\n // filter the locations which are not selected\r\n stat = Object.keys(stat)\r\n .filter(key2 => selectedLocations.includes(key2))\r\n .reduce((obj, key2) => {\r\n obj[key2] = stat[key2];\r\n return obj;\r\n }, {});\r\n tmp_result[key][d] = stat;\r\n });\r\n }\r\n }\r\n // change data format\r\n let tmp_result2 = {};\r\n for (let key in tmp_result) { // key = measurement\r\n tmp_result2[key] = {};\r\n for (let key2 in tmp_result[key]) { // extracted statistic\r\n for (let key3 in tmp_result[key][key2]) { // extracted statistic\r\n if (key3 in tmp_result2[key]) {\r\n tmp_result2[key][key3][key2] = tmp_result[key][key2][key3];\r\n } else {\r\n tmp_result2[key][key3] = {};\r\n tmp_result2[key][key3][key2] = tmp_result[key][key2][key3];\r\n }\r\n }\r\n }\r\n }\r\n // change the data format again to a array of arrays\r\n let result = [];\r\n for (let key in tmp_result2) {\r\n for (let key2 in tmp_result2[key]) {\r\n let tmp_array = [key, key2];\r\n stats.forEach(function(d) {\r\n tmp_array.push(tmp_result2[key][key2][d]);\r\n });\r\n result.push(tmp_array);\r\n }\r\n }\r\n return result;\r\n}\r\n\r\n\r\n/**\r\n * Get parsed csv data measurements\r\n * @param {String} measurement - chemical measurement\r\n */\r\nfunction getTimeSeriesData(measurement) {\r\n let parseTime = d3.timeParse('%Y-%m-%d');\r\n let result = [];\r\n for (let key in data[measurement]['values']) {\r\n data[measurement]['values'][key].forEach(function(d) {\r\n d['location'] = key;\r\n d['date'] = parseTime(d['time']);\r\n result.push(d);\r\n });\r\n }\r\n result = result.filter(d => d['date'] >= getCurrentMinMax()[0] &&\r\n d['date'] <= getCurrentMinMax()[1] &&\r\n selectedLocations.includes(d['location']));\r\n\r\n return result;\r\n}\r\n/**\r\n * Set dataMeasurements variable\r\n */\r\nfunction setDataMeasurements(d) {\r\n dataMeasurements = d;\r\n if ($('#sampling-stragety-div > svg').length) {\r\n Object(_sampling_strategy__WEBPACK_IMPORTED_MODULE_0__[\"draw\"])();\r\n Object(_tsne_js__WEBPACK_IMPORTED_MODULE_2__[\"updateTSNE\"])();\r\n }\r\n // console.log(dataMeasurements.length);\r\n}\r\n\r\nfunction setTSNEData(d) {\r\n tSNEData = d;\r\n}\r\n\r\nfunction getTSNEData() {\r\n let measurementsDates = getDataMeasurements();\r\n measurementsDates = measurementsDates.map(function(d) {\r\n return d['date'].getTime();\r\n });\r\n // let filterDates = dataMeasurements\r\n return tSNEData.filter(d => measurementsDates.includes(d['date'].getTime()) &&\r\n selectedLocations.includes(d['location']));\r\n // d['date'] >= currentMinMax[0] &&\r\n // d['date'] <= currentMinMax[1] &&\r\n // selectedLocations.includes(d['location']) &&\r\n\r\n}\r\n\r\n/**\r\n * Get selectedLocations\r\n */\r\nfunction getSelectedLocations() {\r\n return selectedLocations;\r\n}\r\n\r\n/**\r\n * Set the selectedLocations\r\n */\r\nfunction setSelectedLocations(d) {\r\n selectedLocations = d;\r\n // compute for the first time the measurements per day\r\n updateDataMeasurements();\r\n if (!$('#time-series-div').hasClass('d-none')) {\r\n Object(_timeseries_js__WEBPACK_IMPORTED_MODULE_1__[\"updateTimeSeries\"])();\r\n }\r\n}\r\n\r\n/**\r\n * Get selectedMeasurements\r\n */\r\nfunction getSelectedMeasurements() {\r\n return selectedMeasurements;\r\n}\r\n\r\n/**\r\n * Set the selectedMeasurements\r\n */\r\nfunction setSelectedMeasurements(d) {\r\n selectedMeasurements = d;\r\n // compute for the first time the measurements per day\r\n updateDataMeasurements();\r\n}\r\n\r\n/**\r\n * Get currentMinMax\r\n */\r\nfunction getCurrentMinMax() {\r\n return currentMinMax;\r\n}\r\n\r\n/**\r\n * Set the currentMinMax\r\n */\r\nfunction setCurrentMinMax(d) {\r\n currentMinMax = d;\r\n // draw the sampling strategy vis\r\n Object(_sampling_strategy__WEBPACK_IMPORTED_MODULE_0__[\"draw\"])();\r\n Object(_tsne_js__WEBPACK_IMPORTED_MODULE_2__[\"updateTSNE\"])();\r\n // check if time series is visible and update\r\n if (!$('#time-series-div').hasClass('d-none')) {\r\n Object(_timeseries_js__WEBPACK_IMPORTED_MODULE_1__[\"updateTimeSeries\"])();\r\n }\r\n}\n\n//# sourceURL=webpack:///./src/js/data.js?")},"./src/js/load-data.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDataJSON", function() { return parseDataJSON; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMetadataJSON", function() { return parseMetadataJSON; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseTSNEData", function() { return parseTSNEData; });\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.js */ "./src/js/data.js");\n/*eslint-disable no-unused-lets*/\r\n/*global d3*/\r\n\r\n\r\n\r\n\r\n/**\r\n * Parse the data and load it into the data object\r\n * @param {String} path - path to json file\r\n */\r\nfunction parseDataJSON(path) {\r\n d3.json(path).then(function(d) {\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__["setData"])(d);\r\n }, function() {\r\n alert(\'Could not load input json for the data\');\r\n });\r\n}\r\n\r\n/**\r\n * Parse the meta data and load it into the meta data object\r\n * @param {String} path - path to json file\r\n */\r\nfunction parseMetadataJSON(path) {\r\n d3.json(path).then(function(d) {\r\n // console.log(d);\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__["setMetaData"])(d);\r\n }, function() {\r\n alert(\'Could not load input json for the metadata\');\r\n });\r\n}\r\n\r\n/**\r\n * Parse the tsne data and load it into the tsne object\r\n * @param {String} path - path to json file\r\n */\r\nfunction parseTSNEData(path) {\r\n d3.csv(path)\r\n .then(function(tsne) {\r\n let dateparser = d3.timeParse(\'%Y-%m-%d\');\r\n\r\n tsne.forEach(function(d) {\r\n d[\'date\'] = dateparser(d[\'date\']);\r\n d.x = +d.x;\r\n d.y = +d.y;\r\n });\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__["setTSNEData"])(tsne);\r\n });\r\n\r\n}\n\n//# sourceURL=webpack:///./src/js/load-data.js?')},"./src/js/metadata.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initMetadata\", function() { return initMetadata; });\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.js */ \"./src/js/data.js\");\n/*eslint-disable no-unused-lets*/\r\n/*global d3, $*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet metadata;\r\n\r\n// static color mapping to the d3.schemeCategory10 -\r\n// making it independet of the order of objects\r\nlet ordinalColorScheme = d3.scaleOrdinal(d3.schemeCategory10);\r\n\r\n\r\n/**\r\n * Initialize the div with the svg element\r\n */\r\nfunction initMetadata() {\r\n metadata = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getMetaData\"])();\r\n ordinalColorScheme.domain(metadata['locations']);\r\n\r\n // append the metadata locations list\r\n let metadataOptions = metadata['locations'].map(function(d) {\r\n return '<option>' + d + '</option>';\r\n }).join();\r\n $('#metadata-locations')\r\n .append(metadataOptions)\r\n .selectpicker('refresh')\r\n .selectpicker('selectAll');\r\n\r\n\r\n // metadataMeasurements\r\n metadataOptions = Object.keys(metadata['measureUnit']).map(function(d) {\r\n return '<option>' + d + '</option>';\r\n }).join();\r\n $('#metadata-measurements')\r\n .append(metadataOptions)\r\n .selectpicker('refresh')\r\n .selectpicker('selectAll');\r\n\r\n // append the river network chart\r\n let height = 200,\r\n width = 200;\r\n let networkSVG = d3.select('#metadata-river-network')\r\n .append('svg')\r\n .attr('height', height)\r\n .attr('width', width);\r\n let nodes = metadata['locationsRelationships']['nodes'];\r\n let links = metadata['locationsRelationships']['links'];\r\n\r\n networkSVG.append('svg:defs').append('svg:marker')\r\n .attr('id', 'arrow')\r\n .attr('viewBox', '0 -5 10 10')\r\n .attr('refX', -20) //so that it comes towards the center.\r\n .attr('markerWidth', 8)\r\n .attr('markerHeight', 8)\r\n .attr('orient', 'auto')\r\n .append('svg:path')\r\n .attr('d', 'M0,-5L10,0L0,5');\r\n\r\n // append links\r\n networkSVG.append('g')\r\n .attr('stroke', '#000')\r\n .attr('stroke-width', 1.5)\r\n .selectAll('line')\r\n .data(links)\r\n .enter().append('line')\r\n .attr('x1', function(d) {\r\n return d.source[0];\r\n })\r\n .attr('y1', function(d) {\r\n return d.source[1];\r\n })\r\n .attr('x2', function(d) {\r\n return d.target[0];\r\n })\r\n .attr('y2', function(d) {\r\n return d.target[1];\r\n })\r\n .attr('marker-start', 'url(#arrow)');\r\n\r\n // append nodes\r\n networkSVG.append('g')\r\n .selectAll('circle')\r\n .data(nodes)\r\n .enter().append('circle')\r\n .style('fill', function(d) {\r\n return ordinalColorScheme(d['location']);\r\n })\r\n .attr('cx', function(d) {\r\n return d.x;\r\n })\r\n .attr('cy', function(d) {\r\n return d.y;\r\n })\r\n .attr('r', 10)\r\n .on('mouseover', function(d) {\r\n d3.select(this).attr('r', 20);\r\n $('#badge-' + d['location']).addClass('highlight');\r\n })\r\n .on('mouseout', function(d) {\r\n d3.select(this).attr('r', 10);\r\n $('#badge-' + d['location']).removeClass('highlight');\r\n })\r\n .on('click', function(d) {\r\n let selected = $('#metadata-locations').val();\r\n if (selected.includes(d['location'])) {\r\n selected = selected.filter(function(item) {\r\n return item !== d['location'];\r\n });\r\n } else {\r\n selected.push(d['location']);\r\n }\r\n $('#metadata-locations').selectpicker('val', selected);\r\n });\r\n\r\n networkSVG.append('path')\r\n .style('fill', '#000')\r\n .attr('d', d3.symbol()\r\n .size(100)\r\n .type(d3.symbolStar))\r\n .attr('transform', 'translate(150, 30)')\r\n // .append('rect')\r\n // .attr('width', 20)\r\n // .attr('height', 20)\r\n // .style('fill', )\r\n .on('mouseover', function() {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">Approximate location of waste dumping</span>');\r\n })\r\n .on('mouseout', function() {\r\n setTimeout(function() {\r\n $('#metadata-info').empty();\r\n }, 2000);\r\n // $('#metadata-info').delay(1000).empty();\r\n });\r\n\r\n\r\n\r\n // append the color legend\r\n metadata['locations'].forEach(function(d) {\r\n $('#metadata-legend').append(' <span id=\"badge-' + d + '\" class=\"badge\" style=\"background: ' + ordinalColorScheme(d) + ';\">' + d + '</span> ');\r\n });\r\n}\r\n\r\n\r\n/**\r\n * On click listener for the metadata location select field\r\n */\r\n$('#metadata-locations').on('change', function() {\r\n let selected = $.map($(this).find('option:selected'), function(o) {\r\n return o['label'];\r\n });\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"setSelectedLocations\"])(selected);\r\n});\r\n\r\n/**\r\n * On click listener for the metadata measurements select field\r\n */\r\n$('#metadata-measurements').on('change', function() {\r\n $('#time-series-div').addClass('d-none');\r\n let selected = $.map($(this).find('option:selected'), function(o) {\r\n return o['label'];\r\n });\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"setSelectedMeasurements\"])(selected);\r\n});\r\n\r\n$(function() {\r\n $('[rel=\"tooltip\"]').tooltip();\r\n});\n\n//# sourceURL=webpack:///./src/js/metadata.js?")},"./src/js/sampling-strategy.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initSamplingStrategy\", function() { return initSamplingStrategy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"draw\", function() { return draw; });\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.js */ \"./src/js/data.js\");\n/*eslint-disable no-unused-lets*/\r\n/*global d3, $*/\r\n\r\n\r\n\r\n\r\nlet svg, g; // svg for the sampling strategy vis\r\nlet x, x2, y, xAxis, yAxis, gXaxis; // define scales and axis\r\nlet data;\r\n\r\nlet width, height,\r\n margin = {\r\n top: 10,\r\n right: 10,\r\n bottom: 10,\r\n left: 70\r\n };\r\n\r\n// static color mapping to the d3.schemeCategory10 -\r\n// making it independet of the order of objects\r\nlet ordinalColorScheme = d3.scaleOrdinal(d3.schemeCategory10);\r\n\r\nlet globalScale;\r\nlet localScales = {};\r\n\r\n/**\r\n * Initialize the div with the svg element\r\n * @param {String} domSelector - To which svg to append the svg\r\n */\r\nfunction initSamplingStrategy(domSelector) {\r\n // console.log(domSelector);\r\n width = $(domSelector).width() - margin.left;\r\n height = 250; // $(domSelector).height() * 0.8 - margin.bottom;\r\n\r\n // init the zoom\r\n let zoom = d3.zoom()\r\n .scaleExtent([1, 100])\r\n .translateExtent([\r\n [0, 0],\r\n [width, height]\r\n ])\r\n .extent([\r\n [0, 0],\r\n [width, height]\r\n ])\r\n .on('zoom', function() {\r\n let t = d3.event.transform;\r\n // change scaling function\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"setCurrentMinMax\"])(t.rescaleX(x2).domain());\r\n });\r\n\r\n // create the svg\r\n svg = d3.select(domSelector)\r\n .classed('svg-container', true)\r\n // to make it responsive with css\r\n .append('svg')\r\n .attr('height', height)\r\n .attr('width', width)\r\n .call(zoom);\r\n\r\n // append a group for the elements\r\n g = svg.append('g')\r\n .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');\r\n\r\n width = width * 0.9;\r\n height = height * 0.9;\r\n\r\n // get min max\r\n let metadata = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getMetaData\"])();\r\n // get ordinal values for y axis\r\n let yDomain = metadata['locations'];\r\n\r\n // define the scales\r\n x = d3.scaleTime().domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])()).range([0, width]);\r\n x2 = d3.scaleTime().domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])()).range([0, width]);\r\n y = d3.scalePoint().domain(yDomain).range([0, height - 10]);\r\n\r\n xAxis = d3.axisBottom(x).tickSize(0);\r\n yAxis = d3.axisLeft(y).tickSize(0);\r\n\r\n // append the axis\r\n gXaxis = g.append('g')\r\n .attr('class', 'axis x-axis')\r\n .attr('transform', 'translate(0,' + height + ')')\r\n .call(xAxis);\r\n\r\n g.append('g')\r\n .attr('class', 'axis axis--y')\r\n .call(yAxis);\r\n\r\n\r\n // get the data\r\n data = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getDataMeasurements\"])();\r\n\r\n // define global and local opacity scales for the coloring of the circle\r\n // console.log(data);\r\n let globalMinMaxCount = [d3.min(data, function(d) {\r\n return d['count'];\r\n }),\r\n d3.max(data, function(d) {\r\n return d['count'];\r\n })\r\n ];\r\n // the global scale\r\n globalScale = d3.scaleLinear()\r\n .domain(globalMinMaxCount)\r\n .range([0.2, 1]);\r\n\r\n // the local scales\r\n let localMinMax = {};\r\n data.forEach(function(d) {\r\n if (!(d['location'] in localMinMax)) {\r\n localMinMax[d['location']] = [d['count'], d['count']];\r\n }\r\n if (d['count'] < localMinMax[d['location']][0]) {\r\n localMinMax[d['location']][0] = d['count'];\r\n }\r\n if (d['count'] > localMinMax[d['location']][1]) {\r\n localMinMax[d['location']][1] = d['count'];\r\n }\r\n });\r\n\r\n for (let key in localMinMax) {\r\n localScales[key] = d3.scaleLinear()\r\n .domain(localMinMax[key])\r\n .range([0.2, 1]);\r\n }\r\n // define the color scheme\r\n ordinalColorScheme.domain(metadata['locations']);\r\n\r\n draw();\r\n}\r\n\r\n\r\n\r\n/**\r\n * Draw function\r\n */\r\nfunction draw() {\r\n data = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getDataMeasurements\"])();\r\n // preprocess the data correctly\r\n\r\n let binnedData = [];\r\n // aggregate to 100 circles per x-axis\r\n // console.log($('#sampling-stragety-aggregate-buttons').hasClass('active'));\r\n if ($('#sampling-stragety-aggregate-buttons').hasClass('active')) {\r\n binnedData = binData(data, 50);\r\n } else {\r\n binnedData = data;\r\n }\r\n\r\n // update the x scaling\r\n x.domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])());\r\n\r\n // DATA JOIN -- sampling circles\r\n let samplingCircles = g.selectAll('circle')\r\n .data(binnedData);\r\n // UPDATE -- sampling circles\r\n samplingCircles\r\n .enter().append('circle')\r\n .merge(samplingCircles)\r\n .attr('r', 5)\r\n .attr('cx', function(d) {\r\n return x(d['date']);\r\n })\r\n .attr('cy', function(d) {\r\n return y(d['location']);\r\n })\r\n .attr('class', function(d) {\r\n return 'c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate();\r\n })\r\n .style('fill', function(d) {\r\n return ordinalColorScheme(d['location']);\r\n })\r\n .style('opacity', function(d) {\r\n if ($('#global-scale').is(':checked')) {\r\n return globalScale(d['count']);\r\n } else {\r\n return localScales[d['location']](d['count']);\r\n }\r\n })\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 0.5)\r\n .on('mouseover', function(d) {\r\n d3.selectAll('.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate())\r\n .attr('r', 20)\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 2);\r\n let measurements = d['measurements'];\r\n if (typeof measurements === 'object') {\r\n\r\n for (let key in measurements) {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">' + key + ': ' + measurements[key].join(' ; ') + '</span>');\r\n }\r\n } else {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">' + measurements + '</span>');\r\n }\r\n })\r\n .on('mouseout', function(d) {\r\n d3.selectAll('.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate())\r\n .attr('r', 4)\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 0.5);\r\n $('#metadata-info').empty();\r\n })\r\n .on('click', function(d) {\r\n if (typeof d['measurements'] === 'object') {\r\n let selected = Object.keys(d['measurements']);\r\n $('#metadata-measurements').selectpicker('val', selected);\r\n }\r\n });\r\n\r\n // EXIT\r\n samplingCircles.exit().remove();\r\n\r\n // update x axis\r\n gXaxis.call(xAxis);\r\n}\r\n\r\n/**\r\n * Jquery on change listeners\r\n * Update from global to local scale and vise versa\r\n */\r\n$('#sampling-stragety-scale-buttons :input').change(function() {\r\n draw();\r\n});\r\n\r\n/**\r\n * Jquery on change listeners\r\n * Update change from aggregated version to all version\r\n */\r\n$('#sampling-stragety-aggregate-buttons').on('click', function() {\r\n // two toggles are just a fix - change code\r\n $('#sampling-stragety-aggregate-buttons').toggleClass('active');\r\n draw();\r\n $('#sampling-stragety-aggregate-buttons').toggleClass('active');\r\n\r\n});\r\n\r\n/**\r\n * Bin the data by the zoom level\r\n * @param {array} dat - Array of objects\r\n * @param {number} max - maximum number of elements per axis\r\n */\r\nfunction binData(filteredData, max) {\r\n let result = [];\r\n // group by location\r\n let grouped = groupBy(filteredData, 'location');\r\n // aggregate and average the objects\r\n for (let key in grouped) {\r\n // if the group has more than max elements\r\n if (grouped[key].length > max) {\r\n let ratio = Math.ceil(grouped[key].length / max);\r\n // sort the subgroup by the date\r\n let sortedTmp = grouped[key].sort(function(a, b) {\r\n if (a['date'] < b['date']) {\r\n return -1;\r\n }\r\n if (a['date'] > b['date']) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // temp element needed to store max elements and aggregate these elements\r\n let tmp = [sortedTmp[0]];\r\n // aggregate and average\r\n for (let i = 1; i < sortedTmp.length; i++) {\r\n if (i % ratio === 0) {\r\n result.push(aggregateMean(tmp));\r\n tmp = [];\r\n } else {\r\n tmp.push(sortedTmp[i]);\r\n }\r\n }\r\n if (tmp.length) {\r\n result.push(aggregateMean(tmp));\r\n }\r\n }\r\n // less than max elements therefore no binning is needed\r\n else {\r\n result = result.concat(grouped[key]);\r\n }\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Helper function to group an array of objects by a key\r\n * @param {array} xs\r\n * @param {string} key\r\n */\r\nfunction groupBy(xs, key) {\r\n return xs.reduce(function(rv, x) {\r\n (rv[x[key]] = rv[x[key]] || []).push(x);\r\n return rv;\r\n }, {});\r\n}\r\n\r\n/**\r\n * Helper function to aggregate and average an array of objects\r\n */\r\nfunction aggregateMean(d) {\r\n let location = d[0]['location'];\r\n // average date with a d3 scale\r\n let date = d3.scaleTime().domain([0, 1]).range([d[0]['date'], d[d.length - 1]['date']])(0.5);\r\n // aggregate and average the number of countes elements\r\n let count = d.reduce((p, c) => p + c['count'], 0) / d.length;\r\n return {\r\n 'location': location,\r\n 'date': date,\r\n 'count': count,\r\n 'measurements': 'This sample object is aggregated'\r\n };\r\n}\n\n//# sourceURL=webpack:///./src/js/sampling-strategy.js?")}, "./src/js/statistics.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.js */ \"./src/js/data.js\");\n/* harmony import */ var _timeseries_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeseries.js */ \"./src/js/timeseries.js\");\n/*eslint-disable no-unused-lets*/\r\n/*global $, d3*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet domSelector = '#statistics-table > tbody:nth-child(2)';\r\n/**\r\n * Initialize the div with the svg element\r\n */\r\nfunction updateStatisticsModal() {\r\n $(domSelector).empty();\r\n let data = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getStatisticData\"])();\r\n let tableString = '';\r\n\r\n let markerEmtpyRow = data[0][0];\r\n\r\n data = data.sort(compare);\r\n let minMax = [d3.min(data, function(d) {\r\n return d[15];\r\n }),\r\n d3.max(data, function(d) {\r\n return d[15];\r\n })\r\n ];\r\n\r\n let colorScale = d3.scaleSqrt()\r\n .domain(minMax)\r\n .range(['#fff', '#ef3b2c']);\r\n\r\n data.forEach(function(d) {\r\n if (markerEmtpyRow !== d[0]) {\r\n tableString += '<tr class=\"blank-row\"></tr>';\r\n markerEmtpyRow = d[0];\r\n }\r\n tableString += '<tr id=\"' + (d[0] + '---' + d[1]) + '\" style=\"background: ' + colorScale(d[15]) + '\">';\r\n d.forEach(function(elm) {\r\n if (elm !== undefined) {\r\n if (Number(elm) === elm && elm % 1 !== 0) {\r\n tableString += '<td>' + parseFloat(elm).toFixed(2) + '</td>';\r\n } else {\r\n tableString += '<td>' + elm + '</td>';\r\n }\r\n } else {\r\n tableString += '<td></td>';\r\n }\r\n });\r\n tableString += '</tr>';\r\n });\r\n $(domSelector).append(tableString);\r\n}\r\n\r\nfunction compare(a, b) {\r\n if (a[15] < b[15])\r\n return 1;\r\n if (a[15] > b[15])\r\n return -1;\r\n return 0;\r\n}\r\n\r\n\r\n// $('#statistics-button').on('click', function() {\r\n$('#statistics-modal').on('shown.bs.modal', function() {\r\n updateStatisticsModal();\r\n $('div.col-md-12:nth-child(4)').tooltip('hide');\r\n});\r\n\r\n$(domSelector).on('click', 'tr', function() {\r\n // get the right info\r\n let id = $(this).attr('id');\r\n let measurement = id.split('---')[0];\r\n // let location = id.split('---')[1];\r\n // select the right elements in the selection process\r\n\r\n // $('#metadata-locations').selectpicker('selectAll');\r\n $('#metadata-measurements').selectpicker('val', measurement);\r\n Object(_timeseries_js__WEBPACK_IMPORTED_MODULE_1__[\"updateTimeSeries\"])(measurement);\r\n\r\n $('#statistics-modal').modal('toggle');\r\n $('#time-series-div').removeClass('d-none');\r\n});\n\n//# sourceURL=webpack:///./src/js/statistics.js?")},"./src/js/timeseries.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initTimeSeries\", function() { return initTimeSeries; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateTimeSeries\", function() { return updateTimeSeries; });\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.js */ \"./src/js/data.js\");\n/*eslint-disable no-unused-lets*/\r\n/*global d3, $*/\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet headerSelector = '#time-series-div .card-header';\r\nlet mainSelector = '#time-series-div .card-body';\r\nlet svg, g;\r\n\r\n\r\nlet ordinalColorScheme;\r\nlet x, x2, y, xAxis, yAxis, gXaxis, gYaxis; // define scales and axis\r\nlet measurement = '';\r\n\r\n\r\nlet width,\r\n height,\r\n margin = {\r\n top: 10,\r\n right: 10,\r\n bottom: 10,\r\n left: 70\r\n };\r\n\r\n/**\r\n * Initialize the div with the svg element\r\n */\r\nfunction initTimeSeries() {\r\n\r\n // get data\r\n let metadata = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getMetaData\"])();\r\n\r\n // get dimensions\r\n width = $(mainSelector).width();\r\n height = 250; // $(mainSelector).height() || 300;\r\n\r\n // init the zoom\r\n let zoom = d3.zoom()\r\n .scaleExtent([1, 100])\r\n .translateExtent([\r\n [0, 0],\r\n [width, height]\r\n ])\r\n .extent([\r\n [0, 0],\r\n [width, height]\r\n ])\r\n .on('zoom', function() {\r\n let t = d3.event.transform;\r\n // change scaling function\r\n Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"setCurrentMinMax\"])(t.rescaleX(x2).domain());\r\n });\r\n\r\n // create the svg\r\n svg = d3.select(mainSelector)\r\n .classed('svg-container', true)\r\n // to make it responsive with css\r\n .append('svg')\r\n .attr('height', height)\r\n .attr('width', width)\r\n .call(zoom);\r\n\r\n width = width * 0.9;\r\n height = height * 0.9;\r\n\r\n // append a group for the elements\r\n g = svg.append('g')\r\n .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');\r\n\r\n // // create scales and axis\r\n x = d3.scaleTime().domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])()).range([0, width]);\r\n x2 = d3.scaleTime().domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])()).range([0, width]);\r\n\r\n y = d3.scaleLinear().range([height, 0]).domain([0, 1]);\r\n\r\n xAxis = d3.axisBottom(x).tickSize(0);\r\n yAxis = d3.axisLeft(y).tickSize(0);\r\n\r\n ordinalColorScheme = d3.scaleOrdinal(d3.schemeCategory10);\r\n ordinalColorScheme.domain(metadata.locations);\r\n\r\n gXaxis = g.append('g')\r\n .attr('class', 'axis x-axis')\r\n .attr('transform', 'translate(0,' + height + ')')\r\n .call(xAxis);\r\n\r\n gYaxis = g.append('g')\r\n .attr('class', 'axis axis--y')\r\n .call(yAxis);\r\n}\r\n\r\n/**\r\n * Update the line chart with the measurement\r\n * @param {String} measurement - chemical measurement\r\n */\r\nfunction updateTimeSeries(m) {\r\n if (m) {\r\n measurement = m;\r\n }\r\n\r\n // update the x scaling\r\n x.domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])());\r\n // change the header\r\n $(headerSelector).html('Time series: ' + measurement);\r\n\r\n let filteredData = [];\r\n if (measurement !== '') {\r\n filteredData = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getTimeSeriesData\"])(measurement);\r\n }\r\n\r\n let yMin = d3.min(filteredData, function(d) {\r\n return d['value'];\r\n });\r\n if (yMin > 0) {\r\n yMin = 0;\r\n }\r\n\r\n let yMax = d3.max(filteredData, function(d) {\r\n return d['value'];\r\n });\r\n\r\n y.domain([yMin, yMax]);\r\n\r\n // DATA JOIN -- sampling circles\r\n let circles = g.selectAll('circle')\r\n .data(filteredData);\r\n // UPDATE -- sampling circles\r\n circles\r\n .enter().append('circle')\r\n .merge(circles)\r\n .attr('r', 5)\r\n .attr('cx', function(d) {\r\n return x(d['date']);\r\n })\r\n .attr('cy', function(d) {\r\n return y(d['value']);\r\n })\r\n .attr('class', function(d) {\r\n return 'c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate();\r\n })\r\n .style('fill', function(d) {\r\n return ordinalColorScheme(d['location']);\r\n })\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 0.5)\r\n // .style('opacity', function(d) {\r\n // opacityScale(d['value']);\r\n // })\r\n .on('mouseover', function(d) {\r\n d3.selectAll('.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate())\r\n .attr('r', 20)\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 2);\r\n for (let key in d) {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">' + key + ': ' + d[key] + '</span>');\r\n }\r\n })\r\n .on('mouseout', function(d) {\r\n d3.selectAll('.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate())\r\n .attr('r', 4)\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 0.5);\r\n $('#metadata-info').empty();\r\n });\r\n // .on('click', function(d) {\r\n // // console.log(d);\r\n // // if (typeof d['measurements'] === 'object') {\r\n // // let selected = Object.keys(d['measurements']);\r\n // // $('#metadata-measurements').selectpicker('val', selected);\r\n // // }\r\n // });\r\n\r\n // EXIT\r\n circles.exit().remove();\r\n\r\n gXaxis.call(xAxis);\r\n gYaxis.call(yAxis);\r\n\r\n}\n\n//# sourceURL=webpack:///./src/js/timeseries.js?")},"./src/js/tsne.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"initTSNE\", function() { return initTSNE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateTSNE\", function() { return updateTSNE; });\n/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.js */ \"./src/js/data.js\");\n/*eslint-disable no-unused-lets*/\r\n/*global d3, $*/\r\n\r\n\r\n\r\n\r\nlet svg, g;\r\n\r\nlet width,\r\n height,\r\n margin = {\r\n top: 30,\r\n right: 10,\r\n bottom: 10,\r\n left: 70\r\n };\r\n\r\n\r\nlet ordinalColorScheme = d3.scaleOrdinal(d3.schemeCategory10);\r\n\r\nlet x, x2, y, y2, timeScale; // define scales and axis\r\n\r\n/**\r\n * Initialize the div with the svg element\r\n * @param {String} domSelector - To which svg to append the svg\r\n */\r\nfunction initTSNE(domSelector) {\r\n // get data\r\n let metadata = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getMetaData\"])();\r\n // get dimensions\r\n width = $(domSelector).width();\r\n height = 500; // $(mainSelector).height() || 300;\r\n\r\n let zoom = d3.zoom()\r\n .scaleExtent([1, 10])\r\n .translateExtent([\r\n [0, 0],\r\n [width * 0.9, height * 0.9]\r\n ])\r\n .extent([\r\n [0, 0],\r\n [width * 0.9, height * 0.9]\r\n ])\r\n .on('zoom', function() {\r\n x = d3.event.transform.rescaleX(x2);\r\n y = d3.event.transform.rescaleY(y2);\r\n // change scaling function\r\n updateTSNE();\r\n });\r\n\r\n // create the svg\r\n svg = d3.select(domSelector)\r\n .attr('id', 'viscontainer')\r\n .classed('svg-container', true)\r\n // to make it responsive with css\r\n .append('svg')\r\n .attr('height', height)\r\n .attr('width', width)\r\n .call(zoom);\r\n\r\n\r\n // append a group for the elements\r\n g = svg.append('g')\r\n .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');\r\n width = width * 0.9;\r\n height = height * 0.9;\r\n\r\n let data = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getTSNEData\"])();\r\n\r\n x = d3.scaleLinear()\r\n .range([0, width]).domain([\r\n d3.min(data, function(d) {\r\n return d['x'];\r\n }),\r\n d3.max(data, function(d) {\r\n return d['x'];\r\n })\r\n ]);\r\n\r\n x2 = d3.scaleLinear()\r\n .range([0, width]).domain([\r\n d3.min(data, function(d) {\r\n return d['x'];\r\n }),\r\n d3.max(data, function(d) {\r\n return d['x'];\r\n })\r\n ]);\r\n\r\n y = d3.scaleLinear()\r\n .range([0, height])\r\n .domain([\r\n d3.max(data, function(d) {\r\n return d['y'];\r\n }),\r\n d3.min(data, function(d) {\r\n return d['y'];\r\n })\r\n ]);\r\n\r\n y2 = d3.scaleLinear()\r\n .range([0, height])\r\n .domain([\r\n d3.max(data, function(d) {\r\n return d['y'];\r\n }),\r\n d3.min(data, function(d) {\r\n return d['y'];\r\n })\r\n ]);\r\n\r\n // append the axis\r\n g.append('g')\r\n .attr('class', 'axis x-axis')\r\n .attr('transform', 'translate(0,' + height + ')')\r\n .call(d3.axisBottom(x).ticks(0));\r\n\r\n g.append('g')\r\n .attr('class', 'axis axis--y')\r\n .call(d3.axisLeft(y).ticks(0));\r\n\r\n timeScale = d3.scaleTime()\r\n .domain(Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentMinMax\"])())\r\n .range([0.2, 1]);\r\n\r\n ordinalColorScheme.domain(metadata['locations']);\r\n\r\n updateTSNE();\r\n}\r\n\r\n\r\n/**\r\n * Update the tsne\r\n */\r\nfunction updateTSNE() {\r\n let data = Object(_data_js__WEBPACK_IMPORTED_MODULE_0__[\"getTSNEData\"])();\r\n // filter using the zoom scales\r\n data = data.filter(d => d['x'] >= x.domain()[0] &&\r\n d['x'] <= x.domain()[1] &&\r\n d['y'] <= y.domain()[0] &&\r\n d['y'] >= y.domain()[1]);\r\n\r\n // DATA JOIN -- sampling circles\r\n let circles = g.selectAll('circle')\r\n .data(data);\r\n // UPDATE -- sampling circles\r\n circles\r\n .enter().append('circle')\r\n .merge(circles)\r\n .attr('r', 3)\r\n .attr('cx', function(d) {\r\n return x(d['x']);\r\n })\r\n .attr('cy', function(d) {\r\n return y(d['y']);\r\n })\r\n .attr('class', function(d) {\r\n return 'c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate();\r\n })\r\n .style('fill', function(d) {\r\n return ordinalColorScheme(d['location']);\r\n })\r\n .style('opacity', function(d) {\r\n return timeScale(d[['date']]);\r\n })\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 0.5)\r\n .on('mouseover', function(d) {\r\n let selectString = '.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate();\r\n d3.selectAll(selectString)\r\n .attr('r', 20)\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 2);\r\n // append measurement info the info fiv\r\n if (d3.select('#sampling-stragety-div').select(selectString).data()[0]) {\r\n\r\n let measurements = d3.select('#sampling-stragety-div').select(selectString).data()[0]['measurements'];\r\n if (typeof measurements === 'object') {\r\n\r\n for (let key in measurements) {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">' + key + ': ' + measurements[key].join(' ; ') + '</span>');\r\n }\r\n } else {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">' + measurements + '</span>');\r\n }\r\n } else {\r\n $('#metadata-info').append('<span class=\"badge badge-dark\">' + 'They measures are filterecd using the measurement filtering' + '</span>');\r\n }\r\n\r\n })\r\n .on('mouseout', function(d) {\r\n d3.selectAll('.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate())\r\n .attr('r', 4)\r\n .style('stroke', '#737373')\r\n .style('stroke-width', 0.5);\r\n $('#metadata-info').empty();\r\n })\r\n .on('click', function(d) {\r\n let selectString = '.c-' + d['location'] + '-' + d['date'].getFullYear() + d['date'].getMonth() + d['date'].getDate();\r\n if (d3.select('#sampling-stragety-div').select(selectString).data()[0]) {\r\n let measurements = d3.select('#sampling-stragety-div').select(selectString).data()[0]['measurements'];\r\n\r\n if (typeof measurements === 'object') {\r\n let selected = Object.keys(measurements);\r\n $('#metadata-measurements').selectpicker('val', selected);\r\n }\r\n }\r\n });\r\n\r\n // EXIT\r\n circles.exit().remove();\r\n\r\n // draw lines\r\n let line = d3.line()\r\n .x(function(d) {\r\n return x(d[0]);\r\n })\r\n .y(function(d) {\r\n return y(d[1]);\r\n });\r\n\r\n let lineData = [];\r\n g.selectAll('path').remove();\r\n if ($('#tsne-line-button').hasClass('active')) {\r\n let grouped = groupBy(data, 'location');\r\n lineData = {};\r\n // let tmp = {}\r\n for (let key in grouped) {\r\n grouped[key].forEach(function(d) {\r\n if (key in lineData) {\r\n lineData[key]['points'].push([d['x'], d['y']]);\r\n } else {\r\n lineData[key] = {\r\n 'location': key,\r\n 'points': [\r\n [d['x'], d['y']]\r\n ]\r\n };\r\n }\r\n });\r\n }\r\n lineData = Object.values(lineData);\r\n g.selectAll('path')\r\n .data(lineData)\r\n .enter().append('path')\r\n .attr('class', 'timeline')\r\n .attr('d', function(d) {\r\n return line(d['points']);\r\n })\r\n .style('stroke', function(d) {\r\n return ordinalColorScheme(d['location']);\r\n });\r\n }\r\n\r\n // update x axis\r\n}\r\n\r\n/**\r\n * Jquery on change listeners\r\n * Update change from tsne draw line\r\n */\r\n$('#tsne-line-button').on('click', function() {\r\n // two toggles are just a fix - change code\r\n $('#tsne-line-button').toggleClass('active');\r\n updateTSNE();\r\n $('#tsne-line-button').toggleClass('active');\r\n});\r\n\r\n/**\r\n * Helper function to group an array of objects by a key\r\n * @param {array} xs\r\n * @param {string} key\r\n */\r\nfunction groupBy(xs, key) {\r\n return xs.reduce(function(rv, x) {\r\n (rv[x[key]] = rv[x[key]] || []).push(x);\r\n return rv;\r\n }, {});\r\n}\n\n//# sourceURL=webpack:///./src/js/tsne.js?")}});
24,927.333333
31,983
0.60223
ac9150c2b5e67d37bda841f5009c32e9a1af30be
3,817
js
JavaScript
src/pages/about-us.js
Shoulao/green-lanes-test
0b35432033515a460ed6344ace531992f88e9fc8
[ "0BSD" ]
null
null
null
src/pages/about-us.js
Shoulao/green-lanes-test
0b35432033515a460ed6344ace531992f88e9fc8
[ "0BSD" ]
2
2022-02-02T23:16:15.000Z
2022-02-02T23:39:03.000Z
src/pages/about-us.js
Shoulao/green-lanes-test
0b35432033515a460ed6344ace531992f88e9fc8
[ "0BSD" ]
null
null
null
import * as React from "react" import SectionImageOne from "../assets/about-us-page/section-1.png" import SectionImageTwo from "../assets/about-us-page/section-2.png" import HeroAboutUsImage from "../assets/hero-images/hero-about-us.png" import AboutUsPortfolio from "../components/about-us-portolio/about-us-portfolio" import HeroImage from "../components/hero-image/hero-image" import Hero from "../components/hero/hero" import Layout from "../components/layout" import People from "../components/people/people" import RefLinks from "../components/ref-links/ref-links" import Seo from "../components/seo" import TextImageSection from "../components/text-image-section/text-image-section" import WhatWeDo from "../components/what-we-do/what-we-do" const refLinks = [ { path: "#our-approach", label: "Nasze podejście" }, { path: "#what-we-do", label: "Co robimy" }, { path: "#focus-area", label: "Na czym się skupiamy" }, { path: "#who-we-are", label: "Kim jesteśmy" }, { path: "#working-with-us", label: "Poznaj nasze projekty" }, ] const ourApproach = [ "Konopie to cudowna roślina, która towarzyszyła rozwojowi ludzkości od początku istnienia naszego gatunku. Wzmianki o zastosowaniu konopi obecne są w każdej kulturze, na każdej długości i szerokości geograficznej. Od wieków dawała nam ona pożywienie, ubiór, schronienie i leki.", "Dziś konopie to przede wszystkim szansa na bardziej ekologiczną przyszłość dla naszej planety. Mnogość jej zastosowań i zdolność do absorpcji CO<sub>2</sub> daje nadzieję na ekologiczną rewolucję w wielu dziedzinach - od żywności po bio-kompozyty i materiały budowlane.", "Naszą misją jest wykorzystanie nowoczesnych technologii celem zagospodarowania każdego elementu rośliny i tworzenie pro-ekologicznych alternatyw na bazie konopi dla obecnie stosowanych rozwiązań w wielu branżach.", ] const whatWeDoText = "Green Lanes prowadzi badania w zakresie wykorzystania każdego elementu konopi włóknistych od korzenia, przez łodygę po ziarno i kwiaty. Analizujemy możliwe zastosowania zarówno pod kątem właściwości konopi, stosowanych technologii, jak i wielkości rynku i potrzeby znalezienia bardziej ekologicznych alternatyw dla istniejących rozwiązań w danej branży. Wybrane projekty wprowadzamy w życie tworząc spółki, których celem jest realizacja zidentyfikowanej szansy. Rozwijamy je w oparciu o nasze doświadczenie w branży oraz zdolność do pozyskiwania partnerów branżowych i kapitału niezbędnego do realizacji kolejnych kamieni milowych.</p></p>Na bieżąco rekrutujemy też kluczowy zespół ekspertów i managerów, którzy w tworzonych spółkach realizują naszą wizję zielonej przyszłości." const focusAreaText = [ "Dziś skupiamy się na konopiach, których potencjał przez dekady był zapomniany, ale przedmiotem naszych zainteresowań są wszystkie rośliny jednoroczne.", "Wierzymy, że lepsza, bardziej zielona przyszłość to nie tylko konieczność ekologiczna ale przede wszystkim ogromna szansa ekonomiczna. Chcemy być częścią tej wielkiej ekologicznej rewolucji w globalnej gospodarce.", ] const AboutUsPage = () => ( <Layout> <Seo title="O nas" /> <Hero section="O nas" title="Budujemy zieloną<br />gospodarkę przyszłości" outlet={<RefLinks refLinks={refLinks} />} /> <HeroImage heroImage={HeroAboutUsImage} id={"AboutUsPage"} /> <TextImageSection title="Nasze podejście" text={ourApproach} image={SectionImageOne} sectionId="our-approach" /> <WhatWeDo title="Co robimy" text={whatWeDoText} /> <TextImageSection sectionId="focus-area" title="Na czym<br />się skupiamy" text={focusAreaText} image={SectionImageTwo} /> <People sectionId="who-we-are" /> <AboutUsPortfolio sectionId="working-with-us" /> </Layout> ) export default AboutUsPage
58.723077
781
0.762117
ac921edbbcca2fbfe3f8ac45082a7c8ed6b3f2f6
6,148
js
JavaScript
public/components/newproject/newproject.controller.js
valflorez/taxinomitis
ec9495bc429338955d1754cdbe293539cc555dc2
[ "Apache-2.0" ]
null
null
null
public/components/newproject/newproject.controller.js
valflorez/taxinomitis
ec9495bc429338955d1754cdbe293539cc555dc2
[ "Apache-2.0" ]
null
null
null
public/components/newproject/newproject.controller.js
valflorez/taxinomitis
ec9495bc429338955d1754cdbe293539cc555dc2
[ "Apache-2.0" ]
null
null
null
(function () { angular .module('app') .controller('NewProjectController', NewProjectController); NewProjectController.$inject = [ 'authService', 'projectsService', 'loggerService', '$state', '$rootScope', '$scope', '$translate' ]; function NewProjectController(authService, projectsService, loggerService, $state, $rootScope, $scope, $translate) { var vm = this; vm.authService = authService; $scope.creating = false; var errorExceededLimit = 'You have reached the limit for the number of projects you can have. You need to delete one of your current projects before you can create another.'; var errorTryItNow = 'Sorry! You can only create one project at a time if you use "Try it now". You need to delete your current project before you can create another.'; $translate([ 'NEWPROJECT.ERRORS.EXCEEDLIMIT', 'NEWPROJECT.ERRORS.TRYITNOW' ]) .then(function (translations) { errorExceededLimit = translations['NEWPROJECT.ERRORS.EXCEEDLIMIT']; errorTryItNow = translations['NEWPROJECT.ERRORS.TRYITNOW']; }) .catch(function (err) { loggerService.error('[ml4kproj] Failed to get translated error messages', err); }); // use the language that the site is running in // as the default language for text projects // (if supported) otherwise use the universal // language support switch ($translate.use()) { case 'en': case 'ar': case 'cs': case 'zh-cn': case 'zh-tw': case 'de': case 'fr': case 'it': case 'ja': case 'ko': case 'pt-br': case 'es': $scope.language = $translate.use(); break; case 'nl-be': $scope.language = 'nl'; break; default: $scope.language = 'xx'; } vm.fields = []; vm.focused = $rootScope.isTeacher ? 'crowdsourced' : 'name'; var alertId = 1; vm.errors = []; vm.warnings = []; vm.dismissAlert = function (type, errIdx) { vm[type].splice(errIdx, 1); }; function displayAlert(type, status, errObj) { if (!errObj) { errObj = {}; } vm[type].push({ alertid : alertId++, message : errObj.message || errObj.error || 'Unknown error', status : status }); } var MIN_CHOICE_LENGTH = 1; var MAX_CHOICE_LENGTH = 9; var MIN_NUM_CHOICES = 2; var MAX_NUM_CHOICES = 5; authService.getProfileDeferred() .then(function (profile) { vm.profile = profile; }) .catch(function (err) { displayAlert('errors', err.status, err.data); }); var IS_VALID_CHOICE = /^[^0-9\-.,][^,]*$/; function containsInvalidChoice(choices) { return choices.some(function (choice) { return (IS_VALID_CHOICE.test(choice) === false) || choice.length > MAX_CHOICE_LENGTH || choice.length < MIN_CHOICE_LENGTH; }); } $scope.isInvalid = function (type) { if (type === 'numbers') { if (vm.fields.length < 1 || vm.fields.length > 10) { return true; } for (var i = 0; i < vm.fields.length; i++) { if (vm.fields[i].type === 'multichoice') { if (vm.fields[i].choices.length < MIN_NUM_CHOICES || vm.fields[i].choices.length > MAX_NUM_CHOICES) { return true; } if (containsInvalidChoice(vm.fields[i].choices)) { return true; } } } } return false; }; vm.addFieldChoice = function (choice, field) { if (choice) { var newChoice = choice.trim(); if (newChoice.length > 0 && newChoice.length <= MAX_CHOICE_LENGTH && field.choices.indexOf(newChoice) === -1) { field.choices.push(newChoice); return true; } } return false; }; vm.confirm = function (projectSpec) { $scope.creating = true; if (projectSpec.type !== 'numbers') { delete projectSpec.fields; } loggerService.debug('[ml4kproj] Creating new project', projectSpec); projectsService.createProject(projectSpec, vm.profile.user_id, vm.profile.tenant) .then(function (created) { loggerService.debug('[ml4kproj] Created project', created); $state.go('projects', { id : created.id }); }) .catch(function (err) { loggerService.error('[ml4kproj] Failed to create project', err); // treat a user creating too many projects as a special case, and display a // translated message with additional guidance if (err.status === 409 && err.data.error === 'User already has maximum number of projects') { if (vm.profile.tenant === 'session-users') { err.data.message = errorTryItNow; } else { err.data.message = errorExceededLimit; } } displayAlert('errors', err.status, err.data); $scope.creating = false; }); }; } }());
35.537572
182
0.476252
ac923342b0565d50a3837e17f38f0d2a53fd4b8b
164,715
js
JavaScript
assets/js/1.9f8e82b8.js
bep20/bep20-generator-1
462e723947488d31704999a6de787ebd9256103b
[ "MIT" ]
null
null
null
assets/js/1.9f8e82b8.js
bep20/bep20-generator-1
462e723947488d31704999a6de787ebd9256103b
[ "MIT" ]
null
null
null
assets/js/1.9f8e82b8.js
bep20/bep20-generator-1
462e723947488d31704999a6de787ebd9256103b
[ "MIT" ]
null
null
null
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{308:function(e,a,t){"use strict";a.a={data:function(){return{tokenDetails:[{name:"HelloBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!1,supplyType:"100k",accessType:"Ownable",mintable:!1,burnable:!1,operable:!1,tokenRecover:!1,removeCopyright:!1,originalPrice:0,price:0,gas:1330639},{name:"SimpleBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!1,supplyType:"Fixed",accessType:"Ownable",mintable:!1,burnable:!1,operable:!1,tokenRecover:!1,removeCopyright:!1,originalPrice:.5,price:.1,gas:1333276},{name:"StandardBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!0,supplyType:"Fixed",accessType:"Ownable",mintable:!1,burnable:!1,operable:!1,tokenRecover:!1,removeCopyright:!0,originalPrice:.75,price:0.15,gas:1260139},{name:"BurnableBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!0,supplyType:"Fixed",accessType:"Ownable",mintable:!1,burnable:!0,operable:!1,tokenRecover:!1,removeCopyright:!0,originalPrice:1,price:.2,gas:1444650},{name:"MintableBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!0,supplyType:"Capped",accessType:"Ownable",mintable:!0,burnable:!1,operable:!1,tokenRecover:!1,removeCopyright:!0,originalPrice:1,price:.2,gas:1524151},{name:"CommonBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!0,supplyType:"Capped",accessType:"Ownable",mintable:!0,burnable:!0,operable:!1,tokenRecover:!1,removeCopyright:!0,originalPrice:1.25,price:.3,gas:1708581},{name:"UnlimitedBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!0,supplyType:"Unlimited",accessType:"Ownable",mintable:!0,burnable:!0,operable:!1,tokenRecover:!1,removeCopyright:!0,originalPrice:1.5,price:.4,gas:1637163},{name:"AmazingBEP20",version:"2.0.0",standard:!0,verified:!0,detailed:!0,customizeDecimals:!0,supplyType:"Unlimited",accessType:"Ownable",mintable:!0,burnable:!0,operable:!0,tokenRecover:!0,removeCopyright:!0,originalPrice:2,price:.5,gas:2254686}]}}}},310:function(e,a,t){"use strict";var n=t(1),b=t(29).find,s=t(93),d=!0;"find"in[]&&Array(1).find((function(){d=!1})),n({target:"Array",proto:!0,forced:d},{find:function(e){return b(this,e,arguments.length>1?arguments[1]:void 0)}}),s("find")},313:function(e,a,t){"use strict";t(166),t(62),t(96),t(91);var n=t(42),b=t(314),s=t.n(b),d=(t(10),t(63),t(97),{methods:{isMobile:function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}},getParam:function(e){var a={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,(function(e,t,n){a[t]=void 0!==n?n:""})),e?a[e]?a[e]:null:a},makeToast:function(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.$bvToast.toast(a,{title:e,variant:t,solid:!0})},promisify:function(e){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];return new Promise((function(a,n){e.apply(void 0,t.concat([function(e,t){e?n(e):a(t)}]))}))},gaSend:function(e,a,t){try{ga("send","event",e,a,t)}catch(n){console.log("ga send",{category:e,action:a,label:t})}},fbtrack:function(e,a){try{fbq("track",e,a||{})}catch(t){console.log("fb track",{eventName:e,eventParams:a||{}})}}}}),i=t(316),r=t(317),o=t(318),f=t(319),c=t(320),l=t(321),p=t(322),u=t(323),y=t(324);a.a={mixins:[d],data:function(){return{web3:null,web3Provider:null,metamask:{installed:!1,netId:null},network:{default:s.a.defaultNetwork,current:null,map:{56:"mainnet",97:"testnet"},list:{mainnet:{web3Provider:"https://bsc-dataseed.binance.org/",explorerLink:"https://bscscan.com",id:56,name:"Binance Smart Chain"},testnet:{web3Provider:"https://data-seed-prebsc-1-s1.binance.org:8545/",explorerLink:"https://testnet.bscscan.com",id:97,name:"Binance Smart Chain - Testnet"}}},serviceReceiver:s.a.serviceReceiver,tokenList:{HelloBEP20:i,SimpleBEP20:r,StandardBEP20:o,BurnableBEP20:f,MintableBEP20:c,CommonBEP20:l,UnlimitedBEP20:p,AmazingBEP20:u},contracts:{token:null,service:null}}},methods:{initWeb3:function(e,a){var t=this;return Object(n.a)(regeneratorRuntime.mark((function n(){var b;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(Object.prototype.hasOwnProperty.call(t.network.list,e)){n.next=2;break}throw new Error("Failed initializing network ".concat(e,". Allowed values are ").concat(Object.keys(t.network.list),"."));case 2:if(!a||void 0===window.ethereum){n.next=17;break}return console.log("injected bsc"),t.web3Provider=window.ethereum,t.web3=new Web3(t.web3Provider),t.metamask.installed=t.web3Provider.isMetaMask,n.next=9,t.promisify(t.web3.eth.getChainId);case 9:if(b=n.sent,t.metamask.netId=b,b===t.network.list[e].id){n.next=15;break}return t.network.current=t.network.list[t.network.map[b]],n.next=15,t.initWeb3(e,!1);case 15:n.next=21;break;case 17:console.log("provided bsc"),t.network.current=t.network.list[e],t.web3Provider=new Web3.providers.HttpProvider(t.network.list[e].web3Provider),t.web3=new Web3(t.web3Provider);case 21:case"end":return n.stop()}}),n)})))()},initService:function(e){this.contracts.service=new this.web3.eth.Contract(y.abi,this.serviceReceiver[e])},initToken:function(e){this.contracts.token=this.tokenList[e],this.contracts.token.stringifiedAbi=JSON.stringify(this.contracts.token.abi)}}}},314:function(e,a,t){var n=t(315);e.exports={description:"Create your own BEP20 Smart Contract without coding. BEP20 Generator is the easiest and fastest way to create your own BEP20 token on the Binance Smart Chain network. No coding skills are required.",base:"/bep20-generator/",head:[["link",{rel:"shortcut icon",href:"/favicon.ico"}],["meta",{name:"viewport",content:"width=device-width, initial-scale=1, user-scalable=no"}],["meta",{property:"og:type",content:"website"}],["meta",{property:"og:image",content:"https://cryptobooster.xyz/bep20-generator/assets/images/bep20-token-generator.png"}],["meta",{property:"twitter:card",content:"summary_large_image"}],["meta",{property:"twitter:image",content:"https://cryptobooster.xyz/bep20-generator/assets/images/bep20-token-generator.png"}],["script",{src:"/assets/js/web3.min.js"}],["script",{src:"https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?forceLang=en&theme=momh&thirdparty=1&always=1&noGeoIp=1&scrolling=1&hideDetailsBtn=1",defer:!0}]],plugins:[["@vuepress/google-analytics",{ga:n.gaId}],["vuepress-plugin-facebook-pixel",{pixelId:n.fbPixelId}]],defaultNetwork:n.defaultNetwork,serviceReceiver:n.serviceReceiver}},315:function(e){e.exports=JSON.parse('{"defaultNetwork":"mainnet","gaId":"UA-197024174-1","fbPixelId":"179747053982203","serviceReceiver":{"mainnet":"0xDcE011c5aA4b836A7EBe98430e5d63880d02B9c5","testnet":"0xDcE011c5aA4b836A7EBe98430e5d63880d02B9c5"}}')},316:function(e){e.exports=JSON.parse('{"contractName":"HelloBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generator","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405260405162001110380380620011108339810160408190526200002691620003c2565b60405180604001604052806006815260200165076322e302e360d41b815250816040518060400160405280600a815260200169048656c6c6f42455032360b41b815250858560006200007d620001a160201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000dc9060049060208501906200028d565b508051620000f29060059060208401906200028d565b50506006805460ff19166012179055506040516315b36b9760e11b81526001600160a01b03831690632b66d72e903490620001329085906004016200044b565b6000604051808303818588803b1580156200014c57600080fd5b505af115801562000161573d6000803e3d6000fd5b505085516200017f95506007945060208701935091506200028d9050565b506200019890503369152d02c7e14af6800000620001a5565b5050506200052b565b3390565b6001600160a01b038216620002005760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b806003600082825462000214919062000480565b90915550506001600160a01b038216600090815260016020526040812080548392906200024390849062000480565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8280546200029b90620004d8565b90600052602060002090601f016020900481019282620002bf57600085556200030a565b82601f10620002da57805160ff19168380011785556200030a565b828001600101855582156200030a579182015b828111156200030a578251825591602001919060010190620002ed565b50620003189291506200031c565b5090565b5b808211156200031857600081556001016200031d565b600082601f83011262000344578081fd5b81516001600160401b038082111562000361576200036162000515565b604051601f8301601f19908116603f011681019082821181831017156200038c576200038c62000515565b81604052838152866020858801011115620003a5578485fd5b620003b8846020830160208901620004a5565b9695505050505050565b600080600060608486031215620003d7578283fd5b83516001600160401b0380821115620003ee578485fd5b620003fc8783880162000333565b9450602086015191508082111562000412578384fd5b50620004218682870162000333565b604086015190935090506001600160a01b038116811462000440578182fd5b809150509250925092565b60006020825282518060208401526200046c816040850160208701620004a5565b601f01601f19169190910160400192915050565b60008219821115620004a057634e487b7160e01b81526011600452602481fd5b500190565b60005b83811015620004c2578181015183820152602001620004a8565b83811115620004d2576000848401525b50505050565b600181811c90821680620004ed57607f821691505b602082108114156200050f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610bd5806200053b6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a257806395d89b411161007157806395d89b4114610201578063a457c2d714610209578063a9059cbb1461021c578063dd62ed3e1461022f578063f2fde38b146102685761010b565b8063715018a6146101b95780637afa1eed146101c3578063893d20e8146101cb5780638da5cb5b146101f05761010b565b8063313ce567116100de578063313ce56714610176578063395093511461018b57806354fd4d501461019e57806370a08231146101a65761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015157806323b872dd14610163575b600080fd5b61011861027b565b6040516101259190610a9d565b60405180910390f35b61014161013c366004610a74565b61030d565b6040519015158152602001610125565b6003545b604051908152602001610125565b610141610171366004610a39565b610323565b60065460405160ff9091168152602001610125565b610141610199366004610a74565b6103d9565b610118610410565b6101556101b43660046109e6565b61041f565b6101c161043e565b005b6101186104e2565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610125565b6000546001600160a01b03166101d8565b610118610502565b610141610217366004610a74565b610511565b61014161022a366004610a74565b6105ac565b61015561023d366004610a07565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101c16102763660046109e6565b6105b9565b60606004805461028a90610b1f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b690610b1f565b80156103035780601f106102d857610100808354040283529160200191610303565b820191906000526020600020905b8154815290600101906020018083116102e657829003601f168201915b5050505050905090565b600061031a3384846106d3565b50600192915050565b60006103308484846107f7565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156103ba5760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103ce85336103c98685610b08565b6106d3565b506001949350505050565b3360008181526002602090815260408083206001600160a01b0387168452909152812054909161031a9185906103c9908690610af0565b60606007805461028a90610b1f565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60606040518060600160405280602f8152602001610b71602f9139905090565b60606005805461028a90610b1f565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156105935760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103b1565b6105a233856103c98685610b08565b5060019392505050565b600061031a3384846107f7565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b1565b6001600160a01b0381166106785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b1565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166107355760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103b1565b6001600160a01b0382166107965760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103b1565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661085b5760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103b1565b6001600160a01b0382166108bd5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103b1565b6001600160a01b038316600090815260016020526040902054818110156109355760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103b1565b61093f8282610b08565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610975908490610af0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109c191815260200190565b60405180910390a350505050565b80356001600160a01b038116811461043957600080fd5b6000602082840312156109f7578081fd5b610a00826109cf565b9392505050565b60008060408385031215610a19578081fd5b610a22836109cf565b9150610a30602084016109cf565b90509250929050565b600080600060608486031215610a4d578081fd5b610a56846109cf565b9250610a64602085016109cf565b9150604084013590509250925092565b60008060408385031215610a86578182fd5b610a8f836109cf565b946020939093013593505050565b6000602080835283518082850152825b81811015610ac957858101830151858201604001528201610aad565b81811115610ada5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610b0357610b03610b5a565b500190565b600082821015610b1a57610b1a610b5a565b500390565b600181811c90821680610b3357607f821691505b60208210811415610b5457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe68747470733a2f2f766974746f6d696e61636f72692e6769746875622e696f2f62657032302d67656e657261746f72a2646970667358221220a7b9711c7e031e5e5abe4d638b43b24ad88134f921d948afac78c8463b89a53664736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"author":"BEP20 Generator (https://vittominacori.github.io/bep20-generator)","details":"Implementation of the HelloBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"generator()":{"details":"Returns the token generator tool."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"version()":{"details":"Returns the token generator version."}},"title":"HelloBEP20","version":1}}')},317:function(e){e.exports=JSON.parse('{"contractName":"SimpleBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generator","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}],"bytecode":"0x60806040526040516200116d3803806200116d833981016040819052620000269162000417565b60405180604001604052806006815260200165076322e302e360d41b815250816040518060400160405280600b81526020016a053696d706c6542455032360ac1b815250868660006200007e620001f960201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000dd906004906020850190620002e2565b508051620000f3906005906020840190620002e2565b50506006805460ff19166012179055506040516315b36b9760e11b81526001600160a01b03831690632b66d72e90349062000133908590600401620004a8565b6000604051808303818588803b1580156200014d57600080fd5b505af115801562000162573d6000803e3d6000fd5b50508551620001809550600794506020870193509150620002e29050565b505060008211620001e35760405162461bcd60e51b815260206004820152602260248201527f53696d706c6542455032303a20737570706c792063616e6e6f74206265207a65604482015261726f60f01b60648201526084015b60405180910390fd5b620001ef3383620001fd565b5050505062000588565b3390565b6001600160a01b038216620002555760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620001da565b8060036000828254620002699190620004dd565b90915550506001600160a01b0382166000908152600160205260408120805483929062000298908490620004dd565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620002f09062000535565b90600052602060002090601f0160209004810192826200031457600085556200035f565b82601f106200032f57805160ff19168380011785556200035f565b828001600101855582156200035f579182015b828111156200035f57825182559160200191906001019062000342565b506200036d92915062000371565b5090565b5b808211156200036d576000815560010162000372565b600082601f83011262000399578081fd5b81516001600160401b0380821115620003b657620003b662000572565b604051601f8301601f19908116603f01168101908282118183101715620003e157620003e162000572565b81604052838152866020858801011115620003fa578485fd5b6200040d84602083016020890162000502565b9695505050505050565b600080600080608085870312156200042d578384fd5b84516001600160401b038082111562000444578586fd5b620004528883890162000388565b9550602087015191508082111562000468578485fd5b50620004778782880162000388565b60408701516060880151919550935090506001600160a01b03811681146200049d578182fd5b939692955090935050565b6000602082528251806020840152620004c981604085016020870162000502565b601f01601f19169190910160400192915050565b60008219821115620004fd57634e487b7160e01b81526011600452602481fd5b500190565b60005b838110156200051f57818101518382015260200162000505565b838111156200052f576000848401525b50505050565b600181811c908216806200054a57607f821691505b602082108114156200056c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610bd580620005986000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a257806395d89b411161007157806395d89b4114610201578063a457c2d714610209578063a9059cbb1461021c578063dd62ed3e1461022f578063f2fde38b146102685761010b565b8063715018a6146101b95780637afa1eed146101c3578063893d20e8146101cb5780638da5cb5b146101f05761010b565b8063313ce567116100de578063313ce56714610176578063395093511461018b57806354fd4d501461019e57806370a08231146101a65761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015157806323b872dd14610163575b600080fd5b61011861027b565b6040516101259190610a9d565b60405180910390f35b61014161013c366004610a74565b61030d565b6040519015158152602001610125565b6003545b604051908152602001610125565b610141610171366004610a39565b610323565b60065460405160ff9091168152602001610125565b610141610199366004610a74565b6103d9565b610118610410565b6101556101b43660046109e6565b61041f565b6101c161043e565b005b6101186104e2565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610125565b6000546001600160a01b03166101d8565b610118610502565b610141610217366004610a74565b610511565b61014161022a366004610a74565b6105ac565b61015561023d366004610a07565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101c16102763660046109e6565b6105b9565b60606004805461028a90610b1f565b80601f01602080910402602001604051908101604052809291908181526020018280546102b690610b1f565b80156103035780601f106102d857610100808354040283529160200191610303565b820191906000526020600020905b8154815290600101906020018083116102e657829003601f168201915b5050505050905090565b600061031a3384846106d3565b50600192915050565b60006103308484846107f7565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156103ba5760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103ce85336103c98685610b08565b6106d3565b506001949350505050565b3360008181526002602090815260408083206001600160a01b0387168452909152812054909161031a9185906103c9908690610af0565b60606007805461028a90610b1f565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60606040518060600160405280602f8152602001610b71602f9139905090565b60606005805461028a90610b1f565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156105935760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103b1565b6105a233856103c98685610b08565b5060019392505050565b600061031a3384846107f7565b6000546001600160a01b031633146106135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b1565b6001600160a01b0381166106785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b1565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166107355760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103b1565b6001600160a01b0382166107965760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103b1565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661085b5760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103b1565b6001600160a01b0382166108bd5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103b1565b6001600160a01b038316600090815260016020526040902054818110156109355760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103b1565b61093f8282610b08565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610975908490610af0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109c191815260200190565b60405180910390a350505050565b80356001600160a01b038116811461043957600080fd5b6000602082840312156109f7578081fd5b610a00826109cf565b9392505050565b60008060408385031215610a19578081fd5b610a22836109cf565b9150610a30602084016109cf565b90509250929050565b600080600060608486031215610a4d578081fd5b610a56846109cf565b9250610a64602085016109cf565b9150604084013590509250925092565b60008060408385031215610a86578182fd5b610a8f836109cf565b946020939093013593505050565b6000602080835283518082850152825b81811015610ac957858101830151858201604001528201610aad565b81811115610ada5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610b0357610b03610b5a565b500190565b600082821015610b1a57610b1a610b5a565b500390565b600181811c90821680610b3357607f821691505b60208210811415610b5457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe68747470733a2f2f766974746f6d696e61636f72692e6769746875622e696f2f62657032302d67656e657261746f72a26469706673582212205f3cdd227ffbc93d6ca90ed9f345ba95f7ddbce2a7a720b291947df5ad77cde364736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"author":"BEP20 Generator (https://vittominacori.github.io/bep20-generator)","details":"Implementation of the SimpleBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"generator()":{"details":"Returns the token generator tool."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"version()":{"details":"Returns the token generator version."}},"title":"SimpleBEP20","version":1}}')},318:function(e){e.exports=JSON.parse('{"contractName":"StandardBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x6080604052604051620010bd380380620010bd8339810160408190526200002691620003d1565b604080518082018252600d81526c05374616e64617264424550323609c1b6020820152600080546001600160a01b03191633908117825592518493899289928291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000a39060049060208501906200029c565b508051620000b99060059060208401906200029c565b50506006805460ff19166012179055506040516315b36b9760e11b81526001600160a01b03831690632b66d72e903490620000f99085906004016200047c565b6000604051808303818588803b1580156200011357600080fd5b505af115801562000128573d6000803e3d6000fd5b5050505050505060008211620001915760405162461bcd60e51b8152602060048201526024808201527f5374616e6461726442455032303a20737570706c792063616e6e6f74206265206044820152637a65726f60e01b60648201526084015b60405180910390fd5b6006805460ff191660ff8516179055620001ac3383620001b7565b50505050506200055c565b6001600160a01b0382166200020f5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000188565b8060036000828254620002239190620004b1565b90915550506001600160a01b0382166000908152600160205260408120805483929062000252908490620004b1565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620002aa9062000509565b90600052602060002090601f016020900481019282620002ce576000855562000319565b82601f10620002e957805160ff191683800117855562000319565b8280016001018555821562000319579182015b8281111562000319578251825591602001919060010190620002fc565b50620003279291506200032b565b5090565b5b808211156200032757600081556001016200032c565b600082601f83011262000353578081fd5b81516001600160401b038082111562000370576200037062000546565b604051601f8301601f19908116603f011681019082821181831017156200039b576200039b62000546565b81604052838152866020858801011115620003b4578485fd5b620003c7846020830160208901620004d6565b9695505050505050565b600080600080600060a08688031215620003e9578081fd5b85516001600160401b038082111562000400578283fd5b6200040e89838a0162000342565b9650602088015191508082111562000424578283fd5b50620004338882890162000342565b945050604086015160ff811681146200044a578182fd5b6060870151608088015191945092506001600160a01b03811681146200046e578182fd5b809150509295509295909350565b60006020825282518060208401526200049d816040850160208701620004d6565b601f01601f19169190910160400192915050565b60008219821115620004d157634e487b7160e01b81526011600452602481fd5b500190565b60005b83811015620004f3578181015183820152602001620004d9565b8381111562000503576000848401525b50505050565b600181811c908216806200051e57607f821691505b602082108114156200054057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610b51806200056c6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d7146101e3578063a9059cbb146101f6578063dd62ed3e14610209578063f2fde38b14610242576100f5565b8063715018a61461019b578063893d20e8146101a55780638da5cb5b146101ca57806395d89b41146101db576100f5565b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461017557806370a0823114610188576100f5565b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610255565b60405161010f9190610a48565b60405180910390f35b61012b610126366004610a1f565b6102e7565b604051901515815260200161010f565b6003545b60405190815260200161010f565b61012b61015b3660046109e4565b6102fd565b60065460405160ff909116815260200161010f565b61012b610183366004610a1f565b6103b3565b61013f610196366004610991565b6103ea565b6101a3610409565b005b6000546001600160a01b03165b6040516001600160a01b03909116815260200161010f565b6000546001600160a01b03166101b2565b6101026104ad565b61012b6101f1366004610a1f565b6104bc565b61012b610204366004610a1f565b610557565b61013f6102173660046109b2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101a3610250366004610991565b610564565b60606004805461026490610aca565b80601f016020809104026020016040519081016040528092919081815260200182805461029090610aca565b80156102dd5780601f106102b2576101008083540402835291602001916102dd565b820191906000526020600020905b8154815290600101906020018083116102c057829003601f168201915b5050505050905090565b60006102f433848461067e565b50600192915050565b600061030a8484846107a2565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156103945760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103a885336103a38685610ab3565b61067e565b506001949350505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916102f49185906103a3908690610a9b565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60606005805461026490610aca565b3360009081526002602090815260408083206001600160a01b03861684529091528120548281101561053e5760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161038b565b61054d33856103a38685610ab3565b5060019392505050565b60006102f43384846107a2565b6000546001600160a01b031633146105be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038b565b6001600160a01b0381166106235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161038b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166106e05760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161038b565b6001600160a01b0382166107415760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161038b565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166108065760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161038b565b6001600160a01b0382166108685760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161038b565b6001600160a01b038316600090815260016020526040902054818110156108e05760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161038b565b6108ea8282610ab3565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610920908490610a9b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161096c91815260200190565b60405180910390a350505050565b80356001600160a01b038116811461040457600080fd5b6000602082840312156109a2578081fd5b6109ab8261097a565b9392505050565b600080604083850312156109c4578081fd5b6109cd8361097a565b91506109db6020840161097a565b90509250929050565b6000806000606084860312156109f8578081fd5b610a018461097a565b9250610a0f6020850161097a565b9150604084013590509250925092565b60008060408385031215610a31578182fd5b610a3a8361097a565b946020939093013593505050565b6000602080835283518082850152825b81811015610a7457858101830151858201604001528201610a58565b81811115610a855783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610aae57610aae610b05565b500190565b600082821015610ac557610ac5610b05565b500390565b600181811c90821680610ade57607f821691505b60208210811415610aff57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122024d1154c51236b5faf800e6954ac7c25979b5066bd05e572b32784e472bd763e64736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"details":"Implementation of the StandardBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"StandardBEP20","version":1}}')},319:function(e){e.exports=JSON.parse('{"contractName":"BurnableBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x6080604052604051620012f6380380620012f68339810160408190526200002691620003d1565b604080518082018252600d81526c04275726e61626c65424550323609c1b6020820152600080546001600160a01b03191633908117825592518493899289928291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000a39060049060208501906200029c565b508051620000b99060059060208401906200029c565b50506006805460ff19166012179055506040516315b36b9760e11b81526001600160a01b03831690632b66d72e903490620000f99085906004016200047c565b6000604051808303818588803b1580156200011357600080fd5b505af115801562000128573d6000803e3d6000fd5b5050505050505060008211620001915760405162461bcd60e51b8152602060048201526024808201527f4275726e61626c6542455032303a20737570706c792063616e6e6f74206265206044820152637a65726f60e01b60648201526084015b60405180910390fd5b6006805460ff191660ff8516179055620001ac3383620001b7565b50505050506200055c565b6001600160a01b0382166200020f5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000188565b8060036000828254620002239190620004b1565b90915550506001600160a01b0382166000908152600160205260408120805483929062000252908490620004b1565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620002aa9062000509565b90600052602060002090601f016020900481019282620002ce576000855562000319565b82601f10620002e957805160ff191683800117855562000319565b8280016001018555821562000319579182015b8281111562000319578251825591602001919060010190620002fc565b50620003279291506200032b565b5090565b5b808211156200032757600081556001016200032c565b600082601f83011262000353578081fd5b81516001600160401b038082111562000370576200037062000546565b604051601f8301601f19908116603f011681019082821181831017156200039b576200039b62000546565b81604052838152866020858801011115620003b4578485fd5b620003c7846020830160208901620004d6565b9695505050505050565b600080600080600060a08688031215620003e9578081fd5b85516001600160401b038082111562000400578283fd5b6200040e89838a0162000342565b9650602088015191508082111562000424578283fd5b50620004338882890162000342565b945050604086015160ff811681146200044a578182fd5b6060870151608088015191945092506001600160a01b03811681146200046e578182fd5b809150509295509295909350565b60006020825282518060208401526200049d816040850160208701620004d6565b601f01601f19169190910160400192915050565b60008219821115620004d157634e487b7160e01b81526011600452602481fd5b500190565b60005b83811015620004f3578181015183820152602001620004d9565b8381111562000503576000848401525b50505050565b600181811c908216806200051e57607f821691505b602082108114156200054057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610d8a806200056c6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a257806395d89b411161007157806395d89b4114610217578063a457c2d71461021f578063a9059cbb14610232578063dd62ed3e14610245578063f2fde38b1461027e5761010b565b8063715018a6146101c657806379cc6790146101ce578063893d20e8146101e15780638da5cb5b146102065761010b565b8063313ce567116100de578063313ce56714610176578063395093511461018b57806342966c681461019e57806370a08231146101b35761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015157806323b872dd14610163575b600080fd5b610118610291565b6040516101259190610c81565b60405180910390f35b61014161013c366004610c40565b610323565b6040519015158152602001610125565b6003545b604051908152602001610125565b610141610171366004610c05565b610339565b60065460405160ff9091168152602001610125565b610141610199366004610c40565b6103ef565b6101b16101ac366004610c69565b610426565b005b6101556101c1366004610bb2565b610433565b6101b1610452565b6101b16101dc366004610c40565b6104f6565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610125565b6000546001600160a01b03166101ee565b61011861057e565b61014161022d366004610c40565b61058d565b610141610240366004610c40565b610628565b610155610253366004610bd3565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101b161028c366004610bb2565b610635565b6060600480546102a090610d03565b80601f01602080910402602001604051908101604052809291908181526020018280546102cc90610d03565b80156103195780601f106102ee57610100808354040283529160200191610319565b820191906000526020600020905b8154815290600101906020018083116102fc57829003601f168201915b5050505050905090565b600061033033848461074f565b50600192915050565b6000610346848484610874565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156103d05760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103e485336103df8685610cec565b61074f565b506001949350505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103309185906103df908690610cd4565b6104303382610a4c565b50565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006105028333610253565b9050818110156105605760405162461bcd60e51b8152602060048201526024808201527f42455032303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016103c7565b61056f83336103df8585610cec565b6105798383610a4c565b505050565b6060600580546102a090610d03565b3360009081526002602090815260408083206001600160a01b03861684529091528120548281101561060f5760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103c7565b61061e33856103df8685610cec565b5060019392505050565b6000610330338484610874565b6000546001600160a01b0316331461068f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b6001600160a01b0381166106f45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c7565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166107b15760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103c7565b6001600160a01b0382166108125760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103c7565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166108d85760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103c7565b6001600160a01b03821661093a5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103c7565b6001600160a01b038316600090815260016020526040902054818110156109b25760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103c7565b6109bc8282610cec565b6001600160a01b0380861660009081526001602052604080822093909355908516815290812080548492906109f2908490610cd4565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a3e91815260200190565b60405180910390a350505050565b6001600160a01b038216610aac5760405162461bcd60e51b815260206004820152602160248201527f42455032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103c7565b6001600160a01b03821660009081526001602052604090205481811015610b205760405162461bcd60e51b815260206004820152602260248201527f42455032303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103c7565b610b2a8282610cec565b6001600160a01b03841660009081526001602052604081209190915560038054849290610b58908490610cec565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610867565b80356001600160a01b038116811461044d57600080fd5b600060208284031215610bc3578081fd5b610bcc82610b9b565b9392505050565b60008060408385031215610be5578081fd5b610bee83610b9b565b9150610bfc60208401610b9b565b90509250929050565b600080600060608486031215610c19578081fd5b610c2284610b9b565b9250610c3060208501610b9b565b9150604084013590509250925092565b60008060408385031215610c52578182fd5b610c5b83610b9b565b946020939093013593505050565b600060208284031215610c7a578081fd5b5035919050565b6000602080835283518082850152825b81811015610cad57858101830151858201604001528201610c91565b81811115610cbe5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610ce757610ce7610d3e565b500190565b600082821015610cfe57610cfe610d3e565b500390565b600181811c90821680610d1757607f821691505b60208210811415610d3857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220f22b27e4174d778265c307ffbf0bcf5f4a077314e0b8f6e1beb85a35f5b7ae4464736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"details":"Implementation of the BurnableBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"burn(uint256)":{"details":"Destroys `amount` tokens from the caller. See {BEP20-_burn}."},"burnFrom(address,uint256)":{"details":"Destroys `amount` tokens from `account`, deducting from the caller\'s allowance. See {BEP20-_burn} and {BEP20-allowance}. Requirements: - the caller must have allowance for ``accounts``\'s tokens of at least `amount`."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"BurnableBEP20","version":1}}')},320:function(e){e.exports=JSON.parse('{"contractName":"MintableBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"cap","type":"uint256"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060408190526008805460ff1916905562001480388190039081908339810160408190526200002f91620004e1565b604080518082018252600d81526c04d696e7461626c65424550323609c1b6020820152600080546001600160a01b0319163390811782559251849387928b928b929182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ae906004906020850190620003ac565b508051620000c4906005906020840190620003ac565b50506006805460ff191660121790555080620001275760405162461bcd60e51b815260206004820152601560248201527f42455032304361707065643a206361702069732030000000000000000000000060448201526064015b60405180910390fd5b6007556040516315b36b9760e11b81526001600160a01b03831690632b66d72e9034906200015a90859060040162000595565b6000604051808303818588803b1580156200017457600080fd5b505af115801562000189573d6000803e3d6000fd5b50505050505050620001a184620001b960201b60201c565b620001ad3383620001cf565b50505050505062000675565b6006805460ff191660ff92909216919091179055565b6000546001600160a01b031633146200022b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200011e565b6200024282826200024660201b620006ce1760201c565b5050565b600754816200025460035490565b620002609190620005ca565b1115620002b05760405162461bcd60e51b815260206004820152601960248201527f42455032304361707065643a206361702065786365656465640000000000000060448201526064016200011e565b620002428282620002c760201b620007391760201c565b6001600160a01b0382166200031f5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016200011e565b8060036000828254620003339190620005ca565b90915550506001600160a01b0382166000908152600160205260408120805483929062000362908490620005ca565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620003ba9062000622565b90600052602060002090601f016020900481019282620003de576000855562000429565b82601f10620003f957805160ff191683800117855562000429565b8280016001018555821562000429579182015b82811115620004295782518255916020019190600101906200040c565b50620004379291506200043b565b5090565b5b808211156200043757600081556001016200043c565b600082601f83011262000463578081fd5b81516001600160401b03808211156200048057620004806200065f565b604051601f8301601f19908116603f01168101908282118183101715620004ab57620004ab6200065f565b81604052838152866020858801011115620004c4578485fd5b620004d7846020830160208901620005ef565b9695505050505050565b60008060008060008060c08789031215620004fa578182fd5b86516001600160401b038082111562000511578384fd5b6200051f8a838b0162000452565b9750602089015191508082111562000535578384fd5b506200054489828a0162000452565b955050604087015160ff811681146200055b578283fd5b6060880151608089015160a08a015192965090945092506001600160a01b038116811462000587578182fd5b809150509295509295509295565b6000602082528251806020840152620005b6816040850160208701620005ef565b601f01601f19169190910160400192915050565b60008219821115620005ea57634e487b7160e01b81526011600452602481fd5b500190565b60005b838110156200060c578181015183820152602001620005f2565b838111156200061c576000848401525b50505050565b600181811c908216806200063757607f821691505b602082108114156200065957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610dfb80620006856000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b411461022d578063a457c2d714610235578063a9059cbb14610248578063dd62ed3e1461025b578063f2fde38b1461029457610121565b806370a08231146101d4578063715018a6146101e75780637d64bcb4146101ef578063893d20e8146101f75780638da5cb5b1461021c57610121565b806323b872dd116100f457806323b872dd1461017c578063313ce5671461018f578063355274ea146101a457806339509351146101ac57806340c10f19146101bf57610121565b806305d2035b1461012657806306fdde0314610142578063095ea7b31461015757806318160ddd1461016a575b600080fd5b60085460ff165b60405190151581526020015b60405180910390f35b61014a6102a7565b6040516101399190610c7b565b61012d610165366004610c52565b610339565b6003545b604051908152602001610139565b61012d61018a366004610c17565b61034f565b60065460405160ff9091168152602001610139565b60075461016e565b61012d6101ba366004610c52565b610405565b6101d26101cd366004610c52565b61043c565b005b61016e6101e2366004610bc4565b61046d565b6101d261048c565b6101d2610500565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610139565b6000546001600160a01b0316610204565b61014a61052d565b61012d610243366004610c52565b61053c565b61012d610256366004610c52565b6105d7565b61016e610269366004610be5565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101d26102a2366004610bc4565b6105e4565b6060600480546102b690610d74565b80601f01602080910402602001604051908101604052809291908181526020018280546102e290610d74565b801561032f5780601f106103045761010080835404028352916020019161032f565b820191906000526020600020905b81548152906001019060200180831161031257829003601f168201915b5050505050905090565b6000610346338484610818565b50600192915050565b600061035c84848461093c565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156103e65760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103fa85336103f58685610d5d565b610818565b506001949350505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103469185906103f5908690610d45565b60085460ff161561045f5760405162461bcd60e51b81526004016103dd90610cce565b6104698282610b14565b5050565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104b65760405162461bcd60e51b81526004016103dd90610d10565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60085460ff16156105235760405162461bcd60e51b81526004016103dd90610cce565b61052b610b48565b565b6060600580546102b690610d74565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156105be5760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103dd565b6105cd33856103f58685610d5d565b5060019392505050565b600061034633848461093c565b6000546001600160a01b0316331461060e5760405162461bcd60e51b81526004016103dd90610d10565b6001600160a01b0381166106735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103dd565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600754816106db60035490565b6106e59190610d45565b11156107335760405162461bcd60e51b815260206004820152601960248201527f42455032304361707065643a206361702065786365656465640000000000000060448201526064016103dd565b61046982825b6001600160a01b03821661078f5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103dd565b80600360008282546107a19190610d45565b90915550506001600160a01b038216600090815260016020526040812080548392906107ce908490610d45565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03831661087a5760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103dd565b6001600160a01b0382166108db5760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103dd565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166109a05760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103dd565b6001600160a01b038216610a025760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103dd565b6001600160a01b03831660009081526001602052604090205481811015610a7a5760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103dd565b610a848282610d5d565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610aba908490610d45565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b0691815260200190565b60405180910390a350505050565b6000546001600160a01b03163314610b3e5760405162461bcd60e51b81526004016103dd90610d10565b61046982826106ce565b6000546001600160a01b03163314610b725760405162461bcd60e51b81526004016103dd90610d10565b61052b6008805460ff191660011790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a1565b80356001600160a01b038116811461048757600080fd5b600060208284031215610bd5578081fd5b610bde82610bad565b9392505050565b60008060408385031215610bf7578081fd5b610c0083610bad565b9150610c0e60208401610bad565b90509250929050565b600080600060608486031215610c2b578081fd5b610c3484610bad565b9250610c4260208501610bad565b9150604084013590509250925092565b60008060408385031215610c64578182fd5b610c6d83610bad565b946020939093013593505050565b6000602080835283518082850152825b81811015610ca757858101830151858201604001528201610c8b565b81811115610cb85783604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f42455032304d696e7461626c653a206d696e74696e672069732066696e697368604082015261195960f21b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610d5857610d58610daf565b500190565b600082821015610d6f57610d6f610daf565b500390565b600181811c90821680610d8857607f821691505b60208210811415610da957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212202d8d0e2b9cad40a624d30a25273f9e4725373f3f1673f251833caf0cbe70471164736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"details":"Implementation of the MintableBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"cap()":{"details":"Returns the cap on the token\'s total supply."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"finishMinting()":{"details":"Function to stop minting new tokens. WARNING: it allows everyone to finish minting. Access controls MUST be defined in derived contracts."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"mint(address,uint256)":{"details":"Function to mint tokens. WARNING: it allows everyone to mint new tokens. Access controls MUST be defined in derived contracts.","params":{"account":"The address that will receive the minted tokens","amount":"The amount of tokens to mint"}},"mintingFinished()":{"returns":{"_0":"if minting is finished or not."}},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"MintableBEP20","version":1}}')},321:function(e){e.exports=JSON.parse('{"contractName":"CommonBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"cap","type":"uint256"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060408190526008805460ff19169055620016b7388190039081908339810160408190526200002f91620004df565b604080518082018252600b81526a0436f6d6d6f6e42455032360ac1b6020820152600080546001600160a01b0319163390811782559251849387928b928b929182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ac906004906020850190620003aa565b508051620000c2906005906020840190620003aa565b50506006805460ff191660121790555080620001255760405162461bcd60e51b815260206004820152601560248201527f42455032304361707065643a206361702069732030000000000000000000000060448201526064015b60405180910390fd5b6007556040516315b36b9760e11b81526001600160a01b03831690632b66d72e9034906200015890859060040162000593565b6000604051808303818588803b1580156200017257600080fd5b505af115801562000187573d6000803e3d6000fd5b505050505050506200019f84620001b760201b60201c565b620001ab3383620001cd565b50505050505062000673565b6006805460ff191660ff92909216919091179055565b6000546001600160a01b03163314620002295760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200011c565b6200024082826200024460201b6200079f1760201c565b5050565b600754816200025260035490565b6200025e9190620005c8565b1115620002ae5760405162461bcd60e51b815260206004820152601960248201527f42455032304361707065643a206361702065786365656465640000000000000060448201526064016200011c565b620002408282620002c560201b6200080a1760201c565b6001600160a01b0382166200031d5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016200011c565b8060036000828254620003319190620005c8565b90915550506001600160a01b0382166000908152600160205260408120805483929062000360908490620005c8565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620003b89062000620565b90600052602060002090601f016020900481019282620003dc576000855562000427565b82601f10620003f757805160ff191683800117855562000427565b8280016001018555821562000427579182015b82811115620004275782518255916020019190600101906200040a565b506200043592915062000439565b5090565b5b808211156200043557600081556001016200043a565b600082601f83011262000461578081fd5b81516001600160401b03808211156200047e576200047e6200065d565b604051601f8301601f19908116603f01168101908282118183101715620004a957620004a96200065d565b81604052838152866020858801011115620004c2578485fd5b620004d5846020830160208901620005ed565b9695505050505050565b60008060008060008060c08789031215620004f8578182fd5b86516001600160401b03808211156200050f578384fd5b6200051d8a838b0162000450565b9750602089015191508082111562000533578384fd5b506200054289828a0162000450565b955050604087015160ff8116811462000559578283fd5b6060880151608089015160a08a015192965090945092506001600160a01b038116811462000585578182fd5b809150509295509295509295565b6000602082528251806020840152620005b4816040850160208701620005ed565b601f01601f19169190910160400192915050565b60008219821115620005e857634e487b7160e01b81526011600452602481fd5b500190565b60005b838110156200060a578181015183820152602001620005f0565b838111156200061a576000848401525b50505050565b600181811c908216806200063557607f821691505b602082108114156200065757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61103480620006836000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b85780638da5cb5b1161007c5780638da5cb5b1461025857806395d89b4114610269578063a457c2d714610271578063a9059cbb14610284578063dd62ed3e14610297578063f2fde38b146102d057610137565b806370a08231146101fd578063715018a61461021057806379cc6790146102185780637d64bcb41461022b578063893d20e81461023357610137565b8063313ce567116100ff578063313ce567146101a5578063355274ea146101ba57806339509351146101c257806340c10f19146101d557806342966c68146101ea57610137565b806305d2035b1461013c57806306fdde0314610158578063095ea7b31461016d57806318160ddd1461018057806323b872dd14610192575b600080fd5b60085460ff165b60405190151581526020015b60405180910390f35b6101606102e3565b60405161014f9190610eb4565b61014361017b366004610e73565b610375565b6003545b60405190815260200161014f565b6101436101a0366004610e38565b61038b565b60065460405160ff909116815260200161014f565b600754610184565b6101436101d0366004610e73565b610441565b6101e86101e3366004610e73565b610478565b005b6101e86101f8366004610e9c565b6104a9565b61018461020b366004610de5565b6104b6565b6101e86104d5565b6101e8610226366004610e73565b610549565b6101e86105d1565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161014f565b6000546001600160a01b0316610240565b6101606105fe565b61014361027f366004610e73565b61060d565b610143610292366004610e73565b6106a8565b6101846102a5366004610e06565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101e86102de366004610de5565b6106b5565b6060600480546102f290610fad565b80601f016020809104026020016040519081016040528092919081815260200182805461031e90610fad565b801561036b5780601f106103405761010080835404028352916020019161036b565b820191906000526020600020905b81548152906001019060200180831161034e57829003601f168201915b5050505050905090565b60006103823384846108e9565b50600192915050565b6000610398848484610a0e565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104225760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61043685336104318685610f96565b6108e9565b506001949350505050565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091610382918590610431908690610f7e565b60085460ff161561049b5760405162461bcd60e51b815260040161041990610f07565b6104a58282610be6565b5050565b6104b33382610c1a565b50565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104ff5760405162461bcd60e51b815260040161041990610f49565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061055583336102a5565b9050818110156105b35760405162461bcd60e51b8152602060048201526024808201527f42455032303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610419565b6105c283336104318585610f96565b6105cc8383610c1a565b505050565b60085460ff16156105f45760405162461bcd60e51b815260040161041990610f07565b6105fc610d69565b565b6060600580546102f290610fad565b3360009081526002602090815260408083206001600160a01b03861684529091528120548281101561068f5760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610419565b61069e33856104318685610f96565b5060019392505050565b6000610382338484610a0e565b6000546001600160a01b031633146106df5760405162461bcd60e51b815260040161041990610f49565b6001600160a01b0381166107445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610419565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600754816107ac60035490565b6107b69190610f7e565b11156108045760405162461bcd60e51b815260206004820152601960248201527f42455032304361707065643a20636170206578636565646564000000000000006044820152606401610419565b6104a582825b6001600160a01b0382166108605760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610419565b80600360008282546108729190610f7e565b90915550506001600160a01b0382166000908152600160205260408120805483929061089f908490610f7e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03831661094b5760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610419565b6001600160a01b0382166109ac5760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610419565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610a725760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610419565b6001600160a01b038216610ad45760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610419565b6001600160a01b03831660009081526001602052604090205481811015610b4c5760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610419565b610b568282610f96565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610b8c908490610f7e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bd891815260200190565b60405180910390a350505050565b6000546001600160a01b03163314610c105760405162461bcd60e51b815260040161041990610f49565b6104a5828261079f565b6001600160a01b038216610c7a5760405162461bcd60e51b815260206004820152602160248201527f42455032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610419565b6001600160a01b03821660009081526001602052604090205481811015610cee5760405162461bcd60e51b815260206004820152602260248201527f42455032303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610419565b610cf88282610f96565b6001600160a01b03841660009081526001602052604081209190915560038054849290610d26908490610f96565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610a01565b6000546001600160a01b03163314610d935760405162461bcd60e51b815260040161041990610f49565b6105fc6008805460ff191660011790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a1565b80356001600160a01b03811681146104d057600080fd5b600060208284031215610df6578081fd5b610dff82610dce565b9392505050565b60008060408385031215610e18578081fd5b610e2183610dce565b9150610e2f60208401610dce565b90509250929050565b600080600060608486031215610e4c578081fd5b610e5584610dce565b9250610e6360208501610dce565b9150604084013590509250925092565b60008060408385031215610e85578182fd5b610e8e83610dce565b946020939093013593505050565b600060208284031215610ead578081fd5b5035919050565b6000602080835283518082850152825b81811015610ee057858101830151858201604001528201610ec4565b81811115610ef15783604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f42455032304d696e7461626c653a206d696e74696e672069732066696e697368604082015261195960f21b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f9157610f91610fe8565b500190565b600082821015610fa857610fa8610fe8565b500390565b600181811c90821680610fc157607f821691505b60208210811415610fe257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122026d3caa90f1df8fbacc9c85b9b8d69789c3cb72f61354ebe2a0c253dd870e6b164736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"details":"Implementation of the CommonBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"burn(uint256)":{"details":"Destroys `amount` tokens from the caller. See {BEP20-_burn}."},"burnFrom(address,uint256)":{"details":"Destroys `amount` tokens from `account`, deducting from the caller\'s allowance. See {BEP20-_burn} and {BEP20-allowance}. Requirements: - the caller must have allowance for ``accounts``\'s tokens of at least `amount`."},"cap()":{"details":"Returns the cap on the token\'s total supply."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"finishMinting()":{"details":"Function to stop minting new tokens. WARNING: it allows everyone to finish minting. Access controls MUST be defined in derived contracts."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"mint(address,uint256)":{"details":"Function to mint tokens. WARNING: it allows everyone to mint new tokens. Access controls MUST be defined in derived contracts.","params":{"account":"The address that will receive the minted tokens","amount":"The amount of tokens to mint"}},"mintingFinished()":{"returns":{"_0":"if minting is finished or not."}},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"CommonBEP20","version":1}}')},322:function(e){e.exports=JSON.parse('{"contractName":"UnlimitedBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060408190526006805461ff0019169055620015743881900390819083398101604081905262000030916200040d565b604080518082018252600e81526d0556e6c696d6974656442455032360941b6020820152600080546001600160a01b03191633908117825592518493899289928291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ae906004906020850190620002d8565b508051620000c4906005906020840190620002d8565b50506006805460ff19166012179055506040516315b36b9760e11b81526001600160a01b03831690632b66d72e90349062000104908590600401620004b8565b6000604051808303818588803b1580156200011e57600080fd5b505af115801562000133573d6000803e3d6000fd5b505050505050506200014b836200016260201b60201c565b62000157338362000178565b505050505062000598565b6006805460ff191660ff92909216919091179055565b6000546001600160a01b03163314620001d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b620001ef8282620001f360201b620007a01760201c565b5050565b6001600160a01b0382166200024b5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620001cf565b80600360008282546200025f9190620004ed565b90915550506001600160a01b038216600090815260016020526040812080548392906200028e908490620004ed565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620002e69062000545565b90600052602060002090601f0160209004810192826200030a576000855562000355565b82601f106200032557805160ff191683800117855562000355565b8280016001018555821562000355579182015b828111156200035557825182559160200191906001019062000338565b506200036392915062000367565b5090565b5b8082111562000363576000815560010162000368565b600082601f8301126200038f578081fd5b81516001600160401b0380821115620003ac57620003ac62000582565b604051601f8301601f19908116603f01168101908282118183101715620003d757620003d762000582565b81604052838152866020858801011115620003f0578485fd5b6200040384602083016020890162000512565b9695505050505050565b600080600080600060a0868803121562000425578081fd5b85516001600160401b03808211156200043c578283fd5b6200044a89838a016200037e565b9650602088015191508082111562000460578283fd5b506200046f888289016200037e565b945050604086015160ff8116811462000486578182fd5b6060870151608088015191945092506001600160a01b0381168114620004aa578182fd5b809150509295509295909350565b6000602082528251806020840152620004d981604085016020870162000512565b601f01601f19169190910160400192915050565b600082198211156200050d57634e487b7160e01b81526011600452602481fd5b500190565b60005b838110156200052f57818101518382015260200162000515565b838111156200053f576000848401525b50505050565b600181811c908216806200055a57607f821691505b602082108114156200057c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610fcc80620005a86000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063715018a6116100ad57806395d89b411161007157806395d89b4114610260578063a457c2d714610268578063a9059cbb1461027b578063dd62ed3e1461028e578063f2fde38b146102c75761012c565b8063715018a61461020757806379cc67901461020f5780637d64bcb414610222578063893d20e81461022a5780638da5cb5b1461024f5761012c565b8063313ce567116100f4578063313ce567146101a457806339509351146101b957806340c10f19146101cc57806342966c68146101e157806370a08231146101f45761012c565b806305d2035b1461013157806306fdde0314610157578063095ea7b31461016c57806318160ddd1461017f57806323b872dd14610191575b600080fd5b610142600654610100900460ff1690565b60405190151581526020015b60405180910390f35b61015f6102da565b60405161014e9190610e4c565b61014261017a366004610e0b565b61036c565b6003545b60405190815260200161014e565b61014261019f366004610dd0565b610382565b60065460405160ff909116815260200161014e565b6101426101c7366004610e0b565b610438565b6101df6101da366004610e0b565b61046f565b005b6101df6101ef366004610e34565b6104a5565b610183610202366004610d7d565b6104b2565b6101df6104d1565b6101df61021d366004610e0b565b610545565b6101df6105cd565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161014e565b6000546001600160a01b0316610237565b61015f6105ff565b610142610276366004610e0b565b61060e565b610142610289366004610e0b565b6106a9565b61018361029c366004610d9e565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101df6102d5366004610d7d565b6106b6565b6060600480546102e990610f45565b80601f016020809104026020016040519081016040528092919081815260200182805461031590610f45565b80156103625780601f1061033757610100808354040283529160200191610362565b820191906000526020600020905b81548152906001019060200180831161034557829003601f168201915b5050505050905090565b600061037933848461087f565b50600192915050565b600061038f8484846109a4565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104195760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61042d85336104288685610f2e565b61087f565b506001949350505050565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091610379918590610428908690610f16565b600654610100900460ff16156104975760405162461bcd60e51b815260040161041090610e9f565b6104a18282610b7c565b5050565b6104af3382610bb0565b50565b6001600160a01b0381166000908152600160205260409020545b919050565b6000546001600160a01b031633146104fb5760405162461bcd60e51b815260040161041090610ee1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610551833361029c565b9050818110156105af5760405162461bcd60e51b8152602060048201526024808201527f42455032303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610410565b6105be83336104288585610f2e565b6105c88383610bb0565b505050565b600654610100900460ff16156105f55760405162461bcd60e51b815260040161041090610e9f565b6105fd610cff565b565b6060600580546102e990610f45565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156106905760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610410565b61069f33856104288685610f2e565b5060019392505050565b60006103793384846109a4565b6000546001600160a01b031633146106e05760405162461bcd60e51b815260040161041090610ee1565b6001600160a01b0381166107455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610410565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166107f65760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610410565b80600360008282546108089190610f16565b90915550506001600160a01b03821660009081526001602052604081208054839290610835908490610f16565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383166108e15760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610410565b6001600160a01b0382166109425760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610410565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610a085760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610410565b6001600160a01b038216610a6a5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610410565b6001600160a01b03831660009081526001602052604090205481811015610ae25760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610410565b610aec8282610f2e565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610b22908490610f16565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b6e91815260200190565b60405180910390a350505050565b6000546001600160a01b03163314610ba65760405162461bcd60e51b815260040161041090610ee1565b6104a182826107a0565b6001600160a01b038216610c105760405162461bcd60e51b815260206004820152602160248201527f42455032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610410565b6001600160a01b03821660009081526001602052604090205481811015610c845760405162461bcd60e51b815260206004820152602260248201527f42455032303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610410565b610c8e8282610f2e565b6001600160a01b03841660009081526001602052604081209190915560038054849290610cbc908490610f2e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610997565b6000546001600160a01b03163314610d295760405162461bcd60e51b815260040161041090610ee1565b6105fd6006805461ff0019166101001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a1565b80356001600160a01b03811681146104cc57600080fd5b600060208284031215610d8e578081fd5b610d9782610d66565b9392505050565b60008060408385031215610db0578081fd5b610db983610d66565b9150610dc760208401610d66565b90509250929050565b600080600060608486031215610de4578081fd5b610ded84610d66565b9250610dfb60208501610d66565b9150604084013590509250925092565b60008060408385031215610e1d578182fd5b610e2683610d66565b946020939093013593505050565b600060208284031215610e45578081fd5b5035919050565b6000602080835283518082850152825b81811015610e7857858101830151858201604001528201610e5c565b81811115610e895783604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f42455032304d696e7461626c653a206d696e74696e672069732066696e697368604082015261195960f21b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610f2957610f29610f80565b500190565b600082821015610f4057610f40610f80565b500390565b600181811c90821680610f5957607f821691505b60208210811415610f7a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212208f1be2dc80c94c5c563046dccf3e0b97c2f80c37a2cb10b842c59616ae629b2064736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"details":"Implementation of the UnlimitedBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"burn(uint256)":{"details":"Destroys `amount` tokens from the caller. See {BEP20-_burn}."},"burnFrom(address,uint256)":{"details":"Destroys `amount` tokens from `account`, deducting from the caller\'s allowance. See {BEP20-_burn} and {BEP20-allowance}. Requirements: - the caller must have allowance for ``accounts``\'s tokens of at least `amount`."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"finishMinting()":{"details":"Function to stop minting new tokens. WARNING: it allows everyone to finish minting. Access controls MUST be defined in derived contracts."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"mint(address,uint256)":{"details":"Function to mint tokens. WARNING: it allows everyone to mint new tokens. Access controls MUST be defined in derived contracts.","params":{"account":"The address that will receive the minted tokens","amount":"The amount of tokens to mint"}},"mintingFinished()":{"returns":{"_0":"if minting is finished or not."}},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"UnlimitedBEP20","version":1}}')},323:function(e){e.exports=JSON.parse('{"contractName":"AmazingBEP20","abi":[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"address payable","name":"feeReceiver","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"approveAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverBEP20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferFromAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFromAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060408190526006805461ff001916905562001ce53881900390819083398101604081905262000030916200040b565b604080518082018252600c81526b0416d617a696e6742455032360a41b6020820152600080546001600160a01b03191633908117825592518493899289928291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ac906004906020850190620002d6565b508051620000c2906005906020840190620002d6565b50506006805460ff19166012179055506040516315b36b9760e11b81526001600160a01b03831690632b66d72e90349062000102908590600401620004b6565b6000604051808303818588803b1580156200011c57600080fd5b505af115801562000131573d6000803e3d6000fd5b5050505050505062000149836200016060201b60201c565b62000155338362000176565b505050505062000596565b6006805460ff191660ff92909216919091179055565b6000546001600160a01b03163314620001d65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b620001ed8282620001f160201b62000b121760201c565b5050565b6001600160a01b038216620002495760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620001cd565b80600360008282546200025d9190620004eb565b90915550506001600160a01b038216600090815260016020526040812080548392906200028c908490620004eb565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620002e49062000543565b90600052602060002090601f01602090048101928262000308576000855562000353565b82601f106200032357805160ff191683800117855562000353565b8280016001018555821562000353579182015b828111156200035357825182559160200191906001019062000336565b506200036192915062000365565b5090565b5b8082111562000361576000815560010162000366565b600082601f8301126200038d578081fd5b81516001600160401b0380821115620003aa57620003aa62000580565b604051601f8301601f19908116603f01168101908282118183101715620003d557620003d562000580565b81604052838152866020858801011115620003ee578485fd5b6200040184602083016020890162000510565b9695505050505050565b600080600080600060a0868803121562000423578081fd5b85516001600160401b03808211156200043a578283fd5b6200044889838a016200037c565b965060208801519150808211156200045e578283fd5b506200046d888289016200037c565b945050604086015160ff8116811462000484578182fd5b6060870151608088015191945092506001600160a01b0381168114620004a8578182fd5b809150509295509295909350565b6000602082528251806020840152620004d781604085016020870162000510565b601f01601f19169190910160400192915050565b600082198211156200050b57634e487b7160e01b81526011600452602481fd5b500190565b60005b838110156200052d57818101518382015260200162000513565b838111156200053d576000848401525b50505050565b600181811c908216806200055857607f821691505b602082108114156200057a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61173f80620005a66000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063715018a6116100f9578063a9059cbb11610097578063d8fbe99411610071578063d8fbe994146103ae578063dd62ed3e146103c1578063efa08806146103fa578063f2fde38b1461040d576101c4565b8063a9059cbb14610375578063c1d34b8914610388578063cae9ca511461039b576101c4565b8063893d20e8116100d3578063893d20e8146103245780638da5cb5b1461034957806395d89b411461035a578063a457c2d714610362576101c4565b8063715018a61461030157806379cc6790146103095780637d64bcb41461031c576101c4565b8063313ce567116101665780634000aea0116101405780634000aea01461029d57806340c10f19146102b057806342966c68146102c557806370a08231146102d8576101c4565b8063313ce567146102625780633177029f14610277578063395093511461028a576101c4565b8063095ea7b3116101a2578063095ea7b3146102175780631296ee621461022a57806318160ddd1461023d57806323b872dd1461024f576101c4565b806301ffc9a7146101c957806305d2035b146101f157806306fdde0314610202575b600080fd5b6101dc6101d736600461147f565b610420565b60405190151581526020015b60405180910390f35b6101dc600654610100900460ff1690565b61020a610459565b6040516101e89190611587565b6101dc6102253660046113e1565b6104eb565b6101dc6102383660046113e1565b610501565b6003545b6040519081526020016101e8565b6101dc61025d366004611340565b610524565b60065460405160ff90911681526020016101e8565b6101dc6102853660046113e1565b6105da565b6101dc6102983660046113e1565b6105f6565b6101dc6102ab36600461140a565b61062d565b6102c36102be3660046113e1565b61066c565b005b6102c36102d33660046114b7565b6106a2565b6102416102e63660046112f4565b6001600160a01b031660009081526001602052604090205490565b6102c36106af565b6102c36103173660046113e1565b610723565b6102c36107ab565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101e8565b6000546001600160a01b0316610331565b61020a6107dd565b6101dc6103703660046113e1565b6107ec565b6101dc6103833660046113e1565b61087d565b6101dc61039636600461137b565b61088a565b6101dc6103a936600461140a565b6108c8565b6101dc6103bc366004611340565b610940565b6102416103cf36600461130e565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6102c36104083660046113e1565b61095d565b6102c361041b3660046112f4565b610a28565b60006001600160e01b0319821663b0202a1160e01b148061045157506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6060600480546104689061168c565b80601f01602080910402602001604051908101604052809291908181526020018280546104949061168c565b80156104e15780601f106104b6576101008083540402835291602001916104e1565b820191906000526020600020905b8154815290600101906020018083116104c457829003601f168201915b5050505050905090565b60006104f8338484610bf1565b50600192915050565b600061051d83836040518060200160405280600081525061062d565b9392505050565b6000610531848484610d16565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156105bb5760405162461bcd60e51b815260206004820152602860248201527f42455032303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6105cf85336105ca8685611675565b610bf1565b506001949350505050565b600061051d8383604051806020016040528060008152506108c8565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916104f89185906105ca90869061165d565b6000610639848461087d565b5061064633858585610eee565b6106625760405162461bcd60e51b81526004016105b2906115dc565b5060019392505050565b600654610100900460ff16156106945760405162461bcd60e51b81526004016105b29061159a565b61069e8282610fac565b5050565b6106ac3382610fe0565b50565b6000546001600160a01b031633146106d95760405162461bcd60e51b81526004016105b290611628565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061072f83336103cf565b90508181101561078d5760405162461bcd60e51b8152602060048201526024808201527f42455032303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016105b2565b61079c83336105ca8585611675565b6107a68383610fe0565b505050565b600654610100900460ff16156107d35760405162461bcd60e51b81526004016105b29061159a565b6107db61112f565b565b6060600580546104689061168c565b3360009081526002602090815260408083206001600160a01b03861684529091528120548281101561086e5760405162461bcd60e51b815260206004820152602560248201527f42455032303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105b2565b61066233856105ca8685611675565b60006104f8338484610d16565b6000610897858585610524565b506108a485858585610eee565b6105cf5760405162461bcd60e51b81526004016105b2906115dc565b949350505050565b60006108d484846104eb565b506108e0848484611161565b6106625760405162461bcd60e51b815260206004820152602b60248201527f42455032304f70657261626c653a205f636865636b416e6443616c6c4170707260448201526a6f7665207265766572747360a81b60648201526084016105b2565b60006108c08484846040518060200160405280600081525061088a565b6000546001600160a01b031633146109875760405162461bcd60e51b81526004016105b290611628565b816001600160a01b031663a9059cbb6109a86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b1580156109f057600080fd5b505af1158015610a04573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a6919061145f565b6000546001600160a01b03163314610a525760405162461bcd60e51b81526004016105b290611628565b6001600160a01b038116610ab75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038216610b685760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105b2565b8060036000828254610b7a919061165d565b90915550506001600160a01b03821660009081526001602052604081208054839290610ba790849061165d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038316610c535760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b038216610cb45760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610d7a5760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b038216610ddc5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b6001600160a01b03831660009081526001602052604090205481811015610e545760405162461bcd60e51b815260206004820152602660248201527f42455032303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105b2565b610e5e8282611675565b6001600160a01b038086166000908152600160205260408082209390935590851681529081208054849290610e9490849061165d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ee091815260200190565b60405180910390a350505050565b60006001600160a01b0384163b610f07575060006108c0565b604051632229f29760e21b81526000906001600160a01b038616906388a7ca5c90610f3c9033908a908990899060040161151a565b602060405180830381600087803b158015610f5657600080fd5b505af1158015610f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8e919061149b565b6001600160e01b031916632229f29760e21b14915050949350505050565b6000546001600160a01b03163314610fd65760405162461bcd60e51b81526004016105b290611628565b61069e8282610b12565b6001600160a01b0382166110405760405162461bcd60e51b815260206004820152602160248201527f42455032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105b2565b6001600160a01b038216600090815260016020526040902054818110156110b45760405162461bcd60e51b815260206004820152602260248201527f42455032303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105b2565b6110be8282611675565b6001600160a01b038416600090815260016020526040812091909155600380548492906110ec908490611675565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610d09565b6000546001600160a01b031633146111595760405162461bcd60e51b81526004016105b290611628565b6107db61121c565b60006001600160a01b0384163b61117a5750600061051d565b6040516307b04a2d60e41b81526000906001600160a01b03861690637b04a2d0906111ad90339088908890600401611557565b602060405180830381600087803b1580156111c757600080fd5b505af11580156111db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ff919061149b565b6001600160e01b0319166307b04a2d60e41b149150509392505050565b6006805461ff0019166101001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a1565b80356001600160a01b038116811461045457600080fd5b600082601f83011261127d578081fd5b813567ffffffffffffffff80821115611298576112986116dd565b604051601f8301601f19908116603f011681019082821181831017156112c0576112c06116dd565b816040528381528660208588010111156112d8578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215611305578081fd5b61051d82611256565b60008060408385031215611320578081fd5b61132983611256565b915061133760208401611256565b90509250929050565b600080600060608486031215611354578081fd5b61135d84611256565b925061136b60208501611256565b9150604084013590509250925092565b60008060008060808587031215611390578081fd5b61139985611256565b93506113a760208601611256565b925060408501359150606085013567ffffffffffffffff8111156113c9578182fd5b6113d58782880161126d565b91505092959194509250565b600080604083850312156113f3578182fd5b6113fc83611256565b946020939093013593505050565b60008060006060848603121561141e578283fd5b61142784611256565b925060208401359150604084013567ffffffffffffffff811115611449578182fd5b6114558682870161126d565b9150509250925092565b600060208284031215611470578081fd5b8151801515811461051d578182fd5b600060208284031215611490578081fd5b813561051d816116f3565b6000602082840312156114ac578081fd5b815161051d816116f3565b6000602082840312156114c8578081fd5b5035919050565b60008151808452815b818110156114f4576020818501810151868301820152016114d8565b818111156115055782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061154d908301846114cf565b9695505050505050565b600060018060a01b03851682528360208301526060604083015261157e60608301846114cf565b95945050505050565b60006020825261051d60208301846114cf565b60208082526022908201527f42455032304d696e7461626c653a206d696e74696e672069732066696e697368604082015261195960f21b606082015260800190565b6020808252602c908201527f42455032304f70657261626c653a205f636865636b416e6443616c6c5472616e60408201526b73666572207265766572747360a01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611670576116706116c7565b500190565b600082821015611687576116876116c7565b500390565b600181811c908216806116a057607f821691505b602082108114156116c157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146106ac57600080fdfea26469706673582212205bca998f27862c2dc13e1188947ae2ce12fbb6f45abbe719fb332cfd2927cc7764736f6c63430008030033","compiler":{"name":"solc","version":"0.8.3+commit.8d00100c.Emscripten.clang"},"devdoc":{"details":"Implementation of the AmazingBEP20","kind":"dev","methods":{"allowance(address,address)":{"details":"See {IBEP20-allowance}."},"approve(address,uint256)":{"details":"See {IBEP20-approve}. Requirements: - `spender` cannot be the zero address."},"approveAndCall(address,uint256)":{"details":"Approve spender to transfer tokens and then execute a callback on recipient.","params":{"amount":"The amount allowed to be transferred","spender":"The address allowed to transfer to"},"returns":{"_0":"A boolean that indicates if the operation was successful."}},"approveAndCall(address,uint256,bytes)":{"details":"Approve spender to transfer tokens and then execute a callback on recipient.","params":{"amount":"The amount allowed to be transferred.","data":"Additional data with no specified format.","spender":"The address allowed to transfer to."},"returns":{"_0":"A boolean that indicates if the operation was successful."}},"balanceOf(address)":{"details":"See {IBEP20-balanceOf}."},"burn(uint256)":{"details":"Destroys `amount` tokens from the caller. See {BEP20-_burn}."},"burnFrom(address,uint256)":{"details":"Destroys `amount` tokens from `account`, deducting from the caller\'s allowance. See {BEP20-_burn} and {BEP20-allowance}. Requirements: - the caller must have allowance for ``accounts``\'s tokens of at least `amount`."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {BEP20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IBEP20-balanceOf} and {IBEP20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"finishMinting()":{"details":"Function to stop minting new tokens. WARNING: it allows everyone to finish minting. Access controls MUST be defined in derived contracts."},"getOwner()":{"details":"See {IBEP20-getOwner}."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IBEP20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"mint(address,uint256)":{"details":"Function to mint tokens. WARNING: it allows everyone to mint new tokens. Access controls MUST be defined in derived contracts.","params":{"account":"The address that will receive the minted tokens","amount":"The amount of tokens to mint"}},"mintingFinished()":{"returns":{"_0":"if minting is finished or not."}},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"recoverBEP20(address,uint256)":{"details":"Remember that only owner can call so be careful when use on contracts generated from other contracts.","params":{"tokenAddress":"The token contract address","tokenAmount":"Number of tokens to be sent"}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IBEP20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IBEP20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferAndCall(address,uint256)":{"details":"Transfer tokens to a specified address and then execute a callback on recipient.","params":{"amount":"The amount to be transferred.","recipient":"The address to transfer to."},"returns":{"_0":"A boolean that indicates if the operation was successful."}},"transferAndCall(address,uint256,bytes)":{"details":"Transfer tokens to a specified address and then execute a callback on recipient.","params":{"amount":"The amount to be transferred","data":"Additional data with no specified format","recipient":"The address to transfer to"},"returns":{"_0":"A boolean that indicates if the operation was successful."}},"transferFrom(address,address,uint256)":{"details":"See {IBEP20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {BEP20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``\'s tokens of at least `amount`."},"transferFromAndCall(address,address,uint256)":{"details":"Transfer tokens from one address to another and then execute a callback on recipient.","params":{"amount":"The amount of tokens to be transferred","recipient":"The address which you want to transfer to","sender":"The address which you want to send tokens from"},"returns":{"_0":"A boolean that indicates if the operation was successful."}},"transferFromAndCall(address,address,uint256,bytes)":{"details":"Transfer tokens from one address to another and then execute a callback on recipient.","params":{"amount":"The amount of tokens to be transferred","data":"Additional data with no specified format","recipient":"The address which you want to transfer to","sender":"The address which you want to send tokens from"},"returns":{"_0":"A boolean that indicates if the operation was successful."}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"AmazingBEP20","version":1}}')},324:function(e){e.exports=JSON.parse('{"contractName":"ServiceReceiver","abi":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"serviceName","type":"string"},{"indexed":true,"internalType":"address","name":"serviceAddress","type":"address"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"serviceName","type":"string"}],"name":"pay","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"serviceName","type":"string"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"serviceName","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}],"compiler":{"name":"solc","version":"0.7.5+commit.eb77ed08.Emscripten.clang"}}')}}]);
164,715
164,715
0.854913
ac924a3f40a7d72ea9b572c2be8c2cb89938dbc1
1,821
js
JavaScript
babel2/modules/IconsCategory.js
AlexeyProt/quick_step
ce4424cb58e029f673dd9093679af429c92a31fc
[ "MIT" ]
null
null
null
babel2/modules/IconsCategory.js
AlexeyProt/quick_step
ce4424cb58e029f673dd9093679af429c92a31fc
[ "MIT" ]
null
null
null
babel2/modules/IconsCategory.js
AlexeyProt/quick_step
ce4424cb58e029f673dd9093679af429c92a31fc
[ "MIT" ]
null
null
null
/* Класс иконок */ let MyAnimation = require('../modules/MyAnimation'); function IconsCategory(elem) { this._elem = elem; this.activAnimElems(); } /* Внутренние методы */ // Активирует анимацию иконок при наведении мыши IconsCategory.prototype._activIcons = function () { var self = this, currentElem = null; // Элемент внутри которого находится курсор function hover(event) { if ( currentElem ) return; // Если установлен currentElem, значит переход внутри элемента var target = event.target; while ( target != this ) { // Пока родительский элемент не станет this._elem if ( target.className == "icon" && target.tagName == "A" ) { // Если курсор находится внутри <a class="icon"></a> var circle = target.querySelector('[data-name="anim"]'); circle.anim = new MyAnimation(circle); circle.anim.setDraw(function (elem) { elem.attributes['fill-opacity'].value = elem.anim.generateValue(0, 1); }); circle.anim.setProgressInter(0, 1); circle.anim.interactAnimate(200); currentElem = target; // Устанавливается текущий элемент // Функция обработчик событие уведения мыши с текущего элемента function leave() { circle.anim.reverseAnimate(); currentElem = null; // Когда курсор ушел с элемента, текущий элемент обнуляется target.removeEventListener( 'mouseleave', leave ); // Удаляется обработчик } target.addEventListener( 'mouseleave', leave ); // Устанавливается обработчик события ухода мыши return; } target = target.parentNode; // Если текущий элемент не <a class="icon"></a>, то проверяется родитель } } this._elem.addEventListener( 'mouseover', hover ); }; /* Внешние методы */ // Активирует анимации иконок IconsCategory.prototype.activAnimElems = function () { this._activIcons(); }; module.exports = IconsCategory;
35.705882
117
0.705656
ac92d17c7078c7a4e6a05810ea313f92e978d04f
9,347
js
JavaScript
app/scripts/comp/app/yubikey.js
mocheer/keeweb
dadf348521371e0968f85193b65eb869e1b54027
[ "Apache-2.0", "MIT" ]
8,969
2016-06-05T00:30:46.000Z
2022-03-31T22:56:10.000Z
app/scripts/comp/app/yubikey.js
mocheer/keeweb
dadf348521371e0968f85193b65eb869e1b54027
[ "Apache-2.0", "MIT" ]
1,800
2016-06-05T04:07:34.000Z
2022-03-31T05:57:57.000Z
app/scripts/comp/app/yubikey.js
mocheer/keeweb
dadf348521371e0968f85193b65eb869e1b54027
[ "Apache-2.0", "MIT" ]
1,259
2016-06-07T12:25:15.000Z
2022-03-30T01:39:54.000Z
import { Events } from 'framework/events'; import { Launcher } from 'comp/launcher'; import { NativeModules } from 'comp/launcher/native-modules'; import { Logger } from 'util/logger'; import { UsbListener } from 'comp/app/usb-listener'; import { AppSettingsModel } from 'models/app-settings-model'; import { Timeouts } from 'const/timeouts'; import { YubiKeyProductIds, YubiKeyChallengeSize } from 'const/hardware'; import { Locale } from 'util/locale'; const logger = new Logger('yubikey'); const YubiKey = { ykmanStatus: undefined, process: null, aborted: false, cmd() { if (this._cmd) { return this._cmd; } const macYkmanPath = '/usr/local/bin/ykman'; if (Launcher.platform() === 'darwin' && Launcher.fileExistsSync(macYkmanPath)) { this._cmd = macYkmanPath; } else { this._cmd = 'ykman'; } return this._cmd; }, checkToolStatus() { if (this.ykmanStatus === 'ok') { return Promise.resolve(this.ykmanStatus); } return new Promise((resolve) => { this.ykmanStatus = 'checking'; this._cmd = undefined; Launcher.spawn({ cmd: this.cmd(), args: ['-v'], noStdOutLogging: true, complete: (err, stdout, code) => { if (err || code !== 0) { this.ykmanStatus = 'error'; } else { this.ykmanStatus = 'ok'; } resolve(this.ykmanStatus); } }); }); }, abort() { logger.info('Aborting'); if (this.process) { logger.info('Killing the process'); try { this.process.kill(); } catch {} } this.aborted = true; this.process = null; }, list(callback) { NativeModules.getYubiKeys({}) .then((yubiKeys) => { yubiKeys = yubiKeys.map(({ serial, vid, pid, version, slots }) => { return { vid, pid, serial, slots, fullName: this.getKeyFullName(pid, version, serial) }; }); callback(null, yubiKeys); }) .catch(callback); }, getKeyFullName(pid, version, serial) { let name = 'YubiKey'; if (YubiKeyProductIds.Gen1.includes(pid)) { name += ' Gen 1'; } else if (YubiKeyProductIds.NEO.includes(pid)) { name += ' NEO'; } else if (YubiKeyProductIds.YK4.includes(pid)) { if (version >= '5.1.0') { name += ' 5'; } } return `${name} ${serial}`; }, listWithYkman(callback) { this._listWithYkman(callback, true); }, _listWithYkman(callback, canRetry) { if (this.process) { return callback('Already in progress'); } this.aborted = false; logger.info('Listing YubiKeys'); if (!UsbListener.attachedYubiKeys) { return callback(null, []); } this.process = Launcher.spawn({ cmd: this.cmd(), args: ['list'], noStdOutLogging: true, complete: (err, stdout) => { this.process = null; if (this.aborted) { return callback('Aborted'); } if (err) { return callback(err); } const yubiKeysIncludingEmpty = stdout .trim() .split(/\n/g) .map((line) => { const fullName = line; const serial = (line.match(/\d{5,}$/g) || [])[0]; return { fullName, serial }; }); const yubiKeys = yubiKeysIncludingEmpty.filter((s) => s.serial); if ( yubiKeysIncludingEmpty.length === 1 && yubiKeys.length === 0 && stdout.startsWith('YubiKey') && stdout.includes('CCID') && !stdout.includes('Serial') ) { logger.info('The YubiKey is probably stuck'); if (!AppSettingsModel.yubiKeyStuckWorkaround) { return callback(Locale.yubiKeyStuckError); } if (canRetry) { return this._repairStuckYubiKey(callback); } } if (!yubiKeys.length) { return callback('No YubiKeys returned by "ykman list"'); } callback(null, yubiKeys); } }); }, _repairStuckYubiKey(callback) { logger.info('Repairing a stuck YubiKey'); let openTimeout; const countYubiKeys = UsbListener.attachedYubiKeys; const onDevicesChangedDuringRepair = () => { if (UsbListener.attachedYubiKeys === countYubiKeys) { logger.info('YubiKey was reconnected'); Events.off('usb-devices-changed', onDevicesChangedDuringRepair); clearTimeout(openTimeout); this.aborted = false; setTimeout(() => { this._listWithYkman(callback, false); }, Timeouts.ExternalDeviceAfterReconnect); } }; Events.on('usb-devices-changed', onDevicesChangedDuringRepair); Launcher.spawn({ cmd: this.cmd(), args: ['config', 'usb', '-e', 'oath', '-f'], noStdOutLogging: true, complete: (err) => { logger.info('Repair complete', err ? 'with error' : 'OK'); if (err) { Events.off('usb-devices-changed', onDevicesChangedDuringRepair); return callback(`YubiKey repair error: ${err}`); } openTimeout = setTimeout(() => { Events.off('usb-devices-changed', onDevicesChangedDuringRepair); }, Timeouts.ExternalDeviceReconnect); } }); }, getOtpCodes(serial, callback) { if (this.process) { return callback('Already in progress'); } this.aborted = false; this.process = Launcher.spawn({ cmd: this.cmd(), args: ['-d', serial, 'oath', 'accounts', 'code'], noStdOutLogging: true, throwOnStdErr: true, complete: (err, stdout) => { this.process = null; if (window.debugYubiKey) { logger.info('received codes', err, stdout); } if (this.aborted) { return callback('Aborted'); } if (err) { return callback(err); } const codes = []; for (const line of stdout.split('\n')) { const match = line.match(/^(.*?):(.*?)\s+(.*)$/); if (!match) { continue; } const [, title, user, code] = match; const needsTouch = !code.match(/^\d+$/); codes.push({ title, user, needsTouch }); } callback(null, codes); } }); }, getOtp(serial, entry, callback) { return Launcher.spawn({ cmd: this.cmd(), args: ['-d', serial, 'oath', 'accounts', 'code', '--single', entry], noStdOutLogging: true, complete: (err, stdout) => { if (err) { return callback(err); } const otp = stdout.trim(); callback(null, otp); } }); }, calculateChalResp(chalResp, challenge, callback) { const { vid, pid, serial, slot } = chalResp; const yubiKey = { vid, pid, serial }; challenge = Buffer.from(challenge); // https://github.com/Yubico/yubikey-personalization-gui/issues/86 // https://github.com/keepassxreboot/keepassxc/blob/develop/src/keys/drivers/YubiKey.cpp#L318 const padLen = YubiKeyChallengeSize - challenge.byteLength; const paddedChallenge = Buffer.alloc(YubiKeyChallengeSize, padLen); challenge.copy(paddedChallenge); NativeModules.yubiKeyChallengeResponse( yubiKey, [...paddedChallenge], slot, (err, result) => { if (result) { result = Buffer.from(result); } if (err) { err.ykError = true; } return callback(err, result); } ); }, cancelChalResp() { NativeModules.yubiKeyCancelChallengeResponse(); } }; export { YubiKey };
31.577703
101
0.456082
ac92f02c1956790b839f266db93edf7105dc2d74
13,080
js
JavaScript
public/openplatform.min@4.js
Will-create/acg-gestion
99d955177aa179654b5e3a88a57ef30c7f0d044b
[ "MIT" ]
1
2022-01-19T02:12:31.000Z
2022-01-19T02:12:31.000Z
public/openplatform.min@4.js
Will-create/acg-gestion
99d955177aa179654b5e3a88a57ef30c7f0d044b
[ "MIT" ]
null
null
null
public/openplatform.min@4.js
Will-create/acg-gestion
99d955177aa179654b5e3a88a57ef30c7f0d044b
[ "MIT" ]
null
null
null
var OP={};OP.version=429;OP.callbacks={};OP.events={};OP.is=parent!==window;OP.pending=[];OP.$appearance=0;OP.interval=setInterval(function(){if(OP.ready){clearInterval(OP.interval);OP.pending.forEach(OP.$process);OP.pending=[]}},500);OP.jcomponent=function(e){var r='';var a='';var i='';function s(){r=NAV.query.openplatform;a=NAV.query.rev;i=NAV.query.language}s();ON('request',function(e){if(!r)s();var n=e.url.indexOf('?');var o=n===-1?e.url:e.url.substring(0,n);o=o.substring(o.indexOf('/',9)+1);var t=o.substring(o.length-10);n=t.indexOf('.');if(n===-1)e.headers.Authorization='base64 '+btoa(r+','+a+','+i)});ON('@flag showloading',function(){OP.loading(true)});ON('@flag hideloading',function(){OP.loading(false,1e3)});OP.onready=function(e){if(e.dateformat){DEF.dateformat=e.dateformat;if(W.user){user.timeformat=e.timeformat;user.dateformat=e.dateformat;user.numberformat=e.numberformat;DEF.languagehtml=user.language}switch(e.numberformat){case 1:DEF.decimalseparator='.';DEF.thousandsseparator=' ';break;case 2:DEF.decimalseparator=',';DEF.thousandsseparator=' ';break;case 3:DEF.decimalseparator=',';DEF.thousandsseparator='.';break;case 4:DEF.decimalseparator='.';DEF.thousandsseparator=',';break}var n=(DEF.timeformat===12?'!':'')+(DEF.dateformat+' - HH:mm')+(DEF.timeformat===12?' a':'');ENV('date',DEF.dateformat);ENV('ts',n)}OP.$appearance=1;OP.send('appearance');EMIT('opready');SET('common.ready',true,500)};OP.init(e)};document.addEventListener('click',function(e){var n=e.target;var o=n;if(o.tagName!=='A'){var t=3;while(--t>=0){o=o.parentNode;if(!o||o.tagName==='BODY'||o.tagName==='HTML')break;if(o.tagName==='A'){n=o;break}}}if(n.tagName==='A'){if(n.href.substring(0,15)==='openplatform://'){var r=n.href.substring(15);var t=r.indexOf('?');var a=t===-1?'':r.substring(t+1);if(t!==-1)r=r.substring(0,t);e.preventDefault();if(a){var i=a.split('&');a={};for(var s=0;s<i.length;s++){var c=i[s].split('=');if(c[0])a[c[0]]=c[1]&&decodeURIComponent(c[1])}}OP.share(r,'link',a);return false}}OP&&OP.$sendfocus()});document.onkeydown=function(e){var n=false;if(e.keyCode===112){n=true;OP.send('quicksearch')}else if(e.keyCode===116){OP.loading(false);OP.offline(false);OP.progress(0);setTimeout(function(){if(location.href.indexOf('openplatform=')===-1)location.href=OP.tokenizator(location.href);else location.reload(true)},200);n=true}else if(e.keyCode===9&&(e.altKey||e.ctrlKey||e.metaKey)){n=true;OP.send('nextwindow')}if(n){e.returnValue=false;e.keyCode=0;return false}};OP.changelog=function(e){OP.send('changelog',{body:e})};OP.help=function(e){OP.send('help',{body:e})};OP.success2=function(e,n,o){OP.console('success',e,n,o)};OP.titlesuccess=function(e){OP.send('titlesuccess',e)};OP.install=function(e){OP.send('install',{type:'install',url:e})};OP.titlewarning=function(e){if(e instanceof Array)e=e[0].error;OP.send('titlewarning',e)};OP.warning2=function(e,n,o){OP.console('warning',e,n,o)};OP.error2=function(e,n,o){OP.console('error',e,n,o)};OP.info2=function(e,n,o){OP.console('info',e,n,o)};OP.busy=function(e){OP.send('busy',e)};OP.appearance=function(){OP.$appearance=1;OP.send('appearance')};OP.console=function(e,n,o,t){if(n instanceof Array){for(var r=0;r<n.length;r++){var a=n[r];if(a&&a.error)a=a.error;a&&OP.send('console',{type:e,msg:(t||'')+a,show:o})}}else OP.send('console',{type:e,msg:(t||'')+n,show:o})};OP.command=function(e,n){OP.send('command',{type:e,body:n})};OP.screenshot=function(e,n){if(!OP.$screenshot){var o;if(!window.Promise){o=document.createElement('script');o.type='text/javascript';o.src=(e||'//cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0')+'/polyfill.min.js';document.body.appendChild(o)}o=document.createElement('script');o.type='text/javascript';o.src=(e||'//html2canvas.hertzen.com/dist')+'/html2canvas.min.js';document.body.appendChild(o);OP.$screenshot=1}var t=function(){OP.loading(true);html2canvas(document.body).then(function(e){if(n)n(e.toDataURL('image/jpeg',.85));else OP.send('screenshot',e.toDataURL('image/jpeg',.85));OP.loading(false)})};var r=setInterval(function(){if(window.html2canvas){clearInterval(r);t()}},1e3)};OP.launched=function(e){OP.send('launched',null,e)};OP.progress=function(e){return OP.send('progress',e)};OP.init=function(t,n){if(typeof t==='boolean'){embeded=t;t=null}OP.ready=false;if(n)OP.is=true;OP.embeded=!n;if(!t){t=function(e){if(e==null){OP.ready=true;return}if(document.body)document.body.innerHTML='401: Unauthorized';else throw new Error('401: Unauthorized');setTimeout(function(){window.close()},2e3)}}if(!OP.is){t(new Error('OpenPlatform isn\'t detected.'));document.body.innerHTML='401: Unauthorized';return}var e=location.search.substring(1).split('&');var o=null;for(var r=0;r<e.length;r++){var a=e[r];if(a.substring(0,13)==='openplatform='){var i=decodeURIComponent(a.substring(13));OP.token=a.substring(13);o=decodeURIComponent(i.substring(i.indexOf('token=')+6));break}}var s={};s.ua=navigator.userAgent;OP.accesstoken=o;document.addEventListener('DOMContentLoaded',function(){if(n){OP.ready=true;var e=window.user||{};t&&setTimeout(t,100,null,e);OP.onready&&OP.onready({});OP.$process({type:'appearance',body:{colorscheme:e.colorscheme,darkmode:e.darkmode}});window.addEventListener('resize',function(){OP.emit('resize')});OP.emit('ready');return}var o=setTimeout(function(){o=null;t('timeout');document.body.innerHTML='401: Unauthorized'},2e3);OP.send('verify',s,function(e,n){if(o){clearTimeout(o);OP.ready=!e;t(null,n,setTimeout(function(){n.href&&(location.href=n.href)},100))}o=null;OP.id=n.id;OP.openplatformurl=n.openplatformurl;OP.onready&&OP.onready(n);OP.emit('ready')})})};OP.$sendfocus=function(){var e=Date.now();if(!OP.$focus||OP.$focus<e)OP.focus();OP.$focus=e+1e3*2};document.addEventListener('touchstart',function(){OP&&OP.$sendfocus()},{passive:true});OP.loading2=function(e,n){OP.$loading2&&clearTimeout(OP.$loading2);if(!n){OP.send('loading2',e);return}OP.$loading2=setTimeout(function(e){OP.send('loading2',e)},n,e)};OP.loading=function(e,n){OP.$loading&&clearTimeout(OP.$loading);var o={show:e,text:''};if(typeof n==='string'){o.text=n;n=0}if(!n){OP.send('loading',o);return}OP.$loading=setTimeout(function(e){OP.send('loading',e)},n,o)};OP.success=function(e,n){return OP.snackbar(e,'success',n)};OP.warning=function(e,n){return OP.snackbar(e,'warning',n)};OP.message=function(e,n,o){var t={};t.body=e;t.type=n;t.button=o;return OP.send('message',t)};OP.confirm2=function(e,n,o){OP.confirm(e,n instanceof Array?n:n.split(',').trim(),function(e){!e&&o()})};OP.approve=function(e,n,o){OP.confirm(e,[n],o)};OP.confirm=function(e,n,o){var t={};t.body=e;t.buttons=n instanceof Array?n:n.split(',').trim();var r=window.M&&window.M.scope?window.M.scope():null;return OP.send('confirm',t,function(e,n){r&&window.M.scope(r);o(n?n.index:-1)})};OP.options=function(n,t){OP.on('options',function(){var e=[];n(e);var o=window.M&&window.M.scope?window.M.scope():null;OP.send('options',e,function(e,n){o&&window.M.scope(o);n&&t(n)})})};OP.config=function(e,o){var n={};if(typeof e==='function'){o=e;n.body=null}else n.body=JSON.stringify(e);var t=window.M&&window.M.scope?window.M.scope():null;return OP.send('config',n,function(e,n){t&&window.M.scope(t);o&&o(n,e)})};OP.clipboard=function(e){OP.send('clipboard',e)};OP.snackbar=function(e,n,o){var t={};t.body=e;t.type=n;t.button=o;return OP.send('snackbar',t,o)};OP.offline=function(e){OP.send('offline',e)};OP.meta=function(o){var e={};e.ua=navigator.userAgent;e.accesstoken=OP.accesstoken;var t=window.M&&window.M.scope?window.M.scope():null;OP.send('meta',e,function(e,n){t&&window.M.scope(t);o(e,n)})};OP.play=function(e){if(!/^[a-z]+$/.test(e)&&!/^(http|https):\/\//.test(e)){if(e.substring(0,1)!=='/')e='/'+e;e=location.protocol+'//'+location.hostname+e}return OP.send('play',e)};OP.stop=function(e){return OP.send('stop',e)};OP.focus=function(){return OP.send('focus')};OP.maximize=function(e){return OP.send('maximize',e)};OP.restart=function(){return OP.send('restart',location.href)};OP.open=function(e,n){return OP.send('open',{id:e,data:n})};OP.minimize=function(){return OP.send('minimize')};OP.badge=function(e){return OP.send('badge',e)};OP.log=function(e){return OP.send('log',e)};OP.close=function(){return OP.send('kill')};OP.notify=function(e,n,o){if(typeof e==='string'){o=n;n=e;e=0}return OP.send('notify',{type:e,body:n,data:o||'',dtcreated:new Date})};OP.share=function(e,n,o,t){setTimeout(function(){OP.send('share',{app:e&&typeof e==='object'?e.id:e,type:n,body:o,dtcreated:new Date,silent:t})},100);return OP};OP.report=function(e,n,o){return OP.send('report',{type:e,body:n,high:o})};OP.mail=function(e,n,o,t){return OP.send('mail',{email:e,subject:n,body:o,dtcreated:new Date,type:t||'html'})};OP.shake=function(e){return OP.send('shake',e)};OP.send=function(e,n,o){if(typeof n==='function'){o=n;n=null}var t={};t.openplatform=true;t.accesstoken=OP.accesstoken;t.type=e;t.body=n||null;t.sender=true;t.origin=location.origin;if(!top){o&&o(new Error('The application is not running in the OpenPlatform scope.'));return}if(o){t.callback=(Math.random()*1e6).toString(32).replace(/\./g,'');OP.callbacks[t.callback]=o}parent.postMessage(JSON.stringify(t),'*');return OP};OP.on=function(e,n){if(e==='print'||e==='options')OP.events[e]=null;!OP.events[e]&&(OP.events[e]=[]);OP.events[e].push(n);return OP};OP.on('print',function(){window.print()});OP.$process=function(e){if(e.callback){var n=OP.callbacks[e.callback];if(n){if(e.sender)e.error=new Error('The application is not running in the OpenPlatform scope.');n(e.error,e.body||{});delete OP.callbacks[e.callback]}return}if(e.sender)return;if(e.type==='link'){var o=OP.events[e.type];if(o){for(var t=0;t<o.length;t++)o[t](e.body.path,e.body.data)}return}if(e.type==='command'){var o=OP.events[e.type];if(o){for(var t=0;t<o.length;t++)o[t](e.body.type,e.body.body)}return}if(e.type==='focus'){window.focus();return}if(e.type==='appearance'&&OP.$appearance){var r=document.head||document.getElementsByTagName('head')[0];var a=document.createElement('style');var i;if(OP.$appearance===1){OP.$appearance=2}else{i=document.getElementById('opstyle');i&&i.parentNode.removeChild(i)}var s=e.body||e;var c=document.body.classList;if(OP.darkmode!==false){c.add(s.darkmode?'opdark':'oplight');s.darkmode&&c.add('ui-dark');c.add('opbody');c.remove(s.darkmode?'oplight':'opdark');!s.darkmode&&c.remove('ui-dark');window.OPDARKMODE=s.darkmode}if(s.color)s.colorscheme=s.color;if(!s.colorscheme)s.colorscheme='#4285f4';window.OPCOLOR=s.colorscheme;a.appendChild(document.createTextNode(':root{--opcolor:'+s.colorscheme+';--color:'+s.colorscheme+'}.opbody{background-color:#'+(s.darkmode?'202020':'FFF')+'}body.opbody{color:#'+(s.darkmode?'E0E0E0':'000')+'}.opborder,.opborderhover:hover{border-color:'+s.colorscheme+'!important}.opbg,.opbghover:hover{background-color:'+s.colorscheme+'!important}.opfg,.opfghover:hover{color:'+s.colorscheme+'!important}'));a.id='opstyle';r.appendChild(a)}if(e.type==='reload'){if(location.href.indexOf('openplatform=')===-1)location.href=OP.tokenizator(location.href);else location.reload(true);return}if(e.type==='screenshotmake'){OP.screenshot(e.body);return}if(e.type==='redirect'){location.href=e.body;return}if(e.type==='kill')e.type='close';if(e.type==='share'){e.body.share=function(e,n){OP.share(this.app,e,n)}}var o=OP.events[e.type];if(o){var s={};for(var t=0;t<o.length;t++)o[t](e.body||s)}};OP.emit=function(e,n,o,t,r,a){var i=OP.events[e];if(i&&i.length){for(var s=0;s<i.length;s++)i[s](n,o,t,r,a)}else{if(e==='help'||e==='changelog')OP.send(e,null)}};OP.done=function(o,t,r){if(typeof o==='function'){r=t;t=o;o=null}if(r==null)r=true;var a=window.M&&window.M.scope?window.M.scope():null;return function(e,n){r&&OP.loading(false,500);a&&window.M.scope(a);if(!e&&n)e=[{name:'network',error:n}];if(e instanceof Array){OP.send('done',e)}else{o&&OP.send('done',o);t&&t(e,n)}}};OP.resume=function(o,t){var r=window.M&&window.M.scope?window.M.scope():null;return function(e,n){r&&window.M.scope(r);t&&OP.loading(false,500);if(!e&&n)e=[{name:'network',error:n}];if(e instanceof Array){OP.send('done',e)}else{if(typeof o==='function')o(e);else SETR(o,e)}}};window.addEventListener('message',function(e){try{var n=JSON.parse(e.data);if(!n.openplatform)return;if(n.TYPE)n.type=n.TYPE;if(!OP.ready&&n.type!=='verify')OP.pending.push(n);else OP.$process(n)}catch(e){}},false);OP.link=function(e,n){var o='OPLINKINPUT';var t=window[o];if(!t){t=document.createElement('INPUT');t.style='position:absolute;left:-100px;top:-100px;opacity:0';document.body.appendChild(t);window[o]=t}var n=JSON.stringify({id:OP.id,path:e,data:n});n=n.substring(1,n.length-1);var r=OP.openplatformurl+'?share='+btoa(encodeURIComponent(n)).replace(/=/g,'');setTimeout(function(){t.value=r;t.focus();t.select();document.execCommand('copy')},100);return r};OP.tokenizator=function(e){var n=e.indexOf('?');return n===-1?e+('?openplatform='+OP.token):e.substring(0,n+1)+('openplatform='+OP.token+'&'+e.substring(n+1))};if(window.history){history.pushState(null,null,location.href);window.onpopstate=function(){history.go(1)}}
13,080
13,080
0.706651
ac93260d3e35507d433598b6abcb50ab76058fc3
477
js
JavaScript
core/lib/script-env/compileRunnerScript.js
nplugge/Openrunner
5ee087075057545cb66ec45b870c1c977bb81636
[ "Apache-2.0" ]
19
2017-10-30T15:17:23.000Z
2021-08-23T04:40:27.000Z
core/lib/script-env/compileRunnerScript.js
nplugge/Openrunner
5ee087075057545cb66ec45b870c1c977bb81636
[ "Apache-2.0" ]
107
2017-10-28T20:09:38.000Z
2020-05-29T15:17:15.000Z
core/lib/script-env/compileRunnerScript.js
nplugge/Openrunner
5ee087075057545cb66ec45b870c1c977bb81636
[ "Apache-2.0" ]
6
2017-11-29T10:24:23.000Z
2020-04-09T10:42:00.000Z
'use strict'; // "not being evaluated by a direct call": http://www.ecma-international.org/ecma-262/5.1/#sec-10.4. const evalNoScope = eval; // eslint-disable-line no-eval // todo: use a Cu.sandbox / realm when that gets implemented // https://bugzilla.mozilla.org/show_bug.cgi?id=1353468 const compileRunnerScript = scriptContent => { return evalNoScope(`(async (include, transaction) => { 'use strict'; ${scriptContent}\n})`); }; module.exports = compileRunnerScript;
36.692308
100
0.721174
ac9386a401fac662b143e131c233305cb3f9a9f0
4,591
js
JavaScript
e8e8d3964bc7cdfd68e5.js
likeyun/MikuTools
31a9d059ccace7998cf2ea3a70635f4988f43ef7
[ "BSD-2-Clause" ]
2
2020-04-25T03:41:36.000Z
2022-01-01T13:39:58.000Z
e8e8d3964bc7cdfd68e5.js
likeyun/MikuTools
31a9d059ccace7998cf2ea3a70635f4988f43ef7
[ "BSD-2-Clause" ]
null
null
null
e8e8d3964bc7cdfd68e5.js
likeyun/MikuTools
31a9d059ccace7998cf2ea3a70635f4988f43ef7
[ "BSD-2-Clause" ]
1
2021-03-01T07:58:07.000Z
2021-03-01T07:58:07.000Z
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{282:function(t,n,e){var content=e(616);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(9).default)("72524d09",content,!0,{sourceMap:!1})},615:function(t,n,e){"use strict";var r=e(282);e.n(r).a},616:function(t,n,e){(t.exports=e(8)(!1)).push([t.i,".crypto .nya-checkbox,.crypto .nya-input,.crypto .nya-select{margin-bottom:.9375rem}.crypto .nya-input,.crypto .nya-select{width:100%}",""])},749:function(t,n,e){"use strict";e.r(n);e(66),e(67),e(17);var r=e(591),c={name:"Crypto",head:function(){return this.$store.state.currentTool.head},data:function(){return{encryptionList:{MD5:"MD5",HmacMD5:"HmacMD5",SHA1:"SHA-1",HmacSHA1:"HmacSHA-1",SHA256:"SHA-2",HmacSHA256:"HmacSHA-2",SHA3:"SHA-3",HmacSHA512:"HmacSHA-3",RIPEMD160:"RIPEMD-160",AES:"AES",DES:"DES",TripleDES:"TripleDES",Rabbit:"Rabbit",RC4:"RC4",RC4Drop:"RC4Drop"},ciphersList:{AES:"AES",DES:"DES",TripleDES:"TripleDES",Rabbit:"Rabbit",RC4:"RC4",RC4Drop:"RC4Drop"},HMACList:["HmacMD5","HmacSHA1","HmacSHA256","HmacSHA512"],encryption:"MD5",type:!1,content:"",key:"",result:"",drop:192}},watch:{type:function(t){this.result="",t&&(this.ciphersList[this.encryption]||(this.encryption="AES"))}},methods:{conversion:function(){this.result="";var t=this.type?"decrypt":"encrypt",n=this[this.encryption](t);n?this.result=n:this.$modal.show("dialog",{title:"转换失败",text:"ERROR: 可能是密钥不正确"})},MD5:function(){return r.MD5(this.content).toString()},HmacMD5:function(){return r.HmacMD5(this.content,this.key).toString()},SHA1:function(){return r.SHA1(this.content).toString()},HmacSHA1:function(){return r.HmacSHA1(this.content,this.key).toString()},SHA256:function(){return r.SHA256(this.content).toString()},HmacSHA256:function(){return r.HmacSHA256(this.content,this.key).toString()},SHA3:function(){return r.SHA3(this.content).toString()},HmacSHA512:function(){return r.HmacSHA512(this.content,this.key).toString()},RIPEMD160:function(){return r.RIPEMD160(this.content).toString()},AES:function(t){try{return r.AES[t](this.content,this.key).toString("encrypt"===t?void 0:r.enc.Utf8)}catch(t){return!1}},DES:function(t){try{return r.DES[t](this.content,this.key).toString("encrypt"===t?void 0:r.enc.Utf8)}catch(t){return!1}},TripleDES:function(t){try{return r.TripleDES[t](this.content,this.key).toString("encrypt"===t?void 0:r.enc.Utf8)}catch(t){return!1}},Rabbit:function(t){try{return r.Rabbit[t](this.content,this.key).toString("encrypt"===t?void 0:r.enc.Utf8)}catch(t){return!1}},RC4:function(t){try{return r.RC4[t](this.content,this.key).toString("encrypt"===t?void 0:r.enc.Utf8)}catch(t){return!1}},RC4Drop:function(t){try{return r.RC4Drop[t](this.content,this.key,{drop:this.drop}).toString("encrypt"===t?void 0:r.enc.Utf8)}catch(t){return!1}}}},o=(e(615),e(2)),component=Object(o.a)(c,function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"crypto"},[e("nya-container",{attrs:{title:"在线加密解密"}},[e("nya-input",{attrs:{rows:"5",type:"textarea",autofocus:"",autocomplete:"off",label:"待处理的内容",placeholder:"请输入要处理的内容"},model:{value:t.content,callback:function(n){t.content=n},expression:"content"}}),t._v(" "),t.ciphersList[t.encryption]||t.HMACList.includes(t.encryption)?e("nya-input",{attrs:{autocomplete:"off",label:t.HMACList.includes(t.encryption)?"salt":"密钥",placeholder:"请输入"+(t.HMACList.includes(t.encryption)?"salt":"密钥")},model:{value:t.key,callback:function(n){t.key=n},expression:"key"}}):t._e(),t._v(" "),"RC4Drop"===t.encryption?e("nya-input",{attrs:{type:"number",autocomplete:"off",label:"drop",placeholder:"RC4Drop特有参数,请输入要丢弃的密匙初始数量"},model:{value:t.drop,callback:function(n){t.drop=n},expression:"drop"}}):t._e(),t._v(" "),e("br"),t._v(" "),t.type?e("nya-select",{attrs:{items:t.ciphersList,label:"选择解密方式"},model:{value:t.encryption,callback:function(n){t.encryption=n},expression:"encryption"}}):e("nya-select",{attrs:{items:t.encryptionList,label:"选择加密方式"},model:{value:t.encryption,callback:function(n){t.encryption=n},expression:"encryption"}}),t._v(" "),e("br"),t._v(" "),e("nya-checkbox",{attrs:{label:"解密"},model:{value:t.type,callback:function(n){t.type=n},expression:"type"}}),t._v(" "),e("br"),t._v(" "),e("button",{staticClass:"nya-btn",attrs:{type:"button"},on:{click:t.conversion}},[t._v("\n 开始转换\n ")])],1),t._v(" "),e("nya-container",{directives:[{name:"show",rawName:"v-show",value:t.result,expression:"result"}],attrs:{title:(t.type?"解密":"加密")+"成功"}},[e("pre",[t._v(t._s(t.result))])])],1)},[],!1,null,null,null);n.default=component.exports}}]);
4,591
4,591
0.705293
ac945543eb21bbfc5b415a2135a15d99e79910c0
1,374
js
JavaScript
node_modules/hexo-renderer-marked/node_modules/hexo-util/node_modules/bluebird/js/main/method.js
TingYa/Bacman
a3232fff7f190cf1f4bcb2b4e22ade1124619369
[ "MIT" ]
null
null
null
node_modules/hexo-renderer-marked/node_modules/hexo-util/node_modules/bluebird/js/main/method.js
TingYa/Bacman
a3232fff7f190cf1f4bcb2b4e22ade1124619369
[ "MIT" ]
null
null
null
node_modules/hexo-renderer-marked/node_modules/hexo-util/node_modules/bluebird/js/main/method.js
TingYa/Bacman
a3232fff7f190cf1f4bcb2b4e22ade1124619369
[ "MIT" ]
null
null
null
"use strict"; module.exports = function(Promise, INTERNAL, tryConvertToPromise, apiRejection) { var util = require("./util.js"); var tryCatch = util.tryCatch; Promise.method = function (fn) { if (typeof fn !== "function") { throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); } return function () { var ret = new Promise(INTERNAL); ret._captureStackTrace(); ret._pushContext(); var value = tryCatch(fn).apply(this, arguments); ret._popContext(); ret._resolveFromSyncValue(value); return ret; }; }; Promise.attempt = Promise["try"] = function (fn, args, ctx) { if (typeof fn !== "function") { return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); } var ret = new Promise(INTERNAL); ret._captureStackTrace(); ret._pushContext(); var value = util.isArray(args) ? tryCatch(fn).apply(ctx, args) : tryCatch(fn).call(ctx, args); ret._popContext(); ret._resolveFromSyncValue(value); return ret; }; Promise.prototype._resolveFromSyncValue = function (value) { if (value === util.errorObj) { this._rejectCallback(value.e, false, true); } else { this._resolveCallback(value, true); this._resolveCallback(value); } }; };
29.869565
107
0.627365
ac953c2deda2d50a0c3a156f8614b47ea8ef81bd
917
js
JavaScript
src/instruments/synth.js
my5t3ry/loopchat-client
3fcadc9776f38b1dde20636e0cbf291d2b75e304
[ "MIT" ]
5
2018-02-10T23:36:34.000Z
2020-11-06T09:31:24.000Z
src/instruments/synth.js
my5t3ry/loopchat-client
3fcadc9776f38b1dde20636e0cbf291d2b75e304
[ "MIT" ]
16
2017-05-17T23:23:21.000Z
2017-11-26T00:23:29.000Z
src/instruments/synth.js
my5t3ry/loopchat-client
3fcadc9776f38b1dde20636e0cbf291d2b75e304
[ "MIT" ]
3
2019-01-11T17:47:57.000Z
2020-10-18T05:59:44.000Z
import tone from 'tone' import {forEach} from 'lodash' import {Oscillator} from './prefabs/oscillator' var synth = new tone.PolySynth().toMaster() var oscillator = new Oscillator() export const play = controlSignal => oscillator.process(controlSignal) // export const play = (data) => { // const {note, velocity} = data // //play a middle 'C' for the duration of an 8th note // synth.triggerAttackRelease(note, '8n', tone.Time(), velocity) // } export const playback = tracks => forEach( tracks, trackData => forEach( trackData, datum => { const {note, velocity, start, end} = datum synth.triggerAttackRelease(note, end - start, tone.Time() + start, velocity) } ) ) // const synthFactory = (synthType) => { // const myNewSynth = tone.PolySynth().toMaster() // return (notes) => { // myNewSynth.triggerAttackRelease(note,...) // } // }
22.365854
84
0.633588
ac9563c7363107178c391cbb560e854fc1c0607e
11,106
js
JavaScript
static/framework/disease_monograph/lib/angular-strap/angular-strap.min.js
smart-classic/smart_sample_apps
58aea6636458a1e1168896e8eb5ec886dba0160c
[ "Apache-2.0" ]
6
2015-07-31T14:24:48.000Z
2019-05-13T12:58:46.000Z
static/framework/disease_monograph/lib/angular-strap/angular-strap.min.js
smart-classic/smart_sample_apps
58aea6636458a1e1168896e8eb5ec886dba0160c
[ "Apache-2.0" ]
null
null
null
static/framework/disease_monograph/lib/angular-strap/angular-strap.min.js
smart-classic/smart_sample_apps
58aea6636458a1e1168896e8eb5ec886dba0160c
[ "Apache-2.0" ]
5
2015-04-07T00:37:51.000Z
2019-11-04T21:45:17.000Z
/** * AngularStrap - Twitter Bootstrap directives for AngularJS * @version v0.6.0 - 2013-01-11 * @link http://mgcrea.github.com/angular-strap * @author Olivier Louvignes * @license MIT License, http://www.opensource.org/licenses/MIT */ angular.module("$strap.config", []).value("$strap.config", {}), angular.module("$strap.filters", ["$strap.config"]), angular.module("$strap.directives", ["$strap.config"]), angular.module("$strap", ["$strap.filters", "$strap.directives", "$strap.config"]), angular.module("$strap.directives").directive("bsButton", ["$parse", "$timeout", function (e, t) { "use strict"; return { restrict: "A", require: "?ngModel", link: function (n, r, i, s) { s && (r.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length || r.attr("data-toggle", "button"), !n.$eval(i.ngModel) || r.addClass("active"), n.$watch(i.ngModel, function (e, t) { var n = !!e, r = !!t; n !== r && $.fn.button.Constructor.prototype.toggle.call(o) })), r.button(); var o = r.data("button"); o.toggle = function () { if (!s) return $.fn.button.Constructor.prototype.toggle.call(this); var t = r.parent('[data-toggle="buttons-radio"]'); t.length ? (r.siblings("[ng-model]").each(function (t, r) { e($(r).attr("ng-model")).assign(n, !1) }), n.$digest(), s.$modelValue || (s.$setViewValue(!s.$modelValue), n.$digest())) : n.$apply(function () { s.$setViewValue(!s.$modelValue) }) } } } }]).directive("bsButtonsCheckbox", ["$parse", function (e) { "use strict"; return { restrict: "A", require: "?ngModel", compile: function (t, n, r) { t.attr("data-toggle", "buttons-checkbox").find("a, button").each(function (e, t) { $(t).attr("bs-button", "") }) } } }]).directive("bsButtonsRadio", ["$parse", function (e) { "use strict"; return { restrict: "A", require: "?ngModel", compile: function (t, n, r) { return t.attr("data-toggle", "buttons-radio"), n.ngModel || t.find("a, button").each(function (e, t) { $(t).attr("bs-button", "") }), function (t, n, r, i) { i && (n.find("[value]").button().filter('[value="' + t.$eval(r.ngModel) + '"]').addClass("active"), n.on("click.button.data-api", function (e) { t.$apply(function () { i.$setViewValue($(e.target).attr("value")) }) }), t.$watch(r.ngModel, function (e, i) { if (e !== i) { var s = n.find('[value="' + t.$eval(r.ngModel) + '"]'); $.fn.button.Constructor.prototype.toggle.call(s.data("button")) } })) } } } }]), angular.module("$strap.directives").directive("bsButtonSelect", ["$parse", "$timeout", function (e, t) { "use strict"; return { restrict: "A", require: "?ngModel", link: function (n, r, i, s) { var o = e(i.bsButtonSelect), u = o.assign; s && (r.text(n.$eval(i.ngModel)), n.$watch(i.ngModel, function (e, t) { r.text(e) })); var a, f, l, c; r.on("click", function () { a = o(n), f = s ? n.$eval(i.ngModel) : r.text(), l = a.indexOf(f), c = l > a.length - 2 ? a[0] : a[l + 1], n.$apply(function () { r.text(c), s && s.$setViewValue(c) }) }) } } }]), angular.module("$strap.directives").directive("bsDatepicker", ["$timeout", function (e) { "use strict"; var t = "ontouchstart" in window && !window.navigator.userAgent.match(/PhantomJS/i), n = { "/": "[\\/]", "-": "[-]", ".": "[.]", dd: "(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))", d: "(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))", mm: "(?:[0]?[1-9]|[1][012])", m: "(?:[0]?[1-9]|[1][012])", yyyy: "(?:(?:[1]{1}[0-9]{1}[0-9]{1}[0-9]{1})|(?:[2]{1}[0-9]{3}))(?![[0-9]])", yy: "(?:(?:[0-9]{1}[0-9]{1}))(?![[0-9]])" }; return { restrict: "A", require: "?ngModel", link: function (r, i, s, o) { var u = function (e, t) { t || (t = {}); var r = e, i = n; return angular.forEach(i, function (e, t) { r = r.split(t).join(e) }), new RegExp("^" + r + "$", ["i"]) }, a = t ? "yyyy/mm/dd" : u(s.dateFormat || "mm/dd/yyyy"); o && o.$parsers.unshift(function (e) { return !e || a.test(e) ? (o.$setValidity("date", !0), e) : (o.$setValidity("date", !1), undefined) }); var f = i.next('[data-toggle="datepicker"]'); f.length && f.on("click", function () { t ? i.trigger("focus") : i.datepicker("show") }); if (t && i.prop("type") === "text") i.prop("type", "date"), i.on("change", function (e) { r.$apply(function () { o.$setViewValue(i.val()) }) }); else { o && i.on("changeDate", function (e) { r.$apply(function () { o.$setViewValue(i.val()) }) }); var l = i.closest(".popover"); l && l.on("hide", function (e) { var t = i.data("datepicker"); t && (t.picker.remove(), i.data("datepicker", null)) }), i.attr("data-toggle", "datepicker"), i.datepicker({ autoclose: !0 }) } } } }]), angular.module("$strap.directives").directive("bsDropdown", ["$parse", "$compile", function (e, t) { "use strict"; var n = Array.prototype.slice, r = '<ul class="dropdown-menu" role="menu" aria-labelledby="drop1"><li ng-repeat="item in items" ng-class="{divider: !!item.divider, \'dropdown-submenu\': !!item.submenu && item.submenu.length}"><a ng-hide="!!item.divider" tabindex="-1" ng-href="{{item.href}}" ng-click="{{item.click}}" target="{{item.target}}" ng-bind-html-unsafe="item.text"></a></li></ul>', i = function (e, n, i) { var o, u, a; for (var f = 0, l = e.length; f < l; f++) if (o = e[f].submenu) a = i.$new(), a.items = o, u = t(r)(a), u = u.appendTo(n.children("li:nth-child(" + (f + 1) + ")")), s(o, u, a) }, s = function () { var e = n.call(arguments); setTimeout(function () { i.apply(null, e) }) }; return { restrict: "EA", scope: !0, link: function (i, o, u) { var a = e(u.bsDropdown); i.items = a(i); var f = t(r)(i); s(i.items, f, i), f.insertAfter(o), o.addClass("dropdown-toggle").attr("data-toggle", "dropdown") } } }]), angular.module("$strap.directives").directive("bsModal", ["$parse", "$compile", "$http", "$timeout", "$q", "$templateCache", function (e, t, n, r, i, s) { "use strict"; return { restrict: "A", scope: !0, link: function (u, a, f, l) { var c = e(f.bsModal), h = c.assign, p = c(u); i.when(s.get(p) || n.get(p, { cache: !0 })).then(function (n) { angular.isObject(n) && (n = n.data); var i = c(u).replace(".html", "").replace(/\//g, "-").replace(/\./g, "-") + "-" + u.$id, s = $("<div></div>").attr("id", i).attr("tabindex", -1).addClass("modal hide fade").html(n); $("body").append(s), a.attr("href", "#" + i).attr("data-toggle", "modal"), r(function () { t(s)(u) }), u._modal = function (e) { s.modal(e) }, u.hide = function () { s.modal("hide") }, u.show = function () { s.modal("show") }, u.dismiss = u.hide }) } } }]), angular.module("$strap.directives").directive("bsNavbar", ["$location", function (e) { "use strict"; return { restrict: "A", link: function (n, r, i, s) { n.$watch(function () { return e.path() }, function (e, t) { r.find("li[data-match-route]").each(function (t, n) { var r = angular.element(n), i = r.data("match-route"), s = new RegExp("^" + i + "$", ["i"]); s.test(e) ? r.addClass("active") : r.removeClass("active") }) }) } } }]), angular.module("$strap.directives").directive("bsPopover", ["$parse", "$compile", "$http", "$timeout", "$q", "$templateCache", function (e, t, n, r, i, s) { "use strict"; return $("body").on("keyup", function (e) { e.keyCode === 27 && $(".popover.in").each(function () { var e = $(this); e.popover("hide") }) }), { restrict: "A", scope: !0, link: function (u, a, f, l) { var c = e(f.bsPopover), h = c.assign, p = c(u); i.when(s.get(p) || n.get(p, { cache: !0 })).then(function (n) { angular.isObject(n) && (n = n.data), !f.unique || a.on("show", function (e) { $(".popover.in").each(function () { var e = $(this), t = e.data("popover"); t && !t.$element.is(a) && e.popover("hide") }) }), a.popover({ content: function () { return r(function () { var e = a.data("popover"), n = e.tip(); t(n)(u), setTimeout(function () { e.refresh() }) }), n }, html: !0 }); var i = a.data("popover"); i.hasContent = function () { return this.getTitle() || n }, i.refresh = function () { var e = this.tip(), t, n, r, i, s, o; s = typeof this.options.placement == "function" ? this.options.placement.call(this, e[0], this.$element[0]) : this.options.placement, t = /in/.test(s), n = this.getPosition(t), r = e[0].offsetWidth, i = e[0].offsetHeight; switch (t ? s.split(" ")[1] : s) { case "bottom": o = { top: n.top + n.height + 10, left: n.left + n.width / 2 - r / 2 }; break; case "top": o = { top: n.top - i - 10, left: n.left + n.width / 2 - r / 2 }; break; case "left": o = { top: n.top + n.height / 2 - i / 2, left: n.left - r - 10 }; break; case "right": o = { top: n.top + n.height / 2 - i / 2, left: n.left + n.width + 10 } } e.offset(o) }, i.show = function () { var e = $.Event("show"); this.$element.trigger(e); if (e.isDefaultPrevented()) return; var t = $.fn.popover.Constructor.prototype.show.apply(this, arguments); return this.$tip.data("popover", this), t }, i.hide = function () { var e = $.Event("hide"); this.$element.trigger(e); if (e.isDefaultPrevented()) return; return $.fn.popover.Constructor.prototype.hide.apply(this, arguments) }, u._popover = function (e) { a.popover(e) }, u.hide = function () { a.popover("hide") }, u.show = function () { a.popover("show") }, u.dismiss = u.hide }) } } }]), angular.module("$strap.directives").directive("bsTimepicker", ["$timeout", function (e) { "use strict"; var t = "((?:(?:[0-1][0-9])|(?:[2][0-3])|(?:[0-9])):(?:[0-5][0-9])(?::[0-5][0-9])?(?:\\s?(?:am|AM|pm|PM))?)"; return { restrict: "A", require: "?ngModel", link: function (n, r, i, s) { s && r.on("change", function (e) { n.$apply(function () { s.$setViewValue(r.val()) }) }); var o = new RegExp("^" + t + "$", ["i"]); s.$parsers.unshift(function (e) { return !e || o.test(e) ? (s.$setValidity("time", !0), e) : (s.$setValidity("time", !1), undefined) }); var u = r.closest(".popover"); u && u.on("hide", function (e) { var t = r.data("timepicker"); t && (t.$widget.remove(), r.data("timepicker", null)) }), r.attr("data-toggle", "timepicker"), r.timepicker() } } }]), angular.module("$strap.directives").directive("bsTooltip", ["$parse", "$compile", function (e, t) { "use strict"; return { restrict: "A", link: function (t, n, r, i) { !r.unique || n.on("show", function (e) { $(".tooltip.in").each(function () { var e = $(this), t = e.data("tooltip"); t && !t.$element.is(n) && e.tooltip("hide") }) }), n.tooltip({ title: t.$eval(r.bsTooltip), html: !0 }); var s = n.data("tooltip"); s.show = function () { var e = $.Event("show"); this.$element.trigger(e); if (e.isDefaultPrevented()) return; var t = $.fn.tooltip.Constructor.prototype.show.apply(this, arguments); return this.tip().data("tooltip", this), t }, s.hide = function () { var e = $.Event("hide"); this.$element.trigger(e); if (e.isDefaultPrevented()) return; return $.fn.tooltip.Constructor.prototype.hide.apply(this, arguments) } } } }]), angular.module("$strap.directives").directive("bsTypeahead", ["$parse", function (e) { "use strict"; return { restrict: "A", require: "?ngModel", link: function (n, r, i, s) { var o = e(i.bsTypeahead), u = o.assign, a = o(n); n.$watch(i.bsTypeahead, function (e, t) { e !== t && (a = e) }), r.attr("data-provide", "typeahead"), r.typeahead({ source: function (e) { return a }, items: i.items, updater: function (e) { return s && n.$apply(function () { s.$setViewValue(e) }), e } }) } } }]);
1,388.25
10,856
0.582568
ac95cd4054a9f16dac2d4524e84d475a3d1d5d9e
7,664
js
JavaScript
app/js/CRCalculator.js
dfausz/Dungeoneer
357c4291b03842a8aee5d58306937f125d211f30
[ "BSD-3-Clause-Attribution" ]
1
2021-04-26T21:29:43.000Z
2021-04-26T21:29:43.000Z
app/js/CRCalculator.js
dfausz/Dungeoneer
357c4291b03842a8aee5d58306937f125d211f30
[ "BSD-3-Clause-Attribution" ]
null
null
null
app/js/CRCalculator.js
dfausz/Dungeoneer
357c4291b03842a8aee5d58306937f125d211f30
[ "BSD-3-Clause-Attribution" ]
null
null
null
module.exports = function () { function getAverage(offensive, defensive) { console.log(offensive, defensive) var check = Math.floor((offensive + defensive) / 2); if (check > 0) return check; check = (offensive + defensive) / 2; var values = [0, 0.125, 0.25, 0.5]; var diff; for (var i = 0; i < values.length; i++) { var diffCurrent = Math.abs(check - values[i]); if (check <= [values[i]]) { if (diff && diffCurrent >= diff) { return values[i - 1]; } else { return values[i]; } } diff = diffCurrent; } if (1 - check > 0.5) return 1; return 0.5; } function calculateCR(ac, hp, attackBonus, predictedDmg, saveDc) { if (!predictedDmg) predictedDmg = 1; if (!hp) hp = 1; if (!attackBonus) attackBonus = 0; if (!ac) ac = 12; console.log(predictedDmg, hp, attackBonus, ac) // if (!expectedCR) { // //Approximate // var found = table.find(x => x.minHP <= hp && x.maxHP >= hp); // if (!found) found = table[table.length - 1] // dCr = found // var found = table.find(x => x.minDmg <= predictedDmg && x.maxDmg >= predictedDmg); // if (!found) found = table[table.length - 1] // oCr = found; // console.log(`Offensive challenge rating ${found.cr}`); // expectedCR = getAverage(eval(oCr.cr, dCr.cr)); // } var found = table.find(x => x.minHP <= hp && x.maxHP >= hp); console.log(found) var acDiff = ac - found.ac; var adjust = Math.floor(Math.abs(acDiff)/2); if(acDiff < 0)adjust *= -1; console.log(`Adjust defensive CR by ${adjust}`); var index = table.indexOf(found); index+=adjust; if(index < 0)index = 0; if(index >= table.length)index = table.length-1; var dCr= table[index]; found = table.find(x => x.minDmg <= predictedDmg && x.maxDmg >= predictedDmg); console.log(found); //Check if save DC is higher and should be used var useSave = false; if(saveDc){ var atkEntry = table.find(x=> x.attack_bonus >= attackBonus); var dcEntry = table.find(x=> x.saveDc >= saveDc); if(dcEntry){ if(!atkEntry || eval(dcEntry.cr) > eval(atkEntry.cr)){ useSave = true; } } } var attkDiff = useSave ? saveDc - found.saveDc : attackBonus - found.attack_bonus; adjust = Math.floor(Math.abs(attkDiff)/2); if(attkDiff < 0)adjust *= -1; console.log(`Adjust offensive CR by ${adjust}`); index = table.indexOf(found); index+=adjust; if(index < 0)index = 0; if(index >= table.length)index = table.length-1; var oCr= table[index]; var cr = getAverage(eval(oCr.cr) || 0, eval(dCr.cr) || 0); cr = table.find(x=> eval(x.cr) == cr); return { cr_entry: cr, dcr_entry: dCr, ocr_entry: oCr } } function getTableForCrValue(crValue) { return table.find(x=> x.cr== crValue); } var table = [ { cr: "0", minHP: 1, maxHP: 6, profBonus: 2, ac: 13, ac_string:"≤13", minDmg: 0, maxDmg: 1, saveDc: 13, saveDc_string : "≤13", attack_bonus: 3, attack_bonus_string : "≤3" }, { cr: "1/8", minHP: 7, maxHP: 35, profBonus: 2, ac: 13, minDmg: 2, maxDmg: 3, saveDc: 13, attack_bonus: 3 }, { cr: "1/4", minHP: 36, maxHP: 49, profBonus: 2, ac: 13, minDmg: 4, maxDmg: 5, saveDc: 13, attack_bonus: 3 }, { cr: "1/2", minHP: 50, maxHP: 70, profBonus: 2, ac: 13, minDmg: 6, maxDmg: 8, saveDc: 13, attack_bonus: 3 }, { cr: "1", minHP: 71, maxHP: 85, profBonus: 2, ac: 13, minDmg: 9, maxDmg: 14, saveDc: 13, attack_bonus: 3 }, { cr: "2", minHP: 86, maxHP: 100, profBonus: 2, ac: 13, minDmg: 15, maxDmg: 20, saveDc: 13, attack_bonus: 3 }, { cr: "3", minHP: 101, maxHP: 115, profBonus: 2, ac: 13, minDmg: 21, maxDmg: 26, saveDc: 13, attack_bonus: 4 }, { cr: "4", minHP: 116, maxHP: 130, profBonus: 2, ac: 14, minDmg: 27, maxDmg: 32, saveDc: 14, attack_bonus: 5 }, { cr: "5", minHP: 131, maxHP: 145, profBonus: 3, ac: 15, minDmg: 33, maxDmg: 38, saveDc: 15, attack_bonus: 6 }, { cr: "6", minHP: 146, maxHP: 160, profBonus: 3, ac: 15, minDmg: 39, maxDmg: 44, saveDc: 15, attack_bonus: 6 }, { cr: "7", minHP: 161, maxHP: 175, profBonus: 3, ac: 15, minDmg: 45, maxDmg: 50, saveDc: 15, attack_bonus: 6 }, { cr: "8", minHP: 176, maxHP: 190, profBonus: 3, ac: 16, minDmg: 51, maxDmg: 56, saveDc: 16, attack_bonus: 7 }, { cr: "9", minHP: 191, maxHP: 205, profBonus: 4, ac: 16, minDmg: 57, maxDmg: 62, saveDc: 16, attack_bonus: 7 }, { cr: "10", minHP: 206, maxHP: 220, profBonus: 4, ac: 17, minDmg: 63, maxDmg: 68, saveDc: 16, attack_bonus: 7 }, { cr: "11", minHP: 221, maxHP: 235, profBonus: 4, ac: 17, minDmg: 69, maxDmg: 74, saveDc: 17, attack_bonus: 8 }, { cr: "12", minHP: 236, maxHP: 250, profBonus: 4, ac: 17, minDmg: 75, maxDmg: 80, saveDc: 17, attack_bonus: 8 }, { cr: "13", minHP: 251, maxHP: 265, profBonus: 5, ac: 18, minDmg: 81, maxDmg: 86, saveDc: 18, attack_bonus: 8 }, { cr: "14", minHP: 266, maxHP: 280, profBonus: 5, ac: 18, minDmg: 87, maxDmg: 92, saveDc: 18, attack_bonus: 8 }, { cr: "15", minHP: 281, maxHP: 295, profBonus: 5, ac: 18, minDmg: 93, maxDmg: 98, saveDc: 18, attack_bonus: 8 }, { cr: "16", minHP: 296, maxHP: 310, profBonus: 5, ac: 18, minDmg: 99, maxDmg: 104, saveDc: 18, attack_bonus: 9 }, { cr: "17", minHP: 311, maxHP: 325, profBonus: 6, ac: 19, minDmg: 105, maxDmg: 110, saveDc: 19, attack_bonus: 10 }, { cr: "18", minHP: 326, maxHP: 340, profBonus: 6, ac: 19, minDmg: 111, maxDmg: 116, saveDc: 19, attack_bonus: 10 }, { cr: "19", minHP: 341, maxHP: 355, profBonus: 6, ac: 19, minDmg: 117, maxDmg: 122, saveDc: 19, attack_bonus: 10 }, { cr: "20", minHP: 356, maxHP: 400, profBonus: 6, ac: 19, minDmg: 123, maxDmg: 140, saveDc: 19, attack_bonus: 10 }, { cr: "21", minHP: 401, maxHP: 445, profBonus: 7, ac: 19, minDmg: 141, maxDmg: 158, saveDc: 20, attack_bonus: 11 }, { cr: "22", minHP: 446, maxHP: 490, profBonus: 7, ac: 19, minDmg: 159, maxDmg: 176, saveDc: 20, attack_bonus: 11 }, { cr: "23", minHP: 491, maxHP: 535, profBonus: 7, ac: 19, minDmg: 177, maxDmg: 194, saveDc: 20, attack_bonus: 11 }, { cr: "24", minHP: 536, maxHP: 580, profBonus: 7, ac: 19, minDmg: 195, maxDmg: 212, saveDc: 21, attack_bonus: 12 }, { cr: "25", minHP: 581, maxHP: 625, profBonus: 8, ac: 19, minDmg: 213, maxDmg: 230, saveDc: 21, attack_bonus: 12 }, { cr: "26", minHP: 626, maxHP: 670, profBonus: 8, ac: 19, minDmg: 231, maxDmg: 248, saveDc: 21, attack_bonus: 12 }, { cr: "27", minHP: 671, maxHP: 715, profBonus: 8, ac: 19, minDmg: 249, maxDmg: 266, saveDc: 22, attack_bonus: 13 }, { cr: "28", minHP: 716, maxHP: 760, profBonus: 8, ac: 19, minDmg: 267, maxDmg: 284, saveDc: 22, attack_bonus: 13 }, { cr: "29", minHP: 761, maxHP: 805, profBonus: 9, ac: 19, minDmg: 285, maxDmg: 302, saveDc: 22, attack_bonus: 13 }, { cr: "30", minHP: 806, maxHP: 850, profBonus: 9, ac: 19, minDmg: 303, maxDmg: 320, saveDc: 23, attack_bonus: 14 }, ] return { calculateCR: calculateCR, getTableForCrValue:getTableForCrValue } }();
52.855172
181
0.551148
ac96bb1972bc5e3ce62b62f35a46caefb4b5f571
11,168
js
JavaScript
node_modules/@progress/kendo-angular-dropdowns/dist/npm/list.component.js
divlaksh/questionnaire-new
900b4a74943dbbddffce930ad2d2b8216233facd
[ "Apache-2.0" ]
null
null
null
node_modules/@progress/kendo-angular-dropdowns/dist/npm/list.component.js
divlaksh/questionnaire-new
900b4a74943dbbddffce930ad2d2b8216233facd
[ "Apache-2.0" ]
6
2020-06-17T13:26:07.000Z
2022-03-02T09:09:27.000Z
node_modules/@progress/kendo-angular-dropdowns/dist/npm/list.component.js
divlaksh/questionnaire-new
900b4a74943dbbddffce930ad2d2b8216233facd
[ "Apache-2.0" ]
null
null
null
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var kendo_angular_common_1 = require("@progress/kendo-angular-common"); var list_item_directive_1 = require("./list-item.directive"); var item_template_directive_1 = require("./templates/item-template.directive"); var group_template_directive_1 = require("./templates/group-template.directive"); var fixed_group_template_directive_1 = require("./templates/fixed-group-template.directive"); var util_1 = require("./util"); var selection_service_1 = require("./selection.service"); var rxjs_1 = require("rxjs"); var operators_1 = require("rxjs/operators"); var disabled_items_service_1 = require("./disabled-items.service"); var data_service_1 = require("./data.service"); /** * @hidden */ var ListComponent = /** @class */ (function () { /* tslint:disable:member-ordering */ function ListComponent(wrapper, dataService, selectionService, disabledItemsService, cdr, zone) { this.wrapper = wrapper; this.dataService = dataService; this.selectionService = selectionService; this.disabledItemsService = disabledItemsService; this.cdr = cdr; this.zone = zone; this.data = []; this.selected = []; this.focused = -1; this.multipleSelection = false; this.onClick = new core_1.EventEmitter(); this.selectSubscription = rxjs_1.merge(this.selectionService.onSelect.pipe(operators_1.map(function (args) { return args.indices[0]; })), this.selectionService.onFocus) .subscribe(this.scrollToItem.bind(this)); } Object.defineProperty(ListComponent.prototype, "items", { get: function () { return this._items; }, set: function (items) { this._items = items; // if no regular item is focused but there is data (i.e. filtering had occured) - scroll top var scrollTarget = items.length && this.selectionService.focused === -1 ? 0 : this.selectionService.focused; this.scrollToItem(scrollTarget); }, enumerable: true, configurable: true }); /** * @hidden */ ListComponent.prototype.firstVisibleItem = function (items) { var content = this.content.nativeElement; var scrollTop = content.scrollTop; var item; for (var i = 0; i < items.length; i++) { if (items[i].offsetTop + items[i].clientHeight > scrollTop) { item = items[i]; break; } } return item; }; ListComponent.prototype.findCurrentGroup = function () { var items = this.wrapper.nativeElement.querySelectorAll("li[role]"); var index; if (items) { var firstItem = this.firstVisibleItem(items); if (!firstItem) { this.currentGroup = undefined; this.cdr.detectChanges(); return; } if (firstItem.getAttribute("role") === "group") { index = parseInt(firstItem.getAttribute("group-index"), 10); this.currentGroup = this.dataService.groupAt(index); } else { index = parseInt(firstItem.getAttribute("absolute-index"), 10); this.currentGroup = this.dataService.closestGroup(index); } this.cdr.detectChanges(); } }; ListComponent.prototype.index = function (groupIndex, itemIndex) { return groupIndex > 0 ? (this.dataService.groupIndices[groupIndex - 1] + itemIndex) : itemIndex; }; ListComponent.prototype.ngOnChanges = function (changes) { if (this.dataService.grouped && kendo_angular_common_1.isChanged('data', changes)) { this.currentGroup = this.dataService.itemsCount ? this.dataService.groupAt(0) : undefined; this.createScrollSubscription(); } }; ListComponent.prototype.ngAfterViewInit = function () { if (this.show && this.dataService.grouped) { this.findCurrentGroup(); this.createScrollSubscription(); } }; ListComponent.prototype.ngOnDestroy = function () { this.selectSubscription.unsubscribe(); if (this.scrollSubscription) { this.scrollSubscription.unsubscribe(); } }; ListComponent.prototype.getHeight = function () { return this.height + "px"; }; ListComponent.prototype.getText = function (dataItem) { return util_1.getter(dataItem, this.textField); }; ListComponent.prototype.getValue = function (dataItem) { return util_1.getter(dataItem, this.valueField); }; ListComponent.prototype.isDisabled = function (index) { return this.disabledItemsService.isIndexDisabled(index); }; ListComponent.prototype.scrollToItem = function (index) { var items = this.items.toArray(); if (util_1.isPresent(items[index]) && index !== -1) { this.scroll(items[index].element); } }; ListComponent.prototype.scroll = function (item) { if (!item) { return; } var nativeElement = item.nativeElement; var content = this.content.nativeElement, itemOffsetTop = nativeElement.offsetTop, itemOffsetHeight = nativeElement.offsetHeight, contentScrollTop = content.scrollTop, contentOffsetHeight = content.clientHeight, bottomDistance = itemOffsetTop + itemOffsetHeight; if (contentScrollTop > itemOffsetTop) { contentScrollTop = itemOffsetTop; } else if (bottomDistance > (contentScrollTop + contentOffsetHeight)) { contentScrollTop = (bottomDistance - contentOffsetHeight); } content.scrollTop = contentScrollTop; }; ListComponent.prototype.createScrollSubscription = function () { var _this = this; if (!this.dataService.grouped || util_1.isPresent(this.scrollSubscription)) { return; } this.zone.runOutsideAngular(function () { _this.scrollSubscription = rxjs_1.fromEvent(_this.content.nativeElement, "scroll") .subscribe(_this.findCurrentGroup.bind(_this)); }); }; ListComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'kendo-list', template: "\n <div *ngIf=\"dataService.grouped\" class='k-outer-group-header k-first'>\n <ng-template *ngIf=\"fixedGroupTemplate\"\n [templateContext]=\"{\n templateRef: fixedGroupTemplate.templateRef,\n $implicit: currentGroup?.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!fixedGroupTemplate\"><strong>{{ currentGroup?.value.toString().toUpperCase() }}</strong> </ng-template>\n </div>\n <div #content class=\"k-list-scroller\" [style.maxHeight]=\"getHeight()\" unselectable=\"on\">\n <ul role=\"listbox\" class=\"k-list k-reset\" [attr.id]=\"id\" [attr.aria-hidden]=\"!show\">\n <ng-template *ngIf=\"!dataService.grouped\" ngFor let-dataItem let-index=\"index\" [ngForOf]=\"data\">\n <li\n role=\"option\"\n kendoDropDownsSelectable\n [index]=\"index\"\n [multipleSelection]=\"multipleSelection\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem)\"\n [attr.tabIndex]=\"-1\"\n class=\"k-item\"\n [ngClass]=\"{ 'k-state-disabled': isDisabled(index) }\">\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\">{{ getText(dataItem) }}</ng-template>\n </li>\n </ng-template>\n <ng-template *ngIf=\"dataService.grouped\" ngFor let-dataItem [ngForOf]=\"dataService.data\">\n <li\n *ngIf=\"dataItem.header && dataItem.index\"\n role=\"group\"\n class='k-outer-group-header'\n [attr.group-index]=\"dataItem.index\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem.value)\"\n [attr.tabIndex]=\"-1\">\n <ng-template *ngIf=\"groupTemplate\"\n [templateContext]=\"{\n templateRef: groupTemplate.templateRef,\n $implicit: dataItem.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!groupTemplate\"><strong> {{ dataItem.value.toString().toUpperCase() }}</strong> </ng-template>\n </li>\n <li\n *ngIf=\"!dataItem.header\"\n role=\"option\"\n kendoDropDownsSelectable\n [multipleSelection]=\"multipleSelection\"\n [index]=\"dataItem.offsetIndex\"\n [attr.absolute-index]=\"dataItem.index\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem.value)\"\n [attr.tabIndex]=\"-1\"\n class=\"k-item\"\n [ngClass]=\"{ 'k-state-disabled': isDisabled(dataItem.offsetIndex) }\">\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: dataItem.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\">{{ getText(dataItem.value) }}</ng-template>\n </li>\n </ng-template>\n </ul>\n </div>\n " },] }, ]; /** @nocollapse */ ListComponent.ctorParameters = function () { return [ { type: core_1.ElementRef }, { type: data_service_1.DataService }, { type: selection_service_1.SelectionService }, { type: disabled_items_service_1.DisabledItemsService }, { type: core_1.ChangeDetectorRef }, { type: core_1.NgZone } ]; }; ListComponent.propDecorators = { data: [{ type: core_1.Input }], selected: [{ type: core_1.Input }], focused: [{ type: core_1.Input }], textField: [{ type: core_1.Input }], valueField: [{ type: core_1.Input }], height: [{ type: core_1.Input }], template: [{ type: core_1.Input }], groupTemplate: [{ type: core_1.Input }], fixedGroupTemplate: [{ type: core_1.Input }], show: [{ type: core_1.Input }], id: [{ type: core_1.Input }], optionPrefix: [{ type: core_1.Input }], multipleSelection: [{ type: core_1.Input }], onClick: [{ type: core_1.Output }], items: [{ type: core_1.ViewChildren, args: [list_item_directive_1.ListItemDirective,] }], content: [{ type: core_1.ViewChild, args: ['content',] }] }; return ListComponent; }()); exports.ListComponent = ListComponent;
61.027322
3,455
0.579334
ac97a9487d9201424a63ce166b4a0dd05876b77e
288
js
JavaScript
models/contactLists.js
Nafrin-Ilma/express-portfolio-site
172346cba1d59dc210d2a4c6907ed3d50b8e49f4
[ "MIT" ]
null
null
null
models/contactLists.js
Nafrin-Ilma/express-portfolio-site
172346cba1d59dc210d2a4c6907ed3d50b8e49f4
[ "MIT" ]
null
null
null
models/contactLists.js
Nafrin-Ilma/express-portfolio-site
172346cba1d59dc210d2a4c6907ed3d50b8e49f4
[ "MIT" ]
null
null
null
let mongoose = require('mongoose'); let contactModel = mongoose.Schema({ username: String, password: String, email_address: String, contact_name: String, contact_number: String }, { collection: 'user' }); module.exports = mongoose.model('Contact', contactModel);
20.571429
57
0.690972
ac97c57c3cabe530731d24654c6217e65cba7c26
195
js
JavaScript
nodejs/conceptos/monohilo.js
GerardoCP-PE/JavaScript
a189d573e70640c47836dbb1a1ae05ee0c607df3
[ "MIT" ]
null
null
null
nodejs/conceptos/monohilo.js
GerardoCP-PE/JavaScript
a189d573e70640c47836dbb1a1ae05ee0c607df3
[ "MIT" ]
null
null
null
nodejs/conceptos/monohilo.js
GerardoCP-PE/JavaScript
a189d573e70640c47836dbb1a1ae05ee0c607df3
[ "MIT" ]
null
null
null
console.log('Hola Mundo'); let i = 0; setInterval(function(){ console.log(i); i++; // if (i === 5){ // var a = 3 +z; // } }, 1000); console.log('Segunda instrucción');
13.928571
35
0.497436
ac99422cd5f4abe0f40846779a88f3b31306d5db
419
js
JavaScript
node_modules/chai-enzyme/build/assertions/selected.js
cjrcooper/react-coding-test
8be2f2d4605f6b885ff918fa2242d79aca097404
[ "MIT" ]
1
2020-07-23T20:50:56.000Z
2020-07-23T20:50:56.000Z
node_modules/chai-enzyme/build/assertions/selected.js
cjrcooper/react-coding-test
8be2f2d4605f6b885ff918fa2242d79aca097404
[ "MIT" ]
2
2019-10-28T16:03:30.000Z
2021-01-05T04:49:25.000Z
node_modules/chai-enzyme/build/assertions/selected.js
cjrcooper/react-coding-test
8be2f2d4605f6b885ff918fa2242d79aca097404
[ "MIT" ]
1
2020-07-26T20:40:31.000Z
2020-07-26T20:40:31.000Z
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = selected; function selected(_ref) { var wrapper = _ref.wrapper; var markup = _ref.markup; var sig = _ref.sig; this.assert(wrapper.isSelected(), function () { return 'expected ' + sig + ' to be selected ' + markup(); }, function () { return 'expected ' + sig + ' not to be selected ' + markup(); }); }
24.647059
65
0.634845
ac99956eff9434af5cb0c6c0ec6b3dfbdb349d29
813
js
JavaScript
src/templates/InstantSearch.js widget/vite.config.js
Manny27nyc/create-instantsearch-app
f16af973ff5934fc43495ab64c4e90f73dca895b
[ "MIT" ]
94
2017-07-21T11:08:23.000Z
2022-03-28T12:54:46.000Z
src/templates/InstantSearch.js widget/vite.config.js
Manny27nyc/create-instantsearch-app
f16af973ff5934fc43495ab64c4e90f73dca895b
[ "MIT" ]
123
2017-07-20T12:38:06.000Z
2022-02-21T13:40:59.000Z
src/templates/InstantSearch.js widget/vite.config.js
isabella232/create-instantsearch-app
9efba7c3809ef9915d9d1da77a32cd9784d5269f
[ "MIT" ]
21
2018-10-08T14:56:48.000Z
2022-03-12T18:44:19.000Z
import { fileURLToPath } from 'url'; import typescript from '@rollup/plugin-typescript'; import apiExtractor from 'rollup-plugin-api-extractor'; import vite from 'vite'; // https://vitejs.dev/config/ export default vite.defineConfig({ build: { lib: { entry: fileURLToPath(new URL('src/index.ts', import.meta.url)), name: '{{ pascalCaseName }}', fileName: 'index', formats: ['es', 'cjs', 'umd'], }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library external: ['instantsearch.js'], output: { globals: { 'instantsearch.js': 'instantsearch', }, }, }, }, plugins: [ typescript({ tsconfig: 'tsconfig.declaration.json' }), apiExtractor.apiExtractor(), ], });
25.40625
69
0.605166
ac99af541c9b9066d573dfe1efad3f33fba298dd
721
js
JavaScript
docs/doxygen_documentation/html/struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.js
guilhermesiqueira/2018.1-Reabilitacao-Motora
53ff84920faa38b0b2d38c1989187b31ff862ad0
[ "MIT" ]
8
2018-03-08T02:49:27.000Z
2018-06-05T12:12:59.000Z
docs/doxygen_documentation/html/struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.js
guilhermesiqueira/2018.1-Reabilitacao-Motora
53ff84920faa38b0b2d38c1989187b31ff862ad0
[ "MIT" ]
269
2018-03-08T17:16:19.000Z
2018-07-02T12:39:56.000Z
docs/doxygen_documentation/html/struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.js
guilhermesiqueira/2018.1-Reabilitacao-Motora
53ff84920faa38b0b2d38c1989187b31ff862ad0
[ "MIT" ]
19
2018-03-06T23:31:44.000Z
2018-08-10T17:31:02.000Z
var struct_kinect_wrapper_1_1_nui_transform_smooth_parameters = [ [ "fCorrection", "struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.html#a7f6117cf078ffbed9c06c7324c5d28f1", null ], [ "fJitterRadius", "struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.html#a210636c91ed9be0ccca3d6dfd0d4e13c", null ], [ "fMaxDeviationRadius", "struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.html#a35a26e6f9d0df5110a080a80bdaaef55", null ], [ "fPrediction", "struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.html#a5539423447d47867e98b526394e24f0d", null ], [ "fSmoothing", "struct_kinect_wrapper_1_1_nui_transform_smooth_parameters.html#aa1bb9b319ef28e03be857f28555657d7", null ] ];
90.125
136
0.851595
ac9a49cad188e27c363803c783d5d519da8dd9ad
7,154
js
JavaScript
templates/yii/static/resources/message.js
ever82/ssys
e7a2871806b7fe11f5cd7a055426ec7f57e549ef
[ "Apache-2.0" ]
1
2016-03-01T01:40:26.000Z
2016-03-01T01:40:26.000Z
templates/yii/static/resources/message.js
ever82/ssys
e7a2871806b7fe11f5cd7a055426ec7f57e549ef
[ "Apache-2.0" ]
null
null
null
templates/yii/static/resources/message.js
ever82/ssys
e7a2871806b7fe11f5cd7a055426ec7f57e549ef
[ "Apache-2.0" ]
null
null
null
pandingbao.addResource("message",{ xp_Model:{ attris:['id','content','creator_id','creator_username','receiver_id','receiver_username','created_at','updated_at','parent_id','subject_id','typename'], creationParams:['content','receiver_id','parent_id'], validationRules:{ content:['String',{isNull:false,max:1000}] }, get_contentToShow:function(){ try{ var content=JSON.parse(this.content); }catch(e){ var content=this.content; } switch(this.typename){ case 'Sue': var kase_id=content[0]; var plaintiff=content[1]; return '你被'+plaintiff+'投诉了!快到<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">这里</a>应诉吧'; case 'CreateKase': var kase_id=content[0]; var defendant=content[1]; return '你投诉了'+defendant+'. 下一步需要你做的事情有两件:1)到<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">这里</a>添加证据. 2)去通知对方来应诉. 如果对方拒绝来应诉, 也请将对方拒绝应诉的聊天记录添加到证据中来. ' case 'AddFact': var kase_id=content[0]; var creator=content[1]; return creator+'添加了新证据. 到<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">这里</a>查看'; case 'PlaintiffReady': var kase_id=content[0]; var plaintiff=content[1]; var defendant=content[2]; var currentUser=this.app.currentUser.username; if(currentUser==plaintiff){ return '对于<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">该投诉</a>, 你已经添加完了证据, 接下来只需等待3个工作日内"'+defendant+'"把证据添加完, 就可以开始判定了'; }else{ return '对于<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">该投诉</a>, "'+plaintiff+'"已经添加完了证据, 请你务必在3个工作日内把证据添加完, 就可以开始判定了'; } case 'DefendantReady': var kase_id=content[0]; var plaintiff=content[1]; var defendant=content[2]; var currentUser=this.app.currentUser.username; if(currentUser==defendant){ return '对于<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">该投诉</a>, 你已经添加完了证据, 接下来只需等待5个工作日内"'+plaintiff+'"把证据添加完, 就可以开始判定了'; }else{ return '对于<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">该投诉</a>, "'+defendant+'"已经添加完了证据, 请你务必在3个工作日内把证据添加完, 就可以开始判定了'; } case 'BeginVerdict': var kase_id=content[0]; var plaintiff=content[1]; var defendant=content[2]; var currentUser=this.app.currentUser.username; return '对<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">该投诉</a>的判定开始了, 当系统收集到60个评审员的判定时, 就会公开判定结果.'; case 'Sample': var kase_id=content; return '你被系统随机选中了作为<a href="javascript:;" class="ssysLink" data-state="#kase/'+kase_id+'">第'+kase_id+'号投诉</a>的评判员, 可以去参与评判. '; default: return this.content; } } }, xp_Collection:{}, xp_ResourceView:[{ get_title:function(){ var state=this.settingState; if(state.match(/^withUser(\d+)/)){ return this.receiver.username; } }, mg_elementConfigRules:[ [/^withUser(\d+)/,['${cl~message.Conversation}','$1']] ], mg_loadConfigRules:[ [/^withUser(\d+)/,{receiver:'user/$1'}] ] },{ }], xp_CollectionView:[{ },{ ex_MyMessages:{ noPanelHead:true, collectionParams:{attris:{receiver_id:'${app.currentUser.id}'},order:'id DESC'}, after_1:function(){ console.debug("after_1"); var d = new Date(); var user=this.app.currentUser.userModel; this.checked_at = user.checked_at; user.checked_at = parseInt(d.getTime()/1000); var _this=this; user.save().pipe(function(){ _this.app.layout.showUnread(0); }); } }, ex_Conversation:{ addCssClass:'Conversation', mg_loadConfigs:{ index:{user:'user/${userId}'} }, noPanelHead:true, itemViewClassName:'ConversationMessage', collectionParams:{action:'conversation',params:{user_id:'${userId}'}}, mg_elementConfigs:{ creator:['${cr~message}',{receiver_id:'${userId}'},'footer/.navbar-middle'], footer:['Navbar',{},{cssClass:'navbar-default navbar-fixed-bottom'}] }, beforeInitLoads:function(userId){ this.userId=userId; }, initShow:['footer','creator'], beforeRefresh:function(){ this.domnode.innerHtml=''; }, after_1:function(){ var _this=this; $$.loopDefer(this.find('.userLink'),null,function(node){ //var r=$(node).parent().find('.replacement'); //r[0].scrollIntoView(false); //r.hide(); node[1].scrollIntoView(); $(node).popover('show'); return $$.delay(0.1); }); } } }], xp_ModelView:[{ },{ ex_ListItem:[{ mg_elementConfigs:{ userLink:['UserLink',['${model.creator_id}','',{version:'small',imgClass:'media-object',cssClass:'media-${textAlign} pull-${textAlign}'}]], titleLink:['Link',['#user/${model.creator_id}','${model.creator_username} ']] }, template:'${e~userLink}<div class="media-body"><h4 class="media-heading ">${e~titleLink}<small class="pull-${reTextAlign}">${datetime:model.created_at}</small></h4><div class="row"><span class="col-xs-11 ">${model.contentToShow}</span></div>', initShow:['userLink','titleLink'] },{ ex_MyMessage:{ }, ex_ConversationMessage:{ //template:'${e~userLink}<div class="media-body replacement" style="visibility:hidden;"><h4 class=" "><small class="pull-${reTextAlign}">${datetime:model.created_at}</small></h4><div class="row"><span class="col-md-4 col-xs-10">${model.contentToShow}</span></div>', template:'${e~userLink}', beforeInit:function(page,index){ this.parentCall('beforeInit',[page,index]); this.textAlign=this.model.creator_id==this.app.currentUser.id?'right':'left'; }, initShow:['userLink'], afterInit:function(){ this.find('.userLink').popover({ placement:this.get_reTextAlign(), viewport:{selector:"#"+this.fullname,padding:10}, template:'<div class="popover"><div class="arrow"></div><div class="popover-content"></div></div>', title:'', html:true, content:'<h6><small>'+this.eval_datetime(this.model.created_at)+'</small></h6>'+this.model.get_contentToShow()}); } } }] }], xp_CreateView:[{ afterSaveState:'*', mg_elementConfigs:{ contentInput:['TextInput',{autoheight:true,rows:1},{cssClass:'col-xs-10'}], saveButton:['Button',['finish','发送',{type:'success'}],{cssClass:'col-xs-2'}] }, initShow:['contentInput','saveButton'], initLoads:{ user:'user/${params.0.receiver_id}' } },{ }] });
41.114943
275
0.576461
ac9a746151ea768bc8521b84cc736f4e62168c28
993
js
JavaScript
config/webpack.dev.config.js
DariaMG/fileExplorer
ecdba5ee6fd65f4f46f21eedcbaae272f646028f
[ "MIT" ]
null
null
null
config/webpack.dev.config.js
DariaMG/fileExplorer
ecdba5ee6fd65f4f46f21eedcbaae272f646028f
[ "MIT" ]
null
null
null
config/webpack.dev.config.js
DariaMG/fileExplorer
ecdba5ee6fd65f4f46f21eedcbaae272f646028f
[ "MIT" ]
null
null
null
const ExtractTestPlugin = require('extract-text-webpack-plugin'); const webpack = require('webpack'); const path = require('path'); const styleExtractor = new ExtractTestPlugin('style.css'); module.exports = { context: path.resolve('./src'), entry: [ 'webpack-dev-server/client?http://0.0.0.0:8080', 'webpack/hot/only-dev-server', 'index.js' ], devtool: 'sourcemap', output: { filename: 'bundle.js', publicPath: '/assets', path: 'build' }, resolve: { modulesDirectories: ['node_modules', 'src'] }, module: { preLoaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'eslint' } ], loaders: [ { test: /\.js$/, exclude: /node_modules/, loaders: ['react-hot', 'babel'] }, { test: /(\.css|.less)$/, loader: styleExtractor.extract('css!less') } ] }, plugins: [ styleExtractor ] };
22.066667
66
0.526687
ac9aa14ba8ca80474394b304db7038ed69890fce
1,155
js
JavaScript
resources/js/components/DeliveryMap/Map.js
FelipeAlmeidaPaes/DesafioUnicad
103a489216b5b24535618b44abe11970ca6c414c
[ "MIT" ]
null
null
null
resources/js/components/DeliveryMap/Map.js
FelipeAlmeidaPaes/DesafioUnicad
103a489216b5b24535618b44abe11970ca6c414c
[ "MIT" ]
2
2021-03-09T23:13:26.000Z
2021-05-10T19:11:19.000Z
resources/js/components/DeliveryMap/Map.js
FelipeAlmeidaPaes/DesafioUnicad
103a489216b5b24535618b44abe11970ca6c414c
[ "MIT" ]
null
null
null
import React, { Component } from 'react' class SimpleMap extends Component { render() { const { from } = this.props const { destiny } = this.props const mapStyles = { width: '100%', height: '100%', }; function initMap() { var directionsService = new window.google.maps.DirectionsService(); var directionsRenderer = new window.google.maps.DirectionsRenderer(); var mapOptions = { zoom: 14, center: from } var map = new google.maps.Map(document.getElementById('map'), mapOptions); directionsRenderer.setMap(map); calcRoute() } function calcRoute() { var selectedMode = 'DRIVING'; var request = { origin: from, destination: destiny, travelMode: google.maps.TravelMode[selectedMode] }; directionsService.route(request, function(response, status) { if (status == 'OK') { directionsRenderer.setDirections(response); } }); } return ( <> <div id="map" style={mapStyles}> </div> </> ) } } export default SimpleMap
22.647059
80
0.569697
ac9b1753aec324b36c40506e2bb8c15fbf8cceb2
5,328
js
JavaScript
unpackage/dist/build/mp-weixin/pages/spark/index.js
Mr-Linlin/spark
7cd474eb9b62eed85fbf8d3918355a5289a20f39
[ "MIT" ]
null
null
null
unpackage/dist/build/mp-weixin/pages/spark/index.js
Mr-Linlin/spark
7cd474eb9b62eed85fbf8d3918355a5289a20f39
[ "MIT" ]
null
null
null
unpackage/dist/build/mp-weixin/pages/spark/index.js
Mr-Linlin/spark
7cd474eb9b62eed85fbf8d3918355a5289a20f39
[ "MIT" ]
null
null
null
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/spark/index"],{"309d":function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;t("81e1"),t("34be");var o=function(){t.e("components/wyb-popup/wyb-popup").then(function(){return resolve(t("2ef6"))}.bind(null,t)).catch(t.oe)},a=function(){t.e("components/pzy-tabs/pzy-tabs").then(function(){return resolve(t("135d"))}.bind(null,t)).catch(t.oe)},r=function(){Promise.all([t.e("common/vendor"),t.e("pages/spark/spark-deals")]).then(function(){return resolve(t("f1e6"))}.bind(null,t)).catch(t.oe)},s=function(){Promise.all([t.e("common/vendor"),t.e("pages/spark/spark-entrust")]).then(function(){return resolve(t("871e"))}.bind(null,t)).catch(t.oe)},u=function(){Promise.all([t.e("common/vendor"),t.e("pages/spark/spark-buy")]).then(function(){return resolve(t("a87d"))}.bind(null,t)).catch(t.oe)},c=function(){Promise.all([t.e("common/vendor"),t.e("pages/spark/spark-sell")]).then(function(){return resolve(t("75a2"))}.bind(null,t)).catch(t.oe)},l=function(){Promise.all([t.e("common/vendor"),t.e("pages/spark/spark-data")]).then(function(){return resolve(t("650e"))}.bind(null,t)).catch(t.oe)},i={name:"spark",components:{liuyunoTabs:a,sparkDeals:r,sparkEntrust:s,sparkBuy:u,sparkSell:c,sparkData:l,wybPopup:o},data:function(){return{timer:null,sliderTop:40,tabs:["数据","买入","卖出","委托","成交"],areaList:[],defaultIndex:0,flag:!1,slider_tabs:[{text:"FNT/GS",num:"32.55"},{text:"FNT/GS",num:"32.55"},{text:"FNT/GS",num:"32.55"}],sliderIndex:1}},onLoad:function(){var n=this;e.getSystemInfo({success:function(e){var t=e.statusBarHeight+45;n.sliderTop=t}});this.createSocket()},onUnload:function(){clearInterval(this.timer)},onShow:function(){},onHide:function(){clearInterval(this.timer)},methods:{openPopud:function(){this.$refs.popup.show()},tabClick:function(e){this.defaultIndex=e},changeSliderIndex:function(e){this.sliderIndex=e},createSocket:function(){var n=this;console.log(e.getStorageSync("token"));var t=e.connectSocket({url:"ws://211.149.135.240:7888/websocket/trade",header:{token:e.getStorageSync("token")},success:function(e){console.log("开始发送")},fail:function(e){console.log("链接失败"+e)}});t.onOpen((function(e){n.handlerHeartbeat(),n.getGSList(),n.flag=!0})),e.onSocketError((function(e){console.log(e),console.log("WebSocket连接打开失败,请检查!")})),e.onSocketMessage((function(e){var t=JSON.parse(e.data);console.log("👇👇👇👇👇👇👇👇👇"),console.log(t);var o=t.obj;switch(t.code){case-1:n.$refs.uToast.show({message:t.obj,type:"error"});break;case 0:n.areaList=o;break;case 9:1===n.defaultIndex?n.$refs["buy"].setBuyList(o):3===n.defaultIndex?n.$refs["entrust"].setBuyList(o):2===n.defaultIndex&&n.$refs["sell"].setBuyList(o);break;case 8:1!==n.defaultIndex&&2!==n.defaultIndex||n.$refs[1===n.defaultIndex?"buy":"sell"].getEntrustList(o);break;case 10:if(1===n.defaultIndex||2===n.defaultIndex)return void n.$refs[1===n.defaultIndex?"buy":"sell"].setWallet(o);3===n.defaultIndex&&n.$refs["entrust"].setWallet(o);break;case 11:n.$refs["data"]&&n.$refs["data"].handleKLine(o);break;case 12:console.log("交易记录"),console.log(o);break;case 13:n.$refs["data"]&&n.$refs["data"].setMarket(o),(n.$refs["buy"]||n.$refs["sell"])&&n.$refs[1===n.defaultIndex?"buy":"sell"].setBuyList(o);break}}))},sendSocket:function(n){n.token=e.getStorageSync("token"),e.sendSocketMessage({data:"string"===typeof n?n:JSON.stringify(n),success:function(e){},fail:function(e){}})},getGSList:function(){this.sendSocket({method:"getAreaTrade"})},handlerEntrust:function(e){var n=e.data;this.sendSocket(n)},handlerData:function(e){var n=e.data;this.sendSocket(n)},handlerHeartbeat:function(){var n=this;this.timer=setInterval((function(){e.getStorageSync("token")?n.sendSocket({from:164603442e4,to:164604228e4,resolution:"1",tradeId:9,method:"kData"}):(clearInterval(n.timer),e.closeSocket(),e.redirectTo({url:"/pages/login/index"}))}),5e3)}}};n.default=i}).call(this,t("543d")["default"])},"44c4":function(e,n,t){"use strict";t.r(n);var o=t("309d"),a=t.n(o);for(var r in o)"default"!==r&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=a.a},5462:function(e,n,t){"use strict";var o=t("e1be"),a=t.n(o);a.a},"76be":function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return o}));var o={uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(t.bind(null,"be06"))},wybPopup:function(){return t.e("components/wyb-popup/wyb-popup").then(t.bind(null,"2ef6"))},uToast:function(){return t.e("node-modules/uview-ui/components/u-toast/u-toast").then(t.bind(null,"0562"))}},a=function(){var e=this,n=e.$createElement;e._self._c},r=[]},bebe:function(e,n,t){"use strict";(function(e){t("cb10");o(t("66fd"));var n=o(t("ca78"));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t("543d")["createPage"])},ca78:function(e,n,t){"use strict";t.r(n);var o=t("76be"),a=t("44c4");for(var r in a)"default"!==r&&function(e){t.d(n,e,(function(){return a[e]}))}(r);t("5462");var s,u=t("f0c5"),c=Object(u["a"])(a["default"],o["b"],o["c"],!1,null,"4391464c",null,!1,o["a"],s);n["default"]=c.exports},e1be:function(e,n,t){}},[["bebe","common/runtime","common/vendor"]]]);
5,328
5,328
0.694257
ac9b25cd89775ba037110759c5937ba62abdaf76
319
js
JavaScript
src/messages.js
eltorio/fit-parser
b5412d50b310c92a141dc2e9f5c0f1246f59928e
[ "MIT" ]
null
null
null
src/messages.js
eltorio/fit-parser
b5412d50b310c92a141dc2e9f5c0f1246f59928e
[ "MIT" ]
null
null
null
src/messages.js
eltorio/fit-parser
b5412d50b310c92a141dc2e9f5c0f1246f59928e
[ "MIT" ]
null
null
null
/* eslint-disable */ import { getMessageName, getFieldObject } from './fit'; export function getFitMessage(messageNum) { return { name: getMessageName(messageNum), getAttributes: (fieldNum) => getFieldObject(fieldNum, messageNum), }; } // TODO export function getFitMessageBaseType(foo) { return foo; }
21.266667
70
0.717868
ac9b9f5d7b6426052775c4e99aacb7d7074cff48
3,654
js
JavaScript
src/components/PasswordResetSection.js
aashnisshah/vaccine-notifications
8c0f6b839465f993dc6454260241337539ec4bf1
[ "MIT" ]
1
2021-04-19T04:37:46.000Z
2021-04-19T04:37:46.000Z
src/components/PasswordResetSection.js
aashnisshah/vaccine-notifications
8c0f6b839465f993dc6454260241337539ec4bf1
[ "MIT" ]
4
2021-04-17T23:59:15.000Z
2021-05-19T07:31:32.000Z
src/components/PasswordResetSection.js
aashnisshah/vaccine-notifications
8c0f6b839465f993dc6454260241337539ec4bf1
[ "MIT" ]
null
null
null
import React, { useState } from "react"; import { Container, Form, Spinner, Button, } from "react-bootstrap"; import { useAuth } from "./../util/auth.js"; import { useForm } from "react-hook-form"; import FormField from "./FormField"; import Section from "./Section"; import SectionHeader from "./SectionHeader"; import FormAlert from "./FormAlert"; import { useRouter } from "./../util/router.js"; export default function PasswordResetSection(props) { const auth = useAuth(); const router = useRouter(); const [pending, setPending] = useState(false); const { handleSubmit, register, reset } = useForm(); const [messageStatus, setMessageStatus] = useState(null); const onSubmit = ({ email }) => { setPending(true); return auth.sendPasswordResetEmail(email).then(() => { setPending(false); reset(); setMessageStatus({ status: "success", message: "Password Reset Email Sent!", }); }); }; return ( <Section bg={props.bg} textColor={props.textColor} bgImage={props.bgImage} size={props.size} bgImageOpacity={props.bgImageOpacity} > <Container className="formContainer forwardBackButton mt-4"> <Button className="p-0" variant="link" onClick={()=> router.push('/auth/signin')}> <p>← Back</p> </Button> <SectionHeader title={props.title} subtitle={props.subtitle} size={2} spaced={true} className="text-center justify-center" /> {messageStatus && ( <FormAlert type={messageStatus.status} message={messageStatus.message} /> )} <Form onSubmit={handleSubmit(onSubmit)}> <Form.Group controlId="messageType" className="flex-fill"> <FormField name="email" type="email" size={"md"} placeholder="Email" inputRef={register({ required: "Please enter an email", })} /> </Form.Group> <div className="w-100 text-center"> <Button variant="primary" type="submit" disabled={pending} size="md" className="my-2" > {!pending && <span>Send Email</span>} {pending && ( <Spinner animation="border" size="sm" role="status" aria-hidden={true} className="align-baseline" > <span className="sr-only">Loading...</span> </Spinner> )} </Button> </div> </Form> </Container> </Section> ); }
35.134615
94
0.401478
ac9c045808e938c70ad29c07c0ce74bc207d2697
2,540
js
JavaScript
test/all.js
kode4food/welsh
7d6ef0b9f6970d661483810b9a0f8e8f391e45c7
[ "MIT" ]
6
2015-08-06T18:57:31.000Z
2016-08-21T13:07:49.000Z
test/all.js
kode4food/welsh
7d6ef0b9f6970d661483810b9a0f8e8f391e45c7
[ "MIT" ]
5
2020-08-25T23:40:16.000Z
2020-11-03T05:15:31.000Z
test/all.js
kode4food/welsh
7d6ef0b9f6970d661483810b9a0f8e8f391e45c7
[ "MIT" ]
2
2015-08-06T18:57:40.000Z
2015-10-13T15:03:57.000Z
/* global describe, it *//* jshint -W030 */ "use strict"; var expect = require('chai').expect; var welsh = require('../dist'); function noOp() {} describe("Welsh 'all()' Implementation", function () { it("should support args with promises and deferreds", function (done) { var p1 = new welsh.Promise(noOp); var p2 = new welsh.Promise(noOp); var d1 = new welsh.Deferred(noOp); var d2 = new welsh.Deferred(noOp); d2.then(function (result) { return result + ' modified'; }); var all = welsh.Promise.all(['hello', p1, p2, d1, d2, 37]); all.then(function (arr) { expect(arr.length).to.equal(6); expect(arr[0]).to.equal('hello'); expect(arr[1]).to.equal('p1 resolved'); expect(arr[2]).to.equal('p2 resolved'); expect(arr[3]).to.equal('d1 resolved'); expect(arr[4]).to.equal('d2 resolved modified'); expect(arr[5]).to.equal(37); done(); }); setTimeout(function () { p1.resolve('p1 resolved'); }, Math.random() * 99); setTimeout(function () { p2.resolve('p2 resolved'); }, Math.random() * 99); setTimeout(function () { d1.resolve('d1 resolved'); }, Math.random() * 99); setTimeout(function () { d2.resolve('d2 resolved'); }, Math.random() * 99); }); it("should short-circuit on any rejection", function (done) { var p1 = new welsh.Promise(noOp); var p2 = new welsh.Promise(noOp); var d1 = new welsh.Deferred(noOp); var d2 = new welsh.Deferred(noOp); d2.then(function (result) { return result + ' modified'; }); var all = welsh.Promise.all(['hello', p1, p2, d1, d2, 37]); all.then(undefined, function (reason) { expect(reason).to.equal('d1 rejected'); done(); }); setTimeout(function () { p1.resolve('p1 resolved'); }, Math.random() * 99); setTimeout(function () { p2.resolve('p2 resolved'); }, Math.random() * 99); setTimeout(function () { d1.reject('d1 rejected'); }, Math.random() * 99); setTimeout(function () { d2.resolve('d2 resolved'); }, Math.random() * 99); }); it("should handle empty set", function (done) { var all = welsh.Promise.all([]); all.then(function (result) { expect(result).is.array; expect(result).length.is(0); done(); }); }); it("should handle garbage", function (done) { welsh.Promise.resolve(37).all().catch(function (reason) { expect(reason).to.be.an('Error'); expect(reason.message).to.equal("Result containing a Collection is required"); done(); }); }); });
32.564103
84
0.598819
ac9c22e6691304fdc7c4d5e2c7bd44f6c0e8ea05
1,392
js
JavaScript
lists/duplicates.js
danielebailo/epos-couch
b0f4b73d2d3df32711cac1b8beb8995c5c009124
[ "Apache-2.0" ]
null
null
null
lists/duplicates.js
danielebailo/epos-couch
b0f4b73d2d3df32711cac1b8beb8995c5c009124
[ "Apache-2.0" ]
null
null
null
lists/duplicates.js
danielebailo/epos-couch
b0f4b73d2d3df32711cac1b8beb8995c5c009124
[ "Apache-2.0" ]
null
null
null
//~ THE FUNCTION IS DISABLED BECAUSE IT'S VERY RESOURCE CONSUMING. TO RE-ACTIVATE IT JUST COMMENT THE "return null" LINE function(head, req) { var row; start({ "headers": { "Content-Type": "application/json" } }); //~ ************* REMOVE THIS ******************* return null; //declare function to remove duplicates in the same array function eliminateDuplicates(arr) { var i, len=arr.length, out=[], obj={}; for (i=0;i<len;i++) { obj[arr[i]]=0; } for (i in obj) { out.push(i); } return out; } //~ var pagina='{ "docs":[\n'; //~ var counter=0; var couchid="" var list= []; var uniques=[]; var dups=[]; var dupsRi=[]; while(row = getRow()) { couchid= row.value._id; delete row.value._id; delete row.value._rev; list.push([JSON.stringify(row.value),couchid]); } //~ return "ok4"; //~ list.forEach(function(value) for (elem in list) { if (uniques.indexOf(list[elem][0]) == -1) { uniques.push(list[elem][0]); } else{ dups.push(list[elem]); } } for (elem in dups){ dupsRi.push( dups[elem][1]); dups[elem]=dups[elem][0]; } //~ return JSON.stringify(dupsRi_name); return ('{"dups":\n['+(dups)+'],\n "uniques":\n['+(uniques)+'],\n"duplicate RIs":\n'+JSON.stringify(dupsRi)+'\n}'); //~ pagina=pagina.slice(0,-2); //~ pagina=pagina+']}'; //~ return pagina; }
20.470588
120
0.564655
ac9c83d10807ad5363fc9a6924e2bff3391f0628
1,374
js
JavaScript
src/main.js
qk44077907/BLOGDEMO
a2e39e0b2422969f0919d80742435ef2a625fd8f
[ "MIT" ]
4
2016-05-16T07:56:45.000Z
2019-05-14T11:49:16.000Z
src/main.js
qk44077907/BLOGDEMO
a2e39e0b2422969f0919d80742435ef2a625fd8f
[ "MIT" ]
null
null
null
src/main.js
qk44077907/BLOGDEMO
a2e39e0b2422969f0919d80742435ef2a625fd8f
[ "MIT" ]
1
2018-03-05T16:53:57.000Z
2018-03-05T16:53:57.000Z
import Vue from '../lib/vue.min'; import App from './App'; //import VueResource from 'vue-resource'; import VueRouter from 'vue-router'; //Vue.config.debug = true;//开启错误提示 //Vue.use(VueResource); //Vue.http.options.emulateJSON = true; import contentHome from './components/content-home.vue'; import contentArchive from './components/content-archive.vue'; import contentTag from './components/content-tag.vue'; import contentCate from './components/content-cate.vue'; import contentAbout from './components/content-about.vue'; import filteredArticles from './components/filtered-articles.vue' Vue.use(VueRouter); var router = new VueRouter({ }); router.map({ '/': { component: contentHome }, '/page/:count':{ name:'page', component:contentHome }, '/archive/:count': { name:'archive', component: contentArchive }, '/cate': { name:'cate', component: contentCate }, '/tag': { name:'tag', component: contentTag }, '/about': { name:'about', component: contentAbout }, '/search/:count': { name:'search', component: filteredArticles }, '/:filterField/:filterName/:count':{ name:'filtered', component: filteredArticles } }); router.redirect( { '*':'/' } ); router.start(App, 'app');
24.535714
65
0.609898
ac9cc40bb2f74d9c6e3153eb8be8a619c1a1c5fe
1,116
js
JavaScript
parsers/elements/SourceMapElement.js
funbox/crafter
6df0238b7a37e0ada69eae58d24fd264a687ad96
[ "MIT" ]
8
2022-03-21T11:57:55.000Z
2022-03-28T21:59:20.000Z
parsers/elements/SourceMapElement.js
funbox/crafter
6df0238b7a37e0ada69eae58d24fd264a687ad96
[ "MIT" ]
1
2022-03-21T11:21:08.000Z
2022-03-21T11:21:08.000Z
parsers/elements/SourceMapElement.js
funbox/crafter
6df0238b7a37e0ada69eae58d24fd264a687ad96
[ "MIT" ]
null
null
null
const Refract = require('../../Refract'); class SourceMapElement { /** * @param {ByteBlock[] | CharBlock[]} blocks */ constructor(blocks) { this.blocks = blocks; } toRefract() { let file; const result = { element: Refract.elements.array, content: [], }; this.blocks.forEach(block => { let sourceMapEl = result.content[result.content.length - 1]; if (!sourceMapEl || file !== block.file) { sourceMapEl = { element: Refract.elements.sourceMap, content: [], }; file = block.file; if (file) { sourceMapEl.file = file.replace(/\\/g, '/'); } result.content.push(sourceMapEl); } sourceMapEl.content.push({ element: Refract.elements.array, content: [ { element: Refract.elements.number, content: block.offset, }, { element: Refract.elements.number, content: block.length, }, ], }); }); return result; } } module.exports = SourceMapElement;
20.666667
66
0.517025
ac9cd7a7def59795c375ca6febb38813c47cebde
118
js
JavaScript
controllers/iframe-luna-en.js
ProjectPODER/cargografias
637cfbae9a27bf1f90851470b8d9d21fa73f2268
[ "Apache-2.0" ]
null
null
null
controllers/iframe-luna-en.js
ProjectPODER/cargografias
637cfbae9a27bf1f90851470b8d9d21fa73f2268
[ "Apache-2.0" ]
1
2019-09-29T01:25:27.000Z
2019-09-29T01:25:27.000Z
controllers/iframe-luna-en.js
ProjectPODER/cargografias
637cfbae9a27bf1f90851470b8d9d21fa73f2268
[ "Apache-2.0" ]
2
2019-09-29T01:24:46.000Z
2019-09-29T01:25:51.000Z
function index(req, res){ res.render('iframe-luna-canales-en', {}); }; module.exports = { index: index, }
10.727273
45
0.59322
ac9cfbffa275c4f74f53c133e0886fa4c87b1150
10,093
js
JavaScript
index.js
freaktechnik/irusb-adapter
3e188e70544331554ef378ea746f1b75a688d2ff
[ "MIT" ]
null
null
null
index.js
freaktechnik/irusb-adapter
3e188e70544331554ef378ea746f1b75a688d2ff
[ "MIT" ]
null
null
null
index.js
freaktechnik/irusb-adapter
3e188e70544331554ef378ea746f1b75a688d2ff
[ "MIT" ]
null
null
null
"use strict"; const { Adapter, Device, Property, Action } = require('gateway-addon'); const manifest = require('./manifest.json'); const dgram = require('dgram'); const net = require('net'); // https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07 const HID_MAP = { PLAY: { code: '176', type: 'consumer', modifier: '000', // this is actually the upper byte and not the modifiers }, PAUSE: { code: '177', type: 'consumer', modifier: '000', }, HOME: { code: '035', type: 'consumer', modifier: '002' }, ENTER: { code: '040', type: 'keyboard', modifier: '000' }, RIGHT: { code: '079', type: 'keyboard', modifier: '000' }, LEFT: { code: '080', type: 'keyboard', modifier: '000' }, DOWN: { code: '081', type: 'keyboard', modifier: '000' }, UP: { code: '082', type: 'keyboard', modifier: '000' }, BACK: { code: '036', type: 'consumer', modifier: '002' }, MUTE: { code: '226', type: 'consumer', modifier: '000' }, VOLUME_UP: { code: '233', type: 'consumer', modifier: '000' }, VOLUME_DOWN: { code: '234', type: 'consumer', modifier: '000' }, NEXT: { code: '181', type: 'consumer', modifier: '000' }, PREVIOUS: { code: '182', type: 'consumer', modifier: '000' }, STOP: { code: '183', type: 'consumer', modifier: '00*' }, SLEEP: { code: '050', type: 'consumer', modifier: '000' }, REWIND: { code: '180', type: 'consumer', modifier: '000' }, FASTFORWARD: { code: '179', type: 'consumer', modifier: '000' }, RED: { code: '105', type: 'consumer', modifier: '000' }, GREEN: { code: '106', type: 'consumer', modifier: '000' }, BLUE: { code: '107', type: 'consumer', modifier: '000' }, YELLOW: { code: '108', type: 'consumer', modifier: '000' }, CLOSED_CAPTIONS: { code: '097', type: 'consumer', modifier: '000' }, CHANNEL_UP: { code: '156', type: 'consumer', modifier: '000' }, CHANNEL_DOWN: { code: '157', type: 'consumer', modifier: '000' } //TODO guide? }; const CONTROL_CODE = { consumer: { short: '2', long: '6' }, keyboard: { short: '1', long: '5' } }; class IRUSBProperty extends Property { async setValue(value) { if(typeof value !== 'boolean') { throw new Error(`Invalid value type ${typeof value}. Expecting boolean.`); } if(this.name === 'power') { if(value) { return this.device.sendCommand('WAKE'); } return this.device.sendKey('SLEEP'); } else if(this.name === 'playing') { if(value) { return this.device.sendKey('PLAY'); } return this.device.sendKey('PAUSE'); } this.setCachedValueAndNotify(value); return value; } } class IRUSBDevice extends Device { constructor(adapter, uuid, ip, port) { super(adapter, uuid); this.name = uuid; this['@type'] = [ 'OnOffSwitch' ]; this.socket = new net.Socket(); this.socket.setEncoding('ascii'); this.addProperty(new IRUSBProperty(this, 'power', { title: 'Power', '@type': 'OnOffProperty', type: 'boolean' })); this.addAction('launch', { title: 'Launch App', input: { type: 'string' } }); this.addAction('remoteShort', { title: 'Short Press', input: { type: 'string', enum: [ 'PLAY', 'PAUSE', 'ENTER', 'HOME', 'BACK', 'UP', 'DOWN', 'LEFT', 'RIGHT', 'NEXT', 'PREVIOUS', 'REWIND', 'FASTFORWARD', 'MUTE', 'VOLUME_UP', 'VOLUME_DOWN', 'RED', 'GREEN', 'BLUE', 'YELLOW' ] } }); this.addAction('remoteLong', { title: 'Long Press', input: { type: 'string', enum: [ 'ENTER', 'FASTFORWARD', 'REWIND', 'UP', 'DOWN', 'LEFT', 'RIGHT' ] } }); this.addAction('cancelKeys', { title: 'Cancel Presses' }); this.addProperty(new IRUSBProperty(this, 'playing', { title: 'Playing', type: 'boolean' })); this.addProperty(new Property(this, 'app', { title: 'Application', type: 'string', readOnly: true })); this.responseQueue = []; this.socket.connect(port, ip, () => { this.connectedNotify(true); this.interval = setInterval(() => this.updateState(), 5000); this.adapter.handleDeviceAdded(this); }); this.socket.on('close', () => { clearInterval(this.interval); this.interval = undefined; this.connectedNotify(false); }); this.socket.on('data', (data) => { for(const waitingOn of this.responseQueue) { if(data.startsWith(waitingOn.code)) { waitingOn.callback(data.slice(waitingOn.code.length).trim()); this.responseQueue.splice(this.responseQueue.indexOf(waitingOn), 1); return; } } //TODO event for incoming IR console.log('Unexpected packet', data); }); this.updateState(); } async updateState() { const playing = await this.sendCommand('GETPLAY'); const app = await this.sendCommand('GETFG'); const isPlaying = playing === '1'; this.findProperty('playing').setCachedValueAndNotify(isPlaying); this.findProperty('app').setCachedValueAndNotify(app); // app !== screensaver this.findProperty('power').setCachedValueAndNotify(isPlaying || app); } destroy() { clearInterval(this.interval); this.interval = undefined; this.socket.destroy(); } async sendKey(keyName, long = false) { let pressType = long ? 'long' : 'short'; const keyInfo = HID_MAP[keyName]; const startCode = CONTROL_CODE[keyInfo.type][pressType]; return this.sendCommand(`HIDCODE${startCode}${keyInfo.modifier}${keyInfo.code}`); } sendCommand(command) { return new Promise((resolve) => { const fullCommand = `Q${command}\r`; this.responseQueue.push({ code: fullCommand, callback(response) { resolve(response.split('\r').filter((part) => part.length && part !== 'OK').join('\r')); } }); this.socket.write(fullCommand); }); } reconnect(ip, port) { if(this.socket.readyState !== 'open') { if(!this.interval) { this.interval = setInterval(() => this.updateState(), 5000); } this.socket.connect(port, ip, () => { this.connectedNotify(true); }); } } /** * * @param {Action} action */ async performAction(action) { switch(action.name) { case 'launch': return this.sendCommand(`LAUNCH ${action.input}`); case 'remoteShort': return this.sendKey(action.input, false); case 'remoteLong': return this.sendKey(action.input, true); case 'cancelKeys': return this.sendCommand('HIDCODE0000000'); } } } class IRUSBAdapter extends Adapter { constructor(addonManager) { super(addonManager, manifest.id, manifest.id); addonManager.addAdapter(this); this.startDiscovering(); } async startDiscovering() { //TODO close socket on unload! this.socket = dgram.createSocket({ type: 'udp4' }); await new Promise((resolve) => this.socket.bind(1904, resolve)); this.socket.setBroadcast(true); this.socket.addMembership('239.255.255.250'); this.socket.on('message', (message, info) => { const string = message.toString('ascii'); if(string.startsWith('NOTIFY \n')) { const [ header, uuid, ip, port ] = string.split('\n'); this.onDevice(uuid.trim(), ip.trim(), port.trim()); } }); } onDevice(uuid, ip, port) { if(!this.devices[uuid]) { new IRUSBDevice(this, uuid, ip, port); } else { this.devices[uuid].reconnect(ip, port); } } handleDeviceRemoved(device) { device.destroy(); super.handleDeviceRemoved(device); } async unload() { await new Promise((resolve) => { this.socket.close(resolve); }); return super.unload(); } } module.exports = (addonManager) => { new IRUSBAdapter(addonManager); };
26.283854
108
0.461508
ac9d434ee3701f6c91208910a3d2b3916b5d5bc8
26,700
js
JavaScript
twitter/assets/js/ondemand.i18n.ja-js.8894aa939be611b635ad.js
extratone/iowa
e271c465a4970c7327bfca4c7793b1a9cfec9f2d
[ "Unlicense" ]
null
null
null
twitter/assets/js/ondemand.i18n.ja-js.8894aa939be611b635ad.js
extratone/iowa
e271c465a4970c7327bfca4c7793b1a9cfec9f2d
[ "Unlicense" ]
null
null
null
twitter/assets/js/ondemand.i18n.ja-js.8894aa939be611b635ad.js
extratone/iowa
e271c465a4970c7327bfca4c7793b1a9cfec9f2d
[ "Unlicense" ]
null
null
null
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{1127:function(e,t,a){"use strict";var r=a(1)._register("ja");function c(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}r("bd4c3d18","\u3082\u3046\u4e00\u5ea6\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9"),r("dae57baa","\u3053\u306e\u30d5\u30a9\u30fc\u30e0\u306b\u5165\u529b"),r("h213e37d",function(e){return"@"+e.userName+"\u3055\u3093"}),r("adac1d25","\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u91cd\u8981\u306a\u60c5\u5831\u3067\u3059\u3002"),r("e792ed49","\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093"),r("db5927dc","\u7d71\u8a08\u6982\u8981"),r("d3c63555","\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u3042\u308b\u6570\u5024\u306e\u6982\u8981\u3067\u3059\u3002"),r("f0472206","README"),r("jfd00c34","\u3053\u306e\u30d5\u30a9\u30eb\u30c0"),r("c4f8ac47","\u30c4\u30a4\u30fc\u30c8"),r("fbffbecb","\u3044\u3044\u306d"),r("ecdaf192","\u30d6\u30ed\u30c3\u30af\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8"),r("e5c608f9","\u30df\u30e5\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8"),r("df98e6d9","\u30ea\u30b9\u30c8"),r("d183def2","\u30e2\u30fc\u30e1\u30f3\u30c8"),r("dad4c74b","\u8868\u793a\u3059\u308b"),r("ie98573b","\u60c5\u5831\u3092\u8868\u793a\u3067\u304d\u307e\u305b\u3093\u3002\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u3082\u3046\u4e00\u5ea6\u89e3\u51cd\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),r("e2c00a0e",function(e){return"\u24b8 "+e.year+" Twitter, Inc."}),r("a6aeafeb","Twitter\u306e\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u30bb\u30f3\u30bf\u30fc"),r("i3cb94db","Twitter\u304c\u53ce\u96c6\u3059\u308b\u30c7\u30fc\u30bf\u3068\u305d\u306e\u53d6\u308a\u6271\u3044\u3092\u5229\u7528\u8005\u304c\u5e38\u306b\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002"),r("fd7d9019","\u8a73\u7d30\u306f\u3053\u3061\u3089"),r("cd09a3c2","\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u8a2d\u5b9a"),r("ic7e322d","Twitter\u3092\u3088\u308a\u5feb\u9069\u306b\u3054\u5229\u7528\u3044\u305f\u3060\u304f\u305f\u3081\u306b\u6d3b\u7528\u3067\u304d\u308b\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u8a2d\u5b9a\u304c\u6570\u591a\u304f\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002"),r("deff5ed4","\u8a00\u8a9e"),r("e2dfe155","\u8868\u793a\u8a00\u8a9e\u3092\u5909\u66f4"),r("c586bb24","\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067Twitter\u306b\u3088\u308b\u30d8\u30c3\u30c9\u30e9\u30a4\u30f3\u3001\u30dc\u30bf\u30f3\u3001\u4ed6\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\u8a2d\u5b9a\u8a00\u8a9e\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u306b\u8868\u793a\u3055\u308c\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8a00\u8a9e\u306f\u5909\u66f4\u3055\u308c\u307e\u305b\u3093\u3002"),r("ef35dfbf","\u8a00\u8a9e\u3092\u8868\u793a"),r("e4cb8f8f","\u4fdd\u5b58"),r("g0619214","\u30a2\u30fc\u30ab\u30a4\u30d6\u304c\u5927\u304d\u3059\u304e\u308b\u305f\u3081\u8868\u793a\u3067\u304d\u307e\u305b\u3093"),r("a557029d","\u30a2\u30fc\u30ab\u30a4\u30d6\u306e\u30c7\u30fc\u30bf\u91cf\u304c50GB\u3092\u8d85\u3048\u305f\u305f\u3081\u3001\u3053\u306e\u30d3\u30e5\u30fc\u306b\u306f\u8868\u793a\u3067\u304d\u307e\u305b\u3093\u3002\u30c7\u30fc\u30bf\u30d5\u30a9\u30eb\u30c0\u3067\u306f\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002"),r("bd550e36","\u30c7\u30fc\u30bf\u30d5\u30a9\u30eb\u30c0"),r("ab73e5d3",function(e){return e.size+" KB"}),r("fe25ac98",function(e){return e.size+" MB"}),r("dd55750a","\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u306f\u3001\u751f\u6210\u6642\u70b9\u307e\u3067\u306b\u4f5c\u6210\u3055\u308c\u305f\u3059\u3079\u3066\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"),r("j58dfe39","\u751f\u6210\u65e5"),r("b09970bd","\u63a8\u5b9a\u30b5\u30a4\u30ba"),r("b3b293a1","\u30e1\u30cb\u30e5\u30fc\u3092\u975e\u8868\u793a\u306b\u3059\u308b"),r("bacb0ed2","\u30db\u30fc\u30e0"),r("b747cc48","\u30a2\u30ab\u30a6\u30f3\u30c8"),r("fc594176","\u30c0\u30a4\u30ec\u30af\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8"),r("b4d1578d","\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3"),r("a03760ff","\u30ab\u30b9\u30bf\u30de\u30a4\u30ba"),r("b449308c","\u5e83\u544a"),r("b0fc166e","\u8fd4\u4fe1"),r("f2017ac5","\u30ea\u30c4\u30a4\u30fc\u30c8"),r("e6580b36","\u6b21\u3078"),r("g4c9627f","\u524d\u3078"),r("ec6e8853","\u623b\u308b"),r("fdfb88b8","\u30c4\u30a4\u30fc\u30c8\u3092\u691c\u7d22"),r("f12ed169","\u691c\u7d22\u30d5\u30a3\u30eb\u30bf\u30fc"),r("ce97ada1","\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u524a\u9664"),r("e511b066","\u3059\u3079\u3066\u306e\u30c4\u30a4\u30fc\u30c8"),r("bcfc167d","\u30e1\u30c7\u30a3\u30a2\u306e\u307f"),r("a38c92f2","\u6587\u5b57\u306e\u307f"),r("cb360050","\u65b0\u3057\u3044\u9806"),r("f5228b07","\u53e4\u3044\u9806"),r("ed5d96a0","\u8868\u793a"),r("ecd8d7d3","\u65e5\u4ed8\u3067\u4e26\u3079\u66ff\u3048"),r("bea20d4d","\u65e5\u4ed8"),r("fdb1297d","\u6b21\u306e\u65e5\u4ed8\u4ee5\u964d "),r("gd4ddeb4","\u6b21\u306e\u65e5\u4ed8\u4ee5\u524d "),r("efc5dd77","Twitter\u3067\u8868\u793a"),r("f3aabb50","\u307e\u3060\u30c4\u30a4\u30fc\u30c8\u306f\u3042\u308a\u307e\u305b\u3093"),r("af9c4c44","\u52d5\u753b\u3092\u518d\u751f"),r("db70b04a","\u4e00\u822c\u60c5\u5831"),r("b22ba8dc","\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb"),r("a0d100f8","\u9023\u643a\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3"),r("haf26e7a","\u9023\u7d61\u5148"),r("h1ab74c0","\u30bb\u30c3\u30b7\u30e7\u30f3"),r("eb4f1c12","\u30a2\u30ab\u30a6\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u5c65\u6b74"),r("ac6543d2",function(e){return"\u4f5c\u6210\u5143: "+e.createdVia}),r("f5539b09",function(e){return e.changedAt+"\u306b\u5909\u66f4"}),r("d79553fc","\u975e\u516c\u958b\u306b\u3059\u308b"),r("a38009bb","\u975e\u516c\u958b\u3092\u89e3\u9664"),r("ebb5550a","\u30a2\u30af\u30b7\u30e7\u30f3: "),r("a450ed39","\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u4e00\u822c\u60c5\u5831\u3067\u3059\u3002"),r("a6368dcb","\u30a2\u30ab\u30a6\u30f3\u30c8\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093\u3002"),r("gc611216","\u30a2\u30ab\u30a6\u30f3\u30c8\u4f5c\u6210"),r("b858720c","\u30a2\u30ab\u30a6\u30f3\u30c8ID"),r("jddcdfb5","\u30bf\u30a4\u30e0\u30be\u30fc\u30f3"),r("f562baf9","\u30a2\u30ab\u30a6\u30f3\u30c8\u4f5c\u6210IP"),r("d0a2cd65","\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9"),r("ca948b38","\u96fb\u8a71\u756a\u53f7"),r("a0b1619f","\u5e74\u9f62\u60c5\u5831"),r("h75fecfe","\u8a8d\u8a3c\u6e08\u307f"),r("a97eb7e8","\u306f\u3044"),r("a6adcbe2","\u3044\u3044\u3048"),r("d0c13b0f","\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5909\u66f4"),r("f3b7e4c1","\u975e\u516c\u958b\u5c65\u6b74"),r("i47fd245","\u30c7\u30fc\u30bf\u306a\u3057"),r("ea80569b","\u301c "),r("ge84fa17","\u7d44\u7e54"),r("e2171091","\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u30dd\u30ea\u30b7\u30fc"),r("dbc530a7","\u5229\u7528\u898f\u7d04"),r("e8e530e9","\u540d\u524d"),r("gff6e204","\u8aac\u660e"),r("hb589b3e","\u30a2\u30af\u30bb\u30b9\u6a29"),r("g652ba51","\u4ed8\u4e0e\u65e5\u6642"),r("c2526d37","\u9023\u643a\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u306f\u3042\u308a\u307e\u305b\u3093"),r("ce84bf94","\u30d8\u30eb\u30d7\u30bb\u30f3\u30bf\u30fc"),r("a75a33f3","\u30a2\u30c9\u30ec\u30b9\u5e33\u304c\u7a7a\u3067\u3042\u308b\u304b\u3001Twitter\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002"),r("eef7aa2c","\u9023\u7d61\u5148\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093"),r("e0988a03","\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u3092\u53d6\u308a\u6d88\u3057\u3066\u304f\u3060\u3055\u3044"),r("f3ae1a6f","\u8a73\u7d30\u306f\u3053\u3061\u3089"),r("f70c934a","\u30e6\u30fc\u30b6\u30fc\u540d"),r("effec96f","\u30a2\u30ab\u30a6\u30f3\u30c8\u8868\u793a\u540d"),r("hfa811da","\u30d5\u30a9\u30ed\u30ef\u30fc"),r("fd87318c","\u30d5\u30a9\u30ed\u30fc\u4e2d"),r("g81fed0b","\u81ea\u5df1\u7d39\u4ecb"),r("a6766a9e","\u30db\u30fc\u30e0\u30da\u30fc\u30b8"),r("bfe77df7","\u5834\u6240"),r("c4abb442","\u30e6\u30fc\u30b6\u30fc\u540d\u306e\u5909\u66f4"),r("i7d6b90c","\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u753b\u50cf"),r("d2aa6664","\u30d8\u30c3\u30c0\u30fc\u753b\u50cf"),r("h2a67073","\u30c4\u30a4\u30fc\u30c8\u3092\u975e\u516c\u958b"),r("b2f2c9a2","\u8a73\u7d30\u3092\u8868\u793a"),r("f7a8b5e7","\u8a73\u7d30\u3092\u975e\u8868\u793a\u306b\u3059\u308b"),r("f298d79c","Twitter\u3067\u5e83\u544a\u3092\u8868\u793a"),r("f762d354","\u30d7\u30ed\u30e2\u30c8\u30ec\u30f3\u30c9"),r("dc2b9300","\u5e74\u9f62"),r("b4cf4994","\u30ad\u30fc\u30ef\u30fc\u30c9"),r("a385a137","\u30c6\u30a4\u30e9\u30fc\u30c9\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\uff08\u30ea\u30b9\u30c8\uff09"),r("a98a677f","\u7aef\u672b\u30e2\u30c7\u30eb"),r("caf7be6e","\u30a4\u30d9\u30f3\u30c8"),r("bc0e1f74","\u6027\u5225"),r("fccf8c3b","\u5834\u6240"),r("b600f91b","\u8a00\u8a9e"),r("gaa6f4f0","\u643a\u5e2f\u96fb\u8a71\u4f1a\u793e"),r("fccc5d35","\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0"),r("b24af003","OS\u30d0\u30fc\u30b8\u30e7\u30f3"),r("c0ea46a6","\u884c\u52d5"),r("i40276f4","\u30d5\u30a9\u30ed\u30ef\u30fc\u304c\u4f3c\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8"),r("acdf7e38","\u6620\u753b\u3068\u30c6\u30ec\u30d3\u756a\u7d44"),r("cd7eeb0c","WiFi\u306e\u307f\u306e\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("a9de604a","\u30e9\u30a4\u30d6\u52d5\u753b\u30a4\u30d9\u30f3\u30c8"),r("cc9c1e84","\u30b3\u30f3\u30c6\u30f3\u30c4\u30d1\u30d6\u30ea\u30c3\u30b7\u30e3\u30fc"),r("b9c99219","\u4f1a\u8a71\u30c8\u30d4\u30c3\u30af"),r("i87ec85e","\u30a8\u30f3\u30b2\u30fc\u30b8\u30e1\u30f3\u30c8\u30bf\u30a4\u30d7\u306e\u30ea\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("fc53fe65","\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u30a8\u30f3\u30b2\u30fc\u30b8\u30e1\u30f3\u30c8\u3057\u305f\u5229\u7528\u8005\u306e\u30ea\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("d2fb9b2a","\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u30a8\u30f3\u30b2\u30fc\u30b8\u30e1\u30f3\u30c8\u3057\u305f\u5229\u7528\u8005\u306b\u4f3c\u305f\u5229\u7528\u8005\u306e\u30ea\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("g78431ba","\u30ad\u30e3\u30f3\u30da\u30fc\u30f3\u306b\u30a8\u30f3\u30b2\u30fc\u30b8\u30e1\u30f3\u30c8\u3057\u305f\u5229\u7528\u8005\u306b\u4f3c\u305f\u5229\u7528\u8005\u3092\u30ea\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("e730263c","\u65b0\u3057\u3044\u7aef\u672b\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("d5b2d63b","\u30d5\u30ec\u30ad\u30b7\u30d6\u30eb\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u306e\u30bf\u30fc\u30b2\u30c6\u30a3\u30f3\u30b0"),r("b8790f32","\u4e0d\u660e"),r("f75d1985","Twitter\u306b\u8868\u793a\u3055\u308c\u305f\u53ef\u80fd\u6027\u306e\u3042\u308b\u5e83\u544a\u3067\u3059\u3002\u5e83\u544a\u4e3b\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3084\u5e83\u544a\u306e\u5185\u5bb9\u306a\u3069\u306e\u60c5\u5831\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u3053\u306e\u5e83\u544a\u304c\u8868\u793a\u3055\u308c\u305f\u7406\u7531\u306a\u3069\u306e\u8a73\u7d30\u306f\u3001[\u8a73\u7d30\u3092\u8868\u793a] \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),r("e154a141","\u5e83\u544a\u3092\u691c\u7d22"),r("c13928a5","\u5e83\u544a\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u8868\u793a\u3055\u308c\u305f\u5e83\u544a\u304c\u307e\u3060\u306a\u3044\u305f\u3081\u3068\u601d\u308f\u308c\u307e\u3059\u3002"),r("a5178376","\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u691c\u7d22"),r("a1c1e53e","\u9001\u53d7\u4fe1\u3057\u305f\u30c0\u30a4\u30ec\u30af\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u307e\u3060\u3042\u308a\u307e\u305b\u3093\u3002"),r("eeb5bf00","\u52d5\u753b\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f"),r("d7edf1b1","\u753b\u50cf\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f"),r("j1b5f5c7","\u4f1a\u8a71\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002"),r("b46514f7","\u9078\u629e\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u3042\u308a\u307e\u305b\u3093"),r("h6c25993","\u4f1a\u8a71\u306b\u53c2\u52a0\u3057\u307e\u3057\u305f"),r("ed8d5620","\u3044\u3044\u306d\u3092\u691c\u7d22"),r("h117ca98","\u307e\u3060\u3044\u3044\u306d\u306f\u3042\u308a\u307e\u305b\u3093"),r("fd73f6e8","\u4f5c\u6210\u6e08\u307f"),r("h63f51be","\u767b\u9332\u6e08\u307f"),r("fd8591d2","\u30e1\u30f3\u30d0\u30fc"),r("h4fd72b9","\u30ea\u30b9\u30c8\u3092\u691c\u7d22"),r("h1aadb42","\u307e\u3060\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u305b\u3093"),r("g174d5cb","\u767b\u9332\u3057\u3066\u3044\u308b\u30ea\u30b9\u30c8\u306f\u3042\u308a\u307e\u305b\u3093"),r("hc086ec0","\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u30ea\u30b9\u30c8\u306f\u3042\u308a\u307e\u305b\u3093"),r("hd84f30c","\u307e\u3060\u30e2\u30fc\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u305b\u3093"),r("f1f4be42","\u30e2\u30fc\u30e1\u30f3\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002"),r("a4fa5e4d","\u30e2\u30fc\u30e1\u30f3\u30c8"),r("fe0c78b7","\u30d6\u30ed\u30c3\u30af\u4e2d"),r("baaf063b","\u307e\u3060\u8ab0\u3082\u30df\u30e5\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093"),r("b2e67bb8","\u307e\u3060\u8ab0\u3082\u30d6\u30ed\u30c3\u30af\u3057\u3066\u3044\u307e\u305b\u3093"),r("fcb8139f","Twitter\u3067\u30ea\u30b9\u30c8\u3092\u8868\u793a"),r("hbc3d07a","\u8a2d\u5b9a"),r("h88485ae",function(e){return""+e.formattedCount}),r("c901f4b8",function(e){return"\u30df\u30e5\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8"}),r("a8aeb17c",function(e){return"\u30d6\u30ed\u30c3\u30af\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8"}),r("eb2a0213","\u30c4\u30a4\u30fc\u30c8\u3068Fleet"),r("h9fa2c25","Fleet"),r("f12d439f","DM"),r("c65cffee","\u4eba\u53e3\u7279\u6027"),r("dc8c70b9","\u8208\u5473\u95a2\u5fc3"),r("hd7191b2","\u5e83\u544a\u4e3b\u30ea\u30b9\u30c8"),r("d5924f36","\u4fdd\u5b58\u3057\u305f\u691c\u7d22"),r("i91e3f1b","\u4eba\u53e3\u7279\u6027\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093"),r("f12a13a0","\u751f\u5e74\u6708\u65e5"),r("e7d7128c","Twitter\u30c7\u30fc\u30bf"),r("fc1f2690","\uff08\u7121\u52b9)"),r("bac9bfd9","\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u4e00\u81f4\u3059\u308b\u8208\u5473\u95a2\u5fc3\u306f\u307e\u3060\u3042\u308a\u307e\u305b\u3093\u3002"),r("d6281c2a","\u30d5\u30a9\u30ed\u30fc\u3092\u89e3\u9664\u3057\u307e\u3057\u305f"),r("aae750cb","\u8a2d\u5b9a\u3092\u5909\u66f4"),r("ac8b1c8a","\u3042\u306a\u305f\u3092\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u306b\u8ffd\u52a0\u3057\u3066\u3044\u308b\u5e83\u544a\u4e3b\u3067\u3059\u3002\u30c6\u30a4\u30e9\u30fc\u30c9\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u306f\u591a\u304f\u306e\u5834\u5408\u30e1\u30fc\u30eb\u30ea\u30b9\u30c8\u3084\u95b2\u89a7\u5185\u5bb9\u304b\u3089\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5e83\u544a\u4e3b\u306f\u898b\u8fbc\u307f\u5ba2\u3084\u30d3\u30b8\u30cd\u30b9\u306b\u3059\u3067\u306b\u95a2\u5fc3\u3092\u793a\u3057\u3066\u3044\u308b\u5229\u7528\u8005\u306b\u30ea\u30fc\u30c1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002"),r("j69ff9c4","\u5e83\u544a\u8a2d\u5b9a\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093"),r("g443f4cb","\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u5834\u6240\u306f\u3042\u308a\u307e\u305b\u3093\u3002"),r("b2289376","[\u4f4d\u7f6e\u60c5\u5831] \u8a2d\u5b9a"),r("h27aca22","\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u691c\u7d22\u306f\u3042\u308a\u307e\u305b\u3093\u3002");var f=a(0);r("I18NFormatMessage",function(e){var t,a,r,n,d;function b(){return e.apply(this,arguments)||this}return a=e,(t=b).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,b.prototype.render=function(){return f.createElement.apply(f,this[this.props.$i18n].reduce(this.templateReducer,[f.Fragment,null]))},r=b,(n=[{key:"a68bfcab",get:function(){return["\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u3084\u308a\u306a\u304a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30a8\u30e9\u30fc\u304c\u89e3\u6c7a\u3055\u308c\u306a\u3044\u5834\u5408\u306f\u3001","\u3057\u3066\u304f\u3060\u3055\u3044\u3002"]}},{key:"aeedc89f",get:function(){return["\u3053\u306e\u60c5\u5831\u306f\u3001\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u5834\u5408\u306f\u3001\u30c7\u30fc\u30bf\u30d5\u30a9\u30eb\u30c0\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u5404\u30c7\u30fc\u30bf\u306e\u8aac\u660e\u306f\u3001\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306e","\u30d5\u30a1\u30a4\u30eb\u306b\u3042\u308a\u307e\u3059\u3002"]}},{key:"b192a8c3",get:function(){return["\u3053\u306e\u60c5\u5831\u306f\u3001\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u5834\u5408\u306f\u3001","\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u5404\u30c7\u30fc\u30bf\u306e\u8aac\u660e\u306f\u3001\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306e","\u30d5\u30a1\u30a4\u30eb\u306b\u3042\u308a\u307e\u3059\u3002"]}},{key:"db457a34",get:function(){return["\u30a2\u30fc\u30ab\u30a4\u30d6\u306e\u30c7\u30fc\u30bf\u91cf\u304c50GB\u3092\u8d85\u3048\u305f\u305f\u3081\u3001\u3053\u306e\u30d3\u30e5\u30fc\u306b\u306f\u8868\u793a\u3067\u304d\u307e\u305b\u3093\u3002","\u3067\u306f\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002"]}},{key:"dc274341",get:function(){return["\u4e00\u90e8\u307e\u305f\u306f\u3059\u3079\u3066\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u30c7\u30fc\u30bf\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u30a2\u30af\u30bb\u30b9\u6a29\u306e\u7a2e\u985e\u3068\u4ed8\u4e0e\u65e5\u6642\u3082\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30a2\u30d7\u30ea\u3068\u30ed\u30b0\u30a4\u30f3\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306f\u3001","\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002"]}},{key:"d3d0737a",get:function(){return["Twitter\u3067\u77e5\u308a\u5408\u3044\u3092\u898b\u3064\u3051\u305f\u308a\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u9023\u7d61\u5148\u3067\u3059\u3002\u9023\u7d61\u5148\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001","\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002"]}},{key:"e48e7ad9",get:function(){return["\u6700\u8fd1\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u306e\u3042\u3063\u305f\u65e5\u6642\u3067\u3059\u3002\u30a2\u30d7\u30ea\u306b\u3088\u308b\u4e0d\u5be9\u306a\u64cd\u4f5c\u304c\u3042\u308b\u5834\u5408\u306f\u3001","\u3002"]}},{key:"b4f3e44c",get:function(){return["\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u9023\u643a\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u3084Twitter\u4f7f\u7528\u6642\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u542b\u3080\u3001\u30ed\u30b0\u30a4\u30f3\u5c65\u6b74\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002IP\u30a2\u30c9\u30ec\u30b9\u306e\u4f4d\u7f6e\u60c5\u5831\u306f\u5b9f\u969b\u306b\u3044\u308b\u5834\u6240\u3068\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u8a73\u7d30\u306f\u3001","\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002"]}},{key:"b2e7db9d",get:function(){return["\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306e\u60c5\u5831\u3067\u3059\u3002","\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4e00\u90e8\u306e\u60c5\u5831\u306f\u30d5\u30a9\u30ed\u30ef\u30fc\u306b\u306e\u307f\u8868\u793a\u3055\u308c\u307e\u3059\u3002"]}},{key:"b0d29d01",get:function(){return["","\u3055\u3093\u304c\u52d5\u753b\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f"]}},{key:"a0be60c5",get:function(){return["","\u3055\u3093\u304c\u753b\u50cf\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f"]}},{key:"edc8b99e",get:function(){return["\u30b0\u30eb\u30fc\u30d7\u540d\u3092\u300c","\u300d\u306b\u5909\u66f4\u3057\u307e\u3057\u305f"]}},{key:"e9fdcd1a",get:function(){return["","\u3055\u3093\u304c\u30b0\u30eb\u30fc\u30d7\u540d\u3092\u300c","\u300d\u306b\u5909\u66f4\u3057\u307e\u3057\u305f"]}},{key:"gbde7c07",get:function(){return["","\u3055\u3093\u304c","\u3055\u3093\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f"]}},{key:"d668cefe",get:function(){return["","\u3055\u3093\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f"]}},{key:"jfc6c37c",get:function(){return["","\u3055\u3093\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f"]}},{key:"jd175a41",get:function(){return["","\u3055\u3093\u304c\u9000\u51fa\u3057\u307e\u3057\u305f"]}},{key:"f89a35dd",get:function(){return["","\u3055\u3093\u304b\u3089\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f"]}},{key:"bad364ba",get:function(){return["\u30df\u30e5\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3059\u3002\u30df\u30e5\u30fc\u30c8\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u3001","\u3067\u3044\u3064\u3067\u3082\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002"]}},{key:"dad3fe4b",get:function(){return["\u30d6\u30ed\u30c3\u30af\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3059\u3002\u30d6\u30ed\u30c3\u30af\u3057\u3066\u3044\u308b\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u3001","\u3067\u3044\u3064\u3067\u3082\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002"]}},{key:"c1f9cb79",get:function(){return[""," "]}},{key:"fd55c421",get:function(){return[""," "]}},{key:"c42254fb",get:function(){return["\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u4eba\u53e3\u7279\u6027\u30c7\u30fc\u30bf\u3067\u3059\u3002\u304a\u5ba2\u69d8\u304c\u8ffd\u52a0\u3057\u305f\u30c7\u30fc\u30bf\u3068\u63a8\u6e2c\u3055\u308c\u305f\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u306f","\u3067\u5909\u66f4\u3067\u304d\u307e\u3059\u3002"]}},{key:"h58ae65c",get:function(){return["\u304a\u5ba2\u69d8\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3068\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u3001\u30d5\u30a9\u30ed\u30fc\u3057\u3066\u3044\u308b\u30c8\u30d4\u30c3\u30af\u306b\u57fa\u3065\u304f\u304a\u3059\u3059\u3081\u306e\u8208\u5473\u95a2\u5fc3\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u60c5\u5831\u306f\u3001\u8868\u793a\u3055\u308c\u308b\u5e83\u544a\u306a\u3069\u3001Twitter\u306e\u8868\u793a\u5185\u5bb9\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u304a\u5ba2\u69d8\u306e\u3054\u95a2\u5fc3\u3068\u7570\u306a\u308b\u5834\u5408\u306f\u3001","\u3057\u3066\u304f\u3060\u3055\u3044\u3002"]}},{key:"fbcd7d5d",get:function(){return["\u304a\u5ba2\u69d8\u306e\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306b\u57fa\u3065\u3044\u3066Twitter\u306b\u3088\u308a\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u5834\u6240\u3067\u3059\u3002\u3053\u306e\u30c7\u30fc\u30bf\u306f\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u306e","\u3067\u524a\u9664\u3067\u304d\u307e\u3059\u3002","\u3067\u306f\u3001\u4f4d\u7f6e\u60c5\u5831\u5c65\u6b74\u306e\u5229\u7528\u65b9\u6cd5\u3092\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002"]}},{key:"templateReducer",get:function(){var e=f.Children.toArray(this.props.children);return function(t,a,r){return t.concat(a,e[r])}}}])&&c(r.prototype,n),d&&c(r,d),b}(a(1).I18NFormatMessage||f.Component));var n=a(6);a(8),a(9),a(10);n._validateParameterTypeNumber,n._validateParameterPresence;var d=n._numberRound,b=(n._numberFormat,n._numberFormatterFn),o=n._pluralGeneratorFn,u=(n._validateParameterTypeDate,n._dateToPartsFormat,n._dateToPartsFormatterFn),i=(n._dateFormat,n._dateFormatterFn);n.a291876510=b(["",,1,0,1,,,,3,,"","#,##0.###","-#,##0.###","-","",d(),"\u221e","NaN",{".":".",",":",","%":"%","+":"+","-":"-",E:"E","\u2030":"\u2030"},,{3:{other:"0"},4:{other:"0\u4e07"},5:{other:"00\u4e07"},6:{other:"000\u4e07"},7:{other:"0000\u4e07"},8:{other:"0\u5104"},9:{other:"00\u5104"},10:{other:"000\u5104"},11:{other:"0000\u5104"},12:{other:"0\u5146"},13:{other:"00\u5146"},14:{other:"000\u5146"},maxExponent:14}],n("ja").pluralGenerator({})),n.b337246344=b(["",,1,0,3,,,,3,,"","#,##0.###","-#,##0.###","-","",d(),"\u221e","NaN",{".":".",",":",","%":"%","+":"+","-":"-",E:"E","\u2030":"\u2030"}]),n.b1690961346=b(["",,1,0,0,,,,,,"","0","-0","-","",d(),"\u221e","NaN",{".":".",",":",","%":"%","+":"+","-":"-",E:"E","\u2030":"\u2030"}]),n.b879863466=b(["",,2,0,0,,,,,,"","00","-00","-","",d(),"\u221e","NaN",{".":".",",":",","%":"%","+":"+","-":"-",E:"E","\u2030":"\u2030"}]),n.a1793486118=o(function(e){return"other"}),n.a1440939983=u({1:n("ja").numberFormatter({raw:"0"}),2:n("ja").numberFormatter({raw:"00"})},{pattern:"y\u5e74M\u6708d\u65e5 H:mm:ss z",timeSeparator:":",gmtFormat:"GMT{0}",gmtZeroFormat:"GMT",hourFormat:["+H;-H","+H:mm;-H:mm"]}),n.b259057404=u({},{pattern:"ccccc",timeSeparator:":",days:{c:{5:{sun:"\u65e5",mon:"\u6708",tue:"\u706b",wed:"\u6c34",thu:"\u6728",fri:"\u91d1",sat:"\u571f"}}}}),n.b566229254=u({1:n("ja").numberFormatter({raw:"0"})},{pattern:"M\u6708",timeSeparator:":"}),n.a727690807=u({1:n("ja").numberFormatter({raw:"0"})},{pattern:"y\u5e74M\u6708d\u65e5",timeSeparator:":"}),n.a1947247032=u({1:n("ja").numberFormatter({raw:"0"}),2:n("ja").numberFormatter({raw:"00"})},{pattern:"aK:mm",timeSeparator:":",dayPeriods:{am:"\u5348\u524d",pm:"\u5348\u5f8c"}}),n.b704686638=u({1:n("ja").numberFormatter({raw:"0"}),2:n("ja").numberFormatter({raw:"00"})},{pattern:"y\u5e74M\u6708d\u65e5 aK:mm",timeSeparator:":",dayPeriods:{am:"\u5348\u524d",pm:"\u5348\u5f8c"}}),n.b534115262=u({1:n("ja").numberFormatter({raw:"0"})},{pattern:"y\u5e74M\u6708d\u65e5",timeSeparator:":"}),n.a1049532902=i(n("ja").dateToPartsFormatter({datetime:"long"})),n.a492224973=i(n("ja").dateToPartsFormatter({skeleton:"ccccc"})),n.b717402621=i(n("ja").dateToPartsFormatter({skeleton:"MMM"})),n.a1478973184=i(n("ja").dateToPartsFormatter({skeleton:"yMMMd"})),n.a1111086479=i(n("ja").dateToPartsFormatter({skeleton:"hm"})),n.b276828069=i(n("ja").dateToPartsFormatter({skeleton:"yMMMdhm"})),n.a367806937=i(n("ja").dateToPartsFormatter({date:"long"})),r("f9e9679f",n.a291876510),r("ia24dc8c",n.b337246344),r("a54d3ef4",n.a1049532902),r("cad3f89f",n.a492224973),r("f3f5ce0b",n.b717402621),r("jade381b",n.a1478973184),r("d725a288",n.a1111086479),r("bfbc051c",n.b276828069),r("ba2e82a1",n.a367806937)}}]);
26,700
26,700
0.756929
ac9d4a142e4a32b822839e2148339e31ae3f0094
2,022
js
JavaScript
useless/testing.js
ankushgarg1998/telegram-bot
9e98d13a4a61d7022faaadecef45272803bf1049
[ "MIT" ]
11
2018-05-16T09:26:17.000Z
2021-01-02T07:35:57.000Z
useless/testing.js
ankushgarg1998/telegram-bot
9e98d13a4a61d7022faaadecef45272803bf1049
[ "MIT" ]
2
2018-05-12T10:55:35.000Z
2018-10-21T16:03:41.000Z
useless/testing.js
ankushgarg1998/telegram-bot
9e98d13a4a61d7022faaadecef45272803bf1049
[ "MIT" ]
2
2018-09-17T16:10:20.000Z
2019-07-09T01:56:04.000Z
$.runMenu({ message: 'Select:', layout: [1, 2, 1, 1, 1, 2, 1, 1], '/details': ($) => {this.detailsHandler($)}, //will be on first line 'test2': () => {}, //will be on second line 'test3': () => {}, //will be on second line 'test4': () => {}, //will be on third line 'test5': () => {}, //will be on fourth line 'test6': () => {}, //will be on first line 'test7': () => {}, //will be on second line 'test8': () => {}, //will be on second line 'test9': () => {}, //will be on third line 'test10': () => {}, //will be on fourth line options: { parse_mode: 'Markdown' // in options field you can pass some additional data, like parse_mode }, 'Exit': { message: 'Do you realy want to exit?', resizeKeyboard: true, 'yes': () => { }, 'no': () => { } }, 'anyMatch': () => { //will be executed at any other message } }) $.runInlineMenu({ layout: 2, //some layouting here method: 'sendMessage', //here you must pass the method name params: ['text'], //here you must pass the parameters for that method menu: [ { text: '1', //text of the button callback: (callbackQuery, message) => { //to your callback will be passed callbackQuery and response from method console.log(1) } }, { text: 'Exit', message: 'Are you sure?', layout: 2, menu: [ //Sub menu (current message will be edited) { text: 'Yes!', callback: () => { } }, { text: 'No!', callback: () => { } } ] } ] }) // FUNCTIONS------------------------------------------------------------ findInSubscribers(chatID) { return dataObj.subscribers.find(subscriber => subscriber.chatID == chatID); }
29.304348
124
0.445598
ac9decc8a8e6c540042441ba964ac87871671b92
2,434
js
JavaScript
src/application/menu/index.js
anasamo92/focus-components-updated
8eaaa5c26a5cedb843dd51ba042682a2bf6abc80
[ "MIT" ]
null
null
null
src/application/menu/index.js
anasamo92/focus-components-updated
8eaaa5c26a5cedb843dd51ba042682a2bf6abc80
[ "MIT" ]
null
null
null
src/application/menu/index.js
anasamo92/focus-components-updated
8eaaa5c26a5cedb843dd51ba042682a2bf6abc80
[ "MIT" ]
null
null
null
import React from 'react'; // Dependencies import builder from 'focus-core-updated/component/builder'; import historic from 'focus-core-updated/history'; import types from 'focus-core-updated/component/types'; // Mixins import { mixin as popinProperties } from '../mixin/popin-behaviour'; import stylabe from '../../mixin/stylable' // Components import Button from '../../components/button'; const Menu = { mixins: [stylabe, popinProperties],/** @inheritedProps*/ componentWillMount() { console.warn('FocusComponents 2.2.0: this component is deprecated, please use component from focus-components-updated/components/menu'); }, /** @inheritedProps*/ getDefaultProps() { return { items: [] }; }, /** @inheritedProps*/ propTypes: { code: types('array') }, /** * Toggle the state of the menu. */ toggle() { this.setState({ open: !this.state.open }); }, /** * Render the links of the menu */ _renderMenuItems() { return this.props.items.map((link, idx) => { let clickHandler; if (link.route !== undefined) { clickHandler = () => { if (link.onClick) link.onClick.call(this, arguments); historic.navigate(link.route, true); }; } else { clickHandler = link.onClick; } const buttonProps = { option: 'link', shape: 'icon', type: 'button', ...link }; return ( <li key={idx} onClick={clickHandler}> <Button {...buttonProps} /> <span>{link.name}</span> </li> ); }); }, /** @inheriteddoc */ render() { const { direction, position, children } = this.props; const className = `menu menu-${direction} menu-${position} menu-${this.state.open ? 'open' : ''} ${this._getStyleClassName()}`; return ( <nav className={className} data-focus='menu'> <div data-focus='menu-brand' /> <ul data-focus='menu-items'>{this._renderMenuItems()}</ul> {children} </nav> ); } }; const { mixin, component } = builder(Menu); export { mixin, component }; export default { mixin, component };
31.205128
144
0.52424
ac9df0da334a5207d678778bef7c9f9c10859647
4,661
js
JavaScript
src/main/js/MergedFGDraw.js
isabella232/FGrav
27262fd27f52ddbc4d29feef2ddb105c8f98e310
[ "Apache-2.0" ]
null
null
null
src/main/js/MergedFGDraw.js
isabella232/FGrav
27262fd27f52ddbc4d29feef2ddb105c8f98e310
[ "Apache-2.0" ]
1
2021-02-24T03:23:49.000Z
2021-02-24T03:23:49.000Z
src/main/js/MergedFGDraw.js
isabella232/FGrav
27262fd27f52ddbc4d29feef2ddb105c8f98e310
[ "Apache-2.0" ]
null
null
null
/************************************************************************ Copyright 2020 eBay Inc. Author/Developer: Amir Langer Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://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. **************************************************************************/ function MergedFGDraw(fg, collapsed, visualDiff, _d) { FGDraw.call(this, fg, _d); this.visualDiff = visualDiff; this.collapsed = collapsed; fg.g_details = function (g) { var attr = find_child(g, "text").attributes; var name = attr.name.value; // var samples = parseInt(attr.samples.value); var samples = attr.samples.value; var details = name + " ([" + samples + "] samples, ["; $.each(samples.split(","), function (i) { if (i > 0) { details = details + ","; } details = details + percentage(parseInt(this), collapsed.totalIndividualSamples[i]) + "%"; }); details = details + "])"; return detailsText(escText(details), details); }; colorScheme = new FG_Color_Diff(); } MergedFGDraw.prototype = Object.create(FGDraw.prototype); MergedFGDraw.prototype.constructor = MergedFGDraw; MergedFGDraw.prototype.drawFrame = function (f) { var draw = this; if (f.stack === ";all") { f.individualSamples = draw.collapsed.totalIndividualSamples; } var x = f.x() + draw.fg.shiftWidth; var w = f.w(); var y = f.y() + draw.fg.shiftHeight; var element = draw.d.createElementNS("http://www.w3.org/2000/svg", "g"); if (draw.fg.id) { element.setAttribute("id", draw.fg.namePerFG(f.stack)); } var frameRect; if (draw.visualDiff) { var p0 = percentage(f.individualSamples[0], draw.collapsed.totalIndividualSamples[0]); var p1 = percentage(f.individualSamples[1], draw.collapsed.totalIndividualSamples[1]); var diff = p0 - p1; frameRect = drawRect(x, y, w, function (el) { el.setAttribute("fill", "white"); }); if (diff !== 0) { diff = (diff < 0) ? diff / p1 : diff / p0; var diffW = w * Math.abs(diff); var diffRect = drawRect(x, y, diffW, colorScheme.applyColor(f, draw.collapsed.totalIndividualSamples)); } } else { frameRect = drawRect(x, y, w, colorScheme.applyColor(f, draw.collapsed.totalIndividualSamples)); } var textInFrame = draw.frameText(draw, f.name, w - 2, draw.fg.fontSize); var frameText = draw.text(textInFrame, undefined, x + 2, y + draw.fg.textPadding); frameText.setAttribute("orig", textInFrame); frameText.setAttribute("name", f.name); frameText.setAttribute("samples", f.individualSamples); element.appendChild(frameRect); if (diffRect) { element.appendChild(diffRect); } element.appendChild(frameText); return element; function drawRect(x, y, w, styleFunction) { var frameRect = draw.rect(x, y, w, draw.fg.frameHeight - 1, styleFunction); frameRect.setAttribute("rx", "2"); frameRect.setAttribute("ry", "2"); return frameRect; } }; function percentage(samples, total) { return Math.floor(samples * 10000 / total) / 100; } function FG_Color_Diff() { FG_Color.call(this); this.legend = { red: 'Growth', blue: 'Reduction' }; } FG_Color_Diff.prototype = Object.create(FG_Color.prototype); FG_Color_Diff.prototype.constructor = FG_Color_Diff; FG_Color_Diff.prototype.colorFor = function(frame, totalSamples) { var p0 = percentage(frame.individualSamples[0], totalSamples[0]); var p1 = percentage(frame.individualSamples[1], totalSamples[1]); var diff = p0 - p1; if (diff === 0) { return "white"; } diff = (diff < 0) ? diff / p1 : diff / p0; var variance = Math.floor(diff * diff * 255); var r; var b; var g = 255 - variance; if (diff < 0) { r = 255; b = 255 - variance; } else { b = 255; r = 255 - variance; } return "rgb(" + r + "," + g + "," + b + ")"; function percentage(samples, total) { return Math.floor(samples * 10000 / total) / 100; } };
34.021898
115
0.602875