text
stringlengths 2
1.05M
|
|---|
module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-sass`,
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
`gatsby-remark-copy-linked-files`,
// @TODO add when fixed...
{
resolve: `gatsby-remark-images`,
options: {
// It's important to specify the maxWidth (in pixels) of
// the content container as this plugin uses this as the
// base for generating different widths of each image.
maxWidth: 1400,
// Remove the default behavior of adding a link to each
// image.
linkImagesToOriginal: false,
},
},
]
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`,
},
},
],
}
|
import React,{useState} from 'react'
import "../../nav.css"
import axios from 'axios';
import base_url from '../api'
import { ToastContainer, toast } from 'react-toastify';
import {Link, useHistory} from "react-router-dom";
import {Button} from "react-bootstrap";
import "../../custom.css";
export default function AddEmployee() {
const notify = () => toast.success("Employee added successfully", {autoClose:2000});
const history = useHistory();
const [name,setName]=useState('');
const [waddress,setWaddress]=useState('');
const [wmobile,setWmobile]=useState('');
const [wemail,setWemail]=useState('');
const [wlocation,setWlocation]=useState('');
const [wphone,setWphone]=useState('');
const [password,setPassword]=useState('');
const [roles,setRoles]=useState('');
const [department,setDepartment]=useState('');
const [jobTitle,setJobTitle]=useState('');
const [manager,setManager]=useState('');
const [coach,setCoach]=useState('');
const [nationality,setNationality]=useState('');
const [identificationNo,setIdentificationNo]=useState('');
const [passport,setPassport]=useState('');
const [bankAccountNo,setBankAccountNo]=useState('');
const [gender,setGender]=useState('');
const [maritalStatus,setMaritalStatus]=useState('');
const [homeAddress,setHomeAddress]=useState('');
const [dateOfBirth,setDateOfBirth]=useState('');
async function tagSubmit(e){
const regex =
/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
if((name!="" || wemail!="") && regex.test(wemail)){
e.preventDefault();
const data = {
'username':name,
'workingAddress':waddress,
'workMobile':wmobile,
'workEmail':wemail,
'workLocation':wlocation,
'workPhone':wphone,
'gender': gender,
'password': password,
'roles': roles,
'department': department,
'jobTitle': jobTitle,
'manager': manager,
'coach': coach,
'nationality': nationality,
'identificationNo': identificationNo,
'passport': passport,
'bankAccountNo': bankAccountNo,
'maritalStatus': maritalStatus,
'homeAddress': homeAddress,
'dateOfBirth': dateOfBirth
};
axios.post(`${base_url}/employees/emp`, data)
.then(async (response) => {
setName("");
setWemail("");
setWmobile("");
setWaddress("");
setWlocation("");
setWphone("");
notify();
await new Promise(resolve => setTimeout(resolve, 2000));
history.push("/employee");
}).catch((err) => {
console.log( err.data );
});
}
else{
alert("all fields are required or put a valid email address");
}
}
return (
<div className='py-5'>
<h2 className="text-center">Add Employee</h2>
<ToastContainer />
<form onSubmit={tagSubmit}>
{/*<label for="fname" style={{ fontSize:"20px"}}>Id</label>*/}
{/*<input type="text" id="fname" name="id" value={id} onChange={(e)=>setId(e.target.value)} />*/}
<div className="d-flex align-items-center">
<label htmlFor="name" style={{fontSize: "15px", margin:"0 20px"}}>Name</label>
<input type="text" id="name" name="name" value={name} onChange={(e) => setName(e.target.value)}/>
<label htmlFor="password" style={{fontSize: "15px", margin:"0 20px"}}>Password</label>
<input type="text" id="password" name="password" value={password}
onChange={(e) => setPassword(e.target.value)}/>
<label htmlFor="roles" style={{fontSize: "15px", margin:"0 20px"}}>Roles</label>
<input type="text" id="roles" name="roles" value={roles}
onChange={(e) => setRoles(e.target.value)}/>
</div>
<h3>Contact Information</h3>
<div className="d-flex align-items-center">
<label htmlFor="workAddress" style={{fontSize: "15px", margin:"0 20px"}}>Work Address</label>
<input type="text" id="workAddress" name="waddress" value={waddress}
onChange={(e) => setWaddress(e.target.value)}/>
<label htmlFor="workEmail" style={{fontSize: "15px", margin:"0 20px"}}>Work Email</label>
<input type="text" id="workEmail" name="wemail" value={wemail} onChange={(e) => setWemail(e.target.value)}/>
<label htmlFor="workLocation" style={{fontSize: "15px", margin:"0 20px"}}>Work Location</label>
<input type="text" id="workLocation" name="wlocation" value={wlocation}
onChange={(e) => setWlocation(e.target.value)}/>
</div>
<div className="d-flex align-items-center">
<label htmlFor="workMobile" style={{fontSize: "15px", margin:"0 20px"}}>Work Mobile</label>
<input type="text" id="workMobile" name="wmobile" value={wmobile}
onChange={(e) => setWmobile(e.target.value)}/>
<label htmlFor="workPhone" style={{fontSize: "15px", margin:"0 20px"}}>Work Phone</label>
<input type="text" id="workPhone" name="wphone" value={wphone}
onChange={(e) => setWphone(e.target.value)}/>
</div>
<h3>Position</h3>
<div className="d-flex align-items-center">
</div>
<div className="d-flex align-items-center">
<label htmlFor="jobTitle" style={{fontSize: "15px", margin:"0 20px"}}>Job Title</label>
<input type="text" id="jobTitle" name="jobTitle" value={jobTitle}
onChange={(e) => setJobTitle(e.target.value)}/>
<label htmlFor="manager" style={{fontSize: "15px", margin:"0 20px"}}>Manager</label>
<input type="text" id="manager" name="manager" value={manager}
onChange={(e) => setManager(e.target.value)}/>
</div>
<div className="d-flex align-items-center">
<label htmlFor="department" style={{fontSize: "15px", margin:"0 20px"}}>Department</label>
<input type="text" id="department" name="department" value={department}
onChange={(e) => setDepartment(e.target.value)}/>
<label htmlFor="coach" style={{fontSize: "15px", margin:"0 20px"}}>Coach</label>
<input type="text" id="coach" name="coach" value={coach}
onChange={(e) => setCoach(e.target.value)}/>
</div>
<h3>Citizenship and Other Information</h3>
<div className="d-flex align-items-center">
<label htmlFor="nationality" style={{fontSize: "15px", margin:"0 20px"}}>Nationality</label>
<input type="text" id="nationality" name="nationality" value={nationality}
onChange={(e) => setNationality(e.target.value)}/>
<label htmlFor="identificationNo" style={{fontSize: "15px", margin:"0 20px"}}>Identification No</label>
<input type="text" id="identificationNo" name="identificationNo" value={identificationNo}
onChange={(e) => setIdentificationNo(e.target.value)}/>
</div>
<div className="d-flex align-items-center">
<label htmlFor="bankAccountNo" style={{fontSize: "15px", margin:"0 20px"}}>Bank Account No</label>
<input type="text" id="bankAccountNo" name="bankAccountNo" value={bankAccountNo}
onChange={(e) => setBankAccountNo(e.target.value)}/>
<label htmlFor="passport" style={{fontSize: "15px", margin:"0 20px"}}>Passport No</label>
<input type="text" id="passport" name="passport" value={passport}
onChange={(e) => setPassport(e.target.value)}/>
</div>
<h3>Status</h3>
<div className="d-flex align-items-center">
<label htmlFor="gender" style={{fontSize: "15px", margin:"0 20px"}}>Gender</label>
<input type="text" id="gender" name="gender" value={gender}
onChange={(e) => setGender(e.target.value)}/>
<label htmlFor="maritalStatus" style={{fontSize: "15px", margin:"0 20px"}}>Marital Status</label>
<input type="text" id="maritalStatus" name="maritalStatus" value={maritalStatus}
onChange={(e) => setMaritalStatus(e.target.value)}/>
</div>
<h3>Contact Info</h3>
<div className="d-flex align-items-center">
<label htmlFor="homeAddress" style={{fontSize: "15px", margin:"0 20px"}}>Home Address</label>
<input type="text" id="homeAddress" name="homeAddress" value={homeAddress}
onChange={(e) => setHomeAddress(e.target.value)}/>
</div>
<h3>Birth</h3>
<div className="d-flex align-items-center">
<label htmlFor="dateOfBirth" style={{fontSize: "15px", margin:"0 20px"}}>Date of Birth</label>
<input type="text" id="dateOfBirth" name="dateOfBirth" value={dateOfBirth}
onChange={(e) => setDateOfBirth(e.target.value)}/>
</div>
<input type="submit" value="Submit" style={{ backgroundColor:"blue",fontSize:"22px", borderRadius:"10px", padding:"10px", color:"white"}}/>
<Button type="button" className="m-3">
<Link to={"/employee"} style={{color: "white", textDecoration: "none"}}>Cancel</Link></Button>
</form>
</div>
)
}
|
const {
doc: {
builders: { group, indent, line }
}
} = require('prettier');
const printSeparatedList = require('./print-separated-list');
const indexed = (node) => (node.isIndexed ? ' indexed' : '');
const visibility = (node) =>
node.visibility && node.visibility !== 'default'
? [line, node.visibility]
: '';
const constantKeyword = (node) => (node.isDeclaredConst ? ' constant' : '');
const storageLocation = (node) =>
node.storageLocation && node.visibility !== 'default'
? [line, node.storageLocation]
: '';
const immutable = (node) => (node.isImmutable ? ' immutable' : '');
const isStatic = (node) => (node.isStatic ? ' static' : '');
const override = (node, path, print) => {
if (!node.override) return '';
if (node.override.length === 0) return [line, 'override'];
return [
line,
'override(',
printSeparatedList(path.map(print, 'override')),
')'
];
};
const name = (node) => (node.name ? [' ', node.name] : '');
const VariableDeclaration = {
print: ({ node, path, print }) =>
node.typeName
? group([
path.call(print, 'typeName'),
indent([
indexed(node),
visibility(node),
constantKeyword(node),
storageLocation(node),
immutable(node),
isStatic(node),
override(node, path, print),
name(node)
])
])
: node.name
};
module.exports = VariableDeclaration;
|
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Icon } from './elements/global'
export default class Pagination extends Component {
static propTypes = {
gotoPage: PropTypes.func.isRequired,
page: PropTypes.number,
pageCount: PropTypes.number.isRequired,
pageResultCount: PropTypes.number.isRequired,
perPage: PropTypes.number.isRequired,
resultsMeta: PropTypes.object.isRequired,
resultsMode: PropTypes.string.isRequired,
setPerPage: PropTypes.func.isRequired,
totalResultsCount: PropTypes.number.isRequired,
}
gotoPreviousPage = () => this.props.gotoPage(Math.max(1, this.props.page - 1))
gotoNextPage = () => this.props.gotoPage(Math.min(this.props.pageCount, this.props.page + 1))
setPerPage = (e) => this.props.setPerPage(Number(e.target.value))
renderSimpleContent (content) {
return (
<div className='content-foot__left'>
{content}
</div>
)
}
render () {
const {
page,
pageCount,
pageResultCount,
perPage,
resultsMeta,
resultsMode,
totalResultsCount,
} = this.props
// Snake case because Python conventions 😢
if (resultsMeta.footer_info) {
return this.renderSimpleContent(resultsMeta.footer_info)
}
if (! page) {
return null
}
if (resultsMode === 'map') {
return this.renderSimpleContent(`Showing ${pageResultCount} results`)
}
return (
<div className='content-foot__left'>
<div className='pagination'>
<div className='pagination__subsection'>
<button
aria-label='Previous'
className='pagination__link pagination__link--prev'
disabled={page === 1}
onClick={this.gotoPreviousPage}
title='Previous'
type='button'
>
<Icon className='pagination__icon' icon='chevron-left' />
</button>
Page {page} of {pageCount}
<button
aria-label='Next'
className='pagination__link pagination__link--next'
disabled={page === pageCount}
onClick={this.gotoNextPage}
title='Next'
type='button'
>
<Icon className='pagination__icon' icon='chevron-right' />
</button>
</div>
<div className='pagination__subsection hidden-mobile'>
Showing {pageResultCount} of {totalResultsCount} results
</div>
<div className='pagination__subsection result-count-form hidden-mobile'>
<div className='form__group form__group--boxed form__group--boxed'>
<label className='result-count-form__label' htmlFor='results-per-page'>
Results per page:
</label>
{' '}
<div className='form__control form__control--select'>
<select className='form__select' value={perPage} onChange={this.setPerPage}>
<option value={25}>25</option>
<option value={50}>50</option>
<option value={75}>75</option>
<option value={100}>100</option>
<option value={150}>150</option>
<option value={200}>200</option>
</select>
</div>
</div>
</div>
</div>
</div>
)
}
}
|
import * as symbols from '../../src/symbols.js';
import * as template from '../../src/template.js';
import ReactiveElement from '../../src/ReactiveElement.js';
class CustomPageDot extends ReactiveElement {
get [symbols.template]() {
return template.html`
<style>
:host {
background: rgb(255, 255, 255);
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.5);
box-sizing: border-box;
cursor: pointer;
height: 12px;
margin: 7px 5px;
padding: 0;
transition: border-color 0.3s, color 0.3s, transform 0.3s !important;
width: 12px;
}
:host(:hover) {
color: rgba(255, 255, 255, 0.8);
cursor: pointer;
transform: scale(1.3);
}
</style>
`;
}
}
customElements.define('custom-page-dot', CustomPageDot);
export default CustomPageDot;
|
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Camera = require('../../cameras/2d/BaseCamera');
var CanvasPool = require('../../display/canvas/CanvasPool');
var Class = require('../../utils/Class');
var Components = require('../components');
var CONST = require('../../const');
var Frame = require('../../textures/Frame');
var GameObject = require('../GameObject');
var Render = require('./RenderTextureRender');
var UUID = require('../../utils/string/UUID');
/**
* @classdesc
* A Render Texture.
*
* @class RenderTexture
* @extends Phaser.GameObjects.GameObject
* @memberOf Phaser.GameObjects
* @constructor
* @since 3.2.0
*
* @extends Phaser.GameObjects.Components.Alpha
* @extends Phaser.GameObjects.Components.BlendMode
* @extends Phaser.GameObjects.Components.ComputedSize
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.Flip
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.ScrollFactor
* @extends Phaser.GameObjects.Components.Tint
* @extends Phaser.GameObjects.Components.Transform
* @extends Phaser.GameObjects.Components.Visible
*
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
* @param {number} [x=0] - The horizontal position of this Game Object in the world.
* @param {number} [y=0] - The vertical position of this Game Object in the world.
* @param {integer} [width=32] - The width of the Render Texture.
* @param {integer} [height=32] - The height of the Render Texture.
*/
var RenderTexture = new Class({
Extends: GameObject,
Mixins: [
Components.Alpha,
Components.BlendMode,
Components.ComputedSize,
Components.Crop,
Components.Depth,
Components.Flip,
Components.GetBounds,
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.ScrollFactor,
Components.Tint,
Components.Transform,
Components.Visible,
Render
],
initialize:
function RenderTexture (scene, x, y, width, height)
{
if (x === undefined) { x = 0; }
if (y === undefined) { y = 0; }
if (width === undefined) { width = 32; }
if (height === undefined) { height = 32; }
GameObject.call(this, scene, 'RenderTexture');
/**
* A reference to either the Canvas or WebGL Renderer that the Game instance is using.
*
* @name Phaser.GameObjects.RenderTexture#renderer
* @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}
* @since 3.2.0
*/
this.renderer = scene.sys.game.renderer;
/**
* A reference to the Texture Manager.
*
* @name Phaser.GameObjects.RenderTexture#textureManager
* @type {Phaser.Textures.TextureManager}
* @since 3.12.0
*/
this.textureManager = scene.sys.textures;
/**
* The tint of the Render Texture when rendered.
*
* @name Phaser.GameObjects.RenderTexture#globalTint
* @type {number}
* @default 0xffffff
* @since 3.2.0
*/
this.globalTint = 0xffffff;
/**
* The alpha of the Render Texture when rendered.
*
* @name Phaser.GameObjects.RenderTexture#globalAlpha
* @type {number}
* @default 1
* @since 3.2.0
*/
this.globalAlpha = 1;
/**
* The HTML Canvas Element that the Render Texture is drawing to.
* This is only populated if Phaser is running with the Canvas Renderer.
*
* @name Phaser.GameObjects.RenderTexture#canvas
* @type {HTMLCanvasElement}
* @since 3.2.0
*/
this.canvas = CanvasPool.create2D(this, width, height);
/**
* A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to.
*
* @name Phaser.GameObjects.RenderTexture#context
* @type {CanvasRenderingContext2D}
* @since 3.2.0
*/
this.context = this.canvas.getContext('2d');
/**
* A reference to the GL Frame Buffer this Render Texture is drawing to.
* This is only set if Phaser is running with the WebGL Renderer.
*
* @name Phaser.GameObjects.RenderTexture#framebuffer
* @type {?WebGLFramebuffer}
* @since 3.2.0
*/
this.framebuffer = null;
/**
* The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.
*
* @name Phaser.GameObjects.RenderTexture#_crop
* @type {object}
* @private
* @since 3.12.0
*/
this._crop = this.resetCropObject();
// Create a Texture for this Text object
this.texture = scene.sys.textures.addCanvas(UUID(), this.canvas);
// Get the frame
this.frame = this.texture.get();
/**
* An internal Camera that can be used to move around the Render Texture.
* Control it just like you would any Scene Camera. The difference is that it only impacts the placement of what
* is drawn to the Render Texture. You can scroll, zoom and rotate this Camera.
*
* @name Phaser.GameObjects.RenderTexture#camera
* @type {Phaser.Cameras.Scene2D.BaseCamera}
* @since 3.12.0
*/
this.camera = new Camera(0, 0, width, height);
/**
* Is this Render Texture dirty or not? If not it won't spend time clearing or filling itself.
*
* @name Phaser.GameObjects.RenderTexture#dirty
* @type {boolean}
* @since 3.12.0
*/
this.dirty = false;
/**
* [description]
*
* @name Phaser.GameObjects.RenderTexture#gl
* @type {WebGLRenderingContext}
* @default null
* @since 3.0.0
*/
this.gl = null;
var renderer = this.renderer;
if (renderer.type === CONST.WEBGL)
{
var gl = renderer.gl;
this.gl = gl;
this.drawGameObject = this.batchGameObjectWebGL;
this.framebuffer = renderer.createFramebuffer(width, height, this.frame.source.glTexture, false);
}
else if (renderer.type === CONST.CANVAS)
{
this.drawGameObject = this.batchGameObjectCanvas;
}
this.camera.setScene(scene);
this.setPosition(x, y);
this.setSize(width, height);
this.setOrigin(0, 0);
this.initPipeline('TextureTintPipeline');
},
/**
* Sets the size of this Game Object.
*
* @method Phaser.GameObjects.Components.Size#setSize
* @since 3.0.0
*
* @param {number} width - The width of this Game Object.
* @param {number} height - The height of this Game Object.
*
* @return {this} This Game Object instance.
*/
setSize: function (width, height)
{
return this.resize(width, height);
},
/**
* Resizes the Render Texture to the new dimensions given.
*
* In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture.
* In Canvas it will resize the underlying canvas element.
* Both approaches will erase everything currently drawn to the Render Texture.
*
* If the dimensions given are the same as those already being used, calling this method will do nothing.
*
* @method Phaser.GameObjects.RenderTexture#resize
* @since 3.10.0
*
* @param {number} width - The new width of the Render Texture.
* @param {number} [height] - The new height of the Render Texture. If not specified, will be set the same as the `width`.
*
* @return {this} This Render Texture.
*/
resize: function (width, height)
{
if (height === undefined) { height = width; }
if (width !== this.width || height !== this.height)
{
if (this.canvas)
{
this.canvas.width = width;
this.canvas.height = height;
}
else
{
var gl = this.gl;
this.renderer.deleteTexture(this.frame.source.glTexture);
this.renderer.deleteFramebuffer(this.framebuffer);
this.frame.source.glTexture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false);
this.framebuffer = this.renderer.createFramebuffer(width, height, this.texture, false);
this.frame.glTexture = this.frame.source.glTexture;
}
this.camera.setSize(width, height);
this.frame.setSize(width, height);
this.width = width;
this.height = height;
}
return this;
},
/**
* Set the tint to use when rendering this Render Texture.
*
* @method Phaser.GameObjects.RenderTexture#setGlobalTint
* @since 3.2.0
*
* @param {integer} tint - The tint value.
*
* @return {this} This Render Texture.
*/
setGlobalTint: function (tint)
{
this.globalTint = tint;
return this;
},
/**
* Set the alpha to use when rendering this Render Texture.
*
* @method Phaser.GameObjects.RenderTexture#setGlobalAlpha
* @since 3.2.0
*
* @param {number} alpha - The alpha value.
*
* @return {this} This Render Texture.
*/
setGlobalAlpha: function (alpha)
{
this.globalAlpha = alpha;
return this;
},
/**
* Stores a copy of this Render Texture in the Texture Manager using the given key.
*
* After doing this, any texture based Game Object, such as a Sprite, can use the contents of this
* Render Texture by using the texture key:
*
* ```javascript
* var rt = this.add.renderTexture(0, 0, 128, 128);
*
* // Draw something to the Render Texture
*
* rt.saveTexture('doodle');
*
* this.add.image(400, 300, 'doodle');
* ```
*
* Updating the contents of this Render Texture will automatically update _any_ Game Object
* that is using it as a texture. Calling `saveTexture` again will not save another copy
* of the same texture, it will just rename the key of the existing copy.
*
* By default it will create a single base texture. You can add frames to the texture
* by using the `Texture.add` method. After doing this, you can then allow Game Objects
* to use a specific frame from a Render Texture.
*
* @method Phaser.GameObjects.RenderTexture#saveTexture
* @since 3.12.0
*
* @param {string} key - The unique key to store the texture as within the global Texture Manager.
*
* @return {Phaser.Textures.Texture} The Texture that was saved.
*/
saveTexture: function (key)
{
this.textureManager.renameTexture(this.texture.key, key);
return this.texture;
},
/**
* Fills the Render Texture with the given color.
*
* @method Phaser.GameObjects.RenderTexture#fill
* @since 3.2.0
*
* @param {number} rgb - The color to fill the Render Texture with.
* @param {number} [alpha=1] - The alpha value used by the fill.
*
* @return {this} This Render Texture instance.
*/
fill: function (rgb, alpha)
{
if (alpha === undefined) { alpha = 1; }
var ur = ((rgb >> 16)|0) & 0xff;
var ug = ((rgb >> 8)|0) & 0xff;
var ub = (rgb|0) & 0xff;
if (this.gl)
{
this.renderer.setFramebuffer(this.framebuffer);
var gl = this.gl;
gl.clearColor(ur / 255.0, ug / 255.0, ub / 255.0, alpha);
gl.clear(gl.COLOR_BUFFER_BIT);
this.renderer.setFramebuffer(null);
}
else
{
this.context.fillStyle = 'rgb(' + ur + ',' + ug + ',' + ub + ')';
this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
}
return this;
},
/**
* Clears the Render Texture.
*
* @method Phaser.GameObjects.RenderTexture#clear
* @since 3.2.0
*
* @return {this} This Render Texture instance.
*/
clear: function ()
{
if (this.dirty)
{
if (this.gl)
{
this.renderer.setFramebuffer(this.framebuffer);
var gl = this.gl;
gl.clearColor(0, 0, 0, 0);
gl.clear(gl.COLOR_BUFFER_BIT);
this.renderer.setFramebuffer(null);
}
else
{
var ctx = this.context;
ctx.save();
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
ctx.restore();
}
this.dirty = false;
}
return this;
},
/**
* Draws the given object, or an array of objects, to this Render Texture.
*
* It can accept any of the following:
*
* * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.
* * Dynamic and Static Tilemap Layers.
* * A Group. The contents of which will be iterated and drawn in turn.
* * A Container. The contents of which will be iterated fully, and drawn in turn.
* * A Scene's Display List. Pass in `Scene.children` to draw the whole list.
* * Another Render Texture.
* * A Texture Frame instance.
* * A string. This is used to look-up a texture from the Texture Manager.
*
* Note: You cannot draw a Render Texture to itself.
*
* If passing in a Group or Container it will only draw children that return `true`
* when their `willRender()` method is called. I.e. a Container with 10 children,
* 5 of which have `visible=false` will only draw the 5 visible ones.
*
* If passing in an array of Game Objects it will draw them all, regardless if
* they pass a `willRender` check or not.
*
* You can pass in a string in which case it will look for a texture in the Texture
* Manager matching that string, and draw the base frame. If you need to specify
* exactly which frame to draw then use the method `drawFrame` instead.
*
* You can pass in the `x` and `y` coordinates to draw the objects at. The use of
* the coordinates differ based on what objects are being drawn. If the object is
* a Group, Container or Display List, the coordinates are _added_ to the positions
* of the children. For all other types of object, the coordinates are exact.
*
* The `alpha` and `tint` values are only used by Texture Frames.
* Game Objects use their own alpha and tint values when being drawn.
*
* Calling this method causes the WebGL batch to flush, so it can write the texture
* data to the framebuffer being used internally. The batch is flushed at the end,
* after the entries have been iterated. So if you've a bunch of objects to draw,
* try and pass them in an array in one single call, rather than making lots of
* separate calls.
*
* @method Phaser.GameObjects.RenderTexture#draw
* @since 3.2.0
*
* @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.
* @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.
* @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.
* @param {number} [alpha] - The alpha value. Only used for Texture Frames and if not specified defaults to the `globalAlpha` property. Game Objects use their own current alpha value.
* @param {number} [tint] - WebGL only. The tint color value. Only used for Texture Frames and if not specified defaults to the `globalTint` property. Game Objects use their own current tint value.
*
* @return {this} This Render Texture instance.
*/
draw: function (entries, x, y, alpha, tint)
{
if (alpha === undefined) { alpha = this.globalAlpha; }
if (tint === undefined)
{
tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);
}
else
{
tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);
}
if (!Array.isArray(entries))
{
entries = [ entries ];
}
var gl = this.gl;
this.camera.preRender(1, 1, 1);
if (gl)
{
this.renderer.setFramebuffer(this.framebuffer);
var pipeline = this.pipeline;
pipeline.projOrtho(0, this.width, 0, this.height, -1000.0, 1000.0);
this.batchList(entries, x, y, alpha, tint);
pipeline.flush();
this.renderer.setFramebuffer(null);
pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);
}
else
{
this.renderer.setContext(this.context);
this.batchList(entries, x, y, alpha, tint);
this.renderer.setContext();
}
this.dirty = true;
return this;
},
/**
* Draws the Texture Frame to the Render Texture at the given position.
*
* Textures are referenced by their string-based keys, as stored in the Texture Manager.
*
* ```javascript
* var rt = this.add.renderTexture(0, 0, 800, 600);
* rt.drawFrame(key, frame);
* ```
*
* You can optionally provide a position, alpha and tint value to apply to the frame
* before it is drawn.
*
* Calling this method will cause a batch flush, so if you've got a stack of things to draw
* in a tight loop, try using the `draw` method instead.
*
* If you need to draw a Sprite to this Render Texture, use the `draw` method instead.
*
* @method Phaser.GameObjects.RenderTexture#drawFrame
* @since 3.12.0
*
* @param {string} key - The key of the texture to be used, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - The name or index of the frame within the Texture.
* @param {number} [x=0] - The x position to draw the frame at.
* @param {number} [y=0] - The y position to draw the frame at.
* @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.
* @param {number} [tint] - WebGL only. The tint color to use. If not specified it uses the `globalTint` property.
*
* @return {this} This Render Texture instance.
*/
drawFrame: function (key, frame, x, y, alpha, tint)
{
if (x === undefined) { x = 0; }
if (y === undefined) { y = 0; }
if (alpha === undefined) { alpha = this.globalAlpha; }
if (tint === undefined)
{
tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);
}
else
{
tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);
}
var gl = this.gl;
var textureFrame = this.textureManager.getFrame(key, frame);
if (textureFrame)
{
this.camera.preRender(1, 1, 1);
if (gl)
{
this.renderer.setFramebuffer(this.framebuffer);
var pipeline = this.pipeline;
pipeline.projOrtho(0, this.width, 0, this.height, -1000.0, 1000.0);
pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null);
pipeline.flush();
this.renderer.setFramebuffer(null);
pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);
}
else
{
this.batchTextureFrame(textureFrame, x, y, alpha, tint);
}
this.dirty = true;
}
return this;
},
/**
* Internal method that handles the drawing of an array of children.
*
* @method Phaser.GameObjects.RenderTexture#batchList
* @private
* @since 3.12.0
*
* @param {array} children - The array of Game Objects to draw.
* @param {number} x - The x position to offset the Game Object by.
* @param {number} y - The y position to offset the Game Object by.
* @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.
* @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.
*/
batchList: function (children, x, y, alpha, tint)
{
for (var i = 0; i < children.length; i++)
{
var entry = children[i];
if (!entry || entry === this)
{
continue;
}
if (entry.renderWebGL || entry.renderCanvas)
{
// Game Objects
this.drawGameObject(entry, x, y);
}
else if (entry.isParent || entry.list)
{
// Groups / Display Lists
this.batchGroup(entry.getChildren(), x, y);
}
else if (typeof entry === 'string')
{
// Texture key
this.batchTextureFrameKey(entry, null, x, y, alpha, tint);
}
else if (entry instanceof Frame)
{
// Texture Frame instance
this.batchTextureFrame(entry, x, y, alpha, tint);
}
else if (Array.isArray(entry))
{
// Another Array
this.batchList(entry, x, y, alpha, tint);
}
}
},
/**
* Internal method that handles the drawing a Phaser Group contents.
*
* @method Phaser.GameObjects.RenderTexture#batchGroup
* @private
* @since 3.12.0
*
* @param {array} children - The array of Game Objects to draw.
* @param {number} x - The x position to offset the Game Object by.
* @param {number} y - The y position to offset the Game Object by.
*/
batchGroup: function (children, x, y)
{
if (x === undefined) { x = 0; }
if (y === undefined) { y = 0; }
for (var i = 0; i < children.length; i++)
{
var entry = children[i];
if (entry.willRender())
{
var tx = entry.x + x;
var ty = entry.y + y;
this.drawGameObject(entry, tx, ty);
}
}
},
/**
* Internal method that handles drawing a single Phaser Game Object to this Render Texture using WebGL.
*
* @method Phaser.GameObjects.RenderTexture#batchGameObjectWebGL
* @private
* @since 3.12.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.
* @param {number} x - The x position to draw the Game Object at.
* @param {number} y - The y position to draw the Game Object at.
*/
batchGameObjectWebGL: function (gameObject, x, y)
{
if (x === undefined) { x = gameObject.x; }
if (y === undefined) { y = gameObject.y; }
var prevX = gameObject.x;
var prevY = gameObject.y;
this.renderer.setBlendMode(gameObject.blendMode);
gameObject.setPosition(x, y);
gameObject.renderWebGL(this.renderer, gameObject, 0, this.camera, null);
gameObject.setPosition(prevX, prevY);
},
/**
* Internal method that handles drawing a single Phaser Game Object to this Render Texture using Canvas.
*
* @method Phaser.GameObjects.RenderTexture#batchGameObjectCanvas
* @private
* @since 3.12.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.
* @param {number} x - The x position to draw the Game Object at.
* @param {number} y - The y position to draw the Game Object at.
*/
batchGameObjectCanvas: function (gameObject, x, y)
{
if (x === undefined) { x = gameObject.x; }
if (y === undefined) { y = gameObject.y; }
var prevX = gameObject.x;
var prevY = gameObject.y;
gameObject.setPosition(x, y);
gameObject.renderCanvas(this.renderer, gameObject, 0, this.camera, null);
gameObject.setPosition(prevX, prevY);
},
/**
* Internal method that handles the drawing of an array of children.
*
* @method Phaser.GameObjects.RenderTexture#batchTextureFrameKey
* @private
* @since 3.12.0
*
* @param {string} key - The key of the texture to be used, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - The name or index of the frame within the Texture.
* @param {number} x - The x position to offset the Game Object by.
* @param {number} y - The y position to offset the Game Object by.
* @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.
* @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.
*
* @return {boolean} `true` if the frame was found and drawn, otherwise `false`.
*/
batchTextureFrameKey: function (key, frame, x, y, alpha, tint)
{
var textureFrame = this.textureManager.getFrame(key, frame);
if (textureFrame)
{
this.batchTextureFrame(textureFrame, x, y, alpha, tint);
}
},
/**
* Internal method that handles the drawing of a Texture Frame to this Render Texture.
*
* @method Phaser.GameObjects.RenderTexture#batchTextureFrame
* @private
* @since 3.12.0
*
* @param {Phaser.Textures.Frame} textureFrame - The Texture Frame to draw.
* @param {number} x - The x position to draw the Frame at.
* @param {number} y - The y position to draw the Frame at.
* @param {number} [tint] - A tint color to be applied to the frame drawn to the Render Texture.
*/
batchTextureFrame: function (textureFrame, x, y, alpha, tint)
{
if (x === undefined) { x = 0; }
if (y === undefined) { y = 0; }
if (this.gl)
{
this.pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null);
}
else
{
var ctx = this.context;
var cd = textureFrame.canvasData;
var source = textureFrame.source.image;
var matrix = this.camera.matrix;
ctx.globalAlpha = this.globalAlpha;
ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
ctx.drawImage(source, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);
}
},
/**
* Internal destroy handler, called as part of the destroy process.
*
* @method Phaser.GameObjects.RenderTexture#preDestroy
* @protected
* @since 3.9.0
*/
preDestroy: function ()
{
if (this.canvas)
{
CanvasPool.remove(this.canvas);
}
if (this.gl)
{
this.renderer.deleteTexture(this.texture);
this.renderer.deleteFramebuffer(this.framebuffer);
}
this.texture.destroy();
}
});
module.exports = RenderTexture;
|
(function(d){d['el']=Object.assign(d['el']||{},{a:"Image toolbar",b:"Table toolbar",c:"Έντονη",d:"Επιλέξτε κεφαλίδα",e:"Κεφαλίδα",f:"Πλάγια",g:"Λεζάντα",h:"Increase indent",i:"Decrease indent",j:"Σύνδεσμος",k:"Εικόνα πλήρης μεγέθους",l:"Side image",m:"Left aligned image",n:"Centered image",o:"Right aligned image",p:"Περιοχή παράθεσης",q:"Αριθμημένη λίστα",r:"Λίστα κουκκίδων",s:"image widget",t:"media widget",u:"Insert table",v:"Header column",w:"Insert column left",x:"Insert column right",y:"Delete column",z:"Column",aa:"Header row",ab:"Insert row below",ac:"Insert row above",ad:"Delete row",ae:"Row",af:"Merge cell up",ag:"Merge cell right",ah:"Merge cell down",ai:"Merge cell left",aj:"Split cell vertically",ak:"Split cell horizontally",al:"Merge cells",am:"Insert media",an:"The URL must not be empty.",ao:"This media URL is not supported.",ap:"Widget toolbar",aq:"Παράγραφος",ar:"Κεφαλίδα 1",as:"Κεφαλίδα 2",at:"Κεφαλίδα 3",au:"Heading 4",av:"Heading 5",aw:"Heading 6",ax:"Open in a new tab",ay:"Downloadable",az:"Αλλαγή εναλλακτικού κείμενου",ba:"Editor toolbar",bb:"Show more items",bc:"Dropdown toolbar",bd:"Αποθήκευση",be:"Ακύρωση",bf:"Paste the media URL in the input.",bg:"Tip: Paste the URL into the content to embed faster.",bh:"Media URL",bi:"Επεξεργαστής Πλούσιου Κειμένου",bj:"Επεξεργαστής Πλούσιου Κειμένου, 0%",bk:"Αναίρεση",bl:"Επανάληψη",bm:"%0 of %1",bn:"Previous",bo:"Next",bp:"Εναλλακτικό κείμενο",bq:"Διεύθυνση συνδέσμου",br:"Αφαίρεση συνδέσμου",bs:"Edit link",bt:"Open link in new tab",bu:"This link has no URL"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
/**
* @class Ext.Function
*
* A collection of useful static methods to deal with function callbacks.
* @singleton
*/
Ext.Function = (function () {
// @define Ext.lang.Function
// @define Ext.Function
// @require Ext
// @require Ext.lang.Array
var lastTime = 0,
animFrameId,
animFrameHandlers = [],
animFrameNoArgs = [],
idSource = 0,
animFrameMap = {},
// win = window,
global = Ext.global,
hasImmediate = !!(global.setImmediate && global.clearImmediate),
requestAnimFrame =
function (callback) {
var currTime = Ext.now(),
timeToCall = Math.max(0, 16 - (currTime - lastTime)),
id = win.setTimeout(function () {
callback(currTime + timeToCall);
}, timeToCall);
lastTime = currTime + timeToCall;
return id;
},
fireHandlers = function () {
var len = animFrameHandlers.length,
id, i, handler;
animFrameId = null;
// Fire all animation frame handlers in one go
for (i = 0; i < len; i++) {
handler = animFrameHandlers[i];
id = handler[3];
// Check if this timer has been canceled; its map entry is going to be removed
if (animFrameMap[id]) {
handler[0].apply(handler[1] || global, handler[2] || animFrameNoArgs);
delete animFrameMap[id];
}
}
// Clear all fired animation frame handlers, don't forget that new handlers
// could have been created in user handler functions called in the loop above
animFrameHandlers = animFrameHandlers.slice(len);
},
fireElevatedHandlers = function () {
Ext.elevateFunction(fireHandlers);
},
ExtFunction = {
/**
* A very commonly used method throughout the framework. It acts as a wrapper around another method
* which originally accepts 2 arguments for `name` and `value`.
* The wrapped function then allows "flexible" value setting of either:
*
* - `name` and `value` as 2 arguments
* - one single object argument with multiple key - value pairs
*
* For example:
*
* var setValue = Ext.Function.flexSetter(function(name, value) {
* this[name] = value;
* });
*
* // Afterwards
* // Setting a single name - value
* setValue('name1', 'value1');
*
* // Settings multiple name - value pairs
* setValue({
* name1: 'value1',
* name2: 'value2',
* name3: 'value3'
* });
*
* @param {Function} setter The single value setter method.
* @param {String} setter.name The name of the value being set.
* @param {Object} setter.value The value being set.
* @return {Function}
*/
flexSetter: function (setter) {
return function (name, value) {
var k, i;
if (name !== null) {
if (typeof name !== 'string') {
for (k in name) {
if (name.hasOwnProperty(k)) {
setter.call(this, k, name[k]);
}
}
if (Ext.enumerables) {
for (i = Ext.enumerables.length; i--;) {
k = Ext.enumerables[i];
if (name.hasOwnProperty(k)) {
setter.call(this, k, name[k]);
}
}
}
} else {
setter.call(this, name, value);
}
}
return this;
};
},
/**
* Create a new function from the provided `fn`, change `this` to the provided scope,
* optionally overrides arguments for the call. Defaults to the arguments passed by
* the caller.
*
* {@link Ext#bind Ext.bind} is alias for {@link Ext.Function#bind Ext.Function.bind}
*
* **NOTE:** This method is deprecated. Use the standard `bind` method of JavaScript
* `Function` instead:
*
* function foo () {
* ...
* }
*
* var fn = foo.bind(this);
*
* This method is unavailable natively on IE8 and IE/Quirks but Ext JS provides a
* "polyfill" to emulate the important features of the standard `bind` method. In
* particular, the polyfill only provides binding of "this" and optional arguments.
*
* @param {Function} fn The function to delegate.
* @param {Object} scope (optional) The scope (`this` reference) in which the function is executed.
* **If omitted, defaults to the default global environment object (usually the browser window).**
* @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)
* @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding,
* if a number the args are inserted at the specified position.
* @return {Function} The new function.
*/
bind: function (fn, scope, args, appendArgs) {
if (arguments.length === 2) {
return function () {
return fn.apply(scope, arguments);
};
}
var method = fn,
slice = Array.prototype.slice;
return function () {
var callArgs = args || arguments;
if (appendArgs === true) {
callArgs = slice.call(arguments, 0);
callArgs = callArgs.concat(args);
}
else if (typeof appendArgs === 'number') {
callArgs = slice.call(arguments, 0); // copy arguments first
Ext.Array.insert(callArgs, appendArgs, args);
}
return method.apply(scope || global, callArgs);
};
},
/**
* Captures the given parameters for a later call to `Ext.callback`. This binding is
* most useful for resolving scopes for example to an `Ext.app.ViewController`.
*
* The arguments match that of `Ext.callback` except for the `args` which, if provided
* to this method, are prepended to any arguments supplied by the eventual caller of
* the returned function.
*
* @return {Function} A function that, when called, uses `Ext.callback` to call the
* captured `callback`.
* @since 5.0.0
*/
bindCallback: function (callback, scope, args, delay, caller) {
return function () {
var a = Ext.Array.slice(arguments);
return Ext.callback(callback, scope, args ? args.concat(a) : a, delay, caller);
};
},
/**
* Create a new function from the provided `fn`, the arguments of which are pre-set to `args`.
* New arguments passed to the newly created callback when it's invoked are appended after the pre-set ones.
* This is especially useful when creating callbacks.
*
* For example:
*
* var originalFunction = function(){
* alert(Ext.Array.from(arguments).join(' '));
* };
*
* var callback = Ext.Function.pass(originalFunction, ['Hello', 'World']);
*
* callback(); // alerts 'Hello World'
* callback('by Me'); // alerts 'Hello World by Me'
*
* {@link Ext#pass Ext.pass} is alias for {@link Ext.Function#pass Ext.Function.pass}
*
* @param {Function} fn The original function.
* @param {Array} args The arguments to pass to new callback.
* @param {Object} scope (optional) The scope (`this` reference) in which the function is executed.
* @return {Function} The new callback function.
*/
pass: function (fn, args, scope) {
if (!Ext.isArray(args)) {
if (Ext.isIterable(args)) {
args = Ext.Array.clone(args);
} else {
args = args !== undefined ? [args] : [];
}
}
return function () {
var fnArgs = args.slice();
fnArgs.push.apply(fnArgs, arguments);
return fn.apply(scope || this, fnArgs);
};
},
/**
* Create an alias to the provided method property with name `methodName` of `object`.
* Note that the execution scope will still be bound to the provided `object` itself.
*
* @param {Object/Function} object
* @param {String} methodName
* @return {Function} aliasFn
*/
alias: function (object, methodName) {
return function () {
return object[methodName].apply(object, arguments);
};
},
/**
* Create a "clone" of the provided method. The returned method will call the given
* method passing along all arguments and the "this" pointer and return its result.
*
* @param {Function} method
* @return {Function} cloneFn
*/
clone: function (method) {
return function () {
return method.apply(this, arguments);
};
},
/**
* Creates an interceptor function. The passed function is called before the original one. If it returns false,
* the original one is not called. The resulting function returns the results of the original function.
* The passed function is called with the parameters of the original function. Example usage:
*
* var sayHi = function(name){
* alert('Hi, ' + name);
* };
*
* sayHi('Fred'); // alerts "Hi, Fred"
*
* // create a new function that validates input without
* // directly modifying the original function:
* var sayHiToFriend = Ext.Function.createInterceptor(sayHi, function(name){
* return name === 'Brian';
* });
*
* sayHiToFriend('Fred'); // no alert
* sayHiToFriend('Brian'); // alerts "Hi, Brian"
*
* @param {Function} origFn The original function.
* @param {Function} newFn The function to call before the original.
* @param {Object} [scope] The scope (`this` reference) in which the passed function is executed.
* **If omitted, defaults to the scope in which the original function is called or the browser window.**
* @param {Object} [returnValue=null] The value to return if the passed function return `false`.
* @return {Function} The new function.
*/
createInterceptor: function (origFn, newFn, scope, returnValue) {
if (!Ext.isFunction(newFn)) {
return origFn;
} else {
returnValue = Ext.isDefined(returnValue) ? returnValue : null;
return function () {
var me = this,
args = arguments;
return (newFn.apply(scope || me || global, args) !== false) ?
origFn.apply(me || global, args) : returnValue;
};
}
},
/**
* Creates a delegate (callback) which, when called, executes after a specific delay.
*
* @param {Function} fn The function which will be called on a delay when the returned function is called.
* Optionally, a replacement (or additional) argument list may be specified.
* @param {Number} delay The number of milliseconds to defer execution by whenever called.
* @param {Object} scope (optional) The scope (`this` reference) used by the function at execution time.
* @param {Array} args (optional) Override arguments for the call. (Defaults to the arguments passed by the caller)
* @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding,
* if a number the args are inserted at the specified position.
* @return {Function} A function which, when called, executes the original function after the specified delay.
*/
createDelayed: function (fn, delay, scope, args, appendArgs) {
if (scope || args) {
fn = Ext.Function.bind(fn, scope, args, appendArgs);
}
return function () {
var me = this,
args = Array.prototype.slice.call(arguments);
setTimeout(function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn, me, args);
} else {
fn.apply(me, args);
}
}, delay);
};
},
/**
* Calls this function after the number of milliseconds specified, optionally in a specific scope. Example usage:
*
* var sayHi = function(name){
* alert('Hi, ' + name);
* }
*
* // executes immediately:
* sayHi('Fred');
*
* // executes after 2 seconds:
* Ext.Function.defer(sayHi, 2000, this, ['Fred']);
*
* // this syntax is sometimes useful for deferring
* // execution of an anonymous function:
* Ext.Function.defer(function(){
* alert('Anonymous');
* }, 100);
*
* {@link Ext#defer Ext.defer} is alias for {@link Ext.Function#defer Ext.Function.defer}
*
* @param {Function} fn The function to defer.
* @param {Number} millis The number of milliseconds for the `setTimeout` call
* (if less than or equal to 0 the function is executed immediately).
* @param {Object} scope (optional) The scope (`this` reference) in which the function is executed.
* **If omitted, defaults to the browser window.**
* @param {Array} [args] Overrides arguments for the call. Defaults to the arguments passed by the caller.
* @param {Boolean/Number} [appendArgs=false] If `true` args are appended to call args instead of overriding,
* or, if a number, then the args are inserted at the specified position.
* @return {Number} The timeout id that can be used with `clearTimeout`.
*/
defer: function (fn, millis, scope, args, appendArgs) {
fn = Ext.Function.bind(fn, scope, args, appendArgs);
if (millis > 0) {
return setTimeout(function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn);
} else {
fn();
}
}, millis);
}
fn();
return 0;
},
/**
* Calls this function repeatedly at a given interval, optionally in a specific scope.
*
* {@link Ext#defer Ext.defer} is alias for {@link Ext.Function#defer Ext.Function.defer}
*
* @param {Function} fn The function to defer.
* @param {Number} millis The number of milliseconds for the `setInterval` call
* @param {Object} scope (optional) The scope (`this` reference) in which the function is executed.
* **If omitted, defaults to the browser window.**
* @param {Array} [args] Overrides arguments for the call. Defaults to the arguments passed by the caller.
* @param {Boolean/Number} [appendArgs=false] If `true` args are appended to call args instead of overriding,
* or, if a number, then the args are inserted at the specified position.
* @return {Number} The interval id that can be used with `clearInterval`.
*/
interval: function (fn, millis, scope, args, appendArgs) {
fn = Ext.Function.bind(fn, scope, args, appendArgs);
return setInterval(function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn);
} else {
fn();
}
}, millis);
},
/**
* Create a combined function call sequence of the original function + the passed function.
* The resulting function returns the results of the original function.
* The passed function is called with the parameters of the original function. Example usage:
*
* var sayHi = function(name){
* alert('Hi, ' + name);
* };
*
* sayHi('Fred'); // alerts "Hi, Fred"
*
* var sayGoodbye = Ext.Function.createSequence(sayHi, function(name){
* alert('Bye, ' + name);
* });
*
* sayGoodbye('Fred'); // both alerts show
*
* @param {Function} originalFn The original function.
* @param {Function} newFn The function to sequence.
* @param {Object} [scope] The scope (`this` reference) in which the passed function is executed.
* If omitted, defaults to the scope in which the original function is called or the
* default global environment object (usually the browser window).
* @return {Function} The new function.
*/
createSequence: function (originalFn, newFn, scope) {
if (!newFn) {
return originalFn;
}
else {
return function () {
var result = originalFn.apply(this, arguments);
newFn.apply(scope || this, arguments);
return result;
};
}
},
/**
* Creates a delegate function, optionally with a bound scope which, when called, buffers
* the execution of the passed function for the configured number of milliseconds.
* If called again within that period, the impending invocation will be canceled, and the
* timeout period will begin again.
*
* @param {Function} fn The function to invoke on a buffered timer.
* @param {Number} buffer The number of milliseconds by which to buffer the invocation of the
* function.
* @param {Object} [scope] The scope (`this` reference) in which.
* the passed function is executed. If omitted, defaults to the scope specified by the caller.
* @param {Array} [args] Override arguments for the call. Defaults to the arguments
* passed by the caller.
* @return {Function} A function which invokes the passed function after buffering for the specified time.
*/
createBuffered: function (fn, buffer, scope, args) {
var timerId;
return function () {
var callArgs = args || Array.prototype.slice.call(arguments, 0),
me = scope || this;
if (timerId) {
clearTimeout(timerId);
}
timerId = setTimeout(function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn, me, callArgs);
} else {
fn.apply(me, callArgs);
}
}, buffer);
};
},
/**
* Creates a wrapped function that, when invoked, defers execution until the next
* animation frame
* @private
* @param {Function} fn The function to call.
* @param {Object} [scope] The scope (`this` reference) in which the function is executed. Defaults to the window object.
* @param {Array} [args] The argument list to pass to the function.
* @param {Number} [queueStrategy=3] A bit flag that indicates how multiple calls to
* the returned function within the same animation frame should be handled.
*
* - 1: All calls will be queued - FIFO order
* - 2: Only the first call will be queued
* - 3: The last call will replace all previous calls
*
* @return {Function}
*/
createAnimationFrame: function (fn, scope, args, queueStrategy) {
var timerId;
queueStrategy = queueStrategy || 3;
return function () {
var callArgs = args || Array.prototype.slice.call(arguments, 0);
scope = scope || this;
if (queueStrategy === 3 && timerId) {
ExtFunction.cancelAnimationFrame(timerId);
}
if ((queueStrategy & 1) || !timerId) {
timerId = ExtFunction.requestAnimationFrame(function () {
timerId = null;
fn.apply(scope, callArgs);
});
}
};
},
/**
* @private
* Schedules the passed function to be called on the next animation frame.
* @param {Function} fn The function to call.
* @param {Object} [scope] The scope (`this` reference) in which the function is executed. Defaults to the window object.
* @param {Mixed[]} [args] The argument list to pass to the function.
*
* @return {Number} Timer id for the new animation frame to use when canceling it.
*/
requestAnimationFrame: function (fn, scope, args) {
var id = ++idSource, // Ids start at 1
handler = Array.prototype.slice.call(arguments, 0);
handler[3] = id;
animFrameMap[id] = 1; // A flag to indicate that the timer exists
// We might be in fireHandlers at this moment but this new entry will not
// be executed until the next frame
animFrameHandlers.push(handler);
if (!animFrameId) {
animFrameId = requestAnimFrame(Ext.elevateFunction ? fireElevatedHandlers : fireHandlers);
}
return id;
},
cancelAnimationFrame: function (id) {
// Don't remove any handlers from animFrameHandlers array, because
// the might be in use at the moment (when cancelAnimationFrame is called).
// Just remove the handler id from the map so it will not be executed
delete animFrameMap[id];
},
/**
* Creates a throttled version of the passed function which, when called repeatedly and
* rapidly, invokes the passed function only after a certain interval has elapsed since the
* previous invocation.
*
* This is useful for wrapping functions which may be called repeatedly, such as
* a handler of a mouse move event when the processing is expensive.
*
* @param {Function} fn The function to execute at a regular time interval.
* @param {Number} interval The interval in milliseconds on which the passed function is executed.
* @param {Object} [scope] The scope (`this` reference) in which
* the passed function is executed. If omitted, defaults to the scope specified by the caller.
* @return {Function} A function which invokes the passed function at the specified interval.
*/
createThrottled: function (fn, interval, scope) {
var lastCallTime = 0,
elapsed,
lastArgs,
timer,
execute = function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn, scope, lastArgs);
} else {
fn.apply(scope, lastArgs);
}
lastCallTime = Ext.now();
timer = null;
};
return function () {
// Use scope of last call unless the creator specified a scope
if (!scope) {
scope = this;
}
elapsed = Ext.now() - lastCallTime;
lastArgs = arguments;
// If this is the first invocation, or the throttle interval has been reached, clear any
// pending invocation, and call the target function now.
if (elapsed >= interval) {
clearTimeout(timer);
execute();
}
// Throttle interval has not yet been reached. Only set the timer to fire if not already set.
else if (!timer) {
timer = Ext.defer(execute, interval - elapsed);
}
};
},
/**
* Wraps the passed function in a barrier function which will call the passed function after the passed number of invocations.
* @param {Number} count The number of invocations which will result in the calling of the passed function.
* @param {Function} fn The function to call after the required number of invocations.
* @param {Object} scope The scope (`this` reference) in which the function will be called.
*/
createBarrier: function (count, fn, scope) {
return function () {
if (!--count) {
fn.apply(scope, arguments);
}
};
},
/**
* Adds behavior to an existing method that is executed before the
* original behavior of the function. For example:
*
* var soup = {
* contents: [],
* add: function(ingredient) {
* this.contents.push(ingredient);
* }
* };
* Ext.Function.interceptBefore(soup, "add", function(ingredient){
* if (!this.contents.length && ingredient !== "water") {
* // Always add water to start with
* this.contents.push("water");
* }
* });
* soup.add("onions");
* soup.add("salt");
* soup.contents; // will contain: water, onions, salt
*
* @param {Object} object The target object
* @param {String} methodName Name of the method to override
* @param {Function} fn Function with the new behavior. It will
* be called with the same arguments as the original method. The
* return value of this function will be the return value of the
* new method.
* @param {Object} [scope] The scope to execute the interceptor function. Defaults to the object.
* @return {Function} The new function just created.
*/
interceptBefore: function (object, methodName, fn, scope) {
var method = object[methodName] || Ext.emptyFn;
return (object[methodName] = function () {
var ret = fn.apply(scope || this, arguments);
method.apply(this, arguments);
return ret;
});
},
/**
* Adds behavior to an existing method that is executed after the
* original behavior of the function. For example:
*
* var soup = {
* contents: [],
* add: function(ingredient) {
* this.contents.push(ingredient);
* }
* };
* Ext.Function.interceptAfter(soup, "add", function(ingredient){
* // Always add a bit of extra salt
* this.contents.push("salt");
* });
* soup.add("water");
* soup.add("onions");
* soup.contents; // will contain: water, salt, onions, salt
*
* @param {Object} object The target object
* @param {String} methodName Name of the method to override
* @param {Function} fn Function with the new behavior. It will
* be called with the same arguments as the original method. The
* return value of this function will be the return value of the
* new method.
* @param {Object} [scope] The scope to execute the interceptor function. Defaults to the object.
* @return {Function} The new function just created.
*/
interceptAfter: function (object, methodName, fn, scope) {
var method = object[methodName] || Ext.emptyFn;
return (object[methodName] = function () {
method.apply(this, arguments);
return fn.apply(scope || this, arguments);
});
},
makeCallback: function (callback, scope) {
//<debug>
if (!scope[callback]) {
if (scope.$className) {
Ext.raise('No method "' + callback + '" on ' + scope.$className);
}
Ext.raise('No method "' + callback + '"');
}
//</debug>
return function () {
return scope[callback].apply(scope, arguments);
};
},
/**
* Returns a wrapper function that caches the return value for previously
* processed function argument(s).
*
* For example:
*
* function factorial (value) {
* var ret = value;
*
* while (--value > 1) {
* ret *= value;
* }
*
* return ret;
* }
*
* Each call to `factorial` will loop and multiply to produce the answer. Using
* this function we can wrap the above and cache its answers:
*
* factorial = Ext.Function.memoize(factorial);
*
* The returned function operates in the same manner as before, but results are
* stored in a cache to avoid calling the wrapped function when given the same
* arguments.
*
* var x = factorial(20); // first time; call real factorial()
* var y = factorial(20); // second time; return value from first call
*
* To support multi-argument methods, you will need to provide a `hashFn`.
*
* function permutation (n, k) {
* return factorial(n) / factorial(n - k);
* }
*
* permutation = Ext.Function.memoize(permutation, null, function (n, k) {
* n + '-' + k;
* });
*
* In this case, the `memoize` of `factorial` is sufficient optimization, but the
* example is simply to illustrate how to generate a unique key for an expensive,
* multi-argument method.
*
* **IMPORTANT**: This cache is unbounded so be cautious of memory leaks if the
* `memoize`d function is kept indefinitely or is given an unbounded set of
* possible arguments.
*
* @param {Function} fn Function to wrap.
* @param {Object} scope Optional scope in which to execute the wrapped function.
* @param {Function} hashFn Optional function used to compute a hash key for
* storing the result, based on the arguments to the original function.
* @return {Function} The caching wrapper function.
* @since 6.0.0
*/
memoize: function (fn, scope, hashFn) {
var memo = {},
isFunc = hashFn && Ext.isFunction(hashFn);
return function (value) {
var key = isFunc ? hashFn.apply(scope, arguments) : value;
if (!(key in memo)) {
memo[key] = fn.apply(scope, arguments);
}
return memo[key];
};
}
}; // ExtFunction
/**
* @member Ext
* @method asap
* Schedules the specified callback function to be executed on the next turn of the
* event loop. Where available, this method uses the browser's `setImmediate` API. If
* not available, this method substitutes `setTimeout(0)`. Though not a perfect
* replacement for `setImmediate` it is sufficient for many use cases.
*
* For more details see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate).
*
* @param {Function} fn Callback function.
* @param {Object} [scope] The scope for the callback (`this` pointer).
* @param {Mixed[]} [parameters] Additional parameters to pass to `fn`.
* @return {Number} A cancelation id for `{@link Ext#asapCancel}`.
*/
Ext.asap = hasImmediate ?
function (fn, scope, parameters) {
if (scope != null || parameters != null) {
fn = ExtFunction.bind(fn, scope, parameters);
}
return setImmediate(function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn);
} else {
fn();
}
});
} :
function (fn, scope, parameters) {
if (scope != null || parameters != null) {
fn = ExtFunction.bind(fn, scope, parameters);
}
return setTimeout(function () {
if (Ext.elevateFunction) {
Ext.elevateFunction(fn);
} else {
fn();
}
}, 0, true);
},
/**
* @member Ext
* @method asapCancel
* Cancels a previously scheduled call to `{@link Ext#asap}`.
*
* var asapId = Ext.asap(me.method, me);
* ...
*
* if (nevermind) {
* Ext.apasCancel(asapId);
* }
*
* @param {Number} id The id returned by `{@link Ext#asap}`.
*/
Ext.asapCancel = hasImmediate ?
function (id) {
clearImmediate(id);
} : function (id) {
clearTimeout(id);
};
/**
* @method
* @member Ext
* @inheritdoc Ext.Function#defer
*/
Ext.defer = ExtFunction.defer;
/**
* @method
* @member Ext
* @inheritdoc Ext.Function#interval
*/
Ext.interval = ExtFunction.interval;
/**
* @method
* @member Ext
* @inheritdoc Ext.Function#pass
*/
Ext.pass = ExtFunction.pass;
/**
* @method
* @member Ext
* @inheritdoc Ext.Function#bind
*/
Ext.bind = ExtFunction.bind;
Ext.deferCallback = ExtFunction.requestAnimationFrame;
return ExtFunction;
})();
|
var Collection = require('./collection');
var util = require('../util');
function property(obj, name, value) {
if (value !== null && value !== undefined) {
util.property.apply(this, arguments);
}
}
function memoizedProperty(obj, name) {
if (!obj.constructor.prototype[name]) {
util.memoizedProperty.apply(this, arguments);
}
}
function Shape(shape, options, memberName) {
options = options || {};
property(this, 'shape', shape.shape);
property(this, 'api', options.api, false);
property(this, 'type', shape.type);
property(this, 'location', shape.location || 'body');
property(this, 'name', this.name || shape.xmlName || shape.locationName ||
memberName);
property(this, 'isStreaming', shape.streaming || false);
property(this, 'isComposite', shape.isComposite || false);
property(this, 'isShape', true, false);
if (options.documentation) {
property(this, 'documentation', shape.documentation);
property(this, 'documentationUrl', shape.documentationUrl);
}
if (shape.xmlAttribute) {
property(this, 'isXmlAttribute', shape.xmlAttribute || false);
}
// type conversion and parsing
property(this, 'defaultValue', null);
this.toWireFormat = function(value) {
if (value === null || value === undefined) return '';
return value;
};
this.toType = function(value) { return value; };
}
/**
* @api private
*/
Shape.normalizedTypes = {
character: 'string',
double: 'float',
long: 'integer',
short: 'integer',
biginteger: 'integer',
bigdecimal: 'float',
blob: 'binary'
};
/**
* @api private
*/
Shape.types = {
'structure': StructureShape,
'list': ListShape,
'map': MapShape,
'boolean': BooleanShape,
'timestamp': TimestampShape,
'float': FloatShape,
'integer': IntegerShape,
'string': StringShape,
'base64': Base64Shape,
'binary': BinaryShape
};
Shape.resolve = function resolve(shape, options) {
if (shape.shape) {
var refShape = options.api.shapes[shape.shape];
if (!refShape) {
throw new Error('Cannot find shape reference: ' + shape.shape);
}
return refShape;
} else {
return null;
}
};
Shape.create = function create(shape, options, memberName) {
if (shape.isShape) return shape;
var refShape = Shape.resolve(shape, options);
if (refShape) {
var filteredKeys = Object.keys(shape);
if (!options.documentation) {
filteredKeys = filteredKeys.filter(function(name) {
return !name.match(/documentation/);
});
}
if (filteredKeys === ['shape']) { // no inline customizations
return refShape;
}
// create an inline shape with extra members
var InlineShape = function() {
refShape.constructor.call(this, shape, options, memberName);
};
InlineShape.prototype = refShape;
return new InlineShape();
} else {
// set type if not set
if (!shape.type) {
if (shape.members) shape.type = 'structure';
else if (shape.member) shape.type = 'list';
else if (shape.key) shape.type = 'map';
else shape.type = 'string';
}
// normalize types
var origType = shape.type;
if (Shape.normalizedTypes[shape.type]) {
shape.type = Shape.normalizedTypes[shape.type];
}
if (Shape.types[shape.type]) {
return new Shape.types[shape.type](shape, options, memberName);
} else {
throw new Error('Unrecognized shape type: ' + origType);
}
}
};
function CompositeShape(shape) {
Shape.apply(this, arguments);
property(this, 'isComposite', true);
if (shape.flattened) {
property(this, 'flattened', shape.flattened || false);
}
}
function StructureShape(shape, options) {
var requiredMap = null, firstInit = !this.isShape;
CompositeShape.apply(this, arguments);
if (firstInit) {
property(this, 'defaultValue', function() { return {}; });
property(this, 'members', {});
property(this, 'memberNames', []);
property(this, 'required', []);
property(this, 'isRequired', function(name) { return false; });
}
if (shape.members) {
property(this, 'members', new Collection(shape.members, options, function(name, member) {
return Shape.create(member, options, name);
}));
memoizedProperty(this, 'memberNames', function() {
return shape.xmlOrder || Object.keys(shape.members);
});
}
if (shape.required) {
property(this, 'required', shape.required);
property(this, 'isRequired', function(name) {
if (!requiredMap) {
requiredMap = {};
for (var i = 0; i < shape.required.length; i++) {
requiredMap[shape.required[i]] = true;
}
}
return requiredMap[name];
}, false, true);
}
property(this, 'resultWrapper', shape.resultWrapper || null);
if (shape.payload) {
property(this, 'payload', shape.payload);
}
if (typeof shape.xmlNamespace === 'string') {
property(this, 'xmlNamespaceUri', shape.xmlNamespace);
} else if (typeof shape.xmlNamespace === 'object') {
property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix);
property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri);
}
}
function ListShape(shape, options) {
var self = this, firstInit = !this.isShape;
CompositeShape.apply(this, arguments);
if (firstInit) {
property(this, 'defaultValue', function() { return []; });
}
if (shape.member) {
memoizedProperty(this, 'member', function() {
return Shape.create(shape.member, options);
});
}
if (this.flattened) {
var oldName = this.name;
memoizedProperty(this, 'name', function() {
return self.member.name || oldName;
});
}
}
function MapShape(shape, options) {
var firstInit = !this.isShape;
CompositeShape.apply(this, arguments);
if (firstInit) {
property(this, 'defaultValue', function() { return {}; });
property(this, 'key', Shape.create({type: 'string'}, options));
property(this, 'value', Shape.create({type: 'string'}, options));
}
if (shape.key) {
memoizedProperty(this, 'key', function() {
return Shape.create(shape.key, options);
});
}
if (shape.value) {
memoizedProperty(this, 'value', function() {
return Shape.create(shape.value, options);
});
}
}
function TimestampShape(shape) {
var self = this;
Shape.apply(this, arguments);
if (shape.timestampFormat) {
property(this, 'timestampFormat', shape.timestampFormat);
} else if (this.api) {
property(this, 'timestampFormat', this.api.timestampFormat);
}
this.toType = function(value) {
if (value === null || value === undefined) return null;
if (typeof value.toUTCString === 'function') return value;
return typeof value === 'string' || typeof value === 'number' ?
util.date.parseTimestamp(value) : null;
};
this.toWireFormat = function(value) {
return util.date.format(value, self.timestampFormat);
};
}
function StringShape() {
Shape.apply(this, arguments);
}
function FloatShape() {
Shape.apply(this, arguments);
this.toType = function(value) {
if (value === null || value === undefined) return null;
return parseFloat(value);
};
this.toWireFormat = this.toType;
}
function IntegerShape() {
Shape.apply(this, arguments);
this.toType = function(value) {
if (value === null || value === undefined) return null;
return parseInt(value, 10);
};
this.toWireFormat = this.toType;
}
function BinaryShape() {
Shape.apply(this, arguments);
this.toType = util.base64.decode;
this.toWireFormat = util.base64.encode;
}
function Base64Shape() {
BinaryShape.apply(this, arguments);
}
function BooleanShape() {
Shape.apply(this, arguments);
this.toType = function(value) {
if (value === null || value === undefined) return null;
return value === 'true';
};
}
/**
* @api private
*/
Shape.shapes = {
StructureShape: StructureShape,
ListShape: ListShape,
MapShape: MapShape,
StringShape: StringShape,
BooleanShape: BooleanShape,
Base64Shape: Base64Shape
};
module.exports = Shape;
|
import React, { Component } from 'react';
import { StyleSheet, Text, View, FlatList } from 'react-native';
import PlacesItem from './PlacesItem';
export default class Places extends Component {
render() {
return (
<View style={styles.container}>
<FlatList
data={this.props.places}
keyExtractor={(item,key) => item.id.toString()}
renderItem={({ item }) => <PlacesItem map={this.props.map} item={item} />}
horizontal={true}
ItemSeparatorComponent={() => <View style={{ marginRight: 10 }} />}
showsHorizontalScrollIndicator={false}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
width: '100%',
height: 140,
padding: 10,
}
});
|
/*!
* ImagesLoadedPN PACKAGED v4.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
/**
* EvEmitter v1.1.0
* Lil' event emitter
* MIT License
*/
/* jshint unused: true, undef: true, strict: true */
( function( global, factory ) {
// universal module definition
/* jshint strict: false */ /* globals define, module, window */
if ( typeof define == 'function' && define.amd ) {
// AMD - RequireJS
define( 'ev-emitter/ev-emitter',factory );
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS - Browserify, Webpack
module.exports = factory();
} else {
// Browser globals
global.EvEmitter = factory();
}
}( typeof window != 'undefined' ? window : this, function() {
function EvEmitter() {}
var proto = EvEmitter.prototype;
proto.on = function( eventName, listener ) {
if ( !eventName || !listener ) {
return;
}
// set events hash
var events = this._events = this._events || {};
// set listeners array
var listeners = events[ eventName ] = events[ eventName ] || [];
// only add once
if ( listeners.indexOf( listener ) == -1 ) {
listeners.push( listener );
}
return this;
};
proto.once = function( eventName, listener ) {
if ( !eventName || !listener ) {
return;
}
// add event
this.on( eventName, listener );
// set once flag
// set onceEvents hash
var onceEvents = this._onceEvents = this._onceEvents || {};
// set onceListeners object
var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
// set flag
onceListeners[ listener ] = true;
return this;
};
proto.off = function( eventName, listener ) {
var listeners = this._events && this._events[ eventName ];
if ( !listeners || !listeners.length ) {
return;
}
var index = listeners.indexOf( listener );
if ( index != -1 ) {
listeners.splice( index, 1 );
}
return this;
};
proto.emitEvent = function( eventName, args ) {
var listeners = this._events && this._events[ eventName ];
if ( !listeners || !listeners.length ) {
return;
}
// copy over to avoid interference if .off() in listener
listeners = listeners.slice(0);
args = args || [];
// once stuff
var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
for ( var i=0; i < listeners.length; i++ ) {
var listener = listeners[i]
var isOnce = onceListeners && onceListeners[ listener ];
if ( isOnce ) {
// remove listener
// remove before trigger to prevent recursion
this.off( eventName, listener );
// unset once flag
delete onceListeners[ listener ];
}
// trigger listener
listener.apply( this, args );
}
return this;
};
proto.allOff = function() {
delete this._events;
delete this._onceEvents;
};
return EvEmitter;
}));
/*!
* ImagesLoadedPN v4.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
( function( window, factory ) { 'use strict';
// universal module definition
/*global define: false, module: false, require: false */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( [
'ev-emitter/ev-emitter'
], function( EvEmitter ) {
return factory( window, EvEmitter );
});
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS
module.exports = factory(
window,
require('ev-emitter')
);
} else {
// browser global
window.imagesLoadedPN = factory(
window,
window.EvEmitter
);
}
})( typeof window !== 'undefined' ? window : this,
// -------------------------- factory -------------------------- //
function factory( window, EvEmitter ) {
var $ = window.jQuery;
var console = window.console;
// -------------------------- helpers -------------------------- //
// extend objects
function extend( a, b ) {
for ( var prop in b ) {
a[ prop ] = b[ prop ];
}
return a;
}
var arraySlice = Array.prototype.slice;
// turn element or nodeList into an array
function makeArray( obj ) {
if ( Array.isArray( obj ) ) {
// use object if already an array
return obj;
}
var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
if ( isArrayLike ) {
// convert nodeList to array
return arraySlice.call( obj );
}
// array of single index
return [ obj ];
}
// -------------------------- ImagesLoadedPN -------------------------- //
/**
* @param {Array, Element, NodeList, String} elem
* @param {Object or Function} options - if function, use as callback
* @param {Function} onAlways - callback function
*/
function ImagesLoadedPN( elem, options, onAlways ) {
// coerce ImagesLoadedPN() without new, to be new ImagesLoadedPN()
if ( !( this instanceof ImagesLoadedPN ) ) {
return new ImagesLoadedPN( elem, options, onAlways );
}
// use elem as selector string
var queryElem = elem;
if ( typeof elem == 'string' ) {
queryElem = document.querySelectorAll( elem );
}
// bail if bad element
if ( !queryElem ) {
console.error( 'Bad element for ImagesLoadedPN ' + ( queryElem || elem ) );
return;
}
this.elements = makeArray( queryElem );
this.options = extend( {}, this.options );
// shift arguments if no options set
if ( typeof options == 'function' ) {
onAlways = options;
} else {
extend( this.options, options );
}
if ( onAlways ) {
this.on( 'always', onAlways );
}
this.getImages();
if ( $ ) {
// add jQuery Deferred object
this.jqDeferred = new $.Deferred();
}
//this.check()
// HACK check async to allow time to bind listeners
setTimeout( this.check.bind( this ) );
}
ImagesLoadedPN.prototype = Object.create( EvEmitter.prototype );
ImagesLoadedPN.prototype.options = {};
ImagesLoadedPN.prototype.getImages = function() {
this.images = [];
// filter & find items if we have an item selector
this.elements.forEach( this.addElementImages, this );
};
/**
* @param {Node} element
*/
ImagesLoadedPN.prototype.addElementImages = function( elem ) {
// filter siblings
if ( elem.nodeName == 'IMG' ) {
this.addImage( elem );
}
// get background image on element
if ( this.options.background === true ) {
this.addElementBackgroundImages( elem );
}
if(this.options.imageAttr === true ){
this.addImageAttrImages(elem)
}
// find children
// no non-element nodes, #143
var nodeType = elem.nodeType;
if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
return;
}
var childImgs = elem.querySelectorAll('img');
// concat childElems to filterFound array
for ( var i=0; i < childImgs.length; i++ ) {
var img = childImgs[i];
this.addImage( img );
}
// get child background images
if ( typeof this.options.background == 'string' ) {
var children = elem.querySelectorAll( this.options.background );
for ( i=0; i < children.length; i++ ) {
var child = children[i];
this.addElementBackgroundImages( child );
}
}
// get child background images
if ( typeof this.options.imageAttr == 'string' ) {
var children = elem.querySelectorAll( this.options.imageAttr );
for ( i=0; i < children.length; i++ ) {
var child = children[i];
this.addImageAttrImages( child );
}
}
};
var elementNodeTypes = {
1: true,
9: true,
11: true
};
ImagesLoadedPN.prototype.addElementBackgroundImages = function( elem ) {
var style = getComputedStyle( elem );
if ( !style ) {
// Firefox returns null if in a hidden iframe https://bugzil.la/548397
return;
}
// get url inside url("...")
var reURL = /url\((['"])?(.*?)\1\)/gi;
var matches = reURL.exec( style.backgroundImage );
while ( matches !== null ) {
var url = matches && matches[2];
if ( url ) {
this.addBackground( url, elem );
}
matches = reURL.exec( style.backgroundImage );
}
};
ImagesLoadedPN.prototype.addImageAttrImages = function( elem ) {
var url = elem.getAttribute('image')
if(this.options.debug) console.log('url!', url)
if (url) url == '*' ? url = elem.getAttribute('data-image') : elem.setAttribute('data-image', url)
if(!url) return
var ban = (elem.getAttribute('ban') || '').split(',')
if (ban.length){
if(ban.find((el) => {
return url.indexOf(el) > -1
})){
url = 'img/imagenotuploaded.jpg'
}
}
url = url.replace('bastyon.com:8092', 'pocketnet.app:8092').replace('test.pocketnet', 'pocketnet')
this.addImageAttr(url, elem)
};
/**
* @param {Image} img
*/
ImagesLoadedPN.prototype.addImage = function( img ) {
var loadingImage = new LoadingImage( img );
this.images.push( loadingImage );
};
ImagesLoadedPN.prototype.addBackground = function( url, elem ) {
var background = new Background( url, elem );
this.images.push( background );
};
ImagesLoadedPN.prototype.addImageAttr = function( url, elem ) {
var imageAttrImage = new ImageAttrImage( url, elem );
this.images.push( imageAttrImage );
};
ImagesLoadedPN.prototype.check = function() {
var _this = this;
this.progressedCount = 0;
this.hasAnyBroken = false;
// complete if no images
if ( !this.images.length ) {
this.complete();
return;
}
function onProgress( image, elem, message ) {
// HACK - Chrome triggers event before object properties have changed. #83
setTimeout( function() {
_this.progress( image, elem, message );
});
}
this.images.forEach( function( loadingImage ) {
loadingImage.once( 'progress', onProgress );
loadingImage.check();
});
};
ImagesLoadedPN.prototype.progress = function( image, elem, message ) {
this.progressedCount++;
this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
// progress event
this.emitEvent( 'progress', [ this, image, elem ] );
if ( this.jqDeferred && this.jqDeferred.notify ) {
this.jqDeferred.notify( this, image );
}
// check if completed
if ( this.progressedCount == this.images.length ) {
this.complete();
}
if ( this.options.debug && console ) {
console.log( 'progress: ' + message, image, elem );
}
};
ImagesLoadedPN.prototype.complete = function() {
var eventName = this.hasAnyBroken ? 'fail' : 'done';
this.isComplete = true;
this.emitEvent( eventName, [ this ] );
this.emitEvent( 'always', [ this ] );
if ( this.jqDeferred ) {
var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
this.jqDeferred[ jqMethod ]( this );
}
};
// -------------------------- -------------------------- //
function LoadingImage( img ) {
this.img = img;
}
LoadingImage.prototype = Object.create( EvEmitter.prototype );
LoadingImage.prototype.check = function() {
// If complete is true and browser supports natural sizes,
// try to check for image status manually.
var isComplete = this.getIsImageComplete();
if ( isComplete ) {
// report based on naturalWidth
this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
return;
}
// If none of the checks above matched, simulate loading on detached element.
this.proxyImage = new Image();
this.proxyImage.addEventListener( 'load', this );
this.proxyImage.addEventListener( 'error', this );
// bind to image as well for Firefox. #191
this.img.addEventListener( 'load', this );
this.img.addEventListener( 'error', this );
this.proxyImage.src = this.img.src;
};
LoadingImage.prototype.getIsImageComplete = function() {
// check for non-zero, non-undefined naturalWidth
// fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
return this.img.complete && this.img.naturalWidth;
};
LoadingImage.prototype.confirm = function( isLoaded, message ) {
this.isLoaded = isLoaded;
this.emitEvent( 'progress', [ this, this.img, message ] );
};
// ----- events ----- //
// trigger specified handler for event type
LoadingImage.prototype.handleEvent = function( event ) {
var method = 'on' + event.type;
if ( this[ method ] ) {
this[ method ]( event );
}
};
LoadingImage.prototype.onload = function() {
this.confirm( true, 'onload' );
this.unbindEvents();
};
LoadingImage.prototype.onerror = function() {
this.confirm( false, 'onerror' );
this.unbindEvents();
};
LoadingImage.prototype.unbindEvents = function() {
this.proxyImage.removeEventListener( 'load', this );
this.proxyImage.removeEventListener( 'error', this );
this.img.removeEventListener( 'load', this );
this.img.removeEventListener( 'error', this );
};
// -------------------------- ImageAttrImage -------------------------- //
function ImageAttrImage( url, element ) {
this.url = url;
this.element = element;
this.img = new Image();
}
// inherit LoadingImage prototype
ImageAttrImage.prototype = Object.create( LoadingImage.prototype );
ImageAttrImage.prototype.check = function() {
this.img.addEventListener( 'load', this );
this.img.addEventListener( 'error', this );
this.img.src = this.url;
// check if image is already complete
var isComplete = this.getIsImageComplete();
if ( isComplete ) {
this.unbindEvents();
this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
}
};
ImageAttrImage.prototype.applyStyle = function() {
this.element.setAttribute('image', '*')
this.element.style['background-image'] = 'url('+this.url+')';
this.element.style['background-size'] = 'cover';
this.element.style['background-position'] = 'center center';
this.element.style['background-repeat'] = 'no-repeat';
};
ImageAttrImage.prototype.unbindEvents = function() {
this.applyStyle();
this.img.removeEventListener( 'load', this );
this.img.removeEventListener( 'error', this );
};
ImageAttrImage.prototype.confirm = function( isLoaded, message ) {
this.isLoaded = isLoaded;
this.emitEvent( 'progress', [ this, this.element, message ] );
};
// -------------------------- Background -------------------------- //
function Background( url, element ) {
this.url = url;
this.element = element;
this.img = new Image();
}
// inherit LoadingImage prototype
Background.prototype = Object.create( LoadingImage.prototype );
Background.prototype.check = function() {
this.img.addEventListener( 'load', this );
this.img.addEventListener( 'error', this );
this.img.src = this.url;
// check if image is already complete
var isComplete = this.getIsImageComplete();
if ( isComplete ) {
this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
this.unbindEvents();
}
};
Background.prototype.unbindEvents = function() {
this.img.removeEventListener( 'load', this );
this.img.removeEventListener( 'error', this );
};
Background.prototype.confirm = function( isLoaded, message ) {
this.isLoaded = isLoaded;
this.emitEvent( 'progress', [ this, this.element, message ] );
};
// -------------------------- jQuery -------------------------- //
ImagesLoadedPN.makeJQueryPlugin = function( jQuery ) {
jQuery = jQuery || window.jQuery;
if ( !jQuery ) {
return;
}
// set local variable
$ = jQuery;
// $().ImagesLoadedPN()
$.fn.imagesLoadedPN = function( options, callback ) {
var instance = new ImagesLoadedPN( this, options, callback );
return instance.jqDeferred.promise( $(this) );
};
};
// try making plugin
ImagesLoadedPN.makeJQueryPlugin();
// -------------------------- -------------------------- //
return ImagesLoadedPN;
});
|
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M7 3v9c0 .55.45 1 1 1h2v7.15c0 .51.67.69.93.25l5.19-8.9c.39-.67-.09-1.5-.86-1.5H13l2.49-6.65c.25-.65-.23-1.35-.93-1.35H8c-.55 0-1 .45-1 1z"
}), 'FlashOnRounded');
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.removeResizeListener = exports.addResizeListener = void 0;
/* Modified from https://github.com/sdecima/javascript-detect-element-resize
* version: 0.5.3
*
* The MIT License (MIT)
*
* Copyright (c) 2013 Sebastián Décima
*
* 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.
*
*/
var isServer = typeof window === 'undefined';
/* istanbul ignore next */
var requestFrame = function () {
if (isServer) return;
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
return window.setTimeout(fn, 20);
};
return function (fn) {
return raf(fn);
};
}();
/* istanbul ignore next */
var cancelFrame = function () {
if (isServer) return;
var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
return function (id) {
return cancel(id);
};
}();
/* istanbul ignore next */
var resetTrigger = function resetTrigger(element) {
var trigger = element.__resizeTrigger__;
var expand = trigger.firstElementChild;
var contract = trigger.lastElementChild;
var expandChild = expand.firstElementChild;
contract.scrollLeft = contract.scrollWidth;
contract.scrollTop = contract.scrollHeight;
expandChild.style.width = expand.offsetWidth + 1 + 'px';
expandChild.style.height = expand.offsetHeight + 1 + 'px';
expand.scrollLeft = expand.scrollWidth;
expand.scrollTop = expand.scrollHeight;
};
/* istanbul ignore next */
var checkTriggers = function checkTriggers(element) {
return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
};
/* istanbul ignore next */
var scrollListener = function scrollListener(event) {
var _this = this;
resetTrigger(this);
if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
this.__resizeRAF__ = requestFrame(function () {
if (checkTriggers(_this)) {
_this.__resizeLast__.width = _this.offsetWidth;
_this.__resizeLast__.height = _this.offsetHeight;
_this.__resizeListeners__.forEach(function (fn) {
fn.call(_this, event);
});
}
});
};
/* Detect CSS Animations support to detect element display/re-attach */
var attachEvent = isServer ? {} : document.attachEvent;
var DOM_PREFIXES = 'Webkit Moz O ms'.split(' ');
var START_EVENTS = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
var RESIZE_ANIMATION_NAME = 'resizeanim';
var animation = false;
var keyFramePrefix = '';
var animationStartEvent = 'animationstart';
/* istanbul ignore next */
if (!attachEvent && !isServer) {
var testElement = document.createElement('fakeelement');
if (testElement.style.animationName !== undefined) {
animation = true;
}
if (animation === false) {
var prefix = '';
for (var i = 0; i < DOM_PREFIXES.length; i++) {
if (testElement.style[DOM_PREFIXES[i] + 'AnimationName'] !== undefined) {
prefix = DOM_PREFIXES[i];
keyFramePrefix = '-' + prefix.toLowerCase() + '-';
animationStartEvent = START_EVENTS[i];
animation = true;
break;
}
}
}
}
var stylesCreated = false;
/* istanbul ignore next */
var createStyles = function createStyles() {
if (!stylesCreated && !isServer) {
var animationKeyframes = "@".concat(keyFramePrefix, "keyframes ").concat(RESIZE_ANIMATION_NAME, " { from { opacity: 0; } to { opacity: 0; } } ");
var animationStyle = "".concat(keyFramePrefix, "animation: 1ms ").concat(RESIZE_ANIMATION_NAME, ";"); // opacity: 0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
var css = "".concat(animationKeyframes, "\n .resize-triggers { ").concat(animationStyle, " visibility: hidden; opacity: 0; }\n .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; }\n .resize-triggers > div { background: #eee; overflow: auto; }\n .contract-trigger:before { width: 200%; height: 200%; }");
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
stylesCreated = true;
}
};
/* istanbul ignore next */
var addResizeListener = function addResizeListener(element, fn) {
if (isServer) return;
if (attachEvent) {
element.attachEvent('onresize', fn);
} else {
if (!element.__resizeTrigger__) {
if (getComputedStyle(element).position === 'static') {
element.style.position = 'relative';
}
createStyles();
element.__resizeLast__ = {};
element.__resizeListeners__ = [];
var resizeTrigger = element.__resizeTrigger__ = document.createElement('div');
resizeTrigger.className = 'resize-triggers';
resizeTrigger.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
element.appendChild(resizeTrigger);
resetTrigger(element);
element.addEventListener('scroll', scrollListener, true);
/* Listen for a css animation to detect element display/re-attach */
if (animationStartEvent) {
resizeTrigger.addEventListener(animationStartEvent, function (event) {
if (event.animationName === RESIZE_ANIMATION_NAME) {
resetTrigger(element);
}
});
}
}
element.__resizeListeners__.push(fn);
}
};
/* istanbul ignore next */
exports.addResizeListener = addResizeListener;
var removeResizeListener = function removeResizeListener(element, fn) {
if (attachEvent) {
element.detachEvent('onresize', fn);
} else {
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
if (!element.__resizeListeners__.length) {
element.removeEventListener('scroll', scrollListener);
element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
}
}
};
exports.removeResizeListener = removeResizeListener;
|
/*
* Licensed to Apereo under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Apereo licenses this file to you 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 the following location:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Ext.define('Ssp.view.tools.actionplan.SearchChallengeView', {
extend: 'Ext.form.Panel',
alias: 'widget.searchchallengeview',
mixins: ['Deft.mixin.Injectable', 'Deft.mixin.Controllable'],
inject: {
apiProperties: 'apiProperties',
appEventsController: 'appEventsController',
columnRendererUtils: 'columnRendererUtils',
challengesStore: 'challengesAllUnpagedStore',
challengeCategoriesStore: 'challengeCategoriesStore',
challengeReferralsStore: 'challengeReferralsStore',
textStore: 'sspTextStore'
},
controller: 'Ssp.controller.tool.actionplan.SearchChallengeViewController',
title: 'Add Task',
width: '100%',
height: '100%',
initComponent: function(){
var me = this;
Ext.apply(me, {
layout: {
type: 'fit'
},
padding: 0,
preventHeader: true,
items: [{
xtype: 'fieldcontainer',
fieldLabel: '',
layout: 'vbox',
margin: '0 0 0 0',
padding: '0 0 0 15',
width: '100%',
height: '100%',
items: [{
xtype: 'container',
border: 0,
title: '',
margin: '0 0 5 0',
padding: '5 0 0 5',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'label',
padding: '0 0 2 3',
text: me.textStore.getValueByCode('ssp.label.action-plan.search-challenge.filter', 'Filter Category, Challenge or Keyword')
}, {
xtype: 'tbspacer',
width: 195
}, {
tooltip: me.textStore.getValueByCode('ssp.tooltip.reset-button', 'Reset'),
text: me.textStore.getValueByCode('ssp.label.reset-button', 'Reset'),
type: 'refresh',
xtype: 'button',
padding: '0 0 2 3',
itemId: 'resetChallengesButton'
}]
}, {
xtype: 'combobox',
fieldLabel: '',
itemId: 'categoryNameCombo',
name: 'categoryNameCombo',
fieldLabel: '',
emptyText: me.textStore.getValueByCode('ssp.empty-text.action-plan.search-challenge.category', 'Filter by Category'),
store: me.challengeCategoriesStore,
valueField: 'id',
displayField: 'name',
mode: 'local',
typeAhead: true,
queryMode: 'local',
allowBlank: true,
width: 430,
padding: '0 0 0 10'
}, {
xtype: 'combobox',
fieldLabel: '',
itemId: 'categoryChallengeNameCombo',
name: 'categoryChallengeNameCombo',
fieldLabel: '',
emptyText: me.textStore.getValueByCode('ssp.empty-text.action-plan.search-challenge.challenge', 'Filter by Challenge'),
store: me.challengesStore,
valueField: 'id',
displayField: 'name',
mode: 'local',
typeAhead: true,
queryMode: 'local',
allowBlank: true,
width: 430,
padding: '0 0 0 10'
}, {
xtype: 'fieldcontainer',
margin: '0 0 0 10',
layout: {
align: 'stretch',
type: 'hbox'
},
fieldLabel: '',
items: [{
xtype: 'button',
text: me.textStore.getValueByCode('ssp.label.search-button', 'Search'),
itemId: 'searchKeywordButton'
}, {
xtype: 'tbspacer',
width: 10
}, {
xtype: 'textfield',
fieldLabel: '',
itemId: 'searchKeyword',
name: 'searchKeyword',
margin: ' 0 0 0 20',
width: 380,
enableKeyEvents: true,
listeners: {
afterrender: function(field){
field.focus(false, 0);
},
specialkey: {
scope: me,
fn: function(field, el){
if (el.getKey() == Ext.EventObject.ENTER) {
this.appEventsController.getApplication().fireEvent("onSearchKeyword");
}
}
}
}
}]
}, {
xtype: 'fieldset',
width: '100%',
padding: '0 305 0 10',
margin: '2',
layout: {
align: 'stretch',
type: 'hbox'
},
title: me.textStore.getValueByCode('ssp.label.action-plan.search-challenge.add-challenge-referral', 'Add ChallengeReferral'),
items: [{
xtype: 'button',
text: me.textStore.getValueByCode('ssp.label.add-button', 'Add'),
itemId: 'addChallengeReferralButton'
}, {
xtype: 'tbspacer',
width: 10
}, {
xtype: 'button',
text: me.textStore.getValueByCode('ssp.label.add-all-button', 'Add All'),
itemId: 'addAllChallengeReferralButton'
}]
}, {
xtype: 'challengesgrid',
flex: 1,
itemId: 'challengesgrid'
}]
}],
dockedItems: [{
xtype: 'fieldcontainer',
layout: {
align: 'stretch',
type: 'hbox'
},
fieldLabel: '',
items: [{
xtype: 'button',
text: me.textStore.getValueByCode('ssp.label.save-button', 'Save'),
itemId: 'saveBulkActionPlanButton'
}, {
xtype: 'button',
text: me.textStore.getValueByCode('ssp.label.cancel-button', 'Cancel'),
itemId: 'cancelButton'
}]
}]
});
return me.callParent(arguments);
}
});
|
/*
* /MathJax/localization/bg/HTML-CSS.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Localization.addTranslation("bg", "HTML-CSS", {
version: "2.7.5",
isLoaded: true,
strings: {}
});
MathJax.Ajax.loadComplete("[MathJax]/localization/bg/HTML-CSS.js");
|
import { Router } from 'express'
import trooperRoutes from './trooper.js'
import createError from 'http-errors'
import jwt from 'jwt-simple'
import moment from 'moment'
import config from 'config'
const routes = new Router()
routes.get('/', (req, res) => res.send('Ola s'))
routes.post('/login', (request, response, next) => {
const { username, password } = request.body
if (username === 'rebels' && password === '1138') {
const token = jwt.encode({
user: username,
exp: moment().add(7, 'days').valueOf()
}, config.get('jwtTokenSecret'))
return response.json({ token })
}
next(createError(401, 'Unauthorized'))
})
const verifyJwt = (request, response, next) => {
const token = request.query.token || request.headers['x-token'];
if (!token) {
return next(createError(401, 'Unauthorized'))
}
try {
const decoded = jwt.decode(token, config.get('jwtTokenSecret'))
const isExpired = moment(decoded.exp).isBefore(new Date())
if(isExpired) {
next(createError(401, 'Unauthorized'))
} else {
request.user = decoded.user
next()
}
} catch(err) {
err.status = 401
return next(err)
}
}
routes.use('/troopers', verifyJwt, trooperRoutes)
export default routes
|
module.exports=[{isApi:!0,priority:1000.0001,key:"Window",style:{backgroundColor:"#fff"}},{isApi:!0,priority:1000.0004,key:"View",style:{height:Ti.UI.SIZE,backgroundColor:"#FFFFFF"}},{isApi:!0,priority:1000.0005,key:"ScrollView",style:{backgroundColor:"#FFFFFF"}},{isApi:!0,priority:1000.0006,key:"Button",style:{backgroundColor:"#EEE",color:"#000"}},{isApi:!0,priority:1000.0034,key:"Label",style:{width:Ti.UI.SIZE,height:Ti.UI.SIZE,color:"#000000"}},{isApi:!0,priority:1000.0063,key:"ListView",style:{separatorStyle:Titanium.UI.TABLE_VIEW_SEPARATOR_STYLE_SINGLE_LINE}},{isClass:!0,priority:10000.0002,key:"vertical",style:{layout:"vertical"}},{isClass:!0,priority:10000.0003,key:"horizontal",style:{layout:"horizontal"}},{isClass:!0,priority:10000.0007,key:"col_1",style:{width:"10%"}},{isClass:!0,priority:10000.0008,key:"col_2",style:{width:"20%"}},{isClass:!0,priority:10000.0009,key:"col_3",style:{width:"30%"}},{isClass:!0,priority:10000.001,key:"col_4",style:{width:"40%"}},{isClass:!0,priority:10000.0011,key:"col_5",style:{width:"50%"}},{isClass:!0,priority:10000.0012,key:"col_6",style:{width:"60%"}},{isClass:!0,priority:10000.0013,key:"col_7",style:{width:"70%"}},{isClass:!0,priority:10000.0014,key:"col_8",style:{width:"80%"}},{isClass:!0,priority:10000.0015,key:"col_9",style:{width:"90%"}},{isClass:!0,priority:10000.0016,key:"row",style:{width:"100%"}},{isClass:!0,priority:10000.0017,key:"col_offset_1",style:{left:"10%"}},{isClass:!0,priority:10000.0018,key:"col_offset_2",style:{left:"20%"}},{isClass:!0,priority:10000.0019,key:"col_offset_3",style:{left:"30%"}},{isClass:!0,priority:10000.002,key:"col_offset_4",style:{left:"40%"}},{isClass:!0,priority:10000.0021,key:"col_offset_5",style:{left:"50%"}},{isClass:!0,priority:10000.0022,key:"col_offset_6",style:{left:"60%"}},{isClass:!0,priority:10000.0023,key:"col_offset_7",style:{left:"70%"}},{isClass:!0,priority:10000.0024,key:"col_offset_8",style:{left:"80%"}},{isClass:!0,priority:10000.0025,key:"col_offset_9",style:{left:"90%"}},{isClass:!0,priority:10000.0026,key:"float_left",style:{left:"0%"}},{isClass:!0,priority:10000.0027,key:"float_right",style:{right:"0%"}},{isClass:!0,priority:10000.0028,key:"top_right",style:{top:"0%",right:"0%"}},{isClass:!0,priority:10000.0029,key:"top_left",style:{top:"0%",left:"0%"}},{isClass:!0,priority:10000.003,key:"bottom_right",style:{bottom:"0%",right:"0%"}},{isClass:!0,priority:10000.0031,key:"bottom_left",style:{bottom:"0%",left:"0%"}},{isClass:!0,priority:10000.0032,key:"greycliffbold",style:{font:{fontFamily:"GreycliffCF-Bold"}}},{isClass:!0,priority:10000.0037,key:"noshow",style:{hiddenBehavior:Ti.UI.HIDDEN_BEHAVIOR_GONE}},{isClass:!0,priority:10000.006,key:"container",style:{}},{isClass:!0,priority:10101.0035,key:"vertical-scroll",style:{width:Ti.UI.FILL,scrollType:"vertical",layout:"vertical"}},{isId:!0,priority:100000.0033,key:"activityindicator",style:{style:Ti.UI.ActivityIndicatorStyle.DARK,top:10,left:10,height:Ti.UI.SIZE,width:Ti.UI.SIZE}},{isId:!0,priority:100000.0061,key:"searchfield",style:{returnKeyType:Ti.UI.RETURNKEY_SEARCH,top:"5px",borderStyle:Ti.UI.INPUT_BORDERSTYLE_LINE,hintTextColor:"#A0A0A0",color:"black",borderColor:"black",borderWidth:"0.5"}},{isId:!0,priority:100000.0062,key:"activityIndicator",style:{style:Titanium.UI.ActivityIndicatorStyle.DARK,hiddenBehavior:Ti.UI.HIDDEN_BEHAVIOR_GONE}}];
|
import { useMachine } from '@xstate/react'
import { Counter, Toggle } from '../components'
import { toggleMachine } from '../machines/toggleMachine'
import { counterMachine } from '../machines/counterMachine'
const IndexPage = () => {
const [toggleCurrent, toggleSend] = useMachine(toggleMachine)
const [counterCurrent, counterSend] = useMachine(counterMachine, {
context: { count: 999 },
})
return (
<div>
<Counter
counter={{
count: counterCurrent.context.count,
increment: () => counterSend('INC'),
decrement: () => counterSend('DEC'),
reset: () => counterSend('RESET'),
}}
/>
<hr />
<Toggle
onToggle={() => toggleSend('TOGGLE')}
active={toggleCurrent.matches('active')}
/>
</div>
)
}
export default IndexPage
|
'use strict'
// a task must accept the build contents object
// a task must return a Promise
const task = contents => new Promise((resolve, reject) => {
// optionally, work with data added by the handmade core or previous tasks in the build
let { core } = contents
// when done working with the contents object, remeber to resolve both
// the contents modified by your task, and the contents you didn't touch
resolve(contents)
})
module.exports = task
|
//储仓控件
//--------------------------------------------必须重写的原型----------------------------------------------------------------------------
//创建一个新实例
function InitKitchen1Control() {
return new Kitchen1Control();
}
function Kitchen1JsonToObj(element) {
var obj = new Kitchen1Control();
obj.ShowWay = element.ShowWay;
obj.Item = new Array();
if (element.Item != null && element.Item.length > 0) {
for (var i = 0; i < element.Item.length; i++) {
var m = new Kitchen1Item();
m.Link = element.Item[i].Link;
m.Img = element.Item[i].Img;
m.DIVLink = element.Item[i].DIVLink;
m.DisplayText = element.Item[i].DisplayText;
obj.Item.push(m);
}
}
return obj;
}
//图片广告控件
function Kitchen1Control() {
this.Type = 'Kitchen1';
this.ShowWay = 'left';
this.Item = new Array();
this.ID = 'Control' + $.CreateID();
}
Kitchen1Control.prototype = new BaseControl();
//渲染HTML
Kitchen1Control.prototype.Html = function () {
return juicer($("#" + this.Type + "Control").html(), { Model: this })
};
//展示
Kitchen1Control.prototype.Show = function () {
var currentControl = this;
var targetView = $("#MyBox").find("div[data-id='" + currentControl.ID + "']");
var top = targetView.offset().top - $(".diy-container-layout").offset().top;
$(".diy-ctrl").css("top", top + 'px')
if (this.Item.length<=0)
{
var controlItem = new Kitchen1Item();
currentControl.Add(controlItem);
targetView.find(".big").find("a").attr("data-id", controlItem.ID);
for (var i = 0; i < 3;i++)
{
var controlItem = new Kitchen1Item();
currentControl.Add(controlItem);
targetView.find(".small").find("a:eq("+i+")").attr("data-id", controlItem.ID);
}
page.Set(currentControl);
}
$(".diy-ctrl").html(juicer($("#" + this.Type + "Edit-template").html(), { Model: this, DataModel: DataModel }));
}
//操作监听
Kitchen1Control.prototype.ReadyListen = function () {
this.ExtendToShowWay();//监听显示方式动作
this.Draggable();
this.Upload();
this.InputChange();
this.NavigateChange();
};
//--------------------------------------------必须重写的原型----------------------------------------------------------------------------
//--------------------------------------------控件扩展----------------------------------------------------------------------------
//显示方式动作
Kitchen1Control.prototype.ExtendToShowWay = function () {
var currentControl = this;
var self = $("#" + currentControl.Type + "ItemPanel");
var id = currentControl.ID;
var targetView = $("#MyBox").find("div[data-id='" + id + "']");
self.find('[name="showWay"]').unbind("click");
self.find('[name="showWay"]').on('click', function () {
if ($(this).val() == 'left') {
targetView.find('.diy-showcase').removeClass('row-reverse');
currentControl.ShowWay = $(this).val();
page.Set(currentControl);
}
else if ($(this).val() == 'right') {
currentControl.ShowWay = $(this).val();
page.Set(currentControl);
targetView.find('.diy-showcase').addClass('row-reverse');
}
});
}
//子项拖拽
Kitchen1Control.prototype.Draggable = function () {
var currentControl = this;
$(".diy-ctrl").find(".diy-media-list").sortable({
selector: ".acts-header .icon-expand-full",
revert: true,
stop: function (e, t) {
currentControl.Sort();
}
});
}
//排序
Kitchen1Control.prototype.Sort = function () {
var currentControl = this;
if (currentControl.Item.length > 0) {
var newArray = new Array();
$("#ItemList").children("li").each(function (index, element) {
var id = $(element).attr("data-id");
var controlItem = currentControl.Get(id);
if (controlItem != undefined && controlItem != null) {
newArray.push(controlItem);
}
});
currentControl.Item = newArray;
page.Set(currentControl);
}
return page;
}
//
Kitchen1Control.prototype.Upload = function () {
var currentControl = this;
var self = $("#" + currentControl.Type + "ItemPanel");
var id = currentControl.ID;
var targetView = $("#MyBox").find("div[data-id='" + id + "']");
var $li = null;
$(".configurator").delegate(".openFile", "click", function (e) {
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);// 或用initMouseEvent(),不过需要更多参数
$(".webuploader-element-invisible").get(0).dispatchEvent(evt);
$li = $(this).parents("li");
var itemID = $li.attr("data-id");
var item = currentControl.Get(itemID);
$.UploadingControlItem.UploadingControlItem = item;
$.UploadingControlItem.UploadingControl = currentControl;
$.UploadingControlItem.li = $li;
})
}
Kitchen1Control.prototype.UploadFinish = function (imgUrl) {
currentControl = this;
var item = $.UploadingControlItem.UploadingControlItem;
item.Img = imgUrl;
currentControl.Set(item);
page.Set(currentControl);
var targetView = $("#MyBox").find("div[data-id='" + currentControl.ID + "']");
targetView.find("a[data-id='" + item.ID + "']").find("img").attr("src", imgUrl);
}
//子项输入改变
Kitchen1Control.prototype.InputChange = function () {
var currentControl = this;
$("#ItemList").find("input[name='Link']").unbind("blur");
$("#ItemList").find("input[name='Link']").bind("blur", function (e) {
e.preventDefault();
var navigateUrl = $(this).val();
if (!$.TestUrl(navigateUrl)) {
$.ShowErrMessage("请输入http开头的链接");
return;
}
var itemID = $(this).parents(".Item").attr("data-id");
var item = currentControl.Get(itemID);
item.Link = navigateUrl;
currentControl.Set(item);
page.Set(currentControl);
// var targetView = $("#MyBox").find("div[data-id='" + currentControl.ID + "']");
//targetView.find("li[data-id='" + item.ID + "']").find(".LinkTo").attr("href", navigateUrl);
})
}
//跳转链接改变
Kitchen1Control.prototype.NavigateChange = function () {
var currentControl = this;
$("#ItemList").find(".dropdown-menu").find("a").unbind("click");
$("#ItemList").find(".dropdown-menu").find("a").bind("click", function (e) {
e.preventDefault();
var opt = this;
var itemID = $(this).parents(".Item").attr("data-id");
var item = currentControl.Get(itemID);
if ($(this).attr("data-Url") == "-1") {
$(this).parents(".form-horizontal").find(".selectInfo").css("display", "none");
$(this).parents(".form-horizontal").find(".inputInfo").css("display", "");
item.DIVLink = "1";
$(this).parents(".form-horizontal").find(".inputInfo").find("input[name='Link']").val("");
} else if ($(this).attr("data-Url") == "-2") {
$("#ModalDIVPage").addClass("in");
$('.addDIVPage').unbind("click")
$('#DIYPageList').delegate(".addDIVPage", "click", function (e) {
var tem = null;
var tid = $(this).attr("data-TemplateID");
if (DataModel.DIYPages != null) {
for (var i = 0; i < DataModel.DIYPages.length; i++) {
if (DataModel.DIYPages[i].TemplateID == tid) {
tem = DataModel.DIYPages[i];
item.DisplayText = tem.Title;
item.Link = tem.Url;
item.LinkText = tem.Title;
var targetView = $("#MyBox").find("div[data-id='" + currentControl.ID + "']");
targetView.find("li[data-id='" + item.ID + "']").find(".diy-nav__label").html(tem.Title);
$(opt).parents(".form-horizontal").find(".selectInfo").find(".text-info").html(tem.Title);
$(opt).parents(".media-body").find("input[name='DisplayText']").val(tem.Title);
}
}
}
});
} else if ($(this).attr("data-Url") == "-3") {
$('[goodList]').undelegate(".AddGoods", "click")
$('.AddGoods').bind("click", function (e) {
var goods = null;
var productID = $(this).attr("data-ProductID");
for (var i = 0; i < DataModel.Goods.length; i++) {
if (DataModel.Goods[i].ProductID == productID) {
goods = DataModel.Goods[i];
}
}
item.DisplayText = goods.ProductName;
item.DIVLink = "0";
if (objectType == 2) {
if (Platform == "WxAPP") {
item.Link = "/pages/details/details?productId=" + productID + "&shopID=" + objectID;
} else {
item.Link = "/Views/Product/ProductInfo.html?productId=" + productID + "&shopID=" + objectID;
}
} else {
if (Platform == "WxAPP") {
item.Link = "/pages/details/details?productId=" + productID;
} else {
item.Link = "/Views/Product/ProductInfo.html?productId=" + productID;;
}
}
$(opt).parents(".form-horizontal").find(".selectInfo").css("display", "");
$(opt).parents(".form-horizontal").find(".inputInfo").css("display", "none");
$(opt).parents(".form-horizontal").find(".selectInfo").find(".text-info").html(item.DisplayText);
});
} else if ($(this).attr("data-Url") == "-4") {
$('#ModalCategory').undelegate(".setcategory", "click")
$('#ModalCategory').delegate(".setcategory", "click", function (e) {
var goods = null;
var catalogid = $(this).attr("data-catalogid");
var catalogtitle = $(this).attr("data-title");
item.DisplayText = catalogtitle;
item.DIVLink = "0";
if (objectType == 2) {
if (Platform == "WxAPP") {
item.Link = "/pages/goodsList/goodsList?CatalogId=" + catalogid + "&shopID=" + objectID;
} else {
item.Link = "/Views/Product/ProductList.html?CatalogId=" + catalogid + "&shopID=" + objectID;
}
} else {
if (Platform == "WxAPP") {
item.Link = "/pages/goodsList/goodsList?CatalogId=" + catalogid + "&shopID=" + objectID;
} else {
item.Link = "/Views/Product/ProductList.html?CatalogId=" + catalogid;;
}
}
$(opt).parents(".form-horizontal").find(".selectInfo").css("display", "");
$(opt).parents(".form-horizontal").find(".inputInfo").css("display", "none");
$(opt).parents(".form-horizontal").find(".selectInfo").find(".text-info").html(item.DisplayText);
});
} else {
var displayText = $(this).html();
var navigateUrl = $(this).attr("data-Url");
$(this).parents(".form-horizontal").find(".selectInfo").css("display", "");
$(this).parents(".form-horizontal").find(".inputInfo").css("display", "none");
$(this).parents(".form-horizontal").find(".selectInfo").find(".text-info").html(displayText);
item.DisplayText = displayText;
item.DIVLink = "0";
item.Link = navigateUrl;
}
currentControl.Set(item);
page.Set(currentControl);
})
}
//--------------------------------------------控件扩展----------------------------------------------------------------------------
|
var searchData=
[
['update_305',['update',['../classgame_1_1_grid.html#ab32fbb2e392049d6ee99b1cd144e516e',1,'game::Grid']]],
['updatebestscore_306',['updateBestScore',['../classplayer_1_1_player_model.html#a2fa2bb9dbf5ac4bd01965083296d9fda',1,'player::PlayerModel']]],
['updatecellnumber_307',['updateCellNumber',['../classgame_1_1_grid.html#ac81d2e447aac344d72ba3d828a462383',1,'game::Grid']]],
['updatecellstateat_308',['updateCellStateAt',['../classgame_1_1_grid.html#a9454191e6de31540aff1163a08b25cfb',1,'game::Grid']]],
['updatejsonfilecontent_309',['updateJSONFileContent',['../classplayer_1_1_player_model.html#a56f360dcb99337710921b43af35f8825',1,'player::PlayerModel']]],
['updateplayerpositionview_310',['updatePlayerPositionView',['../classgui_1_1_window.html#a35cab95882dca7d799bba83d4a0691a3',1,'gui::Window']]],
['updatepositionx_311',['updatePositionX',['../classplayer_1_1_player_model.html#a6f7abb0fd656cfd41ddcc09851fe0de0',1,'player::PlayerModel']]],
['updatepositiony_312',['updatePositionY',['../classplayer_1_1_player_model.html#a5444316dd5a0db65903b3e8d6cbad61b',1,'player::PlayerModel']]],
['updatescorelabel_313',['updateScoreLabel',['../classplayer_1_1_player_model.html#aa99cca5474251b884381778e4d87a586',1,'player::PlayerModel']]],
['updatestate_314',['updateState',['../classgame_1_1_cell.html#aab58177bd658e0e627adf03e8fd09f01',1,'game::Cell']]]
];
|
function solve(str) {
let i = 0;
let user = str[0].toString();
let count = 0;
let password = '';
for (let index = user.length - 1; index >= 0; index--) {
password += user[index];
}
while (true) {
if (str[i + 1] === password) {
console.log(`User ${user} logged in.`);
break;
} else if (count >= 3) {
console.log(`User ${user} blocked!`);
break;
} else {
console.log('Incorrect password. Try again.');
}
count++;
i++;
}
}
function solve2(input) {
let user = input.shift();
let password = user.split('').reverse().join('');
let count = 0;
while (true) {
let enter = input.shift();
if (enter === password) {
console.log(`User ${user} logged in.`);
break;
} else if (count >= 3) {
console.log(`User ${user} blocked!`);
break;
} else {
console.log('Incorrect password. Try again.');
count++;
}
}
}
// solve(['momi','imom']);
// solve(['Acer','login','go','let me in','recA']);
// solve(['sunny', 'rainy', 'cloudy', 'sunny', 'not sunny']);
// solve(['aca','login','go','let me in','recA']);
|
goog.require('goog.debug.Console');
goog.require('goog.testing.PropertyReplacer');
goog.require('goog.testing.jsunit');
goog.require('ydn.async');
goog.require('ydn.db.crud.Storage');
goog.require('ydn.debug');
var reachedFinalContinuation, schema, debug_console, db, objs;
var table_name = 'st_inline';
var table_name_offline = 'st_offline';
var store_name_inline_number = 'st_inline_n';
var load_store_name = 'st_load';
var setUp = function() {
ydn.json.POLY_FILL = true;
// ydn.debug.log('ydn.db', 'finest');
// ydn.db.crud.req.WebSql.DEBUG = true;
// ydn.debug.log('ydn.db', 'finest');
// ydn.db.tr.Serial.DEBUG = true;
//ydn.db.crud.req.IndexedDb.DEBUG = true;
// ydn.db.con.IndexedDb.DEBUG = true;
var indexes = [new ydn.db.schema.Index('tag', ydn.db.schema.DataType.TEXT)];
var stores = [new ydn.db.schema.Store(table_name, 'id'),
new ydn.db.schema.Store(store_name_inline_number, 'id', false, ydn.db.schema.DataType.NUMERIC, undefined, true),
new ydn.db.schema.Store(table_name_offline, undefined, false, ydn.db.schema.DataType.NUMERIC),
new ydn.db.schema.Store(load_store_name, 'id', false, ydn.db.schema.DataType.NUMERIC, indexes)
];
schema = new ydn.db.schema.Database(undefined, stores);
};
var tearDown = function() {
assertTrue('The final continuation was not reached', reachedFinalContinuation);
};
var test_remove_by_key_array = function() {
// ydn.db.crud.req.IndexedDb.DEBUG = true;
var db_name = 'test_41_remove_by_key_array';
var schema = {
stores: [{
name: 'st',
keyPath: 'id'
}]
};
var db = new ydn.db.crud.Storage(db_name, schema, options);
var ids = [Math.random(), Math.random(), Math.random()];
var objs = [];
var keys = [];
for (var i = 0; i < ids.length; i++) {
objs[i] = {id: ids[i]};
keys[i] = new ydn.db.Key('st', ids[i]);
}
var done = false;
var delCount, keys_before, keys_after;
waitForCondition(
// Condition
function() { return done; },
// Continuation
function() {
assertEquals('3 keys before', 3, keys_before.length);
assertEquals('delete count', 3, delCount);
assertEquals('0 keys after', 0, keys_after.length);
reachedFinalContinuation = true;
ydn.db.deleteDatabase(db_name, db.getType());
db.close();
},
100, // interval
1000); // maxTimeout
db.clear('st');
db.put('st', objs);
db.keys('st').addBoth(function(x) {
keys_before = x;
});
db.remove(keys).addBoth(function(x) {
delCount = x;
});
db.keys('st').addBoth(function(x) {
keys_after = x;
done = true;
});
};
var test_remove_by_key_range = function() {
var db_name = 'test_42_remove_by_key_range';
var db = new ydn.db.crud.Storage(db_name, schema, options);
db.clear(table_name);
db.put(table_name,
[{id: 1}, {id: 2}, {id: 3}, {id: 4}]
);
var hasEventFired = false;
var countValue;
waitForCondition(
// Condition
function() { return hasEventFired; },
// Continuation
function() {
assertEquals('remove result', 3, countValue);
// Remember, the state of this boolean will be tested in tearDown().
reachedFinalContinuation = true;
ydn.db.deleteDatabase(db_name, db.getType());
db.close();
},
100, // interval
1000); // maxTimeout
db.count(table_name); // break tx merge.
db.remove(table_name, ydn.db.KeyRange.lowerBound(2)).addCallback(function(value) {
countValue = value;
hasEventFired = true;
});
};
var test_clear_by_key_range = function() {
//ydn.db.con.simple.Store.DEBUG = true;
var db_name = 'test_43_clear_by_key_range';
var schema = {
stores: [{
name: table_name,
keyPath: 'id'
}]
};
var db = new ydn.db.crud.Storage(db_name, schema, options);
db.clear(table_name);
db.put(table_name,
[{id: 1}, {id: 2}, {id: 3}, {id: 4}]
);
var done = false;
var count, countValue, recountValue;
waitForCondition(
// Condition
function() { return done; },
// Continuation
function() {
assertEquals('before clear', 4, count);
assertEquals('clear result', 1, countValue);
assertEquals('clear result after reconnection', 1, recountValue);
// Remember, the state of this boolean will be tested in tearDown().
reachedFinalContinuation = true;
ydn.db.deleteDatabase(db_name, db.getType());
db.close();
},
100, // interval
1000); // maxTimeout
db.count(table_name).addBoth(function(x) {
count = x;
});
db.clear(table_name, ydn.db.KeyRange.lowerBound(2)).addBoth(function(value) {
db.count(table_name).addBoth(function(value) {
countValue = value;
db.close();
db = new ydn.db.crud.Storage(db_name, schema, options);
db.count(table_name).addBoth(function(value) {
recountValue = value;
done = true;
});
});
});
};
var test_remove_by_key = function() {
var db_name = 'test_remove_by_key';
var schema = {
stores: [{
name: 'st',
keyPath: 'id'
}]
};
var db = new ydn.db.crud.Storage(db_name, schema, options);
var ids = [Math.random(), Math.random(), Math.random()];
var objs = [];
for (var i = 0; i < ids.length; i++) {
objs[i] = {id: ids[i]};
}
var done = false;
var delCount, keys_before, keys_after;
waitForCondition(
// Condition
function() { return done; },
// Continuation
function() {
assertEquals('3 keys before', 3, keys_before.length);
assertEquals('delete count', 1, delCount);
assertEquals('2 keys after', 2, keys_after.length);
reachedFinalContinuation = true;
ydn.db.deleteDatabase(db_name, db.getType());
db.close();
},
100, // interval
2000); // maxTimeout
db.clear('st').addBoth(function(x) {
//console.log('cleared');
});
db.put('st', objs).addBoth(function(x) {
// console.log(x);
});
db.keys('st').addBoth(function(x) {
keys_before = x;
});
db.remove(new ydn.db.Key('st', ids[1])).addBoth(function(x) {
delCount = x;
});
db.keys('st').addBoth(function(x) {
keys_after = x;
done = true;
});
};
var tearDownPage = function() {
};
var testCase = new goog.testing.ContinuationTestCase();
testCase.autoDiscoverTests();
G_testRunner.initialize(testCase);
|
;(function ($) {
var primary = $('#primary')
$(document)
.pjax('#page a', '#primary', { fragment: '#primary', timeout: 6000 })
.on('submit', 'form[method="get"]', function (e) {
e.preventDefault()
$.pjax.submit(e, '#primary', { fragment: '#primary', timeout: 6000 })
})
.on('pjax:send', function () {
primary.addClass('pjax-loading')
NProgress.start()
})
.on('pjax:complete', function () {
primary.removeClass('pjax-loading')
NProgress.done()
Prism.highlightAll()
})
})(jQuery)
|
export { default } from "./raw";
|
const fs = require('fs');
const express = require('express');
const yaml = require('js-yaml');
const nunjucks = require('nunjucks');
const argon = require('argon-parser');
const markdown = require('markdown-it')({
breaks: true
});
const slider89Data = {
docs: require('./source/data/slider89/docs.json'),
// This is completely static
versions: require('./source/data/slider89/static-git.json')
};
const pageData = yaml.load(fs.readFileSync('./source/data/page-data.yml', 'utf8'));
const staticExclusions = [
'data',
'style'
];
const app = express();
const njk = nunjucks.configure('', {
express: app
});
(function() {
njk.addGlobal('staticPageData', pageData);
njk.addGlobal('getPageName', function(name, link) {
return name != null ? name : (link.slice(0, 1).toUpperCase() + link.slice(1));
});
njk.addGlobal('compareVer', function(ver1, ver2) {
[ver1, ver2] = [ver1, ver2].map(ver => parseInt('1' + ver.slice(1).replace(/[_\.]/g, '')));
if (ver1 > ver2) {
return 'greater';
} else if (ver1 < ver2) {
return 'smaller';
} else return 'equal';
});
njk.addGlobal('concatObj', function(objects) {
return objects.reduce(function(prev, current) {
return mergeObjects(JSON.parse(JSON.stringify(prev)), current);
}, {});
function mergeObjects(target, source) {
for (const key in source) {
if (key in target && typeof target[key] == 'object') {
mergeObjects(target[key], source[key]);
} else {
target[key] = source[key];
}
}
return target;
}
});
njk.addFilter('startsWith', function(val, expr) {
if (Array.isArray(expr)) {
for (str of expr) {
if (new RegExp('^' + str).test(val)) return true;
}
return false;
} else return new RegExp('^' + expr).test(val);
});
njk.addFilter('argonize', function(val) {
return (val != null ? argon.parse(val.toString()) : val);
});
njk.addFilter('argondry', function(val) {
return (val != null ? argon.parse(val.toString(), true) : val);
});
njk.addFilter('functName', function (val) {
const match = val.match(/(?:.+\s*=\s*)?(\w+)\([\d\D]*\)/);
return match ? match[1] : val;
});
njk.addFilter('isArray', function(val) {
return Array.isArray(val);
});
njk.addFilter('firstword', function(val) {
return (typeof val == 'string' && val.indexOf(' ') != -1 ? val.slice(0, val.indexOf(' ')) : val);
});
njk.addFilter('incrVer', function(val, array) {
for (const i in array) {
if (array[i].tag_name == 'v' + val) return array[i - 1] ? array[i - 1].tag_name.slice(1) : val;
}
return val;
});
njk.addFilter('separate', function(val, exclusion, tag) {
const excls = Array.isArray(exclusion) ? exclusion.reduce((prev, current) => prev + '|' + current) : exclusion;
return val.replace(new RegExp('([\\d\\D]+?)($|(?:'+excls+')(?:\\s+|$))', 'g'), function(match, value, exclusion) {
return '<' + tag + '>' + value + '</' + tag + '>' + exclusion;
});
});
njk.addFilter('kebab', function(val) {
return (typeof val == 'string' ? val.replace(/\s/g, '-') : val);
});
njk.addFilter('dotSnake', function(val) {
return (typeof val == 'string' ? val.replace(/\./g, '_') : val);
});
njk.addFilter('removeNewLines', function(val) {
return val?.trim().replace(/\n/g, ' ');
});
njk.addFilter('expandBackgroundImage', function(val) {
if (/^[\w-]+\.\w+$/.test(val)) {
return `url("/image/nav/${val}")`;
} else {
return val;
}
});
})();
argon.addFlag(['f', 'first'], function(val) {
return val.slice(0, val.indexOf(' '));
}, true);
app.listen(8000, function() {
console.log("Listening on port 8000!");
});
app.set('view engine', 'njk');
app.set('views', __dirname);
app.set('strict routing', false);
app.use('/style', express.static('source/style/css'));
fs.readdir('./source', (err, files) => {
if (err) {
console.error("Error scanning directory 'source': " + err);
return;
}
files
.filter(val => !staticExclusions.includes(val))
.forEach(val => {
app.use(val == 'root' ? '' : '/' + val, express.static('source/' + val));
});
});
app.use('/js/snake', express.static('snake/script'));
app.use('/style/snake', express.static('snake/style'));
function getNJK(viewPath, customParams, fileName = viewPath) {
let renderParams = {
pagePath: viewPath,
pageTopLink: viewPath.includes('/') ? viewPath.slice(0, viewPath.indexOf('/')) : viewPath,
pageData: (function() {
let data = pageData;
// Special check for index
if (viewPath !== '') {
for (const view of viewPath.split('/')) {
if (data.children) data = data.children;
data = data[view];
if (!data) return;
}
}
return data;
}())
};
if (customParams) {
renderParams = Object.assign(renderParams, customParams);
}
app.get('/' + viewPath, function(req, res) {
res.render('pages/' + fileName, renderParams);
});
}
getNJK('', false, 'index');
getNJK('blog');
getNJK('tools');
getNJK('tools/3DMagic');
getNJK('tools/RFG');
getNJK('tools/mocking');
getNJK('tools/spacing');
getNJK('webgl');
getNJK('webgl/triangles');
getNJK('webgl/matrices3d');
getNJK('games');
getNJK('games/snake3D', false, '../snake/snake3D')
getNJK('games/snake2D', false, '../snake/snake2D')
getNJK('slider89', {
data: slider89Data.docs,
gitData: slider89Data.versions
});
|
import React, { Component } from 'react';
import { connect } from 'dva';
import Link from 'umi/link';
import Exception from '@/components/Exception';
import GridContent from '@/components/PageHeaderWrapper/GridContent';
import { formatMessage, FormattedMessage } from 'umi/locale';
import numeral from 'numeral';
import {
Row,
Col,
Icon,
Card,
Tabs,
Table,
Radio,
DatePicker,
Tooltip,
Menu,
Dropdown,
} from 'antd';
import {
ChartCard,
MiniArea,
MiniBar,
MiniProgress,
Field,
Bar,
Pie,
TimelineChart,
} from '@/components/Charts';
class System extends Component {
state = {
loading : true
};
componentDidMount() {
window.history.go(-1);
window.open("https://loraserver.thulpwan.top/#/login");
}
render() {
return (
<></>
)
}
}
export default System;
|
export default "M19,15V19H5V15H19M20,13H4A1,1 0 0,0 3,14V20A1,1 0 0,0 4,21H20A1,1 0 0,0 21,20V14A1,1 0 0,0 20,13M7,18.5A1.5,1.5 0 0,1 5.5,17A1.5,1.5 0 0,1 7,15.5A1.5,1.5 0 0,1 8.5,17A1.5,1.5 0 0,1 7,18.5M19,5V9H5V5H19M20,3H4A1,1 0 0,0 3,4V10A1,1 0 0,0 4,11H20A1,1 0 0,0 21,10V4A1,1 0 0,0 20,3M7,8.5A1.5,1.5 0 0,1 5.5,7A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 8.5,7A1.5,1.5 0 0,1 7,8.5Z"
|
import styled from 'styled-components'
import { motion } from 'framer-motion'
export const Container = styled.div`
width: 84%;
margin: 0 auto;
`
export const Heading = styled.p`
font-style: normal;
font-weight: 600;
font-size: 18px;
line-height: 33px;
/* identical to box height */
/* text-transform: uppercase; */
/* color: #5f66f1; */
color: blck;
&::after {
content: '';
display: block;
padding: 2px;
margin-top: -2.2px;
width: 1rem;
background-color: #5f66f1;
}
`
export const ImpactSectionDiv = styled.div`
background-color: #fafafa;
height: 24rem;
margin: 7rem 0;
`
export const SectionContainer = styled.div`
width: 84%;
margin: 0 auto;
`
export const BadgeLabel = styled(motion.p)`
width: 10rem;
padding: 0.5rem 1rem;
background-color: #5f66f1;
color: #fff;
font-weight: bold;
font-size: 1.1rem;
letter-spacing: 0.01em;
border-top-right-radius: 5rem;
border-bottom-right-radius: 5rem;
`
export const SubHeading = styled.p`
font-weight: 400;
font-size: 13px;
line-height: 15px;
letter-spacing: 0.02em;
color: rgba(0, 0, 0, 0.65);
`
export const BottomSectionDiv = styled.div`
background-color: #fafafa;
height: 15rem;
margin: 7rem 0 -3rem 0;
`
export const BottomHeading = styled.p`
font-weight: 300;
font-size: 1.25rem;
line-height: 42px;
/* identical to box height */
letter-spacing: -0.02em;
color: rgba(0, 0, 0, 0.69);
`
|
/**
* jQuery Lightbox
* Version 0.5 - 11/29/2007
* @author Warren Krewenki
*
* This package is distributed under the BSD license.
* For full license information, see LICENSE.TXT
*
* Changes by:
* @author Krzysztof Kotowicz <koto at webworkers dot pl>:
* - bugfix: multiple instances of Lightbox galleries allowed
* (using opts variable instead of $.fn.lightbox.defaults)
* - bugfix: use var for local variables in a few functions
* - added support for navbarOnTop setting
* - added support for displayTitle setting
* - added support for slideNavBar setting (with slideNavBarSpeed)
* - added support for displayHelp setting
* - added support for fitToScreen setting (ported Lightbox VinDSL hack)
* (see http://www.huddletogether.com/forum/comments.php?DiscussionID=307)
* - plugin now uses jQuery.width() and jQuery.height()
* - removed eval() calls
* - removed destroyElement - uses jQuery.remove()
* - use of prevLinkText, nextLinkText and help
* - all strings are now placed in opts.strings to allow for customization/translation
*
* Based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
* Originally written to make use of the Prototype framework, and Script.acalo.us, now altered to use jQuery.
*
*
**/
(function($){
var opts;
$.fn.lightbox = function(options){
// build main options
opts = $.extend({}, $.fn.lightbox.defaults, options);
// initalize the lightbox
$.fn.lightbox.initialize();
return this.each(function(){
$(this).click(function(){
$(this).lightbox.start(this);
return false;
});
});
};
// lightbox functions
$.fn.lightbox.initialize = function(){
$('#overlay').remove();
$('#lightbox').remove();
opts.inprogress = false;
var outerImage = '<div id="outerImageContainer"><div id="imageContainer"><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="' + opts.strings.prevLinkTitle + '" id="prevLink"></a><a href="javascript://" id="nextLink" title="' + opts.strings.nextLinkTitle + '"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><img src="'+opts.fileLoadingImage+'"></a></div></div></div>';
var imageData = '<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">';
if (opts.displayHelp)
imageData += '<span id="helpDisplay">' + opts.strings.help + '</span>';
imageData += '<a href="javascript://" id="bottomNavClose" title="' + opts.strings.closeTitle + '"><img src="'+opts.fileBottomNavCloseImage+'"></a></div></div></div>';
var string;
if (opts.navbarOnTop) {
string = '<div id="overlay"></div><div id="lightbox">' + imageData + outerImage + '</div>';
$("body").append(string);
$("#imageDataContainer").addClass('ontop');
} else {
string = '<div id="overlay"></div><div id="lightbox">' + outerImage + imageData + '</div>';
$("body").append(string);
}
$("#overlay").click(function(){ $.fn.lightbox.end(); }).hide();
$("#lightbox").click(function(){ $.fn.lightbox.end();}).hide();
$("#loadingLink").click(function(){ $.fn.lightbox.end(); return false;});
$("#bottomNavClose").click(function(){ $.fn.lightbox.end(); return false; });
$('#outerImageContainer').width(opts.widthCurrent).height(opts.heightCurrent);
$('#imageDataContainer').width(opts.widthCurrent);
};
$.fn.lightbox.getPageSize = function(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
var arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
return arrayPageSize;
};
$.fn.lightbox.getPageScroll = function(){
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
var arrayPageScroll = new Array(xScroll,yScroll);
return arrayPageScroll;
};
$.fn.lightbox.pause = function(ms){
var date = new Date();
var curDate = null;
do{curDate = new Date();}
while( curDate - date < ms);
};
$.fn.lightbox.start = function(imageLink){
$("select, embed, object").hide();
var arrayPageSize = $.fn.lightbox.getPageSize();
$("#overlay").hide().css({width: '100%', height: arrayPageSize[1]+'px', opacity : opts.overlayOpacity}).fadeIn();
opts.imageArray = [];
imageNum = 0;
var anchors = document.getElementsByTagName( imageLink.tagName);
// if image is NOT part of a set..
if(!imageLink.rel || (imageLink.rel == '')){
// add single image to Lightbox.imageArray
opts.imageArray.push(new Array(imageLink.href, opts.displayTitle ? imageLink.title : ''));
} else {
// if image is part of a set..
$("a").each(function(){
if(this.href && (this.rel == imageLink.rel)){
opts.imageArray.push(new Array(this.href, opts.displayTitle ? this.title : ''));
}
});
for(i = 0; i < opts.imageArray.length; i++){
for(j = opts.imageArray.length-1; j>i; j--){
if(opts.imageArray[i][0] == opts.imageArray[j][0]){
opts.imageArray.splice(j,1);
}
}
}
while(opts.imageArray[imageNum][0] != imageLink.href) { imageNum++;}
}
// calculate top and left offset for the lightbox
var arrayPageScroll = $.fn.lightbox.getPageScroll();
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
var lightboxLeft = arrayPageScroll[0];
$('#lightbox').css({top: lightboxTop+'px', left: lightboxLeft+'px'}).show();
if (!opts.slideNavBar)
$('#imageData').hide();
$.fn.lightbox.changeImage(imageNum);
};
$.fn.lightbox.changeImage = function(imageNum){
if(opts.inprogress == false){
opts.inprogress = true;
opts.activeImage = imageNum; // update global var
// hide elements during transition
$('#loading').show();
$('#lightboxImage').hide();
$('#hoverNav').hide();
$('#prevLink').hide();
$('#nextLink').hide();
if (opts.slideNavBar) { // delay preloading image until navbar will slide up
// $('#imageDataContainer').slideUp(opts.navBarSlideSpeed, $.fn.doChangeImage);
$('#imageDataContainer').hide();
$('#imageData').hide();
$.fn.doChangeImage();
} else {
$.fn.doChangeImage();
}
}
};
$.fn.doChangeImage = function(){
imgPreloader = new Image();
// once image is preloaded, resize image container
imgPreloader.onload=function(){
var newWidth = imgPreloader.width;
var newHeight = imgPreloader.height;
if (opts.fitToScreen) {
var arrayPageSize = $.fn.lightbox.getPageSize();
var ratio;
var initialPageWidth = arrayPageSize[2] - 2 * opts.borderSize;
var initialPageHeight = arrayPageSize[3] - 200;
if (imgPreloader.height > initialPageHeight)
{
newWidth = parseInt((initialPageHeight/imgPreloader.height) * imgPreloader.width);
newHeight = initialPageHeight;
}
else if (imgPreloader.width > initialPageWidth)
{
newHeight = parseInt((initialPageWidth/imgPreloader.width) * imgPreloader.height);
newWidth = initialPageWidth;
}
}
$('#lightboxImage').attr('src', opts.imageArray[opts.activeImage][0])
.width(newWidth).height(newHeight);
$.fn.lightbox.resizeImageContainer(newWidth, newHeight);
};
imgPreloader.src = opts.imageArray[opts.activeImage][0];
};
$.fn.lightbox.end = function(){
$.fn.lightbox.disableKeyboardNav();
$('#lightbox').hide();
$('#overlay').fadeOut();
$('select, object, embed').show();
};
$.fn.lightbox.preloadNeighborImages = function(){
if((opts.imageArray.length - 1) > opts.activeImage){
preloadNextImage = new Image();
preloadNextImage.src = opts.imageArray[opts.activeImage + 1][0];
}
if(opts.activeImage > 0){
preloadPrevImage = new Image();
preloadPrevImage.src = opts.imageArray[opts.activeImage - 1][0];
}
};
$.fn.lightbox.keyboardAction = function(e){
if (e == null) { // ie
var keycode = event.keyCode;
var escapeKey = 27;
} else { // mozilla
var keycode = e.keyCode;
var escapeKey = e.DOM_VK_ESCAPE;
}
var key = String.fromCharCode(keycode).toLowerCase();
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
$.fn.lightbox.end();
} else if((key == 'p') || (keycode == 37)){ // display previous image
if(opts.activeImage != 0){
$.fn.lightbox.disableKeyboardNav();
$.fn.lightbox.changeImage(opts.activeImage - 1);
}
} else if((key == 'n') || (keycode == 39)){ // display next image
if(opts.activeImage != (opts.imageArray.length - 1)){
$.fn.lightbox.disableKeyboardNav();
$.fn.lightbox.changeImage(opts.activeImage + 1);
}
}
};
$.fn.lightbox.resizeImageContainer = function(imgWidth, imgHeight){
// get current width and height
opts.widthCurrent = document.getElementById('outerImageContainer').offsetWidth;
opts.heightCurrent = document.getElementById('outerImageContainer').offsetHeight;
// get new width and height
var widthNew = (imgWidth + (opts.borderSize * 2));
var heightNew = (imgHeight + (opts.borderSize * 2));
// scalars based on change from old to new
opts.xScale = ( widthNew / opts.widthCurrent) * 100;
opts.yScale = ( heightNew / opts.heightCurrent) * 100;
// calculate size difference between new and old image, and resize if necessary
wDiff = opts.widthCurrent - widthNew;
hDiff = opts.heightCurrent - heightNew;
$('#imageDataContainer').animate({width: widthNew},opts.resizeSpeed,'linear');
$('#outerImageContainer').animate({width: widthNew},opts.resizeSpeed,'linear',function(){
$('#outerImageContainer').animate({height: heightNew},opts.resizeSpeed,'linear',function(){
$.fn.lightbox.showImage();
});
});
// if new and old image are same size and no scaling transition is necessary,
// do a quick pause to prevent image flicker.
if((hDiff == 0) && (wDiff == 0)){
if (jQuery.browser.msie){ $.fn.lightbox.pause(250); } else { $.fn.lightbox.pause(100);}
}
$('#prevLink').height(imgHeight);
$('#nextLink').height(imgHeight);
};
$.fn.lightbox.showImage = function(){
$('#loading').hide();
$('#lightboxImage').fadeIn("fast");
$.fn.lightbox.updateDetails();
$.fn.lightbox.preloadNeighborImages();
opts.inprogress = false;
};
$.fn.lightbox.updateDetails = function(){
$('#numberDisplay').html('');
if(opts.imageArray[opts.activeImage][1]){
$('#caption').html(opts.imageArray[opts.activeImage][1]).show();
}
// if image is part of set display 'Image x of x'
if(opts.imageArray.length > 1){
var nav_html;
nav_html = opts.strings.image + (opts.activeImage + 1) + opts.strings.of + opts.imageArray.length;
// display previous / next text links
if ((opts.activeImage) > 0) {
nav_html = '<a title="' + opts.strings.prevLinkTitle + '" href="#" id="prevLinkText">' + opts.strings.prevLinkText + "</a>" + nav_html;
}
if ((opts.activeImage + 1) < opts.imageArray.length) {
nav_html += '<a title="' + opts.strings.nextLinkTitle + '" href="#" id="nextLinkText">' + opts.strings.nextLinkText + "</a>";
}
$('#numberDisplay').html(nav_html).show();
}
if (opts.slideNavBar) {
$("#imageData").slideDown(opts.navBarSlideSpeed);
} else {
$("#imageData").show();
}
var arrayPageSize = $.fn.lightbox.getPageSize();
$('#overlay').height(arrayPageSize[1]);
$.fn.lightbox.updateNav();
};
$.fn.lightbox.updateNav = function(){
if(opts.imageArray.length > 1){
$('#hoverNav').show();
// if not first image in set, display prev image button
if(opts.activeImage != 0){
$('#prevLink,#prevLinkText').show().click(function(){
$.fn.lightbox.changeImage(opts.activeImage - 1); return false;
});
}
// if not last image in set, display next image button
if(opts.activeImage != (opts.imageArray.length - 1)){
$('#nextLink,#nextLinkText').show().click(function(){
$.fn.lightbox.changeImage(opts.activeImage +1); return false;
});
}
$.fn.lightbox.enableKeyboardNav();
}
};
$.fn.lightbox.enableKeyboardNav = function(){
document.onkeydown = $.fn.lightbox.keyboardAction;
};
$.fn.lightbox.disableKeyboardNav = function(){
document.onkeydown = '';
};
$.fn.lightbox.defaults = {
fileLoadingImage : 'images/loading.gif',
fileBottomNavCloseImage : 'images/closelabel.gif',
overlayOpacity : 0.8,
borderSize : 10,
imageArray : new Array,
activeImage : null,
inprogress : false,
resizeSpeed : 350,
widthCurrent: 250,
heightCurrent: 250,
xScale : 1,
yScale : 1,
displayTitle: true,
navbarOnTop: false,
slideNavBar: false, // slide nav bar up/down between image resizing transitions
navBarSlideSpeed: 350,
displayHelp: false,
strings : {
help: ' \u2190 / P - previous image\u00a0\u00a0\u00a0\u00a0\u2192 / N - next image\u00a0\u00a0\u00a0\u00a0ESC / X - close image gallery',
prevLinkTitle: 'previous image',
nextLinkTitle: 'next image',
prevLinkText: '« Previous',
nextLinkText: 'Next »',
closeTitle: 'close image gallery',
image: 'Image ',
of: ' of '
},
fitToScreen: false // resize images if they are bigger than window
};
})(jQuery);
|
import Order from '../model/orderModel';
import {Op} from 'sequelize';
class DeliverieController {
async index(request, response){
const {id} = request.params;
const orderForSend = await Order.findAll({
where: {
deliveryman_id: id,
canceled_at: null,
end_date: null
}
});
const orderSent = await Order.findAll({
where: {
deliveryman_id: id,
canceled_at: null,
end_date: {
[Op.not]: null
}
}
});
const orderCanceled = await Order.findAll({
where: {
deliveryman_id: id,
canceled_at: {
[Op.not]: null
}
}
});
return response.status(200).json({
orderForSend: orderForSend,
orderSent: orderSent,
orderCanceled: orderCanceled
});
}
}
export default new DeliverieController();
|
exports.default = (client, target, context, message) => {
switch (message) {
case '!social':
client.say(
target,
`/me Me encontre nas outras redes sociais 🌎 https://links.levxyca.codes`,
);
break;
case '!telegram':
client.say(
target,
`/me Fique por dentro de todos os avisos da live 📰 https://t.me/newslevxyca`,
);
break;
case '!discord':
client.say(
target,
`/me O reino estelar é o nosso servidor do discord ⭐ https://discord.io/levxyca`,
);
break;
case '!caverna':
client.say(
target,
`/me Uma comunidade voltada para programação em geral com o objetivo de ajudar uns aos outros, estudar coletivamente, e outros. http://caverna.live/discord ⭐Por favor, não se esqueça de passar no canal #regras para liberar o acesso á todas as salas do nosso servidor⭐`,
);
break;
case '!fofinho':
client.say(
target,
`/me Um grupo no zap para apreciar bichinhos fofinhos 🐈 https://chat.whatsapp.com/BDHFDIn3yZM7pZwLpiQron`,
);
break;
case '!github':
client.say(
target,
`/me Confira meus projetos e contribuições 🦄 https://github.com/levxyca`,
);
break;
case '!podcast':
client.say(
target,
`/me Podcast com bate-papo sobre tecnologia apresentado por mim e pela @pachicodes 🎧 https://anchor.fm/mocasdaweb/`,
);
break;
case '!youtube':
client.say(
target,
`/me Conheça o meu canal no youtube sobre tecnologia, bate-papo, rotina e afins 🎥 www.youtube.com/levxyca`,
);
break;
default:
break;
}
};
|
angular.module('forgetest').controller('EditItemController', function($scope, $routeParams, $location, flash, ItemResource , ActionResource, ItemResource) {
var self = this;
$scope.disabled = false;
$scope.$location = $location;
$scope.get = function() {
var successCallback = function(data){
self.original = data;
$scope.item = new ItemResource(self.original);
ActionResource.queryAll(function(items) {
$scope.actionsSelectionList = $.map(items, function(item) {
var wrappedObject = {
id : item.id
};
var labelObject = {
value : item.id,
text : item.command
};
if($scope.item.actions){
$.each($scope.item.actions, function(idx, element) {
if(item.id == element.id) {
$scope.actionsSelection.push(labelObject);
$scope.item.actions.push(wrappedObject);
}
});
self.original.actions = $scope.item.actions;
}
return labelObject;
});
});
ItemResource.queryAll(function(items) {
$scope.itemsSelectionList = $.map(items, function(item) {
var wrappedObject = {
id : item.id
};
var labelObject = {
value : item.id,
text : item.name
};
if($scope.item.items){
$.each($scope.item.items, function(idx, element) {
if(item.id == element.id) {
$scope.itemsSelection.push(labelObject);
$scope.item.items.push(wrappedObject);
}
});
self.original.items = $scope.item.items;
}
return labelObject;
});
});
};
var errorCallback = function() {
flash.setMessage({'type': 'error', 'text': 'The item could not be found.'});
$location.path("/Items");
};
ItemResource.get({ItemId:$routeParams.ItemId}, successCallback, errorCallback);
};
$scope.isClean = function() {
return angular.equals(self.original, $scope.item);
};
$scope.save = function() {
var successCallback = function(){
flash.setMessage({'type':'success','text':'The item was updated successfully.'}, true);
$scope.get();
};
var errorCallback = function(response) {
if(response && response.data && response.data.message) {
flash.setMessage({'type': 'error', 'text': response.data.message}, true);
} else {
flash.setMessage({'type': 'error', 'text': 'Something broke. Retry, or cancel and start afresh.'}, true);
}
};
$scope.item.$update(successCallback, errorCallback);
};
$scope.cancel = function() {
$location.path("/Items");
};
$scope.remove = function() {
var successCallback = function() {
flash.setMessage({'type': 'error', 'text': 'The item was deleted.'});
$location.path("/Items");
};
var errorCallback = function(response) {
if(response && response.data && response.data.message) {
flash.setMessage({'type': 'error', 'text': response.data.message}, true);
} else {
flash.setMessage({'type': 'error', 'text': 'Something broke. Retry, or cancel and start afresh.'}, true);
}
};
$scope.item.$remove(successCallback, errorCallback);
};
$scope.actionsSelection = $scope.actionsSelection || [];
$scope.$watch("actionsSelection", function(selection) {
if (typeof selection != 'undefined' && $scope.item) {
$scope.item.actions = [];
$.each(selection, function(idx,selectedItem) {
var collectionItem = {};
collectionItem.id = selectedItem.value;
$scope.item.actions.push(collectionItem);
});
}
});
$scope.itemsSelection = $scope.itemsSelection || [];
$scope.$watch("itemsSelection", function(selection) {
if (typeof selection != 'undefined' && $scope.item) {
$scope.item.items = [];
$.each(selection, function(idx,selectedItem) {
var collectionItem = {};
collectionItem.id = selectedItem.value;
$scope.item.items.push(collectionItem);
});
}
});
$scope.get();
});
|
var searchData=
[
['capacity',['Capacity',['../class_memory_pool_allocator.html#a5672e0833fda2e71ce987911397489ed',1,'MemoryPoolAllocator']]],
['clear',['clear',['../classrapidxml_1_1memory__pool.html#aad377c835fdaed1cb2cc9df194cf84e4',1,'rapidxml::memory_pool::clear()'],['../classrapidxml_1_1xml__document.html#a826929ff54242532198701f19ff5f83f',1,'rapidxml::xml_document::clear()'],['../class_memory_pool_allocator.html#a57bbc80e570db6110901b9a7e36dbda0',1,'MemoryPoolAllocator::Clear()'],['../struct_parse_result.html#a88b6d44f052a19e6436ae6aadc2c40b4',1,'ParseResult::Clear()']]],
['clone_5fnode',['clone_node',['../classrapidxml_1_1memory__pool.html#a0a10679fc17597d339a0dc107f8a94ac',1,'rapidxml::memory_pool']]],
['close',['close',['../class_file.html#a83cbce54d6c3b8c2f417b51f6b3f488c',1,'File']]],
['code',['Code',['../struct_parse_result.html#a2aae3c2f42b31cc2409ee1e03bc4852e',1,'ParseResult']]],
['console',['Console',['../class_console.html#aba16cfd9f0894eb1312b1bc1155b6646',1,'Console']]],
['contains',['contains',['../class_a_list.html#ab3db4e8f60d5abf4e7a12d928fb244a0',1,'AList::contains()'],['../class_a_string.html#aec4ad61af8cd225bda08719550ec8e72',1,'AString::contains(char c, bool caseSensitive=true) const'],['../class_a_string.html#abe6a9966ef157e0584c279377b6c9987',1,'AString::contains(const AString &string, bool caseSensitive=true) const'],['../class_async_a_list.html#a033ed410776af84702517b6c535839e8',1,'AsyncAList::contains()'],['../class_a_vector.html#ab49821902c6048beab9de0e355baa386',1,'AVector::contains()']]],
['count',['count',['../class_a_list.html#a4769f724fc264fae0cd1ebbc6f70ec2e',1,'AList::count()'],['../class_a_string.html#aec69f5126101c65f03723a7969d5cccd',1,'AString::count(char c, bool caseSensitive=true) const'],['../class_a_string.html#a24d7963315d80af76af246970f8c19dd',1,'AString::count(const AString &string, bool caseSensitive=true) const'],['../class_async_a_list.html#ae5e14b569f99294b0dbefffe3039731b',1,'AsyncAList::count()'],['../class_a_vector.html#a4a5f14de563e7882f8c856d308f95a96',1,'AVector::count()']]],
['count_5fattributes',['count_attributes',['../rapidxml__utils_8hpp.html#a6255d15e5d8ad12ebcd7c60da51c97e2',1,'rapidxml']]],
['count_5fchildren',['count_children',['../rapidxml__utils_8hpp.html#a21c1cf2814019385e6b8d09e75af1d34',1,'rapidxml']]],
['countwords',['countWords',['../class_a_string.html#aed6d37a9b7bfd2dee2d50c37401a1dad',1,'AString']]],
['crc32',['CRC32',['../class_c_r_c32.html#a450b845a91ef96b9e41cc1049cca52fc',1,'CRC32']]],
['create',['create',['../class_dir.html#a58485e06d15995822a108246d2b76b47',1,'Dir::create(bool overrideIfExisting=false) const'],['../class_dir.html#ac663fd2a33309bdb6b501439532d7477',1,'Dir::create(const AString &path, bool overrideIfExisting=false)'],['../class_file.html#a208b0649e571a157d00dd91c6927d4be',1,'File::create(bool recursively=true) const'],['../class_file.html#a255061b2a5ed2db1c9f8fce9ab78af4e',1,'File::create(const AString &filepath, bool recursively=true)']]]
];
|
defineSuite([
'Scene/PointCloud3DTileContent',
'Core/Cartesian3',
'Core/Color',
'Core/ComponentDatatype',
'Core/defined',
'Core/HeadingPitchRange',
'Core/HeadingPitchRoll',
'Core/Math',
'Core/PerspectiveFrustum',
'Core/Transforms',
'Scene/Cesium3DTileStyle',
'Scene/Expression',
'Specs/Cesium3DTilesTester',
'Specs/createScene',
'ThirdParty/when'
], function(
PointCloud3DTileContent,
Cartesian3,
Color,
ComponentDatatype,
defined,
HeadingPitchRange,
HeadingPitchRoll,
CesiumMath,
PerspectiveFrustum,
Transforms,
Cesium3DTileStyle,
Expression,
Cesium3DTilesTester,
createScene,
when) {
'use strict';
var scene;
var centerLongitude = -1.31968;
var centerLatitude = 0.698874;
var pointCloudRGBUrl = './Data/Cesium3DTiles/PointCloud/PointCloudRGB';
var pointCloudRGBAUrl = './Data/Cesium3DTiles/PointCloud/PointCloudRGBA';
var pointCloudRGB565Url = './Data/Cesium3DTiles/PointCloud/PointCloudRGB565';
var pointCloudNoColorUrl = './Data/Cesium3DTiles/PointCloud/PointCloudNoColor';
var pointCloudConstantColorUrl = './Data/Cesium3DTiles/PointCloud/PointCloudConstantColor';
var pointCloudNormalsUrl = './Data/Cesium3DTiles/PointCloud/PointCloudNormals';
var pointCloudNormalsOctEncodedUrl = './Data/Cesium3DTiles/PointCloud/PointCloudNormalsOctEncoded';
var pointCloudQuantizedUrl = './Data/Cesium3DTiles/PointCloud/PointCloudQuantized';
var pointCloudQuantizedOctEncodedUrl = './Data/Cesium3DTiles/PointCloud/PointCloudQuantizedOctEncoded';
var pointCloudWGS84Url = './Data/Cesium3DTiles/PointCloud/PointCloudWGS84';
var pointCloudBatchedUrl = './Data/Cesium3DTiles/PointCloud/PointCloudBatched';
var pointCloudWithPerPointPropertiesUrl = './Data/Cesium3DTiles/PointCloud/PointCloudWithPerPointProperties';
var pointCloudWithTransformUrl = './Data/Cesium3DTiles/PointCloud/PointCloudWithTransform';
function setCamera(longitude, latitude) {
// Point the camera to the center of the tile
var center = Cartesian3.fromRadians(longitude, latitude, 5.0);
scene.camera.lookAt(center, new HeadingPitchRange(0.0, -1.57, 5.0));
}
beforeAll(function() {
scene = createScene();
scene.frameState.passes.render = true;
});
afterAll(function() {
scene.destroyForSpecs();
});
beforeEach(function() {
scene.morphTo3D(0.0);
var camera = scene.camera;
camera.frustum = new PerspectiveFrustum();
camera.frustum.aspectRatio = scene.drawingBufferWidth / scene.drawingBufferHeight;
camera.frustum.fov = CesiumMath.toRadians(60.0);
setCamera(centerLongitude, centerLatitude);
});
afterEach(function() {
scene.primitives.removeAll();
});
it('throws with invalid version', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
version: 2
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('throws if featureTableJsonByteLength is 0', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJsonByteLength : 0
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('throws if the feature table does not contain POINTS_LENGTH', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJson : {
POSITION : {
byteOffset : 0
}
}
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('throws if the feature table does not contain POSITION or POSITION_QUANTIZED', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJson : {
POINTS_LENGTH : 1
}
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('throws if the positions are quantized and the feature table does not contain QUANTIZED_VOLUME_SCALE', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJson : {
POINTS_LENGTH : 1,
POSITION_QUANTIZED : {
byteOffset : 0
},
QUANTIZED_VOLUME_OFFSET : [0.0, 0.0, 0.0]
}
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('throws if the positions are quantized and the feature table does not contain QUANTIZED_VOLUME_OFFSET', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJson : {
POINTS_LENGTH : 1,
POSITION_QUANTIZED : {
byteOffset : 0
},
QUANTIZED_VOLUME_SCALE : [1.0, 1.0, 1.0]
}
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('throws if the BATCH_ID semantic is defined but BATCHES_LENGTH is not', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJson : {
POINTS_LENGTH : 2,
POSITION : [0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
BATCH_ID : [0, 1]
}
});
Cesium3DTilesTester.loadTileExpectError(scene, arrayBuffer, 'pnts');
});
it('BATCH_ID semantic uses componentType of UNSIGNED_SHORT by default', function() {
var arrayBuffer = Cesium3DTilesTester.generatePointCloudTileBuffer({
featureTableJson : {
POINTS_LENGTH : 2,
POSITION : [0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
BATCH_ID : [0, 1],
BATCH_LENGTH : 2
}
});
var content = Cesium3DTilesTester.loadTile(scene, arrayBuffer, 'pnts');
expect(content._drawCommand._vertexArray._attributes[1].componentDatatype).toEqual(ComponentDatatype.UNSIGNED_SHORT);
});
it('resolves readyPromise', function() {
return Cesium3DTilesTester.resolvesReadyPromise(scene, pointCloudRGBUrl);
});
it('renders point cloud with rgb colors', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with rgba colors', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBAUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with rgb565 colors', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGB565Url).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with no colors', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudNoColorUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with constant colors', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudConstantColorUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudNormalsUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with oct encoded normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudNormalsOctEncodedUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with quantized positions', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudQuantizedUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with quantized positions and oct-encoded normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudQuantizedOctEncodedUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud that are not defined relative to center', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudWGS84Url).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with batch table', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with per-point properties', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudWithPerPointPropertiesUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders point cloud with tile transform', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudWithTransformUrl).then(function(tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
var newLongitude = -1.31962;
var newLatitude = 0.698874;
var newCenter = Cartesian3.fromRadians(newLongitude, newLatitude, 5.0);
var newHPR = new HeadingPitchRoll();
var newTransform = Transforms.headingPitchRollToFixedFrame(newCenter, newHPR);
// Update tile transform
tileset._root.transform = newTransform;
// Move the camera to the new location
setCamera(newLongitude, newLatitude);
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders with debug color', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
var color;
expect(scene).toRenderAndCall(function(rgba) {
color = rgba;
});
tileset.debugColorizeTiles = true;
expect(scene).notToRender(color);
tileset.debugColorizeTiles = false;
expect(scene).toRender(color);
});
});
it('renders in CV', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
scene.morphToColumbusView(0.0);
setCamera(centerLongitude, centerLatitude);
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('renders in 2D', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
scene.morphTo2D(0.0);
setCamera(centerLongitude, centerLatitude);
tileset.maximumScreenSpaceError = 3;
Cesium3DTilesTester.expectRender(scene, tileset);
});
});
it('picks', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
var content = tileset._root.content;
tileset.show = false;
expect(scene).toPickPrimitive(undefined);
tileset.show = true;
expect(scene).toPickAndCall(function(result) {
expect(result).toBeDefined();
expect(result.primitive).toBe(tileset);
expect(result.content).toBe(content);
});
});
});
it('picks based on batchId', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
// Get the original color
var color;
expect(scene).toRenderAndCall(function(rgba) {
color = rgba;
});
// Change the color of the picked feature to yellow
expect(scene).toPickAndCall(function(first) {
expect(first).toBeDefined();
first.color = Color.clone(Color.YELLOW, first.color);
// Expect the pixel color to be some shade of yellow
expect(scene).notToRender(color);
// Turn show off. Expect a different feature to get picked.
first.show = false;
expect(scene).toPickAndCall(function(second) {
expect(second).toBeDefined();
expect(second).not.toBe(first);
});
});
});
});
it('point cloud without batch table works', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
var content = tileset._root.content;
expect(content.featuresLength).toBe(0);
expect(content.innerContents).toBeUndefined();
expect(content.hasProperty(0, 'name')).toBe(false);
expect(content.getFeature(0)).toBeUndefined();
});
});
it('batched point cloud works', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
var content = tileset._root.content;
expect(content.featuresLength).toBe(8);
expect(content.innerContents).toBeUndefined();
expect(content.hasProperty(0, 'name')).toBe(true);
expect(content.getFeature(0)).toBeDefined();
});
});
it('point cloud with per-point properties work', function() {
// When the batch table contains per-point properties, aka no batching, then a Cesium3DTileBatchTable is not
// created. There is no per-point show/color/pickId because the overhead is too high. Instead points are styled
// based on their properties, and these are not accessible from the API.
return Cesium3DTilesTester.loadTileset(scene, pointCloudWithPerPointPropertiesUrl).then(function(tileset) {
var content = tileset._root.content;
expect(content.featuresLength).toBe(0);
expect(content.innerContents).toBeUndefined();
expect(content.hasProperty(0, 'name')).toBe(false);
expect(content.getFeature(0)).toBeUndefined();
});
});
it('throws when calling getFeature with invalid index', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
var content = tileset._root.content;
expect(function(){
content.getFeature(-1);
}).toThrowDeveloperError();
expect(function(){
content.getFeature(1000);
}).toThrowDeveloperError();
expect(function(){
content.getFeature();
}).toThrowDeveloperError();
});
});
it('Supports back face culling when there are per-point normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
var content = tileset._root.content;
// Get the number of picked sections with back face culling on
var pickedCountCulling = 0;
var pickedCount = 0;
var picked;
expect(scene).toPickAndCall(function(result) {
// Set culling to true
content.backFaceCulling = true;
expect(scene).toPickAndCall(function(result) {
picked = result;
});
/* jshint loopfunc: true */
while (defined(picked)) {
picked.show = false;
expect(scene).toPickAndCall(function(result) { //eslint-disable-line no-loop-func
picked = result;
});
++pickedCountCulling;
}
// Set the shows back to true
var length = content.featuresLength;
for (var i = 0; i < length; ++i) {
var feature = content.getFeature(i);
feature.show = true;
}
// Set culling to false
content.backFaceCulling = false;
expect(scene).toPickAndCall(function(result) {
picked = result;
});
/* jshint loopfunc: true */
while (defined(picked)) {
picked.show = false;
expect(scene).toPickAndCall(function(result) { //eslint-disable-line no-loop-func
picked = result;
});
++pickedCount;
}
expect(pickedCount).toBeGreaterThan(pickedCountCulling);
});
});
});
it('applies shader style', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudWithPerPointPropertiesUrl).then(function(tileset) {
var content = tileset._root.content;
// Solid red color
tileset.style = new Cesium3DTileStyle({
color : 'color("red")'
});
expect(scene).toRender([255, 0, 0, 255]);
expect(content._styleTranslucent).toBe(false);
// Applies translucency
tileset.style = new Cesium3DTileStyle({
color : 'rgba(255, 0, 0, 0.005)'
});
expect(scene).toRenderAndCall(function(rgba) {
// Pixel is a darker red
expect(rgba[0]).toBeLessThan(255);
expect(rgba[1]).toBe(0);
expect(rgba[2]).toBe(0);
expect(rgba[3]).toBe(255);
expect(content._styleTranslucent).toBe(true);
});
// Style with property
tileset.style = new Cesium3DTileStyle({
color : 'color() * ${temperature}'
});
expect(scene).toRenderAndCall(function(rgba) {
// Pixel color is some shade of gray
expect(rgba[0]).toBe(rgba[1]);
expect(rgba[0]).toBe(rgba[2]);
expect(rgba[0]).toBeGreaterThan(0);
expect(rgba[0]).toBeLessThan(255);
});
// When no conditions are met the default color is white
tileset.style = new Cesium3DTileStyle({
color : {
conditions : [
['${secondaryColor}[0] > 1.0', 'color("red")'] // This condition will not be met
]
}
});
expect(scene).toRender([255, 255, 255, 255]);
// Apply style with conditions
tileset.style = new Cesium3DTileStyle({
color : {
conditions : [
['${temperature} < 0.1', 'color("#000099")'],
['${temperature} < 0.2', 'color("#00cc99", 1.0)'],
['${temperature} < 0.3', 'color("#66ff33", 0.5)'],
['${temperature} < 0.4', 'rgba(255, 255, 0, 0.1)'],
['${temperature} < 0.5', 'rgb(255, 128, 0)'],
['${temperature} < 0.6', 'color("red")'],
['${temperature} < 0.7', 'color("rgb(255, 102, 102)")'],
['${temperature} < 0.8', 'hsl(0.875, 1.0, 0.6)'],
['${temperature} < 0.9', 'hsla(0.83, 1.0, 0.5, 0.1)'],
['true', 'color("#FFFFFF", 1.0)']
]
}
});
expect(scene).notToRender([0, 0, 0, 255]);
// Apply show style
tileset.style = new Cesium3DTileStyle({
show : true
});
expect(scene).notToRender([0, 0, 0, 255]);
// Apply show style that hides all points
tileset.style = new Cesium3DTileStyle({
show : false
});
expect(scene).toRender([0, 0, 0, 255]);
// Apply show style with property
tileset.style = new Cesium3DTileStyle({
show : '${temperature} > 0.1'
});
expect(scene).notToRender([0, 0, 0, 255]);
tileset.style = new Cesium3DTileStyle({
show : '${temperature} > 1.0'
});
expect(scene).toRender([0, 0, 0, 255]);
// Apply style with point cloud semantics
tileset.style = new Cesium3DTileStyle({
color : '${COLOR} / 2.0',
show : '${POSITION}[0] > 0.5'
});
expect(scene).notToRender([0, 0, 0, 255]);
// Apply pointSize style
tileset.style = new Cesium3DTileStyle({
pointSize : 5.0
});
expect(scene).notToRender([0, 0, 0, 255]);
});
});
it('rebuilds shader style when expression changes', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudWithPerPointPropertiesUrl).then(function(tileset) {
// Solid red color
tileset.style = new Cesium3DTileStyle({
color : 'color("red")'
});
expect(scene).toRender([255, 0, 0, 255]);
tileset.style.color = new Expression('color("lime")');
tileset.makeStyleDirty();
expect(scene).toRender([0, 255, 0, 255]);
});
});
it('applies shader style to point cloud with normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudQuantizedOctEncodedUrl).then(function(tileset) {
tileset.style = new Cesium3DTileStyle({
color : 'color("red")'
});
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeGreaterThan(0);
expect(rgba[0]).toBeLessThan(255);
});
});
});
it('applies shader style to point cloud with normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudQuantizedOctEncodedUrl).then(function(tileset) {
tileset.style = new Cesium3DTileStyle({
color : 'color("red")'
});
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeGreaterThan(0);
});
});
});
it('applies shader style to point cloud without colors', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudNoColorUrl).then(function(tileset) {
tileset.style = new Cesium3DTileStyle({
color : 'color("red")'
});
expect(scene).toRender([255, 0, 0, 255]);
});
});
it('throws if style references the NORMAL semantic but the point cloud does not have per-point normals', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
var content = tileset._root.content;
expect(function() {
content.applyStyle(scene.frameState, new Cesium3DTileStyle({
color : '${NORMAL}[0] > 0.5'
}));
}).toThrowRuntimeError();
});
});
it('throws when shader style reference a non-existent property', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudWithPerPointPropertiesUrl).then(function(tileset) {
var content = tileset._root.content;
expect(function() {
content.applyStyle(scene.frameState, new Cesium3DTileStyle({
color : 'color() * ${non_existent_property}'
}));
}).toThrowRuntimeError();
});
});
it('does not apply shader style if the point cloud has a batch table', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
var content = tileset._root.content;
var shaderProgram = content._drawCommand.shaderProgram;
tileset.style = new Cesium3DTileStyle({
color:'color("red")'
});
expect(content._drawCommand.shaderProgram).toBe(shaderProgram);
// Point cloud is styled through the batch table
expect(scene).notToRender([0, 0, 0, 255]);
});
});
it('throws when shader style is invalid', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl).then(function(tileset) {
var content = tileset._root.content;
expect(function() {
content.applyStyle(scene.frameState, new Cesium3DTileStyle({
show : '1 < "2"'
}));
}).toThrowRuntimeError();
});
});
it('gets memory usage', function() {
var promises = [
Cesium3DTilesTester.loadTileset(scene, pointCloudNoColorUrl),
Cesium3DTilesTester.loadTileset(scene, pointCloudRGBUrl),
Cesium3DTilesTester.loadTileset(scene, pointCloudNormalsUrl),
Cesium3DTilesTester.loadTileset(scene, pointCloudQuantizedOctEncodedUrl)
];
// 1000 points
var expectedGeometryMemory = [
1000 * 12, // 3 floats (xyz)
1000 * 15, // 3 floats (xyz), 3 bytes (rgb)
1000 * 27, // 3 floats (xyz), 3 bytes (rgb), 3 floats (normal)
1000 * 11 // 3 shorts (quantized xyz), 3 bytes (rgb), 2 bytes (oct-encoded normal)
];
return when.all(promises).then(function(tilesets) {
var length = tilesets.length;
for (var i = 0; i < length; ++i) {
var content = tilesets[i]._root.content;
expect(content.geometryByteLength).toEqual(expectedGeometryMemory[i]);
expect(content.texturesByteLength).toEqual(0);
}
});
});
it('gets memory usage for batch point cloud', function() {
return Cesium3DTilesTester.loadTileset(scene, pointCloudBatchedUrl).then(function(tileset) {
var content = tileset._root.content;
// Point cloud consists of positions, colors, normals, and batchIds
// 3 floats (xyz), 3 floats (normal), 1 byte (batchId)
var pointCloudGeometryMemory = 1000 * 25;
// One RGBA byte pixel per feature
var batchTexturesByteLength = content.featuresLength * 4;
var pickTexturesByteLength = content.featuresLength * 4;
// Features have not been picked or colored yet, so the batch table contribution is 0.
expect(content.geometryByteLength).toEqual(pointCloudGeometryMemory);
expect(content.texturesByteLength).toEqual(0);
expect(content.batchTableByteLength).toEqual(0);
// Color a feature and expect the texture memory to increase
content.getFeature(0).color = Color.RED;
scene.renderForSpecs();
expect(content.geometryByteLength).toEqual(pointCloudGeometryMemory);
expect(content.texturesByteLength).toEqual(0);
expect(content.batchTableByteLength).toEqual(batchTexturesByteLength);
// Pick the tile and expect the texture memory to increase
scene.pickForSpecs();
expect(content.geometryByteLength).toEqual(pointCloudGeometryMemory);
expect(content.texturesByteLength).toEqual(0);
expect(content.batchTableByteLength).toEqual(batchTexturesByteLength + pickTexturesByteLength);
});
});
it('destroys', function() {
return Cesium3DTilesTester.tileDestroys(scene, pointCloudRGBUrl);
});
}, 'WebGL');
|
/**
* JavaScript to handle the front-end and handle the data source from back-end. Puts the data into the chart in
* the correct format.
*/
var symbol, indicator;
$.ajax({
url:'/getJson',
async: false,
success: function(jsonData) {
var ohlc = [], volume = [];
var symbol;
// Last part of the data sent is the options.
for(var i=0;i<jsonData.length-1;i++){
ohlc.push([
jsonData[i][0],
jsonData[i][1],
jsonData[i][2],
jsonData[i][3],
jsonData[i][4]
]);
volume.push([
jsonData[i][0],
jsonData[i][5]
]);
}
symbol = jsonData[jsonData.length-1][0];
name = jsonData[jsonData.length-1][1];
Highcharts.stockChart('chartID',{
rangeSelector: {
selected: 4
},
plotOptions: {
candlestick: {
}
},
chart :{
displayErrors: true
},
title: {
text: name
},
yAxis: [{
labels: {
align: 'right',
x: -3
},
title: {
text: 'OHLC'
},
height: '60%',
lineWidth: 2,
resize: {
enabled: true
}
}, {
labels: {
align: 'right',
x: -3
},
title: {
text: 'Volume'
},
top: '65%',
height: '35%',
offset: 0,
lineWidth: 2
}],
series: [{
id: 'main',
type: 'candlestick',
name: name,
data: ohlc
}, {
type: 'column',
name: 'Volume',
data: volume,
yAxis: 1
}, {
type: 'bb',
linkedTo: 'main'
}]
})
}
});
// This works now, data sent is json format includes "" therefore back end will process one more time to remove them.
$("#apply").click(function() {
if($("#symbols").val() == "default"){
alert("Please pick a valid selection.");
} else {
var obj = JSON.stringify("{year:"+$("#yearSelector").val()+", symbol:"+$("#symbols").val()+
", name: "+$("#symbols option:selected").text()+"}");
$.ajax({
method: 'POST',
url: '/postJson',
contentType: "application/json",
dataType: 'json',
data: obj,
async: false,
error: function(jqXHR, status, error){
alert("jqXHR-> "+jqXHR+" with error: "+error+": Given status -> "+status);
}
});
}
});
|
(window.webpackJsonp_name_=window.webpackJsonp_name_||[]).push([[42],{266:function(s,t,a){"use strict";a.r(t);var render=function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("section",[a("h2",[s._v("多类别气泡图")]),s._v(" "),a("block-demo",{attrs:{tip:"",source:"const { Chart, Axis, Scatter, Legend, Tooltip } = qcharts\nconst data = [\n {\n continent: 'Americas',\n Country: 'Argentina',\n LifeExpectancy: 75.32,\n GDP: 12779.37964,\n Population: 40301927\n },\n {\n continent: 'Americas',\n Country: 'Brazil',\n LifeExpectancy: 72.39,\n GDP: 9065.800825,\n Population: 190010647\n },\n {\n continent: 'Americas',\n Country: 'Canada',\n LifeExpectancy: 80.653,\n GDP: 36319.23501,\n Population: 33390141\n },\n {\n continent: 'Americas',\n Country: 'Chile',\n LifeExpectancy: 78.553,\n GDP: 13171.63885,\n Population: 16284741\n },\n {\n continent: 'Americas',\n Country: 'Colombia',\n LifeExpectancy: 72.889,\n GDP: 7006.580419,\n Population: 44227550\n },\n {\n continent: 'Americas',\n Country: 'Costa Rica',\n LifeExpectancy: 78.782,\n GDP: 9645.06142,\n Population: 4133884\n },\n {\n continent: 'Americas',\n Country: 'Cuba',\n LifeExpectancy: 78.273,\n GDP: 8948.102923,\n Population: 11416987\n },\n {\n continent: 'Americas',\n Country: 'Dominican Republic',\n LifeExpectancy: 72.235,\n GDP: 6025.374752,\n Population: 9319622\n },\n {\n continent: 'Americas',\n Country: 'Ecuador',\n LifeExpectancy: 74.994,\n GDP: 6873.262326,\n Population: 13755680\n },\n {\n continent: 'Americas',\n Country: 'El Salvador',\n LifeExpectancy: 71.878,\n GDP: 5728.353514,\n Population: 6939688\n },\n {\n continent: 'Americas',\n Country: 'Guatemala',\n LifeExpectancy: 70.259,\n GDP: 5186.050003,\n Population: 12572928\n },\n {\n continent: 'Americas',\n Country: 'Honduras',\n LifeExpectancy: 70.198,\n GDP: 3548.330846,\n Population: 7483763\n },\n {\n continent: 'Americas',\n Country: 'Jamaica',\n LifeExpectancy: 72.567,\n GDP: 7320.880262,\n Population: 2780132\n },\n {\n continent: 'Americas',\n Country: 'Mexico',\n LifeExpectancy: 76.195,\n GDP: 11977.57496,\n Population: 108700891\n },\n {\n continent: 'Americas',\n Country: 'Nicaragua',\n LifeExpectancy: 72.899,\n GDP: 2749.320965,\n Population: 5675356\n },\n {\n continent: 'Americas',\n Country: 'Panama',\n LifeExpectancy: 75.537,\n GDP: 9809.185636,\n Population: 3242173\n },\n {\n continent: 'Americas',\n Country: 'Paraguay',\n LifeExpectancy: 71.752,\n GDP: 4172.838464,\n Population: 6667147\n },\n {\n continent: 'Americas',\n Country: 'Peru',\n LifeExpectancy: 71.421,\n GDP: 7408.905561,\n Population: 28674757\n },\n {\n continent: 'Americas',\n Country: 'Puerto Rico',\n LifeExpectancy: 78.746,\n GDP: 19328.70901,\n Population: 3942491\n },\n {\n continent: 'Americas',\n Country: 'Trinidad and Tobago',\n LifeExpectancy: 69.819,\n GDP: 18008.50924,\n Population: 1056608\n },\n {\n continent: 'Americas',\n Country: 'United States',\n LifeExpectancy: 78.242,\n GDP: 42951.65309,\n Population: 301139947\n },\n {\n continent: 'Americas',\n Country: 'Uruguay',\n LifeExpectancy: 76.384,\n GDP: 10611.46299,\n Population: 3447496\n },\n {\n continent: 'Americas',\n Country: 'Venezuela',\n LifeExpectancy: 73.747,\n GDP: 11415.80569,\n Population: 26084662\n },\n {\n continent: 'Asia',\n Country: 'China',\n LifeExpectancy: 72.961,\n GDP: 4959.114854,\n Population: 1318683096\n },\n {\n continent: 'Asia',\n Country: 'Hong Kong, China',\n LifeExpectancy: 82.208,\n GDP: 39724.97867,\n Population: 6980412\n },\n {\n continent: 'Asia',\n Country: 'Japan',\n LifeExpectancy: 82.603,\n GDP: 31656.06806,\n Population: 127467972\n },\n {\n continent: 'Asia',\n Country: 'Korea, Dem. Rep.',\n LifeExpectancy: 67.297,\n GDP: 1593.06548,\n Population: 23301725\n },\n {\n continent: 'Asia',\n Country: 'Korea, Rep.',\n LifeExpectancy: 78.623,\n GDP: 23348.13973,\n Population: 49044790\n },\n {\n continent: 'Europe',\n Country: 'Albania',\n LifeExpectancy: 76.423,\n GDP: 5937.029526,\n Population: 3600523\n },\n {\n continent: 'Europe',\n Country: 'Austria',\n LifeExpectancy: 79.829,\n GDP: 36126.4927,\n Population: 8199783\n },\n {\n continent: 'Europe',\n Country: 'Belgium',\n LifeExpectancy: 79.441,\n GDP: 33692.60508,\n Population: 10392226\n },\n {\n continent: 'Europe',\n Country: 'Bosnia and Herzegovina',\n LifeExpectancy: 74.852,\n GDP: 7446.298803,\n Population: 4552198\n },\n {\n continent: 'Europe',\n Country: 'Bulgaria',\n LifeExpectancy: 73.005,\n GDP: 10680.79282,\n Population: 7322858\n },\n {\n continent: 'Europe',\n Country: 'Croatia',\n LifeExpectancy: 75.748,\n GDP: 14619.22272,\n Population: 4493312\n },\n {\n continent: 'Europe',\n Country: 'Czech Republic',\n LifeExpectancy: 76.486,\n GDP: 22833.30851,\n Population: 10228744\n },\n {\n continent: 'Europe',\n Country: 'Denmark',\n LifeExpectancy: 78.332,\n GDP: 35278.41874,\n Population: 5468120\n },\n {\n continent: 'Europe',\n Country: 'Finland',\n LifeExpectancy: 79.313,\n GDP: 33207.0844,\n Population: 5238460\n },\n {\n continent: 'Europe',\n Country: 'France',\n LifeExpectancy: 80.657,\n GDP: 30470.0167,\n Population: 61083916\n },\n {\n continent: 'Europe',\n Country: 'Germany',\n LifeExpectancy: 79.406,\n GDP: 32170.37442,\n Population: 82400996\n },\n {\n continent: 'Europe',\n Country: 'Greece',\n LifeExpectancy: 79.483,\n GDP: 27538.41188,\n Population: 10706290\n },\n {\n continent: 'Europe',\n Country: 'Hungary',\n LifeExpectancy: 73.338,\n GDP: 18008.94444,\n Population: 9956108\n },\n {\n continent: 'Europe',\n Country: 'Iceland',\n LifeExpectancy: 81.757,\n GDP: 36180.78919,\n Population: 301931\n },\n {\n continent: 'Europe',\n Country: 'Ireland',\n LifeExpectancy: 78.885,\n GDP: 40675.99635,\n Population: 4109086\n },\n {\n continent: 'Europe',\n Country: 'Italy',\n LifeExpectancy: 80.546,\n GDP: 28569.7197,\n Population: 58147733\n },\n {\n continent: 'Europe',\n Country: 'Montenegro',\n LifeExpectancy: 74.543,\n GDP: 9253.896111,\n Population: 684736\n },\n {\n continent: 'Europe',\n Country: 'Netherlands',\n LifeExpectancy: 79.762,\n GDP: 36797.93332,\n Population: 16570613\n },\n {\n continent: 'Europe',\n Country: 'Norway',\n LifeExpectancy: 80.196,\n GDP: 49357.19017,\n Population: 4627926\n },\n {\n continent: 'Europe',\n Country: 'Poland',\n LifeExpectancy: 75.563,\n GDP: 15389.92468,\n Population: 38518241\n },\n {\n continent: 'Europe',\n Country: 'Portugal',\n LifeExpectancy: 78.098,\n GDP: 20509.64777,\n Population: 10642836\n },\n {\n continent: 'Europe',\n Country: 'Romania',\n LifeExpectancy: 72.476,\n GDP: 10808.47561,\n Population: 22276056\n },\n {\n continent: 'Europe',\n Country: 'Serbia',\n LifeExpectancy: 74.002,\n GDP: 9786.534714,\n Population: 10150265\n },\n {\n continent: 'Europe',\n Country: 'Slovak Republic',\n LifeExpectancy: 74.663,\n GDP: 18678.31435,\n Population: 5447502\n },\n {\n continent: 'Europe',\n Country: 'Slovenia',\n LifeExpectancy: 77.926,\n GDP: 25768.25759,\n Population: 2009245\n },\n {\n continent: 'Europe',\n Country: 'Spain',\n LifeExpectancy: 80.941,\n GDP: 28821.0637,\n Population: 40448191\n },\n {\n continent: 'Europe',\n Country: 'Sweden',\n LifeExpectancy: 80.884,\n GDP: 33859.74835,\n Population: 9031088\n },\n {\n continent: 'Europe',\n Country: 'Switzerland',\n LifeExpectancy: 81.701,\n GDP: 37506.41907,\n Population: 7554661\n },\n {\n continent: 'Europe',\n Country: 'Turkey',\n LifeExpectancy: 71.777,\n GDP: 8458.276384,\n Population: 71158647\n },\n {\n continent: 'Europe',\n Country: 'United Kingdom',\n LifeExpectancy: 79.425,\n GDP: 33203.26128,\n Population: 60776238\n },\n {\n continent: 'Oceania',\n Country: 'Australia',\n LifeExpectancy: 81.235,\n GDP: 34435.36744,\n Population: 20434176\n },\n {\n continent: 'Oceania',\n Country: 'New Zealand',\n LifeExpectancy: 80.204,\n GDP: 25185.00911,\n Population: 4115771\n }\n]\nconst chart = new Chart({\n container: '#app'\n})\n\nchart.source(data, {\n row: 'continent',\n text: 'GDP',\n value: 'LifeExpectancy'\n})\nconst scatter = new Scatter({\n areaField: 'Population',\n areaRange: [4, 30]\n})\n\nconst axisBottom = new Axis()\n\nconst axisLeft = new Axis({ orient: 'left' })\n\nconst legend = new Legend({ align: ['center', 'bottom'] })\n\nchart.append([scatter, axisBottom, axisLeft, legend])\n\nchart.append(\n new Tooltip({\n title: data => data[0].Country,\n formatter: data => {\n return ` 人均寿命:${data.LifeExpectancy} GDP:${data.GDP} `\n }\n })\n)\n"}},[a("pre",{pre:!0},[a("code",{pre:!0,attrs:{"v-pre":"",class:"language-javascript"}},[a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" { Chart, Axis, Scatter, Legend, Tooltip } = qcharts\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" data = [\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Argentina'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("75.32")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("12779.37964")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("40301927")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Brazil'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.39")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9065.800825")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("190010647")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Canada'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.653")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("36319.23501")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("33390141")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Chile'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.553")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("13171.63885")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("16284741")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Colombia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.889")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7006.580419")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("44227550")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Costa Rica'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.782")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9645.06142")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4133884")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Cuba'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.273")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("8948.102923")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("11416987")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Dominican Republic'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.235")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("6025.374752")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9319622")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Ecuador'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("74.994")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("6873.262326")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("13755680")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'El Salvador'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("71.878")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5728.353514")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("6939688")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Guatemala'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("70.259")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5186.050003")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("12572928")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Honduras'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("70.198")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("3548.330846")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7483763")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Jamaica'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.567")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7320.880262")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("2780132")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Mexico'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("76.195")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("11977.57496")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("108700891")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Nicaragua'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.899")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("2749.320965")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5675356")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Panama'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("75.537")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9809.185636")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("3242173")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Paraguay'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("71.752")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4172.838464")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("6667147")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Peru'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("71.421")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7408.905561")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("28674757")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Puerto Rico'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.746")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("19328.70901")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("3942491")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Trinidad and Tobago'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("69.819")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("18008.50924")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("1056608")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'United States'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.242")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("42951.65309")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("301139947")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Uruguay'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("76.384")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10611.46299")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("3447496")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Americas'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Venezuela'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("73.747")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("11415.80569")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("26084662")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Asia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'China'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.961")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4959.114854")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("1318683096")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Asia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Hong Kong, China'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("82.208")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("39724.97867")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("6980412")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Asia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Japan'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("82.603")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("31656.06806")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("127467972")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Asia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Korea, Dem. Rep.'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("67.297")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("1593.06548")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("23301725")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Asia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Korea, Rep.'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.623")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("23348.13973")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("49044790")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Albania'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("76.423")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5937.029526")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("3600523")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Austria'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.829")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("36126.4927")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("8199783")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Belgium'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.441")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("33692.60508")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10392226")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Bosnia and Herzegovina'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("74.852")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7446.298803")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4552198")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Bulgaria'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("73.005")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10680.79282")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7322858")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Croatia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("75.748")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("14619.22272")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4493312")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Czech Republic'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("76.486")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("22833.30851")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10228744")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Denmark'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.332")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("35278.41874")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5468120")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Finland'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.313")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("33207.0844")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5238460")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'France'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.657")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("30470.0167")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("61083916")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Germany'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.406")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("32170.37442")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("82400996")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Greece'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.483")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("27538.41188")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10706290")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Hungary'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("73.338")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("18008.94444")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9956108")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Iceland'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("81.757")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("36180.78919")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("301931")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Ireland'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.885")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("40675.99635")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4109086")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Italy'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.546")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("28569.7197")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("58147733")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Montenegro'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("74.543")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9253.896111")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("684736")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Netherlands'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.762")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("36797.93332")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("16570613")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Norway'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.196")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("49357.19017")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4627926")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Poland'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("75.563")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("15389.92468")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("38518241")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Portugal'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("78.098")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("20509.64777")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10642836")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Romania'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("72.476")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10808.47561")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("22276056")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Serbia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("74.002")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9786.534714")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("10150265")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Slovak Republic'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("74.663")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("18678.31435")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("5447502")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Slovenia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("77.926")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("25768.25759")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("2009245")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Spain'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.941")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("28821.0637")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("40448191")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Sweden'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.884")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("33859.74835")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("9031088")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Switzerland'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("81.701")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("37506.41907")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("7554661")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Turkey'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("71.777")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("8458.276384")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("71158647")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Europe'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'United Kingdom'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("79.425")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("33203.26128")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("60776238")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Oceania'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Australia'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("81.235")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("34435.36744")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("20434176")]),s._v("\n },\n {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("continent")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Oceania'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Country")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'New Zealand'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("LifeExpectancy")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("80.204")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("GDP")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("25185.00911")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("Population")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4115771")]),s._v("\n }\n]\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" chart = "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" Chart({\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("container")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'#app'")]),s._v("\n})\n\nchart.source(data, {\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("row")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'continent'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("text")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'GDP'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'LifeExpectancy'")]),s._v("\n})\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" scatter = "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" Scatter({\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("areaField")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'Population'")]),s._v(",\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("areaRange")]),s._v(": ["),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("4")]),s._v(", "),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("30")]),s._v("]\n})\n\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" axisBottom = "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" Axis()\n\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" axisLeft = "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" Axis({ "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("orient")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'left'")]),s._v(" })\n\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" legend = "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" Legend({ "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("align")]),s._v(": ["),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'center'")]),s._v(", "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'bottom'")]),s._v("] })\n\nchart.append([scatter, axisBottom, axisLeft, legend])\n\nchart.append(\n "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" Tooltip({\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-function"}},[a("span",{pre:!0,attrs:{class:"hljs-params"}},[s._v("data")]),s._v(" =>")]),s._v(" data["),a("span",{pre:!0,attrs:{class:"hljs-number"}},[s._v("0")]),s._v("].Country,\n "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("formatter")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-function"}},[a("span",{pre:!0,attrs:{class:"hljs-params"}},[s._v("data")]),s._v(" =>")]),s._v(" {\n "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("` 人均寿命:"),a("span",{pre:!0,attrs:{class:"hljs-subst"}},[s._v("${data.LifeExpectancy}")]),s._v(" GDP:"),a("span",{pre:!0,attrs:{class:"hljs-subst"}},[s._v("${data.GDP}")]),s._v(" `")]),s._v("\n }\n })\n)\n")])])])],1)};render._withStripped=!0;var n={components:{}},r=a(2),p=Object(r.a)(n,render,[],!1,null,null,null);p.options.__file="website/views/demo/scatter/bubble.md";t.default=p.exports}}]);
//# sourceMappingURL=42.js.map?v=d2f1c2b
|
module.exports = {
A: " #FF83FA",
C: " #40E0D0",
G: " #FF83FA",
R: " #FF83FA",
T: " #40E0D0",
U: " #40E0D0",
Y: " #40E0D0"
};
|
const noteModel = require("../models/noteModel");
exports.create = async (req, res, next) => {
const { title, content, color, authorId } = req.body;
try {
const note = new noteModel({
title: title,
content: content,
color: color,
authorId: authorId
});
await note.save();
res.send(note);
} catch (err) {
if (!err.statusCode) {
err.statusCode = 500;
}
next(err);
}
};
exports.update = async (req, res, next) => {
try {
const note = await noteModel.findByIdAndUpdate(req.params.id, req.body);
await note.save();
res.send(note);
} catch (err) {
if (!err.statusCode) {
err.statusCode = 500;
}
next(err);
}
};
exports.destroy = async (req, res, next) => {
try {
const note = await noteModel.findByIdAndDelete(req.params.id);
if (!note) res.status(404).send("No item found");
res.status(200).send();
} catch (err) {
if (!err.statusCode) {
err.statusCode = 500;
}
next(err);
}
};
|
const portal = require('/lib/xp/portal')
const thymeleaf = require('/lib/thymeleaf')
// Resolve the view
const view = resolve('singlecolumn.html')
exports.get = function (req) {
// Find the current component.
const component = portal.getComponent()
const {
config: {
background,
borderbottom: borderBottom,
fullwidth: fullWidth,
paddingbottom: paddingBottom,
paddingtop: paddingTop
},
regions: {
content: contentRegion
}
} = component
// Define the model
const model = {
background,
borderBottom,
contentRegion,
fullWidth,
paddingBottom,
paddingTop
}
// Render a thymeleaf template
const body = thymeleaf.render(view, model)
// Return the result
return {
body: body,
contentType: 'text/html'
}
}
|
'use strict';
/**@type {{[k: string]: AbilityData}} */
let BattleAbilities = {
"confidenceboost": { // Machamp line, Victini, Plusle, Florges
desc: "If an active teammate has a stat lowered, raise it's highest stat by one stage.",
shortDesc: "If an active teammate has a stat lowered, raise it's highest stat by one stage.",
onAfterEachBoost(boost, target, source) {
if (!source || target.side === source.side) {
return;
}
let statsLowered = false;
for (let i in boost) {
// @ts-ignore
if (boost[i] < 0) {
statsLowered = true;
}
}
if (statsLowered) {
let statName = 'atk';
let bestStat = 0;
/** @type {StatNameExceptHP} */
let s;
for (s in target.storedStats) {
if (target.storedStats[s] > bestStat) {
statName = s;
bestStat = target.storedStats[s];
}
}
this.boost({[statName]: 1}, target);
}
},
id: "confidenceboost",
name: "Confidence Boost",
},
"protectivepowder": { // Vivillon, Cutiefly line
shortDesc: "Allied Bug types use Powder on switch in.",
onSwitchIn(source) {
if (source.hasType('Bug')) {
this.useMove("Powder", source);
}
},
id: "protectivepowder",
name: "Protective Powder",
},
"arcticarmor": { // Walrein line, Lapras, Rotom-Frost, Kyurem
shortDesc: "Allied Ice types summon Mist upon switching in. Aurora Veil now lasts 8 turns.", // Edit in Aurora Veil's moves.js code
onSwitchIn(source) {
if (source.hasType('Ice')) {
this.useMove("Mist", source);
}
},
id: "arcticarmor",
name: "Arctic Armor",
},
"heavyexpert": {
shortDesc: "Allies' Rock and Steel-type moves have 100% base accuracy.",
onAllyModifyMove(move) {
if (move.type ==='Rock' || move.type === 'Steel') {
move.accuracy = 100;
}
},
id: "heavyexpert",
name: "Heavy Expert",
},
"oceansblessing": { // Lumineon, Alomomola, Mantine, Manaphy, Phione
shortDesc: "This Pokemon’s allies have the Aqua Ring effect added to them.",
onSwitchIn(pokemon) {
pokemon.addVolatile("aquaring");
},
id: "oceansblessing",
name: "Ocean's Blessing",
},
"spookyencounter": {
shortDesc: "Allied Dark-types force the opponent to always be tormented.",
onSwitchIn(pokemon) {
if (pokemon.hasType('Dark')) {
for (const target of pokemon.side.foe.active) {
target.addVolatile("torment");
}
}
},
onResidualOrder: 26,
onResidualSubOrder: 1,
onResidual(pokemon) {
if (pokemon.hasType('Dark')) {
for (const target of pokemon.side.foe.active) {
target.addVolatile('torment');
}
}
},
},
"handoff": { // Aipom, Ambipom
shortDesc: "When an ally consumes their held item, this pokemon gives its item to them.",
onAfterUseItem(item, pokemon) {
// if (pokemon !== this.effectData.target) return;
let battle = pokemon.battle;
let sideID = pokemon.side.id;
let allyBench = battle.benchPokemon[ sideID ];
for (let i = 0; i < 6; i++ ) {
let pkmnInfo = allyBench[ i ]
if ( pkmnInfo && pkmnInfo.ability === 'handoff' && pkmnInfo.item !== '' ) {
pokemon.setItem( pkmnInfo.item )
pkmnInfo.item = ''
this.add('-ability', pokemon, 'Hand Off');
this.add( '-message', pkmnInfo.name + ' gave its item to ' + pokemon.name + '!' )
break
}
}
},
id: "handoff",
name: "Hand Off",
},
"torrentialwill": { // Blastoise, Feraligatr, Swampert, Empoleon, Samurott, Simipour, Greninja, Primarina
shortDesc: "Grass Pledge and Fire Pledge deal 30% more damage and summon the swamp or rainbow combo effects, respectively.",
onBasePower(move) {
if ( move.id === 'firepledge' || move.id === 'grasspledge' ){
return this.chainModify( 1.3 )
}
},
onSourceHit(target, source, move) {
if ( move.id === 'firepledge' ){
source.side.addSideCondition('waterpledge');
}
if ( move.id === 'grasspledge' ){
target.side.addSideCondition('grasspledge');
}
},
id: "torrentialwill",
name: "Torrential Will",
},
"overgrowingwill": { // All Grass starters
shortDesc: "Water Pledge and Fire Pledge deal 30% more damage and summon the swamp or inferno combo effects, respectively.",
onBasePower(move) {
if ( move.id === 'firepledge' || move.id === 'grasspledge' ){
return this.chainModify( 1.3 )
}
},
onSourceHit(target, source, move) {
if ( move.id === 'firepledge' ){
target.side.addSideCondition('firepledge');
}
if ( move.id === 'waterpledge' ){
target.side.addSideCondition('grasspledge');
}
},
id: "overgrowingwill",
name: "Overgrowing Will",
},
"blazingwill": { // All Fire starters
shortDesc: "Grass Pledge and Water Pledge deal 30% more damage and summon the inferno or rainbow combo effects, respectively.",
onBasePower(move) {
if ( move.id === 'firepledge' || move.id === 'grasspledge' ){
return this.chainModify( 1.3 )
}
},
onSourceHit(target, source, move) {
if ( move.id === 'waterpledge' ){
source.side.addSideCondition('waterpledge');
}
if ( move.id === 'grasspledge' ){
target.side.addSideCondition('firepledge');
}
},
id: "blazingwill",
name: "Blazing Will",
},
"guardianangel": { // Ralts, Kirlia, Gardevoir, Togepi, Togetic, Togekiss
shortDesc: "This pokemon's allies take 50% damage from direct attacks when switching in.",
onDamage(damage, target, source, move) {
if (move.effectType === 'Move' && !target.activeTurns ) {
return damage * 0.75;
}
},
id: "guardianangel",
name: "Guardian Angel",
},
"retroracer": {
shortDesc: "This Pokemon's allies with 110 base speed or higher get +1 crit ratio if they are faster than their opponent.",
onModifyCritRatio( critRatio, pokemon, target ) {
if ( pokemon.template.baseStats.spe >= 110 && pokemon.storedStats.spe > target.storedStats.spe ){
return critRatio + 1;
}
},
id: "retroracer",
name: "Retro Racer",
rating: 1.5,
num: 105,
},
"omnimorph": {
desc: "Allies who share a type with this ability's user have their Normal moves changed to this Pokemon’s type.",
shortDesc: "Allies who share a type with this ability's user have their Normal moves changed to this Pokemon’s type.",
onModifyMovePriority: -1,
onModifyMove(move, pokemon) {
let battle = pokemon.battle;
let pkmnInfo = battle.benchPokemon.getPKMNInfo( 'omnimorph', pokemon.side );
let newType = ''
for ( let i = 0; i < 2; i++ ) {
if ( pkmnInfo.types[i] && pokemon.types.includes( pkmnInfo.types[i] ) ){
newType = pkmnInfo.types[i]
}
}
if ( pkmnInfo
&& newType !== ''
&& move.type === 'Normal'
&& !['judgment', 'multiattack', 'naturalgift', 'revelationdance', 'technoblast', 'weatherball'].includes(move.id)
&& !(move.isZ && move.category !== 'Status'))
{
move.type = newType;
}
console.log( battle.benchPokemon )
},
id: "omnimorph",
name: "Omnimorph",
rating: 4,
num: 185,
},
"bombshelter": { // Natu, Xatu, Sigilyph, Chespin, Quilladin, Jangmo-o, Hakamo-o, Kommo-o, Octillery
shortDesc: "This Pokemon’s allies are at worst neutral to Stealth Rock.",
onDamage(damage, target, source, move) {
let maxDamage = ( target.maxhp / 8 )
if ( move.id === 'stealthrock' && damage > maxDamage ) {
return maxDamage;
}
},
id: "bombshelter",
name: "Bomb Shelter",
},
"crystalize": {
desc: "This pokemon's Rock-type allies take 40% less damage from Water-, Grass-, and Fighting-type moves.",
shortDesc: "This pokemon's Rock-type allies take 40% less damage from Water-, Grass-, and Fighting-type moves.",
onDamage(damage, target, source, move) {
if ( move.effectType === 'Move'
&& target.types.includes( "Rock" )
&& ( move.type === 'Grass' || move.type === 'Water' || move.type === 'Fighting' ))
{
return damage * .6;
}
},
id: "crystalize",
name: "Crystalize",
rating: 3.5,
num: 47,
},
"ancientawakening": {
desc: "This pokemon's Rock-type allies take 40% less damage from Water-, Grass-, and Fighting-type moves.",
shortDesc: "This pokemon's Rock-type allies take 40% less damage from Water-, Grass-, and Fighting-type moves.",
onUpdate( pokemon ){
let fossilPokemon = [ 'kabuto', 'kabutops', 'omanyte', 'omastar', 'aerodactyl', 'anorith', 'armaldo', 'lileep', 'cradily', 'cranidos', 'rampardos', 'shieldon', 'bastiodon', 'tirtouga', 'carracosta', 'archen', 'archeops', 'tyrunt', 'tyrantrum', 'amaura', 'aurorus', 'aerodactylmega' ];
if ( !pokemon.highestStats && fossilPokemon.includes( pokemon.speciesid )) {
let statnames = [ 'atk', 'def', 'spa', 'spd', 'spe' ];
pokemon.highestStats = [];
pokemon.highestStats[0] = '';
let bestStat = 0;
for ( let i = 0; i < 2; i++) {
for ( let j = 0; j < 5; j++) {
let statName = statnames[j];
if ( pokemon.storedStats[ statName ] > bestStat && pokemon.highestStats[0] !== statName) {
bestStat = pokemon.storedStats[ statName ];
pokemon.highestStats[i] = statName;
}
}
bestStat = 0;
}
pokemon.AABoost = function( statName, stat, pkmn ) {
if ( pkmn.highestStats[0] === statName || pkmn.highestStats[1] === statName ) {
return stat * 1.3
}
}
}
},
onModifyAtk(stat, pokemon) {
if ( pokemon.highestStats ) {
return pokemon.AABoost( 'atk', stat, pokemon );
}
},
onModifyDef(stat, pokemon) {
if ( pokemon.highestStats ) {
return pokemon.AABoost( 'def', stat, pokemon );
}
},
onModifySpA(stat, pokemon) {
if ( pokemon.highestStats ) {
return pokemon.AABoost( 'spa', stat, pokemon );
}
},
onModifySpD(stat, pokemon) {
if ( pokemon.highestStats ) {
return pokemon.AABoost( 'spd', stat, pokemon );
}
},
onModifySpe(stat, pokemon) {
if ( pokemon.highestStats ) {
return pokemon.AABoost( 'spe', stat, pokemon );
}
},
id: "ancientawakening",
name: "Ancient Awakening",
rating: 3.5,
num: 47,
},
"miraclefluff": {
desc: "This Pokemon receives 80% damage from attacks with secondary effects.",
shortDesc: "This Pokemon takes 1/2 damage from contact moves, 2x damage from Fire moves.",
onDamage(damage, target, source, move) {
let mod = 1;
if (move.secondaries && ( target.template.baseStats.def >= 100 || target.template.baseStats.spd >= 100 )) mod = 0.8;
return this.chainModify(mod);
},
id: "miraclefluff",
name: "Miracle Fluff",
rating: 2.5,
num: 218,
},
"knighthood": {
desc: "This Pokemon receives 80% damage from attacks with secondary effects.",
shortDesc: "This Pokemon takes 1/2 damage from contact moves, 2x damage from Fire moves.",
onDamage(damage, target, source, move) {
if ( target.knighthood && target.types.includes( "Fighting" )) {
this.boost({["def"]: 1, ["spd"]: 1}, target);
target.knighthood = false
}
},
onSwitchIn( pokemon ) {
pokemon.knighthood = true;
},
id: "knighthood",
name: "Knighthood",
rating: 2.5,
num: 218,
},
"hibernation": {
desc: "This Pokemon cannot be statused, and is considered to be asleep. Moongeist Beam, Sunsteel Strike, and the Mold Breaker, Teravolt, and Turboblaze Abilities cannot ignore this Ability.",
shortDesc: "This Pokemon cannot be statused, and is considered to be asleep.",
onBasePowerPriority: 7,
onFoeBasePower(basePower, attacker, defender, move) {
if (this.effectData.target !== defender) return;
if (move.type === 'Ice') {
return this.chainModify(2);
}
},
isUnbreakable: true,
id: "hibernation",
name: "Hibernation",
rating: 3,
num: 213,
},
"sinisterescort": {
desc: "This Pokemon blocks certain status moves and instead uses the move against the original user.",
shortDesc: "This Pokemon blocks certain status moves and bounces them back to the user.",
id: "sinisterescort",
name: "Sinister Escort",
onTryHitPriority: 1,
onTryHit(target, source, move) {
let battle = source.battle
if ( target === source || move.hasBounced || move.type !== 'Dark' || battle.benchPokemon.sEscortUsed ) {
return;
}
battle.benchPokemon.sEscortUsed = true;
this.add('-ability', target, 'Sinister Escort');
let pkmnInfo = battle.benchPokemon.getPKMNInfo( 'sinisterescort', target.side );
this.add( '-message', pkmnInfo.name + ' reflected the attack!' )
let newMove = this.getActiveMove(move.id);
newMove.hasBounced = true;
newMove.pranksterBoosted = false;
this.useMove(newMove, source, source);
return null;
},
effect: {
duration: 1,
},
rating: 4.5,
num: 156,
},
};
exports.BattleAbilities = BattleAbilities;
|
'use strict';
const _ = require('underscore');
const changeCase = require('change-case');
class OutputPlugin {
constructor(options) {
_.extend(this, options);
}
save(data) {
throw new Error('UNIMPLEMENTED');
}
}
module.exports = OutputPlugin;
|
const User = require('./user');
class Seller extends User {
}
module.exports = Seller;
|
import ClubhouseController from 'clubhouse/controllers/clubhouse-controller';
import {tracked} from '@glimmer/tracking';
export default class MeTimesheetController extends ClubhouseController {
queryParams = ['year'];
@tracked year;
get isCurrentYear() {
return this.house.currentYear() == this.year;
}
}
|
/** 立体柱状图
* 支持的配置:
* barWidth:number,柱状图宽度,0~1
* barGap:number,柱状图系列间隔 0~1
* stack:bool,开启堆叠模式
* countStart: function(params, api, wSize, value), 自定义柱子定位点计算函数
* label:object , 柱子顶部label
* layout:string, 设置为y时柱子会横向放置,y轴会成为名称轴,x轴为数值轴
* barMinHeight:number/function(height, seriesIndex, dataIndex),柱子最小高度,为function时返回值将作为柱子最终高度
* barMaxWidth: number, 柱子最大宽度
* beforeRender: function(option), echarts渲染前触发,可调整生成的option
*/
import renderBarItem from "./renderitem";
import getAxis from "./axis";
import { customBarLabel } from "./label";
import themeDict from "./theme";
import utils from "./util";
function countRange(data, stack) {
var sum = [];
let max, min;
data.forEach((s, i) => {
let theMax = Math.max.apply(null, s.value);
let theMin = Math.min.apply(null, s.value);
if ((!max && max !== 0) || theMax > max) {
max = theMax;
}
if ((!min && min !== 0) || theMin < min) {
min = theMin;
}
s.value.forEach(function(item, j) {
sum[j] = sum[j] || 0;
sum[j] += item;
});
});
max = stack ? Math.max.apply(null, sum) : max;
min = stack ? Math.min.apply(null, sum) : min;
return { max, min };
}
function transer(settings, context) {
let {
dataSource: data,
theme,
barWidth,
barMaxWidth,
barGap,
stack,
countStart,
layout,
maxScale,
valueAxisMax,
valueAxisMin,
barMinHeight,
baseShapeControl,
stand = false,
halo = false,
eccentricity = 0.36,
attachItems,
} = settings;
let stackData = {};
let makeHaloItems = (x, y, r, themeItem, myEccentricity) => {
return {
type: "circle",
shape: {
cx: x,
cy: y,
r: r,
},
origin: [x, y],
scale:
layout !== "y"
? [1, myEccentricity || eccentricity]
: [myEccentricity || eccentricity, 1],
style: {
stroke: themeItem.arcBorder,
lineWidth: themeItem.arcBorderWidth,
fill: "transparent",
},
z2: 10,
};
};
let labelItems = function(option) {
let { value } = option;
let items = [];
var labelItem = customBarLabel(value, settings, option);
if (labelItem && labelItem.children) {
labelItem.children.forEach((item) => (item.z2 = 10));
items.push(labelItem);
}
return items;
};
let barLayoutCount = stack || !data.data.length ? 1 : data.data.length;
barGap = barGap || 0.4 / barLayoutCount;
barWidth = barWidth || 0.6 / (barLayoutCount + 0.5);
let series = data.data.map(function(item, i) {
return {
name: item.name,
type: "custom",
itemStyle: {
normal: {
color: theme[i].color,
},
},
renderItem: renderBarItem({
countStart: function(_ref) {
var params = _ref.params,
api = _ref.api,
wSize = _ref.width,
dh = _ref.height;
if (countStart) return countStart.apply(this, arguments);
var seriesIndex = params.seriesIndex,
dataIndex = params.dataIndex;
if (dataIndex === 0 && seriesIndex === 0) {
stackData = {};
}
var stackValue = (stackData[dataIndex] = stackData[dataIndex] || {});
var countSum = function countSum() {
var sum = 0;
Object.keys(stackValue).forEach(function(key) {
if (key >= seriesIndex) return;
var item = stackValue[key] || 0;
sum += item;
});
return sum;
};
var num = data.data.length;
var pIndex = seriesIndex;
var height = countSum() || 0;
if (layout !== "y") {
var o = api.coord([dataIndex, 0]);
if (stack) {
o[1] -= height;
} else {
o[0] +=
pIndex * wSize * (1 + barGap) -
((num - 1) / 2) * wSize * (1 + barGap);
}
} else {
o = api.coord([0, dataIndex]);
if (stack) {
o[0] += height;
} else {
o[1] -=
pIndex * wSize * (1 + barGap) -
((num - 1) / 2) * wSize * (1 + barGap);
}
}
stackValue[seriesIndex] = dh;
return o;
},
barWidth: barWidth || 0.25,
barMaxWidth,
layout: layout,
barMinHeight: barMinHeight,
baseShapeControl: baseShapeControl,
eccentricity,
context,
style: (params, witch) => {
let themeItem;
if (typeof theme == "function") {
themeItem = theme(params, witch);
} else {
themeItem = theme[params.seriesIndex];
}
if (!themeItem) {
return null;
}
if (witch == "arc") {
return {
fill: themeItem.arcColor,
stroke: themeItem.arcBorder,
lineWidth: themeItem.arcBorderWidth,
};
} else {
return {
fill: themeItem.color,
stroke: "transparent",
lineWidth: 0,
};
}
},
attach({ params, o, width, height }) {
let { seriesIndex } = params;
let items = [];
let isStand = () => {
if (stack) return seriesIndex === 0;
return true;
};
let themeItem = theme[seriesIndex];
if (stand && isStand()) {
let item = makeHaloItems(
o[0],
o[1],
width * 0.65,
themeItem,
eccentricity * 1.35
);
item.z2 = -1;
Object.assign(item.style, {
lineWidth: themeItem.arcBorderWidth * 1.5,
});
items.push(item);
let standFillItem = {
type: "arc",
shape: {
cx: o[0],
cy: o[1],
r: width * 0.7,
r0: width / 2,
},
origin: o,
scale:
layout !== "y"
? [1, eccentricity * 1.35]
: [eccentricity * 1.35, 1],
style: {
stroke: "transparent",
fill: themeItem.standFill,
},
z2: -1,
};
items.push(standFillItem);
let standShadowItem = {
type: "arc",
shape: {
cx: o[0],
cy: o[1],
r: width * 1.2,
r0: width * 0.7,
},
origin: o,
scale:
layout !== "y"
? [1, eccentricity * 1.35]
: [eccentricity * 1.35, 1],
style: {
stroke: "transparent",
fill: themeItem.standShadowFill,
},
z2: -1,
};
items.push(standShadowItem);
}
if (halo && isStand()) {
let dh = halo.threshold || 30;
o = o.concat([]);
if (height > dh) {
let ox = o[0],
oy = o[1];
if (layout == "y") {
ox += dh;
} else {
oy -= dh;
}
items.push(makeHaloItems(ox, oy, width / 2, themeItem));
items.push(makeHaloItems(ox, oy, (width * 3) / 10, themeItem));
if (layout == "y") {
ox -= width / 20;
} else {
oy += width / 20;
}
items.push(
makeHaloItems(ox, oy, (width * 2) / 10, theme[seriesIndex])
);
}
}
let labels = labelItems(arguments[0]);
items = items.concat(labels || []);
if (typeof attachItems == "function") {
items = items.concat(attachItems.apply(this, arguments));
}
return items;
},
}),
dimensions: ["from", "to", "profit"],
data: item.value,
};
});
var option = {
grid: {
containLabel: true
},
series: series,
};
let axisOption = getAxis(data.name, settings);
let valueRange = countRange(data.data, stack);
let axisMax = null,
axisMin = null,
maxHeight = valueRange.max,
minHeight = valueRange.min < 0 ? valueRange.min : 0;
if (stack) {
axisMax = maxHeight * (maxScale || 1.1);
axisMin = minHeight * (maxScale || 1.1);
if (axisMax > 10) {
axisMax = Math.round(axisMax);
} else if (axisMax > 1 && axisMax < 10) {
axisMax = Math.round(axisMax * 100) / 100;
}
if (axisMin < -10) {
axisMin = Math.round(axisMin);
} else if (axisMax > -10 && axisMax < 1) {
axisMin = Math.round(axisMin * 100) / 100;
}
}
if (valueAxisMax) {
axisMax =
typeof valueAxisMax == "function"
? valueAxisMax(maxHeight)
: valueAxisMax;
}
if (valueAxisMin) {
axisMin =
typeof valueAxisMin == "function"
? valueAxisMin(minHeight)
: valueAxisMin;
}
if (axisMax && axisMax > 0) {
axisOption[layout == "y" ? "xAxis" : "yAxis"][0].max = axisMax;
}
if (axisMin && axisMin < 0) {
axisOption[layout == "y" ? "xAxis" : "yAxis"][0].min = axisMin;
}
option = Object.assign({}, axisOption, option);
return option;
}
export { renderBarItem };
export default function(target, settings) {
let { option={},title, tooltip, theme, beforeRender, ...chartSettings} = settings;
option.tooltip = Object.assign(option.tooltip||{}, tooltip||{});
option.title = Object.assign(option.title||{}, typeof title=='object'?title:{text: title||''});
let themes = theme?theme.map(item=>themeDict[item]||item):[];
if(!themes.length){
themes = Object.keys(themeDict).map(item=>themeDict[item]);
}
chartSettings.theme = themes;
let chart = target;
let chartOption = transer(chartSettings, chart);
if(!chart) {
return chartOption;
}
let optionResult = utils.extend(chartOption, option);
console.log(optionResult);
beforeRender && beforeRender(chartOption, optionResult);
chart.setOption(optionResult);
return chart;
}
|
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import Layout from './Layout';
import { getCart } from './cartHelpers';
import Card from './Card';
import Checkout from './Checkout';
const Cart = () => {
const [items, setItems] = useState([]);
const [run, setRun] = useState(false);
useEffect(() => {
setItems(getCart());
}, [run]);
const showItems = items => {
return (
<div>
<h2>Your cart has {`${items.length}`} items</h2>
<hr />
{items.map((product, i) => (
<Card
key={i}
product={product}
showAddToCartButton={false}
cartUpdate={true}
showRemoveProductButton={true}
setRun={setRun}
run={run}
/>
))}
</div>
);
};
const noItemsMessage = () => (
<h2>
Your cart is empty. <br /> <Link to="/shop">Continue shopping</Link>
</h2>
);
return (
<Layout
title="Shopping Cart"
description="Manage your cart items. Add remove checkout or continue shopping."
className="container-fluid"
>
<div className="row">
<div className="col-6">{items.length > 0 ? showItems(items) : noItemsMessage()}</div>
<div className="col-6">
<h2 className="mb-4">Your cart summary</h2>
<hr />
<Checkout products={items} setRun={setRun} run={run} />
</div>
</div>
</Layout>
);
};
export default Cart;
|
import {useState} from "react"
export const useLocalStorage = (key,initialValue) => {
const [storedValue, setStoredValue] = useState (() => {
const item = window.localStorage.getItem(key);
return item ? JSON.parse(item) : initialValue;
});
const setValue = value => {
setStoredValue(value)
window.localStorage.setItem(key, JSON.stringify(value))
}
return [storedValue,setValue];
};
export default useLocalStorage
|
(function() {
/**
* <odoc>
* <key>GenData.funcs.genFullPhone(aGenData, aCountry, aType) : String</key>
* Shortcut for GenData.funcs.genPhone where the country code with a '+' is prefixed to the phone number and returned.
* </odoc>
*/
exports.genFullPhone = function(aGenData, aCountry, aType) {
var p = this.genPhone(aGenData, aCountry, aType, false, true);
return "+" + p.countryCode + p.phone;
};
/**
* <odoc>
* <key>GenData.funcs.genPhone(aGenData, aCountry, aType, addOperator, addCountryCode) : Object</key>
* Using the lists/telecom/list_phonePatterns.db (loaded as genData::phonePatterns list) will try to generate a random
* weighted phone number for the specific aCountry. aType can be "fixed", "mobile", "tollFree", "premium", "voip", "voicemail", "sharedCost", "personal". If aType
* is not provided the following weights will be used: fixed 10%, mobile 40%, tollFree 30%, premium 15% and personal 5%.
* Optionally if addCountryCode = true the country code will be returned, if addCountryCode = true the operator if not
* ported if found will be returned. Returns an object with phone, countryCode (optional) and operator (optional).
* </odoc>
*/
exports.genPhone = function(aGenData, aCountry, aType, addOperator, addCountryCode) {
aGenData.loadIfNotExists("genData::phonePatterns", aGenData.getPath() + "/lists/telecom/list_phonePatterns.db");
aGenData.loadIfNotExists("genData::phonePrefixes", aGenData.getPath() + "/lists/telecom/list_phonePrefixes.db");
if (isUnDef(aType)) {
aType = aGenData.oneOf([
{ t: "fixed", w: 10 },
{ t: "mobile", w: 40 },
{ t: "tollFree", w: 30 },
{ t: "premium", w: 15 },
{ t: "personal", w: 5 } ], "w").t;
}
var country = $path(aGenData.getList("genData::phonePatterns"), "[?country=='" + aCountry + "'] | [0]");
var number = aGenData.randomRegEx(country[aType]);
var operator = void 0;
if (addOperator) {
var options = $path(aGenData.getList("genData::phonePrefixes"), "[?country==`" + country.countryCode + "`] | [*].{prefixes: prefixes, operator: operator}");
var found = false;
for(var ioption = 0; ioption < options.length && !found; ioption++) {
found = ( options[ioption].prefixes.findIndex((v) => {
return (String(country.countryCode) + String(number)).indexOf(v) == 0;
}) >= 0);
if (found) operator = options[ioption].operator;
}
}
return {
phone: number,
countryCode: ((addCountryCode) ? country.countryCode : void 0),
operator: ((addOperator) ? operator : void 0)
};
};
/**
* <odoc>
* <key>GenData.funcs.genIMSI(aGenData, aCountry, anOperator) : String</key>
* Given anOperator from aCountry (two-letter) will generate a possible IMSI based on the lists/telecom/list_phoneOperators.db.
* </odoc>
*/
exports.genIMSI = function(aGenData, aCountry, anOperator) {
aGenData.loadIfNotExists("genData::phoneOperators", aGenData.getPath() + "/lists/telecom/list_phoneOperators.db");
var opr;
if (isDef(anOperator))
opr = $path(aGenData.getList("genData::phoneOperators"), "[?operator=='" + anOperator + "'] | [?country=='" + aCountry + "'] | [0]");
else
opr = aGenData.getFromList("genData::phoneOperators");
return {
imsi: String(opr.mcc) + String(opr.mnc) + aGenData.randomLongString(15 - (opr.mcc.length + opr.mnc.length)),
operator: String(opr.operator)
};
};
/**
* <odoc>
* <key>GenData.funcs.genIMEI(aGenData, aModel) : String</key>
* Given a device model, from the lists/telecom/list_phoneTACs.yaml, will generate a valid IMEI.
* </odoc>
*/
exports.genIMEI = function(aGenData, aModel) {
aGenData.loadIfNotExists("genData::phoneTACs", aGenData.getPath()+ "/lists/telecom/list_phoneTACs.db");
var opr;
if (isDef(aModel)) {
opr = $path(aGenData.getList("genData::phoneTACs"), "[?name=='" + aModel.m + "']");
opr = aGenData.oneOf(opr);
} else {
opr = aGenData.getFromList("genData::phoneTACs");
}
if (isDef(opr)) {
return {
imei: String(opr.tac) + aGenData.randomLongString(15 - (opr.tac.length)),
model: opr.name
};
} else {
throw "Model not found.";
}
};
/**
* <odoc>
* <key>GenData.funcs.genICCID(aGenData, anOperator) : String</key>
* Given anOperator, from the lists/telecom/list_phoneOperators.yaml, will generate a possible SIM ICCID.
* </odoc>
*/
exports.genICCID = function(aGenData, anOperator) {
aGenData.loadIfNotExists("genData::operatorsIIN", aGenData.getPath() + "/lists/telecom/list_iin.db");
var getLuhn = function(aValue) {
aValue = String(aValue);
var luhnArr = [[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]], sum = 0;
aValue.replace(/\D+/g,"").replace(/[\d]/g, function(c, p, o){
sum += luhnArr[ (o.length-p)&1 ][ parseInt(c,10) ];
});
return aValue + ((10 - sum%10)%10);
};
var opr;
if (isDef(anOperator)) {
opr = $path(aGenData.getList("genData::operatorsIIN"), "[?operator=='" + anOperator + "'] | [0]");
} else {
opr = aGenData.getFromList("genData::operatorsIIN");
}
//var mii = "89"; // Major industry identifier, 2 fixed digits, 89 for telecommunication
//var countryCode = "1"; // 3 digits as defined in E.164
//var issuer = "1234"; // 4 digits
var issuer;
if (isDef(opr) && opr != null && isDef(opr.simIssuer))
issuer = String(aGenData.oneOf(opr.simIssuer));
else
issuer = "8911234";
var individualAccount = aGenData.randomLongString(19 - issuer.length);
var final = getLuhn(String(issuer) + String(individualAccount));
return final;
};
})();
|
'use strict';
exports.__esModule = true;
var ATTR_NAME_MAP = {
acceptCharset: 'accept-charset',
className: 'class',
htmlFor: 'for',
httpEquiv: 'http-equiv'
};
function normalizeAttributes(attributes) {
if (attributes == null) {
return attributes;
}
var normalized = {};
var didNormalize = false;
for (var _iterator = Object.keys(attributes), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var name = _ref;
var newName = name;
if (ATTR_NAME_MAP.hasOwnProperty(name)) {
newName = ATTR_NAME_MAP[name];
didNormalize = true;
}
normalized[newName] = attributes[name];
}
return didNormalize ? normalized : attributes;
}
exports.default = normalizeAttributes;
|
/**
* Identifies eval with expression
* @author Adam Baldwin
*/
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = function(context) {
"use strict";
return {
"CallExpression": function(node) {
if (node.callee.name === "eval" && node.arguments[0].type !== 'Literal') {
context.report(node, "eval with argument of type " + node.arguments[0].type);
}
}
};
};
|
const axios = require("axios");
const CronJobManager = require("cron-job-manager");
const moment = require("moment");
const { v4: uuidv4 } = require("uuid");
const Resource = require("../resources/resourcesModel");
const User = require("../users/usersModel");
const Log = require("../logsResource/logsModel");
const sendMail = require("../utils/mail");
// This file contains all the functions related to the cron jobs
module.exports = {
addCronJob,
removeCronJob,
pauseCronJob,
updateCronJob,
cronJobExists,
};
// holds all the cron jobs for the app
const manager = new CronJobManager();
// adds a new cron job and watches resource status
function addCronJob(key, url, resource_id, checkStatus, time = "*/30 * * * *") {
checkStatus(url, resource_id);
manager.add(
key,
time,
async () => {
try {
const res = await axios.get(url);
if (res.status === 200) {
console.log(`${url} is up and running`);
// update resource status to up/true
const resource = await Resource.update(
{ status: true, last_check: moment().format() },
resource_id
);
// add log record of the status check
await Log.add({
id: uuidv4(),
last_check: resource.last_check,
code: res.status,
status: resource.status,
resource_id: resource.id,
});
}
} catch (error) {
// console.log(error);
// update resource status to down/false
const resource = await Resource.update(
{ status: false, last_check: moment().format() },
resource_id
);
// add log record of the status check
await Log.add({
id: uuidv4(),
last_check: resource.last_check,
code: error.response.status,
status: resource.status,
resource_id: resource.id,
});
// send a text/email notification to the user that their resource is down
const user = await User.findByFilter({
id: resource.user_id,
});
// grab user name and email and pass to email function
sendMail(
user.email,
`${user.name}, resource ${resource.name} at ${resource.link} is down!`
);
console.log(`${user.name}, ${url} is down`);
}
},
{ start: true }
);
}
// deletes a cron job from the app
function removeCronJob(key) {
manager.deleteJob(key);
console.log(`${key} was removed from job list`);
}
// pause a cron job
function pauseCronJob(key) {
manager.stop(key);
}
// update the schedule for a cron job
function updateCronJob(key, time) {
manager.update(key, time);
}
// see if a cron job exists
function cronJobExists(key) {
return manager.exists(key);
}
|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var initMaps = require('../../../../assets/js/init/initMaps.js');
var GoogleMapsComponent = (function () {
function GoogleMapsComponent() {
}
GoogleMapsComponent.prototype.ngOnInit = function () {
initMaps();
};
GoogleMapsComponent = __decorate([
core_1.Component({
moduleId: module.id,
selector: 'vector-maps-cmp',
templateUrl: './googlemaps.component.html'
}),
__metadata('design:paramtypes', [])
], GoogleMapsComponent);
return GoogleMapsComponent;
}());
exports.GoogleMapsComponent = GoogleMapsComponent;
//# sourceMappingURL=googlemaps.component.js.map
|
import React, { Component } from 'react';
class HelloReactToDoList extends Component{
constructor(props) {
super(props);
this.state = {
things:props.things
};
this.addTodo = this.addTodo.bind(this);
};
addTodo() {
console.log("add todo.",this);
console.log(this.props);
const todo = document.getElementById("ToDoList").value;
// document.getElementById("ToDoList").value = "";
this.setState({
things: this.state.things.concat({
task: todo,
done: false
})
});
}
render(){
return (
<div>
<input id="ToDoList" type="input" placeholder="input a todo" />
<button onClick={this.addTodo}>Add Todo(这边用map函数批量生成列表)</button>
<ul>
{console.log(this.state)}
{this.state.things.map(thing => {
return (
<li key={thing.task}>
<input
type="checkbox"
onClick={() => {thing.done= !thing.done;}}
defaultChecked={thing.done}
/>
<span>{thing.task}</span>
</li>
);
})}
</ul>
<p>{this.state.things.filter(thing => !thing.done).length} tasks remain.</p>
</div>
)
}
}
export default HelloReactToDoList;
|
// @flow
import nullthrows from 'nullthrows';
import { EditorState } from 'prosemirror-state';
import { setCellAttr } from 'prosemirror-tables';
import { Transform } from 'prosemirror-transform';
import { EditorView } from 'prosemirror-view';
import ColorEditor from './ui/ColorEditor';
import { atAnchorRight } from './ui/PopUpPosition';
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
import createPopUp from './ui/createPopUp';
const setCellBackgroundBlack = setCellAttr('background', '#000000');
class TableBackgroundColorCommand extends UICommand {
_popUp = null;
shouldRespondToUIEvent = (e: SyntheticEvent<> | MouseEvent): boolean => {
return e.type === UICommand.EventType.MOUSEENTER;
};
isEnabled = (state: EditorState): boolean => {
return setCellBackgroundBlack(state.tr);
};
waitForUserInput = (
state: EditorState,
dispatch: ?(tr: Transform) => void,
view: ?EditorView,
event: ?SyntheticEvent<>
): Promise<any> => {
if (this._popUp) {
return Promise.resolve(undefined);
}
const target = nullthrows(event).currentTarget;
if (!(target instanceof HTMLElement)) {
return Promise.resolve(undefined);
}
const anchor = event ? event.currentTarget : null;
return new Promise((resolve) => {
this._popUp = createPopUp(ColorEditor, null, {
anchor,
position: atAnchorRight,
onClose: (val) => {
if (this._popUp) {
this._popUp = null;
resolve(val);
}
},
});
});
};
executeWithUserInput = (
state: EditorState,
dispatch: ?(tr: Transform) => void,
view: ?EditorView,
hex: ?string
): boolean => {
if (dispatch && hex !== undefined) {
const cmd = setCellAttr('background', hex);
cmd(state, dispatch, view);
return true;
}
return false;
};
cancel(): void {
this._popUp && this._popUp.close(undefined);
}
}
export default TableBackgroundColorCommand;
|
/**
* @file 自闭合标签表
* @author errorrik(errorrik@gmail.com)
*/
var splitStr2Obj = require('../util/split-str-2-obj');
/**
* 自闭合标签列表
*
* @type {Object}
*/
var hotTags = splitStr2Obj('div,span,input,button,textarea,form,label,dl,dt,dd,ul,ol,li,a,b,u,h1,h2,h3,h4,h5,h6');
exports = module.exports = hotTags;
|
import React, { Component } from "react";
import { Link as SmoothLink } from "react-scroll";
import ReactTooltip from "react-tooltip";
import './VerticalNav.css';
import inView from 'in-view';
export default class VerticalNav extends Component{
constructor(props){
super(props);
this.state ={
ativoTopo: true,
ativoSobre: false,
ativoDesafio: false,
ativoManual: false,
ativoClasses: false,
}}
handleView = section => {
const linkEl = document.querySelector(`#link-${section}`);
let offsetHeight = 0.01*(window.innerHeight)
inView.offset({
bottom:offsetHeight
});
inView(`#${section}`)
.on("enter", () => linkEl.classList.add('dot-active'))
.on("exit", () => linkEl.classList.remove('dot-active'))
};
dot_selecionado(e, section) {
switch (section) {
case 'topo':
this.setState({ ativoTopo: true, ativoSobre: false, ativoDesafio: false, ativoManual: false, ativoClasses: false })
break;
case 'sobre':
this.setState({ ativoTopo: false, ativoSobre: true, ativoDesafio: false, ativoManual: false, ativoClasses: false })
break;
case 'desafios-missao':
this.setState({ ativoTopo: false, ativoSobre: false, ativoDesafio: true, ativoManual: false, ativoClasses: false })
break;
case 'manual':
this.setState({ ativoTopo: false, ativoSobre: false, ativoDesafio: false, ativoManual: true, ativoClasses: false })
break;
case 'classes':
this.setState({ ativoTopo: false, ativoSobre: false, ativoDesafio: false, ativoManual: false, ativoClasses: true })
break;
default:
break;
}}
componentDidMount(){
["topo", "sobre", "desafios-missao", "manual", "classes"].forEach(this.handleView);
}
render(){
return(
<div className="VerticalNav">
<nav className="verticalNav">
<div className='link-list'>
<SmoothLink
id='link-topo'
href="#topo"
to="topo"
smooth={true}
data-tip='Topo'
className={'nav-dots dot-topo ' + (this.state.ativoTopo ? 'dot-active' : '')}
onClick={(e) => this.dot_selecionado(e, 'topo')}
/>
<SmoothLink
id='link-sobre'
href="#sobre" to="sobre"
smooth={true}
data-tip='Sobre'
className={'nav-dots dot-sobre ' + (this.state.ativoSobre ? 'dot-active' : '')}
onClick={(e) => this.dot_selecionado(e, 'sobre')}
/>
<SmoothLink
id='link-desafios-missao'
href="#desafios-missao"
to="desafios-missao"
smooth={true}
data-tip='O que queremos?'
className={'nav-dots dot-desafios-missao ' + (this.state.ativoDesafio ? 'dot-active' : '')}
onClick={(e) => this.dot_selecionado(e, 'desafios-missao')}
/>
<SmoothLink
id='link-manual'
href="#manual"
to="manual"
smooth={true}
data-tip='Como Funciona?'
className={'nav-dots dot-manual ' + (this.state.ativoManual ? 'dot-active' : '')}
onClick={(e) => this.dot_selecionado(e, 'manual')}
/>
<SmoothLink
id='link-classes'
href="#classes"
to="classes"
smooth={true}
data-tip='Classes'
className={'nav-dots dot-classes ' + (this.state.ativoClasses ? 'dot-active' : '')}
onClick={(e) => this.dot_selecionado(e, 'classes')}
/>
</div>
<ReactTooltip place="left" effect="float" textColor='#fff' backgroundColor='#fa1c2e'/>
</nav>
</div>
);
}
}
|
export { default as Home } from "./Home/Home";
|
import HtmlWebpackPlugin from 'html-webpack-plugin'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import webpack from 'webpack'
import paths from './paths'
import * as config from './webpack.common.config'
import { getPack } from './package'
export default function getConfig({name, html = {}, px2rem = {}, framework = 'jquery', isCDN = 'no'}) {
const pack = getPack()
const localPublicPath = paths.resolve('/fe', pack['namespace'], pack['name'])
// px2rem
const px2remConfig = {
remUnit : 75,
remPrecision: 8,
...px2rem
}
return {
...{
dirName : name,
devtool : "#cheap-module-source-map",
resolveLoader: {
modulesDirectories: paths.isInFfanScripts ? [paths.ownNodeModules] : [paths.appNodeModules],
moduleTemplates : ['*-loader', '*']
},
},
output : {
path : paths.appBuild,
filename : `assets/js/${name}/[name]_[hash:4].js`,
publicPath: (isCDN === 'yes') ? 'https://nres.ffan.com/newactivity/' : localPublicPath,
},
resolve : config.resolve,
externals: config.externals,
module : {
noParse: config.noParse,
loaders: config.getLoaders(px2remConfig, paths.appSrc, name, true),
...config.getModule(px2remConfig)
},
vue : config.vueConfig,
plugins : [
new HtmlWebpackPlugin({
filename: `html/${name}.html`,
...html,
isCDN : isCDN === 'yes',
template: html.template || paths.resolve(paths.appHtmlTemplates, `${framework}Tpl.hbs`),
}),
new ExtractTextPlugin(`assets/css/${name}/[name]_[hash:4].css`),
new webpack.optimize.OccurenceOrderPlugin(true),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true, // jscs:ignore requireCamelCaseOrUpperCaseIdentifiers
warnings : false,
},
}),
]
}
}
|
define(['./chunk-1825b42d.js'], function (__chunk_1) { 'use strict';
var main2 = __chunk_1.d.map(d => d + 2);
return main2;
});
|
/*
* # Semantic - Tab
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
"use strict";
$.tab = $.fn.tab = function(parameters) {
var
// use window context if none specified
$allModules = $.isFunction(this)
? $(window)
: $(this),
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.tab.settings, parameters)
: $.extend({}, $.fn.tab.settings),
moduleSelector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
module,
returnedValue
;
$allModules
.each(function() {
var
className = settings.className,
metadata = settings.metadata,
selector = settings.selector,
error = settings.error,
eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace,
$module = $(this),
cache = {},
firstLoad = true,
recursionDepth = 0,
$context,
$tabs,
activeTabPath,
parameterArray,
historyEvent,
element = this,
instance = $module.data(moduleNamespace)
;
module = {
initialize: function() {
module.debug('Initializing tab menu item', $module);
module.determineTabs();
module.debug('Determining tabs', settings.context, $tabs);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
}
module.instantiate();
},
determineTabs: function() {
var
$reference
;
// determine tab context
if(settings.context === 'parent') {
if($module.closest(selector.ui).size() > 0) {
$reference = $module.closest(selector.ui);
module.verbose('Using closest UI element for determining parent', $reference);
}
else {
$reference = $module;
}
$context = $reference.parent();
module.verbose('Determined parent element for creating context', $context);
}
else if(settings.context) {
$context = $(settings.context);
module.verbose('Using selector for tab context', settings.context, $context);
}
else {
$context = $('body');
}
// find tabs
if(settings.childrenOnly) {
$tabs = $context.children(selector.tabs);
module.debug('Searching tab context children for tabs', $context, $tabs);
}
else {
$tabs = $context.find(selector.tabs);
module.debug('Searching tab context for tabs', $context, $tabs);
}
},
initializeHistory: function() {
if(settings.history) {
module.debug('Initializing page state');
if( $.address === undefined ) {
module.error(error.state);
return false;
}
else {
if(settings.historyType == 'state') {
module.debug('Using HTML5 to manage state');
if(settings.path !== false) {
$.address
.history(true)
.state(settings.path)
;
}
else {
module.error(error.path);
return false;
}
}
$.address
.bind('change', module.event.history.change)
;
}
}
},
instantiate: function () {
module.verbose('Storing instance of module', module);
$module
.data(moduleNamespace, module)
;
},
destroy: function() {
module.debug('Destroying tabs', $module);
$module
.removeData(moduleNamespace)
.off(eventNamespace)
;
},
event: {
click: function(event) {
var
tabPath = $(this).data(metadata.tab)
;
if(tabPath !== undefined) {
if(settings.history) {
module.verbose('Updating page state', event);
$.address.value(tabPath);
}
else {
module.verbose('Changing tab', event);
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
}
},
history: {
change: function(event) {
var
tabPath = event.pathNames.join('/') || module.get.initialPath(),
pageTitle = settings.templates.determineTitle(tabPath) || false
;
module.performance.display();
module.debug('History change event', tabPath, event);
historyEvent = event;
if(tabPath !== undefined) {
module.changeTab(tabPath);
}
if(pageTitle) {
$.address.title(pageTitle);
}
}
}
},
refresh: function() {
if(activeTabPath) {
module.debug('Refreshing tab', activeTabPath);
module.changeTab(activeTabPath);
}
},
cache: {
read: function(cacheKey) {
return (cacheKey !== undefined)
? cache[cacheKey]
: false
;
},
add: function(cacheKey, content) {
cacheKey = cacheKey || activeTabPath;
module.debug('Adding cached content for', cacheKey);
cache[cacheKey] = content;
},
remove: function(cacheKey) {
cacheKey = cacheKey || activeTabPath;
module.debug('Removing cached content for', cacheKey);
delete cache[cacheKey];
}
},
set: {
state: function(state) {
$.address.value(state);
}
},
changeTab: function(tabPath) {
var
pushStateAvailable = (window.history && window.history.pushState),
shouldIgnoreLoad = (pushStateAvailable && settings.ignoreFirstLoad && firstLoad),
remoteContent = (settings.auto || $.isPlainObject(settings.apiSettings) ),
// only get default path if not remote content
pathArray = (remoteContent && !shouldIgnoreLoad)
? module.utilities.pathToArray(tabPath)
: module.get.defaultPathArray(tabPath)
;
tabPath = module.utilities.arrayToPath(pathArray);
$.each(pathArray, function(index, tab) {
var
currentPathArray = pathArray.slice(0, index + 1),
currentPath = module.utilities.arrayToPath(currentPathArray),
isTab = module.is.tab(currentPath),
isLastIndex = (index + 1 == pathArray.length),
$tab = module.get.tabElement(currentPath),
$anchor,
nextPathArray,
nextPath,
isLastTab
;
module.verbose('Looking for tab', tab);
if(isTab) {
module.verbose('Tab was found', tab);
// scope up
activeTabPath = currentPath;
parameterArray = module.utilities.filterArray(pathArray, currentPathArray);
if(isLastIndex) {
isLastTab = true;
}
else {
nextPathArray = pathArray.slice(0, index + 2);
nextPath = module.utilities.arrayToPath(nextPathArray);
isLastTab = ( !module.is.tab(nextPath) );
if(isLastTab) {
module.verbose('Tab parameters found', nextPathArray);
}
}
if(isLastTab && remoteContent) {
if(!shouldIgnoreLoad) {
module.activate.navigation(currentPath);
module.content.fetch(currentPath, tabPath);
}
else {
module.debug('Ignoring remote content on first tab load', currentPath);
firstLoad = false;
module.cache.add(tabPath, $tab.html());
module.activate.all(currentPath);
$.proxy(settings.onTabInit, $tab)(currentPath, parameterArray, historyEvent);
$.proxy(settings.onTabLoad, $tab)(currentPath, parameterArray, historyEvent);
}
return false;
}
else {
module.debug('Opened local tab', currentPath);
module.activate.all(currentPath);
if( !module.cache.read(currentPath) ) {
module.cache.add(currentPath, true);
module.debug('First time tab loaded calling tab init');
$.proxy(settings.onTabInit, $tab)(currentPath, parameterArray, historyEvent);
}
$.proxy(settings.onTabLoad, $tab)(currentPath, parameterArray, historyEvent);
}
}
else if(tabPath.search('/') == -1) {
// look for in page anchor
$anchor = $('#' + tabPath + ', a[name="' + tabPath + '"]'),
currentPath = $anchor.closest('[data-tab]').data('tab');
$tab = module.get.tabElement(currentPath);
// if anchor exists use parent tab
if($anchor && $anchor.size() > 0 && currentPath) {
module.debug('No tab found, but deep anchor link present, opening parent tab');
module.activate.all(currentPath);
if( !module.cache.read(currentPath) ) {
module.cache.add(currentPath, true);
module.debug('First time tab loaded calling tab init');
$.proxy(settings.onTabInit, $tab)(currentPath, parameterArray, historyEvent);
}
return false;
}
}
else {
module.error(error.missingTab, $module, $context, currentPath);
return false;
}
});
},
content: {
fetch: function(tabPath, fullTabPath) {
var
$tab = module.get.tabElement(tabPath),
apiSettings = {
dataType : 'html',
stateContext : $tab,
onSuccess : function(response) {
module.cache.add(fullTabPath, response);
module.content.update(tabPath, response);
if(tabPath == activeTabPath) {
module.debug('Content loaded', tabPath);
module.activate.tab(tabPath);
}
else {
module.debug('Content loaded in background', tabPath);
}
$.proxy(settings.onTabInit, $tab)(tabPath, parameterArray, historyEvent);
$.proxy(settings.onTabLoad, $tab)(tabPath, parameterArray, historyEvent);
},
urlData: { tab: fullTabPath }
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
fullTabPath = fullTabPath || tabPath;
cachedContent = module.cache.read(fullTabPath);
if(settings.cache && cachedContent) {
module.debug('Showing existing content', fullTabPath);
module.content.update(tabPath, cachedContent);
module.activate.tab(tabPath);
$.proxy(settings.onTabLoad, $tab)(tabPath, parameterArray, historyEvent);
}
else if(existingRequest) {
module.debug('Content is already loading', fullTabPath);
$tab
.addClass(className.loading)
;
}
else if($.api !== undefined) {
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
}
},
update: function(tabPath, html) {
module.debug('Updating html for', tabPath);
var
$tab = module.get.tabElement(tabPath)
;
$tab
.html(html)
;
}
},
activate: {
all: function(tabPath) {
module.activate.tab(tabPath);
module.activate.navigation(tabPath);
},
tab: function(tabPath) {
var
$tab = module.get.tabElement(tabPath)
;
module.verbose('Showing tab content for', $tab);
$tab
.addClass(className.active)
.siblings($tabs)
.removeClass(className.active + ' ' + className.loading)
;
},
navigation: function(tabPath) {
var
$navigation = module.get.navElement(tabPath)
;
module.verbose('Activating tab navigation for', $navigation, tabPath);
$navigation
.addClass(className.active)
.siblings($allModules)
.removeClass(className.active + ' ' + className.loading)
;
}
},
deactivate: {
all: function() {
module.deactivate.navigation();
module.deactivate.tabs();
},
navigation: function() {
$allModules
.removeClass(className.active)
;
},
tabs: function() {
$tabs
.removeClass(className.active + ' ' + className.loading)
;
}
},
is: {
tab: function(tabName) {
return (tabName !== undefined)
? ( module.get.tabElement(tabName).size() > 0 )
: false
;
}
},
get: {
initialPath: function() {
return $allModules.eq(0).data(metadata.tab) || $tabs.eq(0).data(metadata.tab);
},
path: function() {
return $.address.value();
},
// adds default tabs to tab path
defaultPathArray: function(tabPath) {
return module.utilities.pathToArray( module.get.defaultPath(tabPath) );
},
defaultPath: function(tabPath) {
var
$defaultNav = $allModules.filter('[data-' + metadata.tab + '^="' + tabPath + '/"]').eq(0),
defaultTab = $defaultNav.data(metadata.tab) || false
;
if( defaultTab ) {
module.debug('Found default tab', defaultTab);
if(recursionDepth < settings.maxDepth) {
recursionDepth++;
return module.get.defaultPath(defaultTab);
}
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
},
navElement: function(tabPath) {
tabPath = tabPath || activeTabPath;
return $allModules.filter('[data-' + metadata.tab + '="' + tabPath + '"]');
},
tabElement: function(tabPath) {
var
$fullPathTab,
$simplePathTab,
tabPathArray,
lastTab
;
tabPath = tabPath || activeTabPath;
tabPathArray = module.utilities.pathToArray(tabPath);
lastTab = module.utilities.last(tabPathArray);
$fullPathTab = $tabs.filter('[data-' + metadata.tab + '="' + lastTab + '"]');
$simplePathTab = $tabs.filter('[data-' + metadata.tab + '="' + tabPath + '"]');
return ($fullPathTab.size() > 0)
? $fullPathTab
: $simplePathTab
;
},
tab: function() {
return activeTabPath;
}
},
utilities: {
filterArray: function(keepArray, removeArray) {
return $.grep(keepArray, function(keepValue) {
return ( $.inArray(keepValue, removeArray) == -1);
});
},
last: function(array) {
return $.isArray(array)
? array[ array.length - 1]
: false
;
},
pathToArray: function(pathName) {
if(pathName === undefined) {
pathName = activeTabPath;
}
return typeof pathName == 'string'
? pathName.split('/')
: [pathName]
;
},
arrayToPath: function(pathArray) {
return $.isArray(pathArray)
? pathArray.join('/')
: false
;
}
},
setting: function(name, value) {
module.debug('Changing setting', name, value);
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
module.error(error.method, query);
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if($.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
module.destroy();
}
module.initialize();
}
})
;
if(module && !methodInvoked) {
module.initializeHistory();
}
return (returnedValue !== undefined)
? returnedValue
: this
;
};
// shortcut for tabbed content with no defined navigation
$.tab = function(settings) {
$(window).tab(settings);
};
$.fn.tab.settings = {
name : 'Tab',
namespace : 'tab',
debug : false,
verbose : true,
performance : true,
// uses pjax style endpoints fetching content from same url with remote-content headers
auto : false,
history : false,
historyType : 'hash',
path : false,
context : false,
childrenOnly : false,
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally
cache : true,
// settings for api call
apiSettings : false,
// only called first time a tab's content is loaded (when remote source)
onTabInit : function(tabPath, parameterArray, historyEvent) {},
// called on every load
onTabLoad : function(tabPath, parameterArray, historyEvent) {},
templates : {
determineTitle: function(tabArray) {}
},
error: {
api : 'You attempted to load content without API module',
method : 'The method you called is not defined',
missingTab : 'Activated tab cannot be found for this context.',
noContent : 'The tab you specified is missing a content url.',
path : 'History enabled, but no path was specified',
recursion : 'Max recursive depth reached',
state : 'The state library has not been initialized'
},
metadata : {
tab : 'tab',
loaded : 'loaded',
promise: 'promise'
},
className : {
loading : 'loading',
active : 'active'
},
selector : {
tabs : '.ui.tab',
ui : '.ui'
}
};
})( jQuery, window , document );
|
import any from '@travi/any';
import {assert} from 'chai';
import sinon from 'sinon';
import {scaffold} from './language-scaffolder';
suite('language scaffolder', () => {
test('that the language specific scaffolder is called with necessary data', () => {
const options = any.simpleObject();
const chosenLanguage = any.word();
const chosenLanguageScaffolder = sinon.stub();
const scaffolderResult = any.simpleObject();
chosenLanguageScaffolder.withArgs(options).resolves(scaffolderResult);
const scaffolders = {...any.simpleObject(), [chosenLanguage]: chosenLanguageScaffolder};
return assert.becomes(scaffold(scaffolders, chosenLanguage, options), scaffolderResult);
});
test('that that choosing a language without a defined scaffolder does not result in an error', () => scaffold(
any.simpleObject(),
any.word(),
any.simpleObject()
));
});
|
var group__socket_struct_sl_timeval__t =
[
[ "tv_sec", "group__socket.html#a8f5aa475627ac4ba971fce4b1a79b673", null ],
[ "tv_usec", "group__socket.html#a1ad5c78770a3d6fd50eae96b9096830b", null ]
];
|
/* Version: 16.0.10827.10000 */
Type.registerNamespace("Strings");
Strings.OfficeOM = function()
{
};
Strings.OfficeOM.registerClass("Strings.OfficeOM");
Strings.OfficeOM.L_APICallFailed = "API அழைப்பு தோல்வி";
Strings.OfficeOM.L_APINotSupported = "API ஆதரிக்கப்படவில்லை";
Strings.OfficeOM.L_ActivityLimitReached = "செயல்பாட்டு வரம்பைக் கடந்தது.";
Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "தயவுசெய்து தேர்ந்தெடுக்கவும்.";
Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "துணை-நிரல் ஏற்கனவே அணுகல் டோக்கனை கோரியுள்ளது.";
Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "இந்த துணை-நிரல் ஏற்கனவே அணுகல் டோக்கனை கோரியுள்ளதால், இயக்கம் தோல்வியுற்றது.";
Strings.OfficeOM.L_ApiNotFoundDetails = "{0} முறை அல்லது பண்பு, {1} தகுதிநிலை தொகுப்பின் பாகமாகும், அது நீங்கள் பயன்படுத்தும் {2} பதிப்பில் கிடைக்காது.";
Strings.OfficeOM.L_AppNameNotExist = "{0}-க்கான துணை நிரல் பெயர் இல்லை.";
Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "பயன்பாடு {0} இல்லை. Microsoft.Office.WebExtension.initialize(reason) அழைக்கப்படவில்லை.";
Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "படிக்க மட்டும் குணம் '{0}'-ஐ அமைக்க முயற்சிக்கிறது.";
Strings.OfficeOM.L_BadSelectorString = "தேர்விக்கு அனுப்பப்பட்ட எழுத்துச்சரம், தவறான வடிவமைப்பில் உள்ளது அல்லது ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_BindingCreationError = "பிணைத்தல் உருவாக்குதல் பிழை";
Strings.OfficeOM.L_BindingNotExist = "குறிப்பிடப்பட்ட பைண்டிங் இல்லை.";
Strings.OfficeOM.L_BindingToMultipleSelection = "தொடர்ச்சியற்ற தேர்வுகள் ஆதரிக்கப்படாது.";
Strings.OfficeOM.L_BrowserAPINotSupported = "கோரப்பட்ட API ஐ இந்த உலாவி ஆதரிக்காது.";
Strings.OfficeOM.L_CallbackNotAFunction = "Callback என்பது ஒரு வகை செயல்பாடாக இருக்க வேண்டும், {0} வகையில் இருந்தது."
Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "குணம் '{0}'-க்கான மாற்றங்களை \"object.set\" முறை மூலம் பயன்படுத்த முடியாது.";
Strings.OfficeOM.L_CannotNavigateTo = "வழிசெலுத்தல் ஆதரிக்கப்படாத இடத்தில் பொருள் அமைந்துள்ளது.";
Strings.OfficeOM.L_CannotRegisterEvent = "நிகழ்வு நடத்தியைப் பதிவுசெய்ய முடியவில்லை.";
Strings.OfficeOM.L_CannotWriteToSelection = "தற்போதைய தேர்வில் எழுத முடியாது.";
Strings.OfficeOM.L_CellDataAmountBeyondLimits = "குறிப்பு: ஒரு அட்டவணையில் உள்ள கலங்களின் எண்ணிக்கை 20,000க்கு குறைவாக இருப்பது பரிந்துரைக்கப்படுகிறது.";
Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "குறிப்பு: வடிவமைப்பு API அழைப்பால் அமைக்கப்பட்ட வடிவமைப்பு தொகுப்புகள், 100க்கு குறைவாக இருப்பது பரிந்துரைக்கப்படுகிறது.";
Strings.OfficeOM.L_CloseFileBeforeRetrieve = "மற்றொன்றை மீட்டெடுப்பதற்கு முன்பு, தற்போதைய கோப்பில், closeAsync அழைக்கவும்.";
Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "குறிப்பிடப்பட்ட கோயர்ஷன் வகை, இந்த பைண்டிங் வகையுடன் இணங்காது.";
Strings.OfficeOM.L_CoercionTypeNotSupported = "குறிப்பிடப்பட்ட கோயர்ஷன் வகைக்கு ஆதரவில்லை.";
Strings.OfficeOM.L_ColIndexOutOfRange = "நெடுவரிசையின் இண்டெக்ஸ் மதிப்பு, அனுமதிக்கப்பட்ட வரம்புக்கு வெளியே உள்ளது. நெடுவரிசைகளின் எண்ணிக்கையை விடக் குறைவான மதிப்பை (0 அல்லது அதற்கு மேற்பட்டது) பயன்படுத்தவும்.";
Strings.OfficeOM.L_ConnectionFailureWithDetails = "{0} நிலைக் குறியீடு, பிழைக் குறியீடு {1} மற்றும் பின்வரும் பிழைச் செய்தியுடன் கோரிக்கைத் தோல்வியடைந்தது: {2}";
Strings.OfficeOM.L_ConnectionFailureWithStatus = "{0} நிலைக் குறியீட்டுடன் கோரிக்கைத் தோல்வியடைந்தது.";
Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "செயல்பாட்டின் வரையறையை விவரிக்கும் இந்தப் பெயரில் உள்ள பண்பு Excel.Script.CustomFunctions-இல் இருக்க வேண்டும்.";
Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Excel.Script.CustomFunctions-இல் இந்தப் பெயரில் செயல்பாட்டின் வரையறையை விவரிக்கும் பண்பானது, செயல்பாட்டைச் செயல்படுத்தும் 'அழைப்பு' பண்பைக் கொண்டிருக்க வேண்டும்.";
Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "செயல்பாட்டுப் பெயரில் காலியாக இல்லாத பெயர்கள் மற்றும் காலியாக இல்லாத குறுகிய பெயர் இருக்க வேண்டும்.";
Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "செயல்பாட்டுப் பெயரில் எழுத்துகள், எண்கள், அடிக்கோடுகள் மற்றும் முற்றுப் புள்ளிகள் மட்டுமே இருக்கலாம்.";
Strings.OfficeOM.L_CustomXmlError = "தனிப்பயன் XML பிழை.";
Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "1024 உருப்படிகள் வரை தேர்வை XPath கட்டுப்படுத்துகிறது.";
Strings.OfficeOM.L_CustomXmlExceedQuotaName = "தேர்ந்தெடுப்பு வரம்பை அடைந்தது";
Strings.OfficeOM.L_CustomXmlNodeNotFound = "குறிப்பிடப்பட்ட வேர் கிடைக்கவில்லை.";
Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "தரவு காலாவதியாகிவிட்டது. பொருளை மீண்டும் பெறவும்.";
Strings.OfficeOM.L_CustomXmlOutOfDateName = "தரவு புதியது அல்ல";
Strings.OfficeOM.L_DataNotMatchBindingSize = "வழங்கப்பட்ட தரவு பொருளானது, தற்போதைய தேர்வின் அளவுடன் பொருந்தவில்லை.";
Strings.OfficeOM.L_DataNotMatchBindingType = "குறிப்பிடப்பட்ட தரவு பொருளின் வகையானது, பைண்டிங் வகையுடன் பொருந்தாது.";
Strings.OfficeOM.L_DataNotMatchCoercionType = "குறிப்பிடப்பட்ட தரவு பொருளின் வகையானது, தற்போதைய தேர்வுடன் பொருந்தாது.";
Strings.OfficeOM.L_DataNotMatchSelection = "வழங்கப்பட்ட தரவு பொருளானது, தற்போதைய தேர்வின் வடிவம் அல்லது அளவுகளுடன் பொருந்தாது.";
Strings.OfficeOM.L_DataReadError = "தரவு படித்தல் பிழை";
Strings.OfficeOM.L_DataStale = "தரவு புதியது அல்ல";
Strings.OfficeOM.L_DataWriteError = "தரவு எழுதுதல் பிழை";
Strings.OfficeOM.L_DataWriteReminder = "தரவு எழுதுதல் நினைவூட்டல்";
Strings.OfficeOM.L_DialogAddressNotTrusted = "காண்பிக்கும்போது AppDomains உறுப்புகளில் URL-இன் களம் சேர்க்கப்படவில்லை.";
Strings.OfficeOM.L_DialogAlreadyOpened = "இந்த துணை-நிரல் ஏற்கனவே செயலிலுள்ள உரையாடலை கொண்டுள்ளதால், இயக்கம் தோல்வி.";
Strings.OfficeOM.L_DialogInvalidScheme = "URL திட்டம் ஆதரிக்கப்படவில்லை. பதிலாக HTTPS-ஐப் பயன்படுத்தவும்.";
Strings.OfficeOM.L_DialogNavigateError = "உரையாடல் வழிசெலுத்தல் பிழை";
Strings.OfficeOM.L_DialogOK = "சரி";
Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP நெறிமுறை ஆதரிக்கப்படாது. பதிலாக HTTPS-ஐப் பயன்படுத்தவும்";
Strings.OfficeOM.L_DisplayDialogError = "உரையாடலை காண்பித்தலில் பிழை";
Strings.OfficeOM.L_DocumentReadOnly = "தற்போதைய ஆவண பயன்முறையில், கோரப்பட்ட செயல்பாட்டுக்கு அனுமதியில்லை.";
Strings.OfficeOM.L_ElementMissing = "சில அளவுரு மதிப்புகள் இல்லையென்பதால், இந்த அட்டவணையை எங்களால் வடிவமைக்க முடியாது. அளவுருக்களை மீண்டும் சரிபார்த்து, பிறகு முயற்சிக்கவும்.";
Strings.OfficeOM.L_EventHandlerAdditionFailed = "நிகழ்வு நடத்தியைச் சேர்ப்பதில் தோல்வி.";
Strings.OfficeOM.L_EventHandlerNotExist = "குறிப்பிட்ட நிகழ்வு ஹேண்ட்லர் இந்த பைண்டிங்கிற்கு கிடைக்கவில்லை.";
Strings.OfficeOM.L_EventHandlerRemovalFailed = "நிகழ்வு நடத்தியை அகற்றுவதில் தோல்வி.";
Strings.OfficeOM.L_EventRegistrationError = "நிகழ்வு பதிவு பிழை";
Strings.OfficeOM.L_FileTypeNotSupported = "குறிப்பிடப்பட்ட கோப்பு வகைக்கு ஆதரவில்லை.";
Strings.OfficeOM.L_FormatValueOutOfRange = "இந்த மதிப்பு அனுமதிக்கப்பட்ட வரம்புக்கு வெளியே உள்ளது.";
Strings.OfficeOM.L_FormattingReminder = "வடிவமைப்பு நினைவூட்டல்";
Strings.OfficeOM.L_FunctionCallFailed = "செயல்பாடு {0} அழைப்பது தோல்வி, பிழைக் குறியீடு: {1}.";
Strings.OfficeOM.L_GetDataIsTooLarge = "கோரப்பட்ட தரவு மிகவும் பெரியது.";
Strings.OfficeOM.L_GetDataParametersConflict = "குறிப்பிடப்பட்ட அளவுருக்களில் முரண்பாடு.";
Strings.OfficeOM.L_GetSelectionNotSupported = "தற்போதைய தேர்வு ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_HostError = "சேவையகப் பிழை";
Strings.OfficeOM.L_InValidOptionalArgument = "செல்லாத விருப்ப மதிப்புரு";
Strings.OfficeOM.L_IndexOutOfRange = "பட்டியல் வரம்புக்கு வெளியே உள்ளது.";
Strings.OfficeOM.L_InitializeNotReady = "Office.js இன்னும் முழுமையாக ஏற்றப்படவில்லை. பின்னர் மீண்டும் முயற்சிக்கவும் அல்லது Office.initialize செயல்பாட்டில் தொடக்க குறியீட்டைச் சேர்த்ததை உறுதிசெய்யவும்.";
Strings.OfficeOM.L_InternalError = "உள்ளக பிழை";
Strings.OfficeOM.L_InternalErrorDescription = "உள் பிழை ஏற்பட்டது.";
Strings.OfficeOM.L_InvalidAPICall = "தவறான API அழைப்பு";
Strings.OfficeOM.L_InvalidApiArgumentsMessage = "தவறான உள்ளீட்டு அளவுருக்கள்.";
Strings.OfficeOM.L_InvalidApiCallInContext = "தற்போதைய சூழலில், செல்லாத API அழைப்பு.";
Strings.OfficeOM.L_InvalidArgument = "{0}' மதிப்புரு இந்த சூழ்நிலையில் வேலை செய்யாது, இல்லை அல்லது சரியான வடிவமைப்பில் இல்லை.";
Strings.OfficeOM.L_InvalidArgumentGeneric = "சார்பிற்கு அனுப்பப்பட்ட அளவுரு(கள்), இந்தச் சூழ்நிலைக்கு வேலை செய்யாது, இல்லை அல்லது சரியான வடிவமைப்பில் இல்லை.";
Strings.OfficeOM.L_InvalidBinding = "தவறான பைண்டிங்";
Strings.OfficeOM.L_InvalidBindingError = "தவறான பைண்டிங் பிழை";
Strings.OfficeOM.L_InvalidBindingOperation = "தவறான பைண்டிங் செயல்பாடு";
Strings.OfficeOM.L_InvalidCellsValue = "ஒன்று அல்லது மேற்பட்ட கலங்களின் அளவுருக்களில், அனுமதியற்ற மதிப்புகள் உள்ளன. மதிப்புகளை மீண்டும் சரிபார்த்து, மீண்டும் முயற்சிக்கவும்.";
Strings.OfficeOM.L_InvalidCoercion = "தவறான கோயர்ஷன் வகை";
Strings.OfficeOM.L_InvalidColumnsForBinding = "குறிப்பிட்ட நெடுவரிசைகள் தவறானவை.";
Strings.OfficeOM.L_InvalidDataFormat = "குறிப்பிடப்பட்ட தரவு பொருளின் வடிவமைப்பு செல்லுபடியாகாதது.";
Strings.OfficeOM.L_InvalidDataObject = "தவறான தரவு பொருள்";
Strings.OfficeOM.L_InvalidFormat = "தவறான வடிவமைப்பு பிழை";
Strings.OfficeOM.L_InvalidFormatValue = "ஒன்று அல்லது மேற்பட்ட வடிவமைப்பு அளவுருக்களில், அனுமதியற்ற மதிப்புகள் உள்ளன. மதிப்புகளை மீண்டும் சரிபார்த்து, மீண்டும் முயற்சிக்கவும்.";
Strings.OfficeOM.L_InvalidGetColumns = "குறிப்பிட்ட நெடுவரிசைகள் தவறானவை.";
Strings.OfficeOM.L_InvalidGetRowColumnCounts = "குறிப்பிடப்பட்ட வரிசைஎண்ணிக்கை அல்லது நெடுவரிசைஎண்ணிக்கை மதிப்புகள் தவறானவை.";
Strings.OfficeOM.L_InvalidGetRows = "குறிப்பிட்ட வரிசைகள் தவறானவை.";
Strings.OfficeOM.L_InvalidGetStartRowColumn = "குறிப்பிடப்பட்ட தொடக்கவரிசை அல்லது தொடக்கநெடுவரிசை மதிப்புகள் தவறானவை.";
Strings.OfficeOM.L_InvalidGrant = "முன்கூட்டிய அங்கீகாரம் இல்லை.";
Strings.OfficeOM.L_InvalidGrantMessage = "இந்த துணை நிரலுக்கான அனுமதி இல்லை.";
Strings.OfficeOM.L_InvalidNamedItemForBindingType = "குறிப்பிட்ட பைண்டிங் வகையானது, வழங்கப்பட்ட பெயருள்ள உருப்படியுடன் இணங்காது.";
Strings.OfficeOM.L_InvalidNode = "தவறான கணு";
Strings.OfficeOM.L_InvalidObjectPath = 'நீங்கள் செய்ய முயற்சிப்பவைக்கு \'{0}\'ஆப்ஜெக்ட் பாதை வேலை செய்யவில்லை. பல "context.sync" அழைப்புகள் மற்றும் ".run" தொகுப்பு தொடர்ச்சியான செயல்பாட்டுக்கு வெளியில் ஆப்ஜெக்ட்டை பயன்படுத்தினால், ஆப்ஜெக்ட்டின் வாழ்நாளை நிர்வகிக்க "context.trackedObjects.add()" மற்றும் "context.trackedObjects.remove()" பயன்முறைகளைப் பயன்படுத்தவும்.';
Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel, கலத் திருத்துதல் பயன்முறையில் உள்ளது. ENTER அல்லது TAB என்பதை அழுத்துவதன் மூலம் அல்லது வேறொரு கலத்தைத் தேர்ந்தெடுப்பதன் மூலம் திருத்துதல் பயன்முறையில் இருந்து வெளியேறி, மீண்டும் முயலவும்.";
Strings.OfficeOM.L_InvalidOrTimedOutSession = "தவறான அல்லது காலாவதியான அமர்வு";
Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "உங்கள் Office Online அமர்வு காலாவதியானது அல்லது தவறானது. தொடர, பக்கத்தைப் புதுப்பிக்கவும்.";
Strings.OfficeOM.L_InvalidParameters = "செயல்பாடு {0} இல் செல்லுபடியாகாத அளவுருக்கள் உள்ளன.";
Strings.OfficeOM.L_InvalidReadForBlankRow = "குறிப்பிடப்பட்ட வரிசை வெறுமையாக உள்ளது.";
Strings.OfficeOM.L_InvalidRequestContext = "வெவ்வேறு கோரிக்கை சூழல்களில் ஆப்ஜெக்ட்டை பயன்படுத்த முடியாது.";
Strings.OfficeOM.L_InvalidResourceUrl = "தவறான பயன்பாட்டு வள Url வழங்கப்பட்டது.";
Strings.OfficeOM.L_InvalidResourceUrlMessage = "மேனிஃபெஸ்டில் தவறான பயன்பாட்டு வள Url குறிப்பிடப்பட்டது.";
Strings.OfficeOM.L_InvalidSSOAddinMessage = "இந்தத் துணை நிரலில் அடையாள API ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_InvalidSelectionForBindingType = "தற்போதைய தேர்வு மற்றும் குறிப்பிட்ட பைண்டிங் வகையுடன் பைண்டிங்கை உருவாக்க முடியாது.";
Strings.OfficeOM.L_InvalidSetColumns = "குறிப்பிட்ட நெடுவரிசைகள் தவறானவை.";
Strings.OfficeOM.L_InvalidSetRows = "குறிப்பிட்ட வரிசைகள் தவறானவை.";
Strings.OfficeOM.L_InvalidSetStartRowColumn = "குறிப்பிடப்பட்ட தொடக்கவரிசை அல்லது தொடக்கநெடுவரிசை மதிப்புகள் தவறானவை.";
Strings.OfficeOM.L_InvalidTableOptionValue = "ஒன்று அல்லது மேற்பட்ட tableOptions அளவுருக்களில், அனுமதியற்ற மதிப்புகள் உள்ளன. மதிப்புகளை மீண்டும் சரிபார்த்து, மீண்டும் முயற்சிக்கவும்.";
Strings.OfficeOM.L_InvalidValue = "தவறான மதிப்பு";
Strings.OfficeOM.L_MemoryLimit = "நினைவக வரம்பு மீறப்பட்டது";
Strings.OfficeOM.L_MissingParameter = "அளவுரு இல்லை";
Strings.OfficeOM.L_MissingRequiredArguments = "தேவையான சில மதிப்புருக்கள் இல்லை";
Strings.OfficeOM.L_MultipleNamedItemFound = "இதே பெயரைக் கொண்ட பல பொருள்கள் கண்டறியப்பட்டன.";
Strings.OfficeOM.L_NamedItemNotFound = "பெயரிட்ட உருப்படி இல்லை.";
Strings.OfficeOM.L_NavOutOfBound = "பட்டியல் வரம்பில் இல்லாததால், செயல்பாடு தோல்வியுற்றது.";
Strings.OfficeOM.L_NetworkProblem = "பிணைய சிக்கல்";
Strings.OfficeOM.L_NetworkProblemRetrieveFile = "பிணைய சிக்கல், கோப்பை மீட்டெடுப்பதைத் தடுத்தது.";
Strings.OfficeOM.L_NewWindowCrossZone = "உங்கள் உலாவியில் உள்ள பாதுகாப்பு அமைப்புகளானது உரையாடல் பெட்டியை உருவாக்குவதில் இருந்து எங்களைப் பாதுகாக்கிறது. '{1}' மற்றும் உங்கள் முகவரிப் பட்டியில் காட்டப்படும் டொமைன் ஒரே பாதுகாப்புப் பகுதியில் இருப்பதற்கு மற்றொரு உலாவி அல்லது {0} -ஐ முயற்சிக்கவும்.";
Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "உங்கள் உலாவியை உள்ளமைக்கவும்";
Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "உலாவி கட்டுப்பாடுகளானது உரையாடல் பெட்டியை உருவாக்குவதில் இருந்து எங்களைப் பாதுகாக்கிறது. உரையாடல் பெட்டியின் டொமைனும் துணை நிரல் ஹோஸ்ட்டின் டொமைனும் ஒரே பாதுகாப்புப் பகுதியில் இருக்கக்கூடாது.";
Strings.OfficeOM.L_NoCapability = "இந்தச் செயல்பாட்டுக்கு போதுமான அனுமதிகள் உங்களிடம் இல்லை.";
Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "கோயர்ஷன் வகை அட்டவணையில், அட்டவணையில் பிணைக்கப்பட்ட கலங்கள் இருக்கும்போது, இட அளவுருக்களைப் பயன்படுத்த முடியாது.";
Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "கோயர்ஷன் வகை அட்டவணையில், அட்டவணையில் பிணைக்கப்பட்ட கலங்கள் இருக்கும்போது, இட அளவுருக்களைப் பயன்படுத்த முடியாது.";
Strings.OfficeOM.L_NotImplemented = "செயல்பாடு {0} நடைமுறைப்படுத்தப்படவில்லை.";
Strings.OfficeOM.L_NotSupported = "செயல்பாடு {0} ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_NotSupportedBindingType = "குறிப்பிடப்பட்ட பைண்டிங் {0} ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_NotSupportedEventType = "குறிப்பிடப்பட்ட நிகழ்வு வகை {0}க்கு ஆதரவில்லை.";
Strings.OfficeOM.L_OperationCancelledError = "செயல்பாடு ரத்துசெய்யப்பட்டது";
Strings.OfficeOM.L_OperationCancelledErrorMessage = "பயனரால் செயல்பாடு ரத்துசெய்யப்பட்டது.";
Strings.OfficeOM.L_OperationNotSupported = "செயல்பாட்டுக்கு ஆதரவில்லை.";
Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "தேர்ந்தெடுத்த உள்ளடக்கம் அட்டவணை வடிவமைப்பில் இருக்க வேண்டும். தரவை அட்டவணையாக வடிவமைத்து, மீண்டும் முயற்சிக்கவும்.";
Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "இந்த பைண்டிங் வகையுடன் செயல்பாட்டுக்கு ஆதரவில்லை.";
Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl வகை ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_OutOfRange = "வரம்புக்கு வெளியே உள்ளது";
Strings.OfficeOM.L_OverwriteWorksheetData = "செயல்பாட்டை அமைத்தல் தோல்வியுற்றது, ஏனெனில், வழங்கப்பட்ட தரவு பொருளானது தரவை மேலெழுதும் அல்லது இடமாற்றும்.";
Strings.OfficeOM.L_PermissionDenied = "அனுமதி மறுக்கப்பட்டது";
Strings.OfficeOM.L_PropertyDoesNotExist = "குணம் '{0}' ஆனது பொருளில் இல்லை.";
Strings.OfficeOM.L_PropertyNotLoaded = '{0}\' குணம் கிடைக்கவில்லை. குணத்தின் மதிப்பை வாசிப்பதற்கு முன், கொண்டுள்ள ஆப்ஜெக்ட்டின் ஏற்று முறையை அழைக்கவும் மற்றும் தொடர்புடைய கோரிக்கை சூழலில் "context.sync()" அழைக்கவும்.';
Strings.OfficeOM.L_ReadSettingsError = "படித்தல் அமைப்புகள் பிழை";
Strings.OfficeOM.L_RedundantCallbackSpecification = "Callback ஐ அளவுரு பட்டியல் மற்றும் தேர்வு ஆப்ஜெக்ட் ஆகிய இரண்டிலும் குறிப்பிட முடியாது.";
Strings.OfficeOM.L_RequestTimeout = "இந்த அழைப்பை செயலாக்க நீண்ட நேரமானது.";
Strings.OfficeOM.L_RequestTokenUnavailable = "இந்த API ஆனது, அழைப்பு கால இடைவெளியை மெதுவாக்க, வேகம் குறைக்கப்பட்டது.";
Strings.OfficeOM.L_RowIndexOutOfRange = "வரிசையின் இண்டெக்ஸ் மதிப்பு, அனுமதிக்கப்பட்ட வரம்புக்கு வெளியே உள்ளது. வரிசைகளின் எண்ணிக்கையை விடக் குறைவான மதிப்பை (0 அல்லது அதற்கு மேற்பட்டது) பயன்படுத்தவும்.";
Strings.OfficeOM.L_RunMustReturnPromise = '".run" முறைக்கு அனுப்பப்பட்ட தொகுதிச் செயல்பாடு promise-ஐ அளிக்கவில்லை. செயல்பாடு கண்டிப்பாக promise-ஐ அளிக்க வேண்டும், ஆகவே தான் தானாகத் தடமறியப்படும் பொருட்கள் எதையும் தொகுதிச் செயல்பாடு முடியும் நேரத்தில் வெளியிட முடியும். பொதுவாக, "context.sync()"-இலிருந்து பதிலை அளிப்பதன் மூலம் promise-ஐ அளிக்கிறீர்கள்.';
Strings.OfficeOM.L_SSOClientError = "Office இடமிருந்த அங்கீகாரக் கோரிக்கையில் பிழை ஏற்பட்டது.";
Strings.OfficeOM.L_SSOClientErrorMessage = "கிளையன்டில் எதிர்பாராத பிழை ஏற்பட்டது.";
Strings.OfficeOM.L_SSOConnectionLostError = "உள்நுழைவுச் செயல்பாட்டின் போது, இணைப்பு துண்டிக்கப்பட்டது.";
Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "உள்நுழைவுச் செயல்பாட்டின் போது, இணைப்பு துண்டிக்கப்பட்டது, மேலும் பயனர் உள்நுழையாமல் இருக்கலாம். இதற்குப் பாதுகாப்பான பகுதிகள் போன்ற பயனர் உலாவி உள்ளமைவு அமைப்புகள் காரணமாக இருக்கலாம்.";
Strings.OfficeOM.L_SSOServerError = "அங்கீகார வழங்குநரில் பிழை ஏற்பட்டது.";
Strings.OfficeOM.L_SSOServerErrorMessage = "சேவையகத்தில் எதிர்பாராத பிழை ஏற்பட்டது.";
Strings.OfficeOM.L_SSOUnsupportedPlatform = "API, இந்தத் தளத்தில் ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "இந்தத் துணை-நிரல் பயனர் ஒப்புதலை ஆதரிக்காது.";
Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "இந்தப் பிரிவில் பயனர் ஒப்புதலை இந்தத் துணை நிரல் ஆதரிக்காததால் செயல்பாடு செயலிழந்தது";
Strings.OfficeOM.L_SaveSettingsError = "அமைப்புகளைச் சேமித்தல் பிழை";
Strings.OfficeOM.L_SelectionCannotBound = "தற்போதைய தேர்வுடன் பிணைக்க முடியாது.";
Strings.OfficeOM.L_SelectionNotSupportCoercionType = "தற்போதைய தேர்வு, குறிப்பிடப்பட்ட கோயர்ஷன் வகையுடன் இணங்காது.";
Strings.OfficeOM.L_SetDataIsTooLarge = "குறிப்பிடப்பட்ட தரவு பொருளானது மிகவும் பெரியது.";
Strings.OfficeOM.L_SetDataParametersConflict = "குறிப்பிடப்பட்ட அளவுருக்களில் முரண்பாடு.";
Strings.OfficeOM.L_SettingNameNotExist = "குறிப்பிட்ட அமைப்பு பெயர் இல்லை.";
Strings.OfficeOM.L_SettingsAreStale = "அமைப்புகளை சேமிக்க முடியாது, ஏனெனில் அவை சமீபத்தியவை அல்ல.";
Strings.OfficeOM.L_SettingsCannotSave = "அமைப்புகளை சேமிக்க முடியாது.";
Strings.OfficeOM.L_SettingsStaleError = "அமைப்புகள் தேக்கப் பிழை";
Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} புதிய சாளரத்தைக் காட்ட விரும்புகிறார்.";
Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "அனுமதிக்கவா";
Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "தவிர்";
Strings.OfficeOM.L_ShuttingDown = "செயல்பாடு தோல்வியுற்றது, ஏனெனில் தரவு சேவையகத்தில், சமீபத்தியதாக இல்லை.";
Strings.OfficeOM.L_SliceSizeNotSupported = "குறிப்பிட்ட ஸ்லைஸ் அளவுக்கு ஆதரவில்லை.";
Strings.OfficeOM.L_SpecifiedIdNotExist = "குறிப்பிடப்பட்ட ஐடி இப்போது இல்லை.";
Strings.OfficeOM.L_Timeout = "இயக்கம் நேரம் முடிந்தது.";
Strings.OfficeOM.L_TooManyArguments = "மிக அதிகமான அளவுருக்கள்";
Strings.OfficeOM.L_TooManyIncompleteRequests = "முந்தைய அழைப்பு முடிவடையும் வரை காத்திருக்கவும்.";
Strings.OfficeOM.L_TooManyOptionalFunction = "அளவுருக்கள் பட்டியலில் பல விருப்ப செயல்பாடுகள் உள்ளன";
Strings.OfficeOM.L_TooManyOptionalObjects = "அளவுருக்கள் பட்டியலில் பல விருப்ப பொருட்கள் உள்ளன";
Strings.OfficeOM.L_UnknownBindingType = "பைண்டிங் வகை ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_UnsupportedDataObject = "வழங்கப்பட்ட தரவு பொருள் வகைக்கு ஆதரவில்லை.";
Strings.OfficeOM.L_UnsupportedEnumeration = "ஆதரிக்கப்படாத எனூமரேஷன்";
Strings.OfficeOM.L_UnsupportedEnumerationMessage = "தற்போதைய சேவையகப் பயன்பாட்டில், எனுமரேஷன் ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_UnsupportedUserIdentity = "பயனர் அடையாள வகை ஆதரிக்கப்படவில்லை.";
Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "பயனரின் அடையாள வகை ஆதரிக்கப்படவிலை.";
Strings.OfficeOM.L_UserAborted = "ஒப்புதல் கோரிக்கையை பயனர் கைவிட்டுள்ளார்.";
Strings.OfficeOM.L_UserAbortedMessage = "பயனர் துணை நிரல் அனுமதிகளுக்கு ஒப்புதல் அளிக்கவில்லை.";
Strings.OfficeOM.L_UserClickIgnore = "உரையாடல் பெட்டியைப் புறக்கணிக்குமாறு பயனர் தேர்வுசெய்துள்ளார்.";
Strings.OfficeOM.L_UserNotSignedIn = "Office இல் பயனர் யாரும் உள்நுழையவில்லை.";
Strings.OfficeOM.L_ValueNotLoaded = 'முடிவு பொருளின் மதிப்பு இன்னமும் ஏற்றப்படவில்லை. மதிப்பு பண்பை வாசிக்கும் முன்னர், தொடர்புடைய கோரிக்கை சூழலில் "context.sync()"-ஐ அழைக்கவும்.';
|
/* Skill Bar */
function setBarWidth(dataElement, barElement, cssProperty, barPercent) {
var listData = [];
$(dataElement).each(function() {
listData.push($(this).html());
});
var listMax = Math.max.apply(Math, listData);
$(barElement).each(function(index) {
$(this).css(cssProperty, (listData[index] / listMax) * barPercent + "%");
});
}
setBarWidth(".style-1 span", ".style-1 em", "width", 142);
/*Zoom prevent*/
$(document).keydown(function(event) {
if (event.ctrlKey==true && (event.which == '61' || event.which == '107' || event.which == '173' || event.which == '109' || event.which == '187' || event.which == '189' ) ) {
event.preventDefault();
}
});
$(window).bind('mousewheel DOMMouseScroll', function (event) {
if (event.ctrlKey == true) {
event.preventDefault();
}
});
|
/**
* This is an example of a basic node.js script that performs
* the Authorization Code oAuth2 flow to authenticate against
* the Spotify Accounts.
*
* For more information, read
* https://developer.spotify.com/web-api/authorization-guide/#authorization_code_flow
*/
var express = require('express'); // Express web server framework
var request = require('request'); // "Request" library
var cors = require('cors');
var querystring = require('querystring');
var cookieParser = require('cookie-parser');
var client_id = 'CLIENT_ID'; // Your client id
var client_secret = 'CLIENT_SECRET'; // Your secret
var redirect_uri = 'http://localhost:8888/callback/'; // Your redirect uri
var stateKey = 'spotify_auth_state';
function login(req, res) {
/**
* Generates a random string containing numbers and letters
* @param {number} length The length of the string
* @return {string} The generated string
*/
var generateRandomString = function(length) {
var text = '';
var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for (var i = 0; i < length; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
};
var state = generateRandomString(16);
res.cookie(stateKey, state);
// your application requests authorization
var scope = 'user-read-private user-read-email';
res.redirect('https://accounts.spotify.com/authorize?' +
querystring.stringify({
response_type: 'code',
client_id: client_id,
scope: scope,
redirect_uri: redirect_uri,
state: state
}));
}
function callback(req, res) {
// your application requests refresh and access tokens
// after checking the state parameter
var code = req.query.code || null;
var state = req.query.state || null;
var storedState = req.cookies ? req.cookies[stateKey] : null;
if (state === null || state !== storedState) {
res.redirect('/#' +
querystring.stringify({
error: 'state_mismatch'
}));
} else {
res.clearCookie(stateKey);
var authOptions = {
url: 'https://accounts.spotify.com/api/token',
form: {
code: code,
redirect_uri: redirect_uri,
grant_type: 'authorization_code'
},
headers: {
'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64'))
},
json: true
};
request.post(authOptions, function(error, response, body) {
if (!error && response.statusCode === 200) {
var access_token = body.access_token,
refresh_token = body.refresh_token;
var options = {
url: 'https://api.spotify.com/v1/me',
headers: { 'Authorization': 'Bearer ' + access_token },
json: true
};
// use the access token to access the Spotify Web API
request.get(options, function(error, response, body) {
console.log(body);
});
// we can also pass the token to the browser to make requests from there
res.redirect('/#' +
querystring.stringify({
access_token: access_token,
refresh_token: refresh_token
}));
} else {
res.redirect('/#' +
querystring.stringify({
error: 'invalid_token'
}));
}
});
}
}
function refreshToken(req, res) {
// requesting access token from refresh token
var refresh_token = req.query.refresh_token;
var authOptions = {
url: 'https://accounts.spotify.com/api/token',
headers: { 'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64')) },
form: {
grant_type: 'refresh_token',
refresh_token: refresh_token
},
json: true
};
request.post(authOptions, function(error, response, body) {
if (!error && response.statusCode === 200) {
var access_token = body.access_token;
res.send({
'access_token': access_token
});
}
});
}
var app = express();
app.use(express.static(__dirname + '/public'))
.use(cors())
.use(cookieParser());
app.get('/login', login);
app.get('/callback', callback);
app.get('/refresh_token', refreshToken);
console.log('Listening on 8888');
app.listen(8888);
|
import fs from 'fs'
import path from 'path'
let gspCalls = 0
export async function getStaticProps() {
const data = await fs.promises.readFile(
path.join(process.cwd(), 'data.txt'),
'utf8'
)
gspCalls += 1
if (data.trim() === 'hide') {
return {
notFound: true,
revalidate: 1,
}
}
return {
props: {
hello: 'world',
data,
gspCalls,
},
revalidate: 100,
}
}
export default function Page(props) {
return (
<>
<p id="gsp">getStaticProps page</p>
<p id="props">{JSON.stringify(props)}</p>
</>
)
}
|
var m3uData;
var channels = [];
var currentChannelIndex = 0;
$(document).ready(function() {
getChannels();
});
function getChannels() {
showProgress("Memuat channel");
channels = [];
$("#channels").find("*").remove();
$.ajax({
type: 'GET',
url: 'http://iptvjoss.com/jossstreambe/channels.m3u',
dataType: 'text',
cache: false,
success: function(a) {
try {
m3uData = a;
var length = occurrences(m3uData, "#EXTINF");
var a = 0;
for (var i = 0; i < length; i++) {
a = m3uData.indexOf("#EXTINF", a) + 7;
var b = m3uData.indexOf("tvg-id", a) + 8;
var c = m3uData.indexOf("\"", b);
var id = m3uData.substr(b, c-b);
b = m3uData.indexOf("tvg-name", a) + 10;
c = m3uData.indexOf("\"", b);
var name = m3uData.substr(b, c-b);
b = m3uData.indexOf("tvg-logo", a) + 10;
c = m3uData.indexOf("\"", b);
var logo = m3uData.substr(b, c-b);
b = m3uData.indexOf("group-title", a) + 13;
c = m3uData.indexOf("\"", b);
var category = m3uData.substr(b, c-b);
a = m3uData.indexOf("group-title", a);
b = m3uData.indexOf("http", a);
c = m3uData.indexOf("\n", b);
var channelURL = m3uData.substr(b, c - b);
$("#channels").append(""+
"<tr>"+
"<td><div style='background-color: #2f2e4d; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; color: white;'>"+i+"</div></td>"+
"<td class='channel-name'>"+name+"</td>"+
"<td class='category'>"+category+"</td>"+
"<td class='url'>"+channelURL+"</td>"+
"<td><a class='edit-channel link'>Ubah</a></td>"+
"<td><a class='delete-channel link'>Hapus</a></td>"+
"</tr>"
);
channels.push({'id': id, 'name': name, 'logo': logo, 'category': category, 'url': channelURL});
}
setChannelClickListener();
hideProgress();
} catch (e) {
console.log(e.toString());
}
}
});
}
function setChannelClickListener() {
$(".edit-channel").unbind().on("click", function() {
var tr = $(this).parent().parent();
var index = tr.parent().children().index(tr);
currentChannelIndex = index;
var channel = channels[index];
$("#edit-channel-name").val(channel["name"]);
$("#edit-channel-category").val(channel["category"]);
$("#edit-channel-url").val(channel["url"]);
$("#edit-channel-logo").attr("src", channel["logo"]);
$("#edit-channel-title").html("Ubah Channel");
$("#change-logo").unbind().on("click", function() {
if (isMobile()) {
Native.selectImage(1);
} else {
$("#select-logo").on("change", function () {
var file = $("#select-logo").prop("files")[0];
var fr = new FileReader();
fr.onload = function () {
$("#edit-channel-logo").attr("src", fr.result);
showProgress("Mengunggah logo");
var fd = new FormData();
var fileName = generateRandomID(14);
fd.append("file", file);
fd.append("file_name", fileName);
$.ajax({
type: 'POST',
url: PHP_PATH + 'upload-image.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function (a) {
console.log("File name: " + fileName);
var fileURL = "http://iptvjoss.com/jossstreambe/userdata/imgs/" + fileName;
channels[index]["logo"] = fileURL;
$("#channels").find("img:eq(" + index + ")").attr("src", fileURL);
m3uData = "#EXTM3U\n";
for (var i = 0; i < channels.length; i++) {
var channel = channels[i];
m3uData += ("#EXTINF:-1 tvg-id=\"" + channel["id"] + "\" tvg-name=\"" + channel["name"] + "\" tvg-logo=\"" + channel["logo"] + "\" group-title=\"" + channel["category"] + "\"," + channel["name"] + "\n" + channel["url"] + "\n");
}
var fd = new FormData();
fd.append("channel_data", m3uData);
$.ajax({
type: 'POST',
url: PHP_PATH + 'save-channels.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function (a) {
hideProgress();
show("Logo channel berhasil dirubah");
}
});
}
});
};
fr.readAsDataURL(file);
}).click();
}
});
$("#edit-channel-ok").unbind().on("click", function() {
var name = $("#edit-channel-name").val();
var category = $("#edit-channel-category").val();
var url = $("#edit-channel-url").val();
if (name == "") {
show("Mohon masukkan nama channel");
return;
}
if (category == "") {
show("Mohon masukkan kategori channel");
return;
}
if (url == "") {
show("Mohon masukkan URL channel");
return;
}
channels[index]["name"] = name;
channels[index]["category"] = category;
channels[index]["url"] = url;
$("#channels").find(".channel-name:eq("+index+")").html(name);
$("#channels").find(".category:eq("+index+")").html(category);
$("#channels").find(".url:eq("+index+")").html(url);
showProgress("Menyimpan channel");
m3uData = "#EXTM3U\n";
for (var i=0; i<channels.length; i++) {
var channel = channels[i];
m3uData += ("#EXTINF:-1 tvg-id=\""+channel["id"]+"\" tvg-name=\""+channel["name"]+"\" tvg-logo=\""+channel["logo"]+"\" group-title=\""+channel["category"]+"\","+channel["name"]+"\n"+channel["url"]+"\n");
}
var fd = new FormData();
fd.append("channel_data", m3uData);
$.ajax({
type: 'POST',
url: PHP_PATH+'save-channels.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function(a) {
$("#edit-channel-container").fadeOut(300);
hideProgress();
show("Channel disimpan");
}
});
});
$("#edit-channel-cancel").unbind().on("click", function() {
$("#edit-channel-container").fadeOut(300);
});
$("#edit-channel-container").css("display", "flex").hide().fadeIn(300);
});
$(".delete-channel").unbind().on("click", function() {
var tr = $(this).parent().parent();
var index = tr.parent().children().index(tr);
var channel = channels[index];
$("#confirm-title").html("Hapus Channel");
$("#confirm-msg").html("Apakah Anda yakin ingin menghapus channel ini?");
$("#confirm-ok").unbind().on("click", function() {
showProgress("Menghapus channel");
channels.splice(index, 1);
$("#channels").find("tr:eq("+index+")").remove();
m3uData = "#EXTM3U\n";
for (var i=0; i<channels.length; i++) {
var channel = channels[i];
m3uData += ("#EXTINF:-1 tvg-id=\""+channel["id"]+"\" tvg-name=\""+channel["name"]+"\" tvg-logo=\""+channel["logo"]+"\" group-title=\""+channel["category"]+"\","+channel["name"]+"\n"+channel["url"]+"\n");
}
var fd = new FormData();
fd.append("channel_data", m3uData);
$.ajax({
type: 'POST',
url: PHP_PATH+'save-channels.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function(a) {
$("#confirm-container").hide();
hideProgress();
show("Channel dihapus");
}
});
});
$("#confirm-cancel").unbind().on("click", function() {
$("#confirm-container").fadeOut(300);
});
$("#confirm-container").css("display", "flex").hide().fadeIn(300);
});
}
function occurrences(string, subString, allowOverlapping) {
string += "";
subString += "";
if (subString.length <= 0) return (string.length + 1);
var n = 0,
pos = 0,
step = allowOverlapping ? 1 : subString.length;
while (true) {
pos = string.indexOf(subString, pos);
if (pos >= 0) {
++n;
pos += step;
} else break;
}
return n;
}
function isCategoryAlreadyAdded(name) {
// Check if categori exists
for (var i = 0; i < categories.length; i++) {
var category = categories[i];
if (category == name) {
return true;
}
}
return false;
}
function addChannel() {
var logoURL = "";
$("#edit-channel-name").val("");
$("#edit-channel-category").val("");
$("#edit-channel-url").val("");
$("#edit-channel-logo").attr("src", "");
$("#edit-channel-title").html("Tambah Channel");
$("#change-logo").unbind().on("click", function() {
$("#select-logo").on("change", function() {
var file = $("#select-logo").prop("files")[0];
var fr = new FileReader();
fr.onload = function() {
$("#edit-channel-logo").attr("src", fr.result);
showProgress("Mengunggah logo");
var fd = new FormData();
var fileName = generateRandomID(14);
fd.append("file", file);
fd.append("file_name", fileName);
$.ajax({
type: 'POST',
url: PHP_PATH+'upload-image.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function(a) {
console.log("File name: "+fileName);
var fileURL = "http://iptvjoss.com/jossstreambe/userdata/imgs/"+fileName;
logoURL = fileURL;
hideProgress();
}
});
};
fr.readAsDataURL(file);
}).click();
});
$("#edit-channel-ok").unbind().on("click", function() {
var name = $("#edit-channel-name").val().trim();
var category = $("#edit-channel-category").val().trim();
var url = $("#edit-channel-url").val().trim();
var logo = logoURL;
if (name == "") {
show("Mohon masukkan nama channel");
return;
}
if (category == "") {
show("Mohon masukkan kategori channel");
return;
}
if (url == "") {
show("Mohon masukkan URL channel");
return;
}
var id = name.split(" ").join('.');
console.log("URL Channel: "+url);
var newChannel = {'id': id, 'name': name, 'logo': logoURL, 'category': category, 'url': url};
channels.push(newChannel);
console.log("URL Channel (2): "+newChannel["url"]);
console.log("URL Channel (3): "+channels[channels.length-1]["url"]);
$("#channels").append(""+
"<tr>"+
"<td><div style='background-color: #2f2e4d; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; color: white;'>"+channels.length+"</div></td>"+
"<td>"+id+"</td>"+
"<td class='channel-name'>"+name+"</td>"+
"<td><img src='"+logo+"' width='40px' height='40px'></td>"+
"<td class='category'>"+category+"</td>"+
"<td class='url'>"+url+"</td>"+
"<td><a class='edit-channel link'>Ubah</a></td>"+
"<td><a class='delete-channel link'>Hapus</a></td>"+
"</tr>"
);
setChannelClickListener();
m3uData = "#EXTM3U\n";
for (var i=0; i<channels.length; i++) {
var channel = channels[i];
m3uData += ("#EXTINF:-1 tvg-id=\""+channel["id"]+"\" tvg-name=\""+channel["name"]+"\" tvg-logo=\""+channel["logo"]+"\" group-title=\""+channel["category"]+"\","+channel["name"]+"\n"+channel["url"]+"\n");
}
var fd = new FormData();
fd.append("channel_data", m3uData);
showProgress("Menambah channel");
$.ajax({
type: 'POST',
url: PHP_PATH+'save-channels.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function(a) {
$("#edit-channel-container").fadeOut(300);
hideProgress();
show("Channel baru ditambahkan");
}
});
});
$("#edit-channel-cancel").unbind().on("click", function() {
$("#edit-channel-container").css("display", "flex").fadeOut(300);
});
$("#edit-channel-container").css("display", "flex").hide().fadeIn(300);
}
function generateRandomID(length) {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < length; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
function imageSelected(code, url) {
if (code == 1) {
channels[currentChannelIndex]["logo"] = url;
$("#channels").find("img:eq(" + currentChannelIndex + ")").attr("src", url);
m3uData = "#EXTM3U\n";
for (var i = 0; i < channels.length; i++) {
var channel = channels[i];
m3uData += ("#EXTINF:-1 tvg-id=\"" + channel["id"] + "\" tvg-name=\"" + channel["name"] + "\" tvg-logo=\"" + channel["logo"] + "\" group-title=\"" + channel["category"] + "\"," + channel["name"] + "\n" + channel["url"] + "\n");
}
var fd = new FormData();
fd.append("channel_data", m3uData);
$.ajax({
type: 'POST',
url: PHP_PATH + 'save-channels.php',
data: fd,
processData: false,
contentType: false,
cache: false,
success: function (a) {
hideProgress();
show("Logo channel berhasil dirubah");
}
});
}
}
function isMobile() {
var isAndroid = /(android)/i.test(navigator.userAgent);
return isAndroid;
}
|
var toGlobalize = {
App: require('../app/index.js'),
Tree: require('../visuals/tree'),
Visuals: require('../visuals'),
Git: require('../git'),
CommandModel: require('../models/commandModel'),
CommandLineStore: require('../stores/CommandLineStore'),
CommandLineActions: require('../actions/CommandLineActions'),
LevelActions: require('../actions/LevelActions'),
LevelStore: require('../stores/LevelStore'),
LocaleActions: require('../actions/LocaleActions'),
LocaleStore: require('../stores/LocaleStore'),
Levels: require('../graph/treeCompare'),
Constants: require('../util/constants'),
Commands: require('../commands'),
Collections: require('../models/collections'),
Async: require('../visuals/animation'),
AnimationFactory: require('../visuals/animation/animationFactory'),
Main: require('../app'),
HeadLess: require('../git/headless'),
Q: { Q: require('q') },
RebaseView: require('../views/rebaseView'),
Views: require('../views'),
MultiView: require('../views/multiView'),
ZoomLevel: require('../util/zoomLevel'),
VisBranch: require('../visuals/visBranch'),
TreeCompare: require('../graph/treeCompare'),
Level: require('../level'),
Sandbox: require('../sandbox/'),
GitDemonstrationView: require('../views/gitDemonstrationView'),
Markdown: require('markdown'),
LevelDropdownView: require('../views/levelDropdownView'),
BuilderViews: require('../views/builderViews'),
Util: require('../util/index'),
Intl: require('../intl')
};
Object.keys(toGlobalize).forEach(function(moduleName) {
var module = toGlobalize[moduleName];
for (var key in module) {
var value = module[key];
if (value instanceof Function) {
value = value.bind(module);
}
window['debug_' + moduleName + '_' + key] = value;
}
});
$(document).ready(function() {
window.debug_events = toGlobalize.Main.getEvents();
window.debug_eventBaton = toGlobalize.Main.getEventBaton();
window.debug_sandbox = toGlobalize.Main.getSandbox();
window.debug_modules = toGlobalize;
window.debug_levelDropdown = toGlobalize.Main.getLevelDropdown();
window.debug_copyTree = function() {
return toGlobalize.Main.getSandbox().mainVis.gitEngine.printAndCopyTree();
};
});
|
(function() {
//Selecting our node
var myNode = document.querySelector('#artlist .pixgrid ul');
myNode.addEventListener("click", function(e) {
if(e.target.tagName === 'IMG') {
console.log(e);
} // target is an image
}, false); //image is clicked
})(); //self executing function
|
(() => {
"use strict";
const isArray = require('./isArray/isArray');
const isBissexto = require('./isBissexto/isBissexto');
const isBoolean = require('./isBoolean/isBoolean');
const isCep = require('./isCep/isCep');
const isCnpj = require('./isCnpj/isCnpj');
const isDate = require('./isDate/isDate');
const isEmail = require('./isEmail/isEmail');
const isEmpty = require('./isEmpty/isEmpty');
const isEnum = require('./isEnum/isEnum');
const isInArray = require('./isInArray/isInArray');
const isInObject = require('./isInObject/isInObject');
const isInProfileFields = require('./isInProfileFields/isInProfileFields');
const isISBN13 = require('./isISBN-13/isISBN-13');
const isName = require('./isName/isName');
const isObject = require('./isObject/isObject');
const isString = require('./isString/isString');
const toCapitalize = require('./toCapitalize/toCapitalize');
const toLowerCase = require('./toLowerCase/toLowerCase');
const toUpperCase = require('./toUpperCase/toUpperCase');
module.exports = {
isArray
, isBissexto
, isBoolean
, isCep
, isCnpj
, isDate
, isEmail
, isEmpty
, isEnum
, isInArray
, isInObject
, isInProfileFields
, isISBN13
, isName
, isObject
, isString
, toCapitalize
, toLowerCase
, toUpperCase
}
})();
|
import Store from './store'
import Queue from './queue'
import Elements from './elements'
const Scrollbar = {
/**
* Hide scrollbar to prevent animation bugs with it
* @param {HTMLElement} modal
* @param {HTMLElement} modalContent
* @returns {object}
*/
hide(modal, modalContent) {
modal.style.display = 'block'
modalContent.style.display = 'block' // need to be block for getComputedStyle
const modalContentStyle = window.getComputedStyle(modalContent)
const modalContentMarginRight = parseFloat(modalContentStyle.getPropertyValue('margin-right'))
const modalContentMarginLeft = parseFloat(modalContentStyle.getPropertyValue('margin-left'))
// const modalContentHeight = parseInt(modalContentStyle.getPropertyValue('height'), 10)
const modalContentMarginTop = parseInt(modalContentStyle.getPropertyValue('margin-top'), 10)
const modalContentMarginBottom = parseInt(modalContentStyle.getPropertyValue('margin-bottom'), 10)
const modalStyle = window.getComputedStyle(modal)
const modalPaddingLeft = parseFloat(modalStyle.getPropertyValue('padding-left'))
const modalPaddingRight = parseFloat(modalStyle.getPropertyValue('padding-right'))
const scrollbarGap =
document.documentElement.clientWidth -
(modalContentMarginRight +
modalContentMarginLeft +
modalContent.offsetWidth +
modalPaddingLeft +
modalPaddingRight)
// if there is a scrollbar we add a padding to prevent flickering when hiding scrollbar
if (scrollbarGap > 0) {
modal.style.paddingRight = `${modalPaddingRight + scrollbarGap}px`
}
const contentHeight = modalContent.offsetHeight + modalContentMarginTop + modalContentMarginBottom
// disable scrollbar to fix scrollbar bug on some animations
if (contentHeight < document.getElementsByTagName('html')[0].clientHeight) {
// modal.style.marginTop = '-' + modal.scrollTop + 'px'
modal.style.overflow = 'visible'
} else {
modal.style.overflow = 'hidden'
}
// scroll to previous scroll position
Store.paddingRight = modalPaddingRight
},
/**
* Show scrollbar and restore previous state
* @param {HTMLElement} modal
*/
show(modal) {
modal.style.paddingRight = Store.paddingRight + 'px'
// modal.style.marginTop = '0px'
modal.style.overflow = 'auto'
modal.style.height = 'auto'
},
// Hide scrollbar of previous modal
hidePrevious() {
if (Queue.openModals.length === 0) {
return
}
const { modal } = Queue.openModal
this.hide(modal, Elements.getModalContent(modal))
},
// Show scrollbar of next modal
showNext() {
if (Queue.openModals.length === 0) {
return
}
const { modal, paddingRight } = Queue.openModal
Store.paddingRight = paddingRight
this.show(modal)
}
}
export default Scrollbar
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* Compute the coversed cosine.
*
* @module @stdlib/math/base/special/covercos
*
* @example
* var covercos = require( '@stdlib/math/base/special/covercos' );
*
* var v = covercos( 0.0 );
* // returns 1.0
*
* v = covercos( 3.141592653589793/2.0 );
* // returns 2.0
*
* v = covercos( -3.141592653589793/6.0 );
* // returns 0.5
*
* v = covercos( NaN );
* // returns NaN
*/
// MODULES //
var covercos = require( './covercos.js' );
// EXPORTS //
module.exports = covercos;
|
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var _this = this;
var root_1 = require('../../util/root');
var tryCatch_1 = require('../../util/tryCatch');
var errorObject_1 = require('../../util/errorObject');
var Observable_1 = require('../../Observable');
var Subscriber_1 = require('../../Subscriber');
var createXHRDefault = function () {
var xhr = new root_1.root.XMLHttpRequest();
if (_this.crossDomain) {
if ('withCredentials' in xhr) {
xhr.withCredentials = true;
return xhr;
}
else if (!!root_1.root.XDomainRequest) {
return new root_1.root.XDomainRequest();
}
else {
throw new Error('CORS is not supported by your browser');
}
}
else {
return xhr;
}
};
function defaultGetResultSelector(response) {
return response.response;
}
function ajaxGet(url, resultSelector, headers) {
if (resultSelector === void 0) { resultSelector = defaultGetResultSelector; }
if (headers === void 0) { headers = null; }
return new AjaxObservable({ method: 'GET', url: url, resultSelector: resultSelector, headers: headers });
}
exports.ajaxGet = ajaxGet;
;
function ajaxPost(url, body, headers) {
return new AjaxObservable({ method: 'POST', url: url, body: body, headers: headers });
}
exports.ajaxPost = ajaxPost;
;
function ajaxDelete(url, headers) {
return new AjaxObservable({ method: 'DELETE', url: url, headers: headers });
}
exports.ajaxDelete = ajaxDelete;
;
function ajaxPut(url, body, headers) {
return new AjaxObservable({ method: 'PUT', url: url, body: body, headers: headers });
}
exports.ajaxPut = ajaxPut;
;
function ajaxGetJSON(url, resultSelector, headers) {
var finalResultSelector = resultSelector ? function (res) { return resultSelector(res.response); } : function (res) { return res.response; };
return new AjaxObservable({ method: 'GET', url: url, responseType: 'json', resultSelector: finalResultSelector, headers: headers });
}
exports.ajaxGetJSON = ajaxGetJSON;
;
/**
* Creates an observable for an Ajax request with either a request object with url, headers, etc or a string for a URL.
*
* @example
* source = Rx.Observable.ajax('/products');
* source = Rx.Observable.ajax( url: 'products', method: 'GET' });
*
* @param {Object} request Can be one of the following:
*
* A string of the URL to make the Ajax call.
* An object with the following properties
* - url: URL of the request
* - body: The body of the request
* - method: Method of the request, such as GET, POST, PUT, PATCH, DELETE
* - async: Whether the request is async
* - headers: Optional headers
* - crossDomain: true if a cross domain request, else false
* - createXHR: a function to override if you need to use an alternate XMLHttpRequest implementation.
* - resultSelector: a function to use to alter the output value type of the Observable. Gets {AjaxResponse} as an argument
* @returns {Observable} An observable sequence containing the XMLHttpRequest.
*/
var AjaxObservable = (function (_super) {
__extends(AjaxObservable, _super);
function AjaxObservable(urlOrRequest) {
_super.call(this);
var request = {
async: true,
createXHR: createXHRDefault,
crossDomain: false,
headers: {},
method: 'GET',
responseType: 'json',
timeout: 0
};
if (typeof urlOrRequest === 'string') {
request.url = urlOrRequest;
}
else {
for (var prop in urlOrRequest) {
if (urlOrRequest.hasOwnProperty(prop)) {
request[prop] = urlOrRequest[prop];
}
}
}
this.request = request;
}
AjaxObservable.prototype._subscribe = function (subscriber) {
return new AjaxSubscriber(subscriber, this.request);
};
AjaxObservable.create = (function () {
var create = function (urlOrRequest) {
return new AjaxObservable(urlOrRequest);
};
create.get = ajaxGet;
create.post = ajaxPost;
create.delete = ajaxDelete;
create.put = ajaxPut;
create.getJSON = ajaxGetJSON;
return create;
})();
return AjaxObservable;
}(Observable_1.Observable));
exports.AjaxObservable = AjaxObservable;
var AjaxSubscriber = (function (_super) {
__extends(AjaxSubscriber, _super);
function AjaxSubscriber(destination, request) {
_super.call(this, destination);
this.request = request;
this.done = false;
var headers = request.headers = request.headers || {};
// force CORS if requested
if (!request.crossDomain && !headers['X-Requested-With']) {
headers['X-Requested-With'] = 'XMLHttpRequest';
}
// ensure content type is set
if (!('Content-Type' in headers)) {
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
}
// properly serialize body
request.body = this.serializeBody(request.body, request.headers['Content-Type']);
this.resultSelector = request.resultSelector;
this.send();
}
AjaxSubscriber.prototype.next = function (e) {
this.done = true;
var _a = this, resultSelector = _a.resultSelector, xhr = _a.xhr, request = _a.request, destination = _a.destination;
var response = new AjaxResponse(e, xhr, request);
if (resultSelector) {
var result = tryCatch_1.tryCatch(resultSelector)(response);
if (result === errorObject_1.errorObject) {
this.error(errorObject_1.errorObject.e);
}
else {
destination.next(result);
}
}
else {
destination.next(response);
}
};
AjaxSubscriber.prototype.send = function () {
var _a = this, request = _a.request, _b = _a.request, user = _b.user, method = _b.method, url = _b.url, async = _b.async, password = _b.password, headers = _b.headers, body = _b.body;
var createXHR = request.createXHR;
var xhr = tryCatch_1.tryCatch(createXHR).call(request);
if (xhr === errorObject_1.errorObject) {
this.error(errorObject_1.errorObject.e);
}
else {
this.xhr = xhr;
// open XHR first
var result = void 0;
if (user) {
result = tryCatch_1.tryCatch(xhr.open).call(xhr, method, url, async, user, password);
}
else {
result = tryCatch_1.tryCatch(xhr.open).call(xhr, method, url, async);
}
if (result === errorObject_1.errorObject) {
this.error(errorObject_1.errorObject.e);
return;
}
// timeout and responseType can be set once the XHR is open
xhr.timeout = request.timeout;
xhr.responseType = request.responseType;
// set headers
this.setHeaders(xhr, headers);
// now set up the events
this.setupEvents(xhr, request);
// finally send the request
if (body) {
xhr.send(body);
}
else {
xhr.send();
}
}
};
AjaxSubscriber.prototype.serializeBody = function (body, contentType) {
if (!body || typeof body === 'string') {
return body;
}
var splitIndex = contentType.indexOf(';');
if (splitIndex !== -1) {
contentType = contentType.substring(0, splitIndex);
}
switch (contentType) {
case 'application/x-www-form-urlencoded':
return Object.keys(body).map(function (key) { return (key + "=" + encodeURI(body[key])); }).join('&');
case 'application/json':
return JSON.stringify(body);
}
};
AjaxSubscriber.prototype.setHeaders = function (xhr, headers) {
for (var key in headers) {
if (headers.hasOwnProperty(key)) {
xhr.setRequestHeader(key, headers[key]);
}
}
};
AjaxSubscriber.prototype.setupEvents = function (xhr, request) {
var progressSubscriber = request.progressSubscriber;
xhr.ontimeout = function xhrTimeout(e) {
var _a = xhrTimeout, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;
if (progressSubscriber) {
progressSubscriber.error(e);
}
subscriber.error(new AjaxTimeoutError(this, request)); //TODO: Make betterer.
};
xhr.ontimeout.request = request;
xhr.ontimeout.subscriber = this;
xhr.ontimeout.progressSubscriber = progressSubscriber;
if (xhr.upload && 'withCredentials' in xhr && root_1.root.XDomainRequest) {
if (progressSubscriber) {
xhr.onprogress = function xhrProgress(e) {
var progressSubscriber = xhrProgress.progressSubscriber;
progressSubscriber.next(e);
};
xhr.onprogress.progressSubscriber = progressSubscriber;
}
xhr.onerror = function xhrError(e) {
var _a = xhrError, progressSubscriber = _a.progressSubscriber, subscriber = _a.subscriber, request = _a.request;
if (progressSubscriber) {
progressSubscriber.error(e);
}
subscriber.error(new AjaxError('ajax error', this, request));
};
xhr.onerror.request = request;
xhr.onerror.subscriber = this;
xhr.onerror.progressSubscriber = progressSubscriber;
}
xhr.onreadystatechange = function xhrReadyStateChange(e) {
var _a = xhrReadyStateChange, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;
if (this.readyState === 4) {
// normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
var status_1 = this.status === 1223 ? 204 : this.status;
var response = (this.responseType === 'text' ? (this.response || this.responseText) : this.response);
// fix status code when it is 0 (0 status is undocumented).
// Occurs when accessing file resources or on Android 4.1 stock browser
// while retrieving files from application cache.
if (status_1 === 0) {
status_1 = response ? 200 : 0;
}
if (200 <= status_1 && status_1 < 300) {
if (progressSubscriber) {
progressSubscriber.complete();
}
subscriber.next(e);
subscriber.complete();
}
else {
if (progressSubscriber) {
progressSubscriber.error(e);
}
subscriber.error(new AjaxError('ajax error ' + status_1, this, request));
}
}
};
xhr.onreadystatechange.subscriber = this;
xhr.onreadystatechange.progressSubscriber = progressSubscriber;
xhr.onreadystatechange.request = request;
};
AjaxSubscriber.prototype.unsubscribe = function () {
var _a = this, done = _a.done, xhr = _a.xhr;
if (!done && xhr && xhr.readyState !== 4) {
xhr.abort();
}
_super.prototype.unsubscribe.call(this);
};
return AjaxSubscriber;
}(Subscriber_1.Subscriber));
exports.AjaxSubscriber = AjaxSubscriber;
/** A normalized AJAX response */
var AjaxResponse = (function () {
function AjaxResponse(originalEvent, xhr, request) {
this.originalEvent = originalEvent;
this.xhr = xhr;
this.request = request;
this.status = xhr.status;
this.responseType = xhr.responseType;
switch (this.responseType) {
case 'json':
if ('response' in xhr) {
this.response = xhr.response;
}
else {
this.response = JSON.parse(xhr.responseText || '');
}
break;
case 'xml':
this.response = xhr.responseXML;
break;
case 'text':
default:
this.response = ('response' in xhr) ? xhr.response : xhr.responseText;
break;
}
}
return AjaxResponse;
}());
exports.AjaxResponse = AjaxResponse;
/** A normalized AJAX error */
var AjaxError = (function (_super) {
__extends(AjaxError, _super);
function AjaxError(message, xhr, request) {
_super.call(this, message);
this.message = message;
this.xhr = xhr;
this.request = request;
this.status = xhr.status;
}
return AjaxError;
}(Error));
exports.AjaxError = AjaxError;
var AjaxTimeoutError = (function (_super) {
__extends(AjaxTimeoutError, _super);
function AjaxTimeoutError(xhr, request) {
_super.call(this, 'ajax timeout', xhr, request);
}
return AjaxTimeoutError;
}(AjaxError));
exports.AjaxTimeoutError = AjaxTimeoutError;
//# sourceMappingURL=AjaxObservable.js.map
|
$(function(){$(".playVideo").on("click",function(){$.getScript("/statics/plugins/ckplayer/ckplayer.js",function(){CKobject.embedSWF("/statics/plugins/ckplayer/ckplayer.swf","i-media","ckplayer_a1","525","330",{f:"http://uokovideo/uoko2015.flv",s:0,c:0,b:1,p:1},{bgcolor:"#FFF",allowFullScreen:!0,allowScriptAccess:"always",wmode:"transparent"})})});$("#btnSearch").click(function(){if($("#KKW2").val()){var n=$("#KKW2").val();n=n.replace(/'/g,"").replace(/,/g,"").replace(/"/g,"").replace(/</g,"");n&&(window.location.href="/rent/_"+n)}});$("#KKW2").keydown(function(n){if(n.keyCode==13&&$("#KKW2").val()){var t=$("#KKW2").val();t=t.replace(/'/g,"").replace(/,/g,"").replace(/"/g,"").replace(/</g,"");t&&(window.location.href="/rent/_"+t)}})});
//# sourceMappingURL=home.min.js.map
|
FEATURES
^ expected errors | v input
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-assignment-operators-static-semantics-early-errors
description: Duplicated values in "features" frontmatter
features: [object-spread, async-functions, object-spread]
---*/
async function f({ ...a }) {}
|
/**
* Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import cloneDeep from 'lodash.clonedeep';
/**
* Utility method to get the endpoint property name based on the given endpoint type and category.
*
* @param {string} type The type of the endpoint (load_balance/ failover)
* @param {string} category The endpoint category (production/ sandbox)
* @return {string} The property name of the endpoints.
*/
function getEndpointTypeProperty(type, category) {
if (type !== 'failover') {
return category;
} else {
return category === 'sandbox_endpoints' ? 'sandbox_failovers' : 'production_failovers';
}
}
/**
* Merge the loadbalance/ failover endpoints to single object.
*
* @param {object} endpointConfig The endpoint config object
* @return {object} {production: [], sandbox: []}
* */
function mergeEndpoints(endpointConfig) {
const type = endpointConfig.endpoint_type;
if (type === 'load_balance') {
return { production: endpointConfig.production_endpoints, sandbox: endpointConfig.sandbox_endpoints };
} else if (type === 'failover') {
const prodEps = [endpointConfig.production_endpoints].concat(endpointConfig.production_failovers);
const sandboxEps = [endpointConfig.sandbox_endpoints].concat(endpointConfig.sandbox_failovers);
return { production: prodEps, sandbox: sandboxEps };
}
return { production: [endpointConfig.production_endpoints], sandbox: [endpointConfig.sandbox_endpoints] };
}
/**
* Method to get the endpoints templates based on the selected endpoint type (loadbalance/ failover) and whether is
* http or address endpoint.
*
* @param {string} endpointType The endpoint type
* @param {bool} isAddressEndpoint Whether the endpoint is soap or not.
* @param {object} currentEndpointConfig The existing endpoint information.
* @return {object} A endpoint template object.
* */
function getEndpointTemplateByType(endpointType, isAddressEndpoint, currentEndpointConfig) {
const tmpEndpointConfig = {};
if (endpointType === 'failover') {
tmpEndpointConfig.endpoint_type = endpointType;
tmpEndpointConfig.production_failovers = currentEndpointConfig.production_failovers
? currentEndpointConfig.production_failovers : [];
tmpEndpointConfig.sandbox_failovers = currentEndpointConfig.sandbox_failovers
? currentEndpointConfig.sandbox_failovers : [];
tmpEndpointConfig.production_endpoints = Array.isArray(currentEndpointConfig.production_endpoints)
? currentEndpointConfig.production_endpoints[0] : currentEndpointConfig.production_endpoints;
tmpEndpointConfig.sandbox_endpoints = Array.isArray(currentEndpointConfig.sandbox_endpoints)
? currentEndpointConfig.sandbox_endpoints[0] : currentEndpointConfig.sandbox_endpoints;
tmpEndpointConfig.failOver = true;
} else if (endpointType === 'load_balance') {
tmpEndpointConfig.endpoint_type = endpointType;
tmpEndpointConfig.algoClassName = 'org.apache.synapse.endpoints.algorithms.RoundRobin';
tmpEndpointConfig.algoCombo = 'org.apache.synapse.endpoints.algorithms.RoundRobin';
tmpEndpointConfig.sessionManagement = '';
tmpEndpointConfig.sessionTimeOut = '';
if (currentEndpointConfig.production_endpoints) {
tmpEndpointConfig.production_endpoints = Array.isArray(currentEndpointConfig.production_endpoints)
? currentEndpointConfig.production_endpoints : [currentEndpointConfig.production_endpoints];
}
if (currentEndpointConfig.sandbox_endpoints) {
tmpEndpointConfig.sandbox_endpoints = Array.isArray(currentEndpointConfig.sandbox_endpoints)
? currentEndpointConfig.sandbox_endpoints : [currentEndpointConfig.sandbox_endpoints];
}
tmpEndpointConfig.failOver = false;
} else {
tmpEndpointConfig.endpoint_type = isAddressEndpoint === true ? 'address' : 'http';
tmpEndpointConfig.production_endpoints = Array.isArray(currentEndpointConfig.production_endpoints)
? currentEndpointConfig.production_endpoints[0] : currentEndpointConfig.production_endpoints;
tmpEndpointConfig.sandbox_endpoints = Array.isArray(currentEndpointConfig.sandbox_endpoints)
? currentEndpointConfig.sandbox_endpoints[0] : currentEndpointConfig.sandbox_endpoints;
tmpEndpointConfig.failOver = false;
}
return tmpEndpointConfig;
}
/**
* Returns all the endpoints as a list.
*
* @param {object} endpointConfig The endpoint config object from the api.
* @return {array} The list of endpoints.
* */
function endpointsToList(endpointConfig) {
const config = cloneDeep(endpointConfig);
const endpoints = [];
if (Array.isArray(config.production_endpoints)) {
endpoints.push(...config.production_endpoints);
} else {
endpoints.push(config.production_endpoints);
}
if (Array.isArray(config.sandbox_endpoints)) {
endpoints.push(...config.sandbox_endpoints);
} else {
endpoints.push(config.sandbox_endpoints);
}
if (config.endpoint_type === 'failover') {
if (config.sandbox_failovers) {
endpoints.push(...config.sandbox_failovers);
}
if (config.production_failovers) {
endpoints.push(...config.production_failovers);
}
}
return endpoints;
}
/**
* Returns an endpoint config object template based on the implementation method.
* Eg: Managed, Prototyped.
*
* @param {string} implementationType The endpoint implementation type.
* @return {object} The endpoint template.
* */
function getEndpointConfigByImpl(implementationType) {
const tmpEndpointConfig = {};
if (implementationType === 'PROTOTYPED') {
tmpEndpointConfig.endpoint_type = 'http';
tmpEndpointConfig.implementation_status = 'prototyped';
tmpEndpointConfig.production_endpoints = { config: null, url: 'http://localhost' };
tmpEndpointConfig.sandbox_endpoints = { config: null, url: 'http://localhost' };
} else {
tmpEndpointConfig.endpoint_type = 'http';
tmpEndpointConfig.production_endpoints = { url: '' };
tmpEndpointConfig.sandbox_endpoints = { url: '' };
tmpEndpointConfig.failOver = false;
}
return tmpEndpointConfig;
}
/**
* Get the endpoint config based on the selected endpoint type.
* Supported endpoint types:
* 1. http
* 2. address
* 3. prototyped
* 4. awslambda
* 5. default (Dynamic)
*
* @param {string} endpointType The selected endpoint type.
* @return {endpointConfig} Endpoint config object.
* */
function createEndpointConfig(endpointType) {
const tmpEndpointConfig = {};
switch (endpointType) {
case 'http':
tmpEndpointConfig.endpoint_type = 'http';
tmpEndpointConfig.failOver = false;
break;
case 'address':
tmpEndpointConfig.endpoint_type = 'address';
tmpEndpointConfig.failOver = false;
break;
case 'prototyped':
tmpEndpointConfig.implementation_status = 'prototyped';
tmpEndpointConfig.endpoint_type = 'http';
tmpEndpointConfig.production_endpoints = { config: null, url: 'http://localhost' };
tmpEndpointConfig.sandbox_endpoints = { config: null, url: 'http://localhost' };
break;
case 'awslambda':
tmpEndpointConfig.endpoint_type = 'awslambda';
tmpEndpointConfig.access_method = 'role-supplied';
tmpEndpointConfig.amznAccessKey = '';
tmpEndpointConfig.amznSecretKey = '';
tmpEndpointConfig.amznRegion = '';
break;
default:
tmpEndpointConfig.endpoint_type = 'default';
tmpEndpointConfig.production_endpoints = { url: 'default' };
tmpEndpointConfig.sandbox_endpoints = { url: 'default' };
tmpEndpointConfig.failOver = false;
break;
}
return tmpEndpointConfig;
}
/**
* Get the endpoint template based on endpoint type.
*
* @param {string} type: Endpoint type (HTTP/ Address)
* @return {object} Endpoint Template
* */
function getEndpointTemplate(type) {
if (type === 'address') {
return { url: '', endpoint_type: 'address', template_not_supported: false };
}
return { url: '', template_not_supported: false };
}
export {
getEndpointTypeProperty,
mergeEndpoints,
getEndpointTemplateByType,
endpointsToList,
getEndpointConfigByImpl,
createEndpointConfig,
getEndpointTemplate,
};
|
// Start by storing our API endpoint as URL constants
const earthquakesURL = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson"
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Define and initialize the layer groups for earthquakes and tectonic plates
const earthquakes = new L.LayerGroup();
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Define the various basemaps available on Mapbox.com with a placeholder for the API Key needed to access these
const darkMap = L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}", {
attribution: "© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong><a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a></strong>",
tileSize: 524,
maxZoom: 19,
zoomOffset: -1,
id: "dark-v10",
accessToken: API_KEY
});
const lightMap = L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}", {
attribution: "© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong><a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a></strong>",
tileSize: 524,
maxZoom: 19,
zoomOffset: -1,
id: "light-v10",
accessToken: API_KEY
});
const outdoorMap = L.tileLayer("https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}", {
attribution: "© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong><a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a></strong>",
tileSize: 524,
maxZoom: 19,
zoomOffset: -1,
id: "mapbox/outdoors-v11",
accessToken: API_KEY
});
const satelliteMap = L.tileLayer("https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}", {
attribution: "© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong><a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a></strong>",
tileSize: 524,
maxZoom: 19,
zoomOffset: -1,
id: "mapbox/satellite-streets-v11",
accessToken: API_KEY
});
const streetMap = L.tileLayer("https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}", {
attribution: "© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong><a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a></strong>",
tileSize: 524,
maxZoom: 19,
zoomOffset: -1,
id: "mapbox/streets-v11",
accessToken: API_KEY
});
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Define a baseMaps object that will hold the various layers defined above
const baseMaps = {
"Dark Mode": darkMap,
"Light Mode": lightMap,
"Outdoor Mode": outdoorMap,
"Satellite Mode": satelliteMap,
"Street Mode": streetMap
};
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Define an overlayMaps object to hold our overlay layers for earthquakes and tectonic plates
const overlayMaps = {
"Earthquakes": earthquakes,
};
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Define a map object and set the default mode, latitude and longitude
const myMap = L.map("map", {
center: [35.30, -92.00],
zoom: 5,
layers: [lightMap, earthquakes]
});
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Define a layer control to pass in baseMaps and overlayMaps as well as add the layer control to the displayed map
L.control.layers(baseMaps, overlayMaps, {
collapsed: false
}).addTo(myMap);
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
// Grab data from the USGS Earthquakes GeoJSON data using D3
d3.json(earthquakesURL, function(earthquakeData) {
// Define a function that will adjust the marker size based on the magnitude of the corresponding earthquake
function markerSize(magnitude) {
if (magnitude === 0) {
return 1;
}
return magnitude * 2.9;
}
// Define a function that will adjust the marker style based on the magnitude of the corresponding earthquake
function styleInfo(feature) {
return {
opacity: 1,
fillOpacity: 1,
fillColor: chooseColor(feature.properties.mag),
color: "#000000",
radius: markerSize(feature.properties.mag),
stroke: true,
weight: 0.4
};
}
// Define a function that will determine the marker color based on the magnitude of the corresponding earthquake
function chooseColor(magnitude) {
switch (true) {
case magnitude > 5:
return "#B32525";
case magnitude > 4:
return "#EF6060";
case magnitude > 3:
return "#EE8E21";
case magnitude > 2:
return "#FFE571";
case magnitude > 1:
return "#A7D177";
default:
return "#96D5D4";
}
}
// Define a GeoJSON layer containing the earthquake data object and features
L.geoJSON(earthquakeData, {
pointToLayer: function(feature, latlng) {
return L.circleMarker(latlng);
},
style: styleInfo,
// Define a function that runs once per feature and displays a pop-up containing the location, time and magnitude of the Earthquake
onEachFeature: function(feature, layer) {
layer.bindPopup("<h4> Earthquake Location: " + feature.properties.place + "</h4> <hr> <p> Earthquake Date & Time: " + new Date(feature.properties.time) + "</p> <hr> <p> Earthquake Magnitude: " + feature.properties.mag + "</p>");
}
// Add the earthquake data to earthquakes layer group
}).addTo(earthquakes);
// Add the earthquake layer to the displayed map
earthquakes.addTo(myMap);
// Define and add the legend to the map
const legend = L.control({ position: "bottomright" });
legend.onAdd = function() {
const div = L.DomUtil.create("div", "info legend"),
magnitudeLevels = [0, 1, 2, 3, 4, 5];
div.innerHTML += "<h3> Earthquake Magnitude </h3> <hr>"
for (var i = 0; i < magnitudeLevels.length; i++) {
div.innerHTML +=
'<i style="background: ' + chooseColor(magnitudeLevels[i] + 1) + '"></i> ' +
magnitudeLevels[i] + (magnitudeLevels[i + 1] ? " to " + magnitudeLevels[i + 1] + '<br>' : ' and above');
}
return div;
};
// Add the legend to the displayed map
legend.addTo(myMap);
});
// =-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{397:function(t,l,e){var content=e(404);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(62).default)("1930a9a0",content,!0,{sourceMap:!1})},403:function(t,l,e){"use strict";e(397)},404:function(t,l,e){var c=e(61)(!1);c.push([t.i,".NuxtLogo{-webkit-animation:appear 1s;animation:appear 1s;margin:auto}@-webkit-keyframes appear{0%{opacity:0}}@keyframes appear{0%{opacity:0}}",""]),t.exports=c},420:function(t,l,e){"use strict";e.r(l);e(403);var c=e(24),component=Object(c.a)({},(function(){var t=this,l=t.$createElement,e=t._self._c||l;return e("svg",{staticClass:"NuxtLogo",attrs:{width:"245",height:"180",viewBox:"0 0 452 342",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z",fill:"#00C58E"}}),t._v(" "),e("path",{attrs:{d:"M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z",fill:"#108775"}}),t._v(" "),e("path",{attrs:{d:"M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z",fill:"#2F495E"}})])}),[],!1,null,null,null);l.default=component.exports}}]);
|
const ApiRootUrl = 'https://www.hiolabs.com/api/';
// const ApiRootUrlTwo = 'http://localhost:8081/jxambb/';
const ApiRootUrlTwo = 'https://yfk.qrzyyn.com/jxambb/';
module.exports = {
// 登录
AuthLoginByWeixin: ApiRootUrl + 'auth/loginByWeixin', //微信登录
// 首页
IndexUrl: ApiRootUrl + 'index/appInfo', //首页数据接口
GoodsCarouselUrl: ApiRootUrlTwo + 'goodscarousel/findGoodsCarousel', //商品轮播
recommendGoods:ApiRootUrlTwo + 'category/find',//推荐好物
RecommendShops:ApiRootUrlTwo + 'shop/findRecommendShop',//推荐商家
Advert:ApiRootUrlTwo + 'advert/findAdvert',//广告(前5条)
// 分类
// CatalogList: ApiRootUrl + 'catalog/index', //分类目录全部分类数据接口
CatalogList: ApiRootUrlTwo + 'dictionary/fastFind', //分类目录全部分类数据接口
ProductCatalog: ApiRootUrlTwo + 'category/find', //商家中的商品分类
GetProduct: ApiRootUrlTwo + 'product/find', //商家中的商品信息
FindProduct: ApiRootUrlTwo + 'product/findProduct', //根据商家id和分类进行商品查询
findProductByKeyword: ApiRootUrlTwo + 'product/find', //根据商家id和分类进行商品查询
findShopByKeyword: ApiRootUrlTwo + 'shop/find', //根据商家id和分类进行商品查询
CatalogCurrent: ApiRootUrl + 'catalog/current', //分类目录当前分类数据接口
GetCurrentList: ApiRootUrl + 'catalog/currentlist',
batchEditProduct:ApiRootUrlTwo + 'product/batchEditProduct',//批量修改商品库存和销量
// 购物车
CartAdd: ApiRootUrl + 'cart/add', // 添加商品到购物车
CartList: ApiRootUrl + 'cart/index', //获取购物车的数据
GetCartList: ApiRootUrlTwo + 'shoppingcart/find', //获取购物车的数据
CartUpdate: ApiRootUrl + 'cart/update', // 更新购物车的商品
deleteShoppingcart: ApiRootUrlTwo + 'shoppingcart/del', // 删除购物车的商品
CartChecked: ApiRootUrl + 'cart/checked', // 选择或取消选择商品
CartGoodsCount: ApiRootUrl + 'cart/goodsCount', // 获取购物车商品件数
CartCheckout: ApiRootUrl + 'cart/checkout', // 下单前信息确认
messageproduct: ApiRootUrlTwo + 'product/messageproduct', //商家
Addshoppingcart: ApiRootUrlTwo + 'shoppingcart/add', //将商品加入购物车
Editshoppingcart: ApiRootUrlTwo + 'shoppingcart/edit', // 更新购物车的商品
batchEditshoppingcart: ApiRootUrlTwo + 'shoppingcart/batchEdit', //批量修改购物车
batchAddShoppingCart: ApiRootUrlTwo + 'shoppingcart/batchAddShoppingCart',//批量增加购物车
//订单
generateOrder: ApiRootUrlTwo + 'orderList/generateOrder',//生成订单
editOrderList: ApiRootUrlTwo + 'orderList/edit',//生成订单
OrderDetail: ApiRootUrlTwo + 'orderDetail/findById', //订单详情
findOrderDetail: ApiRootUrlTwo + 'orderDetail/find', //订单详情
findMoney: ApiRootUrlTwo + 'consumer/findMoney', //查询余额
delOrderList: ApiRootUrlTwo + 'orderList/del', //删除订单,在orderlist表中添加了触发器,删除订单时,会自动删除orderdetail中数据
//商家
RecommendShop: ApiRootUrlTwo + 'shop/findRecommendShop',
findShopBySale: ApiRootUrlTwo + 'shop/findShopBySale',//按销量查询商家,由高到底排序
findShop: ApiRootUrlTwo + 'shop/find', //商家分页
findShopName: ApiRootUrlTwo + "shop/getMe",//获取商家名称
// 商品
findGoods: ApiRootUrlTwo + 'goods/find', //查询商品
GoodsCount: ApiRootUrl + 'goods/count', //统计商品总数
GoodsDetail: ApiRootUrl + 'goods/detail', //获得商品的详情
GoodsList: ApiRootUrl + 'goods/list', //获得商品列表
GoodsShare: ApiRootUrl + 'goods/goodsShare', //获得商品的详情
SaveUserId: ApiRootUrl + 'goods/saveUserId',
ProductCarousel: ApiRootUrlTwo + 'enclosure/findById', //产品轮播图
addBrowserHistory: ApiRootUrlTwo + 'browserhistory/add',//添加浏览记录
// 收货地址
// AddressDetail: ApiRootUrl + 'address/addressDetail', //收货地址详情
AddressDetail: ApiRootUrlTwo + 'address/getMe', //收货地址详情
// DeleteAddress: ApiRootUrl + 'address/deleteAddress', //保存收货地址
DeleteAddress: ApiRootUrlTwo + 'address/del', //保存收货地址
// SaveAddress: ApiRootUrl + 'address/saveAddress', //保存收货地址
addAddress: ApiRootUrlTwo + 'address/add',//新增地址
editAddress: ApiRootUrlTwo + 'address/edit',//修改地址
// GetAddresses: ApiRootUrl + 'address/getAddresses',
GetAddresses: ApiRootUrlTwo + 'address/find',
RegionList: ApiRootUrl + 'region/list', //获取区域列表
// PayPrepayId: ApiRootUrl + 'pay/preWeixinPay', //获取微信统一下单prepay_id
PayPrepayId: ApiRootUrlTwo + 'wxpay/createTransactions', //获取微信统一下单prepay_id
OrderSubmit: ApiRootUrl + 'order/submit', // 提交订单
OrderList: ApiRootUrlTwo + 'orderList/fastFind', //订单列表
OrderDetail: ApiRootUrlTwo + 'orderDetail/findById', //订单详情
OrderDelete: ApiRootUrl + 'order/delete', //订单删除
OrderCancel: ApiRootUrl + 'order/cancel', //取消订单
OrderConfirm: ApiRootUrl + 'order/confirm', //物流详情
OrderCount: ApiRootUrl + 'order/count', // 获取订单数
OrderExpressInfo: ApiRootUrl + 'order/express', //物流信息
OrderGoods: ApiRootUrl + 'order/orderGoods', // 获取checkout页面的商品列表
// 足迹
// FootprintList: ApiRootUrl + 'footprint/list', //足迹列表
BrowserHistory: ApiRootUrlTwo + 'browserhistory/find', //足迹列表
FootprintDelete: ApiRootUrl + 'footprint/delete', //删除足迹
deletetBrowserHistory: ApiRootUrlTwo + 'browserhistory/del', //删除足迹
browserHistoryIsExist: ApiRootUrlTwo + 'browserhistory/isExist', //删除足迹
// 搜索
// SearchIndex: ApiRootUrl + 'search/index', //搜索页面数据
findSearchHistory: ApiRootUrlTwo + 'searchhistory/find', //搜索页面数据
addSearchHistory: ApiRootUrlTwo + 'searchhistory/add', //保存搜索记录
deleteSearchHistory: ApiRootUrlTwo + 'searchhistory/batchDel', //删除搜索记录
SearchHelper: ApiRootUrl + 'search/helper', //搜索帮助
SearchClearHistory: ApiRootUrl + 'search/clearHistory', //搜索帮助
ShowSettings: ApiRootUrl + 'settings/showSettings',
SaveSettings: ApiRootUrl + 'settings/save',
addSettings: ApiRootUrlTwo + 'consumer/add',
editSettings: ApiRootUrlTwo + 'consumer/edit',
isExist: ApiRootUrlTwo + 'consumer/isExist',
SettingsDetail: ApiRootUrl + 'settings/userDetail',
GetBase64: ApiRootUrl + 'qrcode/getBase64', //获取商品详情二维码
searchHistoryIsExist: ApiRootUrlTwo + 'searchhistory/isExist',//判断查询历史是否存在
//我的
FindCustomer: ApiRootUrlTwo + 'consumer/getMe',//查找消费者
addShop: ApiRootUrlTwo + 'shop/add',//新增商家(即商家入驻)
editShop: ApiRootUrlTwo + 'shop/edit',//修改商家信息
uploadImage: ApiRootUrlTwo + 'shop/upload',//上传图片
shopIsExist: ApiRootUrlTwo + 'shop/isExist',//判断商家是否存在
investMoney: ApiRootUrlTwo + 'recharge/add',//充值
findRecharge: ApiRootUrlTwo + 'recharge/find', //充值列表
findOrderByStatus: ApiRootUrlTwo + 'orderList/findOrderByStatus', //根据订单状态统计订单各种状态数量
//获取openId
GetOpenId: ApiRootUrlTwo + 'consumer/getOpenId',//获取用户的openId
};
|
import test from "ava"
import compareFixtures from "./helpers/compare-fixtures"
test.serial("should accept content",
(t) => compareFixtures(t, "custom-load", {
load: () =>
"custom-content {}"
})
)
test.serial("should accept promised content",
(t) => compareFixtures(t, "custom-load", {
load: () =>
Promise.resolve("custom-content {}")
})
)
|
import fetch from 'isomorphic-fetch';
import { API } from '../config';
export const emailContactForm = data => {
let emailEndpoint;
if (data.authorEmail) {
emailEndpoint = `${API}/contact-blog-author`;
} else {
emailEndpoint = `${API}/contact`;
}
return fetch(`${emailEndpoint}`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => {
return response.json();
})
.catch(err => console.log(err));
};
|
import React from "react";
import AccountConfirmation from "../../components/AccountConfirmation";
import { mount } from "enzyme";
import { create } from "react-test-renderer";
import { BrowserRouter } from "react-router-dom";
describe("AccountConfirmation Component Testing", () => {
const confirmation = mount(
<BrowserRouter>
<AccountConfirmation />
</BrowserRouter>
);
test("Account Confirmation Render", () => {
expect(confirmation.length).toEqual(1);
});
test("Account Confirmation title Render", () => {
expect(confirmation.find(".AccountConfirmation-title").length).toEqual(1);
});
test("Account Confirmation title text", () => {
expect(confirmation.find(".AccountConfirmation-title").text()).toEqual(
"Se ha confirmado su cuenta!!!"
);
});
test("Account Confirmation image render", () => {
expect(confirmation.find(".AccountConfirmation-image").length).toEqual(1);
});
test("Account Confirmation button render", () => {
expect(confirmation.find(".AccountConfirmation-button").length).toEqual(1);
});
test("Account Confirmation button text", () => {
expect(confirmation.find(".AccountConfirmation-button").text()).toEqual(
"Iniciar Sesión"
);
});
});
describe("AccountConfirmation Snapshot", () => {
test("Test UI AccountConfirmation component", () => {
const accountsnap = create(
<BrowserRouter>
<AccountConfirmation />
</BrowserRouter>
);
expect(accountsnap.toJSON()).toMatchSnapshot();
});
});
|
/*
@功能:首页面js
@作者:diamondwang
@时间:2013年11月13日
*/
/* 注意,要在页面中先引入jquery*/
$(function(){
//右侧,话费、旅行、彩票、游戏切换效果
$(".service h2 span").mouseover(function(){
$(this).addClass("on").siblings().removeClass("on");
$(".service_wrap div").hide().eq($(this).index()).show();
});
//导购区域切换效果,疯狂抢购,热卖商品、推荐商品、新品上架,猜您喜欢
$(".guide_content h2 span").mouseover(function(){
$(this).addClass("on").siblings().removeClass("on");
$(".guide_wrap div").hide().eq($(this).index()).show();
});
//各楼层区域切换
$(".goodslist h2 span").mouseover(function(){
$(this).addClass("on").siblings().removeClass("on");
$(this).parent().next(".goodslist_wrap").find("div").hide().eq($(this).index()).show();
});
//首页幻灯片效果
var len = $(".slide_items li").size(); //获取图片的数目
var init = 1; //设置图片切换初始值,从第二张开始
var dt = null; //设置定时器
//定义一个函数完成动画
function slide(){
dt = setInterval(function(){
//大图切换
$(".slide_items li").stop(true,false).fadeOut().eq(init).fadeIn();
//数字索引切换
$(".slide_controls li").removeClass("on").eq(init).addClass("on");
init++;
if (init >= len ){
init = 0;
}
},5000)
}
// function slide(){
// if (init >= len ){
// init = 0;
// }
// //大图切换
// $(".slide_items li").fadeOut().eq(init).fadeIn();
// //数字索引切换
// $(".slide_controls li").removeClass("on").eq(init).addClass("on");
// init++;
// setTimeout("slide()",2000);
// }
//调用函数,实现动画
slide();
//鼠标放置在图片上则停止幻灯,离开则继续
$(".slide_items li").mouseover(function(){
clearInterval(dt);
}).mouseout(function(){
slide();
});
//鼠标放置到数字索引上时,立即切换到该图片上,并停止动画,离开则继续
$(".slide_controls li").mouseover(function(){
clearInterval(dt);
init = $(this).index();
$(".slide_items li").stop(true,false).fadeOut().eq(init).fadeIn();
init++;
$(this).addClass("on").siblings().removeClass("on");
}).mouseout(function(){
slide();
});
});
|
'use strict';
var _assert = require('assert');
var _assert2 = _interopRequireDefault(_assert);
var _barmen = require('../src/barmen');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
suite('when barmen pour whisky', function () {
setup(function () {});
// * <Arrange>.<Assert>
suite('i ask 50 grams', function () {
test('get 50 grams of whisky', function () {
_assert2.default.equal(50, (0, _barmen.pour)(50));
});
});
//<Assert>.<Arrange>
suite('I get 50 grams of whisky', function () {
test('if barmen is free', function () {
_assert2.default.equal(50, (0, _barmen.pour)(50));
});
test('if I won a promo glass', function () {
_assert2.default.equal(50, (0, _barmen.pour)(50));
});
test('My friend ordered 50 grams to me', function () {
_assert2.default.equal(50, (0, _barmen.pour)(50));
});
});
});
// * When<Action>.<Arrange><Assert>
// * <Arrange>.<Assert>
// * <Assert>.<Arrange>
// * <ClassName>Should.<Act><Assert>
// * <ClassNameTests>.<Act>_<Arrange>_<Assert>
//# sourceMappingURL=whenBarmenPourWhiskyTests-compiled.js.map
|
/*!
* Copyright 2017 Telerik AD
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(f){
if (typeof define === 'function' && define.amd) {
define(["kendo.core"], f);
} else {
f();
}
}(function(){
(function( window, undefined ) {
kendo.cultures["de-LI"] = {
name: "de-LI",
numberFormat: {
pattern: ["-n"],
decimals: 2,
",": "'",
".": ".",
groupSize: [3],
percent: {
pattern: ["-n%","n%"],
decimals: 2,
",": "'",
".": ".",
groupSize: [3],
symbol: "%"
},
currency: {
name: "Swiss Franc",
abbr: "CHF",
pattern: ["-$ n","$ n"],
decimals: 2,
",": "'",
".": ".",
groupSize: [3],
symbol: "CHF"
}
},
calendars: {
standard: {
days: {
names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
namesAbbr: ["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],
namesShort: ["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]
},
months: {
names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],
namesAbbr: ["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]
},
AM: ["vorm.","vorm.","VORM."],
PM: ["nachm.","nachm.","NACHM."],
patterns: {
d: "dd.MM.yyyy",
D: "dddd, d. MMMM yyyy",
F: "dddd, d. MMMM yyyy HH:mm:ss",
g: "dd.MM.yyyy HH:mm",
G: "dd.MM.yyyy HH:mm:ss",
m: "d. MMMM",
M: "d. MMMM",
s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
t: "HH:mm",
T: "HH:mm:ss",
u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
y: "MMMM yyyy",
Y: "MMMM yyyy"
},
"/": ".",
":": ":",
firstDay: 1
}
}
}
})(this);
}));
|
import { Filter } from "./filter";
import * as p from "../../core/properties";
import { Indices } from "../../core/types";
import { keys, values } from "../../core/util/object";
import { isArrayOf, isBoolean, isInteger } from "../../core/util/types";
import { use_strict } from "../../core/util/string";
export class CustomJSFilter extends Filter {
constructor(attrs) {
super(attrs);
}
static init_CustomJSFilter() {
this.define({
args: [p.Any, {}],
code: [p.String, ''],
});
}
get names() {
return keys(this.args);
}
get values() {
return values(this.args);
}
get func() {
const code = use_strict(this.code);
return new Function(...this.names, "source", code);
}
compute_indices(source) {
const size = source.length;
const filter = this.func(...this.values, source);
if (filter == null)
return Indices.all_set(size);
else if (isArrayOf(filter, isInteger))
return Indices.from_indices(size, filter);
else if (isArrayOf(filter, isBoolean))
return Indices.from_booleans(size, filter);
else
throw new Error(`expect an array of integers or booleans, or null, got ${filter}`);
}
}
CustomJSFilter.__name__ = "CustomJSFilter";
CustomJSFilter.init_CustomJSFilter();
//# sourceMappingURL=customjs_filter.js.map
|
const mongoose = require('mongoose');
const messageSchema = new mongoose.Schema({
senderId: mongoose.ObjectId,
recipientId: mongoose.ObjectId,
seen: {
type: Boolean,
default: false,
},
resource: String,
resourceClaimed: {
type: Boolean,
default: false,
},
type: String,
content: String,
},
{
timestamps: {
createdAt: 'created_at',
},
});
module.exports = messageSchema;
|
const requireg = require('requireg');
const Helper = require('../helper');
const Locator = require('../locator');
const recorder = require('../recorder');
const stringIncludes = require('../assert/include').includes;
const { urlEquals } = require('../assert/equal');
const { equals } = require('../assert/equal');
const { empty } = require('../assert/empty');
const { truth } = require('../assert/truth');
const {
xpathLocator,
ucfirst,
fileExists,
chunkArray,
convertCssPropertiesToCamelCase,
screenshotOutputFolder,
} = require('../utils');
const {
isColorProperty,
convertColorToRGBA,
} = require('../colorUtils');
const path = require('path');
const ElementNotFound = require('./errors/ElementNotFound');
const RemoteBrowserConnectionRefused = require('./errors/RemoteBrowserConnectionRefused');
const Popup = require('./extras/Popup');
const Console = require('./extras/Console');
const findReact = require('./extras/React');
const axios = require('axios');
const fs = require('fs');
const fsExtra = require('fs-extra');
let puppeteer;
let perfTiming;
const popupStore = new Popup();
const consoleLogStore = new Console();
/**
* Uses [Google Chrome's Puppeteer](https://github.com/GoogleChrome/puppeteer) library to run tests inside headless Chrome.
* Browser control is executed via DevTools Protocol (instead of Selenium).
* This helper works with a browser out of the box with no additional tools required to install.
*
* Requires `puppeteer` package to be installed.
*
* ## Configuration
*
* This helper should be configured in codecept.json or codecept.conf.js
*
* * `url`: base url of website to be tested
* * `show`: (optional, default: false) - show Google Chrome window for debug.
* * `restart`: (optional, default: true) - restart browser between tests.
* * `disableScreenshots`: (optional, default: false) - don't save screenshot on failure.
* * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
* * `uniqueScreenshotNames`: (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites.
* * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to false.
* * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` is set to false.
* * `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
* * `waitForNavigation`: (optional, default: 'load'). When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`. See [Puppeteer API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions). Array values are accepted as well.
* * `getPageTimeout` (optional, default: '0') config option to set maximum navigation time in milliseconds.
* * `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
* * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
* * `userAgent`: (optional) user-agent string.
* * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Puppeteer"]._startBrowser()`.
* * `chrome`: (optional) pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
*
*
* #### Example #1: Wait for 0 network connections.
*
* ```json
* {
* "helpers": {
* "Puppeteer" : {
* "url": "http://localhost",
* "restart": false,
* "waitForNavigation": "networkidle0",
* "waitForAction": 500
* }
* }
* }
* ```
*
* #### Example #2: Wait for DOMContentLoaded event and 0 network connections
*
* ```json
* {
* "helpers": {
* "Puppeteer" : {
* "url": "http://localhost",
* "restart": false,
* "waitForNavigation": [ "domcontentloaded", "networkidle0" ],
* "waitForAction": 500
* }
* }
* }
* ```
*
* #### Example #3: Debug in window mode
*
* ```json
* {
* "helpers": {
* "Puppeteer" : {
* "url": "http://localhost",
* "show": true
* }
* }
* }
* ```
*
* #### Example #4: Connect to remote browser by specifying [websocket endpoint](https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target)
*
* ```json
* {
* "helpers": {
* "Puppeteer" : {
* "url": "http://localhost",
* "chrome": {
* "browserWSEndpoint": "ws://localhost:9222/devtools/browser/c5aa6160-b5bc-4d53-bb49-6ecb36cd2e0a"
* }
* }
* }
* }
* ```
*
* Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
*
* ## Access From Helpers
*
* Receive Puppeteer client from a custom helper by accessing `browser` for the Browser object or `page` for the current Page object:
*
* ```js
* const browser = this.helpers['Puppeteer'].browser;
* await browser.pages(); // List of pages in the browser
*
* const currentPage = this.helpers['Puppeteer'].page;
* await currentPage.url(); // Get the url of the current page
* ```
*
* ## Methods
*/
class Puppeteer extends Helper {
constructor(config) {
super(config);
puppeteer = requireg('puppeteer');
// set defaults
this.isRemoteBrowser = false;
this.isRunning = false;
// override defaults with config
this._setConfig(config);
}
_validateConfig(config) {
const defaults = {
waitForAction: 100,
waitForTimeout: 1000,
fullPageScreenshots: false,
disableScreenshots: false,
uniqueScreenshotNames: false,
manualStart: false,
getPageTimeout: 0,
waitForNavigation: 'load',
restart: true,
keepCookies: false,
keepBrowserState: false,
show: false,
defaultPopupAction: 'accept',
};
return Object.assign(defaults, config);
}
_setConfig(config) {
this.options = this._validateConfig(config);
this.puppeteerOptions = Object.assign({ headless: !this.options.show }, this.options.chrome);
this.isRemoteBrowser = !!this.puppeteerOptions.browserWSEndpoint;
popupStore.defaultAction = this.options.defaultPopupAction;
}
static _config() {
return [
{ name: 'url', message: 'Base url of site to be tested', default: 'http://localhost' },
];
}
static _checkRequirements() {
try {
requireg('puppeteer');
} catch (e) {
return ['puppeteer@^1.6.0'];
}
}
_init() {
}
_beforeSuite() {
if (!this.options.restart && !this.options.manualStart && !this.isRunning) {
this.debugSection('Session', 'Starting singleton browser session');
return this._startBrowser();
}
}
async _before() {
recorder.retry({
retries: 3,
when: err => err.message.indexOf('context') > -1, // ignore context errors
});
if (this.options.restart && !this.options.manualStart) return this._startBrowser();
if (!this.isRunning && !this.options.manualStart) return this._startBrowser();
return this.browser;
}
async _after() {
if (!this.isRunning) return;
// close other sessions
const contexts = this.browser.browserContexts();
contexts.shift();
await Promise.all(contexts.map(c => c.close()));
if (this.options.restart) {
this.isRunning = false;
return this._stopBrowser();
}
if (this.options.keepBrowserState) return;
if (!this.options.keepCookies) {
this.debugSection('Session', 'cleaning cookies and localStorage');
await this.clearCookie();
}
await this.executeScript('localStorage.clear();').catch((err) => {
if (!(err.message.indexOf("Storage is disabled inside 'data:' URLs.") > -1)) throw err;
});
await this.closeOtherTabs();
return this.browser;
}
_afterSuite() {
}
_finishTest() {
if (!this.options.restart && this.isRunning) return this._stopBrowser();
}
_session() {
return {
start: async () => {
this.debugSection('Incognito Tab', 'opened');
const bc = await this.browser.createIncognitoBrowserContext();
await bc.newPage();
// Create a new page inside context.
return bc;
},
stop: async (context) => {
// is closed by _after
},
loadVars: async (context) => {
// if (this.withinLocator)
const existingPages = context.targets().filter(t => t.type() === 'page');
// this.page = await existingPages[0].page();
// this.context = await page.$('body');
return this._setPage(await existingPages[0].page());
},
restoreVars: async () => {
this.withinLocator = null;
const existingPages = await this.browser.targets().filter(t => t.type() === 'page');
await this._setPage(await existingPages[0].page());
return this._waitForAction();
},
};
}
/** [existingPages.length -1
* [existingPages.length -1
* [existingPages.length -1
*
* ```js
* I.amAcceptingPopups();
* I.click('#triggerPopup');
* I.acceptPopup();
* ```
*/
amAcceptingPopups() {
popupStore.actionType = 'accept';
}
/**
* Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
* Don't confuse popups with modal windows, as created by [various
* libraries](http://jster.net/category/windows-modals-popups).
*/
acceptPopup() {
popupStore.assertPopupActionType('accept');
}
/**
* Set the automatic popup response to Cancel/Dismiss.
* This must be set before a popup is triggered.
*
* ```js
* I.amCancellingPopups();
* I.click('#triggerPopup');
* I.cancelPopup();
* ```
*/
amCancellingPopups() {
popupStore.actionType = 'cancel';
}
/**
* Dismisses the active JavaScript popup, as created by window.alert|window.confirm|window.prompt.
*/
cancelPopup() {
popupStore.assertPopupActionType('cancel');
}
/**
* Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the
* given string.
*/
async seeInPopup(text) {
popupStore.assertPopupVisible();
const popupText = await popupStore.popup.message();
stringIncludes('text in popup').assert(text, popupText);
}
/**
* Set current page
* @param {object} page page to set
*/
async _setPage(page) {
page = await page;
this._addPopupListener(page);
this.page = page;
if (!page) return;
page.setDefaultNavigationTimeout(this.options.getPageTimeout);
this.context = await this.page.$('body');
await page.bringToFront();
}
/**
* Add the 'dialog' event listener to a page
* @page {Puppeteer.Page}
*
* The popup listener handles the dialog with the predefined action when it appears on the page.
* It also saves a reference to the object which is used in seeInPopup.
*/
_addPopupListener(page) {
if (!page) {
return;
}
page.on('dialog', async (dialog) => {
popupStore.popup = dialog;
const action = popupStore.actionType || this.options.defaultPopupAction;
await this._waitForAction();
switch (action) {
case 'accept':
return dialog.accept();
case 'cancel':
return dialog.dismiss();
default: {
throw new Error('Unknown popup action type. Only "accept" or "cancel" are accepted');
}
}
});
}
/**
* Gets page URL including hash.
*/
async _getPageUrl() {
return this.executeScript(() => window.location.href);
}
/**
* Grab the text within the popup. If no popup is visible then it will return null
*
* ```js
* await I.grabPopupText();
* ```
*/
async grabPopupText() {
if (popupStore.popup) {
return popupStore.popup.message();
}
return null;
}
async _startBrowser() {
if (this.isRemoteBrowser) {
try {
this.browser = await puppeteer.connect(this.puppeteerOptions);
} catch (err) {
if (err.toString().indexOf('ECONNREFUSED')) {
throw new RemoteBrowserConnectionRefused(err);
}
throw err;
}
} else {
this.browser = await puppeteer.launch(this.puppeteerOptions);
}
this.browser.on('targetcreated', target => target.page().then(page => targetCreatedHandler.call(this, page)));
this.browser.on('targetchanged', (target) => {
this.debugSection('Url', target.url());
});
const existingPages = await this.browser.pages();
const mainPage = existingPages[0] || await this.browser.newPage();
if (existingPages.length) {
// Run the handler as it will not be triggered if the page already exists
targetCreatedHandler.call(this, mainPage);
}
await this._setPage(mainPage);
await this.closeOtherTabs();
if (this.options.windowSize && this.options.windowSize.indexOf('x') > 0) {
const dimensions = this.options.windowSize.split('x');
await this.resizeWindow(parseInt(dimensions[0], 10), parseInt(dimensions[1], 10));
}
this.isRunning = true;
if (this.options.userAgent) {
await this.page.setUserAgent(this.options.userAgent);
}
}
async _stopBrowser() {
this.withinLocator = null;
this._setPage(null);
this.context = null;
popupStore.clear();
if (this.isRemoteBrowser) {
await this.browser.disconnect();
} else {
await this.browser.close();
}
}
async _evaluateHandeInContext(...args) {
let context = await this._getContext();
if (context.constructor.name === 'Frame') {
// Currently there is no evalateHandle for the Frame object
// https://github.com/GoogleChrome/puppeteer/issues/1051
context = await context.executionContext();
}
return context.evaluateHandle(...args);
}
async _withinBegin(locator) {
if (this.withinLocator) {
throw new Error('Can\'t start within block inside another within block');
}
const frame = isFrameLocator(locator);
if (frame) {
if (Array.isArray(frame)) {
return this.switchTo(null)
.then(() => frame.reduce((p, frameLocator) => p.then(() => this.switchTo(frameLocator)), Promise.resolve()));
}
await this.switchTo(locator);
this.withinLocator = new Locator(locator);
return;
}
const els = await this._locate(locator);
assertElementExists(els, locator);
this.context = els[0];
this.withinLocator = new Locator(locator);
}
async _withinEnd() {
this.withinLocator = null;
this.context = await this.page.mainFrame().$('body');
}
_extractDataFromPerformanceTiming(timing, ...dataNames) {
const navigationStart = timing.navigationStart;
const extractedData = {};
dataNames.forEach((name) => {
extractedData[name] = timing[name] - navigationStart;
});
return extractedData;
}
/**
* {{> amOnPage }}
*/
async amOnPage(url) {
if (!(/^\w+\:\/\//.test(url))) {
url = this.options.url + url;
}
await this.page.goto(url, { waitUntil: this.options.waitForNavigation });
const performanceTiming = JSON.parse(await this.page.evaluate(() => JSON.stringify(window.performance.timing)));
perfTiming = this._extractDataFromPerformanceTiming(
performanceTiming,
'responseEnd',
'domInteractive',
'domContentLoadedEventEnd',
'loadEventEnd',
);
return this._waitForAction();
}
/**
* {{> resizeWindow }}
*
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
* Puppeteer does not control the window of a browser so it can't adjust its real size.
* It also can't maximize a window.
*/
async resizeWindow(width, height) {
if (width === 'maximize') {
throw new Error('Puppeteer can\'t control windows, so it can\'t maximize it');
}
await this.page.setViewport({ width, height });
return this._waitForAction();
}
/**
* Set headers for all next requests
*
* ```js
* I.haveRequestHeaders({
* 'X-Sent-By': 'CodeceptJS',
* });
* ```
*
* @param {object} customHeaders headers to set
*/
async haveRequestHeaders(customHeaders) {
if (!customHeaders) {
throw new Error('Cannot send empty headers.');
}
return this.page.setExtraHTTPHeaders(customHeaders);
}
/**
* {{> moveCursorTo }}
* {{ react }}
*/
async moveCursorTo(locator, offsetX = 0, offsetY = 0) {
const els = await this._locate(locator);
assertElementExists(els);
// Use manual mouse.move instead of .hover() so the offset can be added to the coordinates
const { x, y } = await els[0]._clickablePoint();
await this.page.mouse.move(x + offsetX, y + offsetY);
return this._waitForAction();
}
/**
* {{> dragAndDrop }}
*/
async dragAndDrop(srcElement, destElement) {
return proceedDragAndDrop.call(this, srcElement, destElement);
}
/**
* {{> refreshPage }}
*/
async refreshPage() {
return this.page.reload({ timeout: this.options.getPageTimeout, waitUntil: this.options.waitForNavigation });
}
/**
* {{> scrollPageToTop }}
*/
scrollPageToTop() {
return this.page.evaluate(() => {
window.scrollTo(0, 0);
});
}
/**
* {{> scrollPageToBottom }}
*/
scrollPageToBottom() {
return this.page.evaluate(() => {
const body = document.body;
const html = document.documentElement;
window.scrollTo(0, Math.max(
body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight,
));
});
}
/**
* {{> scrollTo }}
*/
async scrollTo(locator, offsetX = 0, offsetY = 0) {
if (typeof locator === 'number' && typeof offsetX === 'number') {
offsetY = offsetX;
offsetX = locator;
locator = null;
}
let x = 0;
let y = 0;
if (locator) {
const els = await this._locate(locator);
assertElementExists(els, locator, 'Element');
await els[0]._scrollIntoViewIfNeeded();
const elementCoordinates = await els[0]._clickablePoint();
x = elementCoordinates.x;
y = elementCoordinates.y;
}
await this.page.evaluate((x, y) => {
window.scrollTo(x, y);
}, x + offsetX, y + offsetY);
return this._waitForAction();
}
/**
* {{> seeInTitle }}
*/
async seeInTitle(text) {
const title = await this.page.title();
stringIncludes('web page title').assert(text, title);
}
/**
* {{> grabPageScrollPosition }}
*/
async grabPageScrollPosition() {
/* eslint-disable comma-dangle */
function getScrollPosition() {
return {
x: window.pageXOffset,
y: window.pageYOffset
};
}
/* eslint-enable comma-dangle */
return this.executeScript(getScrollPosition);
}
/**
* Checks that title is equal to provided one.
*
* ```js
* I.seeTitleEquals('Test title.');
* ```
*/
async seeTitleEquals(text) {
const title = await this.page.title();
return equals('web page title').assert(title, text);
}
/**
* {{> dontSeeInTitle }}
*/
async dontSeeInTitle(text) {
const title = await this.page.title();
stringIncludes('web page title').negate(text, title);
}
/**
* {{> grabTitle }}
*/
async grabTitle() {
return this.page.title();
}
/**
* Get elements by different locator types, including strict locator
* Should be used in custom helpers:
*
* ```js
* const elements = await this.helpers['Puppeteer']._locate({name: 'password'});
* ```
*
* {{ react }}
*/
async _locate(locator) {
return findElements(await this.context, locator);
}
/**
* Find a checkbox by providing human readable text:
* NOTE: Assumes the checkable element exists
*
* ```js
* this.helpers['Puppeteer']._locateCheckable('I agree with terms and conditions').then // ...
* ```
*/
async _locateCheckable(locator, providedContext = null) {
const context = providedContext || await this._getContext();
const els = await findCheckable.call(this, locator, context);
assertElementExists(els[0], locator, 'Checkbox or radio');
return els[0];
}
/**
* Find a clickable element by providing human readable text:
*
* ```js
* this.helpers['Puppeteer']._locateClickable('Next page').then // ...
* ```
*/
async _locateClickable(locator) {
const context = await this._getContext();
return findClickable.call(this, context, locator);
}
/**
* Find field elements by providing human readable text:
*
* ```js
* this.helpers['Puppeteer']._locateFields('Your email').then // ...
* ```
*/
async _locateFields(locator) {
return findFields.call(this, locator);
}
/**
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
*
* ```js
* I.switchToNextTab();
* I.switchToNextTab(2);
* ```
*
* @param {number} [num=1]
*/
async switchToNextTab(num = 1) {
const pages = await this.browser.pages();
const index = pages.indexOf(this.page);
this.withinLocator = null;
const page = pages[index + num];
if (!page) {
throw new Error(`There is no ability to switch to next tab with offset ${num}`);
}
await this._setPage(page);
return this._waitForAction();
}
/**
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
*
* ```js
* I.switchToPreviousTab();
* I.switchToPreviousTab(2);
* ```
* @param {number} [num=1]
*/
async switchToPreviousTab(num = 1) {
const pages = await this.browser.pages();
const index = pages.indexOf(this.page);
this.withinLocator = null;
const page = pages[index - num];
if (!page) {
throw new Error(`There is no ability to switch to previous tab with offset ${num}`);
}
await this._setPage(page);
return this._waitForAction();
}
/**
* Close current tab and switches to previous.
*
* ```js
* I.closeCurrentTab();
* ```
*/
async closeCurrentTab() {
const oldPage = this.page;
await this.switchToPreviousTab();
await oldPage.close();
return this._waitForAction();
}
/**
* Close all tabs except for the current one.
*
* ```js
* I.closeOtherTabs();
* ```
*/
async closeOtherTabs() {
const pages = await this.browser.pages();
const otherPages = pages.filter(page => page !== this.page);
let p = Promise.resolve();
otherPages.forEach((page) => {
p = p.then(() => page.close());
});
await p;
return this._waitForAction();
}
/**
* Open new tab and switch to it
*
* ```js
* I.openNewTab();
* ```
*/
async openNewTab() {
await this._setPage(await this.browser.newPage());
return this._waitForAction();
}
/**
* {{> grabNumberOfOpenTabs }}
*/
async grabNumberOfOpenTabs() {
const pages = await this.browser.pages();
return pages.length;
}
/**
* {{> seeElement }}
* {{ react }}
*/
async seeElement(locator) {
let els = await this._locate(locator);
els = await Promise.all(els.map(el => el.boundingBox()));
return empty('visible elements').negate(els.filter(v => v).fill('ELEMENT'));
}
/**
* {{> dontSeeElement }}
* {{ react }}
*/
async dontSeeElement(locator) {
let els = await this._locate(locator);
els = await Promise.all(els.map(el => el.boundingBox()));
return empty('visible elements').assert(els.filter(v => v).fill('ELEMENT'));
}
/**
* {{> seeElementInDOM }}
*/
async seeElementInDOM(locator) {
const els = await this._locate(locator);
return empty('elements on page').negate(els.filter(v => v).fill('ELEMENT'));
}
/**
* {{> dontSeeElementInDOM }}
*/
async dontSeeElementInDOM(locator) {
const els = await this._locate(locator);
return empty('elements on a page').assert(els.filter(v => v).fill('ELEMENT'));
}
/**
* {{> click }}
*
* {{ react }}
*/
async click(locator, context = null) {
return proceedClick.call(this, locator, context);
}
/**
* {{> clickLink }}
*
* {{ react }}
*/
async clickLink(locator, context = null) {
return proceedClick.call(this, locator, context, { waitForNavigation: true });
}
/**
* Sets a directory to where save files. Allows to test file downloads.
* Should be used with [FileSystem helper](https://codecept.io/helpers/FileSystem) to check that file were downloaded correctly.
*
* By default files are saved to `output/downloads`.
* This directory is cleaned on every `handleDownloads` call, to ensure no old files are kept.
*
* ```js
* I.handleDownloads();
* I.click('Download Avatar');
* I.amInPath('output/downloads');
* I.seeFile('avatar.jpg');
*
* ```
*
* @param {string} [downloadPath='downloads'] change this parameter to set another directory for saving
*/
async handleDownloads(downloadPath = 'downloads') {
downloadPath = path.join(global.output_dir, downloadPath);
if (!fs.existsSync(downloadPath)) {
fs.mkdirSync(downloadPath, '0777');
}
fsExtra.emptyDirSync(downloadPath);
return this.page._client.send('Page.setDownloadBehavior', { behavior: 'allow', downloadPath });
}
/**
* This method is **depreacted**.
*
* Please use `handleDownloads()` instead.
*/
async downloadFile(locator, customName) {
let fileName;
await this.page.setRequestInterception(true);
const xRequest = await new Promise((resolve) => {
this.page.on('request', (request) => {
console.log('rq', request, customName);
const grabbedFileName = request.url().split('/')[request.url().split('/').length - 1];
const fileExtension = request.url().split('/')[request.url().split('/').length - 1].split('.')[1];
console.log('nm', customName, fileExtension);
if (customName && path.extname(customName) !== fileExtension) {
console.log('bypassing a request');
request.continue();
return;
}
customName ? fileName = `${customName}.${fileExtension}` : fileName = grabbedFileName;
request.abort();
resolve(request);
});
});
await this.click(locator);
const options = {
encoding: null,
method: xRequest._method,
uri: xRequest._url,
body: xRequest._postData,
headers: xRequest._headers,
};
const cookies = await this.page.cookies();
options.headers.Cookie = cookies.map(ck => `${ck.name}=${ck.value}`).join(';');
const response = await axios({
method: options.method,
url: options.uri,
headers: options.headers,
responseType: 'arraybuffer',
onDownloadProgress(e) {
console.log('+', e);
},
});
const outputFile = path.join(`${global.output_dir}/${fileName}`);
try {
await new Promise((resolve, reject) => {
const wstream = fs.createWriteStream(outputFile);
console.log(response);
wstream.write(response.data);
wstream.end();
this.debug(`File is downloaded in ${outputFile}`);
wstream.on('finish', () => { resolve(fileName); });
wstream.on('error', reject);
});
} catch (error) {
throw new Error(`There is something wrong with downloaded file. ${error}`);
}
}
/**
* {{> doubleClick }}
*
* {{ react }}
*/
async doubleClick(locator, context = null) {
return proceedClick.call(this, locator, context, { clickCount: 2 });
}
/**
* {{> rightClick }}
*
* {{ react }}
*/
async rightClick(locator, context = null) {
return proceedClick.call(this, locator, context, { button: 'right' });
}
/**
* {{> checkOption }}
*/
async checkOption(field, context = null) {
const elm = await this._locateCheckable(field, context);
const curentlyChecked = await elm.getProperty('checked')
.then(checkedProperty => checkedProperty.jsonValue());
// Only check if NOT currently checked
if (!curentlyChecked) {
await elm.click();
return this._waitForAction();
}
}
/**
* {{> uncheckOption }}
*/
async uncheckOption(field, context = null) {
const elm = await this._locateCheckable(field, context);
const curentlyChecked = await elm.getProperty('checked')
.then(checkedProperty => checkedProperty.jsonValue());
// Only uncheck if currently checked
if (curentlyChecked) {
await elm.click();
return this._waitForAction();
}
}
/**
* {{> seeCheckboxIsChecked }}
*/
async seeCheckboxIsChecked(field) {
return proceedIsChecked.call(this, 'assert', field);
}
/**
* {{> dontSeeCheckboxIsChecked }}
*/
async dontSeeCheckboxIsChecked(field) {
return proceedIsChecked.call(this, 'negate', field);
}
/**
* {{> pressKey }}
*
* {{ keys }}
*/
async pressKey(key) {
let modifier;
const modifiers = ['Control', 'Command', 'Shift', 'Alt'];
if (Array.isArray(key) && modifiers.indexOf(key[0]) > -1) {
modifier = key[0];
key = key[1];
}
if (modifier) await this.page.keyboard.down(modifier);
await await this.page.keyboard.press(key);
if (modifier) await this.page.keyboard.up(modifier);
return this._waitForAction();
}
/**
* {{> fillField }}
* {{ react }}
*/
async fillField(field, value) {
const els = await findFields.call(this, field);
assertElementExists(els, field, 'Field');
const el = els[0];
// await el.focus();
const tag = await el.getProperty('tagName').then(el => el.jsonValue());
const editable = await el.getProperty('contenteditable').then(el => el.jsonValue());
if (tag === 'INPUT' || tag === 'TEXTAREA') {
await this._evaluateHandeInContext(el => el.value = '', el);
} else if (editable) {
await this._evaluateHandeInContext(el => el.innerHTML = '', el);
}
await el.type(value.toString(), { delay: 10 });
return this._waitForAction();
}
/**
* {{> clearField }}
*/
async clearField(field) {
return this.fillField(field, '');
}
/**
* {{> appendField }}
*
* {{ react }}
*/
async appendField(field, value) {
const els = await findFields.call(this, field);
assertElementExists(els, field, 'Field');
await els[0].press('End');
await els[0].type(value, { delay: 10 });
return this._waitForAction();
}
/**
* {{> seeInField }}
*/
async seeInField(field, value) {
return proceedSeeInField.call(this, 'assert', field, value);
}
/**
* {{> dontSeeInField }}
*/
async dontSeeInField(field, value) {
return proceedSeeInField.call(this, 'negate', field, value);
}
/**
* {{> attachFile }}
*/
async attachFile(locator, pathToFile) {
const file = path.join(global.codecept_dir, pathToFile);
if (!fileExists(file)) {
throw new Error(`File at ${file} can not be found on local system`);
}
const els = await findFields.call(this, locator);
assertElementExists(els, 'Field');
await els[0].uploadFile(file);
return this._waitForAction();
}
/**
* {{> selectOption }}
*/
async selectOption(select, option) {
const els = await findFields.call(this, select);
assertElementExists(els, select, 'Selectable field');
const el = els[0];
if (await el.getProperty('tagName').then(t => t.jsonValue()) !== 'SELECT') {
throw new Error('Element is not <select>');
}
if (!Array.isArray(option)) option = [option];
for (const key in option) {
const opt = xpathLocator.literal(option[key]);
let optEl = await findElements.call(this, el, { xpath: Locator.select.byVisibleText(opt) });
if (optEl.length) {
this._evaluateHandeInContext(el => el.selected = true, optEl[0]);
continue;
}
optEl = await findElements.call(this, el, { xpath: Locator.select.byValue(opt) });
if (optEl.length) {
this._evaluateHandeInContext(el => el.selected = true, optEl[0]);
}
}
await this._evaluateHandeInContext((element) => {
element.dispatchEvent(new Event('input', { bubbles: true }));
element.dispatchEvent(new Event('change', { bubbles: true }));
}, el);
return this._waitForAction();
}
/**
* {{> grabNumberOfVisibleElements }}
* {{ react }}
*/
async grabNumberOfVisibleElements(locator) {
let els = await this._locate(locator);
els = await Promise.all(els.map(el => el.boundingBox()));
return els.filter(v => v).length;
}
/**
* {{> seeInCurrentUrl }}
*/
async seeInCurrentUrl(url) {
stringIncludes('url').assert(url, await this._getPageUrl());
}
/**
* {{> dontSeeInCurrentUrl }}
*/
async dontSeeInCurrentUrl(url) {
stringIncludes('url').negate(url, await this._getPageUrl());
}
/**
* {{> seeCurrentUrlEquals }}
*/
async seeCurrentUrlEquals(url) {
urlEquals(this.options.url).assert(url, await this._getPageUrl());
}
/**
* {{> dontSeeCurrentUrlEquals }}
*/
async dontSeeCurrentUrlEquals(url) {
urlEquals(this.options.url).negate(url, await this._getPageUrl());
}
/**
* {{> see }}
*
* {{ react }}
*/
async see(text, context = null) {
return proceedSee.call(this, 'assert', text, context);
}
/**
* Checks that text is equal to provided one.
*
* ```js
* I.seeTextEquals('text', 'h1');
* ```
*/
async seeTextEquals(text, context = null) {
return proceedSee.call(this, 'assert', text, context, true);
}
/**
* {{> dontSee }}
*
* {{ react }}
*/
async dontSee(text, context = null) {
return proceedSee.call(this, 'negate', text, context);
}
/**
* {{> grabSource }}
*/
async grabSource() {
return this.page.content();
}
/**
* Get JS log from browser.
*
* ```js
* let logs = await I.grabBrowserLogs();
* console.log(JSON.stringify(logs))
* ```
*/
async grabBrowserLogs() {
const logs = consoleLogStore.entries;
consoleLogStore.clear();
return logs;
}
/**
* {{> grabCurrentUrl }}
*/
async grabCurrentUrl() {
return this._getPageUrl();
}
/**
* {{> seeInSource }}
*/
async seeInSource(text) {
const source = await this.page.content();
stringIncludes('HTML source of a page').assert(text, source);
}
/**
* {{> dontSeeInSource }}
*/
async dontSeeInSource(text) {
const source = await this.page.content();
stringIncludes('HTML source of a page').negate(text, source);
}
/**
* {{> seeNumberOfElements }}
*
* {{ react }}
*/
async seeNumberOfElements(locator, num) {
const elements = await this._locate(locator);
return equals(`expected number of elements (${locator}) is ${num}, but found ${elements.length}`).assert(elements.length, num);
}
/**
* {{> seeNumberOfVisibleElements }}
*
* {{ react }}
*/
async seeNumberOfVisibleElements(locator, num) {
const res = await this.grabNumberOfVisibleElements(locator);
return equals(`expected number of visible elements (${locator}) is ${num}, but found ${res}`).assert(res, num);
}
/**
* {{> setCookie }}
*/
async setCookie(cookie) {
if (Array.isArray(cookie)) {
return this.page.setCookie(...cookie);
}
return this.page.setCookie(cookie);
}
/**
* {{> seeCookie }}
*
*/
async seeCookie(name) {
const cookies = await this.page.cookies();
empty(`cookie ${name} to be set`).negate(cookies.filter(c => c.name === name));
}
/**
* {{> dontSeeCookie }}
*/
async dontSeeCookie(name) {
const cookies = await this.page.cookies();
empty(`cookie ${name} to be set`).assert(cookies.filter(c => c.name === name));
}
/**
* {{> grabCookie }}
*
* Returns cookie in JSON format. If name not passed returns all cookies for this domain.
*/
async grabCookie(name) {
const cookies = await this.page.cookies();
if (!name) return cookies;
const cookie = cookies.filter(c => c.name === name);
if (cookie[0]) return cookie[0];
}
/**
* {{> clearCookie }}
*/
async clearCookie(name) {
const cookies = await this.page.cookies();
if (!name) {
return this.page.deleteCookie.apply(this.page, cookies);
}
const cookie = cookies.filter(c => c.name === name);
if (!cookie[0]) return;
return this.page.deleteCookie(cookie[0]);
}
/**
* {{> executeScript }}
*
* If a function returns a Promise It will wait for it resolution.
*/
async executeScript(fn) {
let context = this.page;
if (this.context && typeof this.context.evaluate === 'function') {
context = this.context;
}
return context.evaluate.apply(context, arguments);
}
/**
* {{> executeAsyncScript }}
*
* Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
*/
async executeAsyncScript(fn) {
const args = Array.from(arguments);
const asyncFn = function () {
const args = Array.from(arguments);
const fn = eval(`(${args.shift()})`); // eslint-disable-line no-eval
return new Promise((done) => {
args.push(done);
fn.apply(null, args);
});
};
args[0] = args[0].toString();
args.unshift(asyncFn);
return this.page.evaluate.apply(this.page, args);
}
/**
* {{> grabTextFrom }}
* {{ react }}
*/
async grabTextFrom(locator) {
const els = await this._locate(locator);
assertElementExists(els, locator);
const texts = [];
for (const el of els) {
texts.push(await (await el.getProperty('innerText')).jsonValue());
}
if (texts.length === 1) return texts[0];
return texts;
}
/**
* {{> grabValueFrom }}
*/
async grabValueFrom(locator) {
const els = await findFields.call(this, locator);
assertElementExists(els, locator);
return els[0].getProperty('value').then(t => t.jsonValue());
}
/**
* {{> grabHTMLFrom }}
*/
async grabHTMLFrom(locator) {
const els = await this._locate(locator);
assertElementExists(els, locator);
const values = await Promise.all(els.map(el => this.page.evaluate(element => element.innerHTML, el)));
if (Array.isArray(values) && values.length === 1) {
return values[0];
}
return values;
}
/**
* {{> grabCssPropertyFrom }}
* {{ react }}
*/
async grabCssPropertyFrom(locator, cssProperty) {
const els = await this._locate(locator);
const res = await Promise.all(els.map(el => el.executionContext().evaluate(el => JSON.parse(JSON.stringify(getComputedStyle(el))), el)));
const cssValues = res.map(props => props[cssProperty]);
if (res.length > 0) {
return cssValues;
}
return cssValues[0];
}
/**
* {{> seeCssPropertiesOnElements }}
* {{ react }}
*/
async seeCssPropertiesOnElements(locator, cssProperties) {
const res = await this._locate(locator);
assertElementExists(res, locator);
const cssPropertiesCamelCase = convertCssPropertiesToCamelCase(cssProperties);
const elemAmount = res.length;
const commands = [];
res.forEach((el) => {
Object.keys(cssPropertiesCamelCase).forEach((prop) => {
commands.push(el.executionContext()
.evaluate((el) => {
const style = window.getComputedStyle ? getComputedStyle(el) : el.currentStyle;
return JSON.parse(JSON.stringify(style));
}, el)
.then((props) => {
if (isColorProperty(prop)) {
return convertColorToRGBA(props[prop]);
}
return props[prop];
}));
});
});
let props = await Promise.all(commands);
const values = Object.keys(cssPropertiesCamelCase).map(key => cssPropertiesCamelCase[key]);
if (!Array.isArray(props)) props = [props];
let chunked = chunkArray(props, values.length);
chunked = chunked.filter((val) => {
for (let i = 0; i < val.length; ++i) {
if (val[i] !== values[i]) return false;
}
return true;
});
return equals(`all elements (${locator}) to have CSS property ${JSON.stringify(cssProperties)}`).assert(chunked.length, elemAmount);
}
/**
* {{> seeAttributesOnElements }}
* {{ react }}
*/
async seeAttributesOnElements(locator, attributes) {
const res = await this._locate(locator);
assertElementExists(res, locator);
const elemAmount = res.length;
const commands = [];
res.forEach((el) => {
Object.keys(attributes).forEach((prop) => {
commands.push(el
.executionContext()
.evaluateHandle((el, attr) => el[attr] || el.getAttribute(attr), el, prop)
.then(el => el.jsonValue()));
});
});
let attrs = await Promise.all(commands);
const values = Object.keys(attributes).map(key => attributes[key]);
if (!Array.isArray(attrs)) attrs = [attrs];
let chunked = chunkArray(attrs, values.length);
chunked = chunked.filter((val) => {
for (let i = 0; i < val.length; ++i) {
if (val[i] !== values[i]) return false;
}
return true;
});
return equals(`all elements (${locator}) to have attributes ${JSON.stringify(attributes)}`).assert(chunked.length, elemAmount);
}
/**
* {{> dragSlider }}
* {{ react }}
*/
async dragSlider(locator, offsetX = 0) {
const src = await this._locate(locator);
assertElementExists(src, locator, 'Slider Element');
// Note: Using private api ._clickablePoint because the .BoundingBox does not take into account iframe offsets!
const sliderSource = await src[0]._clickablePoint();
// Drag start point
await this.page.mouse.move(sliderSource.x, sliderSource.y, { steps: 5 });
await this.page.mouse.down();
// Drag destination
await this.page.mouse.move(sliderSource.x + offsetX, sliderSource.y, { steps: 5 });
await this.page.mouse.up();
await this._waitForAction();
}
/**
* {{> grabAttributeFrom }}
* {{ react }}
*/
async grabAttributeFrom(locator, attr) {
const els = await this._locate(locator);
assertElementExists(els, locator);
const array = [];
for (let index = 0; index < els.length; index++) {
const a = await this._evaluateHandeInContext((el, attr) => el[attr] || el.getAttribute(attr), els[index], attr);
array.push(await a.jsonValue());
}
return array.length === 1 ? array[0] : array;
}
/**
* {{> saveScreenshot }}
*/
async saveScreenshot(fileName, fullPage) {
const fullPageOption = fullPage || this.options.fullPageScreenshots;
const outputFile = screenshotOutputFolder(fileName);
this.debug(`Screenshot is saving to ${outputFile}`);
const openSessions = await this.browser.pages();
if (openSessions.length > 1) {
this.page = await this.browser.targets()[this.browser.targets().length - 1].page();
}
return this.page.screenshot({ path: outputFile, fullPage: fullPageOption, type: 'png' });
}
async _failed(test) {
await this._withinEnd();
}
/**
* {{> wait }}
*/
async wait(sec) {
return new Promise(((done) => {
setTimeout(done, sec * 1000);
}));
}
/**
* {{> waitForEnabled }}
*/
async waitForEnabled(locator, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
const matcher = await this.context;
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
const enabledFn = function (locator) {
const els = document.querySelectorAll(locator);
if (!els || els.length === 0) {
return false;
}
return Array.prototype.filter.call(els, el => !el.disabled).length > 0;
};
waiter = context.waitForFunction(enabledFn, { timeout: waitTimeout }, locator.value);
} else {
const enabledFn = function (locator, $XPath) {
eval($XPath); // eslint-disable-line no-eval
return $XPath(null, locator).filter(el => !el.disabled).length > 0;
};
waiter = context.waitForFunction(enabledFn, { timeout: waitTimeout }, locator.value, $XPath.toString());
}
return waiter.catch((err) => {
throw new Error(`element (${locator.toString()}) still not enabled after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* {{> waitForValue }}
*/
async waitForValue(field, value, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
const locator = new Locator(field, 'css');
const matcher = await this.context;
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
const valueFn = function (locator, value) {
const els = document.querySelectorAll(locator);
if (!els || els.length === 0) {
return false;
}
return Array.prototype.filter.call(els, el => (el.value || '').indexOf(value) !== -1).length > 0;
};
waiter = context.waitForFunction(valueFn, { timeout: waitTimeout }, locator.value, value);
} else {
const valueFn = function (locator, $XPath, value) {
eval($XPath); // eslint-disable-line no-eval
return $XPath(null, locator).filter(el => (el.value || '').indexOf(value) !== -1).length > 0;
};
waiter = context.waitForFunction(valueFn, { timeout: waitTimeout }, locator.value, $XPath.toString(), value);
}
return waiter.catch((err) => {
const loc = locator.toString();
throw new Error(`element (${loc}) is not in DOM or there is no element(${loc}) with value "${value}" after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* {{> waitNumberOfVisibleElements }}
* {{ react }}
*/
async waitNumberOfVisibleElements(locator, num, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
const matcher = await this.context;
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
const visibleFn = function (locator, num) {
const els = document.querySelectorAll(locator);
if (!els || els.length === 0) {
return false;
}
return Array.prototype.filter.call(els, el => el.offsetParent !== null).length === num;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value, num);
} else {
const visibleFn = function (locator, $XPath, num) {
eval($XPath); // eslint-disable-line no-eval
return $XPath(null, locator).filter(el => el.offsetParent !== null).length === num;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value, $XPath.toString(), num);
}
return waiter.catch((err) => {
throw new Error(`The number of elements (${locator.toString()}) is not ${num} after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* {{> waitForElement }}
* {{ react }}
*/
async waitForElement(locator, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
waiter = context.waitForSelector(locator.simplify(), { timeout: waitTimeout });
} else {
waiter = context.waitForFunction($XPath, { timeout: waitTimeout }, null, locator.value);
}
return waiter.catch((err) => {
throw new Error(`element (${locator.toString()}) still not present on page after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* {{> waitForVisible }}
*
* This method accepts [React selectors](https://codecept.io/react).
*/
async waitForVisible(locator, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
const matcher = await this.context;
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
waiter = context.waitForSelector(locator.simplify(), { timeout: waitTimeout, visible: true });
} else {
const visibleFn = function (locator, $XPath) {
eval($XPath); // eslint-disable-line no-eval
return $XPath(null, locator).filter(el => el.offsetParent !== null).length > 0;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value, $XPath.toString());
}
return waiter.catch((err) => {
throw new Error(`element (${locator.toString()}) still not visible after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* {{> waitForInvisible }}
*/
async waitForInvisible(locator, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
const matcher = await this.context;
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
waiter = context.waitForSelector(locator.simplify(), { timeout: waitTimeout, hidden: true });
} else {
const visibleFn = function (locator, $XPath) {
eval($XPath); // eslint-disable-line no-eval
const matches = $XPath(null, locator);
return matches.length === 0 || matches.filter(el => el.offsetParent === null).length > 0;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value, $XPath.toString());
}
return waiter.catch((err) => {
throw new Error(`element (${locator.toString()}) still visible after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* {{> waitToHide }}
*/
async waitToHide(locator, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
waiter = context.waitForSelector(locator.simplify(), { timeout: waitTimeout, hidden: true });
} else {
const visibleFn = function (locator, $XPath) {
eval($XPath); // eslint-disable-line no-eval
return $XPath(null, locator).filter(el => el.offsetParent !== null).length === 0;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value, $XPath.toString());
}
return waiter.catch((err) => {
throw new Error(`element (${locator.toString()}) still not hidden after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
async _getContext() {
if (this.context && this.context.constructor.name === 'Frame') {
return this.context;
}
return this.page;
}
/**
* {{> waitInUrl }}
*/
async waitInUrl(urlPart, sec = null) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
return this.page.waitForFunction((urlPart) => {
const currUrl = decodeURIComponent(decodeURIComponent(decodeURIComponent(window.location.href)));
return currUrl.indexOf(urlPart) > -1;
}, { timeout: waitTimeout }, urlPart).catch(async (e) => {
const currUrl = await this._getPageUrl(); // Required because the waitForFunction can't return data.
if (/failed: timeout/i.test(e.message)) {
throw new Error(`expected url to include ${urlPart}, but found ${currUrl}`);
} else {
throw e;
}
});
}
/**
* {{> waitUrlEquals }}
*/
async waitUrlEquals(urlPart, sec = null) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
const baseUrl = this.options.url;
if (urlPart.indexOf('http') < 0) {
urlPart = baseUrl + urlPart;
}
return this.page.waitForFunction((urlPart) => {
const currUrl = decodeURIComponent(decodeURIComponent(decodeURIComponent(window.location.href)));
return currUrl.indexOf(urlPart) > -1;
}, { timeout: waitTimeout }, urlPart).catch(async (e) => {
const currUrl = await this._getPageUrl(); // Required because the waitForFunction can't return data.
if (/failed: timeout/i.test(e.message)) {
throw new Error(`expected url to be ${urlPart}, but found ${currUrl}`);
} else {
throw e;
}
});
}
/**
* {{> waitForText }}
*/
async waitForText(text, sec = null, context = null) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
let waiter;
const contextObject = await this._getContext();
if (context) {
const locator = new Locator(context, 'css');
if (locator.isCSS()) {
waiter = contextObject.waitForFunction((locator, text) => {
const el = document.querySelector(locator);
if (!el) return false;
return el.innerText.indexOf(text) > -1;
}, { timeout: waitTimeout }, locator.value, text);
}
if (locator.isXPath()) {
waiter = contextObject.waitForFunction((locator, text, $XPath) => {
const el = $XPath(null, locator);
if (!el.length) return false;
return el[0].innerText.indexOf(text) > -1;
}, { timeout: waitTimeout }, locator.value, text, $XPath);
}
} else {
waiter = contextObject.waitForFunction(text => document.body.innerText.indexOf(text) > -1, { timeout: waitTimeout }, text);
}
return waiter.catch((err) => {
throw new Error(`Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
/**
* Waits for a network request.
*
* ```js
* I.waitForRequest('http://example.com/resource');
* I.waitForRequest(request => request.url() === 'http://example.com' && request.method() === 'GET');
* ```
*
* @param {string|function} urlOrPredicate
* @param {number?} [sec=null] seconds to wait
*/
async waitForRequest(urlOrPredicate, sec = null) {
const timeout = sec ? sec * 1000 : this.options.waitForTimeout;
return this.page.waitForRequest(urlOrPredicate, { timeout });
}
/**
* Waits for a network request.
*
* ```js
* I.waitForResponse('http://example.com/resource');
* I.waitForResponse(request => request.url() === 'http://example.com' && request.method() === 'GET');
* ```
*
* @param {string|function} urlOrPredicate
* @param {number?} [sec=null] number of seconds to wait
*/
async waitForResponse(urlOrPredicate, sec = null) {
const timeout = sec ? sec * 1000 : this.options.waitForTimeout;
return this.page.waitForResponse(urlOrPredicate, { timeout });
}
/**
* {{> switchTo }}
*/
async switchTo(locator) {
if (Number.isInteger(locator)) {
// Select by frame index of current context
let childFrames = null;
if (this.context && typeof this.context.childFrames === 'function') {
childFrames = this.context.childFrames();
} else {
childFrames = this.page.mainFrame().childFrames();
}
if (locator >= 0 && locator < childFrames.length) {
this.context = childFrames[locator];
} else {
throw new Error('Element #invalidIframeSelector was not found by text|CSS|XPath');
}
return;
} else if (!locator) {
this.context = await this.page.mainFrame().$('body');
return;
}
// iframe by selector
const els = await this._locate(locator);
assertElementExists(els, locator);
const iframeName = await els[0].getProperty('name').then(el => el.jsonValue());
const iframeId = await els[0].getProperty('id').then(el => el.jsonValue());
const iframeUrl = await els[0].getProperty('src').then(el => el.jsonValue());
const searchName = iframeName || iframeId; // Name takes precedence over id, because of puppeteer's Frame.name() function
const currentContext = await this._getContext();
const resFrame = await findFrame.call(this, currentContext, searchName, iframeUrl);
if (resFrame) {
this.context = resFrame;
} else {
this.context = els[0];
}
}
/**
* {{> waitForFunction }}
*/
async waitForFunction(fn, argsOrSec = null, sec = null) {
let args = [];
if (argsOrSec) {
if (Array.isArray(argsOrSec)) {
args = argsOrSec;
} else if (typeof argsOrSec === 'number') {
sec = argsOrSec;
}
}
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
const context = await this._getContext();
return context.waitForFunction(fn, { timeout: waitTimeout }, ...args);
}
/**
* Waits for navigation to finish. By default takes configured `waitForNavigation` option.
*
* See [Pupeteer's reference](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
*
* @param {*} opts
*/
async waitForNavigation(opts = {}) {
opts = Object.assign({ timeout: this.options.getPageTimeout, waitUntil: this.options.waitForNavigation }, opts);
return this.page.waitForNavigation(opts);
}
/**
* {{> waitUntil }}
*/
async waitUntil(fn, sec = null) {
console.log('This method will remove in CodeceptJS 1.4; use `waitForFunction` instead!');
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
const context = await this._getContext();
return context.waitForFunction(fn, { timeout: waitTimeout });
}
async waitUntilExists(locator, sec) {
console.log(`waitUntilExists deprecated:
* use 'waitForElement' to wait for element to be attached
* use 'waitForDetached to wait for element to be removed'`);
return this.waitForDetached(locator, sec);
}
/**
* {{> waitForDetached }}
*/
async waitForDetached(locator, sec) {
const waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
locator = new Locator(locator, 'css');
let waiter;
const context = await this._getContext();
if (locator.isCSS()) {
const visibleFn = function (locator) {
return document.querySelector(locator) === null;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value);
} else {
const visibleFn = function (locator, $XPath) {
eval($XPath); // eslint-disable-line no-eval
return $XPath(null, locator).length === 0;
};
waiter = context.waitForFunction(visibleFn, { timeout: waitTimeout }, locator.value, $XPath.toString());
}
return waiter.catch((err) => {
throw new Error(`element (${locator.toString()}) still on page after ${waitTimeout / 1000} sec\n${err.message}`);
});
}
async _waitForAction() {
return this.wait(this.options.waitForAction / 1000);
}
/**
* {{> grabDataFromPerformanceTiming }}
*/
async grabDataFromPerformanceTiming() {
return perfTiming;
}
}
module.exports = Puppeteer;
async function findFrame(context, name, url) {
if (!context) {
return;
}
let frames = [];
if (typeof context.childFrames === 'function') {
frames = context.childFrames();
} else {
frames = this.page.frames();
}
return frames.find((frame) => {
if (name || !url) {
return frame.name() === name;
}
return frame.url() === url;
});
}
async function findElements(matcher, locator) {
if (locator.react) return findReact(matcher, locator);
locator = new Locator(locator, 'css');
if (!locator.isXPath()) return matcher.$$(locator.simplify());
return matcher.$x(locator.value);
}
async function proceedClick(locator, context = null, options = {}) {
let matcher = await this.context;
if (context) {
const els = await this._locate(context);
assertElementExists(els, context);
matcher = els[0];
}
const els = await findClickable.call(this, matcher, locator);
if (context) {
assertElementExists(els, locator, 'Clickable element', `was not found inside element ${new Locator(context).toString()}`);
} else {
assertElementExists(els, locator, 'Clickable element');
}
await els[0].click(options);
const promises = [];
if (options.waitForNavigation) {
promises.push(this.waitForNavigation());
}
promises.push(this._waitForAction());
return Promise.all(promises);
}
async function findClickable(matcher, locator) {
if (locator.react) return findReact(matcher, locator);
locator = new Locator(locator);
if (!locator.isFuzzy()) return findElements.call(this, matcher, locator);
let els;
const literal = xpathLocator.literal(locator.value);
els = await findElements.call(this, matcher, Locator.clickable.narrow(literal));
if (els.length) return els;
els = await findElements.call(this, matcher, Locator.clickable.wide(literal));
if (els.length) return els;
try {
els = await findElements.call(this, matcher, Locator.clickable.self(literal));
if (els.length) return els;
} catch (err) {
// Do nothing
}
return findElements.call(this, matcher, locator.value); // by css or xpath
}
async function proceedSee(assertType, text, context, strict = false) {
let description;
let allText;
if (!context) {
let el = await this.context;
if (el && !el.getProperty) {
// Fallback to body
el = await this.context.$('body');
}
allText = [await el.getProperty('innerText').then(p => p.jsonValue())];
description = 'web application';
} else {
const locator = new Locator(context, 'css');
description = `element ${locator.toString()}`;
const els = await this._locate(locator);
assertElementExists(els, 'context element');
allText = await Promise.all(els.map(el => el.getProperty('innerText').then(p => p.jsonValue())));
}
if (strict) {
return allText.map(elText => equals(description)[assertType](text, elText));
}
return stringIncludes(description)[assertType](text, allText.join(' | '));
}
async function findCheckable(locator, context) {
let contextEl = await this.context;
if (typeof context === 'string') {
contextEl = await findElements.call(this, contextEl, (new Locator(context, 'css')).simplify());
contextEl = contextEl[0];
}
const matchedLocator = new Locator(locator);
if (!matchedLocator.isFuzzy()) {
return findElements.call(this, contextEl, matchedLocator.simplify());
}
const literal = xpathLocator.literal(locator);
let els = await findElements.call(this, contextEl, Locator.checkable.byText(literal));
if (els.length) {
return els;
}
els = await findElements.call(this, contextEl, Locator.checkable.byName(literal));
if (els.length) {
return els;
}
return findElements.call(this, contextEl, locator);
}
async function proceedIsChecked(assertType, option) {
let els = await findCheckable.call(this, option);
assertElementExists(els, option, 'Checkable');
els = await Promise.all(els.map(el => el.getProperty('checked')));
els = await Promise.all(els.map(el => el.jsonValue()));
const selected = els.reduce((prev, cur) => prev || cur);
return truth(`checkable ${option}`, 'to be checked')[assertType](selected);
}
async function findFields(locator) {
const matchedLocator = new Locator(locator);
if (!matchedLocator.isFuzzy()) {
return this._locate(matchedLocator);
}
const literal = xpathLocator.literal(locator);
let els = await this._locate({ xpath: Locator.field.labelEquals(literal) });
if (els.length) {
return els;
}
els = await this._locate({ xpath: Locator.field.labelContains(literal) });
if (els.length) {
return els;
}
els = await this._locate({ xpath: Locator.field.byName(literal) });
if (els.length) {
return els;
}
return this._locate({ css: locator });
}
async function proceedDragAndDrop(sourceLocator, destinationLocator, options = {}) {
const src = await this._locate(sourceLocator);
assertElementExists(src, sourceLocator, 'Source Element');
const dst = await this._locate(destinationLocator);
assertElementExists(dst, destinationLocator, 'Destination Element');
// Note: Using private api ._clickablePoint becaues the .BoundingBox does not take into account iframe offsets!
const dragSource = await src[0]._clickablePoint();
const dragDestination = await dst[0]._clickablePoint();
// Drag start point
await this.page.mouse.move(dragSource.x, dragSource.y, { steps: 5 });
await this.page.mouse.down();
// Drag destination
await this.page.mouse.move(dragDestination.x, dragDestination.y, { steps: 5 });
await this.page.mouse.up();
await this._waitForAction();
}
async function proceedSeeInField(assertType, field, value) {
const els = await findFields.call(this, field);
assertElementExists(els, field, 'Field');
const el = els[0];
const tag = await el.getProperty('tagName').then(el => el.jsonValue());
const fieldType = await el.getProperty('type').then(el => el.jsonValue());
const proceedMultiple = async (elements) => {
const fields = Array.isArray(elements) ? elements : [elements];
const elementValues = [];
for (const element of fields) {
elementValues.push(await element.getProperty('value').then(el => el.jsonValue()));
}
if (typeof value === 'boolean') {
equals(`no. of items matching > 0: ${field}`)[assertType](value, !!elementValues.length);
} else {
if (assertType === 'assert') {
equals(`select option by ${field}`)[assertType](true, elementValues.length > 0);
}
elementValues.forEach(val => stringIncludes(`fields by ${field}`)[assertType](value, val));
}
};
if (tag === 'SELECT') {
const selectedOptions = await el.$$('option:checked');
// locate option by values and check them
if (value === '') {
return proceedMultiple(selectedOptions);
}
const options = await filterFieldsByValue(selectedOptions, value, true);
return proceedMultiple(options);
}
if (tag === 'INPUT') {
if (fieldType === 'checkbox' || fieldType === 'radio') {
if (typeof value === 'boolean') {
// Filter by values
const options = await filterFieldsBySelectionState(els, true);
return proceedMultiple(options);
}
const options = await filterFieldsByValue(els, value, true);
return proceedMultiple(options);
}
return proceedMultiple(els[0]);
}
const fieldVal = await el.getProperty('value').then(el => el.jsonValue());
return stringIncludes(`fields by ${field}`)[assertType](value, fieldVal);
}
async function filterFieldsByValue(elements, value, onlySelected) {
const matches = [];
for (const element of elements) {
const val = await element.getProperty('value').then(el => el.jsonValue());
let isSelected = true;
if (onlySelected) {
isSelected = await elementSelected(element);
}
if ((value == null || val.indexOf(value) > -1) && isSelected) {
matches.push(element);
}
}
return matches;
}
async function filterFieldsBySelectionState(elements, state) {
const matches = [];
for (const element of elements) {
const isSelected = await elementSelected(element);
if (isSelected === state) {
matches.push(element);
}
}
return matches;
}
async function elementSelected(element) {
const type = await element.getProperty('type').then(el => el.jsonValue());
if (type === 'checkbox' || type === 'radio') {
return element.getProperty('checked').then(el => el.jsonValue());
}
return element.getProperty('selected').then(el => el.jsonValue());
}
function isFrameLocator(locator) {
locator = new Locator(locator);
if (locator.isFrame()) return locator.value;
return false;
}
function assertElementExists(res, locator, prefix, suffix) {
if (!res || res.length === 0) {
throw new ElementNotFound(locator, prefix, suffix);
}
}
function $XPath(element, selector) {
const found = document.evaluate(selector, element || document.body, null, 5, null);
const res = [];
let current = null;
while (current = found.iterateNext()) {
res.push(current);
}
return res;
}
function targetCreatedHandler(page) {
if (!page) return;
this.withinLocator = null;
page.on('load', (frame) => {
page.$('body')
.catch(() => null)
.then(context => this.context = context);
});
page.on('console', (msg) => {
this.debugSection(`Browser:${ucfirst(msg.type())}`, (msg._text || '') + msg.args().join(' '));
consoleLogStore.add(msg);
});
}
|
// Copyright IBM Corp. 2016,2017. All Rights Reserved.
// Node module: strong-soap
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
// @ts-check
"use strict";
var helper = require("./helper");
var builtinTypes;
function getBuiltinTypes() {
if (builtinTypes) return builtinTypes;
builtinTypes = {};
var SimpleType = require("./xsd/simpleType");
for (let t in helper.schemaTypes) {
let type = new SimpleType(
"xsd:simpleType",
{ name: t, "xmlns:xsd": helper.namespaces.xsd },
{}
);
type.targetNamespace = helper.namespaces.xsd;
type.jsType = helper.schemaTypes[t];
builtinTypes[t] = type;
}
return builtinTypes;
}
exports.getBuiltinTypes = getBuiltinTypes;
exports.getBuiltinType = function (name) {
return getBuiltinTypes()[name];
};
function parse(value, type) {
var SimpleType = require("./xsd/simpleType");
}
|
/*!
* jquery.fancytree.multi.js
*
* Allow multiple selection of nodes by mouse or keyboard.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2018, Martin Wendt (http://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.28.1
* @date 2018-03-19T06:47:37Z
*/
;(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery", "./jquery.fancytree" ], factory );
} else if ( typeof module === "object" && module.exports ) {
// Node/CommonJS
require("./jquery.fancytree");
module.exports = factory(require("jquery"));
} else {
// Browser globals
factory( jQuery );
}
}( function( $ ) {
"use strict";
/*******************************************************************************
* Private functions and variables
*/
// var isMac = /Mac/.test(navigator.platform);
/*******************************************************************************
* Extension code
*/
$.ui.fancytree.registerExtension({
name: "multi",
version: "2.28.1",
// Default options for this extension.
options: {
allowNoSelect: false, //
mode: "sameParent", //
// Events:
// beforeSelect: $.noop // Return false to prevent cancel/save (data.input is available)
},
treeInit: function(ctx){
this._superApply(arguments);
this.$container.addClass("fancytree-ext-multi");
if( ctx.options.selectMode === 1 ) {
$.error("Fancytree ext-multi: selectMode: 1 (single) is not compatible.");
}
},
nodeClick: function(ctx) {
var //pluginOpts = ctx.options.multi,
tree = ctx.tree,
node = ctx.node,
activeNode = tree.getActiveNode() || tree.getFirstChild(),
isCbClick = ctx.targetType === "checkbox",
isExpanderClick = ctx.targetType === "expander",
eventStr = $.ui.fancytree.eventToString(ctx.originalEvent);
switch( eventStr ) {
case "click":
if( isExpanderClick ) { break; } // Default handler will expand/collapse
if( !isCbClick ) {
tree.selectAll(false);
// Select clicked node (radio-button mode)
node.setSelected();
}
// Default handler will toggle checkbox clicks and activate
break;
case "shift+click":
// node.debug("click")
tree.visitRows(function(n){
// n.debug("click2", n===node, node)
n.setSelected();
if( n === node ) { return false; }
}, {
start: activeNode,
reverse: activeNode.isBelowOf(node)
});
break;
case "ctrl+click":
case "meta+click": // Mac: [Command]
node.toggleSelected();
return;
}
return this._superApply(arguments);
},
nodeKeydown: function(ctx) {
var tree = ctx.tree,
node = ctx.node,
eventStr = $.ui.fancytree.eventToString(ctx.originalEvent);
switch( eventStr ) {
case "up":
case "down":
tree.selectAll(false);
node.navigate(event.which, true);
tree.getActiveNode().setSelected();
break;
case "shift+up":
case "shift+down":
node.navigate(event.which, true);
tree.getActiveNode().setSelected();
break;
}
return this._superApply(arguments);
}
});
// Value returned by `require('jquery.fancytree..')`
return $.ui.fancytree;
})); // End of closure
|
/**
* @file Afferent 传入
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import {IconWrapper} from '../index';
export default IconWrapper(
'Afferent',
true,
(h, props) => (
<svg
width={props.size}
height={props.size}
viewBox="0 0 48 48"
fill="none"
>
<path
d="M42 13.875V9C42 7.34315 40.6569 6 39 6H9C7.34315 6 6 7.34315 6 9V39C6 40.6569 7.34315 42 9 42H39C40.6569 42 42 40.6569 42 39V34.6875"
stroke={props.colors[0]}
stroke-width={props.strokeWidth}
stroke-linecap={props.strokeLinecap}
stroke-linejoin={props.strokeLinejoin}
/>
<path
d="M42 24L24 24"
stroke={props.colors[0]}
stroke-width={props.strokeWidth}
stroke-linecap={props.strokeLinecap}
/>
<path
d="M30 30L24 24L30 18"
stroke={props.colors[0]}
stroke-width={props.strokeWidth}
stroke-linecap={props.strokeLinecap}
stroke-linejoin={props.strokeLinejoin}
/>
</svg>
)
);
|
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var colorConvert = require('color-convert');
var wrapAnsi16 = function wrapAnsi16(fn, offset) {
return function () {
var code = fn.apply(colorConvert, arguments);
return '\x1B[' + (code + offset) + 'm';
};
};
var wrapAnsi256 = function wrapAnsi256(fn, offset) {
return function () {
var code = fn.apply(colorConvert, arguments);
return '\x1B[' + (38 + offset) + ';5;' + code + 'm';
};
};
var wrapAnsi16m = function wrapAnsi16m(fn, offset) {
return function () {
var rgb = fn.apply(colorConvert, arguments);
return '\x1B[' + (38 + offset) + ';2;' + rgb[0] + ';' + rgb[1] + ';' + rgb[2] + 'm';
};
};
function assembleStyles() {
var codes = new Map();
var styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
// Bright color
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
// Fix humans
styles.color.grey = styles.color.gray;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = Object.keys(styles)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var groupName = _step.value;
var group = styles[groupName];
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (var _iterator3 = Object.keys(group)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var styleName = _step3.value;
var style = group[styleName];
styles[styleName] = {
open: '\x1B[' + style[0] + 'm',
close: '\x1B[' + style[1] + 'm'
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return) {
_iterator3.return();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
Object.defineProperty(styles, 'codes', {
value: codes,
enumerable: false
});
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
var ansi2ansi = function ansi2ansi(n) {
return n;
};
var rgb2rgb = function rgb2rgb(r, g, b) {
return [r, g, b];
};
styles.color.close = '\x1B[39m';
styles.bgColor.close = '\x1B[49m';
styles.color.ansi = {
ansi: wrapAnsi16(ansi2ansi, 0)
};
styles.color.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 0)
};
styles.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
styles.bgColor.ansi = {
ansi: wrapAnsi16(ansi2ansi, 10)
};
styles.bgColor.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 10)
};
styles.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = Object.keys(colorConvert)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var key = _step2.value;
if (_typeof(colorConvert[key]) !== 'object') {
continue;
}
var suite = colorConvert[key];
if (key === 'ansi16') {
key = 'ansi';
}
if ('ansi16' in suite) {
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
}
if ('ansi256' in suite) {
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
}
if ('rgb' in suite) {
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
return styles;
}
// Make the export immutable
Object.defineProperty(module, 'exports', {
enumerable: true,
get: assembleStyles
});
|
// ==UserScript==
// @name ASO Google Play
// @namespace https://github.com/ayoubfletcher
// @version 2.2
// @description Your tool kit to speed up your aso abilities.
// @author Ayoub Fletcher
// @match https://play.google.com/store/apps/details?id=*
// @grant GM_xmlhttpRequest
// @require http://code.jquery.com/jquery-1.12.4.min.js
// @connect appbrain.com
// @downloadURL https://github.com/ayoubfletcher/ASO-Google-Play/raw/master/aso-google-play.user.js
// @updateURL https://github.com/ayoubfletcher/ASO-Google-Play/raw/master/aso-google-play.user.js
// ==/UserScript==
/*******************************************************************************************************************************
* █████╗ ██╗ ██╗ ██████╗ ██╗ ██╗██████╗ ███████╗██╗ ███████╗████████╗ ██████╗██╗ ██╗███████╗██████╗ *
* ██╔══██╗╚██╗ ██╔╝██╔═══██╗██║ ██║██╔══██╗ ██╔════╝██║ ██╔════╝╚══██╔══╝██╔════╝██║ ██║██╔════╝██╔══██╗ *
* ███████║ ╚████╔╝ ██║ ██║██║ ██║██████╔╝ █████╗ ██║ █████╗ ██║ ██║ ███████║█████╗ ██████╔╝ *
* ██╔══██║ ╚██╔╝ ██║ ██║██║ ██║██╔══██╗ ██╔══╝ ██║ ██╔══╝ ██║ ██║ ██╔══██║██╔══╝ ██╔══██╗ *
* ██║ ██║ ██║ ╚██████╔╝╚██████╔╝██████╔╝ ██║ ███████╗███████╗ ██║ ╚██████╗██║ ██║███████╗██║ ██║ *
* ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ *
* (~‾▿‾)~ DONATE ME PLEASE, I NEED MONEY TO LIVE (ง •̀_•́)ง (╥_╥) *
* WANT TO EDIT THE SCRIPT READ THE STUFF IN THE BOTTOM IF YOU BREAK IT DON'T CRY NO MONEY NO FIX *
* SEND MONEY OR I WILL MAKE YOUR ACCOUNT DISAPPEAR YOHAAA (∩`-´)⊃━☆゚.*・。゚ *
* (\____/) *
* ( ͡ ͡° ͜ ʖ ͡ ͡°) *
* \╭☞ \╭☞ HERE'S MY PAYAPL: https://www.paypal.me/ayoubfletcher *
* I KNOW I'M WASTING TIME WRITING THAT CRAP BECAUSE YOU GUYS ARE STINGY *
* IF YOU FOUND IT OFFSENSIVE DON'T BLAME SEND ME MONEY ¯\_(ツ)_/¯. *
* DAAH I WROTE THAT STUFF TO MAKE MYSELF LOOK PROFESSIONAL (⌐■_■) KAPPA AND TRUST ME THOSE EMOJIS SO FUN TO PLAY WITH. *
* OKAY WHATEVER HERE'S THE GITHUB REPO FOR THAT CRAPPY SCRIPT IF THERE WAS AN UPDATE I WOULD POST IT THERE: *
* (╯°□°)╯︵ -> https://github.com/ayoubfletcher/ASO-Google-Play *
* ( •_•)>⌐■-■ FINAL WORDS IF YOU CANNOT BUY ME A COFFEE BECAUSE ARE "STINGY" WISH ME ATLEAST A GOOD LUCK *
* JUST KIDDING GOOD LUCK BUDDY SORRY FOR WASTING YOUR TIME BUT I'M JUST HAVE FUN PLAYING WITH THOSE EMOJIS “ヽ(´▽`)ノ”. *
* IF YOU GOT ANY ISSUE WITH THE SCRIPT SEND ME A MESSAGE THROUGH PAYPAL (¬‿¬) OR THROUGH GITHUB REPO. *
*******************************************************************************************************************************/
/**
* @Note For faster responds consider disabling developers information or app information, or whatever you are free.
*/
/**
* Parameters to toggle the extraction of the fields
* @param short_description To turn on extracting the short description of the app: value [true / false].
* @param feature_image To turn on extracting the feature image of app: value [true / false].
* @param app turn on extracting the app information: value [true / false].
* @param dev To turn on extracting the developer app information and inject into the page: value [true / false].
*/
const controls = {
short_description: true,
feature_image: true,
app: true,
dev: true
}
// To get rid of the warning of scripts
var $ = window.$;
/**
* Static urls don't change.
*/
const app_brain_url = "https://www.appbrain.com/app/";
const dev_barin_url = "https://www.appbrain.com/dev/";
let app_not_found = false;
// The status of the generating
let processing = false;
// Interval checker to reload the page if an ajax call has been accrued no need to change
const INTERVAL_TIMER_CHECKER = 500;
/**
* HTML Template for styling and showing the elements
* If you want to style just do it
*/
const styles_html = "<style>#aso-data{padding: 10px 0; text-align: center;}#aso-data i{margin-top: 10px;}#aso-data-loading{padding: 10px; text-align: center; margin-bottom: 10px; font-weight: bold;}#honor{color: #2c1912;}#aso-data i a{color: #546e7a; font-weight: bold; -webkit-transition: all 200ms; /* Safari */ transition: all 200ms;}#aso-data i a:hover{color: #29434e;}#app-data, #dev-data{text-align: center; padding: 5px;}#aso-data li{display: inline-block; width: 110px; margin: 0 3px; margin-bottom: 10px; background: #F7F7F7}.icon{height: 50px; background-position: 50% 50%; background-repeat: no-repeat; background-size: contain; position: relative}.app-age{background-color: #04B5B0; background-image: url('https://www.appbrain.com/static/images/infotile-age.png')}.app-installs{background-color: #069bf7; background-image: url('https://www.appbrain.com/static/images/infotile-download.png')}.app-ranking{background-color: #F4460A; background-position: 0 50%; background-image: url('https://www.appbrain.com/static/images/infotile-ranking.png')}.app-size{background-color: #EA6E00; background-image: url('https://www.appbrain.com/static/images/infotile-size.png')}.app-update{background-color: #e6a509; background-image: url('https://www.appbrain.com/static/images/infotile-update.png')}.app-android{background-color: #EB008B; background-image: url('https://www.appbrain.com/static/images/infotile-android.png')}.dev-age{background-color: #1E88E5; background-image: url('https://www.appbrain.com/static/images/infotile-age.png')}.dev-total-installs{background-color: #E65100; background-image: url('https://www.appbrain.com/static/images/infotile-download.png')}.dev-total-apps{background-color: #EB008B; background-image: url('https://www.appbrain.com/static/images/infotile-appcount.png')}.dev-average-rating{background-color: #80af3f; background-image: url('https://www.appbrain.com/static/images/infotile-rating.png')}.dev-recent-rating{background-color: #80af3f; background-image: url('https://www.appbrain.com/static/images/infotile-recent-rating.png')}.dev-total-rating{background-color: #80af3f; background-image: url('https://www.appbrain.com/static/images/infotile-rating-count.png')}#aso-data .value{text-align: center; padding: 15px 5px; font-family: Arial; font-size: 12px; font-weight: bold; color: #666}#aso-data .title{text-align: center; padding: 5px; font-family: Arial; font-size: 13px; color: #999; border-top: 1px solid #E1E1E1}#aso-data .header{font-size: 18px; padding: 20px 10px; color: #666; text-transform: uppercase; font-family: Arial; font-weight: bold}#description{width: 100%; float: left; margin-bottom: 20px;}#description .content{color: #fff; padding: 10px; background: #666; font-family: Arial; font-size: 15px; text-align: center}#download_apk{font-size: 14px; height: 36px; line-height: 34px; padding: 0 20px; -webkit-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transition: all .2s; transition: all .2s; -webkit-user-select: none; background-color: #fff; border: 1px solid rgba(0, 0, 0, 0.17); color: #ffffff; cursor: pointer; display: inline-block; font-family: 'Roboto', sans-serif; font-size: 14px; font-style: normal; font-weight: 500; height: 36px; line-height: 34px; min-width: 40px; padding: 0 20px; position: relative; text-align: center; text-decoration: none; white-space: nowrap; vertical-align: middle; background-color: #546e7a;}#download_apk:hover{-webkit-box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.27); box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.27); cursor: pointer; background-color: #29434e;}#aso-feature-image{padding-bottom: 20px; text-align: center;}#aso-feature-image i{display: block; margin-bottom: 10px; font-weight: bold;}</style>";
const aso_html_template = "<div id='aso-data'>{%DATA_HTML%} <i>Made by <a href='https://github.com/ayoubfletcher/ASO-Google-Play'>Ayoub Fletcher</a> with LOVE ❤️.</i><p>Honorable Mention <b id='honor'>Re-skinning</b> 🕷️.</p></div>";
const desc_html_template = "<ul id='description'><div class='content'>{%SHORT_DESCRIPTION%}</div></ul>";
const aso_html_loading_template = "<div id='aso-data-loading'>LOADING DATA 👾 ...</div>"
const app_html_template = "<ul id='app-data'> <div class='header'> App Information</div><li> <div class='top'> <div class='icon app-installs'></div><div class='value'>{%APP_INSTALLS%}</div><div class='title'>App Installs</div></div></li><li> <div class='top'> <div class='icon app-age'></div><div class='value'>{%APP_AGE%}</div><div class='title'>App Age</div></div></li><li> <div class='top'> <div class='icon app-ranking'></div><div class='value'>{%RANKING%}</div><div class='title'>Ranking</div></div></li><li> <div class='top'> <div class='icon app-size'></div><div class='value'>{%APP_SIZE%}</div><div class='title'>App Size</div></div></li><li> <div class='top'> <div class='icon app-update'></div><div class='value'>{%LAST_UPDATE%}</div><div class='title'>Last Update</div></div></li><li> <div class='top'> <div class='icon app-android'></div><div class='value'>{%ANDROID_VERSION%}</div><div class='title'>Android Version</div></div></li></ul>";
const dev_html_template = "<ul id='dev-data'> <div class='header'> Developer Information</div><li> <div class='top'> <div class='icon dev-age'></div><div class='value'>{%DEVELOPER_AGE%}</div><div class='title'>Active since</div></div></li><li> <div class='top'> <div class='icon dev-total-apps'></div><div class='value'>{%TOTAL_APPS%}</div><div class='title'>Total apps</div></div></li><li> <div class='top'> <div class='icon dev-total-installs'></div><div class='value'>{%TOTAL_INSTALLS%}</div><div class='title'>Installs</div></div></li><li> <div class='top'> <div class='icon dev-average-rating'></div><div class='value'>{%AVERAGE_RATING%}</div><div class='title'>Average rating</div></div></li><li> <div class='top'> <div class='icon dev-recent-rating'></div><div class='value'>{%RECENT_RATING%}</div><div class='title'>Recent rating</div></div></li><li> <div class='top'> <div class='icon dev-total-rating'></div><div class='value'>{%TOTAL_RATING%}</div><div class='title'>Rating total</div></div></li></ul>";
const download_app_template = "<a id='download_apk' href='https://apkpure.com/{%PACKAGE_NAME%}/{%PACKAGE_NAME%}/download?from=details'>Download APK</a>";
const feature_image_template = "<div id='aso-feature-image'><i>Feature Image:</i><img src='{%FEATURE_IMAGE%}' /></div>";
/**
* Messages feedback change if you want to.
*/
const app_not_found_msg = "SORRY, APP PAGE NOT FOUND ON APPBRAIN 😓!";
const fetching_app_info_msg = 'GETTING APP INFORMATIONS FROM APPBRAIN 👺 ...';
const fetching_dev_info_msg = 'GETTING DEVELOPER INFORMATIONS FROM APPBRAIN 🕵️♀️ ...';
/**
* Promise method to get http request
* @param url Target url
*/
function getHttpRequest(url) {
return new Promise((resolve, reject) => {
GM_xmlhttpRequest({
method: "GET", url: url, onload: function (response) {
if (response.status == 200) {
resolve(response.responseText);
} else {
reject('There was an error requesting: ' + url);
}
}
});
})
}
/**
* Extract fields from selector of appbrain
* @param selector Selector of html
*/
function extractField(selector) {
if(selector.find(".infotile-text-solo").length) {
return selector.find(".infotile-text-solo").text().trim();
} else {
return selector.find(".infotile-text").text().trim() + " " + selector.find(".infotile-subtext").text().trim();
}
}
/**
* Generte the aso data
*/
function generateASO() {
// Inject loading
let titleElements = $('h1');
const elemTarget = $(titleElements[titleElements.length-2]).parent().parent().parent().parent().parent()[0];
const aso_html = aso_html_template.replace('{%DATA_HTML%}', aso_html_loading_template);
// Injecting styles
$(styles_html).insertAfter(elemTarget);
$(aso_html).insertAfter(elemTarget);
// Get the pacakge name and the developer name
const package_name = location.href.split("?id=")[1].split("&")[0];
const developer = $($('a[itemprop="genre"]').parent().parent().find('a')[0]).text();
// Initialize containers of the data
var app = null;
var dev = null;
// Get the data
new Promise((resolve, reject) => {
// Extract app information
if(controls.app) {
$('#aso-data-loading').text(fetching_app_info_msg)
getHttpRequest(app_brain_url+package_name)
.then(result => {
if($(result).find('h1').text() == 'Uh oh! Page not found!') {
reject();
} else {
let data = $(result).find('.infotiles');
// extract the data of app
app = {
installs: extractField(data.find(".infotile-top-installs").parent()),
age: extractField(data.find(".infotile-top-age").parent()),
ranking: extractField(data.find(".infotile-top-ranking").parent()),
size: extractField(data.find(".infotile-top-size").parent()),
update: extractField(data.find(".infotile-top-lastupdated").parent()),
android_version: extractField(data.find(".infotile-top-androidversion").parent()),
short_description: $(result).find('.app-short-description').text()
};
}
resolve();
}).catch(_ => {
reject();
})
} else {
resolve();
}
}).then(_ => {
// Extract developer information
if(controls.dev) {
// Get the developer ifnormation
return new Promise((resolve, reject) => {
if(!app_not_found) {
$('#aso-data-loading').text(fetching_dev_info_msg)
getHttpRequest(dev_barin_url+developer)
.then(result => {
let data = $(result).find(".infotiles");
// extract the data of developer
dev = {
age: extractField(data.find(".infotile-top-age").parent()),
total_apps: extractField(data.find(".infotile-top-appcount").parent()),
total_installs: extractField(data.find(".infotile-top-total-installs").parent()),
average_rating: extractField(data.find(".infotile-top-rating").parent()),
total_rating: extractField(data.find(".infotile-top-rating-count").parent()),
rating_recent: extractField(data.find(".infotile-top-recent-rating").parent())
};
resolve();
}).catch(_ => {
resolve();
})
}
})
} else {
return Promise.resolve();
}
})
// Inject data in to the dom
.then(_ => {
// Inject the data into page
injectData(app, dev, package_name);
})
.catch(_ => {
// Inject the data into page
app_not_found = true;
$('#aso-data-loading').text(app_not_found_msg);
injectData(app, dev, package_name);
})
}
/**
* Unescape text
* @param {str} text Text to unescape
*/
function unescapeText(text) {
const elementDiv = document.createElement('div');
elementDiv.innerHTML = text;
return elementDiv.innerText;
}
/**
* Retrieve short description of the app
*/
function shortDescription() {
const metas = document.getElementsByTagName('meta');
const scripts = document.getElementsByTagName('script');
// Check if description was protected
for(var i=0; i < scripts.length; i++) {
if(scripts[i].innerHTML.indexOf("key: 'ds:5', isError: false") > 0) {
var scriptBlock = scripts[i].innerHTML.split(",[null,");
return scriptBlock[1].substring(1, scriptBlock[1].indexOf('"]'));
}
}
// Get description if was on metas
for(let i = 0; i < metas.length; i++) {
if(metas[i].getAttribute('name') == 'description') {
return metas[i].getAttribute('content');
}
}
}
/**
* Retrieve feature image of the app
*/
function getFeatureImage() {
const metas = document.getElementsByTagName('meta');
// Get feature image if was on metas
for(let i = 0; i < metas.length; i++) {
if(metas[i].getAttribute('property') == 'og:image') {
return metas[i].getAttribute('content');
}
}
}
/**
* Inject the data into the DOM of the page
* @param app App object
* @param developer Developer object
*/
function injectData(app, developer, packageName) {
// Add the app information
let app_html = ""
if(app != null) {
app_html = app_html_template.replace("{%APP_INSTALLS%}", app.installs)
.replace("{%APP_AGE%}", app.age)
.replace("{%RANKING%}", app.ranking)
.replace("{%APP_SIZE%}", app.size)
.replace("{%LAST_UPDATE%}", app.update)
.replace("{%ANDROID_VERSION%}", app.android_version);
}
// Adding the developer information
let dev_html = "";
if(developer != null) {
dev_html = dev_html_template
.replace("{%DEVELOPER_AGE%}", developer.age)
.replace("{%TOTAL_APPS%}", developer.total_apps)
.replace("{%TOTAL_INSTALLS%}", developer.total_installs)
.replace("{%AVERAGE_RATING%}", developer.average_rating)
.replace("{%RECENT_RATING%}", developer.rating_recent)
.replace("{%TOTAL_RATING%}", developer.total_rating);
}
// Addng the short description
let desc_html = "";
if(controls.short_description) {
desc_html = desc_html_template.replace("{%SHORT_DESCRIPTION%}", app.short_description);
}
// App not found
let app_not_found_html = "";
if(app_not_found) {
app_not_found_html = aso_html_loading_template;
}
// Conbining the data
let aso_html = aso_html_template.replace('{%DATA_HTML%}',
desc_html + // Adding the short description
app_html + // Adding the app information
dev_html + // Adding the developer information
app_not_found_html // Not found
)
// Inject result
$('#aso-data').html(aso_html);
// Add the not found message
if(app_not_found) {
$('#aso-data-loading').text(app_not_found_msg);
}
const download_apk_html = download_app_template.replace(/{%PACKAGE_NAME%}/g, packageName)
// BUG fix for weird installer element, trust me it's actually weird
const installbtn_selector = 'button[aria-label="Install"]';
let installBtnElements = null;
if(document.querySelector(installbtn_selector) !== null) {
installBtnElements = $(installbtn_selector);
} else {
installBtnElements = $('button[aria-label="Installer"]');
}
const installElem = $(installBtnElements[installBtnElements.length-1]).parent()[0];
$(download_apk_html).insertBefore(installElem);
// Inject feature image
if(controls.feature_image) {
const featureImage = getFeatureImage();
if(featureImage != null) {
// const topHeaderElem = $('#aso-data').parent().parent().parent();
const feature_image_html = feature_image_template.replace('{%FEATURE_IMAGE%}', featureImage);
$(feature_image_html).insertAfter('#aso-data');
}
}
processing = false;
}
/**
* Run method to reload the data after the ajax requests of page
*/
function run() {
// Save the current page url
let current_app_url = location.href;
// Check if the current id not the same
if(document.getElementById('aso-data') == null && !processing) {
processing = true;
generateASO()
}
setInterval(function() {
if(current_app_url != location.href) {
location.reload()
}
}, INTERVAL_TIMER_CHECKER);
}
/** Main method script */
(function() {
'use strict';
run();
})();
|
// SPDX-License-Identifier: Apache-2.0
import React, { useState, useEffect, forwardRef, useImperativeHandle } from "react";
import { getNumOfUniqueTokens, getTokenDetails, getAvailableAndRetired, formatDate } from "../services/contract-functions";
import TokenInfoModal from "./token-info-modal";
import Spinner from "react-bootstrap/Spinner";
import Table from "react-bootstrap/Table";
export const Dashboard = forwardRef(({ provider, signedInAddress, roles }, ref) => {
// Modal display and token it is set to
const [modalShow, setModalShow] = useState(false);
const [selectedToken, setSelectedToken] = useState({});
// Balances of my tokens and tokens I've issued
const [myBalances, setMyBalances] = useState([]);
const [myIssuedTokens, setMyIssuedTokens] = useState([]);
const [fetchingTokens, setFetchingTokens] = useState(false);
const [error, setError] = useState("");
const isDealer = (roles[0] === true || roles[1] === true || roles[2] === true || roles[3] === true);
function handleOpenTokenInfoModal(token) {
setSelectedToken(token);
setModalShow(true);
}
// Allows the parent component to refresh balances on clicking the Dashboard button in the navigation
useImperativeHandle(ref, () => ({
refresh() {
handleRefresh();
}
}));
function handleRefresh() {
// clear localStorage
let localStorage = window.localStorage;
localStorage.setItem('token_balances', null);
setFetchingTokens(true);
fetchBalances();
}
async function fetchBalances() {
let newMyBalances = [];
let newMyIssuedTokens = [];
try {
// First, fetch number of unique tokens
let numOfUniqueTokens = (await getNumOfUniqueTokens(provider)).toNumber();
// Iterate over each tokenId and find balance of signed in address
for (let i = 1; i <= numOfUniqueTokens; i++) {
// Fetch token details
let tokenDetails = (await getTokenDetails(provider, i));
// Format unix times to Date objects
let fromDate = formatDate(tokenDetails.fromDate.toNumber());
let thruDate = formatDate(tokenDetails.thruDate.toNumber());
let automaticRetireDate = formatDate(tokenDetails.automaticRetireDate.toNumber());
// Format tokenType from tokenTypeId
let tokenTypes = [
"Renewable Energy Certificate",
"Carbon Emissions Offset",
"Audited Emissions"
];
// Fetch available and retired balances
let balances = (await getAvailableAndRetired(provider, signedInAddress, i));
let availableBalance = balances[0].toNumber();
let retiredBalance = balances[1].toNumber();
// Format decimal points for audited emissions tokens
if (tokenDetails.tokenTypeId === 3) {
availableBalance = (availableBalance / 1000).toFixed(3);
retiredBalance = (retiredBalance / 1000).toFixed(3);
}
let token = {
tokenId: tokenDetails.tokenId.toNumber(),
tokenType: tokenTypes[tokenDetails.tokenTypeId - 1],
availableBalance: availableBalance,
retiredBalance: retiredBalance,
issuer: tokenDetails.issuer,
issuee: tokenDetails.issuee,
fromDate: fromDate,
thruDate: thruDate,
automaticRetireDate: automaticRetireDate,
metadata: tokenDetails.metadata,
manifest: tokenDetails.manifest,
description: tokenDetails.description,
}
// Push token to myBalances or myIssuedTokens in state
if (token.availableBalance > 0 || token.retiredBalance > 0) {
newMyBalances.push(token);
}
if (token.issuer.toLowerCase() === signedInAddress.toLowerCase()) {
newMyIssuedTokens.push(token);
}
}
} catch (error) {
console.log(error);
setError("Could not connect to contract on the selected network. Check your wallet provider settings.");
}
setMyBalances(newMyBalances);
setMyIssuedTokens(newMyIssuedTokens);
setFetchingTokens(false);
setError("");
}
// If address and provider detected then fetch balances
useEffect(() => {
if (provider && signedInAddress) {
if (myBalances !== [] && !fetchingTokens) {
setFetchingTokens(true);
fetchBalances();
}
}
}, [signedInAddress]);
function pointerHover(e) {
e.target.style.cursor = "pointer";
}
return (
<>
<TokenInfoModal
show={modalShow}
provider={provider}
token={selectedToken}
body="hello"
onHide={() => {
setModalShow(false);
setSelectedToken({});
}}
/>
<h2>Dashboard</h2>
<p className="mb-1">View your token balances and tokens you've issued.</p>
<p className="text-danger">{error}</p>
<div className={fetchingTokens ? "dimmed" : ""}>
{fetchingTokens && (
<div className="text-center my-4">
<Spinner animation="border" role="status">
<span className="sr-only">Loading...</span>
</Spinner>
</div>
)}
{(signedInAddress) &&
<div className="mb-4">
<h4>Your Tokens</h4>
<Table hover size="sm">
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Balance</th>
<th>Retired</th>
</tr>
</thead>
<tbody>
{(myBalances !== [] && !fetchingTokens) &&
myBalances.map((token) => (
<tr
key={token.tokenId}
onClick={() => handleOpenTokenInfoModal(token)}
onMouseOver={pointerHover}
className={`${(Number(token.availableBalance) <= 0) ? "table-secondary" : ""}`}
>
<td>{token.tokenId}</td>
<td>{token.tokenType}</td>
<td>{token.availableBalance}</td>
<td>{token.retiredBalance}</td>
</tr>
))}
</tbody>
</Table>
</div>
}
{/* Only display issued tokens if owner or dealer */}
{(isDealer) &&
<div className="mt-4">
<h4>Tokens You've Issued</h4>
<Table hover size="sm">
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{(myIssuedTokens !== [] && !fetchingTokens) &&
myIssuedTokens.map((token) => (
<tr
key={token.tokenId}
onClick={() => handleOpenTokenInfoModal(token)}
onMouseOver={pointerHover}
>
<td>{token.tokenId}</td>
<td>{token.tokenType}</td>
<td>{token.description}</td>
</tr>
))}
</tbody>
</Table>
</div>
}
</div>
</>
);
});
export default Dashboard;
|
"use strict";
var Keyboard = require('./Keyboard.js');
var Mouse = require('./Mouse.js');
module.exports = {
keys : Keyboard.keys,
Keyboard : Keyboard.Keyboard,
Mouse : Mouse
};
|
const express = require('express')
require('dotenv').config();
const app = express();
const port = process.env.PORT || 5000;
app.use(cors());
app.use(express.json());
const uri = process.env.ATLAS_URI;
mongoose.connect(uri, {useNewUrlParser: true, useCreateIndex: true }
);
const connection = mongoose.connection;
connection.once('open', () => {
console.log("Mongoose database connection established successfully");
})
app.listen(port, ()=> {
console.log(`Server is running on port : ${port}`);
});
|
import styled from 'styled-components';
export const MainBodyWrapper = styled.section`
background: ${props => props.theme.background};
`
export const SinglePostCard = styled.article`
border:none;
box-shadow:none;
background: ${props => props.theme.background};
.card-image{
border:solid 1px ${props => props.theme.panel};
line-height:0;
img{
width:100%;
}
}
.card-content{
padding:50px 100px;
color: ${props => props.theme.color};
@media(max-width:767px){
padding:30px 10px;
}
}
a{
color:#41a4e6;
}
.title{
font-weight:800;
font-size:28px;
color: ${props => props.theme.title};
@media(max-width:768px){
font-size:20px;
line-height:1.3;
}
a{
color: ${props => props.theme.title};
transition:all 0.4s ease;
&:hover{
color:#41a4e6 !important;
}
}
}
.post-meta{
font-weight:800;
font-size:12px;
p, a{
font-size:12px;
}
}
.arrow-right{
border-left: 5px solid #41a4e6;
}
.card-footer{
margin-top:30px;
border-top:solid 2px ${props => props.theme.panel};
}
.user-wrapper{
p, a{
font-size:13px;
}
a{
color: ${props => props.theme.author};
}
}
`
|
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$(document).ready(function(){
$(document).on('click','.pagination a',function(e){
e.preventDefault();
var page = $(this).attr('href').split('page=')[1];
var query = $('#search').val();
var sort = $('#hidden_quantity_type').val();
fetch_data(page,query,sort)
});
function fetch_data(page,query,sort){
$.ajax({
type:"get",
url : "product/fetch_data?page="+page+"&query="+query+"&sort="+sort,
success:function(data)
{
$('#table_data').html(data);
if (sort == 1 ) {
$('#hidden_quantity_type').attr('value','1');
} else if (sort == 2 )
{
$('#hidden_quantity_type').attr('value','2');
} else if (sort == 3 ) {
$('#hidden_quantity_type').attr('value','3');
}else if (sort == 4 ) {
$('#hidden_quantity_type').attr('value','4');
}
}
})
}
$('#form-search').submit(function(e){
e.preventDefault();
var query = $('#search').val();
var page = $('#hidden_page').val();
var sort = $('#hidden_quantity_type').attr('value','');
fetch_data(page,query,sort);
})
$(document).on('click', '.quantity', function(e){
var query = $('#search').val();
var page = $('#hidden_page').val();
var sort = $('#remaining').val();
fetch_data(page,query,sort);
})
$(document).on('click', '.quantity_out', function(e){
var query = $('#search').val();
var page = $('#hidden_page').val();
var sort = $('#out').val();
fetch_data(page,query,sort);
})
$(document).on('click', '.love', function(e){
var query = $('#search').val();
var page = $('#hidden_page').val();
var sort = $('#love').val();
fetch_data(page,query,sort);
})
$(document).on('click', '.notLove', function(e){
var query = $('#search').val();
var page = $('#hidden_page').val();
var sort = $('#notLove').val();
fetch_data(page,query,sort);
})
$(document).on('click', '.edit-product', function(e){
e.preventDefault();
$('.error1').hide();
$('.error2').hide();
$('.error3').hide();
var url = $(this).attr('data-url');
e.preventDefault();
$.ajax({
type: 'get',
url: url,
success: function (response) {
$('.tittle').text(response.data.name);
$('#name-edit').val(response.data.name);
$('#quantity-edit').val(response.data.quantity);
$('#price-edit').val(response.data.price);
var html ='';
$.each(response.suppliers,function($key,$value){
if ($value['id']==response.data.supplier_id) {
html +='<option value='+$value['id']+' selected>';
html += $value['name'];
html += '</option>';
}else{
html +='<option value='+$value['id']+' >';
html += $value['name'];
html += '</option>';
}
});
$('.idSupplier').html(html);
var html1 ='';
$.each(response.categories,function($key,$value){
if ($value['id']==response.data.category_id) {
html1 +='<option value='+$value['id']+' selected>';
html1 += $value['name'];
html1 += '</option>';
}else{
html1 +='<option value='+$value['id']+' >';
html1 += $value['name'];
html1 += '</option>';
}
});
$('.idCategory').html(html1);
$('#ram-edit').val(response.data.RAM);
$('#vga-edit').val(response.data.VGA);
$('#operating_system-edit').val(response.data.operating_system);
$('#cpu-edit').val(response.data.CPU);
$('#guarantee-edit').val(response.data.guarantee);
// CKEDITOR.instances['description-edit'].setData(response.data.description);
$('#description-edit').val(response.data.description);
$('#sales_volume-edit').val(response.data.sales_volume);
var html2 ='';
$.each(response.product_image,function($key,$value){
html2 +='<img src=/uploads/'+$value['path']+' style="margin-right: 16px;width:100px; "/>';
});
$('.idImage').html(html2);
$('#form-edit').attr('data-url','/admin/product/'+response.data.id);
},
error: function (error) {
}
})
})
$('#form-edit').submit(function(e){
e.preventDefault();
var url=$(this).attr('data-url');
$.ajax({
type: "PUT",
url: url,
data: {
'name': $('#name-edit').val(),
'quantity': $('#quantity-edit').val(),
'price': $('#price-edit').val(),
'supplier_id': $('.idSupplier').val(),
'category_id': $('.idCategory').val(),
'RAM': $('#ram-edit').val(),
'VGA': $('#vga-edit').val(),
'operating_system': $('#operating_system-edit').val(),
'CPU': $('#cpu-edit').val(),
'guarantee': $('#guarantee-edit').val(),
// 'description': CKEDITOR.instances['description-edit'].getData(),
'description' : $('#description-edit').val(),
'sales_volume': $('#sales_volume-edit').val(),
'_method':'put',
},
success: function($resuld) {
if($resuld.error == 'true'){
if ($resuld.mess.name) {
$('.error1').show();
$('.error1').text($resuld.mess.name[0]);
} else {
$('.error1').hide();
}
if ($resuld.mess.quantity) {
$('.error2').show();
$('.error2').text($resuld.mess.quantity);
} else {
$('.error2').hide();
}
if ($resuld.mess.price) {
$('.error3').show();
$('.error3').text($resuld.mess.price);
} else {
$('.error3').hide();
}
}else{
var cate = '';
$.each($resuld.categories,function($key,$value){
if ($resuld.data.category_id == $value['id'])
{
cate = $value['name'];
}
});
var no = '';
if ($resuld.data.note == null || $resuld.data.note == 0)
{
no ='<button data-url="http://127.0.0.1/admin/product/like/'+$resuld.data.id+'" class="notlike"><i class="fa fa-star-o" aria-hidden="true"></i></button>';
}
else {
no ='<button data-url="http://127.0.0.1/admin/product/like/'+$resuld.data.id+'" class="like"><i class="fa fa-star" aria-hidden="true"></i></button>';
}
toastr.success($resuld.success,'Thông báo',{timeOut: 5000});
$('#name_'+$resuld.data.id).text($resuld.data.name);
$('#category_id_'+$resuld.data.id).text(cate);
$('#quantity_'+$resuld.data.id).text($resuld.data.quantity);
$('#price_'+$resuld.data.id).text($resuld.data.price);
$('#RAM_'+$resuld.data.id).text($resuld.data.RAM);
$('#VGA_'+$resuld.data.id).text($resuld.data.VGA);
$('#operating_system_'+$resuld.data.id).text($resuld.data.operating_system);
$('#CPU_'+$resuld.data.id).text($resuld.data.CPU);
$('#description_'+$resuld.data.id).text($resuld.data.description);
$('#sales_volume_'+$resuld.data.id).text($resuld.data.sales_volume);
$('#note_'+$resuld.data.id).html(no);
// location.reload();
}
},
})
})
$(document).on('click', '.btn-delete', function(e){
var url = $(this).attr('data-url');
var _this = $(this);
$('.del').click(function(){
$.ajax({
type: 'delete',
url: url,
success: function($resuld) {
// $('#delete').hide();
toastr.success($resuld.success,'Thông báo',{timeOut: 5000});
_this.parent().parent().remove();
},
})
})
})
$(document).on('click', '.notlike', function(e){
var url = $(this).attr('data-url');
e.preventDefault();
$.ajax({
type: 'get',
url: url,
success: function ($resuld) {
var no = '';
if ($resuld.data.note == null || $resuld.data.note == 0)
{
no ='<button data-url="http://127.0.0.1/admin/product/like/'+$resuld.data.id+'" class="notlike"><i class="fa fa-star-o" aria-hidden="true"></i></button>';
}
else {
no ='<button data-url="http://127.0.0.1/admin/product/like/'+$resuld.data.id+'" class="like"><i class="fa fa-star" aria-hidden="true"></i></button>';
}
$('#note_'+$resuld.data.id).html(no);
}
})
})
$(document).on('click', '.like', function(e){
var url = $(this).attr('data-url');
e.preventDefault();
$.ajax({
type: 'get',
url: url,
success: function ($resuld) {
var no = '';
if ($resuld.data.note == null || $resuld.data.note == 0)
{
no ='<button data-url="http://127.0.0.1/admin/product/like/'+$resuld.data.id+'" class="notlike"><i class="fa fa-star-o" aria-hidden="true"></i></button>';
}
else {
no ='<button data-url="http://127.0.0.1/admin/product/like/'+$resuld.data.id+'" class="like"><i class="fa fa-star" aria-hidden="true"></i></button>';
}
$('#note_'+$resuld.data.id).html(no);
}
})
})
// PRODUCT IMAGES
$(document).on('click', '.btn-del-image', function(e){
var url = $(this).attr('data-url');
var _this = $(this);
$('.del').click(function(){
$.ajax({
type: 'delete',
url: url,
success: function($resuld) {
toastr.success($resuld.success,'Thông báo',{timeOut: 5000});
_this.parent().remove();
},
})
})
})
});
|
import { config, shallowMount, mount, RouterLinkStub } from '@vue/test-utils'
import NotificationList from './NotificationList'
import Notification from '../Notification/Notification'
import Vuex from 'vuex'
import { notifications } from '~/components/utils/Notifications'
const localVue = global.localVue
localVue.filter('truncate', string => string)
config.stubs['client-only'] = '<span><slot /></span>'
config.stubs['v-popover'] = '<span><slot /></span>'
describe('NotificationList.vue', () => {
let wrapper
let mocks
let stubs
let store
let propsData
beforeEach(() => {
store = new Vuex.Store({
getters: {
'auth/isModerator': () => false,
'auth/user': () => {
return {}
},
},
})
mocks = {
$t: jest.fn(),
}
stubs = {
NuxtLink: RouterLinkStub,
}
propsData = { notifications }
})
describe('shallowMount', () => {
const Wrapper = () => {
return shallowMount(NotificationList, {
propsData,
mocks,
store,
localVue,
})
}
beforeEach(() => {
wrapper = Wrapper()
})
it('renders Notification.vue for each notification of the user', () => {
expect(wrapper.findAll(Notification)).toHaveLength(2)
})
})
describe('mount', () => {
const Wrapper = () => {
return mount(NotificationList, {
propsData,
mocks,
stubs,
store,
localVue,
})
}
beforeEach(() => {
wrapper = Wrapper()
})
describe('click on a notification', () => {
beforeEach(() => {
wrapper.find('.notification-mention-post').trigger('click')
})
it("emits 'markAsRead' with the id of the notification source", () => {
expect(wrapper.emitted('markAsRead')[0]).toEqual(['post-1'])
})
})
})
})
|
var NAVTREEINDEX14 =
{
"classIofaodel_1_1DatabaseIO.html#a9f6ca4786d0acda30aa5a36678e01e14":[3,0,129,0,67],
"classIofaodel_1_1DatabaseIO.html#a9f6ca4786d0acda30aa5a36678e01e14":[4,0,83,0,67],
"classIofaodel_1_1DatabaseIO.html#aa27ed6079b2e5e2a5501ce6eaae26b92":[4,0,83,0,80],
"classIofaodel_1_1DatabaseIO.html#aa27ed6079b2e5e2a5501ce6eaae26b92":[3,0,129,0,80],
"classIofaodel_1_1DatabaseIO.html#aa341f5eb71258aa966a7aa676d7ec13d":[4,0,83,0,48],
"classIofaodel_1_1DatabaseIO.html#aa341f5eb71258aa966a7aa676d7ec13d":[3,0,129,0,48],
"classIofaodel_1_1DatabaseIO.html#aa8dbb54dfe33fba9b1626a104f7d08fb":[3,0,129,0,21],
"classIofaodel_1_1DatabaseIO.html#aa8dbb54dfe33fba9b1626a104f7d08fb":[4,0,83,0,21],
"classIofaodel_1_1DatabaseIO.html#aa97c1e948af9484edb1bd94c69d7f59c":[3,0,129,0,49],
"classIofaodel_1_1DatabaseIO.html#aa97c1e948af9484edb1bd94c69d7f59c":[4,0,83,0,49],
"classIofaodel_1_1DatabaseIO.html#aab9ba509e4f328a3b0b0a8e13c1ac3c2":[4,0,83,0,43],
"classIofaodel_1_1DatabaseIO.html#aab9ba509e4f328a3b0b0a8e13c1ac3c2":[3,0,129,0,43],
"classIofaodel_1_1DatabaseIO.html#aac815b38e17b041379bc9c60b3daebdf":[3,0,129,0,59],
"classIofaodel_1_1DatabaseIO.html#aac815b38e17b041379bc9c60b3daebdf":[4,0,83,0,59],
"classIofaodel_1_1DatabaseIO.html#aad350dfecbdf2ac350959b4884fbe54e":[3,0,129,0,44],
"classIofaodel_1_1DatabaseIO.html#aad350dfecbdf2ac350959b4884fbe54e":[4,0,83,0,44],
"classIofaodel_1_1DatabaseIO.html#aae4765b1914fc79021ef7bfc1bf2d05d":[4,0,83,0,77],
"classIofaodel_1_1DatabaseIO.html#aae4765b1914fc79021ef7bfc1bf2d05d":[3,0,129,0,77],
"classIofaodel_1_1DatabaseIO.html#aafeb86a604c0e508c6e986e52b45b695":[4,0,83,0,13],
"classIofaodel_1_1DatabaseIO.html#aafeb86a604c0e508c6e986e52b45b695":[3,0,129,0,13],
"classIofaodel_1_1DatabaseIO.html#ab06822b944e56b3a70191db4c4ef7c70":[4,0,83,0,19],
"classIofaodel_1_1DatabaseIO.html#ab06822b944e56b3a70191db4c4ef7c70":[3,0,129,0,19],
"classIofaodel_1_1DatabaseIO.html#ab66123ec2ce83455e2e9ed49371bbdf7":[3,0,129,0,85],
"classIofaodel_1_1DatabaseIO.html#ab66123ec2ce83455e2e9ed49371bbdf7":[4,0,83,0,85],
"classIofaodel_1_1DatabaseIO.html#ab6629572e8c981fb4918264a222b26ee":[3,0,129,0,82],
"classIofaodel_1_1DatabaseIO.html#ab6629572e8c981fb4918264a222b26ee":[4,0,83,0,82],
"classIofaodel_1_1DatabaseIO.html#aba47ae4ac0576098f8dcc95f97f4ffc4":[3,0,129,0,31],
"classIofaodel_1_1DatabaseIO.html#aba47ae4ac0576098f8dcc95f97f4ffc4":[4,0,83,0,31],
"classIofaodel_1_1DatabaseIO.html#abee4560b42121df4f94453c196c15489":[4,0,83,0,60],
"classIofaodel_1_1DatabaseIO.html#abee4560b42121df4f94453c196c15489":[3,0,129,0,60],
"classIofaodel_1_1DatabaseIO.html#abf4e22b948efd7941bf4e87bcd76d85e":[4,0,83,0,33],
"classIofaodel_1_1DatabaseIO.html#abf4e22b948efd7941bf4e87bcd76d85e":[3,0,129,0,33],
"classIofaodel_1_1DatabaseIO.html#abf56b3fc1623bacfc976b2a11faef83a":[3,0,129,0,14],
"classIofaodel_1_1DatabaseIO.html#abf56b3fc1623bacfc976b2a11faef83a":[4,0,83,0,14],
"classIofaodel_1_1DatabaseIO.html#ac1b05cfb110aa54777494bbbd7aa7335":[4,0,83,0,72],
"classIofaodel_1_1DatabaseIO.html#ac1b05cfb110aa54777494bbbd7aa7335":[3,0,129,0,72],
"classIofaodel_1_1DatabaseIO.html#ac3e73424219354a4e4a1e05b981843c2":[4,0,83,0,15],
"classIofaodel_1_1DatabaseIO.html#ac3e73424219354a4e4a1e05b981843c2":[3,0,129,0,15],
"classIofaodel_1_1DatabaseIO.html#ac41aef29c30c3ee1a871be91420e0f4d":[3,0,129,0,91],
"classIofaodel_1_1DatabaseIO.html#ac41aef29c30c3ee1a871be91420e0f4d":[4,0,83,0,91],
"classIofaodel_1_1DatabaseIO.html#ac8cb8b95a41171d9a8ecb664ecd9f1fd":[3,0,129,0,69],
"classIofaodel_1_1DatabaseIO.html#ac8cb8b95a41171d9a8ecb664ecd9f1fd":[4,0,83,0,69],
"classIofaodel_1_1DatabaseIO.html#aca3fd11288750322d92dfdb9ee36ae36":[4,0,83,0,52],
"classIofaodel_1_1DatabaseIO.html#aca3fd11288750322d92dfdb9ee36ae36":[3,0,129,0,52],
"classIofaodel_1_1DatabaseIO.html#ad0ce9bfc92c4a415cc30a6ecf125c430":[4,0,83,0,0],
"classIofaodel_1_1DatabaseIO.html#ad0ce9bfc92c4a415cc30a6ecf125c430":[3,0,129,0,0],
"classIofaodel_1_1DatabaseIO.html#ad182c02069d0c0651bf0f82b2ffac7be":[3,0,129,0,61],
"classIofaodel_1_1DatabaseIO.html#ad182c02069d0c0651bf0f82b2ffac7be":[4,0,83,0,61],
"classIofaodel_1_1DatabaseIO.html#ad5fede81ea6d6ac7d9bb41c4168c9e71":[3,0,129,0,12],
"classIofaodel_1_1DatabaseIO.html#ad5fede81ea6d6ac7d9bb41c4168c9e71":[4,0,83,0,12],
"classIofaodel_1_1DatabaseIO.html#ad64fd233979fa6323af3e6868bf21608":[3,0,129,0,27],
"classIofaodel_1_1DatabaseIO.html#ad64fd233979fa6323af3e6868bf21608":[4,0,83,0,27],
"classIofaodel_1_1DatabaseIO.html#ad73810dc60c28b2f85497f2cb75bfe40":[4,0,83,0,18],
"classIofaodel_1_1DatabaseIO.html#ad73810dc60c28b2f85497f2cb75bfe40":[3,0,129,0,18],
"classIofaodel_1_1DatabaseIO.html#ad9841a54de5f481353d07e688bd9e7ec":[4,0,83,0,65],
"classIofaodel_1_1DatabaseIO.html#ad9841a54de5f481353d07e688bd9e7ec":[3,0,129,0,65],
"classIofaodel_1_1DatabaseIO.html#adbee7a165e40fed2bccb1362093f165f":[3,0,129,0,74],
"classIofaodel_1_1DatabaseIO.html#adbee7a165e40fed2bccb1362093f165f":[4,0,83,0,74],
"classIofaodel_1_1DatabaseIO.html#add3225ee3c5af1270f9d47fc7d7ccd81":[3,0,129,0,39],
"classIofaodel_1_1DatabaseIO.html#add3225ee3c5af1270f9d47fc7d7ccd81":[4,0,83,0,39],
"classIofaodel_1_1DatabaseIO.html#add6e241a3bbf0288405752713431168f":[4,0,83,0,68],
"classIofaodel_1_1DatabaseIO.html#add6e241a3bbf0288405752713431168f":[3,0,129,0,68],
"classIofaodel_1_1DatabaseIO.html#ae13a4767ab7655724d2f65f7b212c857":[4,0,83,0,32],
"classIofaodel_1_1DatabaseIO.html#ae13a4767ab7655724d2f65f7b212c857":[3,0,129,0,32],
"classIofaodel_1_1DatabaseIO.html#ae146cbf95f97d4a1f70667bfbb5d523a":[3,0,129,0,38],
"classIofaodel_1_1DatabaseIO.html#ae146cbf95f97d4a1f70667bfbb5d523a":[4,0,83,0,38],
"classIofaodel_1_1DatabaseIO.html#ae2a74ca21f94b815be03642c5d708545":[4,0,83,0,10],
"classIofaodel_1_1DatabaseIO.html#ae2a74ca21f94b815be03642c5d708545":[3,0,129,0,10],
"classIofaodel_1_1DatabaseIO.html#ae8096a3f42fd4e346d887c9b184dea31":[4,0,83,0,57],
"classIofaodel_1_1DatabaseIO.html#ae8096a3f42fd4e346d887c9b184dea31":[3,0,129,0,57],
"classIofaodel_1_1DatabaseIO.html#ae840890f34c0b8e1800fd492d650fcfb":[4,0,83,0,78],
"classIofaodel_1_1DatabaseIO.html#ae840890f34c0b8e1800fd492d650fcfb":[3,0,129,0,78],
"classIofaodel_1_1DatabaseIO.html#aead4ebc4ca90911fc49259a94b78a05a":[3,0,129,0,8],
"classIofaodel_1_1DatabaseIO.html#aead4ebc4ca90911fc49259a94b78a05a":[4,0,83,0,8],
"classIofaodel_1_1DatabaseIO.html#af492ef976742524f8f58037b19c689ed":[3,0,129,0,53],
"classIofaodel_1_1DatabaseIO.html#af492ef976742524f8f58037b19c689ed":[4,0,83,0,53],
"classIofaodel_1_1IOFactory.html":[3,0,129,2],
"classIofaodel_1_1IOFactory.html":[4,0,83,2],
"classIofaodel_1_1IOFactory.html#a341dc44a4f6421bfa8338dee0c4d4c55":[3,0,129,2,0],
"classIofaodel_1_1IOFactory.html#a341dc44a4f6421bfa8338dee0c4d4c55":[4,0,83,2,0],
"classIofaodel_1_1IOFactory.html#a62ceea1f0ae47f8727d9895a30b56260":[4,0,83,2,1],
"classIofaodel_1_1IOFactory.html#a62ceea1f0ae47f8727d9895a30b56260":[3,0,129,2,1],
"classIofaodel_1_1IOFactory.html#a846f0ad6010ac1b9680823f9e203f7cf":[3,0,129,2,2],
"classIofaodel_1_1IOFactory.html#a846f0ad6010ac1b9680823f9e203f7cf":[4,0,83,2,2],
"classIogn_1_1DashSurfaceMesh.html":[4,0,84,1],
"classIogn_1_1DashSurfaceMesh.html":[3,0,130,1],
"classIogn_1_1DashSurfaceMesh.html#a087317f4a1562062a17a39e817c30b99":[4,0,84,1,26],
"classIogn_1_1DashSurfaceMesh.html#a087317f4a1562062a17a39e817c30b99":[3,0,130,1,26],
"classIogn_1_1DashSurfaceMesh.html#a12ec63b8301249f53f18eb561dc09160":[4,0,84,1,25],
"classIogn_1_1DashSurfaceMesh.html#a12ec63b8301249f53f18eb561dc09160":[3,0,130,1,25],
"classIogn_1_1DashSurfaceMesh.html#a13b6b845ed21ea83a5d780f2cf64b581":[4,0,84,1,20],
"classIogn_1_1DashSurfaceMesh.html#a13b6b845ed21ea83a5d780f2cf64b581":[3,0,130,1,20],
"classIogn_1_1DashSurfaceMesh.html#a2aef06c9e715119c320d19c3f8549e63":[4,0,84,1,24],
"classIogn_1_1DashSurfaceMesh.html#a2aef06c9e715119c320d19c3f8549e63":[3,0,130,1,24],
"classIogn_1_1DashSurfaceMesh.html#a2fb99491593dcc22d02826a2a0bb6fa9":[4,0,84,1,18],
"classIogn_1_1DashSurfaceMesh.html#a2fb99491593dcc22d02826a2a0bb6fa9":[3,0,130,1,18],
"classIogn_1_1DashSurfaceMesh.html#a3b8ac24be477d291063fae3a22a17607":[4,0,84,1,0],
"classIogn_1_1DashSurfaceMesh.html#a3b8ac24be477d291063fae3a22a17607":[3,0,130,1,0],
"classIogn_1_1DashSurfaceMesh.html#a3f86a63ddb7c9111559bc7d27fb5ab6a":[3,0,130,1,13],
"classIogn_1_1DashSurfaceMesh.html#a3f86a63ddb7c9111559bc7d27fb5ab6a":[4,0,84,1,13],
"classIogn_1_1DashSurfaceMesh.html#a4c1de5eb0c10e2929ec573e70c3ca572":[3,0,130,1,16],
"classIogn_1_1DashSurfaceMesh.html#a4c1de5eb0c10e2929ec573e70c3ca572":[4,0,84,1,16],
"classIogn_1_1DashSurfaceMesh.html#a5c1c22971011429da9ff63a7952385d5":[3,0,130,1,22],
"classIogn_1_1DashSurfaceMesh.html#a5c1c22971011429da9ff63a7952385d5":[4,0,84,1,22],
"classIogn_1_1DashSurfaceMesh.html#a758b7cc300f077a1c18695d31c571dc7":[3,0,130,1,27],
"classIogn_1_1DashSurfaceMesh.html#a758b7cc300f077a1c18695d31c571dc7":[4,0,84,1,27],
"classIogn_1_1DashSurfaceMesh.html#a7a61ceae6db7e56c4f4361a44e9cbf09":[4,0,84,1,31],
"classIogn_1_1DashSurfaceMesh.html#a7a61ceae6db7e56c4f4361a44e9cbf09":[3,0,130,1,31],
"classIogn_1_1DashSurfaceMesh.html#a7e66e1bfbdf2c1bae12ac0901e131688":[4,0,84,1,3],
"classIogn_1_1DashSurfaceMesh.html#a7e66e1bfbdf2c1bae12ac0901e131688":[3,0,130,1,3],
"classIogn_1_1DashSurfaceMesh.html#a86a5b68e8a3b0fbd19f3b7e60da72582":[4,0,84,1,11],
"classIogn_1_1DashSurfaceMesh.html#a86a5b68e8a3b0fbd19f3b7e60da72582":[3,0,130,1,11],
"classIogn_1_1DashSurfaceMesh.html#a86e334dcf7d17a81a66b9877f252feb7":[3,0,130,1,4],
"classIogn_1_1DashSurfaceMesh.html#a86e334dcf7d17a81a66b9877f252feb7":[4,0,84,1,4],
"classIogn_1_1DashSurfaceMesh.html#a8e627e35eb1f51d31087b32a4b39cb08":[4,0,84,1,10],
"classIogn_1_1DashSurfaceMesh.html#a8e627e35eb1f51d31087b32a4b39cb08":[3,0,130,1,10],
"classIogn_1_1DashSurfaceMesh.html#a8e7ebdd4eff4becc5c278ecb89e98eda":[3,0,130,1,8],
"classIogn_1_1DashSurfaceMesh.html#a8e7ebdd4eff4becc5c278ecb89e98eda":[4,0,84,1,8],
"classIogn_1_1DashSurfaceMesh.html#a9c3eb2f5907137131f4f067621ed5883":[4,0,84,1,28],
"classIogn_1_1DashSurfaceMesh.html#a9c3eb2f5907137131f4f067621ed5883":[3,0,130,1,28],
"classIogn_1_1DashSurfaceMesh.html#aa44c93bfb258d6ba44dbef15ed0ff164":[4,0,84,1,2],
"classIogn_1_1DashSurfaceMesh.html#aa44c93bfb258d6ba44dbef15ed0ff164":[3,0,130,1,2],
"classIogn_1_1DashSurfaceMesh.html#ab1a53de8d885b83906855c8b61b2a4dc":[3,0,130,1,9],
"classIogn_1_1DashSurfaceMesh.html#ab1a53de8d885b83906855c8b61b2a4dc":[4,0,84,1,9],
"classIogn_1_1DashSurfaceMesh.html#ab742c86829b5c35d066a3a4662144233":[3,0,130,1,23],
"classIogn_1_1DashSurfaceMesh.html#ab742c86829b5c35d066a3a4662144233":[4,0,84,1,23],
"classIogn_1_1DashSurfaceMesh.html#ab81dedbf022d41158f771138b84859d5":[4,0,84,1,21],
"classIogn_1_1DashSurfaceMesh.html#ab81dedbf022d41158f771138b84859d5":[3,0,130,1,21],
"classIogn_1_1DashSurfaceMesh.html#ac08b8f95bd7794f6cb612120e466f1a6":[4,0,84,1,17],
"classIogn_1_1DashSurfaceMesh.html#ac08b8f95bd7794f6cb612120e466f1a6":[3,0,130,1,17],
"classIogn_1_1DashSurfaceMesh.html#ac6bbc2ae1f1e688791116a2899b90daa":[4,0,84,1,30],
"classIogn_1_1DashSurfaceMesh.html#ac6bbc2ae1f1e688791116a2899b90daa":[3,0,130,1,30],
"classIogn_1_1DashSurfaceMesh.html#acdf6353989f091a0c3adea37efd7a953":[3,0,130,1,12],
"classIogn_1_1DashSurfaceMesh.html#acdf6353989f091a0c3adea37efd7a953":[4,0,84,1,12],
"classIogn_1_1DashSurfaceMesh.html#ace5c715f6fcaa28e6b3b1d6e8586d7ba":[4,0,84,1,5],
"classIogn_1_1DashSurfaceMesh.html#ace5c715f6fcaa28e6b3b1d6e8586d7ba":[3,0,130,1,5],
"classIogn_1_1DashSurfaceMesh.html#ad1d368a664313f11fc21d443a23f1fb2":[3,0,130,1,14],
"classIogn_1_1DashSurfaceMesh.html#ad1d368a664313f11fc21d443a23f1fb2":[4,0,84,1,14],
"classIogn_1_1DashSurfaceMesh.html#adf2ff5fed1b48e586d966a54d7145d8e":[4,0,84,1,6],
"classIogn_1_1DashSurfaceMesh.html#adf2ff5fed1b48e586d966a54d7145d8e":[3,0,130,1,6],
"classIogn_1_1DashSurfaceMesh.html#adf7b27a7b8c462301345a5ba6bd40eaf":[4,0,84,1,29],
"classIogn_1_1DashSurfaceMesh.html#adf7b27a7b8c462301345a5ba6bd40eaf":[3,0,130,1,29],
"classIogn_1_1DashSurfaceMesh.html#ae13403e806b2c3f1989337111e7e5d02":[3,0,130,1,1],
"classIogn_1_1DashSurfaceMesh.html#ae13403e806b2c3f1989337111e7e5d02":[4,0,84,1,1],
"classIogn_1_1DashSurfaceMesh.html#ae703ff2253e8e1aa7693075385f3d546":[3,0,130,1,19],
"classIogn_1_1DashSurfaceMesh.html#ae703ff2253e8e1aa7693075385f3d546":[4,0,84,1,19],
"classIogn_1_1DashSurfaceMesh.html#aeb1bfe7aa74b200a929fa793bc25d8bc":[3,0,130,1,15],
"classIogn_1_1DashSurfaceMesh.html#aeb1bfe7aa74b200a929fa793bc25d8bc":[4,0,84,1,15],
"classIogn_1_1DashSurfaceMesh.html#af1c67fedc59b5742ec38be8701b0fe82":[4,0,84,1,7],
"classIogn_1_1DashSurfaceMesh.html#af1c67fedc59b5742ec38be8701b0fe82":[3,0,130,1,7],
"classIogn_1_1DatabaseIO.html":[3,0,130,2],
"classIogn_1_1DatabaseIO.html":[4,0,84,2],
"classIogn_1_1DatabaseIO.html#a00105d97ff7a05e9ef2a8396487c4cad":[4,0,84,2,46],
"classIogn_1_1DatabaseIO.html#a00105d97ff7a05e9ef2a8396487c4cad":[3,0,130,2,46],
"classIogn_1_1DatabaseIO.html#a00277dfe0d6e95d506b3ae0d95ecbfd3":[3,0,130,2,35],
"classIogn_1_1DatabaseIO.html#a00277dfe0d6e95d506b3ae0d95ecbfd3":[4,0,84,2,35],
"classIogn_1_1DatabaseIO.html#a09d7778a4ef588a4f29055c8fdae0166":[3,0,130,2,43],
"classIogn_1_1DatabaseIO.html#a09d7778a4ef588a4f29055c8fdae0166":[4,0,84,2,43],
"classIogn_1_1DatabaseIO.html#a0c6ceee37a96cddfe02a598c49cfd2c9":[3,0,130,2,52],
"classIogn_1_1DatabaseIO.html#a0c6ceee37a96cddfe02a598c49cfd2c9":[4,0,84,2,52],
"classIogn_1_1DatabaseIO.html#a0df751b5da444fe116ed5086220c99b9":[3,0,130,2,51],
"classIogn_1_1DatabaseIO.html#a0df751b5da444fe116ed5086220c99b9":[4,0,84,2,51],
"classIogn_1_1DatabaseIO.html#a104a3b0c41a7edddc1ac26bae83c3f6a":[4,0,84,2,4],
"classIogn_1_1DatabaseIO.html#a104a3b0c41a7edddc1ac26bae83c3f6a":[3,0,130,2,4],
"classIogn_1_1DatabaseIO.html#a19d614da1fc52bedc1a9d60e7d0fc69a":[3,0,130,2,54],
"classIogn_1_1DatabaseIO.html#a19d614da1fc52bedc1a9d60e7d0fc69a":[4,0,84,2,54],
"classIogn_1_1DatabaseIO.html#a2604634887ee3fdf1d3917997a4a77c9":[3,0,130,2,42],
"classIogn_1_1DatabaseIO.html#a2604634887ee3fdf1d3917997a4a77c9":[4,0,84,2,42],
"classIogn_1_1DatabaseIO.html#a26c83e665ede8bed60bbd5d4be617f8c":[3,0,130,2,60],
"classIogn_1_1DatabaseIO.html#a26c83e665ede8bed60bbd5d4be617f8c":[4,0,84,2,60],
"classIogn_1_1DatabaseIO.html#a2be4f5ada09d328eac98582837c1eadd":[3,0,130,2,30],
"classIogn_1_1DatabaseIO.html#a2be4f5ada09d328eac98582837c1eadd":[4,0,84,2,30],
"classIogn_1_1DatabaseIO.html#a2c0391f8ac7c10430cd675146dd2458c":[3,0,130,2,3],
"classIogn_1_1DatabaseIO.html#a2c0391f8ac7c10430cd675146dd2458c":[4,0,84,2,3],
"classIogn_1_1DatabaseIO.html#a35e3c1adab0bb781b9fd11dfaab2da71":[3,0,130,2,14],
"classIogn_1_1DatabaseIO.html#a35e3c1adab0bb781b9fd11dfaab2da71":[4,0,84,2,14],
"classIogn_1_1DatabaseIO.html#a37845998979039b695d48e3004abe033":[3,0,130,2,41],
"classIogn_1_1DatabaseIO.html#a37845998979039b695d48e3004abe033":[4,0,84,2,41],
"classIogn_1_1DatabaseIO.html#a37a52691669407b1f20a2393e8d5f6ed":[3,0,130,2,10],
"classIogn_1_1DatabaseIO.html#a37a52691669407b1f20a2393e8d5f6ed":[4,0,84,2,10],
"classIogn_1_1DatabaseIO.html#a391a3ee970964afa59999f94a6ce81c6":[3,0,130,2,37],
"classIogn_1_1DatabaseIO.html#a391a3ee970964afa59999f94a6ce81c6":[4,0,84,2,37],
"classIogn_1_1DatabaseIO.html#a3c3786e0428a907c401a11179dfd9ae0":[3,0,130,2,39],
"classIogn_1_1DatabaseIO.html#a3c3786e0428a907c401a11179dfd9ae0":[4,0,84,2,39],
"classIogn_1_1DatabaseIO.html#a3d3d37f8ea1492e022f3e4274631b276":[3,0,130,2,11],
"classIogn_1_1DatabaseIO.html#a3d3d37f8ea1492e022f3e4274631b276":[4,0,84,2,11],
"classIogn_1_1DatabaseIO.html#a3dcabef660dea9d0b71c964b7e6607a0":[4,0,84,2,23],
"classIogn_1_1DatabaseIO.html#a3dcabef660dea9d0b71c964b7e6607a0":[3,0,130,2,23],
"classIogn_1_1DatabaseIO.html#a3eec9d41bd0d3495718a913723cdbbef":[3,0,130,2,34],
"classIogn_1_1DatabaseIO.html#a3eec9d41bd0d3495718a913723cdbbef":[4,0,84,2,34],
"classIogn_1_1DatabaseIO.html#a4737c540a5ecb674c363b34c08f2e5c3":[4,0,84,2,13],
"classIogn_1_1DatabaseIO.html#a4737c540a5ecb674c363b34c08f2e5c3":[3,0,130,2,13],
"classIogn_1_1DatabaseIO.html#a4d31b02871089cc417ea990591acb9e7":[3,0,130,2,7],
"classIogn_1_1DatabaseIO.html#a4d31b02871089cc417ea990591acb9e7":[4,0,84,2,7],
"classIogn_1_1DatabaseIO.html#a4f78970eb21804fb1eb863b93d174e0c":[4,0,84,2,47],
"classIogn_1_1DatabaseIO.html#a4f78970eb21804fb1eb863b93d174e0c":[3,0,130,2,47],
"classIogn_1_1DatabaseIO.html#a509bdb2de719b050921fd03bd207361e":[4,0,84,2,15],
"classIogn_1_1DatabaseIO.html#a509bdb2de719b050921fd03bd207361e":[3,0,130,2,15],
"classIogn_1_1DatabaseIO.html#a567e232671c85ec139a7f32faf76c877":[4,0,84,2,8],
"classIogn_1_1DatabaseIO.html#a567e232671c85ec139a7f32faf76c877":[3,0,130,2,8],
"classIogn_1_1DatabaseIO.html#a6503f106c8686fde564c0966836f6ea3":[4,0,84,2,56],
"classIogn_1_1DatabaseIO.html#a6503f106c8686fde564c0966836f6ea3":[3,0,130,2,56],
"classIogn_1_1DatabaseIO.html#a6d30dd13247c8da4de57d6a404c947f3":[3,0,130,2,28],
"classIogn_1_1DatabaseIO.html#a6d30dd13247c8da4de57d6a404c947f3":[4,0,84,2,28],
"classIogn_1_1DatabaseIO.html#a704f25730c532ac67b7b71a9675d9de7":[3,0,130,2,44],
"classIogn_1_1DatabaseIO.html#a704f25730c532ac67b7b71a9675d9de7":[4,0,84,2,44],
"classIogn_1_1DatabaseIO.html#a77caac769115f8fb21a7ebef496f3220":[4,0,84,2,17],
"classIogn_1_1DatabaseIO.html#a77caac769115f8fb21a7ebef496f3220":[3,0,130,2,17],
"classIogn_1_1DatabaseIO.html#a7a7040731f50f870721dd9803bbdcec6":[3,0,130,2,20],
"classIogn_1_1DatabaseIO.html#a7a7040731f50f870721dd9803bbdcec6":[4,0,84,2,20],
"classIogn_1_1DatabaseIO.html#a7c703a53160d8860611fd55d787ace3c":[4,0,84,2,1],
"classIogn_1_1DatabaseIO.html#a7c703a53160d8860611fd55d787ace3c":[3,0,130,2,1],
"classIogn_1_1DatabaseIO.html#a7cecaf86bfedc04216c4a30697e875fd":[3,0,130,2,58],
"classIogn_1_1DatabaseIO.html#a7cecaf86bfedc04216c4a30697e875fd":[4,0,84,2,58],
"classIogn_1_1DatabaseIO.html#a7d39160d19b96e1be161afd89174a27b":[4,0,84,2,25],
"classIogn_1_1DatabaseIO.html#a7d39160d19b96e1be161afd89174a27b":[3,0,130,2,25],
"classIogn_1_1DatabaseIO.html#a7ddf05aad9f647150922a91999c08cd9":[4,0,84,2,9],
"classIogn_1_1DatabaseIO.html#a7ddf05aad9f647150922a91999c08cd9":[3,0,130,2,9],
"classIogn_1_1DatabaseIO.html#a8c6f6e516b509159942fdffa27d1cc9b":[3,0,130,2,50],
"classIogn_1_1DatabaseIO.html#a8c6f6e516b509159942fdffa27d1cc9b":[4,0,84,2,50],
"classIogn_1_1DatabaseIO.html#a8e36d96d6dd77f55db2a45401e9bc425":[3,0,130,2,53],
"classIogn_1_1DatabaseIO.html#a8e36d96d6dd77f55db2a45401e9bc425":[4,0,84,2,53],
"classIogn_1_1DatabaseIO.html#a8fb6a277f2b675197194c41db4f7bc7e":[3,0,130,2,33],
"classIogn_1_1DatabaseIO.html#a8fb6a277f2b675197194c41db4f7bc7e":[4,0,84,2,33],
"classIogn_1_1DatabaseIO.html#a99459762d0ff7aebe486ba5052baa386":[4,0,84,2,2],
"classIogn_1_1DatabaseIO.html#a99459762d0ff7aebe486ba5052baa386":[3,0,130,2,2],
"classIogn_1_1DatabaseIO.html#aa021bc9f0a9d3b8214f8608d6abefa9c":[3,0,130,2,16],
"classIogn_1_1DatabaseIO.html#aa021bc9f0a9d3b8214f8608d6abefa9c":[4,0,84,2,16],
"classIogn_1_1DatabaseIO.html#aabbb7728f092e6b10cbd164e32cf8c09":[4,0,84,2,12],
"classIogn_1_1DatabaseIO.html#aabbb7728f092e6b10cbd164e32cf8c09":[3,0,130,2,12],
"classIogn_1_1DatabaseIO.html#aad08ce04e22d8b5665da7b627f1379f6":[3,0,130,2,49],
"classIogn_1_1DatabaseIO.html#aad08ce04e22d8b5665da7b627f1379f6":[4,0,84,2,49],
"classIogn_1_1DatabaseIO.html#ab0d22387b04886ef956b3b8bf3a62c4a":[4,0,84,2,6],
"classIogn_1_1DatabaseIO.html#ab0d22387b04886ef956b3b8bf3a62c4a":[3,0,130,2,6],
"classIogn_1_1DatabaseIO.html#ab2e5a2667a6db16262f8330573022559":[4,0,84,2,31],
"classIogn_1_1DatabaseIO.html#ab2e5a2667a6db16262f8330573022559":[3,0,130,2,31],
"classIogn_1_1DatabaseIO.html#ab67092adab83d99fca4dffce6e4c1762":[3,0,130,2,21],
"classIogn_1_1DatabaseIO.html#ab67092adab83d99fca4dffce6e4c1762":[4,0,84,2,21],
"classIogn_1_1DatabaseIO.html#abb8beacc8adc54da38a5a0f10b345834":[3,0,130,2,36],
"classIogn_1_1DatabaseIO.html#abb8beacc8adc54da38a5a0f10b345834":[4,0,84,2,36],
"classIogn_1_1DatabaseIO.html#abbac68022962ed9e6eef906a37b7e3ef":[4,0,84,2,32],
"classIogn_1_1DatabaseIO.html#abbac68022962ed9e6eef906a37b7e3ef":[3,0,130,2,32],
"classIogn_1_1DatabaseIO.html#abbe67951ac39aac1a765a7ce0f0a5910":[3,0,130,2,27],
"classIogn_1_1DatabaseIO.html#abbe67951ac39aac1a765a7ce0f0a5910":[4,0,84,2,27],
"classIogn_1_1DatabaseIO.html#ac5739ee985ef7768a9828d56b7e65133":[4,0,84,2,45],
"classIogn_1_1DatabaseIO.html#ac5739ee985ef7768a9828d56b7e65133":[3,0,130,2,45],
"classIogn_1_1DatabaseIO.html#ac668eea5a603278f4029797e0ecef72b":[3,0,130,2,18],
"classIogn_1_1DatabaseIO.html#ac668eea5a603278f4029797e0ecef72b":[4,0,84,2,18],
"classIogn_1_1DatabaseIO.html#acbae4209660efeda784bb81fda6d0d3f":[3,0,130,2,5],
"classIogn_1_1DatabaseIO.html#acbae4209660efeda784bb81fda6d0d3f":[4,0,84,2,5]
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.