text
stringlengths 3
1.05M
|
---|
import { Button, ButtonGroup, Icon, Modal, Box } from '@rocket.chat/fuselage';
import { useAutoFocus, useMutableCallback } from '@rocket.chat/fuselage-hooks';
import { escapeHTML } from '@rocket.chat/string-helpers';
import React, { useCallback, useMemo } from 'react';
import { RoomRoles } from '../../../../app/models/client';
import { roomTypes, RoomMemberActions } from '../../../../app/utils/client';
import { usePermission, useAllPermissions } from '../../../contexts/AuthorizationContext';
import { useSetModal } from '../../../contexts/ModalContext';
import { useRoute } from '../../../contexts/RouterContext';
import { useMethod } from '../../../contexts/ServerContext';
import { useToastMessageDispatch } from '../../../contexts/ToastMessagesContext';
import { useTranslation } from '../../../contexts/TranslationContext';
import {
useUserId,
useUserSubscription,
useUserSubscriptionByName,
} from '../../../contexts/UserContext';
import { useEndpointActionExperimental } from '../../../hooks/useEndpointActionExperimental';
import { useReactiveValue } from '../../../hooks/useReactiveValue';
import RemoveUsersModal from '../../teams/contextualBar/members/RemoveUsersModal';
import { useUserRoom } from './useUserRoom';
import { useWebRTC } from './useWebRTC';
const useUserHasRoomRole = (uid, rid, role) =>
useReactiveValue(
useCallback(() => !!RoomRoles.findOne({ rid, 'u._id': uid, 'roles': role }), [uid, rid, role]),
);
const getShouldOpenDirectMessage = (
currentSubscription,
usernameSubscription,
canOpenDirectMessage,
username,
) => {
const canOpenDm = canOpenDirectMessage || usernameSubscription;
const directMessageIsNotAlreadyOpen =
currentSubscription && currentSubscription.name !== username;
return canOpenDm && directMessageIsNotAlreadyOpen;
};
const getUserIsMuted = (room, user, userCanPostReadonly) => {
if (room && room.ro) {
if (Array.isArray(room.unmuted) && room.unmuted.indexOf(user && user.username) !== -1) {
return false;
}
if (userCanPostReadonly) {
return Array.isArray(room.muted) && room.muted.indexOf(user && user.username) !== -1;
}
return true;
}
return room && Array.isArray(room.muted) && room.muted.indexOf(user && user.username) > -1;
};
const WarningModal = ({ text, confirmText, close, confirm, ...props }) => {
const refAutoFocus = useAutoFocus(true);
const t = useTranslation();
return (
<Modal {...props}>
<Modal.Header>
<Icon color='warning' name='modal-warning' size={20} />
<Modal.Title>{t('Are_you_sure')}</Modal.Title>
<Modal.Close onClick={close} />
</Modal.Header>
<Modal.Content fontScale='p3'>{text}</Modal.Content>
<Modal.Footer>
<ButtonGroup align='end'>
<Button ghost onClick={close}>
{t('Cancel')}
</Button>
<Button ref={refAutoFocus} primary danger onClick={confirm}>
{confirmText}
</Button>
</ButtonGroup>
</Modal.Footer>
</Modal>
);
};
export const useUserInfoActions = (user = {}, rid, reload) => {
const t = useTranslation();
const dispatchToastMessage = useToastMessageDispatch();
const directRoute = useRoute('direct');
const setModal = useSetModal();
const { _id: uid } = user;
const ownUserId = useUserId();
const closeModal = useMutableCallback(() => setModal(null));
const room = useUserRoom(rid);
const currentSubscription = useUserSubscription(rid);
const usernameSubscription = useUserSubscriptionByName(user.username);
const isLeader = useUserHasRoomRole(uid, rid, 'leader');
const isModerator = useUserHasRoomRole(uid, rid, 'moderator');
const isOwner = useUserHasRoomRole(uid, rid, 'owner');
const otherUserCanPostReadonly = useAllPermissions('post-readonly', rid);
const isIgnored =
currentSubscription &&
currentSubscription.ignored &&
currentSubscription.ignored.indexOf(uid) > -1;
const isMuted = getUserIsMuted(room, user, otherUserCanPostReadonly);
const endpointPrefix = room.t === 'p' ? 'groups' : 'channels';
const roomConfig = room && room.t && roomTypes.getConfig(room.t);
const [
roomCanSetOwner,
roomCanSetLeader,
roomCanSetModerator,
roomCanIgnore,
roomCanBlock,
roomCanMute,
roomCanRemove,
] = [
...(roomConfig && [
roomConfig.allowMemberAction(room, RoomMemberActions.SET_AS_OWNER),
roomConfig.allowMemberAction(room, RoomMemberActions.SET_AS_LEADER),
roomConfig.allowMemberAction(room, RoomMemberActions.SET_AS_MODERATOR),
roomConfig.allowMemberAction(room, RoomMemberActions.IGNORE),
roomConfig.allowMemberAction(room, RoomMemberActions.BLOCK),
roomConfig.allowMemberAction(room, RoomMemberActions.MUTE),
roomConfig.allowMemberAction(room, RoomMemberActions.REMOVE_USER),
]),
];
const roomName = room && room.t && escapeHTML(roomTypes.getRoomName(room.t, room));
const userCanSetOwner = usePermission('set-owner', rid);
const userCanSetLeader = usePermission('set-leader', rid);
const userCanSetModerator = usePermission('set-moderator', rid);
const userCanMute = usePermission('mute-user', rid);
const userCanRemove = usePermission('remove-user', rid);
const userCanDirectMessage = usePermission('create-d');
const { shouldAllowCalls, callInProgress, joinCall, startCall } = useWebRTC(rid);
const shouldOpenDirectMessage = getShouldOpenDirectMessage(
currentSubscription,
usernameSubscription,
userCanDirectMessage,
user.username,
);
const openDirectDm = useMutableCallback(() =>
directRoute.push({
rid: user.username,
}),
);
const openDirectMessageOption = useMemo(
() =>
shouldOpenDirectMessage && {
label: t('Direct_Message'),
icon: 'balloon',
action: openDirectDm,
},
[openDirectDm, shouldOpenDirectMessage, t],
);
const videoCallOption = useMemo(() => {
const handleJoinCall = () => {
joinCall({ audio: true, video: true });
};
const handleStartCall = () => {
startCall({ audio: true, video: true });
};
const action = callInProgress ? handleJoinCall : handleStartCall;
return (
shouldAllowCalls && {
label: t(callInProgress ? 'Join_video_call' : 'Start_video_call'),
icon: 'video',
action,
}
);
}, [callInProgress, shouldAllowCalls, t, joinCall, startCall]);
const audioCallOption = useMemo(() => {
const handleJoinCall = () => {
joinCall({ audio: true, video: false });
};
const handleStartCall = () => {
startCall({ audio: true, video: false });
};
const action = callInProgress ? handleJoinCall : handleStartCall;
return (
shouldAllowCalls && {
label: t(callInProgress ? 'Join_audio_call' : 'Start_audio_call'),
icon: 'mic',
action,
}
);
}, [callInProgress, shouldAllowCalls, t, joinCall, startCall]);
const changeOwnerEndpoint = isOwner ? 'removeOwner' : 'addOwner';
const changeOwnerMessage = isOwner
? 'User__username__removed_from__room_name__owners'
: 'User__username__is_now_a_owner_of__room_name_';
const changeOwner = useEndpointActionExperimental(
'POST',
`${endpointPrefix}.${changeOwnerEndpoint}`,
t(changeOwnerMessage, { username: user.username, room_name: roomName }),
);
const changeOwnerAction = useMutableCallback(async () =>
changeOwner({ roomId: rid, userId: uid }),
);
const changeOwnerOption = useMemo(
() =>
roomCanSetOwner &&
userCanSetOwner && {
label: t(isOwner ? 'Remove_as_owner' : 'Set_as_owner'),
icon: 'shield-check',
action: changeOwnerAction,
},
[changeOwnerAction, isOwner, t, roomCanSetOwner, userCanSetOwner],
);
const changeLeaderEndpoint = isLeader ? 'removeLeader' : 'addLeader';
const changeLeaderMessage = isLeader
? 'User__username__removed_from__room_name__leaders'
: 'User__username__is_now_a_leader_of__room_name_';
const changeLeader = useEndpointActionExperimental(
'POST',
`${endpointPrefix}.${changeLeaderEndpoint}`,
t(changeLeaderMessage, { username: user.username, room_name: roomName }),
);
const changeLeaderAction = useMutableCallback(() => changeLeader({ roomId: rid, userId: uid }));
const changeLeaderOption = useMemo(
() =>
roomCanSetLeader &&
userCanSetLeader && {
label: t(isLeader ? 'Remove_as_leader' : 'Set_as_leader'),
icon: 'shield-alt',
action: changeLeaderAction,
},
[isLeader, roomCanSetLeader, t, userCanSetLeader, changeLeaderAction],
);
const changeModeratorEndpoint = isModerator ? 'removeModerator' : 'addModerator';
const changeModeratorMessage = isModerator
? 'User__username__removed_from__room_name__moderators'
: 'User__username__is_now_a_moderator_of__room_name_';
const changeModerator = useEndpointActionExperimental(
'POST',
`${endpointPrefix}.${changeModeratorEndpoint}`,
t(changeModeratorMessage, { username: user.username, room_name: roomName }),
);
const changeModeratorAction = useMutableCallback(() =>
changeModerator({ roomId: rid, userId: uid }),
);
const changeModeratorOption = useMemo(
() =>
roomCanSetModerator &&
userCanSetModerator && {
label: t(isModerator ? 'Remove_as_moderator' : 'Set_as_moderator'),
icon: 'shield',
action: changeModeratorAction,
},
[changeModeratorAction, isModerator, roomCanSetModerator, t, userCanSetModerator],
);
const ignoreUser = useMethod('ignoreUser');
const ignoreUserAction = useMutableCallback(async () => {
try {
await ignoreUser({ rid, userId: uid, ignore: !isIgnored });
if (isIgnored) {
dispatchToastMessage({ type: 'success', message: t('User_has_been_unignored') });
} else {
dispatchToastMessage({ type: 'success', message: t('User_has_been_ignored') });
}
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
}
});
const ignoreUserOption = useMemo(
() =>
roomCanIgnore &&
uid !== ownUserId && {
label: t(isIgnored ? 'Unignore' : 'Ignore'),
icon: 'ban',
action: ignoreUserAction,
},
[ignoreUserAction, isIgnored, ownUserId, roomCanIgnore, t, uid],
);
const isUserBlocked = currentSubscription && currentSubscription.blocker;
const toggleBlock = useMethod(isUserBlocked ? 'unblockUser' : 'blockUser');
const toggleBlockUserAction = useMutableCallback(async () => {
try {
await toggleBlock({ rid, blocked: uid });
dispatchToastMessage({
type: 'success',
message: t(isUserBlocked ? 'User_is_unblocked' : 'User_is_blocked'),
});
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
}
});
const toggleBlockUserOption = useMemo(
() =>
roomCanBlock &&
uid !== ownUserId && {
label: t(isUserBlocked ? 'Unblock' : 'Block'),
icon: 'ban',
action: toggleBlockUserAction,
},
[isUserBlocked, ownUserId, roomCanBlock, t, toggleBlockUserAction, uid],
);
const muteFn = useMethod(isMuted ? 'unmuteUserInRoom' : 'muteUserInRoom');
const muteUserOption = useMemo(() => {
const action = () => {
const onConfirm = async () => {
try {
await muteFn({ rid, username: user.username });
closeModal();
dispatchToastMessage({
type: 'success',
message: t(
isMuted
? 'User__username__unmuted_in_room__roomName__'
: 'User__username__muted_in_room__roomName__',
{ username: user.username, roomName },
),
});
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
}
};
if (isMuted) {
return onConfirm();
}
setModal(
<WarningModal
text={t('The_user_wont_be_able_to_type_in_s', roomName)}
close={closeModal}
confirmText={t('Yes_mute_user')}
confirm={onConfirm}
/>,
);
};
return (
roomCanMute &&
userCanMute && {
label: t(isMuted ? 'Unmute_user' : 'Mute_user'),
icon: isMuted ? 'mic' : 'mic-off',
action,
}
);
}, [
closeModal,
dispatchToastMessage,
isMuted,
muteFn,
rid,
roomCanMute,
roomName,
setModal,
t,
user.username,
userCanMute,
]);
const removeFromTeam = useEndpointActionExperimental(
'POST',
'teams.removeMember',
t('User_has_been_removed_from_team'),
);
const removeUserAction = useEndpointActionExperimental(
'POST',
`${endpointPrefix}.kick`,
t('User_has_been_removed_from_s', roomName),
);
const removeUserOptionAction = useMutableCallback(() => {
if (room.teamMain && room.teamId) {
return setModal(
<RemoveUsersModal
teamId={room?.teamId}
userId={uid}
onClose={closeModal}
onCancel={closeModal}
onConfirm={async (rooms) => {
await removeFromTeam({ teamId: room.teamId, userId: uid, rooms: Object.keys(rooms) });
closeModal();
reload && reload();
}}
/>,
);
}
setModal(
<WarningModal
text={t('The_user_will_be_removed_from_s', roomName)}
close={closeModal}
confirmText={t('Yes_remove_user')}
confirm={async () => {
await removeUserAction({ roomId: rid, userId: uid });
closeModal();
reload && reload();
}}
/>,
);
});
const removeUserOption = useMemo(
() =>
roomCanRemove &&
userCanRemove && {
label: (
<Box color='danger'>{room.teamMain ? t('Remove_from_team') : t('Remove_from_room')}</Box>
),
icon: 'sign-out',
action: removeUserOptionAction,
},
[room, roomCanRemove, userCanRemove, removeUserOptionAction, t],
);
return useMemo(
() => ({
...(openDirectMessageOption && { openDirectMessage: openDirectMessageOption }),
...(videoCallOption && { video: videoCallOption }),
...(audioCallOption && { audio: audioCallOption }),
...(changeOwnerOption && { changeOwner: changeOwnerOption }),
...(changeLeaderOption && { changeLeader: changeLeaderOption }),
...(changeModeratorOption && { changeModerator: changeModeratorOption }),
...(ignoreUserOption && { ignoreUser: ignoreUserOption }),
...(muteUserOption && { muteUser: muteUserOption }),
...(removeUserOption && { removeUser: removeUserOption }),
...(toggleBlockUserOption && { toggleBlock: toggleBlockUserOption }),
}),
[
audioCallOption,
changeLeaderOption,
changeModeratorOption,
changeOwnerOption,
ignoreUserOption,
muteUserOption,
openDirectMessageOption,
removeUserOption,
videoCallOption,
toggleBlockUserOption,
],
);
};
|
from time import sleep
print('\033[33m/_\033[m'*14)
print('\033[35mAnalisador de Triângulos v.2.0\033[m')
print('\033[33m/_\033[m'*14)
seg1=int(input('Primeiro segmento:'))
seg2=int(input('Segundo segmento:'))
seg3=int(input('Terceiro segmento:'))
print('\033[31mAnalisando segmentos...\033[m')
sleep(2)
if seg1<seg2+seg3 and seg2<seg1+seg3 and seg3<seg2+seg1:
print(f'Dados os segmentos \033[33m{seg1}\033[m , \033[33m{seg2}\033[m e \033[33m{seg3}\033[m,'
f' é \033[32mPOSSÍVEL FORMAR\033[m um triângulo ', end='')
if seg1==seg2==seg3:
print('\033[33mEQUILÁTERO\033[m!')
elif seg1!=seg2!=seg3!=seg1:
print('\033[34mESCALENO\033[m!')
else:
print('\033[36mISÓSCELES\033[m!')
else:
print(f'Dados os segmentos {seg1}, {seg2} e {seg3}, \033[31mNÃO É POSSIVEL FORMAR\033[m um triângulo!')
|
#! /usr/bin/env python
import atexit
import os
import sys
import state
try:
import fcntl # @UnresolvedImport
except ImportError:
pass
class singleinstance:
"""
Implements a single instance application by creating a lock file
at appdata.
This is based upon the singleton class from tendo
https://github.com/pycontribs/tendo
which is under the Python Software Foundation License version 2
"""
def __init__(self, flavor_id="", daemon=False):
self.initialized = False
self.counter = 0
self.daemon = daemon
self.lockPid = None
self.lockfile = os.path.normpath(
os.path.join(state.appdata, 'singleton%s.lock' % flavor_id))
if not self.daemon and not state.curses:
# Tells the already running (if any) application to get focus.
import bitmessageqt
bitmessageqt.init()
self.lock()
self.initialized = True
atexit.register(self.cleanup)
def lock(self):
if self.lockPid is None:
self.lockPid = os.getpid()
if sys.platform == 'win32':
try:
# file already exists, we try to remove
# (in case previous execution was interrupted)
if os.path.exists(self.lockfile):
os.unlink(self.lockfile)
self.fd = os.open(
self.lockfile,
os.O_CREAT | os.O_EXCL | os.O_RDWR | os.O_TRUNC
)
except OSError:
type, e, tb = sys.exc_info()
if e.errno == 13:
print(
'Another instance of this application'
' is already running'
)
sys.exit(-1)
print(e.errno)
raise
else:
pidLine = "%i\n" % self.lockPid
os.write(self.fd, pidLine)
else: # non Windows
self.fp = open(self.lockfile, 'a+')
try:
if self.daemon and self.lockPid != os.getpid():
# wait for parent to finish
fcntl.lockf(self.fp, fcntl.LOCK_EX)
else:
fcntl.lockf(self.fp, fcntl.LOCK_EX | fcntl.LOCK_NB)
self.lockPid = os.getpid()
except IOError:
print 'Another instance of this application is already running'
sys.exit(-1)
else:
pidLine = "%i\n" % self.lockPid
self.fp.truncate(0)
self.fp.write(pidLine)
self.fp.flush()
def cleanup(self):
if not self.initialized:
return
if self.daemon and self.lockPid == os.getpid():
# these are the two initial forks while daemonizing
try:
if sys.platform == 'win32':
if hasattr(self, 'fd'):
os.close(self.fd)
else:
fcntl.lockf(self.fp, fcntl.LOCK_UN)
except Exception, e:
pass
return
print "Cleaning up lockfile"
try:
if sys.platform == 'win32':
if hasattr(self, 'fd'):
os.close(self.fd)
os.unlink(self.lockfile)
else:
fcntl.lockf(self.fp, fcntl.LOCK_UN)
if os.path.isfile(self.lockfile):
os.unlink(self.lockfile)
except Exception:
pass
|
const express = require('express')
const router = express.Router()
const mySQL = require('../config/database')
const printers = require('../helpers/debug/DebugAlerts')
const PostError = require('../helpers/errors/PostError')
const PermissionsError = require('../helpers/errors/PermissionsError')
const routeProtectors = require('../middleware/route_protectors')
const applicantsRetriever = require('../middleware/applicants_middleware')
/**
* Render job listing applicants and job listing info. (Employer and listing poster only)
*/
router.get('/view/:listingId', routeProtectors.userSpecificAccess, applicantsRetriever.generateListingApplicants, (req, res, next) => {
res.render('listing_details', {
title: res.locals.results[0].jobTitle
})
})
/**
* Post a job listing. (Employers only)
*/
router.post('/add', (req, res, next) => {
const uid = req.session.userId
const jobTitle = req.body.jobTitle
const jobLocation = req.body.location
const description = req.body.description
const expiryDate = req.body.endDate
// maybe construct promise to perform error check to be able to catch errors with .catch by promise chaining
if (!req.session.isEmployer) {
throw new PermissionsError('Only employers may create job listings.', '/profile', 200)
}
// character validation check
// ensure expiry date is not in the past!!!!!
const validate = () => {
return new Promise((resolve) => {
if (!jobTitle || !jobLocation || !description || !expiryDate) {
throw new PostError('Please fill all required information fields before sumbitting.',
'/profile',
200)
}
if (jobTitle.search(/[\x2C]|[\x2F]|[\x96]|[\x7E-\x7F]/) !== -1) {
throw new PostError('Invalid character detected in experience field.', '/profile', 200)
}
if (jobLocation.search(/[\x2C]|[\x2F]|[\x96]|[\x7E-\x7F]/) !== -1) {
throw new PostError('Invalid character detected in employer field.', '/profile', 200)
}
if (description.search(/[\x2C]|[\x2F]|[\x96]|[\x7E-\x7F]/) !== -1) {
throw new PostError('Invalid character detected in description field.', '/profile', 200)
}
//convert time to UTC time
let userDate = new Date(expiryDate)
const tzOffset = userDate.getTimezoneOffset() * 60 * 1000
userDate = new Date(+userDate + tzOffset) // convert to miliseconds and add offset
if ((Date.now() - userDate) >= 0) {
throw new PostError('Expiry date for job listing has elapsed.', '/profile', 200)
}
return resolve()
})
}
const query = 'INSERT INTO SkillSeek.jobListing\
(poster_id,\
jobTitle,\
description,\
location,\
expiryDate)\
VALUES (?, ?, ?, ?, ?)'
validate()
.then(() => {
return mySQL.execute(query, [uid, jobTitle, description, jobLocation, expiryDate])
})
.then((results, fields) => {
req.flash('success', 'Job listing sucessfully added to your profile.')
printers.successPrint('Job listing sucessfully added to profile.')
res.redirect('/profile')
})
.catch(err => {
if (err instanceof PostError || err instanceof PermissionsError) {
req.flash('error', err.getMessage())
printers.errorPrint(err.getMessage())
res.status(err.getStatus())
res.redirect(err.getRedirectURL())
} else {
next(err)
}
})
})
/**
* Apply to a job listing.
*/
router.get('/apply', (req, res, next) => {
let query
const redirectAddress = req.query.redirectAddress
const listingId = req.query.listing_id
//ensure user is student and execute query. return resolved promise.
const validate = () => {
return new Promise((resolve) => {
if (req.session.isEmployer || req.session.isTeacher) {
throw new PostError('Only students my apply for jobs.', redirectAddress, 200)
}
query = '(SELECT\
jobListing.expired,\
jobListing.hidden\
FROM\
SkillSeek.jobListing\
WHERE jobListing.listing_id = ?)\
UNION\
(SELECT\
jobApplicant.application_id,\
jobApplicant.applicant_uid\
FROM\
SkillSeek.jobApplicant\
WHERE (jobApplicant.applicant_uid = ? AND jobApplicant.listing_id = ?));'
return resolve(mySQL.execute(query, [listingId, req.session.userId, listingId]))
})
}
validate()
.then((results, fields) => {
let listingInfo
if (results && results[0].length) {
listingInfo = JSON.parse(JSON.stringify(results[0][0])) //convert to JSON obj
console.log(listingInfo)
} else {
throw new PostError('Server error. Please try again later', redirectAddress, 200)
}
//ensure listing is not hidden nor expired
if (results[0].length === 1 && listingInfo.hidden === '0' && listingInfo.expired === '0') {
query = 'INSERT INTO SkillSeek.jobApplicant (listing_id, applicant_uid) VALUES (?, ?)'
return mySQL.execute(query, [listingId, req.session.userId])
} else {
if (results[0].length !== 1) {
throw new PostError('Application has already been submitted.', redirectAddress, 200)
} else {
throw new PostError('Could not apply to job listing.', redirectAddress, 200)
}
}
})
.then((results, fields) => {
req.flash('success', 'Successfully submit candidacy.')
printers.successPrint('Successfully submit candidacy.')
res.redirect(redirectAddress) // modify to stay on page
})
.catch(err => {
if (err instanceof PostError) {
req.flash('error', err.getMessage())
printers.errorPrint(err.getMessage())
res.status(err.getStatus())
res.redirect(err.getRedirectURL())
} else {
next(err)
}
})
})
/**
* Delete listing on profile. (Employer only)
*/
router.post('/delete/:listing_id', (req, res, next) => {
// check if listing belongs to user deleting it
const query = 'DELETE FROM jobListing\
WHERE poster_id = ? AND listing_id = ?;'
mySQL.execute(query, [req.session.userId, req.params.listing_id])
.then((results, fields) => {
if (!results) {
throw new PostError('Server Error. Please try again later.', `/profile/${req.session.reqUserProfile}`, 200)
} if (results && !results[0].affectedRows) {
throw new PermissionsError('You do not have permission to delete this job listing.', `/profile/${req.session.reqUserProfile}`, 200)
} else {
// req.flash('success', 'Listing successfully deleted.')
printers.successPrint('Listing successfully deleted.')
res.status(200)
}
})
.catch(err => {
if (err instanceof PostError || err instanceof PermissionsError) {
req.flash('error', err.getMessage())
printers.errorPrint(err.getMessage())
res.status(err.getStatus())
res.redirect(err.getRedirectURL())
} else {
next(err)
}
})
})
/**
* Hide or unhide job listing from home, profile, and search. (Employer Only)
*/
router.get('/hide/:listing_id', (req, res, next) => {
// ensure users can not flip hidden on other's listings
const query = 'UPDATE jobListing\
SET\
hidden = NOT hidden\
WHERE poster_id = ? AND listing_id = ?;'
mySQL.execute(query, [req.session.userId, req.params.listing_id])
.then((results, fields) => {
if (!results) {
throw new PostError('Server Error. Please try again later.', `/profile/${req.session.reqUserProfile}`, 200)
} else if (results && !results[0].affectedRows) {
throw new PermissionsError('You do not have permission to hide this job listing.',
`/profile/${req.session.reqUserProfile}`,
200)
} else {
req.flash('success', 'Listing successfully hidden from other users.')
printers.successPrint('Listing successfully hidden from other users.')
res.redirect('/profile')
}
})
.catch(err => {
if (err instanceof PostError || err instanceof PermissionsError) {
req.flash('error', err.getMessage())
printers.errorPrint(err.getMessage())
res.status(err.getStatus())
res.redirect(err.getRedirectURL())
} else {
next(err)
}
})
})
module.exports = router |
/*! jQuery UI - v1.11.4 - 2015-08-04
* http://jqueryui.com
* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
/*!
* jQuery UI Core 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
// $.ui might exist from components with no dependencies, e.g., $.ui.position
$.ui = $.ui || {};
$.extend( $.ui, {
version: "1.11.4",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
});
// plugins
$.fn.extend({
scrollParent: function( includeHidden ) {
var position = this.css( "position" ),
excludeStaticParent = position === "absolute",
overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
scrollParent = this.parents().filter( function() {
var parent = $( this );
if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
return false;
}
return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
}).eq( 0 );
return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
},
uniqueId: (function() {
var uuid = 0;
return function() {
return this.each(function() {
if ( !this.id ) {
this.id = "ui-id-" + ( ++uuid );
}
});
};
})(),
removeUniqueId: function() {
return this.each(function() {
if ( /^ui-id-\d+$/.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
});
}
});
// selectors
function focusable( element, isTabIndexNotNaN ) {
var map, mapName, img,
nodeName = element.nodeName.toLowerCase();
if ( "area" === nodeName ) {
map = element.parentNode;
mapName = map.name;
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
return false;
}
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
return !!img && visible( img );
}
return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
!element.disabled :
"a" === nodeName ?
element.href || isTabIndexNotNaN :
isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
visible( element );
}
function visible( element ) {
return $.expr.filters.visible( element ) &&
!$( element ).parents().addBack().filter(function() {
return $.css( this, "visibility" ) === "hidden";
}).length;
}
$.extend( $.expr[ ":" ], {
data: $.expr.createPseudo ?
$.expr.createPseudo(function( dataName ) {
return function( elem ) {
return !!$.data( elem, dataName );
};
}) :
// support: jQuery <1.8
function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
},
focusable: function( element ) {
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
},
tabbable: function( element ) {
var tabIndex = $.attr( element, "tabindex" ),
isTabIndexNaN = isNaN( tabIndex );
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
}
});
// support: jQuery <1.8
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
$.each( [ "Width", "Height" ], function( i, name ) {
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
type = name.toLowerCase(),
orig = {
innerWidth: $.fn.innerWidth,
innerHeight: $.fn.innerHeight,
outerWidth: $.fn.outerWidth,
outerHeight: $.fn.outerHeight
};
function reduce( elem, size, border, margin ) {
$.each( side, function() {
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
if ( border ) {
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
}
if ( margin ) {
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
}
});
return size;
}
$.fn[ "inner" + name ] = function( size ) {
if ( size === undefined ) {
return orig[ "inner" + name ].call( this );
}
return this.each(function() {
$( this ).css( type, reduce( this, size ) + "px" );
});
};
$.fn[ "outer" + name] = function( size, margin ) {
if ( typeof size !== "number" ) {
return orig[ "outer" + name ].call( this, size );
}
return this.each(function() {
$( this).css( type, reduce( this, size, true, margin ) + "px" );
});
};
});
}
// support: jQuery <1.8
if ( !$.fn.addBack ) {
$.fn.addBack = function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
};
}
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.fn.removeData = (function( removeData ) {
return function( key ) {
if ( arguments.length ) {
return removeData.call( this, $.camelCase( key ) );
} else {
return removeData.call( this );
}
};
})( $.fn.removeData );
}
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
$.fn.extend({
focus: (function( orig ) {
return function( delay, fn ) {
return typeof delay === "number" ?
this.each(function() {
var elem = this;
setTimeout(function() {
$( elem ).focus();
if ( fn ) {
fn.call( elem );
}
}, delay );
}) :
orig.apply( this, arguments );
};
})( $.fn.focus ),
disableSelection: (function() {
var eventType = "onselectstart" in document.createElement( "div" ) ?
"selectstart" :
"mousedown";
return function() {
return this.bind( eventType + ".ui-disableSelection", function( event ) {
event.preventDefault();
});
};
})(),
enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
},
zIndex: function( zIndex ) {
if ( zIndex !== undefined ) {
return this.css( "zIndex", zIndex );
}
if ( this.length ) {
var elem = $( this[ 0 ] ), position, value;
while ( elem.length && elem[ 0 ] !== document ) {
// Ignore z-index if position is set to a value where z-index is ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
position = elem.css( "position" );
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
value = parseInt( elem.css( "zIndex" ), 10 );
if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
elem = elem.parent();
}
}
return 0;
}
});
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
$.ui.plugin = {
add: function( module, option, set ) {
var i,
proto = $.ui[ module ].prototype;
for ( i in set ) {
proto.plugins[ i ] = proto.plugins[ i ] || [];
proto.plugins[ i ].push( [ option, set[ i ] ] );
}
},
call: function( instance, name, args, allowDisconnected ) {
var i,
set = instance.plugins[ name ];
if ( !set ) {
return;
}
if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
return;
}
for ( i = 0; i < set.length; i++ ) {
if ( instance.options[ set[ i ][ 0 ] ] ) {
set[ i ][ 1 ].apply( instance.element, args );
}
}
}
};
/*!
* jQuery UI Widget 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
var widget_uuid = 0,
widget_slice = Array.prototype.slice;
$.cleanData = (function( orig ) {
return function( elems ) {
var events, elem, i;
for ( i = 0; (elem = elems[i]) != null; i++ ) {
try {
// Only trigger remove when necessary to save time
events = $._data( elem, "events" );
if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
}
orig( elems );
};
})( $.cleanData );
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
fullName = namespace + "-" + name;
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
// create selector for plugin
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
existingConstructor = $[ namespace ][ name ];
constructor = $[ namespace ][ name ] = function( options, element ) {
// allow instantiation without "new" keyword
if ( !this._createWidget ) {
return new constructor( options, element );
}
// allow instantiation without initializing for simple inheritance
// must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
// extend with the existing constructor to carry over any static properties
$.extend( constructor, existingConstructor, {
version: prototype.version,
// copy the object used to create the prototype in case we need to
// redefine the widget later
_proto: $.extend( {}, prototype ),
// track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors: []
});
basePrototype = new base();
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( !$.isFunction( value ) ) {
proxiedPrototype[ prop ] = value;
return;
}
proxiedPrototype[ prop ] = (function() {
var _super = function() {
return base.prototype[ prop ].apply( this, arguments );
},
_superApply = function( args ) {
return base.prototype[ prop ].apply( this, args );
};
return function() {
var __super = this._super,
__superApply = this._superApply,
returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply( this, arguments );
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
})();
});
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
});
// If this widget is being redefined then we need to find all widgets that
// are inheriting from it and redefine all of them so that they inherit from
// the new version of this widget. We're essentially trying to replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
});
// remove the list of existing child constructors from the old constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
$.widget.bridge( name, constructor );
return constructor;
};
$.widget.extend = function( target ) {
var input = widget_slice.call( arguments, 1 ),
inputIndex = 0,
inputLength = input.length,
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] ) ?
$.widget.extend( {}, target[ key ], value ) :
// Don't extend strings, arrays, etc. with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = widget_slice.call( arguments, 1 ),
returnValue = this;
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
if ( options === "instance" ) {
returnValue = instance;
return false;
}
if ( !instance ) {
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
}
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}
methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get() ) :
methodValue;
return false;
}
});
} else {
// Allow multiple hashes to be passed on init
if ( args.length ) {
options = $.widget.extend.apply( null, [ options ].concat(args) );
}
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} );
if ( instance._init ) {
instance._init();
}
} else {
$.data( this, fullName, new object( options, this ) );
}
});
}
return returnValue;
};
};
$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
// callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.bindings = $();
this.hoverable = $();
this.focusable = $();
if ( element !== this ) {
$.data( element, this.widgetFullName, this );
this._on( true, this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();
}
}
});
this.document = $( element.style ?
// element within the document
element.ownerDocument :
// element is window or document
element.document || element );
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );
// clean up events and states
this.bindings.unbind( this.eventNamespace );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
var options = key,
parts,
curOption,
i;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
if ( typeof key === "string" ) {
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
options = {};
parts = key.split( "." );
key = parts.shift();
if ( parts.length ) {
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
for ( i = 0; i < parts.length - 1; i++ ) {
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
if ( arguments.length === 1 ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
if ( arguments.length === 1 ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled", !!value );
// If the widget is becoming disabled, then nothing is interactive
if ( value ) {
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
}
}
return this;
},
enable: function() {
return this._setOptions({ disabled: false });
},
disable: function() {
return this._setOptions({ disabled: true });
},
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
if ( typeof suppressDisabledCheck !== "boolean" ) {
handlers = element;
element = suppressDisabledCheck;
suppressDisabledCheck = false;
}
// no element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
element = this.element;
delegateElement = this.widget();
} else {
element = delegateElement = $( element );
this.bindings = this.bindings.add( element );
}
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( !suppressDisabledCheck &&
( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
// copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || $.guid++;
}
var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
eventName = match[1] + instance.eventNamespace,
selector = match[2];
if ( selector ) {
delegateElement.delegate( selector, eventName, handlerProxy );
} else {
element.bind( eventName, handlerProxy );
}
});
},
_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );
// Clear the stack to avoid memory leaks (#10056)
this.bindings = $( this.bindings.not( element ).get() );
this.focusable = $( this.focusable.not( element ).get() );
this.hoverable = $( this.hoverable.not( element ).get() );
},
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
var instance = this;
return setTimeout( handlerProxy, delay || 0 );
},
_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._on( element, {
mouseenter: function( event ) {
$( event.currentTarget ).addClass( "ui-state-hover" );
},
mouseleave: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-hover" );
}
});
},
_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._on( element, {
focusin: function( event ) {
$( event.currentTarget ).addClass( "ui-state-focus" );
},
focusout: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-focus" );
}
});
},
_trigger: function( type, event, data ) {
var prop, orig,
callback = this.options[ type ];
data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
// the original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
// copy original event properties over to the new event
orig = event.originalEvent;
if ( orig ) {
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
}
this.element.trigger( event, data );
return !( $.isFunction( callback ) &&
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
event.isDefaultPrevented() );
}
};
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
if ( typeof options === "string" ) {
options = { effect: options };
}
var hasOptions,
effectName = !options ?
method :
options === true || typeof options === "number" ?
defaultEffect :
options.effect || defaultEffect;
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
}
hasOptions = !$.isEmptyObject( options );
options.complete = callback;
if ( options.delay ) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
element[ method ]( options );
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue(function( next ) {
$( this )[ method ]();
if ( callback ) {
callback.call( element[ 0 ] );
}
next();
});
}
};
});
var widget = $.widget;
/*!
* jQuery UI Position 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/position/
*/
(function() {
$.ui = $.ui || {};
var cachedScrollbarWidth, supportsOffsetFractions,
max = Math.max,
abs = Math.abs,
round = Math.round,
rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
rposition = /^\w+/,
rpercent = /%$/,
_position = $.fn.position;
function getOffsets( offsets, width, height ) {
return [
parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
];
}
function parseCss( element, property ) {
return parseInt( $.css( element, property ), 10 ) || 0;
}
function getDimensions( elem ) {
var raw = elem[0];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
height: elem.height(),
offset: { top: 0, left: 0 }
};
}
if ( $.isWindow( raw ) ) {
return {
width: elem.width(),
height: elem.height(),
offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
};
}
if ( raw.preventDefault ) {
return {
width: 0,
height: 0,
offset: { top: raw.pageY, left: raw.pageX }
};
}
return {
width: elem.outerWidth(),
height: elem.outerHeight(),
offset: elem.offset()
};
}
$.position = {
scrollbarWidth: function() {
if ( cachedScrollbarWidth !== undefined ) {
return cachedScrollbarWidth;
}
var w1, w2,
div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
innerDiv = div.children()[0];
$( "body" ).append( div );
w1 = innerDiv.offsetWidth;
div.css( "overflow", "scroll" );
w2 = innerDiv.offsetWidth;
if ( w1 === w2 ) {
w2 = div[0].clientWidth;
}
div.remove();
return (cachedScrollbarWidth = w1 - w2);
},
getScrollInfo: function( within ) {
var overflowX = within.isWindow || within.isDocument ? "" :
within.element.css( "overflow-x" ),
overflowY = within.isWindow || within.isDocument ? "" :
within.element.css( "overflow-y" ),
hasOverflowX = overflowX === "scroll" ||
( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
hasOverflowY = overflowY === "scroll" ||
( overflowY === "auto" && within.height < within.element[0].scrollHeight );
return {
width: hasOverflowY ? $.position.scrollbarWidth() : 0,
height: hasOverflowX ? $.position.scrollbarWidth() : 0
};
},
getWithinInfo: function( element ) {
var withinElement = $( element || window ),
isWindow = $.isWindow( withinElement[0] ),
isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
return {
element: withinElement,
isWindow: isWindow,
isDocument: isDocument,
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
// support: jQuery 1.6.x
// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
};
}
};
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
// make a copy, we don't want to modify arguments
options = $.extend( {}, options );
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
target = $( options.of ),
within = $.position.getWithinInfo( options.within ),
scrollInfo = $.position.getScrollInfo( within ),
collision = ( options.collision || "flip" ).split( " " ),
offsets = {};
dimensions = getDimensions( target );
if ( target[0].preventDefault ) {
// force left top to allow flipping
options.at = "left top";
}
targetWidth = dimensions.width;
targetHeight = dimensions.height;
targetOffset = dimensions.offset;
// clone to reuse original targetOffset later
basePosition = $.extend( {}, targetOffset );
// force my and at to have valid horizontal and vertical positions
// if a value is missing or invalid, it will be converted to center
$.each( [ "my", "at" ], function() {
var pos = ( options[ this ] || "" ).split( " " ),
horizontalOffset,
verticalOffset;
if ( pos.length === 1) {
pos = rhorizontal.test( pos[ 0 ] ) ?
pos.concat( [ "center" ] ) :
rvertical.test( pos[ 0 ] ) ?
[ "center" ].concat( pos ) :
[ "center", "center" ];
}
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
// calculate offsets
horizontalOffset = roffset.exec( pos[ 0 ] );
verticalOffset = roffset.exec( pos[ 1 ] );
offsets[ this ] = [
horizontalOffset ? horizontalOffset[ 0 ] : 0,
verticalOffset ? verticalOffset[ 0 ] : 0
];
// reduce to just the positions without the offsets
options[ this ] = [
rposition.exec( pos[ 0 ] )[ 0 ],
rposition.exec( pos[ 1 ] )[ 0 ]
];
});
// normalize collision option
if ( collision.length === 1 ) {
collision[ 1 ] = collision[ 0 ];
}
if ( options.at[ 0 ] === "right" ) {
basePosition.left += targetWidth;
} else if ( options.at[ 0 ] === "center" ) {
basePosition.left += targetWidth / 2;
}
if ( options.at[ 1 ] === "bottom" ) {
basePosition.top += targetHeight;
} else if ( options.at[ 1 ] === "center" ) {
basePosition.top += targetHeight / 2;
}
atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
basePosition.left += atOffset[ 0 ];
basePosition.top += atOffset[ 1 ];
return this.each(function() {
var collisionPosition, using,
elem = $( this ),
elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(),
marginLeft = parseCss( this, "marginLeft" ),
marginTop = parseCss( this, "marginTop" ),
collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
position = $.extend( {}, basePosition ),
myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
if ( options.my[ 0 ] === "right" ) {
position.left -= elemWidth;
} else if ( options.my[ 0 ] === "center" ) {
position.left -= elemWidth / 2;
}
if ( options.my[ 1 ] === "bottom" ) {
position.top -= elemHeight;
} else if ( options.my[ 1 ] === "center" ) {
position.top -= elemHeight / 2;
}
position.left += myOffset[ 0 ];
position.top += myOffset[ 1 ];
// if the browser doesn't support fractions, then round for consistent results
if ( !supportsOffsetFractions ) {
position.left = round( position.left );
position.top = round( position.top );
}
collisionPosition = {
marginLeft: marginLeft,
marginTop: marginTop
};
$.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[ i ] ] ) {
$.ui.position[ collision[ i ] ][ dir ]( position, {
targetWidth: targetWidth,
targetHeight: targetHeight,
elemWidth: elemWidth,
elemHeight: elemHeight,
collisionPosition: collisionPosition,
collisionWidth: collisionWidth,
collisionHeight: collisionHeight,
offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
my: options.my,
at: options.at,
within: within,
elem: elem
});
}
});
if ( options.using ) {
// adds feedback as second argument to using callback, if present
using = function( props ) {
var left = targetOffset.left - position.left,
right = left + targetWidth - elemWidth,
top = targetOffset.top - position.top,
bottom = top + targetHeight - elemHeight,
feedback = {
target: {
element: target,
left: targetOffset.left,
top: targetOffset.top,
width: targetWidth,
height: targetHeight
},
element: {
element: elem,
left: position.left,
top: position.top,
width: elemWidth,
height: elemHeight
},
horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
};
if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
feedback.horizontal = "center";
}
if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
feedback.vertical = "middle";
}
if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
feedback.important = "horizontal";
} else {
feedback.important = "vertical";
}
options.using.call( this, props, feedback );
};
}
elem.offset( $.extend( position, { using: using } ) );
});
};
$.ui.position = {
fit: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = withinOffset - collisionPosLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
newOverRight;
// element is wider than within
if ( data.collisionWidth > outerWidth ) {
// element is initially over the left side of within
if ( overLeft > 0 && overRight <= 0 ) {
newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
position.left += overLeft - newOverRight;
// element is initially over right side of within
} else if ( overRight > 0 && overLeft <= 0 ) {
position.left = withinOffset;
// element is initially over both left and right sides of within
} else {
if ( overLeft > overRight ) {
position.left = withinOffset + outerWidth - data.collisionWidth;
} else {
position.left = withinOffset;
}
}
// too far left -> align with left edge
} else if ( overLeft > 0 ) {
position.left += overLeft;
// too far right -> align with right edge
} else if ( overRight > 0 ) {
position.left -= overRight;
// adjust based on position and margin
} else {
position.left = max( position.left - collisionPosLeft, position.left );
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = withinOffset - collisionPosTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
newOverBottom;
// element is taller than within
if ( data.collisionHeight > outerHeight ) {
// element is initially over the top of within
if ( overTop > 0 && overBottom <= 0 ) {
newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
position.top += overTop - newOverBottom;
// element is initially over bottom of within
} else if ( overBottom > 0 && overTop <= 0 ) {
position.top = withinOffset;
// element is initially over both top and bottom of within
} else {
if ( overTop > overBottom ) {
position.top = withinOffset + outerHeight - data.collisionHeight;
} else {
position.top = withinOffset;
}
}
// too far up -> align with top
} else if ( overTop > 0 ) {
position.top += overTop;
// too far down -> align with bottom edge
} else if ( overBottom > 0 ) {
position.top -= overBottom;
// adjust based on position and margin
} else {
position.top = max( position.top - collisionPosTop, position.top );
}
}
},
flip: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = collisionPosLeft - offsetLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
myOffset = data.my[ 0 ] === "left" ?
-data.elemWidth :
data.my[ 0 ] === "right" ?
data.elemWidth :
0,
atOffset = data.at[ 0 ] === "left" ?
data.targetWidth :
data.at[ 0 ] === "right" ?
-data.targetWidth :
0,
offset = -2 * data.offset[ 0 ],
newOverRight,
newOverLeft;
if ( overLeft < 0 ) {
newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
position.left += myOffset + atOffset + offset;
}
} else if ( overRight > 0 ) {
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
position.left += myOffset + atOffset + offset;
}
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = collisionPosTop - offsetTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
top = data.my[ 1 ] === "top",
myOffset = top ?
-data.elemHeight :
data.my[ 1 ] === "bottom" ?
data.elemHeight :
0,
atOffset = data.at[ 1 ] === "top" ?
data.targetHeight :
data.at[ 1 ] === "bottom" ?
-data.targetHeight :
0,
offset = -2 * data.offset[ 1 ],
newOverTop,
newOverBottom;
if ( overTop < 0 ) {
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
position.top += myOffset + atOffset + offset;
}
} else if ( overBottom > 0 ) {
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
position.top += myOffset + atOffset + offset;
}
}
}
},
flipfit: {
left: function() {
$.ui.position.flip.left.apply( this, arguments );
$.ui.position.fit.left.apply( this, arguments );
},
top: function() {
$.ui.position.flip.top.apply( this, arguments );
$.ui.position.fit.top.apply( this, arguments );
}
}
};
// fraction support test
(function() {
var testElement, testElementParent, testElementStyle, offsetLeft, i,
body = document.getElementsByTagName( "body" )[ 0 ],
div = document.createElement( "div" );
//Create a "fake body" for testing based on method used in jQuery.support
testElement = document.createElement( body ? "div" : "body" );
testElementStyle = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
};
if ( body ) {
$.extend( testElementStyle, {
position: "absolute",
left: "-1000px",
top: "-1000px"
});
}
for ( i in testElementStyle ) {
testElement.style[ i ] = testElementStyle[ i ];
}
testElement.appendChild( div );
testElementParent = body || document.documentElement;
testElementParent.insertBefore( testElement, testElementParent.firstChild );
div.style.cssText = "position: absolute; left: 10.7432222px;";
offsetLeft = $( div ).offset().left;
supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
testElement.innerHTML = "";
testElementParent.removeChild( testElement );
})();
})();
var position = $.ui.position;
/*!
* jQuery UI Menu 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/menu/
*/
var menu = $.widget( "ui.menu", {
version: "1.11.4",
defaultElement: "<ul>",
delay: 300,
options: {
icons: {
submenu: "ui-icon-carat-1-e"
},
items: "> *",
menus: "ul",
position: {
my: "left-1 top",
at: "right top"
},
role: "menu",
// callbacks
blur: null,
focus: null,
select: null
},
_create: function() {
this.activeMenu = this.element;
// Flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
this.mouseHandled = false;
this.element
.uniqueId()
.addClass( "ui-menu ui-widget ui-widget-content" )
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
.attr({
role: this.options.role,
tabIndex: 0
});
if ( this.options.disabled ) {
this.element
.addClass( "ui-state-disabled" )
.attr( "aria-disabled", "true" );
}
this._on({
// Prevent focus from sticking to links inside menu after clicking
// them (focus should always stay on UL during navigation).
"mousedown .ui-menu-item": function( event ) {
event.preventDefault();
},
"click .ui-menu-item": function( event ) {
var target = $( event.target );
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
this.select( event );
// Only set the mouseHandled flag if the event will bubble, see #9469.
if ( !event.isPropagationStopped() ) {
this.mouseHandled = true;
}
// Open submenu on click
if ( target.has( ".ui-menu" ).length ) {
this.expand( event );
} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
// Redirect focus to the menu
this.element.trigger( "focus", [ true ] );
// If the active item is on the top level, let it stay active.
// Otherwise, blur the active item since it is no longer visible.
if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
clearTimeout( this.timer );
}
}
}
},
"mouseenter .ui-menu-item": function( event ) {
// Ignore mouse events while typeahead is active, see #10458.
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
// is over an item in the menu
if ( this.previousFilter ) {
return;
}
var target = $( event.currentTarget );
// Remove ui-state-active class from siblings of the newly focused menu item
// to avoid a jump caused by adjacent elements both having a class with a border
target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
this.focus( event, target );
},
mouseleave: "collapseAll",
"mouseleave .ui-menu": "collapseAll",
focus: function( event, keepActiveItem ) {
// If there's already an active item, keep it active
// If not, activate the first item
var item = this.active || this.element.find( this.options.items ).eq( 0 );
if ( !keepActiveItem ) {
this.focus( event, item );
}
},
blur: function( event ) {
this._delay(function() {
if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
this.collapseAll( event );
}
});
},
keydown: "_keydown"
});
this.refresh();
// Clicks outside of a menu collapse any open menus
this._on( this.document, {
click: function( event ) {
if ( this._closeOnDocumentClick( event ) ) {
this.collapseAll( event );
}
// Reset the mouseHandled flag
this.mouseHandled = false;
}
});
},
_destroy: function() {
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).addBack()
.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
.removeAttr( "role" )
.removeAttr( "tabIndex" )
.removeAttr( "aria-labelledby" )
.removeAttr( "aria-expanded" )
.removeAttr( "aria-hidden" )
.removeAttr( "aria-disabled" )
.removeUniqueId()
.show();
// Destroy menu items
this.element.find( ".ui-menu-item" )
.removeClass( "ui-menu-item" )
.removeAttr( "role" )
.removeAttr( "aria-disabled" )
.removeUniqueId()
.removeClass( "ui-state-hover" )
.removeAttr( "tabIndex" )
.removeAttr( "role" )
.removeAttr( "aria-haspopup" )
.children().each( function() {
var elem = $( this );
if ( elem.data( "ui-menu-submenu-carat" ) ) {
elem.remove();
}
});
// Destroy menu dividers
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
},
_keydown: function( event ) {
var match, prev, character, skip,
preventDefault = true;
switch ( event.keyCode ) {
case $.ui.keyCode.PAGE_UP:
this.previousPage( event );
break;
case $.ui.keyCode.PAGE_DOWN:
this.nextPage( event );
break;
case $.ui.keyCode.HOME:
this._move( "first", "first", event );
break;
case $.ui.keyCode.END:
this._move( "last", "last", event );
break;
case $.ui.keyCode.UP:
this.previous( event );
break;
case $.ui.keyCode.DOWN:
this.next( event );
break;
case $.ui.keyCode.LEFT:
this.collapse( event );
break;
case $.ui.keyCode.RIGHT:
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
this.expand( event );
}
break;
case $.ui.keyCode.ENTER:
case $.ui.keyCode.SPACE:
this._activate( event );
break;
case $.ui.keyCode.ESCAPE:
this.collapse( event );
break;
default:
preventDefault = false;
prev = this.previousFilter || "";
character = String.fromCharCode( event.keyCode );
skip = false;
clearTimeout( this.filterTimer );
if ( character === prev ) {
skip = true;
} else {
character = prev + character;
}
match = this._filterMenuItems( character );
match = skip && match.index( this.active.next() ) !== -1 ?
this.active.nextAll( ".ui-menu-item" ) :
match;
// If no matches on the current filter, reset to the last character pressed
// to move down the menu to the first item that starts with that character
if ( !match.length ) {
character = String.fromCharCode( event.keyCode );
match = this._filterMenuItems( character );
}
if ( match.length ) {
this.focus( event, match );
this.previousFilter = character;
this.filterTimer = this._delay(function() {
delete this.previousFilter;
}, 1000 );
} else {
delete this.previousFilter;
}
}
if ( preventDefault ) {
event.preventDefault();
}
},
_activate: function( event ) {
if ( !this.active.is( ".ui-state-disabled" ) ) {
if ( this.active.is( "[aria-haspopup='true']" ) ) {
this.expand( event );
} else {
this.select( event );
}
}
},
refresh: function() {
var menus, items,
that = this,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
// Initialize nested menus
submenus.filter( ":not(.ui-menu)" )
.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
.hide()
.attr({
role: this.options.role,
"aria-hidden": "true",
"aria-expanded": "false"
})
.each(function() {
var menu = $( this ),
item = menu.parent(),
submenuCarat = $( "<span>" )
.addClass( "ui-menu-icon ui-icon " + icon )
.data( "ui-menu-submenu-carat", true );
item
.attr( "aria-haspopup", "true" )
.prepend( submenuCarat );
menu.attr( "aria-labelledby", item.attr( "id" ) );
});
menus = submenus.add( this.element );
items = menus.find( this.options.items );
// Initialize menu-items containing spaces and/or dashes only as dividers
items.not( ".ui-menu-item" ).each(function() {
var item = $( this );
if ( that._isDivider( item ) ) {
item.addClass( "ui-widget-content ui-menu-divider" );
}
});
// Don't refresh list items that are already adapted
items.not( ".ui-menu-item, .ui-menu-divider" )
.addClass( "ui-menu-item" )
.uniqueId()
.attr({
tabIndex: -1,
role: this._itemRole()
});
// Add aria-disabled attribute to any disabled menu item
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
// If the active item has been removed, blur the menu
if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
this.blur();
}
},
_itemRole: function() {
return {
menu: "menuitem",
listbox: "option"
}[ this.options.role ];
},
_setOption: function( key, value ) {
if ( key === "icons" ) {
this.element.find( ".ui-menu-icon" )
.removeClass( this.options.icons.submenu )
.addClass( value.submenu );
}
if ( key === "disabled" ) {
this.element
.toggleClass( "ui-state-disabled", !!value )
.attr( "aria-disabled", value );
}
this._super( key, value );
},
focus: function( event, item ) {
var nested, focused;
this.blur( event, event && event.type === "focus" );
this._scrollIntoView( item );
this.active = item.first();
focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
// Only update aria-activedescendant if there's a role
// otherwise we assume focus is managed elsewhere
if ( this.options.role ) {
this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
}
// Highlight active parent menu item, if any
this.active
.parent()
.closest( ".ui-menu-item" )
.addClass( "ui-state-active" );
if ( event && event.type === "keydown" ) {
this._close();
} else {
this.timer = this._delay(function() {
this._close();
}, this.delay );
}
nested = item.children( ".ui-menu" );
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
this._startOpening(nested);
}
this.activeMenu = item.parent();
this._trigger( "focus", event, { item: item } );
},
_scrollIntoView: function( item ) {
var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
if ( this._hasScroll() ) {
borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
scroll = this.activeMenu.scrollTop();
elementHeight = this.activeMenu.height();
itemHeight = item.outerHeight();
if ( offset < 0 ) {
this.activeMenu.scrollTop( scroll + offset );
} else if ( offset + itemHeight > elementHeight ) {
this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
}
}
},
blur: function( event, fromFocus ) {
if ( !fromFocus ) {
clearTimeout( this.timer );
}
if ( !this.active ) {
return;
}
this.active.removeClass( "ui-state-focus" );
this.active = null;
this._trigger( "blur", event, { item: this.active } );
},
_startOpening: function( submenu ) {
clearTimeout( this.timer );
// Don't open if already open fixes a Firefox bug that caused a .5 pixel
// shift in the submenu position when mousing over the carat icon
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
return;
}
this.timer = this._delay(function() {
this._close();
this._open( submenu );
}, this.delay );
},
_open: function( submenu ) {
var position = $.extend({
of: this.active
}, this.options.position );
clearTimeout( this.timer );
this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
.hide()
.attr( "aria-hidden", "true" );
submenu
.show()
.removeAttr( "aria-hidden" )
.attr( "aria-expanded", "true" )
.position( position );
},
collapseAll: function( event, all ) {
clearTimeout( this.timer );
this.timer = this._delay(function() {
// If we were passed an event, look for the submenu that contains the event
var currentMenu = all ? this.element :
$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
if ( !currentMenu.length ) {
currentMenu = this.element;
}
this._close( currentMenu );
this.blur( event );
this.activeMenu = currentMenu;
}, this.delay );
},
// With no arguments, closes the currently active menu - if nothing is active
// it closes all menus. If passed an argument, it will search for menus BELOW
_close: function( startMenu ) {
if ( !startMenu ) {
startMenu = this.active ? this.active.parent() : this.element;
}
startMenu
.find( ".ui-menu" )
.hide()
.attr( "aria-hidden", "true" )
.attr( "aria-expanded", "false" )
.end()
.find( ".ui-state-active" ).not( ".ui-state-focus" )
.removeClass( "ui-state-active" );
},
_closeOnDocumentClick: function( event ) {
return !$( event.target ).closest( ".ui-menu" ).length;
},
_isDivider: function( item ) {
// Match hyphen, em dash, en dash
return !/[^\-\u2014\u2013\s]/.test( item.text() );
},
collapse: function( event ) {
var newItem = this.active &&
this.active.parent().closest( ".ui-menu-item", this.element );
if ( newItem && newItem.length ) {
this._close();
this.focus( event, newItem );
}
},
expand: function( event ) {
var newItem = this.active &&
this.active
.children( ".ui-menu " )
.find( this.options.items )
.first();
if ( newItem && newItem.length ) {
this._open( newItem.parent() );
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
this._delay(function() {
this.focus( event, newItem );
});
}
},
next: function( event ) {
this._move( "next", "first", event );
},
previous: function( event ) {
this._move( "prev", "last", event );
},
isFirstItem: function() {
return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
},
isLastItem: function() {
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
},
_move: function( direction, filter, event ) {
var next;
if ( this.active ) {
if ( direction === "first" || direction === "last" ) {
next = this.active
[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
.eq( -1 );
} else {
next = this.active
[ direction + "All" ]( ".ui-menu-item" )
.eq( 0 );
}
}
if ( !next || !next.length || !this.active ) {
next = this.activeMenu.find( this.options.items )[ filter ]();
}
this.focus( event, next );
},
nextPage: function( event ) {
var item, base, height;
if ( !this.active ) {
this.next( event );
return;
}
if ( this.isLastItem() ) {
return;
}
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.nextAll( ".ui-menu-item" ).each(function() {
item = $( this );
return item.offset().top - base - height < 0;
});
this.focus( event, item );
} else {
this.focus( event, this.activeMenu.find( this.options.items )
[ !this.active ? "first" : "last" ]() );
}
},
previousPage: function( event ) {
var item, base, height;
if ( !this.active ) {
this.next( event );
return;
}
if ( this.isFirstItem() ) {
return;
}
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.prevAll( ".ui-menu-item" ).each(function() {
item = $( this );
return item.offset().top - base + height > 0;
});
this.focus( event, item );
} else {
this.focus( event, this.activeMenu.find( this.options.items ).first() );
}
},
_hasScroll: function() {
return this.element.outerHeight() < this.element.prop( "scrollHeight" );
},
select: function( event ) {
// TODO: It should never be possible to not have an active item at this
// point, but the tests don't trigger mouseenter before click.
this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
var ui = { item: this.active };
if ( !this.active.has( ".ui-menu" ).length ) {
this.collapseAll( event, true );
}
this._trigger( "select", event, ui );
},
_filterMenuItems: function(character) {
var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
regex = new RegExp( "^" + escapedCharacter, "i" );
return this.activeMenu
.find( this.options.items )
// Only match on items, not dividers or other content (#10571)
.filter( ".ui-menu-item" )
.filter(function() {
return regex.test( $.trim( $( this ).text() ) );
});
}
});
/*!
* jQuery UI Autocomplete 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/autocomplete/
*/
$.widget( "ui.autocomplete", {
version: "1.11.4",
defaultElement: "<input>",
options: {
appendTo: null,
autoFocus: false,
delay: 300,
minLength: 1,
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
source: null,
// callbacks
change: null,
close: null,
focus: null,
open: null,
response: null,
search: null,
select: null
},
requestIndex: 0,
pending: 0,
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
// Unfortunately the code for & in keypress is the same as the up arrow,
// so we use the suppressKeyPressRepeat flag to avoid handling keypress
// events when we know the keydown event was used to modify the
// search term. #7799
var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
nodeName = this.element[ 0 ].nodeName.toLowerCase(),
isTextarea = nodeName === "textarea",
isInput = nodeName === "input";
this.isMultiLine =
// Textareas are always multi-line
isTextarea ? true :
// Inputs are always single-line, even if inside a contentEditable element
// IE also treats inputs as contentEditable
isInput ? false :
// All other element types are determined by whether or not they're contentEditable
this.element.prop( "isContentEditable" );
this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
this.isNewMenu = true;
this.element
.addClass( "ui-autocomplete-input" )
.attr( "autocomplete", "off" );
this._on( this.element, {
keydown: function( event ) {
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
suppressInput = true;
suppressKeyPressRepeat = true;
return;
}
suppressKeyPress = false;
suppressInput = false;
suppressKeyPressRepeat = false;
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
suppressKeyPress = true;
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
suppressKeyPress = true;
this._move( "nextPage", event );
break;
case keyCode.UP:
suppressKeyPress = true;
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
suppressKeyPress = true;
this._keyEvent( "next", event );
break;
case keyCode.ENTER:
// when menu is open and has focus
if ( this.menu.active ) {
// #6055 - Opera still allows the keypress to occur
// which causes forms to submit
suppressKeyPress = true;
event.preventDefault();
this.menu.select( event );
}
break;
case keyCode.TAB:
if ( this.menu.active ) {
this.menu.select( event );
}
break;
case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.close( event );
// Different browsers have different default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault();
}
break;
default:
suppressKeyPressRepeat = true;
// search timeout should be triggered before the input value is changed
this._searchTimeout( event );
break;
}
},
keypress: function( event ) {
if ( suppressKeyPress ) {
suppressKeyPress = false;
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
event.preventDefault();
}
return;
}
if ( suppressKeyPressRepeat ) {
return;
}
// replicate some key handlers to allow them to repeat in Firefox and Opera
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
this._move( "nextPage", event );
break;
case keyCode.UP:
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
this._keyEvent( "next", event );
break;
}
},
input: function( event ) {
if ( suppressInput ) {
suppressInput = false;
event.preventDefault();
return;
}
this._searchTimeout( event );
},
focus: function() {
this.selectedItem = null;
this.previous = this._value();
},
blur: function( event ) {
if ( this.cancelBlur ) {
delete this.cancelBlur;
return;
}
clearTimeout( this.searching );
this.close( event );
this._change( event );
}
});
this._initSource();
this.menu = $( "<ul>" )
.addClass( "ui-autocomplete ui-front" )
.appendTo( this._appendTo() )
.menu({
// disable ARIA support, the live region takes care of that
role: null
})
.hide()
.menu( "instance" );
this._on( this.menu.element, {
mousedown: function( event ) {
// prevent moving focus out of the text field
event.preventDefault();
// IE doesn't prevent moving focus even with event.preventDefault()
// so we set a flag to know when we should ignore the blur event
this.cancelBlur = true;
this._delay(function() {
delete this.cancelBlur;
});
// clicking on the scrollbar causes focus to shift to the body
// but we can't detect a mouseup or a click immediately afterward
// so we have to track the next mousedown and close the menu if
// the user clicks somewhere outside of the autocomplete
var menuElement = this.menu.element[ 0 ];
if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
this._delay(function() {
var that = this;
this.document.one( "mousedown", function( event ) {
if ( event.target !== that.element[ 0 ] &&
event.target !== menuElement &&
!$.contains( menuElement, event.target ) ) {
that.close();
}
});
});
}
},
menufocus: function( event, ui ) {
var label, item;
// support: Firefox
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
if ( this.isNewMenu ) {
this.isNewMenu = false;
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
this.menu.blur();
this.document.one( "mousemove", function() {
$( event.target ).trigger( event.originalEvent );
});
return;
}
}
item = ui.item.data( "ui-autocomplete-item" );
if ( false !== this._trigger( "focus", event, { item: item } ) ) {
// use value to match what will end up in the input, if it was a key event
if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
this._value( item.value );
}
}
// Announce the value in the liveRegion
label = ui.item.attr( "aria-label" ) || item.value;
if ( label && $.trim( label ).length ) {
this.liveRegion.children().hide();
$( "<div>" ).text( label ).appendTo( this.liveRegion );
}
},
menuselect: function( event, ui ) {
var item = ui.item.data( "ui-autocomplete-item" ),
previous = this.previous;
// only trigger when focus was lost (click on menu)
if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
this.element.focus();
this.previous = previous;
// #6109 - IE triggers two focus events and the second
// is asynchronous, so we need to reset the previous
// term synchronously and asynchronously :-(
this._delay(function() {
this.previous = previous;
this.selectedItem = item;
});
}
if ( false !== this._trigger( "select", event, { item: item } ) ) {
this._value( item.value );
}
// reset the term after the select event
// this allows custom select handling to work properly
this.term = this._value();
this.close( event );
this.selectedItem = item;
}
});
this.liveRegion = $( "<span>", {
role: "status",
"aria-live": "assertive",
"aria-relevant": "additions"
})
.addClass( "ui-helper-hidden-accessible" )
.appendTo( this.document[ 0 ].body );
// turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete
// if the page is unloaded before the widget is destroyed. #7790
this._on( this.window, {
beforeunload: function() {
this.element.removeAttr( "autocomplete" );
}
});
},
_destroy: function() {
clearTimeout( this.searching );
this.element
.removeClass( "ui-autocomplete-input" )
.removeAttr( "autocomplete" );
this.menu.element.remove();
this.liveRegion.remove();
},
_setOption: function( key, value ) {
this._super( key, value );
if ( key === "source" ) {
this._initSource();
}
if ( key === "appendTo" ) {
this.menu.element.appendTo( this._appendTo() );
}
if ( key === "disabled" && value && this.xhr ) {
this.xhr.abort();
}
},
_appendTo: function() {
var element = this.options.appendTo;
if ( element ) {
element = element.jquery || element.nodeType ?
$( element ) :
this.document.find( element ).eq( 0 );
}
if ( !element || !element[ 0 ] ) {
element = this.element.closest( ".ui-front" );
}
if ( !element.length ) {
element = this.document[ 0 ].body;
}
return element;
},
_initSource: function() {
var array, url,
that = this;
if ( $.isArray( this.options.source ) ) {
array = this.options.source;
this.source = function( request, response ) {
response( $.ui.autocomplete.filter( array, request.term ) );
};
} else if ( typeof this.options.source === "string" ) {
url = this.options.source;
this.source = function( request, response ) {
if ( that.xhr ) {
that.xhr.abort();
}
that.xhr = $.ajax({
url: url,
data: request,
dataType: "json",
success: function( data ) {
response( data );
},
error: function() {
response([]);
}
});
};
} else {
this.source = this.options.source;
}
},
_searchTimeout: function( event ) {
clearTimeout( this.searching );
this.searching = this._delay(function() {
// Search if the value has changed, or if the user retypes the same value (see #7434)
var equalValues = this.term === this._value(),
menuVisible = this.menu.element.is( ":visible" ),
modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
this.selectedItem = null;
this.search( null, event );
}
}, this.options.delay );
},
search: function( value, event ) {
value = value != null ? value : this._value();
// always save the actual value, not the one passed as an argument
this.term = this._value();
if ( value.length < this.options.minLength ) {
return this.close( event );
}
if ( this._trigger( "search", event ) === false ) {
return;
}
return this._search( value );
},
_search: function( value ) {
this.pending++;
this.element.addClass( "ui-autocomplete-loading" );
this.cancelSearch = false;
this.source( { term: value }, this._response() );
},
_response: function() {
var index = ++this.requestIndex;
return $.proxy(function( content ) {
if ( index === this.requestIndex ) {
this.__response( content );
}
this.pending--;
if ( !this.pending ) {
this.element.removeClass( "ui-autocomplete-loading" );
}
}, this );
},
__response: function( content ) {
if ( content ) {
content = this._normalize( content );
}
this._trigger( "response", null, { content: content } );
if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
this._suggest( content );
this._trigger( "open" );
} else {
// use ._close() instead of .close() so we don't cancel future searches
this._close();
}
},
close: function( event ) {
this.cancelSearch = true;
this._close( event );
},
_close: function( event ) {
if ( this.menu.element.is( ":visible" ) ) {
this.menu.element.hide();
this.menu.blur();
this.isNewMenu = true;
this._trigger( "close", event );
}
},
_change: function( event ) {
if ( this.previous !== this._value() ) {
this._trigger( "change", event, { item: this.selectedItem } );
}
},
_normalize: function( items ) {
// assume all items have the right format when the first item is complete
if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
return items;
}
return $.map( items, function( item ) {
if ( typeof item === "string" ) {
return {
label: item,
value: item
};
}
return $.extend( {}, item, {
label: item.label || item.value,
value: item.value || item.label
});
});
},
_suggest: function( items ) {
var ul = this.menu.element.empty();
this._renderMenu( ul, items );
this.isNewMenu = true;
this.menu.refresh();
// size and position menu
ul.show();
this._resizeMenu();
ul.position( $.extend({
of: this.element
}, this.options.position ) );
if ( this.options.autoFocus ) {
this.menu.next();
}
},
_resizeMenu: function() {
var ul = this.menu.element;
ul.outerWidth( Math.max(
// Firefox wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping (#7513)
ul.width( "" ).outerWidth() + 1,
this.element.outerWidth()
) );
},
_renderMenu: function( ul, items ) {
var that = this;
$.each( items, function( index, item ) {
that._renderItemData( ul, item );
});
},
_renderItemData: function( ul, item ) {
return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
},
_renderItem: function( ul, item ) {
return $( "<li>" ).text( item.label ).appendTo( ul );
},
_move: function( direction, event ) {
if ( !this.menu.element.is( ":visible" ) ) {
this.search( null, event );
return;
}
if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
this.menu.isLastItem() && /^next/.test( direction ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.menu.blur();
return;
}
this.menu[ direction ]( event );
},
widget: function() {
return this.menu.element;
},
_value: function() {
return this.valueMethod.apply( this.element, arguments );
},
_keyEvent: function( keyEvent, event ) {
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
this._move( keyEvent, event );
// prevents moving cursor to beginning/end of the text field in some browsers
event.preventDefault();
}
}
});
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
},
filter: function( array, term ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
return $.grep( array, function( value ) {
return matcher.test( value.label || value.value || value );
});
}
});
// live region extension, adding a `messages` option
// NOTE: This is an experimental API. We are still investigating
// a full solution for string manipulation and internationalization.
$.widget( "ui.autocomplete", $.ui.autocomplete, {
options: {
messages: {
noResults: "No search results.",
results: function( amount ) {
return amount + ( amount > 1 ? " results are" : " result is" ) +
" available, use up and down arrow keys to navigate.";
}
}
},
__response: function( content ) {
var message;
this._superApply( arguments );
if ( this.options.disabled || this.cancelSearch ) {
return;
}
if ( content && content.length ) {
message = this.options.messages.results( content.length );
} else {
message = this.options.messages.noResults;
}
this.liveRegion.children().hide();
$( "<div>" ).text( message ).appendTo( this.liveRegion );
}
});
var autocomplete = $.ui.autocomplete;
})); |
(window.webpackJsonp=window.webpackJsonp||[]).push([[7,16],{1013:function(module,exports,__webpack_require__){var content=__webpack_require__(1022);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[module.i,content,""]]),content.locals&&(module.exports=content.locals);(0,__webpack_require__(206).default)("6dd048f4",content,!0,{sourceMap:!1})},1021:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(1013)},1022:function(module,exports,__webpack_require__){var ___CSS_LOADER_EXPORT___=__webpack_require__(205)((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,".root[data-v-5cec39b4]{display:flex;align-items:center;justify-content:center;height:35px}.root .input[data-v-5cec39b4]{width:100%;height:35px;padding:0 20px;border-radius:5px;border:1px solid #5466e2;cursor:pointer;background-color:#fff;font-size:14px;color:#000}.root .button[data-v-5cec39b4]{height:100%;width:60px;border-radius:5px;cursor:pointer;background-color:#5466e2;margin-left:10px}.root .button .plusIcon[data-v-5cec39b4]{height:15px;width:15px;color:#fafafa}",""]),___CSS_LOADER_EXPORT___.locals={},module.exports=___CSS_LOADER_EXPORT___},1041:function(module,exports,__webpack_require__){var content=__webpack_require__(1047);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[module.i,content,""]]),content.locals&&(module.exports=content.locals);(0,__webpack_require__(206).default)("5ef2af14",content,!0,{sourceMap:!1})},1046:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(1041)},1047:function(module,exports,__webpack_require__){var ___CSS_LOADER_EXPORT___=__webpack_require__(205)((function(i){return i[1]}));___CSS_LOADER_EXPORT___.push([module.i,".homeContent .listBox .listInnerCenterBox[data-v-952d5de4]{display:flex;align-items:center;justify-content:center}.homeContent[data-v-952d5de4]{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;padding:var(--home-content-padding)}.homeContent .listBox[data-v-952d5de4],.homeContent .taskBar[data-v-952d5de4]{display:flex;width:100%;max-width:1000px;margin-top:30px}.homeContent .listBox[data-v-952d5de4]{height:100%;margin-bottom:30px}.homeContent .listBox .listInnerCenterBox[data-v-952d5de4]{width:100%;height:100%}.homeContent .listBox .listInnerBox[data-v-952d5de4]{display:flex;flex-direction:column;width:100%}.homeContent .listBox .listInnerBox .listTitle[data-v-952d5de4]{width:100%;margin-bottom:10px;text-align:start;font-size:18px}.homeContent .listBox .listInnerBox .taskCard[data-v-952d5de4]{margin-top:20px}",""]),___CSS_LOADER_EXPORT___.locals={},module.exports=___CSS_LOADER_EXPORT___},986:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var componentNormalizer=__webpack_require__(153);const __vuedocgen_export_0=Object(componentNormalizer.a)({},(function(){var _h=this.$createElement,_c=this._self._c||_h;return _c("svg",{attrs:{width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"}},[_c("path",{attrs:{d:"M12.75 5.75H8.5C8.36194 5.75 8.25 5.63806 8.25 5.5V1.25C8.25 0.559692 7.69031 0 7 0C6.30969 0 5.75 0.559692 5.75 1.25V5.5C5.75 5.63806 5.63806 5.75 5.5 5.75H1.25C0.559692 5.75 0 6.30969 0 7C0 7.69031 0.559692 8.25 1.25 8.25H5.5C5.63806 8.25 5.75 8.36194 5.75 8.5V12.75C5.75 13.4403 6.30969 14 7 14C7.69031 14 8.25 13.4403 8.25 12.75V8.5C8.25 8.36194 8.36194 8.25 8.5 8.25H12.75C13.4403 8.25 14 7.69031 14 7C14 6.30969 13.4403 5.75 12.75 5.75Z",fill:"currentColor"}})])}),[],!1,null,null,null).exports;__webpack_exports__.default=__vuedocgen_export_0;__vuedocgen_export_0.__docgenInfo={displayName:"PlusIcon",description:"",tags:{}}},987:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__(10),__webpack_require__(3),__webpack_require__(29),__webpack_require__(38),__webpack_require__(73),__webpack_require__(25),__webpack_require__(42),__webpack_require__(75),__webpack_require__(76),__webpack_require__(154);var defineProperty=__webpack_require__(33),vuex_esm=__webpack_require__(178);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){Object(defineProperty.a)(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}var components_TaskBarvue_type_script_lang_js_={data:function data(){return{taskDescription:""}},computed:_objectSpread({},Object(vuex_esm.c)({isLoadingCreateTask:"getIsLoadingCreateTask"})),watch:{isLoadingCreateTask:function isLoadingCreateTask(){!1===this.isLoadingCreateTask&&(this.taskDescription="")}},methods:_objectSpread(_objectSpread({},Object(vuex_esm.b)(["createTask"])),{},{onKeyPress:function onKeyPress(event){"Enter"===event.key&&""!==this.taskDescription.trim()&&this.addTask()},addTask:function addTask(){this.createTask({description:this.taskDescription})}})},componentNormalizer=(__webpack_require__(1021),__webpack_require__(153)),component=Object(componentNormalizer.a)(components_TaskBarvue_type_script_lang_js_,(function(){var _vm=this,_h=_vm.$createElement,_c=_vm._self._c||_h;return _c("Box",{staticClass:"root"},[_c("input",{directives:[{name:"model",rawName:"v-model.trim",value:_vm.taskDescription,expression:"taskDescription",modifiers:{trim:!0}}],staticClass:"input",attrs:{type:"text",placeholder:"Add a new task..."},domProps:{value:_vm.taskDescription},on:{keypress:_vm.onKeyPress,input:function($event){$event.target.composing||(_vm.taskDescription=$event.target.value.trim())},blur:function($event){return _vm.$forceUpdate()}}}),_vm._v(" "),_vm.taskDescription.length>0?_c("BaseButton",{staticClass:"button",nativeOn:{click:function($event){return _vm.addTask.apply(null,arguments)}}},[_vm.isLoadingCreateTask?_c("Spinner",{attrs:{size:10,color:"white"}}):_c("PlusIcon",{staticClass:"plusIcon"})],1):_vm._e()],1)}),[],!1,null,"5cec39b4",null);const __vuedocgen_export_0=component.exports;__webpack_exports__.default=__vuedocgen_export_0;installComponents(component,{Spinner:__webpack_require__(985).default,PlusIcon:__webpack_require__(986).default,BaseButton:__webpack_require__(983).default,Box:__webpack_require__(982).default}),__vuedocgen_export_0.__docgenInfo={exportName:"default",displayName:"TaskBar",description:"",tags:{}}},998:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__(10),__webpack_require__(3),__webpack_require__(29),__webpack_require__(38),__webpack_require__(73),__webpack_require__(25),__webpack_require__(42),__webpack_require__(75),__webpack_require__(76);var defineProperty=__webpack_require__(33),vuex_esm=__webpack_require__(178),env=__webpack_require__(1011);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){Object(defineProperty.a)(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}var components_ContentCompletedPagevue_type_script_lang_js_={data:function data(){return{MOBILE_WIDTH_SIZE:env.a.MOBILE_WIDTH_SIZE,windowWidth:window.innerWidth}},computed:_objectSpread({},Object(vuex_esm.c)({completedTasks:"getCompletedTasks",isLoadingGetTasks:"getIsLoadingGetTasks",isErrorAnyRequest:"getIsErrorAnyRequest"})),created:function created(){0===this.completedTasks.length&&this.getTasks()},mounted:function mounted(){var _this=this;window.addEventListener("resize",(function(){_this.windowWidth=window.innerWidth}))},methods:_objectSpread({},Object(vuex_esm.b)(["getTasks"]))},componentNormalizer=(__webpack_require__(1046),__webpack_require__(153)),component=Object(componentNormalizer.a)(components_ContentCompletedPagevue_type_script_lang_js_,(function(){var _vm=this,_h=_vm.$createElement,_c=_vm._self._c||_h;return _c("Box",{staticClass:"homeContent",style:_vm.windowWidth<_vm.MOBILE_WIDTH_SIZE?"--home-content-padding: 0px 10px 0px 10px":"--home-content-padding: 0px 40px 0px 40px"},[_c("TaskBar",{staticClass:"taskBar"}),_vm._v(" "),_c("Box",{staticClass:"listBox"},[_vm.isLoadingGetTasks?_c("Box",{staticClass:"listInnerCenterBox"},[_c("Spinner",{attrs:{size:40,color:"blue"}})],1):_vm.isErrorAnyRequest?_c("Box",{staticClass:"listInnerCenterBox"},[_c("BaseText",[_vm._v("\n An error occurred. Please refresh the page and try again.")])],1):0===_vm.completedTasks.length?_c("Box",{staticClass:"listInnerCenterBox"},[_c("BaseText",[_vm._v(" There aren't any completed tasks in our records. ")])],1):_c("Box",{staticClass:"listInnerBox"},[_c("BaseText",{staticClass:"listTitle"},[_vm._v("Completed Tasks")]),_vm._v(" "),_vm._l(_vm.completedTasks,(function(task){return _c("TaskCard",{key:task._id,staticClass:"taskCard",attrs:{task:task}})}))],2)],1)],1)}),[],!1,null,"952d5de4",null);const __vuedocgen_export_0=component.exports;__webpack_exports__.default=__vuedocgen_export_0;installComponents(component,{TaskBar:__webpack_require__(987).default,Spinner:__webpack_require__(985).default,Box:__webpack_require__(982).default,BaseText:__webpack_require__(984).default,TaskCard:__webpack_require__(992).default}),__vuedocgen_export_0.__docgenInfo={exportName:"default",displayName:"ContentCompletedPage",description:"",tags:{}}}}]); |
// using jQuery
/* global jQuery */
(function(jQuery){
"use strict";
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie !== '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) === (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
var csrftoken = getCookie('csrftoken');
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
jQuery.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
})(jQuery);
|
import { Container, Graphics, Sprite } from 'pixi.js';
import gsap from 'gsap';
export default class Footer extends Container {
constructor() {
super();
this.name = 'footer';
this._addBg();
this._addHighlight();
this._addLogo();
this.height = 70;
}
/**
* @private
*/
_addBg() {
const bg = new Graphics();
bg.beginFill(0x000000);
bg.drawRect(0, 0, window.innerWidth, 70);
bg.endFill();
this.addChild(bg);
}
/**
* @private
*/
_addHighlight() {
const highlight = new Graphics();
highlight.beginFill(0xffd800);
highlight.drawRect(0, 0, window.innerWidth, 70);
highlight.scale.x = 1;
highlight.endFill();
this.addChild(highlight);
gsap.to(highlight.scale, { x: 0.005, duration: 1.5, ease: 'circ.inOut' });
}
/**
* @private
*/
_addLogo() {
const logo = Sprite.from('logo');
logo.x = window.innerWidth - logo.width - 20;
logo.y = logo.height;
this.addChild(logo);
logo.interactive = true;
logo.buttonMode = true;
logo.on('pointerdown', () => (window.location = 'https://www.booost.bg/'));
}
}
|
import React from "react";
import axios from "axios";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { withRouter } from "react-router";
import { NavLink } from "react-router-dom";
const NavigationComponent = props => {
const dynamicLink = (route, linkText) => {
return (
<div className="nav-link-wrapper">
<NavLink to={route} activeClassName="nav-link-active">
{linkText}
</NavLink>
</div>
);
};
const handleSignOut = () => {
axios
.delete("https://api.devcamp.space/logout", { withCredentials: true })
.then(response => {
if (response.status === 200) {
props.history.push("/");
props.handleSuccessfulLogout();
}
return response.data;
})
.catch(error => {
console.log("Error signing out", error);
});
};
return (
<div className="nav-wrapper">
<div className="left-side">
<div className="nav-link-wrapper">
<NavLink exact to="/" activeClassName="nav-link-active">
Home
</NavLink>
</div>
<div className="nav-link-wrapper">
<NavLink to="/about-me" activeClassName="nav-link-active">
About
</NavLink>
</div>
<div className="nav-link-wrapper">
<NavLink to="/contact" activeClassName="nav-link-active">
Contact
</NavLink>
</div>
<div className="nav-link-wrapper">
<NavLink to="/blog" activeClassName="nav-link-active">
Blog
</NavLink>
</div>
{props.loggedInStatus === "LOGGED_IN" ? (
dynamicLink("/portfolio-manager", "Portfolio Manager")
) : null}
</div>
<div className="right-side">
COOPER TINGEY
{props.loggedInStatus === "LOGGED_IN" ? (
<a onClick={handleSignOut}>
<FontAwesomeIcon icon="sign-out-alt" />
</a>
) : null}
</div>
</div>
);
};
export default withRouter(NavigationComponent); |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import bisect
import copy
import logging
import torch.utils.data
from maskrcnn_benchmark.utils.comm import get_world_size
from maskrcnn_benchmark.utils.imports import import_file
from . import datasets as D
from . import samplers
from .collate_batch import BatchCollator
from .transforms import build_transforms
def build_dataset(dataset_list, transforms, dataset_catalog, is_train=True):
"""
Arguments:
dataset_list (list[str]): Contains the names of the datasets, i.e.,
coco_2014_trian, coco_2014_val, etc
transforms (callable): transforms to apply to each (image, target) sample
dataset_catalog (DatasetCatalog): contains the information on how to
construct a dataset.
is_train (bool): whether to setup the dataset for training or testing
"""
if not isinstance(dataset_list, (list, tuple)):
raise RuntimeError(
"dataset_list should be a list of strings, got {}".format(dataset_list)
)
datasets = []
for dataset_name in dataset_list:
data = dataset_catalog.get(dataset_name)
factory = getattr(D, data["factory"])
args = data["args"]
# for COCODataset, we want to remove images without annotations
# during training
if data["factory"] == "COCODataset":
args["remove_images_without_annotations"] = is_train
if data["factory"] == "PascalVOCDataset":
args["use_difficult"] = not is_train
args["transforms"] = transforms
# make dataset from factory
dataset = factory(**args)
datasets.append(dataset)
# for testing, return a list of datasets
if not is_train:
return datasets
# for training, concatenate all datasets into a single one
dataset = datasets[0]
if len(datasets) > 1:
dataset = D.ConcatDataset(datasets)
return [dataset]
def make_data_sampler(dataset, shuffle, distributed):
if distributed:
return samplers.DistributedSampler(dataset, shuffle=shuffle)
if shuffle:
sampler = torch.utils.data.sampler.RandomSampler(dataset)
else:
sampler = torch.utils.data.sampler.SequentialSampler(dataset)
return sampler
def _quantize(x, bins):
bins = copy.copy(bins)
bins = sorted(bins)
quantized = list(map(lambda y: bisect.bisect_right(bins, y), x))
return quantized
def _compute_aspect_ratios(dataset):
aspect_ratios = []
for i in range(len(dataset)):
img_info = dataset.get_img_info(i)
aspect_ratio = float(img_info["height"]) / float(img_info["width"])
aspect_ratios.append(aspect_ratio)
return aspect_ratios
def make_batch_data_sampler(
dataset, sampler, aspect_grouping, images_per_batch, num_iters=None, start_iter=0
):
if aspect_grouping:
if not isinstance(aspect_grouping, (list, tuple)):
aspect_grouping = [aspect_grouping]
aspect_ratios = _compute_aspect_ratios(dataset)
group_ids = _quantize(aspect_ratios, aspect_grouping)
batch_sampler = samplers.GroupedBatchSampler(
sampler, group_ids, images_per_batch, drop_uneven=False
)
else:
batch_sampler = torch.utils.data.sampler.BatchSampler(
sampler, images_per_batch, drop_last=False
)
if num_iters is not None:
batch_sampler = samplers.IterationBasedBatchSampler(
batch_sampler, num_iters, start_iter
)
return batch_sampler
def make_data_loader(cfg, is_train=True, is_distributed=False, start_iter=0):
num_gpus = get_world_size()
if is_train:
images_per_batch = cfg.SOLVER.IMS_PER_BATCH
assert (
images_per_batch % num_gpus == 0
), "SOLVER.IMS_PER_BATCH ({}) must be divisible by the number "
"of GPUs ({}) used.".format(images_per_batch, num_gpus)
images_per_gpu = images_per_batch // num_gpus
shuffle = True
num_iters = cfg.SOLVER.MAX_ITER
else:
images_per_batch = cfg.TEST.IMS_PER_BATCH
assert (
images_per_batch % num_gpus == 0
), "TEST.IMS_PER_BATCH ({}) must be divisible by the number "
"of GPUs ({}) used.".format(images_per_batch, num_gpus)
images_per_gpu = images_per_batch // num_gpus
shuffle = False if not is_distributed else True
num_iters = None
start_iter = 0
if images_per_gpu > 1:
logger = logging.getLogger(__name__)
logger.warning(
"When using more than one image per GPU you may encounter "
"an out-of-memory (OOM) error if your GPU does not have "
"sufficient memory. If this happens, you can reduce "
"SOLVER.IMS_PER_BATCH (for training) or "
"TEST.IMS_PER_BATCH (for inference). For training, you must "
"also adjust the learning rate and schedule length according "
"to the linear scaling rule. See for example: "
"https://github.com/facebookresearch/Detectron/blob/master/configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml#L14"
)
# group images which have similar aspect ratio. In this case, we only
# group in two cases: those with width / height > 1, and the other way around,
# but the code supports more general grouping strategy
aspect_grouping = [1] if cfg.DATALOADER.ASPECT_RATIO_GROUPING else []
paths_catalog = import_file(
"maskrcnn_benchmark.config.paths_catalog", cfg.PATHS_CATALOG, True
)
DatasetCatalog = paths_catalog.DatasetCatalog
dataset_list = cfg.DATASETS.TRAIN if is_train else cfg.DATASETS.TEST
transforms = build_transforms(cfg, is_train)
datasets = build_dataset(dataset_list, transforms, DatasetCatalog, is_train)
data_loaders = []
for dataset in datasets:
sampler = make_data_sampler(dataset, shuffle, is_distributed)
batch_sampler = make_batch_data_sampler(
dataset, sampler, aspect_grouping, images_per_gpu, num_iters, start_iter
)
collator = BatchCollator(cfg.DATALOADER.SIZE_DIVISIBILITY)
num_workers = cfg.DATALOADER.NUM_WORKERS
data_loader = torch.utils.data.DataLoader(
dataset,
num_workers=num_workers,
batch_sampler=batch_sampler,
collate_fn=collator,
)
data_loaders.append(data_loader)
if is_train:
# during training, a single (possibly concatenated) data_loader is returned
assert len(data_loaders) == 1
return data_loaders[0]
return data_loaders
|
export default {
to: "To:",
transferTo: "Transfer to",
blindTransfer: "Transfer",
enterNameOrNumber: "Enter Number"
};
// @key: @#@"to"@#@ @source: @#@"To:"@#@
// @key: @#@"transferTo"@#@ @source: @#@"Transfer to"@#@
// @key: @#@"blindTransfer"@#@ @source: @#@"Transfer"@#@
// @key: @#@"enterNameOrNumber"@#@ @source: @#@"Enter Number"@#@
|
import cookies from './util.cookies'
import db from './util.db'
import log from './util.log'
const util = {
cookies,
db,
log
}
/**
* @description 更新标题
* @param {String} title 标题
*/
util.title = function (titleText) {
const processTitle = process.env.VUE_APP_TITLE || 'D2Admin'
window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}`
}
/**
* @description 打开新页面
* @param {String} url 地址
*/
util.open = function (url) {
let a = document.createElement('a')
a.setAttribute('href', url)
a.setAttribute('target', '_blank')
a.setAttribute('id', 'd2admin-link-temp')
document.body.appendChild(a)
a.click()
document.body.removeChild(document.getElementById('d2admin-link-temp'))
}
/**
* 获取图片的地址完整地址
* @param moduleName
* @param picName
*/
util.getPosterUrl = function ({moduleName, name, id}) {
return `api/public/upload/${moduleName}/${id}/${name}`;
}
export default util
|
/*
* This file has been compiled from: /modules/system/lang/es/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['es'] = $.extend(
$.wn.langMessages['es'] || {},
{"markdowneditor":{"formatting":"Formateo","quote":"Cita","code":"C\u00f3digo","header1":"Encabezado 1","header2":"Encabezado 2","header3":"Encabezado 3","header4":"Encabezado 4","header5":"Encabezado 5","header6":"Encabezado 6","bold":"Negrita","italic":"Cursiva","unorderedlist":"Lista Desordenada","orderedlist":"Lista Ordenada","video":"Video","image":"Imagen","link":"V\u00ednculo","horizontalrule":"Insertar Regla Horizontal","fullscreen":"Pantalla completa","preview":"Previsualizar"},"mediamanager":{"insert_link":"Insertar Media V\u00ednculo","insert_image":"Insertar Media Imagen","insert_video":"Insertar Media Video","insert_audio":"Insertar Media Audio","invalid_file_empty_insert":"Por favor seleccione archivo para insertar v\u00ednculo.","invalid_file_single_insert":"Por favor seleccione un solo archivo.","invalid_image_empty_insert":"Por favor seleccione una imagen(es) para insertar.","invalid_video_empty_insert":"Por favor seleccione un archivo de video para insertar.","invalid_audio_empty_insert":"Por favor seleccione un archivo de audio para insertar."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancelar","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Mes Anterior","nextMonth":"Mes Siguiente","months":["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],"weekdays":["Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado"],"weekdaysShort":["Dom","Lun","Mar","Mie","Jue","Vie","Sab"]},"colorpicker":{"choose":"Ok"},"filter":{"group":{"all":"todos"},"scopes":{"apply_button_text":"Aplicar","clear_button_text":"Limpiar"},"dates":{"all":"todas","filter_button_text":"Filtrar","reset_button_text":"Restablecer","date_placeholder":"Fecha","after_placeholder":"Desde","before_placeholder":"Hasta"},"numbers":{"all":"todos","filter_button_text":"Filtrar","reset_button_text":"Restablecer","min_placeholder":"M\u00ednimo","max_placeholder":"M\u00e1ximo","number_placeholder":"N\u00famero"}},"eventlog":{"show_stacktrace":"Mostrar el seguimiento de la pila","hide_stacktrace":"Ocultar el seguimiento de la pila","tabs":{"formatted":"Formateado","raw":"Sin formato"},"editor":{"title":"Seleccione el editor de c\u00f3digo fuente a usar","description":"Su entorno de sistema operativo debe estar configurado para escuchar a uno de estos esquemas de URL.","openWith":"Abrir con","remember_choice":"Remember selected option for this session","open":"Abrir","cancel":"Cancelar","rememberChoice":"Recuerde la opci\u00f3n seleccionada para esta sesi\u00f3n del navegador"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var es = moment.defineLocale('es', {
months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort : function (m, format) {
if (!m) {
return monthsShortDot;
} else if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
} else {
return monthsShortDot[m.month()];
}
},
monthsRegex : monthsRegex,
monthsShortRegex : monthsRegex,
monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse : monthsParse,
longMonthsParse : monthsParse,
shortMonthsParse : monthsParse,
weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D [de] MMMM [de] YYYY',
LLL : 'D [de] MMMM [de] YYYY H:mm',
LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
},
calendar : {
sameDay : function () {
return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextDay : function () {
return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextWeek : function () {
return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastDay : function () {
return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastWeek : function () {
return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : 'en %s',
past : 'hace %s',
s : 'unos segundos',
ss : '%d segundos',
m : 'un minuto',
mm : '%d minutos',
h : 'una hora',
hh : '%d horas',
d : 'un día',
dd : '%d días',
M : 'un mes',
MM : '%d meses',
y : 'un año',
yy : '%d años'
},
dayOfMonthOrdinalParse : /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return es;
})));
|
import { useContext, useState } from 'react';
import { Link, useHistory } from 'react-router-dom';
import { MdLock } from 'react-icons/md';
import userValidators from '../../../helpers/userValidators';
import { connect } from 'react-redux';
import { register } from '../../../actions/userActions';
import { NotificationContext } from '../../../contexts/NotificationContext';
import '../Form.scss';
const RegisterForm = ({ register }) => {
const { setNotification } = useContext(NotificationContext);
const history = useHistory();
const [formData, setFormData] = useState({
username: '',
email: '',
password: '',
repeatPassword: ''
});
const [formErrors, setFormErrors] = useState({
username: null,
email: null,
password: null,
repeatPassword: null
});
const onFormChange = (e) => {
const fieldName = e.target.name;
const fieldValue = e.target.value.trim();
const newFormData = { ...formData };
newFormData[fieldName] = fieldValue;
setFormData(newFormData);
const newFormErrors = { ...formErrors };
newFormErrors[fieldName] = userValidators[fieldName](fieldValue, formData.password);
if (fieldName === 'password' && formErrors.repeatPassword !== null) {
newFormErrors.repeatPassword = userValidators.repeatPassword(formData.repeatPassword, fieldValue);
}
setFormErrors(newFormErrors);
};
const onSubmitForm = async (e) => {
e.preventDefault();
if (formErrors.username === '' &&
formErrors.email === '' &&
formErrors.password === '' &&
formErrors.repeatPassword === '') {
try {
await register(formData);
history.push('/');
setNotification({ message: 'Registration successful!', type: 'success' });
} catch (error) {
setNotification({ message: error, type: 'error' });
}
}
};
return (
<div className="form-wrapper">
<form className="form" onSubmit={onSubmitForm}>
<article className="icon-container">
<MdLock size={'35px'}
style={{ background: '#3f51b5', fill: '#fff', borderRadius: '50%', padding: '7px' }} />
</article>
<h2 className="title">Register</h2>
<p className="error">{formErrors.username || ''}</p>
<input className={`input-field ${formErrors.username ? 'invalid'
: formErrors.username === '' ? 'valid' : ''}`}
type="text"
htmlFor="username"
name="username"
placeholder="Username"
required
onChange={onFormChange}
/>
<p className="error">{formErrors.email || ''}</p>
<input className={`input-field ${formErrors.email ? 'invalid'
: formErrors.email === '' ? 'valid' : ''}`}
autoComplete="email"
type="email"
htmlFor="email"
name="email"
placeholder="Email"
required
onChange={onFormChange}
/>
<p className="error">{formErrors.password || ''}</p>
<input className={`input-field ${formErrors.password ? 'invalid'
: formErrors.password === '' ? 'valid' : ''}`}
type="password"
htmlFor="password"
name="password"
placeholder="Password"
required
onChange={onFormChange}
/>
<p className="error">{formErrors.repeatPassword || ''}</p>
<input className={`input-field ${formErrors.repeatPassword ? 'invalid'
: formErrors.repeatPassword === '' ? 'valid' : ''}`}
type="password"
htmlFor="password"
name="repeatPassword"
placeholder="Repeat Password"
required
onChange={onFormChange}
/>
<button className="submit-btn" type="submit">
Register
</button>
<Link to="/login">
<p className="link">Already have an account? Login here.</p>
</Link>
</form>
</div>
);
};
const mapDispatchToProps = {
register
};
export default connect(null, mapDispatchToProps)(RegisterForm); |
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath("../.."))
import ignite
import pytorch_sphinx_theme
# -- Project information -----------------------------------------------------
project = "ignite"
copyright = "2020, PyTorch-Ignite Contributors"
author = "PyTorch-Ignite Contributors"
# The short X.Y version
try:
version = os.environ["code_version"]
if "master" in version:
version = "master (" + ignite.__version__ + ")"
else:
version = version.replace("v", "")
except KeyError:
version = ignite.__version__
# The full version, including alpha/beta/rc tags
release = "master"
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.autosectionlabel",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The master toctree document.
master_doc = "index"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "pytorch_sphinx_theme"
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_theme_options = {
"canonical_url": "https://pytorch.org/ignite/index.html",
"collapse_navigation": False,
"display_version": True,
"logo_only": True,
}
html_logo = "_templates/_static/img/ignite_logo.svg"
html_favicon = "_templates/_static/img/ignite_logomark.svg"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static", "_templates/_static"]
html_context = {
"css_files": [
# 'https://fonts.googleapis.com/css?family=Lato',
# '_static/css/pytorch_theme.css'
"_static/css/ignite_theme.css"
],
}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = "ignitedoc"
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "ignite.tex", "ignite Documentation", "Torch Contributors", "manual"),
]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "ignite", "ignite Documentation", [author], 1)]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"ignite",
"ignite Documentation",
author,
"ignite",
"One line description of project.",
"Miscellaneous",
),
]
# -- Extension configuration -------------------------------------------------
# -- Options for intersphinx extension ---------------------------------------
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/3/": None}
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Type hints configs ------------------------------------------------------
autodoc_typehints = "signature"
# -- A patch that turns-off cross refs for type annotations ------------------
import sphinx.domains.python
from docutils import nodes
from sphinx import addnodes
# replaces pending_xref node with desc_type for type annotations
sphinx.domains.python.type_to_xref = lambda t, e=None: addnodes.desc_type("", nodes.Text(t))
# -- Autosummary patch to get list of a classes, funcs automatically ----------
from importlib import import_module
from inspect import getmembers, isclass, isfunction
import sphinx.ext.autosummary
from sphinx.ext.autosummary import Autosummary
from docutils.parsers.rst import directives
from docutils.statemachine import StringList
class BetterAutosummary(Autosummary):
"""Autosummary with autolisting for modules.
By default it tries to import all public names (__all__),
otherwise import all classes and/or functions in a module.
Options:
- :autolist: option to get list of classes and functions from currentmodule.
- :autolist-classes: option to get list of classes from currentmodule.
- :autolist-functions: option to get list of functions from currentmodule.
Example Usage:
.. currentmodule:: ignite.metrics
.. autosummary::
:nosignatures:
:autolist:
"""
# Add new option
_option_spec = Autosummary.option_spec.copy()
_option_spec.update(
{
"autolist": directives.unchanged,
"autolist-classes": directives.unchanged,
"autolist-functions": directives.unchanged,
}
)
option_spec = _option_spec
def run(self):
for auto in ("autolist", "autolist-classes", "autolist-functions"):
if auto in self.options:
# Get current module name
module_name = self.env.ref_context.get("py:module")
# Import module
module = import_module(module_name)
# Get public names (if possible)
try:
names = getattr(module, "__all__")
except AttributeError:
# Get classes defined in the module
cls_names = [
name[0]
for name in getmembers(module, isclass)
if name[-1].__module__ == module_name and not (name[0].startswith("_"))
]
# Get functions defined in the module
fn_names = [
name[0]
for name in getmembers(module, isfunction)
if (name[-1].__module__ == module_name) and not (name[0].startswith("_"))
]
names = cls_names + fn_names
# It may happen that module doesn't have any defined class or func
if not names:
names = [name[0] for name in getmembers(module)]
# Filter out members w/o doc strings
names = [name for name in names if getattr(module, name).__doc__ is not None]
if auto == "autolist":
# Get list of all classes and functions inside module
names = [
name for name in names if (isclass(getattr(module, name)) or isfunction(getattr(module, name)))
]
else:
if auto == "autolist-classes":
# Get only classes
check = isclass
elif auto == "autolist-functions":
# Get only functions
check = isfunction
else:
raise NotImplementedError
names = [name for name in names if check(getattr(module, name))]
# Update content
self.content = StringList(names)
return super().run()
# Patch original Autosummary
sphinx.ext.autosummary.Autosummary = BetterAutosummary
|
/**
Licensed to OffGrid Networks (OGN) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. OGN 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
http://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.
*/
var Q = require('q');
// Given a function and an array of values, creates a chain of promises that
// will sequentially execute func(args[i]).
// Returns a promise.
//
function Q_chainmap(args, func) {
return Q.when().then(function(inValue) {
return args.reduce(function(soFar, arg) {
return soFar.then(function(val) {
return func(arg, val);
});
}, Q(inValue));
});
}
// Behaves similar to Q_chainmap but gracefully handles failures.
// When a promise in the chain is rejected, it will call the failureCallback and then continue the processing, instead of stopping
function Q_chainmap_graceful(args, func, failureCallback) {
return Q.when().then(function(inValue) {
return args.reduce(function(soFar, arg) {
return soFar.then(function(val) {
return func(arg, val);
}).fail(function(err) {
if (failureCallback) {
failureCallback(err);
}
});
}, Q(inValue));
});
}
exports.Q_chainmap = Q_chainmap;
exports.Q_chainmap_graceful = Q_chainmap_graceful; |
const ExpressionInterface = require('./ExpressionInterface');
class SequenceExpression extends implementationOf(ExpressionInterface) {
/**
* Constructor.
*
* @param {SourceLocation} location
* @param {ExpressionInterface[]} expressions
*/
__construct(location, expressions) {
/**
* @type {SourceLocation}
*/
this.location = location;
/**
* @type {ExpressionInterface[]}
*
* @private
*/
this._expressions = expressions;
}
/**
* Gets the expressions.
*
* @returns {ExpressionInterface[]}
*/
get expressions() {
return this._expressions;
}
/**
* @inheritdoc
*/
compile(compiler) {
for (const i in this._expressions) {
compiler.compileNode(this._expressions[i]);
if (i != this._expressions.length - 1) {
compiler._emit(', ');
}
}
}
}
module.exports = SequenceExpression;
|
import http from 'http';
import chalk from 'chalk';
import app from './server';
const server = http.createServer(app);
let currentApp = app;
server.listen(process.env.DACE_PORT, (error) => {
if (error) {
console.log(error);
}
const url = chalk.underline(`http://${process.env.DACE_HOST}:${process.env.DACE_PORT}`);
console.log(`\n🐟 Your application is running at ${url}`);
});
if (module.hot) {
console.log('✅ Server-side HMR Enabled!');
module.hot.accept('./server', () => {
console.log('🔁 HMR Reloading `./server`...');
server.removeListener('request', currentApp);
const newApp = require('./server');
server.on('request', newApp);
currentApp = newApp;
});
}
|
import React from 'react'
import PropTypes from 'prop-types'
import * as R from 'ramda'
import { Input } from '@webapp/components/form/Input'
import Badge from './Badge'
const Label = ({
inputFieldIdPrefix,
labels,
lang,
onChange,
placeholder,
readOnly,
showLanguageBadge,
compactLanguage,
}) => (
<div className="labels-editor__label">
{showLanguageBadge && <Badge lang={lang} compact={compactLanguage} />}
<Input
id={inputFieldIdPrefix ? `${inputFieldIdPrefix}-${lang}` : null}
value={R.propOr('', lang, labels)}
onChange={(value) => onChange(R.ifElse(R.always(R.isEmpty(value)), R.dissoc(lang), R.assoc(lang, value))(labels))}
placeholder={placeholder}
readOnly={readOnly}
/>
</div>
)
Label.propTypes = {
inputFieldIdPrefix: PropTypes.string,
labels: PropTypes.object,
lang: PropTypes.string,
onChange: PropTypes.func,
placeholder: PropTypes.string,
readOnly: PropTypes.bool,
showLanguageBadge: PropTypes.bool,
compactLanguage: PropTypes.bool,
}
Label.defaultProps = {
inputFieldIdPrefix: null,
labels: {},
lang: '',
onChange: null,
placeholder: null,
readOnly: false,
showLanguageBadge: false,
compactLanguage: false,
}
export default Label
|
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, factory(global.jQuery));
}(this, (function ($) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global_1 =
// eslint-disable-next-line no-undef
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
check(typeof self == 'object' && self) ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
// eslint-disable-next-line no-new-func
Function('return this')();
var fails = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
// Thank's IE8 for his funny defineProperty
var descriptors = !fails(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
var objectPropertyIsEnumerable = {
f: f
};
var createPropertyDescriptor = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
var toString = {}.toString;
var classofRaw = function (it) {
return toString.call(it).slice(8, -1);
};
var split = ''.split;
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var indexedObject = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
var requireObjectCoercible = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
// toObject with fallback for non-array-like ES3 strings
var toIndexedObject = function (it) {
return indexedObject(requireObjectCoercible(it));
};
var isObject = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
var toPrimitive = function (input, PREFERRED_STRING) {
if (!isObject(input)) return input;
var fn, val;
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
throw TypeError("Can't convert object to primitive value");
};
var hasOwnProperty = {}.hasOwnProperty;
var has = function (it, key) {
return hasOwnProperty.call(it, key);
};
var document$1 = global_1.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
var documentCreateElement = function (it) {
return EXISTS ? document$1.createElement(it) : {};
};
// Thank's IE8 for his funny defineProperty
var ie8DomDefine = !descriptors && !fails(function () {
return Object.defineProperty(documentCreateElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (ie8DomDefine) try {
return nativeGetOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
};
var objectGetOwnPropertyDescriptor = {
f: f$1
};
var anObject = function (it) {
if (!isObject(it)) {
throw TypeError(String(it) + ' is not an object');
} return it;
};
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (ie8DomDefine) try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
var objectDefineProperty = {
f: f$2
};
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
var setGlobal = function (key, value) {
try {
createNonEnumerableProperty(global_1, key, value);
} catch (error) {
global_1[key] = value;
} return value;
};
var SHARED = '__core-js_shared__';
var store = global_1[SHARED] || setGlobal(SHARED, {});
var sharedStore = store;
var functionToString = Function.toString;
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof sharedStore.inspectSource != 'function') {
sharedStore.inspectSource = function (it) {
return functionToString.call(it);
};
}
var inspectSource = sharedStore.inspectSource;
var WeakMap = global_1.WeakMap;
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
var shared = createCommonjsModule(function (module) {
(module.exports = function (key, value) {
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.6.0',
mode: 'global',
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
});
var id = 0;
var postfix = Math.random();
var uid = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
var keys = shared('keys');
var sharedKey = function (key) {
return keys[key] || (keys[key] = uid(key));
};
var hiddenKeys = {};
var WeakMap$1 = global_1.WeakMap;
var set, get, has$1;
var enforce = function (it) {
return has$1(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (nativeWeakMap) {
var store$1 = new WeakMap$1();
var wmget = store$1.get;
var wmhas = store$1.has;
var wmset = store$1.set;
set = function (it, metadata) {
wmset.call(store$1, it, metadata);
return metadata;
};
get = function (it) {
return wmget.call(store$1, it) || {};
};
has$1 = function (it) {
return wmhas.call(store$1, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return has(it, STATE) ? it[STATE] : {};
};
has$1 = function (it) {
return has(it, STATE);
};
}
var internalState = {
set: set,
get: get,
has: has$1,
enforce: enforce,
getterFor: getterFor
};
var redefine = createCommonjsModule(function (module) {
var getInternalState = internalState.get;
var enforceInternalState = internalState.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
if (typeof value == 'function') {
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
}
if (O === global_1) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});
});
var path = global_1;
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
var getBuiltIn = function (namespace, method) {
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
};
var ceil = Math.ceil;
var floor = Math.floor;
// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
var toInteger = function (argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
var toLength = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
var max = Math.max;
var min$1 = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
var toAbsoluteIndex = function (index, length) {
var integer = toInteger(index);
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
};
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
var arrayIncludes = {
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
var indexOf = arrayIncludes.indexOf;
var objectKeysInternal = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~indexOf(result, key) || result.push(key);
}
return result;
};
// IE8- don't enum bug keys
var enumBugKeys = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return objectKeysInternal(O, hiddenKeys$1);
};
var objectGetOwnPropertyNames = {
f: f$3
};
var f$4 = Object.getOwnPropertySymbols;
var objectGetOwnPropertySymbols = {
f: f$4
};
// all object keys, includes non-enumerable and symbols
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = objectGetOwnPropertyNames.f(anObject(it));
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};
var copyConstructorProperties = function (target, source) {
var keys = ownKeys(source);
var defineProperty = objectDefineProperty.f;
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true
: value == NATIVE ? false
: typeof detection == 'function' ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
var isForced_1 = isForced;
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
*/
var _export = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global_1;
} else if (STATIC) {
target = global_1[TARGET] || setGlobal(TARGET, {});
} else {
target = (global_1[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor$1(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty === typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
// `IsArray` abstract operation
// https://tc39.github.io/ecma262/#sec-isarray
var isArray = Array.isArray || function isArray(arg) {
return classofRaw(arg) == 'Array';
};
// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
var toObject = function (argument) {
return Object(requireObjectCoercible(argument));
};
var createProperty = function (object, key, value) {
var propertyKey = toPrimitive(key);
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
else object[propertyKey] = value;
};
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
// Chrome 38 Symbol has incorrect toString conversion
// eslint-disable-next-line no-undef
return !String(Symbol());
});
var useSymbolAsUid = nativeSymbol
// eslint-disable-next-line no-undef
&& !Symbol.sham
// eslint-disable-next-line no-undef
&& typeof Symbol() == 'symbol';
var WellKnownSymbolsStore = shared('wks');
var Symbol$1 = global_1.Symbol;
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
var wellKnownSymbol = function (name) {
if (!has(WellKnownSymbolsStore, name)) {
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
var SPECIES = wellKnownSymbol('species');
// `ArraySpeciesCreate` abstract operation
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
var arraySpeciesCreate = function (originalArray, length) {
var C;
if (isArray(originalArray)) {
C = originalArray.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
else if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
var process = global_1.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
version = match[0] + match[1];
} else if (userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = match[1];
}
}
var v8Version = version && +version;
var SPECIES$1 = wellKnownSymbol('species');
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/677
return v8Version >= 51 || !fails(function () {
var array = [];
var constructor = array.constructor = {};
constructor[SPECIES$1] = function () {
return { foo: 1 };
};
return array[METHOD_NAME](Boolean).foo !== 1;
});
};
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
var array = [];
array[IS_CONCAT_SPREADABLE] = false;
return array.concat()[0] !== array;
});
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
var isConcatSpreadable = function (O) {
if (!isObject(O)) return false;
var spreadable = O[IS_CONCAT_SPREADABLE];
return spreadable !== undefined ? !!spreadable : isArray(O);
};
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
// `Array.prototype.concat` method
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
_export({ target: 'Array', proto: true, forced: FORCED }, {
concat: function concat(arg) { // eslint-disable-line no-unused-vars
var O = toObject(this);
var A = arraySpeciesCreate(O, 0);
var n = 0;
var i, k, length, len, E;
for (i = -1, length = arguments.length; i < length; i++) {
E = i === -1 ? O : arguments[i];
if (isConcatSpreadable(E)) {
len = toLength(E.length);
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
} else {
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
createProperty(A, n++, E);
}
}
A.length = n;
return A;
}
});
var aFunction$1 = function (it) {
if (typeof it != 'function') {
throw TypeError(String(it) + ' is not a function');
} return it;
};
// optional / simple context binding
var bindContext = function (fn, that, length) {
aFunction$1(fn);
if (that === undefined) return fn;
switch (length) {
case 0: return function () {
return fn.call(that);
};
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
var push = [].push;
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
var createMethod$1 = function (TYPE) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
return function ($this, callbackfn, that, specificCreate) {
var O = toObject($this);
var self = indexedObject(O);
var boundFunction = bindContext(callbackfn, that, 3);
var length = toLength(self.length);
var index = 0;
var create = specificCreate || arraySpeciesCreate;
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
var value, result;
for (;length > index; index++) if (NO_HOLES || index in self) {
value = self[index];
result = boundFunction(value, index, O);
if (TYPE) {
if (IS_MAP) target[index] = result; // map
else if (result) switch (TYPE) {
case 3: return true; // some
case 5: return value; // find
case 6: return index; // findIndex
case 2: push.call(target, value); // filter
} else if (IS_EVERY) return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
};
};
var arrayIteration = {
// `Array.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
forEach: createMethod$1(0),
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
map: createMethod$1(1),
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
filter: createMethod$1(2),
// `Array.prototype.some` method
// https://tc39.github.io/ecma262/#sec-array.prototype.some
some: createMethod$1(3),
// `Array.prototype.every` method
// https://tc39.github.io/ecma262/#sec-array.prototype.every
every: createMethod$1(4),
// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
find: createMethod$1(5),
// `Array.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
findIndex: createMethod$1(6)
};
var $filter = arrayIteration.filter;
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
// Edge 14- issue
var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
[].filter.call({ length: -1, 0: 1 }, function (it) { throw it; });
});
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
var objectKeys = Object.keys || function keys(O) {
return objectKeysInternal(O, enumBugKeys);
};
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
return O;
};
var html = getBuiltIn('document', 'documentElement');
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
/* global ActiveXObject */
activeXDocument = document.domain && new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
var objectCreate = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : objectDefineProperties(result, Properties);
};
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: objectCreate(null)
});
}
// add a key to Array.prototype[@@unscopables]
var addToUnscopables = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
var $find = arrayIteration.find;
var FIND = 'find';
var SKIPS_HOLES = true;
// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);
var sloppyArrayMethod = function (METHOD_NAME, argument) {
var method = [][METHOD_NAME];
return !method || !fails(function () {
// eslint-disable-next-line no-useless-call,no-throw-literal
method.call(null, argument || function () { throw 1; }, 1);
});
};
var nativeJoin = [].join;
var ES3_STRINGS = indexedObject != Object;
var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
// `Array.prototype.join` method
// https://tc39.github.io/ecma262/#sec-array.prototype.join
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
join: function join(separator) {
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
}
});
var SPECIES$2 = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max$1 = Math.max;
// `Array.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
slice: function slice(start, end) {
var O = toIndexedObject(this);
var length = toLength(O.length);
var k = toAbsoluteIndex(start, length);
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
var Constructor, result, n;
if (isArray(O)) {
Constructor = O.constructor;
// cross-realm fallback
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
Constructor = undefined;
} else if (isObject(Constructor)) {
Constructor = Constructor[SPECIES$2];
if (Constructor === null) Constructor = undefined;
}
if (Constructor === Array || Constructor === undefined) {
return nativeSlice.call(O, k, fin);
}
}
result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
result.length = n;
return result;
}
});
var test = [];
var nativeSort = test.sort;
// IE8-
var FAILS_ON_UNDEFINED = fails(function () {
test.sort(undefined);
});
// V8 bug
var FAILS_ON_NULL = fails(function () {
test.sort(null);
});
// Old WebKit
var SLOPPY_METHOD$1 = sloppyArrayMethod('sort');
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$1;
// `Array.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
_export({ target: 'Array', proto: true, forced: FORCED$1 }, {
sort: function sort(comparefn) {
return comparefn === undefined
? nativeSort.call(toObject(this))
: nativeSort.call(toObject(this), aFunction$1(comparefn));
}
});
var defineProperty = objectDefineProperty.f;
var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// Function instances `.name` property
// https://tc39.github.io/ecma262/#sec-function-instances-name
if (descriptors && !(NAME in FunctionPrototype)) {
defineProperty(FunctionPrototype, NAME, {
configurable: true,
get: function () {
try {
return FunctionPrototypeToString.call(this).match(nameRE)[1];
} catch (error) {
return '';
}
}
});
}
var nativeAssign = Object.assign;
var defineProperty$1 = Object.defineProperty;
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
var objectAssign = !nativeAssign || fails(function () {
// should have correct order of operations (Edge bug)
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
enumerable: true,
get: function () {
defineProperty$1(this, 'b', {
value: 3,
enumerable: false
});
}
}), { b: 2 })).b !== 1) return true;
// should work with symbols and should have deterministic property order (V8 bug)
var A = {};
var B = {};
// eslint-disable-next-line no-undef
var symbol = Symbol();
var alphabet = 'abcdefghijklmnopqrst';
A[symbol] = 7;
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
var T = toObject(target);
var argumentsLength = arguments.length;
var index = 1;
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
while (argumentsLength > index) {
var S = indexedObject(arguments[index++]);
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
var length = keys.length;
var j = 0;
var key;
while (length > j) {
key = keys[j++];
if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
}
} return T;
} : nativeAssign;
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
assign: objectAssign
});
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
var domIterables = {
CSSRuleList: 0,
CSSStyleDeclaration: 0,
CSSValueList: 0,
ClientRectList: 0,
DOMRectList: 0,
DOMStringList: 0,
DOMTokenList: 1,
DataTransferItemList: 0,
FileList: 0,
HTMLAllCollection: 0,
HTMLCollection: 0,
HTMLFormElement: 0,
HTMLSelectElement: 0,
MediaList: 0,
MimeTypeArray: 0,
NamedNodeMap: 0,
NodeList: 1,
PaintRequestList: 0,
Plugin: 0,
PluginArray: 0,
SVGLengthList: 0,
SVGNumberList: 0,
SVGPathSegList: 0,
SVGPointList: 0,
SVGStringList: 0,
SVGTransformList: 0,
SourceBufferList: 0,
StyleSheetList: 0,
TextTrackCueList: 0,
TextTrackList: 0,
TouchList: 0
};
var $forEach = arrayIteration.forEach;
// `Array.prototype.forEach` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;
for (var COLLECTION_NAME in domIterables) {
var Collection = global_1[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
} catch (error) {
CollectionPrototype.forEach = arrayForEach;
}
}
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
function _superPropBase(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _getPrototypeOf(object);
if (object === null) break;
}
return object;
}
function _get(target, property, receiver) {
if (typeof Reflect !== "undefined" && Reflect.get) {
_get = Reflect.get;
} else {
_get = function _get(target, property, receiver) {
var base = _superPropBase(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) {
return desc.get.call(receiver);
}
return desc.value;
};
}
return _get(target, property, receiver || target);
}
/**
* @author: Yura Knoxville
* @version: v1.1.0
*/
var initBodyCaller;
var groupBy = function groupBy(array, f) {
var tmpGroups = {};
array.forEach(function (o) {
var groups = f(o);
tmpGroups[groups] = tmpGroups[groups] || [];
tmpGroups[groups].push(o);
});
return tmpGroups;
};
$.extend($.fn.bootstrapTable.defaults.icons, {
collapseGroup: {
bootstrap3: 'glyphicon-chevron-up',
materialize: 'arrow_drop_down'
}[$.fn.bootstrapTable.theme] || 'fa-angle-up',
expandGroup: {
bootstrap3: 'glyphicon-chevron-down',
materialize: 'arrow_drop_up'
}[$.fn.bootstrapTable.theme] || 'fa-angle-down'
});
$.extend($.fn.bootstrapTable.defaults, {
groupBy: false,
groupByField: '',
groupByFormatter: undefined,
groupByToggle: false,
groupByShowToggleIcon: false,
groupByCollapsedGroups: []
});
var Utils = $.fn.bootstrapTable.utils;
var BootstrapTable = $.fn.bootstrapTable.Constructor;
var _initSort = BootstrapTable.prototype.initSort;
var _initBody = BootstrapTable.prototype.initBody;
var _updateSelected = BootstrapTable.prototype.updateSelected;
BootstrapTable.prototype.initSort = function () {
var _this = this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_initSort.apply(this, Array.prototype.slice.apply(args));
var that = this;
this.tableGroups = [];
if (this.options.groupBy && this.options.groupByField !== '') {
if (this.options.sortName !== this.options.groupByField) {
if (this.options.customSort) {
Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]);
} else {
this.data.sort(function (a, b) {
var groupByFields = _this.getGroupByFields();
var fieldValuesA = [];
var fieldValuesB = [];
$.each(groupByFields, function (i, field) {
fieldValuesA.push(a[field]);
fieldValuesB.push(b[field]);
});
a = fieldValuesA.join();
b = fieldValuesB.join();
return a.localeCompare(b, undefined, {
numeric: true
});
});
}
}
var groups = groupBy(that.data, function (item) {
var groupByFields = _this.getGroupByFields();
var groupValues = [];
$.each(groupByFields, function (i, field) {
groupValues.push(item[field]);
});
return groupValues.join(', ');
});
var index = 0;
$.each(groups, function (key, value) {
_this.tableGroups.push({
id: index,
name: key,
data: value
});
value.forEach(function (item) {
if (!item._data) {
item._data = {};
}
if (_this.isCollapsed(key, value)) {
item._class = 'hidden';
}
item._data['parent-index'] = index;
});
index++;
});
}
};
BootstrapTable.prototype.initBody = function () {
var _this2 = this;
initBodyCaller = true;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
_initBody.apply(this, Array.prototype.slice.apply(args));
if (this.options.groupBy && this.options.groupByField !== '') {
var that = this;
var checkBox = false;
var visibleColumns = 0;
this.columns.forEach(function (column) {
if (column.checkbox) {
checkBox = true;
} else {
if (column.visible) {
visibleColumns += 1;
}
}
});
if (this.options.detailView && !this.options.cardView) {
visibleColumns += 1;
}
this.tableGroups.forEach(function (item) {
var html = [];
html.push(Utils.sprintf('<tr class="info groupBy %s" data-group-index="%s">', _this2.options.groupByToggle ? 'expanded' : '', item.id));
if (that.options.detailView && !that.options.cardView) {
html.push('<td class="detail"></td>');
}
if (checkBox) {
html.push('<td class="bs-checkbox">', '<input name="btSelectGroup" type="checkbox" />', '</td>');
}
var formattedValue = item.name;
if (typeof that.options.groupByFormatter === 'function') {
formattedValue = that.options.groupByFormatter(item.name, item.id, item.data);
}
html.push('<td', Utils.sprintf(' colspan="%s"', visibleColumns), '>', formattedValue);
var icon = _this2.options.icons.collapseGroup;
if (_this2.isCollapsed(item.name, item.data)) {
icon = _this2.options.icons.expandGroup;
}
if (_this2.options.groupByToggle && _this2.options.groupByShowToggleIcon) {
html.push("<span class=\"float-right ".concat(_this2.options.iconsPrefix, " ").concat(icon, "\"></span>"));
}
html.push('</td></tr>');
that.$body.find("tr[data-parent-index=".concat(item.id, "]:first")).before($(html.join('')));
});
this.$selectGroup = [];
this.$body.find('[name="btSelectGroup"]').each(function () {
var self = $(this);
that.$selectGroup.push({
group: self,
item: that.$selectItem.filter(function () {
return $(this).closest('tr').data('parent-index') === self.closest('tr').data('group-index');
})
});
});
if (this.options.groupByToggle) {
this.$container.off('click', '.groupBy').on('click', '.groupBy', function () {
$(this).toggleClass('expanded collapsed');
$(this).find('span').toggleClass("".concat(that.options.icons.collapseGroup, " ").concat(that.options.icons.expandGroup));
that.$body.find("tr[data-parent-index=".concat($(this).closest('tr').data('group-index'), "]")).toggleClass('hidden');
});
}
this.$container.off('click', '[name="btSelectGroup"]').on('click', '[name="btSelectGroup"]', function (event) {
event.stopImmediatePropagation();
var self = $(this);
var checked = self.prop('checked');
that[checked ? 'checkGroup' : 'uncheckGroup']($(this).closest('tr').data('group-index'));
});
}
initBodyCaller = false;
this.updateSelected();
};
BootstrapTable.prototype.updateSelected = function () {
if (!initBodyCaller) {
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
_updateSelected.apply(this, Array.prototype.slice.apply(args));
if (this.options.groupBy && this.options.groupByField !== '') {
this.$selectGroup.forEach(function (item) {
var checkGroup = item.item.filter(':enabled').length === item.item.filter(':enabled').filter(':checked').length;
item.group.prop('checked', checkGroup);
});
}
}
};
BootstrapTable.prototype.checkGroup = function (index) {
this.checkGroup_(index, true);
};
BootstrapTable.prototype.uncheckGroup = function (index) {
this.checkGroup_(index, false);
};
BootstrapTable.prototype.isCollapsed = function (groupKey, items) {
if (this.options.groupByCollapsedGroups) {
var collapsedGroups = Utils.calculateObjectValue(this, this.options.groupByCollapsedGroups, [groupKey, items], true);
if ($.inArray(groupKey, collapsedGroups) > -1) {
return true;
}
}
return false;
};
BootstrapTable.prototype.checkGroup_ = function (index, checked) {
var rowsBefore = this.getSelections();
var filter = function filter() {
return $(this).closest('tr').data('parent-index') === index;
};
this.$selectItem.filter(filter).prop('checked', checked);
this.updateRows();
this.updateSelected();
var rowsAfter = this.getSelections();
if (checked) {
this.trigger('check-all', rowsAfter, rowsBefore);
return;
}
this.trigger('uncheck-all', rowsAfter, rowsBefore);
};
BootstrapTable.prototype.getGroupByFields = function () {
var groupByFields = this.options.groupByField;
if (!$.isArray(this.options.groupByField)) {
groupByFields = [this.options.groupByField];
}
return groupByFields;
};
$.BootstrapTable =
/*#__PURE__*/
function (_$$BootstrapTable) {
_inherits(_class, _$$BootstrapTable);
function _class() {
_classCallCheck(this, _class);
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
}
_createClass(_class, [{
key: "scrollTo",
value: function scrollTo(params) {
if (this.options.groupBy) {
var options = {
unit: 'px',
value: 0
};
if (_typeof(params) === 'object') {
options = Object.assign(options, params);
}
if (options.unit === 'rows') {
var scrollTo = 0;
this.$body.find("> tr:not(.groupBy):lt(".concat(options.value, ")")).each(function (i, el) {
scrollTo += $(el).outerHeight(true);
});
var $targetColumn = this.$body.find("> tr:not(.groupBy):eq(".concat(options.value, ")"));
$targetColumn.prevAll('.groupBy').each(function (i, el) {
scrollTo += $(el).outerHeight(true);
});
this.$tableBody.scrollTop(scrollTo);
return;
}
}
_get(_getPrototypeOf(_class.prototype), "scrollTo", this).call(this, params);
}
}]);
return _class;
}($.BootstrapTable);
})));
|
System.register(["rtts_assert/rtts_assert", "angular2/src/facade/lang"], function($__export) {
"use strict";
var assert,
StringWrapper,
RegExpWrapper,
DASH_CASE_REGEXP,
CAMEL_CASE_REGEXP;
function dashCaseToCamelCase(input) {
assert.argumentTypes(input, assert.type.string);
return StringWrapper.replaceAllMapped(input, DASH_CASE_REGEXP, (function(m) {
return m[1].toUpperCase();
}));
}
function camelCaseToDashCase(input) {
assert.argumentTypes(input, assert.type.string);
return StringWrapper.replaceAllMapped(input, CAMEL_CASE_REGEXP, (function(m) {
return '-' + m[1].toLowerCase();
}));
}
$__export("dashCaseToCamelCase", dashCaseToCamelCase);
$__export("camelCaseToDashCase", camelCaseToDashCase);
return {
setters: [function($__m) {
assert = $__m.assert;
}, function($__m) {
StringWrapper = $__m.StringWrapper;
RegExpWrapper = $__m.RegExpWrapper;
}],
execute: function() {
DASH_CASE_REGEXP = RegExpWrapper.create('-([a-z])');
CAMEL_CASE_REGEXP = RegExpWrapper.create('([A-Z])');
Object.defineProperty(dashCaseToCamelCase, "parameters", {get: function() {
return [[assert.type.string]];
}});
Object.defineProperty(camelCaseToDashCase, "parameters", {get: function() {
return [[assert.type.string]];
}});
}
};
});
//# sourceMappingURL=angular2/src/core/compiler/pipeline/util.map
//# sourceMappingURL=../../../../../angular2/src/core/compiler/pipeline/util.js.map |
import React from 'react';
import StudentCTA from './StudentCTA/StudentCTA';
import TrendingTrades from './TrendingTrades/TrendingTrades';
const CTAPlusTrades = () => {
return (
<div className="student-cta-trending">
<StudentCTA />
<TrendingTrades />
</div>
);
};
export default CTAPlusTrades;
|
import "./static/stylesheets/app.scss";
// Player
if(new URLSearchParams(window.location.search).has("p")) {
import("./Video.js")
.then(({Initialize}) =>
Initialize({target: document.getElementById("app")})
);
// Collection
} else {
import("./Form.js");
}
|
exports.Base = require('./base');
exports.Dot = require('./dot');
exports.Doc = require('./doc');
exports.TAP = require('./tap');
exports.JSON = require('./json');
exports.HTML = require('./html');
exports.List = require('./list');
exports.Spec = require('./spec');
exports.Progress = require('./progress');
exports.Landing = require('./landing');
exports.JSONCov = require('./json-cov');
exports.HTMLCov = require('./html-cov');
exports.JSONStream = require('./json-stream');
exports.XUnit = require('./xunit')
exports.Teamcity = require('./teamcity')
|
# coding: utf-8
"""
FreeClimb API
FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
from setuptools import setup, find_packages # noqa: H301
NAME = "freeclimb"
VERSION = "3.0.2"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
setup(
name=NAME,
version=VERSION,
description="FreeClimb API",
author="OpenAPI Generator community",
author_email="[email protected]",
url="https://freeclimb.com",
keywords=["OpenAPI", "OpenAPI-Generator", "FreeClimb API"],
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
long_description="""\
FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501
"""
)
|
const randomItem = require('random-item');
const query = require('./../../bindings/gridsome/strapi/departure.graphql');
/**
* @return {Promise}
*/
module.exports = function(service, templater)
{
return service.request(query).then(data => {
let departureSalutation = randomItem(data.salutations.edges).node.name;
return templater.tpl('salute', {departureSalutation}).compile();
}).then(content => content.body)
.catch(err => console.error(err));
};
|
import os
from .. import constants, logger
from . import base_classes, io, api
class Image(base_classes.BaseNode):
"""Class the wraps an image node. This is the node that
represent that actual file on disk.
"""
def __init__(self, node, parent):
logger.debug("Image().__init__(%s)", node)
base_classes.BaseNode.__init__(self, node, parent, constants.IMAGE)
self[constants.URL] = api.image.file_name(self.node)
@property
def destination(self):
"""
:return: full destination path (when copied)
"""
dirname = os.path.dirname(self.scene.filepath)
return os.path.join(dirname, self[constants.URL])
@property
def filepath(self):
"""
:return: source file path
"""
return api.image.file_path(self.node)
def copy_texture(self, func=io.copy):
"""Copy the texture.
self.filepath > self.destination
:param func: Optional function override (Default value = io.copy)
arguments are (<source>, <destination>)
:return: path the texture was copied to
"""
logger.debug("Image().copy_texture()")
func(self.filepath, self.destination)
return self.destination
|
/**
* FOR UTILS
*/
'use strict'
var colors = require('colors'),
path = require('path'),
j = path.join
function _log (str, color) {
str += ''
var color = color || 'blue'
console.log(str[color])
}
function _error (str){
return _log(str, 'red')
}
function _alert(str) {
return _log(str, 'red')
}
function _tip (str){
return _log(str, 'green')
}
function _warn (str){
return _log(str, 'yellow')
}
/**
* Returns a random number between min (inclusive) and max (exclusive)
*/
function getRandomArbitrary(min, max) {
return Math.random() * (max - min) + min;
}
/**
* Returns a random integer between min (inclusive) and max (inclusive)
* Using Math.round() will give you a non-uniform distribution!
*/
function randomNum(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function byLongestUnreved(a, b) {
return b.unreved.length - a.unreved.length;
}
function pathInAssets(_cwd, fpath, componentsDir, runStaticDir){
var componentsAbsPath = j(_cwd, componentsDir),
imgRelPath = fpath.replace(componentsAbsPath, ''),
imgAbsPath = j(_cwd, runStaticDir, imgRelPath)
return imgAbsPath
}
function validateObj(obj){
var a
for(a in obj){
if(obj.hasOwnProperty(a) && obj[a] === undefined) {
delete obj[a]
}
}
return obj
}
function isArray(o) {
return Object.prototype.toString.call(o) === '[object Array]';
}
function convertSource(rawSource, refType){
let tarType
if(refType == 'css'){
tarType = 'scss'
}
var repReg = new RegExp('\\.'+refType+'$', 'g'),
rsList = []
if(!rawSource.match(repReg)) {
return rawSource
}
if(typeof tarType == 'string'){
return rawSource.replace(repReg, '.'+tarType)
}else {
return rawSource
}
}
function isUrl(urlType, str){
var _d = {
'absolute': /^\//g,
'http': /^http(s)?\:/g,
'dataURL': /^data\:/g,
}
var t = _d[urlType]
if(urlType == 'relative'){
return !isUrl('absolute', str) &&
!isUrl('http', str) &&
!isUrl('dataURL', str)
}
if(!t){
throw Error('Unknow Type: '+t)
}
return str.match(_d[urlType])
}
function joinUrl (a, b){
if(!b.match(/\/$/g)) {
b = b + '/'
}
if(!a.match(/\/$/g) && !b.match(/^\//g)) {
return a + '/' + b;
}else if(a.match(/\/$/g) && b.match(/^\//g)){
return a.replace(/\/$/g, '') + b;
}else{
return a + b;
}
}
function replaceBuildBlock(content, srcPrefix) {
var startReg = /<!--\s*build:(\w+)(?:(?:\(([^\)]+?)\))?\s+(\/?([^\s]+?))?)?\s*-->/gim;
var endReg = /<!--\s*endbuild\s*-->/gim;
var sections = content.split(endReg)
sections.forEach((e, i)=>{
var block
if( (block = e.match(startReg)) && (block = block[0])){
var section = e.split(startReg)
// var block = e.match(startReg)[0]
var outputPathParam = section[4];
if(!outputPathParam) {
// not set output path in usemin, build:js/css
var srcStr = section[5]
var doExec = true
var comboNameList = []
var comboExtFileName
while(doExec) {
let oneFile = _reg['sourceUrl'].exec(srcStr)
let ofname
if(oneFile && (ofname = oneFile[2])){
let oneFileName = path.basename(ofname);
let extFileName = path.extname(ofname)
if(!comboExtFileName) {
comboExtFileName = extFileName
}
comboNameList.push(oneFileName.replace(extFileName, ''))
}else {
doExec = false
}
}
if(!comboExtFileName) {
comboExtFileName = '.unknown'
_warn('*Found Unknown Extname, check your assets files!')
}
// add 80 as max combo name length
var comboNameStr = comboNameList.join('_').slice(0, 80) + comboExtFileName
var outputPathParam = comboNameStr.split('?')[0]
_warn('*Not set build file name, use combo name: ' + outputPathParam)
// _error(outputPathParam)
}
var newOutPath = j(srcPrefix, outputPathParam)
// _alert('Usemin Build: '+newOutPath)
// section[2]: alternative search path
// section[3]: nameInHTML: section[3]
// section[4]: relative out path
content = content.replace(block, '<!-- build:' + section[1] + (section[2] ? section[2] : ' ') + newOutPath + ' -->')
}
})
return content
}
// source reg
var _reg = {
link: new RegExp('<link\\s+[\\s\\S]*?>[\\s\\S]*?<*\\/*>*', 'gi'),
img: new RegExp('<img\\s+[\\s\\S]*?>[\\s\\S]*?<*\\/*>*', 'gi'),
href: new RegExp('\\s*(href)=["\']+([\\s\\S]*?)["\']'),
style:new RegExp('<style\\s*[\\s\\S]*?>[\\s\\S]*?<\\/style>', 'gi'),
script: new RegExp('<script\\s*[\\s\\S]*?>[\\s\\S]*?<\\/script>', 'gi'),
src: new RegExp('\\s*(src)=["\']+([\\s\\S]*?)["\']'),
sourceUrl: new RegExp('\\s*(src|href)=["\']+([\\s\\S]*?)["\']', 'gi'),
jsAsyncLoad: new RegExp('\\s*(\\.script\\()["\']+([\\s\\S]*?)["\']\\)', 'gi'),
requireAsync: new RegExp('\\s*(require\\.async\\()["\']+([\\s\\S]*?)["\']\\)', 'gi'),
tagMedia: new RegExp('<(img|link|source|input)\\s+[\\s\\S]*?>[\\s\\S]*?<*\\/*>*', 'gi'),
closeTagMedia: new RegExp('<(script|iframe|frame|audio|video|object)\\s*[\\s\\S]*?>[\\s\\S]*?<\\/(script|iframe|frame|audio|video|object)>', 'gi'),
useminBuild: new RegExp('<\\!\\-\\-\\s+build\\:\\w+\\s+([\\w\\.\\/\\-\\?\\=&]+)\\s+\\-\\->', 'gm')
}
// log
exports.log = _log
exports.error = _error
exports.alert = _alert
exports.tip = _tip
exports.warn = _warn
exports.reg = _reg
// for rev replace
exports.byLongestUnreved = byLongestUnreved
exports.joinUrl = joinUrl
// utils
exports.randomNum = randomNum
exports.isArray = isArray
exports.pathInAssets = pathInAssets
exports.validateObj = validateObj
exports.convertSource = convertSource
// for usemin build
exports.replaceBuildBlock = replaceBuildBlock
exports.isUrl = isUrl
|
'''
@author: Frank
'''
from zstacklib.utils import linux
import unittest
class Test(unittest.TestCase):
def testName(self):
ip = '255.255.0.0'
ipi1 = linux.ip_string_to_int(ip)
print ipi1
ips = linux.int_to_ip_string(ipi1)
print ips
ip = '10.1.23.12'
ipi2 = linux.ip_string_to_int(ip)
print ipi2
ips = linux.int_to_ip_string(ipi2)
print ips
nip = linux.int_to_ip_string(ipi1 & ipi2)
print nip
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()
|
#!/usr/bin/env node
const commander = require('commander');
const program = new commander.Command();
const pkgJson = require('../package.json');
program.version(pkgJson.version)
const commands = [
{
name: 'init',
command: 'init <directory>',
description: '初始化一个 Slide Manager 项目'
},
{
name: 'add',
command: 'add <slide>',
options: [
{
params: ['-l --light', "轻量级 slide"]
}
],
description: '新增一个 slide'
},
{
name: 'serve',
description: '本地运行'
},
{
name: 'build',
description: '构建可部署的静态站点'
},
{
name: 'custom-portal',
command: 'custom-portal',
description: '定制首页'
},
];
for (let { name, command, description, options } of commands) {
const cmd = program
.command(command || name)
.description(description)
if (options) {
options.forEach(option => {
if (option.required) {
cmd.requiredOption(...option.params)
} else {
cmd.option(...option.params)
}
})
}
cmd.action(require(`../lib/commands/${name}`));
}
const argv = process.argv;
program.parse(argv);
// https://github.com/tj/commander.js/issues/7#issuecomment-48854967
const NO_COMMAND_SPECIFIED = !argv.slice(2).length
if (NO_COMMAND_SPECIFIED) {
program.help();
} |
const { Router } = require('express');
const { check } = require('express-validator');
const { validarCampos } = require('../middlewares/validarCampos');
const { validarUsuario } = require('../middlewares/validarUsuario');
const { actualizarProducto, crearProducto, borrarProducto, getProductos } = require('../controllers/producto.controller')
const router = Router();
router.get('/', validarUsuario, getProductos);
router.post('/', [validarUsuario,
check('nombre', 'El nombre es obligatorio').not().isEmpty(),
check('valor', 'El valor es obligatorio').not().isEmpty(),
check('cantidad', 'la cantidad es obligatorio').not().isEmpty(),
validarCampos
], crearProducto);
router.put('/:id', [validarUsuario,
check('nombre', 'El nombre es obligatorio').not().isEmpty(),
check('valor', 'El valor es obligatorio').not().isEmpty(),
check('cantidad', 'la cantidad es obligatorio').not().isEmpty(),
validarCampos
], actualizarProducto);
router.delete('/:id', [
validarUsuario
], borrarProducto);
module.exports = router; |
/* global Service */
'use strict';
(function(exports) {
var TransitionEvents =
['open', 'close', 'complete', 'timeout',
'immediate-open', 'immediate-close'];
var TransitionStateTable = {
'closed': ['opening', null, null, null, 'opened', null],
'opened': [null, 'closing', null, null, null, 'closed'],
'opening': [null, 'closing', 'opened', 'opened', 'opened', 'closed'],
'closing': ['opened', null, 'closed', 'closed', 'opened', 'closed']
};
/**
* AppTransitionController controlls the opening and closing animation
* of the given appWindow.
*
* ##### Flow chart #####
* 
*
* ##### State machine #####
* 
*
* @param {AppWindow} app The app window instance which this controller
* belongs to.
*
* @class AppTransitionController
*/
var AppTransitionController =
function AppTransitionController(app) {
if (!app || !app.element) {
return;
}
this.app = app;
this.app.debug('default animation:',
this.app.openAnimation, this.app.closeAnimation);
if (this.app.openAnimation) {
this.openAnimation = this.app.openAnimation;
}
if (this.app.closeAnimation) {
this.closeAnimation = this.app.closeAnimation;
}
if (this.app.CLASS_NAME == 'AppWindow') {
this.OPENING_TRANSITION_TIMEOUT = 2500;
}
this.app.element.addEventListener('_opening', this);
this.app.element.addEventListener('_closing', this);
this.app.element.addEventListener('_opened', this);
this.app.element.addEventListener('_closed', this);
this.app.element.addEventListener('_opentransitionstart', this);
this.app.element.addEventListener('_closetransitionstart', this);
this.app.element.addEventListener('_loaded', this);
this.app.element.addEventListener('_openingtimeout', this);
this.app.element.addEventListener('_closingtimeout', this);
this.app.element.addEventListener('animationend', this);
};
AppTransitionController.prototype.destroy = function() {
if (!this.app || !this.app.element) {
return;
}
this.app.element.removeEventListener('_opening', this);
this.app.element.removeEventListener('_closing', this);
this.app.element.removeEventListener('_opened', this);
this.app.element.removeEventListener('_closed', this);
this.app.element.removeEventListener('_opentransitionstart', this);
this.app.element.removeEventListener('_closetransitionstart', this);
this.app.element.removeEventListener('_loaded', this);
this.app.element.removeEventListener('_openingtimeout', this);
this.app.element.removeEventListener('_closingtimeout', this);
this.app.element.removeEventListener('animationend', this);
this.app = null;
};
AppTransitionController.prototype._transitionState = 'closed';
AppTransitionController.prototype._waitingForLoad = false;
AppTransitionController.prototype.openAnimation = 'enlarge';
AppTransitionController.prototype.closeAnimation = 'reduce';
AppTransitionController.prototype.OPENING_TRANSITION_TIMEOUT = 200;
AppTransitionController.prototype.CLOSING_TRANSITION_TIMEOUT = 200;
AppTransitionController.prototype.SLOW_TRANSITION_TIMEOUT = 3500;
AppTransitionController.prototype._firstTransition = true;
AppTransitionController.prototype.changeTransitionState =
function atc_changeTransitionState(evt) {
var currentState = this._transitionState;
var evtIndex = TransitionEvents.indexOf(evt);
var state = TransitionStateTable[currentState][evtIndex];
if (!state) {
return;
}
this.app.debug(currentState, state, '::', evt);
this.switchTransitionState(state);
this.resetTransition();
this['_do_' + state]();
this.app.publish(state);
//backward compatibility
if (!this.app) {
return;
}
if (state == 'opening') {
/**
* Fired when the app is doing opening animation.
* @event AppWindow#appopening
*/
this.app.publish('willopen');
} else if (state == 'closing') {
/**
* Fired when the app is doing closing animation.
* @event AppWindow#appclosing
*/
this.app.publish('willclose');
} else if (state == 'opened') {
/**
* Fired when the app's opening animation is ended.
* @event AppWindow#appopen
*/
this.app.publish('open');
} else if (state == 'closed') {
/**
* Fired when the app's closing animation is ended.
* @event AppWindow#appclose
*/
this.app.publish('close');
}
};
AppTransitionController.prototype._do_closing =
function atc_do_closing() {
this.app.debug('timer to ensure closed does occur.');
this._closingTimeout = window.setTimeout(() => {
if (!this.app) {
return;
}
this.app.broadcast('closingtimeout');
},
Service.query('slowTransition') ? this.SLOW_TRANSITION_TIMEOUT :
this.CLOSING_TRANSITION_TIMEOUT);
if (!this.app || !this.app.element) {
return;
}
this.app.element.classList.add('transition-closing');
this.app.element.classList.add(this.getAnimationName('close'));
};
AppTransitionController.prototype._do_closed =
function atc_do_closed() {
};
AppTransitionController.prototype.getAnimationName = function(type) {
return this.currentAnimation || this[type + 'Animation'] || type;
};
AppTransitionController.prototype._do_opening =
function atc_do_opening() {
this.app.debug('timer to ensure opened does occur.');
this._openingTimeout = window.setTimeout(function() {
this.app && this.app.broadcast('openingtimeout');
}.bind(this),
Service.query('slowTransition') ? this.SLOW_TRANSITION_TIMEOUT :
this.OPENING_TRANSITION_TIMEOUT);
this._waitingForLoad = false;
this.app.element.classList.add('transition-opening');
this.app.element.classList.add(this.getAnimationName('open'));
this.app.debug(this.app.element.classList);
};
AppTransitionController.prototype._do_opened =
function atc_do_opened() {
};
AppTransitionController.prototype.switchTransitionState =
function atc_switchTransitionState(state) {
this._transitionState = state;
if (!this.app) {
return;
}
this.app._changeState('transition', this._transitionState);
};
// TODO: move general transition handlers into another object.
AppTransitionController.prototype.handle_closing =
function atc_handle_closing() {
if (!this.app || !this.app.element) {
return;
}
/* The AttentionToaster will take care of that for AttentionWindows */
/* InputWindow & InputWindowManager will take care of visibility of IM */
if (!this.app.isAttentionWindow && !this.app.isCallscreenWindow &&
!this.app.isInputMethod) {
this.app.setVisible(false);
}
this.switchTransitionState('closing');
};
AppTransitionController.prototype.handle_closed =
function atc_handle_closed() {
if (!this.app || !this.app.element) {
return;
}
this.resetTransition();
this.app.setNFCFocus(false);
this.app.element.classList.remove('active');
};
AppTransitionController.prototype.handle_opening =
function atc_handle_opening() {
if (!this.app || !this.app.element) {
return;
}
if (this.app.loaded) {
var self = this;
this.app.element.addEventListener('_opened', function onopen() {
// Perf test needs.
self.app.element.removeEventListener('_opened', onopen);
self.app.publish('loadtime', {
time: parseInt(Date.now() - self.app.launchTime),
type: 'w',
src: self.app.config.url
});
});
}
this.app.reviveBrowser();
this.app.launchTime = Date.now();
this.app.fadeIn();
this.app.requestForeground();
// TODO:
// May have orientation manager to deal with lock orientation request.
if (this.app.isHomescreen ||
this.app.isCallscreenWindow) {
this.app.setOrientation();
}
};
AppTransitionController.prototype.handle_opened =
function atc_handle_opened() {
if (!this.app || !this.app.element) {
return;
}
this.app.reviveBrowser();
this.resetTransition();
this.app.element.removeAttribute('aria-hidden');
this.app.show();
this.app.element.classList.add('active');
this.app.requestForeground();
// TODO:
// May have orientation manager to deal with lock orientation request.
if (!this.app.isCallscreenWindow) {
this.app.setOrientation();
}
this.focusApp();
};
AppTransitionController.prototype.focusApp = function() {
if (!this.app) {
return;
}
if (this._shouldFocusApp()) {
this.app.debug('focusing this app.');
this.app.focus();
this.app.setNFCFocus(true);
}
};
AppTransitionController.prototype._shouldFocusApp = function() {
// SearchWindow should not focus itself,
// because the input is inside system app.
var bottomWindow = this.app.getBottomMostWindow();
var topmostui = Service.query('getTopMostUI');
var stayBackground = this.app.config &&
this.app.config.stayBackground;
return (this.app.CLASS_NAME !== 'SearchWindow' &&
this._transitionState == 'opened' &&
Service.query('getTopMostWindow') === this.app &&
!stayBackground &&
topmostui &&
topmostui.name === bottomWindow.HIERARCHY_MANAGER);
};
AppTransitionController.prototype.requireOpen = function(animation) {
this.currentAnimation = animation || this.openAnimation;
this.app.debug('open with ' + this.currentAnimation);
if (this.currentAnimation == 'immediate') {
this.changeTransitionState('immediate-open');
} else {
this.changeTransitionState('open');
}
};
AppTransitionController.prototype.requireClose = function(animation) {
this.currentAnimation = animation || this.closeAnimation;
this.app.debug('close with ' + this.currentAnimation);
if (this.currentAnimation == 'immediate') {
this.changeTransitionState('immediate-close');
} else {
this.changeTransitionState('close');
}
};
AppTransitionController.prototype.resetTransition =
function atc_resetTransition() {
if (this._openingTimeout) {
window.clearTimeout(this._openingTimeout);
this._openingTimeout = null;
}
if (this._closingTimeout) {
window.clearTimeout(this._closingTimeout);
this._closingTimeout = null;
}
this.clearTransitionClasses();
};
AppTransitionController.prototype.clearTransitionClasses =
function atc_removeTransitionClasses() {
if (!this.app || !this.app.element) {
return;
}
var classes = ['enlarge', 'reduce', 'to-cardview', 'from-cardview',
'invoking', 'invoked', 'zoom-in', 'zoom-out', 'fade-in', 'fade-out',
'transition-opening', 'transition-closing', 'immediate', 'fadeout',
'slideleft', 'slideright', 'in-from-left', 'out-to-right',
'will-become-active', 'will-become-inactive',
'slide-to-top', 'slide-from-top',
'slide-to-bottom', 'slide-from-bottom',
'home-from-cardview', 'home-to-cardview'];
classes.forEach(function iterator(cls) {
this.app.element.classList.remove(cls);
}, this);
};
AppTransitionController.prototype.handleEvent =
function atc_handleEvent(evt) {
switch (evt.type) {
case '_opening':
this.handle_opening();
break;
case '_opened':
this.handle_opened();
break;
case '_closed':
this.handle_closed();
break;
case '_closing':
this.handle_closing();
break;
case '_closingtimeout':
case '_openingtimeout':
this.changeTransitionState('timeout', evt.type);
break;
case '_loaded':
if (this._waitingForLoad) {
this._waitingForLoad = false;
this.changeTransitionState('complete');
}
break;
case 'animationend':
evt.stopPropagation();
// Hide touch-blocker when launching animation is ended.
this.app.element.classList.remove('transition-opening');
// We decide to drop this event if system is busy loading
// the active app or doing some other more important task.
// In case of the browser, we don't want to wait for the page
// being fully loaded to trigger the 'opened' event
if (!this.app.isBrowser() && Service.query('isBusyLoading')) {
this._waitingForLoad = true;
if (this.app.isHomescreen && this._transitionState == 'opening') {
/**
* focusing the app will have some side effect,
* but we don't care if we are opening the homescreen.
*/
this.app.focus();
}
return;
}
this.app.debug(evt.animationName + ' has been ENDED!');
this.changeTransitionState('complete', evt.type);
break;
}
};
exports.AppTransitionController = AppTransitionController;
}(window));
|
/**
* @file make sure specification use netural words.
*/
const badterms = require('../../../public/badterms.json');
const self = {
name: 'structure.neutral',
};
// get blocklist from json file
let blocklist = [];
badterms.forEach((item) => {
blocklist = blocklist.concat(item.term);
if (item.variation) {
blocklist = blocklist.concat(item.variation);
}
});
exports.name = self.name;
exports.check = function (sr, done) {
const blocklistReg = new RegExp(`\\b${blocklist.join('\\b|\\b')}\\b`, 'ig');
const unneutralList = [];
const links = sr.jsDocument.body.querySelectorAll('a');
Array.prototype.forEach.call(links, (link) => {
const { href } = link;
const linkText = link.textContent;
// let words in link like: <a href="https://github.com/master/usage">https://github.com/master/usage</a> --> pass the check
if (href === linkText && blocklistReg.exec(linkText)) {
link.remove();
}
});
const text = sr.jsDocument.body.textContent;
const regResult = text.match(blocklistReg);
if (regResult) {
regResult.forEach((word) => {
if (unneutralList.indexOf(word.toLowerCase()) < 0) {
unneutralList.push(word.toLowerCase());
}
});
}
if (unneutralList.length) {
sr.warning(self, 'neutral', { words: unneutralList.join('", "') });
}
done();
};
|
/**
* @license Angular v8.2.4
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
import { __extends, __spread, __decorate, __param, __metadata, __assign } from 'tslib';
import { ɵparseCookieValue, DOCUMENT, PlatformLocation, isPlatformServer, ɵPLATFORM_BROWSER_ID, CommonModule } from '@angular/common';
import { ɵglobal, Injectable, Inject, InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, setTestabilityGetter, ApplicationRef, NgZone, getDebugNode, NgProbeToken, Optional, ViewEncapsulation, APP_ID, RendererStyleFlags2, PLATFORM_ID, ɵConsole, SecurityContext, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, PLATFORM_INITIALIZER, Sanitizer, createPlatformFactory, platformCore, ErrorHandler, ɵAPP_ROOT, RendererFactory2, Testability, NgModule, ApplicationModule, SkipSelf, ɵɵinject, ɵɵdefineInjectable, Version } from '@angular/core';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var _DOM = null;
function getDOM() {
return _DOM;
}
function setDOM(adapter) {
_DOM = adapter;
}
function setRootDomAdapter(adapter) {
if (!_DOM) {
_DOM = adapter;
}
}
/* tslint:disable:requireParameterType */
/**
* Provides DOM operations in an environment-agnostic way.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
var DomAdapter = /** @class */ (function () {
function DomAdapter() {
this.resourceLoaderType = null;
}
Object.defineProperty(DomAdapter.prototype, "attrToPropMap", {
/**
* Maps attribute names to their corresponding property names for cases
* where attribute name doesn't match property name.
*/
get: function () { return this._attrToPropMap; },
set: function (value) { this._attrToPropMap = value; },
enumerable: true,
configurable: true
});
return DomAdapter;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Provides DOM operations in any browser environment.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
var GenericBrowserDomAdapter = /** @class */ (function (_super) {
__extends(GenericBrowserDomAdapter, _super);
function GenericBrowserDomAdapter() {
var _this = _super.call(this) || this;
_this._animationPrefix = null;
_this._transitionEnd = null;
try {
var element_1 = _this.createElement('div', document);
if (_this.getStyle(element_1, 'animationName') != null) {
_this._animationPrefix = '';
}
else {
var domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];
for (var i = 0; i < domPrefixes.length; i++) {
if (_this.getStyle(element_1, domPrefixes[i] + 'AnimationName') != null) {
_this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';
break;
}
}
}
var transEndEventNames_1 = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
};
Object.keys(transEndEventNames_1).forEach(function (key) {
if (_this.getStyle(element_1, key) != null) {
_this._transitionEnd = transEndEventNames_1[key];
}
});
}
catch (_a) {
_this._animationPrefix = null;
_this._transitionEnd = null;
}
return _this;
}
GenericBrowserDomAdapter.prototype.getDistributedNodes = function (el) { return el.getDistributedNodes(); };
GenericBrowserDomAdapter.prototype.resolveAndSetHref = function (el, baseUrl, href) {
el.href = href == null ? baseUrl : baseUrl + '/../' + href;
};
GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () { return true; };
GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM = function () {
return typeof document.body.createShadowRoot === 'function';
};
GenericBrowserDomAdapter.prototype.getAnimationPrefix = function () { return this._animationPrefix ? this._animationPrefix : ''; };
GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return this._transitionEnd ? this._transitionEnd : ''; };
GenericBrowserDomAdapter.prototype.supportsAnimation = function () {
return this._animationPrefix != null && this._transitionEnd != null;
};
return GenericBrowserDomAdapter;
}(DomAdapter));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var _attrToPropMap = {
'class': 'className',
'innerHtml': 'innerHTML',
'readonly': 'readOnly',
'tabindex': 'tabIndex',
};
var DOM_KEY_LOCATION_NUMPAD = 3;
// Map to convert some key or keyIdentifier values to what will be returned by getEventKey
var _keyMap = {
// The following values are here for cross-browser compatibility and to match the W3C standard
// cf http://www.w3.org/TR/DOM-Level-3-Events-key/
'\b': 'Backspace',
'\t': 'Tab',
'\x7F': 'Delete',
'\x1B': 'Escape',
'Del': 'Delete',
'Esc': 'Escape',
'Left': 'ArrowLeft',
'Right': 'ArrowRight',
'Up': 'ArrowUp',
'Down': 'ArrowDown',
'Menu': 'ContextMenu',
'Scroll': 'ScrollLock',
'Win': 'OS'
};
// There is a bug in Chrome for numeric keypad keys:
// https://code.google.com/p/chromium/issues/detail?id=155654
// 1, 2, 3 ... are reported as A, B, C ...
var _chromeNumKeyPadMap = {
'A': '1',
'B': '2',
'C': '3',
'D': '4',
'E': '5',
'F': '6',
'G': '7',
'H': '8',
'I': '9',
'J': '*',
'K': '+',
'M': '-',
'N': '.',
'O': '/',
'\x60': '0',
'\x90': 'NumLock'
};
var ɵ0 = function () {
if (ɵglobal['Node']) {
return ɵglobal['Node'].prototype.contains || function (node) {
return !!(this.compareDocumentPosition(node) & 16);
};
}
return undefined;
};
var nodeContains = (ɵ0)();
/**
* A `DomAdapter` powered by full browser DOM APIs.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
/* tslint:disable:requireParameterType no-console */
var BrowserDomAdapter = /** @class */ (function (_super) {
__extends(BrowserDomAdapter, _super);
function BrowserDomAdapter() {
return _super !== null && _super.apply(this, arguments) || this;
}
BrowserDomAdapter.prototype.parse = function (templateHtml) { throw new Error('parse not implemented'); };
BrowserDomAdapter.makeCurrent = function () { setRootDomAdapter(new BrowserDomAdapter()); };
BrowserDomAdapter.prototype.hasProperty = function (element, name) { return name in element; };
BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };
BrowserDomAdapter.prototype.getProperty = function (el, name) { return el[name]; };
BrowserDomAdapter.prototype.invoke = function (el, methodName, args) {
var _a;
(_a = el)[methodName].apply(_a, __spread(args));
};
// TODO(tbosch): move this into a separate environment class once we have it
BrowserDomAdapter.prototype.logError = function (error) {
if (window.console) {
if (console.error) {
console.error(error);
}
else {
console.log(error);
}
}
};
BrowserDomAdapter.prototype.log = function (error) {
if (window.console) {
window.console.log && window.console.log(error);
}
};
BrowserDomAdapter.prototype.logGroup = function (error) {
if (window.console) {
window.console.group && window.console.group(error);
}
};
BrowserDomAdapter.prototype.logGroupEnd = function () {
if (window.console) {
window.console.groupEnd && window.console.groupEnd();
}
};
Object.defineProperty(BrowserDomAdapter.prototype, "attrToPropMap", {
get: function () { return _attrToPropMap; },
enumerable: true,
configurable: true
});
BrowserDomAdapter.prototype.contains = function (nodeA, nodeB) { return nodeContains.call(nodeA, nodeB); };
BrowserDomAdapter.prototype.querySelector = function (el, selector) { return el.querySelector(selector); };
BrowserDomAdapter.prototype.querySelectorAll = function (el, selector) { return el.querySelectorAll(selector); };
BrowserDomAdapter.prototype.on = function (el, evt, listener) { el.addEventListener(evt, listener, false); };
BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {
el.addEventListener(evt, listener, false);
// Needed to follow Dart's subscription semantic, until fix of
// https://code.google.com/p/dart/issues/detail?id=17406
return function () { el.removeEventListener(evt, listener, false); };
};
BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) { el.dispatchEvent(evt); };
BrowserDomAdapter.prototype.createMouseEvent = function (eventType) {
var evt = this.getDefaultDocument().createEvent('MouseEvent');
evt.initEvent(eventType, true, true);
return evt;
};
BrowserDomAdapter.prototype.createEvent = function (eventType) {
var evt = this.getDefaultDocument().createEvent('Event');
evt.initEvent(eventType, true, true);
return evt;
};
BrowserDomAdapter.prototype.preventDefault = function (evt) {
evt.preventDefault();
evt.returnValue = false;
};
BrowserDomAdapter.prototype.isPrevented = function (evt) {
return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;
};
BrowserDomAdapter.prototype.getInnerHTML = function (el) { return el.innerHTML; };
BrowserDomAdapter.prototype.getTemplateContent = function (el) {
return 'content' in el && this.isTemplateElement(el) ? el.content : null;
};
BrowserDomAdapter.prototype.getOuterHTML = function (el) { return el.outerHTML; };
BrowserDomAdapter.prototype.nodeName = function (node) { return node.nodeName; };
BrowserDomAdapter.prototype.nodeValue = function (node) { return node.nodeValue; };
BrowserDomAdapter.prototype.type = function (node) { return node.type; };
BrowserDomAdapter.prototype.content = function (node) {
if (this.hasProperty(node, 'content')) {
return node.content;
}
else {
return node;
}
};
BrowserDomAdapter.prototype.firstChild = function (el) { return el.firstChild; };
BrowserDomAdapter.prototype.nextSibling = function (el) { return el.nextSibling; };
BrowserDomAdapter.prototype.parentElement = function (el) { return el.parentNode; };
BrowserDomAdapter.prototype.childNodes = function (el) { return el.childNodes; };
BrowserDomAdapter.prototype.childNodesAsList = function (el) {
var childNodes = el.childNodes;
var res = new Array(childNodes.length);
for (var i = 0; i < childNodes.length; i++) {
res[i] = childNodes[i];
}
return res;
};
BrowserDomAdapter.prototype.clearNodes = function (el) {
while (el.firstChild) {
el.removeChild(el.firstChild);
}
};
BrowserDomAdapter.prototype.appendChild = function (el, node) { el.appendChild(node); };
BrowserDomAdapter.prototype.removeChild = function (el, node) { el.removeChild(node); };
BrowserDomAdapter.prototype.replaceChild = function (el, newChild, oldChild) { el.replaceChild(newChild, oldChild); };
BrowserDomAdapter.prototype.remove = function (node) {
if (node.parentNode) {
node.parentNode.removeChild(node);
}
return node;
};
BrowserDomAdapter.prototype.insertBefore = function (parent, ref, node) { parent.insertBefore(node, ref); };
BrowserDomAdapter.prototype.insertAllBefore = function (parent, ref, nodes) {
nodes.forEach(function (n) { return parent.insertBefore(n, ref); });
};
BrowserDomAdapter.prototype.insertAfter = function (parent, ref, node) { parent.insertBefore(node, ref.nextSibling); };
BrowserDomAdapter.prototype.setInnerHTML = function (el, value) { el.innerHTML = value; };
BrowserDomAdapter.prototype.getText = function (el) { return el.textContent; };
BrowserDomAdapter.prototype.setText = function (el, value) { el.textContent = value; };
BrowserDomAdapter.prototype.getValue = function (el) { return el.value; };
BrowserDomAdapter.prototype.setValue = function (el, value) { el.value = value; };
BrowserDomAdapter.prototype.getChecked = function (el) { return el.checked; };
BrowserDomAdapter.prototype.setChecked = function (el, value) { el.checked = value; };
BrowserDomAdapter.prototype.createComment = function (text) { return this.getDefaultDocument().createComment(text); };
BrowserDomAdapter.prototype.createTemplate = function (html) {
var t = this.getDefaultDocument().createElement('template');
t.innerHTML = html;
return t;
};
BrowserDomAdapter.prototype.createElement = function (tagName, doc) {
doc = doc || this.getDefaultDocument();
return doc.createElement(tagName);
};
BrowserDomAdapter.prototype.createElementNS = function (ns, tagName, doc) {
doc = doc || this.getDefaultDocument();
return doc.createElementNS(ns, tagName);
};
BrowserDomAdapter.prototype.createTextNode = function (text, doc) {
doc = doc || this.getDefaultDocument();
return doc.createTextNode(text);
};
BrowserDomAdapter.prototype.createScriptTag = function (attrName, attrValue, doc) {
doc = doc || this.getDefaultDocument();
var el = doc.createElement('SCRIPT');
el.setAttribute(attrName, attrValue);
return el;
};
BrowserDomAdapter.prototype.createStyleElement = function (css, doc) {
doc = doc || this.getDefaultDocument();
var style = doc.createElement('style');
this.appendChild(style, this.createTextNode(css, doc));
return style;
};
BrowserDomAdapter.prototype.createShadowRoot = function (el) { return el.createShadowRoot(); };
BrowserDomAdapter.prototype.getShadowRoot = function (el) { return el.shadowRoot; };
BrowserDomAdapter.prototype.getHost = function (el) { return el.host; };
BrowserDomAdapter.prototype.clone = function (node) { return node.cloneNode(true); };
BrowserDomAdapter.prototype.getElementsByClassName = function (element, name) {
return element.getElementsByClassName(name);
};
BrowserDomAdapter.prototype.getElementsByTagName = function (element, name) {
return element.getElementsByTagName(name);
};
BrowserDomAdapter.prototype.classList = function (element) { return Array.prototype.slice.call(element.classList, 0); };
BrowserDomAdapter.prototype.addClass = function (element, className) { element.classList.add(className); };
BrowserDomAdapter.prototype.removeClass = function (element, className) { element.classList.remove(className); };
BrowserDomAdapter.prototype.hasClass = function (element, className) {
return element.classList.contains(className);
};
BrowserDomAdapter.prototype.setStyle = function (element, styleName, styleValue) {
element.style[styleName] = styleValue;
};
BrowserDomAdapter.prototype.removeStyle = function (element, stylename) {
// IE requires '' instead of null
// see https://github.com/angular/angular/issues/7916
element.style[stylename] = '';
};
BrowserDomAdapter.prototype.getStyle = function (element, stylename) { return element.style[stylename]; };
BrowserDomAdapter.prototype.hasStyle = function (element, styleName, styleValue) {
var value = this.getStyle(element, styleName) || '';
return styleValue ? value == styleValue : value.length > 0;
};
BrowserDomAdapter.prototype.tagName = function (element) { return element.tagName; };
BrowserDomAdapter.prototype.attributeMap = function (element) {
var res = new Map();
var elAttrs = element.attributes;
for (var i = 0; i < elAttrs.length; i++) {
var attrib = elAttrs.item(i);
res.set(attrib.name, attrib.value);
}
return res;
};
BrowserDomAdapter.prototype.hasAttribute = function (element, attribute) {
return element.hasAttribute(attribute);
};
BrowserDomAdapter.prototype.hasAttributeNS = function (element, ns, attribute) {
return element.hasAttributeNS(ns, attribute);
};
BrowserDomAdapter.prototype.getAttribute = function (element, attribute) {
return element.getAttribute(attribute);
};
BrowserDomAdapter.prototype.getAttributeNS = function (element, ns, name) {
return element.getAttributeNS(ns, name);
};
BrowserDomAdapter.prototype.setAttribute = function (element, name, value) { element.setAttribute(name, value); };
BrowserDomAdapter.prototype.setAttributeNS = function (element, ns, name, value) {
element.setAttributeNS(ns, name, value);
};
BrowserDomAdapter.prototype.removeAttribute = function (element, attribute) { element.removeAttribute(attribute); };
BrowserDomAdapter.prototype.removeAttributeNS = function (element, ns, name) {
element.removeAttributeNS(ns, name);
};
BrowserDomAdapter.prototype.templateAwareRoot = function (el) { return this.isTemplateElement(el) ? this.content(el) : el; };
BrowserDomAdapter.prototype.createHtmlDocument = function () {
return document.implementation.createHTMLDocument('fakeTitle');
};
BrowserDomAdapter.prototype.getDefaultDocument = function () { return document; };
BrowserDomAdapter.prototype.getBoundingClientRect = function (el) {
try {
return el.getBoundingClientRect();
}
catch (_a) {
return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
}
};
BrowserDomAdapter.prototype.getTitle = function (doc) { return doc.title; };
BrowserDomAdapter.prototype.setTitle = function (doc, newTitle) { doc.title = newTitle || ''; };
BrowserDomAdapter.prototype.elementMatches = function (n, selector) {
if (this.isElementNode(n)) {
return n.matches && n.matches(selector) ||
n.msMatchesSelector && n.msMatchesSelector(selector) ||
n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
}
return false;
};
BrowserDomAdapter.prototype.isTemplateElement = function (el) {
return this.isElementNode(el) && el.nodeName === 'TEMPLATE';
};
BrowserDomAdapter.prototype.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; };
BrowserDomAdapter.prototype.isCommentNode = function (node) { return node.nodeType === Node.COMMENT_NODE; };
BrowserDomAdapter.prototype.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; };
BrowserDomAdapter.prototype.hasShadowRoot = function (node) {
return node.shadowRoot != null && node instanceof HTMLElement;
};
BrowserDomAdapter.prototype.isShadowRoot = function (node) { return node instanceof DocumentFragment; };
BrowserDomAdapter.prototype.importIntoDoc = function (node) { return document.importNode(this.templateAwareRoot(node), true); };
BrowserDomAdapter.prototype.adoptNode = function (node) { return document.adoptNode(node); };
BrowserDomAdapter.prototype.getHref = function (el) { return el.getAttribute('href'); };
BrowserDomAdapter.prototype.getEventKey = function (event) {
var key = event.key;
if (key == null) {
key = event.keyIdentifier;
// keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
// Safari cf
// http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
if (key == null) {
return 'Unidentified';
}
if (key.startsWith('U+')) {
key = String.fromCharCode(parseInt(key.substring(2), 16));
if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {
// There is a bug in Chrome for numeric keypad keys:
// https://code.google.com/p/chromium/issues/detail?id=155654
// 1, 2, 3 ... are reported as A, B, C ...
key = _chromeNumKeyPadMap[key];
}
}
}
return _keyMap[key] || key;
};
BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {
if (target === 'window') {
return window;
}
if (target === 'document') {
return doc;
}
if (target === 'body') {
return doc.body;
}
return null;
};
BrowserDomAdapter.prototype.getHistory = function () { return window.history; };
BrowserDomAdapter.prototype.getLocation = function () { return window.location; };
BrowserDomAdapter.prototype.getBaseHref = function (doc) {
var href = getBaseElementHref();
return href == null ? null : relativePath(href);
};
BrowserDomAdapter.prototype.resetBaseElement = function () { baseElement = null; };
BrowserDomAdapter.prototype.getUserAgent = function () { return window.navigator.userAgent; };
BrowserDomAdapter.prototype.setData = function (element, name, value) {
this.setAttribute(element, 'data-' + name, value);
};
BrowserDomAdapter.prototype.getData = function (element, name) {
return this.getAttribute(element, 'data-' + name);
};
BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };
// TODO(tbosch): move this into a separate environment class once we have it
BrowserDomAdapter.prototype.supportsWebAnimation = function () {
return typeof Element.prototype['animate'] === 'function';
};
BrowserDomAdapter.prototype.performanceNow = function () {
// performance.now() is not available in all browsers, see
// http://caniuse.com/#search=performance.now
return window.performance && window.performance.now ? window.performance.now() :
new Date().getTime();
};
BrowserDomAdapter.prototype.supportsCookies = function () { return true; };
BrowserDomAdapter.prototype.getCookie = function (name) { return ɵparseCookieValue(document.cookie, name); };
BrowserDomAdapter.prototype.setCookie = function (name, value) {
// document.cookie is magical, assigning into it assigns/overrides one cookie value, but does
// not clear other cookies.
document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
};
return BrowserDomAdapter;
}(GenericBrowserDomAdapter));
var baseElement = null;
function getBaseElementHref() {
if (!baseElement) {
baseElement = document.querySelector('base');
if (!baseElement) {
return null;
}
}
return baseElement.getAttribute('href');
}
// based on urlUtils.js in AngularJS 1
var urlParsingNode;
function relativePath(url) {
if (!urlParsingNode) {
urlParsingNode = document.createElement('a');
}
urlParsingNode.setAttribute('href', url);
return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :
'/' + urlParsingNode.pathname;
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function supportsState() {
return !!window.history.pushState;
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
* This class should not be used directly by an application developer. Instead, use
* {@link Location}.
*/
var BrowserPlatformLocation = /** @class */ (function (_super) {
__extends(BrowserPlatformLocation, _super);
function BrowserPlatformLocation(_doc) {
var _this = _super.call(this) || this;
_this._doc = _doc;
_this._init();
return _this;
}
// This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
/** @internal */
BrowserPlatformLocation.prototype._init = function () {
this.location = getDOM().getLocation();
this._history = getDOM().getHistory();
};
BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return getDOM().getBaseHref(this._doc); };
BrowserPlatformLocation.prototype.onPopState = function (fn) {
getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);
};
BrowserPlatformLocation.prototype.onHashChange = function (fn) {
getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);
};
Object.defineProperty(BrowserPlatformLocation.prototype, "href", {
get: function () { return this.location.href; },
enumerable: true,
configurable: true
});
Object.defineProperty(BrowserPlatformLocation.prototype, "protocol", {
get: function () { return this.location.protocol; },
enumerable: true,
configurable: true
});
Object.defineProperty(BrowserPlatformLocation.prototype, "hostname", {
get: function () { return this.location.hostname; },
enumerable: true,
configurable: true
});
Object.defineProperty(BrowserPlatformLocation.prototype, "port", {
get: function () { return this.location.port; },
enumerable: true,
configurable: true
});
Object.defineProperty(BrowserPlatformLocation.prototype, "pathname", {
get: function () { return this.location.pathname; },
set: function (newPath) { this.location.pathname = newPath; },
enumerable: true,
configurable: true
});
Object.defineProperty(BrowserPlatformLocation.prototype, "search", {
get: function () { return this.location.search; },
enumerable: true,
configurable: true
});
Object.defineProperty(BrowserPlatformLocation.prototype, "hash", {
get: function () { return this.location.hash; },
enumerable: true,
configurable: true
});
BrowserPlatformLocation.prototype.pushState = function (state, title, url) {
if (supportsState()) {
this._history.pushState(state, title, url);
}
else {
this.location.hash = url;
}
};
BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {
if (supportsState()) {
this._history.replaceState(state, title, url);
}
else {
this.location.hash = url;
}
};
BrowserPlatformLocation.prototype.forward = function () { this._history.forward(); };
BrowserPlatformLocation.prototype.back = function () { this._history.back(); };
BrowserPlatformLocation.prototype.getState = function () { return this._history.state; };
BrowserPlatformLocation = __decorate([
Injectable(),
__param(0, Inject(DOCUMENT)),
__metadata("design:paramtypes", [Object])
], BrowserPlatformLocation);
return BrowserPlatformLocation;
}(PlatformLocation));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* An id that identifies a particular application being bootstrapped, that should
* match across the client/server boundary.
*/
var TRANSITION_ID = new InjectionToken('TRANSITION_ID');
function appInitializerFactory(transitionId, document, injector) {
return function () {
// Wait for all application initializers to be completed before removing the styles set by
// the server.
injector.get(ApplicationInitStatus).donePromise.then(function () {
var dom = getDOM();
var styles = Array.prototype.slice.apply(dom.querySelectorAll(document, "style[ng-transition]"));
styles.filter(function (el) { return dom.getAttribute(el, 'ng-transition') === transitionId; })
.forEach(function (el) { return dom.remove(el); });
});
};
}
var SERVER_TRANSITION_PROVIDERS = [
{
provide: APP_INITIALIZER,
useFactory: appInitializerFactory,
deps: [TRANSITION_ID, DOCUMENT, Injector],
multi: true
},
];
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var BrowserGetTestability = /** @class */ (function () {
function BrowserGetTestability() {
}
BrowserGetTestability.init = function () { setTestabilityGetter(new BrowserGetTestability()); };
BrowserGetTestability.prototype.addToWindow = function (registry) {
ɵglobal['getAngularTestability'] = function (elem, findInAncestors) {
if (findInAncestors === void 0) { findInAncestors = true; }
var testability = registry.findTestabilityInTree(elem, findInAncestors);
if (testability == null) {
throw new Error('Could not find testability for element.');
}
return testability;
};
ɵglobal['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };
ɵglobal['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };
var whenAllStable = function (callback /** TODO #9100 */) {
var testabilities = ɵglobal['getAllAngularTestabilities']();
var count = testabilities.length;
var didWork = false;
var decrement = function (didWork_ /** TODO #9100 */) {
didWork = didWork || didWork_;
count--;
if (count == 0) {
callback(didWork);
}
};
testabilities.forEach(function (testability /** TODO #9100 */) {
testability.whenStable(decrement);
});
};
if (!ɵglobal['frameworkStabilizers']) {
ɵglobal['frameworkStabilizers'] = [];
}
ɵglobal['frameworkStabilizers'].push(whenAllStable);
};
BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
if (elem == null) {
return null;
}
var t = registry.getTestability(elem);
if (t != null) {
return t;
}
else if (!findInAncestors) {
return null;
}
if (getDOM().isShadowRoot(elem)) {
return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);
}
return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);
};
return BrowserGetTestability;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var CAMEL_CASE_REGEXP = /([A-Z])/g;
var DASH_CASE_REGEXP = /-([a-z])/g;
function camelCaseToDashCase(input) {
return input.replace(CAMEL_CASE_REGEXP, function () {
var m = [];
for (var _i = 0; _i < arguments.length; _i++) {
m[_i] = arguments[_i];
}
return '-' + m[1].toLowerCase();
});
}
function dashCaseToCamelCase(input) {
return input.replace(DASH_CASE_REGEXP, function () {
var m = [];
for (var _i = 0; _i < arguments.length; _i++) {
m[_i] = arguments[_i];
}
return m[1].toUpperCase();
});
}
/**
* Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
* `name` is `'probe'`.
* @param name Name under which it will be exported. Keep in mind this will be a property of the
* global `ng` object.
* @param value The value to export.
*/
function exportNgVar(name, value) {
if (typeof COMPILED === 'undefined' || !COMPILED) {
// Note: we can't export `ng` when using closure enhanced optimization as:
// - closure declares globals itself for minified names, which sometimes clobber our `ng` global
// - we can't declare a closure extern as the namespace `ng` is already used within Google
// for typings for angularJS (via `goog.provide('ng....')`).
var ng = ɵglobal['ng'] = ɵglobal['ng'] || {};
ng[name] = value;
}
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var ɵ0$1 = function () { return ({
'ApplicationRef': ApplicationRef,
'NgZone': NgZone,
}); };
var CORE_TOKENS = (ɵ0$1)();
var INSPECT_GLOBAL_NAME = 'probe';
var CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
/**
* Returns a {@link DebugElement} for the given native DOM element, or
* null if the given native element does not have an Angular view associated
* with it.
*/
function inspectNativeElement(element) {
return getDebugNode(element);
}
function _createNgProbe(coreTokens) {
exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
exportNgVar(CORE_TOKENS_GLOBAL_NAME, __assign({}, CORE_TOKENS, _ngProbeTokensToMap(coreTokens || [])));
return function () { return inspectNativeElement; };
}
function _ngProbeTokensToMap(tokens) {
return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});
}
/**
* In Ivy, we don't support NgProbe because we have our own set of testing utilities
* with more robust functionality.
*
* We shouldn't bring in NgProbe because it prevents DebugNode and friends from
* tree-shaking properly.
*/
var ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];
/**
* Providers which support debugging Angular applications (e.g. via `ng.probe`).
*/
var ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [
{
provide: APP_INITIALIZER,
useFactory: _createNgProbe,
deps: [
[NgProbeToken, new Optional()],
],
multi: true,
},
];
var ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* The injection token for the event-manager plug-in service.
*
* @publicApi
*/
var EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');
/**
* An injectable service that provides event management for Angular
* through a browser plug-in.
*
* @publicApi
*/
var EventManager = /** @class */ (function () {
/**
* Initializes an instance of the event-manager service.
*/
function EventManager(plugins, _zone) {
var _this = this;
this._zone = _zone;
this._eventNameToPlugin = new Map();
plugins.forEach(function (p) { return p.manager = _this; });
this._plugins = plugins.slice().reverse();
}
/**
* Registers a handler for a specific element and event.
*
* @param element The HTML element to receive event notifications.
* @param eventName The name of the event to listen for.
* @param handler A function to call when the notification occurs. Receives the
* event object as an argument.
* @returns A callback function that can be used to remove the handler.
*/
EventManager.prototype.addEventListener = function (element, eventName, handler) {
var plugin = this._findPluginFor(eventName);
return plugin.addEventListener(element, eventName, handler);
};
/**
* Registers a global handler for an event in a target view.
*
* @param target A target for global event notifications. One of "window", "document", or "body".
* @param eventName The name of the event to listen for.
* @param handler A function to call when the notification occurs. Receives the
* event object as an argument.
* @returns A callback function that can be used to remove the handler.
*/
EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
var plugin = this._findPluginFor(eventName);
return plugin.addGlobalEventListener(target, eventName, handler);
};
/**
* Retrieves the compilation zone in which event listeners are registered.
*/
EventManager.prototype.getZone = function () { return this._zone; };
/** @internal */
EventManager.prototype._findPluginFor = function (eventName) {
var plugin = this._eventNameToPlugin.get(eventName);
if (plugin) {
return plugin;
}
var plugins = this._plugins;
for (var i = 0; i < plugins.length; i++) {
var plugin_1 = plugins[i];
if (plugin_1.supports(eventName)) {
this._eventNameToPlugin.set(eventName, plugin_1);
return plugin_1;
}
}
throw new Error("No event manager plugin found for event " + eventName);
};
EventManager = __decorate([
Injectable(),
__param(0, Inject(EVENT_MANAGER_PLUGINS)),
__metadata("design:paramtypes", [Array, NgZone])
], EventManager);
return EventManager;
}());
var EventManagerPlugin = /** @class */ (function () {
function EventManagerPlugin(_doc) {
this._doc = _doc;
}
EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {
var target = getDOM().getGlobalEventTarget(this._doc, element);
if (!target) {
throw new Error("Unsupported event target " + target + " for event " + eventName);
}
return this.addEventListener(target, eventName, handler);
};
return EventManagerPlugin;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var SharedStylesHost = /** @class */ (function () {
function SharedStylesHost() {
/** @internal */
this._stylesSet = new Set();
}
SharedStylesHost.prototype.addStyles = function (styles) {
var _this = this;
var additions = new Set();
styles.forEach(function (style) {
if (!_this._stylesSet.has(style)) {
_this._stylesSet.add(style);
additions.add(style);
}
});
this.onStylesAdded(additions);
};
SharedStylesHost.prototype.onStylesAdded = function (additions) { };
SharedStylesHost.prototype.getAllStyles = function () { return Array.from(this._stylesSet); };
SharedStylesHost = __decorate([
Injectable()
], SharedStylesHost);
return SharedStylesHost;
}());
var DomSharedStylesHost = /** @class */ (function (_super) {
__extends(DomSharedStylesHost, _super);
function DomSharedStylesHost(_doc) {
var _this = _super.call(this) || this;
_this._doc = _doc;
_this._hostNodes = new Set();
_this._styleNodes = new Set();
_this._hostNodes.add(_doc.head);
return _this;
}
DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {
var _this = this;
styles.forEach(function (style) {
var styleEl = _this._doc.createElement('style');
styleEl.textContent = style;
_this._styleNodes.add(host.appendChild(styleEl));
});
};
DomSharedStylesHost.prototype.addHost = function (hostNode) {
this._addStylesToHost(this._stylesSet, hostNode);
this._hostNodes.add(hostNode);
};
DomSharedStylesHost.prototype.removeHost = function (hostNode) { this._hostNodes.delete(hostNode); };
DomSharedStylesHost.prototype.onStylesAdded = function (additions) {
var _this = this;
this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });
};
DomSharedStylesHost.prototype.ngOnDestroy = function () { this._styleNodes.forEach(function (styleNode) { return getDOM().remove(styleNode); }); };
DomSharedStylesHost = __decorate([
Injectable(),
__param(0, Inject(DOCUMENT)),
__metadata("design:paramtypes", [Object])
], DomSharedStylesHost);
return DomSharedStylesHost;
}(SharedStylesHost));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var NAMESPACE_URIS = {
'svg': 'http://www.w3.org/2000/svg',
'xhtml': 'http://www.w3.org/1999/xhtml',
'xlink': 'http://www.w3.org/1999/xlink',
'xml': 'http://www.w3.org/XML/1998/namespace',
'xmlns': 'http://www.w3.org/2000/xmlns/',
};
var COMPONENT_REGEX = /%COMP%/g;
var COMPONENT_VARIABLE = '%COMP%';
var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
function shimContentAttribute(componentShortId) {
return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
}
function shimHostAttribute(componentShortId) {
return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
}
function flattenStyles(compId, styles, target) {
for (var i = 0; i < styles.length; i++) {
var style = styles[i];
if (Array.isArray(style)) {
flattenStyles(compId, style, target);
}
else {
style = style.replace(COMPONENT_REGEX, compId);
target.push(style);
}
}
return target;
}
function decoratePreventDefault(eventHandler) {
return function (event) {
var allowDefaultBehavior = eventHandler(event);
if (allowDefaultBehavior === false) {
// TODO(tbosch): move preventDefault into event plugins...
event.preventDefault();
event.returnValue = false;
}
};
}
var DomRendererFactory2 = /** @class */ (function () {
function DomRendererFactory2(eventManager, sharedStylesHost, appId) {
this.eventManager = eventManager;
this.sharedStylesHost = sharedStylesHost;
this.appId = appId;
this.rendererByCompId = new Map();
this.defaultRenderer = new DefaultDomRenderer2(eventManager);
}
DomRendererFactory2.prototype.createRenderer = function (element, type) {
if (!element || !type) {
return this.defaultRenderer;
}
switch (type.encapsulation) {
case ViewEncapsulation.Emulated: {
var renderer = this.rendererByCompId.get(type.id);
if (!renderer) {
renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);
this.rendererByCompId.set(type.id, renderer);
}
renderer.applyToHost(element);
return renderer;
}
case ViewEncapsulation.Native:
case ViewEncapsulation.ShadowDom:
return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);
default: {
if (!this.rendererByCompId.has(type.id)) {
var styles = flattenStyles(type.id, type.styles, []);
this.sharedStylesHost.addStyles(styles);
this.rendererByCompId.set(type.id, this.defaultRenderer);
}
return this.defaultRenderer;
}
}
};
DomRendererFactory2.prototype.begin = function () { };
DomRendererFactory2.prototype.end = function () { };
DomRendererFactory2 = __decorate([
Injectable(),
__param(2, Inject(APP_ID)),
__metadata("design:paramtypes", [EventManager, DomSharedStylesHost, String])
], DomRendererFactory2);
return DomRendererFactory2;
}());
var DefaultDomRenderer2 = /** @class */ (function () {
function DefaultDomRenderer2(eventManager) {
this.eventManager = eventManager;
this.data = Object.create(null);
}
DefaultDomRenderer2.prototype.destroy = function () { };
DefaultDomRenderer2.prototype.createElement = function (name, namespace) {
if (namespace) {
// In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key
// will result in undefined, so we just return the namespace here.
return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
}
return document.createElement(name);
};
DefaultDomRenderer2.prototype.createComment = function (value) { return document.createComment(value); };
DefaultDomRenderer2.prototype.createText = function (value) { return document.createTextNode(value); };
DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) { parent.appendChild(newChild); };
DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
if (parent) {
parent.insertBefore(newChild, refChild);
}
};
DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {
if (parent) {
parent.removeChild(oldChild);
}
};
DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {
var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :
selectorOrNode;
if (!el) {
throw new Error("The selector \"" + selectorOrNode + "\" did not match any elements");
}
if (!preserveContent) {
el.textContent = '';
}
return el;
};
DefaultDomRenderer2.prototype.parentNode = function (node) { return node.parentNode; };
DefaultDomRenderer2.prototype.nextSibling = function (node) { return node.nextSibling; };
DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
if (namespace) {
name = namespace + ':' + name;
// TODO(benlesh): Ivy may cause issues here because it's passing around
// full URIs for namespaces, therefore this lookup will fail.
var namespaceUri = NAMESPACE_URIS[namespace];
if (namespaceUri) {
el.setAttributeNS(namespaceUri, name, value);
}
else {
el.setAttribute(name, value);
}
}
else {
el.setAttribute(name, value);
}
};
DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {
if (namespace) {
// TODO(benlesh): Ivy may cause issues here because it's passing around
// full URIs for namespaces, therefore this lookup will fail.
var namespaceUri = NAMESPACE_URIS[namespace];
if (namespaceUri) {
el.removeAttributeNS(namespaceUri, name);
}
else {
// TODO(benlesh): Since ivy is passing around full URIs for namespaces
// this could result in properties like `http://www.w3.org/2000/svg:cx="123"`,
// which is wrong.
el.removeAttribute(namespace + ":" + name);
}
}
else {
el.removeAttribute(name);
}
};
DefaultDomRenderer2.prototype.addClass = function (el, name) { el.classList.add(name); };
DefaultDomRenderer2.prototype.removeClass = function (el, name) { el.classList.remove(name); };
DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {
if (flags & RendererStyleFlags2.DashCase) {
el.style.setProperty(style, value, !!(flags & RendererStyleFlags2.Important) ? 'important' : '');
}
else {
el.style[style] = value;
}
};
DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {
if (flags & RendererStyleFlags2.DashCase) {
el.style.removeProperty(style);
}
else {
// IE requires '' instead of null
// see https://github.com/angular/angular/issues/7916
el.style[style] = '';
}
};
DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {
checkNoSyntheticProp(name, 'property');
el[name] = value;
};
DefaultDomRenderer2.prototype.setValue = function (node, value) { node.nodeValue = value; };
DefaultDomRenderer2.prototype.listen = function (target, event, callback) {
checkNoSyntheticProp(event, 'listener');
if (typeof target === 'string') {
return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));
}
return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));
};
return DefaultDomRenderer2;
}());
var ɵ0$2 = function () { return '@'.charCodeAt(0); };
var AT_CHARCODE = (ɵ0$2)();
function checkNoSyntheticProp(name, nameKind) {
if (name.charCodeAt(0) === AT_CHARCODE) {
throw new Error("Found the synthetic " + nameKind + " " + name + ". Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.");
}
}
var EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {
__extends(EmulatedEncapsulationDomRenderer2, _super);
function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {
var _this = _super.call(this, eventManager) || this;
_this.component = component;
var styles = flattenStyles(appId + '-' + component.id, component.styles, []);
sharedStylesHost.addStyles(styles);
_this.contentAttr = shimContentAttribute(appId + '-' + component.id);
_this.hostAttr = shimHostAttribute(appId + '-' + component.id);
return _this;
}
EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) { _super.prototype.setAttribute.call(this, element, this.hostAttr, ''); };
EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {
var el = _super.prototype.createElement.call(this, parent, name);
_super.prototype.setAttribute.call(this, el, this.contentAttr, '');
return el;
};
return EmulatedEncapsulationDomRenderer2;
}(DefaultDomRenderer2));
var ShadowDomRenderer = /** @class */ (function (_super) {
__extends(ShadowDomRenderer, _super);
function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
var _this = _super.call(this, eventManager) || this;
_this.sharedStylesHost = sharedStylesHost;
_this.hostEl = hostEl;
_this.component = component;
if (component.encapsulation === ViewEncapsulation.ShadowDom) {
_this.shadowRoot = hostEl.attachShadow({ mode: 'open' });
}
else {
_this.shadowRoot = hostEl.createShadowRoot();
}
_this.sharedStylesHost.addHost(_this.shadowRoot);
var styles = flattenStyles(component.id, component.styles, []);
for (var i = 0; i < styles.length; i++) {
var styleEl = document.createElement('style');
styleEl.textContent = styles[i];
_this.shadowRoot.appendChild(styleEl);
}
return _this;
}
ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) { return node === this.hostEl ? this.shadowRoot : node; };
ShadowDomRenderer.prototype.destroy = function () { this.sharedStylesHost.removeHost(this.shadowRoot); };
ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {
return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);
};
ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {
return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
};
ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {
return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);
};
ShadowDomRenderer.prototype.parentNode = function (node) {
return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));
};
return ShadowDomRenderer;
}(DefaultDomRenderer2));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var ɵ0$3 = function () { return (typeof Zone !== 'undefined') && Zone['__symbol__'] ||
function (v) { return '__zone_symbol__' + v; }; };
/**
* Detect if Zone is present. If it is then use simple zone aware 'addEventListener'
* since Angular can do much more
* efficient bookkeeping than Zone can, because we have additional information. This speeds up
* addEventListener by 3x.
*/
var __symbol__ = (ɵ0$3)();
var ADD_EVENT_LISTENER = __symbol__('addEventListener');
var REMOVE_EVENT_LISTENER = __symbol__('removeEventListener');
var symbolNames = {};
var FALSE = 'FALSE';
var ANGULAR = 'ANGULAR';
var NATIVE_ADD_LISTENER = 'addEventListener';
var NATIVE_REMOVE_LISTENER = 'removeEventListener';
// use the same symbol string which is used in zone.js
var stopSymbol = '__zone_symbol__propagationStopped';
var stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';
var ɵ1 = function () {
var blackListedEvents = (typeof Zone !== 'undefined') && Zone[__symbol__('BLACK_LISTED_EVENTS')];
if (blackListedEvents) {
var res_1 = {};
blackListedEvents.forEach(function (eventName) { res_1[eventName] = eventName; });
return res_1;
}
return undefined;
};
var blackListedMap = (ɵ1)();
var isBlackListedEvent = function (eventName) {
if (!blackListedMap) {
return false;
}
return blackListedMap.hasOwnProperty(eventName);
};
var ɵ2 = isBlackListedEvent;
// a global listener to handle all dom event,
// so we do not need to create a closure every time
var globalListener = function (event) {
var symbolName = symbolNames[event.type];
if (!symbolName) {
return;
}
var taskDatas = this[symbolName];
if (!taskDatas) {
return;
}
var args = [event];
if (taskDatas.length === 1) {
// if taskDatas only have one element, just invoke it
var taskData = taskDatas[0];
if (taskData.zone !== Zone.current) {
// only use Zone.run when Zone.current not equals to stored zone
return taskData.zone.run(taskData.handler, this, args);
}
else {
return taskData.handler.apply(this, args);
}
}
else {
// copy tasks as a snapshot to avoid event handlers remove
// itself or others
var copiedTasks = taskDatas.slice();
for (var i = 0; i < copiedTasks.length; i++) {
// if other listener call event.stopImmediatePropagation
// just break
if (event[stopSymbol] === true) {
break;
}
var taskData = copiedTasks[i];
if (taskData.zone !== Zone.current) {
// only use Zone.run when Zone.current not equals to stored zone
taskData.zone.run(taskData.handler, this, args);
}
else {
taskData.handler.apply(this, args);
}
}
}
};
var ɵ3 = globalListener;
var DomEventsPlugin = /** @class */ (function (_super) {
__extends(DomEventsPlugin, _super);
function DomEventsPlugin(doc, ngZone, platformId) {
var _this = _super.call(this, doc) || this;
_this.ngZone = ngZone;
if (!platformId || !isPlatformServer(platformId)) {
_this.patchEvent();
}
return _this;
}
DomEventsPlugin.prototype.patchEvent = function () {
if (typeof Event === 'undefined' || !Event || !Event.prototype) {
return;
}
if (Event.prototype[stopMethodSymbol]) {
// already patched by zone.js
return;
}
var delegate = Event.prototype[stopMethodSymbol] =
Event.prototype.stopImmediatePropagation;
Event.prototype.stopImmediatePropagation = function () {
if (this) {
this[stopSymbol] = true;
}
// We should call native delegate in case in some environment part of
// the application will not use the patched Event. Also we cast the
// "arguments" to any since "stopImmediatePropagation" technically does not
// accept any arguments, but we don't know what developers pass through the
// function and we want to not break these calls.
delegate && delegate.apply(this, arguments);
};
};
// This plugin should come last in the list of plugins, because it accepts all
// events.
DomEventsPlugin.prototype.supports = function (eventName) { return true; };
DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
var _this = this;
/**
* This code is about to add a listener to the DOM. If Zone.js is present, than
* `addEventListener` has been patched. The patched code adds overhead in both
* memory and speed (3x slower) than native. For this reason if we detect that
* Zone.js is present we use a simple version of zone aware addEventListener instead.
* The result is faster registration and the zone will be restored.
* But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask
* will not be invoked
* We also do manual zone restoration in element.ts renderEventHandlerClosure method.
*
* NOTE: it is possible that the element is from different iframe, and so we
* have to check before we execute the method.
*/
var self = this;
var zoneJsLoaded = element[ADD_EVENT_LISTENER];
var callback = handler;
// if zonejs is loaded and current zone is not ngZone
// we keep Zone.current on target for later restoration.
if (zoneJsLoaded && (!NgZone.isInAngularZone() || isBlackListedEvent(eventName))) {
var symbolName = symbolNames[eventName];
if (!symbolName) {
symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);
}
var taskDatas = element[symbolName];
var globalListenerRegistered = taskDatas && taskDatas.length > 0;
if (!taskDatas) {
taskDatas = element[symbolName] = [];
}
var zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;
if (taskDatas.length === 0) {
taskDatas.push({ zone: zone, handler: callback });
}
else {
var callbackRegistered = false;
for (var i = 0; i < taskDatas.length; i++) {
if (taskDatas[i].handler === callback) {
callbackRegistered = true;
break;
}
}
if (!callbackRegistered) {
taskDatas.push({ zone: zone, handler: callback });
}
}
if (!globalListenerRegistered) {
element[ADD_EVENT_LISTENER](eventName, globalListener, false);
}
}
else {
element[NATIVE_ADD_LISTENER](eventName, callback, false);
}
return function () { return _this.removeEventListener(element, eventName, callback); };
};
DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {
var underlyingRemove = target[REMOVE_EVENT_LISTENER];
// zone.js not loaded, use native removeEventListener
if (!underlyingRemove) {
return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
}
var symbolName = symbolNames[eventName];
var taskDatas = symbolName && target[symbolName];
if (!taskDatas) {
// addEventListener not using patched version
// just call native removeEventListener
return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
}
// fix issue 20532, should be able to remove
// listener which was added inside of ngZone
var found = false;
for (var i = 0; i < taskDatas.length; i++) {
// remove listener from taskDatas if the callback equals
if (taskDatas[i].handler === callback) {
found = true;
taskDatas.splice(i, 1);
break;
}
}
if (found) {
if (taskDatas.length === 0) {
// all listeners are removed, we can remove the globalListener from target
underlyingRemove.apply(target, [eventName, globalListener, false]);
}
}
else {
// not found in taskDatas, the callback may be added inside of ngZone
// use native remove listener to remove the callback
target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
}
};
DomEventsPlugin = __decorate([
Injectable(),
__param(0, Inject(DOCUMENT)),
__param(2, Optional()), __param(2, Inject(PLATFORM_ID)),
__metadata("design:paramtypes", [Object, NgZone, Object])
], DomEventsPlugin);
return DomEventsPlugin;
}(EventManagerPlugin));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Supported HammerJS recognizer event names.
*/
var EVENT_NAMES = {
// pan
'pan': true,
'panstart': true,
'panmove': true,
'panend': true,
'pancancel': true,
'panleft': true,
'panright': true,
'panup': true,
'pandown': true,
// pinch
'pinch': true,
'pinchstart': true,
'pinchmove': true,
'pinchend': true,
'pinchcancel': true,
'pinchin': true,
'pinchout': true,
// press
'press': true,
'pressup': true,
// rotate
'rotate': true,
'rotatestart': true,
'rotatemove': true,
'rotateend': true,
'rotatecancel': true,
// swipe
'swipe': true,
'swipeleft': true,
'swiperight': true,
'swipeup': true,
'swipedown': true,
// tap
'tap': true,
};
/**
* DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
* @see `HammerGestureConfig`
*
* @publicApi
*/
var HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');
/**
* Injection token used to provide a {@link HammerLoader} to Angular.
*
* @publicApi
*/
var HAMMER_LOADER = new InjectionToken('HammerLoader');
/**
* An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
* for gesture recognition. Configures specific event recognition.
* @publicApi
*/
var HammerGestureConfig = /** @class */ (function () {
function HammerGestureConfig() {
/**
* A set of supported event names for gestures to be used in Angular.
* Angular supports all built-in recognizers, as listed in
* [HammerJS documentation](http://hammerjs.github.io/).
*/
this.events = [];
/**
* Maps gesture event names to a set of configuration options
* that specify overrides to the default values for specific properties.
*
* The key is a supported event name to be configured,
* and the options object contains a set of properties, with override values
* to be applied to the named recognizer event.
* For example, to disable recognition of the rotate event, specify
* `{"rotate": {"enable": false}}`.
*
* Properties that are not present take the HammerJS default values.
* For information about which properties are supported for which events,
* and their allowed and default values, see
* [HammerJS documentation](http://hammerjs.github.io/).
*
*/
this.overrides = {};
}
/**
* Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
* and attaches it to a given HTML element.
* @param element The element that will recognize gestures.
* @returns A HammerJS event-manager object.
*/
HammerGestureConfig.prototype.buildHammer = function (element) {
var mc = new Hammer(element, this.options);
mc.get('pinch').set({ enable: true });
mc.get('rotate').set({ enable: true });
for (var eventName in this.overrides) {
mc.get(eventName).set(this.overrides[eventName]);
}
return mc;
};
HammerGestureConfig = __decorate([
Injectable()
], HammerGestureConfig);
return HammerGestureConfig;
}());
var HammerGesturesPlugin = /** @class */ (function (_super) {
__extends(HammerGesturesPlugin, _super);
function HammerGesturesPlugin(doc, _config, console, loader) {
var _this = _super.call(this, doc) || this;
_this._config = _config;
_this.console = console;
_this.loader = loader;
return _this;
}
HammerGesturesPlugin.prototype.supports = function (eventName) {
if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
return false;
}
if (!window.Hammer && !this.loader) {
this.console.warn("The \"" + eventName + "\" event cannot be bound because Hammer.JS is not " +
"loaded and no custom loader has been specified.");
return false;
}
return true;
};
HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {
var _this = this;
var zone = this.manager.getZone();
eventName = eventName.toLowerCase();
// If Hammer is not present but a loader is specified, we defer adding the event listener
// until Hammer is loaded.
if (!window.Hammer && this.loader) {
// This `addEventListener` method returns a function to remove the added listener.
// Until Hammer is loaded, the returned function needs to *cancel* the registration rather
// than remove anything.
var cancelRegistration_1 = false;
var deregister_1 = function () { cancelRegistration_1 = true; };
this.loader()
.then(function () {
// If Hammer isn't actually loaded when the custom loader resolves, give up.
if (!window.Hammer) {
_this.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present.");
deregister_1 = function () { };
return;
}
if (!cancelRegistration_1) {
// Now that Hammer is loaded and the listener is being loaded for real,
// the deregistration function changes from canceling registration to removal.
deregister_1 = _this.addEventListener(element, eventName, handler);
}
})
.catch(function () {
_this.console.warn("The \"" + eventName + "\" event cannot be bound because the custom " +
"Hammer.JS loader failed.");
deregister_1 = function () { };
});
// Return a function that *executes* `deregister` (and not `deregister` itself) so that we
// can change the behavior of `deregister` once the listener is added. Using a closure in
// this way allows us to avoid any additional data structures to track listener removal.
return function () { deregister_1(); };
}
return zone.runOutsideAngular(function () {
// Creating the manager bind events, must be done outside of angular
var mc = _this._config.buildHammer(element);
var callback = function (eventObj) {
zone.runGuarded(function () { handler(eventObj); });
};
mc.on(eventName, callback);
return function () {
mc.off(eventName, callback);
// destroy mc to prevent memory leak
if (typeof mc.destroy === 'function') {
mc.destroy();
}
};
});
};
HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };
HammerGesturesPlugin = __decorate([
Injectable(),
__param(0, Inject(DOCUMENT)),
__param(1, Inject(HAMMER_GESTURE_CONFIG)),
__param(3, Optional()), __param(3, Inject(HAMMER_LOADER)),
__metadata("design:paramtypes", [Object, HammerGestureConfig, ɵConsole, Object])
], HammerGesturesPlugin);
return HammerGesturesPlugin;
}(EventManagerPlugin));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Defines supported modifiers for key events.
*/
var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
var ɵ0$4 = function (event) { return event.altKey; }, ɵ1$1 = function (event) { return event.ctrlKey; }, ɵ2$1 = function (event) { return event.metaKey; }, ɵ3$1 = function (event) { return event.shiftKey; };
/**
* Retrieves modifiers from key-event objects.
*/
var MODIFIER_KEY_GETTERS = {
'alt': ɵ0$4,
'control': ɵ1$1,
'meta': ɵ2$1,
'shift': ɵ3$1
};
/**
* @publicApi
* A browser plug-in that provides support for handling of key events in Angular.
*/
var KeyEventsPlugin = /** @class */ (function (_super) {
__extends(KeyEventsPlugin, _super);
/**
* Initializes an instance of the browser plug-in.
* @param doc The document in which key events will be detected.
*/
function KeyEventsPlugin(doc) {
return _super.call(this, doc) || this;
}
KeyEventsPlugin_1 = KeyEventsPlugin;
/**
* Reports whether a named key event is supported.
* @param eventName The event name to query.
* @return True if the named key event is supported.
*/
KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin_1.parseEventName(eventName) != null; };
/**
* Registers a handler for a specific element and key event.
* @param element The HTML element to receive event notifications.
* @param eventName The name of the key event to listen for.
* @param handler A function to call when the notification occurs. Receives the
* event object as an argument.
* @returns The key event that was registered.
*/
KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
var parsedEvent = KeyEventsPlugin_1.parseEventName(eventName);
var outsideHandler = KeyEventsPlugin_1.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
return this.manager.getZone().runOutsideAngular(function () {
return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
});
};
KeyEventsPlugin.parseEventName = function (eventName) {
var parts = eventName.toLowerCase().split('.');
var domEventName = parts.shift();
if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
return null;
}
var key = KeyEventsPlugin_1._normalizeKey(parts.pop());
var fullKey = '';
MODIFIER_KEYS.forEach(function (modifierName) {
var index = parts.indexOf(modifierName);
if (index > -1) {
parts.splice(index, 1);
fullKey += modifierName + '.';
}
});
fullKey += key;
if (parts.length != 0 || key.length === 0) {
// returning null instead of throwing to let another plugin process the event
return null;
}
var result = {};
result['domEventName'] = domEventName;
result['fullKey'] = fullKey;
return result;
};
KeyEventsPlugin.getEventFullKey = function (event) {
var fullKey = '';
var key = getDOM().getEventKey(event);
key = key.toLowerCase();
if (key === ' ') {
key = 'space'; // for readability
}
else if (key === '.') {
key = 'dot'; // because '.' is used as a separator in event names
}
MODIFIER_KEYS.forEach(function (modifierName) {
if (modifierName != key) {
var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
if (modifierGetter(event)) {
fullKey += modifierName + '.';
}
}
});
fullKey += key;
return fullKey;
};
/**
* Configures a handler callback for a key event.
* @param fullKey The event name that combines all simultaneous keystrokes.
* @param handler The function that responds to the key event.
* @param zone The zone in which the event occurred.
* @returns A callback function.
*/
KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
return function (event /** TODO #9100 */) {
if (KeyEventsPlugin_1.getEventFullKey(event) === fullKey) {
zone.runGuarded(function () { return handler(event); });
}
};
};
/** @internal */
KeyEventsPlugin._normalizeKey = function (keyName) {
// TODO: switch to a Map if the mapping grows too much
switch (keyName) {
case 'esc':
return 'escape';
default:
return keyName;
}
};
var KeyEventsPlugin_1;
KeyEventsPlugin = KeyEventsPlugin_1 = __decorate([
Injectable(),
__param(0, Inject(DOCUMENT)),
__metadata("design:paramtypes", [Object])
], KeyEventsPlugin);
return KeyEventsPlugin;
}(EventManagerPlugin));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
* values to be safe to use in the different DOM contexts.
*
* For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
* sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
* the website.
*
* In specific situations, it might be necessary to disable sanitization, for example if the
* application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
* Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
* methods, and then binding to that value from the template.
*
* These situations should be very rare, and extraordinary care must be taken to avoid creating a
* Cross Site Scripting (XSS) security bug!
*
* When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
* close as possible to the source of the value, to make it easy to verify no security bug is
* created by its use.
*
* It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
* does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
* code. The sanitizer leaves safe values intact.
*
* @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
* sanitization for the value passed in. Carefully check and audit all values and code paths going
* into this call. Make sure any user data is appropriately escaped for this security context.
* For more detail, see the [Security Guide](http://g.co/ng/security).
*
* @publicApi
*/
var DomSanitizer = /** @class */ (function () {
function DomSanitizer() {
}
return DomSanitizer;
}());
var DomSanitizerImpl = /** @class */ (function (_super) {
__extends(DomSanitizerImpl, _super);
function DomSanitizerImpl(_doc) {
var _this = _super.call(this) || this;
_this._doc = _doc;
return _this;
}
DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
if (value == null)
return null;
switch (ctx) {
case SecurityContext.NONE:
return value;
case SecurityContext.HTML:
if (value instanceof SafeHtmlImpl)
return value.changingThisBreaksApplicationSecurity;
this.checkNotSafeValue(value, 'HTML');
return ɵ_sanitizeHtml(this._doc, String(value));
case SecurityContext.STYLE:
if (value instanceof SafeStyleImpl)
return value.changingThisBreaksApplicationSecurity;
this.checkNotSafeValue(value, 'Style');
return ɵ_sanitizeStyle(value);
case SecurityContext.SCRIPT:
if (value instanceof SafeScriptImpl)
return value.changingThisBreaksApplicationSecurity;
this.checkNotSafeValue(value, 'Script');
throw new Error('unsafe value used in a script context');
case SecurityContext.URL:
if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {
// Allow resource URLs in URL contexts, they are strictly more trusted.
return value.changingThisBreaksApplicationSecurity;
}
this.checkNotSafeValue(value, 'URL');
return ɵ_sanitizeUrl(String(value));
case SecurityContext.RESOURCE_URL:
if (value instanceof SafeResourceUrlImpl) {
return value.changingThisBreaksApplicationSecurity;
}
this.checkNotSafeValue(value, 'ResourceURL');
throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');
default:
throw new Error("Unexpected SecurityContext " + ctx + " (see http://g.co/ng/security#xss)");
}
};
DomSanitizerImpl.prototype.checkNotSafeValue = function (value, expectedType) {
if (value instanceof SafeValueImpl) {
throw new Error("Required a safe " + expectedType + ", got a " + value.getTypeName() + " " +
"(see http://g.co/ng/security#xss)");
}
};
DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
return new SafeResourceUrlImpl(value);
};
DomSanitizerImpl = __decorate([
Injectable(),
__param(0, Inject(DOCUMENT)),
__metadata("design:paramtypes", [Object])
], DomSanitizerImpl);
return DomSanitizerImpl;
}(DomSanitizer));
var SafeValueImpl = /** @class */ (function () {
function SafeValueImpl(changingThisBreaksApplicationSecurity) {
this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
// empty
}
SafeValueImpl.prototype.toString = function () {
return "SafeValue must use [property]=binding: " + this.changingThisBreaksApplicationSecurity +
" (see http://g.co/ng/security#xss)";
};
return SafeValueImpl;
}());
var SafeHtmlImpl = /** @class */ (function (_super) {
__extends(SafeHtmlImpl, _super);
function SafeHtmlImpl() {
return _super !== null && _super.apply(this, arguments) || this;
}
SafeHtmlImpl.prototype.getTypeName = function () { return 'HTML'; };
return SafeHtmlImpl;
}(SafeValueImpl));
var SafeStyleImpl = /** @class */ (function (_super) {
__extends(SafeStyleImpl, _super);
function SafeStyleImpl() {
return _super !== null && _super.apply(this, arguments) || this;
}
SafeStyleImpl.prototype.getTypeName = function () { return 'Style'; };
return SafeStyleImpl;
}(SafeValueImpl));
var SafeScriptImpl = /** @class */ (function (_super) {
__extends(SafeScriptImpl, _super);
function SafeScriptImpl() {
return _super !== null && _super.apply(this, arguments) || this;
}
SafeScriptImpl.prototype.getTypeName = function () { return 'Script'; };
return SafeScriptImpl;
}(SafeValueImpl));
var SafeUrlImpl = /** @class */ (function (_super) {
__extends(SafeUrlImpl, _super);
function SafeUrlImpl() {
return _super !== null && _super.apply(this, arguments) || this;
}
SafeUrlImpl.prototype.getTypeName = function () { return 'URL'; };
return SafeUrlImpl;
}(SafeValueImpl));
var SafeResourceUrlImpl = /** @class */ (function (_super) {
__extends(SafeResourceUrlImpl, _super);
function SafeResourceUrlImpl() {
return _super !== null && _super.apply(this, arguments) || this;
}
SafeResourceUrlImpl.prototype.getTypeName = function () { return 'ResourceURL'; };
return SafeResourceUrlImpl;
}(SafeValueImpl));
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var ɵ0$5 = ɵPLATFORM_BROWSER_ID;
var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
{ provide: PLATFORM_ID, useValue: ɵ0$5 },
{ provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },
{ provide: PlatformLocation, useClass: BrowserPlatformLocation, deps: [DOCUMENT] },
{ provide: DOCUMENT, useFactory: _document, deps: [] },
];
/**
* @security Replacing built-in sanitization providers exposes the application to XSS risks.
* Attacker-controlled data introduced by an unsanitized provider could expose your
* application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
* @publicApi
*/
var BROWSER_SANITIZATION_PROVIDERS = [
{ provide: Sanitizer, useExisting: DomSanitizer },
{ provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT] },
];
/**
* @publicApi
*/
var platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
function initDomAdapter() {
BrowserDomAdapter.makeCurrent();
BrowserGetTestability.init();
}
function errorHandler() {
return new ErrorHandler();
}
function _document() {
return document;
}
var BROWSER_MODULE_PROVIDERS = [
BROWSER_SANITIZATION_PROVIDERS,
{ provide: ɵAPP_ROOT, useValue: true },
{ provide: ErrorHandler, useFactory: errorHandler, deps: [] },
{
provide: EVENT_MANAGER_PLUGINS,
useClass: DomEventsPlugin,
multi: true,
deps: [DOCUMENT, NgZone, PLATFORM_ID]
},
{ provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT] },
{
provide: EVENT_MANAGER_PLUGINS,
useClass: HammerGesturesPlugin,
multi: true,
deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]
},
{ provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
{
provide: DomRendererFactory2,
useClass: DomRendererFactory2,
deps: [EventManager, DomSharedStylesHost, APP_ID]
},
{ provide: RendererFactory2, useExisting: DomRendererFactory2 },
{ provide: SharedStylesHost, useExisting: DomSharedStylesHost },
{ provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT] },
{ provide: Testability, useClass: Testability, deps: [NgZone] },
{ provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },
ELEMENT_PROBE_PROVIDERS,
];
/**
* Exports required infrastructure for all Angular apps.
* Included by default in all Angular apps created with the CLI
* `new` command.
* Re-exports `CommonModule` and `ApplicationModule`, making their
* exports and providers available to all apps.
*
* @publicApi
*/
var BrowserModule = /** @class */ (function () {
function BrowserModule(parentModule) {
if (parentModule) {
throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.");
}
}
BrowserModule_1 = BrowserModule;
/**
* Configures a browser-based app to transition from a server-rendered app, if
* one is present on the page.
*
* @param params An object containing an identifier for the app to transition.
* The ID must match between the client and server versions of the app.
* @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
*/
BrowserModule.withServerTransition = function (params) {
return {
ngModule: BrowserModule_1,
providers: [
{ provide: APP_ID, useValue: params.appId },
{ provide: TRANSITION_ID, useExisting: APP_ID },
SERVER_TRANSITION_PROVIDERS,
],
};
};
var BrowserModule_1;
BrowserModule = BrowserModule_1 = __decorate([
NgModule({ providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule] }),
__param(0, Optional()), __param(0, SkipSelf()), __param(0, Inject(BrowserModule_1)),
__metadata("design:paramtypes", [Object])
], BrowserModule);
return BrowserModule;
}());
/**
* Factory to create Meta service.
*/
function createMeta() {
return new Meta(ɵɵinject(DOCUMENT));
}
/**
* A service that can be used to get and add meta tags.
*
* @publicApi
*/
var Meta = /** @class */ (function () {
function Meta(_doc) {
this._doc = _doc;
this._dom = getDOM();
}
Meta.prototype.addTag = function (tag, forceCreation) {
if (forceCreation === void 0) { forceCreation = false; }
if (!tag)
return null;
return this._getOrCreateElement(tag, forceCreation);
};
Meta.prototype.addTags = function (tags, forceCreation) {
var _this = this;
if (forceCreation === void 0) { forceCreation = false; }
if (!tags)
return [];
return tags.reduce(function (result, tag) {
if (tag) {
result.push(_this._getOrCreateElement(tag, forceCreation));
}
return result;
}, []);
};
Meta.prototype.getTag = function (attrSelector) {
if (!attrSelector)
return null;
return this._dom.querySelector(this._doc, "meta[" + attrSelector + "]") || null;
};
Meta.prototype.getTags = function (attrSelector) {
if (!attrSelector)
return [];
var list /*NodeList*/ = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
return list ? [].slice.call(list) : [];
};
Meta.prototype.updateTag = function (tag, selector) {
if (!tag)
return null;
selector = selector || this._parseSelector(tag);
var meta = this.getTag(selector);
if (meta) {
return this._setMetaElementAttributes(tag, meta);
}
return this._getOrCreateElement(tag, true);
};
Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement(this.getTag(attrSelector)); };
Meta.prototype.removeTagElement = function (meta) {
if (meta) {
this._dom.remove(meta);
}
};
Meta.prototype._getOrCreateElement = function (meta, forceCreation) {
if (forceCreation === void 0) { forceCreation = false; }
if (!forceCreation) {
var selector = this._parseSelector(meta);
var elem = this.getTag(selector);
// It's allowed to have multiple elements with the same name so it's not enough to
// just check that element with the same name already present on the page. We also need to
// check if element has tag attributes
if (elem && this._containsAttributes(meta, elem))
return elem;
}
var element = this._dom.createElement('meta');
this._setMetaElementAttributes(meta, element);
var head = this._dom.getElementsByTagName(this._doc, 'head')[0];
this._dom.appendChild(head, element);
return element;
};
Meta.prototype._setMetaElementAttributes = function (tag, el) {
var _this = this;
Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });
return el;
};
Meta.prototype._parseSelector = function (tag) {
var attr = tag.name ? 'name' : 'property';
return attr + "=\"" + tag[attr] + "\"";
};
Meta.prototype._containsAttributes = function (tag, elem) {
var _this = this;
return Object.keys(tag).every(function (key) { return _this._dom.getAttribute(elem, key) === tag[key]; });
};
Meta.ngInjectableDef = ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: "root" });
Meta = __decorate([
Injectable({ providedIn: 'root', useFactory: createMeta, deps: [] }),
__param(0, Inject(DOCUMENT)),
__metadata("design:paramtypes", [Object])
], Meta);
return Meta;
}());
/**
* Factory to create Title service.
*/
function createTitle() {
return new Title(ɵɵinject(DOCUMENT));
}
/**
* A service that can be used to get and set the title of a current HTML document.
*
* Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
* it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
* (representing the `<title>` tag). Instead, this service can be used to set and get the current
* title value.
*
* @publicApi
*/
var Title = /** @class */ (function () {
function Title(_doc) {
this._doc = _doc;
}
/**
* Get the title of the current HTML document.
*/
Title.prototype.getTitle = function () { return getDOM().getTitle(this._doc); };
/**
* Set the title of the current HTML document.
* @param newTitle
*/
Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
Title.ngInjectableDef = ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: "root" });
Title = __decorate([
Injectable({ providedIn: 'root', useFactory: createTitle, deps: [] }),
__param(0, Inject(DOCUMENT)),
__metadata("design:paramtypes", [Object])
], Title);
return Title;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var win = typeof window !== 'undefined' && window || {};
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var ChangeDetectionPerfRecord = /** @class */ (function () {
function ChangeDetectionPerfRecord(msPerTick, numTicks) {
this.msPerTick = msPerTick;
this.numTicks = numTicks;
}
return ChangeDetectionPerfRecord;
}());
/**
* Entry point for all Angular profiling-related debug tools. This object
* corresponds to the `ng.profiler` in the dev console.
*/
var AngularProfiler = /** @class */ (function () {
function AngularProfiler(ref) {
this.appRef = ref.injector.get(ApplicationRef);
}
// tslint:disable:no-console
/**
* Exercises change detection in a loop and then prints the average amount of
* time in milliseconds how long a single round of change detection takes for
* the current state of the UI. It runs a minimum of 5 rounds for a minimum
* of 500 milliseconds.
*
* Optionally, a user may pass a `config` parameter containing a map of
* options. Supported options are:
*
* `record` (boolean) - causes the profiler to record a CPU profile while
* it exercises the change detector. Example:
*
* ```
* ng.profiler.timeChangeDetection({record: true})
* ```
*/
AngularProfiler.prototype.timeChangeDetection = function (config) {
var record = config && config['record'];
var profileName = 'Change Detection';
// Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
var isProfilerAvailable = win.console.profile != null;
if (record && isProfilerAvailable) {
win.console.profile(profileName);
}
var start = getDOM().performanceNow();
var numTicks = 0;
while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {
this.appRef.tick();
numTicks++;
}
var end = getDOM().performanceNow();
if (record && isProfilerAvailable) {
win.console.profileEnd(profileName);
}
var msPerTick = (end - start) / numTicks;
win.console.log("ran " + numTicks + " change detection cycles");
win.console.log(msPerTick.toFixed(2) + " ms per check");
return new ChangeDetectionPerfRecord(msPerTick, numTicks);
};
return AngularProfiler;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var PROFILER_GLOBAL_NAME = 'profiler';
/**
* Enabled Angular debug tools that are accessible via your browser's
* developer console.
*
* Usage:
*
* 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
* 1. Type `ng.` (usually the console will show auto-complete suggestion)
* 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
* then hit Enter.
*
* @publicApi
*/
function enableDebugTools(ref) {
exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
return ref;
}
/**
* Disables Angular tools.
*
* @publicApi
*/
function disableDebugTools() {
exportNgVar(PROFILER_GLOBAL_NAME, null);
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function escapeHtml(text) {
var escapedText = {
'&': '&a;',
'"': '&q;',
'\'': '&s;',
'<': '&l;',
'>': '&g;',
};
return text.replace(/[&"'<>]/g, function (s) { return escapedText[s]; });
}
function unescapeHtml(text) {
var unescapedText = {
'&a;': '&',
'&q;': '"',
'&s;': '\'',
'&l;': '<',
'&g;': '>',
};
return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });
}
/**
* Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
*
* Example:
*
* ```
* const COUNTER_KEY = makeStateKey<number>('counter');
* let value = 10;
*
* transferState.set(COUNTER_KEY, value);
* ```
*
* @publicApi
*/
function makeStateKey(key) {
return key;
}
/**
* A key value store that is transferred from the application on the server side to the application
* on the client side.
*
* `TransferState` will be available as an injectable token. To use it import
* `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
*
* The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
* boolean, number, string, null and non-class objects will be serialized and deserialzied in a
* non-lossy manner.
*
* @publicApi
*/
var TransferState = /** @class */ (function () {
function TransferState() {
this.store = {};
this.onSerializeCallbacks = {};
}
TransferState_1 = TransferState;
/** @internal */
TransferState.init = function (initState) {
var transferState = new TransferState_1();
transferState.store = initState;
return transferState;
};
/**
* Get the value corresponding to a key. Return `defaultValue` if key is not found.
*/
TransferState.prototype.get = function (key, defaultValue) {
return this.store[key] !== undefined ? this.store[key] : defaultValue;
};
/**
* Set the value corresponding to a key.
*/
TransferState.prototype.set = function (key, value) { this.store[key] = value; };
/**
* Remove a key from the store.
*/
TransferState.prototype.remove = function (key) { delete this.store[key]; };
/**
* Test whether a key exists in the store.
*/
TransferState.prototype.hasKey = function (key) { return this.store.hasOwnProperty(key); };
/**
* Register a callback to provide the value for a key when `toJson` is called.
*/
TransferState.prototype.onSerialize = function (key, callback) {
this.onSerializeCallbacks[key] = callback;
};
/**
* Serialize the current state of the store to JSON.
*/
TransferState.prototype.toJson = function () {
// Call the onSerialize callbacks and put those values into the store.
for (var key in this.onSerializeCallbacks) {
if (this.onSerializeCallbacks.hasOwnProperty(key)) {
try {
this.store[key] = this.onSerializeCallbacks[key]();
}
catch (e) {
console.warn('Exception in onSerialize callback: ', e);
}
}
}
return JSON.stringify(this.store);
};
var TransferState_1;
TransferState = TransferState_1 = __decorate([
Injectable()
], TransferState);
return TransferState;
}());
function initTransferState(doc, appId) {
// Locate the script tag with the JSON data transferred from the server.
// The id of the script tag is set to the Angular appId + 'state'.
var script = doc.getElementById(appId + '-state');
var initialState = {};
if (script && script.textContent) {
try {
initialState = JSON.parse(unescapeHtml(script.textContent));
}
catch (e) {
console.warn('Exception while restoring TransferState for app ' + appId, e);
}
}
return TransferState.init(initialState);
}
/**
* NgModule to install on the client side while using the `TransferState` to transfer state from
* server to client.
*
* @publicApi
*/
var BrowserTransferStateModule = /** @class */ (function () {
function BrowserTransferStateModule() {
}
BrowserTransferStateModule = __decorate([
NgModule({
providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }],
})
], BrowserTransferStateModule);
return BrowserTransferStateModule;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Predicates for use with {@link DebugElement}'s query functions.
*
* @publicApi
*/
var By = /** @class */ (function () {
function By() {
}
/**
* Match all nodes.
*
* @usageNotes
* ### Example
*
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
*/
By.all = function () { return function () { return true; }; };
/**
* Match elements by the given CSS selector.
*
* @usageNotes
* ### Example
*
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
*/
By.css = function (selector) {
return function (debugElement) {
return debugElement.nativeElement != null ?
getDOM().elementMatches(debugElement.nativeElement, selector) :
false;
};
};
/**
* Match nodes that have the given directive present.
*
* @usageNotes
* ### Example
*
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
*/
By.directive = function (type) {
return function (debugNode) { return debugNode.providerTokens.indexOf(type) !== -1; };
};
return By;
}());
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @publicApi
*/
var VERSION = new Version('8.2.4');
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// This file only reexports content of the `src` folder. Keep it that way.
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Generated bundle index. Do not edit.
*/
export { BROWSER_MODULE_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_c, _document as ɵangular_packages_platform_browser_platform_browser_b, errorHandler as ɵangular_packages_platform_browser_platform_browser_a, GenericBrowserDomAdapter as ɵangular_packages_platform_browser_platform_browser_l, createMeta as ɵangular_packages_platform_browser_platform_browser_d, SERVER_TRANSITION_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_i, appInitializerFactory as ɵangular_packages_platform_browser_platform_browser_h, createTitle as ɵangular_packages_platform_browser_platform_browser_e, initTransferState as ɵangular_packages_platform_browser_platform_browser_f, ELEMENT_PROBE_PROVIDERS__PRE_R3__ as ɵangular_packages_platform_browser_platform_browser_k, _createNgProbe as ɵangular_packages_platform_browser_platform_browser_j, EventManagerPlugin as ɵangular_packages_platform_browser_platform_browser_g, BrowserModule, platformBrowser, Meta, Title, disableDebugTools, enableDebugTools, BrowserTransferStateModule, TransferState, makeStateKey, By, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, DomSanitizer, VERSION, ELEMENT_PROBE_PROVIDERS__POST_R3__ as ɵELEMENT_PROBE_PROVIDERS__POST_R3__, BROWSER_SANITIZATION_PROVIDERS as ɵBROWSER_SANITIZATION_PROVIDERS, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, initDomAdapter as ɵinitDomAdapter, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserPlatformLocation as ɵBrowserPlatformLocation, TRANSITION_ID as ɵTRANSITION_ID, BrowserGetTestability as ɵBrowserGetTestability, escapeHtml as ɵescapeHtml, ELEMENT_PROBE_PROVIDERS as ɵELEMENT_PROBE_PROVIDERS, DomAdapter as ɵDomAdapter, getDOM as ɵgetDOM, setRootDomAdapter as ɵsetRootDomAdapter, DomRendererFactory2 as ɵDomRendererFactory2, NAMESPACE_URIS as ɵNAMESPACE_URIS, flattenStyles as ɵflattenStyles, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute, DomEventsPlugin as ɵDomEventsPlugin, HammerGesturesPlugin as ɵHammerGesturesPlugin, KeyEventsPlugin as ɵKeyEventsPlugin, DomSharedStylesHost as ɵDomSharedStylesHost, SharedStylesHost as ɵSharedStylesHost, DomSanitizerImpl as ɵDomSanitizerImpl };
//# sourceMappingURL=platform-browser.js.map
|
'use strict'
const split = require('split2')
const parse = require('fast-json-parse')
process.stdin.pipe(split(
line => {
const parsed = parse(line)
if (parsed.err) return line + '\n'
return JSON.stringify(parsed.value, null, 2) + '\n'
}
)).pipe(process.stdout)
|
var getDescriptionForCode = function(code) {
code = code.replace(/\s+/g, '')
code = code.substr(0, 2) + ' ' + code.substr(2, 2) + ' ' + code.substr(4, 3)
var referenceCode = referenceCodes.find((referenceCode) => {
return referenceCode.code === code
})
return referenceCode ? referenceCode.description : ""
}
const referenceCodes = [
{
"code": "01 01 01",
"description": "wastes from mineral metalliferous excavation"
},
{
"code": "01 01 02",
"description": "wastes from mineral non-metalliferous excavation"
},
{
"code": "01 03 04*",
"description": "acid-generating tailings from processing of sulphide ore"
},
{
"code": "01 03 05*",
"description": "other tailings containing hazardous substances"
},
{
"code": "01 03 06",
"description": "tailings other than those mentioned in 01 03 04 and 01 03 05"
},
{
"code": "01 03 07*",
"description": "other wastes containing hazardous substances from physical and chemical processing of metalliferous minerals"
},
{
"code": "01 03 08",
"description": "dusty and powdery wastes other than those mentioned in 01 03 07"
},
{
"code": "01 03 09",
"description": "red mud from alumina production other than the wastes mentioned in 01 03 10"
},
{
"code": "01 03 10*",
"description": "red mud from alumina production containing hazardous substances other than the wastes mentioned in 01 03 07"
},
{
"code": "01 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "01 04 07*",
"description": "wastes containing hazardous substances from physical and chemical processing of non-metalliferous minerals"
},
{
"code": "01 04 08",
"description": "waste gravel and crushed rocks other than those mentioned in 01 04 07"
},
{
"code": "01 04 09",
"description": "waste sand and clays"
},
{
"code": "01 04 10",
"description": "dusty and powdery wastes other than those mentioned in 01 04 07"
},
{
"code": "01 04 11",
"description": "wastes from potash and rock salt processing other than those mentioned in 01 04 07"
},
{
"code": "01 04 12",
"description": "tailings and other wastes from washing and cleaning of minerals other than those mentioned in 01 04 07 and 01 04 11"
},
{
"code": "01 04 13",
"description": "wastes from stone cutting and sawing other than those mentioned in 01 04 07"
},
{
"code": "01 04 99",
"description": "wastes not otherwise specified"
},
{
"code": "01 05 04",
"description": "freshwater drilling muds and wastes"
},
{
"code": "01 05 05*",
"description": "oil-containing drilling muds and wastes"
},
{
"code": "01 05 06*",
"description": "drilling muds and other drilling wastes containing hazardous substances"
},
{
"code": "01 05 07",
"description": "barite-containing drilling muds and wastes other than those mentioned in 01 05 05 and 01 05 06"
},
{
"code": "01 05 08",
"description": "chloride-containing drilling muds and wastes other than those mentioned in 01 05 05 and 01 05 06"
},
{
"code": "01 05 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 01 01",
"description": "sludges from washing and cleaning"
},
{
"code": "02 01 02",
"description": "animal-tissue waste"
},
{
"code": "02 01 03",
"description": "plant-tissue waste"
},
{
"code": "02 01 04",
"description": "waste plastics (except packaging)"
},
{
"code": "02 01 06",
"description": "animal faeces, urine and manure (including spoiled straw), effluent, collected separately and treated off-site"
},
{
"code": "02 01 07",
"description": "wastes from forestry"
},
{
"code": "02 01 08*",
"description": "agrochemical waste containing hazardous substances"
},
{
"code": "02 01 09",
"description": "agrochemical waste other than those mentioned in 02 01 08"
},
{
"code": "02 01 10",
"description": "waste metal"
},
{
"code": "02 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 02 01",
"description": "sludges from washing and cleaning"
},
{
"code": "02 02 02",
"description": "animal-tissue waste"
},
{
"code": "02 02 03",
"description": "materials unsuitable for consumption or processing"
},
{
"code": "02 02 04",
"description": "sludges from on-site effluent treatment"
},
{
"code": "02 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 03 01",
"description": "sludges from washing, cleaning, peeling, centrifuging and separation"
},
{
"code": "02 03 02",
"description": "wastes from preserving agents"
},
{
"code": "02 03 03",
"description": "wastes from solvent extraction"
},
{
"code": "02 03 04",
"description": "materials unsuitable for consumption or processing"
},
{
"code": "02 03 05",
"description": "sludges from on-site effluent treatment"
},
{
"code": "02 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 04 01",
"description": "soil from cleaning and washing beet"
},
{
"code": "02 04 02",
"description": "off-specification calcium carbonate"
},
{
"code": "02 04 03",
"description": "sludges from on-site effluent treatment"
},
{
"code": "02 04 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 05 01",
"description": "materials unsuitable for consumption or processing"
},
{
"code": "02 05 02",
"description": "sludges from on-site effluent treatment"
},
{
"code": "02 05 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 06 01",
"description": "materials unsuitable for consumption or processing"
},
{
"code": "02 06 02",
"description": "wastes from preserving agents"
},
{
"code": "02 06 03",
"description": "sludges from on-site effluent treatment"
},
{
"code": "02 06 99",
"description": "wastes not otherwise specified"
},
{
"code": "02 07 01",
"description": "wastes from washing, cleaning and mechanical reduction of raw materials"
},
{
"code": "02 07 02",
"description": "wastes from spirits distillation"
},
{
"code": "02 07 03",
"description": "wastes from chemical treatment"
},
{
"code": "02 07 04",
"description": "materials unsuitable for consumption or processing"
},
{
"code": "02 07 05",
"description": "sludges from on-site effluent treatment"
},
{
"code": "02 07 99",
"description": "wastes not otherwise specified"
},
{
"code": "03 01",
"description": "wastes from wood processing and the production of panels and furniture"
},
{
"code": "03 01 01",
"description": "waste bark and cork"
},
{
"code": "03 01 04*",
"description": "sawdust, shavings, cuttings, wood, particle board and veneer containing hazardous substances"
},
{
"code": "03 01 05",
"description": "sawdust, shavings, cuttings, wood, particle board and veneer other than those mentioned in 03 01 04"
},
{
"code": "03 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "03 02 01*",
"description": "non-halogenated organic wood preservatives"
},
{
"code": "03 02 02*",
"description": "organochlorinated wood preservatives"
},
{
"code": "03 02 03*",
"description": "organometallic wood preservatives"
},
{
"code": "03 02 04*",
"description": "inorganic wood preservatives"
},
{
"code": "03 02 05*",
"description": "other wood preservatives containing hazardous substances"
},
{
"code": "03 02 99",
"description": "wood preservatives not otherwise specified"
},
{
"code": "03 03 01",
"description": "waste bark and wood"
},
{
"code": "03 03 02",
"description": "green liquor sludge (from recovery of cooking liquor)"
},
{
"code": "03 03 05",
"description": "de-inking sludges from paper recycling"
},
{
"code": "03 03 07",
"description": "mechanically separated rejects from pulping of waste paper and cardboard"
},
{
"code": "03 03 08",
"description": "wastes from sorting of paper and cardboard destined for recycling"
},
{
"code": "03 03 09",
"description": "lime mud waste"
},
{
"code": "03 03 10",
"description": "fibre rejects, fibre-, filler- and coating-sludges from mechanical separation"
},
{
"code": "03 03 11",
"description": "sludges from on-site effluent treatment other than those mentioned in 03 03 10"
},
{
"code": "03 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "04 01 01",
"description": "fleshings and lime split wastes"
},
{
"code": "04 01 02",
"description": "liming waste"
},
{
"code": "04 01 03*",
"description": "degreasing wastes containing solvents without a liquid phase"
},
{
"code": "04 01 04",
"description": "tanning liquor containing chromium"
},
{
"code": "04 01 05",
"description": "tanning liquor free of chromium"
},
{
"code": "04 01 06",
"description": "sludges, in particular from on-site effluent treatment containing chromium"
},
{
"code": "04 01 07",
"description": "sludges, in particular from on-site effluent treatment free of chromium"
},
{
"code": "04 01 08",
"description": "waste tanned leather (blue sheetings, shavings, cuttings, buffing dust) containing chromium"
},
{
"code": "04 01 09",
"description": "wastes from dressing and finishing"
},
{
"code": "04 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "04 02 09",
"description": "wastes from composite materials (impregnated textile, elastomer, plastomer)"
},
{
"code": "04 02 10",
"description": "organic matter from natural products (for example grease, wax)"
},
{
"code": "04 02 14*",
"description": "wastes from finishing containing organic solvents"
},
{
"code": "04 02 15",
"description": "wastes from finishing other than those mentioned in 04 02 14"
},
{
"code": "04 02 16*",
"description": "dyestuffs and pigments containing hazardous substances"
},
{
"code": "04 02 17",
"description": "dyestuffs and pigments other than those mentioned in 04 02 16"
},
{
"code": "04 02 19*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "04 02 20",
"description": "sludges from on-site effluent treatment other than those mentioned in 04 02 19"
},
{
"code": "04 02 21",
"description": "wastes from unprocessed textile fibres"
},
{
"code": "04 02 22",
"description": "wastes from processed textile fibres"
},
{
"code": "04 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "05 01 02*",
"description": "desalter sludges"
},
{
"code": "05 01 03*",
"description": "tank bottom sludges"
},
{
"code": "05 01 04*",
"description": "acid alkyl sludges"
},
{
"code": "05 01 05*",
"description": "oil spills"
},
{
"code": "05 01 06*",
"description": "oily sludges from maintenance operations of the plant or equipment"
},
{
"code": "05 01 07*",
"description": "acid tars"
},
{
"code": "05 01 08*",
"description": "other tars"
},
{
"code": "05 01 09*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "05 01 10",
"description": "sludges from on-site effluent treatment other than those mentioned in 05 01 09"
},
{
"code": "05 01 11*",
"description": "wastes from cleaning of fuels with bases"
},
{
"code": "05 01 12*",
"description": "oil containing acids"
},
{
"code": "05 01 13",
"description": "boiler feedwater sludges"
},
{
"code": "05 01 14",
"description": "wastes from cooling columns"
},
{
"code": "05 01 15*",
"description": "spent filter clays"
},
{
"code": "05 01 16",
"description": "sulphur-containing wastes from petroleum desulphurisation"
},
{
"code": "05 01 17",
"description": "bitumen"
},
{
"code": "05 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "05 06 01*",
"description": "acid tars"
},
{
"code": "05 06 03*",
"description": "other tars"
},
{
"code": "05 06 04",
"description": "waste from cooling columns"
},
{
"code": "05 06 99",
"description": "wastes not otherwise specified"
},
{
"code": "05 07 01*",
"description": "wastes containing mercury"
},
{
"code": "05 07 02",
"description": "wastes containing sulphur"
},
{
"code": "05 07 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 01 01*",
"description": "sulphuric acid and sulphurous acid"
},
{
"code": "06 01 02*",
"description": "hydrochloric acid"
},
{
"code": "06 01 03*",
"description": "hydrofluoric acid"
},
{
"code": "06 01 04*",
"description": "phosphoric and phosphorous acid"
},
{
"code": "06 01 05*",
"description": "nitric acid and nitrous acid"
},
{
"code": "06 01 06*",
"description": "other acids"
},
{
"code": "06 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 02 01*",
"description": "calcium hydroxide"
},
{
"code": "06 02 03*",
"description": "ammonium hydroxide"
},
{
"code": "06 02 04*",
"description": "sodium and potassium hydroxide"
},
{
"code": "06 02 05*",
"description": "other bases"
},
{
"code": "06 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 03 11*",
"description": "solid salts and solutions containing cyanides"
},
{
"code": "06 03 13*",
"description": "solid salts and solutions containing heavy metals"
},
{
"code": "06 03 14",
"description": "solid salts and solutions other than those mentioned in 06 03 11 and 06 03 13"
},
{
"code": "06 03 15*",
"description": "metallic oxides containing heavy metals"
},
{
"code": "06 03 16",
"description": "metallic oxides other than those mentioned in 06 03 15"
},
{
"code": "06 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 04 03*",
"description": "wastes containing arsenic"
},
{
"code": "06 04 04*",
"description": "wastes containing mercury"
},
{
"code": "06 04 05*",
"description": "wastes containing other heavy metals"
},
{
"code": "06 04 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 05 02*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "06 05 03",
"description": "sludges from on-site effluent treatment other than those mentioned in 06 05 02"
},
{
"code": "06 06 02*",
"description": "wastes containing hazardous sulphides"
},
{
"code": "06 06 03",
"description": "wastes containing sulphides other than those mentioned in 06 06 02"
},
{
"code": "06 06 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 07 01*",
"description": "wastes containing asbestos from electrolysis"
},
{
"code": "06 07 02*",
"description": "activated carbon from chlorine production"
},
{
"code": "06 07 03*",
"description": "barium sulphate sludge containing mercury"
},
{
"code": "06 07 04*",
"description": "solutions and acids, for example contact acid"
},
{
"code": "06 07 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 08 02*",
"description": "waste containing hazardous chlorosilanes"
},
{
"code": "06 08 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 09 02",
"description": "phosphorous slag"
},
{
"code": "06 09 03*",
"description": "calcium-based reaction wastes containing or contaminated with hazardous substances"
},
{
"code": "06 09 04",
"description": "calcium-based reaction wastes other than those mentioned in 06 09 03"
},
{
"code": "06 09 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 10 02*",
"description": "wastes containing hazardous substances"
},
{
"code": "06 10 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 11 01",
"description": "calcium-based reaction wastes from titanium dioxide production"
},
{
"code": "06 11 99",
"description": "wastes not otherwise specified"
},
{
"code": "06 13 01*",
"description": "inorganic plant protection products, wood-preserving agents and other biocides"
},
{
"code": "06 13 02*",
"description": "spent activated carbon (except 06 07 02)"
},
{
"code": "06 13 03",
"description": "carbon black"
},
{
"code": "06 13 04*",
"description": "wastes from asbestos processing"
},
{
"code": "06 13 05*",
"description": "soot"
},
{
"code": "06 13 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 01 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 01 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 01 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 01 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 01 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 01 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 01 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 01 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 01 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 01 11"
},
{
"code": "07 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 02 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 02 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 02 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 02 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 02 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 02 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 02 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 02 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 02 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 02 11"
},
{
"code": "07 02 13",
"description": "waste plastic"
},
{
"code": "07 02 14*",
"description": "wastes from additives containing hazardous substances"
},
{
"code": "07 02 15",
"description": "wastes from additives other than those mentioned in 07 02 14"
},
{
"code": "07 02 16*",
"description": "waste containing hazardous silicones"
},
{
"code": "07 02 17",
"description": "waste containing silicones other than those mentioned in 07 02 16"
},
{
"code": "07 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 03 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 03 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 03 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 03 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 03 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 03 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 03 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 03 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 03 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 03 11"
},
{
"code": "07 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 04 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 04 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 04 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 04 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 04 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 04 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 04 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 04 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 04 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 04 11"
},
{
"code": "07 04 13*",
"description": "solid wastes containing hazardous substances"
},
{
"code": "07 04 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 05 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 05 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 05 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 05 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 05 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 05 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 05 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 05 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 05 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 05 11"
},
{
"code": "07 05 13*",
"description": "solid wastes containing hazardous substances"
},
{
"code": "07 05 14",
"description": "solid wastes other than those mentioned in 07 05 13"
},
{
"code": "07 05 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 06 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 06 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 06 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 06 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 06 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 06 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 06 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 06 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 06 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 06 11"
},
{
"code": "07 06 99",
"description": "wastes not otherwise specified"
},
{
"code": "07 07 01*",
"description": "aqueous washing liquids and mother liquors"
},
{
"code": "07 07 03*",
"description": "organic halogenated solvents, washing liquids and mother liquors"
},
{
"code": "07 07 04*",
"description": "other organic solvents, washing liquids and mother liquors"
},
{
"code": "07 07 07*",
"description": "halogenated still bottoms and reaction residues"
},
{
"code": "07 07 08*",
"description": "other still bottoms and reaction residues"
},
{
"code": "07 07 09*",
"description": "halogenated filter cakes and spent absorbents"
},
{
"code": "07 07 10*",
"description": "other filter cakes and spent absorbents"
},
{
"code": "07 07 11*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "07 07 12",
"description": "sludges from on-site effluent treatment other than those mentioned in 07 07 11"
},
{
"code": "07 07 99",
"description": "wastes not otherwise specified"
},
{
"code": "08 01 11*",
"description": "waste paint and varnish containing organic solvents or other hazardous substances"
},
{
"code": "08 01 12",
"description": "waste paint and varnish other than those mentioned in 08 01 11"
},
{
"code": "08 01 13*",
"description": "sludges from paint or varnish containing organic solvents or other hazardous substances"
},
{
"code": "08 01 14",
"description": "sludges from paint or varnish other than those mentioned in 08 01 13"
},
{
"code": "08 01 15*",
"description": "aqueous sludges containing paint or varnish containing organic solvents or other hazardous substances"
},
{
"code": "08 01 16",
"description": "aqueous sludges containing paint or varnish other than those mentioned in 08 01 15"
},
{
"code": "08 01 17*",
"description": "wastes from paint or varnish removal containing organic solvents or other hazardous substances"
},
{
"code": "08 01 18",
"description": "wastes from paint or varnish removal other than those mentioned in 08 01 17"
},
{
"code": "08 01 19*",
"description": "aqueous suspensions containing paint or varnish containing organic solvents or other hazardous substances"
},
{
"code": "08 01 20",
"description": "aqueous suspensions containing paint or varnish other than those mentioned in 08 01 19"
},
{
"code": "08 01 21*",
"description": "waste paint or varnish remover"
},
{
"code": "08 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "08 02 01",
"description": "waste coating powders"
},
{
"code": "08 02 02",
"description": "aqueous sludges containing ceramic materials"
},
{
"code": "08 02 03",
"description": "aqueous suspensions containing ceramic materials"
},
{
"code": "08 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "08 03 07",
"description": "aqueous sludges containing ink"
},
{
"code": "08 03 08",
"description": "aqueous liquid waste containing ink"
},
{
"code": "08 03 12*",
"description": "waste ink containing hazardous substances"
},
{
"code": "08 03 13",
"description": "waste ink other than those mentioned in 08 03 12"
},
{
"code": "08 03 14*",
"description": "ink sludges containing hazardous substances"
},
{
"code": "08 03 15",
"description": "ink sludges other than those mentioned in 08 03 14"
},
{
"code": "08 03 16*",
"description": "waste etching solutions"
},
{
"code": "08 03 17*",
"description": "waste printing toner containing hazardous substances"
},
{
"code": "08 03 18",
"description": "waste printing toner other than those mentioned in 08 03 17"
},
{
"code": "08 03 19*",
"description": "disperse oil"
},
{
"code": "08 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "08 04 09*",
"description": "waste adhesives and sealants containing organic solvents or other hazardous substances"
},
{
"code": "08 04 10",
"description": "waste adhesives and sealants other than those mentioned in 08 04 09"
},
{
"code": "08 04 11*",
"description": "adhesive and sealant sludges containing organic solvents or other hazardous substances"
},
{
"code": "08 04 12",
"description": "adhesive and sealant sludges other than those mentioned in 08 04 11"
},
{
"code": "08 04 13*",
"description": "aqueous sludges containing adhesives or sealants containing organic solvents or other hazardous substances"
},
{
"code": "08 04 14",
"description": "aqueous sludges containing adhesives or sealants other than those mentioned in 08 04 13"
},
{
"code": "08 04 15*",
"description": "aqueous liquid waste containing adhesives or sealants containing organic solvents or other hazardous substances"
},
{
"code": "08 04 16",
"description": "aqueous liquid waste containing adhesives or sealants other than those mentioned in 08 04 15"
},
{
"code": "08 04 17*",
"description": "rosin oil"
},
{
"code": "08 04 99",
"description": "wastes not otherwise specified"
},
{
"code": "08 05 01*",
"description": "waste isocyanates"
},
{
"code": "09 01 01*",
"description": "water-based developer and activator solutions"
},
{
"code": "09 01 02*",
"description": "water-based offset plate developer solutions"
},
{
"code": "09 01 03*",
"description": "solvent-based developer solutions"
},
{
"code": "09 01 04*",
"description": "fixer solutions"
},
{
"code": "09 01 05*",
"description": "bleach solutions and bleach fixer solutions"
},
{
"code": "09 01 06*",
"description": "wastes containing silver from on-site treatment of photographic wastes"
},
{
"code": "09 01 07",
"description": "photographic film and paper containing silver or silver compounds"
},
{
"code": "09 01 08",
"description": "photographic film and paper free of silver or silver compounds"
},
{
"code": "09 01 10",
"description": "single-use cameras without batteries"
},
{
"code": "09 01 11*",
"description": "single-use cameras containing batteries included in 16 06 01, 16 06 02 or 16 06 03"
},
{
"code": "09 01 12",
"description": "single-use cameras containing batteries other than those mentioned in 09 01 11"
},
{
"code": "09 01 13*",
"description": "aqueous liquid waste from on-site reclamation of silver other than those mentioned in 09 01 06"
},
{
"code": "09 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 01 01",
"description": "bottom ash, slag and boiler dust (excluding boiler dust mentioned in 10 01 04)"
},
{
"code": "10 01 02",
"description": "coal fly ash"
},
{
"code": "10 01 03",
"description": "fly ash from peat and untreated wood"
},
{
"code": "10 01 04*",
"description": "oil fly ash and boiler dust"
},
{
"code": "10 01 05",
"description": "calcium-based reaction wastes from flue-gas desulphurisation in solid form"
},
{
"code": "10 01 07",
"description": "calcium-based reaction wastes from flue-gas desulphurisation in sludge form"
},
{
"code": "10 01 09*",
"description": "sulphuric acid"
},
{
"code": "10 01 13*",
"description": "fly ash from emulsified hydrocarbons used as fuel"
},
{
"code": "10 01 14*",
"description": "bottom ash, slag and boiler dust from co-incineration containing hazardous substances"
},
{
"code": "10 01 15",
"description": "bottom ash, slag and boiler dust from co-incineration other than those mentioned in 10 01 14"
},
{
"code": "10 01 16*",
"description": "fly ash from co-incineration containing hazardous substances"
},
{
"code": "10 01 17",
"description": "fly ash from co-incineration other than those mentioned in 10 01 16"
},
{
"code": "10 01 18*",
"description": "wastes from gas cleaning containing hazardous substances"
},
{
"code": "10 01 19",
"description": "wastes from gas cleaning other than those mentioned in 10 01 05, 10 01 07 and 10 01 18"
},
{
"code": "10 01 20*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "10 01 21",
"description": "sludges from on-site effluent treatment other than those mentioned in 10 01 20"
},
{
"code": "10 01 22*",
"description": "aqueous sludges from boiler cleansing containing hazardous substances"
},
{
"code": "10 01 23",
"description": "aqueous sludges from boiler cleansing other than those mentioned in 10 01 22"
},
{
"code": "10 01 24",
"description": "sands from fluidised beds"
},
{
"code": "10 01 25",
"description": "wastes from fuel storage and preparation of coal-fired power plants"
},
{
"code": "10 01 26",
"description": "wastes from cooling-water treatment"
},
{
"code": "10 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 02 01",
"description": "wastes from the processing of slag"
},
{
"code": "10 02 02",
"description": "unprocessed slag"
},
{
"code": "10 02 07*",
"description": "solid wastes from gas treatment containing hazardous substances"
},
{
"code": "10 02 08",
"description": "solid wastes from gas treatment other than those mentioned in 10 02 07"
},
{
"code": "10 02 10",
"description": "mill scales"
},
{
"code": "10 02 11*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 02 12",
"description": "wastes from cooling-water treatment other than those mentioned in 10 02 11"
},
{
"code": "10 02 13*",
"description": "sludges and filter cakes from gas treatment containing hazardous substances"
},
{
"code": "10 02 14",
"description": "sludges and filter cakes from gas treatment other than those mentioned in 10 02 13"
},
{
"code": "10 02 15",
"description": "other sludges and filter cakes"
},
{
"code": "10 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 03 02",
"description": "anode scraps"
},
{
"code": "10 03 04*",
"description": "primary production slags"
},
{
"code": "10 03 05",
"description": "waste alumina"
},
{
"code": "10 03 08*",
"description": "salt slags from secondary production"
},
{
"code": "10 03 09*",
"description": "black drosses from secondary production"
},
{
"code": "10 03 15*",
"description": "skimmings that are flammable or emit, upon contact with water, flammable gases in hazardous quantities"
},
{
"code": "10 03 16",
"description": "skimmings other than those mentioned in 10 03 15"
},
{
"code": "10 03 17*",
"description": "tar-containing wastes from anode manufacture"
},
{
"code": "10 03 18",
"description": "carbon-containing wastes from anode manufacture other than those mentioned in 10 03 17"
},
{
"code": "10 03 19*",
"description": "flue-gas dust containing hazardous substances"
},
{
"code": "10 03 20",
"description": "flue-gas dust other than those mentioned in 10 03 19"
},
{
"code": "10 03 21*",
"description": "other particulates and dust (including ball-mill dust) containing hazardous substances"
},
{
"code": "10 03 22",
"description": "other particulates and dust (including ball-mill dust) other than those mentioned in 10 03 21"
},
{
"code": "10 03 23*",
"description": "solid wastes from gas treatment containing hazardous substances"
},
{
"code": "10 03 24",
"description": "solid wastes from gas treatment other than those mentioned in 10 03 23"
},
{
"code": "10 03 25*",
"description": "sludges and filter cakes from gas treatment containing hazardous substances"
},
{
"code": "10 03 26",
"description": "sludges and filter cakes from gas treatment other than those mentioned in 10 03 25"
},
{
"code": "10 03 27*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 03 28",
"description": "wastes from cooling-water treatment other than those mentioned in 10 03 27"
},
{
"code": "10 03 29*",
"description": "wastes from treatment of salt slags and black drosses containing hazardous substances"
},
{
"code": "10 03 30",
"description": "wastes from treatment of salt slags and black drosses other than those mentioned in 10 03 29"
},
{
"code": "10 03 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 04 01*",
"description": "slags from primary and secondary production"
},
{
"code": "10 04 02*",
"description": "dross and skimmings from primary and secondary production"
},
{
"code": "10 04 03*",
"description": "calcium arsenate"
},
{
"code": "10 04 04*",
"description": "flue-gas dust"
},
{
"code": "10 04 05*",
"description": "other particulates and dust"
},
{
"code": "10 04 06*",
"description": "solid wastes from gas treatment"
},
{
"code": "10 04 07*",
"description": "sludges and filter cakes from gas treatment"
},
{
"code": "10 04 09*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 04 10",
"description": "wastes from cooling-water treatment other than those mentioned in 10 04 09"
},
{
"code": "10 04 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 05 01",
"description": "slags from primary and secondary production"
},
{
"code": "10 05 03*",
"description": "flue-gas dust"
},
{
"code": "10 05 04",
"description": "other particulates and dust"
},
{
"code": "10 05 05*",
"description": "solid waste from gas treatment"
},
{
"code": "10 05 06*",
"description": "sludges and filter cakes from gas treatment"
},
{
"code": "10 05 08*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 05 09",
"description": "wastes from cooling-water treatment other than those mentioned in 10 05 08"
},
{
"code": "10 05 10*",
"description": "dross and skimmings that are flammable or emit, upon contact with water, flammable gases in hazardous quantities"
},
{
"code": "10 05 11",
"description": "dross and skimmings other than those mentioned in 10 05 10"
},
{
"code": "10 05 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 06 01",
"description": "slags from primary and secondary production"
},
{
"code": "10 06 02",
"description": "dross and skimmings from primary and secondary production"
},
{
"code": "10 06 03*",
"description": "flue-gas dust"
},
{
"code": "10 06 04",
"description": "other particulates and dust"
},
{
"code": "10 06 06*",
"description": "solid wastes from gas treatment"
},
{
"code": "10 06 07*",
"description": "sludges and filter cakes from gas treatment"
},
{
"code": "10 06 09*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 06 10",
"description": "wastes from cooling-water treatment other than those mentioned in 10 06 09"
},
{
"code": "10 06 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 07 01",
"description": "slags from primary and secondary production"
},
{
"code": "10 07 02",
"description": "dross and skimmings from primary and secondary production"
},
{
"code": "10 07 03",
"description": "solid wastes from gas treatment"
},
{
"code": "10 07 04",
"description": "other particulates and dust"
},
{
"code": "10 07 05",
"description": "sludges and filter cakes from gas treatment"
},
{
"code": "10 07 07*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 07 08",
"description": "wastes from cooling-water treatment other than those mentioned in 10 07 07"
},
{
"code": "10 07 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 08 04",
"description": "particulates and dust"
},
{
"code": "10 08 08*",
"description": "salt slag from primary and secondary production"
},
{
"code": "10 08 09",
"description": "other slags"
},
{
"code": "10 08 10*",
"description": "dross and skimmings that are flammable or emit, upon contact with water, flammable gases in hazardous quantities"
},
{
"code": "10 08 11",
"description": "dross and skimmings other than those mentioned in 10 08 10"
},
{
"code": "10 08 12*",
"description": "tar-containing wastes from anode manufacture"
},
{
"code": "10 08 13",
"description": "carbon-containing wastes from anode manufacture other than those mentioned in 10 08 12"
},
{
"code": "10 08 14",
"description": "anode scrap"
},
{
"code": "10 08 15*",
"description": "flue-gas dust containing hazardous substances"
},
{
"code": "10 08 16",
"description": "flue-gas dust other than those mentioned in 10 08 15"
},
{
"code": "10 08 17*",
"description": "sludges and filter cakes from flue-gas treatment containing hazardous substances"
},
{
"code": "10 08 18",
"description": "sludges and filter cakes from flue-gas treatment other than those mentioned in 10 08 17"
},
{
"code": "10 08 19*",
"description": "wastes from cooling-water treatment containing oil"
},
{
"code": "10 08 20",
"description": "wastes from cooling-water treatment other than those mentioned in 10 08 19"
},
{
"code": "10 08 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 09 03",
"description": "furnace slag"
},
{
"code": "10 09 05*",
"description": "casting cores and moulds which have not undergone pouring containing hazardous substances"
},
{
"code": "10 09 06",
"description": "casting cores and moulds which have not undergone pouring other than those mentioned in 10 09 05"
},
{
"code": "10 09 07*",
"description": "casting cores and moulds which have undergone pouring containing hazardous substances"
},
{
"code": "10 09 08",
"description": "casting cores and moulds which have undergone pouring other than those mentioned in 10 09 07"
},
{
"code": "10 09 09*",
"description": "flue-gas dust containing hazardous substances"
},
{
"code": "10 09 10",
"description": "flue-gas dust other than those mentioned in 10 09 09"
},
{
"code": "10 09 11*",
"description": "other particulates containing hazardous substances"
},
{
"code": "10 09 12",
"description": "other particulates other than those mentioned in 10 09 11"
},
{
"code": "10 09 13*",
"description": "waste binders containing hazardous substances"
},
{
"code": "10 09 14",
"description": "waste binders other than those mentioned in 10 09 13"
},
{
"code": "10 09 15*",
"description": "waste crack-indicating agent containing hazardous substances"
},
{
"code": "10 09 16",
"description": "waste crack-indicating agent other than those mentioned in 10 09 15"
},
{
"code": "10 09 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 10 03",
"description": "furnace slag"
},
{
"code": "10 10 05*",
"description": "casting cores and moulds which have not undergone pouring, containing hazardous substances"
},
{
"code": "10 10 06",
"description": "casting cores and moulds which have not undergone pouring, other than those mentioned in 10 10 05"
},
{
"code": "10 10 07*",
"description": "casting cores and moulds which have undergone pouring, containing hazardous substances"
},
{
"code": "10 10 08",
"description": "casting cores and moulds which have undergone pouring, other than those mentioned in 10 10 07"
},
{
"code": "10 10 09*",
"description": "flue-gas dust containing hazardous substances"
},
{
"code": "10 10 10",
"description": "flue-gas dust other than those mentioned in 10 10 09"
},
{
"code": "10 10 11*",
"description": "other particulates containing hazardous substances"
},
{
"code": "10 10 12",
"description": "other particulates other than those mentioned in 10 10 11"
},
{
"code": "10 10 13*",
"description": "waste binders containing hazardous substances"
},
{
"code": "10 10 14",
"description": "waste binders other than those mentioned in 10 10 13"
},
{
"code": "10 10 15*",
"description": "waste crack-indicating agent containing hazardous substances"
},
{
"code": "10 10 16",
"description": "waste crack-indicating agent other than those mentioned in 10 10 15"
},
{
"code": "10 10 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 11 03",
"description": "waste glass-based fibrous materials"
},
{
"code": "10 11 05",
"description": "particulates and dust"
},
{
"code": "10 11 09*",
"description": "waste preparation mixture before thermal processing, containing hazardous substances"
},
{
"code": "10 11 10",
"description": "waste preparation mixture before thermal processing, other than those mentioned in 10 11 09"
},
{
"code": "10 11 11*",
"description": "waste glass in small particles and glass powder containing heavy metals (for example from cathode ray tubes)"
},
{
"code": "10 11 12",
"description": "waste glass other than those mentioned in 10 11 11"
},
{
"code": "10 11 13*",
"description": "glass-polishing and -grinding sludge containing hazardous substances"
},
{
"code": "10 11 14",
"description": "glass-polishing and -grinding sludge other than those mentioned in 10 11 13"
},
{
"code": "10 11 15*",
"description": "solid wastes from flue-gas treatment containing hazardous substances"
},
{
"code": "10 11 16",
"description": "solid wastes from flue-gas treatment other than those mentioned in 10 11 15"
},
{
"code": "10 11 17*",
"description": "sludges and filter cakes from flue-gas treatment containing hazardous substances"
},
{
"code": "10 11 18",
"description": "sludges and filter cakes from flue-gas treatment other than those mentioned in 10 11 17"
},
{
"code": "10 11 19*",
"description": "solid wastes from on-site effluent treatment containing hazardous substances"
},
{
"code": "10 11 20",
"description": "solid wastes from on-site effluent treatment other than those mentioned in 10 11 19"
},
{
"code": "10 11 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 12 01",
"description": "waste preparation mixture before thermal processing"
},
{
"code": "10 12 03",
"description": "particulates and dust"
},
{
"code": "10 12 05",
"description": "sludges and filter cakes from gas treatment"
},
{
"code": "10 12 06",
"description": "discarded moulds"
},
{
"code": "10 12 08",
"description": "waste ceramics, bricks, tiles and construction products (after thermal processing)"
},
{
"code": "10 12 09*",
"description": "solid wastes from gas treatment containing hazardous substances"
},
{
"code": "10 12 10",
"description": "solid wastes from gas treatment other than those mentioned in 10 12 09"
},
{
"code": "10 12 11*",
"description": "wastes from glazing containing heavy metals"
},
{
"code": "10 12 12",
"description": "wastes from glazing other than those mentioned in 10 12 11"
},
{
"code": "10 12 13",
"description": "sludge from on-site effluent treatment"
},
{
"code": "10 12 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 13 01",
"description": "waste preparation mixture before thermal processing"
},
{
"code": "10 13 04",
"description": "wastes from calcination and hydration of lime"
},
{
"code": "10 13 06",
"description": "particulates and dust (except 10 13 12 and 10 13 13)"
},
{
"code": "10 13 07",
"description": "sludges and filter cakes from gas treatment"
},
{
"code": "10 13 09*",
"description": "wastes from asbestos-cement manufacture containing asbestos"
},
{
"code": "10 13 10",
"description": "wastes from asbestos-cement manufacture other than those mentioned in 10 13 09"
},
{
"code": "10 13 11",
"description": "wastes from cement-based composite materials other than those mentioned in 10 13 09 and 10 13 10"
},
{
"code": "10 13 12*",
"description": "solid wastes from gas treatment containing hazardous substances"
},
{
"code": "10 13 13",
"description": "solid wastes from gas treatment other than those mentioned in 10 13 12"
},
{
"code": "10 13 14",
"description": "waste concrete and concrete sludge"
},
{
"code": "10 13 99",
"description": "wastes not otherwise specified"
},
{
"code": "10 14 01*",
"description": "waste from gas cleaning containing mercury"
},
{
"code": "11 01 05*",
"description": "pickling acids"
},
{
"code": "11 01 06*",
"description": "acids not otherwise specified"
},
{
"code": "11 01 07*",
"description": "pickling bases"
},
{
"code": "11 01 08*",
"description": "phosphatising sludges"
},
{
"code": "11 01 09*",
"description": "sludges and filter cakes containing hazardous substances"
},
{
"code": "11 01 10",
"description": "sludges and filter cakes other than those mentioned in 11 01 09"
},
{
"code": "11 01 11*",
"description": "aqueous rinsing liquids containing hazardous substances"
},
{
"code": "11 01 12",
"description": "aqueous rinsing liquids other than those mentioned in 11 01 11"
},
{
"code": "11 01 13*",
"description": "degreasing wastes containing hazardous substances"
},
{
"code": "11 01 14",
"description": "degreasing wastes other than those mentioned in 11 01 13"
},
{
"code": "11 01 15*",
"description": "eluate and sludges from membrane systems or ion exchange systems containing hazardous substances"
},
{
"code": "11 01 16*",
"description": "saturated or spent ion exchange resins"
},
{
"code": "11 01 98*",
"description": "other wastes containing hazardous substances"
},
{
"code": "11 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "11 02 02*",
"description": "sludges from zinc hydrometallurgy (including jarosite, goethite)"
},
{
"code": "11 02 03",
"description": "wastes from the production of anodes for aqueous electrolytical processes"
},
{
"code": "11 02 05*",
"description": "wastes from copper hydrometallurgical processes containing hazardous substances"
},
{
"code": "11 02 06",
"description": "wastes from copper hydrometallurgical processes other than those mentioned in 11 02 05"
},
{
"code": "11 02 07*",
"description": "other wastes containing hazardous substances"
},
{
"code": "11 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "11 03 01*",
"description": "wastes containing cyanide"
},
{
"code": "11 03 02*",
"description": "other wastes"
},
{
"code": "11 05 01",
"description": "hard zinc"
},
{
"code": "11 05 02",
"description": "zinc ash"
},
{
"code": "11 05 03*",
"description": "solid wastes from gas treatment"
},
{
"code": "11 05 04*",
"description": "spent flux"
},
{
"code": "11 05 99",
"description": "wastes not otherwise specified"
},
{
"code": "12 01 01",
"description": "ferrous metal filings and turnings"
},
{
"code": "12 01 02",
"description": "ferrous metal dust and particles"
},
{
"code": "12 01 03",
"description": "non-ferrous metal filings and turnings"
},
{
"code": "12 01 04",
"description": "non-ferrous metal dust and particles"
},
{
"code": "12 01 05",
"description": "plastics shavings and turnings"
},
{
"code": "12 01 06*",
"description": "mineral-based machining oils containing halogens (except emulsions and solutions)"
},
{
"code": "12 01 07*",
"description": "mineral-based machining oils free of halogens (except emulsions and solutions)"
},
{
"code": "12 01 08*",
"description": "machining emulsions and solutions containing halogens"
},
{
"code": "12 01 09*",
"description": "machining emulsions and solutions free of halogens"
},
{
"code": "12 01 10*",
"description": "synthetic machining oils"
},
{
"code": "12 01 12*",
"description": "spent waxes and fats"
},
{
"code": "12 01 13",
"description": "welding wastes"
},
{
"code": "12 01 14*",
"description": "machining sludges containing hazardous substances"
},
{
"code": "12 01 15",
"description": "machining sludges other than those mentioned in 12 01 14"
},
{
"code": "12 01 16*",
"description": "waste blasting material containing hazardous substances"
},
{
"code": "12 01 17",
"description": "waste blasting material other than those mentioned in 12 01 16"
},
{
"code": "12 01 18*",
"description": "metal sludge (grinding, honing and lapping sludge) containing oil"
},
{
"code": "12 01 19*",
"description": "readily biodegradable machining oil"
},
{
"code": "12 01 20*",
"description": "spent grinding bodies and grinding materials containing hazardous substances"
},
{
"code": "12 01 21",
"description": "spent grinding bodies and grinding materials other than those mentioned in 12 01 20"
},
{
"code": "12 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "12 03 01*",
"description": "aqueous washing liquids"
},
{
"code": "12 03 02*",
"description": "steam degreasing wastes"
},
{
"code": "13 01 01*",
"description": "hydraulic oils, containing PCBs"
},
{
"code": "13 01 04*",
"description": "chlorinated emulsions"
},
{
"code": "13 01 05*",
"description": "non-chlorinated emulsions"
},
{
"code": "13 01 09*",
"description": "mineral-based chlorinated hydraulic oils"
},
{
"code": "13 01 10*",
"description": "mineral based non-chlorinated hydraulic oils"
},
{
"code": "13 01 11*",
"description": "synthetic hydraulic oils"
},
{
"code": "13 01 12*",
"description": "readily biodegradable hydraulic oils"
},
{
"code": "13 01 13*",
"description": "other hydraulic oils"
},
{
"code": "13 02 04*",
"description": "mineral-based chlorinated engine, gear and lubricating oils"
},
{
"code": "13 02 05*",
"description": "mineral-based non-chlorinated engine, gear and lubricating oils"
},
{
"code": "13 02 06*",
"description": "synthetic engine, gear and lubricating oils"
},
{
"code": "13 02 07*",
"description": "readily biodegradable engine, gear and lubricating oils"
},
{
"code": "13 02 08*",
"description": "other engine, gear and lubricating oils"
},
{
"code": "13 03 01*",
"description": "insulating or heat transmission oils containing PCBs"
},
{
"code": "13 03 06*",
"description": "mineral-based chlorinated insulating and heat transmission oils other than those mentioned in 13 03 01"
},
{
"code": "13 03 07*",
"description": "mineral-based non-chlorinated insulating and heat transmission oils"
},
{
"code": "13 03 08*",
"description": "synthetic insulating and heat transmission oils"
},
{
"code": "13 03 09*",
"description": "readily biodegradable insulating and heat transmission oils"
},
{
"code": "13 03 10*",
"description": "other insulating and heat transmission oils"
},
{
"code": "13 04 01*",
"description": "bilge oils from inland navigation"
},
{
"code": "13 04 02*",
"description": "bilge oils from jetty sewers"
},
{
"code": "13 04 03*",
"description": "bilge oils from other navigation"
},
{
"code": "13 05 01*",
"description": "solids from grit chambers and oil/water separators"
},
{
"code": "13 05 02*",
"description": "sludges from oil/water separators"
},
{
"code": "13 05 03*",
"description": "interceptor sludges"
},
{
"code": "13 05 06*",
"description": "oil from oil/water separators"
},
{
"code": "13 05 07*",
"description": "oily water from oil/water separators"
},
{
"code": "13 05 08*",
"description": "mixtures of wastes from grit chambers and oil/water separators"
},
{
"code": "13 07 01*",
"description": "fuel oil and diesel"
},
{
"code": "13 07 02*",
"description": "petrol"
},
{
"code": "13 07 03*",
"description": "other fuels (including mixtures)"
},
{
"code": "13 08 01*",
"description": "desalter sludges or emulsions"
},
{
"code": "13 08 02*",
"description": "other emulsions"
},
{
"code": "13 08 99*",
"description": "wastes not otherwise specified"
},
{
"code": "14 06 01*",
"description": "chlorofluorocarbons, HCFC, HFC"
},
{
"code": "14 06 02*",
"description": "other halogenated solvents and solvent mixtures"
},
{
"code": "14 06 03*",
"description": "other solvents and solvent mixtures"
},
{
"code": "14 06 04*",
"description": "sludges or solid wastes containing halogenated solvents"
},
{
"code": "14 06 05*",
"description": "sludges or solid wastes containing other solvents"
},
{
"code": "15 01 01",
"description": "paper and cardboard packaging"
},
{
"code": "15 01 02",
"description": "plastic packaging"
},
{
"code": "15 01 03",
"description": "wooden packaging"
},
{
"code": "15 01 04",
"description": "metallic packaging"
},
{
"code": "15 01 05",
"description": "composite packaging"
},
{
"code": "15 01 06",
"description": "mixed packaging"
},
{
"code": "15 01 07",
"description": "glass packaging"
},
{
"code": "15 01 09",
"description": "textile packaging"
},
{
"code": "15 01 10*",
"description": "packaging containing residues of or contaminated by hazardous substances"
},
{
"code": "15 01 11*",
"description": "metallic packaging containing a hazardous solid porous matrix (for example asbestos), including empty pressure containers"
},
{
"code": "15 02 02*",
"description": "absorbents, filter materials (including oil filters not otherwise specified), wiping cloths, protective clothing contaminated by hazardous substances"
},
{
"code": "15 02 03",
"description": "absorbents, filter materials, wiping cloths and protective clothing other than those mentioned in 15 02 02"
},
{
"code": "16 01 03",
"description": "end-of-life tyres"
},
{
"code": "16 01 04*",
"description": "end-of-life vehicles"
},
{
"code": "16 01 06",
"description": "end-of-life vehicles, containing neither liquids nor other hazardous components"
},
{
"code": "16 01 07*",
"description": "oil filters"
},
{
"code": "16 01 08*",
"description": "components containing mercury"
},
{
"code": "16 01 09*",
"description": "components containing PCBs"
},
{
"code": "16 01 10*",
"description": "explosive components (for example air bags)"
},
{
"code": "16 01 11*",
"description": "brake pads containing asbestos"
},
{
"code": "16 01 12",
"description": "brake pads other than those mentioned in 16 01 11"
},
{
"code": "16 01 13*",
"description": "brake fluids"
},
{
"code": "16 01 14*",
"description": "antifreeze fluids containing hazardous substances"
},
{
"code": "16 01 15",
"description": "antifreeze fluids other than those mentioned in 16 01 14"
},
{
"code": "16 01 16",
"description": "tanks for liquefied gas"
},
{
"code": "16 01 17",
"description": "ferrous metal"
},
{
"code": "16 01 18",
"description": "non-ferrous metal"
},
{
"code": "16 01 19",
"description": "plastic"
},
{
"code": "16 01 20",
"description": "glass"
},
{
"code": "16 01 21*",
"description": "hazardous components other than those mentioned in 16 01 07 to 16 01 11 and 16 01 13 and 16 01 14"
},
{
"code": "16 01 22",
"description": "components not otherwise specified"
},
{
"code": "16 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "16 02 09*",
"description": "transformers and capacitors containing PCBs"
},
{
"code": "16 02 10*",
"description": "discarded equipment containing or contaminated by PCBs other than those mentioned in 16 02 09"
},
{
"code": "16 02 11*",
"description": "discarded equipment containing chlorofluorocarbons, HCFC, HFC"
},
{
"code": "16 02 12*",
"description": "discarded equipment containing free asbestos"
},
{
"code": "16 02 13*",
"description": "discarded equipment containing hazardous componentsother than those mentioned in 16 02 09 to 16 02 12"
},
{
"code": "16 02 14",
"description": "discarded equipment other than those mentioned in 16 02 09 to 16 02 13"
},
{
"code": "16 02 15*",
"description": "hazardous components removed from discarded equipment"
},
{
"code": "16 02 16",
"description": "components removed from discarded equipment other than those mentioned in 16 02 15"
},
{
"code": "16 03 03*",
"description": "inorganic wastes containing hazardous substances"
},
{
"code": "16 03 04",
"description": "inorganic wastes other than those mentioned in 16 03 03"
},
{
"code": "16 03 05*",
"description": "organic wastes containing hazardous substances"
},
{
"code": "16 03 06",
"description": "organic wastes other than those mentioned in 16 03 05"
},
{
"code": "16 03 07*",
"description": "metallic mercury"
},
{
"code": "16 04 01*",
"description": "waste ammunition"
},
{
"code": "16 04 02*",
"description": "fireworks wastes"
},
{
"code": "16 04 03*",
"description": "other waste explosives"
},
{
"code": "16 05 04*",
"description": "gases in pressure containers (including halons) containing hazardous substances"
},
{
"code": "16 05 05",
"description": "gases in pressure containers other than those mentioned in 16 05 04"
},
{
"code": "16 05 06*",
"description": "laboratory chemicals, consisting of or containing hazardous substances, including mixtures of laboratory chemicals"
},
{
"code": "16 05 07*",
"description": "discarded inorganic chemicals consisting of or containing hazardous substances"
},
{
"code": "16 05 08*",
"description": "discarded organic chemicals consisting of or containing hazardous substances"
},
{
"code": "16 05 09",
"description": "discarded chemicals other than those mentioned in 16 05 06, 16 05 07 or 16 05 08"
},
{
"code": "16 06 01*",
"description": "lead batteries"
},
{
"code": "16 06 02*",
"description": "Ni-Cd batteries"
},
{
"code": "16 06 03*",
"description": "mercury-containing batteries"
},
{
"code": "16 06 04",
"description": "alkaline batteries (except 16 06 03)"
},
{
"code": "16 06 05",
"description": "other batteries and accumulators"
},
{
"code": "16 06 06*",
"description": "separately collected electrolyte from batteries and accumulators"
},
{
"code": "16 07 08*",
"description": "wastes containing oil"
},
{
"code": "16 07 09*",
"description": "wastes containing other hazardous substances"
},
{
"code": "16 07 99",
"description": "wastes not otherwise specified"
},
{
"code": "16 08 01",
"description": "spent catalysts containing gold, silver, rhenium, rhodium, palladium, iridium or platinum (except 16 08 07)"
},
{
"code": "16 08 02*",
"description": "spent catalysts containing hazardous transition metals or hazardous transition metal compounds"
},
{
"code": "16 08 03",
"description": "spent catalysts containing transition metals or transition metal compounds not otherwise specified"
},
{
"code": "16 08 04",
"description": "spent fluid catalytic cracking catalysts (except 16 08 07)"
},
{
"code": "16 08 05*",
"description": "spent catalysts containing phosphoric acid"
},
{
"code": "16 08 06*",
"description": "spent liquids used as catalysts"
},
{
"code": "16 08 07*",
"description": "spent catalysts contaminated with hazardous substances"
},
{
"code": "16 09 01*",
"description": "permanganates, for example potassium permanganate"
},
{
"code": "16 09 02*",
"description": "chromates, for example potassium chromate, potassium or sodium dichromate"
},
{
"code": "16 09 03*",
"description": "peroxides, for example hydrogen peroxide"
},
{
"code": "16 09 04*",
"description": "oxidising substances, not otherwise specified"
},
{
"code": "16 10 01*",
"description": "aqueous liquid wastes containing hazardous substances"
},
{
"code": "16 10 02",
"description": "aqueous liquid wastes other than those mentioned in 16 10 01"
},
{
"code": "16 10 03*",
"description": "aqueous concentrates containing hazardous substances"
},
{
"code": "16 10 04",
"description": "aqueous concentrates other than those mentioned in 16 10 03"
},
{
"code": "16 11 01*",
"description": "carbon-based linings and refractories from metallurgical processes containing hazardous substances"
},
{
"code": "16 11 02",
"description": "carbon-based linings and refractories from metallurgical processes others than those mentioned in 16 11 01"
},
{
"code": "16 11 03*",
"description": "other linings and refractories from metallurgical processes containing hazardous substances"
},
{
"code": "16 11 04",
"description": "other linings and refractories from metallurgical processes other than those mentioned in 16 11 03"
},
{
"code": "16 11 05*",
"description": "linings and refractories from non-metallurgical processes containing hazardous substances"
},
{
"code": "16 11 06",
"description": "linings and refractories from non-metallurgical processes others than those mentioned in 16 11 05"
},
{
"code": "17 01 01",
"description": "concrete"
},
{
"code": "17 01 02",
"description": "bricks"
},
{
"code": "17 01 03",
"description": "tiles and ceramics"
},
{
"code": "17 01 06*",
"description": "mixtures of, or separate fractions of concrete, bricks, tiles and ceramics containing hazardous substances"
},
{
"code": "17 01 07",
"description": "mixtures of concrete, bricks, tiles and ceramics other than those mentioned in 17 01 06"
},
{
"code": "17 02 01",
"description": "wood"
},
{
"code": "17 02 02",
"description": "glass"
},
{
"code": "17 02 03",
"description": "plastic"
},
{
"code": "17 02 04*",
"description": "glass, plastic and wood containing or contaminated with hazardous substances"
},
{
"code": "17 03 01*",
"description": "bituminous mixtures containing coal tar"
},
{
"code": "17 03 02",
"description": "bituminous mixtures other than those mentioned in 17 03 01"
},
{
"code": "17 03 03*",
"description": "coal tar and tarred products"
},
{
"code": "17 04 01",
"description": "copper, bronze, brass"
},
{
"code": "17 04 02",
"description": "aluminium"
},
{
"code": "17 04 03",
"description": "lead"
},
{
"code": "17 04 04",
"description": "zinc"
},
{
"code": "17 04 05",
"description": "iron and steel"
},
{
"code": "17 04 06",
"description": "tin"
},
{
"code": "17 04 07",
"description": "mixed metals"
},
{
"code": "17 04 09*",
"description": "metal waste contaminated with hazardous substances"
},
{
"code": "17 04 10*",
"description": "cables containing oil, coal tar and other hazardous substances"
},
{
"code": "17 04 11",
"description": "cables other than those mentioned in 17 04 10"
},
{
"code": "17 05 03*",
"description": "soil and stones containing hazardous substances"
},
{
"code": "17 05 04",
"description": "soil and stones other than those mentioned in 17 05 03"
},
{
"code": "17 05 05*",
"description": "dredging spoil containing hazardous substances"
},
{
"code": "17 05 06",
"description": "dredging spoil other than those mentioned in 17 05 05"
},
{
"code": "17 05 07*",
"description": "track ballast containing hazardous substances"
},
{
"code": "17 05 08",
"description": "track ballast other than those mentioned in 17 05 07"
},
{
"code": "17 06 01*",
"description": "insulation materials containing asbestos"
},
{
"code": "17 06 03*",
"description": "other insulation materials consisting of or containing hazardous substances"
},
{
"code": "17 06 04",
"description": "insulation materials other than those mentioned in 17 06 01 and 17 06 03"
},
{
"code": "17 06 05*",
"description": "construction materials containing asbestos"
},
{
"code": "17 08 01*",
"description": "gypsum-based construction materials contaminated with hazardous substances"
},
{
"code": "17 08 02",
"description": "gypsum-based construction materials other than those mentioned in 17 08 01"
},
{
"code": "17 09 01*",
"description": "construction and demolition wastes containing mercury"
},
{
"code": "17 09 02*",
"description": "construction and demolition wastes containing PCB (for example PCB- containing sealants, PCB-containing resin-based floorings, PCB-containing sealed glazing units, PCB-containing capacitors)"
},
{
"code": "17 09 03*",
"description": "other construction and demolition wastes (including mixed wastes) containing hazardous substances"
},
{
"code": "17 09 04",
"description": "mixed construction and demolition wastes other than those mentioned in 17 09 01, 17 09 02 and 17 09 03"
},
{
"code": "18 01 01",
"description": "sharps (except 18 01 03)"
},
{
"code": "18 01 02",
"description": "body parts and organs including blood bags and blood preserves (except 18 01 03)"
},
{
"code": "18 01 03*",
"description": "wastes whose collection and disposal is subject to special requirements in order to prevent infection"
},
{
"code": "18 01 04",
"description": "wastes whose collection and disposal is not subject to special requirements in order to prevent infection (for example dressings, plaster casts, linen, disposable clothing, diapers)"
},
{
"code": "18 01 06*",
"description": "chemicals consisting of or containing hazardous substances"
},
{
"code": "18 01 07",
"description": "chemicals other than those mentioned in 18 01 06"
},
{
"code": "18 01 08*",
"description": "cytotoxic and cytostatic medicines"
},
{
"code": "18 01 09",
"description": "medicines other than those mentioned in 18 01 08"
},
{
"code": "18 01 10*",
"description": "amalgam waste from dental care"
},
{
"code": "18 02 01",
"description": "sharps (except 18 02 02)"
},
{
"code": "18 02 02*",
"description": "wastes whose collection and disposal is subject to special requirements in order to prevent infection"
},
{
"code": "18 02 03",
"description": "wastes whose collection and disposal is not subject to special requirements in order to prevent infection"
},
{
"code": "18 02 05*",
"description": "chemicals consisting of or containing hazardous substances"
},
{
"code": "18 02 06",
"description": "chemicals other than those mentioned in 18 02 05"
},
{
"code": "18 02 07*",
"description": "cytotoxic and cytostatic medicines"
},
{
"code": "18 02 08",
"description": "medicines other than those mentioned in 18 02 07"
},
{
"code": "19 01 02",
"description": "ferrous materials removed from bottom ash"
},
{
"code": "19 01 05*",
"description": "filter cake from gas treatment"
},
{
"code": "19 01 06*",
"description": "aqueous liquid wastes from gas treatment and other aqueous liquid wastes"
},
{
"code": "19 01 07*",
"description": "solid wastes from gas treatment"
},
{
"code": "19 01 10*",
"description": "spent activated carbon from flue-gas treatment"
},
{
"code": "19 01 11*",
"description": "bottom ash and slag containing hazardous substances"
},
{
"code": "19 01 12",
"description": "bottom ash and slag other than those mentioned in 19 01 11"
},
{
"code": "19 01 13*",
"description": "fly ash containing hazardous substances"
},
{
"code": "19 01 14",
"description": "fly ash other than those mentioned in 19 01 13"
},
{
"code": "19 01 15*",
"description": "boiler dust containing hazardous substances"
},
{
"code": "19 01 16",
"description": "boiler dust other than those mentioned in 19 01 15"
},
{
"code": "19 01 17*",
"description": "pyrolysis wastes containing hazardous substances"
},
{
"code": "19 01 18",
"description": "pyrolysis wastes other than those mentioned in 19 01 17"
},
{
"code": "19 01 19",
"description": "sands from fluidised beds"
},
{
"code": "19 01 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 02 03",
"description": "premixed wastes composed only of non-hazardous wastes"
},
{
"code": "19 02 04*",
"description": "premixed wastes composed of at least one hazardous waste"
},
{
"code": "19 02 05*",
"description": "sludges from physico/chemical treatment containing hazardous substances"
},
{
"code": "19 02 06",
"description": "sludges from physico/chemical treatment other than those mentioned in 19 02 05"
},
{
"code": "19 02 07*",
"description": "oil and concentrates from separation"
},
{
"code": "19 02 08*",
"description": "liquid combustible wastes containing hazardous substances"
},
{
"code": "19 02 09*",
"description": "solid combustible wastes containing hazardous substances"
},
{
"code": "19 02 10",
"description": "combustible wastes other than those mentioned in 19 02 08 and 19 02 09"
},
{
"code": "19 02 11*",
"description": "other wastes containing hazardous substances"
},
{
"code": "19 02 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 03 04*",
"description": "wastes marked as hazardous, partly stabilised other than 19 03 08"
},
{
"code": "19 03 05",
"description": "stabilised wastes other than those mentioned in 19 03 04"
},
{
"code": "19 03 06*",
"description": "wastes marked as hazardous, solidified"
},
{
"code": "19 03 07",
"description": "solidified wastes other than those mentioned in 19 03 06"
},
{
"code": "19 03 08*",
"description": "partly stabilised mercury"
},
{
"code": "19 04 01",
"description": "vitrified waste"
},
{
"code": "19 04 02*",
"description": "fly ash and other flue-gas treatment wastes"
},
{
"code": "19 04 03*",
"description": "non-vitrified solid phase"
},
{
"code": "19 04 04",
"description": "aqueous liquid wastes from vitrified waste tempering"
},
{
"code": "19 05 01",
"description": "non-composted fraction of municipal and similar wastes"
},
{
"code": "19 05 02",
"description": "non-composted fraction of animal and vegetable waste"
},
{
"code": "19 05 03",
"description": "off-specification compost"
},
{
"code": "19 05 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 06 03",
"description": "liquor from anaerobic treatment of municipal waste"
},
{
"code": "19 06 04",
"description": "digestate from anaerobic treatment of municipal waste"
},
{
"code": "19 06 05",
"description": "liquor from anaerobic treatment of animal and vegetable waste"
},
{
"code": "19 06 06",
"description": "digestate from anaerobic treatment of animal and vegetable waste"
},
{
"code": "19 06 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 07 02*",
"description": "landfill leachate containing hazardous substances"
},
{
"code": "19 07 03",
"description": "landfill leachate other than those mentioned in 19 07 02"
},
{
"code": "19 08 01",
"description": "screenings"
},
{
"code": "19 08 02",
"description": "waste from desanding"
},
{
"code": "19 08 05",
"description": "sludges from treatment of urban waste water"
},
{
"code": "19 08 06*",
"description": "saturated or spent ion exchange resins"
},
{
"code": "19 08 07*",
"description": "solutions and sludges from regeneration of ion exchangers"
},
{
"code": "19 08 08*",
"description": "membrane system waste containing heavy metals"
},
{
"code": "19 08 09",
"description": "grease and oil mixture from oil/water separation containing only edible oil and fats"
},
{
"code": "19 08 10*",
"description": "grease and oil mixture from oil/water separation other than those mentioned in 19 08 09"
},
{
"code": "19 08 11*",
"description": "sludges containing hazardous substances from biological treatment of industrial waste water"
},
{
"code": "19 08 12",
"description": "sludges from biological treatment of industrial waste water other than those mentioned in 19 08 11"
},
{
"code": "19 08 13*",
"description": "sludges containing hazardous substances from other treatment of industrial waste water"
},
{
"code": "19 08 14",
"description": "sludges from other treatment of industrial waste water other than those mentioned in 19 08 13"
},
{
"code": "19 08 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 09 01",
"description": "solid waste from primary filtration and screenings"
},
{
"code": "19 09 02",
"description": "sludges from water clarification"
},
{
"code": "19 09 03",
"description": "sludges from decarbonation"
},
{
"code": "19 09 04",
"description": "spent activated carbon"
},
{
"code": "19 09 05",
"description": "saturated or spent ion exchange resins"
},
{
"code": "19 09 06",
"description": "solutions and sludges from regeneration of ion exchangers"
},
{
"code": "19 09 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 10 01",
"description": "iron and steel waste"
},
{
"code": "19 10 02",
"description": "non-ferrous waste"
},
{
"code": "19 10 03*",
"description": "fluff-light fraction and dust containing hazardous substances"
},
{
"code": "19 10 04",
"description": "fluff-light fraction and dust other than those mentioned in 19 10 03"
},
{
"code": "19 10 05*",
"description": "other fractions containing hazardous substances"
},
{
"code": "19 10 06",
"description": "other fractions other than those mentioned in 19 10 05"
},
{
"code": "19 11 01*",
"description": "spent filter clays"
},
{
"code": "19 11 02*",
"description": "acid tars"
},
{
"code": "19 11 03*",
"description": "aqueous liquid wastes"
},
{
"code": "19 11 04*",
"description": "wastes from cleaning of fuel with bases"
},
{
"code": "19 11 05*",
"description": "sludges from on-site effluent treatment containing hazardous substances"
},
{
"code": "19 11 06",
"description": "sludges from on-site effluent treatment other than those mentioned in 19 11 05"
},
{
"code": "19 11 07*",
"description": "wastes from flue-gas cleaning"
},
{
"code": "19 11 99",
"description": "wastes not otherwise specified"
},
{
"code": "19 12 01",
"description": "paper and cardboard"
},
{
"code": "19 12 02",
"description": "ferrous metal"
},
{
"code": "19 12 03",
"description": "non-ferrous metal"
},
{
"code": "19 12 04",
"description": "plastic and rubber"
},
{
"code": "19 12 05",
"description": "glass"
},
{
"code": "19 12 06*",
"description": "wood containing hazardous substances"
},
{
"code": "19 12 07",
"description": "wood other than that mentioned in 19 12 06"
},
{
"code": "19 12 08",
"description": "textiles"
},
{
"code": "19 12 09",
"description": "minerals (for example sand, stones)"
},
{
"code": "19 12 10",
"description": "combustible waste (refuse derived fuel)"
},
{
"code": "19 12 11*",
"description": "other wastes (including mixtures of materials) from mechanical treatment of waste containing hazardous substances"
},
{
"code": "19 12 12",
"description": "other wastes (including mixtures of materials) from mechanical treatment of wastes other than those mentioned in 19 12 11"
},
{
"code": "19 13 01*",
"description": "solid wastes from soil remediation containing hazardous substances"
},
{
"code": "19 13 02",
"description": "solid wastes from soil remediation other than those mentioned in 19 13 01"
},
{
"code": "19 13 03*",
"description": "sludges from soil remediation containing hazardous substances"
},
{
"code": "19 13 04",
"description": "sludges from soil remediation other than those mentioned in 19 13 03"
},
{
"code": "19 13 05*",
"description": "sludges from groundwater remediation containing hazardous substances"
},
{
"code": "19 13 06",
"description": "sludges from groundwater remediation other than those mentioned in 19 13 05"
},
{
"code": "19 13 07*",
"description": "aqueous liquid wastes and aqueous concentrates from groundwater remediation containing hazardous substances"
},
{
"code": "19 13 08",
"description": "aqueous liquid wastes and aqueous concentrates from groundwater remediation other than those mentioned in 19 13 07"
},
{
"code": "20 01 01",
"description": "paper and cardboard"
},
{
"code": "20 01 02",
"description": "glass"
},
{
"code": "20 01 08",
"description": "biodegradable kitchen and canteen waste"
},
{
"code": "20 01 10",
"description": "clothes"
},
{
"code": "20 01 11",
"description": "textiles"
},
{
"code": "20 01 13*",
"description": "solvents"
},
{
"code": "20 01 14*",
"description": "acids"
},
{
"code": "20 01 15*",
"description": "alkalines"
},
{
"code": "20 01 17*",
"description": "photochemicals"
},
{
"code": "20 01 19*",
"description": "pesticides"
},
{
"code": "20 01 21*",
"description": "fluorescent tubes and other mercury-containing waste"
},
{
"code": "20 01 23*",
"description": "discarded equipment containing chlorofluorocarbons"
},
{
"code": "20 01 25",
"description": "edible oil and fat"
},
{
"code": "20 01 26*",
"description": "oil and fat other than those mentioned in 20 01 25"
},
{
"code": "20 01 27*",
"description": "paint, inks, adhesives and resins containing hazardous substances"
},
{
"code": "20 01 28",
"description": "paint, inks, adhesives and resins other than those mentioned in 20 01 27"
},
{
"code": "20 01 29*",
"description": "detergents containing hazardous substances"
},
{
"code": "20 01 30",
"description": "detergents other than those mentioned in 20 01 29"
},
{
"code": "20 01 31*",
"description": "cytotoxic and cytostatic medicines"
},
{
"code": "20 01 32",
"description": "medicines other than those mentioned in 20 01 31"
},
{
"code": "20 01 33*",
"description": "batteries and accumulators included in 16 06 01, 16 06 02 or 16 06 03 and unsorted batteries and accumulators containing these batteries"
},
{
"code": "20 01 34",
"description": "batteries and accumulators other than those mentioned in 20 01 33"
},
{
"code": "20 01 35*",
"description": "discarded electrical and electronic equipment other than those mentioned in 20 01 21 and 20 01 23 containing hazardous components"
},
{
"code": "20 01 36",
"description": "discarded electrical and electronic equipment other than those mentioned in 20 01 21, 20 01 23 and 20 01 35"
},
{
"code": "20 01 37*",
"description": "wood containing hazardous substances"
},
{
"code": "20 01 38",
"description": "wood other than that mentioned in 20 01 37"
},
{
"code": "20 01 39",
"description": "plastics"
},
{
"code": "20 01 40",
"description": "metals"
},
{
"code": "20 01 41",
"description": "wastes from chimney sweeping"
},
{
"code": "20 01 99",
"description": "other fractions not otherwise specified"
},
{
"code": "20 02 01",
"description": "biodegradable waste"
},
{
"code": "20 02 02",
"description": "soil and stones"
},
{
"code": "20 02 03",
"description": "other non-biodegradable wastes"
},
{
"code": "20 03 01",
"description": "mixed municipal waste"
},
{
"code": "20 03 02",
"description": "waste from markets"
},
{
"code": "20 03 03",
"description": "street-cleaning residues"
},
{
"code": "20 03 04",
"description": "septic tank sludge"
},
{
"code": "20 03 06",
"description": "waste from sewage cleaning"
},
{
"code": "20 03 07",
"description": "bulky waste"
},
{
"code": "20 03 99",
"description": "municipal wastes not otherwise specified"
}
]
module.exports = {
getDescriptionForCode: getDescriptionForCode
} |
L.MagnifyingGlass = L.Class.extend({
includes: L.Mixin.Events,
options: {
radius: 100,
zoomOffset: 3,
layers: [ ],
fixedPosition: false,
latLng: [0, 0],
fixedZoom: -1
},
initialize: function(options) {
L.Util.setOptions(this, options);
this._fixedZoom = (this.options.fixedZoom != -1);
this._mainMap = null;
this._glassMap = null;
},
getMap: function(){
return this._glassMap;
},
_createMiniMap: function(elt) {
return new L.Map(elt, {
layers: this.options.layers,
zoom: this._getZoom(),
maxZoom: this._mainMap.getMaxZoom(),
minZoom: this._mainMap.getMinZoom(),
crs: this._mainMap.options.crs,
fadeAnimation: false,
// disable every controls and interaction means
attributionControl: false,
zoomControl: false,
boxZoom: false,
touchZoom: false,
scrollWheelZoom: false,
doubleClickZoom: false,
dragging: false,
keyboard: false,
});
},
_getZoom: function() {
return (this._fixedZoom) ?
this.options.fixedZoom :
this._mainMap.getZoom() + this.options.zoomOffset;
},
_updateZoom: function() {
this._glassMap.setZoom(this._getZoom());
},
setRadius: function(radius) {
this.options.radius = radius;
if(this._wrapperElt) {
this._wrapperElt.style.width = this.options.radius * 2 + 'px';
this._wrapperElt.style.height = this.options.radius * 2 + 'px';
}
},
setLatLng: function(latLng) {
this.options.latLng = latLng;
this._update(latLng);
},
_updateFromMouse: function(evt) {
this._update(evt.latlng, evt.layerPoint);
},
_updateFixed: function() {
this._update(this.options.latLng);
},
_update: function(latLng, layerPoint) {
// update mini map view, forcing no animation
this._glassMap.setView(latLng, this._getZoom(), {
pan : { animate: false }
});
// update the layer element position on the main map,
// using the one provided or reprojecting it
layerPoint = layerPoint || this._mainMap.latLngToLayerPoint(latLng);
this._wrapperElt.style.left = layerPoint.x - this.options.radius + 'px';
this._wrapperElt.style.top = layerPoint.y - this.options.radius + 'px';
},
/**
As defined by ILayer
*/
onAdd: function(map) {
this._mainMap = map;
// create a wrapper element and a container for the map inside it
this._wrapperElt = L.DomUtil.create('div', 'leaflet-magnifying-glass');
var glassMapElt = L.DomUtil.create('div', '', this._wrapperElt);
// Webkit border-radius clipping workaround (see CSS)
if(L.Browser.webkit)
L.DomUtil.addClass(glassMapElt, 'leaflet-magnifying-glass-webkit');
// build the map
this._glassMap = this._createMiniMap(glassMapElt);
// forward some DOM events as Leaflet events
L.DomEvent.addListener(this._wrapperElt, 'click', this._fireClick, this);
var opts = this.options;
this.setRadius(opts.radius);
this.setLatLng(opts.latLng);
this._glassMap.whenReady(function() {
if(opts.fixedPosition) {
this._mainMap.on('viewreset', this._updateFixed, this);
// for now, hide the elements during zoom transitions
L.DomUtil.addClass(this._wrapperElt, ('leaflet-zoom-hide'));
} else {
this._mainMap.on('mousemove', this._updateFromMouse, this);
if(!this._fixedZoom) {
this._mainMap.on('zoomend', this._updateZoom, this);
}
}
}, this);
// add the magnifying glass as a layer to the top-most pane
map.getPanes().popupPane.appendChild(this._wrapperElt);
// needed after the element has been added, otherwise tile loading is messy
this._glassMap.invalidateSize();
},
_fireClick: function(domMouseEvt) {
this.fire('click', domMouseEvt);
L.DomEvent.stopPropagation(domMouseEvt);
},
/**
As defined by ILayer
*/
onRemove: function(map) {
map.off('viewreset', this._updateFixed, this);
map.off('mousemove', this._updateFromMouse, this);
map.off('zoomend', this._updateZoom, this);
// layers must be explicitely removed before map destruction,
// otherwise they can't be reused if the mg is re-added
for(var i=0, l=this.options.layers.length; i<l; i++) {
this._glassMap.removeLayer(this.options.layers[i]);
}
this._glassMap.remove();
L.DomEvent.removeListener(this._wrapperElt, 'click', this._fireClick);
map.getPanes().popupPane.removeChild(this._wrapperElt);
this._mainMap = null;
},
/**
Shortcut to mimic common layer types' way of adding to the map
*/
addTo: function(map) {
map.addLayer(this);
}
});
L.magnifyingGlass = function (options) {
return new L.MagnifyingGlass(options);
};
|
#!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Runs traffic_annotation_auditor on the given change list or all files to make
sure network traffic annoations are syntactically and semantically correct and
all required functions are annotated.
"""
from __future__ import print_function
import os
import argparse
import sys
from annotation_tools import NetworkTrafficAnnotationTools
# If this test starts failing, please set TEST_IS_ENABLED to "False" and file a
# bug to get this reenabled, and cc the people listed in
# //tools/traffic_annotation/OWNERS.
TEST_IS_ENABLED = True
# If this test starts failing due to a critical bug in auditor.py, please set
# USE_PYTHON_AUDITOR to "False" and file a bug (see comment above).
USE_PYTHON_AUDITOR = True
# Threshold for the change list size to trigger full test.
CHANGELIST_SIZE_TO_TRIGGER_FULL_TEST = 100
class NetworkTrafficAnnotationChecker():
EXTENSIONS = ['.cc', '.mm', '.java']
ANNOTATIONS_FILE = 'annotations.xml'
def __init__(self, build_path=None):
"""Initializes a NetworkTrafficAnnotationChecker object.
Args:
build_path: str Absolute or relative path to a fully compiled build
directory. If not specified, the script tries to find it based on
relative position of this file (src/tools/traffic_annotation).
"""
self.tools = NetworkTrafficAnnotationTools(build_path)
def IsAnnotationsFile(self, file_path):
"""Returns true if the given file is the annotations file."""
return os.path.basename(file_path) == self.ANNOTATIONS_FILE
def ShouldCheckFile(self, file_path):
"""Returns true if the input file has an extension relevant to network
traffic annotations."""
return os.path.splitext(file_path)[1] in self.EXTENSIONS
def GetFilePaths(self, complete_run, limit):
if complete_run:
return []
# Get list of modified files. If failed, silently ignore as the test is
# run in error resilient mode.
file_paths = self.tools.GetModifiedFiles() or []
annotations_file_changed = any(
self.IsAnnotationsFile(file_path) for file_path in file_paths)
# If the annotations file has changed, trigger a full test to avoid
# missing a case where the annotations file has changed, but not the
# corresponding file, causing a mismatch that is not detected by just
# checking the changed .cc and .mm files.
if annotations_file_changed:
return []
file_paths = [
file_path for file_path in file_paths if self.ShouldCheckFile(
file_path)]
if not file_paths:
return None
# If the number of changed files in the CL exceeds a threshold, trigger
# full test to avoid sending very long list of arguments and possible
# failure in argument buffers.
if len(file_paths) > CHANGELIST_SIZE_TO_TRIGGER_FULL_TEST:
file_paths = []
return file_paths
def CheckFiles(self, complete_run, limit, use_python_auditor):
"""Passes all given files to traffic_annotation_auditor to be checked for
possible violations of network traffic annotation rules.
Args:
complete_run: bool Flag requesting to run test on all relevant files.
use_python_auditor: bool If True, test auditor.py instead of
t_a_auditor.exe.
limit: int The upper threshold for number of errors and warnings. Use 0
for unlimited.
Returns:
int Exit code of the network traffic annotation auditor.
"""
if not self.tools.CanRunAuditor(use_python_auditor):
print("Network traffic annotation presubmit check was not performed. A "
"compiled build directory and traffic_annotation_auditor binary "
"are required to do it.")
return 0
file_paths = self.GetFilePaths(complete_run, limit)
if file_paths is None:
return 0
args = ["--test-only", "--limit=%i" % limit, "--error-resilient"] + \
file_paths
stdout_text, stderr_text, return_code = self.tools.RunAuditor(
args, use_python_auditor)
if stdout_text:
print(stdout_text)
if stderr_text:
print("\n[Runtime Messages]:\n%s" % stderr_text)
if self.tools.GetCurrentPlatform() == "android":
# For now, always mark the android bot as green. This acts as a sort of
# "FYI" mode.
#
# TODO(crbug.com/1254719): Once the Android presubmit bot is stable, turn
# this into a CQ-blocking failure.
return 0
return return_code
def main():
if not TEST_IS_ENABLED:
return 0
parser = argparse.ArgumentParser(
description="Network Traffic Annotation Presubmit checker.")
parser.add_argument(
'--build-path',
help='Specifies a compiled build directory, e.g. out/Debug. If not '
'specified, the script tries to guess it. Will not proceed if not '
'found.')
parser.add_argument(
'--limit', default=5,
help='Limit for the maximum number of returned errors and warnings. '
'Default value is 5, use 0 for unlimited.')
parser.add_argument(
'--complete', action='store_true',
help='Run the test on the complete repository. Otherwise only the '
'modified files are tested.')
args = parser.parse_args()
checker = NetworkTrafficAnnotationChecker(args.build_path)
exit_code = checker.CheckFiles(args.complete,
args.limit,
use_python_auditor=USE_PYTHON_AUDITOR)
return exit_code
if '__main__' == __name__:
sys.exit(main())
|
// @flow
import type {JSONObject, EnvMap} from '@parcel/types';
import type {SchemaEntity} from '@parcel/utils';
import SourceMap from '@parcel/source-map';
import {Transformer} from '@parcel/plugin';
import {transform} from './native';
import {isURL} from '@parcel/utils';
import path from 'path';
import browserslist from 'browserslist';
import semver from 'semver';
import nullthrows from 'nullthrows';
import ThrowableDiagnostic, {encodeJSONKeyComponent} from '@parcel/diagnostic';
import {validateSchema, remapSourceLocation} from '@parcel/utils';
import {isMatch} from 'micromatch';
const JSX_EXTENSIONS = {
'.jsx': true,
'.tsx': true,
};
const JSX_PRAGMA = {
react: {
pragma: 'React.createElement',
pragmaFrag: 'React.Fragment',
},
preact: {
pragma: 'h',
pragmaFrag: 'Fragment',
},
nervjs: {
pragma: 'Nerv.createElement',
pragmaFrag: undefined,
},
hyperapp: {
pragma: 'h',
pragmaFrag: undefined,
},
};
const BROWSER_MAPPING = {
and_chr: 'chrome',
and_ff: 'firefox',
ie_mob: 'ie',
ios_saf: 'ios',
op_mob: 'opera',
and_qq: null,
and_uc: null,
baidu: null,
bb: null,
kaios: null,
op_mini: null,
};
const CONFIG_SCHEMA: SchemaEntity = {
type: 'object',
properties: {
inlineFS: {
type: 'boolean',
},
inlineEnvironment: {
oneOf: [
{
type: 'boolean',
},
{
type: 'array',
items: {
type: 'string',
},
},
],
},
},
additionalProperties: false,
};
export default (new Transformer({
async loadConfig({config, options}) {
let pkg = await config.getPackage();
let reactLib;
if (config.isSource) {
if (pkg?.alias && pkg.alias['react']) {
// e.g.: `{ alias: { "react": "preact/compat" } }`
reactLib = 'react';
} else {
// Find a dependency that we can map to a JSX pragma
reactLib = Object.keys(JSX_PRAGMA).find(
libName =>
pkg?.dependencies?.[libName] ||
pkg?.devDependencies?.[libName] ||
pkg?.peerDependencies?.[libName],
);
}
}
let reactRefresh =
config.isSource &&
options.hmrOptions &&
config.env.isBrowser() &&
!config.env.isWorker() &&
options.mode === 'development' &&
(pkg?.dependencies?.react ||
pkg?.devDependencies?.react ||
pkg?.peerDependencies?.react);
// Check if we should ignore fs calls
// See https://github.com/defunctzombie/node-browser-resolve#skip
let ignoreFS =
pkg &&
pkg.browser &&
typeof pkg.browser === 'object' &&
pkg.browser.fs === false;
let result = await config.getConfigFrom(
path.join(options.projectRoot, 'index'),
['package.json'],
);
let rootPkg = result?.contents;
let inlineEnvironment = config.isSource;
let inlineFS = !ignoreFS;
if (result && rootPkg?.['@parcel/transformer-js']) {
validateSchema.diagnostic(
CONFIG_SCHEMA,
{
data: rootPkg['@parcel/transformer-js'],
// FIXME
source: await options.inputFS.readFile(result.filePath, 'utf8'),
filePath: result.filePath,
prependKey: `/${encodeJSONKeyComponent('@parcel/transformer-js')}`,
},
// FIXME
'@parcel/transformer-js',
'Invalid config for @parcel/transformer-js',
);
inlineEnvironment =
rootPkg['@parcel/transformer-js'].inlineEnvironment ??
inlineEnvironment;
inlineFS = rootPkg['@parcel/transformer-js'].inlineFS ?? inlineFS;
}
let pragma = reactLib ? JSX_PRAGMA[reactLib].pragma : undefined;
let pragmaFrag = reactLib ? JSX_PRAGMA[reactLib].pragmaFrag : undefined;
let isJSX = pragma || JSX_EXTENSIONS[path.extname(config.searchPath)];
config.setResult({
isJSX,
pragma,
pragmaFrag,
inlineEnvironment,
inlineFS,
reactRefresh,
});
},
async transform({asset, config, options}) {
// When this asset is an bundle entry, allow that bundle to be split to load shared assets separately.
// Only set here if it is null to allow previous transformers to override this behavior.
if (asset.isSplittable == null) {
asset.isSplittable = true;
}
let code = await asset.getCode();
let originalMap = await asset.getMap();
let targets;
if (asset.isSource) {
if (asset.env.isElectron() && asset.env.engines.electron) {
targets = {
electron: semver.minVersion(asset.env.engines.electron)?.toString(),
};
} else if (asset.env.isBrowser() && asset.env.engines.browsers) {
targets = {};
let browsers = browserslist(asset.env.engines.browsers);
for (let browser of browsers) {
let [name, version] = browser.split(' ');
if (BROWSER_MAPPING.hasOwnProperty(name)) {
name = BROWSER_MAPPING[name];
if (!name) {
continue;
}
}
let [major, minor = '0', patch = '0'] = version
.split('-')[0]
.split('.');
let semverVersion = `${major}.${minor}.${patch}`;
if (
targets[name] == null ||
semver.gt(targets[name], semverVersion)
) {
targets[name] = semverVersion;
}
}
} else if (asset.env.isNode() && asset.env.engines.node) {
targets = {node: semver.minVersion(asset.env.engines.node)?.toString()};
}
}
let relativePath = path.relative(options.projectRoot, asset.filePath);
let env: EnvMap = {};
if (!config?.inlineEnvironment) {
if (options.env.NODE_ENV != null) {
env.NODE_ENV = options.env.NODE_ENV;
}
if (process.env.PARCEL_BUILD_ENV === 'test') {
env.PARCEL_BUILD_ENV = 'test';
}
} else if (Array.isArray(config?.inlineEnvironment)) {
for (let key in options.env) {
if (isMatch(key, config.inlineEnvironment)) {
env[key] = String(options.env[key]);
}
}
} else {
for (let key in options.env) {
if (!key.startsWith('npm_')) {
env[key] = String(options.env[key]);
}
}
}
let {
dependencies,
code: compiledCode,
map,
shebang,
hoist_result,
needs_esm_helpers,
diagnostics,
used_env,
} = transform({
filename: asset.filePath,
code,
module_id: asset.id,
project_root: options.projectRoot,
replace_env: !asset.env.isNode(),
inline_fs: Boolean(config?.inlineFS) && !asset.env.isNode(),
insert_node_globals: !asset.env.isNode(),
is_browser: asset.env.isBrowser(),
env,
is_type_script: asset.type === 'ts' || asset.type === 'tsx',
is_jsx: Boolean(config?.isJSX),
jsx_pragma: config?.pragma,
jsx_pragma_frag: config?.pragmaFrag,
is_development: options.mode === 'development',
react_refresh: Boolean(config?.reactRefresh),
targets,
source_maps: !!asset.env.sourceMap,
scope_hoist: asset.env.shouldScopeHoist,
});
let convertLoc = loc => {
let location = {
filePath: relativePath,
start: {
line: loc.start_line,
column: loc.start_col,
},
end: {
line: loc.end_line,
column: loc.end_col,
},
};
// If there is an original source map, use it to remap to the original source location.
if (originalMap) {
location = remapSourceLocation(location, originalMap);
}
return location;
};
if (diagnostics) {
throw new ThrowableDiagnostic({
diagnostic: diagnostics.map(diagnostic => ({
filePath: asset.filePath,
message: diagnostic.message,
codeFrame: {
code,
codeHighlights: diagnostic.code_highlights?.map(highlight => {
let {start, end} = convertLoc(highlight.loc);
return {
message: highlight.message,
start,
end,
};
}),
},
hints: diagnostic.hints,
})),
});
}
if (shebang) {
asset.meta.interpreter = shebang;
}
for (let env of used_env) {
asset.invalidateOnEnvChange(env);
}
for (let dep of dependencies) {
if (dep.kind === 'WebWorker') {
asset.addURLDependency(dep.specifier, {
loc: convertLoc(dep.loc),
env: {
context: 'web-worker',
// outputFormat:
// isModule && asset.env.scopeHoist ? 'esmodule' : undefined,
},
meta: {
webworker: true,
},
});
} else if (dep.kind === 'ServiceWorker') {
asset.addURLDependency(dep.specifier, {
loc: convertLoc(dep.loc),
isEntry: true,
env: {context: 'service-worker'},
});
} else if (dep.kind === 'ImportScripts') {
if (asset.env.isWorker()) {
asset.addURLDependency(dep.specifier, {
loc: convertLoc(dep.loc),
});
}
} else if (dep.kind === 'URL') {
asset.addURLDependency(dep.specifier, {
loc: convertLoc(dep.loc),
});
} else if (dep.kind === 'File') {
asset.addIncludedFile(dep.specifier);
} else {
if (dep.kind === 'DynamicImport' && isURL(dep.specifier)) {
continue;
}
let meta: JSONObject = {kind: dep.kind};
if (dep.attributes) {
meta.importAttributes = dep.attributes;
}
asset.addDependency({
moduleSpecifier: dep.specifier,
loc: convertLoc(dep.loc),
isAsync: dep.kind === 'DynamicImport',
isOptional: dep.is_optional,
meta,
resolveFrom: dep.is_helper ? __filename : undefined,
});
}
}
if (hoist_result) {
asset.symbols.ensure();
for (let symbol in hoist_result.exported_symbols) {
let [local, loc] = hoist_result.exported_symbols[symbol];
asset.symbols.set(symbol, local, convertLoc(loc));
}
let deps = new Map(
asset.getDependencies().map(dep => [dep.moduleSpecifier, dep]),
);
for (let dep of deps.values()) {
dep.symbols.ensure();
}
for (let name in hoist_result.imported_symbols) {
let [moduleSpecifier, exported, loc] = hoist_result.imported_symbols[
name
];
let dep = deps.get(moduleSpecifier);
if (!dep) continue;
dep.symbols.set(exported, name, convertLoc(loc));
}
for (let [
name,
moduleSpecifier,
exported,
loc,
] of hoist_result.re_exports) {
let dep = deps.get(moduleSpecifier);
if (!dep) continue;
if (name === '*' && exported === '*') {
dep.symbols.set('*', '*', convertLoc(loc), true);
} else {
let reExportName =
dep.symbols.get(exported)?.local ??
`$${asset.id}$re_export$${name}`;
asset.symbols.set(name, reExportName);
dep.symbols.set(exported, reExportName, convertLoc(loc), true);
}
}
for (let moduleSpecifier of hoist_result.wrapped_requires) {
let dep = deps.get(moduleSpecifier);
if (!dep) continue;
dep.meta.shouldWrap = true;
}
for (let name in hoist_result.dynamic_imports) {
let dep = deps.get(hoist_result.dynamic_imports[name]);
if (!dep) continue;
dep.meta.promiseSymbol = name;
}
if (hoist_result.self_references.length > 0) {
let symbols = new Map();
for (let name of hoist_result.self_references) {
// Do not create a self-reference for the `default` symbol unless we have seen an __esModule flag.
if (
name === 'default' &&
!asset.symbols.hasExportSymbol('__esModule')
) {
continue;
}
let local = nullthrows(asset.symbols.get(name)).local;
symbols.set(name, {
local,
isWeak: false,
loc: null,
});
}
asset.addDependency({
moduleSpecifier: `./${path.basename(asset.filePath)}`,
symbols,
});
}
// Add * symbol if there are CJS exports, no imports/exports at all, or the asset is wrapped.
// This allows accessing symbols that don't exist without errors in symbol propagation.
if (
hoist_result.has_cjs_exports ||
(deps.size === 0 &&
Object.keys(hoist_result.exported_symbols).length === 0) ||
(hoist_result.should_wrap && !asset.symbols.hasExportSymbol('*'))
) {
asset.symbols.set('*', `$${asset.id}$exports`);
}
asset.meta.hasCJSExports = hoist_result.has_cjs_exports;
asset.meta.staticExports = hoist_result.static_cjs_exports;
asset.meta.shouldWrap = hoist_result.should_wrap;
asset.meta.id = asset.id;
} else if (needs_esm_helpers) {
asset.addDependency({
moduleSpecifier: '@parcel/transformer-js/src/esmodule-helpers.js',
resolveFrom: __filename,
env: {
includeNodeModules: {
'@parcel/transformer-js': true,
},
},
});
}
asset.type = 'js';
asset.setCode(compiledCode);
if (map) {
let sourceMap = new SourceMap(options.projectRoot);
sourceMap.addVLQMap(JSON.parse(map));
if (originalMap) {
sourceMap.extends(originalMap);
}
asset.setMap(sourceMap);
}
return [asset];
},
}): Transformer);
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{150:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return c})),n.d(t,"metadata",(function(){return i})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return u}));var r=n(2),o=n(9),a=(n(0),n(327)),c={id:"settings",title:"This should be the Settings UI"},i={id:"fallback/settings",title:"This should be the Settings UI",description:"You ended up here because you did not set the following configuration value:",source:"@site/docs/fallback/settings.mdx",permalink:"/kratos/docs/next/fallback/settings",editUrl:"https://github.com/ory/kratos/edit/master/docs/docs/fallback/settings.mdx",version:"next",lastUpdatedBy:"hackerman",lastUpdatedAt:1589542121},s=[],l={rightToc:s};function u(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"You ended up here because you did not set the following configuration value:"),Object(a.b)("pre",null,Object(a.b)("code",Object(r.a)({parentName:"pre"},{className:"language-yaml",metastring:'title="path/to/kratos/config.yml',title:'"path/to/kratos/config.yml'}),"urls:\n settings_ui: http://my-app.com/settings\n")),Object(a.b)("p",null,"You can set this configuration value using environment variable\n",Object(a.b)("inlineCode",{parentName:"p"},"URLS_SETTINGS_UI")," as well!"),Object(a.b)("p",null,"If you don't know what that means, head over to\n",Object(a.b)("a",Object(r.a)({parentName:"p"},{href:"/kratos/docs/next/self-service/flows/user-settings"}),"User Settings"),"!"))}u.isMDXComponent=!0},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d}));var r=n(0),o=n.n(r);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(n),b=r,d=p["".concat(c,".").concat(b)]||p[b]||f[b]||a;return n?o.a.createElement(d,i(i({ref:t},l),{},{components:n})):o.a.createElement(d,i({ref:t},l))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l<a;l++)c[l]=n[l];return o.a.createElement.apply(null,c)}return o.a.createElement.apply(null,n)}b.displayName="MDXCreateElement"}}]); |
import Component from 'vue-class-component'
import { State, Getter, Action, Mutation, namespace } from 'vuex-class'
Component.registerHooks([
'beforeRouteEnter',
'beforeRouteLeave',
'asyncData',
'fetch',
'middleware',
'layout',
'transition',
'scrollToTop'
])
export { Component as default, State, Getter, Action, Mutation, namespace }
|
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 3);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./resources/js/pages/calendars.init.js":
/*!**********************************************!*\
!*** ./resources/js/pages/calendars.init.js ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint-disable require-jsdoc, no-unused-vars */
var CalendarList = [];
function CalendarInfo() {
this.id = null;
this.name = null;
this.checked = true;
this.color = null;
this.bgColor = null;
this.borderColor = null;
this.dragBgColor = null;
}
function addCalendar(calendar) {
CalendarList.push(calendar);
}
function findCalendar(id) {
var found;
CalendarList.forEach(function (calendar) {
if (calendar.id === id) {
found = calendar;
}
});
return found || CalendarList[0];
}
function hexToRGBA(hex) {
var radix = 16;
var r = parseInt(hex.slice(1, 3), radix),
g = parseInt(hex.slice(3, 5), radix),
b = parseInt(hex.slice(5, 7), radix),
a = parseInt(hex.slice(7, 9), radix) / 255 || 1;
var rgba = 'rgba(' + r + ', ' + g + ', ' + b + ', ' + a + ')';
return rgba;
}
(function () {
var calendar;
var id = 0;
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'My Calendar';
calendar.color = '#ffffff';
calendar.bgColor = '#556ee6';
calendar.dragBgColor = '#556ee6';
calendar.borderColor = '#556ee6';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'Company';
calendar.color = '#ffffff';
calendar.bgColor = '#50a5f1';
calendar.dragBgColor = '#50a5f1';
calendar.borderColor = '#50a5f1';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'Family';
calendar.color = '#ffffff';
calendar.bgColor = '#f46a6a';
calendar.dragBgColor = '#f46a6a';
calendar.borderColor = '#f46a6a';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'Friend';
calendar.color = '#ffffff';
calendar.bgColor = '#34c38f';
calendar.dragBgColor = '#34c38f';
calendar.borderColor = '#34c38f';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'Travel';
calendar.color = '#ffffff';
calendar.bgColor = '#bbdc00';
calendar.dragBgColor = '#bbdc00';
calendar.borderColor = '#bbdc00';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'etc';
calendar.color = '#ffffff';
calendar.bgColor = '#9d9d9d';
calendar.dragBgColor = '#9d9d9d';
calendar.borderColor = '#9d9d9d';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'Birthdays';
calendar.color = '#ffffff';
calendar.bgColor = '#f1b44c';
calendar.dragBgColor = '#f1b44c';
calendar.borderColor = '#f1b44c';
addCalendar(calendar);
calendar = new CalendarInfo();
id += 1;
calendar.id = String(id);
calendar.name = 'National Holidays';
calendar.color = '#ffffff';
calendar.bgColor = '#ff4040';
calendar.dragBgColor = '#ff4040';
calendar.borderColor = '#ff4040';
addCalendar(calendar);
})();
/***/ }),
/***/ 3:
/*!****************************************************!*\
!*** multi ./resources/js/pages/calendars.init.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! F:\India-game\admin\resources\js\pages\calendars.init.js */"./resources/js/pages/calendars.init.js");
/***/ })
/******/ }); |
const FiringTempsDbo = require('./dbo/FiringTempsDbo')
class FiringTempsFactory {
async all() {
const jsonFiringTemps = new Array()
const foundFiringTemp = await FiringTempsDbo.query()
foundFiringTemp.forEach(firingTemp => jsonFiringTemps.push(this.toJson(firingTemp)))
return jsonFiringTemps
}
async byId(id) {
const foundfiringTemp = await FiringTempsDbo.query().findById(id)
return this.toJson(foundfiringTemp)
}
toJson(firingTemp) {
if (firingTemp) {
return {
"firingTempId": firingTemp.id,
"temperature": firingTemp.temperature
}
}
return {}
}
}
module.exports = FiringTempsFactory
|
# Copyright 2016 The TensorFlow Authors. 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.
# ==============================================================================
"""Tests for Keras metrics functions."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import os
import numpy as np
from tensorflow.python.eager import context
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import test_util
from tensorflow.python.keras import keras_parameterized
from tensorflow.python.keras import layers
from tensorflow.python.keras import metrics
from tensorflow.python.keras import testing_utils
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import variables
from tensorflow.python.platform import test
from tensorflow.python.training.checkpointable import util as checkpointable_utils
@test_util.run_all_in_graph_and_eager_modes
class KerasMeanTest(test.TestCase):
# TODO(b/120949004): Re-enable garbage collection check
# @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
def test_mean(self):
m = metrics.Mean(name='my_mean')
# check config
self.assertEqual(m.name, 'my_mean')
self.assertTrue(m.stateful)
self.assertEqual(m.dtype, dtypes.float32)
self.assertEqual(len(m.variables), 2)
self.evaluate(variables.variables_initializer(m.variables))
# check initial state
self.assertEqual(self.evaluate(m.total), 0)
self.assertEqual(self.evaluate(m.count), 0)
# check __call__()
self.assertEqual(self.evaluate(m(100)), 100)
self.assertEqual(self.evaluate(m.total), 100)
self.assertEqual(self.evaluate(m.count), 1)
# check update_state() and result() + state accumulation + tensor input
update_op = m.update_state(ops.convert_n_to_tensor([1, 5]))
self.evaluate(update_op)
self.assertAlmostEqual(self.evaluate(m.result()), 106 / 3, 2)
self.assertEqual(self.evaluate(m.total), 106) # 100 + 1 + 5
self.assertEqual(self.evaluate(m.count), 3)
# check reset_states()
m.reset_states()
self.assertEqual(self.evaluate(m.total), 0)
self.assertEqual(self.evaluate(m.count), 0)
# Check save and restore config
m2 = metrics.Mean.from_config(m.get_config())
self.assertEqual(m2.name, 'my_mean')
self.assertTrue(m2.stateful)
self.assertEqual(m2.dtype, dtypes.float32)
self.assertEqual(len(m2.variables), 2)
def test_mean_with_sample_weight(self):
m = metrics.Mean(dtype=dtypes.float64)
self.assertEqual(m.dtype, dtypes.float64)
self.evaluate(variables.variables_initializer(m.variables))
# check scalar weight
result_t = m(100, sample_weight=0.5)
self.assertEqual(self.evaluate(result_t), 50 / 0.5)
self.assertEqual(self.evaluate(m.total), 50)
self.assertEqual(self.evaluate(m.count), 0.5)
# check weights not scalar and weights rank matches values rank
result_t = m([1, 5], sample_weight=[1, 0.2])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 52 / 1.7, 2)
self.assertAlmostEqual(self.evaluate(m.total), 52, 2) # 50 + 1 + 5 * 0.2
self.assertAlmostEqual(self.evaluate(m.count), 1.7, 2) # 0.5 + 1.2
# check weights broadcast
result_t = m([1, 2], sample_weight=0.5)
self.assertAlmostEqual(self.evaluate(result_t), 53.5 / 2.7, 2)
self.assertAlmostEqual(self.evaluate(m.total), 53.5, 2) # 52 + 0.5 + 1
self.assertAlmostEqual(self.evaluate(m.count), 2.7, 2) # 1.7 + 0.5 + 0.5
# check weights squeeze
result_t = m([1, 5], sample_weight=[[1], [0.2]])
self.assertAlmostEqual(self.evaluate(result_t), 55.5 / 3.9, 2)
self.assertAlmostEqual(self.evaluate(m.total), 55.5, 2) # 53.5 + 1 + 1
self.assertAlmostEqual(self.evaluate(m.count), 3.9, 2) # 2.7 + 1.2
# check weights expand
result_t = m([[1], [5]], sample_weight=[1, 0.2])
self.assertAlmostEqual(self.evaluate(result_t), 57.5 / 5.1, 2)
self.assertAlmostEqual(self.evaluate(m.total), 57.5, 2) # 55.5 + 1 + 1
self.assertAlmostEqual(self.evaluate(m.count), 5.1, 2) # 3.9 + 1.2
# check values reduced to the dimensions of weight
result_t = m([[[1., 2.], [3., 2.], [0.5, 4.]]], sample_weight=[0.5])
result = np.round(self.evaluate(result_t), decimals=2) # 58.5 / 5.6
self.assertEqual(result, 10.45)
self.assertEqual(np.round(self.evaluate(m.total), decimals=2), 58.54)
self.assertEqual(np.round(self.evaluate(m.count), decimals=2), 5.6)
def test_mean_graph_with_placeholder(self):
with context.graph_mode(), self.cached_session() as sess:
m = metrics.Mean()
v = array_ops.placeholder(dtypes.float32)
w = array_ops.placeholder(dtypes.float32)
self.evaluate(variables.variables_initializer(m.variables))
# check __call__()
result_t = m(v, sample_weight=w)
result = sess.run(result_t, feed_dict=({v: 100, w: 0.5}))
self.assertEqual(self.evaluate(m.total), 50)
self.assertEqual(self.evaluate(m.count), 0.5)
self.assertEqual(result, 50 / 0.5)
# check update_state() and result()
result = sess.run(result_t, feed_dict=({v: [1, 5], w: [1, 0.2]}))
self.assertAlmostEqual(self.evaluate(m.total), 52, 2) # 50 + 1 + 5 * 0.2
self.assertAlmostEqual(self.evaluate(m.count), 1.7, 2) # 0.5 + 1.2
self.assertAlmostEqual(result, 52 / 1.7, 2)
def test_save_restore(self):
checkpoint_directory = self.get_temp_dir()
checkpoint_prefix = os.path.join(checkpoint_directory, 'ckpt')
m = metrics.Mean()
checkpoint = checkpointable_utils.Checkpoint(mean=m)
self.evaluate(variables.variables_initializer(m.variables))
# update state
self.evaluate(m(100.))
self.evaluate(m(200.))
# save checkpoint and then add an update
save_path = checkpoint.save(checkpoint_prefix)
self.evaluate(m(1000.))
# restore to the same checkpoint mean object
checkpoint.restore(save_path).assert_consumed().run_restore_ops()
self.evaluate(m(300.))
self.assertEqual(200., self.evaluate(m.result()))
# restore to a different checkpoint mean object
restore_mean = metrics.Mean()
restore_checkpoint = checkpointable_utils.Checkpoint(mean=restore_mean)
status = restore_checkpoint.restore(save_path)
restore_update = restore_mean(300.)
status.assert_consumed().run_restore_ops()
self.evaluate(restore_update)
self.assertEqual(200., self.evaluate(restore_mean.result()))
self.assertEqual(3, self.evaluate(restore_mean.count))
@test_util.run_all_in_graph_and_eager_modes
class KerasAccuracyTest(test.TestCase):
def test_accuracy(self):
acc_obj = metrics.Accuracy(name='my acc')
# check config
self.assertEqual(acc_obj.name, 'my acc')
self.assertTrue(acc_obj.stateful)
self.assertEqual(len(acc_obj.variables), 2)
self.assertEqual(acc_obj.dtype, dtypes.float32)
self.evaluate(variables.variables_initializer(acc_obj.variables))
# verify that correct value is returned
update_op = acc_obj.update_state([[1], [2], [3], [4]], [[1], [2], [3], [4]])
self.evaluate(update_op)
result = self.evaluate(acc_obj.result())
self.assertEqual(result, 1) # 2/2
# Check save and restore config
a2 = metrics.Accuracy.from_config(acc_obj.get_config())
self.assertEqual(a2.name, 'my acc')
self.assertTrue(a2.stateful)
self.assertEqual(len(a2.variables), 2)
self.assertEqual(a2.dtype, dtypes.float32)
# check with sample_weight
result_t = acc_obj([[2], [1]], [[2], [0]], sample_weight=[[0.5], [0.2]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.96, 2) # 4.5/4.7
def test_binary_accuracy(self):
acc_obj = metrics.BinaryAccuracy(name='my acc')
# check config
self.assertEqual(acc_obj.name, 'my acc')
self.assertTrue(acc_obj.stateful)
self.assertEqual(len(acc_obj.variables), 2)
self.assertEqual(acc_obj.dtype, dtypes.float32)
self.evaluate(variables.variables_initializer(acc_obj.variables))
# verify that correct value is returned
update_op = acc_obj.update_state([[1], [0]], [[1], [0]])
self.evaluate(update_op)
result = self.evaluate(acc_obj.result())
self.assertEqual(result, 1) # 2/2
# check y_pred squeeze
update_op = acc_obj.update_state([[1], [1]], [[[1]], [[0]]])
self.evaluate(update_op)
result = self.evaluate(acc_obj.result())
self.assertAlmostEqual(result, 0.75, 2) # 3/4
# check y_true squeeze
result_t = acc_obj([[[1]], [[1]]], [[1], [0]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.67, 2) # 4/6
# check with sample_weight
result_t = acc_obj([[1], [1]], [[1], [0]], [[0.5], [0.2]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.67, 2) # 4.5/6.7
def test_binary_accuracy_threshold(self):
acc_obj = metrics.BinaryAccuracy(threshold=0.7)
self.evaluate(variables.variables_initializer(acc_obj.variables))
result_t = acc_obj([[1], [1], [0], [0]], [[0.9], [0.6], [0.4], [0.8]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.5, 2)
def test_categorical_accuracy(self):
acc_obj = metrics.CategoricalAccuracy(name='my acc')
# check config
self.assertEqual(acc_obj.name, 'my acc')
self.assertTrue(acc_obj.stateful)
self.assertEqual(len(acc_obj.variables), 2)
self.assertEqual(acc_obj.dtype, dtypes.float32)
self.evaluate(variables.variables_initializer(acc_obj.variables))
# verify that correct value is returned
update_op = acc_obj.update_state([[0, 0, 1], [0, 1, 0]],
[[0.1, 0.1, 0.8], [0.05, 0.95, 0]])
self.evaluate(update_op)
result = self.evaluate(acc_obj.result())
self.assertEqual(result, 1) # 2/2
# check with sample_weight
result_t = acc_obj([[0, 0, 1], [0, 1, 0]],
[[0.1, 0.1, 0.8], [0.05, 0, 0.95]], [[0.5], [0.2]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.93, 2) # 2.5/2.7
def test_sparse_categorical_accuracy(self):
acc_obj = metrics.SparseCategoricalAccuracy(name='my acc')
# check config
self.assertEqual(acc_obj.name, 'my acc')
self.assertTrue(acc_obj.stateful)
self.assertEqual(len(acc_obj.variables), 2)
self.assertEqual(acc_obj.dtype, dtypes.float32)
self.evaluate(variables.variables_initializer(acc_obj.variables))
# verify that correct value is returned
update_op = acc_obj.update_state([[2], [1]],
[[0.1, 0.1, 0.8], [0.05, 0.95, 0]])
self.evaluate(update_op)
result = self.evaluate(acc_obj.result())
self.assertEqual(result, 1) # 2/2
# check with sample_weight
result_t = acc_obj([[2], [1]], [[0.1, 0.1, 0.8], [0.05, 0, 0.95]],
[[0.5], [0.2]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.93, 2) # 2.5/2.7
def test_sparse_categorical_accuracy_mismatched_dims(self):
acc_obj = metrics.SparseCategoricalAccuracy(name='my acc')
# check config
self.assertEqual(acc_obj.name, 'my acc')
self.assertTrue(acc_obj.stateful)
self.assertEqual(len(acc_obj.variables), 2)
self.assertEqual(acc_obj.dtype, dtypes.float32)
self.evaluate(variables.variables_initializer(acc_obj.variables))
# verify that correct value is returned
update_op = acc_obj.update_state([2, 1], [[0.1, 0.1, 0.8], [0.05, 0.95, 0]])
self.evaluate(update_op)
result = self.evaluate(acc_obj.result())
self.assertEqual(result, 1) # 2/2
# check with sample_weight
result_t = acc_obj([2, 1], [[0.1, 0.1, 0.8], [0.05, 0, 0.95]],
[[0.5], [0.2]])
result = self.evaluate(result_t)
self.assertAlmostEqual(result, 0.93, 2) # 2.5/2.7
def test_sparse_categorical_accuracy_mismatched_dims_dynamic(self):
with context.graph_mode(), self.cached_session() as sess:
acc_obj = metrics.SparseCategoricalAccuracy(name='my acc')
self.evaluate(variables.variables_initializer(acc_obj.variables))
t = array_ops.placeholder(dtypes.float32)
p = array_ops.placeholder(dtypes.float32)
w = array_ops.placeholder(dtypes.float32)
result_t = acc_obj(t, p, w)
result = sess.run(
result_t,
feed_dict=({
t: [2, 1],
p: [[0.1, 0.1, 0.8], [0.05, 0, 0.95]],
w: [[0.5], [0.2]]
}))
self.assertAlmostEqual(result, 0.71, 2) # 2.5/2.7
@test_util.run_all_in_graph_and_eager_modes
class CosineProximityTest(test.TestCase):
def l2_norm(self, x, axis):
epsilon = 1e-12
square_sum = np.sum(np.square(x), axis=axis, keepdims=True)
x_inv_norm = 1 / np.sqrt(np.maximum(square_sum, epsilon))
return np.multiply(x, x_inv_norm)
def setup(self, axis=1):
self.np_y_true = np.asarray([[1, 9, 2], [-5, -2, 6]], dtype=np.float32)
self.np_y_pred = np.asarray([[4, 8, 12], [8, 1, 3]], dtype=np.float32)
y_true = self.l2_norm(self.np_y_true, axis)
y_pred = self.l2_norm(self.np_y_pred, axis)
self.expected_loss = -np.sum(np.multiply(y_true, y_pred), axis=(axis,))
self.y_true = constant_op.constant(self.np_y_true)
self.y_pred = constant_op.constant(self.np_y_pred)
def test_config(self):
cosine_obj = metrics.CosineProximity(
axis=2, name='my_cos', dtype=dtypes.int32)
self.assertEqual(cosine_obj.name, 'my_cos')
self.assertEqual(cosine_obj._dtype, dtypes.int32)
# Check save and restore config
cosine_obj2 = metrics.CosineProximity.from_config(cosine_obj.get_config())
self.assertEqual(cosine_obj2.name, 'my_cos')
self.assertEqual(cosine_obj2._dtype, dtypes.int32)
def test_unweighted(self):
self.setup()
cosine_obj = metrics.CosineProximity()
self.evaluate(variables.variables_initializer(cosine_obj.variables))
loss = cosine_obj(self.y_true, self.y_pred)
expected_loss = np.mean(self.expected_loss)
self.assertAlmostEqual(self.evaluate(loss), expected_loss, 3)
def test_weighted(self):
self.setup()
cosine_obj = metrics.CosineProximity()
self.evaluate(variables.variables_initializer(cosine_obj.variables))
sample_weight = np.asarray([1.2, 3.4])
loss = cosine_obj(
self.y_true,
self.y_pred,
sample_weight=constant_op.constant(sample_weight))
expected_loss = np.sum(
self.expected_loss * sample_weight) / np.sum(sample_weight)
self.assertAlmostEqual(self.evaluate(loss), expected_loss, 3)
def test_axis(self):
self.setup(axis=1)
cosine_obj = metrics.CosineProximity(axis=1)
self.evaluate(variables.variables_initializer(cosine_obj.variables))
loss = cosine_obj(self.y_true, self.y_pred)
expected_loss = np.mean(self.expected_loss)
self.assertAlmostEqual(self.evaluate(loss), expected_loss, 3)
@test_util.run_all_in_graph_and_eager_modes
class MeanAbsoluteErrorTest(test.TestCase):
def test_config(self):
mae_obj = metrics.MeanAbsoluteError(name='my_mae', dtype=dtypes.int32)
self.assertEqual(mae_obj.name, 'my_mae')
self.assertEqual(mae_obj._dtype, dtypes.int32)
# Check save and restore config
mae_obj2 = metrics.MeanAbsoluteError.from_config(mae_obj.get_config())
self.assertEqual(mae_obj2.name, 'my_mae')
self.assertEqual(mae_obj2._dtype, dtypes.int32)
def test_unweighted(self):
mae_obj = metrics.MeanAbsoluteError()
self.evaluate(variables.variables_initializer(mae_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = mae_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = mae_obj.result()
self.assertAllClose(0.5, result, atol=1e-5)
def test_weighted(self):
mae_obj = metrics.MeanAbsoluteError()
self.evaluate(variables.variables_initializer(mae_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = mae_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(0.54285, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class MeanAbsolutePercentageErrorTest(test.TestCase):
def test_config(self):
mape_obj = metrics.MeanAbsolutePercentageError(
name='my_mape', dtype=dtypes.int32)
self.assertEqual(mape_obj.name, 'my_mape')
self.assertEqual(mape_obj._dtype, dtypes.int32)
# Check save and restore config
mape_obj2 = metrics.MeanAbsolutePercentageError.from_config(
mape_obj.get_config())
self.assertEqual(mape_obj2.name, 'my_mape')
self.assertEqual(mape_obj2._dtype, dtypes.int32)
def test_unweighted(self):
mape_obj = metrics.MeanAbsolutePercentageError()
self.evaluate(variables.variables_initializer(mape_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = mape_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = mape_obj.result()
self.assertAllClose(35e7, result, atol=1e-5)
def test_weighted(self):
mape_obj = metrics.MeanAbsolutePercentageError()
self.evaluate(variables.variables_initializer(mape_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = mape_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(40e7, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class MeanSquaredErrorTest(test.TestCase):
def test_config(self):
mse_obj = metrics.MeanSquaredError(name='my_mse', dtype=dtypes.int32)
self.assertEqual(mse_obj.name, 'my_mse')
self.assertEqual(mse_obj._dtype, dtypes.int32)
# Check save and restore config
mse_obj2 = metrics.MeanSquaredError.from_config(mse_obj.get_config())
self.assertEqual(mse_obj2.name, 'my_mse')
self.assertEqual(mse_obj2._dtype, dtypes.int32)
def test_unweighted(self):
mse_obj = metrics.MeanSquaredError()
self.evaluate(variables.variables_initializer(mse_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = mse_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = mse_obj.result()
self.assertAllClose(0.5, result, atol=1e-5)
def test_weighted(self):
mse_obj = metrics.MeanSquaredError()
self.evaluate(variables.variables_initializer(mse_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = mse_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(0.54285, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class MeanSquaredLogarithmicErrorTest(test.TestCase):
def test_config(self):
msle_obj = metrics.MeanSquaredLogarithmicError(
name='my_msle', dtype=dtypes.int32)
self.assertEqual(msle_obj.name, 'my_msle')
self.assertEqual(msle_obj._dtype, dtypes.int32)
# Check save and restore config
msle_obj2 = metrics.MeanSquaredLogarithmicError.from_config(
msle_obj.get_config())
self.assertEqual(msle_obj2.name, 'my_msle')
self.assertEqual(msle_obj2._dtype, dtypes.int32)
def test_unweighted(self):
msle_obj = metrics.MeanSquaredLogarithmicError()
self.evaluate(variables.variables_initializer(msle_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = msle_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = msle_obj.result()
self.assertAllClose(0.24022, result, atol=1e-5)
def test_weighted(self):
msle_obj = metrics.MeanSquaredLogarithmicError()
self.evaluate(variables.variables_initializer(msle_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = msle_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(0.26082, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class HingeTest(test.TestCase):
def test_config(self):
hinge_obj = metrics.Hinge(name='hinge', dtype=dtypes.int32)
self.assertEqual(hinge_obj.name, 'hinge')
self.assertEqual(hinge_obj._dtype, dtypes.int32)
# Check save and restore config
hinge_obj2 = metrics.Hinge.from_config(hinge_obj.get_config())
self.assertEqual(hinge_obj2.name, 'hinge')
self.assertEqual(hinge_obj2._dtype, dtypes.int32)
def test_unweighted(self):
hinge_obj = metrics.Hinge()
self.evaluate(variables.variables_initializer(hinge_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = hinge_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = hinge_obj.result()
self.assertAllClose(0.65, result, atol=1e-5)
def test_weighted(self):
hinge_obj = metrics.Hinge()
self.evaluate(variables.variables_initializer(hinge_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = hinge_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(0.65714, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class SquaredHingeTest(test.TestCase):
def test_config(self):
sq_hinge_obj = metrics.SquaredHinge(name='sq_hinge', dtype=dtypes.int32)
self.assertEqual(sq_hinge_obj.name, 'sq_hinge')
self.assertEqual(sq_hinge_obj._dtype, dtypes.int32)
# Check save and restore config
sq_hinge_obj2 = metrics.SquaredHinge.from_config(sq_hinge_obj.get_config())
self.assertEqual(sq_hinge_obj2.name, 'sq_hinge')
self.assertEqual(sq_hinge_obj2._dtype, dtypes.int32)
def test_unweighted(self):
sq_hinge_obj = metrics.SquaredHinge()
self.evaluate(variables.variables_initializer(sq_hinge_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = sq_hinge_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = sq_hinge_obj.result()
self.assertAllClose(0.65, result, atol=1e-5)
def test_weighted(self):
sq_hinge_obj = metrics.SquaredHinge()
self.evaluate(variables.variables_initializer(sq_hinge_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = sq_hinge_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(0.65714, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class CategoricalHingeTest(test.TestCase):
def test_config(self):
cat_hinge_obj = metrics.CategoricalHinge(
name='cat_hinge', dtype=dtypes.int32)
self.assertEqual(cat_hinge_obj.name, 'cat_hinge')
self.assertEqual(cat_hinge_obj._dtype, dtypes.int32)
# Check save and restore config
cat_hinge_obj2 = metrics.CategoricalHinge.from_config(
cat_hinge_obj.get_config())
self.assertEqual(cat_hinge_obj2.name, 'cat_hinge')
self.assertEqual(cat_hinge_obj2._dtype, dtypes.int32)
def test_unweighted(self):
cat_hinge_obj = metrics.CategoricalHinge()
self.evaluate(variables.variables_initializer(cat_hinge_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
update_op = cat_hinge_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = cat_hinge_obj.result()
self.assertAllClose(0.5, result, atol=1e-5)
def test_weighted(self):
cat_hinge_obj = metrics.CategoricalHinge()
self.evaluate(variables.variables_initializer(cat_hinge_obj.variables))
y_true = constant_op.constant(((0, 1, 0, 1, 0), (0, 0, 1, 1, 1),
(1, 1, 1, 1, 0), (0, 0, 0, 0, 1)))
y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
(0, 1, 0, 1, 0), (1, 1, 1, 1, 1)))
sample_weight = constant_op.constant((1., 1.5, 2., 2.5))
result = cat_hinge_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(0.5, self.evaluate(result), atol=1e-5)
@test_util.run_all_in_graph_and_eager_modes
class RootMeanSquaredErrorTest(test.TestCase):
def test_config(self):
rmse_obj = metrics.RootMeanSquaredError(name='rmse', dtype=dtypes.int32)
self.assertEqual(rmse_obj.name, 'rmse')
self.assertEqual(rmse_obj._dtype, dtypes.int32)
rmse_obj2 = metrics.RootMeanSquaredError.from_config(rmse_obj.get_config())
self.assertEqual(rmse_obj2.name, 'rmse')
self.assertEqual(rmse_obj2._dtype, dtypes.int32)
def test_unweighted(self):
rmse_obj = metrics.RootMeanSquaredError()
self.evaluate(variables.variables_initializer(rmse_obj.variables))
y_true = constant_op.constant((2, 4, 6))
y_pred = constant_op.constant((1, 3, 2))
update_op = rmse_obj.update_state(y_true, y_pred)
self.evaluate(update_op)
result = rmse_obj.result()
# error = [-1, -1, -4], square(error) = [1, 1, 16], mean = 18/3 = 6
self.assertAllClose(math.sqrt(6), result, atol=1e-3)
def test_weighted(self):
rmse_obj = metrics.RootMeanSquaredError()
self.evaluate(variables.variables_initializer(rmse_obj.variables))
y_true = constant_op.constant((2, 4, 6, 8))
y_pred = constant_op.constant((1, 3, 2, 3))
sample_weight = constant_op.constant((0, 1, 0, 1))
result = rmse_obj(y_true, y_pred, sample_weight=sample_weight)
self.assertAllClose(math.sqrt(13), self.evaluate(result), atol=1e-3)
@test_util.run_all_in_graph_and_eager_modes
class TopKCategoricalAccuracyTest(test.TestCase):
def test_config(self):
a_obj = metrics.TopKCategoricalAccuracy(name='topkca', dtype=dtypes.int32)
self.assertEqual(a_obj.name, 'topkca')
self.assertEqual(a_obj._dtype, dtypes.int32)
a_obj2 = metrics.TopKCategoricalAccuracy.from_config(a_obj.get_config())
self.assertEqual(a_obj2.name, 'topkca')
self.assertEqual(a_obj2._dtype, dtypes.int32)
def test_correctness(self):
a_obj = metrics.TopKCategoricalAccuracy()
self.evaluate(variables.variables_initializer(a_obj.variables))
y_true = constant_op.constant([[0, 0, 1], [0, 1, 0]])
y_pred = constant_op.constant([[0.1, 0.9, 0.8], [0.05, 0.95, 0]])
result = a_obj(y_true, y_pred)
self.assertEqual(1, self.evaluate(result)) # both the samples match
# With `k` < 5.
a_obj = metrics.TopKCategoricalAccuracy(k=1)
self.evaluate(variables.variables_initializer(a_obj.variables))
result = a_obj(y_true, y_pred)
self.assertEqual(0.5, self.evaluate(result)) # only sample #2 matches
# With `k` > 5.
y_true = constant_op.constant([[0, 0, 1, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0]])
y_pred = constant_op.constant([[0.5, 0.9, 0.1, 0.7, 0.6, 0.5, 0.4],
[0.05, 0.95, 0, 0, 0, 0, 0]])
a_obj = metrics.TopKCategoricalAccuracy(k=6)
self.evaluate(variables.variables_initializer(a_obj.variables))
result = a_obj(y_true, y_pred)
self.assertEqual(0.5, self.evaluate(result)) # only 1 sample matches.
@test_util.run_all_in_graph_and_eager_modes
class SparseTopKCategoricalAccuracyTest(test.TestCase):
def test_config(self):
a_obj = metrics.SparseTopKCategoricalAccuracy(
name='stopkca', dtype=dtypes.int32)
self.assertEqual(a_obj.name, 'stopkca')
self.assertEqual(a_obj._dtype, dtypes.int32)
a_obj2 = metrics.SparseTopKCategoricalAccuracy.from_config(
a_obj.get_config())
self.assertEqual(a_obj2.name, 'stopkca')
self.assertEqual(a_obj2._dtype, dtypes.int32)
def test_correctness(self):
a_obj = metrics.SparseTopKCategoricalAccuracy()
self.evaluate(variables.variables_initializer(a_obj.variables))
y_true = constant_op.constant([2, 1])
y_pred = constant_op.constant([[0.1, 0.9, 0.8], [0.05, 0.95, 0]])
result = a_obj(y_true, y_pred)
self.assertEqual(1, self.evaluate(result)) # both the samples match
# With `k` < 5.
a_obj = metrics.SparseTopKCategoricalAccuracy(k=1)
self.evaluate(variables.variables_initializer(a_obj.variables))
result = a_obj(y_true, y_pred)
self.assertEqual(0.5, self.evaluate(result)) # only sample #2 matches
# With `k` > 5.
y_pred = constant_op.constant([[0.5, 0.9, 0.1, 0.7, 0.6, 0.5, 0.4],
[0.05, 0.95, 0, 0, 0, 0, 0]])
a_obj = metrics.SparseTopKCategoricalAccuracy(k=6)
self.evaluate(variables.variables_initializer(a_obj.variables))
result = a_obj(y_true, y_pred)
self.assertEqual(0.5, self.evaluate(result)) # only 1 sample matches.
@test_util.run_all_in_graph_and_eager_modes
class LogcoshTest(test.TestCase):
def setup(self):
y_pred = np.asarray([1, 9, 2, -5, -2, 6]).reshape((2, 3))
y_true = np.asarray([4, 8, 12, 8, 1, 3]).reshape((2, 3))
self.batch_size = 6
error = y_pred - y_true
self.expected_results = np.log((np.exp(error) + np.exp(-error)) / 2)
self.y_pred = constant_op.constant(y_pred, dtype=dtypes.float32)
self.y_true = constant_op.constant(y_true)
def test_config(self):
logcosh_obj = metrics.Logcosh(name='logcosh', dtype=dtypes.int32)
self.assertEqual(logcosh_obj.name, 'logcosh')
self.assertEqual(logcosh_obj._dtype, dtypes.int32)
def test_unweighted(self):
self.setup()
logcosh_obj = metrics.Logcosh()
self.evaluate(variables.variables_initializer(logcosh_obj.variables))
update_op = logcosh_obj.update_state(self.y_true, self.y_pred)
self.evaluate(update_op)
result = logcosh_obj.result()
expected_result = np.sum(self.expected_results) / self.batch_size
self.assertAllClose(result, expected_result, atol=1e-3)
def test_weighted(self):
self.setup()
logcosh_obj = metrics.Logcosh()
self.evaluate(variables.variables_initializer(logcosh_obj.variables))
sample_weight = constant_op.constant([1.2, 3.4], shape=(2, 1))
result = logcosh_obj(self.y_true, self.y_pred, sample_weight=sample_weight)
sample_weight = np.asarray([1.2, 1.2, 1.2, 3.4, 3.4, 3.4]).reshape((2, 3))
expected_result = np.multiply(self.expected_results, sample_weight)
expected_result = np.sum(expected_result) / np.sum(sample_weight)
self.assertAllClose(self.evaluate(result), expected_result, atol=1e-3)
@test_util.run_all_in_graph_and_eager_modes
class PoissonTest(test.TestCase):
def setup(self):
y_pred = np.asarray([1, 9, 2, 5, 2, 6]).reshape((2, 3))
y_true = np.asarray([4, 8, 12, 8, 1, 3]).reshape((2, 3))
self.batch_size = 6
self.expected_results = y_pred - np.multiply(y_true, np.log(y_pred))
self.y_pred = constant_op.constant(y_pred, dtype=dtypes.float32)
self.y_true = constant_op.constant(y_true)
def test_config(self):
poisson_obj = metrics.Poisson(name='poisson', dtype=dtypes.int32)
self.assertEqual(poisson_obj.name, 'poisson')
self.assertEqual(poisson_obj._dtype, dtypes.int32)
poisson_obj2 = metrics.Poisson.from_config(poisson_obj.get_config())
self.assertEqual(poisson_obj2.name, 'poisson')
self.assertEqual(poisson_obj2._dtype, dtypes.int32)
def test_unweighted(self):
self.setup()
poisson_obj = metrics.Poisson()
self.evaluate(variables.variables_initializer(poisson_obj.variables))
update_op = poisson_obj.update_state(self.y_true, self.y_pred)
self.evaluate(update_op)
result = poisson_obj.result()
expected_result = np.sum(self.expected_results) / self.batch_size
self.assertAllClose(result, expected_result, atol=1e-3)
def test_weighted(self):
self.setup()
poisson_obj = metrics.Poisson()
self.evaluate(variables.variables_initializer(poisson_obj.variables))
sample_weight = constant_op.constant([1.2, 3.4], shape=(2, 1))
result = poisson_obj(self.y_true, self.y_pred, sample_weight=sample_weight)
sample_weight = np.asarray([1.2, 1.2, 1.2, 3.4, 3.4, 3.4]).reshape((2, 3))
expected_result = np.multiply(self.expected_results, sample_weight)
expected_result = np.sum(expected_result) / np.sum(sample_weight)
self.assertAllClose(self.evaluate(result), expected_result, atol=1e-3)
@test_util.run_all_in_graph_and_eager_modes
class KullbackLeiblerDivergenceTest(test.TestCase):
def setup(self):
y_pred = np.asarray([.4, .9, .12, .36, .3, .4]).reshape((2, 3))
y_true = np.asarray([.5, .8, .12, .7, .43, .8]).reshape((2, 3))
self.batch_size = 2
self.expected_results = np.multiply(y_true, np.log(y_true / y_pred))
self.y_pred = constant_op.constant(y_pred, dtype=dtypes.float32)
self.y_true = constant_op.constant(y_true)
def test_config(self):
k_obj = metrics.KullbackLeiblerDivergence(name='kld', dtype=dtypes.int32)
self.assertEqual(k_obj.name, 'kld')
self.assertEqual(k_obj._dtype, dtypes.int32)
k_obj2 = metrics.KullbackLeiblerDivergence.from_config(k_obj.get_config())
self.assertEqual(k_obj2.name, 'kld')
self.assertEqual(k_obj2._dtype, dtypes.int32)
def test_unweighted(self):
self.setup()
k_obj = metrics.KullbackLeiblerDivergence()
self.evaluate(variables.variables_initializer(k_obj.variables))
update_op = k_obj.update_state(self.y_true, self.y_pred)
self.evaluate(update_op)
result = k_obj.result()
expected_result = np.sum(self.expected_results) / self.batch_size
self.assertAllClose(result, expected_result, atol=1e-3)
def test_weighted(self):
self.setup()
k_obj = metrics.KullbackLeiblerDivergence()
self.evaluate(variables.variables_initializer(k_obj.variables))
sample_weight = constant_op.constant([1.2, 3.4], shape=(2, 1))
result = k_obj(self.y_true, self.y_pred, sample_weight=sample_weight)
sample_weight = np.asarray([1.2, 1.2, 1.2, 3.4, 3.4, 3.4]).reshape((2, 3))
expected_result = np.multiply(self.expected_results, sample_weight)
expected_result = np.sum(expected_result) / (1.2 + 3.4)
self.assertAllClose(self.evaluate(result), expected_result, atol=1e-3)
@test_util.run_all_in_graph_and_eager_modes
class MeanRelativeErrorTest(test.TestCase):
def test_config(self):
normalizer = constant_op.constant([1, 3], dtype=dtypes.float32)
mre_obj = metrics.MeanRelativeError(normalizer=normalizer, name='mre')
self.assertEqual(mre_obj.name, 'mre')
self.assertArrayNear(self.evaluate(mre_obj.normalizer), [1, 3], 1e-1)
mre_obj2 = metrics.MeanRelativeError.from_config(mre_obj.get_config())
self.assertEqual(mre_obj2.name, 'mre')
self.assertArrayNear(self.evaluate(mre_obj2.normalizer), [1, 3], 1e-1)
def test_unweighted(self):
np_y_pred = np.asarray([2, 4, 6, 8], dtype=np.float32)
np_y_true = np.asarray([1, 3, 2, 3], dtype=np.float32)
expected_error = np.mean(
np.divide(np.absolute(np_y_pred - np_y_true), np_y_true))
y_pred = constant_op.constant(np_y_pred, shape=(1, 4), dtype=dtypes.float32)
y_true = constant_op.constant(np_y_true, shape=(1, 4))
mre_obj = metrics.MeanRelativeError(normalizer=y_true)
self.evaluate(variables.variables_initializer(mre_obj.variables))
result = mre_obj(y_true, y_pred)
self.assertAllClose(self.evaluate(result), expected_error, atol=1e-3)
def test_weighted(self):
np_y_pred = np.asarray([2, 4, 6, 8], dtype=np.float32)
np_y_true = np.asarray([1, 3, 2, 3], dtype=np.float32)
sample_weight = np.asarray([0.2, 0.3, 0.5, 0], dtype=np.float32)
rel_errors = np.divide(np.absolute(np_y_pred - np_y_true), np_y_true)
expected_error = np.sum(rel_errors * sample_weight)
y_pred = constant_op.constant(np_y_pred, dtype=dtypes.float32)
y_true = constant_op.constant(np_y_true)
mre_obj = metrics.MeanRelativeError(normalizer=y_true)
self.evaluate(variables.variables_initializer(mre_obj.variables))
result = mre_obj(
y_true, y_pred, sample_weight=constant_op.constant(sample_weight))
self.assertAllClose(self.evaluate(result), expected_error, atol=1e-3)
def test_zero_normalizer(self):
y_pred = constant_op.constant([2, 4], dtype=dtypes.float32)
y_true = constant_op.constant([1, 3])
mre_obj = metrics.MeanRelativeError(normalizer=array_ops.zeros_like(y_true))
self.evaluate(variables.variables_initializer(mre_obj.variables))
result = mre_obj(y_true, y_pred)
self.assertEqual(self.evaluate(result), 0)
def _get_model(compile_metrics):
model_layers = [
layers.Dense(3, activation='relu', kernel_initializer='ones'),
layers.Dense(1, activation='sigmoid', kernel_initializer='ones')]
model = testing_utils.get_model_from_layers(model_layers, input_shape=(4,))
model.compile(
loss='mae',
metrics=compile_metrics,
optimizer='rmsprop',
run_eagerly=testing_utils.should_run_eagerly())
return model
@keras_parameterized.run_with_all_model_types
@keras_parameterized.run_all_keras_modes
class ResetStatesTest(keras_parameterized.TestCase):
def test_reset_states_false_positives(self):
fp_obj = metrics.FalsePositives()
model = _get_model([fp_obj])
x = np.ones((100, 4))
y = np.zeros((100, 1))
model.evaluate(x, y)
self.assertEqual(self.evaluate(fp_obj.accumulator), 100.)
model.evaluate(x, y)
self.assertEqual(self.evaluate(fp_obj.accumulator), 100.)
def test_reset_states_false_negatives(self):
fn_obj = metrics.FalseNegatives()
model = _get_model([fn_obj])
x = np.zeros((100, 4))
y = np.ones((100, 1))
model.evaluate(x, y)
self.assertEqual(self.evaluate(fn_obj.accumulator), 100.)
model.evaluate(x, y)
self.assertEqual(self.evaluate(fn_obj.accumulator), 100.)
def test_reset_states_true_negatives(self):
tn_obj = metrics.TrueNegatives()
model = _get_model([tn_obj])
x = np.zeros((100, 4))
y = np.zeros((100, 1))
model.evaluate(x, y)
self.assertEqual(self.evaluate(tn_obj.accumulator), 100.)
model.evaluate(x, y)
self.assertEqual(self.evaluate(tn_obj.accumulator), 100.)
def test_reset_states_true_positives(self):
tp_obj = metrics.TruePositives()
model = _get_model([tp_obj])
x = np.ones((100, 4))
y = np.ones((100, 1))
model.evaluate(x, y)
self.assertEqual(self.evaluate(tp_obj.accumulator), 100.)
model.evaluate(x, y)
self.assertEqual(self.evaluate(tp_obj.accumulator), 100.)
def test_reset_states_precision(self):
p_obj = metrics.Precision()
model = _get_model([p_obj])
x = np.concatenate((np.ones((50, 4)), np.ones((50, 4))))
y = np.concatenate((np.ones((50, 1)), np.zeros((50, 1))))
model.evaluate(x, y)
self.assertEqual(self.evaluate(p_obj.true_positives), 50.)
self.assertEqual(self.evaluate(p_obj.false_positives), 50.)
model.evaluate(x, y)
self.assertEqual(self.evaluate(p_obj.true_positives), 50.)
self.assertEqual(self.evaluate(p_obj.false_positives), 50.)
def test_reset_states_recall(self):
r_obj = metrics.Recall()
model = _get_model([r_obj])
x = np.concatenate((np.ones((50, 4)), np.zeros((50, 4))))
y = np.concatenate((np.ones((50, 1)), np.ones((50, 1))))
model.evaluate(x, y)
self.assertEqual(self.evaluate(r_obj.true_positives), 50.)
self.assertEqual(self.evaluate(r_obj.false_negatives), 50.)
model.evaluate(x, y)
self.assertEqual(self.evaluate(r_obj.true_positives), 50.)
self.assertEqual(self.evaluate(r_obj.false_negatives), 50.)
def test_reset_states_sensitivity_at_specificity(self):
s_obj = metrics.SensitivityAtSpecificity(0.5, num_thresholds=1)
model = _get_model([s_obj])
x = np.concatenate((np.ones((25, 4)), np.zeros((25, 4)), np.zeros((25, 4)),
np.ones((25, 4))))
y = np.concatenate((np.ones((25, 1)), np.zeros((25, 1)), np.ones((25, 1)),
np.zeros((25, 1))))
for _ in range(2):
model.evaluate(x, y)
self.assertEqual(self.evaluate(s_obj.true_positives), 25.)
self.assertEqual(self.evaluate(s_obj.false_positives), 25.)
self.assertEqual(self.evaluate(s_obj.false_negatives), 25.)
self.assertEqual(self.evaluate(s_obj.true_negatives), 25.)
def test_reset_states_specificity_at_sensitivity(self):
s_obj = metrics.SpecificityAtSensitivity(0.5, num_thresholds=1)
model = _get_model([s_obj])
x = np.concatenate((np.ones((25, 4)), np.zeros((25, 4)), np.zeros((25, 4)),
np.ones((25, 4))))
y = np.concatenate((np.ones((25, 1)), np.zeros((25, 1)), np.ones((25, 1)),
np.zeros((25, 1))))
for _ in range(2):
model.evaluate(x, y)
self.assertEqual(self.evaluate(s_obj.true_positives), 25.)
self.assertEqual(self.evaluate(s_obj.false_positives), 25.)
self.assertEqual(self.evaluate(s_obj.false_negatives), 25.)
self.assertEqual(self.evaluate(s_obj.true_negatives), 25.)
def test_reset_states_auc(self):
auc_obj = metrics.AUC(num_thresholds=3)
model = _get_model([auc_obj])
x = np.concatenate((np.ones((25, 4)), np.zeros((25, 4)), np.zeros((25, 4)),
np.ones((25, 4))))
y = np.concatenate((np.ones((25, 1)), np.zeros((25, 1)), np.ones((25, 1)),
np.zeros((25, 1))))
for _ in range(2):
model.evaluate(x, y)
self.assertEqual(self.evaluate(auc_obj.true_positives[1]), 25.)
self.assertEqual(self.evaluate(auc_obj.false_positives[1]), 25.)
self.assertEqual(self.evaluate(auc_obj.false_negatives[1]), 25.)
self.assertEqual(self.evaluate(auc_obj.true_negatives[1]), 25.)
if __name__ == '__main__':
test.main()
|
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
! function (e, t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = e || self).Vue = t()
}(this, function () {
"use strict";
var e = Object.freeze({});
function t(e) {
return null == e
}
function n(e) {
return null != e
}
function r(e) {
return !0 === e
}
function i(e) {
return "string" == typeof e || "number" == typeof e || "symbol" == typeof e || "boolean" == typeof e
}
function o(e) {
return null !== e && "object" == typeof e
}
var a = Object.prototype.toString;
function s(e) {
return "[object Object]" === a.call(e)
}
function c(e) {
var t = parseFloat(String(e));
return t >= 0 && Math.floor(t) === t && isFinite(e)
}
function u(e) {
return n(e) && "function" == typeof e.then && "function" == typeof e.catch
}
function l(e) {
return null == e ? "" : Array.isArray(e) || s(e) && e.toString === a ? JSON.stringify(e, null, 2) : String(e)
}
function f(e) {
var t = parseFloat(e);
return isNaN(t) ? e : t
}
function p(e, t) {
for (var n = Object.create(null), r = e.split(","), i = 0; i < r.length; i++) n[r[i]] = !0;
return t ? function (e) {
return n[e.toLowerCase()]
} : function (e) {
return n[e]
}
}
var d = p("slot,component", !0),
v = p("key,ref,slot,slot-scope,is");
function h(e, t) {
if (e.length) {
var n = e.indexOf(t);
if (n > -1) return e.splice(n, 1)
}
}
var m = Object.prototype.hasOwnProperty;
function y(e, t) {
return m.call(e, t)
}
function g(e) {
var t = Object.create(null);
return function (n) {
return t[n] || (t[n] = e(n))
}
}
var _ = /-(\w)/g,
b = g(function (e) {
return e.replace(_, function (e, t) {
return t ? t.toUpperCase() : ""
})
}),
$ = g(function (e) {
return e.charAt(0).toUpperCase() + e.slice(1)
}),
w = /\B([A-Z])/g,
C = g(function (e) {
return e.replace(w, "-$1").toLowerCase()
});
var x = Function.prototype.bind ? function (e, t) {
return e.bind(t)
} : function (e, t) {
function n(n) {
var r = arguments.length;
return r ? r > 1 ? e.apply(t, arguments) : e.call(t, n) : e.call(t)
}
return n._length = e.length, n
};
function k(e, t) {
t = t || 0;
for (var n = e.length - t, r = new Array(n); n--;) r[n] = e[n + t];
return r
}
function A(e, t) {
for (var n in t) e[n] = t[n];
return e
}
function O(e) {
for (var t = {}, n = 0; n < e.length; n++) e[n] && A(t, e[n]);
return t
}
function S(e, t, n) {}
var T = function (e, t, n) {
return !1
},
E = function (e) {
return e
};
function N(e, t) {
if (e === t) return !0;
var n = o(e),
r = o(t);
if (!n || !r) return !n && !r && String(e) === String(t);
try {
var i = Array.isArray(e),
a = Array.isArray(t);
if (i && a) return e.length === t.length && e.every(function (e, n) {
return N(e, t[n])
});
if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
if (i || a) return !1;
var s = Object.keys(e),
c = Object.keys(t);
return s.length === c.length && s.every(function (n) {
return N(e[n], t[n])
})
} catch (e) {
return !1
}
}
function j(e, t) {
for (var n = 0; n < e.length; n++)
if (N(e[n], t)) return n;
return -1
}
function D(e) {
var t = !1;
return function () {
t || (t = !0, e.apply(this, arguments))
}
}
var L = "data-server-rendered",
M = ["component", "directive", "filter"],
I = ["beforeCreate", "created", "beforeMount", "mounted", "beforeUpdate", "updated", "beforeDestroy", "destroyed", "activated", "deactivated", "errorCaptured", "serverPrefetch"],
F = {
optionMergeStrategies: Object.create(null),
silent: !1,
productionTip: !1,
devtools: !1,
performance: !1,
errorHandler: null,
warnHandler: null,
ignoredElements: [],
keyCodes: Object.create(null),
isReservedTag: T,
isReservedAttr: T,
isUnknownElement: T,
getTagNamespace: S,
parsePlatformTagName: E,
mustUseProp: T,
async: !0,
_lifecycleHooks: I
},
P = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
function R(e, t, n, r) {
Object.defineProperty(e, t, {
value: n,
enumerable: !!r,
writable: !0,
configurable: !0
})
}
var H = new RegExp("[^" + P.source + ".$_\\d]");
var B, U = "__proto__" in {},
z = "undefined" != typeof window,
V = "undefined" != typeof WXEnvironment && !!WXEnvironment.platform,
K = V && WXEnvironment.platform.toLowerCase(),
J = z && window.navigator.userAgent.toLowerCase(),
q = J && /msie|trident/.test(J),
W = J && J.indexOf("msie 9.0") > 0,
Z = J && J.indexOf("edge/") > 0,
G = (J && J.indexOf("android"), J && /iphone|ipad|ipod|ios/.test(J) || "ios" === K),
X = (J && /chrome\/\d+/.test(J), J && /phantomjs/.test(J), J && J.match(/firefox\/(\d+)/)),
Y = {}.watch,
Q = !1;
if (z) try {
var ee = {};
Object.defineProperty(ee, "passive", {
get: function () {
Q = !0
}
}), window.addEventListener("test-passive", null, ee)
} catch (e) {}
var te = function () {
return void 0 === B && (B = !z && !V && "undefined" != typeof global && (global.process && "server" === global.process.env.VUE_ENV)), B
},
ne = z && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
function re(e) {
return "function" == typeof e && /native code/.test(e.toString())
}
var ie, oe = "undefined" != typeof Symbol && re(Symbol) && "undefined" != typeof Reflect && re(Reflect.ownKeys);
ie = "undefined" != typeof Set && re(Set) ? Set : function () {
function e() {
this.set = Object.create(null)
}
return e.prototype.has = function (e) {
return !0 === this.set[e]
}, e.prototype.add = function (e) {
this.set[e] = !0
}, e.prototype.clear = function () {
this.set = Object.create(null)
}, e
}();
var ae = S,
se = 0,
ce = function () {
this.id = se++, this.subs = []
};
ce.prototype.addSub = function (e) {
this.subs.push(e)
}, ce.prototype.removeSub = function (e) {
h(this.subs, e)
}, ce.prototype.depend = function () {
ce.target && ce.target.addDep(this)
}, ce.prototype.notify = function () {
for (var e = this.subs.slice(), t = 0, n = e.length; t < n; t++) e[t].update()
}, ce.target = null;
var ue = [];
function le(e) {
ue.push(e), ce.target = e
}
function fe() {
ue.pop(), ce.target = ue[ue.length - 1]
}
var pe = function (e, t, n, r, i, o, a, s) {
this.tag = e, this.data = t, this.children = n, this.text = r, this.elm = i, this.ns = void 0, this.context = o, this.fnContext = void 0, this.fnOptions = void 0, this.fnScopeId = void 0, this.key = t && t.key, this.componentOptions = a, this.componentInstance = void 0, this.parent = void 0, this.raw = !1, this.isStatic = !1, this.isRootInsert = !0, this.isComment = !1, this.isCloned = !1, this.isOnce = !1, this.asyncFactory = s, this.asyncMeta = void 0, this.isAsyncPlaceholder = !1
},
de = {
child: {
configurable: !0
}
};
de.child.get = function () {
return this.componentInstance
}, Object.defineProperties(pe.prototype, de);
var ve = function (e) {
void 0 === e && (e = "");
var t = new pe;
return t.text = e, t.isComment = !0, t
};
function he(e) {
return new pe(void 0, void 0, void 0, String(e))
}
function me(e) {
var t = new pe(e.tag, e.data, e.children && e.children.slice(), e.text, e.elm, e.context, e.componentOptions, e.asyncFactory);
return t.ns = e.ns, t.isStatic = e.isStatic, t.key = e.key, t.isComment = e.isComment, t.fnContext = e.fnContext, t.fnOptions = e.fnOptions, t.fnScopeId = e.fnScopeId, t.asyncMeta = e.asyncMeta, t.isCloned = !0, t
}
var ye = Array.prototype,
ge = Object.create(ye);
["push", "pop", "shift", "unshift", "splice", "sort", "reverse"].forEach(function (e) {
var t = ye[e];
R(ge, e, function () {
for (var n = [], r = arguments.length; r--;) n[r] = arguments[r];
var i, o = t.apply(this, n),
a = this.__ob__;
switch (e) {
case "push":
case "unshift":
i = n;
break;
case "splice":
i = n.slice(2)
}
return i && a.observeArray(i), a.dep.notify(), o
})
});
var _e = Object.getOwnPropertyNames(ge),
be = !0;
function $e(e) {
be = e
}
var we = function (e) {
var t;
this.value = e, this.dep = new ce, this.vmCount = 0, R(e, "__ob__", this), Array.isArray(e) ? (U ? (t = ge, e.__proto__ = t) : function (e, t, n) {
for (var r = 0, i = n.length; r < i; r++) {
var o = n[r];
R(e, o, t[o])
}
}(e, ge, _e), this.observeArray(e)) : this.walk(e)
};
function Ce(e, t) {
var n;
if (o(e) && !(e instanceof pe)) return y(e, "__ob__") && e.__ob__ instanceof we ? n = e.__ob__ : be && !te() && (Array.isArray(e) || s(e)) && Object.isExtensible(e) && !e._isVue && (n = new we(e)), t && n && n.vmCount++, n
}
function xe(e, t, n, r, i) {
var o = new ce,
a = Object.getOwnPropertyDescriptor(e, t);
if (!a || !1 !== a.configurable) {
var s = a && a.get,
c = a && a.set;
s && !c || 2 !== arguments.length || (n = e[t]);
var u = !i && Ce(n);
Object.defineProperty(e, t, {
enumerable: !0,
configurable: !0,
get: function () {
var t = s ? s.call(e) : n;
return ce.target && (o.depend(), u && (u.dep.depend(), Array.isArray(t) && function e(t) {
for (var n = void 0, r = 0, i = t.length; r < i; r++)(n = t[r]) && n.__ob__ && n.__ob__.dep.depend(), Array.isArray(n) && e(n)
}(t))), t
},
set: function (t) {
var r = s ? s.call(e) : n;
t === r || t != t && r != r || s && !c || (c ? c.call(e, t) : n = t, u = !i && Ce(t), o.notify())
}
})
}
}
function ke(e, t, n) {
if (Array.isArray(e) && c(t)) return e.length = Math.max(e.length, t), e.splice(t, 1, n), n;
if (t in e && !(t in Object.prototype)) return e[t] = n, n;
var r = e.__ob__;
return e._isVue || r && r.vmCount ? n : r ? (xe(r.value, t, n), r.dep.notify(), n) : (e[t] = n, n)
}
function Ae(e, t) {
if (Array.isArray(e) && c(t)) e.splice(t, 1);
else {
var n = e.__ob__;
e._isVue || n && n.vmCount || y(e, t) && (delete e[t], n && n.dep.notify())
}
}
we.prototype.walk = function (e) {
for (var t = Object.keys(e), n = 0; n < t.length; n++) xe(e, t[n])
}, we.prototype.observeArray = function (e) {
for (var t = 0, n = e.length; t < n; t++) Ce(e[t])
};
var Oe = F.optionMergeStrategies;
function Se(e, t) {
if (!t) return e;
for (var n, r, i, o = oe ? Reflect.ownKeys(t) : Object.keys(t), a = 0; a < o.length; a++) "__ob__" !== (n = o[a]) && (r = e[n], i = t[n], y(e, n) ? r !== i && s(r) && s(i) && Se(r, i) : ke(e, n, i));
return e
}
function Te(e, t, n) {
return n ? function () {
var r = "function" == typeof t ? t.call(n, n) : t,
i = "function" == typeof e ? e.call(n, n) : e;
return r ? Se(r, i) : i
} : t ? e ? function () {
return Se("function" == typeof t ? t.call(this, this) : t, "function" == typeof e ? e.call(this, this) : e)
} : t : e
}
function Ee(e, t) {
var n = t ? e ? e.concat(t) : Array.isArray(t) ? t : [t] : e;
return n ? function (e) {
for (var t = [], n = 0; n < e.length; n++) - 1 === t.indexOf(e[n]) && t.push(e[n]);
return t
}(n) : n
}
function Ne(e, t, n, r) {
var i = Object.create(e || null);
return t ? A(i, t) : i
}
Oe.data = function (e, t, n) {
return n ? Te(e, t, n) : t && "function" != typeof t ? e : Te(e, t)
}, I.forEach(function (e) {
Oe[e] = Ee
}), M.forEach(function (e) {
Oe[e + "s"] = Ne
}), Oe.watch = function (e, t, n, r) {
if (e === Y && (e = void 0), t === Y && (t = void 0), !t) return Object.create(e || null);
if (!e) return t;
var i = {};
for (var o in A(i, e), t) {
var a = i[o],
s = t[o];
a && !Array.isArray(a) && (a = [a]), i[o] = a ? a.concat(s) : Array.isArray(s) ? s : [s]
}
return i
}, Oe.props = Oe.methods = Oe.inject = Oe.computed = function (e, t, n, r) {
if (!e) return t;
var i = Object.create(null);
return A(i, e), t && A(i, t), i
}, Oe.provide = Te;
var je = function (e, t) {
return void 0 === t ? e : t
};
function De(e, t, n) {
if ("function" == typeof t && (t = t.options), function (e, t) {
var n = e.props;
if (n) {
var r, i, o = {};
if (Array.isArray(n))
for (r = n.length; r--;) "string" == typeof (i = n[r]) && (o[b(i)] = {
type: null
});
else if (s(n))
for (var a in n) i = n[a], o[b(a)] = s(i) ? i : {
type: i
};
e.props = o
}
}(t), function (e, t) {
var n = e.inject;
if (n) {
var r = e.inject = {};
if (Array.isArray(n))
for (var i = 0; i < n.length; i++) r[n[i]] = {
from: n[i]
};
else if (s(n))
for (var o in n) {
var a = n[o];
r[o] = s(a) ? A({
from: o
}, a) : {
from: a
}
}
}
}(t), function (e) {
var t = e.directives;
if (t)
for (var n in t) {
var r = t[n];
"function" == typeof r && (t[n] = {
bind: r,
update: r
})
}
}(t), !t._base && (t.extends && (e = De(e, t.extends, n)), t.mixins))
for (var r = 0, i = t.mixins.length; r < i; r++) e = De(e, t.mixins[r], n);
var o, a = {};
for (o in e) c(o);
for (o in t) y(e, o) || c(o);
function c(r) {
var i = Oe[r] || je;
a[r] = i(e[r], t[r], n, r)
}
return a
}
function Le(e, t, n, r) {
if ("string" == typeof n) {
var i = e[t];
if (y(i, n)) return i[n];
var o = b(n);
if (y(i, o)) return i[o];
var a = $(o);
return y(i, a) ? i[a] : i[n] || i[o] || i[a]
}
}
function Me(e, t, n, r) {
var i = t[e],
o = !y(n, e),
a = n[e],
s = Pe(Boolean, i.type);
if (s > -1)
if (o && !y(i, "default")) a = !1;
else if ("" === a || a === C(e)) {
var c = Pe(String, i.type);
(c < 0 || s < c) && (a = !0)
}
if (void 0 === a) {
a = function (e, t, n) {
if (!y(t, "default")) return;
var r = t.default;
if (e && e.$options.propsData && void 0 === e.$options.propsData[n] && void 0 !== e._props[n]) return e._props[n];
return "function" == typeof r && "Function" !== Ie(t.type) ? r.call(e) : r
}(r, i, e);
var u = be;
$e(!0), Ce(a), $e(u)
}
return a
}
function Ie(e) {
var t = e && e.toString().match(/^\s*function (\w+)/);
return t ? t[1] : ""
}
function Fe(e, t) {
return Ie(e) === Ie(t)
}
function Pe(e, t) {
if (!Array.isArray(t)) return Fe(t, e) ? 0 : -1;
for (var n = 0, r = t.length; n < r; n++)
if (Fe(t[n], e)) return n;
return -1
}
function Re(e, t, n) {
le();
try {
if (t)
for (var r = t; r = r.$parent;) {
var i = r.$options.errorCaptured;
if (i)
for (var o = 0; o < i.length; o++) try {
if (!1 === i[o].call(r, e, t, n)) return
} catch (e) {
Be(e, r, "errorCaptured hook")
}
}
Be(e, t, n)
} finally {
fe()
}
}
function He(e, t, n, r, i) {
var o;
try {
(o = n ? e.apply(t, n) : e.call(t)) && !o._isVue && u(o) && !o._handled && (o.catch(function (e) {
return Re(e, r, i + " (Promise/async)")
}), o._handled = !0)
} catch (e) {
Re(e, r, i)
}
return o
}
function Be(e, t, n) {
if (F.errorHandler) try {
return F.errorHandler.call(null, e, t, n)
} catch (t) {
t !== e && Ue(t, null, "config.errorHandler")
}
Ue(e, t, n)
}
function Ue(e, t, n) {
if (!z && !V || "undefined" == typeof console) throw e;
console.error(e)
}
var ze, Ve = !1,
Ke = [],
Je = !1;
function qe() {
Je = !1;
var e = Ke.slice(0);
Ke.length = 0;
for (var t = 0; t < e.length; t++) e[t]()
}
if ("undefined" != typeof Promise && re(Promise)) {
var We = Promise.resolve();
ze = function () {
We.then(qe), G && setTimeout(S)
}, Ve = !0
} else if (q || "undefined" == typeof MutationObserver || !re(MutationObserver) && "[object MutationObserverConstructor]" !== MutationObserver.toString()) ze = "undefined" != typeof setImmediate && re(setImmediate) ? function () {
setImmediate(qe)
} : function () {
setTimeout(qe, 0)
};
else {
var Ze = 1,
Ge = new MutationObserver(qe),
Xe = document.createTextNode(String(Ze));
Ge.observe(Xe, {
characterData: !0
}), ze = function () {
Ze = (Ze + 1) % 2, Xe.data = String(Ze)
}, Ve = !0
}
function Ye(e, t) {
var n;
if (Ke.push(function () {
if (e) try {
e.call(t)
} catch (e) {
Re(e, t, "nextTick")
} else n && n(t)
}), Je || (Je = !0, ze()), !e && "undefined" != typeof Promise) return new Promise(function (e) {
n = e
})
}
var Qe = new ie;
function et(e) {
! function e(t, n) {
var r, i;
var a = Array.isArray(t);
if (!a && !o(t) || Object.isFrozen(t) || t instanceof pe) return;
if (t.__ob__) {
var s = t.__ob__.dep.id;
if (n.has(s)) return;
n.add(s)
}
if (a)
for (r = t.length; r--;) e(t[r], n);
else
for (i = Object.keys(t), r = i.length; r--;) e(t[i[r]], n)
}(e, Qe), Qe.clear()
}
var tt = g(function (e) {
var t = "&" === e.charAt(0),
n = "~" === (e = t ? e.slice(1) : e).charAt(0),
r = "!" === (e = n ? e.slice(1) : e).charAt(0);
return {
name: e = r ? e.slice(1) : e,
once: n,
capture: r,
passive: t
}
});
function nt(e, t) {
function n() {
var e = arguments,
r = n.fns;
if (!Array.isArray(r)) return He(r, null, arguments, t, "v-on handler");
for (var i = r.slice(), o = 0; o < i.length; o++) He(i[o], null, e, t, "v-on handler")
}
return n.fns = e, n
}
function rt(e, n, i, o, a, s) {
var c, u, l, f;
for (c in e) u = e[c], l = n[c], f = tt(c), t(u) || (t(l) ? (t(u.fns) && (u = e[c] = nt(u, s)), r(f.once) && (u = e[c] = a(f.name, u, f.capture)), i(f.name, u, f.capture, f.passive, f.params)) : u !== l && (l.fns = u, e[c] = l));
for (c in n) t(e[c]) && o((f = tt(c)).name, n[c], f.capture)
}
function it(e, i, o) {
var a;
e instanceof pe && (e = e.data.hook || (e.data.hook = {}));
var s = e[i];
function c() {
o.apply(this, arguments), h(a.fns, c)
}
t(s) ? a = nt([c]) : n(s.fns) && r(s.merged) ? (a = s).fns.push(c) : a = nt([s, c]), a.merged = !0, e[i] = a
}
function ot(e, t, r, i, o) {
if (n(t)) {
if (y(t, r)) return e[r] = t[r], o || delete t[r], !0;
if (y(t, i)) return e[r] = t[i], o || delete t[i], !0
}
return !1
}
function at(e) {
return i(e) ? [he(e)] : Array.isArray(e) ? function e(o, a) {
var s = [];
var c, u, l, f;
for (c = 0; c < o.length; c++) t(u = o[c]) || "boolean" == typeof u || (l = s.length - 1, f = s[l], Array.isArray(u) ? u.length > 0 && (st((u = e(u, (a || "") + "_" + c))[0]) && st(f) && (s[l] = he(f.text + u[0].text), u.shift()), s.push.apply(s, u)) : i(u) ? st(f) ? s[l] = he(f.text + u) : "" !== u && s.push(he(u)) : st(u) && st(f) ? s[l] = he(f.text + u.text) : (r(o._isVList) && n(u.tag) && t(u.key) && n(a) && (u.key = "__vlist" + a + "_" + c + "__"), s.push(u)));
return s
}(e) : void 0
}
function st(e) {
return n(e) && n(e.text) && !1 === e.isComment
}
function ct(e, t) {
if (e) {
for (var n = Object.create(null), r = oe ? Reflect.ownKeys(e) : Object.keys(e), i = 0; i < r.length; i++) {
var o = r[i];
if ("__ob__" !== o) {
for (var a = e[o].from, s = t; s;) {
if (s._provided && y(s._provided, a)) {
n[o] = s._provided[a];
break
}
s = s.$parent
}
if (!s && "default" in e[o]) {
var c = e[o].default;
n[o] = "function" == typeof c ? c.call(t) : c
}
}
}
return n
}
}
function ut(e, t) {
if (!e || !e.length) return {};
for (var n = {}, r = 0, i = e.length; r < i; r++) {
var o = e[r],
a = o.data;
if (a && a.attrs && a.attrs.slot && delete a.attrs.slot, o.context !== t && o.fnContext !== t || !a || null == a.slot)(n.default || (n.default = [])).push(o);
else {
var s = a.slot,
c = n[s] || (n[s] = []);
"template" === o.tag ? c.push.apply(c, o.children || []) : c.push(o)
}
}
for (var u in n) n[u].every(lt) && delete n[u];
return n
}
function lt(e) {
return e.isComment && !e.asyncFactory || " " === e.text
}
function ft(t, n, r) {
var i, o = Object.keys(n).length > 0,
a = t ? !!t.$stable : !o,
s = t && t.$key;
if (t) {
if (t._normalized) return t._normalized;
if (a && r && r !== e && s === r.$key && !o && !r.$hasNormal) return r;
for (var c in i = {}, t) t[c] && "$" !== c[0] && (i[c] = pt(n, c, t[c]))
} else i = {};
for (var u in n) u in i || (i[u] = dt(n, u));
return t && Object.isExtensible(t) && (t._normalized = i), R(i, "$stable", a), R(i, "$key", s), R(i, "$hasNormal", o), i
}
function pt(e, t, n) {
var r = function () {
var e = arguments.length ? n.apply(null, arguments) : n({});
return (e = e && "object" == typeof e && !Array.isArray(e) ? [e] : at(e)) && (0 === e.length || 1 === e.length && e[0].isComment) ? void 0 : e
};
return n.proxy && Object.defineProperty(e, t, {
get: r,
enumerable: !0,
configurable: !0
}), r
}
function dt(e, t) {
return function () {
return e[t]
}
}
function vt(e, t) {
var r, i, a, s, c;
if (Array.isArray(e) || "string" == typeof e)
for (r = new Array(e.length), i = 0, a = e.length; i < a; i++) r[i] = t(e[i], i);
else if ("number" == typeof e)
for (r = new Array(e), i = 0; i < e; i++) r[i] = t(i + 1, i);
else if (o(e))
if (oe && e[Symbol.iterator]) {
r = [];
for (var u = e[Symbol.iterator](), l = u.next(); !l.done;) r.push(t(l.value, r.length)), l = u.next()
} else
for (s = Object.keys(e), r = new Array(s.length), i = 0, a = s.length; i < a; i++) c = s[i], r[i] = t(e[c], c, i);
return n(r) || (r = []), r._isVList = !0, r
}
function ht(e, t, n, r) {
var i, o = this.$scopedSlots[e];
o ? (n = n || {}, r && (n = A(A({}, r), n)), i = o(n) || t) : i = this.$slots[e] || t;
var a = n && n.slot;
return a ? this.$createElement("template", {
slot: a
}, i) : i
}
function mt(e) {
return Le(this.$options, "filters", e) || E
}
function yt(e, t) {
return Array.isArray(e) ? -1 === e.indexOf(t) : e !== t
}
function gt(e, t, n, r, i) {
var o = F.keyCodes[t] || n;
return i && r && !F.keyCodes[t] ? yt(i, r) : o ? yt(o, e) : r ? C(r) !== t : void 0
}
function _t(e, t, n, r, i) {
if (n)
if (o(n)) {
var a;
Array.isArray(n) && (n = O(n));
var s = function (o) {
if ("class" === o || "style" === o || v(o)) a = e;
else {
var s = e.attrs && e.attrs.type;
a = r || F.mustUseProp(t, s, o) ? e.domProps || (e.domProps = {}) : e.attrs || (e.attrs = {})
}
var c = b(o),
u = C(o);
c in a || u in a || (a[o] = n[o], i && ((e.on || (e.on = {}))["update:" + o] = function (e) {
n[o] = e
}))
};
for (var c in n) s(c)
} else;
return e
}
function bt(e, t) {
var n = this._staticTrees || (this._staticTrees = []),
r = n[e];
return r && !t ? r : (wt(r = n[e] = this.$options.staticRenderFns[e].call(this._renderProxy, null, this), "__static__" + e, !1), r)
}
function $t(e, t, n) {
return wt(e, "__once__" + t + (n ? "_" + n : ""), !0), e
}
function wt(e, t, n) {
if (Array.isArray(e))
for (var r = 0; r < e.length; r++) e[r] && "string" != typeof e[r] && Ct(e[r], t + "_" + r, n);
else Ct(e, t, n)
}
function Ct(e, t, n) {
e.isStatic = !0, e.key = t, e.isOnce = n
}
function xt(e, t) {
if (t)
if (s(t)) {
var n = e.on = e.on ? A({}, e.on) : {};
for (var r in t) {
var i = n[r],
o = t[r];
n[r] = i ? [].concat(i, o) : o
}
} else;
return e
}
function kt(e, t, n, r) {
t = t || {
$stable: !n
};
for (var i = 0; i < e.length; i++) {
var o = e[i];
Array.isArray(o) ? kt(o, t, n) : o && (o.proxy && (o.fn.proxy = !0), t[o.key] = o.fn)
}
return r && (t.$key = r), t
}
function At(e, t) {
for (var n = 0; n < t.length; n += 2) {
var r = t[n];
"string" == typeof r && r && (e[t[n]] = t[n + 1])
}
return e
}
function Ot(e, t) {
return "string" == typeof e ? t + e : e
}
function St(e) {
e._o = $t, e._n = f, e._s = l, e._l = vt, e._t = ht, e._q = N, e._i = j, e._m = bt, e._f = mt, e._k = gt, e._b = _t, e._v = he, e._e = ve, e._u = kt, e._g = xt, e._d = At, e._p = Ot
}
function Tt(t, n, i, o, a) {
var s, c = this,
u = a.options;
y(o, "_uid") ? (s = Object.create(o))._original = o : (s = o, o = o._original);
var l = r(u._compiled),
f = !l;
this.data = t, this.props = n, this.children = i, this.parent = o, this.listeners = t.on || e, this.injections = ct(u.inject, o), this.slots = function () {
return c.$slots || ft(t.scopedSlots, c.$slots = ut(i, o)), c.$slots
}, Object.defineProperty(this, "scopedSlots", {
enumerable: !0,
get: function () {
return ft(t.scopedSlots, this.slots())
}
}), l && (this.$options = u, this.$slots = this.slots(), this.$scopedSlots = ft(t.scopedSlots, this.$slots)), u._scopeId ? this._c = function (e, t, n, r) {
var i = Pt(s, e, t, n, r, f);
return i && !Array.isArray(i) && (i.fnScopeId = u._scopeId, i.fnContext = o), i
} : this._c = function (e, t, n, r) {
return Pt(s, e, t, n, r, f)
}
}
function Et(e, t, n, r, i) {
var o = me(e);
return o.fnContext = n, o.fnOptions = r, t.slot && ((o.data || (o.data = {})).slot = t.slot), o
}
function Nt(e, t) {
for (var n in t) e[b(n)] = t[n]
}
St(Tt.prototype);
var jt = {
init: function (e, t) {
if (e.componentInstance && !e.componentInstance._isDestroyed && e.data.keepAlive) {
var r = e;
jt.prepatch(r, r)
} else {
(e.componentInstance = function (e, t) {
var r = {
_isComponent: !0,
_parentVnode: e,
parent: t
},
i = e.data.inlineTemplate;
n(i) && (r.render = i.render, r.staticRenderFns = i.staticRenderFns);
return new e.componentOptions.Ctor(r)
}(e, Wt)).$mount(t ? e.elm : void 0, t)
}
},
prepatch: function (t, n) {
var r = n.componentOptions;
! function (t, n, r, i, o) {
var a = i.data.scopedSlots,
s = t.$scopedSlots,
c = !!(a && !a.$stable || s !== e && !s.$stable || a && t.$scopedSlots.$key !== a.$key),
u = !!(o || t.$options._renderChildren || c);
t.$options._parentVnode = i, t.$vnode = i, t._vnode && (t._vnode.parent = i);
if (t.$options._renderChildren = o, t.$attrs = i.data.attrs || e, t.$listeners = r || e, n && t.$options.props) {
$e(!1);
for (var l = t._props, f = t.$options._propKeys || [], p = 0; p < f.length; p++) {
var d = f[p],
v = t.$options.props;
l[d] = Me(d, v, n, t)
}
$e(!0), t.$options.propsData = n
}
r = r || e;
var h = t.$options._parentListeners;
t.$options._parentListeners = r, qt(t, r, h), u && (t.$slots = ut(o, i.context), t.$forceUpdate())
}(n.componentInstance = t.componentInstance, r.propsData, r.listeners, n, r.children)
},
insert: function (e) {
var t, n = e.context,
r = e.componentInstance;
r._isMounted || (r._isMounted = !0, Yt(r, "mounted")), e.data.keepAlive && (n._isMounted ? ((t = r)._inactive = !1, en.push(t)) : Xt(r, !0))
},
destroy: function (e) {
var t = e.componentInstance;
t._isDestroyed || (e.data.keepAlive ? function e(t, n) {
if (n && (t._directInactive = !0, Gt(t))) return;
if (!t._inactive) {
t._inactive = !0;
for (var r = 0; r < t.$children.length; r++) e(t.$children[r]);
Yt(t, "deactivated")
}
}(t, !0) : t.$destroy())
}
},
Dt = Object.keys(jt);
function Lt(i, a, s, c, l) {
if (!t(i)) {
var f = s.$options._base;
if (o(i) && (i = f.extend(i)), "function" == typeof i) {
var p;
if (t(i.cid) && void 0 === (i = function (e, i) {
if (r(e.error) && n(e.errorComp)) return e.errorComp;
if (n(e.resolved)) return e.resolved;
var a = Ht;
a && n(e.owners) && -1 === e.owners.indexOf(a) && e.owners.push(a);
if (r(e.loading) && n(e.loadingComp)) return e.loadingComp;
if (a && !n(e.owners)) {
var s = e.owners = [a],
c = !0,
l = null,
f = null;
a.$on("hook:destroyed", function () {
return h(s, a)
});
var p = function (e) {
for (var t = 0, n = s.length; t < n; t++) s[t].$forceUpdate();
e && (s.length = 0, null !== l && (clearTimeout(l), l = null), null !== f && (clearTimeout(f), f = null))
},
d = D(function (t) {
e.resolved = Bt(t, i), c ? s.length = 0 : p(!0)
}),
v = D(function (t) {
n(e.errorComp) && (e.error = !0, p(!0))
}),
m = e(d, v);
return o(m) && (u(m) ? t(e.resolved) && m.then(d, v) : u(m.component) && (m.component.then(d, v), n(m.error) && (e.errorComp = Bt(m.error, i)), n(m.loading) && (e.loadingComp = Bt(m.loading, i), 0 === m.delay ? e.loading = !0 : l = setTimeout(function () {
l = null, t(e.resolved) && t(e.error) && (e.loading = !0, p(!1))
}, m.delay || 200)), n(m.timeout) && (f = setTimeout(function () {
f = null, t(e.resolved) && v(null)
}, m.timeout)))), c = !1, e.loading ? e.loadingComp : e.resolved
}
}(p = i, f))) return function (e, t, n, r, i) {
var o = ve();
return o.asyncFactory = e, o.asyncMeta = {
data: t,
context: n,
children: r,
tag: i
}, o
}(p, a, s, c, l);
a = a || {}, $n(i), n(a.model) && function (e, t) {
var r = e.model && e.model.prop || "value",
i = e.model && e.model.event || "input";
(t.attrs || (t.attrs = {}))[r] = t.model.value;
var o = t.on || (t.on = {}),
a = o[i],
s = t.model.callback;
n(a) ? (Array.isArray(a) ? -1 === a.indexOf(s) : a !== s) && (o[i] = [s].concat(a)) : o[i] = s
}(i.options, a);
var d = function (e, r, i) {
var o = r.options.props;
if (!t(o)) {
var a = {},
s = e.attrs,
c = e.props;
if (n(s) || n(c))
for (var u in o) {
var l = C(u);
ot(a, c, u, l, !0) || ot(a, s, u, l, !1)
}
return a
}
}(a, i);
if (r(i.options.functional)) return function (t, r, i, o, a) {
var s = t.options,
c = {},
u = s.props;
if (n(u))
for (var l in u) c[l] = Me(l, u, r || e);
else n(i.attrs) && Nt(c, i.attrs), n(i.props) && Nt(c, i.props);
var f = new Tt(i, c, a, o, t),
p = s.render.call(null, f._c, f);
if (p instanceof pe) return Et(p, i, f.parent, s);
if (Array.isArray(p)) {
for (var d = at(p) || [], v = new Array(d.length), h = 0; h < d.length; h++) v[h] = Et(d[h], i, f.parent, s);
return v
}
}(i, d, a, s, c);
var v = a.on;
if (a.on = a.nativeOn, r(i.options.abstract)) {
var m = a.slot;
a = {}, m && (a.slot = m)
}! function (e) {
for (var t = e.hook || (e.hook = {}), n = 0; n < Dt.length; n++) {
var r = Dt[n],
i = t[r],
o = jt[r];
i === o || i && i._merged || (t[r] = i ? Mt(o, i) : o)
}
}(a);
var y = i.options.name || l;
return new pe("vue-component-" + i.cid + (y ? "-" + y : ""), a, void 0, void 0, void 0, s, {
Ctor: i,
propsData: d,
listeners: v,
tag: l,
children: c
}, p)
}
}
}
function Mt(e, t) {
var n = function (n, r) {
e(n, r), t(n, r)
};
return n._merged = !0, n
}
var It = 1,
Ft = 2;
function Pt(e, a, s, c, u, l) {
return (Array.isArray(s) || i(s)) && (u = c, c = s, s = void 0), r(l) && (u = Ft),
function (e, i, a, s, c) {
if (n(a) && n(a.__ob__)) return ve();
n(a) && n(a.is) && (i = a.is);
if (!i) return ve();
Array.isArray(s) && "function" == typeof s[0] && ((a = a || {}).scopedSlots = {
default: s[0]
}, s.length = 0);
c === Ft ? s = at(s) : c === It && (s = function (e) {
for (var t = 0; t < e.length; t++)
if (Array.isArray(e[t])) return Array.prototype.concat.apply([], e);
return e
}(s));
var u, l;
if ("string" == typeof i) {
var f;
l = e.$vnode && e.$vnode.ns || F.getTagNamespace(i), u = F.isReservedTag(i) ? new pe(F.parsePlatformTagName(i), a, s, void 0, void 0, e) : a && a.pre || !n(f = Le(e.$options, "components", i)) ? new pe(i, a, s, void 0, void 0, e) : Lt(f, a, e, s, i)
} else u = Lt(i, a, e, s);
return Array.isArray(u) ? u : n(u) ? (n(l) && function e(i, o, a) {
i.ns = o;
"foreignObject" === i.tag && (o = void 0, a = !0);
if (n(i.children))
for (var s = 0, c = i.children.length; s < c; s++) {
var u = i.children[s];
n(u.tag) && (t(u.ns) || r(a) && "svg" !== u.tag) && e(u, o, a)
}
}(u, l), n(a) && function (e) {
o(e.style) && et(e.style);
o(e.class) && et(e.class)
}(a), u) : ve()
}(e, a, s, c, u)
}
var Rt, Ht = null;
function Bt(e, t) {
return (e.__esModule || oe && "Module" === e[Symbol.toStringTag]) && (e = e.default), o(e) ? t.extend(e) : e
}
function Ut(e) {
return e.isComment && e.asyncFactory
}
function zt(e) {
if (Array.isArray(e))
for (var t = 0; t < e.length; t++) {
var r = e[t];
if (n(r) && (n(r.componentOptions) || Ut(r))) return r
}
}
function Vt(e, t) {
Rt.$on(e, t)
}
function Kt(e, t) {
Rt.$off(e, t)
}
function Jt(e, t) {
var n = Rt;
return function r() {
null !== t.apply(null, arguments) && n.$off(e, r)
}
}
function qt(e, t, n) {
Rt = e, rt(t, n || {}, Vt, Kt, Jt, e), Rt = void 0
}
var Wt = null;
function Zt(e) {
var t = Wt;
return Wt = e,
function () {
Wt = t
}
}
function Gt(e) {
for (; e && (e = e.$parent);)
if (e._inactive) return !0;
return !1
}
function Xt(e, t) {
if (t) {
if (e._directInactive = !1, Gt(e)) return
} else if (e._directInactive) return;
if (e._inactive || null === e._inactive) {
e._inactive = !1;
for (var n = 0; n < e.$children.length; n++) Xt(e.$children[n]);
Yt(e, "activated")
}
}
function Yt(e, t) {
le();
var n = e.$options[t],
r = t + " hook";
if (n)
for (var i = 0, o = n.length; i < o; i++) He(n[i], e, null, e, r);
e._hasHookEvent && e.$emit("hook:" + t), fe()
}
var Qt = [],
en = [],
tn = {},
nn = !1,
rn = !1,
on = 0;
var an = 0,
sn = Date.now;
if (z && !q) {
var cn = window.performance;
cn && "function" == typeof cn.now && sn() > document.createEvent("Event").timeStamp && (sn = function () {
return cn.now()
})
}
function un() {
var e, t;
for (an = sn(), rn = !0, Qt.sort(function (e, t) {
return e.id - t.id
}), on = 0; on < Qt.length; on++)(e = Qt[on]).before && e.before(), t = e.id, tn[t] = null, e.run();
var n = en.slice(),
r = Qt.slice();
on = Qt.length = en.length = 0, tn = {}, nn = rn = !1,
function (e) {
for (var t = 0; t < e.length; t++) e[t]._inactive = !0, Xt(e[t], !0)
}(n),
function (e) {
var t = e.length;
for (; t--;) {
var n = e[t],
r = n.vm;
r._watcher === n && r._isMounted && !r._isDestroyed && Yt(r, "updated")
}
}(r), ne && F.devtools && ne.emit("flush")
}
var ln = 0,
fn = function (e, t, n, r, i) {
this.vm = e, i && (e._watcher = this), e._watchers.push(this), r ? (this.deep = !!r.deep, this.user = !!r.user, this.lazy = !!r.lazy, this.sync = !!r.sync, this.before = r.before) : this.deep = this.user = this.lazy = this.sync = !1, this.cb = n, this.id = ++ln, this.active = !0, this.dirty = this.lazy, this.deps = [], this.newDeps = [], this.depIds = new ie, this.newDepIds = new ie, this.expression = "", "function" == typeof t ? this.getter = t : (this.getter = function (e) {
if (!H.test(e)) {
var t = e.split(".");
return function (e) {
for (var n = 0; n < t.length; n++) {
if (!e) return;
e = e[t[n]]
}
return e
}
}
}(t), this.getter || (this.getter = S)), this.value = this.lazy ? void 0 : this.get()
};
fn.prototype.get = function () {
var e;
le(this);
var t = this.vm;
try {
e = this.getter.call(t, t)
} catch (e) {
if (!this.user) throw e;
Re(e, t, 'getter for watcher "' + this.expression + '"')
} finally {
this.deep && et(e), fe(), this.cleanupDeps()
}
return e
}, fn.prototype.addDep = function (e) {
var t = e.id;
this.newDepIds.has(t) || (this.newDepIds.add(t), this.newDeps.push(e), this.depIds.has(t) || e.addSub(this))
}, fn.prototype.cleanupDeps = function () {
for (var e = this.deps.length; e--;) {
var t = this.deps[e];
this.newDepIds.has(t.id) || t.removeSub(this)
}
var n = this.depIds;
this.depIds = this.newDepIds, this.newDepIds = n, this.newDepIds.clear(), n = this.deps, this.deps = this.newDeps, this.newDeps = n, this.newDeps.length = 0
}, fn.prototype.update = function () {
this.lazy ? this.dirty = !0 : this.sync ? this.run() : function (e) {
var t = e.id;
if (null == tn[t]) {
if (tn[t] = !0, rn) {
for (var n = Qt.length - 1; n > on && Qt[n].id > e.id;) n--;
Qt.splice(n + 1, 0, e)
} else Qt.push(e);
nn || (nn = !0, Ye(un))
}
}(this)
}, fn.prototype.run = function () {
if (this.active) {
var e = this.get();
if (e !== this.value || o(e) || this.deep) {
var t = this.value;
if (this.value = e, this.user) try {
this.cb.call(this.vm, e, t)
} catch (e) {
Re(e, this.vm, 'callback for watcher "' + this.expression + '"')
} else this.cb.call(this.vm, e, t)
}
}
}, fn.prototype.evaluate = function () {
this.value = this.get(), this.dirty = !1
}, fn.prototype.depend = function () {
for (var e = this.deps.length; e--;) this.deps[e].depend()
}, fn.prototype.teardown = function () {
if (this.active) {
this.vm._isBeingDestroyed || h(this.vm._watchers, this);
for (var e = this.deps.length; e--;) this.deps[e].removeSub(this);
this.active = !1
}
};
var pn = {
enumerable: !0,
configurable: !0,
get: S,
set: S
};
function dn(e, t, n) {
pn.get = function () {
return this[t][n]
}, pn.set = function (e) {
this[t][n] = e
}, Object.defineProperty(e, n, pn)
}
function vn(e) {
e._watchers = [];
var t = e.$options;
t.props && function (e, t) {
var n = e.$options.propsData || {},
r = e._props = {},
i = e.$options._propKeys = [];
e.$parent && $e(!1);
var o = function (o) {
i.push(o);
var a = Me(o, t, n, e);
xe(r, o, a), o in e || dn(e, "_props", o)
};
for (var a in t) o(a);
$e(!0)
}(e, t.props), t.methods && function (e, t) {
e.$options.props;
for (var n in t) e[n] = "function" != typeof t[n] ? S : x(t[n], e)
}(e, t.methods), t.data ? function (e) {
var t = e.$options.data;
s(t = e._data = "function" == typeof t ? function (e, t) {
le();
try {
return e.call(t, t)
} catch (e) {
return Re(e, t, "data()"), {}
} finally {
fe()
}
}(t, e) : t || {}) || (t = {});
var n = Object.keys(t),
r = e.$options.props,
i = (e.$options.methods, n.length);
for (; i--;) {
var o = n[i];
r && y(r, o) || (a = void 0, 36 !== (a = (o + "").charCodeAt(0)) && 95 !== a && dn(e, "_data", o))
}
var a;
Ce(t, !0)
}(e) : Ce(e._data = {}, !0), t.computed && function (e, t) {
var n = e._computedWatchers = Object.create(null),
r = te();
for (var i in t) {
var o = t[i],
a = "function" == typeof o ? o : o.get;
r || (n[i] = new fn(e, a || S, S, hn)), i in e || mn(e, i, o)
}
}(e, t.computed), t.watch && t.watch !== Y && function (e, t) {
for (var n in t) {
var r = t[n];
if (Array.isArray(r))
for (var i = 0; i < r.length; i++) _n(e, n, r[i]);
else _n(e, n, r)
}
}(e, t.watch)
}
var hn = {
lazy: !0
};
function mn(e, t, n) {
var r = !te();
"function" == typeof n ? (pn.get = r ? yn(t) : gn(n), pn.set = S) : (pn.get = n.get ? r && !1 !== n.cache ? yn(t) : gn(n.get) : S, pn.set = n.set || S), Object.defineProperty(e, t, pn)
}
function yn(e) {
return function () {
var t = this._computedWatchers && this._computedWatchers[e];
if (t) return t.dirty && t.evaluate(), ce.target && t.depend(), t.value
}
}
function gn(e) {
return function () {
return e.call(this, this)
}
}
function _n(e, t, n, r) {
return s(n) && (r = n, n = n.handler), "string" == typeof n && (n = e[n]), e.$watch(t, n, r)
}
var bn = 0;
function $n(e) {
var t = e.options;
if (e.super) {
var n = $n(e.super);
if (n !== e.superOptions) {
e.superOptions = n;
var r = function (e) {
var t, n = e.options,
r = e.sealedOptions;
for (var i in n) n[i] !== r[i] && (t || (t = {}), t[i] = n[i]);
return t
}(e);
r && A(e.extendOptions, r), (t = e.options = De(n, e.extendOptions)).name && (t.components[t.name] = e)
}
}
return t
}
function wn(e) {
this._init(e)
}
function Cn(e) {
e.cid = 0;
var t = 1;
e.extend = function (e) {
e = e || {};
var n = this,
r = n.cid,
i = e._Ctor || (e._Ctor = {});
if (i[r]) return i[r];
var o = e.name || n.options.name,
a = function (e) {
this._init(e)
};
return (a.prototype = Object.create(n.prototype)).constructor = a, a.cid = t++, a.options = De(n.options, e), a.super = n, a.options.props && function (e) {
var t = e.options.props;
for (var n in t) dn(e.prototype, "_props", n)
}(a), a.options.computed && function (e) {
var t = e.options.computed;
for (var n in t) mn(e.prototype, n, t[n])
}(a), a.extend = n.extend, a.mixin = n.mixin, a.use = n.use, M.forEach(function (e) {
a[e] = n[e]
}), o && (a.options.components[o] = a), a.superOptions = n.options, a.extendOptions = e, a.sealedOptions = A({}, a.options), i[r] = a, a
}
}
function xn(e) {
return e && (e.Ctor.options.name || e.tag)
}
function kn(e, t) {
return Array.isArray(e) ? e.indexOf(t) > -1 : "string" == typeof e ? e.split(",").indexOf(t) > -1 : (n = e, "[object RegExp]" === a.call(n) && e.test(t));
var n
}
function An(e, t) {
var n = e.cache,
r = e.keys,
i = e._vnode;
for (var o in n) {
var a = n[o];
if (a) {
var s = xn(a.componentOptions);
s && !t(s) && On(n, o, r, i)
}
}
}
function On(e, t, n, r) {
var i = e[t];
!i || r && i.tag === r.tag || i.componentInstance.$destroy(), e[t] = null, h(n, t)
}! function (t) {
t.prototype._init = function (t) {
var n = this;
n._uid = bn++, n._isVue = !0, t && t._isComponent ? function (e, t) {
var n = e.$options = Object.create(e.constructor.options),
r = t._parentVnode;
n.parent = t.parent, n._parentVnode = r;
var i = r.componentOptions;
n.propsData = i.propsData, n._parentListeners = i.listeners, n._renderChildren = i.children, n._componentTag = i.tag, t.render && (n.render = t.render, n.staticRenderFns = t.staticRenderFns)
}(n, t) : n.$options = De($n(n.constructor), t || {}, n), n._renderProxy = n, n._self = n,
function (e) {
var t = e.$options,
n = t.parent;
if (n && !t.abstract) {
for (; n.$options.abstract && n.$parent;) n = n.$parent;
n.$children.push(e)
}
e.$parent = n, e.$root = n ? n.$root : e, e.$children = [], e.$refs = {}, e._watcher = null, e._inactive = null, e._directInactive = !1, e._isMounted = !1, e._isDestroyed = !1, e._isBeingDestroyed = !1
}(n),
function (e) {
e._events = Object.create(null), e._hasHookEvent = !1;
var t = e.$options._parentListeners;
t && qt(e, t)
}(n),
function (t) {
t._vnode = null, t._staticTrees = null;
var n = t.$options,
r = t.$vnode = n._parentVnode,
i = r && r.context;
t.$slots = ut(n._renderChildren, i), t.$scopedSlots = e, t._c = function (e, n, r, i) {
return Pt(t, e, n, r, i, !1)
}, t.$createElement = function (e, n, r, i) {
return Pt(t, e, n, r, i, !0)
};
var o = r && r.data;
xe(t, "$attrs", o && o.attrs || e, null, !0), xe(t, "$listeners", n._parentListeners || e, null, !0)
}(n), Yt(n, "beforeCreate"),
function (e) {
var t = ct(e.$options.inject, e);
t && ($e(!1), Object.keys(t).forEach(function (n) {
xe(e, n, t[n])
}), $e(!0))
}(n), vn(n),
function (e) {
var t = e.$options.provide;
t && (e._provided = "function" == typeof t ? t.call(e) : t)
}(n), Yt(n, "created"), n.$options.el && n.$mount(n.$options.el)
}
}(wn),
function (e) {
var t = {
get: function () {
return this._data
}
},
n = {
get: function () {
return this._props
}
};
Object.defineProperty(e.prototype, "$data", t), Object.defineProperty(e.prototype, "$props", n), e.prototype.$set = ke, e.prototype.$delete = Ae, e.prototype.$watch = function (e, t, n) {
if (s(t)) return _n(this, e, t, n);
(n = n || {}).user = !0;
var r = new fn(this, e, t, n);
if (n.immediate) try {
t.call(this, r.value)
} catch (e) {
Re(e, this, 'callback for immediate watcher "' + r.expression + '"')
}
return function () {
r.teardown()
}
}
}(wn),
function (e) {
var t = /^hook:/;
e.prototype.$on = function (e, n) {
var r = this;
if (Array.isArray(e))
for (var i = 0, o = e.length; i < o; i++) r.$on(e[i], n);
else(r._events[e] || (r._events[e] = [])).push(n), t.test(e) && (r._hasHookEvent = !0);
return r
}, e.prototype.$once = function (e, t) {
var n = this;
function r() {
n.$off(e, r), t.apply(n, arguments)
}
return r.fn = t, n.$on(e, r), n
}, e.prototype.$off = function (e, t) {
var n = this;
if (!arguments.length) return n._events = Object.create(null), n;
if (Array.isArray(e)) {
for (var r = 0, i = e.length; r < i; r++) n.$off(e[r], t);
return n
}
var o, a = n._events[e];
if (!a) return n;
if (!t) return n._events[e] = null, n;
for (var s = a.length; s--;)
if ((o = a[s]) === t || o.fn === t) {
a.splice(s, 1);
break
} return n
}, e.prototype.$emit = function (e) {
var t = this._events[e];
if (t) {
t = t.length > 1 ? k(t) : t;
for (var n = k(arguments, 1), r = 'event handler for "' + e + '"', i = 0, o = t.length; i < o; i++) He(t[i], this, n, this, r)
}
return this
}
}(wn),
function (e) {
e.prototype._update = function (e, t) {
var n = this,
r = n.$el,
i = n._vnode,
o = Zt(n);
n._vnode = e, n.$el = i ? n.__patch__(i, e) : n.__patch__(n.$el, e, t, !1), o(), r && (r.__vue__ = null), n.$el && (n.$el.__vue__ = n), n.$vnode && n.$parent && n.$vnode === n.$parent._vnode && (n.$parent.$el = n.$el)
}, e.prototype.$forceUpdate = function () {
this._watcher && this._watcher.update()
}, e.prototype.$destroy = function () {
var e = this;
if (!e._isBeingDestroyed) {
Yt(e, "beforeDestroy"), e._isBeingDestroyed = !0;
var t = e.$parent;
!t || t._isBeingDestroyed || e.$options.abstract || h(t.$children, e), e._watcher && e._watcher.teardown();
for (var n = e._watchers.length; n--;) e._watchers[n].teardown();
e._data.__ob__ && e._data.__ob__.vmCount--, e._isDestroyed = !0, e.__patch__(e._vnode, null), Yt(e, "destroyed"), e.$off(), e.$el && (e.$el.__vue__ = null), e.$vnode && (e.$vnode.parent = null)
}
}
}(wn),
function (e) {
St(e.prototype), e.prototype.$nextTick = function (e) {
return Ye(e, this)
}, e.prototype._render = function () {
var e, t = this,
n = t.$options,
r = n.render,
i = n._parentVnode;
i && (t.$scopedSlots = ft(i.data.scopedSlots, t.$slots, t.$scopedSlots)), t.$vnode = i;
try {
Ht = t, e = r.call(t._renderProxy, t.$createElement)
} catch (n) {
Re(n, t, "render"), e = t._vnode
} finally {
Ht = null
}
return Array.isArray(e) && 1 === e.length && (e = e[0]), e instanceof pe || (e = ve()), e.parent = i, e
}
}(wn);
var Sn = [String, RegExp, Array],
Tn = {
KeepAlive: {
name: "keep-alive",
abstract: !0,
props: {
include: Sn,
exclude: Sn,
max: [String, Number]
},
created: function () {
this.cache = Object.create(null), this.keys = []
},
destroyed: function () {
for (var e in this.cache) On(this.cache, e, this.keys)
},
mounted: function () {
var e = this;
this.$watch("include", function (t) {
An(e, function (e) {
return kn(t, e)
})
}), this.$watch("exclude", function (t) {
An(e, function (e) {
return !kn(t, e)
})
})
},
render: function () {
var e = this.$slots.default,
t = zt(e),
n = t && t.componentOptions;
if (n) {
var r = xn(n),
i = this.include,
o = this.exclude;
if (i && (!r || !kn(i, r)) || o && r && kn(o, r)) return t;
var a = this.cache,
s = this.keys,
c = null == t.key ? n.Ctor.cid + (n.tag ? "::" + n.tag : "") : t.key;
a[c] ? (t.componentInstance = a[c].componentInstance, h(s, c), s.push(c)) : (a[c] = t, s.push(c), this.max && s.length > parseInt(this.max) && On(a, s[0], s, this._vnode)), t.data.keepAlive = !0
}
return t || e && e[0]
}
}
};
! function (e) {
var t = {
get: function () {
return F
}
};
Object.defineProperty(e, "config", t), e.util = {
warn: ae,
extend: A,
mergeOptions: De,
defineReactive: xe
}, e.set = ke, e.delete = Ae, e.nextTick = Ye, e.observable = function (e) {
return Ce(e), e
}, e.options = Object.create(null), M.forEach(function (t) {
e.options[t + "s"] = Object.create(null)
}), e.options._base = e, A(e.options.components, Tn),
function (e) {
e.use = function (e) {
var t = this._installedPlugins || (this._installedPlugins = []);
if (t.indexOf(e) > -1) return this;
var n = k(arguments, 1);
return n.unshift(this), "function" == typeof e.install ? e.install.apply(e, n) : "function" == typeof e && e.apply(null, n), t.push(e), this
}
}(e),
function (e) {
e.mixin = function (e) {
return this.options = De(this.options, e), this
}
}(e), Cn(e),
function (e) {
M.forEach(function (t) {
e[t] = function (e, n) {
return n ? ("component" === t && s(n) && (n.name = n.name || e, n = this.options._base.extend(n)), "directive" === t && "function" == typeof n && (n = {
bind: n,
update: n
}), this.options[t + "s"][e] = n, n) : this.options[t + "s"][e]
}
})
}(e)
}(wn), Object.defineProperty(wn.prototype, "$isServer", {
get: te
}), Object.defineProperty(wn.prototype, "$ssrContext", {
get: function () {
return this.$vnode && this.$vnode.ssrContext
}
}), Object.defineProperty(wn, "FunctionalRenderContext", {
value: Tt
}), wn.version = "2.6.12";
var En = p("style,class"),
Nn = p("input,textarea,option,select,progress"),
jn = function (e, t, n) {
return "value" === n && Nn(e) && "button" !== t || "selected" === n && "option" === e || "checked" === n && "input" === e || "muted" === n && "video" === e
},
Dn = p("contenteditable,draggable,spellcheck"),
Ln = p("events,caret,typing,plaintext-only"),
Mn = function (e, t) {
return Hn(t) || "false" === t ? "false" : "contenteditable" === e && Ln(t) ? t : "true"
},
In = p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),
Fn = "http://www.w3.org/1999/xlink",
Pn = function (e) {
return ":" === e.charAt(5) && "xlink" === e.slice(0, 5)
},
Rn = function (e) {
return Pn(e) ? e.slice(6, e.length) : ""
},
Hn = function (e) {
return null == e || !1 === e
};
function Bn(e) {
for (var t = e.data, r = e, i = e; n(i.componentInstance);)(i = i.componentInstance._vnode) && i.data && (t = Un(i.data, t));
for (; n(r = r.parent);) r && r.data && (t = Un(t, r.data));
return function (e, t) {
if (n(e) || n(t)) return zn(e, Vn(t));
return ""
}(t.staticClass, t.class)
}
function Un(e, t) {
return {
staticClass: zn(e.staticClass, t.staticClass),
class: n(e.class) ? [e.class, t.class] : t.class
}
}
function zn(e, t) {
return e ? t ? e + " " + t : e : t || ""
}
function Vn(e) {
return Array.isArray(e) ? function (e) {
for (var t, r = "", i = 0, o = e.length; i < o; i++) n(t = Vn(e[i])) && "" !== t && (r && (r += " "), r += t);
return r
}(e) : o(e) ? function (e) {
var t = "";
for (var n in e) e[n] && (t && (t += " "), t += n);
return t
}(e) : "string" == typeof e ? e : ""
}
var Kn = {
svg: "http://www.w3.org/2000/svg",
math: "http://www.w3.org/1998/Math/MathML"
},
Jn = p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),
qn = p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view", !0),
Wn = function (e) {
return Jn(e) || qn(e)
};
function Zn(e) {
return qn(e) ? "svg" : "math" === e ? "math" : void 0
}
var Gn = Object.create(null);
var Xn = p("text,number,password,search,email,tel,url");
function Yn(e) {
if ("string" == typeof e) {
var t = document.querySelector(e);
return t || document.createElement("div")
}
return e
}
var Qn = Object.freeze({
createElement: function (e, t) {
var n = document.createElement(e);
return "select" !== e ? n : (t.data && t.data.attrs && void 0 !== t.data.attrs.multiple && n.setAttribute("multiple", "multiple"), n)
},
createElementNS: function (e, t) {
return document.createElementNS(Kn[e], t)
},
createTextNode: function (e) {
return document.createTextNode(e)
},
createComment: function (e) {
return document.createComment(e)
},
insertBefore: function (e, t, n) {
e.insertBefore(t, n)
},
removeChild: function (e, t) {
e.removeChild(t)
},
appendChild: function (e, t) {
e.appendChild(t)
},
parentNode: function (e) {
return e.parentNode
},
nextSibling: function (e) {
return e.nextSibling
},
tagName: function (e) {
return e.tagName
},
setTextContent: function (e, t) {
e.textContent = t
},
setStyleScope: function (e, t) {
e.setAttribute(t, "")
}
}),
er = {
create: function (e, t) {
tr(t)
},
update: function (e, t) {
e.data.ref !== t.data.ref && (tr(e, !0), tr(t))
},
destroy: function (e) {
tr(e, !0)
}
};
function tr(e, t) {
var r = e.data.ref;
if (n(r)) {
var i = e.context,
o = e.componentInstance || e.elm,
a = i.$refs;
t ? Array.isArray(a[r]) ? h(a[r], o) : a[r] === o && (a[r] = void 0) : e.data.refInFor ? Array.isArray(a[r]) ? a[r].indexOf(o) < 0 && a[r].push(o) : a[r] = [o] : a[r] = o
}
}
var nr = new pe("", {}, []),
rr = ["create", "activate", "update", "remove", "destroy"];
function ir(e, i) {
return e.key === i.key && (e.tag === i.tag && e.isComment === i.isComment && n(e.data) === n(i.data) && function (e, t) {
if ("input" !== e.tag) return !0;
var r, i = n(r = e.data) && n(r = r.attrs) && r.type,
o = n(r = t.data) && n(r = r.attrs) && r.type;
return i === o || Xn(i) && Xn(o)
}(e, i) || r(e.isAsyncPlaceholder) && e.asyncFactory === i.asyncFactory && t(i.asyncFactory.error))
}
function or(e, t, r) {
var i, o, a = {};
for (i = t; i <= r; ++i) n(o = e[i].key) && (a[o] = i);
return a
}
var ar = {
create: sr,
update: sr,
destroy: function (e) {
sr(e, nr)
}
};
function sr(e, t) {
(e.data.directives || t.data.directives) && function (e, t) {
var n, r, i, o = e === nr,
a = t === nr,
s = ur(e.data.directives, e.context),
c = ur(t.data.directives, t.context),
u = [],
l = [];
for (n in c) r = s[n], i = c[n], r ? (i.oldValue = r.value, i.oldArg = r.arg, fr(i, "update", t, e), i.def && i.def.componentUpdated && l.push(i)) : (fr(i, "bind", t, e), i.def && i.def.inserted && u.push(i));
if (u.length) {
var f = function () {
for (var n = 0; n < u.length; n++) fr(u[n], "inserted", t, e)
};
o ? it(t, "insert", f) : f()
}
l.length && it(t, "postpatch", function () {
for (var n = 0; n < l.length; n++) fr(l[n], "componentUpdated", t, e)
});
if (!o)
for (n in s) c[n] || fr(s[n], "unbind", e, e, a)
}(e, t)
}
var cr = Object.create(null);
function ur(e, t) {
var n, r, i = Object.create(null);
if (!e) return i;
for (n = 0; n < e.length; n++)(r = e[n]).modifiers || (r.modifiers = cr), i[lr(r)] = r, r.def = Le(t.$options, "directives", r.name);
return i
}
function lr(e) {
return e.rawName || e.name + "." + Object.keys(e.modifiers || {}).join(".")
}
function fr(e, t, n, r, i) {
var o = e.def && e.def[t];
if (o) try {
o(n.elm, e, n, r, i)
} catch (r) {
Re(r, n.context, "directive " + e.name + " " + t + " hook")
}
}
var pr = [er, ar];
function dr(e, r) {
var i = r.componentOptions;
if (!(n(i) && !1 === i.Ctor.options.inheritAttrs || t(e.data.attrs) && t(r.data.attrs))) {
var o, a, s = r.elm,
c = e.data.attrs || {},
u = r.data.attrs || {};
for (o in n(u.__ob__) && (u = r.data.attrs = A({}, u)), u) a = u[o], c[o] !== a && vr(s, o, a);
for (o in (q || Z) && u.value !== c.value && vr(s, "value", u.value), c) t(u[o]) && (Pn(o) ? s.removeAttributeNS(Fn, Rn(o)) : Dn(o) || s.removeAttribute(o))
}
}
function vr(e, t, n) {
e.tagName.indexOf("-") > -1 ? hr(e, t, n) : In(t) ? Hn(n) ? e.removeAttribute(t) : (n = "allowfullscreen" === t && "EMBED" === e.tagName ? "true" : t, e.setAttribute(t, n)) : Dn(t) ? e.setAttribute(t, Mn(t, n)) : Pn(t) ? Hn(n) ? e.removeAttributeNS(Fn, Rn(t)) : e.setAttributeNS(Fn, t, n) : hr(e, t, n)
}
function hr(e, t, n) {
if (Hn(n)) e.removeAttribute(t);
else {
if (q && !W && "TEXTAREA" === e.tagName && "placeholder" === t && "" !== n && !e.__ieph) {
var r = function (t) {
t.stopImmediatePropagation(), e.removeEventListener("input", r)
};
e.addEventListener("input", r), e.__ieph = !0
}
e.setAttribute(t, n)
}
}
var mr = {
create: dr,
update: dr
};
function yr(e, r) {
var i = r.elm,
o = r.data,
a = e.data;
if (!(t(o.staticClass) && t(o.class) && (t(a) || t(a.staticClass) && t(a.class)))) {
var s = Bn(r),
c = i._transitionClasses;
n(c) && (s = zn(s, Vn(c))), s !== i._prevClass && (i.setAttribute("class", s), i._prevClass = s)
}
}
var gr, _r, br, $r, wr, Cr, xr = {
create: yr,
update: yr
},
kr = /[\w).+\-_$\]]/;
function Ar(e) {
var t, n, r, i, o, a = !1,
s = !1,
c = !1,
u = !1,
l = 0,
f = 0,
p = 0,
d = 0;
for (r = 0; r < e.length; r++)
if (n = t, t = e.charCodeAt(r), a) 39 === t && 92 !== n && (a = !1);
else if (s) 34 === t && 92 !== n && (s = !1);
else if (c) 96 === t && 92 !== n && (c = !1);
else if (u) 47 === t && 92 !== n && (u = !1);
else if (124 !== t || 124 === e.charCodeAt(r + 1) || 124 === e.charCodeAt(r - 1) || l || f || p) {
switch (t) {
case 34:
s = !0;
break;
case 39:
a = !0;
break;
case 96:
c = !0;
break;
case 40:
p++;
break;
case 41:
p--;
break;
case 91:
f++;
break;
case 93:
f--;
break;
case 123:
l++;
break;
case 125:
l--
}
if (47 === t) {
for (var v = r - 1, h = void 0; v >= 0 && " " === (h = e.charAt(v)); v--);
h && kr.test(h) || (u = !0)
}
} else void 0 === i ? (d = r + 1, i = e.slice(0, r).trim()) : m();
function m() {
(o || (o = [])).push(e.slice(d, r).trim()), d = r + 1
}
if (void 0 === i ? i = e.slice(0, r).trim() : 0 !== d && m(), o)
for (r = 0; r < o.length; r++) i = Or(i, o[r]);
return i
}
function Or(e, t) {
var n = t.indexOf("(");
if (n < 0) return '_f("' + t + '")(' + e + ")";
var r = t.slice(0, n),
i = t.slice(n + 1);
return '_f("' + r + '")(' + e + (")" !== i ? "," + i : i)
}
function Sr(e, t) {
console.error("[Vue compiler]: " + e)
}
function Tr(e, t) {
return e ? e.map(function (e) {
return e[t]
}).filter(function (e) {
return e
}) : []
}
function Er(e, t, n, r, i) {
(e.props || (e.props = [])).push(Rr({
name: t,
value: n,
dynamic: i
}, r)), e.plain = !1
}
function Nr(e, t, n, r, i) {
(i ? e.dynamicAttrs || (e.dynamicAttrs = []) : e.attrs || (e.attrs = [])).push(Rr({
name: t,
value: n,
dynamic: i
}, r)), e.plain = !1
}
function jr(e, t, n, r) {
e.attrsMap[t] = n, e.attrsList.push(Rr({
name: t,
value: n
}, r))
}
function Dr(e, t, n, r, i, o, a, s) {
(e.directives || (e.directives = [])).push(Rr({
name: t,
rawName: n,
value: r,
arg: i,
isDynamicArg: o,
modifiers: a
}, s)), e.plain = !1
}
function Lr(e, t, n) {
return n ? "_p(" + t + ',"' + e + '")' : e + t
}
function Mr(t, n, r, i, o, a, s, c) {
var u;
(i = i || e).right ? c ? n = "(" + n + ")==='click'?'contextmenu':(" + n + ")" : "click" === n && (n = "contextmenu", delete i.right) : i.middle && (c ? n = "(" + n + ")==='click'?'mouseup':(" + n + ")" : "click" === n && (n = "mouseup")), i.capture && (delete i.capture, n = Lr("!", n, c)), i.once && (delete i.once, n = Lr("~", n, c)), i.passive && (delete i.passive, n = Lr("&", n, c)), i.native ? (delete i.native, u = t.nativeEvents || (t.nativeEvents = {})) : u = t.events || (t.events = {});
var l = Rr({
value: r.trim(),
dynamic: c
}, s);
i !== e && (l.modifiers = i);
var f = u[n];
Array.isArray(f) ? o ? f.unshift(l) : f.push(l) : u[n] = f ? o ? [l, f] : [f, l] : l, t.plain = !1
}
function Ir(e, t, n) {
var r = Fr(e, ":" + t) || Fr(e, "v-bind:" + t);
if (null != r) return Ar(r);
if (!1 !== n) {
var i = Fr(e, t);
if (null != i) return JSON.stringify(i)
}
}
function Fr(e, t, n) {
var r;
if (null != (r = e.attrsMap[t]))
for (var i = e.attrsList, o = 0, a = i.length; o < a; o++)
if (i[o].name === t) {
i.splice(o, 1);
break
} return n && delete e.attrsMap[t], r
}
function Pr(e, t) {
for (var n = e.attrsList, r = 0, i = n.length; r < i; r++) {
var o = n[r];
if (t.test(o.name)) return n.splice(r, 1), o
}
}
function Rr(e, t) {
return t && (null != t.start && (e.start = t.start), null != t.end && (e.end = t.end)), e
}
function Hr(e, t, n) {
var r = n || {},
i = r.number,
o = "$$v";
r.trim && (o = "(typeof $$v === 'string'? $$v.trim(): $$v)"), i && (o = "_n(" + o + ")");
var a = Br(t, o);
e.model = {
value: "(" + t + ")",
expression: JSON.stringify(t),
callback: "function ($$v) {" + a + "}"
}
}
function Br(e, t) {
var n = function (e) {
if (e = e.trim(), gr = e.length, e.indexOf("[") < 0 || e.lastIndexOf("]") < gr - 1) return ($r = e.lastIndexOf(".")) > -1 ? {
exp: e.slice(0, $r),
key: '"' + e.slice($r + 1) + '"'
} : {
exp: e,
key: null
};
_r = e, $r = wr = Cr = 0;
for (; !zr();) Vr(br = Ur()) ? Jr(br) : 91 === br && Kr(br);
return {
exp: e.slice(0, wr),
key: e.slice(wr + 1, Cr)
}
}(e);
return null === n.key ? e + "=" + t : "$set(" + n.exp + ", " + n.key + ", " + t + ")"
}
function Ur() {
return _r.charCodeAt(++$r)
}
function zr() {
return $r >= gr
}
function Vr(e) {
return 34 === e || 39 === e
}
function Kr(e) {
var t = 1;
for (wr = $r; !zr();)
if (Vr(e = Ur())) Jr(e);
else if (91 === e && t++, 93 === e && t--, 0 === t) {
Cr = $r;
break
}
}
function Jr(e) {
for (var t = e; !zr() && (e = Ur()) !== t;);
}
var qr, Wr = "__r",
Zr = "__c";
function Gr(e, t, n) {
var r = qr;
return function i() {
null !== t.apply(null, arguments) && Qr(e, i, n, r)
}
}
var Xr = Ve && !(X && Number(X[1]) <= 53);
function Yr(e, t, n, r) {
if (Xr) {
var i = an,
o = t;
t = o._wrapper = function (e) {
if (e.target === e.currentTarget || e.timeStamp >= i || e.timeStamp <= 0 || e.target.ownerDocument !== document) return o.apply(this, arguments)
}
}
qr.addEventListener(e, t, Q ? {
capture: n,
passive: r
} : n)
}
function Qr(e, t, n, r) {
(r || qr).removeEventListener(e, t._wrapper || t, n)
}
function ei(e, r) {
if (!t(e.data.on) || !t(r.data.on)) {
var i = r.data.on || {},
o = e.data.on || {};
qr = r.elm,
function (e) {
if (n(e[Wr])) {
var t = q ? "change" : "input";
e[t] = [].concat(e[Wr], e[t] || []), delete e[Wr]
}
n(e[Zr]) && (e.change = [].concat(e[Zr], e.change || []), delete e[Zr])
}(i), rt(i, o, Yr, Qr, Gr, r.context), qr = void 0
}
}
var ti, ni = {
create: ei,
update: ei
};
function ri(e, r) {
if (!t(e.data.domProps) || !t(r.data.domProps)) {
var i, o, a = r.elm,
s = e.data.domProps || {},
c = r.data.domProps || {};
for (i in n(c.__ob__) && (c = r.data.domProps = A({}, c)), s) i in c || (a[i] = "");
for (i in c) {
if (o = c[i], "textContent" === i || "innerHTML" === i) {
if (r.children && (r.children.length = 0), o === s[i]) continue;
1 === a.childNodes.length && a.removeChild(a.childNodes[0])
}
if ("value" === i && "PROGRESS" !== a.tagName) {
a._value = o;
var u = t(o) ? "" : String(o);
ii(a, u) && (a.value = u)
} else if ("innerHTML" === i && qn(a.tagName) && t(a.innerHTML)) {
(ti = ti || document.createElement("div")).innerHTML = "<svg>" + o + "</svg>";
for (var l = ti.firstChild; a.firstChild;) a.removeChild(a.firstChild);
for (; l.firstChild;) a.appendChild(l.firstChild)
} else if (o !== s[i]) try {
a[i] = o
} catch (e) {}
}
}
}
function ii(e, t) {
return !e.composing && ("OPTION" === e.tagName || function (e, t) {
var n = !0;
try {
n = document.activeElement !== e
} catch (e) {}
return n && e.value !== t
}(e, t) || function (e, t) {
var r = e.value,
i = e._vModifiers;
if (n(i)) {
if (i.number) return f(r) !== f(t);
if (i.trim) return r.trim() !== t.trim()
}
return r !== t
}(e, t))
}
var oi = {
create: ri,
update: ri
},
ai = g(function (e) {
var t = {},
n = /:(.+)/;
return e.split(/;(?![^(]*\))/g).forEach(function (e) {
if (e) {
var r = e.split(n);
r.length > 1 && (t[r[0].trim()] = r[1].trim())
}
}), t
});
function si(e) {
var t = ci(e.style);
return e.staticStyle ? A(e.staticStyle, t) : t
}
function ci(e) {
return Array.isArray(e) ? O(e) : "string" == typeof e ? ai(e) : e
}
var ui, li = /^--/,
fi = /\s*!important$/,
pi = function (e, t, n) {
if (li.test(t)) e.style.setProperty(t, n);
else if (fi.test(n)) e.style.setProperty(C(t), n.replace(fi, ""), "important");
else {
var r = vi(t);
if (Array.isArray(n))
for (var i = 0, o = n.length; i < o; i++) e.style[r] = n[i];
else e.style[r] = n
}
},
di = ["Webkit", "Moz", "ms"],
vi = g(function (e) {
if (ui = ui || document.createElement("div").style, "filter" !== (e = b(e)) && e in ui) return e;
for (var t = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < di.length; n++) {
var r = di[n] + t;
if (r in ui) return r
}
});
function hi(e, r) {
var i = r.data,
o = e.data;
if (!(t(i.staticStyle) && t(i.style) && t(o.staticStyle) && t(o.style))) {
var a, s, c = r.elm,
u = o.staticStyle,
l = o.normalizedStyle || o.style || {},
f = u || l,
p = ci(r.data.style) || {};
r.data.normalizedStyle = n(p.__ob__) ? A({}, p) : p;
var d = function (e, t) {
var n, r = {};
if (t)
for (var i = e; i.componentInstance;)(i = i.componentInstance._vnode) && i.data && (n = si(i.data)) && A(r, n);
(n = si(e.data)) && A(r, n);
for (var o = e; o = o.parent;) o.data && (n = si(o.data)) && A(r, n);
return r
}(r, !0);
for (s in f) t(d[s]) && pi(c, s, "");
for (s in d)(a = d[s]) !== f[s] && pi(c, s, null == a ? "" : a)
}
}
var mi = {
create: hi,
update: hi
},
yi = /\s+/;
function gi(e, t) {
if (t && (t = t.trim()))
if (e.classList) t.indexOf(" ") > -1 ? t.split(yi).forEach(function (t) {
return e.classList.add(t)
}) : e.classList.add(t);
else {
var n = " " + (e.getAttribute("class") || "") + " ";
n.indexOf(" " + t + " ") < 0 && e.setAttribute("class", (n + t).trim())
}
}
function _i(e, t) {
if (t && (t = t.trim()))
if (e.classList) t.indexOf(" ") > -1 ? t.split(yi).forEach(function (t) {
return e.classList.remove(t)
}) : e.classList.remove(t), e.classList.length || e.removeAttribute("class");
else {
for (var n = " " + (e.getAttribute("class") || "") + " ", r = " " + t + " "; n.indexOf(r) >= 0;) n = n.replace(r, " ");
(n = n.trim()) ? e.setAttribute("class", n): e.removeAttribute("class")
}
}
function bi(e) {
if (e) {
if ("object" == typeof e) {
var t = {};
return !1 !== e.css && A(t, $i(e.name || "v")), A(t, e), t
}
return "string" == typeof e ? $i(e) : void 0
}
}
var $i = g(function (e) {
return {
enterClass: e + "-enter",
enterToClass: e + "-enter-to",
enterActiveClass: e + "-enter-active",
leaveClass: e + "-leave",
leaveToClass: e + "-leave-to",
leaveActiveClass: e + "-leave-active"
}
}),
wi = z && !W,
Ci = "transition",
xi = "animation",
ki = "transition",
Ai = "transitionend",
Oi = "animation",
Si = "animationend";
wi && (void 0 === window.ontransitionend && void 0 !== window.onwebkittransitionend && (ki = "WebkitTransition", Ai = "webkitTransitionEnd"), void 0 === window.onanimationend && void 0 !== window.onwebkitanimationend && (Oi = "WebkitAnimation", Si = "webkitAnimationEnd"));
var Ti = z ? window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout : function (e) {
return e()
};
function Ei(e) {
Ti(function () {
Ti(e)
})
}
function Ni(e, t) {
var n = e._transitionClasses || (e._transitionClasses = []);
n.indexOf(t) < 0 && (n.push(t), gi(e, t))
}
function ji(e, t) {
e._transitionClasses && h(e._transitionClasses, t), _i(e, t)
}
function Di(e, t, n) {
var r = Mi(e, t),
i = r.type,
o = r.timeout,
a = r.propCount;
if (!i) return n();
var s = i === Ci ? Ai : Si,
c = 0,
u = function () {
e.removeEventListener(s, l), n()
},
l = function (t) {
t.target === e && ++c >= a && u()
};
setTimeout(function () {
c < a && u()
}, o + 1), e.addEventListener(s, l)
}
var Li = /\b(transform|all)(,|$)/;
function Mi(e, t) {
var n, r = window.getComputedStyle(e),
i = (r[ki + "Delay"] || "").split(", "),
o = (r[ki + "Duration"] || "").split(", "),
a = Ii(i, o),
s = (r[Oi + "Delay"] || "").split(", "),
c = (r[Oi + "Duration"] || "").split(", "),
u = Ii(s, c),
l = 0,
f = 0;
return t === Ci ? a > 0 && (n = Ci, l = a, f = o.length) : t === xi ? u > 0 && (n = xi, l = u, f = c.length) : f = (n = (l = Math.max(a, u)) > 0 ? a > u ? Ci : xi : null) ? n === Ci ? o.length : c.length : 0, {
type: n,
timeout: l,
propCount: f,
hasTransform: n === Ci && Li.test(r[ki + "Property"])
}
}
function Ii(e, t) {
for (; e.length < t.length;) e = e.concat(e);
return Math.max.apply(null, t.map(function (t, n) {
return Fi(t) + Fi(e[n])
}))
}
function Fi(e) {
return 1e3 * Number(e.slice(0, -1).replace(",", "."))
}
function Pi(e, r) {
var i = e.elm;
n(i._leaveCb) && (i._leaveCb.cancelled = !0, i._leaveCb());
var a = bi(e.data.transition);
if (!t(a) && !n(i._enterCb) && 1 === i.nodeType) {
for (var s = a.css, c = a.type, u = a.enterClass, l = a.enterToClass, p = a.enterActiveClass, d = a.appearClass, v = a.appearToClass, h = a.appearActiveClass, m = a.beforeEnter, y = a.enter, g = a.afterEnter, _ = a.enterCancelled, b = a.beforeAppear, $ = a.appear, w = a.afterAppear, C = a.appearCancelled, x = a.duration, k = Wt, A = Wt.$vnode; A && A.parent;) k = A.context, A = A.parent;
var O = !k._isMounted || !e.isRootInsert;
if (!O || $ || "" === $) {
var S = O && d ? d : u,
T = O && h ? h : p,
E = O && v ? v : l,
N = O && b || m,
j = O && "function" == typeof $ ? $ : y,
L = O && w || g,
M = O && C || _,
I = f(o(x) ? x.enter : x),
F = !1 !== s && !W,
P = Bi(j),
R = i._enterCb = D(function () {
F && (ji(i, E), ji(i, T)), R.cancelled ? (F && ji(i, S), M && M(i)) : L && L(i), i._enterCb = null
});
e.data.show || it(e, "insert", function () {
var t = i.parentNode,
n = t && t._pending && t._pending[e.key];
n && n.tag === e.tag && n.elm._leaveCb && n.elm._leaveCb(), j && j(i, R)
}), N && N(i), F && (Ni(i, S), Ni(i, T), Ei(function () {
ji(i, S), R.cancelled || (Ni(i, E), P || (Hi(I) ? setTimeout(R, I) : Di(i, c, R)))
})), e.data.show && (r && r(), j && j(i, R)), F || P || R()
}
}
}
function Ri(e, r) {
var i = e.elm;
n(i._enterCb) && (i._enterCb.cancelled = !0, i._enterCb());
var a = bi(e.data.transition);
if (t(a) || 1 !== i.nodeType) return r();
if (!n(i._leaveCb)) {
var s = a.css,
c = a.type,
u = a.leaveClass,
l = a.leaveToClass,
p = a.leaveActiveClass,
d = a.beforeLeave,
v = a.leave,
h = a.afterLeave,
m = a.leaveCancelled,
y = a.delayLeave,
g = a.duration,
_ = !1 !== s && !W,
b = Bi(v),
$ = f(o(g) ? g.leave : g),
w = i._leaveCb = D(function () {
i.parentNode && i.parentNode._pending && (i.parentNode._pending[e.key] = null), _ && (ji(i, l), ji(i, p)), w.cancelled ? (_ && ji(i, u), m && m(i)) : (r(), h && h(i)), i._leaveCb = null
});
y ? y(C) : C()
}
function C() {
w.cancelled || (!e.data.show && i.parentNode && ((i.parentNode._pending || (i.parentNode._pending = {}))[e.key] = e), d && d(i), _ && (Ni(i, u), Ni(i, p), Ei(function () {
ji(i, u), w.cancelled || (Ni(i, l), b || (Hi($) ? setTimeout(w, $) : Di(i, c, w)))
})), v && v(i, w), _ || b || w())
}
}
function Hi(e) {
return "number" == typeof e && !isNaN(e)
}
function Bi(e) {
if (t(e)) return !1;
var r = e.fns;
return n(r) ? Bi(Array.isArray(r) ? r[0] : r) : (e._length || e.length) > 1
}
function Ui(e, t) {
!0 !== t.data.show && Pi(t)
}
var zi = function (e) {
var o, a, s = {},
c = e.modules,
u = e.nodeOps;
for (o = 0; o < rr.length; ++o)
for (s[rr[o]] = [], a = 0; a < c.length; ++a) n(c[a][rr[o]]) && s[rr[o]].push(c[a][rr[o]]);
function l(e) {
var t = u.parentNode(e);
n(t) && u.removeChild(t, e)
}
function f(e, t, i, o, a, c, l) {
if (n(e.elm) && n(c) && (e = c[l] = me(e)), e.isRootInsert = !a, ! function (e, t, i, o) {
var a = e.data;
if (n(a)) {
var c = n(e.componentInstance) && a.keepAlive;
if (n(a = a.hook) && n(a = a.init) && a(e, !1), n(e.componentInstance)) return d(e, t), v(i, e.elm, o), r(c) && function (e, t, r, i) {
for (var o, a = e; a.componentInstance;)
if (a = a.componentInstance._vnode, n(o = a.data) && n(o = o.transition)) {
for (o = 0; o < s.activate.length; ++o) s.activate[o](nr, a);
t.push(a);
break
} v(r, e.elm, i)
}(e, t, i, o), !0
}
}(e, t, i, o)) {
var f = e.data,
p = e.children,
m = e.tag;
n(m) ? (e.elm = e.ns ? u.createElementNS(e.ns, m) : u.createElement(m, e), g(e), h(e, p, t), n(f) && y(e, t), v(i, e.elm, o)) : r(e.isComment) ? (e.elm = u.createComment(e.text), v(i, e.elm, o)) : (e.elm = u.createTextNode(e.text), v(i, e.elm, o))
}
}
function d(e, t) {
n(e.data.pendingInsert) && (t.push.apply(t, e.data.pendingInsert), e.data.pendingInsert = null), e.elm = e.componentInstance.$el, m(e) ? (y(e, t), g(e)) : (tr(e), t.push(e))
}
function v(e, t, r) {
n(e) && (n(r) ? u.parentNode(r) === e && u.insertBefore(e, t, r) : u.appendChild(e, t))
}
function h(e, t, n) {
if (Array.isArray(t))
for (var r = 0; r < t.length; ++r) f(t[r], n, e.elm, null, !0, t, r);
else i(e.text) && u.appendChild(e.elm, u.createTextNode(String(e.text)))
}
function m(e) {
for (; e.componentInstance;) e = e.componentInstance._vnode;
return n(e.tag)
}
function y(e, t) {
for (var r = 0; r < s.create.length; ++r) s.create[r](nr, e);
n(o = e.data.hook) && (n(o.create) && o.create(nr, e), n(o.insert) && t.push(e))
}
function g(e) {
var t;
if (n(t = e.fnScopeId)) u.setStyleScope(e.elm, t);
else
for (var r = e; r;) n(t = r.context) && n(t = t.$options._scopeId) && u.setStyleScope(e.elm, t), r = r.parent;
n(t = Wt) && t !== e.context && t !== e.fnContext && n(t = t.$options._scopeId) && u.setStyleScope(e.elm, t)
}
function _(e, t, n, r, i, o) {
for (; r <= i; ++r) f(n[r], o, e, t, !1, n, r)
}
function b(e) {
var t, r, i = e.data;
if (n(i))
for (n(t = i.hook) && n(t = t.destroy) && t(e), t = 0; t < s.destroy.length; ++t) s.destroy[t](e);
if (n(t = e.children))
for (r = 0; r < e.children.length; ++r) b(e.children[r])
}
function $(e, t, r) {
for (; t <= r; ++t) {
var i = e[t];
n(i) && (n(i.tag) ? (w(i), b(i)) : l(i.elm))
}
}
function w(e, t) {
if (n(t) || n(e.data)) {
var r, i = s.remove.length + 1;
for (n(t) ? t.listeners += i : t = function (e, t) {
function n() {
0 == --n.listeners && l(e)
}
return n.listeners = t, n
}(e.elm, i), n(r = e.componentInstance) && n(r = r._vnode) && n(r.data) && w(r, t), r = 0; r < s.remove.length; ++r) s.remove[r](e, t);
n(r = e.data.hook) && n(r = r.remove) ? r(e, t) : t()
} else l(e.elm)
}
function C(e, t, r, i) {
for (var o = r; o < i; o++) {
var a = t[o];
if (n(a) && ir(e, a)) return o
}
}
function x(e, i, o, a, c, l) {
if (e !== i) {
n(i.elm) && n(a) && (i = a[c] = me(i));
var p = i.elm = e.elm;
if (r(e.isAsyncPlaceholder)) n(i.asyncFactory.resolved) ? O(e.elm, i, o) : i.isAsyncPlaceholder = !0;
else if (r(i.isStatic) && r(e.isStatic) && i.key === e.key && (r(i.isCloned) || r(i.isOnce))) i.componentInstance = e.componentInstance;
else {
var d, v = i.data;
n(v) && n(d = v.hook) && n(d = d.prepatch) && d(e, i);
var h = e.children,
y = i.children;
if (n(v) && m(i)) {
for (d = 0; d < s.update.length; ++d) s.update[d](e, i);
n(d = v.hook) && n(d = d.update) && d(e, i)
}
t(i.text) ? n(h) && n(y) ? h !== y && function (e, r, i, o, a) {
for (var s, c, l, p = 0, d = 0, v = r.length - 1, h = r[0], m = r[v], y = i.length - 1, g = i[0], b = i[y], w = !a; p <= v && d <= y;) t(h) ? h = r[++p] : t(m) ? m = r[--v] : ir(h, g) ? (x(h, g, o, i, d), h = r[++p], g = i[++d]) : ir(m, b) ? (x(m, b, o, i, y), m = r[--v], b = i[--y]) : ir(h, b) ? (x(h, b, o, i, y), w && u.insertBefore(e, h.elm, u.nextSibling(m.elm)), h = r[++p], b = i[--y]) : ir(m, g) ? (x(m, g, o, i, d), w && u.insertBefore(e, m.elm, h.elm), m = r[--v], g = i[++d]) : (t(s) && (s = or(r, p, v)), t(c = n(g.key) ? s[g.key] : C(g, r, p, v)) ? f(g, o, e, h.elm, !1, i, d) : ir(l = r[c], g) ? (x(l, g, o, i, d), r[c] = void 0, w && u.insertBefore(e, l.elm, h.elm)) : f(g, o, e, h.elm, !1, i, d), g = i[++d]);
p > v ? _(e, t(i[y + 1]) ? null : i[y + 1].elm, i, d, y, o) : d > y && $(r, p, v)
}(p, h, y, o, l) : n(y) ? (n(e.text) && u.setTextContent(p, ""), _(p, null, y, 0, y.length - 1, o)) : n(h) ? $(h, 0, h.length - 1) : n(e.text) && u.setTextContent(p, "") : e.text !== i.text && u.setTextContent(p, i.text), n(v) && n(d = v.hook) && n(d = d.postpatch) && d(e, i)
}
}
}
function k(e, t, i) {
if (r(i) && n(e.parent)) e.parent.data.pendingInsert = t;
else
for (var o = 0; o < t.length; ++o) t[o].data.hook.insert(t[o])
}
var A = p("attrs,class,staticClass,staticStyle,key");
function O(e, t, i, o) {
var a, s = t.tag,
c = t.data,
u = t.children;
if (o = o || c && c.pre, t.elm = e, r(t.isComment) && n(t.asyncFactory)) return t.isAsyncPlaceholder = !0, !0;
if (n(c) && (n(a = c.hook) && n(a = a.init) && a(t, !0), n(a = t.componentInstance))) return d(t, i), !0;
if (n(s)) {
if (n(u))
if (e.hasChildNodes())
if (n(a = c) && n(a = a.domProps) && n(a = a.innerHTML)) {
if (a !== e.innerHTML) return !1
} else {
for (var l = !0, f = e.firstChild, p = 0; p < u.length; p++) {
if (!f || !O(f, u[p], i, o)) {
l = !1;
break
}
f = f.nextSibling
}
if (!l || f) return !1
}
else h(t, u, i);
if (n(c)) {
var v = !1;
for (var m in c)
if (!A(m)) {
v = !0, y(t, i);
break
}! v && c.class && et(c.class)
}
} else e.data !== t.text && (e.data = t.text);
return !0
}
return function (e, i, o, a) {
if (!t(i)) {
var c, l = !1,
p = [];
if (t(e)) l = !0, f(i, p);
else {
var d = n(e.nodeType);
if (!d && ir(e, i)) x(e, i, p, null, null, a);
else {
if (d) {
if (1 === e.nodeType && e.hasAttribute(L) && (e.removeAttribute(L), o = !0), r(o) && O(e, i, p)) return k(i, p, !0), e;
c = e, e = new pe(u.tagName(c).toLowerCase(), {}, [], void 0, c)
}
var v = e.elm,
h = u.parentNode(v);
if (f(i, p, v._leaveCb ? null : h, u.nextSibling(v)), n(i.parent))
for (var y = i.parent, g = m(i); y;) {
for (var _ = 0; _ < s.destroy.length; ++_) s.destroy[_](y);
if (y.elm = i.elm, g) {
for (var w = 0; w < s.create.length; ++w) s.create[w](nr, y);
var C = y.data.hook.insert;
if (C.merged)
for (var A = 1; A < C.fns.length; A++) C.fns[A]()
} else tr(y);
y = y.parent
}
n(h) ? $([e], 0, 0) : n(e.tag) && b(e)
}
}
return k(i, p, l), i.elm
}
n(e) && b(e)
}
}({
nodeOps: Qn,
modules: [mr, xr, ni, oi, mi, z ? {
create: Ui,
activate: Ui,
remove: function (e, t) {
!0 !== e.data.show ? Ri(e, t) : t()
}
} : {}].concat(pr)
});
W && document.addEventListener("selectionchange", function () {
var e = document.activeElement;
e && e.vmodel && Xi(e, "input")
});
var Vi = {
inserted: function (e, t, n, r) {
"select" === n.tag ? (r.elm && !r.elm._vOptions ? it(n, "postpatch", function () {
Vi.componentUpdated(e, t, n)
}) : Ki(e, t, n.context), e._vOptions = [].map.call(e.options, Wi)) : ("textarea" === n.tag || Xn(e.type)) && (e._vModifiers = t.modifiers, t.modifiers.lazy || (e.addEventListener("compositionstart", Zi), e.addEventListener("compositionend", Gi), e.addEventListener("change", Gi), W && (e.vmodel = !0)))
},
componentUpdated: function (e, t, n) {
if ("select" === n.tag) {
Ki(e, t, n.context);
var r = e._vOptions,
i = e._vOptions = [].map.call(e.options, Wi);
if (i.some(function (e, t) {
return !N(e, r[t])
}))(e.multiple ? t.value.some(function (e) {
return qi(e, i)
}) : t.value !== t.oldValue && qi(t.value, i)) && Xi(e, "change")
}
}
};
function Ki(e, t, n) {
Ji(e, t, n), (q || Z) && setTimeout(function () {
Ji(e, t, n)
}, 0)
}
function Ji(e, t, n) {
var r = t.value,
i = e.multiple;
if (!i || Array.isArray(r)) {
for (var o, a, s = 0, c = e.options.length; s < c; s++)
if (a = e.options[s], i) o = j(r, Wi(a)) > -1, a.selected !== o && (a.selected = o);
else if (N(Wi(a), r)) return void(e.selectedIndex !== s && (e.selectedIndex = s));
i || (e.selectedIndex = -1)
}
}
function qi(e, t) {
return t.every(function (t) {
return !N(t, e)
})
}
function Wi(e) {
return "_value" in e ? e._value : e.value
}
function Zi(e) {
e.target.composing = !0
}
function Gi(e) {
e.target.composing && (e.target.composing = !1, Xi(e.target, "input"))
}
function Xi(e, t) {
var n = document.createEvent("HTMLEvents");
n.initEvent(t, !0, !0), e.dispatchEvent(n)
}
function Yi(e) {
return !e.componentInstance || e.data && e.data.transition ? e : Yi(e.componentInstance._vnode)
}
var Qi = {
model: Vi,
show: {
bind: function (e, t, n) {
var r = t.value,
i = (n = Yi(n)).data && n.data.transition,
o = e.__vOriginalDisplay = "none" === e.style.display ? "" : e.style.display;
r && i ? (n.data.show = !0, Pi(n, function () {
e.style.display = o
})) : e.style.display = r ? o : "none"
},
update: function (e, t, n) {
var r = t.value;
!r != !t.oldValue && ((n = Yi(n)).data && n.data.transition ? (n.data.show = !0, r ? Pi(n, function () {
e.style.display = e.__vOriginalDisplay
}) : Ri(n, function () {
e.style.display = "none"
})) : e.style.display = r ? e.__vOriginalDisplay : "none")
},
unbind: function (e, t, n, r, i) {
i || (e.style.display = e.__vOriginalDisplay)
}
}
},
eo = {
name: String,
appear: Boolean,
css: Boolean,
mode: String,
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String,
appearToClass: String,
duration: [Number, String, Object]
};
function to(e) {
var t = e && e.componentOptions;
return t && t.Ctor.options.abstract ? to(zt(t.children)) : e
}
function no(e) {
var t = {},
n = e.$options;
for (var r in n.propsData) t[r] = e[r];
var i = n._parentListeners;
for (var o in i) t[b(o)] = i[o];
return t
}
function ro(e, t) {
if (/\d-keep-alive$/.test(t.tag)) return e("keep-alive", {
props: t.componentOptions.propsData
})
}
var io = function (e) {
return e.tag || Ut(e)
},
oo = function (e) {
return "show" === e.name
},
ao = {
name: "transition",
props: eo,
abstract: !0,
render: function (e) {
var t = this,
n = this.$slots.default;
if (n && (n = n.filter(io)).length) {
var r = this.mode,
o = n[0];
if (function (e) {
for (; e = e.parent;)
if (e.data.transition) return !0
}(this.$vnode)) return o;
var a = to(o);
if (!a) return o;
if (this._leaving) return ro(e, o);
var s = "__transition-" + this._uid + "-";
a.key = null == a.key ? a.isComment ? s + "comment" : s + a.tag : i(a.key) ? 0 === String(a.key).indexOf(s) ? a.key : s + a.key : a.key;
var c = (a.data || (a.data = {})).transition = no(this),
u = this._vnode,
l = to(u);
if (a.data.directives && a.data.directives.some(oo) && (a.data.show = !0), l && l.data && ! function (e, t) {
return t.key === e.key && t.tag === e.tag
}(a, l) && !Ut(l) && (!l.componentInstance || !l.componentInstance._vnode.isComment)) {
var f = l.data.transition = A({}, c);
if ("out-in" === r) return this._leaving = !0, it(f, "afterLeave", function () {
t._leaving = !1, t.$forceUpdate()
}), ro(e, o);
if ("in-out" === r) {
if (Ut(a)) return u;
var p, d = function () {
p()
};
it(c, "afterEnter", d), it(c, "enterCancelled", d), it(f, "delayLeave", function (e) {
p = e
})
}
}
return o
}
}
},
so = A({
tag: String,
moveClass: String
}, eo);
function co(e) {
e.elm._moveCb && e.elm._moveCb(), e.elm._enterCb && e.elm._enterCb()
}
function uo(e) {
e.data.newPos = e.elm.getBoundingClientRect()
}
function lo(e) {
var t = e.data.pos,
n = e.data.newPos,
r = t.left - n.left,
i = t.top - n.top;
if (r || i) {
e.data.moved = !0;
var o = e.elm.style;
o.transform = o.WebkitTransform = "translate(" + r + "px," + i + "px)", o.transitionDuration = "0s"
}
}
delete so.mode;
var fo = {
Transition: ao,
TransitionGroup: {
props: so,
beforeMount: function () {
var e = this,
t = this._update;
this._update = function (n, r) {
var i = Zt(e);
e.__patch__(e._vnode, e.kept, !1, !0), e._vnode = e.kept, i(), t.call(e, n, r)
}
},
render: function (e) {
for (var t = this.tag || this.$vnode.data.tag || "span", n = Object.create(null), r = this.prevChildren = this.children, i = this.$slots.default || [], o = this.children = [], a = no(this), s = 0; s < i.length; s++) {
var c = i[s];
c.tag && null != c.key && 0 !== String(c.key).indexOf("__vlist") && (o.push(c), n[c.key] = c, (c.data || (c.data = {})).transition = a)
}
if (r) {
for (var u = [], l = [], f = 0; f < r.length; f++) {
var p = r[f];
p.data.transition = a, p.data.pos = p.elm.getBoundingClientRect(), n[p.key] ? u.push(p) : l.push(p)
}
this.kept = e(t, null, u), this.removed = l
}
return e(t, null, o)
},
updated: function () {
var e = this.prevChildren,
t = this.moveClass || (this.name || "v") + "-move";
e.length && this.hasMove(e[0].elm, t) && (e.forEach(co), e.forEach(uo), e.forEach(lo), this._reflow = document.body.offsetHeight, e.forEach(function (e) {
if (e.data.moved) {
var n = e.elm,
r = n.style;
Ni(n, t), r.transform = r.WebkitTransform = r.transitionDuration = "", n.addEventListener(Ai, n._moveCb = function e(r) {
r && r.target !== n || r && !/transform$/.test(r.propertyName) || (n.removeEventListener(Ai, e), n._moveCb = null, ji(n, t))
})
}
}))
},
methods: {
hasMove: function (e, t) {
if (!wi) return !1;
if (this._hasMove) return this._hasMove;
var n = e.cloneNode();
e._transitionClasses && e._transitionClasses.forEach(function (e) {
_i(n, e)
}), gi(n, t), n.style.display = "none", this.$el.appendChild(n);
var r = Mi(n);
return this.$el.removeChild(n), this._hasMove = r.hasTransform
}
}
}
};
wn.config.mustUseProp = jn, wn.config.isReservedTag = Wn, wn.config.isReservedAttr = En, wn.config.getTagNamespace = Zn, wn.config.isUnknownElement = function (e) {
if (!z) return !0;
if (Wn(e)) return !1;
if (e = e.toLowerCase(), null != Gn[e]) return Gn[e];
var t = document.createElement(e);
return e.indexOf("-") > -1 ? Gn[e] = t.constructor === window.HTMLUnknownElement || t.constructor === window.HTMLElement : Gn[e] = /HTMLUnknownElement/.test(t.toString())
}, A(wn.options.directives, Qi), A(wn.options.components, fo), wn.prototype.__patch__ = z ? zi : S, wn.prototype.$mount = function (e, t) {
return function (e, t, n) {
var r;
return e.$el = t, e.$options.render || (e.$options.render = ve), Yt(e, "beforeMount"), r = function () {
e._update(e._render(), n)
}, new fn(e, r, S, {
before: function () {
e._isMounted && !e._isDestroyed && Yt(e, "beforeUpdate")
}
}, !0), n = !1, null == e.$vnode && (e._isMounted = !0, Yt(e, "mounted")), e
}(this, e = e && z ? Yn(e) : void 0, t)
}, z && setTimeout(function () {
F.devtools && ne && ne.emit("init", wn)
}, 0);
var po = /\{\{((?:.|\r?\n)+?)\}\}/g,
vo = /[-.*+?^${}()|[\]\/\\]/g,
ho = g(function (e) {
var t = e[0].replace(vo, "\\$&"),
n = e[1].replace(vo, "\\$&");
return new RegExp(t + "((?:.|\\n)+?)" + n, "g")
});
var mo = {
staticKeys: ["staticClass"],
transformNode: function (e, t) {
t.warn;
var n = Fr(e, "class");
n && (e.staticClass = JSON.stringify(n));
var r = Ir(e, "class", !1);
r && (e.classBinding = r)
},
genData: function (e) {
var t = "";
return e.staticClass && (t += "staticClass:" + e.staticClass + ","), e.classBinding && (t += "class:" + e.classBinding + ","), t
}
};
var yo, go = {
staticKeys: ["staticStyle"],
transformNode: function (e, t) {
t.warn;
var n = Fr(e, "style");
n && (e.staticStyle = JSON.stringify(ai(n)));
var r = Ir(e, "style", !1);
r && (e.styleBinding = r)
},
genData: function (e) {
var t = "";
return e.staticStyle && (t += "staticStyle:" + e.staticStyle + ","), e.styleBinding && (t += "style:(" + e.styleBinding + "),"), t
}
},
_o = function (e) {
return (yo = yo || document.createElement("div")).innerHTML = e, yo.textContent
},
bo = p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),
$o = p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),
wo = p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),
Co = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,
xo = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,
ko = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + P.source + "]*",
Ao = "((?:" + ko + "\\:)?" + ko + ")",
Oo = new RegExp("^<" + Ao),
So = /^\s*(\/?)>/,
To = new RegExp("^<\\/" + Ao + "[^>]*>"),
Eo = /^<!DOCTYPE [^>]+>/i,
No = /^<!\--/,
jo = /^<!\[/,
Do = p("script,style,textarea", !0),
Lo = {},
Mo = {
"<": "<",
">": ">",
""": '"',
"&": "&",
" ": "\n",
"	": "\t",
"'": "'"
},
Io = /&(?:lt|gt|quot|amp|#39);/g,
Fo = /&(?:lt|gt|quot|amp|#39|#10|#9);/g,
Po = p("pre,textarea", !0),
Ro = function (e, t) {
return e && Po(e) && "\n" === t[0]
};
function Ho(e, t) {
var n = t ? Fo : Io;
return e.replace(n, function (e) {
return Mo[e]
})
}
var Bo, Uo, zo, Vo, Ko, Jo, qo, Wo, Zo = /^@|^v-on:/,
Go = /^v-|^@|^:|^#/,
Xo = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,
Yo = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/,
Qo = /^\(|\)$/g,
ea = /^\[.*\]$/,
ta = /:(.*)$/,
na = /^:|^\.|^v-bind:/,
ra = /\.[^.\]]+(?=[^\]]*$)/g,
ia = /^v-slot(:|$)|^#/,
oa = /[\r\n]/,
aa = /\s+/g,
sa = g(_o),
ca = "_empty_";
function ua(e, t, n) {
return {
type: 1,
tag: e,
attrsList: t,
attrsMap: ma(t),
rawAttrsMap: {},
parent: n,
children: []
}
}
function la(e, t) {
Bo = t.warn || Sr, Jo = t.isPreTag || T, qo = t.mustUseProp || T, Wo = t.getTagNamespace || T;
t.isReservedTag;
zo = Tr(t.modules, "transformNode"), Vo = Tr(t.modules, "preTransformNode"), Ko = Tr(t.modules, "postTransformNode"), Uo = t.delimiters;
var n, r, i = [],
o = !1 !== t.preserveWhitespace,
a = t.whitespace,
s = !1,
c = !1;
function u(e) {
if (l(e), s || e.processed || (e = fa(e, t)), i.length || e === n || n.if && (e.elseif || e.else) && da(n, {
exp: e.elseif,
block: e
}), r && !e.forbidden)
if (e.elseif || e.else) a = e, (u = function (e) {
var t = e.length;
for (; t--;) {
if (1 === e[t].type) return e[t];
e.pop()
}
}(r.children)) && u.if && da(u, {
exp: a.elseif,
block: a
});
else {
if (e.slotScope) {
var o = e.slotTarget || '"default"';
(r.scopedSlots || (r.scopedSlots = {}))[o] = e
}
r.children.push(e), e.parent = r
} var a, u;
e.children = e.children.filter(function (e) {
return !e.slotScope
}), l(e), e.pre && (s = !1), Jo(e.tag) && (c = !1);
for (var f = 0; f < Ko.length; f++) Ko[f](e, t)
}
function l(e) {
if (!c)
for (var t;
(t = e.children[e.children.length - 1]) && 3 === t.type && " " === t.text;) e.children.pop()
}
return function (e, t) {
for (var n, r, i = [], o = t.expectHTML, a = t.isUnaryTag || T, s = t.canBeLeftOpenTag || T, c = 0; e;) {
if (n = e, r && Do(r)) {
var u = 0,
l = r.toLowerCase(),
f = Lo[l] || (Lo[l] = new RegExp("([\\s\\S]*?)(</" + l + "[^>]*>)", "i")),
p = e.replace(f, function (e, n, r) {
return u = r.length, Do(l) || "noscript" === l || (n = n.replace(/<!\--([\s\S]*?)-->/g, "$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g, "$1")), Ro(l, n) && (n = n.slice(1)), t.chars && t.chars(n), ""
});
c += e.length - p.length, e = p, A(l, c - u, c)
} else {
var d = e.indexOf("<");
if (0 === d) {
if (No.test(e)) {
var v = e.indexOf("--\x3e");
if (v >= 0) {
t.shouldKeepComment && t.comment(e.substring(4, v), c, c + v + 3), C(v + 3);
continue
}
}
if (jo.test(e)) {
var h = e.indexOf("]>");
if (h >= 0) {
C(h + 2);
continue
}
}
var m = e.match(Eo);
if (m) {
C(m[0].length);
continue
}
var y = e.match(To);
if (y) {
var g = c;
C(y[0].length), A(y[1], g, c);
continue
}
var _ = x();
if (_) {
k(_), Ro(_.tagName, e) && C(1);
continue
}
}
var b = void 0,
$ = void 0,
w = void 0;
if (d >= 0) {
for ($ = e.slice(d); !(To.test($) || Oo.test($) || No.test($) || jo.test($) || (w = $.indexOf("<", 1)) < 0);) d += w, $ = e.slice(d);
b = e.substring(0, d)
}
d < 0 && (b = e), b && C(b.length), t.chars && b && t.chars(b, c - b.length, c)
}
if (e === n) {
t.chars && t.chars(e);
break
}
}
function C(t) {
c += t, e = e.substring(t)
}
function x() {
var t = e.match(Oo);
if (t) {
var n, r, i = {
tagName: t[1],
attrs: [],
start: c
};
for (C(t[0].length); !(n = e.match(So)) && (r = e.match(xo) || e.match(Co));) r.start = c, C(r[0].length), r.end = c, i.attrs.push(r);
if (n) return i.unarySlash = n[1], C(n[0].length), i.end = c, i
}
}
function k(e) {
var n = e.tagName,
c = e.unarySlash;
o && ("p" === r && wo(n) && A(r), s(n) && r === n && A(n));
for (var u = a(n) || !!c, l = e.attrs.length, f = new Array(l), p = 0; p < l; p++) {
var d = e.attrs[p],
v = d[3] || d[4] || d[5] || "",
h = "a" === n && "href" === d[1] ? t.shouldDecodeNewlinesForHref : t.shouldDecodeNewlines;
f[p] = {
name: d[1],
value: Ho(v, h)
}
}
u || (i.push({
tag: n,
lowerCasedTag: n.toLowerCase(),
attrs: f,
start: e.start,
end: e.end
}), r = n), t.start && t.start(n, f, u, e.start, e.end)
}
function A(e, n, o) {
var a, s;
if (null == n && (n = c), null == o && (o = c), e)
for (s = e.toLowerCase(), a = i.length - 1; a >= 0 && i[a].lowerCasedTag !== s; a--);
else a = 0;
if (a >= 0) {
for (var u = i.length - 1; u >= a; u--) t.end && t.end(i[u].tag, n, o);
i.length = a, r = a && i[a - 1].tag
} else "br" === s ? t.start && t.start(e, [], !0, n, o) : "p" === s && (t.start && t.start(e, [], !1, n, o), t.end && t.end(e, n, o))
}
A()
}(e, {
warn: Bo,
expectHTML: t.expectHTML,
isUnaryTag: t.isUnaryTag,
canBeLeftOpenTag: t.canBeLeftOpenTag,
shouldDecodeNewlines: t.shouldDecodeNewlines,
shouldDecodeNewlinesForHref: t.shouldDecodeNewlinesForHref,
shouldKeepComment: t.comments,
outputSourceRange: t.outputSourceRange,
start: function (e, o, a, l, f) {
var p = r && r.ns || Wo(e);
q && "svg" === p && (o = function (e) {
for (var t = [], n = 0; n < e.length; n++) {
var r = e[n];
ya.test(r.name) || (r.name = r.name.replace(ga, ""), t.push(r))
}
return t
}(o));
var d, v = ua(e, o, r);
p && (v.ns = p), "style" !== (d = v).tag && ("script" !== d.tag || d.attrsMap.type && "text/javascript" !== d.attrsMap.type) || te() || (v.forbidden = !0);
for (var h = 0; h < Vo.length; h++) v = Vo[h](v, t) || v;
s || (! function (e) {
null != Fr(e, "v-pre") && (e.pre = !0)
}(v), v.pre && (s = !0)), Jo(v.tag) && (c = !0), s ? function (e) {
var t = e.attrsList,
n = t.length;
if (n)
for (var r = e.attrs = new Array(n), i = 0; i < n; i++) r[i] = {
name: t[i].name,
value: JSON.stringify(t[i].value)
}, null != t[i].start && (r[i].start = t[i].start, r[i].end = t[i].end);
else e.pre || (e.plain = !0)
}(v) : v.processed || (pa(v), function (e) {
var t = Fr(e, "v-if");
if (t) e.if = t, da(e, {
exp: t,
block: e
});
else {
null != Fr(e, "v-else") && (e.else = !0);
var n = Fr(e, "v-else-if");
n && (e.elseif = n)
}
}(v), function (e) {
null != Fr(e, "v-once") && (e.once = !0)
}(v)), n || (n = v), a ? u(v) : (r = v, i.push(v))
},
end: function (e, t, n) {
var o = i[i.length - 1];
i.length -= 1, r = i[i.length - 1], u(o)
},
chars: function (e, t, n) {
if (r && (!q || "textarea" !== r.tag || r.attrsMap.placeholder !== e)) {
var i, u, l, f = r.children;
if (e = c || e.trim() ? "script" === (i = r).tag || "style" === i.tag ? e : sa(e) : f.length ? a ? "condense" === a && oa.test(e) ? "" : " " : o ? " " : "" : "") c || "condense" !== a || (e = e.replace(aa, " ")), !s && " " !== e && (u = function (e, t) {
var n = t ? ho(t) : po;
if (n.test(e)) {
for (var r, i, o, a = [], s = [], c = n.lastIndex = 0; r = n.exec(e);) {
(i = r.index) > c && (s.push(o = e.slice(c, i)), a.push(JSON.stringify(o)));
var u = Ar(r[1].trim());
a.push("_s(" + u + ")"), s.push({
"@binding": u
}), c = i + r[0].length
}
return c < e.length && (s.push(o = e.slice(c)), a.push(JSON.stringify(o))), {
expression: a.join("+"),
tokens: s
}
}
}(e, Uo)) ? l = {
type: 2,
expression: u.expression,
tokens: u.tokens,
text: e
} : " " === e && f.length && " " === f[f.length - 1].text || (l = {
type: 3,
text: e
}), l && f.push(l)
}
},
comment: function (e, t, n) {
if (r) {
var i = {
type: 3,
text: e,
isComment: !0
};
r.children.push(i)
}
}
}), n
}
function fa(e, t) {
var n, r;
(r = Ir(n = e, "key")) && (n.key = r), e.plain = !e.key && !e.scopedSlots && !e.attrsList.length,
function (e) {
var t = Ir(e, "ref");
t && (e.ref = t, e.refInFor = function (e) {
var t = e;
for (; t;) {
if (void 0 !== t.for) return !0;
t = t.parent
}
return !1
}(e))
}(e),
function (e) {
var t;
"template" === e.tag ? (t = Fr(e, "scope"), e.slotScope = t || Fr(e, "slot-scope")) : (t = Fr(e, "slot-scope")) && (e.slotScope = t);
var n = Ir(e, "slot");
n && (e.slotTarget = '""' === n ? '"default"' : n, e.slotTargetDynamic = !(!e.attrsMap[":slot"] && !e.attrsMap["v-bind:slot"]), "template" === e.tag || e.slotScope || Nr(e, "slot", n, function (e, t) {
return e.rawAttrsMap[":" + t] || e.rawAttrsMap["v-bind:" + t] || e.rawAttrsMap[t]
}(e, "slot")));
if ("template" === e.tag) {
var r = Pr(e, ia);
if (r) {
var i = va(r),
o = i.name,
a = i.dynamic;
e.slotTarget = o, e.slotTargetDynamic = a, e.slotScope = r.value || ca
}
} else {
var s = Pr(e, ia);
if (s) {
var c = e.scopedSlots || (e.scopedSlots = {}),
u = va(s),
l = u.name,
f = u.dynamic,
p = c[l] = ua("template", [], e);
p.slotTarget = l, p.slotTargetDynamic = f, p.children = e.children.filter(function (e) {
if (!e.slotScope) return e.parent = p, !0
}), p.slotScope = s.value || ca, e.children = [], e.plain = !1
}
}
}(e),
function (e) {
"slot" === e.tag && (e.slotName = Ir(e, "name"))
}(e),
function (e) {
var t;
(t = Ir(e, "is")) && (e.component = t);
null != Fr(e, "inline-template") && (e.inlineTemplate = !0)
}(e);
for (var i = 0; i < zo.length; i++) e = zo[i](e, t) || e;
return function (e) {
var t, n, r, i, o, a, s, c, u = e.attrsList;
for (t = 0, n = u.length; t < n; t++)
if (r = i = u[t].name, o = u[t].value, Go.test(r))
if (e.hasBindings = !0, (a = ha(r.replace(Go, ""))) && (r = r.replace(ra, "")), na.test(r)) r = r.replace(na, ""), o = Ar(o), (c = ea.test(r)) && (r = r.slice(1, -1)), a && (a.prop && !c && "innerHtml" === (r = b(r)) && (r = "innerHTML"), a.camel && !c && (r = b(r)), a.sync && (s = Br(o, "$event"), c ? Mr(e, '"update:"+(' + r + ")", s, null, !1, 0, u[t], !0) : (Mr(e, "update:" + b(r), s, null, !1, 0, u[t]), C(r) !== b(r) && Mr(e, "update:" + C(r), s, null, !1, 0, u[t])))), a && a.prop || !e.component && qo(e.tag, e.attrsMap.type, r) ? Er(e, r, o, u[t], c) : Nr(e, r, o, u[t], c);
else if (Zo.test(r)) r = r.replace(Zo, ""), (c = ea.test(r)) && (r = r.slice(1, -1)), Mr(e, r, o, a, !1, 0, u[t], c);
else {
var l = (r = r.replace(Go, "")).match(ta),
f = l && l[1];
c = !1, f && (r = r.slice(0, -(f.length + 1)), ea.test(f) && (f = f.slice(1, -1), c = !0)), Dr(e, r, i, o, f, c, a, u[t])
} else Nr(e, r, JSON.stringify(o), u[t]), !e.component && "muted" === r && qo(e.tag, e.attrsMap.type, r) && Er(e, r, "true", u[t])
}(e), e
}
function pa(e) {
var t;
if (t = Fr(e, "v-for")) {
var n = function (e) {
var t = e.match(Xo);
if (!t) return;
var n = {};
n.for = t[2].trim();
var r = t[1].trim().replace(Qo, ""),
i = r.match(Yo);
i ? (n.alias = r.replace(Yo, "").trim(), n.iterator1 = i[1].trim(), i[2] && (n.iterator2 = i[2].trim())) : n.alias = r;
return n
}(t);
n && A(e, n)
}
}
function da(e, t) {
e.ifConditions || (e.ifConditions = []), e.ifConditions.push(t)
}
function va(e) {
var t = e.name.replace(ia, "");
return t || "#" !== e.name[0] && (t = "default"), ea.test(t) ? {
name: t.slice(1, -1),
dynamic: !0
} : {
name: '"' + t + '"',
dynamic: !1
}
}
function ha(e) {
var t = e.match(ra);
if (t) {
var n = {};
return t.forEach(function (e) {
n[e.slice(1)] = !0
}), n
}
}
function ma(e) {
for (var t = {}, n = 0, r = e.length; n < r; n++) t[e[n].name] = e[n].value;
return t
}
var ya = /^xmlns:NS\d+/,
ga = /^NS\d+:/;
function _a(e) {
return ua(e.tag, e.attrsList.slice(), e.parent)
}
var ba = [mo, go, {
preTransformNode: function (e, t) {
if ("input" === e.tag) {
var n, r = e.attrsMap;
if (!r["v-model"]) return;
if ((r[":type"] || r["v-bind:type"]) && (n = Ir(e, "type")), r.type || n || !r["v-bind"] || (n = "(" + r["v-bind"] + ").type"), n) {
var i = Fr(e, "v-if", !0),
o = i ? "&&(" + i + ")" : "",
a = null != Fr(e, "v-else", !0),
s = Fr(e, "v-else-if", !0),
c = _a(e);
pa(c), jr(c, "type", "checkbox"), fa(c, t), c.processed = !0, c.if = "(" + n + ")==='checkbox'" + o, da(c, {
exp: c.if,
block: c
});
var u = _a(e);
Fr(u, "v-for", !0), jr(u, "type", "radio"), fa(u, t), da(c, {
exp: "(" + n + ")==='radio'" + o,
block: u
});
var l = _a(e);
return Fr(l, "v-for", !0), jr(l, ":type", n), fa(l, t), da(c, {
exp: i,
block: l
}), a ? c.else = !0 : s && (c.elseif = s), c
}
}
}
}];
var $a, wa, Ca = {
expectHTML: !0,
modules: ba,
directives: {
model: function (e, t, n) {
var r = t.value,
i = t.modifiers,
o = e.tag,
a = e.attrsMap.type;
if (e.component) return Hr(e, r, i), !1;
if ("select" === o) ! function (e, t, n) {
var r = 'var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return ' + (n && n.number ? "_n(val)" : "val") + "});";
r = r + " " + Br(t, "$event.target.multiple ? $$selectedVal : $$selectedVal[0]"), Mr(e, "change", r, null, !0)
}(e, r, i);
else if ("input" === o && "checkbox" === a) ! function (e, t, n) {
var r = n && n.number,
i = Ir(e, "value") || "null",
o = Ir(e, "true-value") || "true",
a = Ir(e, "false-value") || "false";
Er(e, "checked", "Array.isArray(" + t + ")?_i(" + t + "," + i + ")>-1" + ("true" === o ? ":(" + t + ")" : ":_q(" + t + "," + o + ")")), Mr(e, "change", "var $$a=" + t + ",$$el=$event.target,$$c=$$el.checked?(" + o + "):(" + a + ");if(Array.isArray($$a)){var $$v=" + (r ? "_n(" + i + ")" : i) + ",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&(" + Br(t, "$$a.concat([$$v])") + ")}else{$$i>-1&&(" + Br(t, "$$a.slice(0,$$i).concat($$a.slice($$i+1))") + ")}}else{" + Br(t, "$$c") + "}", null, !0)
}(e, r, i);
else if ("input" === o && "radio" === a) ! function (e, t, n) {
var r = n && n.number,
i = Ir(e, "value") || "null";
Er(e, "checked", "_q(" + t + "," + (i = r ? "_n(" + i + ")" : i) + ")"), Mr(e, "change", Br(t, i), null, !0)
}(e, r, i);
else if ("input" === o || "textarea" === o) ! function (e, t, n) {
var r = e.attrsMap.type,
i = n || {},
o = i.lazy,
a = i.number,
s = i.trim,
c = !o && "range" !== r,
u = o ? "change" : "range" === r ? Wr : "input",
l = "$event.target.value";
s && (l = "$event.target.value.trim()"), a && (l = "_n(" + l + ")");
var f = Br(t, l);
c && (f = "if($event.target.composing)return;" + f), Er(e, "value", "(" + t + ")"), Mr(e, u, f, null, !0), (s || a) && Mr(e, "blur", "$forceUpdate()")
}(e, r, i);
else if (!F.isReservedTag(o)) return Hr(e, r, i), !1;
return !0
},
text: function (e, t) {
t.value && Er(e, "textContent", "_s(" + t.value + ")", t)
},
html: function (e, t) {
t.value && Er(e, "innerHTML", "_s(" + t.value + ")", t)
}
},
isPreTag: function (e) {
return "pre" === e
},
isUnaryTag: bo,
mustUseProp: jn,
canBeLeftOpenTag: $o,
isReservedTag: Wn,
getTagNamespace: Zn,
staticKeys: function (e) {
return e.reduce(function (e, t) {
return e.concat(t.staticKeys || [])
}, []).join(",")
}(ba)
},
xa = g(function (e) {
return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap" + (e ? "," + e : ""))
});
function ka(e, t) {
e && ($a = xa(t.staticKeys || ""), wa = t.isReservedTag || T, function e(t) {
t.static = function (e) {
if (2 === e.type) return !1;
if (3 === e.type) return !0;
return !(!e.pre && (e.hasBindings || e.if || e.for || d(e.tag) || !wa(e.tag) || function (e) {
for (; e.parent;) {
if ("template" !== (e = e.parent).tag) return !1;
if (e.for) return !0
}
return !1
}(e) || !Object.keys(e).every($a)))
}(t);
if (1 === t.type) {
if (!wa(t.tag) && "slot" !== t.tag && null == t.attrsMap["inline-template"]) return;
for (var n = 0, r = t.children.length; n < r; n++) {
var i = t.children[n];
e(i), i.static || (t.static = !1)
}
if (t.ifConditions)
for (var o = 1, a = t.ifConditions.length; o < a; o++) {
var s = t.ifConditions[o].block;
e(s), s.static || (t.static = !1)
}
}
}(e), function e(t, n) {
if (1 === t.type) {
if ((t.static || t.once) && (t.staticInFor = n), t.static && t.children.length && (1 !== t.children.length || 3 !== t.children[0].type)) return void(t.staticRoot = !0);
if (t.staticRoot = !1, t.children)
for (var r = 0, i = t.children.length; r < i; r++) e(t.children[r], n || !!t.for);
if (t.ifConditions)
for (var o = 1, a = t.ifConditions.length; o < a; o++) e(t.ifConditions[o].block, n)
}
}(e, !1))
}
var Aa = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,
Oa = /\([^)]*?\);*$/,
Sa = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,
Ta = {
esc: 27,
tab: 9,
enter: 13,
space: 32,
up: 38,
left: 37,
right: 39,
down: 40,
delete: [8, 46]
},
Ea = {
esc: ["Esc", "Escape"],
tab: "Tab",
enter: "Enter",
space: [" ", "Spacebar"],
up: ["Up", "ArrowUp"],
left: ["Left", "ArrowLeft"],
right: ["Right", "ArrowRight"],
down: ["Down", "ArrowDown"],
delete: ["Backspace", "Delete", "Del"]
},
Na = function (e) {
return "if(" + e + ")return null;"
},
ja = {
stop: "$event.stopPropagation();",
prevent: "$event.preventDefault();",
self: Na("$event.target !== $event.currentTarget"),
ctrl: Na("!$event.ctrlKey"),
shift: Na("!$event.shiftKey"),
alt: Na("!$event.altKey"),
meta: Na("!$event.metaKey"),
left: Na("'button' in $event && $event.button !== 0"),
middle: Na("'button' in $event && $event.button !== 1"),
right: Na("'button' in $event && $event.button !== 2")
};
function Da(e, t) {
var n = t ? "nativeOn:" : "on:",
r = "",
i = "";
for (var o in e) {
var a = La(e[o]);
e[o] && e[o].dynamic ? i += o + "," + a + "," : r += '"' + o + '":' + a + ","
}
return r = "{" + r.slice(0, -1) + "}", i ? n + "_d(" + r + ",[" + i.slice(0, -1) + "])" : n + r
}
function La(e) {
if (!e) return "function(){}";
if (Array.isArray(e)) return "[" + e.map(function (e) {
return La(e)
}).join(",") + "]";
var t = Sa.test(e.value),
n = Aa.test(e.value),
r = Sa.test(e.value.replace(Oa, ""));
if (e.modifiers) {
var i = "",
o = "",
a = [];
for (var s in e.modifiers)
if (ja[s]) o += ja[s], Ta[s] && a.push(s);
else if ("exact" === s) {
var c = e.modifiers;
o += Na(["ctrl", "shift", "alt", "meta"].filter(function (e) {
return !c[e]
}).map(function (e) {
return "$event." + e + "Key"
}).join("||"))
} else a.push(s);
return a.length && (i += function (e) {
return "if(!$event.type.indexOf('key')&&" + e.map(Ma).join("&&") + ")return null;"
}(a)), o && (i += o), "function($event){" + i + (t ? "return " + e.value + "($event)" : n ? "return (" + e.value + ")($event)" : r ? "return " + e.value : e.value) + "}"
}
return t || n ? e.value : "function($event){" + (r ? "return " + e.value : e.value) + "}"
}
function Ma(e) {
var t = parseInt(e, 10);
if (t) return "$event.keyCode!==" + t;
var n = Ta[e],
r = Ea[e];
return "_k($event.keyCode," + JSON.stringify(e) + "," + JSON.stringify(n) + ",$event.key," + JSON.stringify(r) + ")"
}
var Ia = {
on: function (e, t) {
e.wrapListeners = function (e) {
return "_g(" + e + "," + t.value + ")"
}
},
bind: function (e, t) {
e.wrapData = function (n) {
return "_b(" + n + ",'" + e.tag + "'," + t.value + "," + (t.modifiers && t.modifiers.prop ? "true" : "false") + (t.modifiers && t.modifiers.sync ? ",true" : "") + ")"
}
},
cloak: S
},
Fa = function (e) {
this.options = e, this.warn = e.warn || Sr, this.transforms = Tr(e.modules, "transformCode"), this.dataGenFns = Tr(e.modules, "genData"), this.directives = A(A({}, Ia), e.directives);
var t = e.isReservedTag || T;
this.maybeComponent = function (e) {
return !!e.component || !t(e.tag)
}, this.onceId = 0, this.staticRenderFns = [], this.pre = !1
};
function Pa(e, t) {
var n = new Fa(t);
return {
render: "with(this){return " + (e ? Ra(e, n) : '_c("div")') + "}",
staticRenderFns: n.staticRenderFns
}
}
function Ra(e, t) {
if (e.parent && (e.pre = e.pre || e.parent.pre), e.staticRoot && !e.staticProcessed) return Ha(e, t);
if (e.once && !e.onceProcessed) return Ba(e, t);
if (e.for && !e.forProcessed) return za(e, t);
if (e.if && !e.ifProcessed) return Ua(e, t);
if ("template" !== e.tag || e.slotTarget || t.pre) {
if ("slot" === e.tag) return function (e, t) {
var n = e.slotName || '"default"',
r = qa(e, t),
i = "_t(" + n + (r ? "," + r : ""),
o = e.attrs || e.dynamicAttrs ? Ga((e.attrs || []).concat(e.dynamicAttrs || []).map(function (e) {
return {
name: b(e.name),
value: e.value,
dynamic: e.dynamic
}
})) : null,
a = e.attrsMap["v-bind"];
!o && !a || r || (i += ",null");
o && (i += "," + o);
a && (i += (o ? "" : ",null") + "," + a);
return i + ")"
}(e, t);
var n;
if (e.component) n = function (e, t, n) {
var r = t.inlineTemplate ? null : qa(t, n, !0);
return "_c(" + e + "," + Va(t, n) + (r ? "," + r : "") + ")"
}(e.component, e, t);
else {
var r;
(!e.plain || e.pre && t.maybeComponent(e)) && (r = Va(e, t));
var i = e.inlineTemplate ? null : qa(e, t, !0);
n = "_c('" + e.tag + "'" + (r ? "," + r : "") + (i ? "," + i : "") + ")"
}
for (var o = 0; o < t.transforms.length; o++) n = t.transforms[o](e, n);
return n
}
return qa(e, t) || "void 0"
}
function Ha(e, t) {
e.staticProcessed = !0;
var n = t.pre;
return e.pre && (t.pre = e.pre), t.staticRenderFns.push("with(this){return " + Ra(e, t) + "}"), t.pre = n, "_m(" + (t.staticRenderFns.length - 1) + (e.staticInFor ? ",true" : "") + ")"
}
function Ba(e, t) {
if (e.onceProcessed = !0, e.if && !e.ifProcessed) return Ua(e, t);
if (e.staticInFor) {
for (var n = "", r = e.parent; r;) {
if (r.for) {
n = r.key;
break
}
r = r.parent
}
return n ? "_o(" + Ra(e, t) + "," + t.onceId++ + "," + n + ")" : Ra(e, t)
}
return Ha(e, t)
}
function Ua(e, t, n, r) {
return e.ifProcessed = !0,
function e(t, n, r, i) {
if (!t.length) return i || "_e()";
var o = t.shift();
return o.exp ? "(" + o.exp + ")?" + a(o.block) + ":" + e(t, n, r, i) : "" + a(o.block);
function a(e) {
return r ? r(e, n) : e.once ? Ba(e, n) : Ra(e, n)
}
}(e.ifConditions.slice(), t, n, r)
}
function za(e, t, n, r) {
var i = e.for,
o = e.alias,
a = e.iterator1 ? "," + e.iterator1 : "",
s = e.iterator2 ? "," + e.iterator2 : "";
return e.forProcessed = !0, (r || "_l") + "((" + i + "),function(" + o + a + s + "){return " + (n || Ra)(e, t) + "})"
}
function Va(e, t) {
var n = "{",
r = function (e, t) {
var n = e.directives;
if (!n) return;
var r, i, o, a, s = "directives:[",
c = !1;
for (r = 0, i = n.length; r < i; r++) {
o = n[r], a = !0;
var u = t.directives[o.name];
u && (a = !!u(e, o, t.warn)), a && (c = !0, s += '{name:"' + o.name + '",rawName:"' + o.rawName + '"' + (o.value ? ",value:(" + o.value + "),expression:" + JSON.stringify(o.value) : "") + (o.arg ? ",arg:" + (o.isDynamicArg ? o.arg : '"' + o.arg + '"') : "") + (o.modifiers ? ",modifiers:" + JSON.stringify(o.modifiers) : "") + "},")
}
if (c) return s.slice(0, -1) + "]"
}(e, t);
r && (n += r + ","), e.key && (n += "key:" + e.key + ","), e.ref && (n += "ref:" + e.ref + ","), e.refInFor && (n += "refInFor:true,"), e.pre && (n += "pre:true,"), e.component && (n += 'tag:"' + e.tag + '",');
for (var i = 0; i < t.dataGenFns.length; i++) n += t.dataGenFns[i](e);
if (e.attrs && (n += "attrs:" + Ga(e.attrs) + ","), e.props && (n += "domProps:" + Ga(e.props) + ","), e.events && (n += Da(e.events, !1) + ","), e.nativeEvents && (n += Da(e.nativeEvents, !0) + ","), e.slotTarget && !e.slotScope && (n += "slot:" + e.slotTarget + ","), e.scopedSlots && (n += function (e, t, n) {
var r = e.for || Object.keys(t).some(function (e) {
var n = t[e];
return n.slotTargetDynamic || n.if || n.for || Ka(n)
}),
i = !!e.if;
if (!r)
for (var o = e.parent; o;) {
if (o.slotScope && o.slotScope !== ca || o.for) {
r = !0;
break
}
o.if && (i = !0), o = o.parent
}
var a = Object.keys(t).map(function (e) {
return Ja(t[e], n)
}).join(",");
return "scopedSlots:_u([" + a + "]" + (r ? ",null,true" : "") + (!r && i ? ",null,false," + function (e) {
var t = 5381,
n = e.length;
for (; n;) t = 33 * t ^ e.charCodeAt(--n);
return t >>> 0
}(a) : "") + ")"
}(e, e.scopedSlots, t) + ","), e.model && (n += "model:{value:" + e.model.value + ",callback:" + e.model.callback + ",expression:" + e.model.expression + "},"), e.inlineTemplate) {
var o = function (e, t) {
var n = e.children[0];
if (n && 1 === n.type) {
var r = Pa(n, t.options);
return "inlineTemplate:{render:function(){" + r.render + "},staticRenderFns:[" + r.staticRenderFns.map(function (e) {
return "function(){" + e + "}"
}).join(",") + "]}"
}
}(e, t);
o && (n += o + ",")
}
return n = n.replace(/,$/, "") + "}", e.dynamicAttrs && (n = "_b(" + n + ',"' + e.tag + '",' + Ga(e.dynamicAttrs) + ")"), e.wrapData && (n = e.wrapData(n)), e.wrapListeners && (n = e.wrapListeners(n)), n
}
function Ka(e) {
return 1 === e.type && ("slot" === e.tag || e.children.some(Ka))
}
function Ja(e, t) {
var n = e.attrsMap["slot-scope"];
if (e.if && !e.ifProcessed && !n) return Ua(e, t, Ja, "null");
if (e.for && !e.forProcessed) return za(e, t, Ja);
var r = e.slotScope === ca ? "" : String(e.slotScope),
i = "function(" + r + "){return " + ("template" === e.tag ? e.if && n ? "(" + e.if+")?" + (qa(e, t) || "undefined") + ":undefined" : qa(e, t) || "undefined" : Ra(e, t)) + "}",
o = r ? "" : ",proxy:true";
return "{key:" + (e.slotTarget || '"default"') + ",fn:" + i + o + "}"
}
function qa(e, t, n, r, i) {
var o = e.children;
if (o.length) {
var a = o[0];
if (1 === o.length && a.for && "template" !== a.tag && "slot" !== a.tag) {
var s = n ? t.maybeComponent(a) ? ",1" : ",0" : "";
return "" + (r || Ra)(a, t) + s
}
var c = n ? function (e, t) {
for (var n = 0, r = 0; r < e.length; r++) {
var i = e[r];
if (1 === i.type) {
if (Wa(i) || i.ifConditions && i.ifConditions.some(function (e) {
return Wa(e.block)
})) {
n = 2;
break
}(t(i) || i.ifConditions && i.ifConditions.some(function (e) {
return t(e.block)
})) && (n = 1)
}
}
return n
}(o, t.maybeComponent) : 0,
u = i || Za;
return "[" + o.map(function (e) {
return u(e, t)
}).join(",") + "]" + (c ? "," + c : "")
}
}
function Wa(e) {
return void 0 !== e.for || "template" === e.tag || "slot" === e.tag
}
function Za(e, t) {
return 1 === e.type ? Ra(e, t) : 3 === e.type && e.isComment ? (r = e, "_e(" + JSON.stringify(r.text) + ")") : "_v(" + (2 === (n = e).type ? n.expression : Xa(JSON.stringify(n.text))) + ")";
var n, r
}
function Ga(e) {
for (var t = "", n = "", r = 0; r < e.length; r++) {
var i = e[r],
o = Xa(i.value);
i.dynamic ? n += i.name + "," + o + "," : t += '"' + i.name + '":' + o + ","
}
return t = "{" + t.slice(0, -1) + "}", n ? "_d(" + t + ",[" + n.slice(0, -1) + "])" : t
}
function Xa(e) {
return e.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029")
}
new RegExp("\\b" + "do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b") + "\\b");
function Ya(e, t) {
try {
return new Function(e)
} catch (n) {
return t.push({
err: n,
code: e
}), S
}
}
function Qa(e) {
var t = Object.create(null);
return function (n, r, i) {
(r = A({}, r)).warn;
delete r.warn;
var o = r.delimiters ? String(r.delimiters) + n : n;
if (t[o]) return t[o];
var a = e(n, r),
s = {},
c = [];
return s.render = Ya(a.render, c), s.staticRenderFns = a.staticRenderFns.map(function (e) {
return Ya(e, c)
}), t[o] = s
}
}
var es, ts, ns = (es = function (e, t) {
var n = la(e.trim(), t);
!1 !== t.optimize && ka(n, t);
var r = Pa(n, t);
return {
ast: n,
render: r.render,
staticRenderFns: r.staticRenderFns
}
}, function (e) {
function t(t, n) {
var r = Object.create(e),
i = [],
o = [];
if (n)
for (var a in n.modules && (r.modules = (e.modules || []).concat(n.modules)), n.directives && (r.directives = A(Object.create(e.directives || null), n.directives)), n) "modules" !== a && "directives" !== a && (r[a] = n[a]);
r.warn = function (e, t, n) {
(n ? o : i).push(e)
};
var s = es(t.trim(), r);
return s.errors = i, s.tips = o, s
}
return {
compile: t,
compileToFunctions: Qa(t)
}
})(Ca),
rs = (ns.compile, ns.compileToFunctions);
function is(e) {
return (ts = ts || document.createElement("div")).innerHTML = e ? '<a href="\n"/>' : '<div a="\n"/>', ts.innerHTML.indexOf(" ") > 0
}
var os = !!z && is(!1),
as = !!z && is(!0),
ss = g(function (e) {
var t = Yn(e);
return t && t.innerHTML
}),
cs = wn.prototype.$mount;
return wn.prototype.$mount = function (e, t) {
if ((e = e && Yn(e)) === document.body || e === document.documentElement) return this;
var n = this.$options;
if (!n.render) {
var r = n.template;
if (r)
if ("string" == typeof r) "#" === r.charAt(0) && (r = ss(r));
else {
if (!r.nodeType) return this;
r = r.innerHTML
}
else e && (r = function (e) {
if (e.outerHTML) return e.outerHTML;
var t = document.createElement("div");
return t.appendChild(e.cloneNode(!0)), t.innerHTML
}(e));
if (r) {
var i = rs(r, {
outputSourceRange: !1,
shouldDecodeNewlines: os,
shouldDecodeNewlinesForHref: as,
delimiters: n.delimiters,
comments: n.comments
}, this),
o = i.render,
a = i.staticRenderFns;
n.render = o, n.staticRenderFns = a
}
}
return cs.call(this, e, t)
}, wn.compile = rs, wn
}); |
import { React, useState, useEffect } from "react";
import axios from "axios";
import { Col, Row, Typography } from 'antd';
import ViewAll from "../components/ViewAll";
import AddGroceryForm from "../components/AddGroceryForm"
const { Text } = Typography
const GroceryList = () => {
//HERE WE ARE USING STATE WHICH AT FIRST IS EMPTY BUT
// WILL BE USED TO STORE DATA COLLECTED FROM MONGODB ATLAS
// NOTE THE ARRAY OF OBJECTS
const [groceries, setGroceries] = useState([
{
item: " ",
price: " ",
}
]);
//SAVES DATA INTENDED TO BE STORED IN THE DB
//NOTE THE SINGLE OBJECT
const [grocery, setGrocery] = useState(
{
item: " ",
price: " ",
}
);
//GOES THROUGH GROCERIES STATE VARIABLE AND ADDS PRICES TOGETHER
const priceTotal = groceries.reduce(function(prev, cur) {
return prev + cur.price;
}, 0);
//FETCH THE MONGODB DATA FROM THE ROUTE AND SET THE
//RESPONSE IN JSON FORMAT
useEffect(() => {
fetch('/groceries').then(res => {
if(res.ok) {
return res.json()
} else {
alert("cannot get posts from mongoDB")
}
//SET STATE 'grocerys' EQUAL TO JSON RESPONSE
}).then(jsonRes => setGroceries(jsonRes))
});
//handleChange TRACKS WHAT IS BEING TYPED
// 'e' HAS TWO PEICES OF DATA, name AND value OF TEXT INPUT
function handleChange(e) {
const {name, value} = e.target;
setGrocery(prevInput => {
return(
{
...prevInput,
[name]: value
}
);
});
};
function addGrocery(e) {
e.preventDefault();
//GETS VALUES FROM STATE VARIABLE 'grocery'
//{item: "test", price: "3"}
const newGrocery = {
item: grocery.item,
price: parseInt(grocery.price)
};
//SEND POST REQUEST TO BACKEND CONTAINING THE DATA IN newGrocery
axios.post('/newGrocery', newGrocery);
alert("grocery added");
};
//THIS FUNCTION SENDS A DELETE REQUEST TO THE BACKEND CONTAINING
//THE SPECIFIC ID OF THE DELETE BUTTON BEING CLICKED
function deleteGrocery(id) {
axios.delete('/delete/' + id);
alert("grocery deleted");
};
return (
<Row>
<Col span={12}>
<AddGroceryForm
grocery={grocery}
handleChange={handleChange}
addGrocery={addGrocery}
/>
<Text>Budget Total: {priceTotal}</Text>
</Col>
<Col span={12}>
<ViewAll
groceries={groceries}
deleteGrocery={deleteGrocery}
/>
</Col>
</Row>
)
};
export default GroceryList |
module.exports = {
testEnvironment: 'jsdom',
collectCoverageFrom: ['./src/**'],
coverageThreshold: {
global: {
lines: 70
}
}
} |
function hello() {
console.log("hello");
}
function if_condition() {
l = [1, 2, 3, 4];
l1 = l;
}
|
import { useCallback, useContext } from "react";
import {
DayScreenContext,
setDrawerVisibility,
setExercises,
setSelectedDate,
} from "./DayScreenState";
export const useDayScreenHelpers = () => {
const { dispatch, state } = useContext(DayScreenContext);
return {
setDrawerVisibility: useCallback(
(drawerVisibility) => dispatch(setDrawerVisibility(drawerVisibility)),
[dispatch]
),
setExercises: useCallback(
(exercises) => dispatch(setExercises(exercises)),
[dispatch]
),
setSelectedDate: useCallback(
(selectedDate) => dispatch(setSelectedDate(selectedDate)),
[dispatch]
),
state,
};
};
|
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
import { Log } from './Log.js';
import { OidcClientSettings } from './OidcClientSettings.js';
import { ErrorResponse } from './ErrorResponse.js';
import { SigninRequest } from './SigninRequest.js';
import { SigninResponse } from './SigninResponse.js';
import { SignoutRequest } from './SignoutRequest.js';
import { SignoutResponse } from './SignoutResponse.js';
import { SigninState } from './SigninState.js';
import { State } from './State.js';
export class OidcClient {
constructor(settings = {}) {
if (settings instanceof OidcClientSettings) {
this._settings = settings;
}
else {
this._settings = new OidcClientSettings(settings);
}
}
get _stateStore() {
return this.settings.stateStore;
}
get _validator() {
return this.settings.validator;
}
get _metadataService() {
return this.settings.metadataService;
}
get settings() {
return this._settings;
}
get metadataService() {
return this._metadataService;
}
createSigninRequest({
response_type, scope, redirect_uri,
// data was meant to be the place a caller could indicate the data to
// have round tripped, but people were getting confused, so i added state (since that matches the spec)
// and so now if data is not passed, but state is then state will be used
data, state, prompt, display, max_age, ui_locales, id_token_hint, login_hint, acr_values,
resource, request, request_uri, response_mode, extraQueryParams } = {},
stateStore
) {
Log.debug("OidcClient.createSigninRequest");
let client_id = this._settings.client_id;
response_type = response_type || this._settings.response_type;
scope = scope || this._settings.scope;
redirect_uri = redirect_uri || this._settings.redirect_uri;
// id_token_hint, login_hint aren't allowed on _settings
prompt = prompt || this._settings.prompt;
display = display || this._settings.display;
max_age = max_age || this._settings.max_age;
ui_locales = ui_locales || this._settings.ui_locales;
acr_values = acr_values || this._settings.acr_values;
resource = resource || this._settings.resource;
response_mode = response_mode || this._settings.response_mode;
extraQueryParams = extraQueryParams || this._settings.extraQueryParams;
let authority = this._settings.authority;
if (SigninRequest.isCode(response_type) && response_type !== "code") {
return Promise.reject(new Error("OpenID Connect hybrid flow is not supported"));
}
return this._metadataService.getAuthorizationEndpoint().then(url => {
Log.debug("OidcClient.createSigninRequest: Received authorization endpoint", url);
let signinRequest = new SigninRequest({
url,
client_id,
redirect_uri,
response_type,
scope,
data: data || state,
authority,
prompt, display, max_age, ui_locales, id_token_hint, login_hint, acr_values,
resource, request, request_uri, extraQueryParams, response_mode
});
var signinState = signinRequest.state;
stateStore = stateStore || this._stateStore;
return stateStore.set(signinState.id, signinState.toStorageString()).then(() => {
return signinRequest;
});
});
}
processSigninResponse(url, stateStore) {
Log.debug("OidcClient.processSigninResponse");
let useQuery = this._settings.response_mode === "query" ||
(!this._settings.response_mode && SigninRequest.isCode(this._settings.response_type));
let delimiter = useQuery ? "?" : "#";
var response = new SigninResponse(url, delimiter);
if (!response.state) {
Log.error("OidcClient.processSigninResponse: No state in response");
return Promise.reject(new Error("No state in response"));
}
stateStore = stateStore || this._stateStore;
return stateStore.remove(response.state).then(storedStateString => {
if (!storedStateString) {
Log.error("OidcClient.processSigninResponse: No matching state found in storage");
throw new Error("No matching state found in storage");
}
let state = SigninState.fromStorageString(storedStateString);
Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response");
return this._validator.validateSigninResponse(state, response);
});
}
createSignoutRequest({id_token_hint, data, state, post_logout_redirect_uri, extraQueryParams } = {},
stateStore
) {
Log.debug("OidcClient.createSignoutRequest");
post_logout_redirect_uri = post_logout_redirect_uri || this._settings.post_logout_redirect_uri;
extraQueryParams = extraQueryParams || this._settings.extraQueryParams;
return this._metadataService.getEndSessionEndpoint().then(url => {
if (!url) {
Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned");
throw new Error("no end session endpoint");
}
Log.debug("OidcClient.createSignoutRequest: Received end session endpoint", url);
let request = new SignoutRequest({
url,
id_token_hint,
post_logout_redirect_uri,
data: data || state,
extraQueryParams
});
var signoutState = request.state;
if (signoutState) {
Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist");
stateStore = stateStore || this._stateStore;
stateStore.set(signoutState.id, signoutState.toStorageString());
}
return request;
});
}
processSignoutResponse(url, stateStore) {
Log.debug("OidcClient.processSignoutResponse");
var response = new SignoutResponse(url);
if (!response.state) {
Log.debug("OidcClient.processSignoutResponse: No state in response");
if (response.error) {
Log.warn("OidcClient.processSignoutResponse: Response was error: ", response.error);
return Promise.reject(new ErrorResponse(response));
}
return Promise.resolve(response);
}
var stateKey = response.state;
stateStore = stateStore || this._stateStore;
return stateStore.remove(stateKey).then(storedStateString => {
if (!storedStateString) {
Log.error("OidcClient.processSignoutResponse: No matching state found in storage");
throw new Error("No matching state found in storage");
}
let state = State.fromStorageString(storedStateString);
Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response");
return this._validator.validateSignoutResponse(state, response);
});
}
clearStaleState(stateStore) {
Log.debug("OidcClient.clearStaleState");
stateStore = stateStore || this._stateStore;
return State.clearStaleState(stateStore, this.settings.staleStateAge);
}
}
|
'use strict';
const crypto = require('crypto');
const BbPromise = require('bluebird');
const _ = require('lodash');
const path = require('path');
const fsAsync = BbPromise.promisifyAll(require('fs'));
const getLambdaLayerArtifactPath = require('../../utils/get-lambda-layer-artifact-path');
const { log } = require('@serverless/utils/log');
class AwsCompileLayers {
constructor(serverless, options) {
this.serverless = serverless;
this.options = options;
const serviceDir = this.serverless.serviceDir || '';
this.packagePath =
this.serverless.service.package.path || path.join(serviceDir || '.', '.serverless');
this.provider = this.serverless.getProvider('aws');
this.hooks = {
'package:compileLayers': async () => BbPromise.bind(this).then(this.compileLayers),
};
}
async compileLayer(layerName) {
const newLayer = this.cfLambdaLayerTemplate();
const layerObject = this.serverless.service.getLayer(layerName);
layerObject.package = layerObject.package || {};
Object.defineProperty(newLayer, '_serverlessLayerName', { value: layerName });
const artifactFilePath = this.provider.resolveLayerArtifactName(layerName);
if (this.serverless.service.package.deploymentBucket) {
newLayer.Properties.Content.S3Bucket = this.serverless.service.package.deploymentBucket;
}
const s3Folder = this.serverless.service.package.artifactDirectoryName;
const s3FileName = artifactFilePath.split(path.sep).pop();
newLayer.Properties.Content.S3Key = `${s3Folder}/${s3FileName}`;
newLayer.Properties.LayerName = layerObject.name || layerName;
if (layerObject.description) {
newLayer.Properties.Description = layerObject.description;
}
if (layerObject.licenseInfo) {
newLayer.Properties.LicenseInfo = layerObject.licenseInfo;
}
if (layerObject.compatibleRuntimes) {
newLayer.Properties.CompatibleRuntimes = layerObject.compatibleRuntimes;
}
if (layerObject.compatibleArchitectures) {
newLayer.Properties.CompatibleArchitectures = layerObject.compatibleArchitectures;
}
let layerLogicalId = this.provider.naming.getLambdaLayerLogicalId(layerName);
const layerArtifactPath = getLambdaLayerArtifactPath(
this.packagePath,
layerName,
this.provider.serverless.service,
this.provider.naming
);
return fsAsync.readFileAsync(layerArtifactPath).then((layerArtifactBinary) => {
const sha = crypto
.createHash('sha1')
.update(JSON.stringify(_.omit(newLayer, ['Properties.Content.S3Key'])))
.update(layerArtifactBinary)
.digest('hex');
if (layerObject.retain) {
layerLogicalId = `${layerLogicalId}${sha}`;
newLayer.DeletionPolicy = 'Retain';
}
const newLayerObject = {
[layerLogicalId]: newLayer,
};
if (layerObject.allowedAccounts) {
layerObject.allowedAccounts.map((account) => {
const newPermission = this.cfLambdaLayerPermissionTemplate();
newPermission.Properties.LayerVersionArn = { Ref: layerLogicalId };
newPermission.Properties.Principal = account;
let layerPermLogicalId = this.provider.naming.getLambdaLayerPermissionLogicalId(
layerName,
account
);
if (layerObject.retain) {
layerPermLogicalId = `${layerPermLogicalId}${sha}`;
newPermission.DeletionPolicy = 'Retain';
}
newLayerObject[layerPermLogicalId] = newPermission;
return newPermission;
});
}
Object.assign(
this.serverless.service.provider.compiledCloudFormationTemplate.Resources,
newLayerObject
);
// Add layer to Outputs section
const layerOutputLogicalId = this.provider.naming.getLambdaLayerOutputLogicalId(layerName);
const newLayerOutput = this.cfOutputLayerTemplate();
newLayerOutput.Value = { Ref: layerLogicalId };
const layerHashOutputLogicalId =
this.provider.naming.getLambdaLayerHashOutputLogicalId(layerName);
const newLayerHashOutput = this.cfOutputLayerHashTemplate();
newLayerHashOutput.Value = sha;
const layerS3KeyOutputLogicalId =
this.provider.naming.getLambdaLayerS3KeyOutputLogicalId(layerName);
const newLayerS3KeyOutput = this.cfOutputLayerS3KeyTemplate();
newLayerS3KeyOutput.Value = newLayer.Properties.Content.S3Key;
_.merge(this.serverless.service.provider.compiledCloudFormationTemplate.Outputs, {
[layerOutputLogicalId]: newLayerOutput,
[layerHashOutputLogicalId]: newLayerHashOutput,
[layerS3KeyOutputLogicalId]: newLayerS3KeyOutput,
});
});
}
async compareWithLastLayer(layerName) {
const stackName = this.provider.naming.getStackName();
const layerHashOutputLogicalId =
this.provider.naming.getLambdaLayerHashOutputLogicalId(layerName);
return this.provider.request('CloudFormation', 'describeStacks', { StackName: stackName }).then(
(data) => {
const lastHash = data.Stacks[0].Outputs.find(
(output) => output.OutputKey === layerHashOutputLogicalId
);
const compiledCloudFormationTemplate =
this.serverless.service.provider.compiledCloudFormationTemplate;
const newSha = compiledCloudFormationTemplate.Outputs[layerHashOutputLogicalId].Value;
if (lastHash == null || lastHash.OutputValue !== newSha) {
return;
}
const layerS3keyOutputLogicalId =
this.provider.naming.getLambdaLayerS3KeyOutputLogicalId(layerName);
const lastS3Key = data.Stacks[0].Outputs.find(
(output) => output.OutputKey === layerS3keyOutputLogicalId
);
compiledCloudFormationTemplate.Outputs[layerS3keyOutputLogicalId].Value =
lastS3Key.OutputValue;
const layerLogicalId = this.provider.naming.getLambdaLayerLogicalId(layerName);
const layerResource =
compiledCloudFormationTemplate.Resources[layerLogicalId] ||
compiledCloudFormationTemplate.Resources[`${layerLogicalId}${lastHash.OutputValue}`];
layerResource.Properties.Content.S3Key = lastS3Key.OutputValue;
const layerObject = this.serverless.service.getLayer(layerName);
layerObject.artifactAlreadyUploaded = true;
log.info(`Layer ${layerName} is already uploaded.`);
},
(e) => {
if (e.message.includes('does not exist')) {
return;
}
throw e;
}
);
}
async compileLayers() {
const allLayers = this.serverless.service.getAllLayers();
await Promise.all(
allLayers.map((layerName) =>
this.compileLayer(layerName).then(() => this.compareWithLastLayer(layerName))
)
);
if (this.serverless.console.isEnabled) {
await this.serverless.console.compileOtelExtensionLayer();
}
}
cfLambdaLayerTemplate() {
return {
Type: 'AWS::Lambda::LayerVersion',
Properties: {
Content: {
S3Bucket: {
Ref: 'ServerlessDeploymentBucket',
},
S3Key: 'S3Key',
},
LayerName: 'LayerName',
},
};
}
cfLambdaLayerPermissionTemplate() {
return {
Type: 'AWS::Lambda::LayerVersionPermission',
Properties: {
Action: 'lambda:GetLayerVersion',
LayerVersionArn: 'LayerVersionArn',
Principal: 'Principal',
},
};
}
cfOutputLayerTemplate() {
return {
Description: 'Current Lambda layer version',
Value: 'Value',
};
}
cfOutputLayerHashTemplate() {
return {
Description: 'Current Lambda layer hash',
Value: 'Value',
};
}
cfOutputLayerS3KeyTemplate() {
return {
Description: 'Current Lambda layer S3Key',
Value: 'Value',
};
}
}
module.exports = AwsCompileLayers;
|
console.log("Hello World from Inspire") |
import * as types from './actionTypes'
export const toggleCreate = () => ({ type: types.TOGGLE_CREATE })
|
import React from "react";
// components
import CardStats from "components/Cards/CardStats.js";
export default function HeaderStats({ showCards }) {
return (
<>
{/* Header */}
<div className="relative bg-red-500 md:pt-32 pb-32 pt-12">
<div className="px-4 md:px-10 mx-auto w-full">
<div>
{/*Card stats*/}
{
showCards ? <div className="flex flex-wrap">
<div className="w-full lg:w-6/12 xl:w-3/12 px-4">
<CardStats
statSubtitle="Semua"
statTitle="42"
statArrow="up"
statPercent="3.48"
statPercentColor="text-emerald-500"
statDescripiron="Since last month"
statIconName="all"
statIconColor="bg-red-500"
/>
</div>
<div className="w-full lg:w-6/12 xl:w-3/12 px-4">
<CardStats
statSubtitle="Wawancara"
statTitle="15"
statArrow="down"
statPercent="3.48"
statPercentColor="text-red-500"
statDescripiron="Since last week"
statIconName="interview"
statIconColor="bg-orange-500"
/>
</div>
<div className="w-full lg:w-6/12 xl:w-3/12 px-4">
<CardStats
statSubtitle="Tes Darah"
statTitle="13"
statArrow="down"
statPercent="1.10"
statPercentColor="text-orange-500"
statDescripiron="Since yesterday"
statIconName="blood-test"
statIconColor="bg-pink-500"
/>
</div>
<div className="w-full lg:w-6/12 xl:w-3/12 px-4">
<CardStats
statSubtitle="Donor Plasma"
statTitle="14"
statArrow="up"
statPercent="12"
statPercentColor="text-emerald-500"
statDescripiron="Since last month"
statIconName="plasma-donor"
statIconColor="bg-lightBlue-500"
/>
</div>
</div> : <div></div>
}
</div>
</div>
</div>
</>
);
}
|
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
mocha: true,
chai: true,
},
extends: [
'airbnb-base',
],
parserOptions: {
ecmaVersion: 12,
},
rules: {
},
};
|
import AsColorPicker from '../asColorPicker';
// Japanese (ja) localization
AsColorPicker.setLocalization('ja', {
cancelText: "中止",
applyText: "選択"
});
|
deepmacDetailCallback("0050c200f000/36",[{"a":"Waran De Straat 9B BE","o":"XLN-t","d":"2008-07-30","t":"add","s":"ieee","c":"BE"}]);
|
document.addEventListener("DOMContentLoaded", function engine(){
controller.setVariables();
view.media();
model.windowWidth.addListener(view.media);
controller.instantiateCats();
view.createList();
controller.catNameList();
controller.listener();
}); |
print('melon')
|
;(function ($) {
'use strict';
// cmf functions
$.extend(window.app, {
declineDuplicates: function ($scope) {
if ($scope.find('.js-decline-duplicate').length === 0) {
return;
}
$scope.on('click', '.js-decline-duplicate', function () {
var $duplicateItem = $(this).closest('.js-duplicates-item');
$duplicateItem.css("opacity", 0.5);
$.ajax({
url: '/admin/customermanagementframework/duplicates/decline/' + $(this).data('id'),
success: function (data) {
if (data.success) {
$duplicateItem.remove();
} else {
$duplicateItem.css("opacity", 1);
}
}
});
});
}
});
})(jQuery);
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseTimeUnits = exports.TIME_UNITS_PATTERN = exports.parseYear = exports.YEAR_PATTERN = exports.parseOrdinalNumberPattern = exports.ORDINAL_NUMBER_PATTERN = exports.parseNumberPattern = exports.NUMBER_PATTERN = exports.TIME_UNIT_DICTIONARY = exports.ORDINAL_WORD_DICTIONARY = exports.INTEGER_WORD_DICTIONARY = exports.MONTH_DICTIONARY = exports.WEEKDAY_DICTIONARY = void 0;
var pattern_1 = require("../../utils/pattern");
exports.WEEKDAY_DICTIONARY = {
'sunday': 0,
'sun': 0,
'sun.': 0,
'monday': 1,
'mon': 1,
'mon.': 1,
'tuesday': 2,
'tue': 2,
'tue.': 2,
'wednesday': 3,
'wed': 3,
'wed.': 3,
'thursday': 4,
'thurs': 4,
'thurs.': 4,
'thur': 4,
'thur.': 4,
'thu': 4,
'thu.': 4,
'friday': 5,
'fri': 5,
'fri.': 5,
'saturday': 6,
'sat': 6,
'sat.': 6
};
exports.MONTH_DICTIONARY = {
'january': 1,
'jan': 1,
'jan.': 1,
'february': 2,
'feb': 2,
'feb.': 2,
'march': 3,
'mar': 3,
'mar.': 3,
'april': 4,
'apr': 4,
'apr.': 4,
'may': 5,
'june': 6,
'jun': 6,
'jun.': 6,
'july': 7,
'jul': 7,
'jul.': 7,
'august': 8,
'aug': 8,
'aug.': 8,
'september': 9,
'sep': 9,
'sep.': 9,
'sept': 9,
'sept.': 9,
'october': 10,
'oct': 10,
'oct.': 10,
'november': 11,
'nov': 11,
'nov.': 11,
'december': 12,
'dec': 12,
'dec.': 12
};
exports.INTEGER_WORD_DICTIONARY = {
'one': 1,
'two': 2,
'three': 3,
'four': 4,
'five': 5,
'six': 6,
'seven': 7,
'eight': 8,
'nine': 9,
'ten': 10,
'eleven': 11,
'twelve': 12
};
exports.ORDINAL_WORD_DICTIONARY = {
'first': 1,
'second': 2,
'third': 3,
'fourth': 4,
'fifth': 5,
'sixth': 6,
'seventh': 7,
'eighth': 8,
'ninth': 9,
'tenth': 10,
'eleventh': 11,
'twelfth': 12,
'thirteenth': 13,
'fourteenth': 14,
'fifteenth': 15,
'sixteenth': 16,
'seventeenth': 17,
'eighteenth': 18,
'nineteenth': 19,
'twentieth': 20,
'twenty first': 21,
'twenty-first': 21,
'twenty second': 22,
'twenty-second': 22,
'twenty third': 23,
'twenty-third': 23,
'twenty fourth': 24,
'twenty-fourth': 24,
'twenty fifth': 25,
'twenty-fifth': 25,
'twenty sixth': 26,
'twenty-sixth': 26,
'twenty seventh': 27,
'twenty-seventh': 27,
'twenty eighth': 28,
'twenty-eighth': 28,
'twenty ninth': 29,
'twenty-ninth': 29,
'thirtieth': 30,
'thirty first': 31,
'thirty-first': 31
};
exports.TIME_UNIT_DICTIONARY = {
'sec': 'second',
'second': 'second',
'seconds': 'second',
'min': 'minute',
'mins': 'minute',
'minute': 'minute',
'minutes': 'minute',
'h': 'hour',
'hr': 'hour',
'hrs': 'hour',
'hour': 'hour',
'hours': 'hour',
'day': 'd',
'days': 'd',
'week': 'week',
'weeks': 'week',
'month': 'month',
'months': 'month',
'yr': 'year',
'year': 'year',
'years': 'year',
};
exports.NUMBER_PATTERN = "(?:" + pattern_1.matchAnyPattern(exports.INTEGER_WORD_DICTIONARY) + "|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few)";
function parseNumberPattern(match) {
var num = match.toLowerCase();
if (exports.INTEGER_WORD_DICTIONARY[num] !== undefined) {
return exports.INTEGER_WORD_DICTIONARY[num];
}
else if (num === 'a' || num === 'an') {
return 1;
}
else if (num.match(/few/)) {
return 3;
}
else if (num.match(/half/)) {
return 0.5;
}
return parseFloat(num);
}
exports.parseNumberPattern = parseNumberPattern;
exports.ORDINAL_NUMBER_PATTERN = "(?:" + pattern_1.matchAnyPattern(exports.ORDINAL_WORD_DICTIONARY) + "|[0-9]{1,2}(?:st|nd|rd|th)?)";
function parseOrdinalNumberPattern(match) {
var num = match.toLowerCase();
if (exports.ORDINAL_WORD_DICTIONARY[num] !== undefined) {
return exports.ORDINAL_WORD_DICTIONARY[num];
}
num = num.replace(/(?:st|nd|rd|th)$/i, '');
return parseInt(num);
}
exports.parseOrdinalNumberPattern = parseOrdinalNumberPattern;
exports.YEAR_PATTERN = "(?:[1-9][0-9]{0,3}\\s*(?:BE|AD|BC)|[1-2][0-9]{3}|[5-9][0-9])";
function parseYear(match) {
if (/BE/i.test(match)) {
match = match.replace(/BE/i, '');
return parseInt(match) - 543;
}
if (/BC/i.test(match)) {
match = match.replace(/BC/i, '');
return -parseInt(match);
}
if (/AD/i.test(match)) {
match = match.replace(/AD/i, '');
return parseInt(match);
}
var yearNumber = parseInt(match);
if (yearNumber < 100) {
if (yearNumber > 50) {
yearNumber = yearNumber + 1900;
}
else {
yearNumber = yearNumber + 2000;
}
}
return yearNumber;
}
exports.parseYear = parseYear;
var SINGLE_TIME_UNIT_PATTERN = "(" + exports.NUMBER_PATTERN + ")\\s*(" + pattern_1.matchAnyPattern(exports.TIME_UNIT_DICTIONARY) + ")\\s*";
var SINGLE_TIME_UNIT_REGEX = new RegExp(SINGLE_TIME_UNIT_PATTERN, 'i');
var SINGLE_TIME_UNIT_PATTERN_NO_CAPTURE = SINGLE_TIME_UNIT_PATTERN.replace(/\((?!\?)/g, '(?:');
exports.TIME_UNITS_PATTERN = "(?:" + SINGLE_TIME_UNIT_PATTERN_NO_CAPTURE + ")+";
function parseTimeUnits(timeunitText) {
var fragments = {};
var remainingText = timeunitText;
var match = SINGLE_TIME_UNIT_REGEX.exec(remainingText);
while (match) {
collectDateTimeFragment(fragments, match);
remainingText = remainingText.substring(match[0].length);
match = SINGLE_TIME_UNIT_REGEX.exec(remainingText);
}
return fragments;
}
exports.parseTimeUnits = parseTimeUnits;
function collectDateTimeFragment(fragments, match) {
var num = parseNumberPattern(match[1]);
var unit = exports.TIME_UNIT_DICTIONARY[match[2].toLowerCase()];
fragments[unit] = num;
}
|
# ------------------------------------------------------------------------------
# CodeHawk Binary Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2021 Aarno Labs LLC
#
# 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.
# ------------------------------------------------------------------------------
from typing import List, TYPE_CHECKING
from chb.app.AbstractSyntaxTree import AbstractSyntaxTree
from chb.app.ASTNode import ASTInstruction
from chb.app.InstrXData import InstrXData
from chb.arm.ARMDictionaryRecord import armregistry
from chb.arm.ARMOpcode import ARMOpcode, simplify_result
from chb.arm.ARMOperand import ARMOperand
import chb.util.fileutil as UF
from chb.util.IndexedTable import IndexedTableValue
if TYPE_CHECKING:
import chb.arm.ARMDictionary
@armregistry.register_tag("NOP", ARMOpcode)
class ARMNoOperation(ARMOpcode):
"""No operation; does nothing.
NOP<c>
tags[1]: <c>
"""
def __init__(
self,
d: "chb.arm.ARMDictionary.ARMDictionary",
ixval: IndexedTableValue) -> None:
ARMOpcode.__init__(self, d, ixval)
self.check_key(2, 0, "NoOperation")
@property
def operands(self) -> List[ARMOperand]:
return []
def annotation(self, xdata: InstrXData) -> str:
return "--"
def assembly_ast(
self,
astree: AbstractSyntaxTree,
iaddr: str,
bytestring: str,
xdata: InstrXData) -> List[ASTInstruction]:
return []
|
import * as React from "react";
import Helmet from "react-helmet";
class ErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = { hasError: false };
}
componentDidCatch(_error, _info) {
this.setState({ hasError: true });
}
render() {
if (!this.state.hasError) {
return this.props.children;
}
return (
<React.Fragment>
<section
className="bg-dark-image full-height"
style={{ background: "no-repeat center / cover", backgroundImage }}
>
<div className="container">
<div className="text-center">
<h1 className="hero-bold">Sorry</h1>
</div>
<div className="text-center">
<h2 className="hero-small">Something went wrong.</h2>
</div>
<div className="text-center">
<button
type="button"
className="btn btn-primary"
onClick={() => window.location.reload(true)}
>
Please try again
<i className="fa fa-angle-right fa-4" aria-hidden="true" />
</button>
</div>
</div>
</section>
<Helmet meta={[{ name: "prerender-status-code", content: "500" }]} />
</React.Fragment>
);
}
}
const backgroundImage = [
"linear-gradient(rgba(46, 53, 60, 0.7), rgba(46, 53, 60, 0.7))",
"url(https://unsplash.com/photos/wapAWmqpBJw/download)",
].join(", ");
export default ErrorBoundary;
|
var t = TrelloPowerUp.iframe();
var generalDiv = document.getElementById('generalDiv');
var modifyCardButton = document.getElementById('modifyCardButton');
var quantityOfQuantities = 0;
var quantityChip = [];
var estimate = {};
var cardInfoKey = 'pappira.cardInfo';
var listId = '5a9ef0ce024c776a21220836';
t.render(function(){
return t.get('card', 'shared', cardInfoKey)
.then(function(cardInfo){
modifyCardButton.addEventListener('click', updateEstimateCard);
if(cardInfo){
estimate = getEstimate(cardInfo);
createGeneralInformation(estimate);
}
});
});
var updateEstimate = function(){
var quantity = [];
for (var i = 0; i < quantityChip.length;i++){
var input = document.getElementById(quantityChip[i]);
if (input){
quantity.push(input.getAttribute('quantity'));
}
}
estimate.quantity = quantity;
var newClossedSize = document.getElementById("clossedSize").value;
//cambio los items que tenian el mismo openedSize que el viejo clossedsize
estimate.items.filter(item => item.openedSize == estimate.clossedSize).forEach(item => item.openedSize[0] = newClossedSize);
estimate.clossedSize = newClossedSize;
estimate.prices = [];
var oldEstimate = JSON.parse(JSON.stringify(estimate));
delete estimate.selectOption;
delete estimate.comments;
delete estimate.customer;
delete estimate.optionalFinishesPrices;
delete estimate.productionTime;
delete estimate.selectedExtraPrices;
addPrices(estimate);
addExtraPrices(estimate);
oldEstimate.prices = estimate.prices;
return oldEstimate;
};
var focusOutOnQuantity = function(elementFocusedOut){
if (elementFocusedOut.value.length > 0){
var chip = createChip('quantityChip' + ++quantityOfQuantities,elementFocusedOut.value,['quantity'],[elementFocusedOut.value])
var quantityChipsDiv = document.getElementById('quantityChipsDiv');
quantityChip.push('quantityChip' + quantityOfQuantities);
quantityChipsDiv.appendChild(chip);
elementFocusedOut.value = '';
}
};
var createChip = function(chipId,chipText,attirbuteName,attributeValue){
var div = document.createElement("div");
div.setAttribute('class','chip');
div.setAttribute('id',chipId);
if(attirbuteName && attributeValue){
for(var i = 0; i <attirbuteName.length;i++){
div.setAttribute(attirbuteName[i],attributeValue[i]);
}
}
div.append(chipText);
var i = document.createElement("i");
i.setAttribute('class','material-icons');
i.append('close');
div.appendChild(i);
return div;
}
var createGeneralInformation = function(estimateObject){
var divContainer = createElement('div','container','generalContainer');
var formItem = createElement('form','col s12','generalForm');
var h1 = createElement('h1','titulo','generalTitle','General');
var divRow = createElement('div','row','','');
var divQuantity = createTextInput('s4','quantity','Cantidad','number');
divRow.appendChild(divQuantity);
var divChips = createElement('div','input-field col s4','quantityChipsDiv');
divRow.appendChild(divChips);
var divClossedSize = createTextInput('s12','clossedSize','Tamaño cerrado (mm)','text',estimateObject?estimateObject.clossedSize:null);
divRow.appendChild(divClossedSize);
formItem.appendChild(h1);
formItem.appendChild(divRow);
divContainer.appendChild(formItem);
generalDiv.appendChild(divContainer);
var quantity = document.getElementById('quantity');
quantity.addEventListener('focusout',function(e){
focusOutOnQuantity(e.srcElement);
});
quantity.addEventListener('keyup',function(e){
if(e.keyCode === 13 || e.keyCode === 32){
focusOutOnQuantity(e.srcElement);
}
});
if (estimateObject && estimateObject.quantity){
for (var i = 0; i < estimateObject.quantity.length;i++){
var chip = createChip('quantityChip' + ++quantityOfQuantities,estimateObject.quantity[i],['quantity'],[estimateObject.quantity[i]])
var quantityChipsDiv = document.getElementById('quantityChipsDiv');
quantityChip.push('quantityChip' + quantityOfQuantities);
quantityChipsDiv.appendChild(chip);
}
}
}
var updateEstimateCard = function() {
var estimate = updateEstimate(estimate);
updateCard(estimate);
}; |
const _ = require('lodash');
const { Album } = require('../models/album');
const { Song } = require('../models/song');
const { Artist } = require('../models/artist');
const { User } = require('../models/user');
exports.search = async (req, res) => {
const query = new RegExp(req.query.q.trim(), 'gi');
const songs = await Song
.find({ $text: { $search: query } }).select(['_id', 'title']);
const albums = await Album
.find({ $text: { $search: query } }).select(['_id', 'title']);
const artists = await Artist
.find({ $text: { $search: query } }).select(['_id', 'stageName']);
const users = await User
.find({ $text: { $search: query } })
.select(['_id', 'firstName', 'lastName']);
if (_.isEmpty(songs) && _.isEmpty(albums) && _.isEmpty(artists) && _.isEmpty(users)) {
return res.status(404).send({
success: false,
message: 'we could not find what you are looking for'
});
}
const results = {
songs, albums, artists, users
};
res.status(200).send({ success: true, data: results });
};
|
import React from 'react';
import PropTypes from 'prop-types';
import Navbar from './navbar';
import './layout.css';
const Layout = ({ children }) => (
<div>
<Navbar />
{children}
</div>
);
Layout.propTypes = {
children: PropTypes.node.isRequired,
};
export default Layout;
|
/**
* Created by Moses Zengo on 3/6/2017.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("superagent-proxy")):"function"==typeof define&&define.amd?define(["superagent-proxy"],t):"object"==typeof exports?exports.PubNub=t(require("superagent-proxy")):e.PubNub=t(e["superagent-proxy"])}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return!(!navigator||!navigator.sendBeacon)&&void navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(1),c=r(u),l=(n(18),{get:function(e){try{return localStorage.getItem(e)}catch(e){return null}},set:function(e,t){try{return localStorage.setItem(e,t)}catch(e){return null}}}),h=function(e){function t(e){i(this,t),e.db=l,e.sendBeacon=a,e.sdkFamily="Web";var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return window.addEventListener("offline",function(){n.__networkDownDetected()}),window.addEventListener("online",function(){n.__networkUpDetected()}),n}return s(t,e),t}(c.default);t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(2),u=i(a),c=n(7),l=i(c),h=n(17),f=i(h),p=n(16),d=i(p),y=n(22),g=i(y),v=n(23),b=i(v),_=n(28),m=i(_),k=n(29),P=r(k),O=n(30),S=r(O),w=n(31),T=r(w),C=n(32),M=r(C),x=n(33),E=r(x),N=n(34),R=r(N),K=n(35),A=r(K),j=n(36),D=r(j),G=n(37),U=r(G),B=n(38),I=r(B),H=n(39),L=r(H),q=n(40),F=r(q),z=n(41),X=r(z),W=n(42),V=r(W),J=n(43),$=r(J),Q=n(44),Y=r(Q),Z=n(45),ee=r(Z),te=n(46),ne=r(te),re=n(47),ie=r(re),oe=n(48),se=r(oe),ae=n(25),ue=r(ae),ce=n(49),le=r(ce),he=n(26),fe=i(he),pe=n(20),de=i(pe),ye=(n(18),function(){function e(t){var n=this;o(this,e);var r=t.sendBeacon,i=t.db,s=this._config=new f.default({setup:t,db:i}),a=new d.default({config:s}),u=new l.default({config:s,crypto:a,sendBeacon:r}),c={config:s,networking:u,crypto:a},h=m.default.bind(this,c,ue),p=m.default.bind(this,c,I),y=m.default.bind(this,c,F),v=m.default.bind(this,c,V),_=m.default.bind(this,c,le),k=this._listenerManager=new b.default,O=new g.default({timeEndpoint:h,leaveEndpoint:p,heartbeatEndpoint:y,setStateEndpoint:v,subscribeEndpoint:_,crypto:c.crypto,config:c.config,listenerManager:k});this.addListener=k.addListener.bind(k),this.removeListener=k.removeListener.bind(k),this.removeAllListeners=k.removeAllListeners.bind(k),this.channelGroups={listGroups:m.default.bind(this,c,M),listChannels:m.default.bind(this,c,E),addChannels:m.default.bind(this,c,P),removeChannels:m.default.bind(this,c,S),deleteGroup:m.default.bind(this,c,T)},this.push={addChannels:m.default.bind(this,c,R),removeChannels:m.default.bind(this,c,A),deleteDevice:m.default.bind(this,c,U),listChannels:m.default.bind(this,c,D)},this.hereNow=m.default.bind(this,c,$),this.whereNow=m.default.bind(this,c,L),this.getState=m.default.bind(this,c,X),this.setState=O.adaptStateChange.bind(O),this.grant=m.default.bind(this,c,ee),this.audit=m.default.bind(this,c,Y),this.publish=m.default.bind(this,c,ne),this.fire=function(e,t){e.replicate=!1,e.storeInHistory=!1,n.publish(e,t)},this.history=m.default.bind(this,c,ie),this.fetchMessages=m.default.bind(this,c,se),this.time=h,this.subscribe=O.adaptSubscribeChange.bind(O),this.unsubscribe=O.adaptUnsubscribeChange.bind(O),this.disconnect=O.disconnect.bind(O),this.reconnect=O.reconnect.bind(O),this.destroy=function(){O.unsubscribeAll(),O.disconnect()},this.stop=this.destroy,this.unsubscribeAll=O.unsubscribeAll.bind(O),this.getSubscribedChannels=O.getSubscribedChannels.bind(O),this.getSubscribedChannelGroups=O.getSubscribedChannelGroups.bind(O),this.encrypt=a.encrypt.bind(a),this.decrypt=a.decrypt.bind(a),this.getAuthKey=c.config.getAuthKey.bind(c.config),this.setAuthKey=c.config.setAuthKey.bind(c.config),this.setCipherKey=c.config.setCipherKey.bind(c.config),this.getUUID=c.config.getUUID.bind(c.config),this.setUUID=c.config.setUUID.bind(c.config),this.getFilterExpression=c.config.getFilterExpression.bind(c.config),this.setFilterExpression=c.config.setFilterExpression.bind(c.config)}return s(e,[{key:"getVersion",value:function(){return this._config.getVersion()}},{key:"__networkDownDetected",value:function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy()}},{key:"__networkUpDetected",value:function(){this._listenerManager.announceNetworkUp(),this.reconnect()}}],[{key:"generateUUID",value:function(){return u.default.v4()}}]),e}());ye.OPERATIONS=fe.default,ye.CATEGORIES=de.default,t.default=ye,e.exports=t.default},function(e,t,n){var r=n(3),i=n(6),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){function r(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var s=void 0!==e.clockseq?e.clockseq:u,h=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,p=h-c+(f-l)/1e4;if(p<0&&void 0===e.clockseq&&(s=s+1&16383),(p<0||h>c)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,l=f,u=s,h+=122192928e5;var d=(1e4*(268435455&h)+f)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=255&d;var y=h/4294967296*1e4&268435455;i[r++]=y>>>8&255,i[r++]=255&y,i[r++]=y>>>24&15|16,i[r++]=y>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var g=e.node||a,v=0;v<6;++v)i[r+v]=g[v];return t?t:o(i)}var i=n(4),o=n(5),s=i(),a=[1|s[0],s[1],s[2],s[3],s[4],s[5]],u=16383&(s[6]<<8|s[7]),c=0,l=0;e.exports=r},function(e,t){(function(t){var n,r=t.crypto||t.msCrypto;if(r&&r.getRandomValues){var i=new Uint8Array(16);n=function(){return r.getRandomValues(i),i}}if(!n){var o=new Array(16);n=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}e.exports=n}).call(t,function(){return this}())},function(e,t){function n(e,t){var n=t||0,i=r;return i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);e.exports=n},function(e,t,n){function r(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[r+a]=s[a];return t||o(s)}var i=n(4),o=n(5);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(8),a=r(s),u=n(16),c=(r(u),n(17)),l=(r(c),n(20)),h=r(l),f=(n(18),function(){function e(t){var n=t.config,r=t.crypto,o=t.sendBeacon;i(this,e),this._config=n,this._crypto=r,this._sendBeacon=o,this._maxSubDomain=20,this._currentSubDomain=Math.floor(Math.random()*this._maxSubDomain),this._providedFQDN=(this._config.secure?"https://":"http://")+this._config.origin,this._coreParams={},this.shiftStandardOrigin()}return o(e,[{key:"nextOrigin",value:function(){if(this._providedFQDN.indexOf("pubsub.")===-1)return this._providedFQDN;var e=void 0;return this._currentSubDomain=this._currentSubDomain+1,this._currentSubDomain>=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("pubsub","ps"+e)}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,n,r){var i=a.default.post(this.getStandardOrigin()+n.url).query(e).send(t);return this._abstractedXDR(i,n,r)}},{key:"GET",value:function(e,t,n){var r=a.default.get(this.getStandardOrigin()+t.url).query(e);return this._abstractedXDR(r,t,n)}},{key:"_abstractedXDR",value:function(e,t,r){var i=this;return this._config.logVerbosity&&(e=e.use(this._attachSuperagentLogger)),this._config.proxy&&(n(21)(a.default),e=e.proxy(this._config.proxy)),e.timeout(t.timeout).end(function(e,n){var o={};if(o.error=null!==e,o.operation=t.operation,n&&n.status&&(o.statusCode=n.status),e)return o.errorData=e,o.category=i._detectErrorCategory(e),r(o,null);var s=JSON.parse(n.text);return r(o,s)})}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return h.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return h.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return h.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return h.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&"undefined"==typeof e.status)return h.default.PNNetworkIssuesCategory;if(e.timeout)return h.default.PNTimeoutCategory;if(e.response){if(e.response.badRequest)return h.default.PNBadRequestCategory;if(e.response.forbidden)return h.default.PNAccessDeniedCategory}return h.default.PNUnknownCategory}},{key:"_attachSuperagentLogger",value:function(e){var t=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console},n=(new Date).getTime(),r=(new Date).toISOString(),i=t();i.log("<<<<<"),i.log("["+r+"]","\n",e.url,"\n",e.qs),i.log("-----"),e.on("response",function(t){var r=(new Date).getTime(),o=r-n,s=(new Date).toISOString();i.log(">>>>>>"),i.log("["+s+" / "+o+"]","\n",e.url,"\n",e.qs,"\n",t.text),i.log("-----")})}}]),e}());t.default=f,e.exports=t.default},function(e,t,n){function r(){}function i(e){if(!y(e))return e;var t=[];for(var n in e)o(t,n,e[n]);return t.join("&")}function o(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){o(e,t,n)});else if(y(n))for(var r in n)o(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function s(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o<s;++o)t=i[o],n=t.indexOf("="),n==-1?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function a(e){var t,n,r,i,o=e.split(/\r?\n/),s={};o.pop();for(var a=0,u=o.length;a<u;++a)n=o[a],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=m(n.slice(t+1)),s[r]=i;return s}function u(e){return/[\/+]json\b/.test(e)}function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=a(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function l(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new c(n)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,n.xhr?(e.rawResponse="undefined"==typeof n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",t);var r;try{n._isResponseOK(t)||(r=new Error(t.statusText||"Unsuccessful HTTP response"),r.original=e,r.response=t,r.status=t.status)}catch(e){r=e}r?n.callback(r,t):n.callback(null,t)})}function h(e,t){var n=_("DELETE",e);return t&&n.end(t),n}var f;"undefined"!=typeof window?f=window:"undefined"!=typeof self?f=self:(console.warn("Using browser-only version of superagent in non-browser environment"),f=this);var p=n(9),d=n(10),y=n(11),g=n(12),v=n(13),b=n(15),_=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=l,_.getXHR=function(){if(!(!f.XMLHttpRequest||f.location&&"file:"==f.location.protocol&&f.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var m="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};_.serializeObject=i,_.parseString=s,_.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},_.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},_.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},v(c.prototype),c.prototype._parseBody=function(e){var t=_.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&u(this.type)&&(t=_.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},c.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},_.Response=c,p(l.prototype),d(l.prototype),l.prototype.type=function(e){return this.set("Content-Type",_.types[e]||e),this},l.prototype.accept=function(e){return this.set("Accept",_.types[e]||e),this},l.prototype.auth=function(e,t,n){switch(n||(n={type:"function"==typeof btoa?"basic":"auto"}),n.type){case"basic":this.set("Authorization","Basic "+btoa(e+":"+t));break;case"auto":this.username=e,this.password=t}return this},l.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},l.prototype.attach=function(e,t,n){if(this._data)throw Error("superagent can't mix .send() and .attach()");return this._getFormData().append(e,t,n||t.name),this},l.prototype._getFormData=function(){return this._formData||(this._formData=new f.FormData),this._formData},l.prototype.callback=function(e,t){if(this._maxRetries&&this._retries++<this._maxRetries&&b(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},l.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},l.prototype.buffer=l.prototype.ca=l.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},l.prototype.pipe=l.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},l.prototype._appendQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");g(this._sort)?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},l.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},l.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||r,this._appendQueryString(),this._end()},l.prototype._end=function(){var e=this,t=this.xhr=_.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||_.serialize[i?i.split(";")[0]:""];!o&&u(i)&&(o=_.serialize["application/json"]),o&&(n=o(n))}for(var s in this.header)null!=this.header[s]&&t.setRequestHeader(s,this.header[s]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send("undefined"!=typeof n?n:null),this},_.get=function(e,t,n){var r=_("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},_.head=function(e,t,n){var r=_("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.options=function(e,t,n){var r=_("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.del=h,_.delete=h,_.patch=function(e,t,n){var r=_("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.post=function(e,t,n){var r=_("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.put=function(e,t,n){var r=_("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var o=n(11);e.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){return e&&"object"==typeof e?("undefined"!=typeof e.deadline&&(this._timeout=e.deadline),"undefined"!=typeof e.response&&(this._responseTimeout=e.response),this):(this._timeout=e,this._responseTimeout=0,this)},r.prototype.retry=function(e){return this._maxRetries=e||1,this._retries=0,this},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(o(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype.withCredentials=function(){return this._withCredentials=!0,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=o(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&o(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},r.prototype._timeoutError=function(e,t){if(!this._aborted){var n=new Error(e+t+"ms exceeded");n.timeout=t,n.code="ECONNABORTED",this.timedout=!0,this.abort(),this.callback(n)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout)},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout)},this._responseTimeout))}},function(e,t){function n(e){return null!==e&&"object"==typeof e}e.exports=n},function(e,t,n){function r(e){var t=i(e)?Object.prototype.toString.call(e):"";return"[object Function]"===t}var i=n(11);e.exports=r},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var o=n(14);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=o.type(t);var n=o.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=o.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},function(e,t){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1),i=n[1].split(/ *= */)[1].slice(1,-1);return e[i]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&delete e.cookie,e}},function(e,t){var n=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];e.exports=function(e,t){return!!(e&&e.code&&~n.indexOf(e.code))||(!!(t&&t.status&&t.status>=500)||!!(e&&"timeout"in e&&"ECONNABORTED"==e.code))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(17),a=(r(s),n(19)),u=r(a),c=function(){function e(t){var n=t.config;i(this,e),this._config=n,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return o(e,[{key:"HMACSHA256",value:function(e){var t=u.default.HmacSHA256(e,this._config.secretKey);return t.toString(u.default.enc.Base64)}},{key:"SHA256",value:function(e){return u.default.SHA256(e).toString(u.default.enc.Hex)}},{key:"_parseOptions",value:function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())===-1&&(t.keyEncoding=this._defaultOptions.keyEncoding),this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))===-1&&(t.keyLength=this._defaultOptions.keyLength),this._allowedModes.indexOf(t.mode.toLowerCase())===-1&&(t.mode=this._defaultOptions.mode),t}},{key:"_decodeKey",value:function(e,t){return"base64"===t.keyEncoding?u.default.enc.Base64.parse(e):"hex"===t.keyEncoding?u.default.enc.Hex.parse(e):e}},{key:"_getPaddedKey",value:function(e,t){return e=this._decodeKey(e,t),t.encryptKey?u.default.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e}},{key:"_getMode",value:function(e){return"ecb"===e.mode?u.default.mode.ECB:u.default.mode.CBC}},{key:"_getIV",value:function(e){return"cbc"===e.mode?u.default.enc.Utf8.parse(this._iv):null}},{key:"encrypt",value:function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var r=this._getIV(n),i=this._getMode(n),o=this._getPaddedKey(t||this._config.cipherKey,n),s=u.default.AES.encrypt(e,o,{iv:r,mode:i}).ciphertext,a=s.toString(u.default.enc.Base64);return a||e}},{key:"decrypt",value:function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var r=this._getIV(n),i=this._getMode(n),o=this._getPaddedKey(t||this._config.cipherKey,n);try{var s=u.default.enc.Base64.parse(e),a=u.default.AES.decrypt({ciphertext:s},o,{iv:r,mode:i}).toString(u.default.enc.Utf8),c=JSON.parse(a);return c}catch(e){return null}}}]),e}();t.default=c,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),a=r(s),u=(n(18),function(){function e(t){var n=t.setup,r=t.db;i(this,e),this._db=r,this.instanceId=a.default.v4(),this.secretKey=n.secretKey||n.secret_key,this.subscribeKey=n.subscribeKey||n.subscribe_key,this.publishKey=n.publishKey||n.publish_key,this.sdkFamily=n.sdkFamily,this.partnerId=n.partnerId,this.setAuthKey(n.authKey),this.setCipherKey(n.cipherKey),this.setFilterExpression(n.filterExpression),this.origin=n.origin||"pubsub.pubnub.com",this.secure=n.ssl||!1,this.restore=n.restore||!1,this.proxy=n.proxy,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=n.logVerbosity||!1,this.suppressLeaveEvents=n.suppressLeaveEvents||!1,this.announceFailedHeartbeats=n.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=n.announceSuccessfulHeartbeats||!1,this.useInstanceId=n.useInstanceId||!1,this.useRequestId=n.useRequestId||!1,this.requestMessageCountThreshold=n.requestMessageCountThreshold,this.setTransactionTimeout(n.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(n.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(n.useSendBeacon||!0),this.setPresenceTimeout(n.presenceTimeout||300),n.heartbeatInterval&&this.setHeartbeatInterval(n.heartbeatInterval),this.setUUID(this._decideUUID(n.uuid))}return o(e,[{key:"getAuthKey",value:function(){return this.authKey}},{key:"setAuthKey",value:function(e){return this.authKey=e,this}},{key:"setCipherKey",value:function(e){return this.cipherKey=e,this}},{key:"getUUID",value:function(){return this.UUID}},{key:"setUUID",value:function(e){return this._db&&this._db.set&&this._db.set(this.subscribeKey+"uuid",e),this.UUID=e,this}},{key:"getFilterExpression",value:function(){return this.filterExpression}},{key:"setFilterExpression",value:function(e){return this.filterExpression=e,this}},{key:"getPresenceTimeout",value:function(){return this._presenceTimeout}},{key:"setPresenceTimeout",value:function(e){return this._presenceTimeout=e,this.setHeartbeatInterval(this._presenceTimeout/2-1),this}},{key:"getHeartbeatInterval",value:function(){return this._heartbeatInterval}},{key:"setHeartbeatInterval",value:function(e){return this._heartbeatInterval=e,this}},{key:"getSubscribeTimeout",value:function(){return this._subscribeRequestTimeout}},{key:"setSubscribeTimeout",value:function(e){return this._subscribeRequestTimeout=e,
this}},{key:"getTransactionTimeout",value:function(){return this._transactionalRequestTimeout}},{key:"setTransactionTimeout",value:function(e){return this._transactionalRequestTimeout=e,this}},{key:"isSendBeaconEnabled",value:function(){return this._useSendBeacon}},{key:"setSendBeaconConfig",value:function(e){return this._useSendBeacon=e,this}},{key:"getVersion",value:function(){return"4.4.1"}},{key:"_decideUUID",value:function(e){return e?e:this._db&&this._db.get&&this._db.get(this.subscribeKey+"uuid")?this._db.get(this.subscribeKey+"uuid"):a.default.v4()}}]),e}());t.default=u,e.exports=t.default},function(e,t){"use strict";e.exports={}},function(e,t){"use strict";var n=n||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=r.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-8*(i%4)&255)<<24-8*((r+i)%4);else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4),t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new s.init(n,t)}}),a=n.enc={},u=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-8*(r%4)&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-4*(r%8);return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-8*(r%4)&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-8*(r%4);return new s.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},h=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0);if(t=a*o,i=e.min(4*t,i),t){for(var u=0;u<t;u+=o)this._doProcessBlock(r,u);u=r.splice(0,t),n.sigBytes-=i}return new s.init(u,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=h.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=n.algo={};return n}(Math);!function(e){for(var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,r=t.algo,s=[],a=[],u=function(e){return 4294967296*(e-(0|e))|0},c=2,l=0;64>l;){var h;e:{h=c;for(var f=e.sqrt(h),p=2;p<=f;p++)if(!(h%p)){h=!1;break e}h=!0}h&&(8>l&&(s[l]=u(e.pow(c,.5))),a[l]=u(e.pow(c,1/3)),l++),c++}var d=[],r=r.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],c=n[5],l=n[6],h=n[7],f=0;64>f;f++){if(16>f)d[f]=0|e[t+f];else{var p=d[f-15],y=d[f-2];d[f]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[f-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+d[f-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+a[f]+d[f],y=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),h=l,l=c,c=u,u=s+p|0,s=o,o=i,i=r,r=p+y|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=e.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(r),t.HmacSHA256=o._createHmacHelper(r)}(Math),function(){var e=n,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var o=this._oKey=n.clone(),s=this._iKey=n.clone(),a=o.words,u=s.words,c=0;c<r;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),function(){var e=n,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<n;i+=3)for(var o=(t[i>>>2]>>>24-8*(i%4)&255)<<16|(t[i+1>>>2]>>>24-8*((i+1)%4)&255)<<8|t[i+2>>>2]>>>24-8*((i+2)%4)&255,s=0;4>s&&i+.75*s<n;s++)e.push(r.charAt(o>>>6*(3-s)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map,i=r.charAt(64);i&&(i=e.indexOf(i),-1!=i&&(n=i));for(var i=[],o=0,s=0;s<n;s++)if(s%4){var a=r.indexOf(e.charAt(s-1))<<2*(s%4),u=r.indexOf(e.charAt(s))>>>6-2*(s%4);i[o>>>2]|=(a|u)<<24-8*(o%4),o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,i,o,s){return e=e+(t&n|~t&r)+i+s,(e<<o|e>>>32-o)+t}function r(e,t,n,r,i,o,s){return e=e+(t&r|n&~r)+i+s,(e<<o|e>>>32-o)+t}function i(e,t,n,r,i,o,s){return e=e+(t^n^r)+i+s,(e<<o|e>>>32-o)+t}function o(e,t,n,r,i,o,s){return e=e+(n^(t|~r))+i+s,(e<<o|e>>>32-o)+t}for(var s=n,a=s.lib,u=a.WordArray,c=a.Hasher,a=s.algo,l=[],h=0;64>h;h++)l[h]=4294967296*e.abs(e.sin(h+1))|0;a=a.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var s=0;16>s;s++){var a=n+s,u=e[a];e[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var s=this._hash.words,a=e[n+0],u=e[n+1],c=e[n+2],h=e[n+3],f=e[n+4],p=e[n+5],d=e[n+6],y=e[n+7],g=e[n+8],v=e[n+9],b=e[n+10],_=e[n+11],m=e[n+12],k=e[n+13],P=e[n+14],O=e[n+15],S=s[0],w=s[1],T=s[2],C=s[3],S=t(S,w,T,C,a,7,l[0]),C=t(C,S,w,T,u,12,l[1]),T=t(T,C,S,w,c,17,l[2]),w=t(w,T,C,S,h,22,l[3]),S=t(S,w,T,C,f,7,l[4]),C=t(C,S,w,T,p,12,l[5]),T=t(T,C,S,w,d,17,l[6]),w=t(w,T,C,S,y,22,l[7]),S=t(S,w,T,C,g,7,l[8]),C=t(C,S,w,T,v,12,l[9]),T=t(T,C,S,w,b,17,l[10]),w=t(w,T,C,S,_,22,l[11]),S=t(S,w,T,C,m,7,l[12]),C=t(C,S,w,T,k,12,l[13]),T=t(T,C,S,w,P,17,l[14]),w=t(w,T,C,S,O,22,l[15]),S=r(S,w,T,C,u,5,l[16]),C=r(C,S,w,T,d,9,l[17]),T=r(T,C,S,w,_,14,l[18]),w=r(w,T,C,S,a,20,l[19]),S=r(S,w,T,C,p,5,l[20]),C=r(C,S,w,T,b,9,l[21]),T=r(T,C,S,w,O,14,l[22]),w=r(w,T,C,S,f,20,l[23]),S=r(S,w,T,C,v,5,l[24]),C=r(C,S,w,T,P,9,l[25]),T=r(T,C,S,w,h,14,l[26]),w=r(w,T,C,S,g,20,l[27]),S=r(S,w,T,C,k,5,l[28]),C=r(C,S,w,T,c,9,l[29]),T=r(T,C,S,w,y,14,l[30]),w=r(w,T,C,S,m,20,l[31]),S=i(S,w,T,C,p,4,l[32]),C=i(C,S,w,T,g,11,l[33]),T=i(T,C,S,w,_,16,l[34]),w=i(w,T,C,S,P,23,l[35]),S=i(S,w,T,C,u,4,l[36]),C=i(C,S,w,T,f,11,l[37]),T=i(T,C,S,w,y,16,l[38]),w=i(w,T,C,S,b,23,l[39]),S=i(S,w,T,C,k,4,l[40]),C=i(C,S,w,T,a,11,l[41]),T=i(T,C,S,w,h,16,l[42]),w=i(w,T,C,S,d,23,l[43]),S=i(S,w,T,C,v,4,l[44]),C=i(C,S,w,T,m,11,l[45]),T=i(T,C,S,w,O,16,l[46]),w=i(w,T,C,S,c,23,l[47]),S=o(S,w,T,C,a,6,l[48]),C=o(C,S,w,T,y,10,l[49]),T=o(T,C,S,w,P,15,l[50]),w=o(w,T,C,S,p,21,l[51]),S=o(S,w,T,C,m,6,l[52]),C=o(C,S,w,T,h,10,l[53]),T=o(T,C,S,w,b,15,l[54]),w=o(w,T,C,S,u,21,l[55]),S=o(S,w,T,C,g,6,l[56]),C=o(C,S,w,T,O,10,l[57]),T=o(T,C,S,w,d,15,l[58]),w=o(w,T,C,S,k,21,l[59]),S=o(S,w,T,C,f,6,l[60]),C=o(C,S,w,T,_,10,l[61]),T=o(T,C,S,w,c,15,l[62]),w=o(w,T,C,S,v,21,l[63]);s[0]=s[0]+S|0,s[1]=s[1]+w|0,s[2]=s[2]+T|0,s[3]=s[3]+C|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296);for(n[(i+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),s.MD5=c._createHelper(a),s.HmacMD5=c._createHmacHelper(a)}(Math),function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,t=e.algo,o=t.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),s=o.words,a=n.keySize,n=n.iterations;s.length<a;){u&&r.update(u);var u=r.update(e).finalize(t);r.reset();for(var c=1;c<n;c++)u=r.finalize(u),r.reset();o.concat(u)}return o.sigBytes=4*a,o}});e.EvpKDF=function(e,t,n){return o.create(n).compute(e,t)}}(),n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=t.enc.Base64,u=t.algo.EvpKDF,c=r.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return("string"==typeof n?y:d).encrypt(e,t,n,r)},decrypt:function(t,n,r){return("string"==typeof n?y:d).decrypt(e,t,n,r)}}}});r.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},h=function(t,n,r){var i=this._iv;i?this._iv=e:i=this._prevBlock;for(var o=0;o<r;o++)t[n+o]^=i[o]},f=(r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();f.Encryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;h.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),f.Decryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),h.call(this,e,t,r),this._prevBlock=i}}),l=l.CBC=f,f=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,n=n-e.sigBytes%n,r=n<<24|n<<16|n<<8|n,i=[],s=0;s<n;s+=4)i.push(r);n=o.create(i,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:f}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var p=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),l=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?o.create([1398893684,1701076831]).concat(e).concat(t):t).toString(a)},parse:function(e){e=a.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=o.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return p.create({ciphertext:e,salt:n})}},d=r.SerializableCipher=i.extend({cfg:i.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,p.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=o.random(8)),e=u.create({keySize:t+n}).compute(e,r),n=o.create(e.words.slice(t),4*n),e.sigBytes=4*t,p.create({key:e,iv:n,salt:r})}},y=r.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:t}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=d.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,d.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],h=[],f=[],p=[],d=[],y=0;256>y;y++)d[y]=128>y?y<<1:y<<1^283;for(var g=0,v=0,y=0;256>y;y++){var b=v^v<<1^v<<2^v<<3^v<<4,b=b>>>8^255&b^99;i[g]=b,o[b]=g;var _=d[g],m=d[_],k=d[m],P=257*d[b]^16843008*b;s[g]=P<<24|P>>>8,a[g]=P<<16|P>>>16,u[g]=P<<8|P>>>24,c[g]=P,P=16843009*k^65537*m^257*_^16843008*g,l[b]=P<<24|P>>>8,h[b]=P<<16|P>>>16,f[b]=P<<8|P>>>24,p[b]=P,g?(g=_^d[d[d[k^_]]],v^=d[d[v]]):g=v=1}var O=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;o<e;o++)if(o<n)r[o]=t[o];else{var s=r[o-1];o%n?6<n&&4==o%n&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=s<<8|s>>>24,s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=O[o/n|0]<<24),r[o]=r[o-n]^s}for(t=this._invKeySchedule=[],n=0;n<e;n++)o=e-n,s=n%4?r[o]:r[o-4],t[n]=4>n||4>=o?s:l[i[s>>>24]]^h[i[s>>>16&255]]^f[i[s>>>8&255]]^p[i[255&s]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,p,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],p=4,d=1;d<u;d++)var y=r[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[p++],g=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[p++],v=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[p++],f=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[p++],c=y,l=g,h=v;y=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[p++],g=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[p++],v=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[p++],f=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[p++],e[t]=y,e[t+1]=g,e[t+2]=v,e[t+3]=f},keySize:8});e.AES=t._createHelper(r)}(),n.mode.ECB=function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory"},e.exports=t.default},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(16),a=(r(s),n(17)),u=(r(a),n(23)),c=(r(u),n(24)),l=r(c),h=n(27),f=r(h),p=(n(18),n(20)),d=r(p),y=function(){function e(t){var n=t.subscribeEndpoint,r=t.leaveEndpoint,o=t.heartbeatEndpoint,s=t.setStateEndpoint,a=t.timeEndpoint,u=t.config,c=t.crypto,h=t.listenerManager;i(this,e),this._listenerManager=h,this._config=u,this._leaveEndpoint=r,this._heartbeatEndpoint=o,this._setStateEndpoint=s,this._subscribeEndpoint=n,this._crypto=c,this._channels={},this._presenceChannels={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._timetoken=0,this._subscriptionStatusAnnounced=!1,this._reconnectionManager=new l.default({timeEndpoint:a})}return o(e,[{key:"adaptStateChange",value:function(e,t){var n=this,r=e.state,i=e.channels,o=void 0===i?[]:i,s=e.channelGroups,a=void 0===s?[]:s;return o.forEach(function(e){e in n._channels&&(n._channels[e].state=r)}),a.forEach(function(e){e in n._channelGroups&&(n._channelGroups[e].state=r)}),this._setStateEndpoint({state:r,channels:o,channelGroups:a},t)}},{key:"adaptSubscribeChange",value:function(e){var t=this,n=e.timetoken,r=e.channels,i=void 0===r?[]:r,o=e.channelGroups,s=void 0===o?[]:o,a=e.withPresence,u=void 0!==a&&a;return this._config.subscribeKey&&""!==this._config.subscribeKey?(n&&(this._timetoken=n),i.forEach(function(e){t._channels[e]={state:{}},u&&(t._presenceChannels[e]={}),t._pendingChannelSubscriptions.push(e)}),s.forEach(function(e){t._channelGroups[e]={state:{}},u&&(t._presenceChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)}),this._subscriptionStatusAnnounced=!1,void this.reconnect()):void(console&&console.log&&console.log("subscribe key missing; aborting subscribe"))}},{key:"adaptUnsubscribeChange",value:function(e){var t=this,n=e.channels,r=void 0===n?[]:n,i=e.channelGroups,o=void 0===i?[]:i;r.forEach(function(e){e in t._channels&&delete t._channels[e],e in t._presenceChannels&&delete t._presenceChannels[e]}),o.forEach(function(e){e in t._channelGroups&&delete t._channelGroups[e],e in t._presenceChannelGroups&&delete t._channelGroups[e]}),this._config.suppressLeaveEvents===!1&&this._leaveEndpoint({channels:r,channelGroups:o},function(e){e.affectedChannels=r,e.affectedChannelGroups=o,t._listenerManager.announceStatus(e)}),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._timetoken=0,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect()}},{key:"unsubscribeAll",value:function(){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()})}},{key:"getSubscribedChannels",value:function(){return Object.keys(this._channels)}},{key:"getSubscribedChannelGroups",value:function(){return Object.keys(this._channelGroups)}},{key:"reconnect",value:function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()}},{key:"disconnect",value:function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()}},{key:"_registerHeartbeatTimer",value:function(){this._stopHeartbeatTimer(),this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval())}},{key:"_stopHeartbeatTimer",value:function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)}},{key:"_performHeartbeatLoop",value:function(){var e=this,t=Object.keys(this._channels),n=Object.keys(this._channelGroups),r={};if(0!==t.length||0!==n.length){t.forEach(function(t){var n=e._channels[t].state;Object.keys(n).length&&(r[t]=n)}),n.forEach(function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(r[t]=n)});var i=function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)};this._heartbeatEndpoint({channels:t,channelGroups:n,state:r},i.bind(this))}}},{key:"_startSubscribeLoop",value:function(){this._stopSubscribeLoop();var e=[],t=[];if(Object.keys(this._channels).forEach(function(t){return e.push(t)}),Object.keys(this._presenceChannels).forEach(function(t){return e.push(t+"-pnpres")}),Object.keys(this._channelGroups).forEach(function(e){return t.push(e)}),Object.keys(this._presenceChannelGroups).forEach(function(e){return t.push(e+"-pnpres")}),0!==e.length||0!==t.length){var n={channels:e,channelGroups:t,timetoken:this._timetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(n,this._processSubscribeResponse.bind(this))}}},{key:"_processSubscribeResponse",value:function(e,t){var n=this;if(e.error)return void(e.category===d.default.PNTimeoutCategory?this._startSubscribeLoop():e.category===d.default.PNNetworkIssuesCategory?(this.disconnect(),this._reconnectionManager.onReconnection(function(){n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:d.default.PNReconnectedCategory,operation:e.operation};n._listenerManager.announceStatus(t)}),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e));if(!this._subscriptionStatusAnnounced){var r={};r.category=d.default.PNConnectedCategory,r.operation=e.operation,r.affectedChannels=this._pendingChannelSubscriptions,r.affectedChannelGroups=this._pendingChannelGroupSubscriptions,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(r),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var i=t.messages||[],o=this._config.requestMessageCountThreshold;if(o&&i.length>=o){var s={};s.category=d.default.PNRequestMessageCountExceededCategory,s.operation=e.operation,this._listenerManager.announceStatus(s)}i.forEach(function(e){var t=e.channel,r=e.subscriptionMatch,i=e.publishMetaData;if(t===r&&(r=null),f.default.endsWith(e.channel,"-pnpres")){var o={};o.channel=null,o.subscription=null,o.actualChannel=null!=r?t:null,o.subscribedChannel=null!=r?r:t,t&&(o.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(o.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),o.action=e.payload.action,o.state=e.payload.data,o.timetoken=i.publishTimetoken,o.occupancy=e.payload.occupancy,o.uuid=e.payload.uuid,o.timestamp=e.payload.timestamp,n._listenerManager.announcePresence(o)}else{var s={};s.channel=null,s.subscription=null,s.actualChannel=null!=r?t:null,s.subscribedChannel=null!=r?r:t,s.channel=t,s.subscription=r,s.timetoken=i.publishTimetoken,s.publisher=e.issuingClientId,n._config.cipherKey?s.message=n._crypto.decrypt(e.payload):s.message=e.payload,n._listenerManager.announceMessage(s)}}),this._region=t.metadata.region,this._timetoken=t.metadata.timetoken,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&(this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=(n(18),n(20)),a=r(s),u=function(){function e(){i(this,e),this._listeners=[]}return o(e,[{key:"addListener",value:function(e){this._listeners.push(e)}},{key:"removeListener",value:function(e){var t=[];this._listeners.forEach(function(n){n!==e&&t.push(n)}),this._listeners=t}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"announcePresence",value:function(e){this._listeners.forEach(function(t){t.presence&&t.presence(e)})}},{key:"announceStatus",value:function(e){this._listeners.forEach(function(t){t.status&&t.status(e)})}},{key:"announceMessage",value:function(e){this._listeners.forEach(function(t){t.message&&t.message(e)})}},{key:"announceNetworkUp",value:function(){var e={};e.category=a.default.PNNetworkUpCategory,this.announceStatus(e)}},{key:"announceNetworkDown",value:function(){var e={};e.category=a.default.PNNetworkDownCategory,this.announceStatus(e)}}]),e}();t.default=u,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(25),a=(r(s),n(18),function(){function e(t){var n=t.timeEndpoint;i(this,e),this._timeEndpoint=n}return o(e,[{key:"onReconnection",value:function(e){this._reconnectionCallback=e}},{key:"startPolling",value:function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)}},{key:"stopPolling",value:function(){clearInterval(this._timeTimer)}},{key:"_performTimeLoop",value:function(){var e=this;this._timeEndpoint(function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())})}}]),e}());t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNTimeOperation}function o(){return"/time/0"}function s(e){var t=e.config;return t.getTransactionTimeout()}function a(){return{}}function u(){return!1}function c(e,t){return{timetoken:t[0]}}function l(){}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.getURL=o,t.getRequestTimeout=s,t.prepareParams=a,t.isAuthSupported=u,t.handleResponse=c,t.validateParams=l;var h=(n(18),n(26)),f=r(h)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerAudit:"PNAccessManagerAudit"},e.exports=t.default},function(e,t){"use strict";function n(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}function r(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function i(e){return n(e).sort()}function o(e){var t=i(e);return t.map(function(t){return t+"="+r(e[t])}).join("&")}function s(e,t){return e.indexOf(t,this.length-t.length)!==-1}function a(){var e=void 0,t=void 0,n=new Promise(function(n,r){e=n,t=r});return{promise:n,reject:t,fulfill:e}}e.exports={signPamFromParams:o,endsWith:s,createPromise:a,encodeString:r}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return e.type=t,e}function u(e){return a({message:e},"validationError")}function c(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.getURL(t,n)}function l(e){var t="PubNub-JS-"+e.sdkFamily;return e.partnerId&&(t+="-"+e.partnerId),t+="/"+e.getVersion()}function h(e,t,n){var r=e.config,i=e.crypto;n.timestamp=Math.floor((new Date).getTime()/1e3);var o=r.subscribeKey+"\n"+r.publishKey+"\n"+t+"\n";o+=y.default.signPamFromParams(n);var s=i.HMACSHA256(o);s=s.replace(/\+/g,"-"),s=s.replace(/\//g,"_"),n.signature=s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.networking,r=e.config,i=null,o=null,s={};t.getOperation()===b.default.PNTimeOperation||t.getOperation()===b.default.PNChannelGroupsOperation?i=arguments.length<=2?void 0:arguments[2]:(s=arguments.length<=2?void 0:arguments[2],i=arguments.length<=3?void 0:arguments[3]),"undefined"==typeof Promise||i||(o=y.default.createPromise());var a=t.validateParams(e,s);if(!a){var f=t.prepareParams(e,s),d=c(t,e,s),g=void 0,v={url:d,operation:t.getOperation(),timeout:t.getRequestTimeout(e)};f.uuid=r.UUID,f.pnsdk=l(r),r.useInstanceId&&(f.instanceid=r.instanceId),r.useRequestId&&(f.requestid=p.default.v4()),t.isAuthSupported()&&r.getAuthKey()&&(f.auth=r.getAuthKey()),r.secretKey&&h(e,d,f);var m=function(n,r){if(n.error)return void(i?i(n):o&&o.reject(new _("PubNub call failed, check status for details",n)));var a=t.handleResponse(e,r,s);i?i(n,a):o&&o.fulfill(a)};if(t.usePost&&t.usePost(e,s)){var k=t.postPayload(e,s);g=n.POST(f,k,v,m)}else g=n.GET(f,v,m);return t.getOperation()===b.default.PNSubscribeOperation?g:o?o.promise:void 0}return i?i(u(a)):o?(o.reject(new _("Validation failed, check status for details",u(a))),o.promise):void 0};var f=n(2),p=r(f),d=(n(18),n(27)),y=r(d),g=n(17),v=(r(g),n(26)),b=r(v),_=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.name=r.constructor.name,r.status=n,r.message=e,r}return s(t,e),t}(Error);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAddChannelsToGroupOperation}function o(e,t){var n=t.channels,r=t.channelGroup,i=e.config;return r?n&&0!==n.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function s(e,t){var n=t.channelGroup,r=e.config;return"/v1/channel-registration/sub-key/"+r.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){
var n=t.channels,r=void 0===n?[]:n;return{add:r.join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveChannelsFromGroupOperation}function o(e,t){var n=t.channels,r=t.channelGroup,i=e.config;return r?n&&0!==n.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function s(e,t){var n=t.channelGroup,r=e.config;return"/v1/channel-registration/sub-key/"+r.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels,r=void 0===n?[]:n;return{remove:r.join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveGroupOperation}function o(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function s(e,t){var n=t.channelGroup,r=e.config;return"/v1/channel-registration/sub-key/"+r.subscribeKey+"/channel-group/"+d.default.encodeString(n)+"/remove"}function a(){return!0}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(){return{}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNChannelGroupsOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e){var t=e.config;return"/v1/channel-registration/sub-key/"+t.subscribeKey+"/channel-group"}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{groups:t.payload.groups}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNChannelsForGroupOperation}function o(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function s(e,t){var n=t.channelGroup,r=e.config;return"/v1/channel-registration/sub-key/"+r.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,i=t.channels,o=e.config;return n?r?i&&0!==i.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device,r=e.config;return"/v1/push/sub-key/"+r.subscribeKey+"/devices/"+n}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.pushGateway,r=t.channels,i=void 0===r?[]:r;return{type:n,add:i.join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,i=t.channels,o=e.config;return n?r?i&&0!==i.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device,r=e.config;return"/v1/push/sub-key/"+r.subscribeKey+"/devices/"+n}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.pushGateway,r=t.channels,i=void 0===r?[]:r;return{type:n,remove:i.join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,i=e.config;return n?r?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device,r=e.config;return"/v1/push/sub-key/"+r.subscribeKey+"/devices/"+n}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.pushGateway;return{type:n}}function l(e,t){return{channels:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveAllPushNotificationsOperation}function o(e,t){var n=t.device,r=t.pushGateway,i=e.config;return n?r?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device,r=e.config;return"/v1/push/sub-key/"+r.subscribeKey+"/devices/"+n+"/remove"}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.pushGateway;return{type:n}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNUnsubscribeOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(o)+"/leave"}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNWhereNowOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r;return"/v2/presence/sub-key/"+n.subscribeKey+"/uuid/"+i}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHeartbeatOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(o)+"/heartbeat"}function a(){return!0}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.state,o=void 0===i?{}:i,s=e.config,a={};return r.length>0&&(a["channel-group"]=r.join(",")),a.state=JSON.stringify(o),a.heartbeat=s.getPresenceTimeout(),a}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNGetStateOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r,o=t.channels,s=void 0===o?[]:o,a=s.length>0?s.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(a)+"/uuid/"+i}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,o=n.channelGroups,s=void 0===o?[]:o,a={};return 1===i.length&&0===s.length?a[i[0]]=t.payload:a=t.payload,{channels:a}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSetStateOperation}function o(e,t){var n=e.config,r=t.state;return r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing State"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(o)+"/uuid/"+n.UUID+"/data"}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.state,r=t.channelGroups,i=void 0===r?[]:r,o={};return o.state=JSON.stringify(n),i.length>0&&(o["channel-group"]=i.join(",")),o}function l(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHereNowOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=t.channelGroups,s=void 0===o?[]:o,a="/v2/presence/sub-key/"+n.subscribeKey;if(i.length>0||s.length>0){var u=i.length>0?i.join(","):",";a+="/channel/"+d.default.encodeString(u)}return a}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.includeUUIDs,o=void 0===i||i,s=t.includeState,a=void 0!==s&&s,u={};return o||(u.disable_uuids=1),a&&(u.state=1),r.length>0&&(u["channel-group"]=r.join(",")),u}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,o=n.channelGroups,s=void 0===o?[]:o,a=n.includeUUIDs,u=void 0===a||a,c=n.includeState,l=void 0!==c&&c,h=function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[i[0]]={occupants:n,name:i[0],occupancy:t.occupancy},u&&t.uuids.forEach(function(e){l?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e},f=function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var r=t.payload.channels[n],i=[];return e.channels[n]={occupants:i,name:n,occupancy:r.occupancy},u&&r.uuids.forEach(function(e){l?i.push({state:e.state,uuid:e.uuid}):i.push({state:null,uuid:e})}),e}),e},p=void 0;return p=i.length>1||s.length>0||0===s.length&&0===i.length?f():h()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAccessManagerAudit}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e){var t=e.config;return"/v2/auth/audit/sub-key/"+t.subscribeKey}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!1}function c(e,t){var n=t.channel,r=t.channelGroup,i=t.authKeys,o=void 0===i?[]:i,s={};return n&&(s.channel=n),r&&(s["channel-group"]=r),o.length>0&&(s.auth=o.join(",")),s}function l(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAccessManagerGrant}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e){var t=e.config;return"/v2/auth/grant/sub-key/"+t.subscribeKey}function a(e){var t=e.config;return t.getTransactionTimeout()}function u(){return!1}function c(e,t){var n=t.channels,r=void 0===n?[]:n,i=t.channelGroups,o=void 0===i?[]:i,s=t.ttl,a=t.read,u=void 0!==a&&a,c=t.write,l=void 0!==c&&c,h=t.manage,f=void 0!==h&&h,p=t.authKeys,d=void 0===p?[]:p,y={};return y.r=u?"1":"0",y.w=l?"1":"0",y.m=f?"1":"0",r.length>0&&(y.channel=r.join(",")),o.length>0&&(y["channel-group"]=o.join(",")),d.length>0&&(y.auth=d.join(",")),(s||0===s)&&(y.ttl=s),y}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.crypto,r=e.config,i=JSON.stringify(t);return r.cipherKey&&(i=n.encrypt(i),i=JSON.stringify(i)),i}function o(){return v.default.PNPublishOperation}function s(e,t){var n=e.config,r=t.message,i=t.channel;return i?r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function a(e,t){var n=t.sendByPost,r=void 0!==n&&n;return r}function u(e,t){var n=e.config,r=t.channel,o=t.message,s=i(e,o);return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0/"+_.default.encodeString(s)}function c(e,t){var n=e.config,r=t.channel;return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0"}function l(e){var t=e.config;return t.getTransactionTimeout()}function h(){return!0}function f(e,t){var n=t.message;return i(e,n)}function p(e,t){var n=t.meta,r=t.replicate,i=void 0===r||r,o=t.storeInHistory,s=t.ttl,a={};return null!=o&&(o?a.store="1":a.store="0"),s&&(a.ttl=s),i===!1&&(a.norep="true"),n&&"object"===("undefined"==typeof n?"undefined":y(n))&&(a.meta=JSON.stringify(n)),a}function d(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getOperation=o,t.validateParams=s,t.usePost=a,t.getURL=u,t.postURL=c,t.getRequestTimeout=l,t.isAuthSupported=h,t.postPayload=f,t.prepareParams=p,t.handleResponse=d;var g=(n(18),n(26)),v=r(g),b=n(27),_=r(b)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function o(){return p.default.PNHistoryOperation}function s(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function a(e,t){var n=t.channel,r=e.config;return"/v2/history/sub-key/"+r.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.reverse,o=t.count,s=void 0===o?100:o,a=t.stringifiedTimeToken,u=void 0!==a&&a,c={include_token:"true"};return c.count=s,n&&(c.start=n),r&&(c.end=r),u&&(c.string_message_token="true"),null!=i&&(c.reverse=i.toString()),c}function h(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var r={timetoken:t.timetoken,entry:i(e,t.message)};n.messages.push(r)}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=s,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(18),n(26)),p=r(f),d=n(27),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function o(){return p.default.PNFetchMessagesOperation}function s(e,t){var n=t.channels,r=e.config;return n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function a(e,t){var n=t.channels,r=void 0===n?[]:n,i=e.config,o=r.length>0?r.join(","):",";return"/v3/history/sub-key/"+i.subscribeKey+"/channel/"+y.default.encodeString(o)}function u(e){var t=e.config;return t.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.count,o={};return i&&(o.max=i),n&&(o.start=n),r&&(o.end=r),o}function h(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(r){n.channels[r]=[],(t.channels[r]||[]).forEach(function(t){var o={};o.channel=r,o.subscription=null,o.timetoken=t.timetoken,o.message=i(e,t.message),n.channels[r].push(o)})}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=s,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(18),n(26)),p=r(f),d=n(27),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSubscribeOperation}function o(e){var t=e.config;if(!t.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,o=i.length>0?i.join(","):",";return"/v2/subscribe/"+n.subscribeKey+"/"+d.default.encodeString(o)+"/0"}function a(e){var t=e.config;return t.getSubscribeTimeout()}function u(){return!0}function c(e,t){var n=e.config,r=t.channelGroups,i=void 0===r?[]:r,o=t.timetoken,s=t.filterExpression,a=t.region,u={heartbeat:n.getPresenceTimeout()};return i.length>0&&(u["channel-group"]=i.join(",")),s&&s.length>0&&(u["filter-expr"]=s),o&&(u.tt=o),a&&(u.tr=a),u}function l(e,t){var n=[];t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},r={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,publishMetaData:t};n.push(r)});var r={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=o,t.getURL=s,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(18),n(26)),f=r(h),p=n(27),d=r(p)}])}); |
/**
* Created by Sweets823 on 2016/6/23.
*/
(function () {
'use strict';
angular
.module('sysApp.demo', [
'ui.router',
'ui.bootstrap',
'ngSanitize',
'oc.lazyLoad'
])
.config(demoConfig)
demoConfig.$inject = ['$stateProvider', '$urlRouterProvider', '$ocLazyLoadProvider'];
function demoConfig($stateProvider, $urlRouterProvider, $ocLazyLoadProvider) {
$stateProvider
.state("demo", {
parent: "index",
url: '/demo',
ncyBreadcrumb: {
label: 'demo测试'
},
views: {
"dashboard@index": {
templateUrl: "app/demo/demo.html",
controller: 'demoController'
}
},
resolve: {
loadCtrl: ['$ocLazyLoad', '$log', function ($ocLazyLoad, $log) {
return $ocLazyLoad.load([{
serie: true,
files: [
'app/demo/demo.controller.js'
]
}]).then(function () {
$log.debug('--------动态加载demo.controller加载完毕-------');
});
}]
}
});
}
})(); |
# Copyright 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A factory test to stress CPU, by generating pseudo random numbers.
Description
-----------
It stresses CPU by generating random number using /dev/urandom for a specified
period of time (specified by ``duration_secs``).
Test Procedure
--------------
This is an automated test without user interaction.
Start the test and it will run for the time specified in argument
``duration_secs``, and pass if no errors found; otherwise fail with error
messages and logs.
Dependency
----------
No dependencies. This test does not support remote DUT.
Examples
--------
To generate random number and stress CPU for 4 hours, add this in test list::
{
"pytest_name": "urandom",
"args": {
"duration_secs": 14400
}
}
"""
import logging
import time
import unittest
from cros.factory.utils import arg_utils
class UrandomTest(unittest.TestCase):
ARGS = [
arg_utils.Arg('duration_secs', int, help='How long this test will take?'),
]
def runTest(self):
duration_secs = self.args.duration_secs
logging.info('Getting /dev/urandom for %d seconds', duration_secs)
with open('/dev/urandom', 'rb') as f:
end_time = time.time() + duration_secs
while time.time() <= end_time:
data = f.read(1024 * 1024)
self.assertTrue(data, '/dev/urandom returns nothing!')
|
import React from 'react'
import styled from 'styled-components'
import { space, color } from 'styled-system'
const Icon = ({
size,
...props
}) => (
<svg
{...props}
viewBox='0 0 24 24'
width={size}
height={size}
fill='currentcolor'
>
<path d='M22 18V3H2v15H0v2h24v-2h-2zm-8 0h-4v-1h4v1zm6-3H4V5h16v10z' />
</svg>
)
const LaptopChromebookIcon = styled(Icon)([], space, color)
LaptopChromebookIcon.displayName = 'LaptopChromebookIcon'
LaptopChromebookIcon.defaultProps = {
size: 24
}
export default LaptopChromebookIcon |
/*! jQuery UI - v1.11.4 - 2016-03-13
* http://jqueryui.com
* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var s=0,n=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,a=n.call(arguments,1),o=0,r=a.length;r>o;o++)for(i in a[o])s=a[o][i],a[o].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(a){var o="string"==typeof a,r=n.call(arguments,1),h=this;return o?this.each(function(){var i,n=e.data(this,s);return"instance"===a?(h=n,!1):n?e.isFunction(n[a])&&"_"!==a.charAt(0)?(i=n[a].apply(n,r),i!==n&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+a+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+a+"'")}):(r.length&&(a=e.widget.extend.apply(null,[a].concat(r))),this.each(function(){var t=e.data(this,s);t?(t.option(a||{}),t._init&&t._init()):e.data(this,s,new i(a,this))})),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget,function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,_,b,y=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),D={};return b=s(y),y[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,_=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=c.exec(i[0]),t=c.exec(i[1]),D[this]=[e?e[0]:0,t?t[0]:0],n[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?_.left+=m:"center"===n.at[0]&&(_.left+=m/2),"bottom"===n.at[1]?_.top+=g:"center"===n.at[1]&&(_.top+=g/2),p=t(D.at,m,g),_.left+=p[0],_.top+=p[1],this.each(function(){var s,l,u=e(this),c=u.outerWidth(),d=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),T=c+f+i(this,"marginRight")+w.width,S=d+b+i(this,"marginBottom")+w.height,M=e.extend({},_),N=t(D.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=c:"center"===n.my[0]&&(M.left-=c/2),"bottom"===n.my[1]?M.top-=d:"center"===n.my[1]&&(M.top-=d/2),M.left+=N[0],M.top+=N[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:c,elemHeight:d,collisionPosition:s,collisionWidth:T,collisionHeight:S,offset:[p[0]+N[0],p[1]+N[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-c,s=v.top-M.top,a=s+g-d,h={target:{element:y,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:c,height:d},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};c>m&&m>r(t+i)&&(h.horizontal="center"),d>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,c=l+t.collisionWidth-o-h,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+d+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=d+p+f)):c>0&&(s=e.left-t.collisionPosition.marginLeft+d+p+f-h,(s>0||c>r(s))&&(e.left+=d+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,c=l+t.collisionHeight-o-h,d="top"===t.my[1],p=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):c>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||c>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()
},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete}); |
var common = require('../common-tap.js')
var test = require('tap').test
var server
var port = common.port
var http = require("http")
var doc = {
"_id": "superfoo",
"_rev": "5-d11adeec0fdfea6b96b120610d2bed71",
"name": "superfoo",
"time": {
"modified": "2014-02-18T18:35:02.930Z",
"created": "2014-02-18T18:34:08.437Z",
"1.1.0": "2014-02-18T18:34:08.437Z",
"unpublished": {
"name": "isaacs",
"time": "2014-04-30T18:26:45.584Z",
"tags": {
"latest": "1.1.0"
},
"maintainers": [
{
"name": "foo",
"email": "[email protected]"
}
],
"description": "do lots a foo",
"versions": [
"1.1.0"
]
}
},
"_attachments": {}
}
test("setup", function (t) {
server = http.createServer(function(req, res) {
res.end(JSON.stringify(doc))
})
server.listen(port, function() {
t.end()
})
})
test("cache add", function (t) {
common.npm(["cache", "add", "superfoo"], {}, function (er, c, so, se) {
if (er) throw er
t.ok(c)
t.equal(so, "")
t.similar(se, /404 Not Found: superfoo/)
t.end()
})
})
test("cleanup", function (t) {
server.close(function() {
t.end()
})
})
|
import { SkinInstance } from '../skin-instance.js';
// Class derived from SkinInstance with changes to make it suitable for batching
class SkinBatchInstance extends SkinInstance {
constructor(device, nodes, rootNode) {
super();
var numBones = nodes.length;
this.init(device, numBones);
this.device = device;
this.rootNode = rootNode;
// Unique bones per clone
this.bones = nodes;
}
updateMatrices(rootNode, skinUpdateIndex) {
}
updateMatrixPalette(rootNode, skinUpdateIndex) {
var pe;
var mp = this.matrixPalette;
var base;
var count = this.bones.length;
for (var i = 0; i < count; i++) {
pe = this.bones[i].getWorldTransform().data;
// Copy the matrix into the palette, ready to be sent to the vertex shader, transpose matrix from 4x4 to 4x3 format as well
base = i * 12;
mp[base] = pe[0];
mp[base + 1] = pe[4];
mp[base + 2] = pe[8];
mp[base + 3] = pe[12];
mp[base + 4] = pe[1];
mp[base + 5] = pe[5];
mp[base + 6] = pe[9];
mp[base + 7] = pe[13];
mp[base + 8] = pe[2];
mp[base + 9] = pe[6];
mp[base + 10] = pe[10];
mp[base + 11] = pe[14];
}
this.uploadBones(this.device);
}
}
export { SkinBatchInstance };
|
const chai = require('chai');
chai.use(require('chai-as-promised'));
const expect = chai.expect;
const sinon = require('sinon');
const { AgeEvent } = require('../../../../lib/db/models/age-event');
const db = require('../../../../lib/utils/db');
const ageEventFixture = require('../fixtures/models/age-event');
const { eventTTL } = require('../../../../config');
describe('Models > AgeEvent', () => {
before(async () => {
sinon.useFakeTimers(Date.now());
await db.connect();
});
afterEach(async () => {
await AgeEvent.deleteMany();
});
after(async () => {
await db.disconnect();
});
describe('attributes', () => {
describe('with valid values', () => {
it('is valid', () => {
return expect(AgeEvent.create({ ...ageEventFixture })).to.eventually.be.fulfilled;
});
});
describe('with invalid values', () => {
describe('.event', () => {
it('is invalid since missing', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, event: null })).to.eventually.be.rejected;
});
});
describe('.identifier', () => {
it('is invalid since missing', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, identifier: null })).to.eventually.be.rejected;
});
});
describe('.createdAt', () => {
it('is invalid since missing', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, createdAt: null })).to.eventually.be.rejected;
});
it('is invalid since not a number', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, createdAt: '1' })).to.eventually.be.rejected;
});
it('is invalid since not in an epoch format', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, createdAt: 1 })).to.eventually.be.rejectedWith('"createdAt" must be an epoch');
});
});
describe('.endedAt', () => {
it('is invalid since missing', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, endedAt: null })).to.eventually.be.rejected;
});
it('is invalid since not a number', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, endedAt: '1' })).to.eventually.be.rejected;
});
it('is invalid since not in an epoch format', async () => {
return expect(AgeEvent.create({ ...ageEventFixture, endedAt: 1 })).to.eventually.be.rejectedWith('"endedAt" must be an epoch');
});
});
});
describe('.age', () => {
describe('with event marked as ended', () => {
it('calculates the event age based on "createdAt" and "endedAt"', async () => {
const { createdAt, endedAt } = ageEventFixture;
const expectedAge = endedAt - createdAt;
const event = await AgeEvent.create({ ...ageEventFixture });
expect(event.age).to.equal(expectedAge);
});
});
describe('with event not marked as ended', () => {
it('calculates the event age based on "createdAt" and "endedAt"', async () => {
const { createdAt } = ageEventFixture;
const expectedAge = Date.now() - createdAt;
const ageEventAttributes = ageEventFixture;
delete ageEventAttributes.endedAt;
const event = await AgeEvent.create({ ...ageEventAttributes });
expect(event.age).to.equal(expectedAge);
});
});
});
});
describe('indexes', () => {
it('has a unique composite index of "event" and "indentifier"', () => {
const expectedIndex = [{ event: 1, identifier: 1 }, { unique: true, background: true }];
expect(AgeEvent.schema._indexes[0]).to.deep.equal(expectedIndex);
});
it(`expires events after "${eventTTL}" seconds`, () => {
const expectedIndex = [{ createdAt: 1 }, { expireAfterSeconds: eventTTL, background: true }];
expect(AgeEvent.schema._indexes[1]).to.deep.equal(expectedIndex);
});
});
});
|
/*! 2.6.8 | MIT Licensed */;!function(t){"use strict";var e=t.document,n={modules:{},status:{},timeout:10,event:{}},r=function(){this.v="2.6.8"},o=t.LAYUI_GLOBAL||{},a=function(){var t=e.currentScript?e.currentScript.src:function(){for(var t,n=e.scripts,r=n.length-1,o=r;o>0;o--)if("interactive"===n[o].readyState){t=n[o].src;break}return t||n[r].src}();return n.dir=o.dir||t.substring(0,t.lastIndexOf("/")+1)}(),i=function(e,n){n=n||"log",t.console&&console[n]&&console[n]("layui error hint: "+e)},u="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),l=n.builtin={lay:"lay",layer:"layer",laydate:"laydate",laypage:"laypage",laytpl:"laytpl",layedit:"layedit",form:"form",upload:"upload",dropdown:"dropdown",transfer:"transfer",tree:"tree",table:"table",element:"element",rate:"rate",colorpicker:"colorpicker",slider:"slider",carousel:"carousel",flow:"flow",util:"util",code:"code",jquery:"jquery",all:"all","https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/layui.all":"https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/layui.all"};r.prototype.cache=n,r.prototype.define=function(t,e){var r=this,o="function"==typeof t,a=function(){var t=function(t,e){layui[t]=e,n.status[t]=!0};return"function"==typeof e&&e(function(r,o){t(r,o),n.callback[r]=function(){e(t)}}),this};return o&&(e=t,t=[]),r.use(t,a,null,"define"),r},r.prototype.use=function(r,o,c,s){function p(t,e){var r="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===t.type||r.test((t.currentTarget||t.srcElement).readyState))&&(n.modules[h]=e,v.removeChild(b),function o(){return++m>1e3*n.timeout/4?i(h+" is not a valid module","error"):void(n.status[h]?f():setTimeout(o,4))}())}function f(){c.push(layui[h]),r.length>1?y.use(r.slice(1),o,c,s):"function"==typeof o&&function(){return layui.jquery&&"function"==typeof layui.jquery&&"define"!==s?layui.jquery(function(){o.apply(layui,c)}):void o.apply(layui,c)}()}var y=this,d=n.dir=n.dir?n.dir:a,v=e.getElementsByTagName("head")[0];r=function(){return"string"==typeof r?[r]:"function"==typeof r?(o=r,["all"]):r}(),t.jQuery&&jQuery.fn.on&&(y.each(r,function(t,e){"jquery"===e&&r.splice(t,1)}),layui.jquery=layui.$=jQuery);var h=r[0],m=0;if(c=c||[],n.host=n.host||(d.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===r.length||layui["https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/layui.all"]&&l[h])return f(),y;var g=(l[h]?d+"modules/":/^\{\/\}/.test(y.modules[h])?"":n.base||"")+(y.modules[h]||h)+".js";if(g=g.replace(/^\{\/\}/,""),!n.modules[h]&&layui[h]&&(n.modules[h]=g),n.modules[h])!function S(){return++m>1e3*n.timeout/4?i(h+" is not a valid module","error"):void("string"==typeof n.modules[h]&&n.status[h]?f():setTimeout(S,4))}();else{var b=e.createElement("script");b.async=!0,b.charset="utf-8",b.src=g+function(){var t=n.version===!0?n.v||(new Date).getTime():n.version||"";return t?"?v="+t:""}(),v.appendChild(b),!b.attachEvent||b.attachEvent.toString&&b.attachEvent.toString().indexOf("[native code")<0||u?b.addEventListener("load",function(t){p(t,g)},!1):b.attachEvent("onreadystatechange",function(t){p(t,g)}),n.modules[h]=g}return y},r.prototype.getStyle=function(e,n){var r=e.currentStyle?e.currentStyle:t.getComputedStyle(e,null);return r[r.getPropertyValue?"getPropertyValue":"getAttribute"](n)},r.prototype.link=function(t,r,o){var a=this,u=e.getElementsByTagName("head")[0],l=e.createElement("link");"string"==typeof r&&(o=r);var c=(o||t).replace(/\.|\//g,""),s=l.id="layuicss-"+c,p="creating",f=0;return l.rel="stylesheet",l.href=t+(n.debug?"?v="+(new Date).getTime():""),l.media="all",e.getElementById(s)||u.appendChild(l),"function"!=typeof r?a:(function y(o){var u=100,l=e.getElementById(s);return++f>1e3*n.timeout/u?i(t+" timeout"):void(1989===parseInt(a.getStyle(l,"width"))?(o===p&&l.removeAttribute("lay-status"),l.getAttribute("lay-status")===p?setTimeout(y,u):r()):(l.setAttribute("lay-status",p),setTimeout(function(){y(p)},u)))}(),a)},r.prototype.addcss=function(t,e,r){return layui.link(n.dir+"css/"+t,e,r)},n.callback={},r.prototype.factory=function(t){if(layui[t])return"function"==typeof n.callback[t]?n.callback[t]:null},r.prototype.img=function(t,e,n){var r=new Image;return r.src=t,r.complete?e(r):(r.onload=function(){r.onload=null,"function"==typeof e&&e(r)},void(r.onerror=function(t){r.onerror=null,"function"==typeof n&&n(t)}))},r.prototype.config=function(t){t=t||{};for(var e in t)n[e]=t[e];return this},r.prototype.modules=function(){var t={};for(var e in l)t[e]=l[e];return t}(),r.prototype.extend=function(t){var e=this;t=t||{};for(var n in t)e[n]||e.modules[n]?i(n+" Module already exists","error"):e.modules[n]=t[n];return e},r.prototype.router=function(t){var e=this,t=t||location.hash,n={path:[],search:{},hash:(t.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(t)?(t=t.replace(/^#\//,""),n.href="../../../../layui/"+t,t=t.replace(/([^#])(#.*$)/,"$1").split("/")||[],e.each(t,function(t,e){/^\w+=/.test(e)?function(){e=e.split("="),n.search[e[0]]=e[1]}():n.path.push(e)}),n):n},r.prototype.url=function(t){var e=this,n={pathname:function(){var e=t?function(){var e=(t.match(/\.[^.]+?\/.+/)||[])[0]||"";return e.replace(/^[^\/]+/,"").replace(/\?.+/,"")}():location.pathname;return e.replace(/^\//,"").split("/")}(),search:function(){var n={},r=(t?function(){var e=(t.match(/\?.+/)||[])[0]||"";return e.replace(/\#.+/,"")}():location.search).replace(/^\?+/,"").split("&");return e.each(r,function(t,e){var r=e.indexOf("="),o=function(){return r<0?e.substr(0,e.length):0!==r&&e.substr(0,r)}();o&&(n[o]=r>0?e.substr(r+1):null)}),n}(),hash:e.router(function(){return t?(t.match(/#.+/)||[])[0]||"/":location.hash}())};return n},r.prototype.data=function(e,n,r){if(e=e||"layui",r=r||localStorage,t.JSON&&t.JSON.parse){if(null===n)return delete r[e];n="object"==typeof n?n:{key:n};try{var o=JSON.parse(r[e])}catch(a){var o={}}return"value"in n&&(o[n.key]=n.value),n.remove&&delete o[n.key],r[e]=JSON.stringify(o),n.key?o[n.key]:o}},r.prototype.sessionData=function(t,e){return this.data(t,e,sessionStorage)},r.prototype.device=function(e){var n=navigator.userAgent.toLowerCase(),r=function(t){var e=new RegExp(t+"/([^\\s\\_\\-]+)");return t=(n.match(e)||[])[1],t||!1},o={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(t.ActiveXObject||"ActiveXObject"in t)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:r("micromessenger")};return e&&!o[e]&&(o[e]=r(e)),o.android=/android/.test(n),o.ios="ios"===o.os,o.mobile=!(!o.android&&!o.ios),o},r.prototype.hint=function(){return{error:i}},r.prototype._typeof=function(t){return null===t?String(t):"object"==typeof t||"function"==typeof t?function(){var e=Object.prototype.toString.call(t).match(/\s(.+)\]$/)||[],n="Function|Array|Date|RegExp|Object|Error|Symbol";return e=e[1]||"Object",new RegExp("\\b("+n+")\\b").test(e)?e.toLowerCase():"object"}():typeof t},r.prototype._isArray=function(e){var n,r=this,o=r._typeof(e);return!(!e||"object"!=typeof e||e===t)&&(n="length"in e&&e.length,"array"===o||0===n||"number"==typeof n&&n>0&&n-1 in e)},r.prototype.each=function(t,e){var n,r=this,o=function(t,n){return e.call(n[t],t,n[t])};if("function"!=typeof e)return r;if(t=t||[],r._isArray(t))for(n=0;n<t.length&&!o(n,t);n++);else for(n in t)if(o(n,t))break;return r},r.prototype.sort=function(t,e,n){var r=JSON.parse(JSON.stringify(t||[]));return e?(r.sort(function(t,n){var r=t[e],o=n[e],a=[!isNaN(r),!isNaN(o)];return a[0]&&a[1]?r&&!o&&0!==o?1:!r&&0!==r&&o?-1:r-o:a[0]||a[1]?a[0]||!a[1]?-1:!a[0]||a[1]?1:void 0:r>o?1:r<o?-1:0}),n&&r.reverse(),r):r},r.prototype.stope=function(e){e=e||t.event;try{e.stopPropagation()}catch(n){e.cancelBubble=!0}};var c="LAYUI-EVENT-REMOVE";r.prototype.onevent=function(t,e,n){return"string"!=typeof t||"function"!=typeof n?this:r.event(t,e,null,n)},r.prototype.event=r.event=function(t,e,r,o){var a=this,i=null,u=(e||"").match(/\((.*)\)$/)||[],l=(t+"."+e).replace(u[0],""),s=u[1]||"",p=function(t,e){var n=e&&e.call(a,r);n===!1&&null===i&&(i=!1)};return r===c?(delete(a.cache.event[l]||{})[s],a):o?(n.event[l]=n.event[l]||{},n.event[l][s]=[o],this):(layui.each(n.event[l],function(t,e){return"{*}"===s?void layui.each(e,p):(""===t&&layui.each(e,p),void(s&&t===s&&layui.each(e,p)))}),i)},r.prototype.on=function(t,e,n){var r=this;return r.onevent.call(r,e,t,n)},r.prototype.off=function(t,e){var n=this;return n.event.call(n,e,t,c)},t.layui=new r}(window);layui.define(function(a){var i=layui.cache;layui.config({dir:i.dir.replace(/lay\/dest\/$/,"")}),a("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/layui.all",layui.v)});!function(t){"use strict";var e="lay",n=t.document,r=function(t){return new i(t)},i=function(t){for(var e=0,r="object"==typeof t?[t]:(this.selector=t,n.querySelectorAll(t||null));e<r.length;e++)this.push(r[e])};i.prototype=[],i.prototype.constructor=i,r.extend=function(){var t=1,e=arguments,n=function(t,e){t=t||("array"===layui._typeof(e)?[]:{});for(var r in e)t[r]=e[r]&&e[r].constructor===Object?n(t[r],e[r]):e[r];return t};for(e[0]="object"==typeof e[0]?e[0]:{};t<e.length;t++)"object"==typeof e[t]&&n(e[0],e[t]);return e[0]},r.v="1.1",r.ie=function(){var e=navigator.userAgent.toLowerCase();return!!(t.ActiveXObject||"ActiveXObject"in t)&&((e.match(/msie\s(\d+)/)||[])[1]||"11")}(),r.layui=layui||{},r.getPath=layui.cache.dir,r.stope=layui.stope,r.each=function(){return layui.each.apply(layui,arguments),this},r.digit=function(t,e,n){var r="";t=String(t),e=e||2;for(var i=t.length;i<e;i++)r+="0";return t<Math.pow(10,e)?r+(0|t):t},r.elem=function(t,e){var i=n.createElement(t);return r.each(e||{},function(t,e){i.setAttribute(t,e)}),i},r.hasScrollbar=function(){return n.body.scrollHeight>(t.innerHeight||n.documentElement.clientHeight)},r.style=function(t){t=t||{};var e=r.elem("style"),n=t.text||"",i=t.target||r("body")[0];if(n){"styleSheet"in e?(e.setAttribute("type","text/css"),e.styleSheet.cssText=n):e.innerHTML=n,r.style.index=r.style.index||0,r.style.index++;var o=e.id="LAY-STYLE-"+(t.id||"DF-"+r.style.index),c=r(i).find("#"+o);c[0]&&c.remove(),r(i).append(e)}},r.position=function(e,i,o){if(i){o=o||{},e!==n&&e!==r("body")[0]||(o.clickType="right");var c="right"===o.clickType?function(){var e=o.e||t.event||{};return{left:e.clientX,top:e.clientY,right:e.clientX,bottom:e.clientY}}():e.getBoundingClientRect(),u=i.offsetWidth,a=i.offsetHeight,s=function(t){return t=t?"scrollLeft":"scrollTop",n.body[t]|n.documentElement[t]},l=function(t){return n.documentElement[t?"clientWidth":"clientHeight"]},f=5,h=c.left,p=c.bottom;"center"===o.align?h-=(u-e.offsetWidth)/2:"right"===o.align&&(h=h-u+e.offsetWidth),h+u+f>l("width")&&(h=l("width")-u-f),h<f&&(h=f),p+a+f>l()&&(c.top>a+f?p=c.top-a-2*f:"right"===o.clickType&&(p=l()-a-2*f,p<0&&(p=0)));var y=o.position;if(y&&(i.style.position=y),i.style.left=h+("fixed"===y?0:s(1))+"px",i.style.top=p+("fixed"===y?0:s())+"px",!r.hasScrollbar()){var d=i.getBoundingClientRect();!o.SYSTEM_RELOAD&&d.bottom+f>l()&&(o.SYSTEM_RELOAD=!0,setTimeout(function(){r.position(e,i,o)},50))}}},r.options=function(t,e){var n=r(t),i=e||"lay-options";try{return new Function("return "+(n.attr(i)||"{}"))()}catch(o){return hint.error("parseerror\uff1a"+o,"error"),{}}},r.isTopElem=function(t){var e=[n,r("body")[0]],i=!1;return r.each(e,function(e,n){if(n===t)return i=!0}),i},i.addStr=function(t,e){return t=t.replace(/\s+/," "),e=e.replace(/\s+/," ").split(" "),r.each(e,function(e,n){new RegExp("\\b"+n+"\\b").test(t)||(t=t+" "+n)}),t.replace(/^\s|\s$/,"")},i.removeStr=function(t,e){return t=t.replace(/\s+/," "),e=e.replace(/\s+/," ").split(" "),r.each(e,function(e,n){var r=new RegExp("\\b"+n+"\\b");r.test(t)&&(t=t.replace(r,""))}),t.replace(/\s+/," ").replace(/^\s|\s$/,"")},i.prototype.find=function(t){var e=this,n=0,i=[],o="object"==typeof t;return this.each(function(r,c){for(var u=o?c.contains(t):c.querySelectorAll(t||null);n<u.length;n++)i.push(u[n]);e.shift()}),o||(e.selector=(e.selector?e.selector+" ":"")+t),r.each(i,function(t,n){e.push(n)}),e},i.prototype.each=function(t){return r.each.call(this,this,t)},i.prototype.addClass=function(t,e){return this.each(function(n,r){r.className=i[e?"removeStr":"addStr"](r.className,t)})},i.prototype.removeClass=function(t){return this.addClass(t,!0)},i.prototype.hasClass=function(t){var e=!1;return this.each(function(n,r){new RegExp("\\b"+t+"\\b").test(r.className)&&(e=!0)}),e},i.prototype.css=function(t,e){var n=this,i=function(t){return isNaN(t)?t:t+"px"};return"string"==typeof t&&void 0===e?function(){if(n.length>0)return n[0].style[t]}():n.each(function(n,o){"object"==typeof t?r.each(t,function(t,e){o.style[t]=i(e)}):o.style[t]=i(e)})},i.prototype.width=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].offsetWidth}():e.each(function(n,r){e.css("width",t)})},i.prototype.height=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].offsetHeight}():e.each(function(n,r){e.css("height",t)})},i.prototype.attr=function(t,e){var n=this;return void 0===e?function(){if(n.length>0)return n[0].getAttribute(t)}():n.each(function(n,r){r.setAttribute(t,e)})},i.prototype.removeAttr=function(t){return this.each(function(e,n){n.removeAttribute(t)})},i.prototype.html=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].innerHTML}():this.each(function(e,n){n.innerHTML=t})},i.prototype.val=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].value}():this.each(function(e,n){n.value=t})},i.prototype.append=function(t){return this.each(function(e,n){"object"==typeof t?n.appendChild(t):n.innerHTML=n.innerHTML+t})},i.prototype.remove=function(t){return this.each(function(e,n){t?n.removeChild(t):n.parentNode.removeChild(n)})},i.prototype.on=function(t,e){return this.each(function(n,r){r.attachEvent?r.attachEvent("on"+t,function(t){t.target=t.srcElement,e.call(r,t)}):r.addEventListener(t,e,!1)})},i.prototype.off=function(t,e){return this.each(function(n,r){r.detachEvent?r.detachEvent("on"+t,e):r.removeEventListener(t,e,!1)})},t.lay=r,t.layui&&layui.define&&layui.define(function(t){t(e,r)})}(window,window.document);layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error: ";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\(.)/g,"$1")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\(.)/g,"$1")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?'<a href="javascript:;" class="layui-laypage-prev'+(1==a.curr?" "+r:"")+'" data-page="'+(a.curr-1)+'">'+a.prev+"</a>":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push('<a href="javascript:;" class="layui-laypage-first" data-page="1" title="首页">'+(a.first||1)+"</a>");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r<t-1&&(r=u-t+1),a.first!==!1&&r>2&&e.push('<span class="layui-laypage-spr">…</span>');r<=u;r++)r===a.curr?e.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" '+(/^#/.test(a.theme)?'style="background-color:'+a.theme+';"':"")+"></em><em>"+r+"</em></span>"):e.push('<a href="javascript:;" data-page="'+r+'">'+r+"</a>");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1<a.pages&&e.push('<span class="layui-laypage-spr">…</span>'),0!==t&&e.push('<a href="javascript:;" class="layui-laypage-last" title="尾页" data-page="'+a.pages+'">'+(a.last||a.pages)+"</a>")),e.join("")}(),next:function(){return a.next?'<a href="javascript:;" class="layui-laypage-next'+(a.curr==a.pages?" "+r:"")+'" data-page="'+(a.curr+1)+'">'+a.next+"</a>":""}(),count:'<span class="layui-laypage-count">\u5171 '+a.count+" \u6761</span>",limit:function(){var e=['<span class="layui-laypage-limits"><select lay-ignore>'];return layui.each(a.limits,function(t,n){e.push('<option value="'+n+'"'+(n===a.limit?"selected":"")+">"+n+" \u6761/\u9875</option>")}),e.join("")+"</select></span>"}(),refresh:['<a href="javascript:;" data-page="'+a.curr+'" class="layui-laypage-refresh">','<i class="layui-icon layui-icon-refresh"></i>',"</a>"].join(""),skip:function(){return['<span class="layui-laypage-skip">到第','<input type="text" min="1" value="'+a.curr+'" class="layui-input">','页<button type="button" class="layui-laypage-btn">确定</button>',"</span>"].join("")}()};return['<div class="layui-box layui-laypage layui-laypage-'+(a.theme?/^#/.test(a.theme)?"molv":a.theme:"default")+'" id="layui-laypage-'+a.index+'">',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"</div>"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;o<y;o++)"a"===r[o].nodeName.toLowerCase()&&s.on(r[o],"click",function(){var e=0|this.getAttribute("data-page");e<1||e>i.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});!function(e,t){"use strict";var a=e.layui&&layui.define,n={getPath:e.lay&&lay.getPath?lay.getPath:"",link:function(t,a,n){l.path&&e.lay&&lay.layui&&lay.layui.link(l.path+t,a,n)}},i=e.LAYUI_GLOBAL||{},l={v:"5.3.1",config:{},index:e.laydate&&e.laydate.v?1e5:0,path:i.laydate_dir||n.getPath,set:function(e){var t=this;return t.config=lay.extend({},t.config,e),t},ready:function(e){var t="laydate",i="",r=(a?"modules/laydate/":"theme/")+"default/laydate.css?v="+l.v+i;return a?layui.addcss(r,e,t):n.link(r,e,t),this}},r=function(){var e=this,t=e.config,a=t.id;return r.that[a]=e,{hint:function(t){e.hint.call(e,t)},config:e.config}},o="laydate",s=".layui-laydate",y="layui-this",d="laydate-disabled",m=[100,2e5],c="layui-laydate-static",u="layui-laydate-list",h="layui-laydate-hint",f="layui-laydate-footer",p=".laydate-btns-confirm",g="laydate-time-text",v="laydate-btns-time",T="layui-laydate-preview",D=function(e){var t=this;t.index=++l.index,t.config=lay.extend({},t.config,l.config,e),e=t.config,e.id="id"in e?e.id:t.index,l.ready(function(){t.init()})},w="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s";r.formatArr=function(e){return(e||"").match(new RegExp(w+"|.","g"))||[]},D.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},D.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"click",show:!1,showBottom:!0,isPreview:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},D.prototype.lang=function(){var e=this,t=e.config,a={cn:{weeks:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],time:["\u65f6","\u5206","\u79d2"],timeTips:"\u9009\u62e9\u65f6\u95f4",startTime:"\u5f00\u59cb\u65f6\u95f4",endTime:"\u7ed3\u675f\u65f6\u95f4",dateTips:"\u8fd4\u56de\u65e5\u671f",month:["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"],tools:{confirm:"\u786e\u5b9a",clear:"\u6e05\u7a7a",now:"\u73b0\u5728"},timeout:"\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u65e9\u4e8e\u5f00\u59cb\u65f6\u95f4<br>\u8bf7\u91cd\u65b0\u9009\u62e9",invalidDate:"\u4e0d\u5728\u6709\u6548\u65e5\u671f\u6216\u65f6\u95f4\u8303\u56f4\u5185",formatError:["\u65e5\u671f\u683c\u5f0f\u4e0d\u5408\u6cd5<br>\u5fc5\u987b\u9075\u5faa\u4e0b\u8ff0\u683c\u5f0f\uff1a<br>","<br>\u5df2\u4e3a\u4f60\u91cd\u7f6e"],preview:"\u5f53\u524d\u9009\u4e2d\u7684\u7ed3\u679c"},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"},timeout:"End time cannot be less than start Time<br>Please re-select",invalidDate:"Invalid date",formatError:["The date format error<br>Must be followed\uff1a<br>","<br>It has been reset"],preview:"The selected result"}};return a[t.lang]||a.cn},D.prototype.init=function(){var t=this,a=t.config,n="static"===a.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};a.elem=lay(a.elem),a.eventElem=lay(a.eventElem),a.elem[0]&&(t.rangeStr=a.range?"string"==typeof a.range?a.range:"-":"","array"===layui._typeof(a.range)&&(t.rangeElem=[lay(a.range[0]),lay(a.range[1])]),i[a.type]||(e.console&&console.error&&console.error("laydate type error:'"+a.type+"' is not supported"),a.type="date"),a.format===i.date&&(a.format=i[a.type]||i.date),t.format=r.formatArr(a.format),t.EXP_IF="",t.EXP_SPLIT="",lay.each(t.format,function(e,a){var n=new RegExp(w).test(a)?"\\d{"+function(){return new RegExp(w).test(t.format[0===e?e+1:e-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;t.EXP_IF=t.EXP_IF+n,t.EXP_SPLIT=t.EXP_SPLIT+"("+n+")"}),t.EXP_IF_ONE=new RegExp("^"+t.EXP_IF+"$"),t.EXP_IF=new RegExp("^"+(a.range?t.EXP_IF+"\\s\\"+t.rangeStr+"\\s"+t.EXP_IF:t.EXP_IF)+"$"),t.EXP_SPLIT=new RegExp("^"+t.EXP_SPLIT+"$",""),t.isInput(a.elem[0])||"focus"===a.trigger&&(a.trigger="click"),a.elem.attr("lay-key")||(a.elem.attr("lay-key",t.index),a.eventElem.attr("lay-key",t.index)),a.mark=lay.extend({},a.calendar&&"cn"===a.lang?{"0-1-1":"\u5143\u65e6","0-2-14":"\u60c5\u4eba","0-3-8":"\u5987\u5973","0-3-12":"\u690d\u6811","0-4-1":"\u611a\u4eba","0-5-1":"\u52b3\u52a8","0-5-4":"\u9752\u5e74","0-6-1":"\u513f\u7ae5","0-9-10":"\u6559\u5e08","0-9-18":"\u56fd\u803b","0-10-1":"\u56fd\u5e86","0-12-25":"\u5723\u8bde"}:{},a.mark),lay.each(["min","max"],function(e,t){var n=[],i=[];if("number"==typeof a[t]){var l=a[t],r=(new Date).getTime(),o=864e5,s=new Date(l?l<o?r+l*o:l:r);n=[s.getFullYear(),s.getMonth()+1,s.getDate()],l<o||(i=[s.getHours(),s.getMinutes(),s.getSeconds()])}else n=(a[t].match(/\d+-\d+-\d+/)||[""])[0].split("-"),i=(a[t].match(/\d+:\d+:\d+/)||[""])[0].split(":");a[t]={year:0|n[0]||(new Date).getFullYear(),month:n[1]?(0|n[1])-1:(new Date).getMonth(),date:0|n[2]||(new Date).getDate(),hours:0|i[0],minutes:0|i[1],seconds:0|i[2]}}),t.elemID="layui-laydate"+a.elem.attr("lay-key"),(a.show||n)&&t.render(),n||t.events(),a.value&&a.isInitValue&&("date"===layui._typeof(a.value)?t.setValue(t.parse(0,t.systemDate(a.value))):t.setValue(a.value)))},D.prototype.render=function(){var e=this,a=e.config,n=e.lang(),i="static"===a.position,r=e.elem=lay.elem("div",{id:e.elemID,"class":["layui-laydate",a.range?" layui-laydate-range":"",i?" "+c:"",a.theme&&"default"!==a.theme&&!/^#/.test(a.theme)?" laydate-theme-"+a.theme:""].join("")}),o=e.elemMain=[],s=e.elemHeader=[],y=e.elemCont=[],d=e.table=[],m=e.footer=lay.elem("div",{"class":f});if(a.zIndex&&(r.style.zIndex=a.zIndex),lay.each(new Array(2),function(e){if(!a.range&&e>0)return!0;var t=lay.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=lay.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=lay.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=lay.elem("div",{"class":"laydate-set-ym"}),t=lay.elem("span"),a=lay.elem("span");return e.appendChild(t),e.appendChild(a),e}(),function(){var e=lay.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=lay.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],l=lay.elem("div",{"class":"layui-laydate-content"}),r=lay.elem("table"),m=lay.elem("thead"),c=lay.elem("tr");lay.each(i,function(e,a){t.appendChild(a)}),m.appendChild(c),lay.each(new Array(6),function(e){var t=r.insertRow(0);lay.each(new Array(7),function(a){if(0===e){var i=lay.elem("th");i.innerHTML=n.weeks[a],c.appendChild(i)}t.insertCell(a)})}),r.insertBefore(m,r.children[0]),l.appendChild(r),o[e]=lay.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),o[e].appendChild(t),o[e].appendChild(l),s.push(i),y.push(l),d.push(r)}),lay(m).html(function(){var e=[],t=[];return"datetime"===a.type&&e.push('<span lay-type="datetime" class="'+v+'">'+n.timeTips+"</span>"),(a.range||"datetime"!==a.type)&&e.push('<span class="'+T+'" title="'+n.preview+'"></span>'),lay.each(a.btns,function(e,l){var r=n.tools[l]||"btn";a.range&&"now"===l||(i&&"clear"===l&&(r="cn"===a.lang?"\u91cd\u7f6e":"Reset"),t.push('<span lay-type="'+l+'" class="laydate-btns-'+l+'">'+r+"</span>"))}),e.push('<div class="laydate-footer-btns">'+t.join("")+"</div>"),e.join("")}()),lay.each(o,function(e,t){r.appendChild(t)}),a.showBottom&&r.appendChild(m),/^#/.test(a.theme)){var u=lay.elem("style"),h=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,a.theme);"styleSheet"in u?(u.setAttribute("type","text/css"),u.styleSheet.cssText=h):u.innerHTML=h,lay(r).addClass("laydate-theme-molv"),r.appendChild(u)}l.thisId=a.id,e.remove(D.thisElemDate),i?a.elem.append(r):(t.body.appendChild(r),e.position()),e.checkDate().calendar(null,0,"init"),e.changeEvent(),D.thisElemDate=e.elemID,"function"==typeof a.ready&&a.ready(lay.extend({},a.dateTime,{month:a.dateTime.month+1})),e.preview()},D.prototype.remove=function(e){var t=this,a=(t.config,lay("#"+(e||t.elemID)));return a[0]?(a.hasClass(c)||t.checkDate(function(){a.remove()}),t):t},D.prototype.position=function(){var e=this,t=e.config;return lay.position(e.bindElem||t.elem[0],e.elem,{position:t.position}),e},D.prototype.hint=function(e){var t=this,a=(t.config,lay.elem("div",{"class":h}));t.elem&&(a.innerHTML=e||"",lay(t.elem).find("."+h).remove(),t.elem.appendChild(a),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){lay(t.elem).find("."+h).remove()},3e3))},D.prototype.getAsYM=function(e,t,a){return a?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},D.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},D.prototype.checkDate=function(e){var t,a,n=this,i=(new Date,n.config),r=n.lang(),o=i.dateTime=i.dateTime||n.systemDate(),s=n.bindElem||i.elem[0],y=(n.isInput(s)?"val":"html",function(){if(n.rangeElem){var e=[n.rangeElem[0].val(),n.rangeElem[1].val()];if(e[0]&&e[1])return e.join(" "+n.rangeStr+" ")}return n.isInput(s)?s.value:"static"===i.position?"":lay(s).attr("lay-date")}()),d=function(e){e.year>m[1]&&(e.year=m[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=l.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},c=function(e,t,l){var r=["startTime","endTime"];t=(t.match(n.EXP_SPLIT)||[]).slice(1),l=l||0,i.range&&(n[r[l]]=n[r[l]]||{}),lay.each(n.format,function(o,s){var y=parseFloat(t[o]);t[o].length<s.length&&(a=!0),/yyyy|y/.test(s)?(y<m[0]&&(y=m[0],a=!0),e.year=y):/MM|M/.test(s)?(y<1&&(y=1,a=!0),e.month=y-1):/dd|d/.test(s)?(y<1&&(y=1,a=!0),e.date=y):/HH|H/.test(s)?(y<1&&(y=0,a=!0),e.hours=y,i.range&&(n[r[l]].hours=y)):/mm|m/.test(s)?(y<1&&(y=0,a=!0),e.minutes=y,i.range&&(n[r[l]].minutes=y)):/ss|s/.test(s)&&(y<1&&(y=0,a=!0),e.seconds=y,i.range&&(n[r[l]].seconds=y))}),d(e)};if("limit"===e)return d(o),n;y=y||i.value,"string"==typeof y&&(y=y.replace(/\s+/g," ").replace(/^\s|\s$/g,""));var u=function(){i.range&&(n.endDate=n.endDate||lay.extend({},i.dateTime,function(){var e={},t=i.dateTime,a=n.getAsYM(t.year,t.month);return"year"===i.type?e.year=t.year+1:"time"!==i.type&&(e.year=a[0],e.month=a[1]),"datetime"!==i.type&&"time"!==i.type||(e.hours=23,e.minutes=e.seconds=59),e}()))};u(),"string"==typeof y&&y?n.EXP_IF.test(y)?i.range?(y=y.split(" "+n.rangeStr+" "),lay.each([i.dateTime,n.endDate],function(e,t){c(t,y[e],e)})):c(o,y):(n.hint(r.formatError[0]+(i.range?i.format+" "+n.rangeStr+" "+i.format:i.format)+r.formatError[1]),a=!0):y&&"date"===layui._typeof(y)?i.dateTime=n.systemDate(y):(i.dateTime=n.systemDate(),delete n.startTime,delete n.endDate,u(),delete n.endTime),function(){if(n.rangeElem){var e=[n.rangeElem[0].val(),n.rangeElem[1].val()],t=[i.dateTime,n.endDate];lay.each(e,function(e,a){n.EXP_IF_ONE.test(a)&&c(t[e],a,e)})}}(),d(o),i.range&&d(n.endDate),a&&y&&n.setValue(i.range?n.endDate?n.parse():"":n.parse());var h=function(e){return n.newDate(e).getTime()};return(h(o)>h(i.max)||h(o)<h(i.min))&&(o=i.dateTime=lay.extend({},i.min)),i.range&&(h(n.endDate)<h(i.min)||h(n.endDate)>h(i.max))&&(n.endDate=lay.extend({},i.max)),e&&e(),n},D.prototype.mark=function(e,t){var a,n=this,i=n.config;return lay.each(i.mark,function(e,n){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(a=n||t[2])}),a&&e.html('<span class="laydate-day-mark">'+a+"</span>"),n},D.prototype.limit=function(e,t,a,n){var i,l=this,r=l.config,o={},s=r[a>41?"endDate":"dateTime"],y=lay.extend({},s,t||{});return lay.each({now:y,min:r.min,max:r.max},function(e,t){o[e]=l.newDate(lay.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return lay.each(n,function(a,n){e[n]=t[n]}),e}())).getTime()}),i=o.now<o.min||o.now>o.max,e&&e[i?"addClass":"removeClass"](d),i},D.prototype.thisDateTime=function(e){var t=this,a=t.config;return e?t.endDate:a.dateTime},D.prototype.calendar=function(e,t,a){var n,i,r,o=this,s=o.config,t=t?1:0,d=e||o.thisDateTime(t),c=new Date,u=o.lang(),h="date"!==s.type&&"datetime"!==s.type,f=lay(o.table[t]).find("td"),g=lay(o.elemHeader[t][2]).find("span");return d.year<m[0]&&(d.year=m[0],o.hint(u.invalidDate)),d.year>m[1]&&(d.year=m[1],o.hint(u.invalidDate)),o.firstDate||(o.firstDate=lay.extend({},d)),c.setFullYear(d.year,d.month,1),n=c.getDay(),i=l.getEndDate(d.month||12,d.year),r=l.getEndDate(d.month+1,d.year),lay.each(f,function(e,t){var a=[d.year,d.month],l=0;t=lay(t),t.removeAttr("class"),e<n?(l=i-n+e,t.addClass("laydate-day-prev"),a=o.getAsYM(d.year,d.month,"sub")):e>=n&&e<r+n?(l=e-n,l+1===d.date&&t.addClass(y)):(l=e-r-n,t.addClass("laydate-day-next"),a=o.getAsYM(d.year,d.month)),a[1]++,a[2]=l+1,t.attr("lay-ymd",a.join("-")).html(a[2]),o.mark(t,a).limit(t,{year:a[0],month:a[1]-1,date:a[2]},e)}),lay(g[0]).attr("lay-ym",d.year+"-"+(d.month+1)),lay(g[1]).attr("lay-ym",d.year+"-"+(d.month+1)),"cn"===s.lang?(lay(g[0]).attr("lay-type","year").html(d.year+" \u5e74"),lay(g[1]).attr("lay-type","month").html(d.month+1+" \u6708")):(lay(g[0]).attr("lay-type","month").html(u.month[d.month]),lay(g[1]).attr("lay-type","year").html(d.year)),h&&(s.range?e&&(o.listYM=[[s.dateTime.year,s.dateTime.month+1],[o.endDate.year,o.endDate.month+1]],o.list(s.type,0).list(s.type,1),"time"===s.type?o.setBtnStatus("\u65f6\u95f4",lay.extend({},o.systemDate(),o.startTime),lay.extend({},o.systemDate(),o.endTime)):o.setBtnStatus(!0)):(o.listYM=[[d.year,d.month+1]],o.list(s.type,0))),s.range&&"init"===a&&!e&&o.calendar(o.endDate,1),s.range||o.limit(lay(o.footer).find(p),null,0,["hours","minutes","seconds"]),o.setBtnStatus(),o},D.prototype.list=function(e,t){var a=this,n=a.config,i=n.dateTime,l=a.lang(),r=n.range&&"date"!==n.type&&"datetime"!==n.type,o=lay.elem("ul",{"class":u+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[e]}),s=a.elemHeader[t],m=lay(s[2]).find("span"),c=a.elemCont[t||0],h=lay(c).find("."+u)[0],f="cn"===n.lang,T=f?"\u5e74":"",D=a.listYM[t]||{},w=["hours","minutes","seconds"],x=["startTime","endTime"][t];if(D[0]<1&&(D[0]=1),"year"===e){var M,E=M=D[0]-7;E<1&&(E=M=1),lay.each(new Array(15),function(e){var i=lay.elem("li",{"lay-ym":M}),l={year:M};M==D[0]&&lay(i).addClass(y),i.innerHTML=M+T,o.appendChild(i),M<a.firstDate.year?(l.month=n.min.month,l.date=n.min.date):M>=a.firstDate.year&&(l.month=n.max.month,l.date=n.max.date),a.limit(lay(i),l,t),M++}),lay(m[f?0:1]).attr("lay-ym",M-8+"-"+D[1]).html(E+T+" - "+(M-1+T))}else if("month"===e)lay.each(new Array(12),function(e){var i=lay.elem("li",{"lay-ym":e}),r={year:D[0],month:e};e+1==D[1]&&lay(i).addClass(y),i.innerHTML=l.month[e]+(f?"\u6708":""),o.appendChild(i),D[0]<a.firstDate.year?r.date=n.min.date:D[0]>=a.firstDate.year&&(r.date=n.max.date),a.limit(lay(i),r,t)}),lay(m[f?0:1]).attr("lay-ym",D[0]+"-"+D[1]).html(D[0]+T);else if("time"===e){var C=function(){lay(o).find("ol").each(function(e,n){lay(n).find("li").each(function(n,i){a.limit(lay(i),[{hours:n},{hours:a[x].hours,minutes:n},{hours:a[x].hours,minutes:a[x].minutes,seconds:n}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),n.range||a.limit(lay(a.footer).find(p),a[x],0,["hours","minutes","seconds"])};n.range?a[x]||(a[x]="startTime"===x?i:a.endDate):a[x]=i,lay.each([24,60,60],function(e,t){var n=lay.elem("li"),i=["<p>"+l.time[e]+"</p><ol>"];lay.each(new Array(t),function(t){i.push("<li"+(a[x][w[e]]===t?' class="'+y+'"':"")+">"+lay.digit(t,2)+"</li>")}),n.innerHTML=i.join("")+"</ol>",o.appendChild(n)}),C()}if(h&&c.removeChild(h),c.appendChild(o),"year"===e||"month"===e)lay(a.elemMain[t]).addClass("laydate-ym-show"),lay(o).find("li").on("click",function(){var l=0|lay(this).attr("lay-ym");if(!lay(this).hasClass(d)){0===t?(i[e]=l,a.limit(lay(a.footer).find(p),null,0)):a.endDate[e]=l;var s="year"===n.type||"month"===n.type;s?(lay(o).find("."+y).removeClass(y),lay(this).addClass(y),"month"===n.type&&"year"===e&&(a.listYM[t][0]=l,r&&((t?a.endDate:i).year=l),a.list("month",t))):(a.checkDate("limit").calendar(null,t),a.closeList()),a.setBtnStatus(),n.range||("month"===n.type&&"month"===e||"year"===n.type&&"year"===e)&&a.setValue(a.parse()).remove().done(),a.done(null,"change"),lay(a.footer).find("."+v).removeClass(d)}});else{var I=lay.elem("span",{"class":g}),k=function(){lay(o).find("ol").each(function(e){var t=this,n=lay(t).find("li");t.scrollTop=30*(a[x][w[e]]-2),t.scrollTop<=0&&n.each(function(e,a){if(!lay(this).hasClass(d))return t.scrollTop=30*(e-2),!0})})},b=lay(s[2]).find("."+g);k(),I.innerHTML=n.range?[l.startTime,l.endTime][t]:l.timeTips,lay(a.elemMain[t]).addClass("laydate-time-show"),b[0]&&b.remove(),s[2].appendChild(I),lay(o).find("ol").each(function(e){var t=this;lay(t).find("li").on("click",function(){var l=0|this.innerHTML;lay(this).hasClass(d)||(n.range?a[x][w[e]]=l:i[w[e]]=l,lay(t).find("."+y).removeClass(y),lay(this).addClass(y),C(),k(),(a.endDate||"time"===n.type)&&a.done(null,"change"),a.setBtnStatus())})})}return a},D.prototype.listYM=[],D.prototype.closeList=function(){var e=this;e.config;lay.each(e.elemCont,function(t,a){lay(this).find("."+u).remove(),lay(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),lay(e.elem).find("."+g).remove()},D.prototype.setBtnStatus=function(e,t,a){var n,i=this,l=i.config,r=i.lang(),o=lay(i.footer).find(p);l.range&&"time"!==l.type&&(t=t||l.dateTime,a=a||i.endDate,n=i.newDate(t).getTime()>i.newDate(a).getTime(),i.limit(null,t)||i.limit(null,a)?o.addClass(d):o[n?"addClass":"removeClass"](d),e&&n&&i.hint("string"==typeof e?r.timeout.replace(/\u65e5\u671f/g,e):r.timeout))},D.prototype.parse=function(e,t){var a=this,n=a.config,i=t||("end"==e?lay.extend({},a.endDate,a.endTime):n.range?lay.extend({},n.dateTime,a.startTime):n.dateTime),r=l.parse(i,a.format,1);return n.range&&void 0===e?r+" "+a.rangeStr+" "+a.parse("end"):r},D.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},D.prototype.setValue=function(e){var t=this,a=t.config,n=t.bindElem||a.elem[0];return"static"===a.position?t:(e=e||"",t.isInput(n)?lay(n).val(e):t.rangeElem?(t.rangeElem[0].val(e?t.parse("start"):""),t.rangeElem[1].val(e?t.parse("end"):"")):(0===lay(n).find("*").length&&lay(n).html(e),lay(n).attr("lay-date",e)),t)},D.prototype.preview=function(){var e=this,t=e.config;if(t.isPreview){var a=lay(e.elem).find("."+T),n=t.range?e.endDate?e.parse():"":e.parse();a.html(n).css({color:"#5FB878"}),setTimeout(function(){a.css({color:"#666"})},300)}},D.prototype.done=function(e,t){var a=this,n=a.config,i=lay.extend({},lay.extend(n.dateTime,a.startTime)),l=lay.extend({},lay.extend(a.endDate,a.endTime));return lay.each([i,l],function(e,t){"month"in t&&lay.extend(t,{month:t.month+1})}),a.preview(),e=e||[a.parse(),i,l],"function"==typeof n[t||"done"]&&n[t||"done"].apply(n,e),a},D.prototype.choose=function(e,t){var a=this,n=a.config,i=a.thisDateTime(t),l=(lay(a.elem).find("td"),e.attr("lay-ymd").split("-"));l={year:0|l[0],month:(0|l[1])-1,date:0|l[2]},e.hasClass(d)||(lay.extend(i,l),n.range?(lay.each(["startTime","endTime"],function(e,t){a[t]=a[t]||{hours:0,minutes:0,seconds:0}}),a.calendar(null,t).done(null,"change")):"static"===n.position?a.calendar().done().done(null,"change"):"date"===n.type?a.setValue(a.parse()).remove().done():"datetime"===n.type&&a.calendar().done(null,"change"))},D.prototype.tool=function(e,t){var a=this,n=a.config,i=a.lang(),l=n.dateTime,r="static"===n.position,o={datetime:function(){lay(e).hasClass(d)||(a.list("time",0),n.range&&a.list("time",1),lay(e).attr("lay-type","date").html(a.lang().dateTips))},date:function(){a.closeList(),lay(e).attr("lay-type","datetime").html(a.lang().timeTips)},clear:function(){r&&(lay.extend(l,a.firstDate),a.calendar()),n.range&&(delete n.dateTime,delete a.endDate,delete a.startTime,delete a.endTime),a.setValue("").remove(),a.done(["",{},{}])},now:function(){var e=new Date;lay.extend(l,a.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),a.setValue(a.parse()).remove(),r&&a.calendar(),a.done()},confirm:function(){if(n.range){if(lay(e).hasClass(d))return a.hint("time"===n.type?i.timeout.replace(/\u65e5\u671f/g,"\u65f6\u95f4"):i.timeout)}else if(lay(e).hasClass(d))return a.hint(i.invalidDate);a.done(),a.setValue(a.parse()).remove()}};o[t]&&o[t]()},D.prototype.change=function(e){var t=this,a=t.config,n=t.thisDateTime(e),i=a.range&&("year"===a.type||"month"===a.type),l=t.elemCont[e||0],r=t.listYM[e],o=function(o){var s=lay(l).find(".laydate-year-list")[0],y=lay(l).find(".laydate-month-list")[0];return s&&(r[0]=o?r[0]-15:r[0]+15,t.list("year",e)),y&&(o?r[0]--:r[0]++,t.list("month",e)),(s||y)&&(lay.extend(n,{year:r[0]}),i&&(n.year=r[0]),a.range||t.done(null,"change"),a.range||t.limit(lay(t.footer).find(p),{year:r[0]})),t.setBtnStatus(),s||y};return{prevYear:function(){o("sub")||(n.year--,t.checkDate("limit").calendar(null,e),t.done(null,"change"))},prevMonth:function(){var a=t.getAsYM(n.year,n.month,"sub");lay.extend(n,{year:a[0],month:a[1]}),t.checkDate("limit").calendar(null,e),t.done(null,"change")},nextMonth:function(){var a=t.getAsYM(n.year,n.month);lay.extend(n,{year:a[0],month:a[1]}),t.checkDate("limit").calendar(null,e),t.done(null,"change")},nextYear:function(){o()||(n.year++,t.checkDate("limit").calendar(null,e),t.done(null,"change"))}}},D.prototype.changeEvent=function(){var e=this;e.config;lay(e.elem).on("click",function(e){lay.stope(e)}).on("mousedown",function(e){lay.stope(e)}),lay.each(e.elemHeader,function(t,a){lay(a[0]).on("click",function(a){e.change(t).prevYear()}),lay(a[1]).on("click",function(a){e.change(t).prevMonth()}),lay(a[2]).find("span").on("click",function(a){var n=lay(this),i=n.attr("lay-ym"),l=n.attr("lay-type");i&&(i=i.split("-"),e.listYM[t]=[0|i[0],0|i[1]],e.list(l,t),lay(e.footer).find("."+v).addClass(d))}),lay(a[3]).on("click",function(a){e.change(t).nextMonth()}),lay(a[4]).on("click",function(a){e.change(t).nextYear()})}),lay.each(e.table,function(t,a){var n=lay(a).find("td");n.on("click",function(){e.choose(lay(this),t)})}),lay(e.footer).find("span").on("click",function(){var t=lay(this).attr("lay-type");e.tool(this,t)})},D.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())},D.prototype.events=function(){var e=this,t=e.config,a=function(a,n){a.on(t.trigger,function(){n&&(e.bindElem=this),e.render()})};t.elem[0]&&!t.elem[0].eventHandler&&(a(t.elem,"bind"),a(t.eventElem),t.elem[0].eventHandler=!0)},r.that={},r.getThis=function(e){var t=r.that[e];return!t&&a&&layui.hint().error(e?o+" instance with ID '"+e+"' not found":"ID argument required"),t},n.run=function(a){a(t).on("mousedown",function(e){if(l.thisId){var t=r.getThis(l.thisId);if(t){var n=t.config;e.target!==n.elem[0]&&e.target!==n.eventElem[0]&&e.target!==a(n.closeStop)[0]&&t.remove()}}}).on("keydown",function(e){if(l.thisId){var t=r.getThis(l.thisId);t&&13===e.keyCode&&a("#"+t.elemID)[0]&&t.elemID===D.thisElemDate&&(e.preventDefault(),a(t.footer).find(p)[0].click())}}),a(e).on("resize",function(){if(l.thisId){var e=r.getThis(l.thisId);if(e)return!(!e.elem||!a(s)[0])&&void e.position()}})},l.render=function(e){var t=new D(e);return r.call(t)},l.parse=function(e,t,a){return e=e||{},"string"==typeof t&&(t=r.formatArr(t)),t=(t||[]).concat(),lay.each(t,function(n,i){/yyyy|y/.test(i)?t[n]=lay.digit(e.year,i.length):/MM|M/.test(i)?t[n]=lay.digit(e.month+(a||0),i.length):/dd|d/.test(i)?t[n]=lay.digit(e.date,i.length):/HH|H/.test(i)?t[n]=lay.digit(e.hours,i.length):/mm|m/.test(i)?t[n]=lay.digit(e.minutes,i.length):/ss|s/.test(i)&&(t[n]=lay.digit(e.seconds,i.length))}),t.join("")},l.getEndDate=function(e,t){var a=new Date;return a.setFullYear(t||a.getFullYear(),e||a.getMonth()+1,1),new Date(a.getTime()-864e5).getDate()},a?(l.ready(),layui.define("lay",function(e){l.path=layui.cache.dir,n.run(lay),e(o,l)})):"function"==typeof define&&define.amd?define(function(){return n.run(lay),l}):function(){l.ready(),n.run(e.lay),e.laydate=l}()}(window,window.document);!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x<d;x++)if(a=e[x],a||0===a)if("object"===pe.type(a))pe.merge(v,a.nodeType?[a]:a);else if(Ue.test(a)){for(u=u||y.appendChild(t.createElement("div")),l=(We.exec(a)||["",""])[1].toLowerCase(),f=Xe[l]||Xe._default,u.innerHTML=f[1]+pe.htmlPrefilter(a)+f[2],o=f[0];o--;)u=u.lastChild;if(!fe.leadingWhitespace&&$e.test(a)&&v.push(t.createTextNode($e.exec(a)[0])),!fe.tbody)for(a="table"!==l||Ve.test(a)?"<table>"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r<i;r++)pe.event.add(t,n,s[n][r])}a.data&&(a.data=pe.extend({},a.data))}}function k(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!fe.noCloneEvent&&t[pe.expando]){i=pe._data(t);for(r in i.events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(C(t).text=e.text,E(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),fe.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function S(e,t,n,r){t=oe.apply([],t);var i,o,a,s,u,l,c=0,f=e.length,d=f-1,p=t[0],g=pe.isFunction(p);if(g||f>1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c<f;c++)o=l,c!==d&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,pe.map(s,E),c=0;c<a;c++)o=s[c],Ie.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(u,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));l=i=null}return e}function A(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(h(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&g(h(r,"script")),r.parentNode.removeChild(r));return e}function D(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function j(e){var t=re,n=lt[e];return n||(n=D(e,t),"none"!==n&&n||(ut=(ut||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)r=e[a],r.style&&(o[a]=pe._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Re(r)&&(o[a]=pe._data(r,"olddisplay",j(r.nodeName)))):(i=Re(r),(n&&"none"!==n||!i)&&pe._data(r,"olddisplay",i?n:pe.css(r,"display"))));for(a=0;a<s;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function _(e,t,n){var r=bt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function F(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=pe.css(e,n+Oe[o],!0,i)),r?("content"===n&&(a-=pe.css(e,"padding"+Oe[o],!0,i)),"margin"!==n&&(a-=pe.css(e,"border"+Oe[o]+"Width",!0,i))):(a+=pe.css(e,"padding"+Oe[o],!0,i),"padding"!==n&&(a+=pe.css(e,"border"+Oe[o]+"Width",!0,i)));return a}function M(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ht(e),a=fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(i=gt(e,t,o),(i<0||null==i)&&(i=e.style[t]),ft.test(i))return i;r=a&&(fe.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+F(e,t,n||(a?"border":"content"),r,o)+"px"}function O(e,t,n,r,i){return new O.prototype.init(e,t,n,r,i)}function R(){return e.setTimeout(function(){Nt=void 0}),Nt=pe.now()}function P(e,t){var n,r={height:e},i=0;for(t=t?1:0;i<4;i+=2-t)n=Oe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e,t,n){for(var r,i=($.tweeners[t]||[]).concat($.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function W(e,t,n){var r,i,o,a,s,u,l,c,f=this,d={},p=e.style,h=e.nodeType&&Re(e),g=pe._data(e,"fxshow");n.queue||(s=pe._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,f.always(function(){f.always(function(){s.unqueued--,pe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=pe.css(e,"display"),c="none"===l?pe._data(e,"olddisplay")||j(e.nodeName):l,"inline"===c&&"none"===pe.css(e,"float")&&(fe.inlineBlockNeedsLayout&&"inline"!==j(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",fe.shrinkWrapBlocks()||f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],St.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;h=!0}d[r]=g&&g[r]||pe.style(e,r)}else l=void 0;if(pe.isEmptyObject(d))"inline"===("none"===l?j(e.nodeName):l)&&(p.display=l);else{g?"hidden"in g&&(h=g.hidden):g=pe._data(e,"fxshow",{}),o&&(g.hidden=!h),h?pe(e).show():f.done(function(){pe(e).hide()}),f.done(function(){var t;pe._removeData(e,"fxshow");for(t in d)pe.style(e,t,d[t])});for(r in d)a=B(h?g[r]:0,r,f),r in g||(g[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function I(e,t){var n,r,i,o,a;for(n in e)if(r=pe.camelCase(n),i=t[r],o=e[n],pe.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=pe.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function $(e,t,n){var r,i,o=0,a=$.prefilters.length,s=pe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Nt||R(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:Nt||R(),duration:n.duration,tweens:[],createTween:function(t,n){var r=pe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(I(c,l.opts.specialEasing);o<a;o++)if(r=$.prefilters[o].call(l,e,c,l.opts))return pe.isFunction(r.stop)&&(pe._queueHooks(l.elem,l.opts.queue).stop=pe.proxy(r.stop,r)),r;return pe.map(c,B,l),pe.isFunction(l.opts.start)&&l.opts.start.call(e,l),pe.fx.timer(pe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function z(e){return pe.attr(e,"class")||""}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(De)||[];if(pe.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function i(s){var u;return o[s]=!0,pe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Qt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function V(e,t){var n,r,i=pe.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&pe.extend(!0,e,n),e}function Y(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==u[0]&&u.unshift(o),n[o]}function J(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function G(e){return e.style&&e.style.display||pe.css(e,"display")}function K(e){if(!pe.contains(e.ownerDocument||re,e))return!0;for(;e&&1===e.nodeType;){if("none"===G(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function Q(e,t,n,r){var i;if(pe.isArray(t))pe.each(t,function(t,i){n||rn.test(e)?r(e,i):Q(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==pe.type(t))r(e,t);else for(i in t)Q(e+"["+i+"]",t[i],n,r)}function Z(){try{return new e.XMLHttpRequest}catch(t){}}function ee(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function te(e){return pe.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var ne=[],re=e.document,ie=ne.slice,oe=ne.concat,ae=ne.push,se=ne.indexOf,ue={},le=ue.toString,ce=ue.hasOwnProperty,fe={},de="1.12.4",pe=function(e,t){return new pe.fn.init(e,t)},he=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ge=/^-ms-/,me=/-([\da-z])/gi,ye=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:de,constructor:pe,selector:"",length:0,toArray:function(){return ie.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:ie.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:ne.sort,splice:ne.splice},pe.extend=pe.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||pe.isFunction(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],n=i[r],a!==n&&(l&&n&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,o=e&&pe.isArray(e)?e:[]):o=e&&pe.isPlainObject(e)?e:{},a[r]=pe.extend(l,o,n)):void 0!==n&&(a[r]=n));return a},pe.extend({expando:"jQuery"+(de+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;i<r&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(he,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?pe.merge(r,"string"==typeof e?[e]:e):ae.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(se)return se.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;)e[i++]=t[r++];if(n!==n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,r){var i,o,a=0,s=[];if(n(e))for(i=e.length;a<i;a++)o=t(e[a],a,r),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,r),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(i=e[t],t=e,e=i),pe.isFunction(e))return n=ie.call(arguments,2),r=function(){return e.apply(t||this,n.concat(ie.call(arguments)))},r.guid=e.guid=e.guid||pe.guid++,r},now:function(){return+new Date},support:fe}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ne[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ue["[object "+t+"]"]=t.toLowerCase()});var ve=function(e){function t(e,t,n,r){var i,o,a,s,u,l,f,p,h=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&((t?t.ownerDocument||t:B)!==H&&L(t),t=t||H,_)){if(11!==g&&(l=ye.exec(e)))if(i=l[1]){if(9===g){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(h&&(a=h.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(w.qsa&&!X[e+" "]&&(!F||!F.test(e))){if(1!==g)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,"\\$&"):t.setAttribute("id",s=P),f=N(e),o=f.length,u=de.test(s)?"#"+s:"[id='"+s+"']";o--;)f[o]=u+" "+d(f[o]);p=f.join(","),h=ve.test(e)&&c(t.parentNode)||t}if(p)try{return Q.apply(n,h.querySelectorAll(p)),n}catch(m){}finally{s===P&&t.removeAttribute("id")}}}return S(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[P]||(t[P]={}),u=l[t.uniqueID]||(l[t.uniqueID]={}),(s=u[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(u[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function m(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function y(e,t,n,i,o,a){return i&&!i[P]&&(i=y(i)),o&&!o[P]&&(o=y(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],h=a.length,y=r||g(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?y:m(y,d,e,s,u),x=n?o||(r?e:h||i)?[]:a:v;if(n&&n(v,x,s,u),i)for(l=m(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(v[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(v[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?ee(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=T.relative[e[s].type])c=[p(h(c),n)];else{if(n=T.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;r<i&&!T.relative[e[r].type];r++);return y(s>1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&d(e))}c.push(n)}return h(c)}function x(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+P+"'></a><select id='"+P+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],
d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},T.pseudos.nth=T.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[b]=s(b);for(b in{submit:!0,reset:!0})T.pseudos[b]=u(b);return f.prototype=T.filters=T.pseudos,T.setFilters=new f,N=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=T.preFilter;s;){r&&!(i=ue.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=le.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in T.filter)!(i=pe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):z(e,u).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=N(e)),n=t.length;n--;)o=v(t[n]),o[P]?r.push(o):i.push(o);o=X(e,x(i,r)),o.selector=e}return o},S=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,f=!r&&N(e=l.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t<i;t++)if(pe.contains(r[t],this))return!0}));for(t=0;t<i;t++)pe.find(e,r[t],n);return n=this.pushStack(i>1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=we.test(e)||"string"!=typeof e?pe(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)a[u].apply(n[0],n[1])===!1&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function r(t){pe.each(t,function(t,n){pe.isFunction(n)?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==pe.type(n)&&r(n)})}(arguments),n&&!t&&l()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,a,n))>-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i<a;i++)o[i]&&pe.isFunction(o[i].promise)?o[i].promise().progress(l(i,n,t)).done(l(i,r,o)).fail(u.reject):--s;return s||u.resolveWith(r,o),u.promise()}});var je;pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(e===!0?--pe.readyWait:pe.isReady)||(pe.isReady=!0,e!==!0&&--pe.readyWait>0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=pe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=pe._data(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),function(){var e;fe.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,r;return n=re.getElementsByTagName("body")[0],n&&n.style?(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(re.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(r),e):void 0}}();var Fe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Me=new RegExp("^(?:([+-])=|)("+Fe+")([a-z%]*)$","i"),Oe=["Top","Right","Bottom","Left"],Re=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},Pe=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===pe.type(n)){i=!0;for(s in n)Pe(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,pe.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(pe(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},Be=/^(?:checkbox|radio)$/i,We=/<([\w:-]+)/,Ie=/^$|\/(?:java|ecma)script/i,$e=/^\s+/,ze="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var e=re.createElement("div"),t=re.createDocumentFragment(),n=re.createElement("input");e.innerHTML=" <link/><table></table><a href='https://www.layui.com/a'>a</a><input type='checkbox'/>",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav></:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="<textarea>x</textarea>",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:fe.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/<tbody/i;!function(){var t,n,r=re.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(fe[t]=n in e)||(r.setAttribute(n,"t"),fe[t]=r.attributes[n].expando===!1);r=null}();var Ye=/^(?:input|select|textarea)$/i,Je=/^key/,Ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ke=/^(?:focusinfocus|focusoutblur)$/,Qe=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=pe._data(e);if(m){for(n.handler&&(u=n,n=u.handler,i=u.selector),n.guid||(n.guid=pe.guid++),(a=m.events)||(a=m.events={}),(c=m.handle)||(c=m.handle=function(e){return"undefined"==typeof pe||e&&pe.event.triggered===e.type?void 0:pe.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(De)||[""],s=t.length;s--;)o=Qe.exec(t[s])||[],p=g=o[1],h=(o[2]||"").split(".").sort(),p&&(l=pe.event.special[p]||{},p=(i?l.delegateType:l.bindType)||p,l=pe.event.special[p]||{},f=pe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&pe.expr.match.needsContext.test(i),namespace:h.join(".")},u),(d=a[p])||(d=a[p]=[],d.delegateCount=0,l.setup&&l.setup.call(e,r,h,c)!==!1||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),l.add&&(l.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),pe.event.global[p]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=pe.hasData(e)&&pe._data(e);if(m&&(c=m.events)){for(t=(t||"").match(De)||[""],l=t.length;l--;)if(s=Qe.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=pe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)a=d[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,f.remove&&f.remove.call(e,a));u&&!d.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||pe.removeEvent(e,p,m.handle),delete c[p])}else for(p in c)pe.event.remove(e,p+t[l],n,r,!0);pe.isEmptyObject(c)&&(delete m.handle,pe._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,u,l,c,f,d=[r||re],p=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||re,3!==r.nodeType&&8!==r.nodeType&&!Ke.test(p+pe.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n<s;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?pe(i,this).index(u)>-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Ge.test(i)?this.mouseHooks:Je.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||re),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=e.target.ownerDocument||re,i=r.documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=re.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?v:x):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=v,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=v,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=v,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||pe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),fe.submit||(pe.event.special.submit={setup:function(){return!pe.nodeName(this,"form")&&void pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):void 0;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){return!pe.nodeName(this,"form")&&void pe.event.remove(this,"._submit")}}),fe.change||(pe.event.special.change={setup:function(){return Ye.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1):void pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ye.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return pe.event.remove(this,"._change"),!Ye.test(this.nodeName)}}),fe.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=pe._data(r,t);i||r.addEventListener(e,n,!0),pe._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=pe._data(r,t)-1;i?pe._data(r,t,i):(r.removeEventListener(e,n,!0),pe._removeData(r,t))}}}),pe.fn.extend({on:function(e,t,n,r){return w(this,e,t,n,r)},one:function(e,t,n,r){return w(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,pe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=x),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return pe.event.trigger(e,t,n,!0)}});var Ze=/ jQuery\d+="(?:null|\d+)"/g,et=new RegExp("<(?:"+ze+")[\\s/>]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/<script|<style|<link/i,rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(pe.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return S(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(h(this)),n&&n.replaceChild(t,this));
},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,r=0,i=[],o=pe(e),a=o.length-1;r<=a;r++)n=r===a?this:this.clone(!0),pe(o[r])[t](n),ae.apply(i,n.get());return this.pushStack(i)}});var ut,lt={HTML:"block",BODY:"block"},ct=/^margin/,ft=new RegExp("^("+Fe+")(?!px)[a-z%]+$","i"),dt=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},pt=re.documentElement;!function(){function t(){var t,c,f=re.documentElement;f.appendChild(u),l.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=i=s=!1,r=a=!0,e.getComputedStyle&&(c=e.getComputedStyle(l),n="1%"!==(c||{}).top,s="2px"===(c||{}).marginLeft,i="4px"===(c||{width:"4px"}).width,l.style.marginRight="50%",r="4px"===(c||{marginRight:"4px"}).marginRight,t=l.appendChild(re.createElement("div")),t.style.cssText=l.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",l.style.width="1px",a=!parseFloat((e.getComputedStyle(t)||{}).marginRight),l.removeChild(t)),l.style.display="none",o=0===l.getClientRects().length,o&&(l.style.display="",l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",l.childNodes[0].style.borderCollapse="separate",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a<i;a++)o[t[a]]=pe.css(e,t[a],!1,r);return o}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r<i;r++)n=e[r],$.tweeners[n]=$.tweeners[n]||[],$.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?$.prefilters.unshift(e):$.prefilters.push(e)}}),pe.speed=function(e,t,n){var r=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return r.duration=pe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in pe.fx.speeds?pe.fx.speeds[r.duration]:pe.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){pe.isFunction(r.old)&&r.old.call(this),r.queue&&pe.dequeue(this,r.queue)},r},pe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Re).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=pe.isEmptyObject(e),o=pe.speed(t,n,r),a=function(){var t=$(this,pe.extend({},e),o);(i||pe._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=pe.timers,a=pe._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&At.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||pe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=pe.timers,a=r?r.length:0;for(n.finish=!0,pe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(P(t,!0),e,r,i)}}),pe.each({slideDown:P("show"),slideUp:P("hide"),slideToggle:P("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Nt=pe.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Nt=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){kt||(kt=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(kt),kt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e,t=re.createElement("input"),n=re.createElement("div"),r=re.createElement("select"),i=r.appendChild(re.createElement("option"));n=re.createElement("div"),n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='https://www.layui.com/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(n=r[u],(n.selected||u===i)&&(fe.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=pe.makeArray(t),a=i.length;a--;)if(r=i[a],pe.inArray(pe.valHooks.option.get(r),o)>-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("<div>").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){
return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var t=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}(),i=e.LAYUI_GLOBAL||{};return i.layer_dir||t.substring(0,t.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c="creating",u=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function d(t){var n=100,a=document.getElementById(f);return++u>1e4/n?e.console&&console.error(l+".css: Invalid"):void(1989===parseInt(o.getStyle(a,"width"))?(t===c&&a.removeAttribute("lay-status"),a.getAttribute("lay-status")===c?setTimeout(d,n):i()):(a.setAttribute("lay-status",c),setTimeout(function(){d(c)},n)))}()}}},r={v:"3.5.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:260},n))}},s=function(e){var t=this,a=function(){t.creat()};t.index=++r.index,t.config.maxWidth=i(n).width()-30,t.config=i.extend({},t.config,o.config,e),document.body?a():setTimeout(function(){a()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.SHADE="layui-layer-shade",l.MOVE="layui-layer-move",s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'<div class="layui-layer-title" style="'+(f?r.title[1]:"")+'">'+(f?r.title[0]:r.title)+"</div>":"";return r.zIndex=s,t([r.shade?'<div class="'+l.SHADE+'" id="'+l.SHADE+a+'" times="'+a+'" style="'+("z-index:"+(s-1)+"; ")+'"></div>':"",'<div class="'+l[0]+(" layui-layer-"+o.type[r.type])+(0!=r.type&&2!=r.type||r.shade?"":" layui-layer-border")+" "+(r.skin||"")+'" id="'+l[0]+a+'" type="'+o.type[r.type]+'" times="'+a+'" showtime="'+r.time+'" conType="'+(e?"object":"string")+'" style="z-index: '+s+"; width:"+r.area[0]+";height:"+r.area[1]+";position:"+(r.fixed?"fixed;":"absolute;")+'">'+(e&&2!=r.type?"":u)+'<div id="'+(r.id||"")+'" class="layui-layer-content'+(0==r.type&&r.icon!==-1?" layui-layer-padding":"")+(3==r.type?" layui-layer-loading"+r.icon:"")+'">'+(0==r.type&&r.icon!==-1?'<i class="layui-layer-ico layui-layer-ico'+r.icon+'"></i>':"")+(1==r.type&&e?"":r.content||"")+'</div><span class="layui-layer-setwin">'+function(){var e=c?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";return r.closeBtn&&(e+='<a class="layui-layer-ico '+l[7]+" "+l[7]+(r.title?r.closeBtn:4==r.type?"1":"2")+'" href="javascript:;"></a>'),e}()+"</span>"+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t<i;t++)e+='<a class="'+l[6]+t+'">'+r.btn[t]+"</a>";return'<div class="'+l[6]+" layui-layer-btn-"+(r.btnAlign||"")+'">'+e+"</div>"}():"")+(r.resize?'<span class="layui-layer-resize"></span>':"")+"</div>"],u,i('<div class="'+l.MOVE+'" id="'+l.MOVE+'"></div>')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='<iframe scrolling="'+(t.content[1]||"auto")+'" allowtransparency="true" id="'+l[4]+a+'" name="'+l[4]+a+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'+t.content[0]+'"></iframe>';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'<i class="layui-layer-TipsG"></i>',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i("#"+l.MOVE)[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),e.shadeo=i("#"+l.SHADE+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),e.shadeo.css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():function(){e.offset(),parseInt(o.getStyle(document.getElementById(l.MOVE),"z-index"))||function(){e.layero.css("visibility","hidden"),r.ready(function(){e.offset(),e.layero.css("visibility","visible")})}()}(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;a<c.stX&&(a=c.stX),a>f&&(a=f),o<c.stY&&(o=c.stY),o>u&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index,t)}):a.success(n,t.index,t)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&t.shadeo.on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n,t.index);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n,t.index)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n,t.index)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){t=t||{};var a=i("#"+l[0]+e),s=i("#"+l.SHADE+e),f=a.find(l[1]).outerHeight()||0,c=a.attr("minLeft")||181*o.minIndex+"px",u=a.css("position"),d={width:180,height:f,position:"fixed",overflow:"hidden"};o.record(a),o.minLeft[0]&&(c=o.minLeft[0],o.minLeft.shift()),t.minStack&&(d.left=c,d.top=n.height()-f,a.attr("minLeft")||o.minIndex++,a.attr("minLeft",c)),a.attr("position",u),r.style(e,d,!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),s.hide()},r.restore=function(e){var t=i("#"+l[0]+e),n=i("#"+l.SHADE+e),a=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(a[0]),height:parseFloat(a[1]),top:parseFloat(a[2]),left:parseFloat(a[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e),n.show()},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e,t){var n=i("#"+l[0]+e),a=n.attr("type"),s="layer-anim-close";if(n[0]){var f="layui-layer-wrap",c=function(){if(a===o.type[1]&&"object"===n.attr("conType")){n.children(":not(."+l[5]+")").remove();for(var r=n.find("."+f),s=0;s<2;s++)r.unwrap();r.css("display",r.data("display")).removeClass(f)}else{if(a===o.type[2])try{var c=i("#"+l[4]+e)[0];c.contentWindow.document.write(""),c.contentWindow.close(),n.find("."+l[5])[0].removeChild(c)}catch(u){}n[0].innerHTML="",n.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e],"function"==typeof t&&t()};n.data("isOutAnim")&&n.addClass("layer-anim "+s),i("#layui-layer-moves, #"+l.SHADE+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),n.attr("minLeft")&&(o.minIndex--,o.minLeft.push(n.attr("minLeft"))),r.ie&&r.ie<10||!n.data("isOutAnim")?c():setTimeout(function(){c()},200)}},r.closeAll=function(e,t){"function"==typeof e&&(t=e,e=null);var n=i("."+l[0]);i.each(n,function(a){var o=i(this),s=e?o.attr("type")===e:1;s&&r.close(o.attr("times"),a===n.length-1?t:null),s=null}),0===n.length&&"function"==typeof t&&t()};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'<textarea class="layui-layer-input"'+a+"></textarea>":function(){return'<input type="'+(1==e.formType?"password":"text")+'" class="layui-layer-input">'}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a='<span class="'+n+'">'+t[0].title+"</span>";i<e;i++)a+="<span>"+t[i].title+"</span>";return a}(),content:'<ul class="layui-layer-tabmain">'+function(){var e=t.length,i=1,a="";if(e>0)for(a='<li class="layui-layer-tabli '+n+'">'+(t[0].content||"no content")+"</li>";i<e;i++)a+='<li class="layui-layer-tabli">'+(t[i].content||"no content")+"</li>";return a}()+"</ul>",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=!("string"==typeof t.photos||t.photos instanceof i),f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){h();var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0)}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev(!0)}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext(!0)}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),a&&(t.anim=-1),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]<r[1]&&(a[0]=a[0]/r[1],a[1]=a[1]/r[1])}return[a[0]+"px",a[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,anim:5,isOutAnim:!1,skin:"layui-layer-photos"+c("photos"),content:'<div class="layui-layer-phimg"><img src="'+u[d].src+'" alt="'+(u[d].alt||"")+'" layer-pid="'+u[d].pid+'">'+function(){return u.length>1?'<div class="layui-layer-imgsee"><span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span><div class="layui-layer-imgbar" style="display:'+(a?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(u[d].alt||"")+"</a><em>"+s.imgIndex+" / "+u.length+"</em></span></div></div>":""}()+"</div>",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常<br>是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){r.ready(),o.run(e.jQuery)}()}(window);layui.define("jquery",function(e){"use strict";var t=layui.$,i=layui.hint(),n={fixbar:function(e){var i,n,r="layui-fixbar",a="layui-fixbar-top",o=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['<ul class="'+r+'">',e.bar1?'<li class="layui-icon" lay-type="bar1" style="'+e.bgcolor+'">'+c[0]+"</li>":"",e.bar2?'<li class="layui-icon" lay-type="bar2" style="'+e.bgcolor+'">'+c[1]+"</li>":"",'<li class="layui-icon '+a+'" lay-type="top" style="'+e.bgcolor+'">'+c[2]+"</li>","</ul>"].join("")),u=g.find("."+a),s=function(){var t=o.scrollTop();t>=e.showHeight?i||(u.show(),i=1):i&&(u.hide(),i=0)};t("."+r)[0]||("object"==typeof e.css&&g.css(e.css),l.append(g),s(),g.find("li").on("click",function(){var i=t(this),n=i.attr("lay-type");"top"===n&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,n)}),o.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var n=this,r="function"==typeof t,a=new Date(e).getTime(),o=new Date(!t||r?(new Date).getTime():t).getTime(),l=a-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];r&&(i=t);var g=setTimeout(function(){n.countdown(e,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,g),l<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,n=[[],[]],r=(new Date).getTime()-new Date(e).getTime();return r>26784e5?(r=new Date(e),n[0][0]=i.digit(r.getFullYear(),4),n[0][1]=i.digit(r.getMonth()+1),n[0][2]=i.digit(r.getDate()),t||(n[1][0]=i.digit(r.getHours()),n[1][1]=i.digit(r.getMinutes()),n[1][2]=i.digit(r.getSeconds())),n[0].join("-")+" "+n[1].join(":")):r>=864e5?(r/1e3/60/60/24|0)+"\u5929\u524d":r>=36e5?(r/1e3/60/60|0)+"\u5c0f\u65f6\u524d":r>=18e4?(r/1e3/60|0)+"\u5206\u949f\u524d":r<0?"\u672a\u6765":"\u521a\u521a"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var n=e.length;n<t;n++)i+="0";return e<Math.pow(10,t)?i+(0|e):e},toDateString:function(e,t){if(null===e||""===e)return"";var n=this,r=new Date(function(){if(e)return isNaN(e)?e:"string"==typeof e?parseInt(e):e}()||new Date),a=[n.digit(r.getFullYear(),4),n.digit(r.getMonth()+1),n.digit(r.getDate())],o=[n.digit(r.getHours()),n.digit(r.getMinutes()),n.digit(r.getSeconds())];return r.getDate()?(t=t||"yyyy-MM-dd HH:mm:ss",t.replace(/yyyy/g,a[0]).replace(/MM/g,a[1]).replace(/dd/g,a[2]).replace(/HH/g,o[0]).replace(/mm/g,o[1]).replace(/ss/g,o[2])):(i.error('Invalid Msec for "util.toDateString(Msec)"'),"")},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")},unescape:function(e){return String(e||"").replace(/\&/g,"&").replace(/\</g,"<").replace(/\>/g,">").replace(/\'/,"'").replace(/\"/,'"')},toVisibleArea:function(e){if(e=t.extend({margin:160,duration:200,type:"y"},e),e.scrollElem[0]&&e.thisElem[0]){var i=e.scrollElem,n=e.thisElem,r="y"===e.type,a=r?"scrollTop":"scrollLeft",o=r?"top":"left",l=i[a](),c=i[r?"height":"width"](),g=i.offset()[o],u=n.offset()[o]-g,s={};(u>c-e.margin||u<e.margin)&&(s[a]=u-c/2+l,i.animate(s,e.duration))}},event:function(e,i,r){var a=t("body");return r=r||"click",i=n.event[e]=t.extend(!0,n.event[e],i)||{},n.event.UTIL_EVENT_CALLBACK=n.event.UTIL_EVENT_CALLBACK||{},a.off(r,"*["+e+"]",n.event.UTIL_EVENT_CALLBACK[e]),n.event.UTIL_EVENT_CALLBACK[e]=function(){var n=t(this),r=n.attr(e);"function"==typeof i[r]&&i[r].call(this,n)},a.on(r,"*["+e+"]",n.event.UTIL_EVENT_CALLBACK[e]),i}};e("util",n)});layui.define("jquery",function(t){"use strict";var i=layui.$,a=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var a=this;return i.extend(!0,a.config,t),a},s.prototype.on=function(t,i){return layui.onevent.call(this,e,t,i)},s.prototype.tabAdd=function(t,a){var e=".layui-tab-title",l=i(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r="<li"+function(){var t=[];return layui.each(a,function(i,a){/^(title|content)$/.test(i)||t.push("lay-"+i+'="'+a+'"')}),t.length>0&&t.unshift(""),t.join(" ")}()+">"+(a.title||"unnaming")+"</li>";return s[0]?s.before(r):n.append(r),o.append('<div class="layui-tab-item">'+(a.content||"")+"</div>"),b.hideTabMore(!0),b.tabAuto(),this},s.prototype.tabDelete=function(t,a){var e=".layui-tab-title",l=i(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+a+'"]');return b.tabDelete(null,s),this},s.prototype.tabChange=function(t,a){var e=".layui-tab-title",l=i(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+a+'"]');return b.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},m.on("click",t.headerElem,function(a){var e=i(this).index();b.tabClick.call(this,a,e,null,t)})},s.prototype.progress=function(t,a){var e="layui-progress",l=i("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",a).attr("lay-percent",a),s.text(a),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",y="layui-nav-child",d="layui-nav-child-c",f="layui-nav-more",h="layui-icon-down",p="layui-anim layui-anim-upbit",b={tabClick:function(t,a,s,o){o=o||{};var r=s||i(this),a=a||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?i(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),y=r.find("a"),d="javascript:;"!==y.attr("href")&&"_blank"===y.attr("target"),f="string"==typeof r.attr("lay-unselect"),h=c.attr("lay-filter");d||f||(r.addClass(l).siblings().removeClass(l),u.eq(a).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+h+")",{elem:c,index:a})},tabDelete:function(t,a){var n=a||i(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?b.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&b.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){b.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;i(".layui-tab").each(function(){var s=i(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=i('<span class="layui-unselect layui-tab-bar" '+r+"><i "+r+' class="layui-icon"></i></span>');if(n===window&&8!=a.ie&&b.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=i(this);if(!t.find("."+l)[0]){var a=i('<i class="layui-icon layui-icon-close layui-unselect '+l+'"></i>');a.on("click",b.tabDelete),t.append(a)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(i){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"\u6536\u7f29"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var a=i(".layui-tab-title");t!==!0&&"tabmore"===i(t.target).attr("lay-stope")||(a.removeClass("layui-tab-more"),a.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=i(this),a=t.parents(o),n=a.attr("lay-filter"),s=t.parent(),c=t.siblings("."+y),d="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||d||c[0]||(a.find("."+l).removeClass(l),s.addClass(l)),a.hasClass(u)&&(c.removeClass(p),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===a.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=i(this),a=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),a.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){b.tabAuto.call({})},nav:function(){var t=200,e={},s={},v={},m="layui-nav-title",C=function(l,o,r){var c=i(this),h=c.find("."+y);if(o.hasClass(u)){if(!h[0]){var b=c.children("."+m);l.css({top:c.offset().top-o.offset().top,height:(b[0]?b:c).outerHeight(),opacity:1})}}else h.addClass(p),h.hasClass(d)&&h.css({left:-(h.outerWidth()-c.width())/2}),h[0]?l.css({left:l.position().left+l.width()/2,width:0,opacity:0}):l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:h[0]?0:c.width(),opacity:h[0]?0:1})},a.ie&&a.ie<10?0:t),clearTimeout(v[r]),"block"===h.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){h.addClass(n),c.find("."+f).addClass(f+"d")},300)};i(o+l).each(function(a){var l=i(this),o=i('<span class="'+c+'"></span>'),d=l.find("."+r);l.find("."+c)[0]||(l.append(o),(l.hasClass(u)?d.find("dd,>."+m):d).on("mouseenter",function(){C.call(this,o,l,a)}).on("mouseleave",function(){l.hasClass(u)?o.css({height:0,opacity:0}):(clearTimeout(s[a]),s[a]=setTimeout(function(){l.find("."+y).removeClass(n),l.find("."+f).removeClass(f+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[a]),v[a]=setTimeout(function(){l.hasClass(u)||o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),d.find("a").each(function(){var t=i(this),a=(t.parent(),t.siblings("."+y));a[0]&&!t.children("."+f)[0]&&t.append('<i class="layui-icon '+h+" "+f+'"></i>'),t.off("click",b.clickThis).on("click",b.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";i(t+l).each(function(){var t=i(this),a="lay-separator",e=t.attr(a)||"/",l=t.find("a");l.next("span["+a+"]")[0]||(l.each(function(t){t!==l.length-1&&i(this).after("<span "+a+">"+e+"</span>")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";i("."+t+l).each(function(){var a=i(this),e=a.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),a.attr("lay-showPercent")&&setTimeout(function(){e.html('<span class="'+t+'-text">'+l+"</span>")},350)})},collapse:function(){var t="layui-collapse";i("."+t+l).each(function(){var t=i(this).find(".layui-colla-item");t.each(function(){var t=i(this),a=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");a.find(".layui-colla-icon").remove(),a.append('<i class="layui-icon layui-colla-icon">'+(l?"":"")+"</i>"),a.off("click",b.collapse).on("click",b.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,i){i()})},s.prototype.render=s.prototype.init;var v=new s,m=i(document);i(function(){v.render()});var C=".layui-tab-title li";m.on("click",C,b.tabClick),m.on("click",b.hideTabMore),i(window).on("resize",b.tabAuto),t(e,v)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,n=layui.hint(),o=layui.device(),a={config:{},set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,r,e,t)}},l=function(){var e=this;return{upload:function(t){e.upload.call(e,t)},reload:function(t){e.reload.call(e,t)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var i=this;i.config=t.extend({},i.config,a.config,e),i.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var i=this,e=i.config;e.elem=t(e.elem),e.bindAction=t(e.bindAction),i.file(),i.events()},p.prototype.file=function(){var e=this,i=e.config,n=e.elemFile=t(['<input class="'+u+'" type="file" accept="'+i.acceptMime+'" name="'+i.field+'"',i.multiple?" multiple":"",">"].join("")),a=i.elem.next();(a.hasClass(u)||a.hasClass(c))&&a.remove(),o.ie&&o.ie<10&&i.elem.wrap('<div class="layui-upload-wrap"></div>'),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(n),o.ie&&o.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,i=e.config,n=t('<iframe id="'+f+'" class="'+f+'" name="'+f+'" frameborder="0"></iframe>'),o=t(['<form target="'+f+'" class="'+c+'" method="post" key="set-mine" enctype="multipart/form-data" action="'+i.url+'">',"</form>"].join(""));t("#"+f)[0]||t("body").append(n),i.elem.next().hasClass(c)||(e.elemFile.wrap(o),i.elem.next("."+c).append(function(){var e=[];return layui.each(i.data,function(t,i){i="function"==typeof i?i():i,e.push('<input type="hidden" name="'+t+'" value="'+i+'">')}),e.join("")}()))},p.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var t=this;window.FileReader&&layui.each(t.chooseFiles,function(t,i){var n=new FileReader;n.readAsDataURL(i),n.onload=function(){e&&e(t,i,this.result)}})},p.prototype.upload=function(e,i){var n,a=this,l=a.config,r=a.elemFile[0],u=function(){var i=0,n=0,o=e||a.files||a.chooseFiles||r.files,u=function(){l.multiple&&i+n===a.fileLength&&"function"==typeof l.allDone&&l.allDone({total:a.fileLength,successful:i,aborted:n})};layui.each(o,function(e,o){var r=new FormData;r.append(l.field,o),layui.each(l.data,function(e,t){t="function"==typeof t?t():t,r.append(e,t)});var c={url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(t){i++,d(e,t),u()},error:function(){n++,a.msg("\u8bf7\u6c42\u4e0a\u4f20\u63a5\u53e3\u51fa\u73b0\u5f02\u5e38"),m(e),u()}};"function"==typeof l.progress&&(c.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload.addEventListener("progress",function(t){if(t.lengthComputable){var i=Math.floor(t.loaded/t.total*100);l.progress(i,l.item?l.item[0]:l.elem[0],t,e)}}),i}),t.ajax(c)})},c=function(){var e=t("#"+f);a.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var t,i=e.contents().find("body");try{t=i.text()}catch(n){a.msg("\u83b7\u53d6\u4e0a\u4f20\u540e\u7684\u54cd\u5e94\u4fe1\u606f\u51fa\u73b0\u5f02\u5e38"),clearInterval(p.timer),m()}t&&(clearInterval(p.timer),i.html(""),d(0,t))},30)},d=function(e,t){if(a.elemFile.next("."+s).remove(),r.value="","object"!=typeof t)try{t=JSON.parse(t)}catch(i){return t={},a.msg("\u8bf7\u5bf9\u4e0a\u4f20\u63a5\u53e3\u8fd4\u56de\u6709\u6548JSON")}"function"==typeof l.done&&l.done(t,e||0,function(e){a.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){a.upload(e)})},h=l.exts,v=function(){var t=[];return layui.each(e||a.chooseFiles,function(e,i){t.push(i.name)}),t}(),g={preview:function(e){a.preview(e)},upload:function(e,t){var i={};i[e]=t,a.upload(i)},pushFile:function(){return a.files=a.files||{},layui.each(a.chooseFiles,function(e,t){a.files[e]=t}),a.files},resetFile:function(e,t,i){var n=new File([t],i);a.files=a.files||{},a.files[e]=n}},y=function(){if(!(("choose"===i||l.auto)&&(l.choose&&l.choose(g),"choose"===i)||l.before&&l.before(g)===!1))return o.ie?o.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return a.msg("\u9009\u62e9\u7684\u6587\u4ef6\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return a.msg("\u9009\u62e9\u7684\u89c6\u9891\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return a.msg("\u9009\u62e9\u7684\u97f3\u9891\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),r.value="";break;default:if(layui.each(v,function(e,t){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(t))||(n=!0)}),n)return a.msg("\u9009\u62e9\u7684\u56fe\u7247\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),r.value=""}if(a.fileLength=function(){var t=0,i=e||a.files||a.chooseFiles||r.files;return layui.each(i,function(){t++}),t}(),l.number&&a.fileLength>l.number)return a.msg("\u540c\u65f6\u6700\u591a\u53ea\u80fd\u4e0a\u4f20\u7684\u6570\u91cf\u4e3a\uff1a"+l.number);if(l.size>0&&!(o.ie&&o.ie<10)){var F;if(layui.each(a.chooseFiles,function(e,t){if(t.size>1024*l.size){var i=l.size/1024;i=i>=1?i.toFixed(2)+"MB":l.size+"KB",r.value="",F=i}}),F)return a.msg("\u6587\u4ef6\u4e0d\u80fd\u8d85\u8fc7"+F)}y()}},p.prototype.reload=function(e){e=e||{},delete e.elem,delete e.bindAction;var i=this,e=i.config=t.extend({},i.config,a.config,e),n=e.elem.next();n.attr({name:e.name,accept:e.acceptMime,multiple:e.multiple})},p.prototype.events=function(){var e=this,i=e.config,a=function(t){e.chooseFiles={},layui.each(t,function(t,i){var n=(new Date).getTime();e.chooseFiles[n+"-"+t]=i})},l=function(t,n){var o=e.elemFile,a=(i.item?i.item:i.elem,t.length>1?t.length+"\u4e2a\u6587\u4ef6":(t[0]||{}).name||o[0].value.match(/[^\/\\]+\..+/g)||[]||"");o.next().hasClass(s)&&o.next().remove(),e.upload(null,"choose"),e.isFile()||i.choose||o.after('<span class="layui-inline '+s+'">'+a+"</span>")};i.elem.off("upload.start").on("upload.start",function(){var o=t(this),a=o.attr("lay-data");if(a)try{a=new Function("return "+a)(),e.config=t.extend({},i,a)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+a)}e.config.item=o,e.elemFile[0].click()}),o.ie&&o.ie<10||i.elem.off("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/upload.over").on("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/upload.over",function(){var e=t(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=t(this);e.removeAttr("lay-over")}).off("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/upload.drop").on("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/upload.drop",function(n,o){var r=t(this),u=o.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),a(u),i.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var t=this.files||[];a(t),i.auto?e.upload():l(t)}),i.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),i.elem.data("haveEvents")||(e.elemFile.on("change",function(){t(this).trigger("upload.change")}),i.elem.on("click",function(){e.isFile()||t(this).trigger("upload.start")}),i.drag&&i.elem.on("dragover",function(e){e.preventDefault(),t(this).trigger("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/upload.over")}).on("dragleave",function(e){t(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),t(this).trigger("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/upload.drop",e)}),i.bindAction.on("click",function(){t(this).trigger("upload.action")}),i.elem.data("haveEvents",!0))},a.render=function(e){var t=new p(e);return l.call(t)},e(r,a)});layui.define(["jquery","laytpl","lay"],function(e){"use strict";var i=layui.$,n=layui.laytpl,t=layui.hint(),a=layui.device(),l=a.mobile?"click":"mousedown",r="dropdown",o="layui_"+r+"_index",u={config:{},index:layui[r]?layui[r].index+1e4:0,set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,r,e,i)}},d=function(){var e=this,i=e.config,n=i.id;return d.that[n]=e,{config:i,reload:function(i){e.reload.call(e,i)}}},s="layui-dropdown",m="layui-menu-item-up",c="layui-menu-item-down",p="layui-menu-body-title",y="layui-menu-item-group",f="layui-menu-item-parent",v="layui-menu-item-divider",g="layui-menu-item-checked",h="layui-menu-item-checked2",w="layui-menu-body-panel",C="layui-menu-body-panel-left",V="."+y+">."+p,k=function(e){var n=this;n.index=++u.index,n.config=i.extend({},n.config,u.config,e),n.init()};k.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:300},k.prototype.reload=function(e){var n=this;n.config=i.extend({},n.config,e),n.init(!0)},k.prototype.init=function(e){var n=this,t=n.config,a=t.elem=i(t.elem);if(a.length>1)return layui.each(a,function(){u.render(i.extend({},t,{elem:this}))}),n;if(!e&&a[0]&&a.data(o)){var l=d.getThis(a.data(o));if(!l)return;return l.reload(t)}t.id="id"in t?t.id:n.index,t.show&&n.render(e),n.events()},k.prototype.render=function(e){var t=this,a=t.config,r=i("body"),s=function(){var e=i('<ul class="layui-menu layui-dropdown-menu"></ul>');return a.data.length>0?m(e,a.data):e.html('<li class="layui-menu-item-none">no menu</li>'),e},m=function(e,t){return layui.each(t,function(t,l){var r=l.child&&l.child.length>0,o="isSpreadItem"in l?l.isSpreadItem:a.isSpreadItem,u=l.templet?n(l.templet).render(l):a.templet?n(a.templet).render(l):l.title,d=function(){return r&&(l.type=l.type||"parent"),l.type?{group:"group",parent:"parent","-":"-"}[l.type]||"parent":""}();if("-"===d||l.title||l.id||r){var s=i(["<li"+function(){var e={group:"layui-menu-item-group"+(a.isAllowSpread?o?" layui-menu-item-down":" layui-menu-item-up":""),parent:f,"-":"layui-menu-item-divider"};return r||d?' class="'+e[d]+'"':""}()+">",function(){var e="href"in l?'<a href="'+l.href+'" target="'+(l.target||"_self")+'">'+u+"</a>":u;return r?'<div class="'+p+'">'+e+function(){return"parent"===d?'<i class="layui-icon layui-icon-right"></i>':"group"===d&&a.isAllowSpread?'<i class="layui-icon layui-icon-'+(o?"up":"down")+'"></i>':""}()+"</div>":'<div class="'+p+'">'+e+"</div>"}(),"</li>"].join(""));if(s.data("item",l),r){var c=i('<div class="layui-panel layui-menu-body-panel"></div>'),y=i("<ul></ul>");"parent"===d?(c.append(m(y,l.child)),s.append(c)):s.append(m(y,l.child))}e.append(s)}}),e},c=['<div class="layui-dropdown layui-border-box layui-panel layui-anim layui-anim-downbit">',"</div>"].join("");("contextmenu"===a.trigger||lay.isTopElem(a.elem[0]))&&(e=!0),!e&&a.elem.data(o+"_opened")||(t.elemView=i(c),t.elemView.append(a.content||s()),a.className&&t.elemView.addClass(a.className),a.style&&t.elemView.attr("style",a.style),u.thisId=a.id,t.remove(),r.append(t.elemView),a.elem.data(o+"_opened",!0),t.position(),d.prevElem=t.elemView,d.prevElem.data("prevElem",a.elem),t.elemView.find(".layui-menu").on(l,function(e){layui.stope(e)}),t.elemView.find(".layui-menu li").on("click",function(e){var n=i(this),l=n.data("item")||{},r=l.child&&l.child.length>0;r||"-"===l.type||(t.remove(),"function"==typeof a.click&&a.click(l,n))}),t.elemView.find(V).on("click",function(e){var n=i(this),t=n.parent(),l=t.data("item")||{};"group"===l.type&&a.isAllowSpread&&d.spread(t)}),"mouseenter"===a.trigger&&t.elemView.on("mouseenter",function(){clearTimeout(d.timer)}).on("mouseleave",function(){t.delayRemove()}))},k.prototype.position=function(e){var i=this,n=i.config;lay.position(n.elem[0],i.elemView[0],{position:n.position,e:i.e,clickType:"contextmenu"===n.trigger?"right":null,align:n.align||null})},k.prototype.remove=function(){var e=this,i=(e.config,d.prevElem);i&&(i.data("prevElem")&&i.data("prevElem").data(o+"_opened",!1),i.remove())},k.prototype.delayRemove=function(){var e=this,i=e.config;clearTimeout(d.timer),d.timer=setTimeout(function(){e.remove()},i.delay)},k.prototype.events=function(){var e=this,i=e.config;"hover"===i.trigger&&(i.trigger="mouseenter"),e.prevElem&&e.prevElem.off(i.trigger,e.prevElemCallback),e.prevElem=i.elem,e.prevElemCallback=function(n){clearTimeout(d.timer),e.e=n,e.render(),n.preventDefault(),"function"==typeof i.ready&&i.ready(e.elemView,i.elem,e.e.target)},i.elem.on(i.trigger,e.prevElemCallback),"mouseenter"===i.trigger&&i.elem.on("mouseleave",function(){e.delayRemove()})},d.that={},d.getThis=function(e){var i=d.that[e];return i||t.error(e?r+" instance with ID '"+e+"' not found":"ID argument required"),i},d.spread=function(e){var i=e.children("."+p).find(".layui-icon");e.hasClass(m)?(e.removeClass(m).addClass(c),i.removeClass("layui-icon-down").addClass("layui-icon-up")):(e.removeClass(c).addClass(m),i.removeClass("layui-icon-up").addClass("layui-icon-down"))},!function(){var e=i(window),n=i(document);e.on("resize",function(){if(u.thisId){var e=d.getThis(u.thisId);if(e){if(!e.elemView[0]||!i("."+s)[0])return!1;var n=e.config;"contextmenu"===n.trigger?e.remove():e.position()}}}),n.on(l,function(e){if(u.thisId){var i=d.getThis(u.thisId);if(i){var n=i.config;!lay.isTopElem(n.elem[0])&&"contextmenu"!==n.trigger&&(e.target===n.elem[0]||n.elem.find(e.target)[0]||e.target===i.elemView[0]||i.elemView&&i.elemView.find(e.target)[0])||i.remove()}}});var t=".layui-menu:not(.layui-dropdown-menu) li";n.on("click",t,function(e){var n=i(this),t=n.parents(".layui-menu").eq(0),a=n.hasClass(y)||n.hasClass(f),l=t.attr("lay-filter")||t.attr("id"),o=lay.options(this);n.hasClass(v)||a||(t.find("."+g).removeClass(g),t.find("."+h).removeClass(h),n.addClass(g),n.parents("."+f).addClass(h),layui.event.call(this,r,"click("+l+")",o))}),n.on("click",t+V,function(e){var n=i(this),t=n.parents("."+y+":eq(0)"),a=lay.options(t[0]);"isAllowSpread"in a&&!a.isAllowSpread||d.spread(t)});var a=".layui-menu ."+f;n.on("mouseenter",a,function(n){var t=i(this),a=t.find("."+w);if(a[0]){var l=a[0].getBoundingClientRect();l.right>e.width()&&(a.addClass(C),l=a[0].getBoundingClientRect(),l.left<0&&a.removeClass(C)),l.bottom>e.height()&&a.eq(0).css("margin-top",-(l.bottom-e.height()))}}).on("mouseleave",a,function(e){var n=i(this),t=n.children("."+w);t.removeClass(C),t.css("margin-top",0)})}(),u.reload=function(e,i){var n=d.getThis(e);return n?(n.reload(i),d.call(n)):this},u.render=function(e){var i=new k(e);return d.call(i)},e(r,u)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(t,a){return i.value=t,e.slide("set",t,a||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",p="layui-slider-input-btn",m="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.max<t.min&&(t.max=t.min+t.step),t.range){t.value="object"==typeof t.value?t.value:[t.min,t.value];var a=Math.min(t.value[0],t.value[1]),n=Math.max(t.value[0],t.value[1]);t.value[0]=a>t.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),p=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.value<t.min&&(t.value=t.min),t.value>t.max&&(t.value=t.max);var p=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var m=t.disabled?"#c2c2c2":t.theme,f='<div class="layui-slider '+("vertical"===t.type?"layui-slider-vertical":"")+'">'+(t.tips?'<div class="layui-slider-tips"></div>':"")+'<div class="layui-slider-bar" style="background:'+m+"; "+("vertical"===t.type?"height":"width")+":"+p+";"+("vertical"===t.type?"bottom":"left")+":"+(r||0)+';"></div><div class="layui-slider-wrap" style="'+("vertical"===t.type?"bottom":"left")+":"+(r||p)+';"><div class="layui-slider-wrap-btn" style="border: 2px solid '+m+';"></div></div>'+(t.range?'<div class="layui-slider-wrap" style="'+("vertical"===t.type?"bottom":"left")+":"+v+';"><div class="layui-slider-wrap-btn" style="border: 2px solid '+m+';"></div></div>':"")+"</div>",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x<g+1;x++){var T=100*x/g;T<100&&(b+='<div class="layui-slider-step" style="'+("vertical"===t.type?"bottom":"left")+":"+T+'%"></div>')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('<div class="layui-slider-input layui-input"><div class="layui-slider-input-txt"><input type="text" class="layui-input"></div><div class="layui-slider-input-btn"><i class="layui-icon layui-icon-up"></i><i class="layui-icon layui-icon-down"></i></div></div>');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),s.find("."+d).html(l.setTips?l.setTips(u):u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['<div class="layui-auxiliar-moving" id="LAY-slider-moving"></div'].join("")),M=function(e,t){var a=function(){t&&t(),w.remove()};i("#LAY-slider-moving")[0]||i("body").append(w),w.on("mousemove",e),w.on("mouseup",a).on("mouseleave",a)};if("set"===e)return x(t,a);s.find("."+u).each(function(e){var t=i(this);t.on("mousedown",function(i){i=i||window.event;var a=t.parent()[0].offsetLeft,n=i.clientX;"vertical"===l.type&&(a=f()-t.parent()[0].offsetTop-h.height(),n=i.clientY);var r=function(i){i=i||window.event;var r=a+("vertical"===l.type?n-i.clientY:i.clientX-n);r<0&&(r=0),r>f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(m),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(m),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.children("."+p).children("i").each(function(e){i(this).on("click",function(){g=y.children("."+c).children("input").val(),g=1==e?g-l.step<l.min?l.min:Number(g)-l.step:Number(g)+l.step>l.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=e<l.min?l.min:e,e=e>l.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)});layui.define(["jquery","lay"],function(e){"use strict";var i=layui.jquery,r=layui.lay,o=layui.device(),n=o.mobile?"click":"mousedown",l={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var r=this;return r.config=i.extend({},r.config,e),r},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},t=function(){var e=this,i=e.config;return{config:i}},c="colorpicker",a="layui-show",s="layui-colorpicker",f=".layui-colorpicker-main",d="layui-icon-down",u="layui-icon-close",p="layui-colorpicker-trigger-span",g="layui-colorpicker-trigger-i",v="layui-colorpicker-side",h="layui-colorpicker-side-slider",b="layui-colorpicker-basis",k="layui-colorpicker-alpha-bgcolor",y="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",x="layui-colorpicker-main-input",P=function(e){var i={h:0,s:0,b:0},r=Math.min(e.r,e.g,e.b),o=Math.max(e.r,e.g,e.b),n=o-r;return i.b=o,i.s=0!=o?255*n/o:0,0!=i.s?e.r==o?i.h=(e.g-e.b)/n:e.g==o?i.h=2+(e.b-e.r)/n:i.h=4+(e.r-e.g)/n:i.h=-1,o==r&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},C=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var r={r:e>>16,g:(65280&e)>>8,b:255&e};return P(r)},B=function(e){var i={},r=e.h,o=255*e.s/100,n=255*e.b/100;if(0==o)i.r=i.g=i.b=n;else{var l=n,t=(255-o)*n/255,c=(l-t)*(r%60)/60;360==r&&(r=0),r<60?(i.r=l,i.b=t,i.g=t+c):r<120?(i.g=l,i.b=t,i.r=l-c):r<180?(i.g=l,i.r=t,i.b=t+c):r<240?(i.b=l,i.r=t,i.g=l-c):r<300?(i.b=l,i.g=t,i.r=t+c):r<360?(i.r=l,i.g=t,i.b=l-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},w=function(e){var r=B(e),o=[r.r.toString(16),r.g.toString(16),r.b.toString(16)];return i.each(o,function(e,i){1==i.length&&(o[e]="0"+i)}),o.join("")},D=function(e){var i=/[0-9]{1,3}/g,r=e.match(i)||[];return{r:r[0],g:r[1],b:r[2]}},j=i(window),E=i(document),F=function(e){var r=this;r.index=++l.index,r.config=i.extend({},r.config,l.config,e),r.render()};F.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},F.prototype.render=function(){var e=this,r=e.config,o=i(['<div class="layui-unselect layui-colorpicker">',"<span "+("rgb"==r.format&&r.alpha?'class="layui-colorpicker-trigger-bgcolor"':"")+">",'<span class="layui-colorpicker-trigger-span" ','lay-type="'+("rgb"==r.format?r.alpha?"rgba":"torgb":"")+'" ','style="'+function(){var e="";return r.color?(e=r.color,(r.color.match(/[0-9]{1,3}/g)||[]).length>3&&(r.alpha&&"rgb"==r.format||(e="#"+w(P(D(r.color))))),"background: "+e):e}()+'">','<i class="layui-icon layui-colorpicker-trigger-i '+(r.color?d:u)+'"></i>',"</span>","</span>","</div>"].join("")),n=i(r.elem);r.size&&o.addClass("layui-colorpicker-"+r.size),n.addClass("layui-inline").html(e.elemColorBox=o),e.color=e.elemColorBox.find("."+p)[0].style.background,e.events()},F.prototype.renderPicker=function(){var e=this,r=e.config,o=e.elemColorBox[0],n=e.elemPicker=i(['<div id="layui-colorpicker'+e.index+'" data-index="'+e.index+'" class="layui-anim layui-anim-downbit layui-colorpicker-main">','<div class="layui-colorpicker-main-wrapper">','<div class="layui-colorpicker-basis">','<div class="layui-colorpicker-basis-white"></div>','<div class="layui-colorpicker-basis-black"></div>','<div class="layui-colorpicker-basis-cursor"></div>',"</div>",'<div class="layui-colorpicker-side">','<div class="layui-colorpicker-side-slider"></div>',"</div>","</div>",'<div class="layui-colorpicker-main-alpha '+(r.alpha?a:"")+'">','<div class="layui-colorpicker-alpha-bgcolor">','<div class="layui-colorpicker-alpha-slider"></div>',"</div>","</div>",function(){if(r.predefine){var e=['<div class="layui-colorpicker-main-pre">'];return layui.each(r.colors,function(i,r){e.push(['<div class="layui-colorpicker-pre'+((r.match(/[0-9]{1,3}/g)||[]).length>3?" layui-colorpicker-pre-isalpha":"")+'">','<div style="background:'+r+'"></div>',"</div>"].join(""))}),e.push("</div>"),e.join("")}return""}(),'<div class="layui-colorpicker-main-input">','<div class="layui-inline">','<input type="text" class="layui-input">',"</div>",'<div class="layui-btn-container">','<button class="layui-btn layui-btn-primary layui-btn-sm" colorpicker-events="clear">\u6e05\u7a7a</button>','<button class="layui-btn layui-btn-sm" colorpicker-events="confirm">\u786e\u5b9a</button>',"</div","</div>","</div>"].join(""));e.elemColorBox.find("."+p)[0];i(f)[0]&&i(f).data("index")==e.index?e.removePicker(F.thisElemInd):(e.removePicker(F.thisElemInd),i("body").append(n)),F.thisElemInd=e.index,F.thisColor=o.style.background,e.position(),e.pickerEvents()},F.prototype.removePicker=function(e){var r=this;r.config;return i("#layui-colorpicker"+(e||r.index)).remove(),r},F.prototype.position=function(){var e=this,i=e.config;return r.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:i.position,align:"center"}),e},F.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+p)),r=e.elemPicker.find("."+x),o=i[0],n=o.style.backgroundColor;if(n){var l=P(D(n)),t=i.attr("lay-type");if(e.select(l.h,l.s,l.b),"torgb"===t&&r.find("input").val(n),"rgba"===t){var c=D(n);if(3==(n.match(/[0-9]{1,3}/g)||[]).length)r.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+y).css("left",280);else{r.find("input").val(n);var a=280*n.slice(n.lastIndexOf(",")+1,n.length-1);e.elemPicker.find("."+y).css("left",a)}e.elemPicker.find("."+k)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),r.find("input").val(""),e.elemPicker.find("."+k)[0].style.background="",e.elemPicker.find("."+y).css("left",280)},F.prototype.side=function(){var e=this,r=e.config,o=e.elemColorBox.find("."+p),n=o.attr("lay-type"),l=e.elemPicker.find("."+v),t=e.elemPicker.find("."+h),c=e.elemPicker.find("."+b),a=e.elemPicker.find("."+m),s=e.elemPicker.find("."+k),f=e.elemPicker.find("."+y),C=t[0].offsetTop/180*360,w=100-(a[0].offsetTop+3)/180*100,E=(a[0].offsetLeft+3)/260*100,F=Math.round(f[0].offsetLeft/280*100)/100,H=e.elemColorBox.find("."+g),M=e.elemPicker.find(".layui-colorpicker-pre").children("div"),Y=function(i,l,t,c){e.select(i,l,t);var a=B({h:i,s:l,b:t});if(H.addClass(d).removeClass(u),o[0].style.background="rgb("+a.r+", "+a.g+", "+a.b+")","torgb"===n&&e.elemPicker.find("."+x).find("input").val("rgb("+a.r+", "+a.g+", "+a.b+")"),"rgba"===n){var p=0;p=280*c,f.css("left",p),e.elemPicker.find("."+x).find("input").val("rgba("+a.r+", "+a.g+", "+a.b+", "+c+")"),o[0].style.background="rgba("+a.r+", "+a.g+", "+a.b+", "+c+")",s[0].style.background="linear-gradient(to right, rgba("+a.r+", "+a.g+", "+a.b+", 0), rgb("+a.r+", "+a.g+", "+a.b+"))"}r.change&&r.change(e.elemPicker.find("."+x).find("input").val())},I=i(['<div class="layui-auxiliar-moving" id="LAY-colorpicker-moving"></div>'].join("")),L=function(e){i("#LAY-colorpicker-moving")[0]||i("body").append(I),I.on("mousemove",e),I.on("mouseup",function(){I.remove()}).on("mouseleave",function(){I.remove()})};t.on("mousedown",function(e){var i=this.offsetTop,r=e.clientY,o=function(e){var o=i+(e.clientY-r),n=l[0].offsetHeight;o<0&&(o=0),o>n&&(o=n);var t=o/180*360;C=t,Y(t,E,w,F),e.preventDefault()};L(o),e.preventDefault()}),l.on("click",function(e){var r=e.clientY-i(this).offset().top;r<0&&(r=0),r>this.offsetHeight&&(r=this.offsetHeight);var o=r/180*360;C=o,Y(o,E,w,F),e.preventDefault()}),a.on("mousedown",function(e){var i=this.offsetTop,r=this.offsetLeft,o=e.clientY,n=e.clientX,l=function(e){var l=i+(e.clientY-o),t=r+(e.clientX-n),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;l<-3&&(l=-3),l>a&&(l=a),t<-3&&(t=-3),t>s&&(t=s);var f=(t+3)/260*100,d=100-(l+3)/180*100;w=d,E=f,Y(C,f,d,F),e.preventDefault()};layui.stope(e),L(l),e.preventDefault()}),c.on("mousedown",function(e){var r=e.clientY-i(this).offset().top-3+j.scrollTop(),o=e.clientX-i(this).offset().left-3+j.scrollLeft();r<-3&&(r=-3),r>this.offsetHeight-3&&(r=this.offsetHeight-3),o<-3&&(o=-3),o>this.offsetWidth-3&&(o=this.offsetWidth-3);var n=(o+3)/260*100,l=100-(r+3)/180*100;w=l,E=n,Y(C,n,l,F),layui.stope(e),e.preventDefault(),a.trigger(e,"mousedown")}),f.on("mousedown",function(e){var i=this.offsetLeft,r=e.clientX,o=function(e){var o=i+(e.clientX-r),n=s[0].offsetWidth;o<0&&(o=0),o>n&&(o=n);var l=Math.round(o/280*100)/100;F=l,Y(C,E,w,l),e.preventDefault()};L(o),e.preventDefault()}),s.on("click",function(e){var r=e.clientX-i(this).offset().left;r<0&&(r=0),r>this.offsetWidth&&(r=this.offsetWidth);var o=Math.round(r/280*100)/100;F=o,Y(C,E,w,o),e.preventDefault()}),M.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,r=this.style.backgroundColor,o=P(D(r)),n=r.slice(r.lastIndexOf(",")+1,r.length-1);C=o.h,E=o.s,w=o.b,3==(r.match(/[0-9]{1,3}/g)||[]).length&&(n=1),F=n,e=280*n,Y(o.h,o.s,o.b,n)})})},F.prototype.select=function(e,i,r,o){var n=this,l=(n.config,w({h:e,s:100,b:100})),t=w({h:e,s:i,b:r}),c=e/360*180,a=180-r/100*180-3,s=i/100*260-3;n.elemPicker.find("."+h).css("top",c),n.elemPicker.find("."+b)[0].style.background="#"+l,n.elemPicker.find("."+m).css({top:a,left:s}),"change"!==o&&n.elemPicker.find("."+x).find("input").val("#"+t)},F.prototype.pickerEvents=function(){var e=this,r=e.config,o=e.elemColorBox.find("."+p),n=e.elemPicker.find("."+x+" input"),l={clear:function(i){o[0].style.background="",e.elemColorBox.find("."+g).removeClass(d).addClass(u),e.color="",r.done&&r.done(""),e.removePicker()},confirm:function(i,l){var t=n.val(),c=t,a={};if(t.indexOf(",")>-1){if(a=P(D(t)),e.select(a.h,a.s,a.b),o[0].style.background=c="#"+w(a),(t.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===o.attr("lay-type")){var s=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+y).css("left",s),o[0].style.background=t,c=t}}else a=C(t),o[0].style.background=c="#"+w(a),e.elemColorBox.find("."+g).removeClass(u).addClass(d);return"change"===l?(e.select(a.h,a.s,a.b,l),void(r.change&&r.change(c))):(e.color=t,r.done&&r.done(t),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),r=e.attr("colorpicker-events");l[r]&&l[r].call(this,e)}),n.on("keyup",function(e){var r=i(this);l.confirm.call(this,r,13===e.keyCode?null:"change")})},F.prototype.events=function(){var e=this,r=e.config,o=e.elemColorBox.find("."+p);e.elemColorBox.on("click",function(){e.renderPicker(),i(f)[0]&&(e.val(),e.side())}),r.elem[0]&&!e.elemColorBox[0].eventHandler&&(E.on(n,function(r){if(!i(r.target).hasClass(s)&&!i(r.target).parents("."+s)[0]&&!i(r.target).hasClass(f.replace(/\./g,""))&&!i(r.target).parents(f)[0]&&e.elemPicker){if(e.color){var n=P(D(e.color));e.select(n.h,n.s,n.b)}else e.elemColorBox.find("."+g).removeClass(d).addClass(u);o[0].style.background=e.color||"",e.removePicker()}}),j.on("resize",function(){return!(!e.elemPicker||!i(f)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},l.render=function(e){var i=new F(e);return t.call(i)},e(c,l)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",o="layui-this",s="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"\u5fc5\u586b\u9879\u4e0d\u80fd\u4e3a\u7a7a"],phone:[/^1\d{10}$/,"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"],url:[/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/,"\u94fe\u63a5\u683c\u5f0f\u4e0d\u6b63\u786e"],number:function(e){if(!e||isNaN(e))return"\u53ea\u80fd\u586b\u5199\u6570\u5b57"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"\u65e5\u671f\u683c\u5f0f\u4e0d\u6b63\u786e"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u8eab\u4efd\u8bc1\u53f7"]},autocomplete:null}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=this,n=t(r+'[lay-filter="'+e+'"]');return n.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value==t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e),a.getValue(e)},u.prototype.getValue=function(e,i){i=i||t(r+'[lay-filter="'+e+'"]').eq(0);var a={},n={},l=i.find("input,select,textarea");return layui.each(l,function(e,i){var l;t(this);if(i.name=(i.name||"").replace(/^\s*|\s*&/,""),i.name){if(/^.*\[\]$/.test(i.name)){var r=i.name.match(/^(.*)\[\]$/g)[0];a[r]=0|a[r],l=i.name.replace(/^(.*)\[\]$/,"$1["+a[r]++ +"]")}/^checkbox|radio$/.test(i.type)&&!i.checked||(n[l||i.name]=i.value)}}),n},u.prototype.render=function(e,i){var n=this,u=n.config,d=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),f={input:function(){var e=d.find("input,textarea");u.autocomplete&&e.attr("autocomplete",u.autocomplete)},select:function(){var e,i="\u8bf7\u9009\u62e9",a="layui-form-select",n="layui-select-title",r="layui-select-none",u="",f=d.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&u&&e.val(u)),e=null},y=function(i,d,f){var y,p=t(this),m=i.find("."+n),g=m.find("input"),k=i.find("dl"),x=k.children("dd"),b=this.selectedIndex;if(!d){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=k.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),x.removeClass(s),y=null,x.eq(b).addClass(o).siblings().removeClass(o),e+t>h.height()&&e>=t&&i.addClass(a+"up"),T()},w=function(e){i.removeClass(a+"ed "+a+"up"),g.blur(),y=null,e||$(g.val(),function(e){var i=p[0].selectedIndex;e&&(u=t(p[0].options[i]).html(),0===i&&u===g.attr("placeholder")&&(u=""),g.val(u||""))})},T=function(){var e=k.children("dd."+o);if(e[0]){var t=e.position().top,i=k.height(),a=e.height();t>i&&k.scrollTop(t+k.scrollTop()-i+a-5),t<0&&k.scrollTop(t+k.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),k.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){g.focus()}),g.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=k.children("dd."+o);if(k.children("dd."+s)[0]&&"next"===t){var i=k.children("dd:not(."+s+",."+c+")"),n=i.eq(0).index();if(n>=0&&n<e.index()&&!i.hasClass(o))return i.eq(0).prev()[0]?i.eq(0).prev():k.children(":last")}return a&&a[0]?a:y&&y[0]?y:e}();return l=r[t](),n=r[t]("dd:not(."+s+")"),l[0]?(y=r[t](),n[0]&&!n.hasClass(c)||!y[0]?(n.addClass(o).siblings().removeClass(o),void T()):i(t,y)):y=null};38===t&&i("prev"),40===t&&i("next"),13===t&&(e.preventDefault(),k.children("dd."+o).trigger("click"))});var $=function(e,i,a){var n=0;layui.each(x,function(){var i=t(this),l=i.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&i[r?"addClass":"removeClass"](s)});var l=n===x.length;return i(l),l},q=function(e){var t=this.value,i=e.keyCode;return 9!==i&&13!==i&&37!==i&&38!==i&&39!==i&&40!==i&&($(t,function(e){e?k.find("."+r)[0]||k.append('<p class="'+r+'">\u65e0\u5339\u914d\u9879</p>'):k.find("."+r).remove()},"keyup"),""===t&&k.find("."+r).remove(),void T())};f&&g.on("keyup",q).on("blur",function(i){var a=p[0].selectedIndex;e=g,u=t(p[0].options[a]).html(),0===a&&u===g.attr("placeholder")&&(u=""),setTimeout(function(){$(g.val(),function(e){u||g.val("")},"blur")},200)}),x.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?g.val(""):(g.val(e.text()),e.addClass(o)),e.siblings().removeClass(o),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),s=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['<div class="'+(h?"":"layui-unselect ")+a,(u?" layui-select-disabled":"")+'">','<div class="'+n+'">','<input type="text" placeholder="'+t.trim(p)+'" '+('value="'+t.trim(d?f.html():"")+'"')+(!u&&h?"":" readonly")+' class="layui-input'+(h?"":" layui-unselect")+(u?" "+c:"")+'">','<i class="layui-edge"></i></div>','<dl class="layui-anim layui-anim-upbit'+(r.find("optgroup")[0]?" layui-select-group":"")+'">',function(e){var a=[];return layui.each(e,function(e,n){0!==e||n.value?"optgroup"===n.tagName.toLowerCase()?a.push("<dt>"+n.label+"</dt>"):a.push('<dd lay-value="'+n.value+'" class="'+(d===n.value?o:"")+(n.disabled?" "+c:"")+'">'+t.trim(n.innerHTML)+"</dd>"):a.push('<dd lay-value="" class="layui-select-tips">'+t.trim(n.innerHTML||i)+"</dd>")}),0===a.length&&a.push('<dd lay-value="" class="'+c+'">\u6ca1\u6709\u9009\u9879</dd>'),a.join("")}(r.find("*"))+"</dl>","</div>"].join(""));s[0]&&s.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=d.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),o=(l.attr("lay-text")||"").split("|"),s=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['<div class="layui-unselect '+u[0],n.checked?" "+u[1]:"",s?" layui-checkbox-disabled "+c:"",'"',r?' lay-skin="'+r+'"':"",">",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?"<span>"+n.title+"</span>":"",'<i class="layui-icon layui-icon-ok"></i>'].join(""),_switch:"<em>"+((n.checked?o[0]:o[1])||"")+"</em><i></i>"};return t[r]||t.checkbox}(),"</div>"].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=d.find("input[type=radio]"),n=function(a){var n=t(this),o="layui-anim-scaleSpring";a.on("click",function(){var s=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+s.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(o).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(o).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),o=r.next("."+e),s=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();o[0]&&o.remove();var u=t(['<div class="layui-unselect '+e,l.checked?" "+e+"ed":"",(s?" layui-radio-disabled "+c:"")+'">','<i class="layui-anim layui-icon">'+i[l.checked?0:1]+"</i>","<div>"+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html()),e}()+"</div>","</div>"].join(""));r.after(u),n.call(this,u)})}};return e?f[e]?f[e]():a.error('\u4e0d\u652f\u6301\u7684 "'+e+'" \u8868\u5355\u6e32\u67d3'):layui.each(f,function(e,t){t()}),n};var d=function(){var e=null,a=f.config.verify,o="layui-form-danger",s={},c=t(this),u=c.parents(r).eq(0),d=u.find("*[lay-verify]"),h=c.parents("form")[0],y=c.attr("lay-filter");return layui.each(d,function(l,r){var s=t(this),c=s.attr("lay-verify").split("|"),u=s.attr("lay-verType"),d=s.val();if(s.removeClass(o),layui.each(c,function(t,l){var c,f="",h="function"==typeof a[l];if(a[l]){var c=h?f=a[l](d,r):!a[l][0].test(d),y="select"===r.tagName.toLowerCase()||/^checkbox|radio$/.test(r.type);if(f=f||a[l][1],"required"===l&&(f=s.attr("lay-reqText")||f),c)return"tips"===u?i.tips(f,function(){return"string"!=typeof s.attr("lay-ignore")&&y?s.next():s}(),{tips:1}):"alert"===u?i.alert(f,{title:"\u63d0\u793a",shadeClose:!0}):/\bstring|number\b/.test(typeof f)&&i.msg(f,{icon:5,shift:6}),n.mobile?v.scrollTop(function(){try{return(y?s.next():s).offset().top-15}catch(e){return 0}}()):setTimeout(function(){(y?s.next().find("input"):r).focus()},7),s.addClass(o),e=!0}}),e)return e}),!e&&(s=f.getValue(null,u),layui.event.call(this,l,"submit("+y+")",{elem:this,form:h,field:s}))},f=new u,v=t(document),h=t(window);t(function(){f.render()}),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});layui.define("form",function(e){"use strict";var i=layui.$,a=layui.form,n=layui.layer,t="tree",r={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var a=this;return a.config=i.extend({},a.config,e),a},on:function(e,i){return layui.onevent.call(this,t,e,i)}},l=function(){var e=this,i=e.config,a=i.id||e.index;return l.that[a]=e,l.config[a]=i,{config:i,reload:function(i){e.reload.call(e,i)},getChecked:function(){return e.getChecked.call(e)},setChecked:function(i){return e.setChecked.call(e,i)}}},c="layui-hide",d="layui-disabled",s="layui-tree-set",o="layui-tree-iconClick",h="layui-icon-addition",u="layui-icon-subtraction",p="layui-tree-entry",f="layui-tree-main",y="layui-tree-txt",v="layui-tree-pack",C="layui-tree-spread",k="layui-tree-setLineShort",m="layui-tree-showLine",x="layui-tree-lineExtend",b=function(e){var a=this;a.index=++r.index,a.config=i.extend({},a.config,r.config,e),a.render()};b.prototype.config={data:[],showCheckbox:!1,showLine:!0,accordion:!1,onlyIconControl:!1,isJump:!1,edit:!1,text:{defaultNodeName:"\u672a\u547d\u540d",none:"\u65e0\u6570\u636e"}},b.prototype.reload=function(e){var a=this;layui.each(e,function(e,i){"array"===layui._typeof(i)&&delete a.config[e]}),a.config=i.extend(!0,{},a.config,e),a.render()},b.prototype.render=function(){var e=this,a=e.config;e.checkids=[];var n=i('<div class="layui-tree'+(a.showCheckbox?" layui-form":"")+(a.showLine?" layui-tree-line":"")+'" lay-filter="LAY-tree-'+e.index+'"></div>');e.tree(n);var t=a.elem=i(a.elem);if(t[0]){if(e.key=a.id||e.index,e.elem=n,e.elemNone=i('<div class="layui-tree-emptyText">'+a.text.none+"</div>"),t.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);a.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=i(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(k),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(k)}),e.events()}},b.prototype.renderForm=function(e){a.render(e,"LAY-tree-"+this.index)},b.prototype.tree=function(e,a){var n=this,t=n.config,r=a||t.data;layui.each(r,function(a,r){var l=r.children&&r.children.length>0,o=i('<div class="layui-tree-pack" '+(r.spread?'style="display: block;"':"")+"></div>"),h=i(['<div data-id="'+r.id+'" class="layui-tree-set'+(r.spread?" layui-tree-spread":"")+(r.checked?" layui-tree-checkedFirst":"")+'">','<div class="layui-tree-entry">','<div class="layui-tree-main">',function(){return t.showLine?l?'<span class="layui-tree-iconClick layui-tree-icon"><i class="layui-icon '+(r.spread?"layui-icon-subtraction":"layui-icon-addition")+'"></i></span>':'<span class="layui-tree-iconClick"><i class="layui-icon layui-icon-file"></i></span>':'<span class="layui-tree-iconClick"><i class="layui-tree-iconArrow '+(l?"":c)+'"></i></span>'}(),function(){return t.showCheckbox?'<input type="checkbox" name="'+(r.field||"layuiTreeCheck_"+r.id)+'" same="layuiTreeCheck" lay-skin="primary" '+(r.disabled?"disabled":"")+' value="'+r.id+'">':""}(),function(){return t.isJump&&r.href?'<a href="'+r.href+'" target="_blank" class="'+y+'">'+(r.title||r.label||t.text.defaultNodeName)+"</a>":'<span class="'+y+(r.disabled?" "+d:"")+'">'+(r.title||r.label||t.text.defaultNodeName)+"</span>"}(),"</div>",function(){if(!t.edit)return"";var e={add:'<i class="layui-icon layui-icon-add-1" data-type="add"></i>',update:'<i class="layui-icon layui-icon-edit" data-type="update"></i>',del:'<i class="layui-icon layui-icon-delete" data-type="del"></i>'},i=['<div class="layui-btn-group layui-tree-btnGroup">'];return t.edit===!0&&(t.edit=["update","del"]),"object"==typeof t.edit?(layui.each(t.edit,function(a,n){i.push(e[n]||"")}),i.join("")+"</div>"):void 0}(),"</div></div>"].join(""));l&&(h.append(o),n.tree(o,r.children)),e.append(h),h.prev("."+s)[0]&&h.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),l||h.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),n.spread(h,r),t.showCheckbox&&(r.checked&&n.checkids.push(r.id),n.checkClick(h,r)),t.edit&&n.operate(h,r)})},b.prototype.spread=function(e,a){var n=this,t=n.config,r=e.children("."+p),l=r.children("."+f),c=r.find("."+o),k=r.find("."+y),m=t.onlyIconControl?c:l,x="";m.on("click",function(i){var a=e.children("."+v),n=m.children(".layui-icon")[0]?m.children(".layui-icon"):m.find(".layui-tree-icon").children(".layui-icon");if(a[0]){if(e.hasClass(C))e.removeClass(C),a.slideUp(200),n.removeClass(u).addClass(h);else if(e.addClass(C),a.slideDown(200),n.addClass(u).removeClass(h),t.accordion){var r=e.siblings("."+s);r.removeClass(C),r.children("."+v).slideUp(200),r.find(".layui-tree-icon").children(".layui-icon").removeClass(u).addClass(h)}}else x="normal"}),k.on("click",function(){var n=i(this);n.hasClass(d)||(x=e.hasClass(C)?t.onlyIconControl?"open":"close":t.onlyIconControl?"close":"open",t.click&&t.click({elem:e,state:x,data:a}))})},b.prototype.setCheckbox=function(e,i,a){var n=this,t=(n.config,a.prop("checked"));if(!a.prop("disabled")){if("object"==typeof i.children||e.find("."+v)[0]){var r=e.find("."+v).find('input[same="layuiTreeCheck"]');r.each(function(){this.disabled||(this.checked=t)})}var l=function(e){if(e.parents("."+s)[0]){var i,a=e.parent("."+v),n=a.parent(),r=a.prev().find('input[same="layuiTreeCheck"]');t?r.prop("checked",t):(a.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||r.prop("checked",!1)),l(n)}};l(e),n.renderForm("checkbox")}},b.prototype.checkClick=function(e,a){var n=this,t=n.config,r=e.children("."+p),l=r.children("."+f);l.on("click",'input[same="layuiTreeCheck"]+',function(r){layui.stope(r);var l=i(this).prev(),c=l.prop("checked");l.prop("disabled")||(n.setCheckbox(e,a,l),t.oncheck&&t.oncheck({elem:e,checked:c,data:a}))})},b.prototype.operate=function(e,a){var t=this,r=t.config,l=e.children("."+p),d=l.children("."+f);l.children(".layui-tree-btnGroup").on("click",".layui-icon",function(l){layui.stope(l);var f=i(this).data("type"),b=e.children("."+v),g={data:a,type:f,elem:e};if("add"==f){b[0]||(r.showLine?(d.find("."+o).addClass("layui-tree-icon"),d.find("."+o).children(".layui-icon").addClass(h).removeClass("layui-icon-file")):d.find(".layui-tree-iconArrow").removeClass(c),e.append('<div class="layui-tree-pack"></div>'));var w=r.operate&&r.operate(g),N={};if(N.title=r.text.defaultNodeName,N.id=w,t.tree(e.children("."+v),[N]),r.showLine)if(b[0])b.hasClass(x)||b.addClass(x),e.find("."+v).each(function(){i(this).children("."+s).last().addClass(k)}),b.children("."+s).last().prev().hasClass(k)?b.children("."+s).last().prev().removeClass(k):b.children("."+s).last().removeClass(k),!e.parent("."+v)[0]&&e.next()[0]&&b.children("."+s).last().removeClass(k);else{var T=e.siblings("."+s),L=1,I=e.parent("."+v);layui.each(T,function(e,a){i(a).children("."+v)[0]||(L=0)}),1==L?(T.children("."+v).addClass(m),T.children("."+v).children("."+s).removeClass(k),e.children("."+v).addClass(m),I.removeClass(x),I.children("."+s).last().children("."+v).children("."+s).last().addClass(k)):e.children("."+v).children("."+s).addClass(k)}if(!r.showCheckbox)return;if(d.find('input[same="layuiTreeCheck"]')[0].checked){var A=e.children("."+v).children("."+s).last();A.find('input[same="layuiTreeCheck"]')[0].checked=!0}t.renderForm("checkbox")}else if("update"==f){var F=d.children("."+y).html();d.children("."+y).html(""),d.append('<input type="text" class="layui-tree-editInput">'),d.children(".layui-tree-editInput").val(F).focus();var j=function(e){var i=e.val().trim();i=i?i:r.text.defaultNodeName,e.remove(),d.children("."+y).html(i),g.data.title=i,r.operate&&r.operate(g)};d.children(".layui-tree-editInput").blur(function(){j(i(this))}),d.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),j(i(this)))})}else n.confirm('\u786e\u8ba4\u5220\u9664\u8be5\u8282\u70b9 "<span style="color: #999;">'+(a.title||"")+'</span>" \u5417\uff1f',function(a){if(r.operate&&r.operate(g),g.status="remove",n.close(a),!e.prev("."+s)[0]&&!e.next("."+s)[0]&&!e.parent("."+v)[0])return e.remove(),void t.elem.append(t.elemNone);if(e.siblings("."+s).children("."+p)[0]){if(r.showCheckbox){var l=function(e){if(e.parents("."+s)[0]){var a=e.siblings("."+s).children("."+p),n=e.parent("."+v).prev(),r=n.find('input[same="layuiTreeCheck"]')[0],c=1,d=0;0==r.checked&&(a.each(function(e,a){var n=i(a).find('input[same="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(c=0),n.disabled||(d=1)}),1==c&&1==d&&(r.checked=!0,t.renderForm("checkbox"),l(n.parent("."+s))))}};l(e)}if(r.showLine){var d=e.siblings("."+s),h=1,f=e.parent("."+v);layui.each(d,function(e,a){i(a).children("."+v)[0]||(h=0)}),1==h?(b[0]||(f.removeClass(x),d.children("."+v).addClass(m),d.children("."+v).children("."+s).removeClass(k)),e.next()[0]?f.children("."+s).last().children("."+v).children("."+s).last().addClass(k):e.prev().children("."+v).children("."+s).last().addClass(k),e.next()[0]||e.parents("."+s)[1]||e.parents("."+s).eq(0).next()[0]||e.prev("."+s).addClass(k)):!e.next()[0]&&e.hasClass(k)&&e.prev().addClass(k)}}else{var y=e.parent("."+v).prev();if(r.showLine){y.find("."+o).removeClass("layui-tree-icon"),y.find("."+o).children(".layui-icon").removeClass(u).addClass("layui-icon-file");var w=y.parents("."+v).eq(0);w.addClass(x),w.children("."+s).each(function(){i(this).children("."+v).children("."+s).last().addClass(k)})}else y.find(".layui-tree-iconArrow").addClass(c);e.parents("."+s).eq(0).removeClass(C),e.parent("."+v).remove()}e.remove()})})},b.prototype.events=function(){var e=this,a=e.config;e.elem.find(".layui-tree-checkedFirst");e.setChecked(e.checkids),e.elem.find(".layui-tree-search").on("keyup",function(){var n=i(this),t=n.val(),r=n.nextAll(),l=[];r.find("."+y).each(function(){var e=i(this).parents("."+p);if(i(this).html().indexOf(t)!=-1){l.push(i(this).parent());var a=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+v)[0]&&a(e.parent("."+v).parent("."+s))};a(e.parent("."+s))}}),r.find("."+p).each(function(){var e=i(this).parent("."+s);e.hasClass("layui-tree-searchShow")||e.addClass(c)}),0==r.find(".layui-tree-searchShow").length&&e.elem.append(e.elemNone),a.onsearch&&a.onsearch({elem:l})}),e.elem.find(".layui-tree-search").on("keydown",function(){i(this).nextAll().find("."+p).each(function(){var e=i(this).parent("."+s);e.removeClass("layui-tree-searchShow "+c)}),i(".layui-tree-emptyText")[0]&&i(".layui-tree-emptyText").remove()})},b.prototype.getChecked=function(){var e=this,a=e.config,n=[],t=[];e.elem.find(".layui-form-checked").each(function(){n.push(i(this).prev()[0].value)});var r=function(e,a){layui.each(e,function(e,t){layui.each(n,function(e,n){if(t.id==n){var l=i.extend({},t);return delete l.children,a.push(l),t.children&&(l.children=[],r(t.children,l.children)),!0}})})};return r(i.extend({},a.data),t),t},b.prototype.setChecked=function(e){var a=this;a.config;a.elem.find("."+s).each(function(a,n){var t=i(this).data("id"),r=i(n).children("."+p).find('input[same="layuiTreeCheck"]'),l=r.next();if("number"==typeof e){if(t==e)return r[0].checked||l.click(),!1}else"object"==typeof e&&layui.each(e,function(e,i){if(i==t&&!r[0].checked)return l.click(),!0})})},l.that={},l.config={},r.reload=function(e,i){var a=l.that[e];return a.reload(i),l.call(a)},r.getChecked=function(e){var i=l.that[e];return i.getChecked()},r.setChecked=function(e,i){var a=l.that[e];return a.setChecked(i)},r.render=function(e){var i=new b(e);return l.call(i)},e(t,r)});layui.define(["laytpl","form"],function(e){"use strict";var a=layui.$,t=layui.laytpl,i=layui.form,n="transfer",l={config:{},index:layui[n]?layui[n].index+1e4:0,set:function(e){var t=this;return t.config=a.extend({},t.config,e),t},on:function(e,a){return layui.onevent.call(this,n,e,a)}},r=function(){var e=this,a=e.config,t=a.id||e.index;return r.that[t]=e,r.config[t]=a,{config:a,reload:function(a){e.reload.call(e,a)},getData:function(){return e.getData.call(e)}}},c="layui-hide",o="layui-btn-disabled",d="layui-none",s="layui-transfer-box",u="layui-transfer-header",h="layui-transfer-search",f="layui-transfer-active",y="layui-transfer-data",p=function(e){return e=e||{},['<div class="layui-transfer-box" data-index="'+e.index+'">','<div class="layui-transfer-header">','<input type="checkbox" name="'+e.checkAllName+'" lay-filter="layTransferCheckbox" lay-type="all" lay-skin="primary" title="{{ d.data.title['+e.index+"] || 'list"+(e.index+1)+"' }}\">","</div>","{{# if(d.data.showSearch){ }}",'<div class="layui-transfer-search">','<i class="layui-icon layui-icon-search"></i>','<input type="input" class="layui-input" placeholder="\u5173\u952e\u8bcd\u641c\u7d22">',"</div>","{{# } }}",'<ul class="layui-transfer-data"></ul>',"</div>"].join("")},v=['<div class="layui-transfer layui-form layui-border-box" lay-filter="LAY-transfer-{{ d.index }}">',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'<div class="layui-transfer-active">','<button type="button" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled" data-index="0">','<i class="layui-icon layui-icon-next"></i>',"</button>",'<button type="button" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled" data-index="1">','<i class="layui-icon layui-icon-prev"></i>',"</button>","</div>",p({index:1,checkAllName:"layTransferRightCheckAll"}),"</div>"].join(""),x=function(e){var t=this;t.index=++l.index,t.config=a.extend({},t.config,l.config,e),t.render()};x.prototype.config={title:["\u5217\u8868\u4e00","\u5217\u8868\u4e8c"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"\u65e0\u6570\u636e",searchNone:"\u65e0\u5339\u914d\u6570\u636e"}},x.prototype.reload=function(e){var t=this;t.config=a.extend({},t.config,e),t.render()},x.prototype.render=function(){var e=this,i=e.config,n=e.elem=a(t(v).render({data:i,index:e.index})),l=i.elem=a(i.elem);l[0]&&(i.data=i.data||[],i.value=i.value||[],e.key=i.id||e.index,l.html(e.elem),e.layBox=e.elem.find("."+s),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+h),e.layData=n.find("."+y),e.layBtn=n.find("."+f+" .layui-btn"),e.layBox.css({width:i.width,height:i.height}),e.layData.css({height:function(){return i.height-e.layHeader.outerHeight()-e.laySearch.outerHeight()-2}()}),e.renderData(),e.events())},x.prototype.renderData=function(){var e=this,a=(e.config,[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}]);e.parseData(function(e){var t=e.selected?1:0,i=["<li>",'<input type="checkbox" name="'+a[t].checkName+'" lay-skin="primary" lay-filter="layTransferCheckbox" title="'+e.title+'"'+(e.disabled?" disabled":"")+(e.checked?" checked":"")+' value="'+e.value+'">',"</li>"].join("");a[t].views.push(i),delete e.selected}),e.layData.eq(0).html(a[0].views.join("")),e.layData.eq(1).html(a[1].views.join("")),e.renderCheckBtn()},x.prototype.renderForm=function(e){i.render(e,"LAY-transfer-"+this.index)},x.prototype.renderCheckBtn=function(e){var t=this,i=t.config;e=e||{},t.layBox.each(function(n){var l=a(this),r=l.find("."+y),d=l.find("."+u).find('input[type="checkbox"]'),s=r.find('input[type="checkbox"]'),h=0,f=!1;if(s.each(function(){var e=a(this).data("hide");(this.checked||this.disabled||e)&&h++,this.checked&&!e&&(f=!0)}),d.prop("checked",f&&h===s.length),t.layBtn.eq(n)[f?"removeClass":"addClass"](o),!e.stopNone){var p=r.children("li:not(."+c+")").length;t.noneView(r,p?"":i.text.none)}}),t.renderForm("checkbox")},x.prototype.noneView=function(e,t){var i=a('<p class="layui-none">'+(t||"")+"</p>");e.find("."+d)[0]&&e.find("."+d).remove(),t.replace(/\s/g,"")&&e.append(i)},x.prototype.setValue=function(){var e=this,t=e.config,i=[];return e.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){var e=a(this).data("hide");e||i.push(this.value)}),t.value=i,e},x.prototype.parseData=function(e){var t=this,i=t.config,n=[];return layui.each(i.data,function(t,l){l=("function"==typeof i.parseData?i.parseData(l):l)||l,n.push(l=a.extend({},l)),layui.each(i.value,function(e,a){a==l.value&&(l.selected=!0)}),e&&e(l)}),i.data=n,t},x.prototype.getData=function(e){var a=this,t=a.config,i=[];return a.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&i.push(t)})}),i},x.prototype.events=function(){var e=this,t=e.config;e.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var t=a(this).prev(),i=t[0].checked,n=t.parents("."+s).eq(0).find("."+y);t[0].disabled||("all"===t.attr("lay-type")&&n.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=i)}),e.renderCheckBtn({stopNone:!0}))}),e.layBtn.on("click",function(){var i=a(this),n=i.data("index"),l=e.layBox.eq(n),r=[];if(!i.hasClass(o)){e.layBox.eq(n).each(function(t){var i=a(this),n=i.find("."+y);n.children("li").each(function(){var t=a(this),i=t.find('input[type="checkbox"]'),n=i.data("hide");i[0].checked&&!n&&(i[0].checked=!1,l.siblings("."+s).find("."+y).append(t.clone()),t.remove(),r.push(i[0].value)),e.setValue()})}),e.renderCheckBtn();var c=l.siblings("."+s).find("."+h+" input");""===c.val()||c.trigger("keyup"),t.onchange&&t.onchange(e.getData(r),n)}}),e.laySearch.find("input").on("keyup",function(){var i=this.value,n=a(this).parents("."+h).eq(0).siblings("."+y),l=n.children("li");l.each(function(){var e=a(this),t=e.find('input[type="checkbox"]'),n=t[0].title.indexOf(i)!==-1;e[n?"removeClass":"addClass"](c),t.data("hide",!n)}),e.renderCheckBtn();var r=l.length===n.children("li."+c).length;e.noneView(n,r?t.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,a){var t=r.that[e];return t.reload(a),r.call(t)},l.getData=function(e){var a=r.that[e];return a.getData()},l.render=function(e){var a=new x(e);return r.call(a)},e(n,l)});layui.define(["lay","laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=(layui.lay,layui.laytpl),a=layui.laypage,l=layui.layer,n=layui.form,o=layui.util,r=layui.hint(),d=layui.device(),c={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,h,e,t)}},s=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(s.that[i]=e,s.config[i]=t),{config:t,reload:function(t,i){e.reload.call(e,t,i)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)}}},u=function(e){var t=s.config[e];return t||r.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},y=function(e,a,l,n){var r=this.config||{};r.escape&&(a=o.escape(a));var d=e.templet?function(){return"function"==typeof e.templet?e.templet(l):i(t(e.templet).html()||String(a)).render(l)}():a;return n?t("<div>"+d+"</div>").text():d},h="table",f=".layui-table",p="layui-hide",v="layui-none",m="layui-table-view",g=".layui-table-tool",b=".layui-table-box",x=".layui-table-init",k=".layui-table-header",C=".layui-table-body",w=".layui-table-main",T=".layui-table-fixed",N=".layui-table-fixed-l",L=".layui-table-fixed-r",S=".layui-table-total",_=".layui-table-page",A=".layui-table-sort",R="layui-table-edit",W="layui-table-hover",z=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ','{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>',"<thead>","{{# layui.each(d.data.cols, function(i1, item1){ }}","<tr>","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'<th data-field="{{ item2.field||i2 }}" data-key="{{d.index}}-{{i1}}-{{i2}}" {{# if( item2.parentKey){ }}data-parentkey="{{ item2.parentKey }}"{{# } }} {{# if(item2.minWidth){ }}data-minwidth="{{item2.minWidth}}"{{# } }} '+t+' {{# if(item2.unresize || item2.colGroup){ }}data-unresize="true"{{# } }} class="{{# if(item2.hide){ }}layui-hide{{# } }}{{# if(isSort){ }} layui-unselect{{# } }}{{# if(!item2.field){ }} layui-table-col-special{{# } }}">','<div class="layui-table-cell laytable-cell-',"{{# if(item2.colGroup){ }}","group","{{# } else { }}","{{d.index}}-{{i1}}-{{i2}}",'{{# if(item2.type !== "normal"){ }}'," laytable-cell-{{ item2.type }}","{{# } }}","{{# } }}",'" {{#if(item2.align){}}align="{{item2.align}}"{{#}}}>','{{# if(item2.type === "checkbox"){ }}','<input type="checkbox" name="layTableCheckbox" lay-skin="primary" lay-filter="layTableAllChoose" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}>',"{{# } else { }}",'<span>{{item2.title||""}}</span>',"{{# if(isSort){ }}",'<span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc" title="\u5347\u5e8f"></i><i class="layui-edge layui-table-sort-desc" title="\u964d\u5e8f"></i></span>',"{{# } }}","{{# } }}","</div>","</th>",e.fixed?"{{# }; }}":"","{{# }); }}","</tr>","{{# }); }}","</thead>","</table>"].join("")},E=['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ','{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>',"<tbody></tbody>","</table>"].join(""),F=['<div class="layui-form layui-border-box {{ d.VIEW_CLASS }} {{ d.VIEW_CLASS }}-{{ d.index }}{{# if(d.data.className){ }} {{ d.data.className }}{{# } }}" lay-filter="LAY-TABLE-FORM-DF-{{ d.index }}" lay-id="{{ d.data.id }}" style="{{# if(d.data.width){ }}width:{{d.data.width}}px;{{# } }} {{# if(d.data.height){ }}height:{{d.data.height}}px;{{# } }}">',"{{# if(d.data.toolbar){ }}",'<div class="layui-table-tool">','<div class="layui-table-tool-temp"></div>','<div class="layui-table-tool-self"></div>',"</div>","{{# } }}",'<div class="layui-table-box">',"{{# if(d.data.loading){ }}",'<div class="layui-table-init" style="background-color: #fff;">','<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>',"</div>","{{# } }}","{{# var left, right; }}",'<div class="layui-table-header">',z(),"</div>",'<div class="layui-table-body layui-table-main">',E,"</div>","{{# if(left){ }}",'<div class="layui-table-fixed layui-table-fixed-l">','<div class="layui-table-header">',z({fixed:!0}),"</div>",'<div class="layui-table-body">',E,"</div>","</div>","{{# }; }}","{{# if(right){ }}",'<div class="layui-table-fixed layui-table-fixed-r">','<div class="layui-table-header">',z({fixed:"right"}),'<div class="layui-table-mend"></div>',"</div>",'<div class="layui-table-body">',E,"</div>","</div>","{{# }; }}","</div>","{{# if(d.data.totalRow){ }}",'<div class="layui-table-total">','<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ','{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>','<tbody><tr><td><div class="layui-table-cell" style="visibility: hidden;">Total</div></td></tr></tbody>',"</table>","</div>","{{# } }}","{{# if(d.data.page){ }}",'<div class="layui-table-page">','<div id="layui-table-page{{d.index}}"></div>',"</div>","{{# } }}","<style>","{{# layui.each(d.data.cols, function(i1, item1){","layui.each(item1, function(i2, item2){ }}",".laytable-cell-{{d.index}}-{{i1}}-{{i2}}{ ","{{# if(item2.width){ }}","width: {{item2.width}}px;","{{# } }}"," }","{{# });","}); }}","{{# if(d.data.lineStyle){ }}",".layui-table-view-{{ d.index }} .layui-table-body .layui-table .layui-table-cell{"," display: -webkit-box; -webkit-box-align: center; display: -moz-box; -moz-box-align: center; white-space: normal; {{ d.data.lineStyle }} ","}",".layui-table-view-{{ d.index }} .layui-table-body .layui-table .layui-table-cell:hover{overflow: auto;}","{{# } }}","</style>","</div>"].join(""),I=t(window),j=t(document),H=function(e){var i=this;i.index=++c.index,i.config=t.extend({},i.config,c.config,e),i.render()};H.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"\u65e0\u6570\u636e"}},H.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=I.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+m),o=e.elem=t(i(F).render({VIEW_CLASS:m,data:a,index:e.index}));if(a.index=e.index,e.key=a.id||a.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(g),e.layBox=o.find(b),e.layHeader=o.find(k),e.layMain=o.find(w),e.layBody=o.find(C),e.layFixed=o.find(T),e.layFixLeft=o.find(N),e.layFixRight=o.find(L),e.layTotal=o.find(S),e.layPage=o.find(_),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(k).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},H.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},H.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},H.prototype.renderToolbar=function(){var e=this,a=e.config,l=['<div class="layui-inline" lay-event="add"><i class="layui-icon layui-icon-add-1"></i></div>','<div class="layui-inline" lay-event="update"><i class="layui-icon layui-icon-edit"></i></div>','<div class="layui-inline" lay-event="delete"><i class="layui-icon layui-icon-delete"></i></div>'].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"\u7b5b\u9009\u5217",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"\u5bfc\u51fa",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"\u6253\u5370",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i="string"==typeof t?r[t]:t;i&&d.push('<div class="layui-inline" title="'+i.title+'" lay-event="'+i.layEvent+'"><i class="layui-icon '+i.icon+'"></i></div>')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},H.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](p),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},H.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},H.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&l<s&&(a--,c=s):(c=d.width||0,/\d+%$/.test(c)?(c=Math.floor(parseFloat(c)/100*o),c<s&&(c=s)):c||(d.width=c=0,a++)),d.hide&&(c=0),n+=c)):void r.splice(i,1)})}),o>n&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},H.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},H.prototype.reload=function(e,i){var a=this;e=e||{},delete a.haveInit,layui.each(e,function(e,t){"array"===layui._typeof(t)&&delete a.config[e]}),a.config=t.extend(i,{},a.config,e),a.render()},H.prototype.errorView=function(e){var i=this,a=i.layMain.find("."+v),l=t('<div class="'+v+'">'+(e||"Error")+"</div>");a[0]&&(i.layNone.remove(),a.remove()),i.layFixed.addClass(p),i.layMain.find("tbody").html(""),i.layMain.append(i.layNone=l),c.cache[i.key]=[]},H.prototype.page=1,H.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),i.loading(),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.errorView(t[n.msgName]||'\u8fd4\u56de\u7684\u6570\u636e\u4e0d\u7b26\u5408\u89c4\u8303\uff0c\u6b63\u786e\u7684\u6210\u529f\u72b6\u6001\u7801\u5e94\u4e3a\uff1a"'+n.statusName+'": '+n.statusCode)):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.errorView("\u8bf7\u6c42\u5f02\u5e38\uff0c\u9519\u8bef\u63d0\u793a\uff1a"+t),i.renderForm(),i.setColsWidth(),"function"==typeof a.error&&a.error(e,t)}})}else if("array"===layui._typeof(a.data)){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,"object"==typeof a.totalRow&&(c[n.totalRowName]=t.extend({},a.totalRow)),i.renderData(c,e,c[n.countName]),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},H.prototype.eachCols=function(e){var t=this;return c.eachCols(null,e,t.config.cols),t},H.prototype.renderData=function(e,n,o,r){var d=this,s=d.config,u=e[s.response.dataName]||[],h=e[s.response.totalRowName],f=[],m=[],g=[],b=function(){var e;return!r&&d.sortKey?d.sort(d.sortKey.field,d.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],h=[],v=a+s.limit*(n-1)+1;"array"===layui._typeof(l)&&0===l.length||(r||(l[c.config.indexName]=a),d.eachCols(function(n,r){var f=r.field||n,m=s.index+"-"+r.key,g=l[f];if(void 0!==g&&null!==g||(g=""),!r.colGroup){var b=['<td data-field="'+f+'" data-key="'+m+'" '+function(){var e=[];return r.edit&&e.push('data-edit="'+r.edit+'"'),r.align&&e.push('align="'+r.align+'"'),r.templet&&e.push('data-content="'+g+'"'),r.toolbar&&e.push('data-off="true"'),r.event&&e.push('lay-event="'+r.event+'"'),r.style&&e.push('style="'+r.style+'"'),r.minWidth&&e.push('data-minwidth="'+r.minWidth+'"'),e.join(" ")}()+' class="'+function(){var e=[];return r.hide&&e.push(p),r.field||e.push("layui-table-col-special"),e.join(" ")}()+'">','<div class="layui-table-cell laytable-cell-'+function(){return"normal"===r.type?m:m+" laytable-cell-"+r.type}()+'">'+function(){var n=t.extend(!0,{LAY_INDEX:v,LAY_COL:r},l),o=c.config.checkName;switch(r.type){case"checkbox":return'<input type="checkbox" name="layTableCheckbox" lay-skin="primary" '+function(){return r[o]?(l[o]=r[o],r[o]?"checked":""):n[o]?"checked":""}()+">";case"radio":return n[o]&&(e=a),'<input type="radio" name="layTableRadio_'+s.index+'" '+(n[o]?"checked":"")+' lay-type="layTableRadio">';case"numbers":return v}return r.toolbar?i(t(r.toolbar).html()||"").render(n):y.call(d,r,g,n)}(),"</div></td>"].join("");o.push(b),r.fixed&&"right"!==r.fixed&&u.push(b),"right"===r.fixed&&h.push(b)}}),f.push('<tr data-index="'+a+'">'+o.join("")+"</tr>"),m.push('<tr data-index="'+a+'">'+u.join("")+"</tr>"),g.push('<tr data-index="'+a+'">'+h.join("")+"</tr>"))}),d.layBody.scrollTop(0),d.layMain.find("."+v).remove(),d.layMain.find("tbody").html(f.join("")),d.layFixLeft.find("tbody").html(m.join("")),d.layFixRight.find("tbody").html(g.join("")),d.renderForm(),"number"==typeof e&&d.setThisRowChecked(e),d.syncCheckAll(),d.haveInit?d.scrollPatch():setTimeout(function(){d.scrollPatch()},50),d.haveInit=!0,l.close(d.tipsIndex),s.HAS_SET_COLS_PATCH||d.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.cache[d.key]=u,d.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](p),0===u.length?(d.renderForm(),d.errorView(s.text.none)):(d.layFixed.removeClass(p),r?b():(b(),d.renderTotal(u,h),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'<i class="layui-icon"></i>',next:'<i class="layui-icon"></i>',jump:function(e,t){t||(d.page=e.curr,s.limit=e.limit,d.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page)))))},H.prototype.renderTotal=function(e,a){var l=this,n=l.config,o={};if(n.totalRow){layui.each(e,function(e,t){"array"===layui._typeof(t)&&0===t.length||l.eachCols(function(e,i){var a=i.field||e,l=t[a];i.totalRow&&(o[a]=(o[a]||0)+(parseFloat(l)||0))})}),l.dataTotal={};var r=[];l.eachCols(function(e,d){var c=d.field||e,s=function(){var e,t=d.totalRowText||"",i=parseFloat(o[c]).toFixed(2),n={};return n[c]=i,e=d.totalRow?y.call(l,d,i,n)||t:t,a?a[d.field]||e:e}(),u=['<td data-field="'+c+'" data-key="'+n.index+"-"+d.key+'" '+function(){var e=[];return d.align&&e.push('align="'+d.align+'"'),d.style&&e.push('style="'+d.style+'"'),d.minWidth&&e.push('data-minwidth="'+d.minWidth+'"'),e.join(" ")}()+' class="'+function(){var e=[];return d.hide&&e.push(p),d.field||e.push("layui-table-col-special"),e.join(" ")}()+'">','<div class="layui-table-cell laytable-cell-'+function(){var e=n.index+"-"+d.key;return"normal"===d.type?e:e+" laytable-cell-"+d.type}()+'">'+function(){var e=d.totalRow||n.totalRow;return"string"==typeof e?i(e).render(t.extend({TOTAL_NUMS:s},d)):s}(),"</div></td>"].join("");d.field&&(l.dataTotal[c]=s),r.push(u)}),l.layTotal.find("tbody").html("<tr>"+r.join("")+"</tr>")}},H.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},H.prototype.renderForm=function(e){var t=this,i=(t.config,t.elem.attr("lay-filter"));n.render(e,i)},H.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},H.prototype.sort=function(e,i,a,l){var n,o,d=this,s={},u=d.config,y=u.elem.attr("lay-filter"),f=c.cache[d.key];"string"==typeof e&&(n=e,d.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1}));try{var n=n||e.data("field"),p=e.data("key");if(d.sortKey&&!a&&n===d.sortKey.field&&i===d.sortKey.sort)return;var v=d.layHeader.find("th .laytable-cell-"+p).find(A);d.layHeader.find("th").find(A).removeAttr("lay-sort"),v.attr("lay-sort",i||null),d.layFixed.find("th")}catch(m){r.error("Table modules: sort field '"+n+"' not matched")}d.sortKey={field:n,sort:i},u.autoSort&&("asc"===i?o=layui.sort(f,n):"desc"===i?o=layui.sort(f,n,!0):(o=layui.sort(f,c.config.indexName),delete d.sortKey)),s[u.response.dataName]=o||f,d.renderData(s,d.page,d.count,!0),l&&layui.event.call(e,h,"sort("+y+")",{field:n,type:i})},H.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(x).remove()):(i.layInit=t(['<div class="layui-table-init">','<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>',"</div>"].join("")),i.layBox.append(i.layInit)))},H.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=c.cache[i.key];l[e]&&"array"!==layui._typeof(l[e])&&(l[e][a.checkName]=t)},H.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(c.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},H.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},H.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=I.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e-=t.layPage.outerHeight()||41),t.layMain.css("height",e-2))},H.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},H.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('<th class="layui-table-patch"><div class="layui-table-cell"></div></th>');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(C).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](p),e.layFixRight.css("right",a-1)},H.prototype.events=function(){var e,i=this,a=i.config,o=t("body"),r={},s=i.layHeader.find("th"),u=".layui-table-cell",f=a.elem.attr("lay-filter");i.layTool.on("click","*[lay-event]",function(e){var o=t(this),r=o.attr("lay-event"),s=function(e){var l=t(e.list),n=t('<ul class="layui-table-tool-panel"></ul>');n.html(l),a.height&&n.css("max-height",a.height-(i.layTool.outerHeight()||50)),o.find(".layui-table-tool-panel")[0]||o.append(n),i.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),j.trigger("table.tool.panel.remove"),l.close(i.tipsIndex),r){case"LAYTABLE_COLS":s({list:function(){var e=[];return i.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('<li><input type="checkbox" name="'+i.field+'" data-key="'+i.key+'" data-parentkey="'+(i.parentKey||"")+'" lay-skin="primary" '+(i.hide?"":"checked")+' title="'+(i.title||i.field)+'" lay-filter="LAY_TABLE_TOOL_COLS"></li>')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var l=t(e.elem),n=this.checked,o=l.data("key"),r=l.data("parentkey");layui.each(a.cols,function(e,t){layui.each(t,function(t,l){if(e+"-"+t===o){var d=l.hide;l.hide=!n,i.elem.find('*[data-key="'+a.index+"-"+o+'"]')[n?"removeClass":"addClass"](p),d!=l.hide&&i.setParentCol(!n,r),i.resize()}})})})}});break;case"LAYTABLE_EXPORT":d.ie?l.tips("\u5bfc\u51fa\u529f\u80fd\u4e0d\u652f\u6301 IE\uff0c\u8bf7\u7528 Chrome \u7b49\u9ad8\u7ea7\u6d4f\u89c8\u5668\u5bfc\u51fa",this,{tips:3}):s({list:function(){return['<li data-type="csv">\u5bfc\u51fa\u5230 Csv \u6587\u4ef6</li>','<li data-type="xls">\u5bfc\u51fa\u5230 Excel \u6587\u4ef6</li>'].join("")}(),done:function(e,l){l.on("click",function(){var e=t(this).data("type");c.exportFile.call(i,a.id,null,e)})}});break;case"LAYTABLE_PRINT":var u=window.open("\u6253\u5370\u7a97\u53e3","_blank"),y=["<style>","body{font-size: 12px; color: #666;}","table{width: 100%; border-collapse: collapse; border-spacing: 0;}","th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #666;}","a{color: #666; text-decoration:none;}","*.layui-hide{display: none}","</style>"].join(""),v=t(i.layHeader.html());v.append(i.layMain.find("table").html()),v.append(i.layTotal.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),u.document.write(y+v.prop("outerHTML")),u.document.close(),u.print(),u.close()}layui.event.call(this,h,"toolbar("+f+")",t.extend({event:r,config:a},{}))}),s.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||r.resizeStart||(r.allowResize=i.width()-l<=10,o.css("cursor",r.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);r.resizeStart||o.css("cursor","")}).on("mousedown",function(e){var l=t(this);if(r.allowResize){var n=l.data("key");e.preventDefault(),r.resizeStart=!0,r.offset=[e.clientX,e.clientY],i.getCssRule(n,function(e){var t=e.style.width||l.outerWidth();r.rule=e,r.ruleWidth=parseFloat(t),r.minWidth=l.data("minwidth")||a.cellMinWidth})}}),j.on("mousemove",function(t){if(r.resizeStart){if(t.preventDefault(),r.rule){var a=r.ruleWidth+t.clientX-r.offset[0];a<r.minWidth&&(a=r.minWidth),r.rule.style.width=a+"px",l.close(i.tipsIndex)}e=1}}).on("mouseup",function(t){r.resizeStart&&(r={},o.css("cursor",""),i.scrollPatch()),2===e&&(e=null)}),s.on("click",function(a){var l,n=t(this),o=n.find(A),r=o.attr("lay-sort");return o[0]&&1!==e?(l="asc"===r?"desc":"desc"===r?null:"asc",void i.sort(n,l,null,!0)):e=2}).find(A+" .layui-edge ").on("click",function(e){var a=t(this),l=a.index(),n=a.parents("th").eq(0).data("field");layui.stope(e),0===l?i.sort(n,"asc",null,!0):i.sort(n,"desc",null,!0)});var v=function(e){var a=t(this),l=a.parents("tr").eq(0).data("index"),n=i.layBody.find('tr[data-index="'+l+'"]'),o=c.cache[i.key]||[];return o=o[l]||{},t.extend({tr:n,data:c.clearCacheKey(o),del:function(){c.cache[i.key][l]=[],n.remove(),i.scrollPatch()},update:function(e){e=e||{},layui.each(e,function(e,t){if(e in o){var a,l=n.children('td[data-field="'+e+'"]');o[e]=t,i.eachCols(function(t,i){i.field==e&&i.templet&&(a=i.templet)}),l.children(u).html(y.call(i,{templet:a},t,o)),l.data("content",t)}})}},e)};i.elem.on("click",'input[name="layTableCheckbox"]+',function(){var e=t(this).prev(),a=i.layBody.find('input[name="layTableCheckbox"]'),l=e.parents("tr").eq(0).data("index"),n=e[0].checked,o="layTableAllChoose"===e.attr("lay-filter");o?(a.each(function(e,t){t.checked=n,i.setCheckData(e,n)}),i.syncCheckAll(),i.renderForm("checkbox")):(i.setCheckData(l,n),i.syncCheckAll()),layui.event.call(e[0],h,"checkbox("+f+")",v.call(e[0],{checked:n,type:o?"all":"one"}))}),i.elem.on("click",'input[lay-type="layTableRadio"]+',function(){var e=t(this).prev(),l=e[0].checked,n=c.cache[i.key],o=e.parents("tr").eq(0).data("index");layui.each(n,function(e,t){o===e?t[a.checkName]=!0:delete t[a.checkName]}),i.setThisRowChecked(o),layui.event.call(this,h,"radio("+f+")",v.call(this,{checked:l}))}),i.layBody.on("mouseenter","tr",function(){var e=t(this),a=e.index();e.data("off")||i.layBody.find("tr:eq("+a+")").addClass(W)}).on("mouseleave","tr",function(){var e=t(this),a=e.index();e.data("off")||i.layBody.find("tr:eq("+a+")").removeClass(W)}).on("click","tr",function(){m.call(this,"row")}).on("dblclick","tr",function(){m.call(this,"rowDouble")});var m=function(e){var i=t(this);i.data("off")||layui.event.call(this,h,e+"("+f+")",v.call(i.children("td")[0]))};i.layBody.on("change","."+R,function(){var e=t(this),a=this.value,l=e.parent().data("field"),n=e.parents("tr").eq(0).data("index"),o=c.cache[i.key][n];o[l]=a,layui.event.call(this,h,"edit("+f+")",v.call(this,{value:a,field:l}))}).on("blur","."+R,function(){var e,a=t(this),l=this,n=a.parent().data("field"),o=a.parents("tr").eq(0).data("index"),r=c.cache[i.key][o];i.eachCols(function(t,i){i.field==n&&i.templet&&(e=i.templet)}),a.siblings(u).html(function(t){return y.call(i,{templet:e},t,r)}(l.value)),a.parent().data("content",l.value),a.remove()}),i.layBody.on("click","td",function(e){var i=t(this),a=(i.data("field"),i.data("edit")),l=i.children(u);if(!i.data("off")&&a){var n=t('<input class="layui-input '+R+'">');return n[0].value=i.data("content")||l.text(),i.find("."+R)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(u);if(!i.data("off"))if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('<div class="'+g+'"><i class="layui-icon layui-icon-down"></i></div>')}};i.layBody.on("click","."+g,function(e){var n=t(this),o=n.parent(),r=o.children(u);i.tipsIndex=l.tips(['<div class="layui-table-tips-main" style="margin-top: -'+(r.height()+16)+"px;"+function(){return"sm"===a.size?"padding: 4px 15px; font-size: 12px;":"lg"===a.size?"padding: 14px 15px;":""}()+'">',r.html(),"</div>",'<i class="layui-icon layui-table-tips-c layui-icon-close"></i>'].join(""),r[0],{tips:[3,""],time:-1,anim:-1,maxWidth:d.ios||d.android?300:i.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),i.layBody.on("click","*[lay-event]",function(){var e=t(this),a=e.parents("tr").eq(0).data("index");layui.event.call(this,h,"tool("+f+")",v.call(this,{event:e.attr("lay-event")})),i.setThisRowChecked(a)}),i.layMain.on("scroll",function(){var e=t(this),a=e.scrollLeft(),n=e.scrollTop();i.layHeader.scrollLeft(a),i.layTotal.scrollLeft(a),i.layFixed.find(C).scrollTop(n),l.close(i.tipsIndex)}),I.on("resize",function(){i.resize()})},function(){j.on("click",function(){j.trigger("table.remove.tool.panel")}),j.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()})}(),c.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':f+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(o){r.error(n+l,"error")}var d=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},c.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(o){return r.error(n+l)}var c=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);c.colspan<2&&d.push(c),s.cols[e].push(c)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(d,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),c.render(s)}),a},s.that={},s.config={},c.eachCols=function(e,i,a){var l=s.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},c.checkStatus=function(e){var t=0,i=0,a=[],l=c.cache[e]||[];return layui.each(l,function(e,l){return"array"===layui._typeof(l)?void i++:void(l[c.config.checkName]&&(t++,a.push(c.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},c.getData=function(e){var t=[],i=c.cache[e]||[];return layui.each(i,function(e,i){"array"!==layui._typeof(i)&&t.push(c.clearCacheKey(i))}),t},c.exportFile=function(e,t,i){var a=this;t=t||c.clearCacheKey(c.cache[e]),i=i||"csv";var l=s.that[e],n=s.config[e]||{},o={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],u=document.createElement("a");return d.ie?r.error("IE_NOT_SUPPORT_EXPORTS"):(u.href="data:"+o+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],n=[],o=[];return layui.each(t,function(t,a){var o=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(c.clearCacheKey(a),function(e,t){o.push('"'+(t||"")+'"')})):c.eachCols(e,function(e,n){if(n.field&&"normal"==n.type&&!n.hide){
var r=a[n.field];void 0!==r&&null!==r||(r=""),0==t&&i.push(n.title||""),o.push('"'+y.call(l,n,r,a,"text")+'"')}}),n.push(o.join(","))}),layui.each(a.dataTotal,function(e,t){o.push(t)}),i.join(",")+"\r\n"+n.join("\r\n")+"\r\n"+o.join(",")}()),u.download=(n.title||"table_"+(n.index||""))+"."+i,document.body.appendChild(u),u.click(),void document.body.removeChild(u))},c.resize=function(e){if(e){var t=u(e);if(!t)return;s.that[e].resize()}else layui.each(s.that,function(){this.resize()})},c.reload=function(e,t,i){var a=u(e);if(a){var l=s.that[e];return l.reload(t,i),s.call(l)}},c.render=function(e){var t=new H(e);return s.call(t)},c.clearCacheKey=function(e){return e=t.extend({},e),delete e[c.config.checkName],delete e[c.config.indexName],e},t(function(){c.init()}),e(h,c)});layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"":"")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"":"")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,l=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),l.eq(u.index).addClass(d),setTimeout(function(){l.eq(c).addClass(r),l.eq(u.index).addClass(r)},50)):(n.addIndex(i),l.eq(u.index).addClass(s),setTimeout(function(){l.eq(c).addClass(o),l.eq(u.index).addClass(o)},50)),setTimeout(function(){l.removeClass(a+" "+d+" "+s+" "+o+" "+r),l.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:l.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});layui.define("jquery",function(e){"use strict";var a=layui.jquery,l={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var l=this;return l.config=a.extend({},l.config,e),l},on:function(e,a){return layui.onevent.call(this,n,e,a)}},i=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",u="layui-icon-rate-solid",s="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var i=this;i.index=++l.index,i.config=a.extend({},i.config,l.config,e),i.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,l=e.config,i=l.theme?'style="color: '+l.theme+';"':"";l.elem=a(l.elem),l.value>l.length&&(l.value=l.length),parseInt(l.value)!==l.value&&(l.half||(l.value=Math.ceil(l.value)-l.value<.5?Math.ceil(l.value):Math.floor(l.value)));for(var n='<ul class="layui-rate" '+(l.readonly?"readonly":"")+">",s=1;s<=l.length;s++){var r='<li class="layui-inline"><i class="layui-icon '+(s>Math.floor(l.value)?o:u)+'" '+i+"></i></li>";l.half&&parseInt(l.value)!==l.value&&s==Math.ceil(l.value)?n=n+'<li><i class="layui-icon layui-icon-rate-half" '+i+"></i></li>":n+=r}n+="</ul>"+(l.text?'<span class="layui-inline">'+l.value+"\u661f":"")+"</span>";var c=l.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),l.span=e.elemTemp.next("span"),l.setText&&l.setText(l.value),c.html(e.elemTemp),c.addClass("layui-inline"),l.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,l=a.config;l.value=e,a.render()},v.prototype.action=function(){var e=this,l=e.config,i=e.elemTemp,n=i.find("i").width();i.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(l.value=t,l.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(l.value=l.value-.5)}l.text&&i.next("span").text(l.value+"\u661f"),l.choose&&l.choose(l.value),l.setText&&l.setText(l.value)}),v.on("mousemove",function(e){if(i.find("i").each(function(){a(this).addClass(o).removeClass(r)}),i.find("i:lt("+t+")").each(function(){a(this).addClass(u).removeClass(f)}),l.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(s).removeClass(u)}}),v.on("mouseleave",function(){i.find("i").each(function(){a(this).addClass(o).removeClass(r)}),i.find("i:lt("+Math.floor(l.value)+")").each(function(){a(this).addClass(u).removeClass(f)}),l.half&&parseInt(l.value)!==l.value&&i.children("li:eq("+Math.floor(l.value)+")").children("i").addClass(s).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},l.render=function(e){var a=new v(e);return i.call(a)},e(n,l)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon "></i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var m=l(e.elem);if(m[0]){var f=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,y=e.end||"\u6ca1\u6709\u66f4\u591a\u4e86",v=e.scrollElem&&e.scrollElem!==document,d="<cite>\u52a0\u8f7d\u66f4\u591a</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");m.find(".layui-flow-more")[0]||m.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(y):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(f.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&m.width()&&(r=setTimeout(function(){var i=v?e.height():l(window).height(),n=v?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&e.attr("lay-src")){var f=e.attr("lay-src");layui.img(f,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",f).removeAttr("lay-src"),l[0]&&m(l),i++},function(){t.lazyimg.elem.eq(i);e.removeAttr("lay-src")})}},m=function(e,o){var m=a?(o||n).height():l(window).height(),f=n.scrollTop(),u=f+m;if(t.lazyimg.elem=l(r),e)c(e,m);else for(var s=0;s<t.lazyimg.elem.length;s++){var y=t.lazyimg.elem.eq(s),v=a?function(){return y.offset().top-n.offset().top+f}():y.offset().top;if(c(y,m),i=s,v>u)break}};if(m(),!o){var f;n.on("scroll",function(){var e=l(this);f&&clearTimeout(f),f=setTimeout(function(){m(null,e)},50)}),o=!0}return m},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['<div class="'+r+'">','<div class="layui-unselect layui-layedit-tool">'+f+"</div>",'<div class="layui-layedit-iframe">','<iframe id="'+u+'" name="'+u+'" textarea="'+t+'" frameborder="0"></iframe>',"</div>","</div>"].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e(["<style>","*{margin: 0; padding: 0;}","body{padding: 10px; line-height: 20px; overflow-x: hidden; word-wrap: break-word; font: 14px Helvetica Neue,Helvetica,PingFang SC,Microsoft YaHei,Tahoma,Arial,sans-serif; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;}","a{color:#01AAED; text-decoration:none;}a:hover{color:#c00}","p{margin-bottom: 10px;}","img{display: inline-block; border: none; vertical-align: middle;}","pre{margin: 10px 0; padding: 10px; line-height: 20px; border: 1px solid #ddd; border-left-width: 6px; background-color: #F2F2F2; color: #333; font-family: Courier New; font-size: 12px;}","</style>"].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("\u8bf7\u6682\u65f6\u7528shift+enter"),!1}r.execCommand("formatBlock",!1,"<p>")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"<p>"),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"\u4e0a\u4f20\u5931\u8d25")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"\u5e2e\u52a9",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"<p>"),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"\u8d85\u94fe\u63a5",skin:"layui-layer-msg",content:['<ul class="layui-form" style="margin: 15px;">','<li class="layui-form-item">','<label class="layui-form-label" style="width: 60px;">URL</label>','<div class="layui-input-block" style="margin-left: 90px">','<input name="url" lay-verify="url" value="'+(t.href||"")+'" autofocus="true" autocomplete="off" class="layui-input">',"</div>","</li>",'<li class="layui-form-item">','<label class="layui-form-label" style="width: 60px;">\u6253\u5f00\u65b9\u5f0f</label>','<div class="layui-input-block" style="margin-left: 90px">','<input type="radio" name="target" value="_self" class="layui-input" title="\u5f53\u524d\u7a97\u53e3"'+("_self"!==t.target&&t.target?"":"checked")+">",'<input type="radio" name="target" value="_blank" class="layui-input" title="\u65b0\u7a97\u53e3" '+("_blank"===t.target?"checked":"")+">","</div>","</li>",'<li class="layui-form-item" style="text-align: center;">','<button type="button" lay-submit lay-filter="layedit-link-yes" class="layui-btn"> \u786e\u5b9a </button>','<button style="margin-left: 20px;" type="button" class="layui-btn layui-btn-primary"> \u53d6\u6d88 </button>',"</li>","</ul>"].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[\u5fae\u7b11]","[\u563b\u563b]","[\u54c8\u54c8]","[\u53ef\u7231]","[\u53ef\u601c]","[\u6316\u9f3b]","[\u5403\u60ca]","[\u5bb3\u7f9e]","[\u6324\u773c]","[\u95ed\u5634]","[\u9119\u89c6]","[\u7231\u4f60]","[\u6cea]","[\u5077\u7b11]","[\u4eb2\u4eb2]","[\u751f\u75c5]","[\u592a\u5f00\u5fc3]","[\u767d\u773c]","[\u53f3\u54fc\u54fc]","[\u5de6\u54fc\u54fc]","[\u5618]","[\u8870]","[\u59d4\u5c48]","[\u5410]","[\u54c8\u6b20]","[\u62b1\u62b1]","[\u6012]","[\u7591\u95ee]","[\u998b\u5634]","[\u62dc\u62dc]","[\u601d\u8003]","[\u6c57]","[\u56f0]","[\u7761]","[\u94b1]","[\u5931\u671b]","[\u9177]","[\u8272]","[\u54fc]","[\u9f13\u638c]","[\u6655]","[\u60b2\u4f24]","[\u6293\u72c2]","[\u9ed1\u7ebf]","[\u9634\u9669]","[\u6012\u9a82]","[\u4e92\u7c89]","[\u5fc3]","[\u4f24\u5fc3]","[\u732a\u5934]","[\u718a\u732b]","[\u5154\u5b50]","[ok]","[\u8036]","[good]","[NO]","[\u8d5e]","[\u6765]","[\u5f31]","[\u8349\u6ce5\u9a6c]","[\u795e\u9a6c]","[\u56e7]","[\u6d6e\u4e91]","[\u7ed9\u529b]","[\u56f4\u89c2]","[\u5a01\u6b66]","[\u5965\u7279\u66fc]","[\u793c\u7269]","[\u949f]","[\u8bdd\u7b52]","[\u8721\u70db]","[\u86cb\u7cd5]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('<li title="'+e+'"><img src="'+i+'" alt="'+e+'"></li>')}),'<ul class="layui-clear">'+t.join("")+"</ul>"}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"\u63d2\u5165\u4ee3\u7801",skin:"layui-layer-msg",content:['<ul class="layui-form layui-form-pane" style="margin: 15px;">','<li class="layui-form-item">','<label class="layui-form-label">\u8bf7\u9009\u62e9\u8bed\u8a00</label>','<div class="layui-input-block">','<select name="lang">','<option value="JavaScript">JavaScript</option>','<option value="HTML">HTML</option>','<option value="CSS">CSS</option>','<option value="Java">Java</option>','<option value="PHP">PHP</option>','<option value="C#">C#</option>','<option value="Python">Python</option>','<option value="Ruby">Ruby</option>','<option value="Go">Go</option>',"</select>","</div>","</li>",'<li class="layui-form-item layui-form-text">','<label class="layui-form-label">\u4ee3\u7801</label>','<div class="layui-input-block">','<textarea name="code" lay-verify="required" autofocus="true" class="layui-textarea" style="height: 200px;"></textarea>',"</div>","</li>",'<li class="layui-form-item" style="text-align: center;">','<button type="button" lay-submit lay-filter="layedit-code-yes" class="layui-btn"> \u786e\u5b9a </button>','<button style="margin-left: 20px;" type="button" class="layui-btn layui-btn-primary"> \u53d6\u6d88 </button>',"</li>","</ul>"].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'<i class="layui-icon layedit-tool-html" title="HTML\u6e90\u4ee3\u7801" lay-command="html" layedit-event="html""></i><span class="layedit-tool-mid"></span>',strong:'<i class="layui-icon layedit-tool-b" title="\u52a0\u7c97" lay-command="Bold" layedit-event="b""></i>',italic:'<i class="layui-icon layedit-tool-i" title="\u659c\u4f53" lay-command="italic" layedit-event="i""></i>',underline:'<i class="layui-icon layedit-tool-u" title="\u4e0b\u5212\u7ebf" lay-command="underline" layedit-event="u""></i>',del:'<i class="layui-icon layedit-tool-d" title="\u5220\u9664\u7ebf" lay-command="strikeThrough" layedit-event="d""></i>',"|":'<span class="layedit-tool-mid"></span>',left:'<i class="layui-icon layedit-tool-left" title="\u5de6\u5bf9\u9f50" lay-command="justifyLeft" layedit-event="left""></i>',center:'<i class="layui-icon layedit-tool-center" title="\u5c45\u4e2d\u5bf9\u9f50" lay-command="justifyCenter" layedit-event="center""></i>',right:'<i class="layui-icon layedit-tool-right" title="\u53f3\u5bf9\u9f50" lay-command="justifyRight" layedit-event="right""></i>',link:'<i class="layui-icon layedit-tool-link" title="\u63d2\u5165\u94fe\u63a5" layedit-event="link""></i>',unlink:'<i class="layui-icon layedit-tool-unlink layui-disabled" title="\u6e05\u9664\u94fe\u63a5" lay-command="unlink" layedit-event="unlink""></i>',face:'<i class="layui-icon layedit-tool-face" title="\u8868\u60c5" layedit-event="face""></i>',image:'<i class="layui-icon layedit-tool-image" title="\u56fe\u7247" layedit-event="image"><input type="file" name="file"></i>',code:'<i class="layui-icon layedit-tool-code" title="\u63d2\u5165\u4ee3\u7801" layedit-event="code"></i>',help:'<i class="layui-icon layedit-tool-help" title="\u5e2e\u52a9" layedit-event="help"></i>'},L=new c;t(n,L)});layui.define("jquery",function(a){"use strict";var e=layui.$;a("code",function(a){var l=[];a=a||{},a.elem=e(a.elem||".layui-code"),a.lang="lang"in a?a.lang:"code",a.elem.each(function(){l.push(this)}),layui.each(l.reverse(),function(l,i){var t=e(i),c=t.html();(t.attr("lay-encode")||a.encode)&&(c=c.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")),t.html('<ol class="layui-code-ol"><li>'+c.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),t.find(">.layui-code-h3")[0]||t.prepend('<h3 class="layui-code-h3">'+(t.attr("lay-title")||a.title||"</>")+'<a href="javascript:;">'+(t.attr("lay-lang")||a.lang||"")+"</a></h3>");var n=t.find(">.layui-code-ol");t.addClass("layui-box layui-code-view"),(t.attr("lay-skin")||a.skin)&&t.addClass("layui-code-"+(t.attr("lay-skin")||a.skin)),(n.find("li").length/100|0)>0&&n.css("margin-left",(n.find("li").length/100|0)+"px"),(t.attr("lay-height")||a.height)&&n.css("max-height",t.attr("lay-height")||a.height)})})}).addcss("https://www.layui.com/layuiadmin/std/dist/layuiadmin/layui/modules/code.css?v=2","skincodecss"); |
load("@local_config_cuda//cuda:build_defs.bzl", "cuda_is_configured")
load("@local_config_rocm//rocm:build_defs.bzl", "rocm_is_configured")
def stream_executor_friends():
return ["//tensorflow/..."]
def tf_additional_cuda_platform_deps():
return []
def tf_additional_cuda_driver_deps():
return [":cuda_stub"]
def tf_additional_cudnn_plugin_deps():
return []
# Returns whether any GPU backend is configuered.
def if_gpu_is_configured(x):
if cuda_is_configured() or rocm_is_configured():
return x
return []
|
import { combineReducers } from 'redux'
import accountReducer from './accountReducer'
const reducers =combineReducers({
account : accountReducer
})
export default reducers |
"""
@name: model_plot.py
@description
Plot the model fit
@author: Christopher Brittin
@email: 'cabrittin' + <at> + 'gmail' + '.' + 'com'
"""
import argparse
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rcParams['ytick.labelsize'] = 7
mpl.rcParams['xtick.labelsize'] = 7
from models.specificity import Model_P3_Avoidance as Avoidance
#THRESH = [0,0,0]
#VAL = [0.5,0.4,0.4]
def get_avoidance_error(error,val=0.5,high=False):
A = Avoidance()
aparams = A.min_error(error,derror=2000)
params = None
for i in range(2000):
if high:
if aparams[i,2] >= val:
params = aparams[i,:3]
break
else:
if aparams[i,2] <= val:
params = aparams[i,:3]
break
return params
#def get_legend(params):
# alabel = ('Model: ($p$,$s$,$f$) = (%1.2f,%1.2f,%1.2f)'
# %(params[0],1 - params[1],params[2]))
# return alabel
def get_legend(params):
alabel = ('($p$,$s$,$f$) = (%1.2f,%1.2f,%1.2f)'
%(params[0],1 - params[1],params[2]))
return alabel
def plot_fit(ax,data,fit,ylabel=None,labels=None,legend=None,width=0.35,width2=0.33):
n = data.sum()
data /= n
elabel = 'Empirical ($n$ = %d)' %n
ind = np.arange(4)
#ax.grid(zorder=1)
ax.bar(ind-0.5*width,data,width=width2,color='k',zorder=2,label=elabel)
ax.bar(ind+0.5*width,fit,width=width2,zorder=2,color='#a20000',label=legend)
#ax.set_ylim([0,0.5])
#x = [float('0.%d'%i) for i in range(6)]
ax.set_ylim([0.0,0.8])
x = [float('0.%d'%i) for i in range(0,9,2)]
ax.set_yticks(x)
ax.set_yticklabels(x,fontsize=5)
ax.set_xlim([-0.5,3.5])
ax.set_xticks(ind)
if labels: ax.set_xticklabels(labels,fontsize=7)
ax.legend(fontsize=6)
#ax.set_ylabel('Fraction of contacts',fontsize=6)
ax.set_ylabel('Contact fraction',fontsize=7)
#if ylabel: ax.set_ylabel(ylabel,fontsize=6)
#figw,figh = 2.3,3.9
figw,figh = 1.9685,2.8
def run(params,fout=None,source_data=None):
data = np.load(params.data)
#data = data[:,1:]
print(data)
#data /= data.sum(axis=1)[:,None]
avoidance = np.load(params.avoidance_error)
print(data/data.sum(axis=1)[:,None])
VAL = params.value
THRESH = params.thresh
A = Avoidance()
_label = ['$\mathbb{%s}^1$','$\mathbb{%s}^2$','$\mathbb{%s}^3$','$\mathbb{%s}^4$']
alabel = [l%'M' for l in _label]
clabel = [l%'C' for l in _label]
glabel = [l%'G' for l in _label]
ddx = 0
fig,ax = plt.subplots(3,1,figsize=(figw,figh))
if params.fig_title: fig.canvas.set_window_title(params.fig_title)
try:
print('Axon contacts')
aparams = get_avoidance_error(avoidance['aerror'],val=VAL[0],high=THRESH[0])
A.set(aparams[:3])
leg = get_legend(aparams)
print(leg)
print(A.Z)
plot_fit(ax[0],data[ddx,:],A.Z[1:],legend=leg,labels=alabel,ylabel='Fraction of axon contacts')
#ax[0].set_title('Adjacency',fontsize=8)
ax[0].legend(loc='upper left',fontsize=6)
ddx += 1
except:
pass
print('Chemical synapses')
aparams = get_avoidance_error(avoidance['cerror'],val=VAL[1],high=THRESH[1])
A.set(aparams[:3])
leg = get_legend(aparams)
print(leg)
print(A.Z)
plot_fit(ax[1],data[ddx,:],A.Z[1:],legend=leg,
labels=clabel,ylabel='Fraction of chemical syn.')
ax[1].legend(loc='upper left',fontsize=6)
#ax[1].set_title('Chemical syn.',fontsize=8)
ddx += 1
print('Gap junctions')
aparams = get_avoidance_error(avoidance['gerror'],val=VAL[2],high=THRESH[2])
A.set(aparams[:3])
leg = get_legend(aparams)
print(leg)
print(A.Z)
plot_fit(ax[2],data[ddx,:],A.Z[1:],legend=leg,
labels=glabel,ylabel='Fraction of gap junc.')
#ax[2].set_title('Gap J.',fontsize=8)
ax[2].legend(loc='upper left',fontsize=6)
plt.tight_layout(pad=0.2)
if params.fout: plt.savefig(params.fout)
#plt.show()
if __name__=="__main__":
parser = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('data',
action = 'store',
help = 'data file')
parser.add_argument('avoidance_error',
action = 'store',
help = 'Avoidance error file')
parser.add_argument('-o','--output',
action='store',
required=False,
dest='fout',
default=None,
help = 'Output file')
params = parser.parse_args()
run(params)
|
import { connect } from 'react-redux';
import { makeSelectClaimIsMine, selectFetchingMyChannels, selectMyChannelClaims } from 'lbry-redux';
import {
makeSelectTopLevelCommentsForUri,
selectIsFetchingComments,
makeSelectTotalCommentsCountForUri,
selectOthersReactsById,
makeSelectCommentsDisabledForUri,
} from 'redux/selectors/comments';
import { doCommentList, doCommentReactList } from 'redux/actions/comments';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import { selectActiveChannelId } from 'redux/selectors/app';
import CommentsList from './view';
const select = (state, props) => ({
myChannels: selectMyChannelClaims(state),
comments: makeSelectTopLevelCommentsForUri(props.uri)(state),
totalComments: makeSelectTotalCommentsCountForUri(props.uri)(state),
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
isFetchingComments: selectIsFetchingComments(state),
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
commentsDisabledBySettings: makeSelectCommentsDisabledForUri(props.uri)(state),
fetchingChannels: selectFetchingMyChannels(state),
reactionsById: selectOthersReactsById(state),
activeChannelId: selectActiveChannelId(state),
});
const perform = (dispatch) => ({
fetchComments: (uri) => dispatch(doCommentList(uri)),
fetchReacts: (uri) => dispatch(doCommentReactList(uri)),
});
export default connect(select, perform)(CommentsList);
|
!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}function r(e){return e&&e.default||e}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var l=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,l=s(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(l[c]=n[c]);if(o){r=o(n);for(var d=0;d<r.length;d++)a.call(n,r[d])&&(l[r[d]]=n[r[d]])}}return l},u="function"==typeof Symbol&&Symbol.for,c=u?Symbol.for("react.element"):60103,d=u?Symbol.for("react.portal"):60106,p=u?Symbol.for("react.fragment"):60107,f=u?Symbol.for("react.strict_mode"):60108,h=u?Symbol.for("react.profiler"):60114,m=u?Symbol.for("react.provider"):60109,g=u?Symbol.for("react.context"):60110,v=u?Symbol.for("react.forward_ref"):60112,y=u?Symbol.for("react.suspense"):60113,b=u?Symbol.for("react.memo"):60115,x=u?Symbol.for("react.lazy"):60116,w="function"==typeof Symbol&&Symbol.iterator;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k={};function S(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||E}function C(){}function T(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||E}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(_(85));this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=S.prototype;var N=T.prototype=new C;N.constructor=T,l(N,S.prototype),N.isPureReactComponent=!0;var P={current:null},O=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)O.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:c,type:e,key:i,ref:a,props:o,_owner:P.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===c}var D=/\/+/g,I=[];function j(e,t,n,r){if(I.length){var o=I.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function M(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>I.length&&I.push(e)}function q(e,t,n){return null==e?0:function e(t,n,r,o){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var a=!1;if(null===t)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case c:case d:a=!0}}if(a)return r(o,t,""===n?"."+z(t,0):n),1;if(a=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var l=n+z(i=t[s],s);a+=e(i,l,r,o)}else if(null===t||"object"!=typeof t?l=null:l="function"==typeof(l=w&&t[w]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),s=0;!(i=t.next()).done;)a+=e(i=i.value,l=n+z(i,s++),r,o);else if("object"===i)throw r=""+t,Error(_(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return a}(e,"",t,n)}function z(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function U(e,t){e.func.call(e.context,t,e.count++)}function B(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?F(e,r,n,(function(e){return e})):null!=e&&(R(e)&&(e=function(e,t){return{$$typeof:c,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n)),r.push(e))}function F(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(D,"$&/")+"/"),q(e,B,t=j(t,i,r,o)),M(t)}var H={current:null};function V(){var e=H.current;if(null===e)throw Error(_(321));return e}var W={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return F(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;q(e,U,t=j(null,null,t,n)),M(t)},count:function(e){return q(e,(function(){return null}),null)},toArray:function(e){var t=[];return F(e,t,null,(function(e){return e})),t},only:function(e){if(!R(e))throw Error(_(143));return e}},Component:S,Fragment:p,Profiler:h,PureComponent:T,StrictMode:f,Suspense:y,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:H,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:P,IsSomeRendererActing:{current:!1},assign:l},cloneElement:function(e,t,n){if(null==e)throw Error(_(267,e));var r=l({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=P.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)O.call(t,u)&&!L.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){s=Array(u);for(var d=0;d<u;d++)s[d]=arguments[d+2];r.children=s}return{$$typeof:c,type:e.type,key:o,ref:i,props:r,_owner:a}},createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:g,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},createElement:A,createFactory:function(e){var t=A.bind(null,e);return t.type=e,t},createRef:function(){return{current:null}},forwardRef:function(e){return{$$typeof:v,render:e}},isValidElement:R,lazy:function(e){return{$$typeof:x,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:b,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return V().useCallback(e,t)},useContext:function(e,t){return V().useContext(e,t)},useDebugValue:function(){},useEffect:function(e,t){return V().useEffect(e,t)},useImperativeHandle:function(e,t,n){return V().useImperativeHandle(e,t,n)},useLayoutEffect:function(e,t){return V().useLayoutEffect(e,t)},useMemo:function(e,t){return V().useMemo(e,t)},useReducer:function(e,t,n){return V().useReducer(e,t,n)},useRef:function(e){return V().useRef(e)},useState:function(e){return V().useState(e)},version:"16.13.0"},$=n((function(e){e.exports=W})),G=$.isValidElement,K=$.Children,Q=$.cloneElement,X=$.createElement,Y=$.createContext,J=$.Component,Z=$.forwardRef,ee=$.Fragment,te=$.useLayoutEffect,ne=$.useEffect,re=$.useMemo,oe=$.useCallback,ie=$.useContext,ae=$.useImperativeHandle,se=$.useState,le=$.useReducer,ue=$.useRef,ce=$.memo,de=n((function(e,t){var n,r,o,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,l=null,u=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(u,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(u,0))},r=function(e,t){l=setTimeout(e,t)},o=function(){clearTimeout(l)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,f=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var v=!1,y=null,b=-1,x=5,w=0;i=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<e?Math.floor(1e3/e):5};var _=new MessageChannel,E=_.port2;_.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+x;try{y(!0,e)?E.postMessage(null):(v=!1,y=null)}catch(e){throw E.postMessage(null),e}}else v=!1},n=function(e){y=e,v||(v=!0,E.postMessage(null))},r=function(e,n){b=f((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>T(a,n))void 0!==l&&0>T(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var N=[],P=[],O=1,L=null,A=3,R=!1,D=!1,I=!1;function j(e){for(var t=S(P);null!==t;){if(null===t.callback)C(P);else{if(!(t.startTime<=e))break;C(P),t.sortIndex=t.expirationTime,k(N,t)}t=S(P)}}function M(e){if(I=!1,j(e),!D)if(null!==S(N))D=!0,n(q);else{var t=S(P);null!==t&&r(M,t.startTime-e)}}function q(e,n){D=!1,I&&(I=!1,o()),R=!0;var a=A;try{for(j(n),L=S(N);null!==L&&(!(L.expirationTime>n)||e&&!i());){var s=L.callback;if(null!==s){L.callback=null,A=L.priorityLevel;var l=s(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?L.callback=l:L===S(N)&&C(N),j(n)}else C(N);L=S(N)}if(null!==L)var u=!0;else{var c=S(P);null!==c&&r(M,c.startTime-n),u=!1}return u}finally{L=null,A=a,R=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||R||(D=!0,n(q))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return S(N)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?s+l:s,a="number"==typeof a.timeout?a.timeout:z(e)}else a=z(e),l=s;return e={id:O++,callback:i,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>s?(e.sortIndex=l,k(P,e),null===S(N)&&e===S(P)&&(I?o():I=!0,r(M,l-s))):(e.sortIndex=a,k(N,e),D||R||(D=!0,n(q))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();j(e);var n=S(N);return n!==L&&null!==L&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<L.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}})),pe=(de.unstable_now,de.unstable_forceFrameRate,de.unstable_IdlePriority,de.unstable_ImmediatePriority,de.unstable_LowPriority,de.unstable_NormalPriority,de.unstable_Profiling,de.unstable_UserBlockingPriority,de.unstable_cancelCallback,de.unstable_continueExecution,de.unstable_getCurrentPriorityLevel,de.unstable_getFirstCallbackNode,de.unstable_next,de.unstable_pauseExecution,de.unstable_requestPaint,de.unstable_runWithPriority,de.unstable_scheduleCallback,de.unstable_shouldYield,de.unstable_wrapCallback,n((function(e){e.exports=de})));function fe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!$)throw Error(fe(227));function he(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var me=!1,ge=null,ve=!1,ye=null,be={onError:function(e){me=!0,ge=e}};function xe(e,t,n,r,o,i,a,s,l){me=!1,ge=null,he.apply(be,arguments)}var we=null,_e=null,Ee=null;function ke(e,t,n){var r=e.type||"unknown-event";e.currentTarget=Ee(n),function(e,t,n,r,o,i,a,s,l){if(xe.apply(this,arguments),me){if(!me)throw Error(fe(198));var u=ge;me=!1,ge=null,ve||(ve=!0,ye=u)}}(r,t,void 0,e),e.currentTarget=null}var Se=$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Se.hasOwnProperty("ReactCurrentDispatcher")||(Se.ReactCurrentDispatcher={current:null}),Se.hasOwnProperty("ReactCurrentBatchConfig")||(Se.ReactCurrentBatchConfig={suspense:null});var Ce=/^(.*)[\\\/]/,Te="function"==typeof Symbol&&Symbol.for,Ne=Te?Symbol.for("react.element"):60103,Pe=Te?Symbol.for("react.portal"):60106,Oe=Te?Symbol.for("react.fragment"):60107,Le=Te?Symbol.for("react.strict_mode"):60108,Ae=Te?Symbol.for("react.profiler"):60114,Re=Te?Symbol.for("react.provider"):60109,De=Te?Symbol.for("react.context"):60110,Ie=Te?Symbol.for("react.concurrent_mode"):60111,je=Te?Symbol.for("react.forward_ref"):60112,Me=Te?Symbol.for("react.suspense"):60113,qe=Te?Symbol.for("react.suspense_list"):60120,ze=Te?Symbol.for("react.memo"):60115,Ue=Te?Symbol.for("react.lazy"):60116,Be=Te?Symbol.for("react.block"):60121,Fe="function"==typeof Symbol&&Symbol.iterator;function He(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Fe&&e[Fe]||e["@@iterator"])?e:null}function Ve(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Oe:return"Fragment";case Pe:return"Portal";case Ae:return"Profiler";case Le:return"StrictMode";case Me:return"Suspense";case qe:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case De:return"Context.Consumer";case Re:return"Context.Provider";case je:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case ze:return Ve(e.type);case Be:return Ve(e.render);case Ue:if(e=1===e._status?e._result:null)return Ve(e)}return null}function We(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=Ve(e.type);n=null,r&&(n=Ve(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Ce,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}var $e=null,Ge={};function Ke(){if($e)for(var e in Ge){var t=Ge[e],n=$e.indexOf(e);if(!(-1<n))throw Error(fe(96,e));if(!Xe[n]){if(!t.extractEvents)throw Error(fe(97,e));for(var r in Xe[n]=t,n=t.eventTypes){var o=void 0,i=n[r],a=t,s=r;if(Ye.hasOwnProperty(s))throw Error(fe(99,s));Ye[s]=i;var l=i.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&Qe(l[o],a,s);o=!0}else i.registrationName?(Qe(i.registrationName,a,s),o=!0):o=!1;if(!o)throw Error(fe(98,r,e))}}}}function Qe(e,t,n){if(Je[e])throw Error(fe(100,e));Je[e]=t,Ze[e]=t.eventTypes[n].dependencies}var Xe=[],Ye={},Je={},Ze={};function et(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!Ge.hasOwnProperty(t)||Ge[t]!==r){if(Ge[t])throw Error(fe(102,t));Ge[t]=r,n=!0}}n&&Ke()}var tt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),nt=null,rt=null,ot=null;function it(e){if(e=_e(e)){if("function"!=typeof nt)throw Error(fe(280));var t=e.stateNode;t&&(t=we(t),nt(e.stateNode,e.type,t))}}function at(e){rt?ot?ot.push(e):ot=[e]:rt=e}function st(){if(rt){var e=rt,t=ot;if(ot=rt=null,it(e),t)for(e=0;e<t.length;e++)it(t[e])}}function lt(e,t){return e(t)}function ut(e,t,n,r,o){return e(t,n,r,o)}function ct(){}var dt=lt,pt=!1,ft=!1;function ht(){null===rt&&null===ot||(ct(),st())}function mt(e,t,n){if(ft)return e(t,n);ft=!0;try{return dt(e,t,n)}finally{ft=!1,ht()}}var gt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vt=Object.prototype.hasOwnProperty,yt={},bt={};function xt(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){wt[e]=new xt(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];wt[t]=new xt(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){wt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){wt[e]=new xt(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){wt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){wt[e]=new xt(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){wt[e]=new xt(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){wt[e]=new xt(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){wt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1)}));var _t=/[\-:]([a-z])/g;function Et(e){return e[1].toUpperCase()}function kt(e,t,n,r){var o=wt.hasOwnProperty(t)?wt[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!vt.call(bt,e)||!vt.call(yt,e)&&(gt.test(e)?bt[e]=!0:(yt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function St(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Ct(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Tt(e){e._valueTracker||(e._valueTracker=function(e){var t=Ct(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ct(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Pt(e,t){var n=t.checked;return l({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ot(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=St(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Lt(e,t){null!=(t=t.checked)&&kt(e,"checked",t,!1)}function At(e,t){Lt(e,t);var n=St(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Dt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Dt(e,t.type,St(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Rt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Dt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function It(e,t){return e=l({children:void 0},t),(t=function(e){var t="";return $.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function jt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+St(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Mt(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(fe(91));return l({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qt(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(fe(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(fe(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:St(n)}}function zt(e,t){var n=St(t.value),r=St(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ut(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(_t,Et);wt[t]=new xt(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(_t,Et);wt[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(_t,Et);wt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){wt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1)})),wt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){wt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0)}));var Bt="http://www.w3.org/1999/xhtml",Ft="http://www.w3.org/2000/svg";function Ht(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ht(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Wt,$t=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Ft||"innerHTML"in e)e.innerHTML=t;else{for((Wt=Wt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Kt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qt={animationend:Kt("Animation","AnimationEnd"),animationiteration:Kt("Animation","AnimationIteration"),animationstart:Kt("Animation","AnimationStart"),transitionend:Kt("Transition","TransitionEnd")},Xt={},Yt={};function Jt(e){if(Xt[e])return Xt[e];if(!Qt[e])return e;var t,n=Qt[e];for(t in n)if(n.hasOwnProperty(t)&&t in Yt)return Xt[e]=n[t];return e}tt&&(Yt=document.createElement("div").style,"AnimationEvent"in window||(delete Qt.animationend.animation,delete Qt.animationiteration.animation,delete Qt.animationstart.animation),"TransitionEvent"in window||delete Qt.transitionend.transition);var Zt=Jt("animationend"),en=Jt("animationiteration"),tn=Jt("animationstart"),nn=Jt("transitionend"),rn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),on=new("function"==typeof WeakMap?WeakMap:Map);function an(e){var t=on.get(e);return void 0===t&&(t=new Map,on.set(e,t)),t}function sn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ln(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function un(e){if(sn(e)!==e)throw Error(fe(188))}function cn(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=sn(e)))throw Error(fe(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return un(o),e;if(i===r)return un(o),t;i=i.sibling}throw Error(fe(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(fe(189))}}if(n.alternate!==r)throw Error(fe(190))}if(3!==n.tag)throw Error(fe(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function dn(e,t){if(null==t)throw Error(fe(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function pn(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var fn=null;function hn(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)ke(e,t[r],n[r]);else t&&ke(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function mn(e){if(null!==e&&(fn=dn(fn,e)),e=fn,fn=null,e){if(pn(e,hn),fn)throw Error(fe(95));if(ve)throw e=ye,ve=!1,ye=null,e}}function gn(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function vn(e){if(!tt)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var yn=[];function bn(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>yn.length&&yn.push(e)}function xn(e,t,n,r){if(yn.length){var o=yn.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function wn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Dr(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=gn(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,l=0;l<Xe.length;l++){var u=Xe[l];u&&(u=u.extractEvents(r,t,i,o,a))&&(s=dn(s,u))}mn(s)}}function _n(e,t,n){if(!n.has(e)){switch(e){case"scroll":nr(t,"scroll",!0);break;case"focus":case"blur":nr(t,"focus",!0),nr(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":vn(e)&&nr(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===rn.indexOf(e)&&tr(e,t)}n.set(e,null)}}var En,kn,Sn,Cn=!1,Tn=[],Nn=null,Pn=null,On=null,Ln=new Map,An=new Map,Rn=[],Dn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),In="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function jn(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Mn(e,t){switch(e){case"focus":case"blur":Nn=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":On=null;break;case"pointerover":case"pointerout":Ln.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":An.delete(t.pointerId)}}function qn(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=jn(t,n,r,o,i),null!==t&&(null!==(t=Ir(t))&&kn(t)),e):(e.eventSystemFlags|=r,e)}function zn(e){var t=Dr(e.target);if(null!==t){var n=sn(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ln(n)))return e.blockedOn=t,void pe.unstable_runWithPriority(e.priority,(function(){Sn(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Un(e){if(null!==e.blockedOn)return!1;var t=ar(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Ir(t);return null!==n&&kn(n),e.blockedOn=t,!1}return!0}function Bn(e,t,n){Un(e)&&n.delete(t)}function Fn(){for(Cn=!1;0<Tn.length;){var e=Tn[0];if(null!==e.blockedOn){null!==(e=Ir(e.blockedOn))&&En(e);break}var t=ar(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:Tn.shift()}null!==Nn&&Un(Nn)&&(Nn=null),null!==Pn&&Un(Pn)&&(Pn=null),null!==On&&Un(On)&&(On=null),Ln.forEach(Bn),An.forEach(Bn)}function Hn(e,t){e.blockedOn===t&&(e.blockedOn=null,Cn||(Cn=!0,pe.unstable_scheduleCallback(pe.unstable_NormalPriority,Fn)))}function Vn(e){function t(t){return Hn(t,e)}if(0<Tn.length){Hn(Tn[0],e);for(var n=1;n<Tn.length;n++){var r=Tn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Nn&&Hn(Nn,e),null!==Pn&&Hn(Pn,e),null!==On&&Hn(On,e),Ln.forEach(t),An.forEach(t),n=0;n<Rn.length;n++)(r=Rn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rn.length&&null===(n=Rn[0]).blockedOn;)zn(n),null===n.blockedOn&&Rn.shift()}var Wn={},$n=new Map,Gn=new Map,Kn=["abort","abort",Zt,"animationEnd",en,"animationIteration",tn,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",nn,"transitionEnd","waiting","waiting"];function Qn(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Gn.set(r,t),$n.set(r,i),Wn[o]=i}}Qn("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Qn("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Qn(Kn,2);for(var Xn="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Yn=0;Yn<Xn.length;Yn++)Gn.set(Xn[Yn],0);var Jn=pe.unstable_UserBlockingPriority,Zn=pe.unstable_runWithPriority,er=!0;function tr(e,t){nr(t,e,!1)}function nr(e,t,n){var r=Gn.get(t);switch(void 0===r?2:r){case 0:r=rr.bind(null,t,1,e);break;case 1:r=or.bind(null,t,1,e);break;default:r=ir.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function rr(e,t,n,r){pt||ct();var o=ir,i=pt;pt=!0;try{ut(o,e,t,n,r)}finally{(pt=i)||ht()}}function or(e,t,n,r){Zn(Jn,ir.bind(null,e,t,n,r))}function ir(e,t,n,r){if(er)if(0<Tn.length&&-1<Dn.indexOf(e))e=jn(null,e,t,n,r),Tn.push(e);else{var o=ar(e,t,n,r);if(null===o)Mn(e,r);else if(-1<Dn.indexOf(e))e=jn(o,e,t,n,r),Tn.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return Nn=qn(Nn,e,t,n,r,o),!0;case"dragenter":return Pn=qn(Pn,e,t,n,r,o),!0;case"mouseover":return On=qn(On,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ln.set(i,qn(Ln.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,An.set(i,qn(An.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Mn(e,r),e=xn(e,r,null,t);try{mt(wn,e)}finally{bn(e)}}}}function ar(e,t,n,r){if(null!==(n=Dr(n=gn(r)))){var o=sn(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=ln(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=xn(e,r,n,t);try{mt(wn,e)}finally{bn(e)}return null}var sr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lr=["Webkit","ms","Moz","O"];function ur(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||sr.hasOwnProperty(e)&&sr[e]?(""+t).trim():t+"px"}function cr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ur(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(sr).forEach((function(e){lr.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sr[t]=sr[e]}))}));var dr=l({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pr(e,t){if(t){if(dr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(fe(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(fe(60));if(!("object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw Error(fe(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(fe(62,""))}}function fr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hr=Bt;function mr(e,t){var n=an(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=Ze[t];for(var r=0;r<t.length;r++)_n(t[r],e,n)}function gr(){}function vr(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function yr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function br(e,t){var n,r=yr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=yr(r)}}function xr(){for(var e=window,t=vr();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=vr((e=t.contentWindow).document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var _r=null,Er=null;function kr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Sr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Cr="function"==typeof setTimeout?setTimeout:void 0,Tr="function"==typeof clearTimeout?clearTimeout:void 0;function Nr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Pr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Or=Math.random().toString(36).slice(2),Lr="__reactInternalInstance$"+Or,Ar="__reactEventHandlers$"+Or,Rr="__reactContainere$"+Or;function Dr(e){var t=e[Lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Rr]||n[Lr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Pr(e);null!==e;){if(n=e[Lr])return n;e=Pr(e)}return t}n=(e=n).parentNode}return null}function Ir(e){return!(e=e[Lr]||e[Rr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function jr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(fe(33))}function Mr(e){return e[Ar]||null}function qr(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function zr(e,t){var n=e.stateNode;if(!n)return null;var r=we(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(fe(231,t,typeof n));return n}function Ur(e,t,n){(t=zr(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=dn(n._dispatchListeners,t),n._dispatchInstances=dn(n._dispatchInstances,e))}function Br(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=qr(t);for(t=n.length;0<t--;)Ur(n[t],"captured",e);for(t=0;t<n.length;t++)Ur(n[t],"bubbled",e)}}function Fr(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=zr(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=dn(n._dispatchListeners,t),n._dispatchInstances=dn(n._dispatchInstances,e))}function Hr(e){e&&e.dispatchConfig.registrationName&&Fr(e._targetInst,null,e)}function Vr(e){pn(e,Br)}var Wr=null,$r=null,Gr=null;function Kr(){if(Gr)return Gr;var e,t,n=$r,r=n.length,o="value"in Wr?Wr.value:Wr.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Gr=o.slice(e,1<t?1-t:void 0)}function Qr(){return!0}function Xr(){return!1}function Yr(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Qr:Xr,this.isPropagationStopped=Xr,this}function Jr(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Zr(e){if(!(e instanceof this))throw Error(fe(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function eo(e){e.eventPool=[],e.getPooled=Jr,e.release=Zr}l(Yr.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Qr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Qr)},persist:function(){this.isPersistent=Qr},isPersistent:Xr,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Xr,this._dispatchInstances=this._dispatchListeners=null}}),Yr.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Yr.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return l(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,eo(n),n},eo(Yr);var to=Yr.extend({data:null}),no=Yr.extend({data:null}),ro=[9,13,27,32],oo=tt&&"CompositionEvent"in window,io=null;tt&&"documentMode"in document&&(io=document.documentMode);var ao=tt&&"TextEvent"in window&&!io,so=tt&&(!oo||io&&8<io&&11>=io),lo=String.fromCharCode(32),uo={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},co=!1;function po(e,t){switch(e){case"keyup":return-1!==ro.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function fo(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ho=!1;var mo={eventTypes:uo,extractEvents:function(e,t,n,r){var o;if(oo)e:{switch(e){case"compositionstart":var i=uo.compositionStart;break e;case"compositionend":i=uo.compositionEnd;break e;case"compositionupdate":i=uo.compositionUpdate;break e}i=void 0}else ho?po(e,n)&&(i=uo.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=uo.compositionStart);return i?(so&&"ko"!==n.locale&&(ho||i!==uo.compositionStart?i===uo.compositionEnd&&ho&&(o=Kr()):($r="value"in(Wr=r)?Wr.value:Wr.textContent,ho=!0)),i=to.getPooled(i,t,n,r),o?i.data=o:null!==(o=fo(n))&&(i.data=o),Vr(i),o=i):o=null,(e=ao?function(e,t){switch(e){case"compositionend":return fo(t);case"keypress":return 32!==t.which?null:(co=!0,lo);case"textInput":return(e=t.data)===lo&&co?null:e;default:return null}}(e,n):function(e,t){if(ho)return"compositionend"===e||!oo&&po(e,t)?(e=Kr(),Gr=$r=Wr=null,ho=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return so&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=no.getPooled(uo.beforeInput,t,n,r)).data=e,Vr(t)):t=null,null===o?t:null===t?o:[o,t]}},go={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!go[e.type]:"textarea"===t}var yo={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function bo(e,t,n){return(e=Yr.getPooled(yo.change,e,t,n)).type="change",at(n),Vr(e),e}var xo=null,wo=null;function _o(e){mn(e)}function Eo(e){if(Nt(jr(e)))return e}function ko(e,t){if("change"===e)return t}var So=!1;function Co(){xo&&(xo.detachEvent("onpropertychange",To),wo=xo=null)}function To(e){if("value"===e.propertyName&&Eo(wo))if(e=bo(wo,e,gn(e)),pt)mn(e);else{pt=!0;try{lt(_o,e)}finally{pt=!1,ht()}}}function No(e,t,n){"focus"===e?(Co(),wo=n,(xo=t).attachEvent("onpropertychange",To)):"blur"===e&&Co()}function Po(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Eo(wo)}function Oo(e,t){if("click"===e)return Eo(t)}function Lo(e,t){if("input"===e||"change"===e)return Eo(t)}tt&&(So=vn("input")&&(!document.documentMode||9<document.documentMode));var Ao={eventTypes:yo,_isInputEventSupported:So,extractEvents:function(e,t,n,r){var o=t?jr(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=ko;else if(vo(o))if(So)a=Lo;else{a=Po;var s=No}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Oo);if(a&&(a=a(e,t)))return bo(a,n,r);s&&s(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Dt(o,"number",o.value)}},Ro=Yr.extend({view:null,detail:null}),Do={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Io(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Do[e])&&!!t[e]}function jo(){return Io}var Mo=0,qo=0,zo=!1,Uo=!1,Bo=Ro.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:jo,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Mo;return Mo=e.screenX,zo?"mousemove"===e.type?e.screenX-t:0:(zo=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=qo;return qo=e.screenY,Uo?"mousemove"===e.type?e.screenY-t:0:(Uo=!0,0)}}),Fo=Bo.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Ho={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Vo={eventTypes:Ho,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Dr(t):null)&&(t!==sn(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Bo,l=Ho.mouseLeave,u=Ho.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Fo,l=Ho.pointerLeave,u=Ho.pointerEnter,c="pointer");if(e=null==a?i:jr(a),i=null==t?i:jr(t),(l=s.getPooled(l,a,n,r)).type=c+"leave",l.target=e,l.relatedTarget=i,(n=s.getPooled(u,t,n,r)).type=c+"enter",n.target=i,n.relatedTarget=e,c=t,(r=a)&&c)e:{for(u=c,a=0,e=s=r;e;e=qr(e))a++;for(e=0,t=u;t;t=qr(t))e++;for(;0<a-e;)s=qr(s),a--;for(;0<e-a;)u=qr(u),e--;for(;a--;){if(s===u||s===u.alternate)break e;s=qr(s),u=qr(u)}s=null}else s=null;for(u=s,s=[];r&&r!==u&&(null===(a=r.alternate)||a!==u);)s.push(r),r=qr(r);for(r=[];c&&c!==u&&(null===(a=c.alternate)||a!==u);)r.push(c),c=qr(c);for(c=0;c<s.length;c++)Fr(s[c],"bubbled",l);for(c=r.length;0<c--;)Fr(r[c],"captured",n);return 0==(64&o)?[l]:[l,n]}};var Wo="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},$o=Object.prototype.hasOwnProperty;function Go(e,t){if(Wo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!$o.call(t,n[r])||!Wo(e[n[r]],t[n[r]]))return!1;return!0}var Ko=tt&&"documentMode"in document&&11>=document.documentMode,Qo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Xo=null,Yo=null,Jo=null,Zo=!1;function ei(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Zo||null==Xo||Xo!==vr(n)?null:("selectionStart"in(n=Xo)&&wr(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Jo&&Go(Jo,n)?null:(Jo=n,(e=Yr.getPooled(Qo.select,Yo,e,t)).type="select",e.target=Xo,Vr(e),e))}var ti={eventTypes:Qo,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=an(o),i=Ze.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?jr(t):window,e){case"focus":(vo(o)||"true"===o.contentEditable)&&(Xo=o,Yo=t,Jo=null);break;case"blur":Jo=Yo=Xo=null;break;case"mousedown":Zo=!0;break;case"contextmenu":case"mouseup":case"dragend":return Zo=!1,ei(n,r);case"selectionchange":if(Ko)break;case"keydown":case"keyup":return ei(n,r)}return null}},ni=Yr.extend({animationName:null,elapsedTime:null,pseudoElement:null}),ri=Yr.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),oi=Ro.extend({relatedTarget:null});function ii(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var ai={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},si={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},li=Ro.extend({key:function(e){if(e.key){var t=ai[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ii(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?si[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:jo,charCode:function(e){return"keypress"===e.type?ii(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ii(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ui=Bo.extend({dataTransfer:null}),ci=Ro.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:jo}),di=Yr.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),pi=Bo.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),fi={eventTypes:Wn,extractEvents:function(e,t,n,r){var o=$n.get(e);if(!o)return null;switch(e){case"keypress":if(0===ii(n))return null;case"keydown":case"keyup":e=li;break;case"blur":case"focus":e=oi;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Bo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ui;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ci;break;case Zt:case en:case tn:e=ni;break;case nn:e=di;break;case"scroll":e=Ro;break;case"wheel":e=pi;break;case"copy":case"cut":case"paste":e=ri;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Fo;break;default:e=Yr}return Vr(t=e.getPooled(o,t,n,r)),t}};if($e)throw Error(fe(101));$e=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Ke(),we=Mr,_e=Ir,Ee=jr,et({SimpleEventPlugin:fi,EnterLeaveEventPlugin:Vo,ChangeEventPlugin:Ao,SelectEventPlugin:ti,BeforeInputEventPlugin:mo});var hi=[],mi=-1;function gi(e){0>mi||(e.current=hi[mi],hi[mi]=null,mi--)}function vi(e,t){mi++,hi[mi]=e.current,e.current=t}var yi={},bi={current:yi},xi={current:!1},wi=yi;function _i(e,t){var n=e.type.contextTypes;if(!n)return yi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ei(e){return null!=(e=e.childContextTypes)}function ki(){gi(xi),gi(bi)}function Si(e,t,n){if(bi.current!==yi)throw Error(fe(168));vi(bi,t),vi(xi,n)}function Ci(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(fe(108,Ve(t)||"Unknown",o));return l({},n,{},r)}function Ti(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yi,wi=bi.current,vi(bi,e),vi(xi,xi.current),!0}function Ni(e,t,n){var r=e.stateNode;if(!r)throw Error(fe(169));n?(e=Ci(e,t,wi),r.__reactInternalMemoizedMergedChildContext=e,gi(xi),gi(bi),vi(bi,e)):gi(xi),vi(xi,n)}var Pi=pe.unstable_runWithPriority,Oi=pe.unstable_scheduleCallback,Li=pe.unstable_cancelCallback,Ai=pe.unstable_requestPaint,Ri=pe.unstable_now,Di=pe.unstable_getCurrentPriorityLevel,Ii=pe.unstable_ImmediatePriority,ji=pe.unstable_UserBlockingPriority,Mi=pe.unstable_NormalPriority,qi=pe.unstable_LowPriority,zi=pe.unstable_IdlePriority,Ui={},Bi=pe.unstable_shouldYield,Fi=void 0!==Ai?Ai:function(){},Hi=null,Vi=null,Wi=!1,$i=Ri(),Gi=1e4>$i?Ri:function(){return Ri()-$i};function Ki(){switch(Di()){case Ii:return 99;case ji:return 98;case Mi:return 97;case qi:return 96;case zi:return 95;default:throw Error(fe(332))}}function Qi(e){switch(e){case 99:return Ii;case 98:return ji;case 97:return Mi;case 96:return qi;case 95:return zi;default:throw Error(fe(332))}}function Xi(e,t){return e=Qi(e),Pi(e,t)}function Yi(e,t,n){return e=Qi(e),Oi(e,t,n)}function Ji(e){return null===Hi?(Hi=[e],Vi=Oi(Ii,ea)):Hi.push(e),Ui}function Zi(){if(null!==Vi){var e=Vi;Vi=null,Li(e)}ea()}function ea(){if(!Wi&&null!==Hi){Wi=!0;var e=0;try{var t=Hi;Xi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Hi=null}catch(t){throw null!==Hi&&(Hi=Hi.slice(e+1)),Oi(Ii,Zi),t}finally{Wi=!1}}}function ta(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function na(e,t){if(e&&e.defaultProps)for(var n in t=l({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var ra={current:null},oa=null,ia=null,aa=null;function sa(){aa=ia=oa=null}function la(e){var t=ra.current;gi(ra),e.type._context._currentValue=t}function ua(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ca(e,t){oa=e,aa=ia=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Ms=!0),e.firstContext=null)}function da(e,t){if(aa!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(aa=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ia){if(null===oa)throw Error(fe(308));ia=t,oa.dependencies={expirationTime:0,firstContext:t,responders:null}}else ia=ia.next=t;return e._currentValue}var pa=!1;function fa(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function ma(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function ga(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function va(e,t){var n=e.alternate;null!==n&&ha(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function ya(e,t,n,r){var o=e.updateQueue;pa=!1;var i=o.baseQueue,a=o.shared.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}i=a,o.shared.pending=null,null!==(s=e.alternate)&&(null!==(s=s.updateQueue)&&(s.baseQueue=a))}if(null!==i){s=i.next;var u=o.baseState,c=0,d=null,p=null,f=null;if(null!==s)for(var h=s;;){if((a=h.expirationTime)<r){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===f?(p=f=m,d=u):f=f.next=m,a>c&&(c=a)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),pu(a,h.suspenseConfig);e:{var g=e,v=h;switch(a=t,m=n,v.tag){case 1:if("function"==typeof(g=v.payload)){u=g.call(m,u,a);break e}u=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(a="function"==typeof(g=v.payload)?g.call(m,u,a):g))break e;u=l({},u,a);break e;case 2:pa=!0}}null!==h.callback&&(e.effectTag|=32,null===(a=o.effects)?o.effects=[h]:a.push(h))}if(null===(h=h.next)||h===s){if(null===(a=o.shared.pending))break;h=i.next=a.next,a.next=s,o.baseQueue=i=a,o.shared.pending=null}}null===f?d=u:f.next=p,o.baseState=d,o.baseQueue=f,fu(c),e.expirationTime=c,e.memoizedState=u}}function ba(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(fe(191,r));r.call(o)}}}var xa=Se.ReactCurrentBatchConfig,wa=(new $.Component).refs;function _a(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:l({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var Ea={isMounted:function(e){return!!(e=e._reactInternalFiber)&&sn(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Zl(),o=xa.suspense;(o=ma(r=eu(r,e,o),o)).payload=t,null!=n&&(o.callback=n),ga(e,o),tu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Zl(),o=xa.suspense;(o=ma(r=eu(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),ga(e,o),tu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Zl(),r=xa.suspense;(r=ma(n=eu(n,e,r),r)).tag=2,null!=t&&(r.callback=t),ga(e,r),tu(e,n)}};function ka(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Go(n,r)||!Go(o,i))}function Sa(e,t,n){var r=!1,o=yi,i=t.contextType;return"object"==typeof i&&null!==i?i=da(i):(o=Ei(t)?wi:bi.current,i=(r=null!=(r=t.contextTypes))?_i(e,o):yi),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ea,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ca(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ea.enqueueReplaceState(t,t.state,null)}function Ta(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=wa,fa(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=da(i):(i=Ei(t)?wi:bi.current,o.context=_i(e,i)),ya(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(_a(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ea.enqueueReplaceState(o,o.state,null),ya(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var Na=Array.isArray;function Pa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(fe(309));var r=n.stateNode}if(!r)throw Error(fe(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===wa&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(fe(284));if(!n._owner)throw Error(fe(290,e))}return e}function Oa(e,t){if("textarea"!==e.type)throw Error(fe(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function La(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ru(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function a(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=ju(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Pa(e,t,n),r.return=e,r):((r=Du(n.type,n.key,n.props,null,e.mode,r)).ref=Pa(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Mu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,i){return null===t||7!==t.tag?((t=Iu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=ju(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ne:return(n=Du(t.type,t.key,t.props,null,e.mode,n)).ref=Pa(e,null,t),n.return=e,n;case Pe:return(t=Mu(t,e.mode,n)).return=e,t}if(Na(t)||He(t))return(t=Iu(t,e.mode,n,null)).return=e,t;Oa(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ne:return n.key===o?n.type===Oe?c(e,t,n.props.children,r,o):l(e,t,n,r):null;case Pe:return n.key===o?u(e,t,n,r):null}if(Na(n)||He(n))return null!==o?null:c(e,t,n,r,null);Oa(e,n)}return null}function f(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ne:return e=e.get(null===r.key?n:r.key)||null,r.type===Oe?c(t,e,r.props.children,o,r.key):l(t,e,r,o);case Pe:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Na(r)||He(r))return c(t,e=e.get(n)||null,r,o,null);Oa(t,r)}return null}function h(o,a,s,l){for(var u=null,c=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=p(o,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(o,h),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(o,h),u;if(null===h){for(;m<s.length;m++)null!==(h=d(o,s[m],l))&&(a=i(h,a,m),null===c?u=h:c.sibling=h,c=h);return u}for(h=r(o,h);m<s.length;m++)null!==(g=f(h,o,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=i(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(o,e)})),u}function m(o,a,s,l){var u=He(s);if("function"!=typeof u)throw Error(fe(150));if(null==(s=u.call(s)))throw Error(fe(151));for(var c=u=null,h=a,m=a=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=p(o,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),a=i(y,a,m),null===c?u=y:c.sibling=y,c=y,h=g}if(v.done)return n(o,h),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(o,v.value,l))&&(a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return u}for(h=r(o,h);!v.done;m++,v=s.next())null!==(v=f(h,o,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&h.forEach((function(e){return t(o,e)})),u}return function(e,r,i,s){var l="object"==typeof i&&null!==i&&i.type===Oe&&null===i.key;l&&(i=i.props.children);var u="object"==typeof i&&null!==i;if(u)switch(i.$$typeof){case Ne:e:{for(u=i.key,l=r;null!==l;){if(l.key===u){switch(l.tag){case 7:if(i.type===Oe){n(e,l.sibling),(r=o(l,i.props.children)).return=e,e=r;break e}break;default:if(l.elementType===i.type){n(e,l.sibling),(r=o(l,i.props)).ref=Pa(e,l,i),r.return=e,e=r;break e}}n(e,l);break}t(e,l),l=l.sibling}i.type===Oe?((r=Iu(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=Du(i.type,i.key,i.props,null,e.mode,s)).ref=Pa(e,r,i),s.return=e,e=s)}return a(e);case Pe:e:{for(l=i.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Mu(i,e.mode,s)).return=e,e=r}return a(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=ju(i,e.mode,s)).return=e,e=r),a(e);if(Na(i))return h(e,r,i,s);if(He(i))return m(e,r,i,s);if(u&&Oa(e,i),void 0===i&&!l)switch(e.tag){case 1:case 0:throw e=e.type,Error(fe(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Aa=La(!0),Ra=La(!1),Da={},Ia={current:Da},ja={current:Da},Ma={current:Da};function qa(e){if(e===Da)throw Error(fe(174));return e}function za(e,t){switch(vi(Ma,t),vi(ja,e),vi(Ia,Da),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vt(null,"");break;default:t=Vt(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}gi(Ia),vi(Ia,t)}function Ua(){gi(Ia),gi(ja),gi(Ma)}function Ba(e){qa(Ma.current);var t=qa(Ia.current),n=Vt(t,e.type);t!==n&&(vi(ja,e),vi(Ia,n))}function Fa(e){ja.current===e&&(gi(Ia),gi(ja))}var Ha={current:0};function Va(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Wa(e,t){return{responder:e,props:t}}var $a=Se.ReactCurrentDispatcher,Ga=Se.ReactCurrentBatchConfig,Ka=0,Qa=null,Xa=null,Ya=null,Ja=!1;function Za(){throw Error(fe(321))}function es(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wo(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,o,i){if(Ka=i,Qa=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,$a.current=null===e||null===e.memoizedState?ks:Ss,e=n(r,o),t.expirationTime===Ka){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(fe(301));i+=1,Ya=Xa=null,t.updateQueue=null,$a.current=Cs,e=n(r,o)}while(t.expirationTime===Ka)}if($a.current=Es,t=null!==Xa&&null!==Xa.next,Ka=0,Ya=Xa=Qa=null,Ja=!1,t)throw Error(fe(300));return e}function ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ya?Qa.memoizedState=Ya=e:Ya=Ya.next=e,Ya}function rs(){if(null===Xa){var e=Qa.alternate;e=null!==e?e.memoizedState:null}else e=Xa.next;var t=null===Ya?Qa.memoizedState:Ya.next;if(null!==t)Ya=t,Xa=e;else{if(null===e)throw Error(fe(310));e={memoizedState:(Xa=e).memoizedState,baseState:Xa.baseState,baseQueue:Xa.baseQueue,queue:Xa.queue,next:null},null===Ya?Qa.memoizedState=Ya=e:Ya=Ya.next=e}return Ya}function os(e,t){return"function"==typeof t?t(e):t}function is(e){var t=rs(),n=t.queue;if(null===n)throw Error(fe(311));n.lastRenderedReducer=e;var r=Xa,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var s=a=i=null,l=o;do{var u=l.expirationTime;if(u<Ka){var c={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===s?(a=s=c,i=r):s=s.next=c,u>Qa.expirationTime&&(Qa.expirationTime=u,fu(u))}else null!==s&&(s=s.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),pu(u,l.suspenseConfig),r=l.eagerReducer===e?l.eagerState:e(r,l.action);l=l.next}while(null!==l&&l!==o);null===s?i=r:s.next=a,Wo(r,t.memoizedState)||(Ms=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function as(e){var t=rs(),n=t.queue;if(null===n)throw Error(fe(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{i=e(i,a.action),a=a.next}while(a!==o);Wo(i,t.memoizedState)||(Ms=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ss(e){var t=ns();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:os,lastRenderedState:e}).dispatch=_s.bind(null,Qa,e),[t.memoizedState,e]}function ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qa.updateQueue)?(t={lastEffect:null},Qa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return rs().memoizedState}function cs(e,t,n,r){var o=ns();Qa.effectTag|=e,o.memoizedState=ls(1|t,n,void 0,void 0===r?null:r)}function ds(e,t,n,r){var o=rs();r=void 0===r?null:r;var i=void 0;if(null!==Xa){var a=Xa.memoizedState;if(i=a.destroy,null!==r&&es(r,a.deps))return void ls(t,n,i,r)}Qa.effectTag|=e,o.memoizedState=ls(1|t,n,i,r)}function ps(e,t){return cs(516,4,e,t)}function fs(e,t){return ds(516,4,e,t)}function hs(e,t){return ds(4,2,e,t)}function ms(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function gs(e,t,n){return n=null!=n?n.concat([e]):null,ds(4,2,ms.bind(null,t,e),n)}function vs(){}function ys(e,t){return ns().memoizedState=[e,void 0===t?null:t],e}function bs(e,t){var n=rs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=rs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&es(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ws(e,t,n){var r=Ki();Xi(98>r?98:r,(function(){e(!0)})),Xi(97<r?97:r,(function(){var r=Ga.suspense;Ga.suspense=void 0===t?null:t;try{e(!1),n()}finally{Ga.suspense=r}}))}function _s(e,t,n){var r=Zl(),o=xa.suspense;o={expirationTime:r=eu(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Qa||null!==i&&i===Qa)Ja=!0,o.expirationTime=Ka,Qa.expirationTime=Ka;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.eagerReducer=i,o.eagerState=s,Wo(s,a))return}catch(e){}tu(e,r)}}var Es={readContext:da,useCallback:Za,useContext:Za,useEffect:Za,useImperativeHandle:Za,useLayoutEffect:Za,useMemo:Za,useReducer:Za,useRef:Za,useState:Za,useDebugValue:Za,useResponder:Za,useDeferredValue:Za,useTransition:Za},ks={readContext:da,useCallback:ys,useContext:da,useEffect:ps,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,cs(4,2,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4,2,e,t)},useMemo:function(e,t){var n=ns();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ns();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=_s.bind(null,Qa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ns().memoizedState=e},useState:ss,useDebugValue:vs,useResponder:Wa,useDeferredValue:function(e,t){var n=ss(e),r=n[0],o=n[1];return ps((function(){var n=Ga.suspense;Ga.suspense=void 0===t?null:t;try{o(e)}finally{Ga.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ss(!1),n=t[0];return t=t[1],[ys(ws.bind(null,t,e),[t,e]),n]}},Ss={readContext:da,useCallback:bs,useContext:da,useEffect:fs,useImperativeHandle:gs,useLayoutEffect:hs,useMemo:xs,useReducer:is,useRef:us,useState:function(){return is(os)},useDebugValue:vs,useResponder:Wa,useDeferredValue:function(e,t){var n=is(os),r=n[0],o=n[1];return fs((function(){var n=Ga.suspense;Ga.suspense=void 0===t?null:t;try{o(e)}finally{Ga.suspense=n}}),[e,t]),r},useTransition:function(e){var t=is(os),n=t[0];return t=t[1],[bs(ws.bind(null,t,e),[t,e]),n]}},Cs={readContext:da,useCallback:bs,useContext:da,useEffect:fs,useImperativeHandle:gs,useLayoutEffect:hs,useMemo:xs,useReducer:as,useRef:us,useState:function(){return as(os)},useDebugValue:vs,useResponder:Wa,useDeferredValue:function(e,t){var n=as(os),r=n[0],o=n[1];return fs((function(){var n=Ga.suspense;Ga.suspense=void 0===t?null:t;try{o(e)}finally{Ga.suspense=n}}),[e,t]),r},useTransition:function(e){var t=as(os),n=t[0];return t=t[1],[bs(ws.bind(null,t,e),[t,e]),n]}},Ts=null,Ns=null,Ps=!1;function Os(e,t){var n=Lu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ls(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function As(e){if(Ps){var t=Ns;if(t){var n=t;if(!Ls(e,t)){if(!(t=Nr(n.nextSibling))||!Ls(e,t))return e.effectTag=-1025&e.effectTag|2,Ps=!1,void(Ts=e);Os(Ts,n)}Ts=e,Ns=Nr(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ps=!1,Ts=e}}function Rs(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ts=e}function Ds(e){if(e!==Ts)return!1;if(!Ps)return Rs(e),Ps=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Sr(t,e.memoizedProps))for(t=Ns;t;)Os(e,t),t=Nr(t.nextSibling);if(Rs(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(fe(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ns=Nr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ns=null}}else Ns=Ts?Nr(e.stateNode.nextSibling):null;return!0}function Is(){Ns=Ts=null,Ps=!1}var js=Se.ReactCurrentOwner,Ms=!1;function qs(e,t,n,r){t.child=null===e?Ra(t,null,n,r):Aa(t,e.child,n,r)}function zs(e,t,n,r,o){n=n.render;var i=t.ref;return ca(t,o),r=ts(e,t,n,r,i,o),null===e||Ms?(t.effectTag|=1,qs(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),tl(e,t,o))}function Us(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Au(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Du(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Bs(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Go)(o,r)&&e.ref===t.ref)?tl(e,t,i):(t.effectTag|=1,(e=Ru(a,r)).ref=t.ref,e.return=t,t.child=e)}function Bs(e,t,n,r,o,i){return null!==e&&Go(e.memoizedProps,r)&&e.ref===t.ref&&(Ms=!1,o<i)?(t.expirationTime=e.expirationTime,tl(e,t,i)):Hs(e,t,n,r,i)}function Fs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Hs(e,t,n,r,o){var i=Ei(n)?wi:bi.current;return i=_i(t,i),ca(t,o),n=ts(e,t,n,r,i,o),null===e||Ms?(t.effectTag|=1,qs(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),tl(e,t,o))}function Vs(e,t,n,r,o){if(Ei(n)){var i=!0;Ti(t)}else i=!1;if(ca(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Sa(t,n,r),Ta(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=da(u):u=_i(t,u=Ei(n)?wi:bi.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&Ca(t,a,r,u),pa=!1;var p=t.memoizedState;a.state=p,ya(t,r,a,o),l=t.memoizedState,s!==r||p!==l||xi.current||pa?("function"==typeof c&&(_a(t,n,c,r),l=t.memoizedState),(s=pa||ka(t,n,s,r,p,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ha(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:na(t.type,s),l=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=da(u):u=_i(t,u=Ei(n)?wi:bi.current),(d="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&Ca(t,a,r,u),pa=!1,l=t.memoizedState,a.state=l,ya(t,r,a,o),p=t.memoizedState,s!==r||l!==p||xi.current||pa?("function"==typeof c&&(_a(t,n,c,r),p=t.memoizedState),(c=pa||ka(t,n,s,r,l,p,u))?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return Ws(e,t,n,r,i,o)}function Ws(e,t,n,r,o,i){Fs(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&Ni(t,n,!1),tl(e,t,i);r=t.stateNode,js.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,s,i)):qs(e,t,s,i),t.memoizedState=r.state,o&&Ni(t,n,!0),t.child}function $s(e){var t=e.stateNode;t.pendingContext?Si(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Si(0,t.context,!1),za(e,t.containerInfo)}var Gs,Ks,Qs,Xs={dehydrated:null,retryTime:0};function Ys(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Ha.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),vi(Ha,1&a),null===e){if(void 0!==i.fallback&&As(t),s){if(s=i.fallback,(i=Iu(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Iu(s,o,n,null)).return=t,i.sibling=n,t.memoizedState=Xs,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Ra(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,s){if(i=i.fallback,(n=Ru(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(o=Ru(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Xs,t.child=n,o}return n=Aa(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Iu(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Iu(s,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Xs,t.child=i,n}return t.memoizedState=null,t.child=Aa(t,e,i.children,n)}function Js(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ua(e.return,t)}function Zs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function el(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(qs(e,t,r.children,n),0!=(2&(r=Ha.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Js(e,n);else if(19===e.tag)Js(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(vi(Ha,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Va(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Zs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Va(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Zs(t,!0,n,null,i,t.lastEffect);break;case"together":Zs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function tl(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&fu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(fe(153));if(null!==t.child){for(n=Ru(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ru(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function nl(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rl(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ei(t.type)&&ki(),null;case 3:return Ua(),gi(xi),gi(bi),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Ds(t)||(t.effectTag|=4),null;case 5:Fa(t),n=qa(Ma.current);var o=t.type;if(null!==e&&null!=t.stateNode)Ks(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(fe(166));return null}if(e=qa(Ia.current),Ds(t)){r=t.stateNode,o=t.type;var i=t.memoizedProps;switch(r[Lr]=t,r[Ar]=i,o){case"iframe":case"object":case"embed":tr("load",r);break;case"video":case"audio":for(e=0;e<rn.length;e++)tr(rn[e],r);break;case"source":tr("error",r);break;case"img":case"image":case"link":tr("error",r),tr("load",r);break;case"form":tr("reset",r),tr("submit",r);break;case"details":tr("toggle",r);break;case"input":Ot(r,i),tr("invalid",r),mr(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!i.multiple},tr("invalid",r),mr(n,"onChange");break;case"textarea":qt(r,i),tr("invalid",r),mr(n,"onChange")}for(var a in pr(o,i),e=null,i)if(i.hasOwnProperty(a)){var s=i[a];"children"===a?"string"==typeof s?r.textContent!==s&&(e=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(e=["children",""+s]):Je.hasOwnProperty(a)&&null!=s&&mr(n,a)}switch(o){case"input":Tt(r),Rt(r,i,!0);break;case"textarea":Tt(r),Ut(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=gr)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(a=9===n.nodeType?n:n.ownerDocument,e===hr&&(e=Ht(o)),e===hr?"script"===o?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(o,{is:r.is}):(e=a.createElement(o),"select"===o&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,o),e[Lr]=t,e[Ar]=r,Gs(e,t),t.stateNode=e,a=fr(o,r),o){case"iframe":case"object":case"embed":tr("load",e),s=r;break;case"video":case"audio":for(s=0;s<rn.length;s++)tr(rn[s],e);s=r;break;case"source":tr("error",e),s=r;break;case"img":case"image":case"link":tr("error",e),tr("load",e),s=r;break;case"form":tr("reset",e),tr("submit",e),s=r;break;case"details":tr("toggle",e),s=r;break;case"input":Ot(e,r),s=Pt(e,r),tr("invalid",e),mr(n,"onChange");break;case"option":s=It(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=l({},r,{value:void 0}),tr("invalid",e),mr(n,"onChange");break;case"textarea":qt(e,r),s=Mt(e,r),tr("invalid",e),mr(n,"onChange");break;default:s=r}pr(o,s);var u=s;for(i in u)if(u.hasOwnProperty(i)){var c=u[i];"style"===i?cr(e,c):"dangerouslySetInnerHTML"===i?null!=(c=c?c.__html:void 0)&&$t(e,c):"children"===i?"string"==typeof c?("textarea"!==o||""!==c)&&Gt(e,c):"number"==typeof c&&Gt(e,""+c):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(Je.hasOwnProperty(i)?null!=c&&mr(n,i):null!=c&&kt(e,i,c,a))}switch(o){case"input":Tt(e),Rt(e,r,!1);break;case"textarea":Tt(e),Ut(e);break;case"option":null!=r.value&&e.setAttribute("value",""+St(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?jt(e,!!r.multiple,n,!1):null!=r.defaultValue&&jt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=gr)}kr(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Qs(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(fe(166));n=qa(Ma.current),qa(Ia.current),Ds(t)?(n=t.stateNode,r=t.memoizedProps,n[Lr]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Lr]=t,t.stateNode=n)}return null;case 13:return gi(Ha),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Ds(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(i=t.firstEffect)?(t.firstEffect=o,o.nextEffect=i):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ha.current)?Dl===Tl&&(Dl=Nl):(Dl!==Tl&&Dl!==Nl||(Dl=Pl),0!==zl&&null!==Ll&&(Uu(Ll,Rl),Bu(Ll,zl)))),(n||r)&&(t.effectTag|=4),null);case 4:return Ua(),null;case 10:return la(t),null;case 17:return Ei(t.type)&&ki(),null;case 19:if(gi(Ha),null===(r=t.memoizedState))return null;if(o=0!=(64&t.effectTag),null===(i=r.rendering)){if(o)nl(r,!1);else if(Dl!==Tl||null!==e&&0!=(64&e.effectTag))for(i=t.child;null!==i;){if(null!==(e=Va(i))){for(t.effectTag|=64,nl(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)i=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=i,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,i=e.dependencies,o.dependencies=null===i?null:{expirationTime:i.expirationTime,firstContext:i.firstContext,responders:i.responders}),r=r.sibling;return vi(Ha,1&Ha.current|2),t.child}i=i.sibling}}else{if(!o)if(null!==(e=Va(i))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),nl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Gi()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,nl(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=r.last)?n.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Gi()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Gi(),n.sibling=null,t=Ha.current,vi(Ha,o?1&t|2:1&t),n):null}throw Error(fe(156,t.tag))}function ol(e){switch(e.tag){case 1:Ei(e.type)&&ki();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ua(),gi(xi),gi(bi),0!=(64&(t=e.effectTag)))throw Error(fe(285));return e.effectTag=-4097&t|64,e;case 5:return Fa(e),null;case 13:return gi(Ha),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return gi(Ha),null;case 4:return Ua(),null;case 10:return la(e),null;default:return null}}function il(e,t){return{value:e,source:t,stack:We(t)}}Gs=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ks=function(e,t,n,r,o){var i=e.memoizedProps;if(i!==r){var a,s,u=t.stateNode;switch(qa(Ia.current),e=null,n){case"input":i=Pt(u,i),r=Pt(u,r),e=[];break;case"option":i=It(u,i),r=It(u,r),e=[];break;case"select":i=l({},i,{value:void 0}),r=l({},r,{value:void 0}),e=[];break;case"textarea":i=Mt(u,i),r=Mt(u,r),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(u.onclick=gr)}for(a in pr(n,r),n=null,i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&null!=i[a])if("style"===a)for(s in u=i[a])u.hasOwnProperty(s)&&(n||(n={}),n[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Je.hasOwnProperty(a)?e||(e=[]):(e=e||[]).push(a,null));for(a in r){var c=r[a];if(u=null!=i?i[a]:void 0,r.hasOwnProperty(a)&&c!==u&&(null!=c||null!=u))if("style"===a)if(u){for(s in u)!u.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&u[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(e||(e=[]),e.push(a,n)),n=c;else"dangerouslySetInnerHTML"===a?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(e=e||[]).push(a,c)):"children"===a?u===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(a,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(Je.hasOwnProperty(a)?(null!=c&&mr(o,a),e||u===c||(e=[])):(e=e||[]).push(a,c))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Qs=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var al="function"==typeof WeakSet?WeakSet:Set;function sl(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=We(n)),null!==n&&Ve(n.type),t=t.value,null!==e&&1===e.tag&&Ve(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ll(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Su(e,t)}else t.current=null}function ul(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:na(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(fe(163))}function cl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function dl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void dl(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:na(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&ba(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}ba(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&kr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Vn(n)))));case 19:case 17:case 20:case 21:return}throw Error(fe(163))}function fl(e,t,n){switch("function"==typeof Pu&&Pu(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Xi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Su(o,e)}}e=e.next}while(e!==r)}))}break;case 1:ll(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Su(e,t)}}(t,n);break;case 5:ll(t);break;case 4:vl(e,t,n)}}function hl(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&hl(t)}function ml(e){return 5===e.tag||3===e.tag||4===e.tag}function gl(e){e:{for(var t=e.return;null!==t;){if(ml(t)){var n=t;break e}t=t.return}throw Error(fe(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(fe(161))}16&n.effectTag&&(Gt(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ml(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=gr));else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function vl(e,t,n){for(var r,o,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(fe(160));switch(r=a.stateNode,a.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,u=n,c=l;;)if(fl(s,c,u),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}o?(s=r,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(fl(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function yl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void cl(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Ar]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Lt(n,r),fr(e,o),t=fr(e,r),o=0;o<i.length;o+=2){var a=i[o],s=i[o+1];"style"===a?cr(n,s):"dangerouslySetInnerHTML"===a?$t(n,s):"children"===a?Gt(n,s):kt(n,a,s,t)}switch(e){case"input":At(n,r);break;case"textarea":zt(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?jt(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?jt(n,!!r.multiple,r.defaultValue,!0):jt(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(fe(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Vn(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Bl=Gi()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=ur("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void bl(t);case 19:return void bl(t);case 17:return}throw Error(fe(163))}function bl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new al),t.forEach((function(t){var r=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var xl="function"==typeof WeakMap?WeakMap:Map;function wl(e,t,n){(n=ma(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),sl(e,t)},n}function _l(e,t,n){(n=ma(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return sl(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this),sl(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var El,kl=Math.ceil,Sl=Se.ReactCurrentDispatcher,Cl=Se.ReactCurrentOwner,Tl=0,Nl=3,Pl=4,Ol=0,Ll=null,Al=null,Rl=0,Dl=Tl,Il=null,jl=1073741823,Ml=1073741823,ql=null,zl=0,Ul=!1,Bl=0,Fl=null,Hl=!1,Vl=null,Wl=null,$l=!1,Gl=null,Kl=90,Ql=null,Xl=0,Yl=null,Jl=0;function Zl(){return 0!=(48&Ol)?1073741821-(Gi()/10|0):0!==Jl?Jl:Jl=1073741821-(Gi()/10|0)}function eu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Ki();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ol))return Rl;if(null!==n)e=ta(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=ta(e,150,100);break;case 97:case 96:e=ta(e,5e3,250);break;case 95:e=2;break;default:throw Error(fe(326))}return null!==Ll&&e===Rl&&--e,e}function tu(e,t){if(50<Xl)throw Xl=0,Yl=null,Error(fe(185));if(null!==(e=nu(e,t))){var n=Ki();1073741823===t?0!=(8&Ol)&&0==(48&Ol)?au(e):(ou(e),0===Ol&&Zi()):ou(e),0==(4&Ol)||98!==n&&99!==n||(null===Ql?Ql=new Map([[e,t]]):(void 0===(n=Ql.get(e))||n>t)&&Ql.set(e,t))}}function nu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Ll===o&&(fu(t),Dl===Pl&&Uu(o,Rl)),Bu(o,t)),o}function ru(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!zu(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function ou(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ji(au.bind(null,e));else{var t=ru(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Zl();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==Ui&&Li(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Ji(au.bind(null,e)):Yi(r,iu.bind(null,e),{timeout:10*(1073741821-t)-Gi()}),e.callbackNode=t}}}function iu(e,t){if(Jl=0,t)return Fu(e,t=Zl()),ou(e),null;var n=ru(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ol))throw Error(fe(327));if(_u(),e===Ll&&n===Rl||uu(e,n),null!==Al){var r=Ol;Ol|=16;for(var o=du();;)try{mu();break}catch(t){cu(e,t)}if(sa(),Ol=r,Sl.current=o,1===Dl)throw t=Il,uu(e,n),Uu(e,n),ou(e),t;if(null===Al)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Dl,Ll=null,r){case Tl:case 1:throw Error(fe(345));case 2:Fu(e,2<n?2:n);break;case Nl:if(Uu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=yu(o)),1073741823===jl&&10<(o=Bl+500-Gi())){if(Ul){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,uu(e,n);break}}if(0!==(i=ru(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=Cr(bu.bind(null,e),o);break}bu(e);break;case Pl:if(Uu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=yu(o)),Ul&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,uu(e,n);break}if(0!==(o=ru(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ml?r=10*(1073741821-Ml)-Gi():1073741823===jl?r=0:(r=10*(1073741821-jl)-5e3,0>(r=(o=Gi())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kl(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=Cr(bu.bind(null,e),r);break}bu(e);break;case 5:if(1073741823!==jl&&null!==ql){i=jl;var a=ql;if(0>=(r=0|a.busyMinDurationMs)?r=0:(o=0|a.busyDelayMs,r=(i=Gi()-(10*(1073741821-i)-(0|a.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Uu(e,n),e.timeoutHandle=Cr(bu.bind(null,e),r);break}}bu(e);break;default:throw Error(fe(329))}if(ou(e),e.callbackNode===t)return iu.bind(null,e)}}return null}function au(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Ol))throw Error(fe(327));if(_u(),e===Ll&&t===Rl||uu(e,t),null!==Al){var n=Ol;Ol|=16;for(var r=du();;)try{hu();break}catch(t){cu(e,t)}if(sa(),Ol=n,Sl.current=r,1===Dl)throw n=Il,uu(e,t),Uu(e,t),ou(e),n;if(null!==Al)throw Error(fe(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ll=null,bu(e),ou(e)}return null}function su(e,t){var n=Ol;Ol|=1;try{return e(t)}finally{0===(Ol=n)&&Zi()}}function lu(e,t){var n=Ol;Ol&=-2,Ol|=8;try{return e(t)}finally{0===(Ol=n)&&Zi()}}function uu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Tr(n)),null!==Al)for(n=Al.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&ki();break;case 3:Ua(),gi(xi),gi(bi);break;case 5:Fa(r);break;case 4:Ua();break;case 13:case 19:gi(Ha);break;case 10:la(r)}n=n.return}Ll=e,Al=Ru(e.current,null),Rl=t,Dl=Tl,Il=null,Ml=jl=1073741823,ql=null,zl=0,Ul=!1}function cu(e,t){for(;;){try{if(sa(),$a.current=Es,Ja)for(var n=Qa.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ka=0,Ya=Xa=Qa=null,Ja=!1,null===Al||null===Al.return)return Dl=1,Il=t,Al=null;e:{var o=e,i=Al.return,a=Al,s=t;if(t=Rl,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s;if(0==(2&a.mode)){var u=a.alternate;u?(a.memoizedState=u.memoizedState,a.expirationTime=u.expirationTime):a.memoizedState=null}var c=0!=(1&Ha.current),d=i;do{var p;if(p=13===d.tag){var f=d.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!c)}}if(p){var m=d.updateQueue;if(null===m){var g=new Set;g.add(l),d.updateQueue=g}else m.add(l);if(0==(2&d.mode)){if(d.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=ma(1073741823,null);v.tag=2,ga(a,v)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new xl,s=new Set,y.set(l,s)):void 0===(s=y.get(l))&&(s=new Set,y.set(l,s)),!s.has(a)){s.add(a);var b=Cu.bind(null,o,l,a);l.then(b,b)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((Ve(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+We(a))}5!==Dl&&(Dl=2),s=il(s,a),d=i;do{switch(d.tag){case 3:l=s,d.effectTag|=4096,d.expirationTime=t,va(d,wl(d,l,t));break e;case 1:l=s;var x=d.type,w=d.stateNode;if(0==(64&d.effectTag)&&("function"==typeof x.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===Wl||!Wl.has(w)))){d.effectTag|=4096,d.expirationTime=t,va(d,_l(d,l,t));break e}}d=d.return}while(null!==d)}Al=vu(Al)}catch(e){t=e;continue}break}}function du(){var e=Sl.current;return Sl.current=Es,null===e?Es:e}function pu(e,t){e<jl&&2<e&&(jl=e),null!==t&&e<Ml&&2<e&&(Ml=e,ql=t)}function fu(e){e>zl&&(zl=e)}function hu(){for(;null!==Al;)Al=gu(Al)}function mu(){for(;null!==Al&&!Bi();)Al=gu(Al)}function gu(e){var t=El(e.alternate,e,Rl);return e.memoizedProps=e.pendingProps,null===t&&(t=vu(e)),Cl.current=null,t}function vu(e){Al=e;do{var t=Al.alternate;if(e=Al.return,0==(2048&Al.effectTag)){if(t=rl(t,Al,Rl),1===Rl||1!==Al.childExpirationTime){for(var n=0,r=Al.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}Al.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Al.firstEffect),null!==Al.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Al.firstEffect),e.lastEffect=Al.lastEffect),1<Al.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Al:e.firstEffect=Al,e.lastEffect=Al))}else{if(null!==(t=ol(Al)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Al.sibling))return t;Al=e}while(null!==Al);return Dl===Tl&&(Dl=5),null}function yu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function bu(e){var t=Ki();return Xi(99,xu.bind(null,e,t)),null}function xu(e,t){do{_u()}while(null!==Gl);if(0!=(48&Ol))throw Error(fe(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(fe(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=yu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ll&&(Al=Ll=null,Rl=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=Ol;Ol|=32,Cl.current=null,_r=er;var a=xr();if(wr(a)){if("selectionStart"in a)var s={start:a.selectionStart,end:a.selectionEnd};else e:{var l=(s=(s=a.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(l&&0!==l.rangeCount){s=l.anchorNode;var u=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{s.nodeType,c.nodeType}catch(e){s=null;break e}var d=0,p=-1,f=-1,h=0,m=0,g=a,v=null;t:for(;;){for(var y;g!==s||0!==u&&3!==g.nodeType||(p=d+u),g!==c||0!==l&&3!==g.nodeType||(f=d+l),3===g.nodeType&&(d+=g.nodeValue.length),null!==(y=g.firstChild);)v=g,g=y;for(;;){if(g===a)break t;if(v===s&&++h===u&&(p=d),v===c&&++m===l&&(f=d),null!==(y=g.nextSibling))break;v=(g=v).parentNode}g=y}s=-1===p||-1===f?null:{start:p,end:f}}else s=null}s=s||{start:0,end:0}}else s=null;Er={activeElementDetached:null,focusedElem:a,selectionRange:s},er=!1,Fl=o;do{try{wu()}catch(e){if(null===Fl)throw Error(fe(330));Su(Fl,e),Fl=Fl.nextEffect}}while(null!==Fl);Fl=o;do{try{for(a=e,s=t;null!==Fl;){var b=Fl.effectTag;if(16&b&&Gt(Fl.stateNode,""),128&b){var x=Fl.alternate;if(null!==x){var w=x.ref;null!==w&&("function"==typeof w?w(null):w.current=null)}}switch(1038&b){case 2:gl(Fl),Fl.effectTag&=-3;break;case 6:gl(Fl),Fl.effectTag&=-3,yl(Fl.alternate,Fl);break;case 1024:Fl.effectTag&=-1025;break;case 1028:Fl.effectTag&=-1025,yl(Fl.alternate,Fl);break;case 4:yl(Fl.alternate,Fl);break;case 8:vl(a,u=Fl,s),hl(u)}Fl=Fl.nextEffect}}catch(e){if(null===Fl)throw Error(fe(330));Su(Fl,e),Fl=Fl.nextEffect}}while(null!==Fl);if(w=Er,x=xr(),b=w.focusedElem,s=w.selectionRange,x!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==s&&wr(b)&&(x=s.start,void 0===(w=s.end)&&(w=x),"selectionStart"in b?(b.selectionStart=x,b.selectionEnd=Math.min(w,b.value.length)):(w=(x=b.ownerDocument||document)&&x.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,a=Math.min(s.start,u),s=void 0===s.end?a:Math.min(s.end,u),!w.extend&&a>s&&(u=s,s=a,a=u),u=br(b,a),c=br(b,s),u&&c&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==c.node||w.focusOffset!==c.offset)&&((x=x.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),a>s?(w.addRange(x),w.extend(c.node,c.offset)):(x.setEnd(c.node,c.offset),w.addRange(x))))),x=[];for(w=b;w=w.parentNode;)1===w.nodeType&&x.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<x.length;b++)(w=x[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}er=!!_r,Er=_r=null,e.current=n,Fl=o;do{try{for(b=e;null!==Fl;){var _=Fl.effectTag;if(36&_&&pl(b,Fl.alternate,Fl),128&_){x=void 0;var E=Fl.ref;if(null!==E){var k=Fl.stateNode;switch(Fl.tag){case 5:x=k;break;default:x=k}"function"==typeof E?E(x):E.current=x}}Fl=Fl.nextEffect}}catch(e){if(null===Fl)throw Error(fe(330));Su(Fl,e),Fl=Fl.nextEffect}}while(null!==Fl);Fl=null,Fi(),Ol=i}else e.current=n;if($l)$l=!1,Gl=e,Kl=t;else for(Fl=o;null!==Fl;)t=Fl.nextEffect,Fl.nextEffect=null,Fl=t;if(0===(t=e.firstPendingTime)&&(Wl=null),1073741823===t?e===Yl?Xl++:(Xl=0,Yl=e):Xl=0,"function"==typeof Nu&&Nu(n.stateNode,r),ou(e),Hl)throw Hl=!1,e=Vl,Vl=null,e;return 0!=(8&Ol)||Zi(),null}function wu(){for(;null!==Fl;){var e=Fl.effectTag;0!=(256&e)&&ul(Fl.alternate,Fl),0==(512&e)||$l||($l=!0,Yi(97,(function(){return _u(),null}))),Fl=Fl.nextEffect}}function _u(){if(90!==Kl){var e=97<Kl?97:Kl;return Kl=90,Xi(e,Eu)}}function Eu(){if(null===Gl)return!1;var e=Gl;if(Gl=null,0!=(48&Ol))throw Error(fe(331));var t=Ol;for(Ol|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:cl(5,n),dl(5,n)}}catch(t){if(null===e)throw Error(fe(330));Su(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ol=t,Zi(),!0}function ku(e,t,n){ga(e,t=wl(e,t=il(n,t),1073741823)),null!==(e=nu(e,1073741823))&&ou(e)}function Su(e,t){if(3===e.tag)ku(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){ku(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){ga(n,e=_l(n,e=il(t,e),1073741823)),null!==(n=nu(n,1073741823))&&ou(n);break}}n=n.return}}function Cu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ll===e&&Rl===n?Dl===Pl||Dl===Nl&&1073741823===jl&&Gi()-Bl<500?uu(e,Rl):Ul=!0:zu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,ou(e)))}function Tu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=eu(t=Zl(),e,null)),null!==(e=nu(e,t))&&ou(e)}El=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||xi.current)Ms=!0;else{if(r<n){switch(Ms=!1,t.tag){case 3:$s(t),Is();break;case 5:if(Ba(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:Ei(t.type)&&Ti(t);break;case 4:za(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,vi(ra,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ys(e,t,n):(vi(Ha,1&Ha.current),null!==(t=tl(e,t,n))?t.sibling:null);vi(Ha,1&Ha.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return el(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),vi(Ha,Ha.current),!r)return null}return tl(e,t,n)}Ms=!1}}else Ms=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=_i(t,bi.current),ca(t,n),o=ts(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ei(r)){var i=!0;Ti(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,fa(t);var a=r.getDerivedStateFromProps;"function"==typeof a&&_a(t,r,a,e),o.updater=Ea,t.stateNode=o,o._reactInternalFiber=t,Ta(t,r,e,n),t=Ws(null,t,r,!0,i,n)}else t.tag=0,qs(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return Au(e)?1:0;if(null!=e){if((e=e.$$typeof)===je)return 11;if(e===ze)return 14}return 2}(o),e=na(o,e),i){case 0:t=Hs(null,t,o,e,n);break e;case 1:t=Vs(null,t,o,e,n);break e;case 11:t=zs(null,t,o,e,n);break e;case 14:t=Us(null,t,o,na(o.type,e),r,n);break e}throw Error(fe(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Hs(e,t,r,o=t.elementType===r?o:na(r,o),n);case 1:return r=t.type,o=t.pendingProps,Vs(e,t,r,o=t.elementType===r?o:na(r,o),n);case 3:if($s(t),r=t.updateQueue,null===e||null===r)throw Error(fe(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ha(e,t),ya(t,r,null,n),(r=t.memoizedState.element)===o)Is(),t=tl(e,t,n);else{if((o=t.stateNode.hydrate)&&(Ns=Nr(t.stateNode.containerInfo.firstChild),Ts=t,o=Ps=!0),o)for(n=Ra(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else qs(e,t,r,n),Is();t=t.child}return t;case 5:return Ba(t),null===e&&As(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,a=o.children,Sr(r,o)?a=null:null!==i&&Sr(r,i)&&(t.effectTag|=16),Fs(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(qs(e,t,a,n),t=t.child),t;case 6:return null===e&&As(t),null;case 13:return Ys(e,t,n);case 4:return za(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Aa(t,null,r,n):qs(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,zs(e,t,r,o=t.elementType===r?o:na(r,o),n);case 7:return qs(e,t,t.pendingProps,n),t.child;case 8:case 12:return qs(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value;var s=t.type._context;if(vi(ra,s._currentValue),s._currentValue=i,null!==a)if(s=a.value,0===(i=Wo(s,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,i):1073741823))){if(a.children===o.children&&!xi.current){t=tl(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var u=l.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&i)){1===s.tag&&((u=ma(n,null)).tag=2,ga(s,u)),s.expirationTime<n&&(s.expirationTime=n),null!==(u=s.alternate)&&u.expirationTime<n&&(u.expirationTime=n),ua(s.return,n),l.expirationTime<n&&(l.expirationTime=n);break}u=u.next}}else a=10===s.tag&&s.type===t.type?null:s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}qs(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ca(t,n),r=r(o=da(o,i.unstable_observedBits)),t.effectTag|=1,qs(e,t,r,n),t.child;case 14:return i=na(o=t.type,t.pendingProps),Us(e,t,o,i=na(o.type,i),r,n);case 15:return Bs(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:na(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,Ei(r)?(e=!0,Ti(t)):e=!1,ca(t,n),Sa(t,r,o),Ta(t,r,o,n),Ws(null,t,r,!0,e,n);case 19:return el(e,t,n)}throw Error(fe(156,t.tag))};var Nu=null,Pu=null;function Ou(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Lu(e,t,n,r){return new Ou(e,t,n,r)}function Au(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ru(e,t){var n=e.alternate;return null===n?((n=Lu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Du(e,t,n,r,o,i){var a=2;if(r=e,"function"==typeof e)Au(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Oe:return Iu(n.children,o,i,t);case Ie:a=8,o|=7;break;case Le:a=8,o|=1;break;case Ae:return(e=Lu(12,n,t,8|o)).elementType=Ae,e.type=Ae,e.expirationTime=i,e;case Me:return(e=Lu(13,n,t,o)).type=Me,e.elementType=Me,e.expirationTime=i,e;case qe:return(e=Lu(19,n,t,o)).elementType=qe,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Re:a=10;break e;case De:a=9;break e;case je:a=11;break e;case ze:a=14;break e;case Ue:a=16,r=null;break e;case Be:a=22;break e}throw Error(fe(130,null==e?e:typeof e,""))}return(t=Lu(a,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Iu(e,t,n,r){return(e=Lu(7,e,r,t)).expirationTime=n,e}function ju(e,t,n){return(e=Lu(6,e,null,t)).expirationTime=n,e}function Mu(e,t,n){return(t=Lu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qu(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function zu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Uu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Bu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Fu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Hu(e,t,n,r){var o=t.current,i=Zl(),a=xa.suspense;i=eu(i,o,a);e:if(n){t:{if(sn(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(fe(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(Ei(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(fe(171))}if(1===n.tag){var l=n.type;if(Ei(l)){n=Ci(n,l,s);break e}}n=s}else n=yi;return null===t.context?t.context=n:t.pendingContext=n,(t=ma(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ga(o,t),tu(o,i),i}function Vu(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Wu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function $u(e,t){Wu(e,t),(e=e.alternate)&&Wu(e,t)}function Gu(e,t,n){var r=new qu(e,t,n=null!=n&&!0===n.hydrate),o=Lu(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,fa(o),e[Rr]=r.current,n&&0!==t&&function(e,t){var n=an(t);Dn.forEach((function(e){_n(e,t,n)})),In.forEach((function(e){_n(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var s=o;o=function(){var e=Vu(a);s.call(e)}}Hu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var l=o;o=function(){var e=Vu(a);l.call(e)}}lu((function(){Hu(t,a,e,o)}))}return Vu(a)}function Xu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Pe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(fe(200));return Xu(e,t,null,n)}Gu.prototype.render=function(e){Hu(e,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Hu(null,e,null,(function(){t[Rr]=null}))},En=function(e){if(13===e.tag){var t=ta(Zl(),150,100);tu(e,t),$u(e,t)}},kn=function(e){13===e.tag&&(tu(e,3),$u(e,3))},Sn=function(e){if(13===e.tag){var t=Zl();tu(e,t=eu(t,e,null)),$u(e,t)}},nt=function(e,t,n){switch(t){case"input":if(At(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Mr(r);if(!o)throw Error(fe(90));Nt(r),At(r,o)}}}break;case"textarea":zt(e,n);break;case"select":null!=(t=n.value)&&jt(e,!!n.multiple,t,!1)}},lt=su,ut=function(e,t,n,r,o){var i=Ol;Ol|=4;try{return Xi(98,e.bind(null,t,n,r,o))}finally{0===(Ol=i)&&Zi()}},ct=function(){0==(49&Ol)&&(function(){if(null!==Ql){var e=Ql;Ql=null,e.forEach((function(e,t){Fu(t,e),ou(t)})),Zi()}}(),_u())},dt=function(e,t){var n=Ol;Ol|=2;try{return e(t)}finally{0===(Ol=n)&&Zi()}};var Ju={Events:[Ir,jr,Mr,et,Ye,Vr,function(e){pn(e,Hr)},at,st,ir,mn,_u,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Nu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Pu=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}})(l({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Se.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=cn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Dr,bundleType:0,version:"16.13.0",rendererPackageName:"react-dom"});var Zu={__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ju,createPortal:Yu,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(fe(188));throw Error(fe(268,Object.keys(e)))}return e=null===(e=cn(t))?null:e.stateNode},flushSync:function(e,t){if(0!=(48&Ol))throw Error(fe(187));var n=Ol;Ol|=1;try{return Xi(99,e.bind(null,t))}finally{Ol=n,Zi()}},hydrate:function(e,t,n){if(!Ku(t))throw Error(fe(200));return Qu(null,e,t,!0,n)},render:function(e,t,n){if(!Ku(t))throw Error(fe(200));return Qu(null,e,t,!1,n)},unmountComponentAtNode:function(e){if(!Ku(e))throw Error(fe(40));return!!e._reactRootContainer&&(lu((function(){Qu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Rr]=null}))})),!0)},unstable_batchedUpdates:su,unstable_createPortal:function(e,t){return Yu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!Ku(n))throw Error(fe(200));if(null==e||void 0===e._reactInternalFiber)throw Error(fe(38));return Qu(e,t,n,!1,r)},version:"16.13.0"},ec=n((function(e){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=Zu})),tc=ec.findDOMNode,nc=ec.unstable_batchedUpdates,rc=ec.createPortal;function oc(){return(oc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ic(e){return(ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ac(e){return e&&"object"===ic(e)&&!Array.isArray(e)}function sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?oc({},e):e;return ac(e)&&ac(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(ac(t[o])&&o in e?r[o]=sc(e[o],t[o],n):r[o]=t[o])})),r}function lc(){}function uc(){}uc.resetWarningCache=lc;var cc=n((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:uc,resetWarningCache:lc};return n.PropTypes=n,n}()}));cc.element,cc.oneOfType,cc.func,cc.bool,cc.elementType;function dc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pc="function"==typeof Symbol&&Symbol.for,fc=pc?Symbol.for("react.element"):60103,hc=pc?Symbol.for("react.portal"):60106,mc=pc?Symbol.for("react.fragment"):60107,gc=pc?Symbol.for("react.strict_mode"):60108,vc=pc?Symbol.for("react.profiler"):60114,yc=pc?Symbol.for("react.provider"):60109,bc=pc?Symbol.for("react.context"):60110,xc=pc?Symbol.for("react.async_mode"):60111,wc=pc?Symbol.for("react.concurrent_mode"):60111,_c=pc?Symbol.for("react.forward_ref"):60112,Ec=pc?Symbol.for("react.suspense"):60113,kc=pc?Symbol.for("react.suspense_list"):60120,Sc=pc?Symbol.for("react.memo"):60115,Cc=pc?Symbol.for("react.lazy"):60116,Tc=pc?Symbol.for("react.block"):60121,Nc=pc?Symbol.for("react.fundamental"):60117,Pc=pc?Symbol.for("react.responder"):60118,Oc=pc?Symbol.for("react.scope"):60119;function Lc(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case fc:switch(e=e.type){case xc:case wc:case mc:case vc:case gc:case Ec:return e;default:switch(e=e&&e.$$typeof){case bc:case _c:case Cc:case Sc:case yc:return e;default:return t}}case hc:return t}}}function Ac(e){return Lc(e)===wc}var Rc={AsyncMode:xc,ConcurrentMode:wc,ContextConsumer:bc,ContextProvider:yc,Element:fc,ForwardRef:_c,Fragment:mc,Lazy:Cc,Memo:Sc,Portal:hc,Profiler:vc,StrictMode:gc,Suspense:Ec,isAsyncMode:function(e){return Ac(e)||Lc(e)===xc},isConcurrentMode:Ac,isContextConsumer:function(e){return Lc(e)===bc},isContextProvider:function(e){return Lc(e)===yc},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===fc},isForwardRef:function(e){return Lc(e)===_c},isFragment:function(e){return Lc(e)===mc},isLazy:function(e){return Lc(e)===Cc},isMemo:function(e){return Lc(e)===Sc},isPortal:function(e){return Lc(e)===hc},isProfiler:function(e){return Lc(e)===vc},isStrictMode:function(e){return Lc(e)===gc},isSuspense:function(e){return Lc(e)===Ec},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===mc||e===wc||e===vc||e===gc||e===Ec||e===kc||"object"==typeof e&&null!==e&&(e.$$typeof===Cc||e.$$typeof===Sc||e.$$typeof===yc||e.$$typeof===bc||e.$$typeof===_c||e.$$typeof===Nc||e.$$typeof===Pc||e.$$typeof===Oc||e.$$typeof===Tc)},typeOf:Lc},Dc=n((function(e){e.exports=Rc})),Ic=(Dc.ForwardRef,Dc.isForwardRef,Dc.isValidElementType,Dc.isContextConsumer),jc=(Dc.isFragment,"function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"),Mc=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function qc(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var o,i=t.props[n];for(o in i)void 0===r[o]&&(r[o]=i[o]);return r}var zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uc="object"===("undefined"==typeof window?"undefined":zc(window))&&"object"===("undefined"==typeof document?"undefined":zc(document))&&9===document.nodeType;function Bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fc(e,t,n){return t&&Bc(e.prototype,t),n&&Bc(e,n),e}function Hc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Vc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wc(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var $c={}.constructor;function Gc(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Gc);if(e.constructor!==$c)return e;var t={};for(var n in e)t[n]=Gc(e[n]);return t}function Kc(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=Gc(t),i=r.plugins.onCreateRule(e,o,n);return i||(e[0],null)}var Qc=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function Xc(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=Qc(e[r]," ");else n=Qc(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function Yc(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Jc(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,i=void 0===o?0:o,a=t.fallbacks;if(e&&i++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var l=a[s];for(var u in l){var c=l[u];null!=c&&(r&&(r+="\n"),r+=""+Yc(u+": "+Xc(c)+";",i))}}else for(var d in a){var p=a[d];null!=p&&(r&&(r+="\n"),r+=""+Yc(d+": "+Xc(p)+";",i))}for(var f in t){var h=t[f];null!=h&&"fallbacks"!==f&&(r&&(r+="\n"),r+=""+Yc(f+": "+Xc(h)+";",i))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),Yc(e+" {"+r,--i)+Yc("}",i)):r}var Zc=/([[\].#*$><+~=|^:(),"'`\s])/g,ed="undefined"!=typeof CSS&&CSS.escape,td=function(e){return ed?ed(e):e.replace(Zc,"\\$1")},nd=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),rd=function(e){function t(t,n,r){var o;(o=e.call(this,t,n,r)||this).selectorText=void 0,o.id=void 0,o.renderable=void 0;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l(Vc(Vc(o)),s),o.selectorText="."+td(o.id)),o}Hc(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Xc(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?oc({},e,{allowEmpty:!0}):e;return Jc(this.selectorText,this.style,n)},Fc(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(nd),od={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new rd(e,t,n)}},id={indent:1,children:!0},ad=/@([\w-]+)/,sd=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.query=n.name;var r=e.match(ad);for(var o in this.at=r?r[1]:"unknown",this.options=n,this.rules=new Pd(oc({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=id),null==e.indent&&(e.indent=id.indent),null==e.children&&(e.children=id.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),ld=/@media|@supports\s+/,ud={onCreateRule:function(e,t,n){return ld.test(e)?new sd(e,t,n):null}},cd={indent:1,children:!0},dd=/@keyframes\s+([\w-]+)/,pd=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(dd);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,i=n.sheet,a=n.generateId;for(var s in this.id=!1===o?this.name:td(a(this,i)),this.rules=new Pd(oc({},n,{parent:this})),t)this.rules.add(s,t[s],oc({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=cd),null==e.indent&&(e.indent=cd.indent),null==e.children&&(e.children=cd.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),fd=/@keyframes\s+/,hd=/\$([\w-]+)/g,md=function(e,t){return"string"==typeof e?e.replace(hd,(function(e,n){return n in t?t[n]:e})):e},gd=function(e,t,n){var r=e[t],o=md(r,n);o!==r&&(e[t]=o)},vd={onCreateRule:function(e,t,n){return"string"==typeof e&&fd.test(e)?new pd(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&gd(e,"animation-name",n.keyframes),"animation"in e&&gd(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return md(e,r.keyframes);default:return e}}},yd=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Hc(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?oc({},e,{allowEmpty:!0}):e;return Jc(this.key,this.style,n)},t}(nd),bd={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new yd(e,t,n):null}},xd=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=Jc(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return Jc(this.key,this.style,e)},e}(),wd={onCreateRule:function(e,t,n){return"@font-face"===e?new xd(e,t,n):null}},_d=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Jc(this.key,this.style,e)},e}(),Ed={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new _d(e,t,n):null}},kd=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Sd={"@charset":!0,"@import":!0,"@namespace":!0},Cd=[od,ud,vd,bd,wd,Ed,{onCreateRule:function(e,t,n){return e in Sd?new kd(e,t,n):null}}],Td={process:!0},Nd={force:!0,process:!0},Pd=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,i=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,u=r.scoped,c=oc({classes:this.classes,parent:o,sheet:i,jss:a,Renderer:s,generateId:l,scoped:u,name:e},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+td(this.classes[d]));var p=Kc(d,t,c);if(!p)return null;this.register(p);var f=void 0===c.index?this.index.length:c.index;return this.index.splice(f,0,p),p},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof rd?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof pd&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof rd?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof pd&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Td);var o=this.options,i=o.jss.plugins,a=o.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t,l=s.style;if(i.onUpdate(n,t,a,r),r.process&&l&&l!==s.style){for(var u in i.onProcessStyle(s.style,s,a),s.style){var c=s.style[u];c!==l[u]&&s.prop(u,c,Nd)}for(var d in l){var p=s.style[d],f=l[d];null==p&&p!==f&&s.prop(d,null,Nd)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=0;o<this.index.length;o++){var i=this.index[o].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t},e}(),Od=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=oc({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Pd(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Ld=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Ad=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Wc(t,["attached"]),o="",i=0;i<this.registry.length;i++){var a=this.registry[i];null!=n&&a.attached!==n||(o&&(o+="\n"),o+=a.toString(r))}return o},Fc(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),Rd="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Dd="2f1acc6c3a606b082e5eef5e54414ffb";null==Rd[Dd]&&(Rd[Dd]=0);var Id=Rd[Dd]++,jd=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",i="";return r&&(r.options.classNamePrefix&&(i=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(i||"c")+Id+o+t:i+n.key+"-"+Id+(o?"-"+o:"")+"-"+t}},Md=function(e){var t;return function(){return t||(t=e()),t}};function qd(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function zd(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Xc(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function Ud(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}}function Bd(e,t){return e.selectorText=t,e.selectorText===t}var Fd=Md((function(){return document.querySelector("head")}));function Hd(e){var t=Ad.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var o=function(e){for(var t=Fd(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var Vd=Md((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Wd=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},$d=function(){function e(e){this.getPropertyValue=qd,this.setProperty=zd,this.removeProperty=Ud,this.setSelector=Bd,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Ad.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=Vd();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Hd(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else Fd().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(o=Wd(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,o),o)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var i=e.toString();if(!i)return!1;var a=Wd(n,i,t);return!1!==a&&(this.hasInsertedRules=!0,e.renderable=a,a)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Gd=0,Kd=function(){function e(e){this.id=Gd++,this.version="10.0.4",this.plugins=new Ld,this.options={id:{minify:!1},createGenerateId:jd,Renderer:Uc?$d:null,plugins:[]},this.generateId=jd({minify:!1});for(var t=0;t<Cd.length;t++)this.plugins.use(Cd[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=oc({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Ad.index?0:Ad.index+1);var r=new Od(e,oc({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Ad.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=oc({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=Kc(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();var Qd="undefined"!=typeof CSS&&CSS&&"number"in CSS,Xd=function(e){return new Kd(e)},Yd=(Xd(),Date.now()),Jd="fnValues"+Yd,Zd="fnStyle"+ ++Yd;var ep="@global",tp=function(){function e(e,t,n){for(var r in this.type="global",this.at=ep,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Pd(oc({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),np=function(){function e(e,t,n){this.type="global",this.at=ep,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,oc({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),rp=/\s*,\s*/g;function op(e,t){for(var n=e.split(rp),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}function ip(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===ep)return new tp(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new np(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,r=n?n[ep]:null;if(r){for(var o in r)t.sheet.addRule(o,r[o],oc({},t,{selector:op(o,e.selector)}));delete n[ep]}}(e),function(e){var t=e.options,n=e.style;for(var r in n)if("@"===r[0]&&r.substr(0,ep.length)===ep){var o=op(r.substr(ep.length),e.selector);t.sheet.addRule(o,n[r],oc({},t,{selector:o})),delete n[r]}}(e))}}}var ap=/\s*,\s*/g,sp=/&/g,lp=/\$([\w-]+)/g;function up(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?(o=o).selector:r}}function t(e,t){for(var n=t.split(ap),r=e.split(ap),o="",i=0;i<n.length;i++)for(var a=n[i],s=0;s<r.length;s++){var l=r[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(sp,a):a+" "+l}return o}function n(e,t,n){if(n)return oc({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var o=oc({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(r,o,i){if("style"!==o.type)return r;var a,s,l=o,u=l.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),p="@"===c[0];if(d||p){if(a=n(l,u,a),d){var f=t(c,l.selector);s||(s=e(u,i)),f=f.replace(lp,s),u.addRule(f,r[c],oc({},a,{selector:f}))}else p&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var cp=/[A-Z]/g,dp=/^ms-/,pp={};function fp(e){return"-"+e.toLowerCase()}function hp(e){if(pp.hasOwnProperty(e))return pp[e];var t=e.replace(cp,fp);return pp[e]=dp.test(t)?"-"+t:t}function mp(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:hp(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(mp):t.fallbacks=mp(e.fallbacks)),t}var gp=Qd&&CSS?CSS.px:"px",vp=Qd&&CSS?CSS.ms:"ms",yp=Qd&&CSS?CSS.percent:"%";function bp(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(t,n)]=e[o];return r}var xp=bp({"animation-delay":vp,"animation-duration":vp,"background-position":gp,"background-position-x":gp,"background-position-y":gp,"background-size":gp,border:gp,"border-bottom":gp,"border-bottom-left-radius":gp,"border-bottom-right-radius":gp,"border-bottom-width":gp,"border-left":gp,"border-left-width":gp,"border-radius":gp,"border-right":gp,"border-right-width":gp,"border-top":gp,"border-top-left-radius":gp,"border-top-right-radius":gp,"border-top-width":gp,"border-width":gp,margin:gp,"margin-bottom":gp,"margin-left":gp,"margin-right":gp,"margin-top":gp,padding:gp,"padding-bottom":gp,"padding-left":gp,"padding-right":gp,"padding-top":gp,"mask-position-x":gp,"mask-position-y":gp,"mask-size":gp,height:gp,width:gp,"min-height":gp,"max-height":gp,"min-width":gp,"max-width":gp,bottom:gp,left:gp,top:gp,right:gp,"box-shadow":gp,"text-shadow":gp,"column-gap":gp,"column-rule":gp,"column-rule-width":gp,"column-width":gp,"font-size":gp,"font-size-delta":gp,"letter-spacing":gp,"text-indent":gp,"text-stroke":gp,"text-stroke-width":gp,"word-spacing":gp,motion:gp,"motion-offset":gp,outline:gp,"outline-offset":gp,"outline-width":gp,perspective:gp,"perspective-origin-x":yp,"perspective-origin-y":yp,"transform-origin":yp,"transform-origin-x":yp,"transform-origin-y":yp,"transform-origin-z":yp,"transition-delay":vp,"transition-duration":vp,"vertical-align":gp,"flex-basis":gp,"shape-margin":gp,size:gp,grid:gp,"grid-gap":gp,"grid-row-gap":gp,"grid-column-gap":gp,"grid-template-rows":gp,"grid-template-columns":gp,"grid-auto-rows":gp,"grid-auto-columns":gp,"box-shadow-x":gp,"box-shadow-y":gp,"box-shadow-blur":gp,"box-shadow-spread":gp,"font-line-height":gp,"text-shadow-x":gp,"text-shadow-y":gp,"text-shadow-blur":gp});function _p(e,t,n){if(!t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=_p(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=_p(o,t[o],n);else for(var i in t)t[i]=_p(e+"-"+i,t[i],n);else if("number"==typeof t)return n[e]?""+t+n[e]:xp[e]?"function"==typeof xp[e]?xp[e](t).toString():""+t+xp[e]:t.toString();return t}function Ep(e){void 0===e&&(e={});var t=bp(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=_p(r,e[r],t);return e},onChangeValue:function(e,n){return _p(n,e,t)}}}function kp(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Sp="",Cp="",Tp="",Np=Uc&&"ontouchstart"in document.documentElement;if(Uc){var Pp={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Op=document.createElement("p").style;for(var Lp in Pp)if(Lp+"Transform"in Op){Sp=Lp,Cp=Pp[Lp];break}"Webkit"===Sp&&"msHyphens"in Op&&(Sp="ms",Cp=Pp.ms,"edge"),"Webkit"===Sp&&"-apple-trailing-word"in Op&&(Tp="apple")}var Ap=Sp,Rp=Cp,Dp=Tp,Ip=Np;var jp={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Ap?"-webkit-"+e:Rp+e)}},Mp={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Ap?Rp+"print-"+e:e)}},qp=/[-\s]+(.)?/g;function zp(e,t){return t?t.toUpperCase():""}function Up(e){return e.replace(qp,zp)}function Bp(e){return Up("-"+e)}var Fp,Hp={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Ap){if(Up("mask-image")in t)return e;if(Ap+Bp("mask-image")in t)return Rp+e}return e}},Vp={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Dp||Ip?e:Rp+e)}},Wp={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Rp+e)}},$p={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Rp+e)}},Gp={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Ap||"ms"===Ap?Rp+e:e)}},Kp={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Ap||"ms"===Ap||"apple"===Dp?Rp+e:e)}},Qp={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Ap?"WebkitColumn"+Bp(e)in t&&Rp+"column-"+e:"Moz"===Ap&&("page"+Bp(e)in t&&"page-"+e))}},Xp={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Ap)return e;var n=e.replace("-inline","");return Ap+Bp(n)in t&&Rp+n}},Yp={supportedProperty:function(e,t){return Up(e)in t&&e}},Jp={supportedProperty:function(e,t){var n=Bp(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Ap+n in t?Rp+e:"Webkit"!==Ap&&"Webkit"+n in t&&"-webkit-"+e}},Zp={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Ap?""+Rp+e:e)}},ef={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Ap?Rp+"scroll-chaining":e)}},tf={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},nf={supportedProperty:function(e,t){var n=tf[e];return!!n&&(Ap+Bp(n)in t&&Rp+n)}},rf={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},of=Object.keys(rf),af=function(e){return Rp+e},sf=[jp,Mp,Hp,Vp,Wp,$p,Gp,Kp,Qp,Xp,Yp,Jp,Zp,ef,nf,{supportedProperty:function(e,t,n){var r=n.multiple;if(of.indexOf(e)>-1){var o=rf[e];if(!Array.isArray(o))return Ap+Bp(o)in t&&Rp+o;if(!r)return!1;for(var i=0;i<o.length;i++)if(!(Ap+Bp(o[0])in t))return!1;return o.map(af)}return!1}}],lf=sf.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),uf=sf.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,kp(t.noPrefill)),e}),[]),cf={};if(Uc){Fp=document.createElement("p");var df=window.getComputedStyle(document.documentElement,"");for(var pf in df)isNaN(pf)||(cf[df[pf]]=df[pf]);uf.forEach((function(e){return delete cf[e]}))}function ff(e,t){if(void 0===t&&(t={}),!Fp)return e;if(null!=cf[e])return cf[e];"transition"!==e&&"transform"!==e||(t[e]=e in Fp.style);for(var n=0;n<lf.length&&(cf[e]=lf[n](e,Fp.style,t),!cf[e]);n++);try{Fp.style[e]=""}catch(e){return!1}return cf[e]}var hf,mf={},gf={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},vf=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function yf(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?ff(t):", "+ff(n);return r||(t||n)}function bf(e,t){var n=t;if(!hf||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=mf[r])return mf[r];try{hf.style[e]=n}catch(e){return mf[r]=!1,!1}if(gf[e])n=n.replace(vf,yf);else if(""===hf.style[e]&&("-ms-flex"===(n=Rp+n)&&(hf.style[e]="-ms-flexbox"),hf.style[e]=n,""===hf.style[e]))return mf[r]=!1,!1;return hf.style[e]="",mf[r]=n,mf[r]}function xf(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var o=!1,i=ff(n);i&&i!==n&&(o=!0);var a=!1,s=bf(i,Xc(r));s&&s!==r&&(a=!0),(o||a)&&(o&&delete t[n],t[i||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Ap?e:"@"+Rp+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return bf(t,Xc(e))||e}}}function wf(e,t){if(null==e)return{};var n,r,o=Wc(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=oc({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Uc&&(hf=document.createElement("p"));var Ef=function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},kf=function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},Sf=function(e,t,n){e.get(t).delete(n)},Cf=$.createContext(null);function Tf(){return $.useContext(Cf)}var Nf,Pf=Xd({plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Kc(e,{},n);return r[Zd]=t,r},onProcessStyle:function(e,t){if(Jd in t||Zd in t)return e;var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return t[Jd]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[Zd];i&&(o.style=i(e)||{});var a=o[Jd];if(a)for(var s in a)o.prop(s,a[s](e),r)}},ip(),up(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=mp(e[t]);return e}return mp(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=hp(t);return t===r?e:(n.prop(r,e),null)}},Ep(),"undefined"==typeof window?null:xf(),(Nf=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(e,t){if("style"!==t.type)return e;for(var n={},r=Object.keys(e).sort(Nf),o=0;o<r.length;o++)n[r[o]]=e[r[o]];return n}})]}),Of={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0;return function(e,t){l+=1;var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Mc.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[jc]&&""===a?"".concat(i,"-").concat(l):i}return"".concat(s).concat(o).concat(l)}}(),jss:Pf,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Lf=$.createContext(Of),Af=-1e9;function Rf(){return Af+=1}var Df={};function If(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var i=n.overrides[r],a=oc({},o);return Object.keys(i).forEach((function(e){a[e]=sc(a[e],i[e])})),a},options:{}}}function jf(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=_f({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Mf(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,i=e.stylesCreator,a=e.name;if(!o.disableGeneration){var s=kf(o.sheetsManager,i,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Ef(o.sheetsManager,i,r,s));var l=oc({},i.options,{},o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=o.sheetsRegistry;if(0===s.refs){var c;o.sheetsCache&&(c=kf(o.sheetsCache,i,r));var d=i.create(r,a);c||((c=o.jss.createStyleSheet(d,oc({link:!1},l))).attach(),o.sheetsCache&&Ef(o.sheetsCache,i,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=function e(t){var n=null;for(var r in t){var o=t[r],i=typeof o;if("function"===i)n||(n={}),n[r]=o;else if("object"===i&&null!==o&&!Array.isArray(o)){var a=e(o);a&&(n||(n={}),n[r]=a)}}return n}(d)}if(s.dynamicStyles){var p=o.jss.createStyleSheet(s.dynamicStyles,oc({link:!0},l));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=_f({baseClasses:s.staticSheet.classes,newClasses:p.classes}),u&&u.add(p)}else n.classes=s.staticSheet.classes;s.refs+=1}}function qf(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function zf(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=kf(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(Sf(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function Uf(e,t){var n,r=$.useRef([]),o=$.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),$.useEffect((function(){return function(){n&&n()}}),[o])}function Bf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,o=t.Component,i=t.defaultTheme,a=void 0===i?Df:i,s=wf(t,["name","classNamePrefix","Component","defaultTheme"]),l=If(e),u=n||r||"makeStyles";return l.options={index:Rf(),name:n,meta:u,classNamePrefix:u},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Tf()||a,r=oc({},$.useContext(Lf),{},s),i=$.useRef(),u=$.useRef();return Uf((function(){var o={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Mf(o,e),u.current=!1,i.current=o,function(){zf(o)}}),[t,l]),$.useEffect((function(){u.current&&qf(i.current,e),u.current=!0})),jf(i.current,e.classes,o)}}function Ff(e){var t,n,r="";if(e)if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ff(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(n=Ff(t))&&(r&&(r+=" "),r+=n);else"boolean"==typeof e||e.call||(r&&(r+=" "),r+=e);return r}function Hf(){for(var e,t=0,n="";t<arguments.length;)(e=Ff(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}var Vf={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Wf={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},$f={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Gf={};function Kf(e){return Dc.isMemo(e)?$f:Gf[e.$$typeof]||Vf}Gf[Dc.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Gf[Dc.Memo]=$f;var Qf=Object.defineProperty,Xf=Object.getOwnPropertyNames,Yf=Object.getOwnPropertySymbols,Jf=Object.getOwnPropertyDescriptor,Zf=Object.getPrototypeOf,eh=Object.prototype;var th=function e(t,n,r){if("string"!=typeof n){if(eh){var o=Zf(n);o&&o!==eh&&e(t,o,r)}var i=Xf(n);Yf&&(i=i.concat(Yf(n)));for(var a=Kf(t),s=Kf(n),l=0;l<i.length;++l){var u=i[l];if(!(Wf[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=Jf(n,u);try{Qf(t,u,c)}catch(e){}}}}return t};function nh(e){var t=e.children,n=e.theme,r=Tf(),o=$.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):oc({},e,{},t)}(r,n);return null!=e&&(e[jc]=null!==r),e}),[n,r]);return $.createElement(Cf.Provider,{value:o},t)}var rh=function(e){return e&&e.Math==Math&&e},oh=rh("object"==typeof globalThis&&globalThis)||rh("object"==typeof window&&window)||rh("object"==typeof self&&self)||rh("object"==typeof e&&e)||Function("return this")(),ih=function(e){try{return!!e()}catch(e){return!0}},ah=!ih((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),sh={}.propertyIsEnumerable,lh=Object.getOwnPropertyDescriptor,uh={f:lh&&!sh.call({1:2},1)?function(e){var t=lh(this,e);return!!t&&t.enumerable}:sh},ch=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},dh={}.toString,ph=function(e){return dh.call(e).slice(8,-1)},fh="".split,hh=ih((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==ph(e)?fh.call(e,""):Object(e)}:Object,mh=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},gh=function(e){return hh(mh(e))},vh=function(e){return"object"==typeof e?null!==e:"function"==typeof e},yh=function(e,t){if(!vh(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!vh(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!vh(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!vh(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},bh={}.hasOwnProperty,xh=function(e,t){return bh.call(e,t)},wh=oh.document,_h=vh(wh)&&vh(wh.createElement),Eh=function(e){return _h?wh.createElement(e):{}},kh=!ah&&!ih((function(){return 7!=Object.defineProperty(Eh("div"),"a",{get:function(){return 7}}).a})),Sh=Object.getOwnPropertyDescriptor,Ch={f:ah?Sh:function(e,t){if(e=gh(e),t=yh(t,!0),kh)try{return Sh(e,t)}catch(e){}if(xh(e,t))return ch(!uh.f.call(e,t),e[t])}},Th=function(e){if(!vh(e))throw TypeError(String(e)+" is not an object");return e},Nh=Object.defineProperty,Ph={f:ah?Nh:function(e,t,n){if(Th(e),t=yh(t,!0),Th(n),kh)try{return Nh(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Oh=ah?function(e,t,n){return Ph.f(e,t,ch(1,n))}:function(e,t,n){return e[t]=n,e},Lh=function(e,t){try{Oh(oh,e,t)}catch(n){oh[e]=t}return t},Ah=oh["__core-js_shared__"]||Lh("__core-js_shared__",{}),Rh=Function.toString;"function"!=typeof Ah.inspectSource&&(Ah.inspectSource=function(e){return Rh.call(e)});var Dh,Ih,jh,Mh=Ah.inspectSource,qh=oh.WeakMap,zh="function"==typeof qh&&/native code/.test(Mh(qh)),Uh=n((function(e){(e.exports=function(e,t){return Ah[e]||(Ah[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Bh=0,Fh=Math.random(),Hh=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Bh+Fh).toString(36)},Vh=Uh("keys"),Wh=function(e){return Vh[e]||(Vh[e]=Hh(e))},$h={},Gh=oh.WeakMap;if(zh){var Kh=new Gh,Qh=Kh.get,Xh=Kh.has,Yh=Kh.set;Dh=function(e,t){return Yh.call(Kh,e,t),t},Ih=function(e){return Qh.call(Kh,e)||{}},jh=function(e){return Xh.call(Kh,e)}}else{var Jh=Wh("state");$h[Jh]=!0,Dh=function(e,t){return Oh(e,Jh,t),t},Ih=function(e){return xh(e,Jh)?e[Jh]:{}},jh=function(e){return xh(e,Jh)}}var Zh={set:Dh,get:Ih,has:jh,enforce:function(e){return jh(e)?Ih(e):Dh(e,{})},getterFor:function(e){return function(t){var n;if(!vh(t)||(n=Ih(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},em=n((function(e){var t=Zh.get,n=Zh.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var a=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||xh(o,"name")||Oh(o,"name",t),n(o).source=r.join("string"==typeof t?t:"")),e!==oh?(a?!l&&e[t]&&(s=!0):delete e[t],s?e[t]=o:Oh(e,t,o)):s?e[t]=o:Lh(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||Mh(this)}))})),tm=oh,nm=function(e){return"function"==typeof e?e:void 0},rm=function(e,t){return arguments.length<2?nm(tm[e])||nm(oh[e]):tm[e]&&tm[e][t]||oh[e]&&oh[e][t]},om=Math.ceil,im=Math.floor,am=function(e){return isNaN(e=+e)?0:(e>0?im:om)(e)},sm=Math.min,lm=function(e){return e>0?sm(am(e),9007199254740991):0},um=Math.max,cm=Math.min,dm=function(e,t){var n=am(e);return n<0?um(n+t,0):cm(n,t)},pm=function(e){return function(t,n,r){var o,i=gh(t),a=lm(i.length),s=dm(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},fm={includes:pm(!0),indexOf:pm(!1)},hm=fm.indexOf,mm=function(e,t){var n,r=gh(e),o=0,i=[];for(n in r)!xh($h,n)&&xh(r,n)&&i.push(n);for(;t.length>o;)xh(r,n=t[o++])&&(~hm(i,n)||i.push(n));return i},gm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vm=gm.concat("length","prototype"),ym={f:Object.getOwnPropertyNames||function(e){return mm(e,vm)}},bm={f:Object.getOwnPropertySymbols},xm=rm("Reflect","ownKeys")||function(e){var t=ym.f(Th(e)),n=bm.f;return n?t.concat(n(e)):t},wm=function(e,t){for(var n=xm(t),r=Ph.f,o=Ch.f,i=0;i<n.length;i++){var a=n[i];xh(e,a)||r(e,a,o(t,a))}},_m=/#|\.prototype\./,Em=function(e,t){var n=Sm[km(e)];return n==Tm||n!=Cm&&("function"==typeof t?ih(t):!!t)},km=Em.normalize=function(e){return String(e).replace(_m,".").toLowerCase()},Sm=Em.data={},Cm=Em.NATIVE="N",Tm=Em.POLYFILL="P",Nm=Em,Pm=Ch.f,Om=function(e,t){var n,r,o,i,a,s=e.target,l=e.global,u=e.stat;if(n=l?oh:u?oh[s]||Lh(s,{}):(oh[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Pm(n,r))&&a.value:n[r],!Nm(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;wm(i,o)}(e.sham||o&&o.sham)&&Oh(i,"sham",!0),em(n,r,i,e)}},Lm=function(e,t){var n=[][e];return!!n&&ih((function(){n.call(null,t||function(){throw 1},1)}))},Am=[].join,Rm=hh!=Object,Dm=Lm("join",",");function Im(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function jm(e){if(e.type)return e;if("#"===e.charAt(0))return jm(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Mm(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function qm(e){var t="hsl"===(e=jm(e)).type?jm(function(e){var t=(e=jm(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Mm({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function zm(e,t){return e=jm(e),t=Im(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Mm(e)}Om({target:"Array",proto:!0,forced:Rm||!Dm},{join:function(e){return Am.call(gh(this),void 0===e?",":e)}});var Um=["xs","sm","md","lg","xl"];function Bm(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=wf(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=Um.indexOf(t);return r===Um.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[Um[r+1]]?n[Um[r+1]]:t)-a/100).concat(o,")")}return oc({keys:Um,values:n,up:l,down:function(e){var t=Um.indexOf(e)+1,r=n[Um[t]];return t===Um.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Fm(e,t,n){var r;return oc({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return oc({paddingLeft:t(2),paddingRight:t(2)},n,dc({},e.up("sm"),oc({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},dc(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),dc(r,e.up("sm"),{minHeight:64}),r)},n)}var Hm={black:"#000",white:"#fff"},Vm={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Wm="#7986cb",$m="#3f51b5",Gm="#303f9f",Km="#ff4081",Qm="#f50057",Xm="#c51162",Ym="#e57373",Jm="#f44336",Zm="#d32f2f",eg="#ffb74d",tg="#ff9800",ng="#f57c00",rg="#64b5f6",og="#2196f3",ig="#1976d2",ag="#81c784",sg="#4caf50",lg="#388e3c",ug={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Hm.white,default:Vm[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},cg={text:{primary:Hm.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Vm[800],default:"#303030"},action:{active:Hm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function dg(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=jm(e),t=Im(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return Mm(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=jm(e),t=Im(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Mm(e)}(e.main,1.5*r)))}function pg(e){var t=e.primary,n=void 0===t?{light:Wm,main:$m,dark:Gm}:t,r=e.secondary,o=void 0===r?{light:Km,main:Qm,dark:Xm}:r,i=e.error,a=void 0===i?{light:Ym,main:Jm,dark:Zm}:i,s=e.warning,l=void 0===s?{light:eg,main:tg,dark:ng}:s,u=e.info,c=void 0===u?{light:rg,main:og,dark:ig}:u,d=e.success,p=void 0===d?{light:ag,main:sg,dark:lg}:d,f=e.type,h=void 0===f?"light":f,m=e.contrastThreshold,g=void 0===m?3:m,v=e.tonalOffset,y=void 0===v?.2:v,b=wf(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){if(!e)throw new TypeError("Material-UI: missing background argument in getContrastText(".concat(e,")."));return function(e,t){var n=qm(e),r=qm(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,cg.text.primary)>=g?cg.text.primary:ug.text.primary}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=oc({},e)).main&&e[t]&&(e.main=e[t]),dg(e,"light",n,y),dg(e,"dark",r,y),e.contrastText||(e.contrastText=x(e.main)),e}var _={dark:cg,light:ug};return sc(oc({common:Hm,type:h,primary:w(n),secondary:w(o,"A400","A200","A700"),error:w(a),warning:w(l),info:w(c),success:w(p),grey:Vm,contrastThreshold:g,getContrastText:x,augmentColor:w,tonalOffset:y},_[h]),b)}function fg(e){return Math.round(1e5*e)/1e5}var hg={textTransform:"uppercase"};function mg(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,p=void 0===d?500:d,f=n.fontWeightBold,h=void 0===f?700:f,m=n.htmlFontSize,g=void 0===m?16:m,v=n.allVariants,y=n.pxToRem,b=wf(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,w=y||function(e){return"".concat(e/g*x,"rem")},_=function(e,t,n,r,i){return oc({fontFamily:o,fontWeight:e,fontSize:w(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(fg(r/t),"em")}:{},{},i,{},v)},E={h1:_(l,96,1.167,-1.5),h2:_(l,60,1.2,-.5),h3:_(c,48,1.167,0),h4:_(c,34,1.235,.25),h5:_(c,24,1.334,0),h6:_(p,20,1.6,.15),subtitle1:_(c,16,1.75,.15),subtitle2:_(p,14,1.57,.1),body1:_(c,16,1.5,.15),body2:_(c,14,1.43,.15),button:_(p,14,1.75,.4,hg),caption:_(c,12,1.66,.4),overline:_(c,12,2.66,1,hg)};return sc(oc({htmlFontSize:g,pxToRem:w,round:fg,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:p,fontWeightBold:h},E),b,{clone:!1})}function gg(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var vg=["none",gg(0,2,1,-1,0,1,1,0,0,1,3,0),gg(0,3,1,-2,0,2,2,0,0,1,5,0),gg(0,3,3,-2,0,3,4,0,0,1,8,0),gg(0,2,4,-1,0,4,5,0,0,1,10,0),gg(0,3,5,-1,0,5,8,0,0,1,14,0),gg(0,3,5,-1,0,6,10,0,0,1,18,0),gg(0,4,5,-2,0,7,10,1,0,2,16,1),gg(0,5,5,-3,0,8,10,1,0,3,14,2),gg(0,5,6,-3,0,9,12,1,0,3,16,2),gg(0,6,6,-3,0,10,14,1,0,4,18,3),gg(0,6,7,-4,0,11,15,1,0,4,20,3),gg(0,7,8,-4,0,12,17,2,0,5,22,4),gg(0,7,8,-4,0,13,19,2,0,5,24,4),gg(0,7,9,-4,0,14,21,2,0,5,26,4),gg(0,8,9,-5,0,15,22,2,0,6,28,5),gg(0,8,10,-5,0,16,24,2,0,6,30,5),gg(0,8,11,-5,0,17,26,2,0,6,32,5),gg(0,9,11,-5,0,18,28,2,0,7,34,6),gg(0,9,12,-6,0,19,29,2,0,7,36,6),gg(0,10,13,-6,0,20,31,3,0,8,38,7),gg(0,10,13,-6,0,21,33,3,0,8,40,7),gg(0,10,14,-6,0,22,35,3,0,8,42,7),gg(0,11,14,-7,0,23,36,3,0,9,44,8),gg(0,11,15,-7,0,24,38,3,0,9,46,8)],yg={borderRadius:4};function bg(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var xg={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wg={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function _g(e){return"".concat(Math.round(e),"ms")}var Eg={easing:xg,duration:wg,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?wg.standard:n,o=t.easing,i=void 0===o?xg.easeInOut:o,a=t.delay,s=void 0===a?0:a;wf(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:_g(r)," ").concat(i," ").concat("string"==typeof s?s:_g(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},kg={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Sg(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.spacing,l=e.typography,u=void 0===l?{}:l,c=wf(e,["breakpoints","mixins","palette","spacing","typography"]),d=pg(a),p=Bm(n),f=bg(s),h=sc({breakpoints:p,direction:"ltr",mixins:Fm(p,f,o),overrides:{},palette:d,props:{},shadows:vg,typography:mg(d,u),spacing:f,shape:yg,transitions:Eg,zIndex:kg},c),m=arguments.length,g=new Array(m>1?m-1:0),v=1;v<m;v++)g[v-1]=arguments[v];return h=g.reduce((function(e,t){return sc(e,t)}),h)}var Cg=Sg();function Tg(){return Tf()||Cg}function Ng(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,o=t.withTheme,i=void 0!==o&&o,a=t.name,s=wf(t,["defaultTheme","withTheme","name"]),l=a,u=Bf(e,oc({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=$.forwardRef((function(e,t){e.classes;var o,s=e.innerRef,l=wf(e,["classes","innerRef"]),c=u(e),d=l;return("string"==typeof a||i)&&(o=Tf()||r,a&&(d=qc({theme:o,name:a,props:l})),i&&!d.theme&&(d.theme=o)),$.createElement(n,oc({ref:s||t,classes:c},d))}));return c.defaultProps=n.defaultProps,th(c,n),c}}(e,oc({defaultTheme:Cg},t))}var Pg=Sg({palette:{type:"light",primary:{main:"#8E65C0"},secondary:{main:"#00A9DE"},text:{primary:"#463850",secondary:"#78717D"}},typography:{fontSize:16,lineHeight:1.7,fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen-Sans","Ubuntu","Cantarell",'"Helvetica Neue"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(",")},colors:{dark:"#252129",dark_light:"#473850",accent_blue:"#00A9DE",accent_purple:"#8E65C0",accent_green:"#00CAB6",white:"#ffffff",grey:"#f1f1f1",borders:"#dddddd",borders_alt:"#ebebeb",green:"#3BB371"},MuiButtonBase:{disableRipple:!0},themeName:"Pixelgrade Assistant Theme"});function Og(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ag(e,t,n){return t&&Lg(e.prototype,t),n&&Lg(e,n),e}function Rg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ig(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(n),!0).forEach((function(t){Rg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qg(e,t)}function Mg(e){return(Mg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qg(e,t){return(qg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ug(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?zg(e):t}var Bg=Array.isArray,Fg="object"==typeof e&&e&&e.Object===Object&&e,Hg="object"==typeof self&&self&&self.Object===Object&&self,Vg=Fg||Hg||Function("return this")(),Wg=Vg.Symbol,$g=Object.prototype,Gg=$g.hasOwnProperty,Kg=$g.toString,Qg=Wg?Wg.toStringTag:void 0;var Xg=function(e){var t=Gg.call(e,Qg),n=e[Qg];try{e[Qg]=void 0;var r=!0}catch(e){}var o=Kg.call(e);return r&&(t?e[Qg]=n:delete e[Qg]),o},Yg=Object.prototype.toString;var Jg=function(e){return Yg.call(e)},Zg=Wg?Wg.toStringTag:void 0;var ev=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zg&&Zg in Object(e)?Xg(e):Jg(e)};var tv=function(e){return null!=e&&"object"==typeof e};var nv=function(e){return"symbol"==typeof e||tv(e)&&"[object Symbol]"==ev(e)},rv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ov=/^\w*$/;var iv=function(e,t){if(Bg(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!nv(e))||(ov.test(e)||!rv.test(e)||null!=t&&e in Object(t))};var av=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var sv=function(e){if(!av(e))return!1;var t=ev(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},lv=Vg["__core-js_shared__"],uv=function(){var e=/[^.]+$/.exec(lv&&lv.keys&&lv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var cv=function(e){return!!uv&&uv in e},dv=Function.prototype.toString;var pv=function(e){if(null!=e){try{return dv.call(e)}catch(e){}try{return e+""}catch(e){}}return""},fv=/^\[object .+?Constructor\]$/,hv=Function.prototype,mv=Object.prototype,gv=hv.toString,vv=mv.hasOwnProperty,yv=RegExp("^"+gv.call(vv).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var bv=function(e){return!(!av(e)||cv(e))&&(sv(e)?yv:fv).test(pv(e))};var xv=function(e,t){return null==e?void 0:e[t]};var wv=function(e,t){var n=xv(e,t);return bv(n)?n:void 0},_v=wv(Object,"create");var Ev=function(){this.__data__=_v?_v(null):{},this.size=0};var kv=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Sv=Object.prototype.hasOwnProperty;var Cv=function(e){var t=this.__data__;if(_v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Sv.call(t,e)?t[e]:void 0},Tv=Object.prototype.hasOwnProperty;var Nv=function(e){var t=this.__data__;return _v?void 0!==t[e]:Tv.call(t,e)};var Pv=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_v&&void 0===t?"__lodash_hash_undefined__":t,this};function Ov(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ov.prototype.clear=Ev,Ov.prototype.delete=kv,Ov.prototype.get=Cv,Ov.prototype.has=Nv,Ov.prototype.set=Pv;var Lv=Ov;var Av=function(){this.__data__=[],this.size=0};var Rv=function(e,t){return e===t||e!=e&&t!=t};var Dv=function(e,t){for(var n=e.length;n--;)if(Rv(e[n][0],t))return n;return-1},Iv=Array.prototype.splice;var jv=function(e){var t=this.__data__,n=Dv(t,e);return!(n<0)&&(n==t.length-1?t.pop():Iv.call(t,n,1),--this.size,!0)};var Mv=function(e){var t=this.__data__,n=Dv(t,e);return n<0?void 0:t[n][1]};var qv=function(e){return Dv(this.__data__,e)>-1};var zv=function(e,t){var n=this.__data__,r=Dv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Uv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Uv.prototype.clear=Av,Uv.prototype.delete=jv,Uv.prototype.get=Mv,Uv.prototype.has=qv,Uv.prototype.set=zv;var Bv=Uv,Fv=wv(Vg,"Map");var Hv=function(){this.size=0,this.__data__={hash:new Lv,map:new(Fv||Bv),string:new Lv}};var Vv=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Wv=function(e,t){var n=e.__data__;return Vv(t)?n["string"==typeof t?"string":"hash"]:n.map};var $v=function(e){var t=Wv(this,e).delete(e);return this.size-=t?1:0,t};var Gv=function(e){return Wv(this,e).get(e)};var Kv=function(e){return Wv(this,e).has(e)};var Qv=function(e,t){var n=Wv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Xv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xv.prototype.clear=Hv,Xv.prototype.delete=$v,Xv.prototype.get=Gv,Xv.prototype.has=Kv,Xv.prototype.set=Qv;var Yv=Xv;function Jv(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Jv.Cache||Yv),n}Jv.Cache=Yv;var Zv=Jv;var ey=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ty=/\\(\\)?/g,ny=function(e){var t=Zv(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ey,(function(e,n,r,o){t.push(r?o.replace(ty,"$1"):n||e)})),t}));var ry=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},oy=Wg?Wg.prototype:void 0,iy=oy?oy.toString:void 0;var ay=function e(t){if("string"==typeof t)return t;if(Bg(t))return ry(t,e)+"";if(nv(t))return iy?iy.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var sy=function(e){return null==e?"":ay(e)};var ly=function(e,t){return Bg(e)?e:iv(e,t)?[e]:ny(sy(e))};var uy=function(e){if("string"==typeof e||nv(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var cy=function(e,t){for(var n=0,r=(t=ly(t,e)).length;null!=e&&n<r;)e=e[uy(t[n++])];return n&&n==r?e:void 0};var dy=function(e,t,n){var r=null==e?void 0:cy(e,t);return void 0===r?n:r};var py=function(e){return void 0===e};var fy=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),hy=function(){return Math.random().toString(36).substring(7).split("").join(".")},my={INIT:"@@redux/INIT"+hy(),REPLACE:"@@redux/REPLACE"+hy(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+hy()}};function gy(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function vy(e,t){return function(){return t(e.apply(this,arguments))}}var yy=function(){var e={is_logged:!1,has_license:!1,is_active:!1,is_expired:!1,is_wizard_next:!0,is_wizard_skip:!1,is_support_active:!1,is_pixelgrade_theme:!1,is_next_button_disabled:!1,hasOriginalDirName:!1,hasOriginalStyleName:!1,hasPxgTheme:dy(pixassist,"themeSupports.hasPxgTheme",!1),themeName:dy(pixassist,"themeSupports.theme_name","pixelgrade"),themeTitle:dy(pixassist,"themeSupports.theme_title","pixelgrade"),themeId:dy(pixassist,"themeSupports.theme_id",""),themeType:dy(pixassist,"themeSupports.theme_type","theme")};if(e.hasOriginalDirName=dy(pixassist,"themeSupports.theme_integrity.has_original_directory",!1),e.hasOriginalStyleName=dy(pixassist,"themeSupports.theme_integrity.has_original_name",!1),py(pixassist.themeSupports.original_slug)||(e.originalSlug=pixassist.themeSupports.original_slug),e.is_logged=!py(pixassist.user.pixassist_user_ID),e.is_wizard_next=!py(pixassist.user.pixassist_user_ID),e.has_license=!!dy(pixassist,"themeMod.licenseHash",""),py(pixassist.themeMod.licenseType)||(e.license_type=pixassist.themeMod.licenseType),dy(pixassist,"themeMod.licenseExpiryDate","")){var t=new Date(pixassist.themeMod.licenseExpiryDate);e.license_expiry=["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getDate()+", "+t.getFullYear()}return e.is_active=!!dy(pixassist,"themeMod.licenseStatus")&&("active"===pixassist.themeMod.licenseStatus||"valid"===pixassist.themeMod.licenseStatus),py(pixassist.user)||(e.user=pixassist.user),py(pixassist.themeMod)||(e.themeMod=pixassist.themeMod),py(pixassist.themeConfig)||(e.themeConfig=pixassist.themeConfig),e.is_pixelgrade_theme=!!dy(pixassist,"themeSupports.is_pixelgrade_theme",!1),e},by=function e(t,n,r){var o;if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(e)(t,n)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var i=t,a=n,s=[],l=s,u=!1;function c(){l===s&&(l=s.slice())}function d(){if(u)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function p(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(u)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return c(),l.push(e),function(){if(t){if(u)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,c();var n=l.indexOf(e);l.splice(n,1),s=null}}}function f(e){if(!gy(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,a=i(a,e)}finally{u=!1}for(var t=s=l,n=0;n<t.length;n++){(0,t[n])()}return e}function h(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,f({type:my.REPLACE})}function m(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[fy]=function(){return this},e}return f({type:my.INIT}),(o={dispatch:f,subscribe:p,getState:d,replaceReducer:h})[fy]=m,o}((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yy(),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CONNECT_URL_READY":return Ig({},e,{},{connect_url:t.url,user:Ig({},e.user,{},t.user)});case"CONNECT_URL_CLEAR":return Ig({},e,{},{connect_url:!1});case"CONNECT_OAUTH_TOKEN_CLEAR":return py(pixassist.user.oauth_token)||(pixassist.user.oauth_token=void 0),py(pixassist.user.oauth_token_secret)||(pixassist.user.oauth_token_secret=void 0),Ig({},e,{},{user:Ig({},e.user,{},{oauth_token:!1,oauth_token_secret:!1})});case"CONNECTED":return Ig({},e,{},{is_logged:!0,user:Ig({},e.user,{},t.user)});case"OAUTH_CONNECT_ERROR":return Ig({},e,{},{oauth_error:!0});case"HAS_LICENSE":return Ig({},e,{},{is_logged:!0,has_license:!0});case"NO_LICENSE":return Ig({},e,{},{is_logged:!0,has_license:!1});case"VALIDATED_LICENSE":return Ig({},e,{},{is_logged:!0,has_license:!0,is_active:!0,themeMod:{licenseHash:t.license.license_hash,licenseStatus:t.license.license_status,licenseType:t.license.license_type,licenseExpiryDate:t.license.license_expiry_date},license_type:t.license.license_type,license_status:t.license.license_status,license_expiry:t.license.license_expiry_date});case"EXPIRED_LICENSE":return Ig({},e,{},{is_logged:!0,has_license:!0,is_active:!1,is_expired:!0,themeMod:{licenseHash:t.license.license_hash,licenseStatus:t.license.license_status,licenseType:t.license.license_type,licenseExpiryDate:t.license.license_expiry_date},license_type:t.license.license_type,license_status:t.license.license_status,license_expiry:t.license.license_expiry_date});case"DISCONNECTED":return Ig({},e,{},{is_logged:!1,has_license:!1,is_active:!1,user:{}});case"LOADING":return Ig({},e,{},{loading:!0});case"LOADING_LICENSES":return Ig({},e,{},{loading:!0,loadingLicenses:!0});case"LOADING_DONE":return Ig({},e,{},{loading:!1});case"IS_SETUP_WIZARD":return Ig({},e,{},{is_wizard:!0});case"NEXT_BUTTON_AVAILABLE":return Ig({},e,{},{is_wizard_next:!0});case"NEXT_BUTTON_UNAVAILABLE":return Ig({},e,{},{is_wizard_next:!1});case"NEXT_BUTTON_DISABLED":return Ig({},e,{},{is_next_button_disabled:t.value});case"SKIP_BUTTON_AVAILABLE":return Ig({},e,{},{is_wizard_skip:!0});case"SKIP_BUTTON_UNAVAILABLE":return Ig({},e,{},{is_wizard_skip:!1});case"ON_SELECTED_THEME":return Ig({},e,{},{is_theme_selected:!0,selected_theme:t.theme_name});case"ON_INSTALLED_THEME":return Ig({},e,{},{is_theme_installed:!0,selected_theme:t.theme_name});case"ON_ACTIVATED_THEME":return Ig({},e,{},{is_theme_activated:!0,selected_theme:t.newState.themeName,has_license:t.newState.has_license,is_active:t.newState.is_active,is_support_active:t.newState.is_support_active,is_pixelgrade_theme:t.newState.is_pixelgrade_theme,hasOriginalDirName:t.newState.hasOriginalDirName,hasOriginalStyleName:t.newState.hasOriginalStyleName,hasPxgTheme:t.newState.hasPxgTheme,themeName:t.newState.themeName,themeTitle:t.newState.themeTitle,themeId:t.newState.themeId,themeType:t.newState.themeType});case"ON_UPDATED_THEME_MOD":case"ON_UPDATED_LOCALIZED":return Ig({},e,{},yy());case"ON_PLUGINS_INSTALLING":return Ig({},e,{},{did_plugins_install:!0,are_plugins_installing:!0,are_plugins_installed:!1});case"ON_PLUGINS_INSTALLED":return Ig({},e,{},{are_plugins_installing:!1,are_plugins_installed:!0});case"ON_PLUGINS_READY":return Ig({},e,{},{are_plugins_installing:!1,are_plugins_installed:!0,are_plugins_ready:!0});case"STARTER_CONTENT_INSTALLING":return Ig({},e,{},{is_sc_installing:!0,is_sc_done:!1,is_sc_errored:!1,is_sc_stopped:!1});case"STARTER_CONTENT_DONE":return Ig({},e,{},{is_sc_installing:!1,is_sc_done:!0,is_sc_errored:!1});case"STARTER_CONTENT_ERRORED":return Ig({},e,{},{is_sc_installing:!1,is_sc_done:!0,is_sc_errored:!0});case"STARTER_CONTENT_STOP":return Ig({},e,{},{is_sc_stopped:!0});case"STARTER_CONTENT_RESUME":return Ig({},e,{},{is_sc_stopped:!1});default:return e}}));by.subscribe((function(){var e=by.getState();if(e.user){var t=new CustomEvent("licenseStateChange",{detail:e});window.dispatchEvent(t)}}));var xy=$.createContext(null);var wy=function(e){e()},_y=function(){return wy},Ey={notify:function(){}};var ky=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=Ey,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=_y(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=Ey)},e}();function Sy(e){var t=e.store,n=e.context,r=e.children,o=re((function(){var e=new ky(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),i=re((function(){return t.getState()}),[t]);ne((function(){var e=o.subscription;return e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,i]);var a=n||xy;return $.createElement(a.Provider,{value:o},r)}var Cy="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?te:ne,Ty=[],Ny=[null,null];function Py(e,t){var n=e[1];return[t.payload,n+1]}function Oy(e,t,n){Cy((function(){return e.apply(void 0,t)}),n)}function Ly(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function Ay(e,t,n,r,o,i,a,s,l,u){if(e){var c=!1,d=null,p=function(){if(!c){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?a.current||l():(i.current=e,s.current=e,a.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var Ry=function(){return[null,0]};function Dy(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,i=n.methodName,a=void 0===i?"connectAdvanced":i,s=n.renderCountProp,l=void 0===s?void 0:s,u=n.shouldHandleStateChanges,c=void 0===u||u,d=n.storeKey,p=void 0===d?"store":d,f=(n.withRef,n.forwardRef),h=void 0!==f&&f,m=n.context,g=void 0===m?xy:m,v=Wc(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),y=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),i=oc({},v,{getDisplayName:o,methodName:a,renderCountProp:l,shouldHandleStateChanges:c,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure;var u=s?re:function(e){return e()};function d(n){var r=re((function(){var e=n.forwardedRef,t=Wc(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=r[0],a=r[1],s=r[2],l=re((function(){return o&&o.Consumer&&Ic($.createElement(o.Consumer,null))?o:y}),[o,y]),d=ie(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),f=(Boolean(d)&&Boolean(d.store),p?n.store:d.store),h=re((function(){return function(t){return e(t.dispatch,i)}(f)}),[f]),m=re((function(){if(!c)return Ny;var e=new ky(f,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,p,d]),g=m[0],v=m[1],b=re((function(){return p?d:oc({},d,{subscription:g})}),[p,d,g]),x=le(Py,Ty,Ry),w=x[0][0],_=x[1];if(w&&w.error)throw w.error;var E=ue(),k=ue(s),S=ue(),C=ue(!1),T=u((function(){return S.current&&s===k.current?S.current:h(f.getState(),s)}),[f,w,s]);Oy(Ly,[k,E,C,s,T,S,v]),Oy(Ay,[c,f,g,h,k,E,C,S,v,_],[f,g,h]);var N=re((function(){return $.createElement(t,oc({},T,{ref:a}))}),[a,t,T]);return re((function(){return c?$.createElement(l.Provider,{value:b},N):N}),[l,N,b])}var f=s?$.memo(d):d;if(f.WrappedComponent=t,f.displayName=r,h){var m=$.forwardRef((function(e,t){return $.createElement(f,oc({},e,{forwardedRef:t}))}));return m.displayName=r,m.WrappedComponent=t,th(m,t)}return th(f,t)}}function Iy(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function jy(e,t){if(Iy(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Iy(e[n[o]],t[n[o]]))return!1;return!0}function My(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function qy(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function zy(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=qy(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=qy(o),o=r(t,n)),o},r}}var Uy=[function(e){return"function"==typeof e?zy(e):void 0},function(e){return e?void 0:My((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?My((function(t){return function(e,t){if("function"==typeof e)return vy(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=vy(o,t))}return n}(e,t)})):void 0}];var By=[function(e){return"function"==typeof e?zy(e):void 0},function(e){return e?void 0:My((function(){return{}}))}];function Fy(e,t,n){return oc({},n,{},e,{},t)}var Hy=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,s){var l=e(t,n,s);return a?o&&i(l,r)||(r=l):(a=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return Fy}}];function Vy(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function Wy(e,t,n,r,o){var i,a,s,l,u,c=o.areStatesEqual,d=o.areOwnPropsEqual,p=o.areStatePropsEqual,f=!1;function h(o,f){var h,m,g=!d(f,a),v=!c(o,i);return i=o,a=f,g&&v?(s=e(i,a),t.dependsOnOwnProps&&(l=t(r,a)),u=n(s,l,a)):g?(e.dependsOnOwnProps&&(s=e(i,a)),t.dependsOnOwnProps&&(l=t(r,a)),u=n(s,l,a)):v?(h=e(i,a),m=!p(h,s),s=h,m&&(u=n(s,l,a)),u):u}return function(o,c){return f?h(o,c):(s=e(i=o,a=c),l=t(r,a),u=n(s,l,a),f=!0,u)}}function $y(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=Wc(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),s=r(e,i),l=o(e,i);return(i.pure?Wy:Vy)(a,s,l,e,i)}function Gy(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Ky(e,t){return e===t}var Qy=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Dy:n,o=t.mapStateToPropsFactories,i=void 0===o?By:o,a=t.mapDispatchToPropsFactories,s=void 0===a?Uy:a,l=t.mergePropsFactories,u=void 0===l?Hy:l,c=t.selectorFactory,d=void 0===c?$y:c;return function(e,t,n,o){void 0===o&&(o={});var a=o,l=a.pure,c=void 0===l||l,p=a.areStatesEqual,f=void 0===p?Ky:p,h=a.areOwnPropsEqual,m=void 0===h?jy:h,g=a.areStatePropsEqual,v=void 0===g?jy:g,y=a.areMergedPropsEqual,b=void 0===y?jy:y,x=Wc(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),w=Gy(e,i,"mapStateToProps"),_=Gy(t,s,"mapDispatchToProps"),E=Gy(n,u,"mergeProps");return r(d,oc({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:_,initMergeProps:E,pure:c,areStatesEqual:f,areOwnPropsEqual:m,areStatePropsEqual:v,areMergedPropsEqual:b},x))}}();wy=nc;var Xy=Object.defineProperty,Yy={},Jy=function(e){throw e},Zy=function(e,t){if(xh(Yy,e))return Yy[e];t||(t={});var n=[][e],r=!!xh(t,"ACCESSORS")&&t.ACCESSORS,o=xh(t,0)?t[0]:Jy,i=xh(t,1)?t[1]:void 0;return Yy[e]=!!n&&!ih((function(){if(r&&!ah)return!0;var e={length:-1};r?Xy(e,1,{enumerable:!0,get:Jy}):e[1]=1,n.call(e,o,i)}))},eb=fm.indexOf,tb=[].indexOf,nb=!!tb&&1/[1].indexOf(1,-0)<0,rb=Lm("indexOf"),ob=Zy("indexOf",{ACCESSORS:!0,1:0});Om({target:"Array",proto:!0,forced:nb||!rb||!ob},{indexOf:function(e){return nb?tb.apply(this,arguments)||0:eb(this,e,arguments.length>1?arguments[1]:void 0)}});var ib,ab,sb=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},lb=function(e,t,n){if(sb(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},ub=function(e){return Object(mh(e))},cb=Array.isArray||function(e){return"Array"==ph(e)},db=!!Object.getOwnPropertySymbols&&!ih((function(){return!String(Symbol())})),pb=db&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fb=Uh("wks"),hb=oh.Symbol,mb=pb?hb:hb&&hb.withoutSetter||Hh,gb=function(e){return xh(fb,e)||(db&&xh(hb,e)?fb[e]=hb[e]:fb[e]=mb("Symbol."+e)),fb[e]},vb=gb("species"),yb=function(e,t){var n;return cb(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!cb(n.prototype)?vh(n)&&null===(n=n[vb])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},bb=[].push,xb=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=5==e||i;return function(s,l,u,c){for(var d,p,f=ub(s),h=hh(f),m=lb(l,u,3),g=lm(h.length),v=0,y=c||yb,b=t?y(s,g):n?y(s,0):void 0;g>v;v++)if((a||v in h)&&(p=m(d=h[v],v,f),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return v;case 2:bb.call(b,d)}else if(o)return!1;return i?-1:r||o?o:b}},wb={forEach:xb(0),map:xb(1),filter:xb(2),some:xb(3),every:xb(4),find:xb(5),findIndex:xb(6)},_b=rm("navigator","userAgent")||"",Eb=oh.process,kb=Eb&&Eb.versions,Sb=kb&&kb.v8;Sb?ab=(ib=Sb.split("."))[0]+ib[1]:_b&&(!(ib=_b.match(/Edge\/(\d+)/))||ib[1]>=74)&&(ib=_b.match(/Chrome\/(\d+)/))&&(ab=ib[1]);var Cb=ab&&+ab,Tb=gb("species"),Nb=function(e){return Cb>=51||!ih((function(){var t=[];return(t.constructor={})[Tb]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pb=wb.map,Ob=Nb("map"),Lb=Zy("map");Om({target:"Array",proto:!0,forced:!Ob||!Lb},{map:function(e){return Pb(this,e,arguments.length>1?arguments[1]:void 0)}});var Ab=Object.keys||function(e){return mm(e,gm)};Om({target:"Object",stat:!0,forced:ih((function(){Ab(1)}))},{keys:function(e){return Ab(ub(e))}});var Rb=Array.prototype.join;var Db=function(e,t){return null==e?"":Rb.call(e,t)};var Ib=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var jb=function(e){return e!=e};var Mb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var qb=function(e,t,n){return t==t?Mb(e,t,n):Ib(e,jb,n)},zb=/^\s+|\s+$/g,Ub=/^[-+]0x[0-9a-f]+$/i,Bb=/^0b[01]+$/i,Fb=/^0o[0-7]+$/i,Hb=parseInt;var Vb=function(e){if("number"==typeof e)return e;if(nv(e))return NaN;if(av(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=av(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(zb,"");var n=Bb.test(e);return n||Fb.test(e)?Hb(e.slice(2),n?2:8):Ub.test(e)?NaN:+e};var Wb=function(e){return e?(e=Vb(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var $b=function(e){var t=Wb(e),n=t%1;return t==t?n?t-n:t:0},Gb=Math.max;var Kb=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:$b(n);return o<0&&(o=Gb(r+o,0)),qb(e,t,o)};var Qb=function(){if(!arguments.length)return[];var e=arguments[0];return Bg(e)?e:[e]};var Xb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var Yb=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}();var Jb=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Zb=function(e){return tv(e)&&"[object Arguments]"==ev(e)},ex=Object.prototype,tx=ex.hasOwnProperty,nx=ex.propertyIsEnumerable,rx=Zb(function(){return arguments}())?Zb:function(e){return tv(e)&&tx.call(e,"callee")&&!nx.call(e,"callee")};var ox=function(){return!1},ix=n((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?Vg.Buffer:void 0,i=(o?o.isBuffer:void 0)||ox;e.exports=i})),ax=/^(?:0|[1-9]\d*)$/;var sx=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ax.test(e))&&e>-1&&e%1==0&&e<t};var lx=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ux={};ux["[object Float32Array]"]=ux["[object Float64Array]"]=ux["[object Int8Array]"]=ux["[object Int16Array]"]=ux["[object Int32Array]"]=ux["[object Uint8Array]"]=ux["[object Uint8ClampedArray]"]=ux["[object Uint16Array]"]=ux["[object Uint32Array]"]=!0,ux["[object Arguments]"]=ux["[object Array]"]=ux["[object ArrayBuffer]"]=ux["[object Boolean]"]=ux["[object DataView]"]=ux["[object Date]"]=ux["[object Error]"]=ux["[object Function]"]=ux["[object Map]"]=ux["[object Number]"]=ux["[object Object]"]=ux["[object RegExp]"]=ux["[object Set]"]=ux["[object String]"]=ux["[object WeakMap]"]=!1;var cx=function(e){return tv(e)&&lx(e.length)&&!!ux[ev(e)]};var dx=function(e){return function(t){return e(t)}},px=n((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n&&Fg.process,i=function(){try{var e=r&&r.require&&r.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=i})),fx=px&&px.isTypedArray,hx=fx?dx(fx):cx,mx=Object.prototype.hasOwnProperty;var gx=function(e,t){var n=Bg(e),r=!n&&rx(e),o=!n&&!r&&ix(e),i=!n&&!r&&!o&&hx(e),a=n||r||o||i,s=a?Jb(e.length,String):[],l=s.length;for(var u in e)!t&&!mx.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||sx(u,l))||s.push(u);return s},vx=Object.prototype;var yx=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||vx)};var bx=function(e,t){return function(n){return e(t(n))}},xx=bx(Object.keys,Object),wx=Object.prototype.hasOwnProperty;var _x=function(e){if(!yx(e))return xx(e);var t=[];for(var n in Object(e))wx.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Ex=function(e){return null!=e&&lx(e.length)&&!sv(e)};var kx=function(e){return Ex(e)?gx(e):_x(e)};var Sx=function(e,t){return function(n,r){if(null==n)return n;if(!Ex(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(e,t){return e&&Yb(e,t,kx)}));var Cx=function(e,t){var n=[];return Sx(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n};var Tx=function(){this.__data__=new Bv,this.size=0};var Nx=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Px=function(e){return this.__data__.get(e)};var Ox=function(e){return this.__data__.has(e)};var Lx=function(e,t){var n=this.__data__;if(n instanceof Bv){var r=n.__data__;if(!Fv||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yv(r)}return n.set(e,t),this.size=n.size,this};function Ax(e){var t=this.__data__=new Bv(e);this.size=t.size}Ax.prototype.clear=Tx,Ax.prototype.delete=Nx,Ax.prototype.get=Px,Ax.prototype.has=Ox,Ax.prototype.set=Lx;var Rx=Ax;var Dx=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Ix=function(e){return this.__data__.has(e)};function jx(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yv;++t<n;)this.add(e[t])}jx.prototype.add=jx.prototype.push=Dx,jx.prototype.has=Ix;var Mx=jx;var qx=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var zx=function(e,t){return e.has(t)};var Ux=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var c=-1,d=!0,p=2&n?new Mx:void 0;for(i.set(e,t),i.set(t,e);++c<s;){var f=e[c],h=t[c];if(r)var m=a?r(h,f,c,t,e,i):r(f,h,c,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!qx(t,(function(e,t){if(!zx(p,t)&&(f===e||o(f,e,n,r,i)))return p.push(t)}))){d=!1;break}}else if(f!==h&&!o(f,h,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Bx=Vg.Uint8Array;var Fx=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var Hx=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Vx=Wg?Wg.prototype:void 0,Wx=Vx?Vx.valueOf:void 0;var $x=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Bx(e),new Bx(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Rv(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Fx;case"[object Set]":var l=1&r;if(s||(s=Hx),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=Ux(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(Wx)return Wx.call(e)==Wx.call(t)}return!1};var Gx=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var Kx=function(e,t,n){var r=t(e);return Bg(e)?r:Gx(r,n(e))};var Qx=function(){return[]},Xx=Object.prototype.propertyIsEnumerable,Yx=Object.getOwnPropertySymbols,Jx=Yx?function(e){return null==e?[]:(e=Object(e),Xb(Yx(e),(function(t){return Xx.call(e,t)})))}:Qx;var Zx=function(e){return Kx(e,kx,Jx)},ew=Object.prototype.hasOwnProperty;var tw=function(e,t,n,r,o,i){var a=1&n,s=Zx(e),l=s.length;if(l!=Zx(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:ew.call(t,c)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var p=!0;i.set(e,t),i.set(t,e);for(var f=a;++u<l;){var h=e[c=s[u]],m=t[c];if(r)var g=a?r(m,h,c,t,e,i):r(h,m,c,e,t,i);if(!(void 0===g?h===m||o(h,m,n,r,i):g)){p=!1;break}f||(f="constructor"==c)}if(p&&!f){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(p=!1)}return i.delete(e),i.delete(t),p},nw=wv(Vg,"DataView"),rw=wv(Vg,"Promise"),ow=wv(Vg,"Set"),iw=wv(Vg,"WeakMap"),aw=pv(nw),sw=pv(Fv),lw=pv(rw),uw=pv(ow),cw=pv(iw),dw=ev;(nw&&"[object DataView]"!=dw(new nw(new ArrayBuffer(1)))||Fv&&"[object Map]"!=dw(new Fv)||rw&&"[object Promise]"!=dw(rw.resolve())||ow&&"[object Set]"!=dw(new ow)||iw&&"[object WeakMap]"!=dw(new iw))&&(dw=function(e){var t=ev(e),n="[object Object]"==t?e.constructor:void 0,r=n?pv(n):"";if(r)switch(r){case aw:return"[object DataView]";case sw:return"[object Map]";case lw:return"[object Promise]";case uw:return"[object Set]";case cw:return"[object WeakMap]"}return t});var pw=dw,fw=Object.prototype.hasOwnProperty;var hw=function(e,t,n,r,o,i){var a=Bg(e),s=Bg(t),l=a?"[object Array]":pw(e),u=s?"[object Array]":pw(t),c="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),p=l==u;if(p&&ix(e)){if(!ix(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new Rx),a||hx(e)?Ux(e,t,n,r,o,i):$x(e,t,l,n,r,o,i);if(!(1&n)){var f=c&&fw.call(e,"__wrapped__"),h=d&&fw.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,g=h?t.value():t;return i||(i=new Rx),o(m,g,n,r,i)}}return!!p&&(i||(i=new Rx),tw(e,t,n,r,o,i))};var mw=function e(t,n,r,o,i){return t===n||(null==t||null==n||!tv(t)&&!tv(n)?t!=t&&n!=n:hw(t,n,r,o,e,i))};var gw=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new Rx;if(r)var p=r(u,c,l,e,t,d);if(!(void 0===p?mw(c,u,3,r,d):p))return!1}}return!0};var vw=function(e){return e==e&&!av(e)};var yw=function(e){for(var t=kx(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,vw(o)]}return t};var bw=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var xw=function(e){var t=yw(e);return 1==t.length&&t[0][2]?bw(t[0][0],t[0][1]):function(n){return n===e||gw(n,e,t)}};var ww=function(e,t){return null!=e&&t in Object(e)};var _w=function(e,t,n){for(var r=-1,o=(t=ly(t,e)).length,i=!1;++r<o;){var a=uy(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&lx(o)&&sx(a,o)&&(Bg(e)||rx(e))};var Ew=function(e,t){return null!=e&&_w(e,t,ww)};var kw=function(e,t){return iv(e)&&vw(t)?bw(uy(e),t):function(n){var r=dy(n,e);return void 0===r&&r===t?Ew(n,e):mw(t,r,3)}};var Sw=function(e){return e};var Cw=function(e){return function(t){return null==t?void 0:t[e]}};var Tw=function(e){return function(t){return cy(t,e)}};var Nw=function(e){return iv(e)?Cw(uy(e)):Tw(e)};var Pw=function(e){return"function"==typeof e?e:null==e?Sw:"object"==typeof e?Bg(e)?kw(e[0],e[1]):xw(e):Nw(e)};var Ow=function(e,t){return(Bg(e)?Xb:Cx)(e,Pw(t))};var Lw=function(e){return"string"==typeof e||!Bg(e)&&tv(e)&&"[object String]"==ev(e)},Aw=Cw("length"),Rw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Dw=function(e){return Rw.test(e)},Iw="[\\ud800-\\udfff]",jw="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Mw="\\ud83c[\\udffb-\\udfff]",qw="[^\\ud800-\\udfff]",zw="(?:\\ud83c[\\udde6-\\uddff]){2}",Uw="[\\ud800-\\udbff][\\udc00-\\udfff]",Bw="(?:"+jw+"|"+Mw+")"+"?",Fw="[\\ufe0e\\ufe0f]?"+Bw+("(?:\\u200d(?:"+[qw,zw,Uw].join("|")+")[\\ufe0e\\ufe0f]?"+Bw+")*"),Hw="(?:"+[qw+jw+"?",jw,zw,Uw,Iw].join("|")+")",Vw=RegExp(Mw+"(?="+Mw+")|"+Hw+Fw,"g");var Ww=function(e){for(var t=Vw.lastIndex=0;Vw.test(e);)++t;return t};var $w=function(e){return Dw(e)?Ww(e):Aw(e)};var Gw=function(e){if(null==e)return 0;if(Ex(e))return Lw(e)?$w(e):e.length;var t=pw(e);return"[object Map]"==t||"[object Set]"==t?e.size:_x(e).length},Kw=Z((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=e.children,a=e.classes,s=e.className,l=e.completed,u=void 0!==l&&l,c=e.connector,d=e.disabled,p=void 0!==d&&d,f=e.expanded,h=void 0!==f&&f,m=e.index,g=e.last,v=e.orientation,y=wf(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","expanded","index","last","orientation"]);return X("div",oc({className:Hf(a.root,a[v],s,o&&a.alternativeLabel,u&&a.completed),ref:t},y),c&&o&&0!==m&&Q(c,{orientation:v,alternativeLabel:o,index:m,active:r,completed:u,disabled:p}),K.map(i,(function(e){return G(e)?Q(e,oc({active:r,alternativeLabel:o,completed:u,disabled:p,expanded:h,last:g,icon:m+1,orientation:v},e.props)):null})))})),Qw=Ng({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(Kw),Xw=Z((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,p=wf(e,["classes","className","component","square","elevation","variant"]);return X(i,oc({className:Hf(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},p))})),Yw=Ng((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),oc({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Xw),Jw=Z((function(e,t){var n=e.active,r=e.alternativeLabel,o=void 0!==r&&r,i=e.classes,a=e.className,s=e.completed,l=e.disabled,u=(e.index,e.orientation),c=void 0===u?"horizontal":u,d=wf(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return X("div",oc({className:Hf(i.root,i[c],a,o&&i.alternativeLabel,n&&i.active,s&&i.completed,l&&i.disabled),ref:t},d),X("span",{className:Hf(i.line,"vertical"===c?i.lineVertical:i.lineHorizontal)}))})),Zw=Ng((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(Jw),e_=X(Zw,null),t_=Z((function(e,t){var n=e.activeStep,r=void 0===n?0:n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,u=e.connector,c=void 0===u?e_:u,d=e.nonLinear,p=void 0!==d&&d,f=e.orientation,h=void 0===f?"horizontal":f,m=wf(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=G(c)?Q(c,{orientation:h}):null,v=K.toArray(a),y=v.map((function(e,t){var n={alternativeLabel:i,connector:c,last:t+1===v.length,orientation:h},o={index:t,active:!1,completed:!1,disabled:!1};return r===t?o.active=!0:!p&&r>t?o.completed=!0:!p&&r<t&&(o.disabled=!0),[!i&&g&&0!==t&&Q(g,oc({key:t},o)),Q(e,oc({},n,{},o,{},e.props))]}));return X(Yw,oc({square:!0,elevation:0,className:Hf(s.root,s[h],l,i&&s.alternativeLabel),ref:t},m),y)})),n_=Ng({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(t_);function r_(e){return e.charAt(0).toUpperCase()+e.slice(1)}var o_={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},i_=Z((function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,p=void 0!==d&&d,f=e.noWrap,h=void 0!==f&&f,m=e.paragraph,g=void 0!==m&&m,v=e.variant,y=void 0===v?"body1":v,b=e.variantMapping,x=void 0===b?o_:b,w=wf(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),_=l||(g?"p":x[y]||o_[y])||"span";return X(_,oc({className:Hf(o.root,i,"inherit"!==y&&o[y],"initial"!==s&&o["color".concat(r_(s))],h&&o.noWrap,p&&o.gutterBottom,g&&o.paragraph,"inherit"!==r&&o["align".concat(r_(r))],"initial"!==c&&o["display".concat(r_(c))]),ref:t},w))})),a_=Ng((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(i_),s_=Z((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"inherit":i,s=e.component,l=void 0===s?"svg":s,u=e.fontSize,c=void 0===u?"default":u,d=e.htmlColor,p=e.titleAccess,f=e.viewBox,h=void 0===f?"0 0 24 24":f,m=wf(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return X(l,oc({className:Hf(r.root,o,"inherit"!==a&&r["color".concat(r_(a))],"default"!==c&&r["fontSize".concat(r_(c))]),focusable:"false",viewBox:h,color:d,"aria-hidden":p?void 0:"true",role:p?"img":"presentation",ref:t},m),n,p?X("title",null,p):null)}));s_.muiName="SvgIcon";var l_=Ng((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(s_);function u_(e,t){var n=ce(Z((function(t,n){return X(l_,oc({},t,{ref:n}),e)})));return n.muiName=l_.muiName,n}var c_=u_(X("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),d_=u_(X("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),p_=X("circle",{cx:"12",cy:"12",r:"12"}),f_=Z((function(e,t){var n=e.completed,r=void 0!==n&&n,o=e.icon,i=e.active,a=void 0!==i&&i,s=e.error,l=void 0!==s&&s,u=e.classes;if("number"==typeof o||"string"==typeof o){var c=Hf(u.root,a&&u.active,l&&u.error,r&&u.completed);return l?X(d_,{className:c,ref:t}):r?X(c_,{className:c,ref:t}):X(l_,{className:c,ref:t},p_,X("text",{className:u.text,x:"12",y:"16",textAnchor:"middle"},o))}return o})),h_=Ng((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$completed":{color:e.palette.primary.main},"&$active":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(f_),m_=Z((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,u=e.completed,c=void 0!==u&&u,d=e.disabled,p=void 0!==d&&d,f=e.error,h=void 0!==f&&f,m=(e.expanded,e.icon),g=(e.last,e.optional),v=e.orientation,y=void 0===v?"horizontal":v,b=e.StepIconComponent,x=e.StepIconProps,w=wf(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","expanded","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),_=b;return m&&!_&&(_=h_),X("span",oc({className:Hf(s.root,s[y],l,p&&s.disabled,i&&s.alternativeLabel,h&&s.error),ref:t},w),m||_?X("span",{className:Hf(s.iconContainer,i&&s.alternativeLabel)},X(_,oc({completed:c,active:r,error:h,icon:m},x))):null,X("span",{className:s.labelContainer},X(a_,{variant:"body2",component:"span",className:Hf(s.label,i&&s.alternativeLabel,c&&s.completed,r&&s.active,h&&s.error),display:"block"},a),g))}));m_.muiName="StepLabel";var g_=Ng((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(m_),v_=n((function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}}}));t(v_);var y_=n((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t})),b_=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i=r.default.memo(r.default.forwardRef((function(t,i){return r.default.createElement(o.default,(0,n.default)({ref:i},t),e)})));return i.muiName=o.default.muiName,i};var n=v_(y_),r=v_($),o=v_(l_)}));t(b_);var x_=t(n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=v_($),r=(0,v_(b_).default)(n.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");t.default=r})));function w_(e){return e=function(e,t,n){return(Math.min(Math.max(t,e),n)-t)/(n-t)}(e,0,1),e=(e-=1)*e*e+1}var __=Z((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"primary":o,a=e.disableShrink,s=void 0!==a&&a,l=e.size,u=void 0===l?40:l,c=e.style,d=e.thickness,p=void 0===d?3.6:d,f=e.value,h=void 0===f?0:f,m=e.variant,g=void 0===m?"indeterminate":m,v=wf(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),y={},b={},x={};if("determinate"===g||"static"===g){var w=2*Math.PI*((44-p)/2);y.strokeDasharray=w.toFixed(3),x["aria-valuenow"]=Math.round(h),"static"===g?(y.strokeDashoffset="".concat(((100-h)/100*w).toFixed(3),"px"),b.transform="rotate(-90deg)"):(y.strokeDashoffset="".concat((function(e){return e*e}((100-h)/100)*w).toFixed(3),"px"),b.transform="rotate(".concat((270*w_(h/70)).toFixed(3),"deg)"))}return X("div",oc({className:Hf(n.root,r,"inherit"!==i&&n["color".concat(r_(i))],{indeterminate:n.indeterminate,static:n.static}[g]),style:oc({width:u,height:u},b,{},c),ref:t,role:"progressbar"},x,v),X("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44)},X("circle",{className:Hf(n.circle,s&&n.circleDisableShrink,{indeterminate:n.circleIndeterminate,static:n.circleStatic}[g]),style:y,cx:44,cy:44,r:(44-p)/2,fill:"none",strokeWidth:p})))})),E_=Ng((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(__),k_=function(e,t,n){var r=yh(t);r in e?Ph.f(e,r,ch(0,n)):e[r]=n},S_=gb("isConcatSpreadable"),C_=Cb>=51||!ih((function(){var e=[];return e[S_]=!1,e.concat()[0]!==e})),T_=Nb("concat"),N_=function(e){if(!vh(e))return!1;var t=e[S_];return void 0!==t?!!t:cb(e)};Om({target:"Array",proto:!0,forced:!C_||!T_},{concat:function(e){var t,n,r,o,i,a=ub(this),s=yb(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(i=-1===t?a:arguments[t],N_(i)){if(l+(o=lm(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,l++)n in i&&k_(s,l,i[n])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");k_(s,l++,i)}return s.length=l,s}});var P_=wb.forEach,O_=Lm("forEach"),L_=Zy("forEach"),A_=O_&&L_?[].forEach:function(e){return P_(this,e,arguments.length>1?arguments[1]:void 0)};Om({target:"Array",proto:!0,forced:[].forEach!=A_},{forEach:A_});var R_={};R_[gb("toStringTag")]="z";var D_="[object z]"===String(R_),I_=gb("toStringTag"),j_="Arguments"==ph(function(){return arguments}()),M_=D_?ph:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),I_))?n:j_?ph(t):"Object"==(r=ph(t))&&"function"==typeof t.callee?"Arguments":r},q_=D_?{}.toString:function(){return"[object "+M_(this)+"]"};D_||em(Object.prototype,"toString",q_,{unsafe:!0});var z_=oh.Promise,U_=Ph.f,B_=gb("toStringTag"),F_=function(e,t,n){e&&!xh(e=n?e:e.prototype,B_)&&U_(e,B_,{configurable:!0,value:t})},H_=gb("species"),V_=function(e){var t=rm(e),n=Ph.f;ah&&t&&!t[H_]&&n(t,H_,{configurable:!0,get:function(){return this}})},W_={},$_=gb("iterator"),G_=Array.prototype,K_=gb("iterator"),Q_=function(e,t,n,r){try{return r?t(Th(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&Th(o.call(e)),t}},X_=n((function(e){var t=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,n,r,o,i){var a,s,l,u,c,d,p,f=lb(n,r,o?2:1);if(i)a=e;else{if("function"!=typeof(s=function(e){if(null!=e)return e[K_]||e["@@iterator"]||W_[M_(e)]}(e)))throw TypeError("Target is not iterable");if(function(e){return void 0!==e&&(W_.Array===e||G_[$_]===e)}(s)){for(l=0,u=lm(e.length);u>l;l++)if((c=o?f(Th(p=e[l])[0],p[1]):f(e[l]))&&c instanceof t)return c;return new t(!1)}a=s.call(e)}for(d=a.next;!(p=d.call(a)).done;)if("object"==typeof(c=Q_(a,f,p.value,o))&&c&&c instanceof t)return c;return new t(!1)}).stop=function(e){return new t(!0,e)}})),Y_=gb("iterator"),J_=!1;try{var Z_=0,eE={next:function(){return{done:!!Z_++}},return:function(){J_=!0}};eE[Y_]=function(){return this},Array.from(eE,(function(){throw 2}))}catch(e){}var tE,nE,rE,oE=gb("species"),iE=function(e,t){var n,r=Th(e).constructor;return void 0===r||null==(n=Th(r)[oE])?t:sb(n)},aE=rm("document","documentElement"),sE=/(iphone|ipod|ipad).*applewebkit/i.test(_b),lE=oh.location,uE=oh.setImmediate,cE=oh.clearImmediate,dE=oh.process,pE=oh.MessageChannel,fE=oh.Dispatch,hE=0,mE={},gE=function(e){if(mE.hasOwnProperty(e)){var t=mE[e];delete mE[e],t()}},vE=function(e){return function(){gE(e)}},yE=function(e){gE(e.data)},bE=function(e){oh.postMessage(e+"",lE.protocol+"//"+lE.host)};uE&&cE||(uE=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return mE[++hE]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},tE(hE),hE},cE=function(e){delete mE[e]},"process"==ph(dE)?tE=function(e){dE.nextTick(vE(e))}:fE&&fE.now?tE=function(e){fE.now(vE(e))}:pE&&!sE?(rE=(nE=new pE).port2,nE.port1.onmessage=yE,tE=lb(rE.postMessage,rE,1)):!oh.addEventListener||"function"!=typeof postMessage||oh.importScripts||ih(bE)?tE="onreadystatechange"in Eh("script")?function(e){aE.appendChild(Eh("script")).onreadystatechange=function(){aE.removeChild(this),gE(e)}}:function(e){setTimeout(vE(e),0)}:(tE=bE,oh.addEventListener("message",yE,!1)));var xE,wE,_E,EE,kE,SE,CE,TE,NE={set:uE,clear:cE},PE=Ch.f,OE=NE.set,LE=oh.MutationObserver||oh.WebKitMutationObserver,AE=oh.process,RE=oh.Promise,DE="process"==ph(AE),IE=PE(oh,"queueMicrotask"),jE=IE&&IE.value;jE||(xE=function(){var e,t;for(DE&&(e=AE.domain)&&e.exit();wE;){t=wE.fn,wE=wE.next;try{t()}catch(e){throw wE?EE():_E=void 0,e}}_E=void 0,e&&e.enter()},DE?EE=function(){AE.nextTick(xE)}:LE&&!sE?(kE=!0,SE=document.createTextNode(""),new LE(xE).observe(SE,{characterData:!0}),EE=function(){SE.data=kE=!kE}):RE&&RE.resolve?(CE=RE.resolve(void 0),TE=CE.then,EE=function(){TE.call(CE,xE)}):EE=function(){OE.call(oh,xE)});var ME,qE,zE,UE,BE=jE||function(e){var t={fn:e,next:void 0};_E&&(_E.next=t),wE||(wE=t,EE()),_E=t},FE=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=sb(t),this.reject=sb(n)},HE={f:function(e){return new FE(e)}},VE=function(e,t){if(Th(e),vh(t)&&t.constructor===e)return t;var n=HE.f(e);return(0,n.resolve)(t),n.promise},WE=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},$E=NE.set,GE=gb("species"),KE="Promise",QE=Zh.get,XE=Zh.set,YE=Zh.getterFor(KE),JE=z_,ZE=oh.TypeError,ek=oh.document,tk=oh.process,nk=rm("fetch"),rk=HE.f,ok=rk,ik="process"==ph(tk),ak=!!(ek&&ek.createEvent&&oh.dispatchEvent),sk=Nm(KE,(function(){if(!(Mh(JE)!==String(JE))){if(66===Cb)return!0;if(!ik&&"function"!=typeof PromiseRejectionEvent)return!0}if(Cb>=51&&/native code/.test(JE))return!1;var e=JE.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[GE]=t,!(e.then((function(){}))instanceof t)})),lk=sk||!function(e,t){if(!t&&!J_)return!1;var n=!1;try{var r={};r[Y_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){JE.all(e).catch((function(){}))})),uk=function(e){var t;return!(!vh(e)||"function"!=typeof(t=e.then))&&t},ck=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;BE((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var s,l,u,c=r[a++],d=i?c.ok:c.fail,p=c.resolve,f=c.reject,h=c.domain;try{d?(i||(2===t.rejection&&hk(e,t),t.rejection=1),!0===d?s=o:(h&&h.enter(),s=d(o),h&&(h.exit(),u=!0)),s===c.promise?f(ZE("Promise-chain cycle")):(l=uk(s))?l.call(s,p,f):p(s)):f(o)}catch(e){h&&!u&&h.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&pk(e,t)}))}},dk=function(e,t,n){var r,o;ak?((r=ek.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),oh.dispatchEvent(r)):r={promise:t,reason:n},(o=oh["on"+e])?o(r):"unhandledrejection"===e&&function(e,t){var n=oh.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},pk=function(e,t){$E.call(oh,(function(){var n,r=t.value;if(fk(t)&&(n=WE((function(){ik?tk.emit("unhandledRejection",r,e):dk("unhandledrejection",e,r)})),t.rejection=ik||fk(t)?2:1,n.error))throw n.value}))},fk=function(e){return 1!==e.rejection&&!e.parent},hk=function(e,t){$E.call(oh,(function(){ik?tk.emit("rejectionHandled",e):dk("rejectionhandled",e,t.value)}))},mk=function(e,t,n,r){return function(o){e(t,n,o,r)}},gk=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,ck(e,t,!0))},vk=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw ZE("Promise can't be resolved itself");var o=uk(n);o?BE((function(){var r={done:!1};try{o.call(n,mk(vk,e,r,t),mk(gk,e,r,t))}catch(n){gk(e,r,n,t)}})):(t.value=n,t.state=1,ck(e,t,!1))}catch(n){gk(e,{done:!1},n,t)}}};sk&&(JE=function(e){!function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,JE,KE),sb(e),ME.call(this);var t=QE(this);try{e(mk(vk,this,t),mk(gk,this,t))}catch(e){gk(this,t,e)}},(ME=function(e){XE(this,{type:KE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,n){for(var r in t)em(e,r,t[r],n);return e}(JE.prototype,{then:function(e,t){var n=YE(this),r=rk(iE(this,JE));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=ik?tk.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ck(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),qE=function(){var e=new ME,t=QE(e);this.promise=e,this.resolve=mk(vk,e,t),this.reject=mk(gk,e,t)},HE.f=rk=function(e){return e===JE||e===zE?new qE(e):ok(e)},"function"==typeof z_&&(UE=z_.prototype.then,em(z_.prototype,"then",(function(e,t){var n=this;return new JE((function(e,t){UE.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof nk&&Om({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return VE(JE,nk.apply(oh,arguments))}}))),Om({global:!0,wrap:!0,forced:sk},{Promise:JE}),F_(JE,KE,!1),V_(KE),zE=rm(KE),Om({target:KE,stat:!0,forced:sk},{reject:function(e){var t=rk(this);return t.reject.call(void 0,e),t.promise}}),Om({target:KE,stat:!0,forced:sk},{resolve:function(e){return VE(this,e)}}),Om({target:KE,stat:!0,forced:lk},{all:function(e){var t=this,n=rk(t),r=n.resolve,o=n.reject,i=WE((function(){var n=sb(t.resolve),i=[],a=0,s=1;X_(e,(function(e){var l=a++,u=!1;i.push(void 0),s++,n.call(t,e).then((function(e){u||(u=!0,i[l]=e,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=rk(t),r=n.reject,o=WE((function(){var o=sb(t.resolve);X_(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var yk=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Th(n),function(e){if(!vh(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),bk=gb("match"),xk=function(e){var t;return vh(e)&&(void 0!==(t=e[bk])?!!t:"RegExp"==ph(e))},wk=function(){var e=Th(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function _k(e,t){return RegExp(e,t)}var Ek={UNSUPPORTED_Y:ih((function(){var e=_k("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:ih((function(){var e=_k("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},kk=Ph.f,Sk=ym.f,Ck=Zh.set,Tk=gb("match"),Nk=oh.RegExp,Pk=Nk.prototype,Ok=/a/g,Lk=/a/g,Ak=new Nk(Ok)!==Ok,Rk=Ek.UNSUPPORTED_Y;if(ah&&Nm("RegExp",!Ak||Rk||ih((function(){return Lk[Tk]=!1,Nk(Ok)!=Ok||Nk(Lk)==Lk||"/a/i"!=Nk(Ok,"i")})))){for(var Dk=function(e,t){var n,r=this instanceof Dk,o=xk(e),i=void 0===t;if(!r&&o&&e.constructor===Dk&&i)return e;Ak?o&&!i&&(e=e.source):e instanceof Dk&&(i&&(t=wk.call(e)),e=e.source),Rk&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a,s,l,u,c,d=(a=Ak?new Nk(e,t):Nk(e,t),s=r?this:Pk,l=Dk,yk&&"function"==typeof(u=s.constructor)&&u!==l&&vh(c=u.prototype)&&c!==l.prototype&&yk(a,c),a);return Rk&&n&&Ck(d,{sticky:n}),d},Ik=function(e){e in Dk||kk(Dk,e,{configurable:!0,get:function(){return Nk[e]},set:function(t){Nk[e]=t}})},jk=Sk(Nk),Mk=0;jk.length>Mk;)Ik(jk[Mk++]);Pk.constructor=Dk,Dk.prototype=Pk,em(oh,"RegExp",Dk)}V_("RegExp");var qk=RegExp.prototype.exec,zk=String.prototype.replace,Uk=qk,Bk=function(){var e=/a/,t=/b*/g;return qk.call(e,"a"),qk.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Fk=Ek.UNSUPPORTED_Y||Ek.BROKEN_CARET,Hk=void 0!==/()??/.exec("")[1];(Bk||Hk||Fk)&&(Uk=function(e){var t,n,r,o,i=this,a=Fk&&i.sticky,s=wk.call(i),l=i.source,u=0,c=e;return a&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),c=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(l="(?: "+l+")",c=" "+c,u++),n=new RegExp("^(?:"+l+")",s)),Hk&&(n=new RegExp("^"+l+"$(?!\\s)",s)),Bk&&(t=i.lastIndex),r=qk.call(a?n:i,c),a?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Bk&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Hk&&r&&r.length>1&&zk.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var Vk=Uk;Om({target:"RegExp",proto:!0,forced:/./.exec!==Vk},{exec:Vk});var Wk=RegExp.prototype,$k=Wk.toString,Gk=ih((function(){return"/a/b"!=$k.call({source:"a",flags:"b"})})),Kk="toString"!=$k.name;(Gk||Kk)&&em(RegExp.prototype,"toString",(function(){var e=Th(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in Wk)?wk.call(e):n)}),{unsafe:!0});var Qk,Xk=function(e){if(xk(e))throw TypeError("The method doesn't accept regular expressions");return e},Yk=gb("match"),Jk=Ch.f,Zk="".endsWith,eS=Math.min,tS=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Yk]=!1,"/./"[e](t)}catch(e){}}return!1}("endsWith");Om({target:"String",proto:!0,forced:!!(tS||(Qk=Jk(String.prototype,"endsWith"),!Qk||Qk.writable))&&!tS},{endsWith:function(e){var t=String(mh(this));Xk(e);var n=arguments.length>1?arguments[1]:void 0,r=lm(t.length),o=void 0===n?r:eS(lm(n),r),i=String(e);return Zk?Zk.call(t,i,o):t.slice(o-i.length,o)===i}});var nS=gb("species"),rS=!ih((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),oS="$0"==="a".replace(/./,"$0"),iS=gb("replace"),aS=!!/./[iS]&&""===/./[iS]("a","$0"),sS=!ih((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),lS=function(e,t,n,r){var o=gb(e),i=!ih((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!ih((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[nS]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||"replace"===e&&(!rS||!oS||aS)||"split"===e&&!sS){var s=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===Vk?i&&!o?{done:!0,value:s.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:oS,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:aS}),u=l[0],c=l[1];em(String.prototype,e,u),em(RegExp.prototype,o,2==t?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)})}r&&Oh(RegExp.prototype[o],"sham",!0)},uS=function(e){return function(t,n){var r,o,i=String(mh(t)),a=am(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===s||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},cS={codeAt:uS(!1),charAt:uS(!0)}.charAt,dS=function(e,t,n){return t+(n?cS(e,t).length:1)},pS=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==ph(e))throw TypeError("RegExp#exec called on incompatible receiver");return Vk.call(e,t)},fS=Math.max,hS=Math.min,mS=Math.floor,gS=/\$([$&'`]|\d\d?|<[^>]*>)/g,vS=/\$([$&'`]|\d\d?)/g,yS=function(e){return void 0===e?e:String(e)};lS("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=mh(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var l=n(t,e,this,r);if(l.done)return l.value}var u=Th(e),c=String(this),d="function"==typeof r;d||(r=String(r));var p=u.global;if(p){var f=u.unicode;u.lastIndex=0}for(var h=[];;){var m=pS(u,c);if(null===m)break;if(h.push(m),!p)break;""===String(m[0])&&(u.lastIndex=dS(c,lm(u.lastIndex),f))}for(var g="",v=0,y=0;y<h.length;y++){m=h[y];for(var b=String(m[0]),x=fS(hS(am(m.index),c.length),0),w=[],_=1;_<m.length;_++)w.push(yS(m[_]));var E=m.groups;if(d){var k=[b].concat(w,x,c);void 0!==E&&k.push(E);var S=String(r.apply(void 0,k))}else S=s(b,c,x,w,E,r);x>=v&&(g+=c.slice(v,x)+S,v=x+b.length)}return g+c.slice(v)}];function s(e,n,r,o,i,a){var s=r+e.length,l=o.length,u=vS;return void 0!==i&&(i=ub(i),u=gS),t.call(a,u,(function(t,a){var u;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":u=i[a.slice(1,-1)];break;default:var c=+a;if(0===c)return t;if(c>l){var d=mS(c/10);return 0===d?t:d<=l?void 0===o[d-1]?a.charAt(1):o[d-1]+a.charAt(1):t}u=o[c-1]}return void 0===u?"":u}))}}));var bS=[].push,xS=Math.min,wS=!ih((function(){return!RegExp(4294967295,"y")}));lS("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(mh(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!xk(e))return t.call(r,e,o);for(var i,a,s,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,d=new RegExp(e.source,u+"g");(i=Vk.call(d,r))&&!((a=d.lastIndex)>c&&(l.push(r.slice(c,i.index)),i.length>1&&i.index<r.length&&bS.apply(l,i.slice(1)),s=i[0].length,c=a,l.length>=o));)d.lastIndex===i.index&&d.lastIndex++;return c===r.length?!s&&d.test("")||l.push(""):l.push(r.slice(c)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=mh(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=Th(e),s=String(this),l=iE(a,RegExp),u=a.unicode,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(wS?"y":"g"),d=new l(wS?a:"^(?:"+a.source+")",c),p=void 0===o?4294967295:o>>>0;if(0===p)return[];if(0===s.length)return null===pS(d,s)?[s]:[];for(var f=0,h=0,m=[];h<s.length;){d.lastIndex=wS?h:0;var g,v=pS(d,wS?s:s.slice(h));if(null===v||(g=xS(lm(d.lastIndex+(wS?0:h)),s.length))===f)h=dS(s,h,u);else{if(m.push(s.slice(f,h)),m.length===p)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===p)return m;h=f=g}}return m.push(s.slice(f)),m}]}),!wS);for(var _S in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var ES=oh[_S],kS=ES&&ES.prototype;if(kS&&kS.forEach!==A_)try{Oh(kS,"forEach",A_)}catch(e){kS.forEach=A_}}var SS=function(e){return e&&e.length?e[0]:void 0};var CS=function(e,t){var n=-1,r=Ex(e)?Array(e.length):[];return Sx(e,(function(e,o,i){r[++n]=t(e,o,i)})),r};var TS=function(e,t){return(Bg(e)?ry:CS)(e,Pw(t))};var NS=function(e){return null==e};var PS=function(e,t){return ry(t,(function(t){return e[t]}))};var OS=function(e){return null==e?[]:PS(e,kx(e))},LS=Math.max;var AS=function(e,t,n,r){e=Ex(e)?e:OS(e),n=n&&!r?$b(n):0;var o=e.length;return n<0&&(n=LS(o+n,0)),Lw(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&qb(e,t,n)>-1};var RS=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};var DS=function(e){return"function"==typeof e?e:Sw};var IS=function(e,t){return(Bg(e)?RS:Sx)(e,DS(t))};var jS=function(e){return"number"==typeof e||tv(e)&&"[object Number]"==ev(e)},MS=function(){try{var e=wv(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var qS=function(e,t,n){"__proto__"==t&&MS?MS(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},zS=Object.prototype.hasOwnProperty;var US=function(e,t,n){var r=e[t];zS.call(e,t)&&Rv(r,n)&&(void 0!==n||t in e)||qS(e,t,n)};var BS=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?qS(n,s,l):US(n,s,l)}return n};var FS=function(e,t){return e&&BS(t,kx(t),e)};var HS=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},VS=Object.prototype.hasOwnProperty;var WS=function(e){if(!av(e))return HS(e);var t=yx(e),n=[];for(var r in e)("constructor"!=r||!t&&VS.call(e,r))&&n.push(r);return n};var $S=function(e){return Ex(e)?gx(e,!0):WS(e)};var GS=function(e,t){return e&&BS(t,$S(t),e)},KS=n((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?Vg.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}}));var QS=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var XS=function(e,t){return BS(e,Jx(e),t)},YS=bx(Object.getPrototypeOf,Object),JS=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Gx(t,Jx(e)),e=YS(e);return t}:Qx;var ZS=function(e,t){return BS(e,JS(e),t)};var eC=function(e){return Kx(e,$S,JS)},tC=Object.prototype.hasOwnProperty;var nC=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&tC.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var rC=function(e){var t=new e.constructor(e.byteLength);return new Bx(t).set(new Bx(e)),t};var oC=function(e,t){var n=t?rC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},iC=/\w*$/;var aC=function(e){var t=new e.constructor(e.source,iC.exec(e));return t.lastIndex=e.lastIndex,t},sC=Wg?Wg.prototype:void 0,lC=sC?sC.valueOf:void 0;var uC=function(e){return lC?Object(lC.call(e)):{}};var cC=function(e,t){var n=t?rC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var dC=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return rC(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return oC(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return cC(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return aC(e);case"[object Set]":return new r;case"[object Symbol]":return uC(e)}},pC=Object.create,fC=function(){function e(){}return function(t){if(!av(t))return{};if(pC)return pC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var hC=function(e){return"function"!=typeof e.constructor||yx(e)?{}:fC(YS(e))};var mC=function(e){return tv(e)&&"[object Map]"==pw(e)},gC=px&&px.isMap,vC=gC?dx(gC):mC;var yC=function(e){return tv(e)&&"[object Set]"==pw(e)},bC=px&&px.isSet,xC=bC?dx(bC):yC,wC={};wC["[object Arguments]"]=wC["[object Array]"]=wC["[object ArrayBuffer]"]=wC["[object DataView]"]=wC["[object Boolean]"]=wC["[object Date]"]=wC["[object Float32Array]"]=wC["[object Float64Array]"]=wC["[object Int8Array]"]=wC["[object Int16Array]"]=wC["[object Int32Array]"]=wC["[object Map]"]=wC["[object Number]"]=wC["[object Object]"]=wC["[object RegExp]"]=wC["[object Set]"]=wC["[object String]"]=wC["[object Symbol]"]=wC["[object Uint8Array]"]=wC["[object Uint8ClampedArray]"]=wC["[object Uint16Array]"]=wC["[object Uint32Array]"]=!0,wC["[object Error]"]=wC["[object Function]"]=wC["[object WeakMap]"]=!1;var _C=function e(t,n,r,o,i,a){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),void 0!==s)return s;if(!av(t))return t;var d=Bg(t);if(d){if(s=nC(t),!l)return QS(t,s)}else{var p=pw(t),f="[object Function]"==p||"[object GeneratorFunction]"==p;if(ix(t))return KS(t,l);if("[object Object]"==p||"[object Arguments]"==p||f&&!i){if(s=u||f?{}:hC(t),!l)return u?ZS(t,GS(s,t)):XS(t,FS(s,t))}else{if(!wC[p])return i?t:{};s=dC(t,p,l)}}a||(a=new Rx);var h=a.get(t);if(h)return h;a.set(t,s),xC(t)?t.forEach((function(o){s.add(e(o,n,r,o,t,a))})):vC(t)&&t.forEach((function(o,i){s.set(i,e(o,n,r,i,t,a))}));var m=c?u?eC:Zx:u?keysIn:kx,g=d?void 0:m(t);return RS(g||t,(function(o,i){g&&(o=t[i=o]),US(s,i,e(o,n,r,i,t,a))})),s};var EC=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var kC=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i};var SC=function(e,t){return t.length<2?e:cy(e,kC(t,0,-1))};var CC=function(e,t){return t=ly(t,e),null==(e=SC(e,t))||delete e[uy(EC(t))]},TC=Function.prototype,NC=Object.prototype,PC=TC.toString,OC=NC.hasOwnProperty,LC=PC.call(Object);var AC=function(e){if(!tv(e)||"[object Object]"!=ev(e))return!1;var t=YS(e);if(null===t)return!0;var n=OC.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&PC.call(n)==LC};var RC=function(e){return AC(e)?void 0:e},DC=Wg?Wg.isConcatSpreadable:void 0;var IC=function(e){return Bg(e)||rx(e)||!!(DC&&e&&e[DC])};var jC=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=IC),i||(i=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):Gx(i,l):o||(i[i.length]=l)}return i};var MC=function(e){return(null==e?0:e.length)?jC(e,1):[]};var qC=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},zC=Math.max;var UC=function(e,t,n){return t=zC(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=zC(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),qC(e,this,s)}};var BC=function(e){return function(){return e}},FC=MS?function(e,t){return MS(e,"toString",{configurable:!0,enumerable:!1,value:BC(t),writable:!0})}:Sw,HC=Date.now;var VC=function(e){var t=0,n=0;return function(){var r=HC(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(FC);var WC=function(e){return VC(UC(e,void 0,MC),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=ry(t,(function(t){return t=ly(t,e),r||(r=t.length>1),t})),BS(e,eC(e),n),r&&(n=_C(n,7,RC));for(var o=t.length;o--;)CC(n,t[o]);return n})),$C=Object.prototype.hasOwnProperty;var GC=function(e){if(null==e)return!0;if(Ex(e)&&(Bg(e)||"string"==typeof e||"function"==typeof e.splice||ix(e)||hx(e)||rx(e)))return!e.length;var t=pw(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(yx(e))return!_x(e).length;for(var n in e)if($C.call(e,n))return!1;return!0};var KC=function(e){return _C(e,4)},QC=n((function(e,t){function n(e){if(!(this instanceof n))return new n(e);if(e||(e={}),!e.consumer)throw new Error("consumer option is required");if(this.consumer=e.consumer,this.nonce_length=e.nonce_length||32,this.version=e.version||"1.0",this.parameter_seperator=e.parameter_seperator||", ",this.realm=e.realm,void 0===e.last_ampersand?this.last_ampersand=!0:this.last_ampersand=e.last_ampersand,this.signature_method=e.signature_method||"PLAINTEXT","PLAINTEXT"!=this.signature_method||e.hash_function||(e.hash_function=function(e,t){return t}),!e.hash_function)throw new Error("hash_function option is required");this.hash_function=e.hash_function,this.body_hash_function=e.body_hash_function||this.hash_function}e.exports=n,n.prototype.authorize=function(e,t){var n={oauth_consumer_key:this.consumer.key,oauth_nonce:this.getNonce(),oauth_signature_method:this.signature_method,oauth_timestamp:this.getTimeStamp(),oauth_version:this.version};return t||(t={}),void 0!==t.key&&(n.oauth_token=t.key),e.data||(e.data={}),e.includeBodyHash&&(n.oauth_body_hash=this.getBodyHash(e,t.secret)),n.oauth_signature=this.getSignature(e,t.secret,n),n},n.prototype.getSignature=function(e,t,n){return this.hash_function(this.getBaseString(e,n),this.getSigningKey(t))},n.prototype.getBodyHash=function(e,t){var n="string"==typeof e.data?e.data:JSON.stringify(e.data);if(!this.body_hash_function)throw new Error("body_hash_function option is required");return this.body_hash_function(n,this.getSigningKey(t))},n.prototype.getBaseString=function(e,t){return e.method.toUpperCase()+"&"+this.percentEncode(this.getBaseUrl(e.url))+"&"+this.percentEncode(this.getParameterString(e,t))},n.prototype.getParameterString=function(e,t){var n;n=t.oauth_body_hash?this.sortObject(this.percentEncodeData(this.mergeObject(t,this.deParamUrl(e.url)))):this.sortObject(this.percentEncodeData(this.mergeObject(t,this.mergeObject(e.data,this.deParamUrl(e.url)))));for(var r="",o=0;o<n.length;o++){var i=n[o].key,a=n[o].value;if(a&&Array.isArray(a)){a.sort();var s="";a.forEach(function(e,t){s+=i+"="+e,t<a.length&&(s+="&")}.bind(this)),r+=s}else r+=i+"="+a+"&"}return r=r.substr(0,r.length-1)},n.prototype.getSigningKey=function(e){return e=e||"",this.last_ampersand||e?this.percentEncode(this.consumer.secret)+"&"+this.percentEncode(e):this.percentEncode(this.consumer.secret)},n.prototype.getBaseUrl=function(e){return e.split("?")[0]},n.prototype.deParam=function(e){for(var t=e.split("&"),n={},r=0;r<t.length;r++){var o=t[r].split("=");o[1]=o[1]||"",n[o[0]]?(Array.isArray(n[o[0]])||(n[o[0]]=[n[o[0]]]),n[o[0]].push(decodeURIComponent(o[1]))):n[o[0]]=decodeURIComponent(o[1])}return n},n.prototype.deParamUrl=function(e){var t=e.split("?");return 1===t.length?{}:this.deParam(t[1])},n.prototype.percentEncode=function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},n.prototype.percentEncodeData=function(e){var t={};for(var n in e){var r=e[n];if(r&&Array.isArray(r)){var o=[];r.forEach(function(e){o.push(this.percentEncode(e))}.bind(this)),r=o}else r=this.percentEncode(r);t[this.percentEncode(n)]=r}return t},n.prototype.toHeader=function(e){var t=this.sortObject(e),n="OAuth ";this.realm&&(n+='realm="'+this.realm+'"'+this.parameter_seperator);for(var r=0;r<t.length;r++)0===t[r].key.indexOf("oauth_")&&(n+=this.percentEncode(t[r].key)+'="'+this.percentEncode(t[r].value)+'"'+this.parameter_seperator);return{Authorization:n.substr(0,n.length-this.parameter_seperator.length)}},n.prototype.getNonce=function(){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",t="",n=0;n<this.nonce_length;n++)t+=e[parseInt(Math.random()*e.length,10)];return t},n.prototype.getTimeStamp=function(){return parseInt((new Date).getTime()/1e3,10)},n.prototype.mergeObject=function(e,t){t=t||{};var n=e=e||{};for(var r in t)n[r]=t[r];return n},n.prototype.sortObject=function(e){var t=Object.keys(e),n=[];t.sort();for(var r=0;r<t.length;r++){var o=t[r];n.push({key:o,value:e[o]})}return n}})),XC=n((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},o=r.lib={},i=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=function(t){t=t;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},i=0;i<t;i+=4){var s=o(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new a.init(r,t)}}),s=r.enc={},l=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,u=e.min(4*l,o);if(l){for(var c=0;c<l;c+=i)this._doProcessBlock(r,c);var d=r.splice(0,l);n.sigBytes-=u}return new a.init(d,u)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(o.Hasher=d.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math),n)})),YC=(n((function(e,t){var n;e.exports=(n=XC,function(){var e=n,t=e.lib,r=t.WordArray,o=t.Hasher,i=e.algo,a=[],s=i.SHA1=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],s=n[3],l=n[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var c=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=c<<1|c>>>31}var d=(r<<5|r>>>27)+l+a[u];d+=u<20?1518500249+(o&i|~o&s):u<40?1859775393+(o^i^s):u<60?(o&i|o&s|i&s)-1894007588:(o^i^s)-899497514,l=s,s=i,i=o<<30|o>>>2,o=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=o._createHelper(s),e.HmacSHA1=o._createHmacHelper(s)}(),n.SHA1)})),n((function(e,t){var n;e.exports=(n=XC,void function(){var e=n,t=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,l=a.words,u=0;u<n;u++)s[u]^=1549556828,l[u]^=909522486;i.sigBytes=a.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())})),n((function(e,t){e.exports=XC.HmacSHA1}))),JC=n((function(e,t){var n;e.exports=(n=XC,function(){var e=n,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e){var n=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(n=s)}return function(e,n,r){for(var o=[],i=0,a=0;a<n;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2,l=r[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=(s|l)<<24-i%4*8,i++}return t.create(o,i)}(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)})),ZC=Object.prototype.hasOwnProperty,eT=Array.isArray,tT=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),nT=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},rT={arrayToObject:nT,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var l=a[s],u=i[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:i,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(eT(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",i=0;i<r.length;++i){var a=r.charCodeAt(i);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=r.charAt(i):a<128?o+=tT[a]:a<2048?o+=tT[192|a>>6]+tT[128|63&a]:a<55296||a>=57344?o+=tT[224|a>>12]+tT[128|a>>6&63]+tT[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&r.charCodeAt(i)),o+=tT[240|a>>18]+tT[128|a>>12&63]+tT[128|a>>6&63]+tT[128|63&a])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(eT(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!ZC.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return eT(t)&&!eT(n)&&(o=nT(t,r)),eT(t)&&eT(n)?(n.forEach((function(n,o){if(ZC.call(t,o)){var i=t[o];i&&"object"==typeof i&&n&&"object"==typeof n?t[o]=e(i,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var i=n[o];return ZC.call(t,o)?t[o]=e(t[o],i,r):t[o]=i,t}),o)}},oT=String.prototype.replace,iT=/%20/g,aT={RFC1738:"RFC1738",RFC3986:"RFC3986"},sT=rT.assign({default:aT.RFC3986,formatters:{RFC1738:function(e){return oT.call(e,iT,"+")},RFC3986:function(e){return String(e)}}},aT),lT=Object.prototype.hasOwnProperty,uT={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},cT=Array.isArray,dT=Array.prototype.push,pT=function(e,t){dT.apply(e,cT(t)?t:[t])},fT=Date.prototype.toISOString,hT=sT.default,mT={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:rT.encode,encodeValuesOnly:!1,format:hT,formatter:sT.formatters[hT],indices:!1,serializeDate:function(e){return fT.call(e)},skipNulls:!1,strictNullHandling:!1},gT=function e(t,n,r,o,i,a,s,l,u,c,d,p,f){var h=t;if("function"==typeof s?h=s(n,h):h instanceof Date?h=c(h):"comma"===r&&cT(h)&&(h=h.join(",")),null===h){if(o)return a&&!p?a(n,mT.encoder,f,"key"):n;h=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(h)||rT.isBuffer(h))return a?[d(p?n:a(n,mT.encoder,f,"key"))+"="+d(a(h,mT.encoder,f,"value"))]:[d(n)+"="+d(String(h))];var m,g=[];if(void 0===h)return g;if(cT(s))m=s;else{var v=Object.keys(h);m=l?v.sort(l):v}for(var y=0;y<m.length;++y){var b=m[y];i&&null===h[b]||(cT(h)?pT(g,e(h[b],"function"==typeof r?r(n,b):n,r,o,i,a,s,l,u,c,d,p,f)):pT(g,e(h[b],n+(u?"."+b:"["+b+"]"),r,o,i,a,s,l,u,c,d,p,f)))}return g},vT=Object.prototype.hasOwnProperty,yT=Array.isArray,bT={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:rT.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},xT=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},wT=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(r),a=i?r.slice(0,i.index):r,s=[];if(a){if(!n.plainObjects&&vT.call(Object.prototype,a)&&!n.allowPrototypes)return;s.push(a)}for(var l=0;n.depth>0&&null!==(i=o.exec(r))&&l<n.depth;){if(l+=1,!n.plainObjects&&vT.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(i[1])}return i&&s.push("["+r.slice(i.index)+"]"),function(e,t,n){for(var r=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a&&n.parseArrays)i=[].concat(r);else{i=n.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(s,10);n.parseArrays||""!==s?!isNaN(l)&&a!==s&&String(l)===s&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(i=[])[l]=r:i[s]=r:i={0:r}}r=i}return r}(s,t,n)}},_T=function(e,t){var n=function(e){if(!e)return bT;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?bT.charset:e.charset;return{allowDots:void 0===e.allowDots?bT.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:bT.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:bT.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:bT.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:bT.comma,decoder:"function"==typeof e.decoder?e.decoder:bT.decoder,delimiter:"string"==typeof e.delimiter||rT.isRegExp(e.delimiter)?e.delimiter:bT.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:bT.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:bT.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:bT.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:bT.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:bT.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),s=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?l="utf-8":"utf8=%26%2310003%3B"===a[n]&&(l="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var u,c,d=a[n],p=d.indexOf("]="),f=-1===p?d.indexOf("="):p+1;-1===f?(u=t.decoder(d,bT.decoder,l,"key"),c=t.strictNullHandling?null:""):(u=t.decoder(d.slice(0,f),bT.decoder,l,"key"),c=t.decoder(d.slice(f+1),bT.decoder,l,"value")),c&&t.interpretNumericEntities&&"iso-8859-1"===l&&(c=xT(c)),c&&"string"==typeof c&&t.comma&&c.indexOf(",")>-1&&(c=c.split(",")),d.indexOf("[]=")>-1&&(c=yT(c)?[c]:c),vT.call(r,u)?r[u]=rT.combine(r[u],c):r[u]=c}return r}(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],l=wT(s,r[s],n);o=rT.merge(o,l,n)}return rT.compact(o)},ET=function(e,t){var n,r=e,o=function(e){if(!e)return mT;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||mT.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=sT.default;if(void 0!==e.format){if(!lT.call(sT.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=sT.formatters[n],o=mT.filter;return("function"==typeof e.filter||cT(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:mT.addQueryPrefix,allowDots:void 0===e.allowDots?mT.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:mT.charsetSentinel,delimiter:void 0===e.delimiter?mT.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:mT.encode,encoder:"function"==typeof e.encoder?e.encoder:mT.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:mT.encodeValuesOnly,filter:o,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:mT.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:mT.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:mT.strictNullHandling}}(t);"function"==typeof o.filter?r=(0,o.filter)("",r):cT(o.filter)&&(n=o.filter);var i,a=[];if("object"!=typeof r||null===r)return"";i=t&&t.arrayFormat in uT?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=uT[i];n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var l=0;l<n.length;++l){var u=n[l];o.skipNulls&&null===r[u]||pT(a,gT(r[u],u,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var c=a.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""},kT="URLSearchParams"in self,ST="Symbol"in self&&"iterator"in Symbol,CT="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),TT="FormData"in self,NT="ArrayBuffer"in self;if(NT)var PT=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],OT=ArrayBuffer.isView||function(e){return e&&PT.indexOf(Object.prototype.toString.call(e))>-1};function LT(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function AT(e){return"string"!=typeof e&&(e=String(e)),e}function RT(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return ST&&(t[Symbol.iterator]=function(){return t}),t}function DT(e){this.map={},e instanceof DT?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function IT(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function jT(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function MT(e){var t=new FileReader,n=jT(t);return t.readAsArrayBuffer(e),n}function qT(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function zT(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:CT&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:TT&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:kT&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():NT&&CT&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=qT(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):NT&&(ArrayBuffer.prototype.isPrototypeOf(e)||OT(e))?this._bodyArrayBuffer=qT(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):kT&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},CT&&(this.blob=function(){var e=IT(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?IT(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(MT)}),this.text=function(){var e=IT(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=jT(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},TT&&(this.formData=function(){return this.text().then(FT)}),this.json=function(){return this.text().then(JSON.parse)},this}DT.prototype.append=function(e,t){e=LT(e),t=AT(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},DT.prototype.delete=function(e){delete this.map[LT(e)]},DT.prototype.get=function(e){return e=LT(e),this.has(e)?this.map[e]:null},DT.prototype.has=function(e){return this.map.hasOwnProperty(LT(e))},DT.prototype.set=function(e,t){this.map[LT(e)]=AT(t)},DT.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},DT.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),RT(e)},DT.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),RT(e)},DT.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),RT(e)},ST&&(DT.prototype[Symbol.iterator]=DT.prototype.entries);var UT=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function BT(e,t){var n,r,o=(t=t||{}).body;if(e instanceof BT){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new DT(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new DT(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),UT.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function FT(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function HT(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new DT(t.headers),this.url=t.url||"",this._initBody(e)}BT.prototype.clone=function(){return new BT(this,{body:this._bodyInit})},zT.call(BT.prototype),zT.call(HT.prototype),HT.prototype.clone=function(){return new HT(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new DT(this.headers),url:this.url})},HT.error=function(){var e=new HT(null,{status:0,statusText:""});return e.type="error",e};var VT=[301,302,303,307,308];HT.redirect=function(e,t){if(-1===VT.indexOf(t))throw new RangeError("Invalid status code");return new HT(null,{status:t,headers:{location:e}})};var WT=self.DOMException;try{new WT}catch(e){(WT=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),WT.prototype.constructor=WT}function $T(e,t){return new Promise((function(n,r){var o=new BT(e,t);if(o.signal&&o.signal.aborted)return r(new WT("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new DT,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;n(new HT(o,r))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.onabort=function(){r(new WT("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&CT&&(i.responseType="blob"),o.headers.forEach((function(e,t){i.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",a)}),i.send(void 0===o._bodyInit?null:o._bodyInit)}))}$T.polyfill=!0,self.fetch||(self.fetch=$T,self.Headers=DT,self.Request=BT,self.Response=HT);var GT=function(){localStorage.removeItem("pixassist_state"),localStorage.removeItem("pixassist_last_updated")},KT={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},QT=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:"",default:KT}),XT={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},YT=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",default:XT}),JT={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},ZT=Object.freeze({__proto__:null,amp:"&",apos:"'",gt:">",lt:"<",quot:'"',default:JT}),eN=r(Object.freeze({__proto__:null,default:{0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}})),tN=n((function(t,n){var r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var o=r(eN);n.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"�";e in o.default&&(e=o.default[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}}));t(tN);var nN=r(QT),rN=r(YT),oN=r(ZT),iN=n((function(t,n){var r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var o=r(nN),i=r(rN),a=r(oN),s=r(tN);function l(e){var t=Object.keys(e).join("|"),n=c(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}n.decodeXML=l(a.default),n.decodeHTMLStrict=l(o.default);var u=function(e,t){return e<t?1:-1};function c(e){return function(t){return"#"===t.charAt(1)?"X"===t.charAt(2)||"x"===t.charAt(2)?s.default(parseInt(t.substr(3),16)):s.default(parseInt(t.substr(2),10)):e[t.slice(1,-1)]}}n.decodeHTML=function(){for(var e=Object.keys(i.default).sort(u),t=Object.keys(o.default).sort(u),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=c(o.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(a,l)}}()}));t(iN);iN.decodeXML,iN.decodeHTMLStrict,iN.decodeHTML;var aN=n((function(t,n){var r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var o=l(r(oN).default),i=u(o);n.encodeXML=h(o,i);var a=l(r(nN).default),s=u(a);function l(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function u(e){var t=[],n=[];return Object.keys(e).forEach((function(e){return 1===e.length?t.push("\\"+e):n.push(e)})),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}n.encodeHTML=h(a,s);var c=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function p(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function f(e,t){return"&#x"+(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function h(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(d,f).replace(c,p)}}var m=u(o);n.escape=function(e){return e.replace(m,p).replace(d,f).replace(c,p)}}));t(aN);aN.encodeXML,aN.encodeHTML,aN.escape;var sN=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e,t){return(!t||t<=0?iN.decodeXML:iN.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?iN.decodeXML:iN.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?aN.encodeXML:aN.encodeHTML)(e)};var n=aN;t.encodeXML=n.encodeXML,t.encodeHTML=n.encodeHTML,t.escape=n.escape,t.encodeHTML4=n.encodeHTML,t.encodeHTML5=n.encodeHTML;var r=iN;t.decodeXML=r.decodeXML,t.decodeHTML=r.decodeHTML,t.decodeHTMLStrict=r.decodeHTMLStrict,t.decodeHTML4=r.decodeHTML,t.decodeHTML5=r.decodeHTML,t.decodeHTML4Strict=r.decodeHTMLStrict,t.decodeHTML5Strict=r.decodeHTMLStrict,t.decodeXMLStrict=r.decodeXML}));t(sN);var lN=sN.decode,uN=(sN.decodeStrict,sN.encode,sN.encodeXML,sN.encodeHTML,sN.escape,sN.encodeHTML4,sN.encodeHTML5,sN.decodeXML,sN.decodeHTML,sN.decodeHTMLStrict,sN.decodeHTML4,sN.decodeHTML5,sN.decodeHTML4Strict,sN.decodeHTML5Strict,sN.decodeXMLStrict,function(e){var t=function(t){var n;e.CustomEvent?n=new CustomEvent("pixassist:notice:add",{detail:{data:t}}):(n=document.createEvent("CustomEvent")).initCustomEvent("pixassist:notice:add",!0,!0,{data:t}),e.dispatchEvent(n)},n=function(e){var n=dy(pixassist,"themeConfig.l10n.Error500Link","");"number"==typeof e.status?n+="#error_"+e.status:n+="#error_5xx",t({notice_id:"500_error",title:"We encountered a server problem",content:dy(pixassist,"themeConfig.l10n.Error500Text",""),type:"error",ctaLabel:"Find Solutions",ctaLink:n})},r=function(e){var n=dy(pixassist,"themeConfig.l10n.Error400Link","");"number"==typeof e.status?n+="#error_"+e.status:n+="#error_4xx",t({notice_id:"400_error",title:"We encountered a server problem",content:dy(pixassist,"themeConfig.l10n.Error400Text",""),type:"error",ctaLabel:"Find Solutions",ctaLink:n})};return{pushNotification:t,updateNotification:function(t){var n;e.CustomEvent?n=new CustomEvent("pixassist:notice:update",{detail:{data:t}}):(n=document.createEvent("CustomEvent")).initCustomEvent("pixassist:notice:update",!0,!0,{data:t}),e.dispatchEvent(n)},removeNotification:function(t){var n;e.CustomEvent?n=new CustomEvent("pixassist:notice:remove",{detail:{data:t}}):(n=document.createEvent("CustomEvent")).initCustomEvent("pixassist:notice:remove",!0,!0,{data:t}),e.dispatchEvent(n)},notify500Error:n,notify400Error:r,replaceParams:function(e){var t={"{{theme_name}}":dy(pixassist,"themeSupports.theme_name","Theme"),"{{stylecss_theme_name}}":dy(pixassist,"themeSupports.stylecss_theme_name",""),"{{theme_version}}":dy(pixassist,"themeSupports.theme_version","0.0.1"),"{{theme_id}}":dy(pixassist,"themeSupports.theme_id",""),"{{template}}":dy(pixassist,"themeSupports.template",""),"{{original_slug}}":dy(pixassist,"themeSupports.original_slug",""),"{{username}}":dy(pixassist,"user.name","Name"),"{{shopdomain}}":pixassist.shopBaseDomain};py(pixassist.user.pixelgrade_display_name)||(t["{{username}}"]=dy(pixassist,"user.pixelgrade_display_name","Name"));var n=new RegExp(Object.keys(t).join("|"),"gi");return py(e)&&!e||(e=e.replace(n,(function(e){return t[e]}))),e},replaceUrls:function(e){var t={"{{dashboard_url}}":pixassist.dashboardUrl,"{{customizer_url}}":pixassist.customizerUrl},n=new RegExp(Object.keys(t).join("|"),"gi");return e=e.replace(n,(function(e){return t[e]}))},extend:function e(t,n){for(var r in t=t||{},n)"object"==typeof n[r]?t[r]=e(t[r],n[r]):t[r]=n[r];return t},restOauth1Request:function(t,n,r,o,i,a){var s=KC(r);pixassist.themeSupports.ocs||(pixassist.themeSupports.ock="Lm12n034gL19",pixassist.themeSupports.ocs="6AU8WKBK1yZRDerL57ObzDPM7SGWRp21Csi5Ti5LdVNG9MbP");var l=new QC({consumer:{key:pixassist.themeSupports.ock,secret:pixassist.themeSupports.ocs},signature_method:"HMAC-SHA1",hash_function:function(e,t){return YC(e,t).toString(JC)}}),u=null;!GC(s)&&void 0!==s.oauth_token&&s.oauth_token&&void 0!==s.oauth_token_secret&&s.oauth_token_secret?u={key:s.oauth_token,secret:s.oauth_token_secret}:void 0!==pixassist.user.oauth_token&&void 0!==pixassist.user.oauth_token_secret&&(u={key:pixassist.user.oauth_token,secret:pixassist.user.oauth_token_secret}),GC(s)||(s=WC(s,["oauth_token","oauth_token_secret","oauth_signature_method","oauth_timestamp","oauth_version","oauth_consumer_key","oauth_nonce"])),"GET"!==t||GC(s)||(n+="?".concat(decodeURIComponent(ET(s))),s=null);var c=null;GC(s)||(c={},Object.keys(s).forEach((function(e){var t=s[e];void 0===t?(c[e]="",s[e]=""):Lw(t)||jS(t)?c[e]=t:IS(t,(function(t,n){Lw(t)||jS(t)?c["".concat(e,"[").concat(n,"]")]=t:IS(t,(function(t,r){return c["".concat(e,"[").concat(n,"][").concat(r,"]")]=t}))}))}))),c=l.authorize({url:n,method:t,data:c},u);var d={Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},p=["".concat(pixassist.apiBase,"oauth1/request")];return(!GC(l)&&!GC(u)||p.indexOf(n)>-1)&&(d=Ig({},d,{},l.toHeader(c))),fetch(n,{method:t,headers:d,mode:"cors",referrerPolicy:"unsafe-url",body:["GET","HEAD"].indexOf(t)>-1?null:ET(s)}).then((function(t){return t.headers.get("Content-Type")&&t.headers.get("Content-Type").indexOf("x-www-form-urlencoded")>-1?t.text().then((function(e){var t=_T(e);return o(t),t})):t.text().then((function(n){try{var r=JSON.parse(n)}catch(e){throw i({message:n,code:t.status}),{message:n,code:t.status}}if(t.status>=300){throw t.status>=400&&t.status<500&&(AS(["json_oauth1_consumer_mismatch","json_oauth1_invalid_token","json_oauth1_expired_token","json_oauth1_invalid_user"],r.code)||NS(u))&&(GT(),uN.$ajax(pixassist.wpRest.endpoint.disconnectUser.url,pixassist.wpRest.endpoint.disconnectUser.method,{user_id:pixassist.user.id,force_disconnected:!0},(function(t){"success"===t.code&&e.location.reload()}))),a(t),r}return o(r),r}))})).catch((function(e){console.log(e)}))},restRequest:function(e,t,n,r,o,i){"GET"!==e||GC(n)||(t+="?".concat(decodeURIComponent(ET(n))),n=null);return fetch(t,{method:e,headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},credentials:"include",body:["GET","HEAD"].indexOf(e)>-1?null:ET(n)}).then((function(e){return e.headers.get("Content-Type")&&e.headers.get("Content-Type").indexOf("x-www-form-urlencoded")>-1?e.text().then((function(e){var t=_T(e);return r(t),t})):e.text().then((function(t){try{var n=JSON.parse(t)}catch(n){throw o({message:t,code:e.status}),{message:t,code:e.status}}if(e.status>=300)throw i(e),n;return r(n),n}))})).catch((function(e){console.log(e)}))},$ajax:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];null===s&&(s=function(e){e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)}),null===i&&(i=function(e){}),null===a&&(a=function(t){console.debug(e),console.debug(t)}),o=Ig({},o,{},{pixassist_nonce:pixassist.wpRest.pixassist_nonce}),jQuery.ajax({async:l,url:e,method:t,beforeSend:s,statusCode:{301:r,302:r,303:r,400:r,401:r,402:r,403:r,404:r,500:n,501:n,502:n,503:n},data:o}).done(i).error(a)},checkHttpStatus:function(e){if(4==e)throw"A 4xx error occurred";if(5==e)throw"A 5xx error occurred"},esTrimHits:function(e,t){var n=[];return Object.keys(e).map((function(r,o){e[r]._score>.3*t&&n.push(e[r])})),n},getESIndex:function(){return pixassist.themeConfig.eskb.index},Queue:function(e){Object.defineProperties(this,{add:{enumerable:!0,writable:!1,value:function(){for(var e in arguments)t.push(arguments[e]);n||this.stop||!this.autoRun||this.next()}},next:{enumerable:!0,writable:!1,value:function(){if(n=!0,t.length<1||this.stop)n=!1;else{var e=this;setTimeout((function(){t.shift().bind(e)()}),200)}}},clear:{enumerable:!0,writable:!1,value:function(){return t=[]}},contents:{enumerable:!1,get:function(){return t},set:function(e){return t=e}},autoRun:{enumerable:!0,writable:!0,value:!0},stop:{enumerable:!0,writable:!0,value:!1}});var t=[],n=!1},clickUpdateTheme:function(t){t.preventDefault();var n="";dy(pixassist,"themeSupports.template",!1)?n=dy(pixassist,"themeSupports.template",!1):dy(pixassist,"themeSupports.theme_name",!1)&&(n=(n=dy(pixassist,"themeSupports.theme_name",!1)).toLowerCase()),n&&wp.updates.updateTheme({slug:n,xhr:function(e){uN.updateNotification({notice_id:"outdated_theme",title:"Updating your theme...",content:"Please wait until we finish with the update.",type:"info",ctaLabel:!1,secondaryCtaLabel:!1,loading:!0})},success:function(t){uN.updateNotification({notice_id:"outdated_theme",title:"Theme updated successfully!",content:uN.replaceParams("All things look great! Enjoy crafting your site with {{theme_name}}."),type:"success",ctaLabel:!1,secondaryCtaLabel:!1,loading:!1});var n=new CustomEvent("updatedTheme",{detail:{isUpdated:!0,update:"theme",slug:t.slug,oldVersion:t.oldVersion,newVersion:t.newVersion},bubbles:!0,cancelable:!0});e.dispatchEvent(n)},error:function(e){e.errorMessage.length>1&&uN.updateNotification({notice_id:"outdated_theme",title:"Something went wrong while trying to update your theme: ",content:e.errorMessage,type:"error",ctaLabel:!1,loading:!1})}})},getLicense:function(e){var t=null,n=null,r=null,o=null;return"object"==typeof e&&Gw(e)&&TS(e,(function(e,t){py(e.licenses)||TS(e.licenses,(function(e,t){py(e.license_status_code)||1!==parseInt(e.license_status_code)?2===parseInt(e.license_status_code)?n=e:3!==parseInt(e.license_status_code)&&4!==parseInt(e.license_status_code)||(o=e):r=e}))})),null!==r?t=r:null!==n?t=n:null!==o&&(t=o),null===t?null:t},compareVersion:function(e,t){if("string"!=typeof e)return!1;if("string"!=typeof t)return!1;e=e.split("."),t=t.split(".");for(var n=Math.min(e.length,t.length),r=0;r<n;++r){if(e[r]=parseInt(e[r],10),t[r]=parseInt(t[r],10),e[r]>t[r])return 1;if(e[r]<t[r])return-1}return e.length==t.length?0:e.length<t.length?-1:1},getFirstItem:function(e){return Gw(e)?Ex(e)?SS(e):tv(e)?dy(e,SS(Object.keys(e))):null:null},decodeHtml:function(e){return lN(e)},trailingslashit:function(e){return e+(e.endsWith("/")?"":"/")}}}(window)),cN=function(e){function t(e){var n;return Og(this,t),(n=Ug(this,Mg(t).call(this,e))).onDismiss=n.onDismiss.bind(zg(n)),n}return jg(t,e),Ag(t,null,[{key:"defaultProps",get:function(){return{type:"info",isDismissable:!1,onDismiss:null,ctaLabel:null,ctaLink:null,ctaAction:null,secondaryCtaLabel:null,secondaryCtaLink:null,loading:!1}}}]),Ag(t,[{key:"render",value:function(){var e="box box--"+this.props.type,t=null===this.props.ctaLink?"#":this.props.ctaLink;return $.createElement("div",{className:e},this.props.isDismissable?$.createElement("a",{href:"#",onClick:this.onDismiss,className:"box__close-icon"},$.createElement("i",{className:"dashicons dashicons-no"})):null,$.createElement("div",{className:"box__body"},$.createElement("h5",{className:"box__title"},uN.replaceParams(this.props.title)),$.createElement("p",{className:"box__text",dangerouslySetInnerHTML:{__html:uN.replaceParams(this.props.content)}})),this.props.secondaryCtaLabel&&this.props.secondaryCtaLink?$.createElement("div",{className:"box__cta box__cta-secondary"},$.createElement("a",{className:"btn btn--text",href:this.props.secondaryCtaLink,target:"_blank"},this.props.secondaryCtaLabel)):null,this.props.ctaLabel?$.createElement("div",{className:"box__cta"},null===this.props.ctaLink?$.createElement("a",{className:"btn btn--small",id:"pgc-update-button",onClick:this.props.ctaAction},this.props.ctaLabel):$.createElement("a",{className:"btn btn--small",id:"pgc-update-button",href:t,target:"_blank"},this.props.ctaLabel)):null,this.props.loading?$.createElement("div",{className:"box__cta box__cta--loader"},$.createElement(E_,{size:40,variant:"indeterminate",color:"primary",style:{loader:{position:"relative"}}})):null)}},{key:"onDismiss",value:function(e){if(null!==this.props.onDismiss)this.props.onDismiss();else{if(window.CustomEvent)var t=new CustomEvent("pixassist:notice:dismiss",{detail:{data:{notice_id:this.props.notice_id}}});else(t=document.createEvent("CustomEvent")).initCustomEvent("pixassist:notice:dismiss",!0,!0,{data:{notice_id:this.props.notice_id}});window.dispatchEvent(t)}}}]),t}($.Component),dN=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};lS("search",1,(function(e,t,n){return[function(t){var n=mh(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=Th(e),i=String(this),a=o.lastIndex;dN(a,0)||(o.lastIndex=0);var s=pS(o,i);return dN(o.lastIndex,a)||(o.lastIndex=a),null===s?-1:s.index}]}));var pN=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},r=t||{},o=e.split(gN),i=r.decode||hN,a=0;a<o.length;a++){var s=o[a],l=s.indexOf("=");if(!(l<0)){var u=s.substr(0,l).trim(),c=s.substr(++l,s.length).trim();'"'==c[0]&&(c=c.slice(1,-1)),null==n[u]&&(n[u]=yN(c,i))}}return n},fN=function(e,t,n){var r=n||{},o=r.encode||mN;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!vN.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!vN.test(i))throw new TypeError("argument val is invalid");var a=e+"="+i;if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age="+Math.floor(s)}if(r.domain){if(!vN.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain="+r.domain}if(r.path){if(!vN.test(r.path))throw new TypeError("option path is invalid");a+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(a+="; HttpOnly");r.secure&&(a+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return a},hN=decodeURIComponent,mN=encodeURIComponent,gN=/; */,vN=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function yN(e,t){try{return t(e)}catch(t){return e}}var bN={parse:pN,serialize:fN},xN=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.load=d,t.loadAll=p,t.select=f,t.save=h,t.remove=m,t.setRawCookie=g,t.plugToRequest=v;var r=i(bN),o=i(l);function i(e){return e&&e.__esModule?e:{default:e}}var a="undefined"==typeof document||"undefined"!=typeof process&&process.env&&!1,s={},u=void 0;function c(){return u&&!u.headersSent}function d(e,t){var n=a?s:r.default.parse(document.cookie),o=n&&n[e];if(void 0===t&&(t=!o||"{"!==o[0]&&"["!==o[0]),!t)try{o=JSON.parse(o)}catch(e){}return o}function p(e){var t=a?s:r.default.parse(document.cookie);if(void 0===e&&(e=!t||"{"!==t[0]&&"["!==t[0]),!e)try{t=JSON.parse(t)}catch(e){}return t}function f(e){var t=a?s:r.default.parse(document.cookie);return t?e?Object.keys(t).reduce((function(n,r){if(!e.test(r))return n;var i={};return i[r]=t[r],(0,o.default)({},n,i)}),{}):t:{}}function h(e,t,o){s[e]=t,"object"===(void 0===t?"undefined":n(t))&&(s[e]=JSON.stringify(t)),a||(document.cookie=r.default.serialize(e,s[e],o)),c()&&u.cookie&&u.cookie(e,t,o)}function m(e,t){delete s[e],t=void 0===t?{}:"string"==typeof t?{path:t}:(0,o.default)({},t),"undefined"!=typeof document&&(t.expires=new Date(1970,1,1,0,0,1),t.maxAge=0,document.cookie=r.default.serialize(e,"",t)),c()&&u.clearCookie&&u.clearCookie(e,t)}function g(e){s=e?r.default.parse(e):{}}function v(e,t){return e.cookie?s=e.cookie:e.cookies?s=e.cookies:e.headers&&e.headers.cookie?g(e.headers.cookie):s={},u=t,function(){u=null,s={}}}t.default={setRawCookie:g,load:d,loadAll:p,select:f,save:h,remove:m,plugToRequest:v}})),wN=t(xN),_N=(xN.load,xN.loadAll,xN.select,xN.save,xN.remove,xN.setRawCookie,xN.plugToRequest,Object.prototype.hasOwnProperty);var EN=function(e,t){return null!=e&&_N.call(e,t)};var kN,SN=function(e,t){return null!=e&&_w(e,t,EN)},CN=function(e){function t(e){var n;return Og(this,t),(n=Ug(this,Mg(t).call(this,e))).state={},py(pixassist.user)||(n.state=Ig({},pixassist.user,{},n.state)),n.config=pixassist.themeConfig.authentication,n.setOauthPopupUrl=n.setOauthPopupUrl.bind(zg(n)),n.loginClickCallback=n.loginClickCallback.bind(zg(n)),n}return jg(t,e),Ag(t,[{key:"render",value:function(){var e={container:{position:"relative"},refresh:{display:"inline-block",position:"relative"}};return this.props.session.loading?$.createElement("div",{style:e.container},$.createElement(E_,{size:180,left:0,top:10,variant:"indeterminate",color:"primary",style:e.refresh})):!0===this.props.session.oauth_error?$.createElement("span",{className:"btn btn--action btn--disabled box--error"},dy(pixassist,"themeConfig.authentication.loadingError","")):dy(this.props.session,"connect_url",!1)?$.createElement("a",{className:"btn btn--action",onClick:this.loginClickCallback,"data-href":this.props.session.connect_url,rel:"noreferrer"},this.props.label):$.createElement("a",{className:"btn btn--action btn--disabled"},this.config.loadingPrepare)}},{key:"componentDidMount",value:function(){var e=this;dy(this.props.session,"connect_url",!1)||e.setOauthPopupUrl(),window.addEventListener("localizedChanged",(function(t){e.setOauthPopupUrl()}))}},{key:"setOauthPopupUrl",value:function(){var e=this,t=!1;if(dy(e.props.session,"user.oauth_token",!1)&&dy(e.props.session,"user.oauth_token_secret",!1)){var n={oauth_token:e.props.session.user.oauth_token,oauth_token_secret:e.props.session.user.oauth_token_secret,oauth_callback:window.location.href,theme_type:dy(e.props.session,"themeType","theme"),theme_id:dy(e.props.session,"themeId",""),theme_slug:dy(e.props.session,"originalSlug",""),register_first:"1",source:"pixassist"};t=pixassist.apiBase+"oauth1/authorize?"+ET(n),e.props.onConnectURLReady(t)}else e.props.onConnectURLClear(),uN.restOauth1Request("GET",pixassist.apiBase+"oauth1/request",{},(function(n){if("object"!=typeof n||!SN(n,"oauth_token")||!SN(n,"oauth_token_secret"))return e.props.onConnectError(),!1;var r={oauth_token:n.oauth_token,oauth_token_secret:n.oauth_token_secret,oauth_callback:window.location.href,theme_type:dy(e.props.session,"themeType","theme"),theme_id:dy(e.props.session,"themeId",""),theme_slug:dy(e.props.session,"originalSlug",""),register_first:"1",source:"pixassist"};t=pixassist.apiBase+"oauth1/authorize?"+ET(r),e.props.onConnectURLReady(t,{oauth_token:n.oauth_token,oauth_token_secret:n.oauth_token_secret}),e.updateUserMeta({oauth_token:n.oauth_token,oauth_token_secret:n.oauth_token_secret})}),(function(t){e.props.onConnectError()}),(function(t){var n=parseInt(t.status.toString()[0]);return"undefined"!==n&&2!==n&&(e.props.createErrorNotice(e,t),uN.checkHttpStatus(n)),t}))}},{key:"updateUserMeta",value:function(e){var t={id:pixassist.user.id,oauth_token:e.oauth_token,oauth_token_secret:e.oauth_token_secret};if(!py(e.pixelgrade_user_ID)){t.pixelgrade_user_ID=e.pixelgrade_user_ID;var n=document.getElementById("pixassist-support-button");if(null!==n){var r=new CustomEvent("logIn",{detail:{pixelgrade_user_ID:e.pixelgrade_user_ID},bubbles:!0,cancelable:!0});n.dispatchEvent(r)}}py(e.pixelgrade_user_login)||(t.pixelgrade_user_login=e.pixelgrade_user_login),py(e.pixelgrade_user_email)||(t.pixelgrade_user_email=e.pixelgrade_user_email),py(e.pixelgrade_display_name)||(t.pixelgrade_display_name=e.pixelgrade_display_name,pixassist.user.pixelgrade_display_name=t.pixelgrade_display_name),uN.$ajax(pixassist.wpRest.endpoint.globalState.set.url,pixassist.wpRest.endpoint.globalState.set.method,{user:t},null,null,null,!1)}},{key:"loginClickCallback",value:function(e){function t(e,t){t||(t=location.href),e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null==n?null:n[1]}e.preventDefault();var n=this,r=window.open(this.props.session.connect_url,"Pixelgrade Assistant"),o=null,i=null;n.props.onLoading();var a=window.setInterval((function(){try{if(py(r)||py(r.document))return window.clearInterval(a),n.props.onLoadingFinished(),!0;var e=r.document.URL;r.closed&&window.clearInterval(a),0===e.indexOf(window.location.href)&&(o=t("oauth_verifier",r.document.URL),i=t("errors",r.document.URL),GC(o)&&!GC(i)?(i=JSON.parse(window.atob(i)),!GC(i)&&Gw(i)&&AS(i,"json_oauth1_invalid_token")&&(n.props.onConnectOauthTokenClear(),n.props.onConnectURLClear(),n.props.onLoadingFinished())):n.firstTokenExchange(o),r.close(),window.clearInterval(a))}catch(e){console.log(e)}}),2e3);r&&r.focus()}},{key:"firstTokenExchange",value:function(e){var t=this;uN.restOauth1Request("GET",pixassist.apiBase+"oauth1/access",{oauth_verifier:e,oauth_token:t.props.session.user.oauth_token,oauth_token_secret:t.props.session.user.oauth_token_secret},(function(n){var r={oauth_token:n.oauth_token,oauth_token_secret:n.oauth_token_secret,oauth_verifier:e},o={is_logged:!0,oauth_token:n.oauth_token,oauth_token_secret:n.oauth_token_secret};pixassist.user.oauth_token=o.oauth_token,pixassist.user.oauth_token_secret=o.oauth_token_secret,py(n.user_ID)||(o.user_ID=n.user_ID,r.pixelgrade_user_ID=n.user_ID,pixassist.user.pixassist_user_ID=n.user_ID),py(n.user_login)||(o.user_login=n.user_login,r.pixelgrade_user_login=n.user_login,pixassist.user.pixelgrade_user_login=n.user_login),py(n.user_email)||(o.email=n.user_email,r.pixelgrade_user_email=n.user_email,pixassist.user.pixelgrade_user_email=n.user_email),py(n.display_name)||(o.display_name=n.display_name,r.pixelgrade_display_name=n.display_name,pixassist.user.pixelgrade_display_name=n.display_name),t.props.onLogin(o),t.updateUserMeta(r),uN.removeNotification({notice_id:"connection_lost"})}),(function(e){var n=py(e.status)?parseInt(e.code.toString()[0]):parseInt(e.status.toString()[0]);return"undefined"!==n&&2!==n&&(t.props.createErrorNotice(t,e),uN.checkHttpStatus(n),t.props.onLoadingFinished()),e}),(function(e){t.props.onLoadingFinished()}))}}]),t}($.Component),TN=Qy((function(e){return{session:e}}),(function(e){return{onLoading:function(){e({type:"LOADING"})},onLoadingFinished:function(){e({type:"LOADING_DONE"})},onDisconnect:function(){e({type:"DISCONNECTED"})},onConnected:function(){e({type:"CONNECTED"})},onConnectError:function(){e({type:"OAUTH_CONNECT_ERROR"})},onLicenseFound:function(){e({type:"HAS_LICENSE"})},onNoLicenseFound:function(){e({type:"NO_LICENSE"})},onExpiredLicense:function(){e({type:"EXPIRED_LICENSE"})},onValidatedLicense:function(){e({type:"VALIDATED_LICENSE"})},onWizard:function(){e({type:"IS_SETUP_WIZARD"})},onAvailableNextButton:function(){e({type:"NEXT_BUTTON_AVAILABLE"})},onUnAvailableNextButton:function(){e({type:"NEXT_BUTTON_UNAVAILABLE"})},onConnectURLReady:function(t,n){e({type:"CONNECT_URL_READY",url:t,user:n})},onConnectURLClear:function(){e({type:"CONNECT_URL_CLEAR"})},onConnectOauthTokenClear:function(){e({type:"CONNECT_OAUTH_TOKEN_CLEAR"})}}}))(CN),NN=function(e){function t(e){var n;return Og(this,t),Rg(zg(n=Ug(this,Mg(t).call(this,e))),"componentDidMount",(function(){if(dy(n.props,"session.is_pixelgrade_theme",!1)&&(n.props.session.hasOriginalDirName||uN.pushNotification({notice_id:"theme_directory_changed",title:"😭 "+uN.decodeHtml(dy(pixassist,"themeConfig.l10n.themeDirectoryChangedTitle","")),content:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.themeDirectoryChanged","")),type:"error"}),!n.props.session.hasOriginalStyleName)){var e=pixassist.themeSupports.is_child?dy(pixassist,"themeConfig.l10n.childThemeNameChanged",""):dy(pixassist,"themeConfig.l10n.themeNameChanged","");uN.pushNotification({notice_id:"theme_name_changed",title:"😱 "+uN.decodeHtml(dy(pixassist,"themeConfig.l10n.themeNameChangedTitle","")),content:uN.decodeHtml(e),type:"error"})}n.props.session.user.force_disconnected&&uN.pushNotification({notice_id:"connection_lost",title:"🤷 👀 "+uN.decodeHtml(dy(pixassist,"themeConfig.l10n.connectionLostTitle","")),content:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.connectionLost","")),type:"warning"}),window.location.search.indexOf("setup-wizard")>-1&&n.props.onWizard()})),Rg(zg(n),"getComponentDetails",(function(){var e={title:uN.replaceParams(n.state.title),validatedContent:uN.replaceParams(n.state.validatedContent),notValidatedContent:uN.replaceParams(n.state.notValidatedContent),loadingTitle:uN.replaceParams(n.state.loadingTitle),loadingContent:uN.replaceParams(n.state.loadingContent)};return window.location.search.indexOf("setup-wizard")>-1&&!n.props.session.is_logged?(e.title=uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorDashboardConnectTitle","")),e.notValidatedContent=uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorDashboardConnectContent",""))),e.loadingContent=uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorDashboardConnectLoadingContent","")))):n.props.session.is_logged||(e.notValidatedContent=uN.replaceParams(n.config.notValidatedContent)),window.location.search.indexOf("setup-wizard")>-1&&n.props.session.is_logged?(e.title='<span class="c-icon c-icon--large c-icon--success-auth"></span> '+uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorDashboardConnectedSuccessTitle","")),e.validatedContent=uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorDashboardConnectedSuccessContent","")))):n.props.session.is_logged&&(e.title=uN.replaceParams(n.config.validatedTitle),e.validatedContent=uN.replaceParams(n.config.validatedContent)),e})),Rg(zg(n),"restGetThemeLicense",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=zg(n),o={oauth_token:e.oauth_token,oauth_token_secret:e.oauth_token_secret,user_id:parseInt(e.user_ID)};o.user_id||py(pixassist.user.pixassist_user_ID)||(o.user_id=parseInt(pixassist.user.pixassist_user_ID)),pixassist.themeSupports.theme_id&&(o.hash_id=pixassist.themeSupports.theme_id),pixassist.themeSupports.theme_type&&(o.type=pixassist.themeSupports.theme_type),o.theme_headers=pixassist.themeHeaders,t||r.props.onLoadingLicenses(),uN.restOauth1Request(pixassist.apiEndpoints.wupl.licenses.method,pixassist.apiEndpoints.wupl.licenses.url,o,(function(n){if("success"===n.code){var o=uN.getLicense(n.data.licenses);if(null!==o)r.props.onLicenseFound(),r.licenseActivation(o,r,e,t);else{r.props.onLoadingFinished(),r.props.onNoLicenseFound();var i=r.config.noThemeLicense;py(pixassist.user.pixelgrade_user_login)||(i=i+" (username: "+pixassist.user.pixelgrade_user_login+")"),uN.pushNotification({notice_id:"no_licenses_found",title:uN.decodeHtml(pixassist.themeConfig.l10n.validationErrorTitle),content:uN.decodeHtml(i),type:"warning"})}}else r.props.onLoadingFinished(),r.props.onNoLicenseFound(),uN.pushNotification({notice_id:"no_licenses_found",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.validationErrorTitle","")),content:uN.decodeHtml(r.config.noThemeLicense),type:"warning"})}),(function(e){r.props.onLoadingFinished(),r.props.onNoLicenseFound(),uN.pushNotification({notice_id:"no_licenses_found",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.validationErrorTitle","")),content:uN.decodeHtml(r.config.noThemeLicense),type:"warning"})}),(function(e){var t=py(e.status)?parseInt(e.code.toString()[0]):parseInt(e.status.toString()[0]);return 2!==t&&"undefined"!==t&&(r.createErrorNotice(r,e),uN.checkHttpStatus(t)),e}))})),Rg(zg(n),"retryValidation",(function(){var e=zg(n).state;n.restGetThemeLicense(e)})),Rg(zg(n),"licenseActivation",(function(e,t,n){if(py(e.wupdates_product_hashid))return!0;var r=e.wupdates_product_hashid;"string"!=typeof r&&(r=SS(r));e.license_status;if(!py(e.license_type)||r===pixassist.themeSupports.theme_id&&!py(e.license_status))switch(n.license_type=e.license_type,e.license_status){case"valid":case"active":var o=new Date(1e3*(600+(Date.now()/1e3|0)));wN.save("licenseHash",{hash:e.license_hash,status:e.license_status},{expires:o}),uN.restOauth1Request(pixassist.apiEndpoints.wupl.licenseAction.method,pixassist.apiEndpoints.wupl.licenseAction.url,{oauth_token:n.oauth_token,oauth_token_secret:n.oauth_token_secret,action:"activate",site_url:pixassist.siteUrl,license_hash:e.license_hash,hash_id:pixassist.themeSupports.theme_id},(function(n){if("success"===n.code)return t.updateThemeMod({license:e}),t.updateLocalized(),t.props.onValidatedLicense(e),GT(),uN.removeNotification({notice_id:"outdated_inactive_license"}),uN.removeNotification({notice_id:"no_licenses_found"}),uN.removeNotification({notice_id:"activation_error"}),-1===uN.compareVersion(dy(pixassist,"themeSupports.theme_version","0.0.1"),dy(pixassist,"themeMod.themeNewVersion.new_version","0.0.1"))&&uN.pushNotification({notice_id:"outdated_theme",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.themeUpdateAvailableTitle","")),content:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.themeUpdateAvailableContent","")),type:"info",ctaLabel:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.themeUpdateButton","")),ctaAction:uN.clickUpdateTheme,secondaryCtaLabel:pixassist.themeConfig.l10n.themeChangelogLink,secondaryCtaLink:dy(pixassist,"themeMod.themeNewVersion.url","#")}),t.props.onLoadingFinished(),window.location.search.indexOf("setup-wizard"),!0;t.props.onLoadingFinished(),uN.pushNotification({notice_id:"activation_error",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorActivationErrorTitle","")),content:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorActivationErrorContent","")),type:"error"})}),(function(e){}),(function(e){var n=parseInt(e.status.toString()[0]);return 2!==n&&"undefined"!==n&&(t.createErrorNotice(t,e),uN.checkHttpStatus(n)),e}))}else uN.pushNotification({notice_id:"hash_id_not_found",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.validationErrorTitle","")),content:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.hashidNotFoundNotice","")),type:"error"}),t.props.onLoadingFinished()})),n.state={},n.config=pixassist.themeConfig.authentication,py(n.props.title)?n.state.title=uN.replaceParams(n.config.title):n.state.title=uN.replaceParams(n.props.title),py(n.props.validatedContent)?n.state.validatedContent=uN.replaceParams(n.config.validatedContent):n.state.validatedContent=uN.replaceParams(n.props.validatedContent),py(n.props.notValidatedContent)?n.state.notValidatedContent=uN.replaceParams(n.config.notValidatedContent):n.state.notValidatedContent=uN.replaceParams(n.props.notValidatedContent),py(n.props.loadingContent)?n.state.loadingContent=uN.replaceParams(n.config.loadingContent):n.state.loadingContent=uN.replaceParams(n.props.loadingContent),py(n.props.loadingTitle)?n.state.loadingTitle=uN.replaceParams(n.config.loadingTitle):n.state.loadingTitle=uN.replaceParams(n.props.loadingTitle),n.state.auto_retried_validation=!1,n.onLogin=n.onLogin.bind(zg(n)),n.restGetThemeLicense=n.restGetThemeLicense.bind(zg(n)),n.retryValidation=n.retryValidation.bind(zg(n)),n.licenseActivation=n.licenseActivation.bind(zg(n)),n.createErrorNotice=n.createErrorNotice.bind(zg(n)),n.getComponentDetails=n.getComponentDetails.bind(zg(n)),n}return jg(t,e),Ag(t,[{key:"render",value:function(){var e=this.getComponentDetails();return this.props.session.loading?$.createElement("div",null,$.createElement("h2",{className:"section__title",dangerouslySetInnerHTML:{__html:e.loadingTitle}}),$.createElement("p",{className:"section__content",dangerouslySetInnerHTML:{__html:e.loadingContent}}),$.createElement(E_,{size:100,left:0,top:10,variant:"indeterminate",color:"primary",style:{display:"inline-block",position:"relative"}})):this.props.session.is_logged?this.props.session.is_logged&&this.props.session.is_wizard?$.createElement("div",null,$.createElement("h2",{className:"section__title",dangerouslySetInnerHTML:{__html:e.title}}),$.createElement("p",{className:"section__content",dangerouslySetInnerHTML:{__html:e.validatedContent}})):dy(this.props,"session.is_pixelgrade_theme",!1)?(!this.state.auto_retried_validation&&this.props.session.is_logged&&dy(this.props,"session.is_pixelgrade_theme",!1)&&!this.props.session.has_license&&(this.state.auto_retried_validation=!0,this.retryValidation()),this.props.session.is_logged&&this.props.session.has_license&&!this.props.session.is_expired&&!this.props.session.is_active?$.createElement("div",null,$.createElement("h2",{className:"section__title",dangerouslySetInnerHTML:{__html:e.title}}),$.createElement("p",{className:"section__content",dangerouslySetInnerHTML:{__html:this.config.noThemeContent}}),$.createElement("a",{className:"btn btn--action",href:"#",onClick:this.retryValidation},uN.replaceParams(uN.replaceParams(uN.decodeHtml(this.config.notValidatedButton))))):$.createElement("div",{id:"authenticator"},$.createElement("h2",{className:"section__title",dangerouslySetInnerHTML:{__html:e.title}}),$.createElement("p",{className:"section__content",dangerouslySetInnerHTML:{__html:e.validatedContent}}),$.createElement("a",{className:"btn btn--action btn--full btn--icon-refresh",onClick:this.retryValidation},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.refreshConnectionButtonLabel",""))))):(GT(),$.createElement("div",null,$.createElement("h2",{className:"section__title",dangerouslySetInnerHTML:{__html:this.config.brokenTitle}}),$.createElement("p",{className:"section__content",dangerouslySetInnerHTML:{__html:uN.replaceParams(this.config.brokenContent)}}))):((py(pixassist.themeSupports.ock)||py(pixassist.themeSupports.ocs))&&(pixassist.themeSupports.ock="Lm12n034gL19",pixassist.themeSupports.ocs="6AU8WKBK1yZRDerL57ObzDPM7SGWRp21Csi5Ti5LdVNG9MbP"),$.createElement("div",null,$.createElement("h2",{className:"section__title",dangerouslySetInnerHTML:{__html:e.title}}),$.createElement("p",{className:"section__content",dangerouslySetInnerHTML:{__html:e.notValidatedContent}}),$.createElement(TN,{onLogin:this.onLogin,label:uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.connectButtonLabel",""))),ock:pixassist.themeSupports.ock,ocs:pixassist.themeSupports.ocs,createErrorNotice:this.createErrorNotice})))}},{key:"onLogin",value:function(e){this.props.onConnected({oauth_token:e.oauth_token,oauth_token_secret:e.oauth_token_secret,pixassist_user_ID:e.user_ID,pixelgrade_user_email:e.email,pixelgrade_user_login:e.user_login,pixelgrade_display_name:e.display_name}),-1===window.location.search.indexOf("setup-wizard")?this.restGetThemeLicense(e):(this.props.onLoadingFinished(),this.props.session.is_pixelgrade_theme&&this.restGetThemeLicense(e,!0),this.props.onAvailableNextButton())}},{key:"updateThemeMod",value:function(e){var t=this;uN.$ajax(pixassist.wpRest.endpoint.globalState.set.url,pixassist.wpRest.endpoint.globalState.set.method,{theme_mod:e,force_tgmpa:"load"},(function(e){"success"!==e.code||py(e.data.localized)||(pixassist=e.data.localized,t.props.onUpdatedThemeMod(),GT())}),null,null,!1)}},{key:"updateLocalized",value:function(){var e=this;uN.$ajax(pixassist.wpRest.endpoint.localized.get.url,pixassist.wpRest.endpoint.localized.get.method,{force_tgmpa:"load"},(function(t){if("success"===t.code&&!py(t.data.localized)){pixassist=t.data.localized;var n=new CustomEvent("localizedChanged",{});window.dispatchEvent(n),e.props.onUpdatedLocalized(),GT()}}),null,null,!1)}},{key:"createErrorNotice",value:function(e,t){var n=uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorErrorMessage1",""));n+=t.status+": "+t.statusText+"\n . "+uN.decodeHtml(dy(pixassist,"themeConfig.l10n.authenticatorErrorMessage2","")),uN.pushNotification({notice_id:"undefined_error",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.validationErrorTitle","")),content:n,type:"error"}),e.props.onLoadingFinished(),e.props.onConnectError()}}]),t}($.Component),PN=Qy((function(e){return{session:e}}),(function(e){return{onLoading:function(){e({type:"LOADING"})},onLoadingLicenses:function(){e({type:"LOADING_LICENSES"})},onLoadingFinished:function(){e({type:"LOADING_DONE"})},onDisconnect:function(){e({type:"DISCONNECTED"})},onConnected:function(t){e({type:"CONNECTED",user:t})},onLicenseFound:function(){e({type:"HAS_LICENSE"})},onNoLicenseFound:function(){e({type:"NO_LICENSE"})},onExpiredLicense:function(t){e({type:"EXPIRED_LICENSE",license:t})},onValidatedLicense:function(t){e({type:"VALIDATED_LICENSE",license:t})},onWizard:function(){e({type:"IS_SETUP_WIZARD"})},onAvailableNextButton:function(){e({type:"NEXT_BUTTON_AVAILABLE"})},onUnAvailableNextButton:function(){e({type:"NEXT_BUTTON_UNAVAILABLE"})},onConnectError:function(){e({type:"OAUTH_CONNECT_ERROR"})},onUpdatedThemeMod:function(){e({type:"ON_UPDATED_THEME_MOD"})},onUpdatedLocalized:function(){e({type:"ON_UPDATED_LOCALIZED"})}}}))(NN),ON=ah?Object.defineProperties:function(e,t){Th(e);for(var n,r=Ab(t),o=r.length,i=0;o>i;)Ph.f(e,n=r[i++],t[n]);return e},LN=Wh("IE_PROTO"),AN=function(){},RN=function(e){return"<script>"+e+"<\/script>"},DN=function(){try{kN=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;DN=kN?function(e){e.write(RN("")),e.close();var t=e.parentWindow.Object;return e=null,t}(kN):((t=Eh("iframe")).style.display="none",aE.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(RN("document.F=Object")),e.close(),e.F);for(var n=gm.length;n--;)delete DN.prototype[gm[n]];return DN()};$h[LN]=!0;var IN=Object.create||function(e,t){var n;return null!==e?(AN.prototype=Th(e),n=new AN,AN.prototype=null,n[LN]=e):n=DN(),void 0===t?n:ON(n,t)},jN=ym.f,MN={}.toString,qN="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zN={f:function(e){return qN&&"[object Window]"==MN.call(e)?function(e){try{return jN(e)}catch(e){return qN.slice()}}(e):jN(gh(e))}},UN={f:gb},BN=Ph.f,FN=wb.forEach,HN=Wh("hidden"),VN=gb("toPrimitive"),WN=Zh.set,$N=Zh.getterFor("Symbol"),GN=Object.prototype,KN=oh.Symbol,QN=rm("JSON","stringify"),XN=Ch.f,YN=Ph.f,JN=zN.f,ZN=uh.f,eP=Uh("symbols"),tP=Uh("op-symbols"),nP=Uh("string-to-symbol-registry"),rP=Uh("symbol-to-string-registry"),oP=Uh("wks"),iP=oh.QObject,aP=!iP||!iP.prototype||!iP.prototype.findChild,sP=ah&&ih((function(){return 7!=IN(YN({},"a",{get:function(){return YN(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=XN(GN,t);r&&delete GN[t],YN(e,t,n),r&&e!==GN&&YN(GN,t,r)}:YN,lP=function(e,t){var n=eP[e]=IN(KN.prototype);return WN(n,{type:"Symbol",tag:e,description:t}),ah||(n.description=t),n},uP=pb?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof KN},cP=function(e,t,n){e===GN&&cP(tP,t,n),Th(e);var r=yh(t,!0);return Th(n),xh(eP,r)?(n.enumerable?(xh(e,HN)&&e[HN][r]&&(e[HN][r]=!1),n=IN(n,{enumerable:ch(0,!1)})):(xh(e,HN)||YN(e,HN,ch(1,{})),e[HN][r]=!0),sP(e,r,n)):YN(e,r,n)},dP=function(e,t){Th(e);var n=gh(t),r=Ab(n).concat(mP(n));return FN(r,(function(t){ah&&!pP.call(n,t)||cP(e,t,n[t])})),e},pP=function(e){var t=yh(e,!0),n=ZN.call(this,t);return!(this===GN&&xh(eP,t)&&!xh(tP,t))&&(!(n||!xh(this,t)||!xh(eP,t)||xh(this,HN)&&this[HN][t])||n)},fP=function(e,t){var n=gh(e),r=yh(t,!0);if(n!==GN||!xh(eP,r)||xh(tP,r)){var o=XN(n,r);return!o||!xh(eP,r)||xh(n,HN)&&n[HN][r]||(o.enumerable=!0),o}},hP=function(e){var t=JN(gh(e)),n=[];return FN(t,(function(e){xh(eP,e)||xh($h,e)||n.push(e)})),n},mP=function(e){var t=e===GN,n=JN(t?tP:gh(e)),r=[];return FN(n,(function(e){!xh(eP,e)||t&&!xh(GN,e)||r.push(eP[e])})),r};(db||(em((KN=function(){if(this instanceof KN)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=Hh(e),n=function(e){this===GN&&n.call(tP,e),xh(this,HN)&&xh(this[HN],t)&&(this[HN][t]=!1),sP(this,t,ch(1,e))};return ah&&aP&&sP(GN,t,{configurable:!0,set:n}),lP(t,e)}).prototype,"toString",(function(){return $N(this).tag})),em(KN,"withoutSetter",(function(e){return lP(Hh(e),e)})),uh.f=pP,Ph.f=cP,Ch.f=fP,ym.f=zN.f=hP,bm.f=mP,UN.f=function(e){return lP(gb(e),e)},ah&&(YN(KN.prototype,"description",{configurable:!0,get:function(){return $N(this).description}}),em(GN,"propertyIsEnumerable",pP,{unsafe:!0}))),Om({global:!0,wrap:!0,forced:!db,sham:!db},{Symbol:KN}),FN(Ab(oP),(function(e){!function(e){var t=tm.Symbol||(tm.Symbol={});xh(t,e)||BN(t,e,{value:UN.f(e)})}(e)})),Om({target:"Symbol",stat:!0,forced:!db},{for:function(e){var t=String(e);if(xh(nP,t))return nP[t];var n=KN(t);return nP[t]=n,rP[n]=t,n},keyFor:function(e){if(!uP(e))throw TypeError(e+" is not a symbol");if(xh(rP,e))return rP[e]},useSetter:function(){aP=!0},useSimple:function(){aP=!1}}),Om({target:"Object",stat:!0,forced:!db,sham:!ah},{create:function(e,t){return void 0===t?IN(e):dP(IN(e),t)},defineProperty:cP,defineProperties:dP,getOwnPropertyDescriptor:fP}),Om({target:"Object",stat:!0,forced:!db},{getOwnPropertyNames:hP,getOwnPropertySymbols:mP}),Om({target:"Object",stat:!0,forced:ih((function(){bm.f(1)}))},{getOwnPropertySymbols:function(e){return bm.f(ub(e))}}),QN)&&Om({target:"JSON",stat:!0,forced:!db||ih((function(){var e=KN();return"[null]"!=QN([e])||"{}"!=QN({a:e})||"{}"!=QN(Object(e))}))},{stringify:function(e,t,n){for(var r,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=t,(vh(t)||void 0!==e)&&!uP(e))return cb(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!uP(t))return t}),o[1]=t,QN.apply(null,o)}});KN.prototype[VN]||Oh(KN.prototype,VN,KN.prototype.valueOf),F_(KN,"Symbol"),$h[HN]=!0;var gP=Ph.f,vP=oh.Symbol;if(ah&&"function"==typeof vP&&(!("description"in vP.prototype)||void 0!==vP().description)){var yP={},bP=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof bP?new vP(e):void 0===e?vP():vP(e);return""===e&&(yP[t]=!0),t};wm(bP,vP);var xP=bP.prototype=vP.prototype;xP.constructor=bP;var wP=xP.toString,_P="Symbol(test)"==String(vP("test")),EP=/^Symbol\((.*)\)[^)]+$/;gP(xP,"description",{configurable:!0,get:function(){var e=vh(this)?this.valueOf():this,t=wP.call(e);if(xh(yP,e))return"";var n=_P?t.slice(7,-1):t.replace(EP,"$1");return""===n?void 0:n}}),Om({global:!0,forced:!0},{Symbol:bP})}var kP=gb("unscopables"),SP=Array.prototype;null==SP[kP]&&Ph.f(SP,kP,{configurable:!0,value:IN(null)});var CP=wb.find,TP=!0,NP=Zy("find");"find"in[]&&Array(1).find((function(){TP=!1})),Om({target:"Array",proto:!0,forced:TP||!NP},{find:function(e){return CP(this,e,arguments.length>1?arguments[1]:void 0)}}),function(e){SP[kP][e]=!0}("find");var PP=Ph.f,OP=Function.prototype,LP=OP.toString,AP=/^\s*function ([^ (]*)/;!ah||"name"in OP||PP(OP,"name",{configurable:!0,get:function(){try{return LP.call(this).match(AP)[1]}catch(e){return""}}});var RP,DP="\t\n\v\f\r \u2028\u2029\ufeff",IP="["+DP+"]",jP=RegExp("^"+IP+IP+"*"),MP=RegExp(IP+IP+"*$"),qP=function(e){return function(t){var n=String(mh(t));return 1&e&&(n=n.replace(jP,"")),2&e&&(n=n.replace(MP,"")),n}},zP={start:qP(1),end:qP(2),trim:qP(3)},UP=zP.trim;function BP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function FP(e){var t=e.controlled,n=e.default,r=(e.name,ue(void 0!==t).current),o=se(n),i=o[0],a=o[1];return[r?t:i,oe((function(e){r||a(e)}),[])]}Om({target:"String",proto:!0,forced:(RP="trim",ih((function(){return!!DP[RP]()||"
"!="
"[RP]()||DP[RP].name!==RP})))},{trim:function(){return UP(this)}});var HP=Y();function VP(){return ie(HP)}function WP(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function $P(e,t){return re((function(){return null==e&&null==t?null:function(n){WP(e,n),WP(t,n)}}),[e,t])}var GP="undefined"!=typeof window?te:ne;function KP(e){var t=ue(e);return GP((function(){t.current=e})),oe((function(){return t.current.apply(void 0,arguments)}),[])}var QP="undefined"!=typeof window?te:ne;function XP(e){var t=e.children,n=e.defer,r=void 0!==n&&n,o=e.fallback,i=void 0===o?null:o,a=se(!1),s=a[0],l=a[1];return QP((function(){r||l(!0)}),[r]),ne((function(){r&&l(!0)}),[r]),X(ee,null,s?t:i)}var YP=!0,JP=!1,ZP=null,eO={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function tO(e){e.metaKey||e.altKey||e.ctrlKey||(YP=!0)}function nO(){YP=!1}function rO(){"hidden"===this.visibilityState&&JP&&(YP=!0)}function oO(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return YP||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!eO[t]||e.readOnly)||("TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable)}(t)}function iO(){JP=!0,window.clearTimeout(ZP),ZP=window.setTimeout((function(){JP=!1}),100)}function aO(){return{isFocusVisible:oO,onBlurVisible:iO,ref:oe((function(e){var t,n=tc(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",tO,!0),t.addEventListener("mousedown",nO,!0),t.addEventListener("pointerdown",nO,!0),t.addEventListener("touchstart",nO,!0),t.addEventListener("visibilitychange",rO,!0))}),[])}}var sO=!1,lO=$.createContext(null),uO=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}Hc(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=ec.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;!t&&!r||sO?this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,o),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,o)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!sO?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=Wc(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return $.createElement(lO.Provider,{value:null},n(e,r));var o=$.Children.only(n);return $.createElement(lO.Provider,{value:null},$.cloneElement(o,r))},t}($.Component);function cO(){}function dO(e,t){var n=Object.create(null);return e&&K.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&G(e)?t(e):e}(e)})),n}function pO(e,t,n){return null!=n[t]?n[t]:e.props[t]}function fO(e,t,n){var r=dO(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];s[o[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if(G(a)){var s=i in t,l=i in r,u=t[i],c=G(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&G(u)&&(o[i]=Q(a,{onExited:n.bind(null,a),in:u.props.in,exit:pO(a,"exit",e),enter:pO(a,"enter",e)})):o[i]=Q(a,{in:!1}):o[i]=Q(a,{onExited:n.bind(null,a),in:!0,exit:pO(a,"exit",e),enter:pO(a,"enter",e)})}})),o}uO.contextType=lO,uO.propTypes={},uO.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:cO,onEntering:cO,onEntered:cO,onExit:cO,onExiting:cO,onExited:cO},uO.UNMOUNTED=0,uO.EXITED=1,uO.ENTERING=2,uO.ENTERED=3,uO.EXITING=4;var hO=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},mO=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Vc(Vc(r)));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Hc(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,dO(n.children,(function(e){return Q(e,{onExited:r.bind(null,e),in:!0,appear:pO(e,"appear",n),enter:pO(e,"enter",n),exit:pO(e,"exit",n)})}))):fO(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=dO(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=oc({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Wc(e,["component","childFactory"]),o=this.state.contextValue,i=hO(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?$.createElement(lO.Provider,{value:o},i):$.createElement(lO.Provider,{value:o},$.createElement(t,r,i))},t}($.Component);mO.propTypes={},mO.defaultProps={component:"div",childFactory:function(e){return e}};var gO="undefined"==typeof window?ne:te;function vO(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,o=e.rippleX,i=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=se(!1),p=d[0],f=d[1],h=Hf(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+i,left:-a/2+o},g=Hf(t.child,p&&t.childLeaving,r&&t.childPulsate),v=KP(u);return gO((function(){if(!s){f(!0);var e=setTimeout(v,c);return function(){clearTimeout(e)}}}),[v,s,c]),X("span",{className:h,style:m},X("span",{className:g}))}var yO=Z((function(e,t){var n=e.center,r=void 0!==n&&n,o=e.classes,i=e.className,a=wf(e,["center","classes","className"]),s=se([]),l=s[0],u=s[1],c=ue(0),d=ue(null);ne((function(){d.current&&(d.current(),d.current=null)}),[l]);var p=ue(!1),f=ue(null),h=ue(null),m=ue(null);ne((function(){return function(){clearTimeout(f.current)}}),[]);var g=oe((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,a=e.cb;u((function(e){return[].concat(kp(e),[X(vO,{key:c.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),c.current+=1,d.current=a}),[o]),v=oe((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=t.pulsate,i=void 0!==o&&o,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var c,d,v,y=u?null:m.current,b=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.clientX?e.clientX:e.touches[0].clientX,w=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(x-b.left),d=Math.round(w-b.top)}if(s)(v=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(v+=1);else{var _=2*Math.max(Math.abs((y?y.clientWidth:0)-c),c)+2,E=2*Math.max(Math.abs((y?y.clientHeight:0)-d),d)+2;v=Math.sqrt(Math.pow(_,2)+Math.pow(E,2))}e.touches?null===h.current&&(h.current=function(){g({pulsate:i,rippleX:c,rippleY:d,rippleSize:v,cb:n})},f.current=setTimeout((function(){h.current&&(h.current(),h.current=null)}),80)):g({pulsate:i,rippleX:c,rippleY:d,rippleSize:v,cb:n})}}),[r,g]),y=oe((function(){v({},{pulsate:!0})}),[v]),b=oe((function(e,t){if(clearTimeout(f.current),"touchend"===e.type&&h.current)return e.persist(),h.current(),h.current=null,void(f.current=setTimeout((function(){b(e,t)})));h.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return ae(t,(function(){return{pulsate:y,start:v,stop:b}}),[y,v,b]),X("span",oc({className:Hf(o.root,i),ref:m},a),X(mO,{component:null,exit:!0},l))})),bO=Ng((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(ce(yO)),xO=Z((function(e,t){var n=e.action,r=e.buttonRef,o=e.centerRipple,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,p=void 0!==d&&d,f=e.disableRipple,h=void 0!==f&&f,m=e.disableTouchRipple,g=void 0!==m&&m,v=e.focusRipple,y=void 0!==v&&v,b=e.focusVisibleClassName,x=e.onBlur,w=e.onClick,_=e.onFocus,E=e.onFocusVisible,k=e.onKeyDown,S=e.onKeyUp,C=e.onMouseDown,T=e.onMouseLeave,N=e.onMouseUp,P=e.onTouchEnd,O=e.onTouchMove,L=e.onTouchStart,A=e.onDragLeave,R=e.tabIndex,D=void 0===R?0:R,I=e.TouchRippleProps,j=e.type,M=void 0===j?"button":j,q=wf(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),z=ue(null);var U=ue(null),B=se(!1),F=B[0],H=B[1];p&&F&&H(!1);var V=aO(),W=V.isFocusVisible,$=V.onBlurVisible,G=V.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return KP((function(r){return t&&t(r),!n&&U.current&&U.current[e](r),!0}))}ae(n,(function(){return{focusVisible:function(){H(!0),z.current.focus()}}}),[]),ne((function(){F&&y&&!h&&U.current.pulsate()}),[h,y,F]);var Q=K("start",C),Y=K("stop",A),J=K("stop",N),Z=K("stop",(function(e){F&&e.preventDefault(),T&&T(e)})),ee=K("start",L),te=K("stop",P),re=K("stop",O),oe=K("stop",(function(e){F&&($(e),H(!1)),x&&x(e)}),!1),ie=KP((function(e){p||(z.current||(z.current=e.currentTarget),W(e)&&(H(!0),E&&E(e)),_&&_(e))})),le=function(){var e=tc(z.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},ce=ue(!1),de=KP((function(e){y&&!ce.current&&F&&U.current&&" "===e.key&&(ce.current=!0,e.persist(),U.current.stop(e,(function(){U.current.start(e)}))),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),k&&k(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&(e.preventDefault(),w&&w(e))})),pe=KP((function(e){y&&" "===e.key&&U.current&&F&&!e.defaultPrevented&&(ce.current=!1,e.persist(),U.current.stop(e,(function(){U.current.pulsate(e)}))),S&&S(e),w&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&w(e)})),fe=c;"button"===fe&&q.href&&(fe="a");var he={};"button"===fe?(he.type=M,he.disabled=p):("a"===fe&&q.href||(he.role="button"),he["aria-disabled"]=p);var me=$P(r,t),ge=$P(G,z),ve=$P(me,ge);return X(fe,oc({className:Hf(s.root,l,F&&[s.focusVisible,b],p&&s.disabled),onBlur:oe,onClick:w,onFocus:ie,onKeyDown:de,onKeyUp:pe,onMouseDown:Q,onMouseLeave:Z,onMouseUp:J,onDragLeave:Y,onTouchEnd:te,onTouchMove:re,onTouchStart:ee,ref:ve,tabIndex:p?-1:D},he,q),a,X(XP,null,h||p?null:X(bO,oc({ref:U,center:i},I))))})),wO=Ng({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(xO),_O=Z((function(e,t){var n=e.edge,r=void 0!==n&&n,o=e.children,i=e.classes,a=e.className,s=e.color,l=void 0===s?"default":s,u=e.disabled,c=void 0!==u&&u,d=e.disableFocusRipple,p=void 0!==d&&d,f=e.size,h=void 0===f?"medium":f,m=wf(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return X(wO,oc({className:Hf(i.root,a,"default"!==l&&i["color".concat(r_(l))],c&&i.disabled,"small"===h&&i["size".concat(r_(h))],{start:i.edgeStart,end:i.edgeEnd}[r]),centerRipple:!0,focusRipple:!p,disabled:c,ref:t},m),X("span",{className:i.label},o))})),EO=Ng((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:zm(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:zm(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:zm(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(_O),kO=Z((function(e,t){var n=e.autoFocus,r=e.checked,o=e.checkedIcon,i=e.classes,a=e.className,s=e.defaultChecked,l=e.disabled,u=e.icon,c=e.id,d=e.inputProps,p=e.inputRef,f=e.name,h=e.onBlur,m=e.onChange,g=e.onFocus,v=e.readOnly,y=e.required,b=e.tabIndex,x=e.type,w=e.value,_=wf(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),E=BP(FP({controlled:r,default:Boolean(s),name:"SwitchBase"}),2),k=E[0],S=E[1],C=VP(),T=l;C&&void 0===T&&(T=C.disabled);var N="checkbox"===x||"radio"===x;return X(EO,oc({component:"span",className:Hf(i.root,a,k&&i.checked,T&&i.disabled),disabled:T,tabIndex:null,role:void 0,onFocus:function(e){g&&g(e),C&&C.onFocus&&C.onFocus(e)},onBlur:function(e){h&&h(e),C&&C.onBlur&&C.onBlur(e)},ref:t},_),X("input",oc({autoFocus:n,checked:r,defaultChecked:s,className:i.input,disabled:T,id:N&&c,name:f,onChange:function(e){var t=e.target.checked;S(t),m&&m(e,t)},readOnly:v,ref:p,required:y,tabIndex:b,type:x,value:w},d)),k?o:u)})),SO=Ng({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(kO),CO=u_(X("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),TO=u_(X("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),NO=u_(X("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"})),PO=X(TO,null),OO=X(CO,null),LO=X(NO,null),AO=Z((function(e,t){var n=e.checkedIcon,r=void 0===n?PO:n,o=e.classes,i=e.color,a=void 0===i?"secondary":i,s=e.icon,l=void 0===s?OO:s,u=e.indeterminate,c=void 0!==u&&u,d=e.indeterminateIcon,p=void 0===d?LO:d,f=e.inputProps,h=e.size,m=void 0===h?"medium":h,g=wf(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]);return X(SO,oc({type:"checkbox",classes:{root:Hf(o.root,o["color".concat(r_(a))],c&&o.indeterminate),checked:o.checked,disabled:o.disabled},color:a,inputProps:oc({"data-indeterminate":c},f),icon:Q(c?p:l,{fontSize:"small"===m?"small":"default"}),checkedIcon:Q(c?p:r,{fontSize:"small"===m?"small":"default"}),ref:t},g))})),RO=Ng((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:zm(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:zm(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(AO),DO=function(e){function t(e){var n;return Og(this,t),Rg(zg(n=Ug(this,Mg(t).call(this,e))),"timer",null),Rg(zg(n),"interval",null),Rg(zg(n),"handlePluginSelect",(function(e){return function(t){var r=zg(n),o=r.state.plugins;o[e].selected=t.target.checked,r.setState({plugins:o}),r.props.onRender&&window.location.search.indexOf("setup-wizard")>-1&&r.props.onRender(o)}})),n.state={plugins:n.standardizePlugins(dy(pixassist,"themeConfig.pluginManager.tgmpaPlugins",{})),enableIndividualActions:!0,groupByRequired:!1,ready:!1},n.queue=new uN.Queue,py(n.props.enableIndividualActions)||(n.state.enableIndividualActions=n.props.enableIndividualActions),py(n.props.groupByRequired)||(n.state.groupByRequired=n.props.groupByRequired),n.getPluginStatus=n.getPluginStatus.bind(zg(n)),n.handlePluginTrigger=n.handlePluginTrigger.bind(zg(n)),n.activatePlugin=n.activatePlugin.bind(zg(n)),n.eventInstallPlugin=n.eventInstallPlugin.bind(zg(n)),n.eventActivatePlugin=n.eventActivatePlugin.bind(zg(n)),n.eventUpdatePlugin=n.eventUpdatePlugin.bind(zg(n)),n.createPseudoUpdateElement=n.createPseudoUpdateElement.bind(zg(n)),n.markPluginAsActive=n.markPluginAsActive.bind(zg(n)),n.updatePluginsList=n.updatePluginsList.bind(zg(n)),n.handlePluginSelect=n.handlePluginSelect.bind(zg(n)),n}return jg(t,e),Ag(t,[{key:"render",value:function(){var e=this,t=[];py(this.state.plugins)||GC(this.state.plugins)||((t=Object.keys(this.state.plugins)).sort((function(t,n){return NS(e.state.plugins[t].order)?e.state.plugins[t].order=10:e.state.plugins[t].order=Vb(e.state.plugins[t].order),NS(e.state.plugins[n].order)?e.state.plugins[n].order=10:e.state.plugins[n].order=Vb(e.state.plugins[n].order),e.state.plugins[t].order<e.state.plugins[n].order?-1:e.state.plugins[t].order>e.state.plugins[n].order?1:0})),t.sort((function(t,n){return e.state.plugins[t].required&&!e.state.plugins[n].required?-1:!e.state.plugins[t].required&&e.state.plugins[n].required?1:0})));var n="plugins";e.state.enableIndividualActions||(n+=" no-individual-actions no-status-icons");var r=!1;return $.createElement("div",{className:n},GC(t)?$.createElement("p",null,uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.noPlugins",""))):t.map((function(t,n){if("pixelgrade-care"===t)return!0;var o=e.state.plugins[t],i=e.getPluginStatus(o),a="plugin box",s="";switch(i){case"active":a+=" box--plugin-validated";break;case"outdated":if(!e.state.enableIndividualActions){a+=" box--plugin-validated";break}o.required?(a+=" box--plugin-invalidated",e.state.enableIndividualActions?a+=" box--warning":a+=" box--neutral"):a+=" box--neutral";var l=e.createPseudoUpdateElement(o.slug);s=$.createElement("button",{onClick:e.eventUpdatePlugin,className:"btn btn--action btn--small","data-available":l},uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.updateButton","")));break;case"inactive":o.required?(a+=" box--plugin-invalidated",e.state.enableIndividualActions?a+=" box--warning":a+=" box--neutral"):a+=" box--neutral",s=$.createElement("button",{onClick:e.eventActivatePlugin,className:"btn btn--action btn--small"},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.pluginActivateLabel","")));break;case"missing":o.required?(e.state.enableIndividualActions?a+=" box--warning":a+=" box--neutral",a+=" box--plugin-invalidated"):a+=" box--neutral",s=$.createElement("button",{onClick:e.eventInstallPlugin,className:"btn btn--action btn--small"},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.pluginInstallLabel","")))}var u="",c="",d="repo",p="";NS(o.install_url)||(c=o.install_url.replace(/&/g,"&")),NS(o.activate_url)||(u=o.activate_url.replace(/&/g,"&")),"external"===dy(o,"source_type",!1)&&(d="external"),o.author&&(p=$.createElement("span",{className:"plugin-author"}," by ",o.author));var f="",h="";if(e.state.enableIndividualActions)h=$.createElement("div",{className:"box__cta"},s);else{var m=!1;o.required?m=!0:"active"!==i&&"outdated"!==i||(m=!0),f=$.createElement("div",{className:"box__checkbox"},$.createElement(RO,{disabled:m,checked:o.selected,onChange:e.handlePluginSelect(t),value:t,color:"primary"}))}var g="";if(e.state.groupByRequired){var v=o.required?"required":"recommended";r!==v&&(r=v,g=$.createElement("p",{className:"required-group__label required-group--"+v},uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.groupByRequiredLabels."+r,""))))}return $.createElement($.Fragment,{key:t},g,$.createElement("div",{className:a,"data-status":i,"data-source_type":d,"data-slug":o.slug,"data-real_slug":o.file_path,"data-activate_url":u,"data-install_url":c},f,$.createElement("div",{className:"box__body"},$.createElement("h5",{className:"box__title"},o.name,p),$.createElement("p",{className:"box__text",dangerouslySetInnerHTML:{__html:o.description}})),h))})))}},{key:"componentDidMount",value:function(){var e=ec.findDOMNode(this).getElementsByClassName("plugin");if(e.length>0)for(var t=0;t<e.length;t++)e[t].addEventListener("handle_plugin",this.handlePluginTrigger);window.addEventListener("localizedChanged",this.updatePluginsList)}},{key:"UNSAFE_componentWillMount",value:function(){this.props.onRender&&this.props.onRender(dy(this.state,"plugins",{})),this.checkPluginsReady()}},{key:"componentWillUnmount",value:function(){var e=ec.findDOMNode(this).getElementsByClassName("plugin");if(Gw(e))for(var t=0;t<Gw(e);t++)e[t].removeEventListener("handle_plugin",this.handlePluginTrigger);window.removeEventListener("localizedChanged",this.updatePluginsList)}},{key:"componentDidUpdate",value:function(e,t,n){this.checkPluginsReady()}},{key:"standardizePlugins",value:function(e){if(GC(e))return e;for(var t=Object.keys(e),n=0;n<t.length;n++)if(window.location.search.indexOf("setup-wizard")>-1){e[t[n]].required?e[t[n]].selected=!0:void 0===e[t[n]].selected&&(e[t[n]].selected=!1);var r=this.getPluginStatus(e[t[n]]);"active"!==r&&"outdated"!==r||(e[t[n]].selected=!0)}else e[t[n]].selected=!0;return e}},{key:"updatePluginsList",value:function(e){this.setState({plugins:this.standardizePlugins(dy(pixassist,"themeConfig.pluginManager.tgmpaPlugins",{}))}),this.checkPluginsReady()}},{key:"checkPluginsReady",value:function(){var e=!0,t=this;Gw(this.state.plugins)||(e=!1),py(this.state.plugins)||Object.keys(this.state.plugins).map((function(n,r){var o=t.state.plugins[n];!dy(o,"is_active",!1)&&o.selected&&(e=!1),window.location.search.indexOf("setup-wizard")>-1&&dy(o,"is_failed",!1)&&o.selected&&(e=!0)})),(py(this.state.plugins)||GC(this.state.plugins))&&(e=!0),!0!==e||this.state.ready||(this.setState({ready:!0}),this.props.onReady()),!1===e&&this.state.ready&&this.setState({ready:!1})}},{key:"handlePluginTrigger",value:function(e){var t=e.target,n=jQuery(e.target),r=n.data("slug"),o=this.getPluginStatus(this.state.plugins[r]),i=n.data("activate_url");return!!this.state.plugins[r].selected&&("missing"===o?(this.installPlugin(t),!1):"outdated"!==o||window.location.search.indexOf("setup-wizard")>-1?("active"!==o&&"outdated"!==o?this.activatePlugin(t,i):this.markPluginAsActive(n.data("slug")),!0):(this.updatePlugin(t,i),!1))}},{key:"installPlugin",value:function(e){var t=this,n=jQuery(e),r=n.find(".box__text");n.addClass("box--plugin-invalidated box--plugin-missing").removeClass("box--warning box--neutral"),setTimeout((function(){r.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.pluginInstallingMessage",""))),n.addClass("box--plugin-installing")}),200);t.queue.add((function(){var o=this;wp.updates.installPlugin({slug:n.data("slug"),pixassist_plugin_install:!0,plugin_source_type:n.data("source_type"),force_tgmpa:"load",success:function(i){n.removeClass("box--plugin-installing"),n.addClass("box--plugin-installed"),t.markPluginAsInstalled(n.data("slug")),n.data("status","inactive"),i.activateUrl?t.activatePlugin(e,n.data("activate_url")):(n.removeClass("box--plugin-invalidated").addClass("box--plugin-validated"),r.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.pluginReady",""))),t.markPluginAsActive(n.data("slug")),n.data("status","active")),o.next()},error:function(e){n.removeClass("box--plugin-installing"),n.addClass("box--error"),n.removeClass("box--plugin-validated").addClass("box--plugin-invalidated"),r.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.installFailedMessage",""))),t.markPluginAsFailed(n.data("slug")),o.next()}})}))}},{key:"activatePlugin",value:function(e,t){var n=this,r=jQuery(e),o=wp.ajax.settings.url,i=r.find(".box__text");r.addClass("box--plugin-invalidated box--plugin-installed").removeClass("box--warning box--neutral"),setTimeout((function(){i.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.pluginActivatingMessage",""))),r.addClass("box--plugin-activating")}),200);n.queue.add((function(){var e=this;wp.ajax.settings.url=t,wp.ajax.send({type:"GET",cache:!1}).always((function(t){r.removeClass("box--plugin-activating"),NS(t.responseText)||(t=t.responseText),t.indexOf('<div id="message" class="updated"><p>')>-1||t.indexOf("<p>"+dy(pixassist,"themeConfig.pluginManager.l10n.tgmpActivatedSuccessfully",""))>-1||t.indexOf("<p>"+dy(pixassist,"themeConfig.pluginManager.l10n.tgmpPluginActivated",""))>-1||t.indexOf("<p>"+dy(pixassist,"themeConfig.pluginManager.l10n.tgmpPluginAlreadyActive",""))>-1||t.indexOf(dy(pixassist,"themeConfig.pluginManager.l10n.tgmpNotAllowed",""))>-1?(r.removeClass("box--plugin-invalidated").addClass("box--plugin-validated"),i.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.pluginReady",""))),r.data("status","active"),n.markPluginAsActive(r.data("slug"))):(r.addClass("box--error"),r.removeClass("box--plugin-validated").removeClass("box--plugin-installed").addClass("box--plugin-invalidated"),i.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.activateFailedMessage",""))),n.markPluginAsFailed(r.data("slug"))),e.next()})),wp.ajax.settings.url=o}))}},{key:"updatePlugin",value:function(e,t){var n=this,r=jQuery(e),o=r.data("slug"),i=r.data("real_slug"),a=r.find(".box__text");r.addClass("box--plugin-invalidated box--plugin-installed").removeClass("box--warning box--neutral"),setTimeout((function(){a.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.pluginUpdatingMessage",""))),r.addClass("box--plugin-updating")}),200);n.queue.add((function(){var t=this,s={slug:o,plugin:i,abort_if_destination_exists:!1,pixassist_plugin_update:!0,plugin_source_type:r.data("source_type"),force_tgmpa:"load",success:function(o){r.removeClass("box--plugin-updating"),r.removeClass("box--plugin-invalidated").addClass("box--plugin-validated"),a.text(uN.decodeHtml(dy(pixassist,"themeConfig.pluginManager.l10n.pluginUpToDate",""))),n.markPluginAsUpdated(r.data("slug")),n.activatePlugin(e,r.data("activate_url")),t.next()},error:function(e){a.text(e.errorMessage),r.addClass("box--error"),r.removeClass("box--plugin-validated").addClass("box--plugin-invalidated"),r.removeClass("box--plugin-updating"),n.markPluginAsFailed(o),t.next()}};jQuery(document).trigger("wp-plugin-updating",s),wp.updates.ajax("update-plugin",s)}))}},{key:"markPluginAsInstalled",value:function(e){var t=this.state.plugins;py(t[e])||(t[e].is_installed=!0,this.setState({plugins:t,ready:!1}))}},{key:"markPluginAsActive",value:function(e){var t=this.state.plugins;py(t[e])||(t[e].is_active=!0,this.setState({plugins:t,ready:!1}))}},{key:"markPluginAsUpdated",value:function(e){var t=this.state.plugins;py(t[e])||(t[e].is_up_to_date=!0,this.setState({plugins:t,ready:!1}))}},{key:"markPluginAsFailed",value:function(e){var t=this.state.plugins;py(t[e])||(t[e].is_failed=!0,this.setState({plugins:t,ready:!1}))}},{key:"eventInstallPlugin",value:function(e){var t,n=jQuery(e.target),r=n.parents(".box");wp.updates.maybeRequestFilesystemCredentials(e),n.is("button")&&n.fadeOut(),window.CustomEvent?t=new CustomEvent("handle_plugin",{detail:{action:"install"}}):(t=document.createEvent("CustomEvent")).initCustomEvent("handle_plugin",!0,!0,{action:"install"}),Gw(r)&&(r=uN.getFirstItem(r)).dispatchEvent(t)}},{key:"eventActivatePlugin",value:function(e){var t,n=jQuery(e.target),r=n.parents(".box");n.is("button")&&n.fadeOut(),window.CustomEvent?t=new CustomEvent("handle_plugin",{detail:{action:"activate"}}):(t=document.createEvent("CustomEvent")).initCustomEvent("handle_plugin",!0,!0,{action:"activate"}),Gw(r)&&(r=uN.getFirstItem(r)).dispatchEvent(t)}},{key:"eventUpdatePlugin",value:function(e){var t,n=jQuery(e.target),r=n.parents(".box");wp.updates.maybeRequestFilesystemCredentials(e),n.is("button")&&n.fadeOut(),window.CustomEvent?t=new CustomEvent("handle_plugin",{detail:{action:"update"}}):(t=document.createEvent("CustomEvent")).initCustomEvent("handle_plugin",!0,!0,{action:"update"}),Gw(r)&&(r=uN.getFirstItem(r)).dispatchEvent(t)}},{key:"createPseudoUpdateElement",value:function(e){if(0===jQuery("#tmpl-item-update-row").length)return!1;var t=wp.template("item-update-row"),n=document.createElement("table"),r=t({slug:e,plugin:e,colspan:"1",content:""});return void 0!==r&&(t=jQuery.trim(r),n.innerHTML=t,n.hidden=!0,jQuery(document).find("body").append(n),!0)}},{key:"getPluginStatus",value:function(e){return e.is_active&&!e.is_up_to_date?"outdated":e.is_active?"active":e.is_installed?"inactive":"missing"}}]),t}($.Component),IO=Qy((function(e){return{session:e}}),(function(e){return{onLoading:function(){e({type:"LOADING"})},onLoadingFinished:function(){e({type:"LOADING_DONE"})},onWizard:function(){e({type:"IS_SETUP_WIZARD"})},onAvailableNextButton:function(){e({type:"NEXT_BUTTON_AVAILABLE"})},onUnAvailableNextButton:function(){e({type:"NEXT_BUTTON_UNAVAILABLE"})},onAvailableSkipButton:function(){e({type:"SKIP_BUTTON_AVAILABLE"})},onUnAvailableSkipButton:function(){e({type:"SKIP_BUTTON_UNAVAILABLE"})},onPluginsInstalling:function(){e({type:"ON_PLUGINS_INSTALLING"})},onPluginsInstalled:function(){e({type:"ON_PLUGINS_INSTALLED"})}}}))(DO),jO=Nb("splice"),MO=Zy("splice",{ACCESSORS:!0,0:0,1:2}),qO=Math.max,zO=Math.min;Om({target:"Array",proto:!0,forced:!jO||!MO},{splice:function(e,t){var n,r,o,i,a,s,l=ub(this),u=lm(l.length),c=dm(e,u),d=arguments.length;if(0===d?n=r=0:1===d?(n=0,r=u-c):(n=d-2,r=zO(qO(am(t),0),u-c)),u+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(o=yb(l,r),i=0;i<r;i++)(a=c+i)in l&&k_(o,i,l[a]);if(o.length=r,n<r){for(i=c;i<u-r;i++)s=i+n,(a=i+r)in l?l[s]=l[a]:delete l[s];for(i=u;i>u-r+n;i--)delete l[i-1]}else if(n>r)for(i=u-r;i>c;i--)s=i+n-1,(a=i+r-1)in l?l[s]=l[a]:delete l[s];for(i=0;i<n;i++)l[i+c]=arguments[i+2];return l.length=u-r+n,o}});var UO=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e};var BO=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=nv(e),a=void 0!==t,s=null===t,l=t==t,u=nv(t);if(!s&&!u&&!i&&e>t||i&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!u&&e<t||u&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!l)return-1}return 0};var FO=function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=BO(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index};var HO=function(e,t,n){var r=-1;t=ry(t.length?t:[Sw],dx(Pw));var o=CS(e,(function(e,n,o){return{criteria:ry(t,(function(t){return t(e)})),index:++r,value:e}}));return UO(o,(function(e,t){return FO(e,t,n)}))};var VO=function(e,t,n){if(!av(n))return!1;var r=typeof t;return!!("number"==r?Ex(n)&&sx(t,n.length):"string"==r&&t in n)&&Rv(n[t],e)},WO=function(e,t){return VC(UC(e,t,Sw),e+"")}((function(e,t){if(null==e)return[];var n=t.length;return n>1&&VO(e,t[0],t[1])?t=[]:n>2&&VO(t[0],t[1],t[2])&&(t=[t[0]]),HO(e,jC(t,1),[])})),$O=function(e){function t(e){return Og(this,t),Ug(this,Mg(t).call(this,e))}return jg(t,e),Ag(t,[{key:"render",value:function(){return $.createElement("div",{className:this.props.installingClass},$.createElement("div",{className:"bullet"}),$.createElement("div",null,$.createElement("h5",{className:"box__title"},this.props.title),$.createElement("div",{className:"box__text"},this.props.description)))}}]),t}(J),GO=u_(X("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),KO=u_(X("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}));var QO=Ng((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes,r=e.fontSize;return X("div",{className:Hf(n.root,t&&n.checked)},X(GO,{fontSize:r}),X(KO,{fontSize:r,className:n.layer}))}));function XO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}}),(function(){}))}var YO=Y();var JO=X(QO,{checked:!0}),ZO=X(QO,null),eL=Z((function(e,t){var n=e.checked,r=e.classes,o=e.color,i=void 0===o?"secondary":o,a=e.name,s=e.onChange,l=e.size,u=void 0===l?"medium":l,c=wf(e,["checked","classes","color","name","onChange","size"]),d=ie(YO),p=n,f=XO(s,d&&d.onChange),h=a;return d&&(void 0===p&&(p=d.value===e.value),void 0===h&&(h=d.name)),X(SO,oc({color:i,type:"radio",icon:Q(ZO,{fontSize:"small"===u?"small":"default"}),checkedIcon:Q(JO,{fontSize:"small"===u?"small":"default"}),classes:{root:Hf(r.root,r["color".concat(r_(i))]),checked:r.checked,disabled:r.disabled},name:h,checked:p,onChange:f,ref:t},c))})),tL=Ng((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:zm(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:zm(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(eL);function nL(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}function rL(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=this,s=function(){e.apply(a,o)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}function oL(e,t){return parseInt(e[t],10)||0}var iL="undefined"!=typeof window?te:ne,aL={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},sL=Z((function(e,t){var n=e.onChange,r=e.rows,o=e.rowsMax,i=e.rowsMin,a=void 0===i?1:i,s=e.style,l=e.value,u=wf(e,["onChange","rows","rowsMax","rowsMin","style","value"]),c=r||a,d=ue(null!=l).current,p=ue(null),f=$P(t,p),h=ue(null),m=ue(0),g=se({}),v=g[0],y=g[1],b=oe((function(){var t=p.current,n=window.getComputedStyle(t),r=h.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x";var i=n["box-sizing"],a=oL(n,"padding-bottom")+oL(n,"padding-top"),s=oL(n,"border-bottom-width")+oL(n,"border-top-width"),l=r.scrollHeight-a;r.value="x";var u=r.scrollHeight-a,d=l;c&&(d=Math.max(Number(c)*u,d)),o&&(d=Math.min(Number(o)*u,d));var f=(d=Math.max(d,u))+("border-box"===i?a+s:0),g=Math.abs(d-l)<=1;y((function(e){return m.current<20&&(f>0&&Math.abs((e.outerHeightStyle||0)-f)>1||e.overflow!==g)?(m.current+=1,{overflow:g,outerHeightStyle:f}):e}))}),[o,c,e.placeholder]);ne((function(){var e=rL((function(){m.current=0,b()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[b]),iL((function(){b()})),ne((function(){m.current=0}),[l]);return X(ee,null,X("textarea",oc({value:l,onChange:function(e){m.current=0,d||b(),n&&n(e)},ref:f,rows:c,style:oc({height:v.outerHeightStyle,overflow:v.overflow?"hidden":null},s)},u)),X("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:oc({},aL,{},s)}))}));function lL(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function uL(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(lL(e.value)&&""!==e.value||t&&lL(e.defaultValue)&&""!==e.defaultValue)}var cL="undefined"==typeof window?ne:te,dL=Z((function(e,t){var n=e["aria-describedby"],r=e.autoComplete,o=e.autoFocus,i=e.classes,a=e.className,s=(e.color,e.defaultValue),l=e.disabled,u=e.endAdornment,c=(e.error,e.fullWidth),d=void 0!==c&&c,p=e.id,f=e.inputComponent,h=void 0===f?"input":f,m=e.inputProps,g=void 0===m?{}:m,v=e.inputRef,y=(e.margin,e.multiline),b=void 0!==y&&y,x=e.name,w=e.onBlur,_=e.onChange,E=e.onClick,k=e.onFocus,S=e.onKeyDown,C=e.onKeyUp,T=e.placeholder,N=e.readOnly,P=e.renderSuffix,O=e.rows,L=e.rowsMax,A=e.rowsMin,R=e.startAdornment,D=e.type,I=void 0===D?"text":D,j=e.value,M=wf(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),q=null!=g.value?g.value:j,z=ue(null!=q).current,U=ue(),B=oe((function(e){}),[]),F=$P(g.ref,B),H=$P(v,F),V=$P(U,H),W=se(!1),$=W[0],G=W[1],K=ie(HP),Q=nL({props:e,muiFormControl:K,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});Q.focused=K?K.focused:$,ne((function(){!K&&l&&$&&(G(!1),w&&w())}),[K,l,$,w]);var Y=K&&K.onFilled,J=K&&K.onEmpty,Z=oe((function(e){uL(e)?Y&&Y():J&&J()}),[Y,J]);cL((function(){z&&Z({value:q})}),[q,Z,z]);ne((function(){Z(U.current)}),[]);var ee=h,te=oc({},g,{ref:V});"string"!=typeof ee?te=oc({inputRef:V,type:I},te,{ref:null}):b?!O||L||A?(te=oc({rows:O,rowsMax:L},te),ee=sL):ee="textarea":te=oc({type:I},te);return ne((function(){K&&K.setAdornedStart(Boolean(R))}),[K,R]),X("div",oc({className:Hf(i.root,i["color".concat(r_(Q.color||"primary"))],a,Q.disabled&&i.disabled,Q.error&&i.error,d&&i.fullWidth,Q.focused&&i.focused,K&&i.formControl,b&&i.multiline,R&&i.adornedStart,u&&i.adornedEnd,"dense"===Q.margin&&i.marginDense),onClick:function(e){U.current&&e.currentTarget===e.target&&U.current.focus(),E&&E(e)},ref:t},M),R,X(HP.Provider,{value:null},X(ee,oc({"aria-invalid":Q.error,"aria-describedby":n,autoComplete:r,autoFocus:o,defaultValue:s,disabled:Q.disabled,id:p,onAnimationStart:function(e){Z("mui-auto-fill-cancel"===e.animationName?U.current:{value:"x"})},name:x,placeholder:T,readOnly:N,required:Q.required,rows:O,value:q,onKeyDown:S,onKeyUp:C},te,{className:Hf(i.input,g.className,Q.disabled&&i.disabled,b&&i.inputMultiline,Q.hiddenLabel&&i.inputHiddenLabel,R&&i.inputAdornedStart,u&&i.inputAdornedEnd,"search"===I&&i.inputTypeSearch,"dense"===Q.margin&&i.inputMarginDense),onBlur:function(e){w&&w(e),g.onBlur&&g.onBlur(e),K&&K.onBlur?K.onBlur(e):G(!1)},onChange:function(e){if(!z){var t=e.target||U.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");Z({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];g.onChange&&g.onChange.apply(g,[e].concat(r)),_&&_.apply(void 0,[e].concat(r))},onFocus:function(e){Q.disabled?e.stopPropagation():(k&&k(e),g.onFocus&&g.onFocus(e),K&&K.onFocus?K.onFocus(e):G(!0))}}))),u,P?P(oc({},Q,{startAdornment:R})):null)})),pL=Ng((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{from:{}},"@keyframes mui-auto-fill-cancel":{from:{}}},root:oc({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1875em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1875em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(dL),fL=Z((function(e,t){var n=e.disableUnderline,r=e.classes,o=e.fullWidth,i=void 0!==o&&o,a=e.inputComponent,s=void 0===a?"input":a,l=e.multiline,u=void 0!==l&&l,c=e.type,d=void 0===c?"text":c,p=wf(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return X(pL,oc({classes:oc({},r,{root:Hf(r.root,!n&&r.underline),underline:null}),fullWidth:i,inputComponent:s,multiline:u,ref:t,type:d},p))}));fL.muiName="Input";var hL=Ng((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(fL),mL=Z((function(e,t){var n=e.disableUnderline,r=e.classes,o=e.fullWidth,i=void 0!==o&&o,a=e.inputComponent,s=void 0===a?"input":a,l=e.multiline,u=void 0!==l&&l,c=e.type,d=void 0===c?"text":c,p=wf(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return X(pL,oc({classes:oc({},r,{root:Hf(r.root,!n&&r.underline),underline:null}),fullWidth:i,inputComponent:s,multiline:u,ref:t,type:d},p))}));mL.muiName="Input";var gL=Ng((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(mL),vL=Z((function(e,t){e.children;var n=e.classes,r=e.className,o=e.label,i=e.labelWidth,a=e.notched,s=e.style,l=wf(e,["children","classes","className","label","labelWidth","notched","style"]),u="rtl"===Tg().direction?"right":"left";if(void 0!==o)return X("fieldset",oc({"aria-hidden":!0,className:Hf(n.root,r),ref:t,style:s},l),X("legend",{className:Hf(n.legendLabelled,a&&n.legendNotched)},o?X("span",null,o):X("span",{dangerouslySetInnerHTML:{__html:"​"}})));var c=i>0?.75*i+8:.01;return X("fieldset",oc({"aria-hidden":!0,style:oc(dc({},"padding".concat(r_(u)),8),s),className:Hf(n.root,r),ref:t},l),X("legend",{className:n.legend,style:{width:a?c:.01}},X("span",{dangerouslySetInnerHTML:{__html:"​"}})))})),yL=Ng((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:0,paddingLeft:8,pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& span":{paddingLeft:5,paddingRight:5}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(vL),bL=Z((function(e,t){var n=e.classes,r=e.fullWidth,o=void 0!==r&&r,i=e.inputComponent,a=void 0===i?"input":i,s=e.label,l=e.labelWidth,u=void 0===l?0:l,c=e.multiline,d=void 0!==c&&c,p=e.notched,f=e.type,h=void 0===f?"text":f,m=wf(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return X(pL,oc({renderSuffix:function(e){return X(yL,{className:n.notchedOutline,label:s,labelWidth:u,notched:void 0!==p?p:Boolean(e.startAdornment||e.filled||e.focused)})},classes:oc({},n,{root:Hf(n.root,n.underline),notchedOutline:null}),fullWidth:o,inputComponent:a,multiline:d,ref:t,type:h},m))}));bL.muiName="Input";var xL=Ng((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(bL),wL=Z((function(e,t){var n=e.children,r=e.classes,o=e.className,i=(e.color,e.component),a=void 0===i?"label":i,s=(e.disabled,e.error,e.filled,e.focused,e.required,wf(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),l=nL({props:e,muiFormControl:VP(),states:["color","required","focused","disabled","error","filled"]});return X(a,oc({className:Hf(r.root,r["color".concat(r_(l.color||"primary"))],o,l.disabled&&r.disabled,l.error&&r.error,l.filled&&r.filled,l.focused&&r.focused,l.required&&r.required),ref:t},s),n,l.required&&X("span",{className:Hf(r.asterisk,l.error&&r.error)}," ","*"))})),_L=Ng((function(e){return{root:oc({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(wL),EL=Z((function(e,t){var n=e.classes,r=e.className,o=e.disableAnimation,i=void 0!==o&&o,a=(e.margin,e.shrink),s=(e.variant,wf(e,["classes","className","disableAnimation","margin","shrink","variant"])),l=VP(),u=a;void 0===u&&l&&(u=l.filled||l.focused||l.adornedStart);var c=nL({props:e,muiFormControl:l,states:["margin","variant"]});return X(_L,oc({"data-shrink":u,className:Hf(n.root,r,l&&n.formControl,!i&&n.animated,u&&n.shrink,"dense"===c.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[c.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},s))})),kL=Ng((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(EL);function SL(e,t){return G(e)&&-1!==t.indexOf(e.type.muiName)}var CL=Z((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"primary":i,s=e.component,l=void 0===s?"div":s,u=e.disabled,c=void 0!==u&&u,d=e.error,p=void 0!==d&&d,f=e.fullWidth,h=void 0!==f&&f,m=e.hiddenLabel,g=void 0!==m&&m,v=e.margin,y=void 0===v?"none":v,b=e.required,x=void 0!==b&&b,w=e.size,_=e.variant,E=void 0===_?"standard":_,k=wf(e,["children","classes","className","color","component","disabled","error","fullWidth","hiddenLabel","margin","required","size","variant"]),S=se((function(){var e=!1;return n&&K.forEach(n,(function(t){if(SL(t,["Input","Select"])){var n=SL(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}})),e})),C=S[0],T=S[1],N=se((function(){var e=!1;return n&&K.forEach(n,(function(t){SL(t,["Input","Select"])&&uL(t.props,!0)&&(e=!0)})),e})),P=N[0],O=N[1],L=se(!1),A=L[0],R=L[1];c&&A&&R(!1);var D=oe((function(){O(!0)}),[]),I={adornedStart:C,setAdornedStart:T,color:a,disabled:c,error:p,filled:P,focused:A,fullWidth:h,hiddenLabel:g,margin:("small"===w?"dense":void 0)||y,onBlur:function(){R(!1)},onEmpty:oe((function(){O(!1)}),[]),onFilled:D,onFocus:function(){R(!0)},registerEffect:void 0,required:x,variant:E};return X(HP.Provider,{value:I},X(l,oc({className:Hf(r.root,o,"none"!==y&&r["margin".concat(r_(y))],h&&r.fullWidth),ref:t},k),n))})),TL=Ng({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,zIndex:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(CL),NL=Z((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"p":i,s=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,wf(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),l=nL({props:e,muiFormControl:VP(),states:["variant","margin","disabled","error","filled","focused","required"]});return X(a,oc({className:Hf(r.root,("filled"===l.variant||"outlined"===l.variant)&&r.contained,o,l.disabled&&r.disabled,l.error&&r.error,l.filled&&r.filled,l.focused&&r.focused,l.required&&r.required,"dense"===l.margin&&r.marginDense),ref:t},s)," "===n?X("span",{dangerouslySetInnerHTML:{__html:"​"}}):n)})),PL=Ng((function(e){return{root:oc({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(NL);function OL(e){return e&&e.ownerDocument||document}function LL(e){return OL(e).defaultView||window}var AL="undefined"!=typeof window?te:ne,RL=Z((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,i=void 0!==o&&o,a=e.onRendered,s=se(null),l=s[0],u=s[1],c=$P(G(n)?n.ref:null,t);return AL((function(){i||u(function(e){return e="function"==typeof e?e():e,tc(e)}(r)||document.body)}),[r,i]),AL((function(){if(l&&!i)return WP(t,l),function(){WP(t,null)}}),[t,l,i]),AL((function(){a&&(l||i)&&a()}),[a,l,i]),i?G(n)?Q(n,{ref:c}):n:l?rc(n,l):l}));function DL(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function IL(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function jL(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function ML(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(kp(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&IL(e,o)}))}function qL(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function zL(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=OL(e);return t.body===e?LL(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=DL();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(jL(i)+a,"px"),n=OL(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(jL(e)+a,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var UL=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Fc(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&IL(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ML(t,e.mountNode,e.modalRef,r,!0);var o=qL(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=qL(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=zL(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=qL(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&IL(e.modalRef,!0),ML(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&IL(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function BL(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,i=void 0!==o&&o,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=ue(),p=ue(null),f=ue(null),h=ue(),m=ue(null),g=oe((function(e){m.current=tc(e)}),[]),v=$P(t.ref,g);return re((function(){c&&"undefined"!=typeof window&&(h.current=l().activeElement)}),[c]),ne((function(){if(c){var e=OL(m.current);r||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){i||!u()||d.current?d.current=!1:m.current&&!m.current.contains(e.activeElement)&&m.current.focus()},n=function(t){!i&&u()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?f.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(h.current&&h.current.focus&&h.current.focus(),h.current=null)}}}),[r,i,s,u,c]),X(ee,null,X("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),Q(t,{ref:v}),X("div",{tabIndex:0,ref:f,"data-test":"sentinelEnd"}))}var FL={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},HL=Z((function(e,t){var n=e.invisible,r=void 0!==n&&n,o=e.open,i=wf(e,["invisible","open"]);return o?X("div",oc({"aria-hidden":!0,ref:t},i,{style:oc({},FL.root,{},r?FL.invisible:{},{},i.style)})):null}));var VL=new UL,WL=Z((function(e,t){var n=Tf(),r=qc({name:"MuiModal",props:oc({},e),theme:n}),o=r.BackdropComponent,i=void 0===o?HL:o,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,p=void 0!==d&&d,f=r.disableBackdropClick,h=void 0!==f&&f,m=r.disableEnforceFocus,g=void 0!==m&&m,v=r.disableEscapeKeyDown,y=void 0!==v&&v,b=r.disablePortal,x=void 0!==b&&b,w=r.disableRestoreFocus,_=void 0!==w&&w,E=r.disableScrollLock,k=void 0!==E&&E,S=r.hideBackdrop,C=void 0!==S&&S,T=r.keepMounted,N=void 0!==T&&T,P=r.manager,O=void 0===P?VL:P,L=r.onBackdropClick,A=r.onClose,R=r.onEscapeKeyDown,D=r.onRendered,I=r.open,j=wf(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),M=se(!0),q=M[0],z=M[1],U=ue({}),B=ue(null),F=ue(null),H=$P(F,t),V=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return OL(B.current)},$=function(){return U.current.modalRef=F.current,U.current.mountNode=B.current,U.current},G=function(){O.mount($(),{disableScrollLock:k}),F.current.scrollTop=0},K=KP((function(){var e=function(e){return e="function"==typeof e?e():e,tc(e)}(c)||W().body;O.add($(),e),F.current&&G()})),Y=oe((function(){return O.isTopModal($())}),[O]),J=KP((function(e){B.current=e,e&&(D&&D(),I&&Y()?G():IL(F.current,!0))})),Z=oe((function(){O.remove($())}),[O]);if(ne((function(){return function(){Z()}}),[Z]),ne((function(){I?K():V&&u||Z()}),[I,Z,V,u,K]),!N&&!I&&(!V||q))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:kg}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),V&&(te.onEnter=XO((function(){z(!1)}),s.props.onEnter),te.onExited=XO((function(){z(!0),u&&Z()}),s.props.onExited)),X(RL,{ref:J,container:c,disablePortal:x},X("div",oc({ref:H,onKeyDown:function(e){"Escape"===e.key&&Y()&&(e.stopPropagation(),R&&R(e),!y&&A&&A(e,"escapeKeyDown"))},role:"presentation"},j,{style:oc({},ee.root,{},!I&&q?ee.hidden:{},{},j.style)}),C?null:X(i,oc({open:I,onClick:function(e){e.target===e.currentTarget&&(L&&L(e),!h&&A&&A(e,"backdropClick"))}},a)),X(BL,{disableEnforceFocus:g,disableAutoFocus:p,disableRestoreFocus:_,getDoc:W,isEnabled:Y,open:I},Q(s,te))))}));function $L(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}function GL(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var KL={entering:{opacity:1,transform:GL(1)},entered:{opacity:1,transform:"none"}},QL=Z((function(e,t){var n=e.children,r=e.in,o=e.onEnter,i=e.onExit,a=e.style,s=e.timeout,l=void 0===s?"auto":s,u=wf(e,["children","in","onEnter","onExit","style","timeout"]),c=ue(),d=ue(),p=$P(n.ref,t),f=Tg();return ne((function(){return function(){clearTimeout(c.current)}}),[]),X(uO,oc({appear:!0,in:r,onEnter:function(e,t){!function(e){e.scrollTop}(e);var n,r=$L({style:a,timeout:l},{mode:"enter"}),i=r.duration,s=r.delay;"auto"===l?(n=f.transitions.getAutoHeightDuration(e.clientHeight),d.current=n):n=i,e.style.transition=[f.transitions.create("opacity",{duration:n,delay:s}),f.transitions.create("transform",{duration:.666*n,delay:s})].join(","),o&&o(e,t)},onExit:function(e){var t,n=$L({style:a,timeout:l},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===l?(t=f.transitions.getAutoHeightDuration(e.clientHeight),d.current=t):t=r,e.style.transition=[f.transitions.create("opacity",{duration:t,delay:o}),f.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=GL(.75),i&&i(e)},addEndListener:function(e,t){"auto"===l&&(c.current=setTimeout(t,d.current||0))},timeout:"auto"===l?null:l},u),(function(e,t){return Q(n,oc({style:oc({opacity:0,transform:GL(.75),visibility:"exited"!==e||r?void 0:"hidden"},KL[e],{},a,{},n.props.style),ref:p},t))}))}));function XL(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function YL(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function JL(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function ZL(e){return"function"==typeof e?e():e}QL.muiSupportAuto=!0;var eA=Z((function(e,t){var n=e.action,r=e.anchorEl,o=e.anchorOrigin,i=void 0===o?{vertical:"top",horizontal:"left"}:o,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,p=e.container,f=e.elevation,h=void 0===f?8:f,m=e.getContentAnchorEl,g=e.marginThreshold,v=void 0===g?16:g,y=e.onEnter,b=e.onEntered,x=e.onEntering,w=e.onExit,_=e.onExited,E=e.onExiting,k=e.open,S=e.PaperProps,C=void 0===S?{}:S,T=e.transformOrigin,N=void 0===T?{vertical:"top",horizontal:"left"}:T,P=e.TransitionComponent,O=void 0===P?QL:P,L=e.transitionDuration,A=void 0===L?"auto":L,R=e.TransitionProps,D=void 0===R?{}:R,I=wf(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=ue(),M=oe((function(e){if("anchorPosition"===l)return a;var t=ZL(r),n=(t instanceof LL(t).Element?t:OL(j.current).body).getBoundingClientRect(),o=0===e?i.vertical:"center";return{top:n.top+XL(n,o),left:n.left+YL(n,i.horizontal)}}),[r,i.horizontal,i.vertical,a,l]),q=oe((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[i.vertical,l,m]),z=oe((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:XL(e,N.vertical)+t,horizontal:YL(e,N.horizontal)}}),[N.horizontal,N.vertical]),U=oe((function(e){var t=q(e),n={width:e.offsetWidth,height:e.offsetHeight},o=z(n,t);if("none"===l)return{top:null,left:null,transformOrigin:JL(o)};var i=M(t),a=i.top-o.vertical,s=i.left-o.horizontal,u=a+n.height,c=s+n.width,d=LL(ZL(r)),p=d.innerHeight-v,f=d.innerWidth-v;if(a<v){var h=a-v;a-=h,o.vertical+=h}else if(u>p){var m=u-p;a-=m,o.vertical+=m}if(s<v){var g=s-v;s-=g,o.horizontal+=g}else if(c>f){var y=c-f;s-=y,o.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:JL(o)}}),[r,l,M,q,z,v]),B=oe((function(){var e=j.current;if(e){var t=U(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[U]),F=oe((function(e){j.current=tc(e)}),[]);ne((function(){k&&B()})),ae(n,(function(){return k?{updatePosition:function(){B()}}:null}),[k,B]),ne((function(){if(k){var e=rL((function(){B()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("rezise",e)}}}),[k,B]);var H=A;"auto"!==A||O.muiSupportAuto||(H=void 0);var V=p||(r?OL(ZL(r)).body:void 0);return X(WL,oc({container:V,open:k,ref:t,BackdropProps:{invisible:!0},className:Hf(c.root,d)},I),X(O,oc({appear:!0,in:k,onEnter:y,onEntered:b,onExit:w,onExited:_,onExiting:E,timeout:H},D,{onEntering:XO((function(e,t){x&&x(e,t),B()}),D.onEntering)}),X(Yw,oc({elevation:h,ref:F},C,{className:Hf(c.paper,C.className)}),u)))})),tA=Ng({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(eA),nA=Y({}),rA=Z((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"ul":i,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,p=wf(e,["children","classes","className","component","dense","disablePadding","subheader"]),f=re((function(){return{dense:l}}),[l]);return X(nA.Provider,{value:f},X(a,oc({className:Hf(r.root,o,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},p),d,n))})),oA=Ng({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(rA);function iA(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function aA(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function sA(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function lA(e,t,n,r,o){for(var i=!1,a=r(e,t,!!t&&n);a;){if(a===e.firstChild){if(i)return!1;i=!0}if(a.hasAttribute("tabindex")&&!a.disabled&&"true"!==a.getAttribute("aria-disabled")&&sA(a,o))return a.focus(),!0;a=r(e,a,n)}return!1}var uA="undefined"==typeof window?ne:te,cA=Z((function(e,t){var n=e.actions,r=e.autoFocus,o=void 0!==r&&r,i=e.autoFocusItem,a=void 0!==i&&i,s=e.children,l=e.className,u=e.onKeyDown,c=e.disableListWrap,d=void 0!==c&&c,p=e.variant,f=void 0===p?"selectedMenu":p,h=wf(e,["actions","autoFocus","autoFocusItem","children","className","onKeyDown","disableListWrap","variant"]),m=ue(null),g=ue({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});uA((function(){o&&m.current.focus()}),[o]),ae(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!m.current.style.width;if(e.clientHeight<m.current.clientHeight&&n){var r="".concat(DL(),"px");m.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,m.current.style.width="calc(100% + ".concat(r,")")}return m.current}}}),[]);var v=$P(oe((function(e){m.current=tc(e)}),[]),t),y=-1;K.forEach(s,(function(e,t){G(e)&&(e.props.disabled||("selectedMenu"===f&&e.props.selected||-1===y)&&(y=t))}));var b=K.map(s,(function(e,t){if(t===y){var n={};if(a&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===f&&(n.tabIndex=0),null!==n)return Q(e,n)}return e}));return X(oA,oc({role:"menu",ref:v,className:l,onKeyDown:function(e){var t=m.current,n=e.key,r=OL(t).activeElement;if("ArrowDown"===n)e.preventDefault(),lA(t,r,d,iA);else if("ArrowUp"===n)e.preventDefault(),lA(t,r,d,aA);else if("Home"===n)e.preventDefault(),lA(t,null,d,iA);else if("End"===n)e.preventDefault(),lA(t,null,d,aA);else if(1===n.length){var o=g.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&sA(r,o);o.previousKeyMatched&&(s||lA(t,r,!1,iA,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:o?0:-1},h),b)})),dA={vertical:"top",horizontal:"right"},pA={vertical:"top",horizontal:"left"},fA=Z((function(e,t){var n=e.autoFocus,r=void 0===n||n,o=e.children,i=e.classes,a=e.disableAutoFocusItem,s=void 0!==a&&a,l=e.MenuListProps,u=void 0===l?{}:l,c=e.onClose,d=e.onEntering,p=e.open,f=e.PaperProps,h=void 0===f?{}:f,m=e.PopoverClasses,g=e.transitionDuration,v=void 0===g?"auto":g,y=e.variant,b=void 0===y?"selectedMenu":y,x=wf(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),w=Tg(),_=r&&!s&&p,E=ue(null),k=ue(null),S=-1;K.map(o,(function(e,t){G(e)&&(e.props.disabled||("menu"!==b&&e.props.selected||-1===S)&&(S=t))}));var C=K.map(o,(function(e,t){return t===S?Q(e,{ref:function(t){k.current=tc(t),WP(e.ref,t)}}):e}));return X(tA,oc({getContentAnchorEl:function(){return k.current},classes:m,onClose:c,onEntering:function(e,t){E.current&&E.current.adjustStyleForScrollbar(e,w),d&&d(e,t)},anchorOrigin:"rtl"===w.direction?dA:pA,transformOrigin:"rtl"===w.direction?dA:pA,PaperProps:oc({},h,{classes:oc({},h.classes,{root:i.paper})}),open:p,ref:t,transitionDuration:v},x),X(cA,oc({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))},actions:E,autoFocus:r&&(-1===S||s),autoFocusItem:_,variant:b},u,{className:Hf(i.list,u.className)}),C))})),hA=Ng({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(fA);function mA(e,t){return"object"===ic(t)&&null!==t?e===t:String(e)===String(t)}var gA=Z((function(e,t){var n=e.autoFocus,r=e.autoWidth,o=e.children,i=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,u=e.displayEmpty,c=e.IconComponent,d=e.inputRef,p=e.labelId,f=e.MenuProps,h=void 0===f?{}:f,m=e.multiple,g=e.name,v=e.onBlur,y=e.onChange,b=e.onClose,x=e.onFocus,w=e.onOpen,_=e.open,E=e.readOnly,k=e.renderValue,S=(e.required,e.SelectDisplayProps),C=void 0===S?{}:S,T=e.tabIndex,N=(e.type,e.value),P=e.variant,O=void 0===P?"standard":P,L=wf(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),A=BP(FP({controlled:N,default:s,name:"SelectInput"}),2),R=A[0],D=A[1],I=ue(null),j=se(null),M=j[0],q=j[1],z=ue(null!=_).current,U=se(),B=U[0],F=U[1],H=se(!1),V=H[0],W=H[1],$=$P(t,d);ae($,(function(){return{focus:function(){M.focus()},node:I.current,value:R}}),[M,R]),ne((function(){n&&M&&M.focus()}),[n,M]);var Y,J,Z=function(e,t){e?w&&w(t):b&&b(t),z||(F(r?null:M.clientWidth),W(e))},te=function(e){return function(t){var n;if(m||Z(!1,t),m){n=Array.isArray(R)?kp(R):[];var r=R.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;D(n),y&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),y(t,e))}},re=null!==M&&(z?_:V);delete L["aria-invalid"];var oe=[],ie=!1;(uL({value:R})||u)&&(k?Y=k(R):ie=!0);var le=K.map(o,(function(e){if(!G(e))return null;var t;if(m){if(!Array.isArray(R))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=R.some((function(t){return mA(t,e.props.value)})))&&ie&&oe.push(e.props.children)}else(t=mA(R,e.props.value))&&ie&&(J=e.props.children);return Q(e,{"aria-selected":t?"true":void 0,onClick:te(e),onKeyUp:function(t){" "===t.key&&t.preventDefault();var n=e.props.onKeyUp;"function"==typeof n&&n(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ie&&(Y=m?oe.join(", "):J);var ce,de=B;!r&&z&&M&&(de=M.clientWidth),ce=void 0!==T?T:l?null:0;var pe=C.id||(g?"mui-component-select-".concat(g):void 0);return X(ee,null,X("div",oc({className:Hf(i.root,i.select,i.selectMenu,i[O],a,l&&i.disabled),ref:q,tabIndex:ce,role:"button","aria-expanded":re?"true":void 0,"aria-labelledby":"".concat(p||""," ").concat(pe||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!E){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onMouseDown:l||E?null:function(e){0===e.button&&(e.preventDefault(),M.focus(),Z(!0,e))},onBlur:function(e){!re&&v&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:g}}),v(e))},onFocus:x},C,{id:pe}),function(e){return null==e||"string"==typeof e&&!e.trim()}(Y)?X("span",{dangerouslySetInnerHTML:{__html:"​"}}):Y),X("input",oc({value:Array.isArray(R)?R.join(","):R,name:g,ref:I,type:"hidden",autoFocus:n},L)),X(c,{className:Hf(i.icon,i["icon".concat(r_(O))],re&&i.iconOpen)}),X(hA,oc({id:"menu-".concat(g||""),anchorEl:M,open:re,onClose:function(e){Z(!1,e)}},h,{MenuListProps:oc({"aria-labelledby":p,role:"listbox",disableListWrap:!0},h.MenuListProps),PaperProps:oc({},h.PaperProps,{style:oc({minWidth:de},null!=h.PaperProps?h.PaperProps.style:null)})}),le))})),vA=u_(X("path",{d:"M7 10l5 5 5-5z"})),yA=Z((function(e,t){var n=e.classes,r=e.className,o=e.disabled,i=e.IconComponent,a=e.inputRef,s=e.variant,l=void 0===s?"standard":s,u=wf(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return X(ee,null,X("select",oc({className:Hf(n.root,n.select,n[l],r,o&&n.disabled),disabled:o,ref:a||t},u)),e.multiple?null:X(i,{className:Hf(n.icon,n["icon".concat(r_(l))])}))})),bA=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",color:e.palette.action.active,pointerEvents:"none"},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},xA=X(hL,null),wA=Z((function(e,t){var n=e.children,r=e.classes,o=e.IconComponent,i=void 0===o?vA:o,a=e.input,s=void 0===a?xA:a,l=e.inputProps,u=(e.variant,wf(e,["children","classes","IconComponent","input","inputProps","variant"])),c=nL({props:e,muiFormControl:VP(),states:["variant"]});return Q(s,oc({inputComponent:yA,inputProps:oc({children:n,classes:r,IconComponent:i,variant:c.variant,type:void 0},l,{},s?s.props.inputProps:{}),ref:t},u))}));wA.muiName="Select",Ng(bA,{name:"MuiNativeSelect"})(wA);var _A=bA,EA=X(hL,null),kA=X(gL,null),SA=Z((function e(t,n){var r=t.autoWidth,o=void 0!==r&&r,i=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,u=t.IconComponent,c=void 0===u?vA:u,d=t.id,p=t.input,f=t.inputProps,h=t.label,m=t.labelId,g=t.labelWidth,v=void 0===g?0:g,y=t.MenuProps,b=t.multiple,x=void 0!==b&&b,w=t.native,_=void 0!==w&&w,E=t.onClose,k=t.onOpen,S=t.open,C=t.renderValue,T=t.SelectDisplayProps,N=t.variant,P=void 0===N?"standard":N,O=wf(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),L=_?yA:gA,A=nL({props:t,muiFormControl:VP(),states:["variant"]}).variant||P,R=p||{standard:EA,outlined:X(xL,{label:h,labelWidth:v}),filled:kA}[A];return Q(R,oc({inputComponent:L,inputProps:oc({children:i,IconComponent:c,variant:A,type:void 0,multiple:x},_?{id:d}:{autoWidth:o,displayEmpty:l,labelId:m,MenuProps:y,onClose:E,onOpen:k,open:S,renderValue:C,SelectDisplayProps:oc({id:d},T)},{},f,{classes:f?_f({baseClasses:a,newClasses:f.classes,Component:e}):a},p?p.props.inputProps:{}),ref:n},O))}));SA.muiName="Select";var CA=Ng(_A,{name:"MuiSelect"})(SA),TA={standard:hL,filled:gL,outlined:xL},NA=Z((function(e,t){var n=e.autoComplete,r=e.autoFocus,o=void 0!==r&&r,i=e.children,a=e.classes,s=e.className,l=e.color,u=void 0===l?"primary":l,c=e.defaultValue,d=e.disabled,p=void 0!==d&&d,f=e.error,h=void 0!==f&&f,m=e.FormHelperTextProps,g=e.fullWidth,v=void 0!==g&&g,y=e.helperText,b=e.hiddenLabel,x=e.id,w=e.InputLabelProps,_=e.inputProps,E=e.InputProps,k=e.inputRef,S=e.label,C=e.multiline,T=void 0!==C&&C,N=e.name,P=e.onBlur,O=e.onChange,L=e.onFocus,A=e.placeholder,R=e.required,D=void 0!==R&&R,I=e.rows,j=e.rowsMax,M=e.select,q=void 0!==M&&M,z=e.SelectProps,U=e.type,B=e.value,F=e.variant,H=void 0===F?"standard":F,V=wf(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),W={};"outlined"===H&&(w&&void 0!==w.shrink&&(W.notched=w.shrink),W.label=S?X(ee,null,S,D&&" *"):S),q&&(z&&z.native||(W.id=void 0),W["aria-describedby"]=void 0);var $=y&&x?"".concat(x,"-helper-text"):void 0,G=S&&x?"".concat(x,"-label"):void 0,K=X(TA[H],oc({"aria-describedby":$,autoComplete:n,autoFocus:o,defaultValue:c,fullWidth:v,multiline:T,name:N,rows:I,rowsMax:j,type:U,value:B,id:x,inputRef:k,onBlur:P,onChange:O,onFocus:L,placeholder:A,inputProps:_},W,E));return X(TL,oc({className:Hf(a.root,s),disabled:p,error:h,fullWidth:v,hiddenLabel:b,ref:t,required:D,color:u,variant:H},V),S&&X(kL,oc({htmlFor:x,id:G},w),S),q?X(CA,oc({"aria-describedby":$,id:x,labelId:G,value:B,input:K},z),i):K,y&&X(PL,oc({id:$},m),y))})),PA=Ng({root:{}},{name:"MuiTextField"})(NA),OA=function(e){function t(e){var n;if(Og(this,t),Rg(zg(n=Ug(this,Mg(t).call(this,e))),"handleDemoSelect",(function(e){return function(t){var r=zg(n);NS(e)?r.setState({selectedDemoKey:t.target.value}):r.setState({selectedDemoKey:e})}})),py(pixassist.themeConfig.starterContent))return Ug(n);if(n.queue=new uN.Queue,n.state={demos:n.standardizeDemos(dy(pixassist,"themeConfig.starterContent.demos",[])),importing:!1,demoClass:"box--neutral",log:[]},Gw(n.state.demos)){var r=n.sortDemoKeys(Object.keys(n.state.demos));n.state.selectedDemoKey=r[0]}return n.handleDemoSelect=n.handleDemoSelect.bind(zg(n)),n.sortDemoKeys=n.sortDemoKeys.bind(zg(n)),n.onImportClick=n.onImportClick.bind(zg(n)),n.onImportStopClick=n.onImportStopClick.bind(zg(n)),n.addLogEntry=n.addLogEntry.bind(zg(n)),n.handleFetchErrors=n.handleFetchErrors.bind(zg(n)),n.importMedia=n.importMedia.bind(zg(n)),n.importPosts=n.importPosts.bind(zg(n)),n.importTaxonomies=n.importTaxonomies.bind(zg(n)),n.importWidgets=n.importWidgets.bind(zg(n)),n.importPreSettings=n.importPreSettings.bind(zg(n)),n.importPostSettings=n.importPostSettings.bind(zg(n)),n.setupDemosFromLocalized=n.setupDemosFromLocalized.bind(zg(n)),n.logInput=$.createRef(),n}return jg(t,e),Ag(t,null,[{key:"defaultProps",get:function(){return{onMove:function(){},onReady:function(){},onRender:function(){}}}}]),Ag(t,[{key:"render",value:function(){var e=this,t=e.state.demos;if(!Gw(t))return $.createElement("div",{className:"box demo box--neutral"},uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.noSources","")));var n=e.sortDemoKeys(Object.keys(t));if(1===Gw(t)||e.props.session.is_sc_installing||e.props.session.is_sc_done){var r="box demo",o=t[e.state.selectedDemoKey].title,i=e.state.description||t[e.state.selectedDemoKey].description;r+=" "+e.state.demoClass;var a=Db(e.state.log,"\n");return $.createElement("div",{className:"demos starter_content single-item"},$.createElement($O,{installingClass:r,title:o,description:i}),a?$.createElement(PA,{id:"outlined-textarea",label:"Log",multiline:!0,rows:"2",rowsMax:"4",value:a,className:"starter-content-log",margin:"normal",variant:"outlined",InputProps:{readOnly:!0},inputRef:this.logInput}):"",e.props.enable_actions&&!(e.props.session.is_sc_errored||e.props.session.is_sc_installing||e.props.session.is_sc_done)?$.createElement("a",{className:"btn btn--action import--action ",href:"#",disabled:e.props.session.is_sc_installing||e.props.session.is_sc_done,onClick:this.onImportClick},e.props.session.is_sc_done?uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.imported","")):uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.import",""))):$.createElement("a",{className:"btn btn--action import--action",style:{display:"none"},onClick:this.onImportClick}),e.props.enable_actions&&e.props.session.is_sc_installing?$.createElement("a",{className:"btn btn--action btn--action-secondary import-stop--action",href:"#",onClick:this.onImportStopClick},e.props.session.is_sc_stopped?uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.resume","")):uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.stop",""))):"")}return $.createElement("div",{className:"demos starter_content"},n.map((function(n){var r=t[n],o=n===e.state.selectedDemoKey;return $.createElement("div",{className:"demo box box--neutral",key:n,onClick:e.handleDemoSelect(n)},$.createElement(tL,{checked:o,onChange:e.handleDemoSelect,value:n,name:e.props.name,disabled:!o,color:"primary"}),$.createElement("div",{className:"box__body"},$.createElement("h5",{className:"box__title"},r.title),$.createElement("div",{className:"box__text"},o&&e.state.description||r.description)),$.createElement("a",{href:r.url,className:"external-link",title:"Go to source site",target:"_blank"},$.createElement("span",{className:"dashicons dashicons-external"})))})),e.props.enable_actions?$.createElement("a",{className:"btn btn--action import--action ",href:"#",onClick:this.onImportClick},uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.importSelected",""))):$.createElement("a",{className:"btn btn--action import--action",style:{display:"none"},onClick:this.onImportClick}))}},{key:"standardizeDemos",value:function(e){return Object.keys(e).map((function(t){NS(e[t].url)?e.splice(t,1):e[t].url=uN.trailingslashit(e[t].url),NS(e[t].baseRestUrl)&&(e[t].baseRestUrl=e[t].url+dy(pixassist,"themeConfig.starterContent.defaultSceRestPath","wp-json/sce/v2")),NS(e[t].order)?e[t].order=10:e[t].order=Vb(e[t].order),NS(e[t].title)&&(e[t].title=dy(pixassist,"themeSupports.theme_name","")+" Demo Content"),NS(e[t].description)&&(e[t].description=uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.importContentDescription","")))})),e}},{key:"sortDemoKeys",value:function(e){var t=this;return e.sort((function(e,n){return t.state.demos[e].order<t.state.demos[n].order?-1:t.state.demos[e].order>t.state.demos[n].order?1:0})),e}},{key:"UNSAFE_componentWillMount",value:function(){this.props.onRender&&this.props.onRender()}},{key:"componentDidMount",value:function(){window.addEventListener("localizedChanged",this.setupDemosFromLocalized)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("localizedChanged",this.setupDemosFromLocalized)}},{key:"componentDidUpdate",value:function(){NS(this.logInput.current)||(this.logInput.current.scrollTop=this.logInput.current.scrollHeight)}},{key:"setupDemosFromLocalized",value:function(e){var t=this.standardizeDemos(dy(pixassist,"themeConfig.starterContent.demos",[]));if(Gw(t)){var n=this.sortDemoKeys(Object.keys(t));this.setState({demos:t,selectedDemoKey:n[0],demoClass:"box--neutral"})}}},{key:"handleFetchErrors",value:function(e){if(e.ok)return e;var t=new Error(e.status);throw t.response=e,t.message="status "+e.status+"; type "+e.type,t}},{key:"addLogEntry",value:function(e){e&&this.setState({log:this.state.log.concat(e)})}},{key:"onImportClick",value:function(e){var t=this;if(e.preventDefault(),t.props.session.is_sc_installing||t.props.session.is_sc_done)return!1;if((t.props.onMove(),t.props.onStarterContentInstalling(),t.sceKeyExists(t.state.selectedDemoKey,"pre_settings"))&&!confirm(uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.alreadyImportedConfirm",""))))return t.props.onReady(),t.setState({demoClass:"box--plugin-validated",description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.alreadyImportedDenied",""))}),t.props.onStarterContentFinished(),!1;t.setState({demoClass:"box--plugin-invalidated box--plugin-installing",description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.importingData",""))}),t.addLogEntry("Starting the import of starter content from: "+t.state.demos[t.state.selectedDemoKey].url);var n=uN.trailingslashit(t.state.demos[t.state.selectedDemoKey].baseRestUrl)+"data";fetch(n,{method:"GET"}).then(t.handleFetchErrors).then((function(e){return e.json()})).then((function(e){"success"!==e.code?(t.setState({demoClass:"box--error",description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.somethingWrong",""))+"\n"+e.message}),t.props.onStarterContentErrored(),t.props.onReady()):(py(e.data.pre_settings)||t.importPreSettings(e.data.pre_settings),py(e.data.media)||t.importMedia(e.data.media),py(e.data.taxonomies)||t.importTaxonomies(e.data.taxonomies),py(e.data.post_types)||t.importPosts(e.data.post_types),py(e.data.widgets)||t.importWidgets(e.data.widgets),py(e.data.post_settings)||t.importPostSettings(e.data.post_settings))})).catch((function(e){console.log(e),t.addLogEntry("Error: "+e.message),t.setState({demoClass:"box--error",description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.errorMessage",""))}),t.props.onStarterContentErrored(),t.props.onReady()}))}},{key:"onImportStopClick",value:function(e){e.preventDefault(),this.props.session.is_sc_stopped?(this.queue.stop=!1,this.queue.next(),this.addLogEntry("Import resumed."),this.props.onStarterContentResume()):(this.queue.stop=!0,this.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.stoppedMessage",""))}),this.addLogEntry("Import stopped."),this.props.onStarterContentStop())}},{key:"importMedia",value:function(e){var t=this;if(GC(e.placeholders))t.addLogEntry("Missing media placeholders data. Skipping media import...");else{var n=uN.trailingslashit(t.state.demos[t.state.selectedDemoKey].baseRestUrl)+"media";Object.keys(e).map((function(r){var o=e[r];GC(o)||Object.keys(o).map((function(e){t.queue.add((function(){var i=o[e];fetch(n+"?id="+i,{method:"GET"}).then(t.handleFetchErrors).then((function(e){return e.json()})).then((function(e){if("success"!==e.code)t.addLogEntry("Failed to get media with id "+i+" (error message: "+e.message+"). Continuing..."),t.queue.next();else{if(!e.data.media.title||!e.data.media.ext||!e.data.media.mime_type)return t.addLogEntry("Got back malformed data for media with id "+i+". Continuing..."),void t.queue.next();uN.$ajax(pixassist.wpRest.endpoint.uploadMedia.url,pixassist.wpRest.endpoint.uploadMedia.method,{demo_key:t.state.selectedDemoKey,title:e.data.media.title,remote_id:i,file_data:e.data.media.data,ext:e.data.media.ext,group:r},(function(n){py(n.code)||"success"!==n.code?(t.addLogEntry('Failed to import media "'+e.data.media.title+"."+e.data.media.ext+'". Response: '+n.responseText),console.log(n)):t.addLogEntry('Imported media "'+e.data.media.title+"."+e.data.media.ext+'" (#'+n.data.attachmentID+")."),t.queue.next()}),(function(n){t.addLogEntry('Failed to import media "'+e.data.media.title+"."+e.data.media.ext+'". Response: '+n.responseText),console.log(n),t.queue.next()}),(function(n){t.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.mediaImporting",""))+e.data.media.title+"."+e.data.media.ext}),n.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)}))}}))}))}))}))}}},{key:"importPosts",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this;if(GC(e))n.addLogEntry("No data for posts. Continuing...");else if(n.sceKeyExists(n.state.selectedDemoKey,"posts"))n.addLogEntry("Posts already imported. Continuing...");else{e=WO(e,"priority");var r=uN.trailingslashit(n.state.demos[n.state.selectedDemoKey].baseRestUrl);TS(e,(function(e,o){var i=e.name,a={post_type:e.name,ids:e.ids};null!==t&&t!==i||n.queue.add((function(){uN.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{demo_key:n.state.selectedDemoKey,type:"post_type",url:r,args:a},(function(t){console.log(t),n.addLogEntry('Imported post type "'+e.name+'" ('+Gw(e.ids)+" posts)."),n.queue.next()}),(function(t){console.log(t),n.addLogEntry('Failed to import post type "'+e.name+'". Response: '+t.responseText),n.queue.next()}),(function(e){n.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.postImporting",""))+i+"..."}),e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)}))}))}))}}},{key:"importTaxonomies",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this;if(GC(e))n.addLogEntry("No data for taxonomies. Continuing...");else if(n.sceKeyExists(n.state.selectedDemoKey,"terms"))n.addLogEntry("Taxonomies terms already imported. Continuing...");else{e=WO(e,"priority");var r=uN.trailingslashit(n.state.demos[n.state.selectedDemoKey].baseRestUrl);TS(e,(function(e,o){var i=e.name,a={tax:i,ids:e.ids};null!==t&&t!==i||n.queue.add((function(){uN.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{demo_key:n.state.selectedDemoKey,type:"taxonomy",url:r,args:a},(function(t){console.log(t),n.addLogEntry('Imported taxonomy "'+i+'" ('+Gw(e.ids)+" terms)."),n.queue.next()}),(function(e){console.log(e),n.addLogEntry('Failed to import taxonomy "'+i+'". Response: '+e.responseText),n.queue.next()}),(function(e){e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce),n.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.taxonomyImporting",""))+i+"..."})}))}))}))}}},{key:"importWidgets",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this;if(t.sceKeyExists(t.state.selectedDemoKey,"widgets"))t.addLogEntry("Widgets already imported. Continuing...");else{var n=uN.trailingslashit(t.state.demos[t.state.selectedDemoKey].baseRestUrl);t.queue.add((function(){uN.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{demo_key:t.state.selectedDemoKey,type:"parsed_widgets",url:n,args:{data:"ok"}},(function(e){console.log(e),t.queue.next()}),(function(e){console.log(e),t.addLogEntry("Failed to import widgets. Response: "+e.responseText),t.queue.next()}),(function(n){e&&t.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.widgetsImporting",""))}),n.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)}))}))}}},{key:"importPreSettings",value:function(e){var t=this;if(GC(e))t.addLogEntry("No data in pre_settings. Continuing...");else{t.sceKeyExists(t.state.selectedDemoKey,"pre_settings")&&t.addLogEntry("pre_settings already imported, but we will overwrite them.");var n=uN.trailingslashit(t.state.demos[t.state.selectedDemoKey].baseRestUrl);t.queue.add((function(){uN.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{demo_key:t.state.selectedDemoKey,type:"pre_settings",url:n,args:{data:e}},(function(e){console.log(e),t.addLogEntry("Imported pre_settings."),t.queue.next()}),(function(e){console.log(e),t.addLogEntry("Failed to import pre_settings. Response: "+e.responseText),t.queue.next()}),(function(e){t.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.importingPreSettings",""))}),e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)}))}))}}},{key:"importPostSettings",value:function(e){var t=this;if(GC(e))t.addLogEntry("No data in post_settings. Continuing...");else{t.sceKeyExists(t.state.selectedDemoKey,"post_settings")&&console.log("post_settings already imported, but we will overwrite them."),t.queue.add((function(){uN.$ajax(pixassist.adminUrl,"GET",{},(function(e){setTimeout((function(){t.importWidgets(!1)}),1e3),t.queue.next()}),null,(function(e){t.setState({description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.importingPostSettings",""))}),e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)}))}));var n=uN.trailingslashit(t.state.demos[t.state.selectedDemoKey].baseRestUrl);t.queue.add((function(){uN.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{demo_key:t.state.selectedDemoKey,type:"post_settings",url:n,args:{data:e}},(function(e){console.log(e),t.addLogEntry("Imported post_settings."),t.queue.next(),t.props.onReady(),t.setState({demoClass:"box--plugin-validated",description:uN.decodeHtml(dy(pixassist,"themeConfig.starterContent.l10n.importSuccessful",""))}),t.addLogEntry("Finished!"),t.props.onStarterContentFinished()}),(function(e){console.log(e),t.addLogEntry("Failed to post_settings. Response: "+e.responseText),t.setState({demoClass:"box--warning",description:"error"}),t.props.onStarterContentErrored(),t.props.onReady(),t.queue.next()}))}))}}},{key:"hasPlaceholders",value:function(e){return!GC(dy(pixassist,"themeMod.starterContent["+e+"].media.placeholders",[]))}},{key:"sceKeyExists",value:function(e,t){return!!dy(pixassist,"themeMod.starterContent["+e+"]["+t+"]",null)}}]),t}($.Component),LA=Qy((function(e){return{session:e}}),(function(e){return{onLoading:function(){e({type:"LOADING"})},onLoadingFinished:function(){e({type:"LOADING_DONE"})},onDisconnect:function(){e({type:"DISCONNECTED"})},onConnected:function(){e({type:"CONNECTED"})},onConnectError:function(){e({type:"OAUTH_CONNECT_ERROR"})},onLicenseFound:function(){e({type:"HAS_LICENSE"})},onNoLicenseFound:function(){e({type:"NO_LICENSE"})},onExpiredLicense:function(){e({type:"EXPIRED_LICENSE"})},onValidatedLicense:function(){e({type:"VALIDATED_LICENSE"})},onWizard:function(){e({type:"IS_SETUP_WIZARD"})},onAvailableNextButton:function(){e({type:"NEXT_BUTTON_AVAILABLE"})},onUnAvailableNextButton:function(){e({type:"NEXT_BUTTON_UNAVAILABLE"})},onConnectURLReady:function(t,n){e({type:"CONNECT_URL_READY",url:t,user:n})},onSupportActive:function(){e({type:"SUPPORT_ON"})},onSupportClosed:function(){e({type:"SUPPORT_OFF"})},onAvailableSkipButton:function(){e({type:"SKIP_BUTTON_AVAILABLE"})},onUnAvailableSkipButton:function(){e({type:"SKIP_BUTTON_UNAVAILABLE"})},onStarterContentInstalling:function(){e({type:"STARTER_CONTENT_INSTALLING"})},onStarterContentFinished:function(){e({type:"STARTER_CONTENT_DONE"})},onStarterContentErrored:function(){e({type:"STARTER_CONTENT_ERRORED"})},onStarterContentStop:function(){e({type:"STARTER_CONTENT_STOP"})},onStarterContentResume:function(){e({type:"STARTER_CONTENT_RESUME"})}}}))(OA),AA=function(e){function t(e){return Og(this,t),Ug(this,Mg(t).call(this,e))}return jg(t,e),Ag(t,null,[{key:"defaultProps",get:function(){return{label:pixassist.themeConfig.l10n.nextButton,classname:"btn btn--action",href:null,onclick:null,disabled:!1}}}]),Ag(t,[{key:"render",value:function(){var e=this.props.classname;return this.props.disabled&&(e+=" btn--disabled"),this.props.href?$.createElement("a",{className:e,href:this.props.href,disabled:this.props.disabled},this.props.label):this.props.onclick?$.createElement("a",{className:e,onClick:this.props.onclick,disabled:this.props.disabled},this.props.label):$.createElement("a",{href:"#"})}}]),t}(J),RA=function(e){function t(e){return Og(this,t),Ug(this,Mg(t).call(this,e))}return jg(t,e),Ag(t,null,[{key:"defaultProps",get:function(){return{label:dy(pixassist,"themeConfig.l10n.skipButton","Skip"),classname:"btn btn--text btn--slim",href:null,onclick:null,disabled:!1}}}]),Ag(t,[{key:"render",value:function(){var e=this.props.classname;return this.props.disabled&&(e+=" btn--disabled"),this.props.href?$.createElement("a",{className:e,href:this.props.href,disabled:this.props.disabled},this.props.label||dy(pixassist,"themeConfig.l10n.skipButton","Skip")):this.props.onclick?$.createElement("a",{className:e,onClick:this.props.onclick,disabled:this.props.disabled},this.props.label||dy(pixassist,"themeConfig.l10n.skipButton","Skip")):$.createElement("a",{href:"#"})}}]),t}(J),DA=jQuery,IA=function(e){function t(e){var n;return Og(this,t),Rg(zg(n=Ug(this,Mg(t).call(this,e))),"isApplicableToCurrentThemeType",(function(e){if(!dy(e,"applicableTypes",!1))return!0;var t=Qb(dy(e,"applicableTypes",!1)),n=dy(pixassist,"themeSupports.theme_type","theme");return-1!==Kb(t,n)})),Rg(zg(n),"dummyAsync",(function(e){n.setState({loading:!0},(function(){DA(".stepper__content").addClass("is--hidden"),n.asyncTimer=setTimeout(e,500)}))})),Rg(zg(n),"defaultNextButtonCallback",(function(e){var t=n.state,r=t.step_index,o=t.steps_done;n.state.loading||n.dummyAsync((function(){o.push(r),n.setState({loading:!1,step_index:r+1,steps_done:o}),DA(".stepper__content").removeClass("is--hidden")}))})),Rg(zg(n),"defaultSkipButtonCallback",(function(){var e=n.state.step_index;n.state.loading||n.dummyAsync((function(){n.setState({loading:!1,step_index:e+1}),DA(".stepper__content").removeClass("is--hidden")}))})),Rg(zg(n),"setStep",(function(e){n.state.loading||n.dummyAsync((function(){n.setState({loading:!1,step_index:parseInt(e)}),DA(".stepper__content").removeClass("is--hidden")}))})),Rg(zg(n),"startPluginsInstall",(function(){var e=ec.findDOMNode(zg(n)).getElementsByClassName("plugin"),t=null;if(!n.state.nextButtonDisable){if(window.CustomEvent?t=new CustomEvent("handle_plugin",{detail:{action:"activate"}}):(t=document.createEvent("CustomEvent")).initCustomEvent("handle_plugin",!0,!0,{action:"activate"}),Gw(e))for(var r=0;r<Gw(e);r++)e[r].dispatchEvent(t);n.onPluginsInstalling()}})),n.onState=n.onState.bind(zg(n)),n.defaultNextButtonCallback=n.defaultNextButtonCallback.bind(zg(n)),n.defaultSkipButtonCallback=n.defaultSkipButtonCallback.bind(zg(n)),n.startPluginsInstall=n.startPluginsInstall.bind(zg(n)),n.onPluginsReady=n.onPluginsReady.bind(zg(n)),n.onPluginsInstalling=n.onPluginsInstalling.bind(zg(n)),n.onPluginsRender=n.onPluginsRender.bind(zg(n)),n.onStarterContentReady=n.onStarterContentReady.bind(zg(n)),n.onStarterImporting=n.onStarterImporting.bind(zg(n)),n.startContentImport=n.startContentImport.bind(zg(n)),n.onStarterContentRender=n.onStarterContentRender.bind(zg(n)),n.state=n.initialState={loading:!1,is_active:!1,is_expired:!1,step_index:0,plugins_status:"waiting",steps_done:[],nextButtonLabel:null,nextButtonDisable:!1,nextButtonCallback:null,skipButtonLabel:null,skipButtonDisable:null,skipButtonCallback:null},py(pixassist.user.pixassist_user_ID)||(n.state.is_logged=!0),py(pixassist.themeMod.licenseHash)||(n.state.has_license=!0),py(pixassist.themeMod.licenseStatus)||"active"!==pixassist.themeMod.licenseStatus||(n.state.is_active=!0),n}return jg(t,e),Ag(t,[{key:"render",value:function(){var e=this,t=this.state,n=(t.loading,t.step_index);Gw(dy(pixassist,"themeConfig.starterContent.demos",[]))||(pixassist.themeConfig.setupWizard=Ow(pixassist.themeConfig.setupWizard,(function(e,t){return"support"!==t})));var r=Object.keys(pixassist.themeConfig.setupWizard)[n],o=pixassist.themeConfig.setupWizard[r],i=o.blocks,a=null,s=null;return 0===n?a=!0:n===Gw(pixassist.themeConfig.setupWizard)-1&&(s=!0),$.createElement("div",null,dy(pixassist,"themeSupports.theme_name",!1)&&dy(pixassist,"themeSupports.is_pixelgrade_theme",!1)?$.createElement("h1",{className:"setup-wizard-theme-name u-text-center"},uN.decodeHtml(pixassist.themeConfig.l10n.setupWizardTitle)):$.createElement("div",{className:"crown"}),$.createElement("div",{className:"stepper"},$.createElement(n_,{activeStep:n,nonLinear:!0,className:"no-background stepper-container"},Object.keys(pixassist.themeConfig.setupWizard).map((function(t,n){if(e.isApplicableToCurrentThemeType(pixassist.themeConfig.setupWizard[t])&&("support"!==t||Gw(dy(pixassist,"themeConfig.starterContent.demos",[])))){var r="stepper__step";return e.state.step_index===n&&(r+=" current"),e.state.step_index>=n&&(r+=" passed"),-1!==e.state.steps_done.indexOf(n)&&(r+=" done"),$.createElement(Qw,{className:r,onClick:function(){return e.setStep(n)},key:"step_head"+n},$.createElement(g_,{icon:$.createElement(x_,{color:"primary"}),className:"stepper__label",classes:{iconContainer:"stepper__label-icon",labelContainer:"stepper__label-name"}},uN.decodeHtml(pixassist.themeConfig.setupWizard[t].stepName)))}}))),$.createElement("div",{className:"stepper__content"},$.createElement("div",{className:"section section--informative entry-content block"},$.createElement("div",{className:"section__content"},Object.keys(i).map((function(t){var n=i[t],r="block ";if(e.isApplicableToCurrentThemeType(n)&&("support"!==t||Gw(dy(pixassist,"themeConfig.starterContent.demos",[])))){if(!py(n.notconnected)&&!dy(e.props,"session.is_logged",!1))switch(n.notconnected){case"hidden":return null;case"disabled":r+=" disabled";break;case"notice":return $.createElement(cN,{key:"block-notice-"+t,notice_id:"component_unavailable",type:"warning",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableTitle","")),content:uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableContent","")))})}if(!(py(n.inactive)||dy(e.props,"session.is_active",!1)&&dy(e.props,"session.is_logged",!1)))switch(n.inactive){case"hidden":return null;case"disabled":r+=" disabled";break;case"notice":return $.createElement(cN,{key:"block-notice-"+t,notice_id:"component_unavailable",type:"warning",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableTitle","")),content:uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableContent","")))})}return py(n.class)||(r+=n.class),$.createElement("div",{key:"block-"+t,className:r},Object.keys(n.fields).map((function(t){var r=n.fields[t],i=null,a=" ";if(e.isApplicableToCurrentThemeType(r)){if(!py(r.notconnected)&&!dy(e.props,"session.is_logged",!1))switch(r.notconnected){case"hidden":return null;case"disabled":a+=" disabled";break;case"notice":return $.createElement(cN,{key:"block-notice-"+t,notice_id:"component_unavailable",type:"warning",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableTitle","")),content:uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableContent","")))})}if(!(py(r.inactive)||dy(e.props,"session.is_active",!1)&&dy(e.props,"session.is_logged",!1)))switch(r.inactive){case"hidden":return null;case"disabled":a+=" disabled";break;case"notice":return $.createElement(cN,{key:"block-notice-"+t,notice_id:"component_unavailable",type:"warning",title:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableTitle","")),content:uN.replaceParams(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.componentUnavailableContent","")))})}switch(py(r.class)||(a+=r.class),r.type){case"text":var s=r.value;"Plugins"===o.stepName&&(e.props.session.are_plugins_installing&&(s=r.value_installing),e.props.session.are_plugins_installed&&e.props.session.did_plugins_install&&(s=r.value_installed)),"Starter content"===o.stepName&&(e.props.session.is_sc_installing&&(s=r.value_installing),e.props.session.is_sc_done&&(s=r.value_installed),e.props.session.is_sc_errored&&(s=r.value_errored)),s||(s=r.value),i=$.createElement("p",{className:a,dangerouslySetInnerHTML:{__html:uN.replaceParams(s)},key:"field"+t});break;case"h1":i=$.createElement("h1",{className:a,key:"field"+t,dangerouslySetInnerHTML:{__html:uN.replaceParams(r.value)}});break;case"h2":var l=r.value;"Plugins"===o.stepName&&(e.props.session.are_plugins_installing&&(l=r.value_installing),e.props.session.are_plugins_installed&&e.props.session.did_plugins_install&&(l=r.value_installed)),"Starter content"===o.stepName&&(e.props.session.is_sc_installing&&(l=r.value_installing),e.props.session.is_sc_done&&(l=r.value_installed),e.props.session.is_sc_errored&&(l=r.value_errored)),l||(l=r.value),i=$.createElement("h2",{className:a,key:"field"+t,dangerouslySetInnerHTML:{__html:uN.replaceParams(l)}});break;case"h3":i=$.createElement("h3",{className:a,key:"field"+t,dangerouslySetInnerHTML:{__html:uN.replaceParams(r.value)}});break;case"h4":i=$.createElement("h4",{className:a,key:"field"+t,dangerouslySetInnerHTML:{__html:uN.replaceParams(r.value)}});break;case"button":var u="btn btn--action ";py(r.class)||(u+=r.class),r.url=uN.replaceUrls(r.url),i=$.createElement("a",{className:u,key:"field"+t,href:r.url},r.label);break;case"links":if("object"!=typeof r.value)break;var c=r.value;i=$.createElement("ul",{key:"field"+t},Object.keys(r.value).map((function(e){var t=c[e];if(!py(t.label)&&!py(t.url))return $.createElement("li",{key:"link-"+e},$.createElement("a",{href:t.url,target:"_blank"},t.label))})));break;case"component":switch(r.value){case"authenticator":i=$.createElement(PN,{key:"field"+t});break;case"plugin-manager":i=$.createElement(IO,{key:"field"+t,onReady:e.onPluginsReady,onRender:e.onPluginsRender,onMove:e.onPluginsInstalling,defaultNextButtonCallback:e.defaultNextButtonCallback,enableIndividualActions:!1,groupByRequired:!0});break;case"starter-content":if(!Gw(dy(pixassist,"themeConfig.starterContent.demos",[])))break;i=$.createElement(LA,{key:"field-"+t,name:t,onReady:e.onStarterContentReady,onRender:e.onStarterContentRender,onMove:e.onStarterImporting,enable_actions:!1})}}return i}})))}}))),$.createElement("div",{className:"stepper__navigator"},!0!==s?this.props.session.is_wizard_skip?$.createElement(RA,{label:!0===a?dy(pixassist,"themeConfig.l10n.notRightNow","Not right now"):e.state.skipButtonLabel||o.skipButton,href:!0===a?pixassist.dashboardUrl:null,onclick:null!==e.state.skipButtonCallback?e.state.skipButtonCallback:e.defaultSkipButtonCallback,disabled:this.state.skipButtonDisable}):"":null,!0!==s&&!0!==e.state.onThemeSelector?this.props.session.is_wizard_next?$.createElement(AA,{label:e.state.nextButtonLabel||o.nextButton,onclick:null!==e.state.nextButtonCallback?e.state.nextButtonCallback:e.defaultNextButtonCallback,disabled:this.state.nextButtonDisable}):"":null)),!0===s?$.createElement("a",{className:"btn btn--text btn--return-to-dashboard",href:pixassist.dashboardUrl,onClick:this.handleFinishWizard},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.returnToDashboard","Return to dashboard"))):$.createElement("span",{className:"logo-pixelgrade"}))))}},{key:"onPluginsRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.props.onAvailableSkipButton(),0===this.state.step_index&&this.props.onAvailableNextButton();var t,n=this.startPluginsInstall,r=[],o=!1,i=!1,a=!1;Object.keys(e).map((function(t,n){var r=e[t];!dy(r,"is_installed",!1)&&r.selected?o=!0:!dy(r,"is_active",!1)&&r.selected&&(i=!0),dy(r,"is_update_required",!1)&&r.selected&&(a=!0)})),!0===o&&r.push(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.pluginInstallLabel",""))),!0===i&&r.push(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.pluginActivateLabel",""))),!0===a&&r.push(uN.decodeHtml(dy(pixassist,"themeConfig.l10n.pluginUpdateLabel",""))),t=Db(r,"&")+" "+uN.decodeHtml(dy(pixassist,"themeConfig.l10n.pluginsPlural","")),this.setState({nextButtonLabel:t}),this.setState({nextButtonCallback:n})}},{key:"onPluginsInstalling",value:function(){this.props.onUnAvailableSkipButton(),this.setState({nextButtonDisable:!0,skipButtonDisable:!0}),this.props.onPluginsInstalling()}},{key:"onPluginsReady",value:function(){this.setState({onThemeSelector:!1,nextButtonDisable:!1,skipButtonDisable:!1,nextButtonLabel:pixassist.themeConfig.l10n.nextButton,nextButtonCallback:this.defaultNextButtonCallback}),this.props.onPluginsInstalled()}},{key:"startContentImport",value:function(){this.onStarterImporting();var e=ec.findDOMNode(this).getElementsByClassName("import--action");py(e[0])?this.onStarterContentReady():e[0].click()}},{key:"onStarterContentRender",value:function(){this.props.onAvailableSkipButton(),Gw(dy(this.props.session,"themeConfig.starterContent.demos",[]))&&(Gw(dy(this.props.session,"themeConfig.starterContent.demos",[]))>1?this.setState({nextButtonLabel:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.starterContentImportSelectedLabel",""))}):this.setState({nextButtonLabel:uN.decodeHtml(dy(pixassist,"themeConfig.l10n.starterContentImportLabel",""))}),this.setState({nextButtonCallback:this.startContentImport}))}},{key:"onStarterImporting",value:function(){this.props.onUnAvailableSkipButton(),this.setState({nextButtonDisable:!0,skipButtonDisable:!0})}},{key:"onStarterContentReady",value:function(){this.setState({nextButtonDisable:!1,skipButtonDisable:!1,nextButtonLabel:dy(pixassist,"themeConfig.l10n.nextButton","Next"),nextButtonCallback:this.defaultNextButtonCallback})}},{key:"onState",value:function(e){this.update_local_state(e)}},{key:"update_local_state",value:function(e){e=Ig({},e,{},{loading:!1,step_index:0}),this.setState(e,(function(){uN.$ajax(pixassist.wpRest.endpoint.globalState.set.url,pixassist.wpRest.endpoint.globalState.set.method,{state:this.state})}))}}]),t}(J);window.requestAnimationFrame((function(){DA(".stepper__step").on("click",(function(){var e=DA(this);DA(".stepper__step").removeClass("current passed"),e.addClass("current").prevAll(".stepper__step").addClass("passed"),e.is(".stepper__step:last-of-type")&&e.addClass("passed")}))}));var jA=Qy((function(e){return{session:e}}),(function(e){return{onConnected:function(){e({type:"CONNECTED"})},onLoading:function(){e({type:"LOADING"})},onDisconnect:function(){e({type:"DISCONNECTED"})},onAvailableNextButton:function(){e({type:"NEXT_BUTTON_AVAILABLE"})},onUnAvailableNextButton:function(){e({type:"NEXT_BUTTON_UNAVAILABLE"})},onConnectURLReady:function(t){e({type:"CONNECT_URL_READY",url:t})},onAvailableSkipButton:function(){e({type:"SKIP_BUTTON_AVAILABLE"})},onUnAvailableSkipButton:function(){e({type:"SKIP_BUTTON_UNAVAILABLE"})},onPluginsInstalling:function(){e({type:"ON_PLUGINS_INSTALLING"})},onPluginsInstalled:function(){e({type:"ON_PLUGINS_INSTALLED"})}}}))(IA),MA=function(){return $.createElement(nh,{theme:Pg},$.createElement(jA,null))},qA=function(e){function t(e){var n;return Og(this,t),Rg(zg(n=Ug(this,Mg(t).call(this,e))),"beginSetupWizard",(function(){ec.render($.createElement(Sy,{store:by},$.createElement(MA,null)),document.getElementById("pixelgrade_assistant_setup_wizard"))})),n.state={},n.beginSetupWizard=n.beginSetupWizard.bind(zg(n)),n}return jg(t,e),Ag(t,[{key:"render",value:function(){return $.createElement("div",{className:"pixlgrade-care-welcome"},$.createElement("div",{className:"crown"}),$.createElement("div",{className:"section section--informative entry-content block"},$.createElement("div",null,$.createElement("h1",{className:"section__title"},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.setupWizardWelcomeTitle",""))),$.createElement("p",{className:"section__content"},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.setupWizardWelcomeContent",""))),$.createElement("button",{className:"btn btn--action btn--large btn--full",onClick:this.beginSetupWizard},uN.decodeHtml(dy(pixassist,"themeConfig.l10n.setupWizardStartButtonLabel",""))))),$.createElement("div",{className:"logo-pixelgrade"}))}}]),t}($.Component);ec.render($.createElement((function(){return $.createElement(nh,{theme:Pg},$.createElement(qA,null))}),null),document.getElementById("pixelgrade_assistant_setup_wizard"))}(); |
module.exports = [{"name":"path","attribs":{"d":"M41.09 10.45l-2.77-3.36C37.76 6.43 36.93 6 36 6H12c-.93 0-1.76.43-2.31 1.09l-2.77 3.36C6.34 11.15 6 12.03 6 13v25c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V13c0-.97-.34-1.85-.91-2.55zM24 35L13 24h7v-4h8v4h7L24 35zM10.25 10l1.63-2h24l1.87 2h-27.5z"}}]; |
"use strict";
let EventValidator = require('./validators/event.validator.js');
let StartDateIsBeforeEndDate = require('./conditions/StartDateIsBeforeEndDate');
class Event {
constructor(startDate, endDate, numberOfInvitations) {
this.startDate = startDate;
this.endDate = endDate;
this.numberOfInvetations = numberOfInvitations;
}
}
let validEvent = new Event(new Date(0), new Date(666666), 60);
let invalidEvent = new Event(new Date(), new Date(), 60);
let validValidator = new EventValidator(validEvent);
let invalidValidator = new EventValidator(invalidEvent);
console.log(`valid: ${validValidator.validate()}`);
console.log(`invalid: ${invalidValidator.validate()}`);
|
const { ALCore } = require('./lib/AurelionCore');
ALCore.startApp();
|
export default function updateAutoHeight(speed) {
const swiper = this;
const activeSlides = [];
let newHeight = 0;
let i;
if (typeof speed === 'number') {
swiper.setTransition(speed);
} else if (speed === true) {
swiper.setTransition(swiper.params.speed);
}
// Find slides currently in view
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
if (swiper.params.centeredSlides) {
swiper.visibleSlides.each((index, slide) => {
activeSlides.push(slide);
});
} else {
for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
const index = swiper.activeIndex + i;
if (index > swiper.slides.length) break;
activeSlides.push(swiper.slides.eq(index)[0]);
}
}
} else {
activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
}
// Find new height from highest slide in view
for (i = 0; i < activeSlides.length; i += 1) {
if (typeof activeSlides[i] !== 'undefined') {
const height = activeSlides[i].offsetHeight;
newHeight = height > newHeight ? height : newHeight;
}
}
// Update Height
if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
}
|
# -*- coding: utf-8 -*-
# ProDy: A Python Package for Protein Dynamics Analysis
#
# Copyright (C) 2010-2012 Ahmet Bakan
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
"""This module defines :class:`HierView` class that builds a hierarchical
views of atom groups.
Below example shows how to use hierarchical views. We start by importing
everything from the ProDy package:
>>> from prody import *
Then we parses a structure to get an :class:`~.AtomGroup` instance which has a
plain view of atoms:
>>> structure = parsePDB('3mkb')
>>> structure
<AtomGroup: 3mkb (4776 atoms)>
.. _hierview:
Hierarchical view
===============================================================================
A hierarchical view of the structure can be simply get by calling the
:meth:`.AtomGroup.getHierView` method:
>>> hv = structure.getHierView()
>>> hv
<HierView: AtomGroup 3mkb (4 chains, 946 residues)>
Indexing
-------------------------------------------------------------------------------
Indexing :class:`HierView` instances return :class:`~.Chain`:
>>> hv['A']
<Chain: A from 3mkb (254 residues, 1198 atoms)>
>>> hv['B']
<Chain: B from 3mkb (216 residues, 1193 atoms)>
>>> hv['Z'] # This will return None, which means chain Z does not exist
The length of the *hv* variable gives the number of chains in the structure:
>>> len(hv)
4
>>> hv.numChains()
4
It is also possible to get a :class:`~.Residue` by
directly indexing the :class:`HierView` instance:
>>> hv['A', 100]
<Residue: MET 100 from Chain A from 3mkb (8 atoms)>
Insertion codes can also be passed:
>>> hv['A', 100, 'B']
But this does not return anything, since residue 100B does not exist.
Iterations
-------------------------------------------------------------------------------
One can iterate over :class:`HierView` instances to get chains:
>>> for chain in hv:
... chain # doctest: +ELLIPSIS
<Chain: A from 3mkb (254 residues, 1198 atoms)>
...
<Chain: D from 3mkb (231 residues, 1196 atoms)>
It is also possible to get a :func:`list` of chains simply as follows:
>>> chains = list( hv )
>>> chains # doctest: +SKIP
[<Chain: A from 3mkb (1198 atoms)>,
<Chain: B from 3mkb (1193 atoms)>,
<Chain: C from 3mkb (1189 atoms)>,
<Chain: D from 3mkb (1196 atoms)>]
Residues
-------------------------------------------------------------------------------
In addition, one can also iterate over all residues:
>>> for residue in hv.iterResidues():
... residue # doctest: +ELLIPSIS
<Residue: ALA 1 from Chain A from 3mkb (5 atoms)>
<Residue: PHE 2 from Chain A from 3mkb (11 atoms)>
...
<Residue: HOH 475 from Chain D from 3mkb (1 atoms)>
<Residue: HOH 492 from Chain D from 3mkb (1 atoms)>
Chains
===============================================================================
>>> chA = hv['A']
>>> chA
<Chain: A from 3mkb (254 residues, 1198 atoms)>
Length of the chain equals to the number of residues in it:
>>> len(chA)
254
>>> chA.numResidues()
254
Indexing
-------------------------------------------------------------------------------
Indexing a :class:`~.Chain` instance returns a :class:`~.Residue` instance.
>>> chA[1]
<Residue: ALA 1 from Chain A from 3mkb (5 atoms)>
If a residue does not exist, ``None`` is returned:
>>> chA[1000]
>>> chA[1, 'A'] # Residue 1 with insertion code A also does not exist
If residue with given integer number does not exist, ``None`` is returned.
Iterations
-------------------------------------------------------------------------------
Iterating over a chain yields residues:
>>> for residue in chA:
... residue # doctest: +ELLIPSIS
<Residue: ALA 1 from Chain A from 3mkb (5 atoms)>
<Residue: PHE 2 from Chain A from 3mkb (11 atoms)>
...
<Residue: HOH 490 from Chain A from 3mkb (1 atoms)>
<Residue: HOH 493 from Chain A from 3mkb (1 atoms)>
Note that water atoms, each constituting a residue, are also part of a chain
if they are labeled with that chain's identifier.
This enables getting a :func:`list` of residues simply as follows:
>>> chA_residues = list(chA)
>>> chA_residues # doctest: +SKIP
[<Residue: ALA 1 from Chain A from 3mkb (5 atoms)>,
...,
<Residue: HOH 493 from Chain A from 3mkb (1 atoms)>]
Get data
-------------------------------------------------------------------------------
All methods defined for :class:`~.AtomGroup` class are also defined for
:class:`~.Chain` and :class:`~.Residue` classes:
>>> print( chA.getCoords() ) # doctest: +ELLIPSIS
[[ -2.139 17.026 -13.287]
[ -1.769 15.572 -13.111]
[ -0.296 15.257 -13.467]
...
[ -5.843 17.181 -16.86 ]
[-13.199 -9.21 -49.692]
[ -0.459 0.378 -46.156]]
>>> print( chA.getBetas() )
[ 59.35 59.14 58.5 ..., 57.79 47.77 40.77]
Selections
-------------------------------------------------------------------------------
Finally, you can select atoms from a :class:`~.Chain` instance:
>>> chA_backbone = chA.select('backbone')
>>> chA_backbone
<Selection: '(backbone) and (chain A)' from 3mkb (560 atoms)>
>>> chA_backbone.getSelstr()
'(backbone) and (chain A)'
As you see, the selection string passed by the user is augmented with
"chain" keyword and identifier automatically to provide internal
consistency:
>>> structure.select( chA_backbone.getSelstr() )
<Selection: '(backbone) and (chain A)' from 3mkb (560 atoms)>
Residues
===============================================================================
>>> chA_res1 = chA[1]
>>> chA_res1
<Residue: ALA 1 from Chain A from 3mkb (5 atoms)>
Indexing
-------------------------------------------------------------------------------
:class:`~.Residue` instances can be indexed to get individual atoms:
>>> chA_res1['CA']
<Atom: CA from 3mkb (index 1)>
>>> chA_res1['CB']
<Atom: CB from 3mkb (index 4)>
>>> chA_res1['X'] # if atom does not exist, None is returned
Iterations
-------------------------------------------------------------------------------
Iterating over a residue instance yields :class:`Atom` instances:
>>> for atom in chA_res1:
... atom # doctest: +ELLIPSIS
<Atom: N from 3mkb (index 0)>
...
<Atom: CB from 3mkb (index 4)>
This makes it easy to get a :func:`list` of atoms:
>>> list( chA_res1 ) # doctest: +SKIP
[<Atom: N from 3mkb (index 0)>,
<Atom: CA from 3mkb (index 1)>,
<Atom: C from 3mkb (index 2)>,
<Atom: O from 3mkb (index 3)>,
<Atom: CB from 3mkb (index 4)>]
Get data
-------------------------------------------------------------------------------
All methods defined for :class:`~.AtomGroup` class are also defined for
:class:`~.Residue` class:
>>> print( chA_res1.getCoords() )
[[ -2.139 17.026 -13.287]
[ -1.769 15.572 -13.111]
[ -0.296 15.257 -13.467]
[ 0.199 14.155 -13.155]
[ -2.752 14.639 -13.898]]
>>> print( chA_res1.getBetas() )
[ 59.35 59.14 58.5 59.13 59.02]
Selections
-------------------------------------------------------------------------------
Finally, you can select atoms from a :class:`~.Residue` instance:
>>> chA_res1_bb = chA_res1.select('backbone')
>>> chA_res1_bb
<Selection: '(backbone) and ... and (chain A))' from 3mkb (4 atoms)>
>>> chA_res1_bb.getSelstr()
'(backbone) and (resnum 1 and (chain A))'
Again, the selection string is augmented with the chain identifier and
residue number ("resnum").
Atoms
===============================================================================
The lowest level of the hierarchical view contains :class:`Atom` instances.
>>> chA_res1_CA = chA_res1['CA']
>>> chA_res1_CA
<Atom: CA from 3mkb (index 1)>
*Get atomic data*
All methods defined for :class:`~.AtomGroup` class are also defined for
:class:`~.Atom` class with the difference that method names are singular
(except for coordinates):
>>> print( chA_res1_CA.getCoords() )
[ -1.769 15.572 -13.111]
>>> print( chA_res1_CA.getBeta() )
59.14
State Changes
===============================================================================
A :class:`HierView` instance represents the state of an :class:`~.AtomGroup`
instance at the time it is built. When chain identifiers or residue numbers
change, the state that hierarchical view represents may not match the current
state of the atom group:
>>> chA.setChid('X')
>>> chA
<Chain: X from 3mkb (254 residues, 1198 atoms)>
>>> hv['X'] # returns None, since hierarchical view is not updated
>>> hv.update() # this updates hierarchical view
>>> hv['X']
<Chain: X from 3mkb (254 residues, 1198 atoms)>
When this is the case, :meth:`HierView.update` method can be used to update
hierarchical view."""
__author__ = 'Ahmet Bakan'
__copyright__ = 'Copyright (C) 2010-2012 Ahmet Bakan'
from numpy import unique, zeros, arange, concatenate
from atomgroup import AtomGroup
from selection import Selection
from chain import Chain
from residue import Residue
from segment import Segment
from prody import LOGGER, SETTINGS
__all__ = ['HierView']
class HierView(object):
"""Hierarchical views can be generated for :class:`~.AtomGroup` and
:class:`~.Selection` instances. Indexing a :class:`HierView` instance
returns a :class:`~.Chain` instance.
Some :class:`object` methods are customized as follows:
* :func:`len` returns the number of atoms, i.e. :meth:`numChains`
* :func:`iter` yields :class:`~.Chain` instances
* indexing by:
- *segment name* (:func:`str`), e.g. ``"PROT"``, returns
a :class:`~.Segment`
- *chain identifier* (:func:`str`), e.g. ``"A"``, returns
a :class:`~.Chain`
- *[segment name,] chain identifier, residue number[, insertion code]*
(:func:`tuple`), e.g. ``"A", 10`` or ``"A", 10, "B"`` or
``"PROT", "A", 10, "B"``, returns a :class:`~.Residue`
Note that when an :class:`~.AtomGroup` instance have distinct segments,
they will be considered when building the hierarchical view.
A :class:`~.Segment` instance will be generated for each distinct segment
name. Then, for each segment chains and residues will be evaluated.
Having segments in the structure will not change most behaviors of this
class, except indexing. For example, when indexing a hierarchical view
for chain P in segment PROT needs to be indexed as ``hv['PROT', 'P']``."""
def __init__(self, atoms, **kwargs):
if not isinstance(atoms, (AtomGroup, Selection)):
raise TypeError('atoms must be an AtomGroup or Selection instance')
self._atoms = atoms
self.update(**kwargs)
def __repr__(self):
if self._segments:
return ('<HierView: {0:s} ({1:d} segments, {2:d} chains, {3:d} '
'residues)>').format(str(self._atoms), self.numSegments(),
self.numChains(), self.numResidues())
else:
return ('<HierView: {0:s} ({1:d} chains, {2:d} residues)>'
).format(str(self._atoms), self.numChains(), self.numResidues())
def __str__(self):
return 'HierView of {0:s}'.format(str(self._atoms))
def __iter__(self):
"""Iterate over chains."""
return self._chains.__iter__()
def __len__(self):
return len(self._chains)
def __getitem__(self, key):
_dict = self._dict
if isinstance(key, str):
return _dict.get(key, self._dict.get((None, key)))
elif isinstance(key, tuple):
length = len(key)
if length == 1:
return self.__getitem__(key[0])
if length == 2:
return _dict.get(key,
_dict.get((None, None, key[0], key[1] or None),
_dict.get((None, key[0], key[1], None))))
if length == 3:
return _dict.get((None, key[0] or None,
key[1], key[2] or None),
_dict.get((key[0] or None, key[1] or None,
key[2], None)))
if length == 4:
return _dict.get((key[0] or None, key[1] or None,
key[2], key[3] or None))
elif isinstance(key, int):
return _dict.get((None, None, key, None))
def getAtoms(self):
"""Return atoms for which the hierarchical view was built."""
return self._atoms
def update(self, **kwargs):
"""Update (or build) hierarchical view of atoms. This method is called
at instantiation, but can be used to rebuild the hierarchical view when
attributes of atoms change."""
atoms = self._atoms
if isinstance(atoms, AtomGroup):
ag = atoms
selstr = False
_indices = arange(atoms._n_atoms)
else:
ag = atoms.getAtomGroup()
_indices = atoms._getIndices()
selstr = atoms.getSelstr()
set_indices = False
if atoms == ag:
set_indices = True
_dict = dict()
_residues = list()
_segments = list()
_chains = list()
# also set the attributes, so that when no segments or chains
# are available, num/iter methods won't raise exceptions
self._dict = _dict
self._residues = _residues
self._segments = _segments
self._chains = _chains
acsi = atoms.getACSIndex()
n_atoms = len(ag)
# identify segments
if set_indices:
segindex = -1
segindices = zeros(n_atoms, int)
sgnms = ag._getSegnames()
if sgnms is None:
_segments = None
else:
if selstr:
sgnms = sgnms[_indices]
s = sgnms[0]
if len(unique(sgnms)) == 1:
if s != '':
segment = Segment(ag, _indices, acsi=acsi, unique=True,
selstr=selstr)
_dict[s] = segment
_segments.append(segment)
LOGGER.info('Hierarchical view contains segments.')
else:
_segments = None
else:
ps = None # previous segment name
for i, s in enumerate(sgnms):
if s == ps or s in _dict:
continue
ps = s
idx = _indices[i:][sgnms[i:] == s]
segment = Segment(ag, idx, acsi=acsi, unique=True,
selstr=selstr)
if set_indices:
segindex += 1
segindices[idx] = segindex
_dict[s] = segment
_segments.append(segment)
LOGGER.info('Hierarchical view contains segments.')
if set_indices:
ag._data['segindices'] = segindices
chindex = -1
chindices = zeros(n_atoms, int)
# identify chains
chids = ag._getChids()
if chids is None:
_chains = None
else:
if selstr:
chids = chids[_indices]
if _segments is None:
if len(unique(chids)) == 1:
chain = Chain(ag, _indices, acsi=acsi, unique=True,
selstr=selstr)
_dict[(None, chids[0] or None)] = chain
_chains.append(chain)
else:
pc = None
for i, c in enumerate(chids):
if c == pc or (None, c) in _dict:
continue
pc = c
idx = _indices[i:][chids[i:] == c]
chain = Chain(ag, idx, acsi=acsi, unique=True,
selstr=selstr)
if set_indices:
chindex += 1
chindices[idx] = chindex
_dict[(None, c)] = chain
_chains.append(chain)
else:
pc = chids[0]
ps = sgnms[0]
_i = 0
for i, c in enumerate(chids):
s = sgnms[i]
if c == pc and s == ps:
continue
s_c = (ps, pc or None)
chain = _dict.get(s_c)
if chain is None:
segment = _dict[ps]
idx = _indices[_i:i]
chain = Chain(ag, idx, acsi=acsi, segment=segment,
unique=True, selstr=selstr)
if set_indices:
chindex += 1
chindices[idx] = chindex
_dict[s_c] = chain
_chains.append(chain)
else:
idx = _indices[_i:i]
chindices[idx] = chain._indices[0]
chain._indices = concatenate((chain._indices, idx))
pc = c
ps = s
_i = i
s_c = (ps, pc or None)
chain = _dict.get(s_c)
idx = _indices[_i:]
if chain is None:
segment = _dict[ps]
if set_indices:
chindex += 1
chindices[idx] = chindex
chain = Chain(ag, idx, acsi=acsi, segment=segment,
unique=True, selstr=selstr)
_dict[s_c] = chain
_chains.append(chain)
else:
if set_indices:
chindices[idx] = chain._indices[0]
chain._indices = concatenate((chain._indices, idx))
if set_indices:
ag._data['chindices'] = chindices
if kwargs.get('chain') == True:
return
if set_indices:
resindex = -1
resindices = zeros(n_atoms, int)
rnums = ag._getResnums()
if rnums is None:
raise ValueError('resnums are not set')
if selstr:
rnums = rnums[_indices]
nones = None
if _segments is None:
if nones is None:
nones = [None] * len(rnums)
sgnms = nones
if _chains is None:
if nones is None:
nones = [None] * len(rnums)
chids = nones
icods = ag._getIcodes()
if icods is None:
if nones is None:
nones = [None] * len(rnums)
icods = nones
elif selstr:
icods = icods[_indices]
pr = rnums[0]
pi = icods[0] or None
pc = chids[0]
ps = sgnms[0]
_j = 0
_append = _residues.append
_get = _dict.get
_set = _dict.__setitem__
for j, r in enumerate(rnums):
i = icods[j] or None
c = chids[j]
s = sgnms[j]
if r != pr or i != pi or c != pc or s != ps:
s_c_r_i = (ps, pc, pr, pi)
res = _get(s_c_r_i)
if res is None:
chain = _get((ps, pc))
idx = _indices[_j:j]
res = Residue(ag, idx, acsi=acsi, chain=chain,
unique=True, selstr=selstr)
if set_indices:
resindex += 1
resindices[idx] = resindex
_append(res)
_set(s_c_r_i, res)
else:
res._indices = concatenate((res._indices, _indices[_j:j]))
ps = s
pc = c
pr = r
pi = i
_j = j
s_c_r_i = (ps, pc, pr, pi)
res = _get(s_c_r_i)
idx = _indices[_j:]
if res is None:
chain = _get((ps, pc))
res = Residue(ag, idx, acsi=acsi, chain=chain, unique=True,
selstr=selstr)
if set_indices:
resindex += 1
resindices[idx] = resindex
_append(res)
_set(s_c_r_i, res)
else:
if set_indices:
resindices[idx] = res._indices[0]
res._indices = concatenate((res._indices, idx))
if set_indices:
ag._data['resindices'] = resindices
def getResidue(self, chid, resnum, icode=None, segname=None):
"""Return residue with number *resnum* and insertion code *icode* from
the chain with identifier *chid* in segment with name *segname*."""
return self._dict.get((segname or None, chid or None,
resnum, icode or None))
def numResidues(self):
"""Return number of residues."""
return len(self._residues)
def iterResidues(self):
"""Iterate over residues."""
return self._residues.__iter__()
def getChain(self, chid, segname=None):
"""Return chain with identifier *chid*, if it is present."""
return self._dict.get((segname or None, chid or None))
def iterChains(self):
"""Iterate over chains."""
return self._chains.__iter__()
def numChains(self):
"""Return number of chains."""
return len(self._chains)
def getSegment(self, segname):
"""Return segment with name *segname*, if it is present."""
return self._dict.get(segname or None)
def numSegments(self):
"""Return number of chains."""
return len(self._segments)
def iterSegments(self):
"""Iterate over segments."""
return self._segments.__iter__()
|
import numpy as np
import scipy as sp
from ipdb import set_trace as st
import skimage as ski
import utils
from matplotlib import pyplot as plt
import matplotlib as mpl
from common import *
from munch import Munch as M
from scipy import sparse
from scipy.interpolate import Rbf
import os
from scipy.fft import fftn, ifftn, set_workers
from tqdm.contrib.itertools import product
# from itertools import product
from tqdm import tqdm
from tqdm.contrib import tenumerate
import tifffile
import imageio as ii
from scipy import misc
import random
class Stacker:
def __init__(
self,
work_dir,
params = M(
noise_mul = 32.0, # fudge factor (also try 4, 16, 64)
patch_size = 32,
cache_path = '.cache',
),
custom_name = 'out',
method = 'fuse',
):
self.custom_name = custom_name
self.method = method
self.work_dir = work_dir
for k in params:
setattr(self, k, params[k])
def fuse_clip(self, patches, iters=2, k=2):
valid = np.ones_like(patches)
for _ in range(iters):
#compute the masked mean
num = (valid*patches).sum(axis=0)
denom = valid.sum(axis=0)+1E-9
mu = num/denom
diff = patches-mu[None]
stds = (diff**2).sum(axis=0)**0.5/np.sqrt(patches.shape[0])
valid = np.abs(diff) < stds[None]*k
#print('valid mean is', valid.mean())
return mu
def fuse(self, patches):
avg = patches.mean(axis = (0))
dist = np.abs(patches-avg[None]).max(axis = (1,2))
ffts = fftn(patches, axes = (1,2), norm='ortho')
reffft = ffts[dist.argmin()] #reference patch
num_frames = patches.shape[0]
noise = (patches.std(axis=0)**2).mean()
# fudge factors from hasinoff paper
noise *= num_frames**2 / 8 * self.noise_mul
fft_err = np.abs(reffft[None] - ffts)**2
err_scores = fft_err / (fft_err + noise)
# print('score', err_scores.min(), err_scores.mean(), err_scores.max())
# if err_scores.max() > 0.5 and dist.max() < 2E-3:
# st()
correction = err_scores * (reffft[None] - ffts)
fused_fft = (ffts + correction).mean(axis = 0)
fused_patch = ifftn(fused_fft, axes = (0,1), norm='ortho').real #imag components 0
# if dist.max() < 2E-3:
# st()
return fused_patch
def __call__(self, paths):
N = len(paths)
H,W,C = np.load(paths[0]).shape
PS = self.patch_size
HPS = PS//2 #img size must be a multiple of this
padH = np.ceil(H/HPS).astype(np.int)*HPS-H
padW = np.ceil(W/HPS).astype(np.int)*HPS-W
paddedH, paddedW = H+padH+PS, W+padW+PS
imgs = np.memmap(self.cache_path, dtype=np.float32, mode='w+', shape=(N,C,paddedH,paddedW))
for i, path in tenumerate(paths):
imgs[i] = np.pad(
np.load(path, mmap_mode='r').transpose((2,0,1)),
((0,0), (HPS, padH+HPS), (HPS, padW+HPS)),
mode='edge'
)
out = np.zeros((C, paddedH, paddedW))
xs, ys = np.meshgrid(np.arange(PS), np.arange(PS))
foo = lambda z: 0.5 - 0.5*np.cos( 2 * np.pi * (z.astype(np.float32)+0.5)/PS)
window_fn = foo(xs) * foo(ys)
####
# from pathos.pools import ProcessPool
# pool = ProcessPool(nodes=20)
# patch_slices = [
# np.index_exp[
# i*HPS:(i+2)*HPS,
# j*HPS:(j+2)*HPS,
# ]
# for (i,j) in product(range(paddedH//HPS-1), range(paddedW//HPS-1))
# ]
# patchws = [
# imgs[np.index_exp[:,c]+patch_slice] * window_fn[None]
# for patch_slice in tqdm(patch_slices)
# for c in range(C)
# ]
# results = pool.map(self.fuse, patchws)
# for i, patch_slice in tenumerate(patch_slices):
# for c in range(C):
# out[c][patch_slice] += results[i*3+c]
for (i, j) in product(range(paddedH//HPS-1), range(paddedW//HPS-1)):
patch_slice = np.index_exp[
i*HPS:(i+2)*HPS,
j*HPS:(j+2)*HPS,
]
patchws = [imgs[np.index_exp[:,c]+patch_slice] * window_fn[None] for c in range(C)]
if True:
from pathos.pools import ProcessPool
pool = ProcessPool(nodes=3)
results = pool.map(self.fuse, patchws)
else:
results = [getattr(self, self.method)(patchw) for patchw in patchws]
for c in range(C):
out[c][patch_slice] += results[c]
out = out[:,HPS:H+HPS,HPS:W+HPS]
out = np.clip(out, 0.0, 1.0).transpose(1,2,0)
np.save(f'{self.work_dir}/stacked/out', out)
tifffile.imwrite(f'{self.work_dir}/stacked/out.tiff', out)
ii.imsave(f'{self.work_dir}/stacked/{self.custom_name}.jpg', np.round(out*255).astype(np.uint8), quality=100)
os.remove(self.cache_path)
if __name__ == '__main__':
#let's test it out...
face_ = misc.face() #an RGB image
N = 20
sigma = 100
sigma2 = 500
Nblur = 4
Nalign = 4
#1. add misalignments
#2. add blurring
np.random.seed(0)
paths = []
print('generating fake data')
for i in tqdm(range(N)):
face = (
face_.astype(np.float32) +
np.random.randn(*face_.shape) * sigma +
utils.blur(np.random.randn(*face_.shape), 7) * sigma2
)
if i < Nblur:
face = utils.blur(face, [1,2,3,4][i])
elif Nblur <= i < Nalign+Nblur:
face = np.roll(face, [5,7,9,3][i-Nblur], axis = 0)
face = np.roll(face, [2,-4,5,-6][i-Nblur], axis = 1)
else:
face = utils.blur(face, 0.5)
L = 2
face = np.roll(face, random.randint(-L,L), axis=0)
face = np.roll(face, random.randint(-L,L), axis=1)
#let's not clip actually...
#face = np.clip(face, 0.0, 255.0)/255.0
face = face/255.0
path = f'debug/testimgs/{i:02d}.npy'
np.save(path, face)
ii.imsave(path.replace('npy', 'jpg'), np.round(np.clip(face,0,1)*255.0).astype(np.uint8), quality=98)
paths.append(path)
bar = Stacker('debug', method='fuse', custom_name='hasinoff32')
bar.patch_size=64
bar(paths)
bar.custom_name='hasinoff8'
bar.noise_mul=1.0
bar(paths)
bar.custom_name='hasinoff128'
bar.noise_mul=10000.0
bar(paths)
foo = Stacker('debug', method='fuse_clip', custom_name='clipavg')
foo.patch_size=256
foo(paths)
|
/*!
* lru.js - LRU cache for decentraland
* Copyright (c) 2014-2015, Fedor Indutny (MIT License)
* Copyright (c) 2014-2016, Christopher Jeffrey (MIT License).
* Copyright (c) 2016-2017, Manuel Araoz (MIT License).
* https://github.com/decentraland/decentraland-node
*/
'use strict';
var assert = require('assert');
/**
* An LRU cache, used for caching {@link ChainEntry}s.
* @exports LRU
* @constructor
* @param {Number} capacity
* @param {Function?} getSize
*/
function LRU(capacity, getSize) {
if (!(this instanceof LRU))
return new LRU(capacity, getSize);
assert(typeof capacity === 'number', 'Max size must be a number.');
assert(!getSize || typeof getSize === 'function', 'Bad size callback.');
this.capacity = capacity;
this.getSize = getSize;
this.map = {};
this.size = 0;
this.items = 0;
this.head = null;
this.tail = null;
this.pending = null;
}
/**
* Calculate size of an item.
* @private
* @param {LRUItem} item
* @returns {Number} Size.
*/
LRU.prototype._getSize = function _getSize(item) {
var keySize;
if (this.getSize) {
keySize = Math.floor(item.key.length * 1.375);
return 120 + keySize + this.getSize(item.value);
}
return 1;
};
/**
* Compact the LRU linked list.
* @private
*/
LRU.prototype._compact = function _compact() {
var item, next;
if (this.size <= this.capacity)
return;
for (item = this.head; item; item = next) {
if (this.size <= this.capacity)
break;
this.size -= this._getSize(item);
this.items--;
delete this.map[item.key];
next = item.next;
item.prev = null;
item.next = null;
}
if (!item) {
this.head = null;
this.tail = null;
return;
}
this.head = item;
item.prev = null;
};
/**
* Reset the cache. Clear all items.
*/
LRU.prototype.reset = function reset() {
var item, next;
for (item = this.head; item; item = next) {
delete this.map[item.key];
this.items--;
next = item.next;
item.prev = null;
item.next = null;
}
assert(!item);
this.size = 0;
this.head = null;
this.tail = null;
};
/**
* Add an item to the cache.
* @param {String|Number} key
* @param {Object} value
*/
LRU.prototype.set = function set(key, value) {
var item;
key = key + '';
item = this.map[key];
if (item) {
this.size -= this._getSize(item);
item.value = value;
this.size += this._getSize(item);
this._removeList(item);
this._appendList(item);
this._compact();
return;
}
item = new LRUItem(key, value);
this.map[key] = item;
this._appendList(item);
this.size += this._getSize(item);
this.items++;
this._compact();
};
/**
* Retrieve an item from the cache.
* @param {String|Number} key
* @returns {Object} Item.
*/
LRU.prototype.get = function get(key) {
var item;
key = key + '';
item = this.map[key];
if (!item)
return;
this._removeList(item);
this._appendList(item);
return item.value;
};
/**
* Test whether the cache contains a key.
* @param {String|Number} key
* @returns {Boolean}
*/
LRU.prototype.has = function get(key) {
return this.map[key] != null;
};
/**
* Remove an item from the cache.
* @param {String|Number} key
* @returns {Boolean} Whether an item was removed.
*/
LRU.prototype.remove = function remove(key) {
var item;
key = key + '';
item = this.map[key];
if (!item)
return false;
this.size -= this._getSize(item);
this.items--;
delete this.map[key];
this._removeList(item);
return true;
};
/**
* Prepend an item to the linked list (sets new head).
* @private
* @param {LRUItem}
*/
LRU.prototype._prependList = function prependList(item) {
this._insertList(null, item);
};
/**
* Append an item to the linked list (sets new tail).
* @private
* @param {LRUItem}
*/
LRU.prototype._appendList = function appendList(item) {
this._insertList(this.tail, item);
};
/**
* Insert item into the linked list.
* @private
* @param {LRUItem|null} ref
* @param {LRUItem} item
*/
LRU.prototype._insertList = function insertList(ref, item) {
assert(!item.next);
assert(!item.prev);
if (ref == null) {
if (!this.head) {
this.head = item;
this.tail = item;
} else {
this.head.prev = item;
item.next = this.head;
this.head = item;
}
return;
}
item.next = ref.next;
item.prev = ref;
ref.next = item;
if (ref === this.tail)
this.tail = item;
};
/**
* Remove item from the linked list.
* @private
* @param {LRUItem}
*/
LRU.prototype._removeList = function removeList(item) {
if (item.prev)
item.prev.next = item.next;
if (item.next)
item.next.prev = item.prev;
if (item === this.head)
this.head = item.next;
if (item === this.tail)
this.tail = item.prev || this.head;
if (!this.head)
assert(!this.tail);
if (!this.tail)
assert(!this.head);
item.prev = null;
item.next = null;
};
/**
* Collect all keys in the cache, sorted by LRU.
* @returns {String[]}
*/
LRU.prototype.keys = function keys() {
var keys = [];
var item;
for (item = this.head; item; item = item.next) {
if (item === this.head)
assert(!item.prev);
if (!item.prev)
assert(item === this.head);
if (!item.next)
assert(item === this.tail);
keys.push(item.key);
}
return keys;
};
/**
* Collect all values in the cache, sorted by LRU.
* @returns {String[]}
*/
LRU.prototype.values = function values() {
var values = [];
var item;
for (item = this.head; item; item = item.next)
values.push(item.value);
return values;
};
/**
* Convert the LRU cache to an array of items.
* @returns {Object[]}
*/
LRU.prototype.toArray = function toArray() {
var items = [];
var item;
for (item = this.head; item; item = item.next)
items.push(item);
return items;
};
/**
* Create an atomic batch for the lru
* (used for caching database writes).
* @returns {LRUBatch}
*/
LRU.prototype.batch = function batch() {
return new LRUBatch(this);
};
/**
* Start the pending batch.
*/
LRU.prototype.start = function start() {
assert(!this.pending);
this.pending = this.batch();
};
/**
* Clear the pending batch.
*/
LRU.prototype.clear = function clear() {
assert(this.pending);
this.pending.clear();
};
/**
* Drop the pending batch.
*/
LRU.prototype.drop = function drop() {
assert(this.pending);
this.pending = null;
};
/**
* Commit the pending batch.
*/
LRU.prototype.commit = function commit() {
assert(this.pending);
this.pending.commit();
this.pending = null;
};
/**
* Push an item onto the pending batch.
* @param {String} key
* @param {Object} value
*/
LRU.prototype.push = function push(key, value) {
assert(this.pending);
this.pending.set(key, value);
};
/**
* Push a removal onto the pending batch.
* @param {String} key
*/
LRU.prototype.unpush = function unpush(key) {
assert(this.pending);
this.pending.remove(key);
};
/**
* Represents an LRU item.
* @constructor
* @private
* @param {String} key
* @param {Object} value
*/
function LRUItem(key, value) {
this.key = key;
this.value = value;
this.next = null;
this.prev = null;
}
/**
* LRU Batch
* @constructor
*/
function LRUBatch(lru) {
this.lru = lru;
this.ops = [];
}
LRUBatch.prototype.set = function set(key, value) {
this.ops.push(new LRUOp(false, key, value));
};
LRUBatch.prototype.remove = function remove(key) {
this.ops.push(new LRUOp(true, key));
};
LRUBatch.prototype.clear = function clear() {
this.ops.length = 0;
};
LRUBatch.prototype.commit = function commit() {
var i, op;
for (i = 0; i < this.ops.length; i++) {
op = this.ops[i];
if (op.remove) {
this.lru.remove(op.key);
continue;
}
this.lru.set(op.key, op.value);
}
this.ops.length = 0;
};
/**
* LRU Op
* @constructor
*/
function LRUOp(remove, key, value) {
this.remove = remove;
this.key = key;
this.value = value;
}
/**
* A null cache. Every method is a NOP.
* @constructor
* @param {Number} size
*/
function NullCache(size) {
this.capacity = 0;
this.size = 0;
this.items = 0;
}
NullCache.prototype.set = function set(key, value) {};
NullCache.prototype.remove = function remove(key) {};
NullCache.prototype.get = function get(key) {};
NullCache.prototype.has = function has(key) { return false; };
NullCache.prototype.reset = function reset() {};
NullCache.prototype.keys = function keys(key) { return []; };
NullCache.prototype.values = function values(key) { return []; };
NullCache.prototype.toArray = function toArray(key) { return []; };
NullCache.prototype.batch = function batch() { return new LRUBatch(this); };
NullCache.prototype.start = function start() {};
NullCache.prototype.clear = function clear() {};
NullCache.prototype.drop = function drop() {};
NullCache.prototype.commit = function commit() {};
NullCache.prototype.push = function push(key, value) {};
NullCache.prototype.unpush = function unpush(key) {};
/*
* Expose
*/
exports = LRU;
exports.LRU = LRU;
exports.Nil = NullCache;
module.exports = exports;
|
# Copy from PyTorch Tutorials
# Train Inception-v3 on Cifar10 to give the Inception score
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import matplotlib.pyplot as plt
import time
import os
import copy
def save_model(model, filename):
torch.save(model.state_dict(), filename)
def train_model(model, dataloaders, dataset_sizes, criterion, optimizer, num_epochs=25, is_inception=False):
since = time.time()
best_model_wts = copy.deepcopy(model.state_dict())
best_acc = 0.0
for epoch in range(num_epochs):
print('Epoch {}/{}'.format(epoch, num_epochs - 1))
print('-' * 10)
# Each epoch has a training and validation phase
for phase in ['train', 'val']:
if phase == 'train':
model.train() # Set model to training mode
else:
model.eval() # Set model to evaluate mode
running_loss = 0.0
running_corrects = 0
# Iterate over data.
for inputs, labels in dataloaders[phase]:
inputs = inputs.to(device)
labels = labels.to(device)
# zero the parameter gradients
optimizer.zero_grad()
# forward
# track history if only in train
with torch.set_grad_enabled(phase == 'train'):
# Get model outputs and calculate loss
# Special case for inception because in training it has an auxiliary output. In train
# mode we calculate the loss by summing the final output and the auxiliary output
# but in testing we only consider the final output.
if is_inception and phase == 'train':
# From https://discuss.pytorch.org/t/how-to-optimize-inception-model-with-auxiliary-classifiers/7958
outputs, aux_outputs = model(inputs)
loss1 = criterion(outputs, labels)
loss2 = criterion(aux_outputs, labels)
loss = loss1 + 0.4 * loss2
else:
outputs = model(inputs)
loss = criterion(outputs, labels)
_, preds = torch.max(outputs, 1)
# backward + optimize only if in training phase
if phase == 'train':
loss.backward()
optimizer.step()
# statistics
running_loss += loss.item() * inputs.size(0)
running_corrects += torch.sum(preds == labels.data)
epoch_loss = running_loss / dataset_sizes[phase]
epoch_acc = running_corrects.double() / dataset_sizes[phase]
print('{} Loss: {:.4f} Acc: {:.4f}'.format(
phase, epoch_loss, epoch_acc))
# deep copy the model
if phase == 'val' and epoch_acc > best_acc:
best_acc = epoch_acc
best_model_wts = copy.deepcopy(model.state_dict())
print()
time_elapsed = time.time() - since
print('Training complete in {:.0f}m {:.0f}s'.format(
time_elapsed // 60, time_elapsed % 60))
print('Best val Acc: {:4f}'.format(best_acc))
# load best model weights
model.load_state_dict(best_model_wts)
return model
def set_parameter_requires_grad(model, feature_extracting):
if feature_extracting:
for param in model.parameters():
param.requires_grad = False
def initialize_model(model_name, num_classes, feature_extract, use_pretrained=True):
# Initialize these variables which will be set in this if statement. Each of these
# variables is model specific.
model_ft = None
input_size = 0
if model_name == "resnet":
""" Resnet18
"""
model_ft = models.resnet18(pretrained=use_pretrained)
set_parameter_requires_grad(model_ft, feature_extract)
num_ftrs = model_ft.fc.in_features
model_ft.fc = nn.Linear(num_ftrs, num_classes)
input_size = 224
elif model_name == "alexnet":
""" Alexnet
"""
model_ft = models.alexnet(pretrained=use_pretrained)
set_parameter_requires_grad(model_ft, feature_extract)
num_ftrs = model_ft.classifier[6].in_features
model_ft.classifier[6] = nn.Linear(num_ftrs,num_classes)
input_size = 224
elif model_name == "vgg":
""" VGG11_bn
"""
model_ft = models.vgg11_bn(pretrained=use_pretrained)
set_parameter_requires_grad(model_ft, feature_extract)
num_ftrs = model_ft.classifier[6].in_features
model_ft.classifier[6] = nn.Linear(num_ftrs,num_classes)
input_size = 224
elif model_name == "squeezenet":
""" Squeezenet
"""
model_ft = models.squeezenet1_0(pretrained=use_pretrained)
set_parameter_requires_grad(model_ft, feature_extract)
model_ft.classifier[1] = nn.Conv2d(512, num_classes, kernel_size=(1,1), stride=(1,1))
model_ft.num_classes = num_classes
input_size = 224
elif model_name == "densenet":
""" Densenet
"""
model_ft = models.densenet121(pretrained=use_pretrained)
set_parameter_requires_grad(model_ft, feature_extract)
num_ftrs = model_ft.classifier.in_features
model_ft.classifier = nn.Linear(num_ftrs, num_classes)
input_size = 224
elif model_name == "inception":
""" Inception v3
Be careful, expects (299,299) sized images and has auxiliary output
"""
model_ft = models.inception_v3(pretrained=use_pretrained)
set_parameter_requires_grad(model_ft, feature_extract)
# Handle the auxilary net
num_ftrs = model_ft.AuxLogits.fc.in_features
model_ft.AuxLogits.fc = nn.Linear(num_ftrs, num_classes)
# Handle the primary net
num_ftrs = model_ft.fc.in_features
model_ft.fc = nn.Linear(num_ftrs,num_classes)
input_size = 299
else:
print("Invalid model name, exiting...")
exit()
return model_ft, input_size
if __name__ == '__main__':
# Models to choose from [resnet, alexnet, vgg, squeezenet, densenet, inception]
model_name = "inception"
# Number of classes in the dataset
num_classes = 10
# Batch size for training (change depending on how much memory you have)
batch_size = 64
# Number of epochs to train for
num_epochs = 50
# Flag for feature extracting. When False, we finetune the whole model,
# when True we only update the reshaped layer params
feature_extract = False
# Initialize the model for this run
model_ft, input_size = initialize_model(model_name, num_classes, feature_extract, use_pretrained=False)
# Print the model we just instantiated
print(model_ft)
# Data augmentation and normalization for training
# Just normalization for validation
transform = transforms.Compose([
transforms.Resize(input_size),
transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
print("Initializing Datasets and Dataloaders...")
# Create training and validation datasets
dataset = torchvision.datasets.CIFAR10('./dataset', download=True, transform=transform)
trainset, valset = torch.utils.data.random_split(dataset, (45000, 5000))
# Create training and validation dataloaders
dataloaders = {
'train' : torch.utils.data.DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=4),
'val' : torch.utils.data.DataLoader(valset, batch_size=batch_size, shuffle=True, num_workers=4),
}
dataset_sizes = {
'train' : 45000,
'val' : 5000,
}
# Detect if we have a GPU available
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# Send the model to GPU
model_ft = model_ft.to(device)
# Gather the parameters to be optimized/updated in this run. If we are
# finetuning we will be updating all parameters. However, if we are
# doing feature extract method, we will only update the parameters
# that we have just initialized, i.e. the parameters with requires_grad
# is True.
params_to_update = model_ft.parameters()
print("Params to learn:")
if feature_extract:
params_to_update = []
for name,param in model_ft.named_parameters():
if param.requires_grad == True:
params_to_update.append(param)
print("\t",name)
else:
for name,param in model_ft.named_parameters():
if param.requires_grad == True:
print("\t",name)
# Observe that all parameters are being optimized
optimizer_ft = optim.SGD(params_to_update, lr=0.001, momentum=0.9)
# Setup the loss fxn
criterion = nn.CrossEntropyLoss()
# Train and evaluate
model_ft = train_model(model_ft, dataloaders, dataset_sizes, criterion, optimizer_ft, num_epochs=num_epochs, is_inception=(model_name=="inception"))
save_model(model_ft, 'Models/gan/inception.pt')
def get_inception_score(batch_imgs):
print('Loading Inception Model .......')
model_ft, input_size = initialize_model('inception', 10, False, use_pretrained=False)
load_model(model_ft, 'Models/gan/inception.pt', True)
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model_ft = model_ft.to(device)
print('Inception Model Ready')
preds = []
with torch.no_grad():
for batch in batch_imgs:
batch = batch.to(device)
output = F.softmax(model_ft(batch), dim=1)
preds.append(output.cpu().numpy())
scores = []
for part in preds:
kl = part * (np.log(part) - np.log(np.expand_dims(np.mean(part, 0), 0)))
kl = np.mean(np.sum(kl, 1))
scores.append(np.exp(kl))
return np.mean(scores), np.std(scores) |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:disable */
require('./ImageColor.module.css');
var styles = {
carousel3D: 'carousel3D_36ad6ee7',
container: 'container_36ad6ee7',
row: 'row_36ad6ee7',
listItem: 'listItem_36ad6ee7',
button: 'button_36ad6ee7',
};
exports.default = styles;
/* tslint:enable */
//# sourceMappingURL=ImageColor.module.scss.js.map
|
export default {
html: `
<button>click me now</button>
`,
test({ assert, component, target, window }) {
const button = target.querySelector('button');
const event = new window.Event('click-now');
let clicked;
component.$on('click-now', () => {
clicked = true;
});
button.dispatchEvent(event);
assert.ok(clicked);
}
};
|
/**!
* easyPieChart
* Lightweight plugin to render simple, animated and retina optimized pie charts
*
* @license
* @author Robert Fleischmann <[email protected]> (http://robert-fleischmann.de)
* @version 2.1.6
**/
!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={"barColor":"#ef1e25","trackColor":"#f9f9f9","scaleColor":"#dfe0e0","scaleLength":5,"lineCap":"round","lineWidth":3,"trackWidth":void 0,"size":110,"rotate":0,"animate":{"duration":1e3,"enabled":!0},"easing":function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},"onStart":function(a,b){},"onStep":function(a,b,c){},"onStop":function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={"duration":e.animate,"enabled":!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={"duration":1e3,"enabled":e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
$.blue="#2e7bcc",$.green="#3FB618",$.red="#FF0039",$.yellow="#FFA500",$.orange="#FF7518",$.pink="#E671B8",$.purple="#9954BB",$.black="#333333",function(a,b,c){!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.sparkline&&a(jQuery)}(function(d){"use strict";var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K={},L=0;e=function(){return{"common":{"type":"line","lineColor":"#00f","fillColor":"#cdf","defaultPixelsPerValue":3,"width":"auto","height":"auto","composite":!1,"tagValuesAttribute":"values","tagOptionsPrefix":"spark","enableTagOptions":!1,"enableHighlight":!0,"highlightLighten":1.4,"tooltipSkipNull":!0,"tooltipPrefix":"","tooltipSuffix":"","disableHiddenCheck":!1,"numberFormatter":!1,"numberDigitGroupCount":3,"numberDigitGroupSep":",","numberDecimalMark":".","disableTooltips":!1,"disableInteraction":!1},"line":{"spotColor":"#f80","highlightSpotColor":"#5f5","highlightLineColor":"#f22","spotRadius":1.5,"minSpotColor":"#f80","maxSpotColor":"#f80","lineWidth":1,"normalRangeMin":c,"normalRangeMax":c,"normalRangeColor":"#ccc","drawNormalOnTop":!1,"chartRangeMin":c,"chartRangeMax":c,"chartRangeMinX":c,"chartRangeMaxX":c,"tooltipFormat":new g('<span style="color: {{color}}">●</span> {{prefix}}{{y}}{{suffix}}')},"bar":{"barColor":d.blue,"negBarColor":"#f44","stackedBarColor":[d.blue,d.red,d.yellow,d.green,"#66aa00",d.pink,"#0099c6",d.purple],"zeroColor":c,"nullColor":c,"zeroAxis":!0,"barWidth":4,"barSpacing":1,"chartRangeMax":c,"chartRangeMin":c,"chartRangeClip":!1,"colorMap":c,"tooltipFormat":new g('<span style="color: {{color}}">●</span> {{prefix}}{{value}}{{suffix}}')},"tristate":{"barWidth":4,"barSpacing":1,"posBarColor":"#6f6","negBarColor":"#f44","zeroBarColor":"#999","colorMap":{},"tooltipFormat":new g('<span style="color: {{color}}">●</span> {{value:map}}'),"tooltipValueLookups":{"map":{"-1":"Loss","0":"Draw","1":"Win"}}},"discrete":{"lineHeight":"auto","thresholdColor":c,"thresholdValue":0,"chartRangeMax":c,"chartRangeMin":c,"chartRangeClip":!1,"tooltipFormat":new g("{{prefix}}{{value}}{{suffix}}")},"bullet":{"targetColor":"#f33","targetWidth":3,"performanceColor":"#33f","rangeColors":["#d3dafe","#a8b6ff","#7f94ff"],"base":c,"tooltipFormat":new g("{{fieldkey:fields}} - {{value}}"),"tooltipValueLookups":{"fields":{"r":"Range","p":"Performance","t":"Target"}}},"pie":{"offset":0,"sliceColors":[d.blue,d.red,d.yellow,d.green,"#66aa00",d.pink,"#0099c6",d.purple],"borderWidth":0,"borderColor":"#000","tooltipFormat":new g('<span style="color: {{color}}">●</span> {{value}} ({{percent.1}}%)')},"box":{"raw":!1,"boxLineColor":"#000","boxFillColor":"#cdf","whiskerColor":"#000","outlierLineColor":"#333","outlierFillColor":"#fff","medianColor":"#f00","showOutliers":!0,"outlierIQR":1.5,"spotRadius":1.5,"target":c,"targetColor":"#4a2","chartRangeMax":c,"chartRangeMin":c,"tooltipFormat":new g("{{field:fields}}: {{value}}"),"tooltipFormatFieldlistKey":"field","tooltipValueLookups":{"fields":{"lq":"Lower Quartile","med":"Median","uq":"Upper Quartile","lo":"Left Outlier","ro":"Right Outlier","lw":"Left Whisker","rw":"Right Whisker"}}}}},D='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',f=function(){var a,b;return a=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(a.prototype=d.extend(new arguments[0],arguments[arguments.length-1]),a._super=arguments[0].prototype):a.prototype=arguments[arguments.length-1],arguments.length>2&&(b=Array.prototype.slice.call(arguments,1,-1),b.unshift(a.prototype),d.extend.apply(d,b))):a.prototype=arguments[0],a.prototype.cls=a,a},d.SPFormatClass=g=f({"fre":/\{\{([\w.]+?)(:(.+?))?\}\}/g,"precre":/(\w+)\.(\d+)/,"init":function(a,b){this.format=a,this.fclass=b},"render":function(a,b,d){var e,f,g,h,i,j=this,k=a;return this.format.replace(this.fre,function(){var a;return f=arguments[1],g=arguments[3],e=j.precre.exec(f),e?(i=e[2],f=e[1]):i=!1,h=k[f],h===c?"":g&&b&&b[g]?(a=b[g],a.get?b[g].get(h)||h:b[g][h]||h):(m(h)&&(h=d.get("numberFormatter")?d.get("numberFormatter")(h):r(h,i,d.get("numberDigitGroupCount"),d.get("numberDigitGroupSep"),d.get("numberDecimalMark"))),h)})}}),d.spformat=function(a,b){return new g(a,b)},h=function(a,b,c){return b>a?b:a>c?c:a},i=function(a,c){var d;return 2===c?(d=b.floor(a.length/2),a.length%2?a[d]:(a[d-1]+a[d])/2):a.length%2?(d=(a.length*c+c)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1]):(d=(a.length*c+2)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1])},j=function(a){var b;switch(a){case"undefined":a=c;break;case"null":a=null;break;case"true":a=!0;break;case"false":a=!1;break;default:b=parseFloat(a),a==b&&(a=b)}return a},k=function(a){var b,c=[];for(b=a.length;b--;)c[b]=j(a[b]);return c},l=function(a,b){var c,d,e=[];for(c=0,d=a.length;d>c;c++)a[c]!==b&&e.push(a[c]);return e},m=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},r=function(a,b,c,e,f){var g,h;for(a=(b===!1?parseFloat(a).toString():a.toFixed(b)).split(""),g=(g=d.inArray(".",a))<0?a.length:g,g<a.length&&(a[g]=f),h=g-c;h>0;h-=c)a.splice(h,0,e);return a.join("")},n=function(a,b,c){var d;for(d=b.length;d--;)if((!c||null!==b[d])&&b[d]!==a)return!1;return!0},o=function(a){var b,c=0;for(b=a.length;b--;)c+="number"==typeof a[b]?a[b]:0;return c},q=function(a){return d.isArray(a)?a:[a]},p=function(b){var c;a.createStyleSheet?a.createStyleSheet().cssText=b:(c=a.createElement("style"),c.type="text/css",a.getElementsByTagName("head")[0].appendChild(c),c["string"==typeof a.body.style.WebkitAppearance?"innerText":"innerHTML"]=b)},d.fn.simpledraw=function(b,e,f,g){var h,i;if(f&&(h=this.data("_jqs_vcanvas")))return h;if(d.fn.sparkline.canvas===!1)return!1;if(d.fn.sparkline.canvas===c){var j=a.createElement("canvas");if(j.getContext&&j.getContext("2d"))d.fn.sparkline.canvas=function(a,b,c,d){return new H(a,b,c,d)};else{if(!a.namespaces||a.namespaces.v)return d.fn.sparkline.canvas=!1,!1;a.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),d.fn.sparkline.canvas=function(a,b,c,d){return new I(a,b,c)}}}return b===c&&(b=d(this).innerWidth()),e===c&&(e=d(this).innerHeight()),h=d.fn.sparkline.canvas(b,e,this,g),i=d(this).data("_jqs_mhandler"),i&&i.registerCanvas(h),h},d.fn.cleardraw=function(){var a=this.data("_jqs_vcanvas");a&&a.reset()},d.RangeMapClass=s=f({"init":function(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&"string"==typeof b&&b.indexOf(":")>-1&&(c=b.split(":"),c[0]=0===c[0].length?-(1/0):parseFloat(c[0]),c[1]=0===c[1].length?1/0:parseFloat(c[1]),c[2]=a[b],d.push(c));this.map=a,this.rangelist=d||!1},"get":function(a){var b,d,e,f=this.rangelist;if((e=this.map[a])!==c)return e;if(f)for(b=f.length;b--;)if(d=f[b],d[0]<=a&&d[1]>=a)return d[2];return c}}),d.range_map=function(a){return new s(a)},t=f({"init":function(a,b){var c=d(a);this.$el=c,this.options=b,this.currentPageX=0,this.currentPageY=0,this.el=a,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!b.get("disableTooltips"),this.highlightEnabled=!b.get("disableHighlight")},"registerSparkline":function(a){this.splist.push(a),this.over&&this.updateDisplay()},"registerCanvas":function(a){var b=d(a.canvas);this.canvas=a,this.$canvas=b,b.mouseenter(d.proxy(this.mouseenter,this)),b.mouseleave(d.proxy(this.mouseleave,this)),b.click(d.proxy(this.mouseclick,this))},"reset":function(a){this.splist=[],this.tooltip&&a&&(this.tooltip.remove(),this.tooltip=c)},"mouseclick":function(a){var b=d.Event("sparklineClick");b.originalEvent=a,b.sparklines=this.splist,this.$el.trigger(b)},"mouseenter":function(b){d(a.body).unbind("mousemove.jqs"),d(a.body).bind("mousemove.jqs",d.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=b.pageX,this.currentPageY=b.pageY,this.currentEl=b.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new u(this.options),this.tooltip.updatePosition(b.pageX,b.pageY)),this.updateDisplay()},"mouseleave":function(){d(a.body).unbind("mousemove.jqs");var b,c,e=this.splist,f=e.length,g=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),c=0;f>c;c++)b=e[c],b.clearRegionHighlight()&&(g=!0);g&&this.canvas.render()},"mousemove":function(a){this.currentPageX=a.pageX,this.currentPageY=a.pageY,this.currentEl=a.target,this.tooltip&&this.tooltip.updatePosition(a.pageX,a.pageY),this.updateDisplay()},"updateDisplay":function(){var a,b,c,e,f,g=this.splist,h=g.length,i=!1,j=this.$canvas.offset(),k=this.currentPageX-j.left,l=this.currentPageY-j.top;if(this.over){for(c=0;h>c;c++)b=g[c],e=b.setRegionHighlight(this.currentEl,k,l),e&&(i=!0);if(i){if(f=d.Event("sparklineRegionChange"),f.sparklines=this.splist,this.$el.trigger(f),this.tooltip){for(a="",c=0;h>c;c++)b=g[c],a+=b.getCurrentRegionTooltip();this.tooltip.setContent(a)}this.disableHighlight||this.canvas.render()}null===e&&this.mouseleave()}}}),u=f({"sizeStyle":"position: static !important;display: block !important;visibility: hidden !important;float: left !important;","init":function(b){var c,e=b.get("tooltipClassname","jqstooltip"),f=this.sizeStyle;this.container=b.get("tooltipContainer")||a.body,this.tooltipOffsetX=b.get("tooltipOffsetX",10),this.tooltipOffsetY=b.get("tooltipOffsetY",12),d("#jqssizetip").remove(),d("#jqstooltip").remove(),this.sizetip=d("<div/>",{"id":"jqssizetip","style":f,"class":e}),this.tooltip=d("<div/>",{"id":"jqstooltip","class":e}).appendTo(this.container),c=this.tooltip.offset(),this.offsetLeft=c.left,this.offsetTop=c.top,this.hidden=!0,d(window).unbind("resize.jqs scroll.jqs"),d(window).bind("resize.jqs scroll.jqs",d.proxy(this.updateWindowDims,this)),this.updateWindowDims()},"updateWindowDims":function(){this.scrollTop=d(window).scrollTop(),this.scrollLeft=d(window).scrollLeft(),this.scrollRight=this.scrollLeft+d(window).width(),this.updatePosition()},"getSize":function(a){this.sizetip.html(a).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},"setContent":function(a){return a?(this.getSize(a),this.tooltip.html(a).css({"width":this.width,"height":this.height,"visibility":"visible"}),void(this.hidden&&(this.hidden=!1,this.updatePosition()))):(this.tooltip.css("visibility","hidden"),void(this.hidden=!0))},"updatePosition":function(a,b){if(a===c){if(this.mousex===c)return;a=this.mousex-this.offsetLeft,b=this.mousey-this.offsetTop}else this.mousex=a-=this.offsetLeft,this.mousey=b-=this.offsetTop;this.height&&this.width&&!this.hidden&&(b-=this.height+this.tooltipOffsetY,a+=this.tooltipOffsetX,b<this.scrollTop&&(b=this.scrollTop),a<this.scrollLeft?a=this.scrollLeft:a+this.width>this.scrollRight&&(a=this.scrollRight-this.width),this.tooltip.css({"left":a,"top":b}))},"remove":function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=c,d(window).unbind("resize.jqs scroll.jqs")}}),E=function(){p(D)},d(E),J=[],d.fn.sparkline=function(b,e){return this.each(function(){var f,g,h=new d.fn.sparkline.options(this,e),i=d(this);if(f=function(){var e,f,g,j,k,l,m;return"html"===b||b===c?(m=this.getAttribute(h.get("tagValuesAttribute")),(m===c||null===m)&&(m=i.html()),e=m.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):e=b,f="auto"===h.get("width")?e.length*h.get("defaultPixelsPerValue"):h.get("width"),"auto"===h.get("height")?h.get("composite")&&d.data(this,"_jqs_vcanvas")||(j=a.createElement("span"),j.innerHTML="a",i.html(j),g=d(j).innerHeight()||d(j).height(),d(j).remove(),j=null):g=h.get("height"),h.get("disableInteraction")?k=!1:(k=d.data(this,"_jqs_mhandler"),k?h.get("composite")||k.reset():(k=new t(this,h),d.data(this,"_jqs_mhandler",k))),h.get("composite")&&!d.data(this,"_jqs_vcanvas")?void(d.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),d.data(this,"_jqs_errnotify",!0))):(l=new(d.fn.sparkline[h.get("type")])(this,e,h,f,g),l.render(),void(k&&k.registerSparkline(l)))},d(this).html()&&!h.get("disableHiddenCheck")&&d(this).is(":hidden")||!d(this).parents("body").length){if(!h.get("composite")&&d.data(this,"_jqs_pending"))for(g=J.length;g;g--)J[g-1][0]==this&&J.splice(g-1,1);J.push([this,f]),d.data(this,"_jqs_pending",!0)}else f.call(this)})},d.fn.sparkline.defaults=e(),d.sparkline_display_visible=function(){var a,b,c,e=[];for(b=0,c=J.length;c>b;b++)a=J[b][0],d(a).is(":visible")&&!d(a).parents().is(":hidden")?(J[b][1].call(a),d.data(J[b][0],"_jqs_pending",!1),e.push(b)):d(a).closest("html").length||d.data(a,"_jqs_pending")||(d.data(J[b][0],"_jqs_pending",!1),e.push(b));for(b=e.length;b;b--)J.splice(e[b-1],1)},d.fn.sparkline.options=f({"init":function(a,b){var c,e,f,g;this.userOptions=b=b||{},this.tag=a,this.tagValCache={},e=d.fn.sparkline.defaults,f=e.common,this.tagOptionsPrefix=b.enableTagOptions&&(b.tagOptionsPrefix||f.tagOptionsPrefix),g=this.getTagSetting("type"),c=g===K?e[b.type||f.type]:e[g],this.mergedOptions=d.extend({},f,c,b)},"getTagSetting":function(a){var b,d,e,f,g=this.tagOptionsPrefix;if(g===!1||g===c)return K;if(this.tagValCache.hasOwnProperty(a))b=this.tagValCache.key;else{if(b=this.tag.getAttribute(g+a),b===c||null===b)b=K;else if("["===b.substr(0,1))for(b=b.substr(1,b.length-2).split(","),d=b.length;d--;)b[d]=j(b[d].replace(/(^\s*)|(\s*$)/g,""));else if("{"===b.substr(0,1))for(e=b.substr(1,b.length-2).split(","),b={},d=e.length;d--;)f=e[d].split(":",2),b[f[0].replace(/(^\s*)|(\s*$)/g,"")]=j(f[1].replace(/(^\s*)|(\s*$)/g,""));else b=j(b);this.tagValCache.key=b}return b},"get":function(a,b){var d,e=this.getTagSetting(a);return e!==K?e:(d=this.mergedOptions[a])===c?b:d}}),d.fn.sparkline._base=f({"disabled":!1,"init":function(a,b,e,f,g){this.el=a,this.$el=d(a),this.values=b,this.options=e,this.width=f,this.height=g,this.currentRegion=c},"initTarget":function(){var a=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),a))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},"render":function(){return this.disabled?(this.el.innerHTML="",!1):!0},"getRegion":function(a,b){},"setRegionHighlight":function(a,b,d){var e,f=this.currentRegion,g=!this.options.get("disableHighlight");return b>this.canvasWidth||d>this.canvasHeight||0>b||0>d?null:(e=this.getRegion(a,b,d),f!==e?(f!==c&&g&&this.removeHighlight(),this.currentRegion=e,e!==c&&g&&this.renderHighlight(),!0):!1)},"clearRegionHighlight":function(){return this.currentRegion!==c?(this.removeHighlight(),this.currentRegion=c,!0):!1},"renderHighlight":function(){this.changeHighlight(!0)},"removeHighlight":function(){this.changeHighlight(!1)},"changeHighlight":function(a){},"getCurrentRegionTooltip":function(){var a,b,e,f,h,i,j,k,l,m,n,o,p,q,r=this.options,s="",t=[];if(this.currentRegion===c)return"";if(a=this.getCurrentRegionFields(),n=r.get("tooltipFormatter"))return n(this,r,a);if(r.get("tooltipChartTitle")&&(s+='<div class="jqs jqstitle">'+r.get("tooltipChartTitle")+"</div>\n"),b=this.options.get("tooltipFormat"),!b)return"";if(d.isArray(b)||(b=[b]),d.isArray(a)||(a=[a]),j=this.options.get("tooltipFormatFieldlist"),k=this.options.get("tooltipFormatFieldlistKey"),j&&k){for(l=[],i=a.length;i--;)m=a[i][k],-1!=(q=d.inArray(m,j))&&(l[q]=a[i]);a=l}for(e=b.length,p=a.length,i=0;e>i;i++)for(o=b[i],"string"==typeof o&&(o=new g(o)),f=o.fclass||"jqsfield",q=0;p>q;q++)a[q].isNull&&r.get("tooltipSkipNull")||(d.extend(a[q],{"prefix":r.get("tooltipPrefix"),"suffix":r.get("tooltipSuffix")}),h=o.render(a[q],r.get("tooltipValueLookups"),r),t.push('<div class="'+f+'">'+h+"</div>"));return t.length?s+t.join("\n"):""},"getCurrentRegionFields":function(){},"calcHighlightColor":function(a,c){var d,e,f,g,i=c.get("highlightColor"),j=c.get("highlightLighten");if(i)return i;if(j&&(d=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(a)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(a))){for(f=[],e=4===a.length?16:1,g=0;3>g;g++)f[g]=h(b.round(parseInt(d[g+1],16)*e*j),0,255);return"rgb("+f.join(",")+")"}return a}}),v={"changeHighlight":function(a){var b,c=this.currentRegion,e=this.target,f=this.regionShapes[c];f&&(b=this.renderRegion(c,a),d.isArray(b)||d.isArray(f)?(e.replaceWithShapes(f,b),this.regionShapes[c]=d.map(b,function(a){return a.id})):(e.replaceWithShape(f,b),this.regionShapes[c]=b.id))},"render":function(){var a,b,c,e,f=this.values,g=this.target,h=this.regionShapes;if(this.cls._super.render.call(this)){for(c=f.length;c--;)if(a=this.renderRegion(c))if(d.isArray(a)){for(b=[],e=a.length;e--;)a[e].append(),b.push(a[e].id);h[c]=b}else a.append(),h[c]=a.id;else h[c]=null;g.render()}}},d.fn.sparkline.line=w=f(d.fn.sparkline._base,{"type":"line","init":function(a,b,c,d,e){w._super.init.call(this,a,b,c,d,e),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},"getRegion":function(a,b,d){var e,f=this.regionMap;for(e=f.length;e--;)if(null!==f[e]&&b>=f[e][0]&&b<=f[e][1])return f[e][2];return c},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":null===this.yvalues[a],"x":this.xvalues[a],"y":this.yvalues[a],"color":this.options.get("lineColor"),"fillColor":this.options.get("fillColor"),"offset":a}},"renderHighlight":function(){var a,b,d=this.currentRegion,e=this.target,f=this.vertices[d],g=this.options,h=g.get("spotRadius"),i=g.get("highlightSpotColor"),j=g.get("highlightLineColor");f&&(h&&i&&(a=e.drawCircle(f[0],f[1],h,c,i),this.highlightSpotId=a.id,e.insertAfterShape(this.lastShapeId,a)),j&&(b=e.drawLine(f[0],this.canvasTop,f[0],this.canvasTop+this.canvasHeight,j),this.highlightLineId=b.id,e.insertAfterShape(this.lastShapeId,b)))},"removeHighlight":function(){var a=this.target;this.highlightSpotId&&(a.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(a.removeShapeId(this.highlightLineId),this.highlightLineId=null)},"scanValues":function(){var a,c,d,e,f,g=this.values,h=g.length,i=this.xvalues,j=this.yvalues,k=this.yminmax;for(a=0;h>a;a++)c=g[a],d="string"==typeof g[a],e="object"==typeof g[a]&&g[a]instanceof Array,f=d&&g[a].split(":"),d&&2===f.length?(i.push(Number(f[0])),j.push(Number(f[1])),k.push(Number(f[1]))):e?(i.push(c[0]),j.push(c[1]),k.push(c[1])):(i.push(a),null===g[a]||"null"===g[a]?j.push(null):(j.push(Number(c)),k.push(Number(c))));this.options.get("xvalues")&&(i=this.options.get("xvalues")),this.maxy=this.maxyorg=b.max.apply(b,k),this.miny=this.minyorg=b.min.apply(b,k),this.maxx=b.max.apply(b,i),this.minx=b.min.apply(b,i),this.xvalues=i,this.yvalues=j,this.yminmax=k},"processRangeOptions":function(){var a=this.options,b=a.get("normalRangeMin"),d=a.get("normalRangeMax");b!==c&&(b<this.miny&&(this.miny=b),d>this.maxy&&(this.maxy=d)),a.get("chartRangeMin")!==c&&(a.get("chartRangeClip")||a.get("chartRangeMin")<this.miny)&&(this.miny=a.get("chartRangeMin")),a.get("chartRangeMax")!==c&&(a.get("chartRangeClip")||a.get("chartRangeMax")>this.maxy)&&(this.maxy=a.get("chartRangeMax")),a.get("chartRangeMinX")!==c&&(a.get("chartRangeClipX")||a.get("chartRangeMinX")<this.minx)&&(this.minx=a.get("chartRangeMinX")),a.get("chartRangeMaxX")!==c&&(a.get("chartRangeClipX")||a.get("chartRangeMaxX")>this.maxx)&&(this.maxx=a.get("chartRangeMaxX"))},"drawNormalRange":function(a,d,e,f,g){var h=this.options.get("normalRangeMin"),i=this.options.get("normalRangeMax"),j=d+b.round(e-e*((i-this.miny)/g)),k=b.round(e*(i-h)/g);this.target.drawRect(a,j,f,k,c,this.options.get("normalRangeColor")).append()},"render":function(){var a,e,f,g,h,i,j,k,l,m,n,o,p,q,r,t,u,v,x,y,z,A,B,C,D,E=this.options,F=this.target,G=this.canvasWidth,H=this.canvasHeight,I=this.vertices,J=E.get("spotRadius"),K=this.regionMap;if(w._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),B=this.xvalues,C=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(g=h=0,a=this.maxx-this.minx===0?1:this.maxx-this.minx,e=this.maxy-this.miny===0?1:this.maxy-this.miny,f=this.yvalues.length-1,J&&(4*J>G||4*J>H)&&(J=0),J&&(z=E.get("highlightSpotColor")&&!E.get("disableInteraction"),(z||E.get("minSpotColor")||E.get("spotColor")&&C[f]===this.miny)&&(H-=b.ceil(J)),(z||E.get("maxSpotColor")||E.get("spotColor")&&C[f]===this.maxy)&&(H-=b.ceil(J),g+=b.ceil(J)),(z||(E.get("minSpotColor")||E.get("maxSpotColor"))&&(C[0]===this.miny||C[0]===this.maxy))&&(h+=b.ceil(J),G-=b.ceil(J)),(z||E.get("spotColor")||E.get("minSpotColor")||E.get("maxSpotColor")&&(C[f]===this.miny||C[f]===this.maxy))&&(G-=b.ceil(J))),H--,E.get("normalRangeMin")===c||E.get("drawNormalOnTop")||this.drawNormalRange(h,g,H,G,e),j=[],k=[j],q=r=null,t=C.length,D=0;t>D;D++)l=B[D],n=B[D+1],m=C[D],o=h+b.round((l-this.minx)*(G/a)),p=t-1>D?h+b.round((n-this.minx)*(G/a)):G,r=o+(p-o)/2,K[D]=[q||0,r,D],q=r,null===m?D&&(null!==C[D-1]&&(j=[],k.push(j)),I.push(null)):(m<this.miny&&(m=this.miny),m>this.maxy&&(m=this.maxy),j.length||j.push([o,g+H]),i=[o,g+b.round(H-H*((m-this.miny)/e))],j.push(i),I.push(i));for(u=[],v=[],x=k.length,D=0;x>D;D++)j=k[D],j.length&&(E.get("fillColor")&&(j.push([j[j.length-1][0],g+H]),v.push(j.slice(0)),j.pop()),j.length>2&&(j[0]=[j[0][0],j[1][1]]),u.push(j));for(x=v.length,D=0;x>D;D++)F.drawShape(v[D],E.get("fillColor"),E.get("fillColor")).append();for(E.get("normalRangeMin")!==c&&E.get("drawNormalOnTop")&&this.drawNormalRange(h,g,H,G,e),x=u.length,D=0;x>D;D++)F.drawShape(u[D],E.get("lineColor"),c,E.get("lineWidth")).append();if(J&&E.get("valueSpots"))for(y=E.get("valueSpots"),y.get===c&&(y=new s(y)),D=0;t>D;D++)A=y.get(C[D]),A&&F.drawCircle(h+b.round((B[D]-this.minx)*(G/a)),g+b.round(H-H*((C[D]-this.miny)/e)),J,c,A).append();J&&E.get("spotColor")&&null!==C[f]&&F.drawCircle(h+b.round((B[B.length-1]-this.minx)*(G/a)),g+b.round(H-H*((C[f]-this.miny)/e)),J,c,E.get("spotColor")).append(),this.maxy!==this.minyorg&&(J&&E.get("minSpotColor")&&(l=B[d.inArray(this.minyorg,C)],F.drawCircle(h+b.round((l-this.minx)*(G/a)),g+b.round(H-H*((this.minyorg-this.miny)/e)),J,c,E.get("minSpotColor")).append()),J&&E.get("maxSpotColor")&&(l=B[d.inArray(this.maxyorg,C)],F.drawCircle(h+b.round((l-this.minx)*(G/a)),g+b.round(H-H*((this.maxyorg-this.miny)/e)),J,c,E.get("maxSpotColor")).append())),this.lastShapeId=F.getLastShapeId(),this.canvasTop=g,F.render()}}}),d.fn.sparkline.bar=x=f(d.fn.sparkline._base,v,{"type":"bar","init":function(a,e,f,g,i){var m,n,o,p,q,r,t,u,v,w,y,z,A,B,C,D,E,F,G,H,I,J,K=parseInt(f.get("barWidth"),10),L=parseInt(f.get("barSpacing"),10),M=f.get("chartRangeMin"),N=f.get("chartRangeMax"),O=f.get("chartRangeClip"),P=1/0,Q=-(1/0);for(x._super.init.call(this,a,e,f,g,i),r=0,t=e.length;t>r;r++)H=e[r],m="string"==typeof H&&H.indexOf(":")>-1,(m||d.isArray(H))&&(C=!0,m&&(H=e[r]=k(H.split(":"))),H=l(H,null),n=b.min.apply(b,H),o=b.max.apply(b,H),P>n&&(P=n),o>Q&&(Q=o));this.stacked=C,this.regionShapes={},this.barWidth=K,this.barSpacing=L,this.totalBarWidth=K+L,this.width=g=e.length*K+(e.length-1)*L,this.initTarget(),O&&(A=M===c?-(1/0):M,B=N===c?1/0:N),q=[],p=C?[]:q;var R=[],S=[];for(r=0,t=e.length;t>r;r++)if(C)for(D=e[r],e[r]=G=[],R[r]=0,p[r]=S[r]=0,E=0,F=D.length;F>E;E++)H=G[E]=O?h(D[E],A,B):D[E],null!==H&&(H>0&&(R[r]+=H),0>P&&Q>0?0>H?S[r]+=b.abs(H):p[r]+=H:p[r]+=b.abs(H-(0>H?Q:P)),q.push(H));else H=O?h(e[r],A,B):e[r],H=e[r]=j(H),null!==H&&q.push(H);this.max=z=b.max.apply(b,q),this.min=y=b.min.apply(b,q),this.stackMax=Q=C?b.max.apply(b,R):z,this.stackMin=P=C?b.min.apply(b,q):y,f.get("chartRangeMin")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMin")<y)&&(y=f.get("chartRangeMin")),f.get("chartRangeMax")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMax")>z)&&(z=f.get("chartRangeMax")),this.zeroAxis=v=f.get("zeroAxis",!0),w=0>=y&&z>=0&&v?0:0==v?y:y>0?y:z,this.xaxisOffset=w,u=C?b.max.apply(b,p)+b.max.apply(b,S):z-y,this.canvasHeightEf=v&&0>y?this.canvasHeight-2:this.canvasHeight-1,w>y?(J=C&&z>=0?Q:z,I=(J-w)/u*this.canvasHeight,I!==b.ceil(I)&&(this.canvasHeightEf-=2,I=b.ceil(I))):I=this.canvasHeight,this.yoffset=I,d.isArray(f.get("colorMap"))?(this.colorMapByIndex=f.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=f.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===c&&(this.colorMapByValue=new s(this.colorMapByValue))),this.range=u},"getRegion":function(a,d,e){var f=b.floor(d/this.totalBarWidth);return 0>f||f>=this.values.length?c:f},"getCurrentRegionFields":function(){var a,b,c=this.currentRegion,d=q(this.values[c]),e=[];for(b=d.length;b--;)a=d[b],e.push({"isNull":null===a,"value":a,"color":this.calcColor(b,a,c),"offset":c});return e},"calcColor":function(a,b,e){var f,g,h=this.colorMapByIndex,i=this.colorMapByValue,j=this.options;return f=this.stacked?j.get("stackedBarColor"):0>b?j.get("negBarColor"):j.get("barColor"),0===b&&j.get("zeroColor")!==c&&(f=j.get("zeroColor")),i&&(g=i.get(b))?f=g:h&&h.length>e&&(f=h[e]),d.isArray(f)?f[a%f.length]:f},"renderRegion":function(a,e){var f,g,h,i,j,k,l,m,o,p,q=this.values[a],r=this.options,s=this.xaxisOffset,t=[],u=this.range,v=this.stacked,w=this.target,x=a*this.totalBarWidth,y=this.canvasHeightEf,z=this.yoffset;if(q=d.isArray(q)?q:[q],l=q.length,m=q[0],i=n(null,q),p=n(s,q,!0),i)return r.get("nullColor")?(h=e?r.get("nullColor"):this.calcHighlightColor(r.get("nullColor"),r),f=z>0?z-1:z,w.drawRect(x,f,this.barWidth-1,0,h,h)):c;for(j=z,k=0;l>k;k++){if(m=q[k],v&&m===s){if(!p||o)continue;o=!0}g=u>0?b.floor(y*(b.abs(m-s)/u))+1:1,s>m||m===s&&0===z?(f=j,j+=g):(f=z-g,z-=g),h=this.calcColor(k,m,a),e&&(h=this.calcHighlightColor(h,r)),t.push(w.drawRect(x,f,this.barWidth-1,g-1,h,h))}return 1===t.length?t[0]:t}}),d.fn.sparkline.tristate=y=f(d.fn.sparkline._base,v,{"type":"tristate","init":function(a,b,e,f,g){var h=parseInt(e.get("barWidth"),10),i=parseInt(e.get("barSpacing"),10);y._super.init.call(this,a,b,e,f,g),this.regionShapes={},this.barWidth=h,this.barSpacing=i,this.totalBarWidth=h+i,this.values=d.map(b,Number),this.width=f=b.length*h+(b.length-1)*i,d.isArray(e.get("colorMap"))?(this.colorMapByIndex=e.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=e.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===c&&(this.colorMapByValue=new s(this.colorMapByValue))),this.initTarget()},"getRegion":function(a,c,d){return b.floor(c/this.totalBarWidth)},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":this.values[a]===c,"value":this.values[a],"color":this.calcColor(this.values[a],a),"offset":a}},"calcColor":function(a,b){var c,d,e=this.values,f=this.options,g=this.colorMapByIndex,h=this.colorMapByValue;return c=h&&(d=h.get(a))?d:g&&g.length>b?g[b]:e[b]<0?f.get("negBarColor"):e[b]>0?f.get("posBarColor"):f.get("zeroBarColor")},"renderRegion":function(a,c){var d,e,f,g,h,i,j=this.values,k=this.options,l=this.target;return d=l.pixelHeight,f=b.round(d/2),g=a*this.totalBarWidth,j[a]<0?(h=f,e=f-1):j[a]>0?(h=0,e=f-1):(h=f-1,e=2),i=this.calcColor(j[a],a),null!==i?(c&&(i=this.calcHighlightColor(i,k)),l.drawRect(g,h,this.barWidth-1,e-1,i,i)):void 0}}),d.fn.sparkline.discrete=z=f(d.fn.sparkline._base,v,{"type":"discrete","init":function(a,e,f,g,h){z._super.init.call(this,a,e,f,g,h),this.regionShapes={},this.values=e=d.map(e,Number),this.min=b.min.apply(b,e),this.max=b.max.apply(b,e),this.range=this.max-this.min,this.width=g="auto"===f.get("width")?2*e.length:this.width,this.interval=b.floor(g/e.length),this.itemWidth=g/e.length,f.get("chartRangeMin")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMin")<this.min)&&(this.min=f.get("chartRangeMin")),f.get("chartRangeMax")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMax")>this.max)&&(this.max=f.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===f.get("lineHeight")?b.round(.3*this.canvasHeight):f.get("lineHeight"))},"getRegion":function(a,c,d){return b.floor(c/this.itemWidth)},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":this.values[a]===c,"value":this.values[a],"offset":a}},"renderRegion":function(a,c){var d,e,f,g,i=this.values,j=this.options,k=this.min,l=this.max,m=this.range,n=this.interval,o=this.target,p=this.canvasHeight,q=this.lineHeight,r=p-q;return e=h(i[a],k,l),g=a*n,d=b.round(r-r*((e-k)/m)),f=j.get("thresholdColor")&&e<j.get("thresholdValue")?j.get("thresholdColor"):j.get("lineColor"),c&&(f=this.calcHighlightColor(f,j)),o.drawLine(g,d,g,d+q,f)}}),d.fn.sparkline.bullet=A=f(d.fn.sparkline._base,{"type":"bullet","init":function(a,d,e,f,g){var h,i,j;A._super.init.call(this,a,d,e,f,g),this.values=d=k(d),j=d.slice(),j[0]=null===j[0]?j[2]:j[0],j[1]=null===d[1]?j[2]:j[1],h=b.min.apply(b,d),i=b.max.apply(b,d),h=e.get("base")===c?0>h?h:0:e.get("base"),this.min=h,this.max=i,this.range=i-h,this.shapes={},this.valueShapes={},this.regiondata={},this.width=f="auto"===e.get("width")?"4.0em":f,this.target=this.$el.simpledraw(f,g,e.get("composite")),d.length||(this.disabled=!0),this.initTarget()},"getRegion":function(a,b,d){var e=this.target.getShapeAt(a,b,d);return e!==c&&this.shapes[e]!==c?this.shapes[e]:c},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"fieldkey":a.substr(0,1),"value":this.values[a.substr(1)],"region":a}},"changeHighlight":function(a){var b,c=this.currentRegion,d=this.valueShapes[c];switch(delete this.shapes[d],c.substr(0,1)){case"r":b=this.renderRange(c.substr(1),a);break;case"p":b=this.renderPerformance(a);break;case"t":b=this.renderTarget(a)}this.valueShapes[c]=b.id,this.shapes[b.id]=c,this.target.replaceWithShape(d,b)},"renderRange":function(a,c){var d=this.values[a],e=b.round(this.canvasWidth*((d-this.min)/this.range)),f=this.options.get("rangeColors")[a-2];return c&&(f=this.calcHighlightColor(f,this.options)),this.target.drawRect(0,0,e-1,this.canvasHeight-1,f,f)},"renderPerformance":function(a){var c=this.values[1],d=b.round(this.canvasWidth*((c-this.min)/this.range)),e=this.options.get("performanceColor");return a&&(e=this.calcHighlightColor(e,this.options)),this.target.drawRect(0,b.round(.3*this.canvasHeight),d-1,b.round(.4*this.canvasHeight)-1,e,e)},"renderTarget":function(a){var c=this.values[0],d=b.round(this.canvasWidth*((c-this.min)/this.range)-this.options.get("targetWidth")/2),e=b.round(.1*this.canvasHeight),f=this.canvasHeight-2*e,g=this.options.get("targetColor");return a&&(g=this.calcHighlightColor(g,this.options)),this.target.drawRect(d,e,this.options.get("targetWidth")-1,f-1,g,g)},"render":function(){var a,b,c=this.values.length,d=this.target;if(A._super.render.call(this)){for(a=2;c>a;a++)b=this.renderRange(a).append(),this.shapes[b.id]="r"+a,this.valueShapes["r"+a]=b.id;null!==this.values[1]&&(b=this.renderPerformance().append(),this.shapes[b.id]="p1",this.valueShapes.p1=b.id),null!==this.values[0]&&(b=this.renderTarget().append(),this.shapes[b.id]="t0",this.valueShapes.t0=b.id),d.render()}}}),d.fn.sparkline.pie=B=f(d.fn.sparkline._base,{"type":"pie","init":function(a,c,e,f,g){var h,i=0;if(B._super.init.call(this,a,c,e,f,g),this.shapes={},this.valueShapes={},this.values=c=d.map(c,Number),"auto"===e.get("width")&&(this.width=this.height),c.length>0)for(h=c.length;h--;)i+=c[h];this.total=i,this.initTarget(),this.radius=b.floor(b.min(this.canvasWidth,this.canvasHeight)/2)},"getRegion":function(a,b,d){var e=this.target.getShapeAt(a,b,d);return e!==c&&this.shapes[e]!==c?this.shapes[e]:c},"getCurrentRegionFields":function(){var a=this.currentRegion;return{"isNull":this.values[a]===c,"value":this.values[a],"percent":this.values[a]/this.total*100,"color":this.options.get("sliceColors")[a%this.options.get("sliceColors").length],"offset":a}},"changeHighlight":function(a){var b=this.currentRegion,c=this.renderSlice(b,a),d=this.valueShapes[b];
delete this.shapes[d],this.target.replaceWithShape(d,c),this.valueShapes[b]=c.id,this.shapes[c.id]=b},"renderSlice":function(a,d){var e,f,g,h,i,j=this.target,k=this.options,l=this.radius,m=k.get("borderWidth"),n=k.get("offset"),o=2*b.PI,p=this.values,q=this.total,r=n?2*b.PI*(n/360):0;for(h=p.length,g=0;h>g;g++){if(e=r,f=r,q>0&&(f=r+o*(p[g]/q)),a===g)return i=k.get("sliceColors")[g%k.get("sliceColors").length],d&&(i=this.calcHighlightColor(i,k)),j.drawPieSlice(l,l,l-m,e,f,c,i);r=f}},"render":function(){var a,d,e=this.target,f=this.values,g=this.options,h=this.radius,i=g.get("borderWidth");if(B._super.render.call(this)){for(i&&e.drawCircle(h,h,b.floor(h-i/2),g.get("borderColor"),c,i).append(),d=f.length;d--;)f[d]&&(a=this.renderSlice(d).append(),this.valueShapes[d]=a.id,this.shapes[a.id]=d);e.render()}}}),d.fn.sparkline.box=C=f(d.fn.sparkline._base,{"type":"box","init":function(a,b,c,e,f){C._super.init.call(this,a,b,c,e,f),this.values=d.map(b,Number),this.width="auto"===c.get("width")?"4.0em":e,this.initTarget(),this.values.length||(this.disabled=1)},"getRegion":function(){return 1},"getCurrentRegionFields":function(){var a=[{"field":"lq","value":this.quartiles[0]},{"field":"med","value":this.quartiles[1]},{"field":"uq","value":this.quartiles[2]}];return this.loutlier!==c&&a.push({"field":"lo","value":this.loutlier}),this.routlier!==c&&a.push({"field":"ro","value":this.routlier}),this.lwhisker!==c&&a.push({"field":"lw","value":this.lwhisker}),this.rwhisker!==c&&a.push({"field":"rw","value":this.rwhisker}),a},"render":function(){var a,d,e,f,g,h,j,k,l,m,n,o=this.target,p=this.values,q=p.length,r=this.options,s=this.canvasWidth,t=this.canvasHeight,u=r.get("chartRangeMin")===c?b.min.apply(b,p):r.get("chartRangeMin"),v=r.get("chartRangeMax")===c?b.max.apply(b,p):r.get("chartRangeMax"),w=0;if(C._super.render.call(this)){if(r.get("raw"))r.get("showOutliers")&&p.length>5?(d=p[0],a=p[1],f=p[2],g=p[3],h=p[4],j=p[5],k=p[6]):(a=p[0],f=p[1],g=p[2],h=p[3],j=p[4]);else if(p.sort(function(a,b){return a-b}),f=i(p,1),g=i(p,2),h=i(p,3),e=h-f,r.get("showOutliers")){for(a=j=c,l=0;q>l;l++)a===c&&p[l]>f-e*r.get("outlierIQR")&&(a=p[l]),p[l]<h+e*r.get("outlierIQR")&&(j=p[l]);d=p[0],k=p[q-1]}else a=p[0],j=p[q-1];this.quartiles=[f,g,h],this.lwhisker=a,this.rwhisker=j,this.loutlier=d,this.routlier=k,n=s/(v-u+1),r.get("showOutliers")&&(w=b.ceil(r.get("spotRadius")),s-=2*b.ceil(r.get("spotRadius")),n=s/(v-u+1),a>d&&o.drawCircle((d-u)*n+w,t/2,r.get("spotRadius"),r.get("outlierLineColor"),r.get("outlierFillColor")).append(),k>j&&o.drawCircle((k-u)*n+w,t/2,r.get("spotRadius"),r.get("outlierLineColor"),r.get("outlierFillColor")).append()),o.drawRect(b.round((f-u)*n+w),b.round(.1*t),b.round((h-f)*n),b.round(.8*t),r.get("boxLineColor"),r.get("boxFillColor")).append(),o.drawLine(b.round((a-u)*n+w),b.round(t/2),b.round((f-u)*n+w),b.round(t/2),r.get("lineColor")).append(),o.drawLine(b.round((a-u)*n+w),b.round(t/4),b.round((a-u)*n+w),b.round(t-t/4),r.get("whiskerColor")).append(),o.drawLine(b.round((j-u)*n+w),b.round(t/2),b.round((h-u)*n+w),b.round(t/2),r.get("lineColor")).append(),o.drawLine(b.round((j-u)*n+w),b.round(t/4),b.round((j-u)*n+w),b.round(t-t/4),r.get("whiskerColor")).append(),o.drawLine(b.round((g-u)*n+w),b.round(.1*t),b.round((g-u)*n+w),b.round(.9*t),r.get("medianColor")).append(),r.get("target")&&(m=b.ceil(r.get("spotRadius")),o.drawLine(b.round((r.get("target")-u)*n+w),b.round(t/2-m),b.round((r.get("target")-u)*n+w),b.round(t/2+m),r.get("targetColor")).append(),o.drawLine(b.round((r.get("target")-u)*n+w-m),b.round(t/2),b.round((r.get("target")-u)*n+w+m),b.round(t/2),r.get("targetColor")).append()),o.render()}}}),F=f({"init":function(a,b,c,d){this.target=a,this.id=b,this.type=c,this.args=d},"append":function(){return this.target.appendShape(this),this}}),G=f({"_pxregex":/(\d+)(px)?\s*$/i,"init":function(a,b,c){a&&(this.width=a,this.height=b,this.target=c,this.lastShapeId=null,c[0]&&(c=c[0]),d.data(c,"_jqs_vcanvas",this))},"drawLine":function(a,b,c,d,e,f){return this.drawShape([[a,b],[c,d]],e,f)},"drawShape":function(a,b,c,d){return this._genShape("Shape",[a,b,c,d])},"drawCircle":function(a,b,c,d,e,f){return this._genShape("Circle",[a,b,c,d,e,f])},"drawPieSlice":function(a,b,c,d,e,f,g){return this._genShape("PieSlice",[a,b,c,d,e,f,g])},"drawRect":function(a,b,c,d,e,f){return this._genShape("Rect",[a,b,c,d,e,f])},"getElement":function(){return this.canvas},"getLastShapeId":function(){return this.lastShapeId},"reset":function(){alert("reset not implemented")},"_insert":function(a,b){d(b).html(a)},"_calculatePixelDims":function(a,b,c){var e;e=this._pxregex.exec(b),e?this.pixelHeight=e[1]:this.pixelHeight=d(c).height(),e=this._pxregex.exec(a),e?this.pixelWidth=e[1]:this.pixelWidth=d(c).width()},"_genShape":function(a,b){var c=L++;return b.unshift(c),new F(this,c,a,b)},"appendShape":function(a){alert("appendShape not implemented")},"replaceWithShape":function(a,b){alert("replaceWithShape not implemented")},"insertAfterShape":function(a,b){alert("insertAfterShape not implemented")},"removeShapeId":function(a){alert("removeShapeId not implemented")},"getShapeAt":function(a,b,c){alert("getShapeAt not implemented")},"render":function(){alert("render not implemented")}}),H=f(G,{"init":function(b,e,f,g){H._super.init.call(this,b,e,f),this.canvas=a.createElement("canvas"),f[0]&&(f=f[0]),d.data(f,"_jqs_vcanvas",this),d(this.canvas).css({"display":"inline-block","width":b,"height":e,"verticalAlign":"top"}),this._insert(this.canvas,f),this._calculatePixelDims(b,e,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=g,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=c,d(this.canvas).css({"width":this.pixelWidth,"height":this.pixelHeight})},"_getContext":function(a,b,d){var e=this.canvas.getContext("2d");return a!==c&&(e.strokeStyle=a),e.lineWidth=d===c?1:d,b!==c&&(e.fillStyle=b),e},"reset":function(){var a=this._getContext();a.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=c},"_drawShape":function(a,b,d,e,f){var g,h,i=this._getContext(d,e,f);for(i.beginPath(),i.moveTo(b[0][0]+.5,b[0][1]+.5),g=1,h=b.length;h>g;g++)i.lineTo(b[g][0]+.5,b[g][1]+.5);d!==c&&i.stroke(),e!==c&&i.fill(),this.targetX!==c&&this.targetY!==c&&i.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},"_drawCircle":function(a,d,e,f,g,h,i){var j=this._getContext(g,h,i);j.beginPath(),j.arc(d,e,f,0,2*b.PI,!1),this.targetX!==c&&this.targetY!==c&&j.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a),g!==c&&j.stroke(),h!==c&&j.fill()},"_drawPieSlice":function(a,b,d,e,f,g,h,i){var j=this._getContext(h,i);j.beginPath(),j.moveTo(b,d),j.arc(b,d,e,f,g,!1),j.lineTo(b,d),j.closePath(),h!==c&&j.stroke(),i&&j.fill(),this.targetX!==c&&this.targetY!==c&&j.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},"_drawRect":function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b+d,c],[b+d,c+e],[b,c+e],[b,c]],f,g)},"appendShape":function(a){return this.shapes[a.id]=a,this.shapeseq.push(a.id),this.lastShapeId=a.id,a.id},"replaceWithShape":function(a,b){var c,d=this.shapeseq;for(this.shapes[b.id]=b,c=d.length;c--;)d[c]==a&&(d[c]=b.id);delete this.shapes[a]},"replaceWithShapes":function(a,b){var c,d,e,f=this.shapeseq,g={};for(d=a.length;d--;)g[a[d]]=!0;for(d=f.length;d--;)c=f[d],g[c]&&(f.splice(d,1),delete this.shapes[c],e=d);for(d=b.length;d--;)f.splice(e,0,b[d].id),this.shapes[b[d].id]=b[d]},"insertAfterShape":function(a,b){var c,d=this.shapeseq;for(c=d.length;c--;)if(d[c]===a)return d.splice(c+1,0,b.id),void(this.shapes[b.id]=b)},"removeShapeId":function(a){var b,c=this.shapeseq;for(b=c.length;b--;)if(c[b]===a){c.splice(b,1);break}delete this.shapes[a]},"getShapeAt":function(a,b,c){return this.targetX=b,this.targetY=c,this.render(),this.currentTargetShapeId},"render":function(){var a,b,c,d=this.shapeseq,e=this.shapes,f=d.length,g=this._getContext();for(g.clearRect(0,0,this.pixelWidth,this.pixelHeight),c=0;f>c;c++)a=d[c],b=e[a],this["_draw"+b.type].apply(this,b.args);this.interact||(this.shapes={},this.shapeseq=[])}}),I=f(G,{"init":function(b,c,e){var f;I._super.init.call(this,b,c,e),e[0]&&(e=e[0]),d.data(e,"_jqs_vcanvas",this),this.canvas=a.createElement("span"),d(this.canvas).css({"display":"inline-block","position":"relative","overflow":"hidden","width":b,"height":c,"margin":"0px","padding":"0px","verticalAlign":"top"}),this._insert(this.canvas,e),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,f='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",f),this.group=d(this.canvas).children()[0],this.rendered=!1,this.prerender=""},"_drawShape":function(a,b,d,e,f){var g,h,i,j,k,l,m,n=[];for(m=0,l=b.length;l>m;m++)n[m]=""+b[m][0]+","+b[m][1];return g=n.splice(0,1),f=f===c?1:f,h=d===c?' stroked="false" ':' strokeWeight="'+f+'px" strokeColor="'+d+'" ',i=e===c?' filled="false"':' fillColor="'+e+'" filled="true" ',j=n[0]===n[n.length-1]?"x ":"",k='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+a+'" '+h+i+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+g+" l "+n.join(", ")+" "+j+'e"> </v:shape>'},"_drawCircle":function(a,b,d,e,f,g,h){var i,j,k;return b-=e,d-=e,i=f===c?' stroked="false" ':' strokeWeight="'+h+'px" strokeColor="'+f+'" ',j=g===c?' filled="false"':' fillColor="'+g+'" filled="true" ',k='<v:oval id="jqsshape'+a+'" '+i+j+' style="position:absolute;top:'+d+"px; left:"+b+"px; width:"+2*e+"px; height:"+2*e+'px"></v:oval>'},"_drawPieSlice":function(a,d,e,f,g,h,i,j){var k,l,m,n,o,p,q,r;if(g===h)return"";if(h-g===2*b.PI&&(g=0,h=2*b.PI),l=d+b.round(b.cos(g)*f),m=e+b.round(b.sin(g)*f),n=d+b.round(b.cos(h)*f),o=e+b.round(b.sin(h)*f),l===n&&m===o){if(h-g<b.PI)return"";l=n=d+f,m=o=e}return l===n&&m===o&&h-g<b.PI?"":(k=[d-f,e-f,d+f,e+f,l,m,n,o],p=i===c?' stroked="false" ':' strokeWeight="1px" strokeColor="'+i+'" ',q=j===c?' filled="false"':' fillColor="'+j+'" filled="true" ',r='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" id="jqsshape'+a+'" '+p+q+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" path="m '+d+","+e+" wa "+k.join(", ")+' x e"> </v:shape>')},"_drawRect":function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b,c+e],[b+d,c+e],[b+d,c],[b,c]],f,g)},"reset":function(){this.group.innerHTML=""},"appendShape":function(a){var b=this["_draw"+a.type].apply(this,a.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",b):this.prerender+=b,this.lastShapeId=a.id,a.id},"replaceWithShape":function(a,b){var c=d("#jqsshape"+a),e=this["_draw"+b.type].apply(this,b.args);c[0].outerHTML=e},"replaceWithShapes":function(a,b){var c,e=d("#jqsshape"+a[0]),f="",g=b.length;for(c=0;g>c;c++)f+=this["_draw"+b[c].type].apply(this,b[c].args);for(e[0].outerHTML=f,c=1;c<a.length;c++)d("#jqsshape"+a[c]).remove()},"insertAfterShape":function(a,b){var c=d("#jqsshape"+a),e=this["_draw"+b.type].apply(this,b.args);c[0].insertAdjacentHTML("afterEnd",e)},"removeShapeId":function(a){var b=d("#jqsshape"+a);this.group.removeChild(b[0])},"getShapeAt":function(a,b,c){var d=a.id.substr(8);return d},"render":function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math);
(function(){var a,b,c,d,e=[].slice,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},h=function(a,b){return function(){return a.apply(b,arguments)}},i=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=window.Morris={},a=jQuery,b.EventEmitter=function(){function a(){}return a.prototype.on=function(a,b){return null==this.handlers&&(this.handlers={}),null==this.handlers[a]&&(this.handlers[a]=[]),this.handlers[a].push(b)},a.prototype.fire=function(){var a,b,c,d,f,g,h;if(c=arguments[0],a=2<=arguments.length?e.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[c]){for(g=this.handlers[c],h=[],d=0,f=g.length;f>d;d++)b=g[d],h.push(b.apply(null,a));return h}},a}(),b.commas=function(a){var b,c,d,e;return null!=a?(d=0>a?"-":"",b=Math.abs(a),c=Math.floor(b).toFixed(0),d+=c.replace(/(?=(?:\d{3})+$)(?!^)/g,","),e=b.toString(),e.length>c.length&&(d+=e.slice(c.length)),d):"-"},b.pad2=function(a){return(10>a?"0":"")+a},b.Grid=function(c){function d(b){var c=this;if("string"==typeof b.element?this.el=a(document.getElementById(b.element)):this.el=a(b.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=a.extend({},this.gridDefaults,this.defaults||{},b),"string"==typeof this.options.units&&(this.options.postUnits=b.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(a){var b;return b=c.el.offset(),c.fire("hovermove",a.pageX-b.left,a.pageY-b.top)}),this.el.bind("mouseout",function(a){return c.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(a){var b,d;return d=a.originalEvent.touches[0]||a.originalEvent.changedTouches[0],b=c.el.offset(),c.fire("hover",d.pageX-b.left,d.pageY-b.top),d}),this.postInit&&this.postInit()}return g(d,c),d.prototype.gridDefaults={"dateFormat":null,"axes":!0,"grid":!0,"gridLineColor":"#aaa","gridStrokeWidth":.5,"gridTextColor":"#888","gridTextSize":12,"hideHover":!1,"yLabelFormat":null,"numLines":5,"padding":25,"parseTime":!0,"postUnits":"","preUnits":"","ymax":"auto","ymin":"auto 0","goals":[],"goalStrokeWidth":1,"goalLineColors":["#666633","#999966","#cc6666","#663333"],"events":[],"eventStrokeWidth":1,"eventLineColors":["#005a04","#ccffbb","#3a5f0b","#005502"]},d.prototype.setData=function(a,c){var d,e,f,g,h,i,j,k,l,m,n,o;return null==c&&(c=!0),null==a||0===a.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(m=this.cumulative?0:null,n=this.cumulative?0:null,this.options.goals.length>0&&(h=Math.min.apply(null,this.options.goals),g=Math.max.apply(null,this.options.goals),n=null!=n?Math.min(n,h):h,m=null!=m?Math.max(m,g):g),this.data=function(){var c,d,g;for(g=[],f=c=0,d=a.length;d>c;f=++c)j=a[f],i={},i.label=j[this.options.xkey],this.options.parseTime?(i.x=b.parseDate(i.label),this.options.dateFormat?i.label=this.options.dateFormat(i.x):"number"==typeof i.label&&(i.label=new Date(i.label).toString())):i.x=f,k=0,i.y=function(){var a,b,c,d;for(c=this.options.ykeys,d=[],e=a=0,b=c.length;b>a;e=++a)l=c[e],o=j[l],"string"==typeof o&&(o=parseFloat(o)),null!=o&&"number"!=typeof o&&(o=null),null!=o&&(this.cumulative?k+=o:null!=m?(m=Math.max(o,m),n=Math.min(o,n)):m=n=o),this.cumulative&&null!=k&&(m=Math.max(k,m),n=Math.min(k,n)),d.push(o);return d}.call(this),g.push(i);return g}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(a,b){return(a.x>b.x)-(b.x>a.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.parseTime&&this.options.events.length>0&&(this.events=function(){var a,c,e,f;for(e=this.options.events,f=[],a=0,c=e.length;c>a;a++)d=e[a],f.push(b.parseDate(d));return f}.call(this),this.xmax=Math.max(this.xmax,Math.max.apply(null,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(null,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",n),this.ymax=this.yboundary("max",m),this.ymin===this.ymax&&(n&&(this.ymin-=1),this.ymax+=1),this.yInterval=(this.ymax-this.ymin)/(this.options.numLines-1),this.yInterval>0&&this.yInterval<1?this.precision=-Math.floor(Math.log(this.yInterval)/Math.log(10)):this.precision=0,this.dirty=!0,c?this.redraw():void 0)},d.prototype.yboundary=function(a,b){var c,d;return c=this.options["y"+a],"string"==typeof c?"auto"===c.slice(0,4)?c.length>5?(d=parseInt(c.slice(5),10),null==b?d:Math[a](b,d)):null!=b?b:0:parseInt(c,10):c},d.prototype._calc=function(){var a,b,c;return c=this.el.width(),a=this.el.height(),(this.elementWidth!==c||this.elementHeight!==a||this.dirty)&&(this.elementWidth=c,this.elementHeight=a,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,this.options.axes&&(b=Math.max(this.measureText(this.yAxisFormat(this.ymin),this.options.gridTextSize).width,this.measureText(this.yAxisFormat(this.ymax),this.options.gridTextSize).width),this.left+=b,this.bottom-=1.5*this.options.gridTextSize),this.width=this.right-this.left,this.height=this.bottom-this.top,this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc)?this.calc():void 0},d.prototype.transY=function(a){return this.bottom-(a-this.ymin)*this.dy},d.prototype.transX=function(a){return 1===this.data.length?(this.left+this.right)/2:this.left+(a-this.xmin)*this.dx},d.prototype.redraw=function(){return this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw?this.draw():void 0},d.prototype.measureText=function(a,b){var c,d;return null==b&&(b=12),d=this.raphael.text(100,100,a).attr("font-size",b),c=d.getBBox(),d.remove(),c},d.prototype.yAxisFormat=function(a){return this.yLabelFormat(a)},d.prototype.yLabelFormat=function(a){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(a):""+this.options.preUnits+b.commas(a)+this.options.postUnits},d.prototype.updateHover=function(a,b){var c,d;return c=this.hitTest(a,b),null!=c?(d=this.hover).update.apply(d,c):void 0},d.prototype.drawGrid=function(){var a,b,c,d,e,f,g,h;if(this.options.grid!==!1||this.options.axes!==!1){for(a=this.ymin,b=this.ymax,h=[],c=f=a,g=this.yInterval;b>=a?b>=f:f>=b;c=f+=g)d=parseFloat(c.toFixed(this.precision)),e=this.transY(d),this.options.axes&&this.drawYAxisLabel(this.left-this.options.padding/2,e,this.yAxisFormat(d)),this.options.grid?h.push(this.drawGridLine("M"+this.left+","+e+"H"+(this.left+this.width))):h.push(void 0);return h}},d.prototype.drawGoals=function(){var a,b,c,d,e,f,g;for(f=this.options.goals,g=[],c=d=0,e=f.length;e>d;c=++d)b=f[c],a=this.options.goalLineColors[c%this.options.goalLineColors.length],g.push(this.drawGoal(b,a));return g},d.prototype.drawEvents=function(){var a,b,c,d,e,f,g;for(f=this.events,g=[],c=d=0,e=f.length;e>d;c=++d)b=f[c],a=this.options.eventLineColors[c%this.options.eventLineColors.length],g.push(this.drawEvent(b,a));return g},d.prototype.drawGoal=function(a,b){return this.raphael.path("M"+this.left+","+this.transY(a)+"H"+this.right).attr("stroke",b).attr("stroke-width",this.options.goalStrokeWidth)},d.prototype.drawEvent=function(a,b){return this.raphael.path("M"+this.transX(a)+","+this.bottom+"V"+this.top).attr("stroke",b).attr("stroke-width",this.options.eventStrokeWidth)},d.prototype.drawYAxisLabel=function(a,b,c){return this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},d.prototype.drawGridLine=function(a){return this.raphael.path(a).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},d}(b.EventEmitter),b.parseDate=function(a){var b,c,d,e,f,g,h,i,j,k,l;return"number"==typeof a?a:(c=a.match(/^(\d+) Q(\d)$/),e=a.match(/^(\d+)-(\d+)$/),f=a.match(/^(\d+)-(\d+)-(\d+)$/),h=a.match(/^(\d+) W(\d+)$/),i=a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),j=a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),c?new Date(parseInt(c[1],10),3*parseInt(c[2],10)-1,1).getTime():e?new Date(parseInt(e[1],10),parseInt(e[2],10)-1,1).getTime():f?new Date(parseInt(f[1],10),parseInt(f[2],10)-1,parseInt(f[3],10)).getTime():h?(k=new Date(parseInt(h[1],10),0,1),4!==k.getDay()&&k.setMonth(0,1+(4-k.getDay()+7)%7),k.getTime()+6048e5*parseInt(h[2],10)):i?i[6]?(g=0,"Z"!==i[6]&&(g=60*parseInt(i[8],10)+parseInt(i[9],10),"+"===i[7]&&(g=0-g)),Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)+g)):new Date(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)).getTime():j?(l=parseFloat(j[6]),b=Math.floor(l),d=Math.round(1e3*(l-b)),j[8]?(g=0,"Z"!==j[8]&&(g=60*parseInt(j[10],10)+parseInt(j[11],10),"+"===j[9]&&(g=0-g)),Date.UTC(parseInt(j[1],10),parseInt(j[2],10)-1,parseInt(j[3],10),parseInt(j[4],10),parseInt(j[5],10)+g,b,d)):new Date(parseInt(j[1],10),parseInt(j[2],10)-1,parseInt(j[3],10),parseInt(j[4],10),parseInt(j[5],10),b,d).getTime()):new Date(parseInt(a,10),0,1).getTime())},b.Hover=function(){function c(c){null==c&&(c={}),this.options=a.extend({},b.Hover.defaults,c),this.el=a("<div class='"+this.options["class"]+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return c.defaults={"class":"morris-hover morris-default-style"},c.prototype.update=function(a,b,c){return this.html(a),this.show(),this.moveTo(b,c)},c.prototype.html=function(a){return this.el.html(a)},c.prototype.moveTo=function(a,b){var c,d,e,f,g,h;return g=this.options.parent.innerWidth(),f=this.options.parent.innerHeight(),d=this.el.outerWidth(),c=this.el.outerHeight(),e=Math.min(Math.max(0,a-d/2),g-d),null!=b?(h=b-c-10,0>h&&(h=b+10,h+c>f&&(h=f/2-c/2))):h=f/2-c/2,this.el.css({"left":e+"px","top":h+"px"})},c.prototype.show=function(){return this.el.show()},c.prototype.hide=function(){return this.el.hide()},c}(),b.Line=function(a){function c(a){return this.hilight=h(this.hilight,this),this.onHoverOut=h(this.onHoverOut,this),this.onHoverMove=h(this.onHoverMove,this),this instanceof b.Line?void c.__super__.constructor.call(this,a):new b.Line(a)}return g(c,a),c.prototype.init=function(){return this.pointGrow=Raphael.animation({"r":this.options.pointSize+3},25,"linear"),this.pointShrink=Raphael.animation({"r":this.options.pointSize},25,"linear"),"always"!==this.options.hideHover?(this.hover=new b.Hover({"parent":this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut)):void 0},c.prototype.defaults={"lineWidth":3,"pointSize":4,"lineColors":["#57889c","#71843f","#92a2a8","#afd8f8","#edc240","#cb4b4b","#9440ed"],"pointWidths":[1],"pointStrokeColors":["#ffffff"],"pointFillColors":[],"smooth":!0,"xLabels":"auto","xLabelFormat":null,"xLabelMargin":50,"continuousLine":!0,"hideHover":!1},c.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},c.prototype.calcPoints=function(){var a,b,c,d,e,f;for(e=this.data,f=[],c=0,d=e.length;d>c;c++)a=e[c],a._x=this.transX(a.x),a._y=function(){var c,d,e,f;for(e=a.y,f=[],c=0,d=e.length;d>c;c++)b=e[c],null!=b?f.push(this.transY(b)):f.push(b);return f}.call(this),f.push(a._ymax=Math.min.apply(null,[this.bottom].concat(function(){var c,d,e,f;for(e=a._y,f=[],c=0,d=e.length;d>c;c++)b=e[c],null!=b&&f.push(b);return f}())));return f},c.prototype.hitTest=function(a,b){var c,d,e,f,g;if(0===this.data.length)return null;for(g=this.data.slice(1),c=e=0,f=g.length;f>e&&(d=g[c],!(a<(d._x+this.data[c]._x)/2));c=++e);return c},c.prototype.onHoverMove=function(a,b){var c;return c=this.hitTest(a,b),this.displayHoverForRow(c)},c.prototype.onHoverOut=function(){return"auto"===this.options.hideHover?this.displayHoverForRow(null):void 0},c.prototype.displayHoverForRow=function(a){var b;return null!=a?((b=this.hover).update.apply(b,this.hoverContentForRow(a)),this.hilight(a)):(this.hover.hide(),this.hilight())},c.prototype.hoverContentForRow=function(a){var b,c,d,e,f,g,h;if(d=this.data[a],"function"==typeof this.options.hoverCallback)b=this.options.hoverCallback(a,this.options);else for(b="<div class='morris-hover-row-label'>"+d.label+"</div>",h=d.y,c=f=0,g=h.length;g>f;c=++f)e=h[c],b+="<div class='morris-hover-point' style='color: "+this.colorFor(d,c,"label")+"'>\n "+this.options.labels[c]+":\n "+this.yLabelFormat(e)+"\n</div>";return[b,d._x,d._ymax]},c.prototype.generatePaths=function(){var a,c,d,e,f;return this.paths=function(){var g,h,j,k;for(k=[],d=g=0,h=this.options.ykeys.length;h>=0?h>g:g>h;d=h>=0?++g:--g)f=this.options.smooth===!0||(j=this.options.ykeys[d],i.call(this.options.smooth,j)>=0),c=function(){var a,b,c,f;for(c=this.data,f=[],a=0,b=c.length;b>a;a++)e=c[a],void 0!==e._y[d]&&f.push({"x":e._x,"y":e._y[d]});return f}.call(this),this.options.continuousLine&&(c=function(){var b,d,e;for(e=[],b=0,d=c.length;d>b;b++)a=c[b],null!==a.y&&e.push(a);return e}()),c.length>1?k.push(b.Line.createPath(c,f,this.bottom)):k.push(null);return k}.call(this)},c.prototype.draw=function(){return this.options.axes&&this.drawXAxis(),this.drawSeries(),this.options.hideHover===!1?this.displayHoverForRow(this.data.length-1):void 0},c.prototype.drawXAxis=function(){var a,c,d,e,f,g,h,i,j,k=this;for(g=this.bottom+1.25*this.options.gridTextSize,e=null,a=function(a,b){var c,d;return c=k.drawXAxisLabel(k.transX(b),g,a),d=c.getBBox(),(null==e||e>=d.x+d.width)&&d.x>=0&&d.x+d.width<k.el.width()?e=d.x-k.options.xLabelMargin:c.remove()},d=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:b.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var a,b,c,d;for(c=this.data,d=[],a=0,b=c.length;b>a;a++)f=c[a],d.push([f.label,f.x]);return d}.call(this),d.reverse(),j=[],h=0,i=d.length;i>h;h++)c=d[h],j.push(a(c[0],c[1]));return j},c.prototype.drawSeries=function(){var a,b,c,d,e,f,g,h,i;for(b=e=g=this.options.ykeys.length-1;0>=g?0>=e:e>=0;b=0>=g?++e:--e)c=this.paths[b],null!==c&&this.drawLinePath(c,this.colorFor(d,b,"line"));for(this.seriesPoints=function(){var a,c,d;for(d=[],b=a=0,c=this.options.ykeys.length;c>=0?c>a:a>c;b=c>=0?++a:--a)d.push([]);return d}.call(this),i=[],b=f=h=this.options.ykeys.length-1;0>=h?0>=f:f>=0;b=0>=h?++f:--f)i.push(function(){var c,e,f,g;for(f=this.data,g=[],c=0,e=f.length;e>c;c++)d=f[c],a=null!=d._y[b]?this.drawLinePoint(d._x,d._y[b],this.options.pointSize,this.colorFor(d,b,"point"),b):null,g.push(this.seriesPoints[b].push(a));return g}.call(this));return i},c.createPath=function(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;for(k="",c&&(g=b.Line.gradients(a)),l={"y":null},h=q=0,r=a.length;r>q;h=++q)e=a[h],null!=e.y&&(null!=l.y?c?(f=g[h],j=g[h-1],i=(e.x-l.x)/4,m=l.x+i,o=Math.min(d,l.y+i*j),n=e.x-i,p=Math.min(d,e.y-i*f),k+="C"+m+","+o+","+n+","+p+","+e.x+","+e.y):k+="L"+e.x+","+e.y:c&&null==g[h]||(k+="M"+e.x+","+e.y)),l=e;return k},c.gradients=function(a){var b,c,d,e,f,g,h,i;for(c=function(a,b){return(a.y-b.y)/(a.x-b.x)},i=[],d=g=0,h=a.length;h>g;d=++g)b=a[d],null!=b.y?(e=a[d+1]||{"y":null},f=a[d-1]||{"y":null},null!=f.y&&null!=e.y?i.push(c(f,e)):null!=f.y?i.push(c(f,b)):null!=e.y?i.push(c(b,e)):i.push(null)):i.push(null);return i},c.prototype.hilight=function(a){var b,c,d,e,f;if(null!==this.prevHilight&&this.prevHilight!==a)for(b=c=0,e=this.seriesPoints.length-1;e>=0?e>=c:c>=e;b=e>=0?++c:--c)this.seriesPoints[b][this.prevHilight]&&this.seriesPoints[b][this.prevHilight].animate(this.pointShrink);if(null!==a&&this.prevHilight!==a)for(b=d=0,f=this.seriesPoints.length-1;f>=0?f>=d:d>=f;b=f>=0?++d:--d)this.seriesPoints[b][a]&&this.seriesPoints[b][a].animate(this.pointGrow);return this.prevHilight=a},c.prototype.colorFor=function(a,b,c){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,a,b,c):"point"===c?this.options.pointFillColors[b%this.options.pointFillColors.length]||this.options.lineColors[b%this.options.lineColors.length]:this.options.lineColors[b%this.options.lineColors.length]},c.prototype.drawXAxisLabel=function(a,b,c){return this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("fill",this.options.gridTextColor)},c.prototype.drawLinePath=function(a,b){return this.raphael.path(a).attr("stroke",b).attr("stroke-width",this.options.lineWidth)},c.prototype.drawLinePoint=function(a,b,c,d,e){return this.raphael.circle(a,b,c).attr("fill",d).attr("stroke-width",this.strokeWidthForSeries(e)).attr("stroke",this.strokeForSeries(e))},c.prototype.strokeWidthForSeries=function(a){return this.options.pointWidths[a%this.options.pointWidths.length]},c.prototype.strokeForSeries=function(a){return this.options.pointStrokeColors[a%this.options.pointStrokeColors.length]},c}(b.Grid),b.labelSeries=function(c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r;if(j=200*(d-c)/e,i=new Date(c),n=b.LABEL_SPECS[f],void 0===n)for(r=b.AUTO_LABEL_ORDER,p=0,q=r.length;q>p;p++)if(k=r[p],m=b.LABEL_SPECS[k],j>=m.span){n=m;break}for(void 0===n&&(n=b.LABEL_SPECS.second),g&&(n=a.extend({},n,{"fmt":g})),h=n.start(i),l=[];(o=h.getTime())<=d;)o>=c&&l.push([n.fmt(h),o]),n.incr(h);return l},c=function(a){return{"span":60*a*1e3,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours())},"fmt":function(a){return""+b.pad2(a.getHours())+":"+b.pad2(a.getMinutes())},"incr":function(b){return b.setMinutes(b.getMinutes()+a)}}},d=function(a){return{"span":1e3*a,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes())},"fmt":function(a){return""+b.pad2(a.getHours())+":"+b.pad2(a.getMinutes())+":"+b.pad2(a.getSeconds())},"incr":function(b){return b.setSeconds(b.getSeconds()+a)}}},b.LABEL_SPECS={"decade":{"span":1728e8,"start":function(a){return new Date(a.getFullYear()-a.getFullYear()%10,0,1)},"fmt":function(a){return""+a.getFullYear()},"incr":function(a){return a.setFullYear(a.getFullYear()+10)}},"year":{"span":1728e7,"start":function(a){return new Date(a.getFullYear(),0,1)},"fmt":function(a){return""+a.getFullYear()},"incr":function(a){return a.setFullYear(a.getFullYear()+1)}},"month":{"span":24192e5,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),1)},"fmt":function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)},"incr":function(a){return a.setMonth(a.getMonth()+1)}},"day":{"span":864e5,"start":function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())},"fmt":function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)+"-"+b.pad2(a.getDate())},"incr":function(a){return a.setDate(a.getDate()+1)}},"hour":c(60),"30min":c(30),"15min":c(15),"10min":c(10),"5min":c(5),"minute":c(1),"30sec":d(30),"15sec":d(15),"10sec":d(10),"5sec":d(5),"second":d(1)},b.AUTO_LABEL_ORDER=["decade","year","month","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],b.Area=function(a){function c(a){return this instanceof b.Area?(this.cumulative=!0,void c.__super__.constructor.call(this,a)):new b.Area(a)}return g(c,a),c.prototype.calcPoints=function(){var a,b,c,d,e,f,g;for(f=this.data,g=[],d=0,e=f.length;e>d;d++)a=f[d],a._x=this.transX(a.x),b=0,a._y=function(){var d,e,f,g;for(f=a.y,g=[],d=0,e=f.length;e>d;d++)c=f[d],b+=c||0,g.push(this.transY(b));return g}.call(this),g.push(a._ymax=a._y[a._y.length-1]);return g},c.prototype.drawSeries=function(){var a,b,d,e;for(a=d=e=this.options.ykeys.length-1;0>=e?0>=d:d>=0;a=0>=e?++d:--d)b=this.paths[a],null!==b&&(b+="L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(b,this.fillForSeries(a)));return c.__super__.drawSeries.call(this)},c.prototype.fillForSeries=function(a){var b;return b=Raphael.rgb2hsl(this.colorFor(this.data[a],a,"line")),Raphael.hsl(b.h,Math.min(255,.75*b.s),Math.min(255,1.25*b.l))},c.prototype.drawFilledPath=function(a,b){return this.raphael.path(a).attr("fill",b).attr("stroke-width",0)},c}(b.Line),b.Bar=function(c){function d(c){return this.onHoverOut=h(this.onHoverOut,this),this.onHoverMove=h(this.onHoverMove,this),this instanceof b.Bar?void d.__super__.constructor.call(this,a.extend({},c,{"parseTime":!1})):new b.Bar(c)}return g(d,c),d.prototype.init=function(){return this.cumulative=this.options.stacked,"always"!==this.options.hideHover?(this.hover=new b.Hover({"parent":this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut)):void 0},d.prototype.defaults={"barSizeRatio":.75,"barGap":3,"barColors":["#57889c","#71843f","#92a2a8","#afd8f8","#edc240","#cb4b4b","#9440ed"],"xLabelMargin":50},d.prototype.calc=function(){var a;return this.calcBars(),this.options.hideHover===!1?(a=this.hover).update.apply(a,this.hoverContentForRow(this.data.length-1)):void 0},d.prototype.calcBars=function(){var a,b,c,d,e,f,g;for(f=this.data,g=[],a=d=0,e=f.length;e>d;a=++d)b=f[a],b._x=this.left+this.width*(a+.5)/this.data.length,g.push(b._y=function(){var a,d,e,f;for(e=b.y,f=[],a=0,d=e.length;d>a;a++)c=e[a],null!=c?f.push(this.transY(c)):f.push(null);return f}.call(this));return g},d.prototype.draw=function(){return this.options.axes&&this.drawXAxis(),this.drawSeries()},d.prototype.drawXAxis=function(){var a,b,c,d,e,f,g,h,i;for(f=this.bottom+1.25*this.options.gridTextSize,d=null,i=[],a=g=0,h=this.data.length;h>=0?h>g:g>h;a=h>=0?++g:--g)e=this.data[this.data.length-1-a],b=this.drawXAxisLabel(e._x,f,e.label),c=b.getBBox(),(null==d||d>=c.x+c.width)&&c.x>=0&&c.x+c.width<this.el.width()?i.push(d=c.x-this.options.xLabelMargin):i.push(b.remove());return i},d.prototype.drawSeries=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;return c=this.width/this.options.data.length,h=null!=this.options.stacked?1:this.options.ykeys.length,a=(c*this.options.barSizeRatio-this.options.barGap*(h-1))/h,g=c*(1-this.options.barSizeRatio)/2,n=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var h,o,p,q;for(p=this.data,q=[],d=h=0,o=p.length;o>h;d=++h)i=p[d],e=0,q.push(function(){var h,o,p,q;for(p=i._y,q=[],j=h=0,o=p.length;o>h;j=++h)m=p[j],null!==m?(n?(l=Math.min(m,n),b=Math.max(m,n)):(l=m,b=this.bottom),f=this.left+d*c+g,this.options.stacked||(f+=j*(a+this.options.barGap)),k=b-l,this.options.stacked&&(l-=e),this.drawBar(f,l,a,k,this.colorFor(i,j,"bar")),q.push(e+=k)):q.push(null);return q}.call(this));return q}.call(this)},d.prototype.colorFor=function(a,b,c){var d,e;return"function"==typeof this.options.barColors?(d={"x":a.x,"y":a.y[b],"label":a.label},e={"index":b,"key":this.options.ykeys[b],"label":this.options.labels[b]},this.options.barColors.call(this,d,e,c)):this.options.barColors[b%this.options.barColors.length]},d.prototype.hitTest=function(a,b){return 0===this.data.length?null:(a=Math.max(Math.min(a,this.right),this.left),Math.min(this.data.length-1,Math.floor((a-this.left)/(this.width/this.data.length))))},d.prototype.onHoverMove=function(a,b){var c,d;return c=this.hitTest(a,b),(d=this.hover).update.apply(d,this.hoverContentForRow(c))},d.prototype.onHoverOut=function(){return"auto"===this.options.hideHover?this.hover.hide():void 0},d.prototype.hoverContentForRow=function(a){var b,c,d,e,f,g,h,i;if("function"==typeof this.options.hoverCallback)b=this.options.hoverCallback(a,this.options);else for(d=this.data[a],b="<div class='morris-hover-row-label'>"+d.label+"</div>",i=d.y,c=g=0,h=i.length;h>g;c=++g)f=i[c],b+="<div class='morris-hover-point' style='color: "+this.colorFor(d,c,"label")+"'>\n "+this.options.labels[c]+":\n "+this.yLabelFormat(f)+"\n</div>";return e=this.left+(a+.5)*this.width/this.data.length,[b,e]},d.prototype.drawXAxisLabel=function(a,b,c){var d;return d=this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("fill",this.options.gridTextColor)},d.prototype.drawBar=function(a,b,c,d,e){return this.raphael.rect(a,b,c,d).attr("fill",e).attr("stroke-width",0)},d}(b.Grid),b.Donut=function(){function c(c){if(this.select=h(this.select,this),!(this instanceof b.Donut))return new b.Donut(c);if("string"==typeof c.element?this.el=a(document.getElementById(c.element)):this.el=a(c.element),this.options=a.extend({},this.defaults,c),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==c.data&&0!==c.data.length&&(this.data=c.data,this.redraw())}return c.prototype.defaults={"colors":["#57889c","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],"backgroundColor":"#FFFFFF","labelColor":"#000000","formatter":b.commas},c.prototype.redraw=function(){var a,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;for(this.el.empty(),this.raphael=new Raphael(this.el[0]),c=this.el.width()/2,d=this.el.height()/2,m=(Math.min(c,d)-10)/3,l=0,u=this.data,o=0,r=u.length;r>o;o++)n=u[o],l+=n.value;for(i=5/(2*m),a=1.9999*Math.PI-i*this.data.length,g=0,f=0,this.segments=[],v=this.data,p=0,s=v.length;s>p;p++)e=v[p],j=g+i+a*(e.value/l),k=new b.DonutSegment(c,d,2*m,m,g,j,this.options.colors[f%this.options.colors.length],this.options.backgroundColor,e,this.raphael),k.render(),this.segments.push(k),k.on("hover",this.select),g=j,f+=1;for(this.text1=this.drawEmptyDonutLabel(c,d-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(c,d+10,this.options.labelColor,14),h=Math.max.apply(null,function(){var a,b,c,d;for(c=this.data,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.value);return d}.call(this)),f=0,w=this.data,x=[],q=0,t=w.length;t>q;q++){if(e=w[q],e.value===h){this.select(f);break}x.push(f+=1)}return x},c.prototype.select=function(a){var b,c,d,e,f;for(f=this.segments,d=0,e=f.length;e>d;d++)b=f[d],b.deselect();return c="number"==typeof a?this.segments[a]:a,c.select(),this.setLabels(c.data.label,this.options.formatter(c.data.value,c.data))},c.prototype.setLabels=function(a,b){var c,d,e,f,g,h,i,j;return c=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3,f=1.8*c,e=c/2,d=c/3,this.text1.attr({"text":a,"transform":""}),g=this.text1.getBBox(),h=Math.min(f/g.width,e/g.height),this.text1.attr({"transform":"S"+h+","+h+","+(g.x+g.width/2)+","+(g.y+g.height)}),this.text2.attr({"text":b,"transform":""}),i=this.text2.getBBox(),j=Math.min(f/i.width,d/i.height),this.text2.attr({"transform":"S"+j+","+j+","+(i.x+i.width/2)+","+i.y})},c.prototype.drawEmptyDonutLabel=function(a,b,c,d,e){var f;return f=this.raphael.text(a,b,"").attr("font-size",d).attr("fill",c),null!=e&&f.attr("font-weight",e),f},c}(),b.DonutSegment=function(a){function b(a,b,c,d,e,f,g,i,j,k){this.cx=a,this.cy=b,this.inner=c,this.outer=d,this.color=g,this.backgroundColor=i,this.data=j,this.raphael=k,this.deselect=h(this.deselect,this),this.select=h(this.select,this),this.sin_p0=Math.sin(e),this.cos_p0=Math.cos(e),this.sin_p1=Math.sin(f),this.cos_p1=Math.cos(f),this.is_long=f-e>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return g(b,a),b.prototype.calcArcPoints=function(a){return[this.cx+a*this.sin_p0,this.cy+a*this.cos_p0,this.cx+a*this.sin_p1,this.cy+a*this.cos_p1]},b.prototype.calcSegment=function(a,b){var c,d,e,f,g,h,i,j,k,l;return k=this.calcArcPoints(a),c=k[0],e=k[1],d=k[2],f=k[3],l=this.calcArcPoints(b),g=l[0],i=l[1],h=l[2],j=l[3],"M"+c+","+e+("A"+a+","+a+",0,"+this.is_long+",0,"+d+","+f)+("L"+h+","+j)+("A"+b+","+b+",0,"+this.is_long+",1,"+g+","+i)+"Z"},b.prototype.calcArc=function(a){var b,c,d,e,f;return f=this.calcArcPoints(a),b=f[0],d=f[1],c=f[2],e=f[3],"M"+b+","+d+("A"+a+","+a+",0,"+this.is_long+",0,"+c+","+e)},b.prototype.render=function(){var a=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return a.fire("hover",a)})},b.prototype.drawDonutArc=function(a,b){return this.raphael.path(a).attr({"stroke":b,"stroke-width":2,"opacity":0})},b.prototype.drawDonutSegment=function(a,b,c,d){return this.raphael.path(a).attr({"fill":b,"stroke":c,"stroke-width":3}).hover(d)},b.prototype.select=function(){return this.selected?void 0:(this.seg.animate({"path":this.selectedPath},150,"<>"),this.arc.animate({"opacity":1},150,"<>"),this.selected=!0)},b.prototype.deselect=function(){return this.selected?(this.seg.animate({"path":this.path},150,"<>"),this.arc.animate({"opacity":0},150,"<>"),this.selected=!1):void 0},b}(b.EventEmitter)}).call(this);
!function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={"n":{}},k=function(a,d){a=String(a);var e,f=c,g=Array.prototype.slice.call(arguments,2),h=k.listeners(a),j=0,l=[],m={},n=[],o=b;b=a,c=0;for(var p=0,q=h.length;q>p;p++)"zIndex"in h[p]&&(l.push(h[p].zIndex),h[p].zIndex<0&&(m[h[p].zIndex]=h[p]));for(l.sort(i);l[j]<0;)if(e=m[l[j++]],n.push(e.apply(d,g)),c)return c=f,n;for(p=0;q>p;p++)if(e=h[p],"zIndex"in e)if(e.zIndex==l[j]){if(n.push(e.apply(d,g)),c)break;do if(j++,e=m[l[j]],e&&n.push(e.apply(d,g)),c)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),c)break;return c=f,b=o,n.length?n:null};k._events=j,k.listeners=function(a){var b,c,d,e,h,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,h=m.length;h>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[g]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},k.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={"n":{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){if(!a)return void(k._events=j={"n":{}});var c,d,h,i,l,m,n,o=a.split(f),p=[j];for(i=0,l=o.length;l>i;i++)for(m=0;m<p.length;m+=h.length-2){if(h=[m,1],c=p[m].n,o[i]!=g)c[o[i]]&&h.push(c[o[i]]);else for(d in c)c[e](d)&&h.push(c[d]);p.splice.apply(p,h)}for(i=0,l=p.length;l>i;i++)for(c=p[i];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;n>m;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(d in c.n)if(c.n[e](d)&&c.n[d].f){var q=c.n[d].f;for(m=0,n=q.length;n>m;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[d].f}}else{delete c.f;for(d in c.n)c.n[e](d)&&c.n[d].f&&delete c.n[d].f}c=c.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(window||this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){function c(a){if(c.is(a,"function"))return u?a():b.on("raphael.DOMload",a);if(c.is(a,V))return c._engine.create[D](c,a.splice(0,3+c.is(a[0],T))).add(a);var d=Array.prototype.slice.call(arguments,0);if(c.is(d[d.length-1],"function")){var e=d.pop();return u?e.call(c._engine.create[D](c,d)):b.on("raphael.DOMload",function(){e.call(c._engine.create[D](c,d))})}return c._engine.create[D](c,arguments)}function d(a){if("function"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[z](c)&&(b[c]=d(a[c]));return b}function e(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function f(a,b,c){function d(){var f=Array.prototype.slice.call(arguments,0),g=f.join("\u2400"),h=d.cache=d.cache||{},i=d.count=d.count||[];return h[z](g)?(e(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[D](b,f),c?c(h[g]):h[g])}return d}function g(){return this.hex}function h(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{"x":+a[d-2],"y":+a[d-1]},{"x":+a[d],"y":+a[d+1]},{"x":+a[d+2],"y":+a[d+3]},{"x":+a[d+4],"y":+a[d+5]}];b?d?e-4==d?f[3]={"x":+a[0],"y":+a[1]}:e-2==d&&(f[2]={"x":+a[0],"y":+a[1]},f[3]={"x":+a[2],"y":+a[3]}):f[0]={"x":+a[e-2],"y":+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={"x":+a[d],"y":+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function i(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function j(a,b,c,d,e,f,g,h,j){null==j&&(j=1),j=j>1?1:0>j?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;l>p;p++){var q=k*m[p]+k,r=i(q,a,c,e,g),s=i(q,b,d,f,h),t=r*r+s*s;o+=n[p]*N.sqrt(t)}return k*o}function k(a,b,c,d,e,f,g,h,i){if(!(0>i||j(a,b,c,d,e,f,g,h)<i)){var k,l=1,m=l/2,n=l-m,o=.01;for(k=j(a,b,c,d,e,f,g,h,n);Q(k-i)>o;)m/=2,n+=(i>k?1:-1)*m,k=j(a,b,c,d,e,f,g,h,n);return n}}function l(a,b,c,d,e,f,g,h){if(!(O(a,c)<P(e,g)||P(a,c)>O(e,g)||O(b,d)<P(f,h)||P(b,d)>O(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+P(a,c).toFixed(2)||n>+O(a,c).toFixed(2)||n<+P(e,g).toFixed(2)||n>+O(e,g).toFixed(2)||o<+P(b,d).toFixed(2)||o>+O(b,d).toFixed(2)||o<+P(f,h).toFixed(2)||o>+O(f,h).toFixed(2)))return{"x":l,"y":m}}}}function m(a,b,d){var e=c.bezierBBox(a),f=c.bezierBBox(b);if(!c.isBBoxIntersect(e,f))return d?0:[];for(var g=j.apply(0,a),h=j.apply(0,b),i=O(~~(g/5),1),k=O(~~(h/5),1),m=[],n=[],o={},p=d?0:[],q=0;i+1>q;q++){var r=c.findDotsAtSegment.apply(c,a.concat(q/i));m.push({"x":r.x,"y":r.y,"t":q/i})}for(q=0;k+1>q;q++)r=c.findDotsAtSegment.apply(c,b.concat(q/k)),n.push({"x":r.x,"y":r.y,"t":q/k});for(q=0;i>q;q++)for(var s=0;k>s;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=Q(u.x-t.x)<.001?"y":"x",y=Q(w.x-v.x)<.001?"y":"x",z=l(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+Q((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+Q((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&1.001>=A&&B>=0&&1.001>=B&&(d?p++:p.push({"x":z.x,"y":z.y,"t1":P(A,1),"t2":P(B,1)}))}}return p}function n(a,b,d){a=c._path2curve(a),b=c._path2curve(b);for(var e,f,g,h,i,j,k,l,n,o,p=d?0:[],q=0,r=a.length;r>q;q++){var s=a[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=b.length;u>t;t++){var v=b[t];if("M"==v[0])g=k=v[1],h=l=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,k,l,k,l],g=k,h=l);var w=m(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function o(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function p(){return this.x+H+this.y+H+this.width+" \xd7 "+this.height}function q(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;8>i;i++){if(f=g(e)-a,Q(f)<b)return e;if(h=(3*l*e+2*k)*e+j,Q(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,c>e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),Q(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function r(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[z](e)&&(d[_(e)]=a[e],c.push(_(e)));c.sort(la)}this.anim=d,this.top=c[c.length-1],this.percents=c}function s(a,d,e,f,g,h){e=_(e);var i,j,k,l,m,n,p=a.ms,r={},s={},t={};if(f)for(v=0,x=ib.length;x>v;v++){var u=ib[v];if(u.el.id==d.id&&u.anim==a){u.percent!=e?(ib.splice(v,1),k=1):j=u,d.attr(u.totalOrigin);break}}else f=+s;for(var v=0,x=a.percents.length;x>v;v++){if(a.percents[v]==e||a.percents[v]>f*a.top){e=a.percents[v],m=a.percents[v-1]||0,p=p/a.top*(e-m),l=a.percents[v+1],i=a.anim[e];break}f&&d.attr(a.anim[a.percents[v]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var y in i)if(i[z](y)&&(da[z](y)||d.paper.customAttributes[z](y)))switch(r[y]=d.attr(y),null==r[y]&&(r[y]=ca[y]),s[y]=i[y],da[y]){case T:t[y]=(s[y]-r[y])/p;break;case"colour":r[y]=c.getRGB(r[y]);var A=c.getRGB(s[y]);t[y]={"r":(A.r-r[y].r)/p,"g":(A.g-r[y].g)/p,"b":(A.b-r[y].b)/p};break;case"path":var B=Ka(r[y],s[y]),C=B[1];for(r[y]=B[0],t[y]=[],v=0,x=r[y].length;x>v;v++){t[y][v]=[0];for(var D=1,F=r[y][v].length;F>D;D++)t[y][v][D]=(C[v][D]-r[y][v][D])/p}break;case"transform":var G=d._,H=Pa(G[y],s[y]);if(H)for(r[y]=H.from,s[y]=H.to,t[y]=[],t[y].real=!0,v=0,x=r[y].length;x>v;v++)for(t[y][v]=[r[y][v][0]],D=1,F=r[y][v].length;F>D;D++)t[y][v][D]=(s[y][v][D]-r[y][v][D])/p;else{var K=d.matrix||new o,L={"_":{"transform":G.transform},"getBBox":function(){return d.getBBox(1)}};r[y]=[K.a,K.b,K.c,K.d,K.e,K.f],Na(L,s[y]),s[y]=L._.transform,t[y]=[(L.matrix.a-K.a)/p,(L.matrix.b-K.b)/p,(L.matrix.c-K.c)/p,(L.matrix.d-K.d)/p,(L.matrix.e-K.e)/p,(L.matrix.f-K.f)/p]}break;case"csv":var M=I(i[y])[J](w),N=I(r[y])[J](w);if("clip-rect"==y)for(r[y]=N,t[y]=[],v=N.length;v--;)t[y][v]=(M[v]-r[y][v])/p;s[y]=M;break;default:for(M=[][E](i[y]),N=[][E](r[y]),t[y]=[],v=d.paper.customAttributes[y].length;v--;)t[y][v]=((M[v]||0)-(N[v]||0))/p}var O=i.easing,P=c.easing_formulas[O];if(!P)if(P=I(O).match(Z),P&&5==P.length){var Q=P;P=function(a){return q(a,+Q[1],+Q[2],+Q[3],+Q[4],p)}}else P=na;if(n=i.start||a.start||+new Date,u={"anim":a,"percent":e,"timestamp":n,"start":n+(a.del||0),"status":0,"initstatus":f||0,"stop":!1,"ms":p,"easing":P,"from":r,"diff":t,"to":s,"el":d,"callback":i.callback,"prev":m,"next":l,"repeat":h||a.times,"origin":d.attr(),"totalOrigin":g},ib.push(u),f&&!j&&!k&&(u.stop=!0,u.start=new Date-p*f,1==ib.length))return kb();k&&(u.start=new Date-u.ms*f),1==ib.length&&jb(kb)}b("raphael.anim.start."+d.id,d,a)}}function t(a){for(var b=0;b<ib.length;b++)ib[b].el.paper==a&&ib.splice(b--,1)}c.version="2.1.2",c.eve=b;var u,v,w=/[, ]+/,x={"circle":1,"rect":1,"path":1,"ellipse":1,"text":1,"image":1},y=/\{(\d+)\}/g,z="hasOwnProperty",A={"doc":document,"win":a},B={"was":Object.prototype[z].call(A.win,"Raphael"),"is":A.win.Raphael},C=function(){this.ca=this.customAttributes={}},D="apply",E="concat",F="ontouchstart"in A.win||A.win.DocumentTouch&&A.doc instanceof DocumentTouch,G="",H=" ",I=String,J="split",K="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[J](H),L={"mousedown":"touchstart","mousemove":"touchmove","mouseup":"touchend"},M=I.prototype.toLowerCase,N=Math,O=N.max,P=N.min,Q=N.abs,R=N.pow,S=N.PI,T="number",U="string",V="array",W=Object.prototype.toString,X=(c._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),Y={"NaN":1,"Infinity":1,"-Infinity":1},Z=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,$=N.round,_=parseFloat,aa=parseInt,ba=I.prototype.toUpperCase,ca=c._availableAttrs={"arrow-end":"none","arrow-start":"none","blur":0,"clip-rect":"0 0 1e9 1e9","cursor":"default","cx":0,"cy":0,"fill":"#fff","fill-opacity":1,"font":'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,"gradient":0,"height":0,"href":"http://raphaeljs.com/","letter-spacing":0,"opacity":1,"path":"M0,0","r":0,"rx":0,"ry":0,"src":"","stroke":"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,"target":"_blank","text-anchor":"middle","title":"Raphael","transform":"","width":0,"x":0,"y":0},da=c._availableAnimAttrs={"blur":T,"clip-rect":"csv","cx":T,"cy":T,"fill":"colour","fill-opacity":T,"font-size":T,"height":T,"opacity":T,"path":"path","r":T,"rx":T,"ry":T,"stroke":"colour","stroke-opacity":T,"stroke-width":T,"transform":"transform","width":T,"x":T,"y":T},ea=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,fa={"hs":1,"rg":1},ga=/,?([achlmqrstvxz]),?/gi,ha=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ia=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ja=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ka=(c._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),la=function(a,b){return _(a)-_(b)},ma=function(){},na=function(a){return a},oa=c._rectPath=function(a,b,c,d,e){return e?[["M",a+e,b],["l",c-2*e,0],["a",e,e,0,0,1,e,e],["l",0,d-2*e],["a",e,e,0,0,1,-e,e],["l",2*e-c,0],["a",e,e,0,0,1,-e,-e],["l",0,2*e-d],["a",e,e,0,0,1,e,-e],["z"]]:[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},pa=function(a,b,c,d){return null==d&&(d=c),[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},qa=c._getPath={"path":function(a){return a.attr("path")},"circle":function(a){var b=a.attrs;return pa(b.cx,b.cy,b.r)},"ellipse":function(a){var b=a.attrs;return pa(b.cx,b.cy,b.rx,b.ry)},"rect":function(a){var b=a.attrs;return oa(b.x,b.y,b.width,b.height,b.r)},"image":function(a){var b=a.attrs;return oa(b.x,b.y,b.width,b.height)},"text":function(a){var b=a._getBBox();return oa(b.x,b.y,b.width,b.height)},"set":function(a){var b=a._getBBox();return oa(b.x,b.y,b.width,b.height)}},ra=c.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=Ka(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(c._g=A,c.type=A.win.SVGAngle||A.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==c.type){var sa,ta=A.doc.createElement("div");if(ta.innerHTML='<v:shape adj="1"/>',sa=ta.firstChild,sa.style.behavior="url(#default#VML)",!sa||"object"!=typeof sa.adj)return c.type=G;ta=null}c.svg=!(c.vml="VML"==c.type),c._Paper=C,c.fn=v=C.prototype=c.prototype,c._id=0,c._oid=0,c.is=function(a,b){return b=M.call(b),"finite"==b?!Y[z](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||W.call(a).slice(8,-1).toLowerCase()==b},c.angle=function(a,b,d,e,f,g){if(null==f){var h=a-d,i=b-e;return h||i?(180+180*N.atan2(-i,-h)/S+360)%360:0}return c.angle(a,b,f,g)-c.angle(d,e,f,g)},c.rad=function(a){return a%360*S/180},c.deg=function(a){return 180*a/S%360},c.snapTo=function(a,b,d){if(d=c.is(d,"finite")?d:10,c.is(a,V)){for(var e=a.length;e--;)if(Q(a[e]-b)<=d)return a[e]}else{a=+a;var f=b%a;if(d>f)return b-f;if(f>a-d)return b-f+a}return b};c.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*N.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});c.setWindow=function(a){b("raphael.setWindow",c,A.win,a),A.win=a,A.doc=A.win.document,c._engine.initWin&&c._engine.initWin(A.win)};var ua=function(a){if(c.vml){var b,d=/^\s+|\s+$/g;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),b=e.body}catch(g){b=createPopup().document.body}var h=b.createTextRange();ua=f(function(a){try{b.style.color=I(a).replace(d,G);var c=h.queryCommandValue("ForeColor");return c=(255&c)<<16|65280&c|(16711680&c)>>>16,"#"+("000000"+c.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=A.doc.createElement("i");i.title="Rapha\xebl Colour Picker",i.style.display="none",A.doc.body.appendChild(i),ua=f(function(a){return i.style.color=a,A.doc.defaultView.getComputedStyle(i,G).getPropertyValue("color")})}return ua(a)},va=function(){return"hsb("+[this.h,this.s,this.b]+")"},wa=function(){return"hsl("+[this.h,this.s,this.l]+")"},xa=function(){return this.hex},ya=function(a,b,d){if(null==b&&c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&c.is(a,U)){var e=c.getRGB(a);a=e.r,b=e.g,d=e.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},za=function(a,b,d,e){a*=255,b*=255,d*=255;var f={"r":a,"g":b,"b":d,"hex":c.rgb(a,b,d),"toString":xa};return c.is(e,"finite")&&(f.opacity=e),f};c.color=function(a){var b;return c.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={"hex":"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=xa,a},c.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Q(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],za(e,f,g,d)},c.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-Q(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],za(e,f,g,d)},c.rgb2hsb=function(a,b,c){c=ya(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=O(a,b,c),g=f-P(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{"h":d,"s":e,"b":f,"toString":va}},c.rgb2hsl=function(a,b,c){c=ya(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=O(a,b,c),h=P(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{"h":d,"s":e,"l":f,"toString":wa}},c._path2string=function(){return this.join(",").replace(ga,"$1")};c._preload=function(a,b){var c=A.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,A.doc.body.removeChild(this)},c.onerror=function(){A.doc.body.removeChild(this)},A.doc.body.appendChild(c),c.src=a};c.getRGB=f(function(a){if(!a||(a=I(a)).indexOf("-")+1)return{"r":-1,"g":-1,"b":-1,"hex":"none","error":1,"toString":g};if("none"==a)return{"r":-1,"g":-1,"b":-1,"hex":"none","toString":g};!(fa[z](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=ua(a));var b,d,e,f,h,i,j=a.match(X);return j?(j[2]&&(e=aa(j[2].substring(5),16),d=aa(j[2].substring(3,5),16),b=aa(j[2].substring(1,3),16)),j[3]&&(e=aa((h=j[3].charAt(3))+h,16),d=aa((h=j[3].charAt(2))+h,16),b=aa((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][J](ea),b=_(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=_(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=_(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(f=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100)),j[5]?(i=j[5][J](ea),b=_(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=_(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=_(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"\xb0"==i[0].slice(-1))&&(b/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(f=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsb2rgb(b,d,e,f)):j[6]?(i=j[6][J](ea),b=_(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=_(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=_(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"\xb0"==i[0].slice(-1))&&(b/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(f=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsl2rgb(b,d,e,f)):(j={"r":b,"g":d,"b":e,"toString":g},j.hex="#"+(16777216|e|d<<8|b<<16).toString(16).slice(1),c.is(f,"finite")&&(j.opacity=f),j)):{"r":-1,"g":-1,"b":-1,"hex":"none","error":1,"toString":g}},c),c.hsb=f(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=f(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=f(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),c.getColor=function(a){var b=this.getColor.start=this.getColor.start||{"h":0,"s":1,"b":a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={"h":0,"s":1,"b":b.b})),c.hex},c.getColor.reset=function(){delete this.start},c.parsePathString=function(a){if(!a)return null;var b=Aa(a);if(b.arr)return Ca(b.arr);var d={"a":7,"c":6,"h":1,"l":2,"m":2,"r":4,"q":4,"s":4,"t":2,"v":1,"z":0},e=[];return c.is(a,V)&&c.is(a[0],V)&&(e=Ca(a)),e.length||I(a).replace(ha,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(ja,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][E](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][E](f));else for(;f.length>=d[g]&&(e.push([b][E](f.splice(0,d[g]))),d[g]););}),e.toString=c._path2string,b.arr=Ca(e),e},c.parseTransformString=f(function(a){if(!a)return null;var b=[];return c.is(a,V)&&c.is(a[0],V)&&(b=Ca(a)),b.length||I(a).replace(ia,function(a,c,d){var e=[];M.call(c);d.replace(ja,function(a,b){b&&e.push(+b)}),b.push([c][E](e))}),b.toString=c._path2string,b});var Aa=function(a){var b=Aa.ps=Aa.ps||{};return b[a]?b[a].sleep=100:b[a]={"sleep":100},setTimeout(function(){for(var c in b)b[z](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};c.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=R(j,3),l=R(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*N.atan2(q-s,r-t)/S;return(q>s||t>r)&&(y+=180),{"x":o,"y":p,"m":{"x":q,"y":r},"n":{"x":s,"y":t},"start":{"x":u,"y":v},"end":{"x":w,"y":x},"alpha":y}},c.bezierBBox=function(a,b,d,e,f,g,h,i){c.is(a,"array")||(a=[a,b,d,e,f,g,h,i]);var j=Ja.apply(null,a);return{"x":j.min.x,"y":j.min.y,"x2":j.max.x,"y2":j.max.y,"width":j.max.x-j.min.x,"height":j.max.y-j.min.y}},c.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},c.isBBoxIntersect=function(a,b){var d=c.isPointInsideBBox;return d(b,a.x,a.y)||d(b,a.x2,a.y)||d(b,a.x,a.y2)||d(b,a.x2,a.y2)||d(a,b.x,b.y)||d(a,b.x2,b.y)||d(a,b.x,b.y2)||d(a,b.x2,b.y2)||(a.x<b.x2&&a.x>b.x||b.x<a.x2&&b.x>a.x)&&(a.y<b.y2&&a.y>b.y||b.y<a.y2&&b.y>a.y)},c.pathIntersection=function(a,b){return n(a,b)},c.pathIntersectionNumber=function(a,b){return n(a,b,1)},c.isPointInsidePath=function(a,b,d){var e=c.pathBBox(a);return c.isPointInsideBBox(e,b,d)&&n(a,[["M",b,d],["H",e.x2+10]],1)%2==1},c._removedFactory=function(a){return function(){b("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+a+"\u201d of removed object",a)}};var Ba=c.pathBBox=function(a){var b=Aa(a);if(b.bbox)return d(b.bbox);if(!a)return{"x":0,"y":0,"width":0,"height":0,"x2":0,"y2":0};a=Ka(a);for(var c,e=0,f=0,g=[],h=[],i=0,j=a.length;j>i;i++)if(c=a[i],"M"==c[0])e=c[1],f=c[2],g.push(e),h.push(f);else{var k=Ja(e,f,c[1],c[2],c[3],c[4],c[5],c[6]);g=g[E](k.min.x,k.max.x),h=h[E](k.min.y,k.max.y),e=c[5],f=c[6]}var l=P[D](0,g),m=P[D](0,h),n=O[D](0,g),o=O[D](0,h),p=n-l,q=o-m,r={"x":l,"y":m,"x2":n,"y2":o,"width":p,"height":q,"cx":l+p/2,"cy":m+q/2};return b.bbox=d(r),r},Ca=function(a){var b=d(a);return b.toString=c._path2string,b},Da=c._pathToRelative=function(a){var b=Aa(a);if(b.rel)return Ca(b.rel);c.is(a,V)&&c.is(a&&a[0],V)||(a=c.parsePathString(a));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==a[0][0]&&(e=a[0][1],f=a[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=a.length;k>j;j++){var l=d[j]=[],m=a[j];if(m[0]!=M.call(m[0]))switch(l[0]=M.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;o>n;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;q>p;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=c._path2string,b.rel=Ca(d),d},Ea=c._pathToAbsolute=function(a){var b=Aa(a);if(b.abs)return Ca(b.abs);if(c.is(a,V)&&c.is(a&&a[0],V)||(a=c.parsePathString(a)),!a||!a.length)return[["M",0,0]];var d=[],e=0,f=0,g=0,i=0,j=0;"M"==a[0][0]&&(e=+a[0][1],f=+a[0][2],g=e,i=f,j++,d[0]=["M",e,f]);for(var k,l,m=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),n=j,o=a.length;o>n;n++){if(d.push(k=[]),l=a[n],l[0]!=ba.call(l[0]))switch(k[0]=ba.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,f][E](l.slice(1)),q=2,r=p.length;r>q;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[E](h(p,m));break;case"M":g=+l[1]+e,i=+l[2]+f;default:for(q=1,r=l.length;r>q;q++)k[q]=+l[q]+(q%2?e:f)}else if("R"==l[0])p=[e,f][E](l.slice(1)),d.pop(),d=d[E](h(p,m)),k=["R"][E](l.slice(-2));else for(var s=0,t=l.length;t>s;s++)k[s]=l[s];switch(k[0]){case"Z":e=g,f=i;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":g=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}return d.toString=c._path2string,b.abs=Ca(d),d},Fa=function(a,b,c,d){return[a,b,c,d,c,d]},Ga=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Ha=function(a,b,c,d,e,g,h,i,j,k){var l,m=120*S/180,n=S/180*(+e||0),o=[],p=f(function(a,b,c){var d=a*N.cos(c)-b*N.sin(c),e=a*N.sin(c)+b*N.cos(c);return{"x":d,"y":e}});if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(a,b,-n),a=l.x,b=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(N.cos(S/180*e),N.sin(S/180*e),(a-i)/2),r=(b-j)/2,s=q*q/(c*c)+r*r/(d*d);s>1&&(s=N.sqrt(s),c=s*c,d=s*d);var t=c*c,u=d*d,v=(g==h?-1:1)*N.sqrt(Q((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*c*r/d+(a+i)/2,x=v*-d*q/c+(b+j)/2,y=N.asin(((b-x)/d).toFixed(9)),z=N.asin(((j-x)/d).toFixed(9));y=w>a?S-y:y,z=w>i?S-z:z,0>y&&(y=2*S+y),0>z&&(z=2*S+z),h&&y>z&&(y-=2*S),!h&&z>y&&(z-=2*S)}var A=z-y;if(Q(A)>m){var B=z,C=i,D=j;z=y+m*(h&&z>y?1:-1),i=w+c*N.cos(z),j=x+d*N.sin(z),o=Ha(i,j,c,d,e,0,h,C,D,[z,B,w,x])}A=z-y;var F=N.cos(y),G=N.sin(y),H=N.cos(z),I=N.sin(z),K=N.tan(A/4),L=4/3*c*K,M=4/3*d*K,O=[a,b],P=[a+L*G,b-M*F],R=[i+L*I,j-M*H],T=[i,j];if(P[0]=2*O[0]-P[0],P[1]=2*O[1]-P[1],k)return[P,R,T][E](o);o=[P,R,T][E](o).join()[J](",");for(var U=[],V=0,W=o.length;W>V;V++)U[V]=V%2?p(o[V-1],o[V],n).y:p(o[V],o[V+1],n).x;return U},Ia=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{"x":R(j,3)*a+3*R(j,2)*i*c+3*j*i*i*e+R(i,3)*g,"y":R(j,3)*b+3*R(j,2)*i*d+3*j*i*i*f+R(i,3)*h}},Ja=f(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+N.sqrt(k*k-4*j*l))/2/j,n=(-k-N.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return Q(m)>"1e12"&&(m=.5),Q(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Ia(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Ia(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+N.sqrt(k*k-4*j*l))/2/j,n=(-k-N.sqrt(k*k-4*j*l))/2/j,Q(m)>"1e12"&&(m=.5),Q(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Ia(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Ia(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{"min":{"x":P[D](0,p),"y":P[D](0,o)},"max":{"x":O[D](0,p),"y":O[D](0,o)}}}),Ka=c._path2curve=f(function(a,b){var c=!b&&Aa(a);if(!b&&c.curve)return Ca(c.curve);for(var d=Ea(a),e=b&&Ea(b),f={"x":0,"y":0,"bx":0,"by":0,"X":0,"Y":0,"qx":null,"qy":null},g={"x":0,"y":0,"bx":0,"by":0,"X":0,"Y":0,"qx":null,"qy":null},h=(function(a,b,c){var d,e,f={"T":1,"Q":1};if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in f)&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][E](Ha[D](0,[b.x,b.y][E](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][E](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][E](Ga(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][E](Ga(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][E](Fa(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][E](Fa(b.x,b.y,a[1],b.y));break;case"V":a=["C"][E](Fa(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][E](Fa(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][E](c.splice(0,6)));a.splice(b,1),l=O(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=O(d.length,e&&e.length||0))},k=0,l=O(d.length,e&&e.length||0);l>k;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var m=d[k],n=e&&e[k],o=m.length,p=e&&n.length;f.x=m[o-2],f.y=m[o-1],f.bx=_(m[o-4])||f.x,f.by=_(m[o-3])||f.y,g.bx=e&&(_(n[p-4])||g.x),g.by=e&&(_(n[p-3])||g.y),g.x=e&&n[p-2],g.y=e&&n[p-1]}return e||(c.curve=Ca(d)),e?[d,e]:d},null,Ca),La=(c._parseDots=f(function(a){for(var b=[],d=0,e=a.length;e>d;d++){var f={},g=a[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=c.getRGB(g[1]),f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),b.push(f)}for(d=1,e=b.length-1;e>d;d++)if(!b[d].offset){for(var h=_(b[d-1].offset||0),i=0,j=d+1;e>j;j++)if(b[j].offset){i=b[j].offset;break}i||(i=100,j=e),i=_(i);for(var k=(i-h)/(j-d+1);j>d;d++)h+=k,b[d].offset=h+"%"}return b}),c._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Ma=(c._tofront=function(a,b){b.top!==a&&(La(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},c._toback=function(a,b){b.bottom!==a&&(La(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},c._insertafter=function(a,b,c){La(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},c._insertbefore=function(a,b,c){La(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},c.toMatrix=function(a,b){var c=Ba(a),d={"_":{"transform":G},"getBBox":function(){return c}};return Na(d,b),d.matrix}),Na=(c.transformPath=function(a,b){return ra(a,Ma(a,b))},c._extractTransform=function(a,b){if(null==b)return a._.transform;b=I(b).replace(/\.{3}|\u2026/g,a._.transform||G);var d=c.parseTransformString(b),e=0,f=0,g=0,h=1,i=1,j=a._,k=new o;if(j.transform=d||[],d)for(var l=0,m=d.length;m>l;l++){var n,p,q,r,s,t=d[l],u=t.length,v=I(t[0]).toLowerCase(),w=t[0]!=v,x=w?k.invert():0;"t"==v&&3==u?w?(n=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),k.translate(q-n,r-p)):k.translate(t[1],t[2]):"r"==v?2==u?(s=s||a.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==v?2==u||3==u?(s=s||a.getBBox(1),k.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==v&&7==u&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,a.matrix=k}a.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),Oa=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":
return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},Pa=c._equaliseTransform=function(a,b){b=I(b).replace(/\.{3}|\u2026/g,a),a=c.parseTransformString(a)||[],b=c.parseTransformString(b)||[];for(var d,e,f,g,h=O(a.length,b.length),i=[],j=[],k=0;h>k;k++){if(f=a[k]||Oa(b[k]),g=b[k]||Oa(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=O(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{"from":i,"to":j}};c._getContainer=function(a,b,d,e){var f;return f=null!=e||c.is(a,"object")?a:A.doc.getElementById(a),null!=f?f.tagName?null==b?{"container":f,"width":f.style.pixelWidth||f.offsetWidth,"height":f.style.pixelHeight||f.offsetHeight}:{"container":f,"width":b,"height":d}:{"container":1,"x":a,"y":b,"width":d,"height":e}:void 0},c.pathToRelative=Da,c._engine={},c.path2curve=Ka,c.matrix=function(a,b,c,d,e,f){return new o(a,b,c,d,e,f)},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var c=N.sqrt(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof o&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*m[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new o(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,b,d){a=c.rad(a),b=b||0,d=d||0;var e=+N.cos(a).toFixed(9),f=+N.sin(a).toFixed(9);this.add(e,f,-f,e,b,d),this.add(1,0,0,1,-b,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[I.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];a.scalex=N.sqrt(b(e[0])),d(e[0]),a.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*a.shear,e[1][1]-e[0][1]*a.shear],a.scaley=N.sqrt(b(e[1])),d(e[1]),a.shear/=a.scaley;var f=-e[0][1],g=e[1][1];return 0>g?(a.rotate=c.deg(N.acos(g)),0>f&&(a.rotate=360-a.rotate)):a.rotate=c.deg(N.asin(f)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this[J]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:G)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:G)+(b.rotate?"r"+[b.rotate,0,0]:G)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(o.prototype);var Qa=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);"Apple Computer, Inc."==navigator.vendor&&(Qa&&Qa[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Qa&&Qa[1]<8?v.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({"stroke":"none"});setTimeout(function(){a.remove()})}:v.safari=ma;for(var Ra=function(){this.returnValue=!1},Sa=function(){return this.originalEvent.preventDefault()},Ta=function(){this.cancelBubble=!0},Ua=function(){return this.originalEvent.stopPropagation()},Va=function(a){var b=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,c=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;return{"x":a.clientX+c,"y":a.clientY+b}},Wa=function(){return A.doc.addEventListener?function(a,b,c,d){var e=function(a){var b=Va(a);return c.call(d,a,b.x,b.y)};if(a.addEventListener(b,e,!1),F&&L[b]){var f=function(b){for(var e=Va(b),f=b,g=0,h=b.targetTouches&&b.targetTouches.length;h>g;g++)if(b.targetTouches[g].target==a){b=b.targetTouches[g],b.originalEvent=f,b.preventDefault=Sa,b.stopPropagation=Ua;break}return c.call(d,b,e.x,e.y)};a.addEventListener(L[b],f,!1)}return function(){return a.removeEventListener(b,e,!1),F&&L[b]&&a.removeEventListener(L[b],e,!1),!0}}:A.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||A.win.event;var b=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,e=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||Ra,a.stopPropagation=a.stopPropagation||Ta,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),Xa=[],Ya=function(a){for(var c,d=a.clientX,e=a.clientY,f=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,g=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,h=Xa.length;h--;){if(c=Xa[h],F&&a.touches){for(var i,j=a.touches.length;j--;)if(i=a.touches[j],i.identifier==c.el._drag.id){d=i.clientX,e=i.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();var k,l=c.el.node,m=l.nextSibling,n=l.parentNode,o=l.style.display;A.win.opera&&n.removeChild(l),l.style.display="none",k=c.el.paper.getElementByPoint(d,e),l.style.display=o,A.win.opera&&(m?n.insertBefore(l,m):n.appendChild(l)),k&&b("raphael.drag.over."+c.el.id,c.el,k),d+=g,e+=f,b("raphael.drag.move."+c.el.id,c.move_scope||c.el,d-c.el._drag.x,e-c.el._drag.y,d,e,a)}},Za=function(a){c.unmousemove(Ya).unmouseup(Za);for(var d,e=Xa.length;e--;)d=Xa[e],d.el._drag={},b("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,a);Xa=[]},$a=c.el={},_a=K.length;_a--;)!function(a){c[a]=$a[a]=function(b,d){return c.is(b,"function")&&(this.events=this.events||[],this.events.push({"name":a,"f":b,"unbind":Wa(this.shape||this.node||A.doc,a,b,d||this)})),this},c["un"+a]=$a["un"+a]=function(b){for(var d=this.events||[],e=d.length;e--;)d[e].name!=a||!c.is(b,"undefined")&&d[e].f!=b||(d[e].unbind(),d.splice(e,1),!d.length&&delete this.events);return this}}(K[_a]);$a.data=function(a,d){var e=ka[this.id]=ka[this.id]||{};if(0==arguments.length)return e;if(1==arguments.length){if(c.is(a,"object")){for(var f in a)a[z](f)&&this.data(f,a[f]);return this}return b("raphael.data.get."+this.id,this,e[a],a),e[a]}return e[a]=d,b("raphael.data.set."+this.id,this,d,a),this},$a.removeData=function(a){return null==a?ka[this.id]={}:ka[this.id]&&delete ka[this.id][a],this},$a.getData=function(){return d(ka[this.id]||{})},$a.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},$a.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var ab=[];$a.drag=function(a,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=i.clientX,k=i.clientY,l=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,m=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;if(this._drag.id=i.identifier,F&&i.touches)for(var n,o=i.touches.length;o--;)if(n=i.touches[o],this._drag.id=n.identifier,n.identifier==this._drag.id){j=n.clientX,k=n.clientY;break}this._drag.x=j+m,this._drag.y=k+l,!Xa.length&&c.mousemove(Ya).mouseup(Za),Xa.push({"el":this,"move_scope":f,"start_scope":g,"end_scope":h}),d&&b.on("raphael.drag.start."+this.id,d),a&&b.on("raphael.drag.move."+this.id,a),e&&b.on("raphael.drag.end."+this.id,e),b("raphael.drag.start."+this.id,g||f||this,i.clientX+m,i.clientY+l,i)}return this._drag={},ab.push({"el":this,"start":i}),this.mousedown(i),this},$a.onDragOver=function(a){a?b.on("raphael.drag.over."+this.id,a):b.unbind("raphael.drag.over."+this.id)},$a.undrag=function(){for(var a=ab.length;a--;)ab[a].el==this&&(this.unmousedown(ab[a].start),ab.splice(a,1),b.unbind("raphael.drag.*."+this.id));!ab.length&&c.unmousemove(Ya).unmouseup(Za),Xa=[]},v.circle=function(a,b,d){var e=c._engine.circle(this,a||0,b||0,d||0);return this.__set__&&this.__set__.push(e),e},v.rect=function(a,b,d,e,f){var g=c._engine.rect(this,a||0,b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},v.ellipse=function(a,b,d,e){var f=c._engine.ellipse(this,a||0,b||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},v.path=function(a){a&&!c.is(a,U)&&!c.is(a[0],V)&&(a+=G);var b=c._engine.path(c.format[D](c,arguments),this);return this.__set__&&this.__set__.push(b),b},v.image=function(a,b,d,e,f){var g=c._engine.image(this,a||"about:blank",b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},v.text=function(a,b,d){var e=c._engine.text(this,a||0,b||0,I(d));return this.__set__&&this.__set__.push(e),e},v.set=function(a){!c.is(a,"array")&&(a=Array.prototype.splice.call(arguments,0,arguments.length));var b=new mb(a);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b},v.setStart=function(a){this.__set__=a||this.set()},v.setFinish=function(a){var b=this.__set__;return delete this.__set__,b},v.setSize=function(a,b){return c._engine.setSize.call(this,a,b)},v.setViewBox=function(a,b,d,e,f){return c._engine.setViewBox.call(this,a,b,d,e,f)},v.top=v.bottom=null,v.raphael=c;var bb=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(A.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(A.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{"y":h,"x":i}};v.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=A.doc.elementFromPoint(a,b);if(A.win.opera&&"svg"==e.tagName){var f=bb(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},v.getElementsByBBox=function(a){var b=this.set();return this.forEach(function(d){c.isBBoxIntersect(d.getBBox(),a)&&b.push(d)}),b},v.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},v.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},v.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},$a.isPointInside=function(a,b){var d=this.realPath=qa[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=c.transformPath(d,this.attr("transform"))),c.isPointInsidePath(d,a,b)},$a.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=qa[this.type](this),b.bboxwt=Ba(this.realPath),b.bboxwt.toString=p,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=qa[this.type](this)),b.bbox=Ba(ra(this.realPath,this.matrix)),b.bbox.toString=p,b.dirty=b.dirtyT=0),b.bbox)},$a.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},$a.glow=function(a){if("text"==this.type)return null;a=a||{};var b={"width":(a.width||10)+(+this.attr("stroke-width")||1),"fill":a.fill||!1,"opacity":a.opacity||.5,"offsetx":a.offsetx||0,"offsety":a.offsety||0,"color":a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||qa[this.type](this);f=this.matrix?ra(f,this.matrix):f;for(var g=1;c+1>g;g++)e.push(d.path(f).attr({"stroke":b.color,"fill":b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),"opacity":+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cb=function(a,b,d,e,f,g,h,i,l){return null==l?j(a,b,d,e,f,g,h,i):c.findDotsAtSegment(a,b,d,e,f,g,h,i,k(a,b,d,e,f,g,h,i,l))},db=function(a,b){return function(d,e,f){d=Ka(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;p>o;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=cb(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(b&&!m.start){if(k=cb(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!b)return k=cb(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{"x":k.x,"y":k.y,"alpha":k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:b?m:c.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={"x":k.x,"y":k.y,"alpha":k.alpha}),k}},eb=db(1),fb=db(),gb=db(0,1);c.getTotalLength=eb,c.getPointAtLength=fb,c.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return gb(a,b).end;var d=gb(a,c,1);return b?gb(d,b).end:d},$a.getTotalLength=function(){var a=this.getPath();if(a)return this.node.getTotalLength?this.node.getTotalLength():eb(a)},$a.getPointAtLength=function(a){var b=this.getPath();if(b)return fb(b,a)},$a.getPath=function(){var a,b=c._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return b&&(a=b(this)),a},$a.getSubpath=function(a,b){var d=this.getPath();if(d)return c.getSubpath(d,a,b)};var hb=c.easing_formulas={"linear":function(a){return a},"<":function(a){return R(a,1.7)},">":function(a){return R(a,.48)},"<>":function(a){var b=.48-a/1.04,c=N.sqrt(.1734+b*b),d=c-b,e=R(Q(d),1/3)*(0>d?-1:1),f=-c-b,g=R(Q(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},"backIn":function(a){var b=1.70158;return a*a*((b+1)*a-b)},"backOut":function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},"elastic":function(a){return a==!!a?a:R(2,-10*a)*N.sin((a-.075)*(2*S)/.3)+1},"bounce":function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};hb.easeIn=hb["ease-in"]=hb["<"],hb.easeOut=hb["ease-out"]=hb[">"],hb.easeInOut=hb["ease-in-out"]=hb["<>"],hb["back-in"]=hb.backIn,hb["back-out"]=hb.backOut;var ib=[],jb=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},kb=function(){for(var a=+new Date,d=0;d<ib.length;d++){var e=ib[d];if(!e.el.removed&&!e.paused){var f,g,h=a-e.start,i=e.ms,j=e.easing,k=e.from,l=e.diff,m=e.to,n=(e.t,e.el),o={},p={};if(e.initstatus?(h=(e.initstatus*e.anim.top-e.prev)/(e.percent-e.prev)*i,e.status=e.initstatus,delete e.initstatus,e.stop&&ib.splice(d--,1)):e.status=(e.prev+(e.percent-e.prev)*(h/i))/e.anim.top,!(0>h))if(i>h){var q=j(h/i);for(var r in k)if(k[z](r)){switch(da[r]){case T:f=+k[r]+q*i*l[r];break;case"colour":f="rgb("+[lb($(k[r].r+q*i*l[r].r)),lb($(k[r].g+q*i*l[r].g)),lb($(k[r].b+q*i*l[r].b))].join(",")+")";break;case"path":f=[];for(var t=0,u=k[r].length;u>t;t++){f[t]=[k[r][t][0]];for(var v=1,w=k[r][t].length;w>v;v++)f[t][v]=+k[r][t][v]+q*i*l[r][t][v];f[t]=f[t].join(H)}f=f.join(H);break;case"transform":if(l[r].real)for(f=[],t=0,u=k[r].length;u>t;t++)for(f[t]=[k[r][t][0]],v=1,w=k[r][t].length;w>v;v++)f[t][v]=k[r][t][v]+q*i*l[r][t][v];else{var x=function(a){return+k[r][a]+q*i*l[r][a]};f=[["m",x(0),x(1),x(2),x(3),x(4),x(5)]]}break;case"csv":if("clip-rect"==r)for(f=[],t=4;t--;)f[t]=+k[r][t]+q*i*l[r][t];break;default:var y=[][E](k[r]);for(f=[],t=n.paper.customAttributes[r].length;t--;)f[t]=+y[t]+q*i*l[r][t]}o[r]=f}n.attr(o),function(a,c,d){setTimeout(function(){b("raphael.anim.frame."+a,c,d)})}(n.id,n,e.anim)}else{if(function(a,d,e){setTimeout(function(){b("raphael.anim.frame."+d.id,d,e),b("raphael.anim.finish."+d.id,d,e),c.is(a,"function")&&a.call(d)})}(e.callback,n,e.anim),n.attr(m),ib.splice(d--,1),e.repeat>1&&!e.next){for(g in m)m[z](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),s(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&s(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}c.svg&&n&&n.paper&&n.paper.safari(),ib.length&&jb(kb)},lb=function(a){return a>255?255:0>a?0:a};$a.animateWith=function(a,b,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof r?d:c.animation(d,e,f,g);s(i,h,i.percents[0],null,h.attr());for(var j=0,k=ib.length;k>j;j++)if(ib[j].anim==b&&ib[j].el==a){ib[k-1].start=ib[j].start;break}return h},$a.onAnimation=function(a){return a?b.on("raphael.anim.frame."+this.id,a):b.unbind("raphael.anim.frame."+this.id),this},r.prototype.delay=function(a){var b=new r(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},r.prototype.repeat=function(a){var b=new r(this.anim,this.ms);return b.del=this.del,b.times=N.floor(O(a,0))||1,b},c.animation=function(a,b,d,e){if(a instanceof r)return a;(c.is(d,"function")||!d)&&(e=e||d||null,d=null),a=Object(a),b=+b||0;var f,g,h={};for(g in a)a[z](g)&&_(g)!=g&&_(g)+"%"!=g&&(f=!0,h[g]=a[g]);return f?(d&&(h.easing=d),e&&(h.callback=e),new r({"100":h},b)):new r(a,b)},$a.animate=function(a,b,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof r?a:c.animation(a,b,d,e);return s(g,f,g.percents[0],null,f.attr()),f},$a.setTime=function(a,b){return a&&null!=b&&this.status(a,P(b,a.ms)/a.ms),this},$a.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return s(a,this,-1,P(b,1)),this;for(c=ib.length;c>f;f++)if(d=ib[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({"anim":d.anim,"status":d.status})}return a?0:e},$a.pause=function(a){for(var c=0;c<ib.length;c++)ib[c].el.id!=this.id||a&&ib[c].anim!=a||b("raphael.anim.pause."+this.id,this,ib[c].anim)!==!1&&(ib[c].paused=!0);return this},$a.resume=function(a){for(var c=0;c<ib.length;c++)if(ib[c].el.id==this.id&&(!a||ib[c].anim==a)){var d=ib[c];b("raphael.anim.resume."+this.id,this,d.anim)!==!1&&(delete d.paused,this.status(d.anim,d.status))}return this},$a.stop=function(a){for(var c=0;c<ib.length;c++)ib[c].el.id!=this.id||a&&ib[c].anim!=a||b("raphael.anim.stop."+this.id,this,ib[c].anim)!==!1&&ib.splice(c--,1);return this},b.on("raphael.remove",t),b.on("raphael.clear",t),$a.toString=function(){return"Rapha\xebl\u2019s object"};var mb=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;c>b;b++)!a[b]||a[b].constructor!=$a.constructor&&a[b].constructor!=mb||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},nb=mb.prototype;nb.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],!a||a.constructor!=$a.constructor&&a.constructor!=mb||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},nb.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},nb.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var ob in $a)$a[z](ob)&&(nb[ob]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][D](c,b)})}}(ob));return nb.attr=function(a,b){if(a&&c.is(a,V)&&c.is(a[0],"object"))for(var d=0,e=a.length;e>d;d++)this.items[d].attr(a[d]);else for(var f=0,g=this.items.length;g>f;f++)this.items[f].attr(a,b);return this},nb.clear=function(){for(;this.length;)this.pop()},nb.splice=function(a,b,c){a=0>a?O(this.length+a,0):a,b=O(0,P(this.length-a,b));var d,e=[],f=[],g=[];for(d=2;d<arguments.length;d++)g.push(arguments[d]);for(d=0;b>d;d++)f.push(this[a+d]);for(;d<this.length-a;d++)e.push(this[a+d]);var h=g.length;for(d=0;d<h+e.length;d++)this.items[a+d]=this[a+d]=h>d?g[d]:e[d-h];for(d=this.items.length=this.length-=b-h;this[d];)delete this[d++];return new mb(f)},nb.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},nb.animate=function(a,b,d,e){(c.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=c.is(d,U)?d:g;var k=c.animation(a,b,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k),this.items[i]&&!this.items[i].removed||h--;return this},nb.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},nb.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=P[D](0,a),b=P[D](0,b),c=O[D](0,c),d=O[D](0,d),{"x":a,"y":b,"x2":c,"y2":d,"width":c-a,"height":d-b}},nb.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},nb.toString=function(){return"Rapha\xebl\u2018s set"},nb.glow=function(a){var b=this.paper.set();return this.forEach(function(c,d){var e=c.glow(a);null!=e&&e.forEach(function(a,c){b.push(a)})}),b},nb.isPointInside=function(a,b){var c=!1;return this.forEach(function(d){return d.isPointInside(a,b)?(c=!0,!1):void 0}),c},c.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={"w":a.w,"face":{},"glyphs":{}},c=a.face["font-family"];for(var d in a.face)a.face[z](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=aa(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[z](e)){var f=a.glyphs[e];if(b.glyphs[e]={"w":f.w,"k":{},"d":f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{"l":"L","c":"C","x":"z","t":"m","r":"l","v":"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[z](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},v.getFont=function(a,b,d,e){if(e=e||"normal",d=d||"normal",b=+b||{"normal":400,"bold":700,"lighter":300,"bolder":800}[b]||400,c.fonts){var f=c.fonts[a];if(!f){var g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,G)+"(\\s|$)","i");for(var h in c.fonts)if(c.fonts[z](h)&&g.test(h)){f=c.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=b||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},v.print=function(a,b,d,e,f,g,h,i){g=g||"middle",h=O(P(h||0,1),-1),i=O(P(i||1,3),1);var j,k=I(d)[J](G),l=0,m=0,n=G;if(c.is(e,"string")&&(e=this.getFont(e)),e){j=(f||16)/e.face["units-per-em"];for(var o=e.face.bbox[J](w),p=+o[0],q=o[3]-o[1],r=0,s=+o[1]+("baseline"==g?q+ +e.face.descent:q/2),t=0,u=k.length;u>t;t++){if("\n"==k[t])l=0,x=0,m=0,r+=q*i;else{var v=m&&e.glyphs[k[t-1]]||{},x=e.glyphs[k[t]];l+=m?(v.w||e.w)+(v.k&&v.k[k[t]]||0)+e.w*h:0,m=1}x&&x.d&&(n+=c.transformPath(x.d,["t",l*j,r*j,"s",j,j,p,s,"t",(a-p)/j,(b-s)/j]))}}return this.path(n).attr({"fill":"#000","stroke":"none"})},v.add=function(a){if(c.is(a,"array"))for(var b,d=this.set(),e=0,f=a.length;f>e;e++)b=a[e]||{},x[z](b.type)&&d.push(this[b.type]().attr(b));return d},c.format=function(a,b){var d=c.is(b,V)?[0][E](b):arguments;return a&&c.is(a,U)&&d.length-1&&(a=a.replace(y,function(a,b){return null==d[++b]?G:d[b]})),a||G},c.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),c.ninja=function(){return B.was?A.win.Raphael=B.is:delete Raphael,c},c.st=nb,function(a,b,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,d=function(){a.removeEventListener(b,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b.on("raphael.DOMload",function(){u=!0}),function(){if(c.svg){var a="hasOwnProperty",b=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=c.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={"block":"M5,0 0,2.5 5,5z","classic":"M5,0 0,2.5 5,5 3.5,3 3.5,2z","diamond":"M2.5,0 5,2.5 2.5,5 0,2.5z","open":"M6,1 1,3.5 6,6","oval":"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};c.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var q=function(d,e){if(e){"string"==typeof d&&(d=q(d));for(var f in e)e[a](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(n,f.substring(6),b(e[f])):d.setAttribute(f,b(e[f])))}else d=c._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(a,e){var j="linear",k=a.id+e,m=.5,n=.5,o=a.node,p=a.paper,r=o.style,s=c._g.doc.getElementById(k);if(!s){if(e=b(e).replace(c._radial_gradient,function(a,b,c){if(j="radial",b&&c){m=d(b),n=d(c);var e=2*(n>.5)-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&.5!=n&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/),"linear"==j){var t=e.shift();if(t=-d(t),isNaN(t))return null;var u=[0,0,f.cos(c.rad(t)),f.sin(c.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=c._parseDots(e);if(!w)return null;if(k=k.replace(/[\(\)\s,\xb0#]/g,"_"),a.gradient&&k!=a.gradient.id&&(p.defs.removeChild(a.gradient),delete a.gradient),!a.gradient){s=q(j+"Gradient",{"id":k}),a.gradient=s,q(s,"radial"==j?{"fx":m,"fy":n}:{"x1":u[0],"y1":u[1],"x2":u[2],"y2":u[3],"gradientTransform":a.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;y>x;x++)s.appendChild(q("stop",{"offset":w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}return q(o,{"fill":"url(#"+k+")","opacity":1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1,1},s=function(a){var b=a.getBBox(1);q(a.pattern,{"patternTransform":a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,m=b(e).toLowerCase().split("-"),n=d.paper,r=f?"end":"start",s=d.node,t=d.attrs,u=t["stroke-width"],v=m.length,w="classic",x=3,y=3,z=5;v--;)switch(m[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=m[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={"fill":"none","stroke":t.stroke}):(j=i=x/2,k={"fill":t.stroke,"stroke":"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+r+w+x+y;c._g.doc.getElementById(A)?p[A]++:(n.defs.appendChild(q(q("path"),{"stroke-linecap":"round","d":o[w],"id":A})),p[A]=1);var C,D=c._g.doc.getElementById(B);D?(p[B]++,C=D.getElementsByTagName("use")[0]):(D=q(q("marker"),{"id":B,"markerHeight":y,"markerWidth":x,"orient":"auto","refX":j,"refY":y/2}),C=q(q("use"),{"xlink:href":"#"+A,"transform":(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),n.defs.appendChild(D),p[B]=1),q(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(t.path)-E*u):(g=E*u,h=c.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+r]="url(#"+B+")",(h||g)&&(k.d=c.getSubpath(t.path,g,h)),q(s,k),d._.arrows[r+"Path"]=A,d._.arrows[r+"Marker"]=B,d._.arrows[r+"dx"]=E,d._.arrows[r+"Type"]=w,d._.arrows[r+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(t.path)-g):(g=0,h=c.getTotalLength(t.path)-(d._.arrows.enddx*u||0)),d._.arrows[r+"Path"]&&q(s,{"d":c.getSubpath(t.path,g,h)}),delete d._.arrows[r+"Path"],delete d._.arrows[r+"Marker"],delete d._.arrows[r+"dx"],delete d._.arrows[r+"Type"],delete d._.arrows[r+"String"];for(k in p)if(p[a](k)&&!p[k]){var F=c._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},u={"":[0],"none":[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,c,d){if(c=u[b(c).toLowerCase()]){for(var e=a.attrs["stroke-width"]||"1",f={"round":e,"square":e,"butt":0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=c.length;h--;)g[h]=c[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[a](o)){if(!c._availableAttrs[a](o))continue;var p=f[o];switch(k[o]=p,o){case"blur":d.blur(p);break;case"title":var u=i.getElementsByTagName("title");if(u.length&&(u=u[0]))u.firstChild.nodeValue=p;else{u=q("title");var w=c._g.doc.createTextNode(p);u.appendChild(w),i.appendChild(u)}break;case"href":case"target":var x=i.parentNode;if("a"!=x.tagName.toLowerCase()){var z=q("a");x.insertBefore(z,i),z.appendChild(i),x=z}"target"==o?x.setAttributeNS(n,"show","blank"==p?"new":p):x.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var A=b(p).split(j);if(4==A.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var B=q("clipPath"),C=q("rect");B.id=c.createUUID(),q(C,{"x":A[0],"y":A[1],"width":A[2],"height":A[3]}),B.appendChild(C),d.paper.defs.appendChild(B),q(i,{"clip-path":"url(#"+B.id+")"}),d.clip=C}if(!p){var D=i.getAttribute("clip-path");if(D){var E=c._g.doc.getElementById(D.replace(/(^url\(#|\)$)/g,l));E&&E.parentNode.removeChild(E),q(i,{"clip-path":l}),delete d.clip}}break;case"path":"path"==d.type&&(q(i,{"d":p?k.path=c._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":if(i.setAttribute(o,p),d._.dirty=1,!k.fx)break;o="x",p=k.x;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if("rx"==o&&"rect"==d.type)break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":if(i.setAttribute(o,p),d._.dirty=1,!k.fy)break;o="y",p=k.y;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if("ry"==o&&"rect"==d.type)break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":"rect"==d.type?q(i,{"rx":p,"ry":p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(n,"href",p);break;case"stroke-width":(1!=d._.sx||1!=d._.sy)&&(p/=g(h(d._.sx),h(d._.sy))||1),d.paper._vbSize&&(p*=d.paper._vbSize),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var F=b(p).match(c._ISURL);if(F){B=q("pattern");var G=q("image");B.id=c.createUUID(),q(B,{"x":0,"y":0,"patternUnits":"userSpaceOnUse","height":1,"width":1}),q(G,{"x":0,"y":0,"xlink:href":F[1]}),B.appendChild(G),function(a){c._preload(F[1],function(){var b=this.offsetWidth,c=this.offsetHeight;q(a,{"width":b,"height":c}),q(G,{"width":b,"height":c}),d.paper.safari()})}(B),d.paper.defs.appendChild(B),q(i,{"fill":"url(#"+B.id+")"}),d.pattern=B,d.pattern&&s(d);break}var H=c.getRGB(p);if(H.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=b(p).charAt())&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var I=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(I){var J=I.getElementsByTagName("stop");q(J[J.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}}else delete f.gradient,delete k.gradient,!c.is(k.opacity,"undefined")&&c.is(f.opacity,"undefined")&&q(i,{"opacity":k.opacity}),!c.is(k["fill-opacity"],"undefined")&&c.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});H[a]("opacity")&&q(i,{"fill-opacity":H.opacity>1?H.opacity/100:H.opacity});case"stroke":
H=c.getRGB(p),i.setAttribute(o,H.hex),"stroke"==o&&H[a]("opacity")&&q(i,{"stroke-opacity":H.opacity>1?H.opacity/100:H.opacity}),"stroke"==o&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=b(p).charAt())&&r(d,p);break;case"opacity":k.gradient&&!k[a]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){I=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),I&&(J=I.getElementsByTagName("stop"),q(J[J.length-1],{"stop-opacity":p}));break}default:"font-size"==o&&(p=e(p,10)+"px");var K=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[K]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if("text"==d.type&&(f[a]("text")||f[a]("font")||f[a]("font-size")||f[a]("x")||f[a]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(c._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[a]("text")){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var j,k=b(f.text).split("\n"),m=[],n=0,o=k.length;o>n;n++)j=q("tspan"),n&&q(j,{"dy":i*x,"x":g.x}),j.appendChild(c._g.doc.createTextNode(k[n])),h.appendChild(j),m[n]=j}else for(m=h.getElementsByTagName("tspan"),n=0,o=m.length;o>n;n++)n?q(m[n],{"dy":i*x,"x":g.x}):q(m[0],{"dy":0});q(h,{"x":g.x,"y":g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&c.is(r,"finite")&&q(m[0],{"dy":r})}},z=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.matrix=c.matrix(),this.realPath=null,this.paper=b,this.attrs=this.attrs||{},this._={"transform":[],"sx":1,"sy":1,"deg":0,"dx":0,"dy":0,"dirty":1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},A=c.el;z.prototype=A,A.constructor=z,c._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);return d.type="path",w(d,{"fill":"none","stroke":"#000","path":a}),d},A.rotate=function(a,c,e){if(this.removed)return this;if(a=b(a).split(j),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),null==c||null==e){var f=this.getBBox(1);c=f.x+f.width/2,e=f.y+f.height/2}return this.transform(this._.transform.concat([["r",a,c,e]])),this},A.scale=function(a,c,e,f){if(this.removed)return this;if(a=b(a).split(j),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,c,e,f]])),this},A.translate=function(a,c){return this.removed?this:(a=b(a).split(j),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,this.transform(this._.transform.concat([["t",a,c]])),this)},A.transform=function(b){var d=this._;if(null==b)return d.transform;if(c._extractTransform(this,b),this.clip&&q(this.clip,{"transform":this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{"transform":this.matrix}),1!=d.sx||1!=d.sy){var e=this.attrs[a]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},A.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},A.remove=function(){if(!this.removed&&this.node.parentNode){var a=this.paper;a.__set__&&a.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&a.defs.removeChild(this.gradient),c._tear(this,a),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var b in this)this[b]="function"==typeof this[b]?c._removedFactory(b):null;this.removed=!0}},A._getBBox=function(){if("none"==this.node.style.display){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}return a&&this.hide(),b},A.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&c.is(b,"string")){if("fill"==b&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==b)return this._.transform;for(var g=b.split(j),h={},i=0,l=g.length;l>i;i++)b=g[i],b in this.attrs?h[b]=this.attrs[b]:c.is(this.paper.customAttributes[b],"function")?h[b]=this.paper.customAttributes[b].def:h[b]=c._availableAttrs[b];return l-1?h:h[g[0]]}if(null==d&&c.is(b,"array")){for(h={},i=0,l=b.length;l>i;i++)h[b[i]]=this.attr(b[i]);return h}if(null!=d){var m={};m[b]=d}else null!=b&&c.is(b,"object")&&(m=b);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[a](n)&&m[a](n)&&c.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[a](p)&&(m[p]=o[p])}return w(this,m),this},A.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var a=this.paper;return a.top!=this&&c._tofront(this,a),this},A.toBack=function(){if(this.removed)return this;var a=this.node.parentNode;"a"==a.tagName.toLowerCase()?a.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):a.firstChild!=this.node&&a.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper);this.paper;return this},A.insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;return b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this},A.insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;return b.parentNode.insertBefore(this.node,b),c._insertbefore(this,a,this.paper),this},A.blur=function(a){var b=this;if(0!==+a){var d=q("filter"),e=q("feGaussianBlur");b.attrs.blur=a,d.id=c.createUUID(),q(e,{"stdDeviation":+a||1.5}),d.appendChild(e),b.paper.defs.appendChild(d),b._blur=d,q(b.node,{"filter":"url(#"+d.id+")"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter");return b},c._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);return f.attrs={"cx":b,"cy":c,"r":d,"fill":"none","stroke":"#000"},f.type="circle",q(e,f.attrs),f},c._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);return h.attrs={"x":b,"y":c,"width":d,"height":e,"r":f||0,"rx":f||0,"ry":f||0,"fill":"none","stroke":"#000"},h.type="rect",q(g,h.attrs),h},c._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);return g.attrs={"cx":b,"cy":c,"rx":d,"ry":e,"fill":"none","stroke":"#000"},g.type="ellipse",q(f,g.attrs),g},c._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{"x":c,"y":d,"width":e,"height":f,"preserveAspectRatio":"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);return h.attrs={"x":c,"y":d,"width":e,"height":f,"src":b},h.type="image",h},c._engine.text=function(a,b,d,e){var f=q("text");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);return g.attrs={"x":b,"y":d,"text-anchor":"middle","text":e,"font":c._availableAttrs.font,"stroke":"none","fill":"#000"},g.type="text",w(g,g.attrs),g},c._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a&&a.container,d=a.x,e=a.y,f=a.width,g=a.height;if(!b)throw new Error("SVG container not found.");var h,i=q("svg"),j="overflow:hidden;";return d=d||0,e=e||0,f=f||512,g=g||342,q(i,{"height":g,"version":1.1,"width":f,"xmlns":"http://www.w3.org/2000/svg"}),1==b?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",c._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i)),b=new c._Paper,b.width=f,b.height=g,b.canvas=i,b.clear(),b._left=b._top=0,h&&(b.renderfix=function(){}),b.renderfix(),b},c._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=g(c/this.width,d/this.height),j=this.top,l=e?"xMidYMid meet":"xMinYMin";for(null==a?(this._vbSize&&(i=1),delete this._vbSize,f="0 0 "+this.width+m+this.height):(this._vbSize=i,f=a+m+b+m+c+m+d),q(this.canvas,{"viewBox":f,"preserveAspectRatio":l});i&&j;)h="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":h}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},c.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},c.prototype.clear=function(){c.eve("raphael.clear",this);for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(c._g.doc.createTextNode("Created with Rapha\xebl "+c.version)),a.appendChild(this.desc),a.appendChild(this.defs=q("defs"))},c.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null};var B=c.st;for(var C in A)A[a](C)&&!B[a](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}}(),function(){if(c.vml){var a="hasOwnProperty",b=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=c.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={"M":"m","L":"l","C":"c","Z":"x","m":"t","l":"r","c":"v","z":"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={"path":1,"rect":1,"image":1},w={"circle":1,"ellipse":1},x=function(a){var d=/[ahqstv]/gi,e=c._pathToAbsolute;if(b(a).match(d)&&(e=c._path2curve),d=/[clmz]/g,e==c._pathToAbsolute&&!b(a).match(d)){var g=b(a).replace(q,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=p[b];return c.replace(s,function(a){e&&2==d.length&&(g+=d+p["m"==b?"l":"L"],d=[]),d.push(f(a*u))}),g+d});return g}var h,i,j=e(a);g=[];for(var k=0,l=j.length;l>k;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,r=h.length;r>m;m++)i+=f(h[m]*u)+(m!=r-1?",":o);g.push(i)}return g.join(n)},y=function(a,b,d){var e=c.matrix();return e.rotate(-a,.5,.5),{"dx":e.x(b,d),"dy":e.y(b,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q=u/b,r=u/c;if(m.visibility="hidden",b&&c){if(l.coordsize=i(q)+n+i(r),m.rotation=f*(0>b*c?-1:1),f){var s=y(f,d,e);d=s.dx,e=s.dy}if(0>b&&(p+="x"),0>c&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-q+n+e*-r,k||g.fillsize){var t=l.getElementsByTagName(j);t=t&&t[0],l.removeChild(t),k&&(s=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),t.position=s.dx*o+n+s.dy*o),g.fillsize&&(t.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(t)}m.visibility="visible"}};c.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};var A=function(a,c,d){for(var e=b(c).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s=e;for(var t in i)i[a](t)&&(m[t]=i[t]);if(q&&(m.path=c._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(l.path=x(~b(m.path).toLowerCase().indexOf("r")?c._pathToAbsolute(m.path):m.path),"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),r){var y=+m.cx,B=+m.cy,D=+m.rx||+m.r||0,E=+m.ry||+m.r||0;l.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-D)*u),f((B-E)*u),f((y+D)*u),f((B+E)*u),f(y*u)),e._.dirty=1}if("clip-rect"in i){var G=b(i["clip-rect"]).split(k);if(4==G.length){G[2]=+G[2]+ +G[0],G[3]=+G[3]+ +G[1];var H=l.clipRect||c._g.doc.createElement("div"),I=H.style;I.clip=c.format("rect({1}px {2}px {3}px {0}px)",G),l.clipRect||(I.position="absolute",I.top=0,I.left=0,I.width=e.paper.width+"px",I.height=e.paper.height+"px",l.parentNode.insertBefore(H,l),H.appendChild(l),l.clipRect=H)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var J=e.textpath.style;i.font&&(J.font=i.font),i["font-family"]&&(J.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(J.fontSize=i["font-size"]),i["font-weight"]&&(J.fontWeight=i["font-weight"]),i["font-style"]&&(J.fontStyle=i["font-style"])}if("arrow-start"in i&&A(s,i["arrow-start"]),"arrow-end"in i&&A(s,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var K=l.getElementsByTagName(j),L=!1;if(K=K&&K[0],!K&&(L=K=F(j)),"image"==e.type&&i.src&&(K.src=i.src),i.fill&&(K.on=!0),(null==K.on||"none"==i.fill||null===i.fill)&&(K.on=!1),K.on&&i.fill){var M=b(i.fill).match(c._ISURL);if(M){K.parentNode==l&&l.removeChild(K),K.rotate=!0,K.src=M[1],K.type="tile";var N=e.getBBox(1);K.position=N.x+n+N.y,e._.fillpos=[N.x,N.y],c._preload(M[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else K.color=c.getRGB(i.fill).hex,K.src=o,K.type="solid",c.getRGB(i.fill).error&&(s.type in{"circle":1,"ellipse":1}||"r"!=b(i.fill).charAt())&&C(s,i.fill,K)&&(m.fill="none",m.gradient=i.fill,K.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var O=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+c.getRGB(i.fill).o+1||2)-1);O=h(g(O,0),1),K.opacity=O,K.src&&(K.color="none")}l.appendChild(K);var P=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],Q=!1;!P&&(Q=P=F("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(P.on=!0),("none"==i.stroke||null===i.stroke||null==P.on||0==i.stroke||0==i["stroke-width"])&&(P.on=!1);var R=c.getRGB(i.stroke);P.on&&i.stroke&&(P.color=R.hex),O=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+R.o+1||2)-1);var S=.75*(d(i["stroke-width"])||1);if(O=h(g(O,0),1),null==i["stroke-width"]&&(S=m["stroke-width"]),i["stroke-width"]&&(P.weight=S),S&&1>S&&(O*=S)&&(P.weight=1),P.opacity=O,i["stroke-linejoin"]&&(P.joinstyle=i["stroke-linejoin"]||"miter"),P.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(P.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),"stroke-dasharray"in i){var T={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};P.dashstyle=T[a](i["stroke-dasharray"])?T[i["stroke-dasharray"]]:o}Q&&l.appendChild(P)}if("text"==s.type){s.paper.canvas.style.display=o;var U=s.paper.span,V=100,W=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=U.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),W=d(m["font-size"]||W&&W[0])||10,p.fontSize=W*V+"px",s.textpath.string&&(U.innerHTML=b(s.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var X=U.getBoundingClientRect();s.W=m.w=(X.right-X.left)/V,s.H=m.h=(X.bottom-X.top)/V,s.X=m.x,s.Y=m.y+s.H/2,("x"in i||"y"in i)&&(s.path.v=c.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));for(var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,$=Y.length;$>Z;Z++)if(Y[Z]in i){s._.dirty=1;break}switch(m["text-anchor"]){case"start":s.textpath.style["v-text-align"]="left",s.bbx=s.W/2;break;case"end":s.textpath.style["v-text-align"]="right",s.bbx=-s.W/2;break;default:s.textpath.style["v-text-align"]="center",s.bbx=0}s.textpath.style["v-text-kern"]=!0}},C=function(a,f,g){a.attrs=a.attrs||{};var h=(a.attrs,Math.pow),i="linear",j=".5 .5";if(a.attrs.gradient=f,f=b(f).replace(c._radial_gradient,function(a,b,c){return i="radial",b&&c&&(b=d(b),c=d(c),h(b-.5,2)+h(c-.5,2)>.25&&(c=e.sqrt(.25-h(b-.5,2))*(2*(c>.5)-1)+.5),j=b+n+c),o}),f=f.split(/\s*\-\s*/),"linear"==i){var k=f.shift();if(k=-d(k),isNaN(k))return null}var l=c._parseDots(f);if(!l)return null;if(a=a.shape||a.node,l.length){a.removeChild(g),g.on=!0,g.method="none",g.color=l[0].color,g.color2=l[l.length-1].color;for(var m=[],p=0,q=l.length;q>p;p++)l[p].offset&&m.push(l[p].offset+n+l[p].color);g.colors=m.length?m.join():"0% "+g.color,"radial"==i?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=j,g.angle=0):(g.type="gradient",g.angle=(270-k)%360),a.appendChild(g)}return 1},D=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=b,this.matrix=c.matrix(),this._={"transform":[],"sx":1,"sy":1,"dx":0,"dy":0,"deg":0,"dirty":1,"dirtyT":1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},E=c.el;D.prototype=E,E.constructor=D,E.transform=function(a){if(null==a)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:o;e&&(d=a=b(a).replace(/\.{3}|\u2026/g,this._.transform||o)),c._extractTransform(this,f+a);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~b(this.attrs.fill).indexOf("-"),l=!b(this.attrs.fill).indexOf("url(");if(h.translate(1,1),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;j.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else j.style.filter=o,z(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=o,i.matrix=b(h),i.offset=h.offset();return d&&(this._.transform=d),this},E.rotate=function(a,c,e){if(this.removed)return this;if(null!=a){if(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),null==c||null==e){var f=this.getBBox(1);c=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,c,e]])),this}},E.translate=function(a,c){return this.removed?this:(a=b(a).split(k),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=c),this.transform(this._.transform.concat([["t",a,c]])),this)},E.scale=function(a,c,e,f){if(this.removed)return this;if(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,c,e,f]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=o),this},E._getBBox=function(){return this.removed?{}:{"x":this.X+(this.bbx||0)-this.W/2,"y":this.Y-this.H,"width":this.W,"height":this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),c.eve.unbind("raphael.*.*."+this.id),c._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0}},E.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==d&&c.is(b,"string")){if(b==j&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var g=b.split(k),h={},i=0,m=g.length;m>i;i++)b=g[i],b in this.attrs?h[b]=this.attrs[b]:c.is(this.paper.customAttributes[b],"function")?h[b]=this.paper.customAttributes[b].def:h[b]=c._availableAttrs[b];return m-1?h:h[g[0]]}if(this.attrs&&null==d&&c.is(b,"array")){for(h={},i=0,m=b.length;m>i;i++)h[b[i]]=this.attr(b[i]);return h}var n;null!=d&&(n={},n[b]=d),null==d&&c.is(b,"object")&&(n=b);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[a](o)&&n[a](o)&&c.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[a](q)&&(n[q]=p[q])}n.text&&"text"==this.type&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&c._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper)),this)},E.insertAfter=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[a.length-1]),a.node.nextSibling?a.node.parentNode.insertBefore(this.node,a.node.nextSibling):a.node.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this)},E.insertBefore=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[0]),a.node.parentNode.insertBefore(this.node,a.node),c._insertbefore(this,a,this.paper),this)},E.blur=function(a){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(r,o),0!==+a?(this.attrs.blur=a,b.filter=d+n+m+".Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",f(+a||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this},c._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={"fill":"none","stroke":"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");return f.on=!0,c.appendChild(f),d.skew=f,d.transform(o),d},c._engine.rect=function(a,b,d,e,f,g){var h=c._rectPath(b,d,e,f,g),i=a.path(h),j=i.attrs;return i.X=j.x=b,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},c._engine.ellipse=function(a,b,c,d,e){var f=a.path();f.attrs;return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",B(f,{"cx":b,"cy":c,"rx":d,"ry":e}),f},c._engine.circle=function(a,b,c,d){var e=a.path();e.attrs;return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",B(e,{"cx":b,"cy":c,"r":d}),e},c._engine.image=function(a,b,d,e,f,g){var h=c._rectPath(d,e,f,g),i=a.path(h).attr({"stroke":"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];return k.src=b,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=b,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0),i},c._engine.text=function(a,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=c.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=b(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,a),l={"fill":"#000","stroke":"none","font":c._availableAttrs.font,"text":g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=b(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),a.canvas.appendChild(h);var m=F("skew");return m.on=!0,h.appendChild(m),k.skew=m,k.transform(o),k},c._engine.setSize=function(a,b){var d=this.canvas.style;return this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),d.width=a,d.height=b,d.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&c._engine.setViewBox.apply(this,this._viewBox),this},c._engine.setViewBox=function(a,b,d,e,f){c.eve("raphael.setViewBox",this,this._viewBox,[a,b,d,e,f]);var h,i,j=this.width,k=this.height,l=1/g(d/j,e/k);return f&&(h=k/e,i=j/d,j>d*h&&(a-=(j-d*h)/2/h),k>e*i&&(b-=(k-e*i)/2/i)),this._viewBox=[a,b,d,e,!!f],this._viewBoxShift={"dx":-a,"dy":-b,"scale":l},this.forEach(function(a){a.transform("...")}),this};var F;c._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},c._engine.initWin(c._g.win),c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a.container,d=a.height,e=a.width,f=a.x,g=a.y;if(!b)throw new Error("VML container not found.");var h=new c._Paper,i=h.canvas=c._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*u+n+1e3*u,h.coordorigin="0 0",h.span=c._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==b?(c._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i),h.renderfix=function(){},h},c.prototype.clear=function(){c.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=c._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},c.prototype.remove=function(){c.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;return!0};var G=c.st;for(var H in E)E[a](H)&&!G[a](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}}(),B.was?A.win.Raphael=c:Raphael=c,c});
!function(a){a.color={},a.color.make=function(b,c,d,e){var f={};return f.r=b||0,f.g=c||0,f.b=d||0,f.a=null!=e?e:1,f.add=function(a,b){for(var c=0;c<a.length;++c)f[a.charAt(c)]+=b;return f.normalize()},f.scale=function(a,b){for(var c=0;c<a.length;++c)f[a.charAt(c)]*=b;return f.normalize()},f.toString=function(){return f.a>=1?"rgb("+[f.r,f.g,f.b].join(",")+")":"rgba("+[f.r,f.g,f.b,f.a].join(",")+")"},f.normalize=function(){function a(a,b,c){return a>b?a:b>c?c:b}return f.r=a(0,parseInt(f.r),255),f.g=a(0,parseInt(f.g),255),f.b=a(0,parseInt(f.b),255),f.a=a(0,f.a,1),f},f.clone=function(){return a.color.make(f.r,f.b,f.g,f.a)},f.normalize()},a.color.extract=function(b,c){var d;do{if(d=b.css(c).toLowerCase(),""!=d&&"transparent"!=d)break;b=b.parent()}while(b.length&&!a.nodeName(b.get(0),"body"));return"rgba(0, 0, 0, 0)"==d&&(d="transparent"),a.color.parse(d)},a.color.parse=function(c){var d,e=a.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return e(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10));if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c))return e(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]));if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return e(2.55*parseFloat(d[1]),2.55*parseFloat(d[2]),2.55*parseFloat(d[3]));if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c))return e(2.55*parseFloat(d[1]),2.55*parseFloat(d[2]),2.55*parseFloat(d[3]),parseFloat(d[4]));if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return e(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16));if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return e(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16));var f=a.trim(c).toLowerCase();return"transparent"==f?e(255,255,255,0):(d=b[f]||[0,0,0],e(d[0],d[1],d[2]))};var b={"aqua":[0,255,255],"azure":[240,255,255],"beige":[245,245,220],"black":[0,0,0],"blue":[0,0,255],"brown":[165,42,42],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgrey":[169,169,169],"darkgreen":[0,100,0],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkviolet":[148,0,211],"fuchsia":[255,0,255],"gold":[255,215,0],"green":[0,128,0],"indigo":[75,0,130],"khaki":[240,230,140],"lightblue":[173,216,230],"lightcyan":[224,255,255],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightyellow":[255,255,224],"lime":[0,255,0],"magenta":[255,0,255],"maroon":[128,0,0],"navy":[0,0,128],"olive":[128,128,0],"orange":[255,165,0],"pink":[255,192,203],"purple":[128,0,128],"violet":[128,0,128],"red":[255,0,0],"silver":[192,192,192],"white":[255,255,255],"yellow":[255,255,0]}}(jQuery),function(a){function b(b,c){var d=c.children("."+b)[0];if(null==d&&(d=document.createElement("canvas"),d.className=b,a(d).css({"direction":"ltr","position":"absolute","left":0,"top":0}).appendTo(c),!d.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");d=window.G_vmlCanvasManager.initElement(d)}this.element=d;var e=this.context=d.getContext("2d"),f=window.devicePixelRatio||1,g=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;this.pixelRatio=f/g,this.resize(c.width(),c.height()),this.textContainer=null,this.text={},this._textCache={}}function c(c,e,f,g){function h(a,b){b=[qa].concat(b);for(var c=0;c<a.length;++c)a[c].apply(this,b)}function i(){for(var c={"Canvas":b},d=0;d<g.length;++d){var e=g[d];e.init(qa,c),e.options&&a.extend(!0,ea,e.options)}}function j(b){a.extend(!0,ea,b),b&&b.colors&&(ea.colors=b.colors),null==ea.xaxis.color&&(ea.xaxis.color=a.color.parse(ea.grid.color).scale("a",.22).toString()),null==ea.yaxis.color&&(ea.yaxis.color=a.color.parse(ea.grid.color).scale("a",.22).toString()),null==ea.xaxis.tickColor&&(ea.xaxis.tickColor=ea.grid.tickColor||ea.xaxis.color),null==ea.yaxis.tickColor&&(ea.yaxis.tickColor=ea.grid.tickColor||ea.yaxis.color),null==ea.grid.borderColor&&(ea.grid.borderColor=ea.grid.color),null==ea.grid.tickColor&&(ea.grid.tickColor=a.color.parse(ea.grid.color).scale("a",.22).toString());var d,e,f,g=c.css("font-size"),i=g?+g.replace("px",""):13,j={"style":c.css("font-style"),"size":Math.round(.8*i),"variant":c.css("font-variant"),"weight":c.css("font-weight"),"family":c.css("font-family")};for(f=ea.xaxes.length||1,d=0;f>d;++d)e=ea.xaxes[d],e&&!e.tickColor&&(e.tickColor=e.color),e=a.extend(!0,{},ea.xaxis,e),ea.xaxes[d]=e,e.font&&(e.font=a.extend({},j,e.font),e.font.color||(e.font.color=e.color),e.font.lineHeight||(e.font.lineHeight=Math.round(1.15*e.font.size)));for(f=ea.yaxes.length||1,d=0;f>d;++d)e=ea.yaxes[d],e&&!e.tickColor&&(e.tickColor=e.color),e=a.extend(!0,{},ea.yaxis,e),ea.yaxes[d]=e,e.font&&(e.font=a.extend({},j,e.font),e.font.color||(e.font.color=e.color),e.font.lineHeight||(e.font.lineHeight=Math.round(1.15*e.font.size)));for(ea.xaxis.noTicks&&null==ea.xaxis.ticks&&(ea.xaxis.ticks=ea.xaxis.noTicks),ea.yaxis.noTicks&&null==ea.yaxis.ticks&&(ea.yaxis.ticks=ea.yaxis.noTicks),ea.x2axis&&(ea.xaxes[1]=a.extend(!0,{},ea.xaxis,ea.x2axis),ea.xaxes[1].position="top",null==ea.x2axis.min&&(ea.xaxes[1].min=null),null==ea.x2axis.max&&(ea.xaxes[1].max=null)),ea.y2axis&&(ea.yaxes[1]=a.extend(!0,{},ea.yaxis,ea.y2axis),ea.yaxes[1].position="right",null==ea.y2axis.min&&(ea.yaxes[1].min=null),null==ea.y2axis.max&&(ea.yaxes[1].max=null)),ea.grid.coloredAreas&&(ea.grid.markings=ea.grid.coloredAreas),ea.grid.coloredAreasColor&&(ea.grid.markingsColor=ea.grid.coloredAreasColor),ea.lines&&a.extend(!0,ea.series.lines,ea.lines),ea.points&&a.extend(!0,ea.series.points,ea.points),ea.bars&&a.extend(!0,ea.series.bars,ea.bars),null!=ea.shadowSize&&(ea.series.shadowSize=ea.shadowSize),null!=ea.highlightColor&&(ea.series.highlightColor=ea.highlightColor),d=0;d<ea.xaxes.length;++d)q(ka,d+1).options=ea.xaxes[d];for(d=0;d<ea.yaxes.length;++d)q(la,d+1).options=ea.yaxes[d];for(var k in pa)ea.hooks[k]&&ea.hooks[k].length&&(pa[k]=pa[k].concat(ea.hooks[k]));h(pa.processOptions,[ea])}function k(a){da=l(a),r(),s()}function l(b){for(var c=[],d=0;d<b.length;++d){var e=a.extend(!0,{},ea.series);null!=b[d].data?(e.data=b[d].data,delete b[d].data,a.extend(!0,e,b[d]),b[d].data=e.data):e.data=b[d],c.push(e)}return c}function m(a,b){var c=a[b+"axis"];return"object"==typeof c&&(c=c.n),"number"!=typeof c&&(c=1),c}function n(){return a.grep(ka.concat(la),function(a){return a})}function o(a){var b,c,d={};for(b=0;b<ka.length;++b)c=ka[b],c&&c.used&&(d["x"+c.n]=c.c2p(a.left));for(b=0;b<la.length;++b)c=la[b],c&&c.used&&(d["y"+c.n]=c.c2p(a.top));return void 0!==d.x1&&(d.x=d.x1),void 0!==d.y1&&(d.y=d.y1),d}function p(a){var b,c,d,e={};for(b=0;b<ka.length;++b)if(c=ka[b],c&&c.used&&(d="x"+c.n,null==a[d]&&1==c.n&&(d="x"),null!=a[d])){e.left=c.p2c(a[d]);break}for(b=0;b<la.length;++b)if(c=la[b],c&&c.used&&(d="y"+c.n,null==a[d]&&1==c.n&&(d="y"),null!=a[d])){e.top=c.p2c(a[d]);break}return e}function q(b,c){return b[c-1]||(b[c-1]={"n":c,"direction":b==ka?"x":"y","options":a.extend(!0,{},b==ka?ea.xaxis:ea.yaxis)}),b[c-1]}function r(){var b,c=da.length,d=-1;for(b=0;b<da.length;++b){var e=da[b].color;null!=e&&(c--,"number"==typeof e&&e>d&&(d=e))}d>=c&&(c=d+1);var f,g=[],h=ea.colors,i=h.length,j=0;for(b=0;c>b;b++)f=a.color.parse(h[b%i]||"#666"),b%i==0&&b&&(j=j>=0?.5>j?-j-.2:0:-j),g[b]=f.scale("rgb",1+j);var k,l=0;for(b=0;b<da.length;++b){if(k=da[b],null==k.color?(k.color=g[l].toString(),++l):"number"==typeof k.color&&(k.color=g[k.color].toString()),null==k.lines.show){var n,o=!0;for(n in k)if(k[n]&&k[n].show){o=!1;break}o&&(k.lines.show=!0)}null==k.lines.zero&&(k.lines.zero=!!k.lines.fill),k.xaxis=q(ka,m(k,"x")),k.yaxis=q(la,m(k,"y"))}}function s(){function b(a,b,c){b<a.datamin&&b!=-s&&(a.datamin=b),c>a.datamax&&c!=s&&(a.datamax=c)}var c,d,e,f,g,i,j,k,l,m,o,p,q=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.MAX_VALUE;for(a.each(n(),function(a,b){b.datamin=q,b.datamax=r,b.used=!1}),c=0;c<da.length;++c)g=da[c],g.datapoints={"points":[]},h(pa.processRawData,[g,g.data,g.datapoints]);for(c=0;c<da.length;++c){if(g=da[c],o=g.data,p=g.datapoints.format,!p){if(p=[],p.push({"x":!0,"number":!0,"required":!0}),p.push({"y":!0,"number":!0,"required":!0}),g.bars.show||g.lines.show&&g.lines.fill){var t=!!(g.bars.show&&g.bars.zero||g.lines.show&&g.lines.zero);p.push({"y":!0,"number":!0,"required":!1,"defaultValue":0,"autoscale":t}),g.bars.horizontal&&(delete p[p.length-1].y,p[p.length-1].x=!0)}g.datapoints.format=p}if(null==g.datapoints.pointsize){g.datapoints.pointsize=p.length,j=g.datapoints.pointsize,i=g.datapoints.points;var u=g.lines.show&&g.lines.steps;for(g.xaxis.used=g.yaxis.used=!0,d=e=0;d<o.length;++d,e+=j){m=o[d];var v=null==m;if(!v)for(f=0;j>f;++f)k=m[f],l=p[f],l&&(l.number&&null!=k&&(k=+k,isNaN(k)?k=null:k==1/0?k=s:k==-(1/0)&&(k=-s)),null==k&&(l.required&&(v=!0),null!=l.defaultValue&&(k=l.defaultValue))),i[e+f]=k;if(v)for(f=0;j>f;++f)k=i[e+f],null!=k&&(l=p[f],l.autoscale!==!1&&(l.x&&b(g.xaxis,k,k),l.y&&b(g.yaxis,k,k))),i[e+f]=null;else if(u&&e>0&&null!=i[e-j]&&i[e-j]!=i[e]&&i[e-j+1]!=i[e+1]){for(f=0;j>f;++f)i[e+j+f]=i[e+f];i[e+1]=i[e-j+1],e+=j}}}}for(c=0;c<da.length;++c)g=da[c],h(pa.processDatapoints,[g,g.datapoints]);for(c=0;c<da.length;++c){g=da[c],i=g.datapoints.points,j=g.datapoints.pointsize,p=g.datapoints.format;var w=q,x=q,y=r,z=r;for(d=0;d<i.length;d+=j)if(null!=i[d])for(f=0;j>f;++f)k=i[d+f],l=p[f],l&&l.autoscale!==!1&&k!=s&&k!=-s&&(l.x&&(w>k&&(w=k),k>y&&(y=k)),l.y&&(x>k&&(x=k),k>z&&(z=k)));if(g.bars.show){var A;switch(g.bars.align){case"left":A=0;break;case"right":A=-g.bars.barWidth;break;default:A=-g.bars.barWidth/2}g.bars.horizontal?(x+=A,z+=A+g.bars.barWidth):(w+=A,y+=A+g.bars.barWidth)}b(g.xaxis,w,y),b(g.yaxis,x,z)}a.each(n(),function(a,b){b.datamin==q&&(b.datamin=null),b.datamax==r&&(b.datamax=null)})}function t(){c.css("padding",0).children().filter(function(){return!a(this).hasClass("flot-overlay")&&!a(this).hasClass("flot-base")}).remove(),"static"==c.css("position")&&c.css("position","relative"),fa=new b("flot-base",c),ga=new b("flot-overlay",c),ia=fa.context,ja=ga.context,ha=a(ga.element).unbind();var d=c.data("plot");d&&(d.shutdown(),ga.clear()),c.data("plot",qa)}function u(){ea.grid.hoverable&&(ha.mousemove(T),ha.bind("mouseleave",U)),ea.grid.clickable&&ha.click(V),h(pa.bindEvents,[ha])}function v(){sa&&clearTimeout(sa),ha.unbind("mousemove",T),ha.unbind("mouseleave",U),ha.unbind("click",V),h(pa.shutdown,[ha])}function w(a){function b(a){return a}var c,d,e=a.options.transform||b,f=a.options.inverseTransform;"x"==a.direction?(c=a.scale=na/Math.abs(e(a.max)-e(a.min)),d=Math.min(e(a.max),e(a.min))):(c=a.scale=oa/Math.abs(e(a.max)-e(a.min)),c=-c,d=Math.max(e(a.max),e(a.min))),e==b?a.p2c=function(a){return(a-d)*c}:a.p2c=function(a){return(e(a)-d)*c},f?a.c2p=function(a){return f(d+a/c)}:a.c2p=function(a){return d+a/c}}function x(a){for(var b=a.options,c=a.ticks||[],d=b.labelWidth||0,e=b.labelHeight||0,f=d||("x"==a.direction?Math.floor(fa.width/(c.length||1)):null),g=a.direction+"Axis "+a.direction+a.n+"Axis",h="flot-"+a.direction+"-axis flot-"+a.direction+a.n+"-axis "+g,i=b.font||"flot-tick-label tickLabel",j=0;j<c.length;++j){var k=c[j];if(k.label){var l=fa.getTextInfo(h,k.label,i,null,f);d=Math.max(d,l.width),e=Math.max(e,l.height)}}a.labelWidth=b.labelWidth||d,a.labelHeight=b.labelHeight||e}function y(b){var c=b.labelWidth,d=b.labelHeight,e=b.options.position,f="x"===b.direction,g=b.options.tickLength,h=ea.grid.axisMargin,i=ea.grid.labelMargin,j=!0,k=!0,l=!0,m=!1;a.each(f?ka:la,function(a,c){c&&(c.show||c.reserveSpace)&&(c===b?m=!0:c.options.position===e&&(m?k=!1:j=!1),m||(l=!1))}),k&&(h=0),null==g&&(g=l?"full":5),isNaN(+g)||(i+=+g),f?(d+=i,"bottom"==e?(ma.bottom+=d+h,b.box={"top":fa.height-ma.bottom,"height":d}):(b.box={"top":ma.top+h,"height":d},ma.top+=d+h)):(c+=i,"left"==e?(b.box={"left":ma.left+h,"width":c},ma.left+=c+h):(ma.right+=c+h,b.box={"left":fa.width-ma.right,"width":c})),b.position=e,b.tickLength=g,b.box.padding=i,b.innermost=j}function z(a){"x"==a.direction?(a.box.left=ma.left-a.labelWidth/2,a.box.width=fa.width-ma.left-ma.right+a.labelWidth):(a.box.top=ma.top-a.labelHeight/2,a.box.height=fa.height-ma.bottom-ma.top+a.labelHeight)}function A(){var b,c=ea.grid.minBorderMargin;if(null==c)for(c=0,b=0;b<da.length;++b)c=Math.max(c,2*(da[b].points.radius+da[b].points.lineWidth/2));var d={"left":c,"right":c,"top":c,"bottom":c};a.each(n(),function(a,b){b.reserveSpace&&b.ticks&&b.ticks.length&&("x"===b.direction?(d.left=Math.max(d.left,b.labelWidth/2),d.right=Math.max(d.right,b.labelWidth/2)):(d.bottom=Math.max(d.bottom,b.labelHeight/2),d.top=Math.max(d.top,b.labelHeight/2)))}),ma.left=Math.ceil(Math.max(d.left,ma.left)),ma.right=Math.ceil(Math.max(d.right,ma.right)),ma.top=Math.ceil(Math.max(d.top,ma.top)),ma.bottom=Math.ceil(Math.max(d.bottom,ma.bottom))}function B(){var b,c=n(),d=ea.grid.show;for(var e in ma){var f=ea.grid.margin||0;ma[e]="number"==typeof f?f:f[e]||0}h(pa.processOffset,[ma]);for(var e in ma)"object"==typeof ea.grid.borderWidth?ma[e]+=d?ea.grid.borderWidth[e]:0:ma[e]+=d?ea.grid.borderWidth:0;if(a.each(c,function(a,b){var c=b.options;b.show=null==c.show?b.used:c.show,b.reserveSpace=null==c.reserveSpace?b.show:c.reserveSpace,C(b)}),d){var g=a.grep(c,function(a){return a.show||a.reserveSpace});for(a.each(g,function(a,b){D(b),E(b),F(b,b.ticks),x(b)}),b=g.length-1;b>=0;--b)y(g[b]);A(),a.each(g,function(a,b){z(b)})}na=fa.width-ma.left-ma.right,oa=fa.height-ma.bottom-ma.top,a.each(c,function(a,b){w(b)}),d&&K(),R()}function C(a){var b=a.options,c=+(null!=b.min?b.min:a.datamin),d=+(null!=b.max?b.max:a.datamax),e=d-c;if(0==e){var f=0==d?1:.01;null==b.min&&(c-=f),(null==b.max||null!=b.min)&&(d+=f)}else{var g=b.autoscaleMargin;null!=g&&(null==b.min&&(c-=e*g,0>c&&null!=a.datamin&&a.datamin>=0&&(c=0)),null==b.max&&(d+=e*g,d>0&&null!=a.datamax&&a.datamax<=0&&(d=0)))}a.min=c,a.max=d}function D(b){var c,e=b.options;c="number"==typeof e.ticks&&e.ticks>0?e.ticks:.3*Math.sqrt("x"==b.direction?fa.width:fa.height);var f=(b.max-b.min)/c,g=-Math.floor(Math.log(f)/Math.LN10),h=e.tickDecimals;null!=h&&g>h&&(g=h);var i,j=Math.pow(10,-g),k=f/j;if(1.5>k?i=1:3>k?(i=2,k>2.25&&(null==h||h>=g+1)&&(i=2.5,++g)):i=7.5>k?5:10,i*=j,null!=e.minTickSize&&i<e.minTickSize&&(i=e.minTickSize),b.delta=f,b.tickDecimals=Math.max(0,null!=h?h:g),b.tickSize=e.tickSize||i,"time"==e.mode&&!b.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(b.tickGenerator||(b.tickGenerator=function(a){var b,c=[],e=d(a.min,a.tickSize),f=0,g=Number.NaN;do b=g,g=e+f*a.tickSize,c.push(g),++f;while(g<a.max&&g!=b);return c},b.tickFormatter=function(a,b){var c=b.tickDecimals?Math.pow(10,b.tickDecimals):1,d=""+Math.round(a*c)/c;if(null!=b.tickDecimals){var e=d.indexOf("."),f=-1==e?0:d.length-e-1;if(f<b.tickDecimals)return(f?d:d+".")+(""+c).substr(1,b.tickDecimals-f)}return d}),a.isFunction(e.tickFormatter)&&(b.tickFormatter=function(a,b){return""+e.tickFormatter(a,b)}),null!=e.alignTicksWithAxis){var l=("x"==b.direction?ka:la)[e.alignTicksWithAxis-1];if(l&&l.used&&l!=b){var m=b.tickGenerator(b);if(m.length>0&&(null==e.min&&(b.min=Math.min(b.min,m[0])),null==e.max&&m.length>1&&(b.max=Math.max(b.max,m[m.length-1]))),b.tickGenerator=function(a){var b,c,d=[];for(c=0;c<l.ticks.length;++c)b=(l.ticks[c].v-l.min)/(l.max-l.min),b=a.min+b*(a.max-a.min),d.push(b);return d},!b.mode&&null==e.tickDecimals){var n=Math.max(0,-Math.floor(Math.log(b.delta)/Math.LN10)+1),o=b.tickGenerator(b);o.length>1&&/\..*0$/.test((o[1]-o[0]).toFixed(n))||(b.tickDecimals=n)}}}}function E(b){var c=b.options.ticks,d=[];null==c||"number"==typeof c&&c>0?d=b.tickGenerator(b):c&&(d=a.isFunction(c)?c(b):c);var e,f;for(b.ticks=[],e=0;e<d.length;++e){var g=null,h=d[e];"object"==typeof h?(f=+h[0],h.length>1&&(g=h[1])):f=+h,null==g&&(g=b.tickFormatter(f,b)),isNaN(f)||b.ticks.push({"v":f,"label":g})}}function F(a,b){a.options.autoscaleMargin&&b.length>0&&(null==a.options.min&&(a.min=Math.min(a.min,b[0].v)),null==a.options.max&&b.length>1&&(a.max=Math.max(a.max,b[b.length-1].v)))}function G(){fa.clear(),h(pa.drawBackground,[ia]);var a=ea.grid;a.show&&a.backgroundColor&&I(),a.show&&!a.aboveData&&J();for(var b=0;b<da.length;++b)h(pa.drawSeries,[ia,da[b]]),L(da[b]);h(pa.draw,[ia]),a.show&&a.aboveData&&J(),fa.render(),X()}function H(a,b){for(var c,d,e,f,g=n(),h=0;h<g.length;++h)if(c=g[h],c.direction==b&&(f=b+c.n+"axis",a[f]||1!=c.n||(f=b+"axis"),a[f])){d=a[f].from,e=a[f].to;break}if(a[f]||(c="x"==b?ka[0]:la[0],d=a[b+"1"],e=a[b+"2"]),null!=d&&null!=e&&d>e){var i=d;d=e,e=i}return{"from":d,"to":e,"axis":c}}function I(){ia.save(),ia.translate(ma.left,ma.top),ia.fillStyle=ca(ea.grid.backgroundColor,oa,0,"rgba(255, 255, 255, 0)"),ia.fillRect(0,0,na,oa),ia.restore()}function J(){var b,c,d,e;ia.save(),ia.translate(ma.left,ma.top);var f=ea.grid.markings;if(f)for(a.isFunction(f)&&(c=qa.getAxes(),c.xmin=c.xaxis.min,c.xmax=c.xaxis.max,c.ymin=c.yaxis.min,c.ymax=c.yaxis.max,f=f(c)),b=0;b<f.length;++b){var g=f[b],h=H(g,"x"),i=H(g,"y");if(null==h.from&&(h.from=h.axis.min),null==h.to&&(h.to=h.axis.max),null==i.from&&(i.from=i.axis.min),null==i.to&&(i.to=i.axis.max),!(h.to<h.axis.min||h.from>h.axis.max||i.to<i.axis.min||i.from>i.axis.max)){h.from=Math.max(h.from,h.axis.min),h.to=Math.min(h.to,h.axis.max),i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max);var j=h.from===h.to,k=i.from===i.to;if(!j||!k)if(h.from=Math.floor(h.axis.p2c(h.from)),h.to=Math.floor(h.axis.p2c(h.to)),i.from=Math.floor(i.axis.p2c(i.from)),i.to=Math.floor(i.axis.p2c(i.to)),j||k){var l=g.lineWidth||ea.grid.markingsLineWidth,m=l%2?.5:0;ia.beginPath(),ia.strokeStyle=g.color||ea.grid.markingsColor,ia.lineWidth=l,j?(ia.moveTo(h.to+m,i.from),ia.lineTo(h.to+m,i.to)):(ia.moveTo(h.from,i.to+m),ia.lineTo(h.to,i.to+m)),ia.stroke()}else ia.fillStyle=g.color||ea.grid.markingsColor,ia.fillRect(h.from,i.to,h.to-h.from,i.from-i.to)}}c=n(),d=ea.grid.borderWidth;for(var o=0;o<c.length;++o){var p,q,r,s,t=c[o],u=t.box,v=t.tickLength;if(t.show&&0!=t.ticks.length){for(ia.lineWidth=1,"x"==t.direction?(p=0,q="full"==v?"top"==t.position?0:oa:u.top-ma.top+("top"==t.position?u.height:0)):(q=0,p="full"==v?"left"==t.position?0:na:u.left-ma.left+("left"==t.position?u.width:0)),t.innermost||(ia.strokeStyle=t.options.color,ia.beginPath(),r=s=0,"x"==t.direction?r=na+1:s=oa+1,1==ia.lineWidth&&("x"==t.direction?q=Math.floor(q)+.5:p=Math.floor(p)+.5),ia.moveTo(p,q),ia.lineTo(p+r,q+s),ia.stroke()),ia.strokeStyle=t.options.tickColor,ia.beginPath(),b=0;b<t.ticks.length;++b){var w=t.ticks[b].v;r=s=0,isNaN(w)||w<t.min||w>t.max||"full"==v&&("object"==typeof d&&d[t.position]>0||d>0)&&(w==t.min||w==t.max)||("x"==t.direction?(p=t.p2c(w),s="full"==v?-oa:v,"top"==t.position&&(s=-s)):(q=t.p2c(w),r="full"==v?-na:v,"left"==t.position&&(r=-r)),1==ia.lineWidth&&("x"==t.direction?p=Math.floor(p)+.5:q=Math.floor(q)+.5),ia.moveTo(p,q),ia.lineTo(p+r,q+s))}ia.stroke()}}d&&(e=ea.grid.borderColor,"object"==typeof d||"object"==typeof e?("object"!=typeof d&&(d={"top":d,"right":d,"bottom":d,"left":d}),"object"!=typeof e&&(e={"top":e,"right":e,"bottom":e,"left":e}),d.top>0&&(ia.strokeStyle=e.top,ia.lineWidth=d.top,ia.beginPath(),ia.moveTo(0-d.left,0-d.top/2),ia.lineTo(na,0-d.top/2),ia.stroke()),d.right>0&&(ia.strokeStyle=e.right,ia.lineWidth=d.right,ia.beginPath(),ia.moveTo(na+d.right/2,0-d.top),ia.lineTo(na+d.right/2,oa),ia.stroke()),d.bottom>0&&(ia.strokeStyle=e.bottom,ia.lineWidth=d.bottom,ia.beginPath(),ia.moveTo(na+d.right,oa+d.bottom/2),ia.lineTo(0,oa+d.bottom/2),ia.stroke()),d.left>0&&(ia.strokeStyle=e.left,ia.lineWidth=d.left,ia.beginPath(),ia.moveTo(0-d.left/2,oa+d.bottom),ia.lineTo(0-d.left/2,0),ia.stroke())):(ia.lineWidth=d,ia.strokeStyle=ea.grid.borderColor,ia.strokeRect(-d/2,-d/2,na+d,oa+d))),ia.restore()}function K(){a.each(n(),function(a,b){var c,d,e,f,g,h=b.box,i=b.direction+"Axis "+b.direction+b.n+"Axis",j="flot-"+b.direction+"-axis flot-"+b.direction+b.n+"-axis "+i,k=b.options.font||"flot-tick-label tickLabel";if(fa.removeText(j),b.show&&0!=b.ticks.length)for(var l=0;l<b.ticks.length;++l)c=b.ticks[l],!c.label||c.v<b.min||c.v>b.max||("x"==b.direction?(f="center",d=ma.left+b.p2c(c.v),"bottom"==b.position?e=h.top+h.padding:(e=h.top+h.height-h.padding,g="bottom")):(g="middle",e=ma.top+b.p2c(c.v),"left"==b.position?(d=h.left+h.width-h.padding,f="right"):d=h.left+h.padding),fa.addText(j,d,e,c.label,k,null,null,f,g))})}function L(a){a.lines.show&&M(a),a.bars.show&&P(a),a.points.show&&N(a)}function M(a){function b(a,b,c,d,e){var f=a.points,g=a.pointsize,h=null,i=null;ia.beginPath();for(var j=g;j<f.length;j+=g){var k=f[j-g],l=f[j-g+1],m=f[j],n=f[j+1];if(null!=k&&null!=m){if(n>=l&&l<e.min){if(n<e.min)continue;k=(e.min-l)/(n-l)*(m-k)+k,l=e.min}else if(l>=n&&n<e.min){if(l<e.min)continue;m=(e.min-l)/(n-l)*(m-k)+k,n=e.min}if(l>=n&&l>e.max){if(n>e.max)continue;k=(e.max-l)/(n-l)*(m-k)+k,l=e.max}else if(n>=l&&n>e.max){if(l>e.max)continue;m=(e.max-l)/(n-l)*(m-k)+k,n=e.max}if(m>=k&&k<d.min){if(m<d.min)continue;l=(d.min-k)/(m-k)*(n-l)+l,k=d.min}else if(k>=m&&m<d.min){if(k<d.min)continue;n=(d.min-k)/(m-k)*(n-l)+l,m=d.min}if(k>=m&&k>d.max){if(m>d.max)continue;l=(d.max-k)/(m-k)*(n-l)+l,k=d.max}else if(m>=k&&m>d.max){if(k>d.max)continue;n=(d.max-k)/(m-k)*(n-l)+l,m=d.max}(k!=h||l!=i)&&ia.moveTo(d.p2c(k)+b,e.p2c(l)+c),h=m,i=n,ia.lineTo(d.p2c(m)+b,e.p2c(n)+c)}}ia.stroke()}function c(a,b,c){for(var d=a.points,e=a.pointsize,f=Math.min(Math.max(0,c.min),c.max),g=0,h=!1,i=1,j=0,k=0;;){if(e>0&&g>d.length+e)break;g+=e;var l=d[g-e],m=d[g-e+i],n=d[g],o=d[g+i];if(h){if(e>0&&null!=l&&null==n){k=g,e=-e,i=2;continue}if(0>e&&g==j+e){ia.fill(),h=!1,e=-e,i=1,g=j=k+e;continue}}if(null!=l&&null!=n){if(n>=l&&l<b.min){if(n<b.min)continue;m=(b.min-l)/(n-l)*(o-m)+m,l=b.min}else if(l>=n&&n<b.min){if(l<b.min)continue;o=(b.min-l)/(n-l)*(o-m)+m,n=b.min}if(l>=n&&l>b.max){if(n>b.max)continue;m=(b.max-l)/(n-l)*(o-m)+m,l=b.max}else if(n>=l&&n>b.max){if(l>b.max)continue;o=(b.max-l)/(n-l)*(o-m)+m,n=b.max}if(h||(ia.beginPath(),ia.moveTo(b.p2c(l),c.p2c(f)),h=!0),m>=c.max&&o>=c.max)ia.lineTo(b.p2c(l),c.p2c(c.max)),ia.lineTo(b.p2c(n),c.p2c(c.max));else if(m<=c.min&&o<=c.min)ia.lineTo(b.p2c(l),c.p2c(c.min)),ia.lineTo(b.p2c(n),c.p2c(c.min));else{var p=l,q=n;o>=m&&m<c.min&&o>=c.min?(l=(c.min-m)/(o-m)*(n-l)+l,m=c.min):m>=o&&o<c.min&&m>=c.min&&(n=(c.min-m)/(o-m)*(n-l)+l,o=c.min),m>=o&&m>c.max&&o<=c.max?(l=(c.max-m)/(o-m)*(n-l)+l,m=c.max):o>=m&&o>c.max&&m<=c.max&&(n=(c.max-m)/(o-m)*(n-l)+l,o=c.max),l!=p&&ia.lineTo(b.p2c(p),c.p2c(m)),ia.lineTo(b.p2c(l),c.p2c(m)),ia.lineTo(b.p2c(n),c.p2c(o)),n!=q&&(ia.lineTo(b.p2c(n),c.p2c(o)),ia.lineTo(b.p2c(q),c.p2c(o)))}}}}ia.save(),ia.translate(ma.left,ma.top),ia.lineJoin="round";var d=a.lines.lineWidth,e=a.shadowSize;if(d>0&&e>0){ia.lineWidth=e,ia.strokeStyle="rgba(0,0,0,0.1)";var f=Math.PI/18;b(a.datapoints,Math.sin(f)*(d/2+e/2),Math.cos(f)*(d/2+e/2),a.xaxis,a.yaxis),ia.lineWidth=e/2,b(a.datapoints,Math.sin(f)*(d/2+e/4),Math.cos(f)*(d/2+e/4),a.xaxis,a.yaxis)}ia.lineWidth=d,ia.strokeStyle=a.color;var g=Q(a.lines,a.color,0,oa);g&&(ia.fillStyle=g,c(a.datapoints,a.xaxis,a.yaxis)),d>0&&b(a.datapoints,0,0,a.xaxis,a.yaxis),ia.restore()}function N(a){function b(a,b,c,d,e,f,g,h){for(var i=a.points,j=a.pointsize,k=0;k<i.length;k+=j){var l=i[k],m=i[k+1];null==l||l<f.min||l>f.max||m<g.min||m>g.max||(ia.beginPath(),l=f.p2c(l),m=g.p2c(m)+d,"circle"==h?ia.arc(l,m,b,0,e?Math.PI:2*Math.PI,!1):h(ia,l,m,b,e),ia.closePath(),c&&(ia.fillStyle=c,ia.fill()),ia.stroke())}}ia.save(),ia.translate(ma.left,ma.top);var c=a.points.lineWidth,d=a.shadowSize,e=a.points.radius,f=a.points.symbol;if(0==c&&(c=1e-4),c>0&&d>0){var g=d/2;ia.lineWidth=g,ia.strokeStyle="rgba(0,0,0,0.1)",b(a.datapoints,e,null,g+g/2,!0,a.xaxis,a.yaxis,f),ia.strokeStyle="rgba(0,0,0,0.2)",b(a.datapoints,e,null,g/2,!0,a.xaxis,a.yaxis,f)}ia.lineWidth=c,ia.strokeStyle=a.color,b(a.datapoints,e,Q(a.points,a.color),0,!1,a.xaxis,a.yaxis,f),ia.restore()}function O(a,b,c,d,e,f,g,h,i,j,k){var l,m,n,o,p,q,r,s,t;j?(s=q=r=!0,p=!1,l=c,m=a,o=b+d,n=b+e,l>m&&(t=m,m=l,l=t,p=!0,q=!1)):(p=q=r=!0,s=!1,l=a+d,m=a+e,n=c,o=b,n>o&&(t=o,o=n,n=t,s=!0,r=!1)),m<g.min||l>g.max||o<h.min||n>h.max||(l<g.min&&(l=g.min,p=!1),m>g.max&&(m=g.max,q=!1),n<h.min&&(n=h.min,s=!1),o>h.max&&(o=h.max,r=!1),l=g.p2c(l),n=h.p2c(n),m=g.p2c(m),o=h.p2c(o),f&&(i.fillStyle=f(n,o),i.fillRect(l,o,m-l,n-o)),k>0&&(p||q||r||s)&&(i.beginPath(),i.moveTo(l,n),p?i.lineTo(l,o):i.moveTo(l,o),r?i.lineTo(m,o):i.moveTo(m,o),q?i.lineTo(m,n):i.moveTo(m,n),s?i.lineTo(l,n):i.moveTo(l,n),i.stroke()))}function P(a){function b(b,c,d,e,f,g){for(var h=b.points,i=b.pointsize,j=0;j<h.length;j+=i)null!=h[j]&&O(h[j],h[j+1],h[j+2],c,d,e,f,g,ia,a.bars.horizontal,a.bars.lineWidth)}ia.save(),ia.translate(ma.left,ma.top),ia.lineWidth=a.bars.lineWidth,ia.strokeStyle=a.color;var c;switch(a.bars.align){case"left":c=0;break;case"right":c=-a.bars.barWidth;break;default:c=-a.bars.barWidth/2}var d=a.bars.fill?function(b,c){return Q(a.bars,a.color,b,c)}:null;b(a.datapoints,c,c+a.bars.barWidth,d,a.xaxis,a.yaxis),ia.restore()}function Q(b,c,d,e){var f=b.fill;if(!f)return null;if(b.fillColor)return ca(b.fillColor,d,e,c);var g=a.color.parse(c);return g.a="number"==typeof f?f:.4,g.normalize(),g.toString()}function R(){if(null!=ea.legend.container?a(ea.legend.container).html(""):c.find(".legend").remove(),ea.legend.show){for(var b,d,e=[],f=[],g=!1,h=ea.legend.labelFormatter,i=0;i<da.length;++i)b=da[i],b.label&&(d=h?h(b.label,b):b.label,d&&f.push({"label":d,"color":b.color}));if(ea.legend.sorted)if(a.isFunction(ea.legend.sorted))f.sort(ea.legend.sorted);else if("reverse"==ea.legend.sorted)f.reverse();else{var j="descending"!=ea.legend.sorted;f.sort(function(a,b){return a.label==b.label?0:a.label<b.label!=j?1:-1})}for(var i=0;i<f.length;++i){var k=f[i];i%ea.legend.noColumns==0&&(g&&e.push("</tr>"),e.push("<tr>"),g=!0),e.push('<td class="legendColorBox"><div style="'+ea.legend.labelBoxBorderColor+'"><div style="border:2px solid '+k.color+';overflow:hidden"></div></div></td><td class="legendLabel"><span>'+k.label+"</span></td>")}if(g&&e.push("</tr>"),0!=e.length){var l='<table style="font-size:smaller;color:'+ea.grid.color+'">'+e.join("")+"</table>";if(null!=ea.legend.container)a(ea.legend.container).html(l);else{var m="",n=ea.legend.position,o=ea.legend.margin;null==o[0]&&(o=[o,o]),"n"==n.charAt(0)?m+="top:"+(o[1]+ma.top)+"px;":"s"==n.charAt(0)&&(m+="bottom:"+(o[1]+ma.bottom)+"px;"),"e"==n.charAt(1)?m+="right:"+(o[0]+ma.right)+"px;":"w"==n.charAt(1)&&(m+="left:"+(o[0]+ma.left)+"px;");var p=a('<div class="legend">'+l.replace('style="','style="position:absolute;'+m+";")+"</div>").appendTo(c);if(0!=ea.legend.backgroundOpacity){var q=ea.legend.backgroundColor;null==q&&(q=ea.grid.backgroundColor,q=q&&"string"==typeof q?a.color.parse(q):a.color.extract(p,"background-color"),q.a=1,q=q.toString());var r=p.children();a('<div style="position:absolute;width:'+r.width()+"px;height:"+r.height()+"px;"+m+"background-color:"+q+';"> </div>').prependTo(p).css("opacity",ea.legend.backgroundOpacity)}}}}}function S(a,b,c){var d,e,f,g=ea.grid.mouseActiveRadius,h=g*g+1,i=null;for(d=da.length-1;d>=0;--d)if(c(da[d])){var j=da[d],k=j.xaxis,l=j.yaxis,m=j.datapoints.points,n=k.c2p(a),o=l.c2p(b),p=g/k.scale,q=g/l.scale;if(f=j.datapoints.pointsize,k.options.inverseTransform&&(p=Number.MAX_VALUE),l.options.inverseTransform&&(q=Number.MAX_VALUE),j.lines.show||j.points.show)for(e=0;e<m.length;e+=f){var r=m[e],s=m[e+1];if(null!=r&&!(r-n>p||-p>r-n||s-o>q||-q>s-o)){var t=Math.abs(k.p2c(r)-a),u=Math.abs(l.p2c(s)-b),v=t*t+u*u;h>v&&(h=v,i=[d,e/f])}}if(j.bars.show&&!i){var w,x;switch(j.bars.align){case"left":w=0;break;case"right":w=-j.bars.barWidth;break;default:w=-j.bars.barWidth/2}for(x=w+j.bars.barWidth,e=0;e<m.length;e+=f){var r=m[e],s=m[e+1],y=m[e+2];null!=r&&(da[d].bars.horizontal?n<=Math.max(y,r)&&n>=Math.min(y,r)&&o>=s+w&&s+x>=o:n>=r+w&&r+x>=n&&o>=Math.min(y,s)&&o<=Math.max(y,s))&&(i=[d,e/f])}}}return i?(d=i[0],e=i[1],f=da[d].datapoints.pointsize,{"datapoint":da[d].datapoints.points.slice(e*f,(e+1)*f),"dataIndex":e,"series":da[d],"seriesIndex":d}):null}function T(a){ea.grid.hoverable&&W("plothover",a,function(a){return 0!=a.hoverable})}function U(a){ea.grid.hoverable&&W("plothover",a,function(a){return!1})}function V(a){W("plotclick",a,function(a){return 0!=a.clickable})}function W(a,b,d){var e=ha.offset(),f=b.pageX-e.left-ma.left,g=b.pageY-e.top-ma.top,h=o({"left":f,"top":g});h.pageX=b.pageX,h.pageY=b.pageY;var i=S(f,g,d);if(i&&(i.pageX=parseInt(i.series.xaxis.p2c(i.datapoint[0])+e.left+ma.left,10),i.pageY=parseInt(i.series.yaxis.p2c(i.datapoint[1])+e.top+ma.top,10)),ea.grid.autoHighlight){for(var j=0;j<ra.length;++j){var k=ra[j];k.auto!=a||i&&k.series==i.series&&k.point[0]==i.datapoint[0]&&k.point[1]==i.datapoint[1]||$(k.series,k.point)}i&&Z(i.series,i.datapoint,a)}c.trigger(a,[h,i])}function X(){var a=ea.interaction.redrawOverlayInterval;return-1==a?void Y():void(sa||(sa=setTimeout(Y,a)))}function Y(){sa=null,ja.save(),ga.clear(),ja.translate(ma.left,ma.top);var a,b;for(a=0;a<ra.length;++a)b=ra[a],b.series.bars.show?ba(b.series,b.point):aa(b.series,b.point);ja.restore(),h(pa.drawOverlay,[ja])}function Z(a,b,c){if("number"==typeof a&&(a=da[a]),"number"==typeof b){var d=a.datapoints.pointsize;b=a.datapoints.points.slice(d*b,d*(b+1))}var e=_(a,b);-1==e?(ra.push({"series":a,"point":b,"auto":c}),X()):c||(ra[e].auto=!1)}function $(a,b){if(null==a&&null==b)return ra=[],void X();if("number"==typeof a&&(a=da[a]),"number"==typeof b){var c=a.datapoints.pointsize;b=a.datapoints.points.slice(c*b,c*(b+1))}var d=_(a,b);-1!=d&&(ra.splice(d,1),X())}function _(a,b){for(var c=0;c<ra.length;++c){var d=ra[c];if(d.series==a&&d.point[0]==b[0]&&d.point[1]==b[1])return c}return-1}function aa(b,c){var d=c[0],e=c[1],f=b.xaxis,g=b.yaxis,h="string"==typeof b.highlightColor?b.highlightColor:a.color.parse(b.color).scale("a",.5).toString();if(!(d<f.min||d>f.max||e<g.min||e>g.max)){var i=b.points.radius+b.points.lineWidth/2;ja.lineWidth=i,ja.strokeStyle=h;var j=1.5*i;d=f.p2c(d),e=g.p2c(e),ja.beginPath(),"circle"==b.points.symbol?ja.arc(d,e,j,0,2*Math.PI,!1):b.points.symbol(ja,d,e,j,!1),ja.closePath(),ja.stroke()}}function ba(b,c){var d,e="string"==typeof b.highlightColor?b.highlightColor:a.color.parse(b.color).scale("a",.5).toString(),f=e;switch(b.bars.align){case"left":d=0;break;case"right":d=-b.bars.barWidth;break;default:d=-b.bars.barWidth/2}ja.lineWidth=b.bars.lineWidth,ja.strokeStyle=e,O(c[0],c[1],c[2]||0,d,d+b.bars.barWidth,function(){return f},b.xaxis,b.yaxis,ja,b.bars.horizontal,b.bars.lineWidth)}function ca(b,c,d,e){if("string"==typeof b)return b;for(var f=ia.createLinearGradient(0,d,0,c),g=0,h=b.colors.length;h>g;++g){var i=b.colors[g];if("string"!=typeof i){var j=a.color.parse(e);null!=i.brightness&&(j=j.scale("rgb",i.brightness)),null!=i.opacity&&(j.a*=i.opacity),i=j.toString()}f.addColorStop(g/(h-1),i)}return f}var da=[],ea={"colors":a.flot_colors||["#931313","#638167","#65596B","#60747C","#B09B5B"],"legend":{"show":!0,"noColumns":a.flot_noColumns||0,"labelFormatter":null,"labelBoxBorderColor":"","container":null,"position":"ne","margin":a.flot_margin||[-5,-32],"backgroundColor":a.flot_backgroundColor||"","backgroundOpacity":a.flot_backgroundOpacity||1,"sorted":null},"xaxis":{"show":null,"position":"bottom","mode":null,"font":null,"color":null,"tickColor":null,"transform":null,"inverseTransform":null,"min":null,"max":null,"autoscaleMargin":null,"ticks":null,"tickFormatter":null,"labelWidth":null,"labelHeight":null,"reserveSpace":null,"tickLength":null,
"alignTicksWithAxis":null,"tickDecimals":null,"tickSize":null,"minTickSize":null},"yaxis":{"autoscaleMargin":.02,"position":"left"},"xaxes":[],"yaxes":[],"series":{"points":{"show":!1,"radius":3,"lineWidth":2,"fill":!0,"fillColor":"#ffffff","symbol":"circle"},"lines":{"lineWidth":2,"fill":!1,"fillColor":null,"steps":!1},"bars":{"show":!1,"lineWidth":a.flot_bars_lineWidth||1,"barWidth":1,"fill":!0,"fillColor":a.flot_bars_fillColor||{"colors":[{"opacity":.7},{"opacity":1}]},"align":"left","horizontal":!1,"zero":!0},"shadowSize":a.flot_shadowSize||0,"highlightColor":null},"grid":{"show":!0,"aboveData":!1,"color":a.flot_grid_color||"#545454","backgroundColor":null,"borderColor":a.flot_grid_borderColor||"#efefef","tickColor":a.flot_grid_tickColor||"rgba(0,0,0,0.06)","margin":0,"labelMargin":a.flot_grid_labelMargin||10,"axisMargin":8,"borderWidth":a.flot_grid_borderWidth||0,"minBorderMargin":a.flot_grid_minBorderMargin||10,"markings":null,"markingsColor":"#f4f4f4","markingsLineWidth":2,"clickable":!1,"hoverable":!1,"autoHighlight":!0,"mouseActiveRadius":a.flot_grid_mouseActiveRadius||5},"interaction":{"redrawOverlayInterval":1e3/60},"hooks":{}},fa=null,ga=null,ha=null,ia=null,ja=null,ka=[],la=[],ma={"left":0,"right":0,"top":0,"bottom":0},na=0,oa=0,pa={"processOptions":[],"processRawData":[],"processDatapoints":[],"processOffset":[],"drawBackground":[],"drawSeries":[],"draw":[],"bindEvents":[],"drawOverlay":[],"shutdown":[]},qa=this;qa.setData=k,qa.setupGrid=B,qa.draw=G,qa.getPlaceholder=function(){return c},qa.getCanvas=function(){return fa.element},qa.getPlotOffset=function(){return ma},qa.width=function(){return na},qa.height=function(){return oa},qa.offset=function(){var a=ha.offset();return a.left+=ma.left,a.top+=ma.top,a},qa.getData=function(){return da},qa.getAxes=function(){var b={};return a.each(ka.concat(la),function(a,c){c&&(b[c.direction+(1!=c.n?c.n:"")+"axis"]=c)}),b},qa.getXAxes=function(){return ka},qa.getYAxes=function(){return la},qa.c2p=o,qa.p2c=p,qa.getOptions=function(){return ea},qa.highlight=Z,qa.unhighlight=$,qa.triggerRedrawOverlay=X,qa.pointOffset=function(a){return{"left":parseInt(ka[m(a,"x")-1].p2c(+a.x)+ma.left,10),"top":parseInt(la[m(a,"y")-1].p2c(+a.y)+ma.top,10)}},qa.shutdown=v,qa.destroy=function(){v(),c.removeData("plot").empty(),da=[],ea=null,fa=null,ga=null,ha=null,ia=null,ja=null,ka=[],la=[],pa=null,ra=[],qa=null},qa.resize=function(){var a=c.width(),b=c.height();fa.resize(a,b),ga.resize(a,b)},qa.hooks=pa,i(qa),j(f),t(),k(e),B(),G(),u();var ra=[],sa=null}function d(a,b){return b*Math.floor(a/b)}var e=Object.prototype.hasOwnProperty;a.fn.detach||(a.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),b.prototype.resize=function(a,b){if(0>=a||0>=b)throw new Error("Invalid dimensions for plot, width = "+a+", height = "+b);var c=this.element,d=this.context,e=this.pixelRatio;this.width!=a&&(c.width=a*e,c.style.width=a+"px",this.width=a),this.height!=b&&(c.height=b*e,c.style.height=b+"px",this.height=b),d.restore(),d.save(),d.scale(e,e)},b.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},b.prototype.render=function(){var a=this._textCache;for(var b in a)if(e.call(a,b)){var c=this.getTextLayer(b),d=a[b];c.hide();for(var f in d)if(e.call(d,f)){var g=d[f];for(var h in g)if(e.call(g,h)){for(var i,j=g[h].positions,k=0;i=j[k];k++)i.active?i.rendered||(c.append(i.element),i.rendered=!0):(j.splice(k--,1),i.rendered&&i.element.detach());0==j.length&&delete g[h]}}c.show()}},b.prototype.getTextLayer=function(b){var c=this.text[b];return null==c&&(null==this.textContainer&&(this.textContainer=a("<div class='flot-text'></div>").css({"position":"absolute","top":0,"left":0,"bottom":0,"right":0,"font-size":"smaller","color":"#545454"}).insertAfter(this.element)),c=this.text[b]=a("<div></div>").addClass(b).css({"position":"absolute","top":0,"left":0,"bottom":0,"right":0}).appendTo(this.textContainer)),c},b.prototype.getTextInfo=function(b,c,d,e,f){var g,h,i,j;if(c=""+c,g="object"==typeof d?d.style+" "+d.variant+" "+d.weight+" "+d.size+"px/"+d.lineHeight+"px "+d.family:d,h=this._textCache[b],null==h&&(h=this._textCache[b]={}),i=h[g],null==i&&(i=h[g]={}),j=i[c],null==j){var k=a("<div></div>").html(c).css({"position":"absolute","max-width":f,"top":-9999}).appendTo(this.getTextLayer(b));"object"==typeof d?k.css({"font":g,"color":d.color}):"string"==typeof d&&k.addClass(d),j=i[c]={"width":k.outerWidth(!0),"height":k.outerHeight(!0),"element":k,"positions":[]},k.detach()}return j},b.prototype.addText=function(a,b,c,d,e,f,g,h,i){var j=this.getTextInfo(a,d,e,f,g),k=j.positions;"center"==h?b-=j.width/2:"right"==h&&(b-=j.width),"middle"==i?c-=j.height/2:"bottom"==i&&(c-=j.height);for(var l,m=0;l=k[m];m++)if(l.x==b&&l.y==c)return void(l.active=!0);l={"active":!0,"rendered":!1,"element":k.length?j.element.clone():j.element,"x":b,"y":c},k.push(l),l.element.css({"top":Math.round(c),"left":Math.round(b),"text-align":h})},b.prototype.removeText=function(a,b,c,d,f,g){if(null==d){var h=this._textCache[a];if(null!=h)for(var i in h)if(e.call(h,i)){var j=h[i];for(var k in j)if(e.call(j,k))for(var l,m=j[k].positions,n=0;l=m[n];n++)l.active=!1}}else for(var l,m=this.getTextInfo(a,d,f,g).positions,n=0;l=m[n];n++)l.x==b&&l.y==c&&(l.active=!1)},a.plot=function(b,d,e){var f=new c(a(b),d,e,a.plot.plugins);return f},a.plot.version="0.8.3",a.plot.plugins=[],a.fn.plot=function(b,c){return this.each(function(){a.plot(this,b,c)})}}(jQuery);
!function(a,b,c){"$:nomunge";function d(c){h===!0&&(h=c||1);for(var i=f.length-1;i>=0;i--){var m=a(f[i]);if(m[0]==b||m.is(":visible")){var n=m.width(),o=m.height(),p=m.data(k);!p||n===p.w&&o===p.h||(m.trigger(j,[p.w=n,p.h=o]),h=c||!0)}else p=m.data(k),p.w=0,p.h=0}null!==e&&(h&&(null==c||1e3>c-h)?e=b.requestAnimationFrame(d):(e=setTimeout(d,g[l]),h=!1))}var e,f=[],g=a.resize=a.extend(a.resize,{}),h=!1,i="setTimeout",j="resize",k=j+"-special-event",l="pendingDelay",m="activeDelay",n="throttleWindow";g[l]=200,g[m]=20,g[n]=!0,a.event.special[j]={"setup":function(){if(!g[n]&&this[i])return!1;var b=a(this);f.push(this),b.data(k,{"w":b.width(),"h":b.height()}),1===f.length&&(e=c,d())},"teardown":function(){if(!g[n]&&this[i])return!1;for(var b=a(this),c=f.length-1;c>=0;c--)if(f[c]==this){f.splice(c,1);break}b.removeData(k),f.length||(h?cancelAnimationFrame(e):clearTimeout(e),e=null)},"add":function(b){function d(b,d,f){var g=a(this),h=g.data(k)||{};h.w=d!==c?d:g.width(),h.h=f!==c?f:g.height(),e.apply(this,arguments)}if(!g[n]&&this[i])return!1;var e;return a.isFunction(b)?(e=b,d):(e=b.handler,void(b.handler=d))}},b.requestAnimationFrame||(b.requestAnimationFrame=function(){return b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a,c){return b.setTimeout(function(){a((new Date).getTime())},g[m])}}()),b.cancelAnimationFrame||(b.cancelAnimationFrame=function(){return b.webkitCancelRequestAnimationFrame||b.mozCancelRequestAnimationFrame||b.oCancelRequestAnimationFrame||b.msCancelRequestAnimationFrame||clearTimeout}())}(jQuery,this),function(a){function b(a){function b(){var b=a.getPlaceholder();0!=b.width()&&0!=b.height()&&(a.resize(),a.setupGrid(),a.draw())}function c(a,c){a.getPlaceholder().resize(b)}function d(a,c){a.getPlaceholder().unbind("resize",b)}a.hooks.bindEvents.push(c),a.hooks.shutdown.push(d)}var c={};a.plot.plugins.push({"init":b,"options":c,"name":"resize","version":"1.0"})}(jQuery);
!function(a){function b(a,b){return b*Math.floor(a/b)}function c(a,b,c,d){if("function"==typeof a.strftime)return a.strftime(b);var e=function(a,b){return a=""+a,b=""+(null==b?"0":b),1==a.length?b+a:a},f=[],g=!1,h=a.getHours(),i=12>h;null==c&&(c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==d&&(d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var j;j=h>12?h-12:0==h?12:h;for(var k=0;k<b.length;++k){var l=b.charAt(k);if(g){switch(l){case"a":l=""+d[a.getDay()];break;case"b":l=""+c[a.getMonth()];break;case"d":l=e(a.getDate());break;case"e":l=e(a.getDate()," ");break;case"h":case"H":l=e(h);break;case"I":l=e(j);break;case"l":l=e(j," ");break;case"m":l=e(a.getMonth()+1);break;case"M":l=e(a.getMinutes());break;case"q":l=""+(Math.floor(a.getMonth()/3)+1);break;case"S":l=e(a.getSeconds());break;case"y":l=e(a.getFullYear()%100);break;case"Y":l=""+a.getFullYear();break;case"p":l=i?"am":"pm";break;case"P":l=i?"AM":"PM";break;case"w":l=""+a.getDay()}f.push(l),g=!1}else"%"==l?g=!0:f.push(l)}return f.join("")}function d(a){function b(a,b,c,d){a[b]=function(){return c[d].apply(c,arguments)}}var c={"date":a};void 0!=a.strftime&&b(c,"strftime",a,"strftime"),b(c,"getTime",a,"getTime"),b(c,"setTime",a,"setTime");for(var d=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],e=0;e<d.length;e++)b(c,"get"+d[e],a,"getUTC"+d[e]),b(c,"set"+d[e],a,"setUTC"+d[e]);return c}function e(a,b){if("browser"==b.timezone)return new Date(a);if(b.timezone&&"utc"!=b.timezone){if("undefined"!=typeof timezoneJS&&"undefined"!=typeof timezoneJS.Date){var c=new timezoneJS.Date;return c.setTimezone(b.timezone),c.setTime(a),c}return d(new Date(a))}return d(new Date(a))}function f(d){d.hooks.processOptions.push(function(d,f){a.each(d.getAxes(),function(a,d){var f=d.options;"time"==f.mode&&(d.tickGenerator=function(a){var c=[],d=e(a.min,f),g=0,i=f.tickSize&&"quarter"===f.tickSize[1]||f.minTickSize&&"quarter"===f.minTickSize[1]?k:j;null!=f.minTickSize&&(g="number"==typeof f.tickSize?f.tickSize:f.minTickSize[0]*h[f.minTickSize[1]]);for(var l=0;l<i.length-1&&!(a.delta<(i[l][0]*h[i[l][1]]+i[l+1][0]*h[i[l+1][1]])/2&&i[l][0]*h[i[l][1]]>=g);++l);var m=i[l][0],n=i[l][1];if("year"==n){if(null!=f.minTickSize&&"year"==f.minTickSize[1])m=Math.floor(f.minTickSize[0]);else{var o=Math.pow(10,Math.floor(Math.log(a.delta/h.year)/Math.LN10)),p=a.delta/h.year/o;m=1.5>p?1:3>p?2:7.5>p?5:10,m*=o}1>m&&(m=1)}a.tickSize=f.tickSize||[m,n];var q=a.tickSize[0];n=a.tickSize[1];var r=q*h[n];"second"==n?d.setSeconds(b(d.getSeconds(),q)):"minute"==n?d.setMinutes(b(d.getMinutes(),q)):"hour"==n?d.setHours(b(d.getHours(),q)):"month"==n?d.setMonth(b(d.getMonth(),q)):"quarter"==n?d.setMonth(3*b(d.getMonth()/3,q)):"year"==n&&d.setFullYear(b(d.getFullYear(),q)),d.setMilliseconds(0),r>=h.minute&&d.setSeconds(0),r>=h.hour&&d.setMinutes(0),r>=h.day&&d.setHours(0),r>=4*h.day&&d.setDate(1),r>=2*h.month&&d.setMonth(b(d.getMonth(),3)),r>=2*h.quarter&&d.setMonth(b(d.getMonth(),6)),r>=h.year&&d.setMonth(0);var s,t=0,u=Number.NaN;do if(s=u,u=d.getTime(),c.push(u),"month"==n||"quarter"==n)if(1>q){d.setDate(1);var v=d.getTime();d.setMonth(d.getMonth()+("quarter"==n?3:1));var w=d.getTime();d.setTime(u+t*h.hour+(w-v)*q),t=d.getHours(),d.setHours(0)}else d.setMonth(d.getMonth()+q*("quarter"==n?3:1));else"year"==n?d.setFullYear(d.getFullYear()+q):d.setTime(u+r);while(u<a.max&&u!=s);return c},d.tickFormatter=function(a,b){var d=e(a,b.options);if(null!=f.timeformat)return c(d,f.timeformat,f.monthNames,f.dayNames);var g,i=b.options.tickSize&&"quarter"==b.options.tickSize[1]||b.options.minTickSize&&"quarter"==b.options.minTickSize[1],j=b.tickSize[0]*h[b.tickSize[1]],k=b.max-b.min,l=f.twelveHourClock?" %p":"",m=f.twelveHourClock?"%I":"%H";g=j<h.minute?m+":%M:%S"+l:j<h.day?k<2*h.day?m+":%M"+l:"%b %d "+m+":%M"+l:j<h.month?"%b %d":i&&j<h.quarter||!i&&j<h.year?k<h.year?"%b":"%b %Y":i&&j<h.year?k<h.year?"Q%q":"Q%q %Y":"%Y";var n=c(d,g,f.monthNames,f.dayNames);return n})})})}var g={"xaxis":{"timezone":null,"timeformat":null,"twelveHourClock":!1,"monthNames":null}},h={"second":1e3,"minute":6e4,"hour":36e5,"day":864e5,"month":2592e6,"quarter":7776e6,"year":525949.2*60*1e3},i=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],j=i.concat([[3,"month"],[6,"month"],[1,"year"]]),k=i.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);a.plot.plugins.push({"init":f,"options":g,"name":"time","version":"1.0"}),a.plot.formatDate=c,a.plot.dateGenerator=e}(jQuery);
!function(a){function b(a){function b(a,b){var c;for(c=0;c<b.length;++c)if(b[c].id===a.fillBetween)return b[c];return"number"==typeof a.fillBetween?a.fillBetween<0||a.fillBetween>=b.length?null:b[a.fillBetween]:null}function c(a,c,d){if(null!=c.fillBetween){var e=b(c,a.getData());if(e){for(var f,g,h,i,j,k,l,m,n=d.pointsize,o=d.points,p=e.datapoints.pointsize,q=e.datapoints.points,r=[],s=c.lines.show,t=n>2&&d.format[2].y,u=s&&c.lines.steps,v=!0,w=0,x=0;;){if(w>=o.length)break;if(l=r.length,null==o[w]){for(m=0;n>m;++m)r.push(o[w+m]);w+=n}else if(x>=q.length){if(!s)for(m=0;n>m;++m)r.push(o[w+m]);w+=n}else if(null==q[x]){for(m=0;n>m;++m)r.push(null);v=!0,x+=p}else{if(f=o[w],g=o[w+1],i=q[x],j=q[x+1],k=0,f===i){for(m=0;n>m;++m)r.push(o[w+m]);k=j,w+=n,x+=p}else if(f>i){if(s&&w>0&&null!=o[w-n]){for(h=g+(o[w-n+1]-g)*(i-f)/(o[w-n]-f),r.push(i),r.push(h),m=2;n>m;++m)r.push(o[w+m]);k=j}x+=p}else{if(v&&s){w+=n;continue}for(m=0;n>m;++m)r.push(o[w+m]);s&&x>0&&null!=q[x-p]&&(k=j+(q[x-p+1]-j)*(f-i)/(q[x-p]-i)),w+=n}v=!1,l!==r.length&&t&&(r[l+2]=k)}if(u&&l!==r.length&&l>0&&null!==r[l]&&r[l]!==r[l-n]&&r[l+1]!==r[l-n+1]){for(m=0;n>m;++m)r[l+n+m]=r[l+m];r[l+1]=r[l-n+1]}}d.points=r}}}a.hooks.processDatapoints.push(c)}var c={"series":{"fillBetween":null}};a.plot.plugins.push({"init":b,"options":c,"name":"fillbetween","version":"1.0"})}(jQuery);
/*! SmartAdmin - v1.4.1 - 2014-08-08 */!function(a){function b(a){function b(a,b,e){var g=null;if(c(b)&&(j(b),d(a),f(a),i(b),q>=2)){var h=k(b),r=0,t=l();r=m(h)?-1*n(p,h-1,Math.floor(q/2)-1)-t:n(p,Math.ceil(q/2),h-2)+t+2*s,g=o(e,b,r),e.points=g}return g}function c(a){return null!=a.bars&&a.bars.show&&null!=a.bars.order}function d(a){var b=u?a.getPlaceholder().innerHeight():a.getPlaceholder().innerWidth(),c=u?e(a.getData(),1):e(a.getData(),0),d=c[1]-c[0];t=d/b}function e(a,b){for(var c=new Array,d=0;d<a.length;d++)c[0]=a[d].data[0][b],c[1]=a[d].data[a[d].data.length-1][b];return c}function f(a){p=g(a.getData()),q=p.length}function g(a){for(var b=new Array,c=0;c<a.length;c++)null!=a[c].bars.order&&a[c].bars.show&&b.push(a[c]);return b.sort(h)}function h(a,b){var c=a.bars.order,d=b.bars.order;return d>c?-1:c>d?1:0}function i(a){r=a.bars.lineWidth?a.bars.lineWidth:2,s=r*t}function j(a){a.bars.horizontal&&(u=!0)}function k(a){for(var b=0,c=0;c<p.length;++c)if(a==p[c]){b=c;break}return b+1}function l(){var a=0;return q%2!=0&&(a=p[Math.ceil(q/2)].bars.barWidth/2),a}function m(a){return a<=Math.ceil(q/2)}function n(a,b,c){for(var d=0,e=b;c>=e;e++)d+=a[e].bars.barWidth+2*s;return d}function o(a,b,c){for(var d=a.pointsize,e=a.points,f=0,g=u?1:0;g<e.length;g+=d)e[g]+=c,b.data[f][3]=e[g],f++;return e}var p,q,r,s,t=1,u=!1;a.hooks.processDatapoints.push(b)}var c={"series":{"bars":{"order":null}}};a.plot.plugins.push({"init":b,"options":c,"name":"orderBars","version":"0.2"})}(jQuery);
!function(a){function b(b){function e(b,c,d){x||(x=!0,r=b.getCanvas(),s=a(r).parent(),t=b.getOptions(),b.setData(f(b.getData())))}function f(b){for(var c=0,d=0,e=0,f=t.series.pie.combine.color,g=[],h=0;h<b.length;++h){var i=b[h].data;a.isArray(i)&&1==i.length&&(i=i[0]),a.isArray(i)?!isNaN(parseFloat(i[1]))&&isFinite(i[1])?i[1]=+i[1]:i[1]=0:i=!isNaN(parseFloat(i))&&isFinite(i)?[1,+i]:[1,0],b[h].data=[i]}for(var h=0;h<b.length;++h)c+=b[h].data[0][1];for(var h=0;h<b.length;++h){var i=b[h].data[0][1];i/c<=t.series.pie.combine.threshold&&(d+=i,e++,f||(f=b[h].color))}for(var h=0;h<b.length;++h){var i=b[h].data[0][1];(2>e||i/c>t.series.pie.combine.threshold)&&g.push(a.extend(b[h],{"data":[[1,i]],"color":b[h].color,"label":b[h].label,"angle":i*Math.PI*2/c,"percent":i/(c/100)}))}return e>1&&g.push({"data":[[1,d]],"color":f,"label":t.series.pie.combine.label,"angle":d*Math.PI*2/c,"percent":d/(c/100)}),g}function g(b,e){function f(){y.clearRect(0,0,j,k),s.children().filter(".pieLabel, .pieLabelBackground").remove()}function g(){var a=t.series.pie.shadow.left,b=t.series.pie.shadow.top,c=10,d=t.series.pie.shadow.alpha,e=t.series.pie.radius>1?t.series.pie.radius:u*t.series.pie.radius;if(!(e>=j/2-a||e*t.series.pie.tilt>=k/2-b||c>=e)){y.save(),y.translate(a,b),y.globalAlpha=d,y.fillStyle="#000",y.translate(v,w),y.scale(1,t.series.pie.tilt);for(var f=1;c>=f;f++)y.beginPath(),y.arc(0,0,e,0,2*Math.PI,!1),y.fill(),e-=f;y.restore()}}function i(){function b(a,b,c){0>=a||isNaN(a)||(c?y.fillStyle=b:(y.strokeStyle=b,y.lineJoin="round"),y.beginPath(),Math.abs(a-2*Math.PI)>1e-9&&y.moveTo(0,0),y.arc(0,0,e,f,f+a/2,!1),y.arc(0,0,e,f+a/2,f+a,!1),y.closePath(),f+=a,c?y.fill():y.stroke())}function c(){function b(b,c,d){if(0==b.data[0][1])return!0;var f,g=t.legend.labelFormatter,h=t.series.pie.label.formatter;f=g?g(b.label,b):b.label,h&&(f=h(f,b));var i=(c+b.angle+c)/2,l=v+Math.round(Math.cos(i)*e),m=w+Math.round(Math.sin(i)*e)*t.series.pie.tilt,n="<span class='pieLabel' id='pieLabel"+d+"' style='position:absolute;top:"+m+"px;left:"+l+"px;'>"+f+"</span>";s.append(n);var o=s.children("#pieLabel"+d),p=m-o.height()/2,q=l-o.width()/2;if(o.css("top",p),o.css("left",q),0-p>0||0-q>0||k-(p+o.height())<0||j-(q+o.width())<0)return!1;if(0!=t.series.pie.label.background.opacity){var r=t.series.pie.label.background.color;null==r&&(r=b.color);var u="top:"+p+"px;left:"+q+"px;";a("<div class='pieLabelBackground' style='position:absolute;width:"+o.width()+"px;height:"+o.height()+"px;"+u+"background-color:"+r+";'></div>").css("opacity",t.series.pie.label.background.opacity).insertBefore(o)}return!0}for(var c=d,e=t.series.pie.label.radius>1?t.series.pie.label.radius:u*t.series.pie.label.radius,f=0;f<m.length;++f){if(m[f].percent>=100*t.series.pie.label.threshold&&!b(m[f],c,f))return!1;c+=m[f].angle}return!0}var d=Math.PI*t.series.pie.startAngle,e=t.series.pie.radius>1?t.series.pie.radius:u*t.series.pie.radius;y.save(),y.translate(v,w),y.scale(1,t.series.pie.tilt),y.save();for(var f=d,g=0;g<m.length;++g)m[g].startAngle=f,b(m[g].angle,m[g].color,!0);if(y.restore(),t.series.pie.stroke.width>0){y.save(),y.lineWidth=t.series.pie.stroke.width,f=d;for(var g=0;g<m.length;++g)b(m[g].angle,t.series.pie.stroke.color,!1);y.restore()}return h(y),y.restore(),t.series.pie.label.show?c():!0}if(s){var j=b.getPlaceholder().width(),k=b.getPlaceholder().height(),l=s.children().filter(".legend").children().width()||0;y=e,x=!1,u=Math.min(j,k/t.series.pie.tilt)/2,w=k/2+t.series.pie.offset.top,v=j/2,"auto"==t.series.pie.offset.left?(t.legend.position.match("w")?v+=l/2:v-=l/2,u>v?v=u:v>j-u&&(v=j-u)):v+=t.series.pie.offset.left;var m=b.getData(),n=0;do n>0&&(u*=d),n+=1,f(),t.series.pie.tilt<=.8&&g();while(!i()&&c>n);n>=c&&(f(),s.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),b.setSeries&&b.insertLegend&&(b.setSeries(m),b.insertLegend())}}function h(a){if(t.series.pie.innerRadius>0){a.save();var b=t.series.pie.innerRadius>1?t.series.pie.innerRadius:u*t.series.pie.innerRadius;a.globalCompositeOperation="destination-out",a.beginPath(),a.fillStyle=t.series.pie.stroke.color,a.arc(0,0,b,0,2*Math.PI,!1),a.fill(),a.closePath(),a.restore(),a.save(),a.beginPath(),a.strokeStyle=t.series.pie.stroke.color,a.arc(0,0,b,0,2*Math.PI,!1),a.stroke(),a.closePath(),a.restore()}}function i(a,b){for(var c=!1,d=-1,e=a.length,f=e-1;++d<e;f=d)(a[d][1]<=b[1]&&b[1]<a[f][1]||a[f][1]<=b[1]&&b[1]<a[d][1])&&b[0]<(a[f][0]-a[d][0])*(b[1]-a[d][1])/(a[f][1]-a[d][1])+a[d][0]&&(c=!c);return c}function j(a,c){for(var d,e,f=b.getData(),g=b.getOptions(),h=g.series.pie.radius>1?g.series.pie.radius:u*g.series.pie.radius,j=0;j<f.length;++j){var k=f[j];if(k.pie.show){if(y.save(),y.beginPath(),y.moveTo(0,0),y.arc(0,0,h,k.startAngle,k.startAngle+k.angle/2,!1),y.arc(0,0,h,k.startAngle+k.angle/2,k.startAngle+k.angle,!1),y.closePath(),d=a-v,e=c-w,y.isPointInPath){if(y.isPointInPath(a-v,c-w))return y.restore(),{"datapoint":[k.percent,k.data],"dataIndex":0,"series":k,"seriesIndex":j}}else{var l=h*Math.cos(k.startAngle),m=h*Math.sin(k.startAngle),n=h*Math.cos(k.startAngle+k.angle/4),o=h*Math.sin(k.startAngle+k.angle/4),p=h*Math.cos(k.startAngle+k.angle/2),q=h*Math.sin(k.startAngle+k.angle/2),r=h*Math.cos(k.startAngle+k.angle/1.5),s=h*Math.sin(k.startAngle+k.angle/1.5),t=h*Math.cos(k.startAngle+k.angle),x=h*Math.sin(k.startAngle+k.angle),z=[[0,0],[l,m],[n,o],[p,q],[r,s],[t,x]],A=[d,e];if(i(z,A))return y.restore(),{"datapoint":[k.percent,k.data],"dataIndex":0,"series":k,"seriesIndex":j}}y.restore()}}return null}function k(a){m("plothover",a)}function l(a){m("plotclick",a)}function m(a,c){var d=b.offset(),e=parseInt(c.pageX-d.left),f=parseInt(c.pageY-d.top),g=j(e,f);if(t.grid.autoHighlight)for(var h=0;h<z.length;++h){var i=z[h];i.auto!=a||g&&i.series==g.series||o(i.series)}g&&n(g.series,a);var k={"pageX":c.pageX,"pageY":c.pageY};s.trigger(a,[k,g])}function n(a,c){var d=p(a);-1==d?(z.push({"series":a,"auto":c}),b.triggerRedrawOverlay()):c||(z[d].auto=!1)}function o(a){null==a&&(z=[],b.triggerRedrawOverlay());var c=p(a);-1!=c&&(z.splice(c,1),b.triggerRedrawOverlay())}function p(a){for(var b=0;b<z.length;++b){var c=z[b];if(c.series==a)return b}return-1}function q(a,b){function c(a){a.angle<=0||isNaN(a.angle)||(b.fillStyle="rgba(255, 255, 255, "+d.series.pie.highlight.opacity+")",b.beginPath(),Math.abs(a.angle-2*Math.PI)>1e-9&&b.moveTo(0,0),b.arc(0,0,e,a.startAngle,a.startAngle+a.angle/2,!1),b.arc(0,0,e,a.startAngle+a.angle/2,a.startAngle+a.angle,!1),b.closePath(),b.fill())}var d=a.getOptions(),e=d.series.pie.radius>1?d.series.pie.radius:u*d.series.pie.radius;b.save(),b.translate(v,w),b.scale(1,d.series.pie.tilt);for(var f=0;f<z.length;++f)c(z[f].series);h(b),b.restore()}var r=null,s=null,t=null,u=null,v=null,w=null,x=!1,y=null,z=[];b.hooks.processOptions.push(function(a,b){b.series.pie.show&&(b.grid.show=!1,"auto"==b.series.pie.label.show&&(b.legend.show?b.series.pie.label.show=!1:b.series.pie.label.show=!0),"auto"==b.series.pie.radius&&(b.series.pie.label.show?b.series.pie.radius=.75:b.series.pie.radius=1),b.series.pie.tilt>1?b.series.pie.tilt=1:b.series.pie.tilt<0&&(b.series.pie.tilt=0))}),b.hooks.bindEvents.push(function(a,b){var c=a.getOptions();c.series.pie.show&&(c.grid.hoverable&&b.unbind("mousemove").mousemove(k),c.grid.clickable&&b.unbind("click").click(l))}),b.hooks.processDatapoints.push(function(a,b,c,d){var f=a.getOptions();f.series.pie.show&&e(a,b,c,d)}),b.hooks.drawOverlay.push(function(a,b){var c=a.getOptions();c.series.pie.show&&q(a,b)}),b.hooks.draw.push(function(a,b){var c=a.getOptions();c.series.pie.show&&g(a,b)})}var c=10,d=.95,e={"series":{"pie":{"show":!1,"radius":"auto","innerRadius":0,"startAngle":1.5,"tilt":1,"shadow":{"left":5,"top":15,"alpha":.02},"offset":{"top":0,"left":"auto"},"stroke":{"color":"#fff","width":1},"label":{"show":"auto","formatter":function(a,b){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+b.color+";'>"+a+"<br/>"+Math.round(b.percent)+"%</div>"},"radius":1,"background":{"color":null,"opacity":0},"threshold":0},"combine":{"threshold":-1,"color":null,"label":"Other"},"highlight":{"opacity":.5}}}};a.plot.plugins.push({"init":b,"options":e,"name":"pie","version":"1.1"})}(jQuery);
/*! SmartAdmin - v1.4.1 - 2014-08-08 */!function(a){var b={"tooltip":!1,"tooltipOpts":{"content":"%s | X: %x | Y: %y.2","dateFormat":"%y-%0m-%0d","shifts":{"x":10,"y":20},"defaultTheme":!0}},c=function(b){var c={"x":0,"y":0},d=b.getOptions(),e=function(a){c.x=a.x,c.y=a.y},f=function(a){var b={"x":0,"y":0};b.x=a.pageX,b.y=a.pageY,e(b)},g=function(b){var c=new Date(b);return a.plot.formatDate(c,d.tooltipOpts.dateFormat)};b.hooks.bindEvents.push(function(b,e){var i,j=d.tooltipOpts,k=b.getPlaceholder();d.tooltip!==!1&&(a("#flotTip").length>0?i=a("#flotTip"):(i=a("<div />").attr("id","flotTip"),i.appendTo("body").hide().css({"position":"absolute"}),j.defaultTheme&&i.css({"background":"#fff","z-index":"100","padding":"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em","border":"1px solid #111"})),a(k).bind("plothover",function(a,b,e){if(e){var f;f="time"===d.xaxis.mode||"time"===d.xaxes[0].mode?h(j.content,e,g):h(j.content,e),i.html(f).css({"left":c.x+j.shifts.x,"top":c.y+j.shifts.y}).show()}else i.hide().html("")}),e.mousemove(f))});var h=function(a,b,c){var d=/%p\.{0,1}(\d{0,})/,e=/%s/,f=/%x\.{0,1}(\d{0,})/,g=/%y\.{0,1}(\d{0,})/;return"undefined"!=typeof b.series.percent&&(a=i(d,a,b.series.percent)),"undefined"!=typeof b.series.label&&(a=a.replace(e,b.series.label)),"function"==typeof c?a=a.replace(f,c(b.series.data[b.dataIndex][0])):"number"==typeof b.series.data[b.dataIndex][0]&&(a=i(f,a,b.series.data[b.dataIndex][0])),"number"==typeof b.series.data[b.dataIndex][1]&&(a=i(g,a,b.series.data[b.dataIndex][1])),a},i=function(a,b,c){var d;return"null"!==b.match(a)&&(""!==RegExp.$1&&(d=RegExp.$1,c=c.toFixed(d)),b=b.replace(a,c)),b}};a.plot.plugins.push({"init":c,"options":b,"name":"tooltip","version":"0.4.4"})}(jQuery);
/*! @license Copyright 2011 Dan Vanderkam ([email protected]) MIT-licensed (http://opensource.org/licenses/MIT) */
function RGBColorParser(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={"aliceblue":"f0f8ff","antiquewhite":"faebd7","aqua":"00ffff","aquamarine":"7fffd4","azure":"f0ffff","beige":"f5f5dc","bisque":"ffe4c4","black":"000000","blanchedalmond":"ffebcd","blue":"0000ff","blueviolet":"8a2be2","brown":"a52a2a","burlywood":"deb887","cadetblue":"5f9ea0","chartreuse":"7fff00","chocolate":"d2691e","coral":"ff7f50","cornflowerblue":"6495ed","cornsilk":"fff8dc","crimson":"dc143c","cyan":"00ffff","darkblue":"00008b","darkcyan":"008b8b","darkgoldenrod":"b8860b","darkgray":"a9a9a9","darkgreen":"006400","darkkhaki":"bdb76b","darkmagenta":"8b008b","darkolivegreen":"556b2f","darkorange":"ff8c00","darkorchid":"9932cc","darkred":"8b0000","darksalmon":"e9967a","darkseagreen":"8fbc8f","darkslateblue":"483d8b","darkslategray":"2f4f4f","darkturquoise":"00ced1","darkviolet":"9400d3","deeppink":"ff1493","deepskyblue":"00bfff","dimgray":"696969","dodgerblue":"1e90ff","feldspar":"d19275","firebrick":"b22222","floralwhite":"fffaf0","forestgreen":"228b22","fuchsia":"ff00ff","gainsboro":"dcdcdc","ghostwhite":"f8f8ff","gold":"ffd700","goldenrod":"daa520","gray":"808080","green":"008000","greenyellow":"adff2f","honeydew":"f0fff0","hotpink":"ff69b4","indianred":"cd5c5c","indigo":"4b0082","ivory":"fffff0","khaki":"f0e68c","lavender":"e6e6fa","lavenderblush":"fff0f5","lawngreen":"7cfc00","lemonchiffon":"fffacd","lightblue":"add8e6","lightcoral":"f08080","lightcyan":"e0ffff","lightgoldenrodyellow":"fafad2","lightgrey":"d3d3d3","lightgreen":"90ee90","lightpink":"ffb6c1","lightsalmon":"ffa07a","lightseagreen":"20b2aa","lightskyblue":"87cefa","lightslateblue":"8470ff","lightslategray":"778899","lightsteelblue":"b0c4de","lightyellow":"ffffe0","lime":"00ff00","limegreen":"32cd32","linen":"faf0e6","magenta":"ff00ff","maroon":"800000","mediumaquamarine":"66cdaa","mediumblue":"0000cd","mediumorchid":"ba55d3","mediumpurple":"9370d8","mediumseagreen":"3cb371","mediumslateblue":"7b68ee","mediumspringgreen":"00fa9a","mediumturquoise":"48d1cc","mediumvioletred":"c71585","midnightblue":"191970","mintcream":"f5fffa","mistyrose":"ffe4e1","moccasin":"ffe4b5","navajowhite":"ffdead","navy":"000080","oldlace":"fdf5e6","olive":"808000","olivedrab":"6b8e23","orange":"ffa500","orangered":"ff4500","orchid":"da70d6","palegoldenrod":"eee8aa","palegreen":"98fb98","paleturquoise":"afeeee","palevioletred":"d87093","papayawhip":"ffefd5","peachpuff":"ffdab9","peru":"cd853f","pink":"ffc0cb","plum":"dda0dd","powderblue":"b0e0e6","purple":"800080","red":"ff0000","rosybrown":"bc8f8f","royalblue":"4169e1","saddlebrown":"8b4513","salmon":"fa8072","sandybrown":"f4a460","seagreen":"2e8b57","seashell":"fff5ee","sienna":"a0522d","silver":"c0c0c0","skyblue":"87ceeb","slateblue":"6a5acd","slategray":"708090","snow":"fffafa","springgreen":"00ff7f","steelblue":"4682b4","tan":"d2b48c","teal":"008080","thistle":"d8bfd8","tomato":"ff6347","turquoise":"40e0d0","violet":"ee82ee","violetred":"d02090","wheat":"f5deb3","white":"ffffff","whitesmoke":"f5f5f5","yellow":"ffff00","yellowgreen":"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{"re":/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,"example":["rgb(123, 234, 45)","rgb(255,234,245)"],"process":function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{"re":/^(\w{2})(\w{2})(\w{2})$/,"example":["#00ff00","336699"],"process":function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{"re":/^(\w{1})(\w{1})(\w{1})$/,"example":["#fb0","f0f"],"process":function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var f=d[e].re,g=d[e].process,h=f.exec(a);if(h){var i=g(h);this.r=i[0],this.g=i[1],this.b=i[2],this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c}}function printStackTrace(a){a=a||{"guess":!0};var b=a.e||null,c=!!a.guess,d=new printStackTrace.implementation,e=d.run(b);return c?d.guessAnonymousFunctions(e):e}Date.ext={},Date.ext.util={},Date.ext.util.xPad=function(a,b,c){for("undefined"==typeof c&&(c=10);parseInt(a,10)<c&&c>1;c/=10)a=b.toString()+a;return a.toString()},Date.prototype.locale="en-GB",document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang&&(Date.prototype.locale=document.getElementsByTagName("html")[0].lang),Date.ext.locales={},Date.ext.locales.en={"a":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"A":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"b":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"B":["January","February","March","April","May","June","July","August","September","October","November","December"],"c":"%a %d %b %Y %T %Z","p":["AM","PM"],"P":["am","pm"],"x":"%d/%m/%y","X":"%T"},Date.ext.locales["en-US"]=Date.ext.locales.en,Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z",Date.ext.locales["en-US"].x="%D",Date.ext.locales["en-US"].X="%r",Date.ext.locales["en-GB"]=Date.ext.locales.en,Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"],Date.ext.formats={"a":function(a){return Date.ext.locales[a.locale].a[a.getDay()]},"A":function(a){return Date.ext.locales[a.locale].A[a.getDay()]},"b":function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},"B":function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},"c":"toLocaleString","C":function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},"d":["getDate","0"],"e":["getDate"," "],"g":function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},"G":function(a){var b=a.getFullYear(),c=parseInt(Date.ext.formats.V(a),10),d=parseInt(Date.ext.formats.W(a),10);return d>c?b++:0===d&&c>=52&&b--,b},"H":["getHours","0"],"I":function(a){var b=a.getHours()%12;return Date.ext.util.xPad(0===b?12:b,0)},"j":function(a){var b=a-new Date(""+a.getFullYear()+"/1/1 GMT");b+=6e4*a.getTimezoneOffset();var c=parseInt(b/6e4/60/24,10)+1;return Date.ext.util.xPad(c,0,100)},"m":function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},"M":["getMinutes","0"],"p":function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},"P":function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},"S":["getSeconds","0"],"u":function(a){var b=a.getDay();return 0===b?7:b},"U":function(a){var b=parseInt(Date.ext.formats.j(a),10),c=6-a.getDay(),d=parseInt((b+c)/7,10);return Date.ext.util.xPad(d,0)},"V":function(a){var b=parseInt(Date.ext.formats.W(a),10),c=new Date(""+a.getFullYear()+"/1/1").getDay(),d=b+(c>4||1>=c?0:1);return 53==d&&new Date(""+a.getFullYear()+"/12/31").getDay()<4?d=1:0===d&&(d=Date.ext.formats.V(new Date(""+(a.getFullYear()-1)+"/12/31"))),Date.ext.util.xPad(d,0)},"w":"getDay","W":function(a){var b=parseInt(Date.ext.formats.j(a),10),c=7-Date.ext.formats.u(a),d=parseInt((b+c)/7,10);return Date.ext.util.xPad(d,0,10)},"y":function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},"Y":"getFullYear","z":function(a){var b=a.getTimezoneOffset(),c=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0),d=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+c+d},"Z":function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}},Date.ext.aggregates={"c":"locale","D":"%m/%d/%y","h":"%b","n":"\n","r":"%I:%M:%S %p","R":"%H:%M","t":" ","T":"%H:%M:%S","x":"locale","X":"locale"},Date.ext.aggregates.z=Date.ext.formats.z(new Date),Date.ext.aggregates.Z=Date.ext.formats.Z(new Date),Date.ext.unsupported={},Date.prototype.strftime=function(a){this.locale in Date.ext.locales||(this.locale.replace(/-[a-zA-Z]+$/,"")in Date.ext.locales?this.locale=this.locale.replace(/-[a-zA-Z]+$/,""):this.locale="en-GB");for(var b=this;a.match(/%[cDhnrRtTxXzZ]/);)a=a.replace(/%([cDhnrRtTxXzZ])/g,function(a,c){var d=Date.ext.aggregates[c];return"locale"==d?Date.ext.locales[b.locale][c]:d});var c=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(a,c){var d=Date.ext.formats[c];return"string"==typeof d?b[d]():"function"==typeof d?d.call(b,b):"object"==typeof d&&"string"==typeof d[0]?Date.ext.util.xPad(b[d[0]](),d[1]):c});return b=null,c},printStackTrace.implementation=function(){},printStackTrace.implementation.prototype={"run":function(a,b){return a=a||this.createException(),b=b||this.mode(a),"other"===b?this.other(arguments.callee):this[b](a)},"createException":function(){try{this.undef()}catch(a){return a}},"mode":function(a){return a.arguments&&a.stack?"chrome":"string"==typeof a.message&&"undefined"!=typeof window&&window.opera?a.stacktrace?a.message.indexOf("\n")>-1&&a.message.split("\n").length>a.stacktrace.split("\n").length?"opera9":a.stack?a.stacktrace.indexOf("called from line")<0?"opera10b":"opera11":"opera10a":"opera9":a.stack?"firefox":"other"},"instrumentFunction":function(a,b,c){a=a||window;var d=a[b];a[b]=function(){return c.call(this,printStackTrace().slice(4)),a[b]._instrumented.apply(this,arguments)},a[b]._instrumented=d},"deinstrumentFunction":function(a,b){a[b].constructor===Function&&a[b]._instrumented&&a[b]._instrumented.constructor===Function&&(a[b]=a[b]._instrumented)},"chrome":function(a){var b=(a.stack+"\n").replace(/^\S[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}()@$1$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm,"{anonymous}()@$1").split("\n");return b.pop(),b},"firefox":function(a){return a.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^\(/gm,"{anonymous}(").split("\n")},"opera11":function(a){for(var b="{anonymous}",c=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/,d=a.stacktrace.split("\n"),e=[],f=0,g=d.length;g>f;f+=2){var h=c.exec(d[f]);if(h){var i=h[4]+":"+h[1]+":"+h[2],j=h[3]||"global code";j=j.replace(/<anonymous function: (\S+)>/,"$1").replace(/<anonymous function>/,b),e.push(j+"@"+i+" -- "+d[f+1].replace(/^\s+/,""))}}return e},"opera10b":function(a){for(var b=/^(.*)@(.+):(\d+)$/,c=a.stacktrace.split("\n"),d=[],e=0,f=c.length;f>e;e++){var g=b.exec(c[e]);if(g){var h=g[1]?g[1]+"()":"global code";d.push(h+"@"+g[2]+":"+g[3])}}return d},"opera10a":function(a){for(var b="{anonymous}",c=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,d=a.stacktrace.split("\n"),e=[],f=0,g=d.length;g>f;f+=2){var h=c.exec(d[f]);if(h){var i=h[3]||b;e.push(i+"()@"+h[2]+":"+h[1]+" -- "+d[f+1].replace(/^\s+/,""))}}return e},"opera9":function(a){for(var b="{anonymous}",c=/Line (\d+).*script (?:in )?(\S+)/i,d=a.message.split("\n"),e=[],f=2,g=d.length;g>f;f+=2){var h=c.exec(d[f]);h&&e.push(b+"()@"+h[2]+":"+h[1]+" -- "+d[f+1].replace(/^\s+/,""))}return e},"other":function(a){for(var b,c,d="{anonymous}",e=/function\s*([\w\-$]+)?\s*\(/i,f=[],g=10;a&&f.length<g;)b=e.test(a.toString())?RegExp.$1||d:d,c=Array.prototype.slice.call(a.arguments||[]),f[f.length]=b+"("+this.stringifyArguments(c)+")",a=a.caller;return f},"stringifyArguments":function(a){for(var b=[],c=Array.prototype.slice,d=0;d<a.length;++d){var e=a[d];void 0===e?b[d]="undefined":null===e?b[d]="null":e.constructor&&(e.constructor===Array?e.length<3?b[d]="["+this.stringifyArguments(e)+"]":b[d]="["+this.stringifyArguments(c.call(e,0,1))+"..."+this.stringifyArguments(c.call(e,-1))+"]":e.constructor===Object?b[d]="#object":e.constructor===Function?b[d]="#function":e.constructor===String?b[d]='"'+e+'"':e.constructor===Number&&(b[d]=e))}return b.join(",")},"sourceCache":{},"ajax":function(a){var b=this.createXMLHTTPObject();if(b)try{return b.open("GET",a,!1),b.send(null),b.responseText}catch(c){}return""},"createXMLHTTPObject":function(){for(var a,b=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0;c<b.length;c++)try{return a=b[c](),this.createXMLHTTPObject=b[c],a}catch(d){}},"isSameDomain":function(a){return-1!==a.indexOf(location.hostname)},"getSource":function(a){return a in this.sourceCache||(this.sourceCache[a]=this.ajax(a).split("\n")),this.sourceCache[a]},"guessAnonymousFunctions":function(a){for(var b=0;b<a.length;++b){var c=/\{anonymous\}\(.*\)@(.*)/,d=/^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,e=a[b],f=c.exec(e);if(f){var g=d.exec(f[1]),h=g[1],i=g[2],j=g[3]||0;if(h&&this.isSameDomain(h)&&i){var k=this.guessAnonymousFunction(h,i,j);a[b]=e.replace("{anonymous}",k)}}}return a},"guessAnonymousFunction":function(a,b,c){var d;try{d=this.findFunctionName(this.getSource(a),b)}catch(e){d="getSource failed with url: "+a+", exception: "+e.toString()}return d},"findFunctionName":function(a,b){for(var c,d,e,f=/function\s+([^(]*?)\s*\(([^)]*)\)/,g=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/,h=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/,i="",j=Math.min(b,20),k=0;j>k;++k)if(c=a[b-k-1],e=c.indexOf("//"),e>=0&&(c=c.substr(0,e)),c){if(i=c+i,d=g.exec(i),d&&d[1])return d[1];if(d=f.exec(i),d&&d[1])return d[1];if(d=h.exec(i),d&&d[1])return d[1]}return"(?)"}},CanvasRenderingContext2D.prototype.installPattern=function(a){if("undefined"!=typeof this.isPatternInstalled)throw"Must un-install old line pattern before installing a new one.";this.isPatternInstalled=!0;var b=[0,0],c=[],d=this.beginPath,e=this.lineTo,f=this.moveTo,g=this.stroke;this.uninstallPattern=function(){this.beginPath=d,this.lineTo=e,this.moveTo=f,this.stroke=g,this.uninstallPattern=void 0,this.isPatternInstalled=void 0},this.beginPath=function(){c=[],d.call(this)},this.moveTo=function(a,b){c.push([[a,b]]),f.call(this,a,b)},this.lineTo=function(a,b){var d=c[c.length-1];d.push([a,b])},this.stroke=function(){if(0===c.length)return void g.call(this);for(var d=0;d<c.length;d++)for(var h=c[d],i=h[0][0],j=h[0][1],k=1;k<h.length;k++){var l=h[k][0],m=h[k][1];this.save();var n=l-i,o=m-j,p=Math.sqrt(n*n+o*o),q=Math.atan2(o,n);this.translate(i,j),f.call(this,0,0),this.rotate(q);for(var r=b[0],s=0;p>s;){var t=a[r];s+=b[1]?b[1]:t,s>p?(b=[r,s-p],s=p):b=[(r+1)%a.length,0],r%2===0?e.call(this,s,0):f.call(this,s,0),r=(r+1)%a.length}this.restore(),i=l,j=m}g.call(this),c=[]}},CanvasRenderingContext2D.prototype.uninstallPattern=function(){throw"Must install a line pattern before uninstalling it."};var DygraphOptions=function(){var a=function(a){this.dygraph_=a,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()};return a.AXIS_STRING_MAPPINGS_={"y":0,"Y":0,"y1":0,"Y1":0,"y2":1,"Y2":1},a.axisToIndex_=function(b){if("string"==typeof b){if(a.AXIS_STRING_MAPPINGS_.hasOwnProperty(b))return a.AXIS_STRING_MAPPINGS_[b];throw"Unknown axis : "+b}if("number"==typeof b){if(0===b||1===b)return b;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(b)throw"Unknown axis : "+b;return 0},a.prototype.reparseSeries=function(){var b=this.get("labels");if(b){this.labels_=b.slice(1),this.yAxes_=[{"series":[],"options":{}}],this.xAxis_={"options":{}},this.series_={};var c=!this.user_.series;if(c){for(var d=0,e=0;e<this.labels_.length;e++){var f=this.labels_[e],g=this.user_[f]||{},h=0,i=g.axis;"object"==typeof i&&(h=++d,this.yAxes_[h]={"series":[f],"options":i}),i||this.yAxes_[0].series.push(f),this.series_[f]={"idx":e,"yAxis":h,"options":g}}for(var e=0;e<this.labels_.length;e++){var f=this.labels_[e],g=this.series_[f].options,i=g.axis;if("string"==typeof i){if(!this.series_.hasOwnProperty(i))return void Dygraph.error("Series "+f+" wants to share a y-axis with series "+i+", which does not define its own axis.");var h=this.series_[i].yAxis;this.series_[f].yAxis=h,this.yAxes_[h].series.push(f)}}}else for(var e=0;e<this.labels_.length;e++){var f=this.labels_[e],g=this.user_.series[f]||{},h=a.axisToIndex_(g.axis);this.series_[f]={"idx":e,"yAxis":h,"options":g},this.yAxes_[h]?this.yAxes_[h].series.push(f):this.yAxes_[h]={"series":[f],"options":{}}}var j=this.user_.axes||{};Dygraph.update(this.yAxes_[0].options,j.y||{}),this.yAxes_.length>1&&Dygraph.update(this.yAxes_[1].options,j.y2||{}),Dygraph.update(this.xAxis_.options,j.x||{})}},a.prototype.get=function(a){var b=this.getGlobalUser_(a);return null!==b?b:this.getGlobalDefault_(a)},a.prototype.getGlobalUser_=function(a){return this.user_.hasOwnProperty(a)?this.user_[a]:null},a.prototype.getGlobalDefault_=function(a){return this.global_.hasOwnProperty(a)?this.global_[a]:Dygraph.DEFAULT_ATTRS.hasOwnProperty(a)?Dygraph.DEFAULT_ATTRS[a]:null},a.prototype.getForAxis=function(a,b){var c,d;if("number"==typeof b)c=b,d=0===c?"y":"y2";else{if("y1"==b&&(b="y"),"y"==b)c=0;else if("y2"==b)c=1;else{if("x"!=b)throw"Unknown axis "+b;c=-1}d=b}var e=-1==c?this.xAxis_:this.yAxes_[c];if(e){var f=e.options;if(f.hasOwnProperty(a))return f[a]}var g=this.getGlobalUser_(a);if(null!==g)return g;var h=Dygraph.DEFAULT_ATTRS.axes[d];return h.hasOwnProperty(a)?h[a]:this.getGlobalDefault_(a)},a.prototype.getForSeries=function(a,b){if(b===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(a))return this.highlightSeries_[a];if(!this.series_.hasOwnProperty(b))throw"Unknown series: "+b;var c=this.series_[b],d=c.options;return d.hasOwnProperty(a)?d[a]:this.getForAxis(a,c.yAxis)},a.prototype.numAxes=function(){return this.yAxes_.length},a.prototype.axisForSeries=function(a){return this.series_[a].yAxis},a.prototype.axisOptions=function(a){return this.yAxes_[a].options},a.prototype.seriesForAxis=function(a){return this.yAxes_[a].series},a.prototype.seriesNames=function(){return this.labels_},a}(),DygraphLayout=function(a){this.dygraph_=a,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)},DygraphLayout.prototype.addDataset=function(a,b){this.points.push(b),this.setNames.push(a)},DygraphLayout.prototype.getPlotArea=function(){return this.area_},DygraphLayout.prototype.computePlotArea=function(){var a={"x":0,"y":0};a.w=this.dygraph_.width_-a.x-this.attr_("rightGap"),a.h=this.dygraph_.height_;var b={"chart_div":this.dygraph_.graphDiv,"reserveSpaceLeft":function(b){var c={"x":a.x,"y":a.y,"w":b,"h":a.h};return a.x+=b,a.w-=b,c},"reserveSpaceRight":function(b){var c={"x":a.x+a.w-b,"y":a.y,"w":b,"h":a.h};return a.w-=b,c},"reserveSpaceTop":function(b){var c={"x":a.x,"y":a.y,"w":a.w,"h":b};return a.y+=b,a.h-=b,c},"reserveSpaceBottom":function(b){var c={"x":a.x,"y":a.y+a.h-b,"w":a.w,"h":b};return a.h-=b,c},"chartRect":function(){return{"x":a.x,"y":a.y,"w":a.w,"h":a.h}}};this.dygraph_.cascadeEvents_("layout",b),this.area_=a},DygraphLayout.prototype.setAnnotations=function(a){this.annotations=[];for(var b=this.attr_("xValueParser")||function(a){return a},c=0;c<a.length;c++){var d={};if(!a[c].xval&&void 0===a[c].x)return void this.dygraph_.error("Annotations must have an 'x' property");if(a[c].icon&&(!a[c].hasOwnProperty("width")||!a[c].hasOwnProperty("height")))return void this.dygraph_.error("Must set width and height when setting annotation.icon property");Dygraph.update(d,a[c]),d.xval||(d.xval=b(d.x)),this.annotations.push(d)}},DygraphLayout.prototype.setXTicks=function(a){this.xTicks_=a},DygraphLayout.prototype.setYAxes=function(a){this.yAxes_=a},DygraphLayout.prototype.evaluate=function(){this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},DygraphLayout.prototype._evaluateLimits=function(){var a=this.dygraph_.xAxisRange();this.minxval=a[0],this.maxxval=a[1];var b=a[1]-a[0];this.xscale=0!==b?1/b:1;for(var c=0;c<this.yAxes_.length;c++){var d=this.yAxes_[c];d.minyval=d.computedValueRange[0],d.maxyval=d.computedValueRange[1],d.yrange=d.maxyval-d.minyval,d.yscale=0!==d.yrange?1/d.yrange:1,d.g.attr_("logscale")&&(d.ylogrange=Dygraph.log10(d.maxyval)-Dygraph.log10(d.minyval),d.ylogscale=0!==d.ylogrange?1/d.ylogrange:1,(!isFinite(d.ylogrange)||isNaN(d.ylogrange))&&d.g.error("axis "+c+" of graph at "+d.g+" can't be displayed in log scale for range ["+d.minyval+" - "+d.maxyval+"]"))}},DygraphLayout._calcYNormal=function(a,b,c){return c?1-(Dygraph.log10(b)-Dygraph.log10(a.minyval))*a.ylogscale:1-(b-a.minyval)*a.yscale},DygraphLayout.prototype._evaluateLineCharts=function(){for(var a=this.attr_("connectSeparatedPoints"),b=this.attr_("stackedGraph"),c=this.attr_("errorBars")||this.attr_("customBars"),d=0;d<this.points.length;d++)for(var e=this.points[d],f=this.setNames[d],g=this.dygraph_.axisPropertiesForSeries(f),h=this.dygraph_.attributes_.getForSeries("logscale",f),i=0;i<e.length;i++){var j=e[i];j.x=(j.xval-this.minxval)*this.xscale;var k=j.yval;b&&(j.y_stacked=DygraphLayout._calcYNormal(g,j.yval_stacked,h),null===k||isNaN(k)||(k=j.yval_stacked)),null===k&&(k=NaN,a||(j.yval=NaN)),j.y=DygraphLayout._calcYNormal(g,k,h),c&&(j.y_top=DygraphLayout._calcYNormal(g,k-j.yval_minus,h),j.y_bottom=DygraphLayout._calcYNormal(g,k+j.yval_plus,h))}},DygraphLayout.parseFloat_=function(a){return null===a?NaN:a},DygraphLayout.prototype._evaluateLineTicks=function(){var a,b,c,d;for(this.xticks=[],a=0;a<this.xTicks_.length;a++)b=this.xTicks_[a],c=b.label,d=this.xscale*(b.v-this.minxval),d>=0&&1>=d&&this.xticks.push([d,c]);for(this.yticks=[],a=0;a<this.yAxes_.length;a++)for(var e=this.yAxes_[a],f=0;f<e.ticks.length;f++)b=e.ticks[f],c=b.label,d=this.dygraph_.toPercentYCoord(b.v,a),d>=0&&1>=d&&this.yticks.push([a,d,c])},DygraphLayout.prototype._evaluateAnnotations=function(){var a,b={};for(a=0;a<this.annotations.length;a++){var c=this.annotations[a];b[c.xval+","+c.series]=c}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var d=0;d<this.points.length;d++){var e=this.points[d];for(a=0;a<e.length;a++){var f=e[a],g=f.xval+","+f.name;g in b&&(f.annotation=b[g],this.annotated_points.push(f))}}},DygraphLayout.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]};var DygraphCanvasRenderer=function(a,b,c,d){if(this.dygraph_=a,this.layout=d,this.element=b,this.elementContext=c,this.container=this.element.parentNode,this.height=this.element.height,this.width=this.element.width,!this.isIE&&!DygraphCanvasRenderer.isSupported(this.element))throw"Canvas is not supported.";if(this.area=d.getPlotArea(),this.container.style.position="relative",this.container.style.width=this.width+"px",this.dygraph_.isUsingExcanvas_)this._createIEClipArea();else if(!Dygraph.isAndroid()){var e=this.dygraph_.canvas_ctx_;e.beginPath(),e.rect(this.area.x,this.area.y,this.area.w,this.area.h),e.clip(),e=this.dygraph_.hidden_ctx_,e.beginPath(),e.rect(this.area.x,this.area.y,this.area.w,this.area.h),e.clip()}};DygraphCanvasRenderer.prototype.attr_=function(a,b){return this.dygraph_.attr_(a,b)},DygraphCanvasRenderer.prototype.clear=function(){var a;if(this.isIE)try{this.clearDelay&&(this.clearDelay.cancel(),this.clearDelay=null),a=this.elementContext}catch(b){return}a=this.elementContext,a.clearRect(0,0,this.width,this.height)},DygraphCanvasRenderer.isSupported=function(a){var b=null;try{b="undefined"==typeof a||null===a?document.createElement("canvas"):a,b.getContext("2d")}catch(c){var d=navigator.appVersion.match(/MSIE (\d\.\d)/),e=-1!=navigator.userAgent.toLowerCase().indexOf("opera");return!d||d[1]<6||e?!1:!0}return!0},DygraphCanvasRenderer.prototype.render=function(){this._updatePoints(),this._renderLineChart()},DygraphCanvasRenderer.prototype._createIEClipArea=function(){function a(a){if(0!==a.w&&0!==a.h){var d=document.createElement("div");d.className=b,d.style.backgroundColor=e,d.style.position="absolute",d.style.left=a.x+"px",d.style.top=a.y+"px",d.style.width=a.w+"px",d.style.height=a.h+"px",c.appendChild(d)}}for(var b="dygraph-clip-div",c=this.dygraph_.graphDiv,d=c.childNodes.length-1;d>=0;d--)c.childNodes[d].className==b&&c.removeChild(c.childNodes[d]);for(var e=document.bgColor,f=this.dygraph_.graphDiv;f!=document;){var g=f.currentStyle.backgroundColor;if(g&&"transparent"!=g){e=g;break}f=f.parentNode}var h=this.area;a({"x":0,"y":0,"w":h.x,"h":this.height}),a({"x":h.x,"y":0,"w":this.width-h.x,"h":h.y}),a({"x":h.x+h.w,"y":0,"w":this.width-h.x-h.w,"h":this.height}),a({"x":h.x,"y":h.y+h.h,"w":this.width-h.x,"h":this.height-h.h-h.y})},DygraphCanvasRenderer._getIteratorPredicate=function(a){return a?DygraphCanvasRenderer._predicateThatSkipsEmptyPoints:null},DygraphCanvasRenderer._predicateThatSkipsEmptyPoints=function(a,b){return null!==a[b].yval},DygraphCanvasRenderer._drawStyledLine=function(a,b,c,d,e,f,g){var h=a.dygraph,i=h.getOption("stepPlot",a.setName);Dygraph.isArrayLike(d)||(d=null);var j=h.getOption("drawGapEdgePoints",a.setName),k=a.points,l=Dygraph.createIterator(k,0,k.length,DygraphCanvasRenderer._getIteratorPredicate(h.getOption("connectSeparatedPoints"))),m=d&&d.length>=2,n=a.drawingContext;n.save(),m&&n.installPattern(d);var o=DygraphCanvasRenderer._drawSeries(a,l,c,g,e,j,i,b);DygraphCanvasRenderer._drawPointsOnLine(a,o,f,b,g),m&&n.uninstallPattern(),n.restore()},DygraphCanvasRenderer._drawSeries=function(a,b,c,d,e,f,g,h){var i,j,k=null,l=null,m=null,n=[],o=!0,p=a.drawingContext;p.beginPath(),p.strokeStyle=h,p.lineWidth=c;for(var q=b.array_,r=b.end_,s=b.predicate_,t=b.start_;r>t;t++){if(j=q[t],s){for(;r>t&&!s(q,t);)t++;if(t==r)break;j=q[t]}if(null===j.canvasy||j.canvasy!=j.canvasy)g&&null!==k&&(p.moveTo(k,l),p.lineTo(j.canvasx,l)),k=l=null;else{if(i=!1,f||!k){b.nextIdx_=t,b.next(),m=b.hasNext?b.peek.canvasy:null;var u=null===m||m!=m;i=!k&&u,f&&(!o&&!k||b.hasNext&&u)&&(i=!0)}null!==k?c&&(g&&(p.moveTo(k,l),p.lineTo(j.canvasx,l)),p.lineTo(j.canvasx,j.canvasy)):p.moveTo(j.canvasx,j.canvasy),(e||i)&&n.push([j.canvasx,j.canvasy,j.idx]),k=j.canvasx,l=j.canvasy}o=!1}return p.stroke(),n},DygraphCanvasRenderer._drawPointsOnLine=function(a,b,c,d,e){for(var f=a.drawingContext,g=0;g<b.length;g++){var h=b[g];f.save(),c(a.dygraph,a.setName,f,h[0],h[1],d,e,h[2]),f.restore()}},DygraphCanvasRenderer.prototype._updatePoints=function(){for(var a=this.layout.points,b=a.length;b--;)for(var c=a[b],d=c.length;d--;){var e=c[d];e.canvasx=this.area.w*e.x+this.area.x,e.canvasy=this.area.h*e.y+this.area.y}},DygraphCanvasRenderer.prototype._renderLineChart=function(a,b){var c,d,e=b||this.elementContext,f=this.layout.points,g=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var h=this.attr_("plotter"),i=h;Dygraph.isArrayLike(i)||(i=[i]);var j={};for(c=0;c<g.length;c++){d=g[c];var k=this.attr_("plotter",d);k!=h&&(j[d]=k)}for(c=0;c<i.length;c++)for(var l=i[c],m=c==i.length-1,n=0;n<f.length;n++)if(d=g[n],!a||d==a){var o=f[n],p=l;if(d in j){if(!m)continue;p=j[d]}var q=this.colors[d],r=this.dygraph_.getOption("strokeWidth",d);e.save(),e.strokeStyle=q,e.lineWidth=r,p({"points":o,"setName":d,"drawingContext":e,"color":q,"strokeWidth":r,"dygraph":this.dygraph_,"axis":this.dygraph_.axisPropertiesForSeries(d),"plotArea":this.area,"seriesIndex":n,"seriesCount":f.length,"singleSeriesName":a,"allSeriesPoints":f}),e.restore()}},DygraphCanvasRenderer._Plotters={"linePlotter":function(a){DygraphCanvasRenderer._linePlotter(a)},"fillPlotter":function(a){DygraphCanvasRenderer._fillPlotter(a)},"errorPlotter":function(a){DygraphCanvasRenderer._errorPlotter(a)}},DygraphCanvasRenderer._linePlotter=function(a){var b=a.dygraph,c=a.setName,d=a.strokeWidth,e=b.getOption("strokeBorderWidth",c),f=b.getOption("drawPointCallback",c)||Dygraph.Circles.DEFAULT,g=b.getOption("strokePattern",c),h=b.getOption("drawPoints",c),i=b.getOption("pointSize",c);e&&d&&DygraphCanvasRenderer._drawStyledLine(a,b.getOption("strokeBorderColor",c),d+2*e,g,h,f,i),DygraphCanvasRenderer._drawStyledLine(a,a.color,d,g,h,f,i)},DygraphCanvasRenderer._errorPlotter=function(a){var b=a.dygraph,c=a.setName,d=b.getOption("errorBars")||b.getOption("customBars");if(d){var e=b.getOption("fillGraph",c);e&&b.warn("Can't use fillGraph option with error bars");var f,g=a.drawingContext,h=a.color,i=b.getOption("fillAlpha",c),j=b.getOption("stepPlot",c),k=a.points,l=Dygraph.createIterator(k,0,k.length,DygraphCanvasRenderer._getIteratorPredicate(b.getOption("connectSeparatedPoints"))),m=NaN,n=NaN,o=[-1,-1],p=new RGBColorParser(h),q="rgba("+p.r+","+p.g+","+p.b+","+i+")";g.fillStyle=q,g.beginPath();for(var r=function(a){return null===a||void 0===a||isNaN(a)};l.hasNext;){var s=l.next();!j&&r(s.y)||j&&!isNaN(n)&&r(n)?m=NaN:(j?(f=[s.y_bottom,s.y_top],n=s.y):f=[s.y_bottom,s.y_top],f[0]=a.plotArea.h*f[0]+a.plotArea.y,f[1]=a.plotArea.h*f[1]+a.plotArea.y,isNaN(m)||(j?(g.moveTo(m,o[0]),g.lineTo(s.canvasx,o[0]),g.lineTo(s.canvasx,o[1])):(g.moveTo(m,o[0]),g.lineTo(s.canvasx,f[0]),g.lineTo(s.canvasx,f[1])),g.lineTo(m,o[1]),g.closePath()),o=f,m=s.canvasx)}g.fill()}},DygraphCanvasRenderer._fillPlotter=function(a){if(!a.singleSeriesName&&0===a.seriesIndex){for(var b=a.dygraph,c=b.getLabels().slice(1),d=c.length;d>=0;d--)b.visibility()[d]||c.splice(d,1);var e=function(){for(var a=0;a<c.length;a++)if(b.getOption("fillGraph",c[a]))return!0;return!1}();if(e)for(var f,g,h=a.drawingContext,i=a.plotArea,j=a.allSeriesPoints,k=j.length,l=b.getOption("fillAlpha"),m=b.getOption("stackedGraph"),n=b.getColors(),o={},p=k-1;p>=0;p--){var q=c[p];if(b.getOption("fillGraph",q)){var r=b.getOption("stepPlot",q),s=n[p],t=b.axisPropertiesForSeries(q),u=1+t.minyval*t.yscale;0>u?u=0:u>1&&(u=1),u=i.h*u+i.y;var v,w=j[p],x=Dygraph.createIterator(w,0,w.length,DygraphCanvasRenderer._getIteratorPredicate(b.getOption("connectSeparatedPoints"))),y=NaN,z=[-1,-1],A=new RGBColorParser(s),B="rgba("+A.r+","+A.g+","+A.b+","+l+")";h.fillStyle=B,h.beginPath();for(var C,D=!0;x.hasNext;){var E=x.next();if(Dygraph.isOK(E.y)){if(m){if(!D&&C==E.xval)continue;D=!1,C=E.xval,f=o[E.canvasx];var F;F=void 0===f?u:g?f[0]:f,v=[E.canvasy,F],r?-1===z[0]?o[E.canvasx]=[E.canvasy,u]:o[E.canvasx]=[E.canvasy,z[0]]:o[E.canvasx]=E.canvasy}else v=[E.canvasy,u];isNaN(y)||(h.moveTo(y,z[0]),r?h.lineTo(E.canvasx,z[0]):h.lineTo(E.canvasx,v[0]),g&&f?h.lineTo(E.canvasx,f[1]):h.lineTo(E.canvasx,v[1]),h.lineTo(y,z[1]),h.closePath()),z=v,y=E.canvasx}else y=NaN,null===E.y_stacked||isNaN(E.y_stacked)||(o[E.canvasx]=i.h*E.y_stacked+i.y)}g=r,h.fill()}}}};var Dygraph=function(a,b,c,d){this.is_initial_draw_=!0,this.readyFns_=[],void 0!==d?(this.warn("Using deprecated four-argument dygraph constructor"),this.__old_init__(a,b,c,d)):this.__init__(a,b,c)};Dygraph.NAME="Dygraph",Dygraph.VERSION="1.0.1",Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"},Dygraph.toString=function(){return this.__repr__()},Dygraph.DEFAULT_ROLL_PERIOD=1,Dygraph.DEFAULT_WIDTH=480,Dygraph.DEFAULT_HEIGHT=320,Dygraph.ANIMATION_STEPS=12,Dygraph.ANIMATION_DURATION=200,Dygraph.KMB_LABELS=["K","M","B","T","Q"],Dygraph.KMG2_BIG_LABELS=["k","M","G","T","P","E","Z","Y"],Dygraph.KMG2_SMALL_LABELS=["m","u","n","p","f","a","z","y"],Dygraph.numberValueFormatter=function(a,b,c,d){var e=b("sigFigs");if(null!==e)return Dygraph.floatFormat(a,e);var f,g=b("digitsAfterDecimal"),h=b("maxNumberWidth"),i=b("labelsKMB"),j=b("labelsKMG2");if(f=0!==a&&(Math.abs(a)>=Math.pow(10,h)||Math.abs(a)<Math.pow(10,-g))?a.toExponential(g):""+Dygraph.round_(a,g),i||j){var k,l=[],m=[];i&&(k=1e3,l=Dygraph.KMB_LABELS),j&&(i&&Dygraph.warn("Setting both labelsKMB and labelsKMG2. Pick one!"),k=1024,l=Dygraph.KMG2_BIG_LABELS,m=Dygraph.KMG2_SMALL_LABELS);for(var n=Math.abs(a),o=Dygraph.pow(k,l.length),p=l.length-1;p>=0;p--,o/=k)if(n>=o){f=Dygraph.round_(a/o,g)+l[p];break}if(j){var q=String(a.toExponential()).split("e-");2===q.length&&q[1]>=3&&q[1]<=24&&(f=q[1]%3>0?Dygraph.round_(q[0]/Dygraph.pow(10,q[1]%3),g):Number(q[0]).toFixed(2),f+=m[Math.floor(q[1]/3)-1])}}return f},Dygraph.numberAxisLabelFormatter=function(a,b,c,d){return Dygraph.numberValueFormatter(a,c,d)},Dygraph.dateString_=function(a){var b=Dygraph.zeropad,c=new Date(a),d=""+c.getFullYear(),e=b(c.getMonth()+1),f=b(c.getDate()),g="",h=3600*c.getHours()+60*c.getMinutes()+c.getSeconds();
return h&&(g=" "+Dygraph.hmsString_(a)),d+"/"+e+"/"+f+g},Dygraph.dateAxisFormatter=function(a,b){if(b>=Dygraph.DECADAL)return a.strftime("%Y");if(b>=Dygraph.MONTHLY)return a.strftime("%b %y");var c=3600*a.getHours()+60*a.getMinutes()+a.getSeconds()+a.getMilliseconds();return 0===c||b>=Dygraph.DAILY?new Date(a.getTime()+36e5).strftime("%d%b"):Dygraph.hmsString_(a.getTime())},Dygraph.Plotters=DygraphCanvasRenderer._Plotters,Dygraph.DEFAULT_ATTRS={"highlightCircleSize":3,"highlightSeriesOpts":null,"highlightSeriesBackgroundAlpha":.5,"labelsDivWidth":250,"labelsDivStyles":{},"labelsSeparateLines":!1,"labelsShowZeroValues":!0,"labelsKMB":!1,"labelsKMG2":!1,"showLabelsOnHighlight":!0,"digitsAfterDecimal":2,"maxNumberWidth":6,"sigFigs":null,"strokeWidth":1,"strokeBorderWidth":0,"strokeBorderColor":"white","axisTickSize":3,"axisLabelFontSize":14,"xAxisLabelWidth":50,"yAxisLabelWidth":50,"rightGap":5,"showRoller":!1,"xValueParser":Dygraph.dateParser,"delimiter":",","sigma":2,"errorBars":!1,"fractions":!1,"wilsonInterval":!0,"customBars":!1,"fillGraph":!1,"fillAlpha":.15,"connectSeparatedPoints":!1,"stackedGraph":!1,"stackedGraphNaNFill":"all","hideOverlayOnMouseOut":!0,"legend":"onmouseover","stepPlot":!1,"avoidMinZero":!1,"xRangePad":0,"yRangePad":null,"drawAxesAtZero":!1,"titleHeight":28,"xLabelHeight":18,"yLabelWidth":18,"drawXAxis":!0,"drawYAxis":!0,"axisLineColor":"black","axisLineWidth":.3,"gridLineWidth":.3,"axisLabelColor":"black","axisLabelFont":"Arial","axisLabelWidth":50,"drawYGrid":!0,"drawXGrid":!0,"gridLineColor":"rgb(128,128,128)","interactionModel":null,"animatedZooms":!1,"showRangeSelector":!1,"rangeSelectorHeight":40,"rangeSelectorPlotStrokeColor":"#808FAB","rangeSelectorPlotFillColor":"#A7B1C4","plotter":[Dygraph.Plotters.fillPlotter,Dygraph.Plotters.errorPlotter,Dygraph.Plotters.linePlotter],"plugins":[],"axes":{"x":{"pixelsPerLabel":60,"axisLabelFormatter":Dygraph.dateAxisFormatter,"valueFormatter":Dygraph.dateString_,"drawGrid":!0,"independentTicks":!0,"ticker":null},"y":{"pixelsPerLabel":30,"valueFormatter":Dygraph.numberValueFormatter,"axisLabelFormatter":Dygraph.numberAxisLabelFormatter,"drawGrid":!0,"independentTicks":!0,"ticker":null},"y2":{"pixelsPerLabel":30,"valueFormatter":Dygraph.numberValueFormatter,"axisLabelFormatter":Dygraph.numberAxisLabelFormatter,"drawGrid":!1,"independentTicks":!1,"ticker":null}}},Dygraph.HORIZONTAL=1,Dygraph.VERTICAL=2,Dygraph.PLUGINS=[],Dygraph.addedAnnotationCSS=!1,Dygraph.prototype.__old_init__=function(a,b,c,d){if(null!==c){for(var e=["Date"],f=0;f<c.length;f++)e.push(c[f]);Dygraph.update(d,{"labels":e})}this.__init__(a,b,d)},Dygraph.prototype.__init__=function(a,b,c){if(/MSIE/.test(navigator.userAgent)&&!window.opera&&"undefined"!=typeof G_vmlCanvasManager&&"complete"!=document.readyState){var d=this;return void setTimeout(function(){d.__init__(a,b,c)},100)}if((null===c||void 0===c)&&(c={}),c=Dygraph.mapLegacyOptions_(c),"string"==typeof a&&(a=document.getElementById(a)),!a)return void Dygraph.error("Constructing dygraph with a non-existent div!");this.isUsingExcanvas_="undefined"!=typeof G_vmlCanvasManager,this.maindiv_=a,this.file_=b,this.rollPeriod_=c.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=c.fractions||!1,this.dateWindow_=c.dateWindow||null,this.annotations_=[],this.zoomed_x_=!1,this.zoomed_y_=!1,a.innerHTML="",""===a.style.width&&c.width&&(a.style.width=c.width+"px"),""===a.style.height&&c.height&&(a.style.height=c.height+"px"),""===a.style.height&&0===a.clientHeight&&(a.style.height=Dygraph.DEFAULT_HEIGHT+"px",""===a.style.width&&(a.style.width=Dygraph.DEFAULT_WIDTH+"px")),this.width_=a.clientWidth||c.width||0,this.height_=a.clientHeight||c.height||0,c.stackedGraph&&(c.fillGraph=!0),this.user_attrs_={},Dygraph.update(this.user_attrs_,c),this.attrs_={},Dygraph.updateDeep(this.attrs_,Dygraph.DEFAULT_ATTRS),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new DygraphOptions(this),this.createInterface_(),this.plugins_=[];for(var e=Dygraph.PLUGINS.concat(this.getOption("plugins")),f=0;f<e.length;f++){var g=e[f],h=new g,i={"plugin":h,"events":{},"options":{},"pluginOptions":{}},j=h.activate(this);for(var k in j)i.events[k]=j[k];this.plugins_.push(i)}for(var f=0;f<this.plugins_.length;f++){var l=this.plugins_[f];for(var k in l.events)if(l.events.hasOwnProperty(k)){var m=l.events[k],n=[l.plugin,m];k in this.eventListeners_?this.eventListeners_[k].push(n):this.eventListeners_[k]=[n]}}this.createDragInterface_(),this.start_()},Dygraph.prototype.cascadeEvents_=function(a,b){if(!(a in this.eventListeners_))return!0;var c={"dygraph":this,"cancelable":!1,"defaultPrevented":!1,"preventDefault":function(){if(!c.cancelable)throw"Cannot call preventDefault on non-cancelable event.";c.defaultPrevented=!0},"propagationStopped":!1,"stopPropagation":function(){c.propagationStopped=!0}};Dygraph.update(c,b);var d=this.eventListeners_[a];if(d)for(var e=d.length-1;e>=0;e--){var f=d[e][0],g=d[e][1];if(g.call(f,c),c.propagationStopped)break}return c.defaultPrevented},Dygraph.prototype.isZoomed=function(a){if(null===a||void 0===a)return this.zoomed_x_||this.zoomed_y_;if("x"===a)return this.zoomed_x_;if("y"===a)return this.zoomed_y_;throw"axis parameter is ["+a+"] must be null, 'x' or 'y'."},Dygraph.prototype.toString=function(){var a=this.maindiv_,b=a&&a.id?a.id:a;return"[Dygraph "+b+"]"},Dygraph.prototype.attr_=function(a,b){return b?this.attributes_.getForSeries(a,b):this.attributes_.get(a)},Dygraph.prototype.getOption=function(a,b){return this.attr_(a,b)},Dygraph.prototype.getOptionForAxis=function(a,b){return this.attributes_.getForAxis(a,b)},Dygraph.prototype.optionsViewForAxis_=function(a){var b=this;return function(c){var d=b.user_attrs_.axes;return d&&d[a]&&d[a].hasOwnProperty(c)?d[a][c]:"undefined"!=typeof b.user_attrs_[c]?b.user_attrs_[c]:(d=b.attrs_.axes,d&&d[a]&&d[a].hasOwnProperty(c)?d[a][c]:"y"==a&&b.axes_[0].hasOwnProperty(c)?b.axes_[0][c]:"y2"==a&&b.axes_[1].hasOwnProperty(c)?b.axes_[1][c]:b.attr_(c))}},Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_},Dygraph.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},Dygraph.prototype.xAxisExtremes=function(){var a=this.attr_("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-a,1+a];var b=this.rawData_[0][0],c=this.rawData_[this.rawData_.length-1][0];if(a){var d=c-b;b-=d*a,c+=d*a}return[b,c]},Dygraph.prototype.yAxisRange=function(a){if("undefined"==typeof a&&(a=0),0>a||a>=this.axes_.length)return null;var b=this.axes_[a];return[b.computedValueRange[0],b.computedValueRange[1]]},Dygraph.prototype.yAxisRanges=function(){for(var a=[],b=0;b<this.axes_.length;b++)a.push(this.yAxisRange(b));return a},Dygraph.prototype.toDomCoords=function(a,b,c){return[this.toDomXCoord(a),this.toDomYCoord(b,c)]},Dygraph.prototype.toDomXCoord=function(a){if(null===a)return null;var b=this.plotter_.area,c=this.xAxisRange();return b.x+(a-c[0])/(c[1]-c[0])*b.w},Dygraph.prototype.toDomYCoord=function(a,b){var c=this.toPercentYCoord(a,b);if(null===c)return null;var d=this.plotter_.area;return d.y+c*d.h},Dygraph.prototype.toDataCoords=function(a,b,c){return[this.toDataXCoord(a),this.toDataYCoord(b,c)]},Dygraph.prototype.toDataXCoord=function(a){if(null===a)return null;var b=this.plotter_.area,c=this.xAxisRange();return c[0]+(a-b.x)/b.w*(c[1]-c[0])},Dygraph.prototype.toDataYCoord=function(a,b){if(null===a)return null;var c=this.plotter_.area,d=this.yAxisRange(b);if("undefined"==typeof b&&(b=0),this.attributes_.getForAxis("logscale",b)){var e=(a-c.y)/c.h,f=Dygraph.log10(d[1]),g=f-e*(f-Dygraph.log10(d[0])),h=Math.pow(Dygraph.LOG_SCALE,g);return h}return d[0]+(c.y+c.h-a)/c.h*(d[1]-d[0])},Dygraph.prototype.toPercentYCoord=function(a,b){if(null===a)return null;"undefined"==typeof b&&(b=0);var c,d=this.yAxisRange(b),e=this.attributes_.getForAxis("logscale",b);if(e){var f=Dygraph.log10(d[1]);c=(f-Dygraph.log10(a))/(f-Dygraph.log10(d[0]))}else c=(d[1]-a)/(d[1]-d[0]);return c},Dygraph.prototype.toPercentXCoord=function(a){if(null===a)return null;var b=this.xAxisRange();return(a-b[0])/(b[1]-b[0])},Dygraph.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_("labels").length:0},Dygraph.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},Dygraph.prototype.getValue=function(a,b){return 0>a||a>this.rawData_.length?null:0>b||b>this.rawData_[a].length?null:this.rawData_[a][b]},Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",a.appendChild(this.graphDiv),this.canvas_=Dygraph.createCanvas(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.resizeElements_(),this.canvas_ctx_=Dygraph.getContext(this.canvas_),this.hidden_ctx_=Dygraph.getContext(this.hidden_),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new DygraphLayout(this);var b=this;this.mouseMoveHandler_=function(a){b.mouseMove_(a)},this.mouseOutHandler_=function(a){var c=a.target||a.fromElement,d=a.relatedTarget||a.toElement;Dygraph.isNodeContainedBy(c,b.graphDiv)&&!Dygraph.isNodeContainedBy(d,b.graphDiv)&&b.mouseOut_(a)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(a){b.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},Dygraph.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px",this.canvas_.width=this.width_,this.canvas_.height=this.height_,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",this.hidden_.width=this.width_,this.hidden_.height=this.height_,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px"},Dygraph.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();var a=function(b){for(;b.hasChildNodes();)a(b.firstChild),b.removeChild(b.firstChild)};this.removeTrackedEvents_(),Dygraph.removeEvent(window,"mouseout",this.mouseOutHandler_),Dygraph.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),Dygraph.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,a(this.maindiv_);var b=function(a){for(var b in a)"object"==typeof a[b]&&(a[b]=null)};b(this.layout_),b(this.plotter_),b(this)},Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();return b.style.position="absolute",b.style.top=a.style.top,b.style.left=a.style.left,b.width=this.width_,b.height=this.height_,b.style.width=this.width_+"px",b.style.height=this.height_+"px",b},Dygraph.prototype.createMouseEventElement_=function(){if(this.isUsingExcanvas_){var a=document.createElement("div");return a.style.position="absolute",a.style.backgroundColor="white",a.style.filter="alpha(opacity=0)",a.style.width=this.width_+"px",a.style.height=this.height_+"px",this.graphDiv.appendChild(a),a}return this.canvas_},Dygraph.prototype.setColors_=function(){var a=this.getLabels(),b=a.length-1;this.colors_=[],this.colorsMap_={};var c,d=this.attr_("colors");if(d){for(c=0;b>c;c++)if(this.visibility()[c]){var e=d[c%d.length];this.colors_.push(e),this.colorsMap_[a[1+c]]=e}}else{var f=this.attr_("colorSaturation")||1,g=this.attr_("colorValue")||.5,h=Math.ceil(b/2);for(c=1;b>=c;c++)if(this.visibility()[c-1]){var i=c%2?Math.ceil(c/2):h+c/2,j=1*i/(1+b),e=Dygraph.hsvToRGB(j,f,g);this.colors_.push(e),this.colorsMap_[a[c]]=e}}},Dygraph.prototype.getColors=function(){return this.colors_},Dygraph.prototype.getPropertiesForSeries=function(a){for(var b=-1,c=this.getLabels(),d=1;d<c.length;d++)if(c[d]==a){b=d;break}return-1==b?null:{"name":a,"column":b,"visible":this.visibility()[b-1],"color":this.colorsMap_[a],"axis":1+this.attributes_.axisForSeries(a)}},Dygraph.prototype.createRollInterface_=function(){this.roller_||(this.roller_=document.createElement("input"),this.roller_.type="text",this.roller_.style.display="none",this.graphDiv.appendChild(this.roller_));var a=this.attr_("showRoller")?"block":"none",b=this.plotter_.area,c={"position":"absolute","zIndex":10,"top":b.y+b.h-25+"px","left":b.x+1+"px","display":a};this.roller_.size="2",this.roller_.value=this.rollPeriod_;for(var d in c)c.hasOwnProperty(d)&&(this.roller_.style[d]=c[d]);var e=this;this.roller_.onchange=function(){e.adjustRoll(e.roller_.value)}},Dygraph.prototype.dragGetX_=function(a,b){return Dygraph.pageX(a)-b.px},Dygraph.prototype.dragGetY_=function(a,b){return Dygraph.pageY(a)-b.py},Dygraph.prototype.createDragInterface_=function(){var a={"isZooming":!1,"isPanning":!1,"is2DPan":!1,"dragStartX":null,"dragStartY":null,"dragEndX":null,"dragEndY":null,"dragDirection":null,"prevEndX":null,"prevEndY":null,"prevDragDirection":null,"cancelNextDblclick":!1,"initialLeftmostDate":null,"xUnitsPerPixel":null,"dateRange":null,"px":0,"py":0,"boundedDates":null,"boundedValues":null,"tarp":new Dygraph.IFrameTarp,"initializeMouseDown":function(a,b,c){a.preventDefault?a.preventDefault():(a.returnValue=!1,a.cancelBubble=!0),c.px=Dygraph.findPosX(b.canvas_),c.py=Dygraph.findPosY(b.canvas_),c.dragStartX=b.dragGetX_(a,c),c.dragStartY=b.dragGetY_(a,c),c.cancelNextDblclick=!1,c.tarp.cover()}},b=this.attr_("interactionModel"),c=this,d=function(b){return function(d){b(d,c,a)}};for(var e in b)b.hasOwnProperty(e)&&this.addAndTrackEvent(this.mouseEventElement_,e,d(b[e]));var f=function(b){if((a.isZooming||a.isPanning)&&(a.isZooming=!1,a.dragStartX=null,a.dragStartY=null),a.isPanning){a.isPanning=!1,a.draggingDate=null,a.dateRange=null;for(var d=0;d<c.axes_.length;d++)delete c.axes_[d].draggingValue,delete c.axes_[d].dragValueRange}a.tarp.uncover()};this.addAndTrackEvent(document,"mouseup",f)},Dygraph.prototype.drawZoomRect_=function(a,b,c,d,e,f,g,h){var i=this.canvas_ctx_;f==Dygraph.HORIZONTAL?i.clearRect(Math.min(b,g),this.layout_.getPlotArea().y,Math.abs(b-g),this.layout_.getPlotArea().h):f==Dygraph.VERTICAL&&i.clearRect(this.layout_.getPlotArea().x,Math.min(d,h),this.layout_.getPlotArea().w,Math.abs(d-h)),a==Dygraph.HORIZONTAL?c&&b&&(i.fillStyle="rgba(128,128,128,0.33)",i.fillRect(Math.min(b,c),this.layout_.getPlotArea().y,Math.abs(c-b),this.layout_.getPlotArea().h)):a==Dygraph.VERTICAL&&e&&d&&(i.fillStyle="rgba(128,128,128,0.33)",i.fillRect(this.layout_.getPlotArea().x,Math.min(d,e),this.layout_.getPlotArea().w,Math.abs(e-d))),this.isUsingExcanvas_&&(this.currentZoomRectArgs_=[a,b,c,d,e,0,0,0])},Dygraph.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height)},Dygraph.prototype.doZoomX_=function(a,b){this.currentZoomRectArgs_=null;var c=this.toDataXCoord(a),d=this.toDataXCoord(b);this.doZoomXDates_(c,d)},Dygraph.zoomAnimationFunction=function(a,b){var c=1.5;return(1-Math.pow(c,-a))/(1-Math.pow(c,-b))},Dygraph.prototype.doZoomXDates_=function(a,b){var c=this.xAxisRange(),d=[a,b];this.zoomed_x_=!0;var e=this;this.doAnimatedZoom(c,d,null,null,function(){e.attr_("zoomCallback")&&e.attr_("zoomCallback")(a,b,e.yAxisRanges())})},Dygraph.prototype.doZoomY_=function(a,b){this.currentZoomRectArgs_=null;for(var c=this.yAxisRanges(),d=[],e=0;e<this.axes_.length;e++){var f=this.toDataYCoord(a,e),g=this.toDataYCoord(b,e);d.push([g,f])}this.zoomed_y_=!0;var h=this;this.doAnimatedZoom(null,null,c,d,function(){if(h.attr_("zoomCallback")){var a=h.xAxisRange();h.attr_("zoomCallback")(a[0],a[1],h.yAxisRanges())}})},Dygraph.prototype.resetZoom=function(){var a=!1,b=!1,c=!1;null!==this.dateWindow_&&(a=!0,b=!0);for(var d=0;d<this.axes_.length;d++)"undefined"!=typeof this.axes_[d].valueWindow&&null!==this.axes_[d].valueWindow&&(a=!0,c=!0);if(this.clearSelection(),a){this.zoomed_x_=!1,this.zoomed_y_=!1;var e=this.rawData_[0][0],f=this.rawData_[this.rawData_.length-1][0];if(!this.attr_("animatedZooms")){for(this.dateWindow_=null,d=0;d<this.axes_.length;d++)null!==this.axes_[d].valueWindow&&delete this.axes_[d].valueWindow;return this.drawGraph_(),void(this.attr_("zoomCallback")&&this.attr_("zoomCallback")(e,f,this.yAxisRanges()))}var g=null,h=null,i=null,j=null;if(b&&(g=this.xAxisRange(),h=[e,f]),c){i=this.yAxisRanges();var k=this.gatherDatasets_(this.rolledSeries_,null),l=k.extremes;for(this.computeYAxisRanges_(l),j=[],d=0;d<this.axes_.length;d++){var m=this.axes_[d];j.push(null!==m.valueRange&&void 0!==m.valueRange?m.valueRange:m.extremeRange)}}var n=this;this.doAnimatedZoom(g,h,i,j,function(){n.dateWindow_=null;for(var a=0;a<n.axes_.length;a++)null!==n.axes_[a].valueWindow&&delete n.axes_[a].valueWindow;n.attr_("zoomCallback")&&n.attr_("zoomCallback")(e,f,n.yAxisRanges())})}},Dygraph.prototype.doAnimatedZoom=function(a,b,c,d,e){var f,g,h=this.attr_("animatedZooms")?Dygraph.ANIMATION_STEPS:1,i=[],j=[];if(null!==a&&null!==b)for(f=1;h>=f;f++)g=Dygraph.zoomAnimationFunction(f,h),i[f-1]=[a[0]*(1-g)+g*b[0],a[1]*(1-g)+g*b[1]];if(null!==c&&null!==d)for(f=1;h>=f;f++){g=Dygraph.zoomAnimationFunction(f,h);for(var k=[],l=0;l<this.axes_.length;l++)k.push([c[l][0]*(1-g)+g*d[l][0],c[l][1]*(1-g)+g*d[l][1]]);j[f-1]=k}var m=this;Dygraph.repeatAndCleanup(function(a){if(j.length)for(var b=0;b<m.axes_.length;b++){var c=j[a][b];m.axes_[b].valueWindow=[c[0],c[1]]}i.length&&(m.dateWindow_=i[a]),m.drawGraph_()},h,Dygraph.ANIMATION_DURATION/h,e)},Dygraph.prototype.getArea=function(){return this.plotter_.area},Dygraph.prototype.eventToDomCoords=function(a){if(a.offsetX&&a.offsetY)return[a.offsetX,a.offsetY];var b=Dygraph.pageX(a)-Dygraph.findPosX(this.mouseEventElement_),c=Dygraph.pageY(a)-Dygraph.findPosY(this.mouseEventElement_);return[b,c]},Dygraph.prototype.findClosestRow=function(a){for(var b=1/0,c=-1,d=this.layout_.points,e=0;e<d.length;e++)for(var f=d[e],g=f.length,h=0;g>h;h++){var i=f[h];if(Dygraph.isValidPoint(i,!0)){var j=Math.abs(i.canvasx-a);b>j&&(b=j,c=i.idx)}}return c},Dygraph.prototype.findClosestPoint=function(a,b){for(var c,d,e,f,g,h,i,j=1/0,k=this.layout_.points.length-1;k>=0;--k)for(var l=this.layout_.points[k],m=0;m<l.length;++m)f=l[m],Dygraph.isValidPoint(f)&&(d=f.canvasx-a,e=f.canvasy-b,c=d*d+e*e,j>c&&(j=c,g=f,h=k,i=f.idx));var n=this.layout_.setNames[h];return{"row":i,"seriesName":n,"point":g}},Dygraph.prototype.findStackedPoint=function(a,b){for(var c,d,e=this.findClosestRow(a),f=0;f<this.layout_.points.length;++f){var g=this.getLeftBoundary_(f),h=e-g,i=this.layout_.points[f];if(!(h>=i.length)){var j=i[h];if(Dygraph.isValidPoint(j)){var k=j.canvasy;if(a>j.canvasx&&h+1<i.length){var l=i[h+1];if(Dygraph.isValidPoint(l)){var m=l.canvasx-j.canvasx;if(m>0){var n=(a-j.canvasx)/m;k+=n*(l.canvasy-j.canvasy)}}}else if(a<j.canvasx&&h>0){var o=i[h-1];if(Dygraph.isValidPoint(o)){var m=j.canvasx-o.canvasx;if(m>0){var n=(j.canvasx-a)/m;k+=n*(o.canvasy-j.canvasy)}}}(0===f||b>k)&&(c=j,d=f)}}}var p=this.layout_.setNames[d];return{"row":e,"seriesName":p,"point":c}},Dygraph.prototype.mouseMove_=function(a){var b=this.layout_.points;if(void 0!==b&&null!==b){var c=this.eventToDomCoords(a),d=c[0],e=c[1],f=this.attr_("highlightSeriesOpts"),g=!1;if(f&&!this.isSeriesLocked()){var h;h=this.attr_("stackedGraph")?this.findStackedPoint(d,e):this.findClosestPoint(d,e),g=this.setSelection(h.row,h.seriesName)}else{var i=this.findClosestRow(d);g=this.setSelection(i)}var j=this.attr_("highlightCallback");j&&g&&j(a,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},Dygraph.prototype.getLeftBoundary_=function(a){if(this.boundaryIds_[a])return this.boundaryIds_[a][0];for(var b=0;b<this.boundaryIds_.length;b++)if(void 0!==this.boundaryIds_[b])return this.boundaryIds_[b][0];return 0},Dygraph.prototype.animateSelection_=function(a){var b=10,c=30;void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var d=this.fadeLevel,e=0>a?d:b-d;if(0>=e)return void(this.fadeLevel&&this.updateSelection_(1));var f=++this.animateId,g=this;Dygraph.repeatAndCleanup(function(c){g.animateId==f&&(g.fadeLevel+=a,0===g.fadeLevel?g.clearSelection():g.updateSelection_(g.fadeLevel/b))},e,c,function(){})},Dygraph.prototype.updateSelection_=function(a){this.cascadeEvents_("select",{"selectedX":this.lastx_,"selectedPoints":this.selPoints_});var b,c=this.canvas_ctx_;if(this.attr_("highlightSeriesOpts")){c.clearRect(0,0,this.width_,this.height_);var d=1-this.attr_("highlightSeriesBackgroundAlpha");if(d){var e=!0;if(e){if(void 0===a)return void this.animateSelection_(1);d*=a}c.fillStyle="rgba(255,255,255,"+d+")",c.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,c)}else if(this.previousVerticalX_>=0){var f=0,g=this.attr_("labels");for(b=1;b<g.length;b++){var h=this.attr_("highlightCircleSize",g[b]);h>f&&(f=h)}var i=this.previousVerticalX_;c.clearRect(i-f-1,0,2*f+2,this.height_)}if(this.isUsingExcanvas_&&this.currentZoomRectArgs_&&Dygraph.prototype.drawZoomRect_.apply(this,this.currentZoomRectArgs_),this.selPoints_.length>0){var j=this.selPoints_[0].canvasx;for(c.save(),b=0;b<this.selPoints_.length;b++){var k=this.selPoints_[b];if(Dygraph.isOK(k.canvasy)){var l=this.attr_("highlightCircleSize",k.name),m=this.attr_("drawHighlightPointCallback",k.name),n=this.plotter_.colors[k.name];m||(m=Dygraph.Circles.DEFAULT),c.lineWidth=this.attr_("strokeWidth",k.name),c.strokeStyle=n,c.fillStyle=n,m(this.g,k.name,c,j,k.canvasy,n,l,k.idx)}}c.restore(),this.previousVerticalX_=j}},Dygraph.prototype.setSelection=function(a,b,c){this.selPoints_=[];var d=!1;if(a!==!1&&a>=0){a!=this.lastRow_&&(d=!0),this.lastRow_=a;for(var e=0;e<this.layout_.points.length;++e){var f=this.layout_.points[e],g=a-this.getLeftBoundary_(e);if(g<f.length){var h=f[g];null!==h.yval&&this.selPoints_.push(h)}}}else this.lastRow_>=0&&(d=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==b&&(this.highlightSet_!==b&&(d=!0),this.highlightSet_=b),void 0!==c&&(this.lockedSet_=c),d&&this.updateSelection_(void 0),d},Dygraph.prototype.mouseOut_=function(a){this.attr_("unhighlightCallback")&&this.attr_("unhighlightCallback")(a),this.attr_("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},Dygraph.prototype.clearSelection=function(){return this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?void this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,void(this.highlightSet_=null))},Dygraph.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var a=0;a<this.layout_.points.length;a++)for(var b=this.layout_.points[a],c=0;c<b.length;c++)if(b[c].x==this.selPoints_[0].x)return b[c].idx;return-1},Dygraph.prototype.getHighlightSeries=function(){return this.highlightSet_},Dygraph.prototype.isSeriesLocked=function(){return this.lockedSet_},Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a),this.predraw_()},Dygraph.prototype.addXTicks_=function(){var a;a=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var b=this.optionsViewForAxis_("x"),c=b("ticker")(a[0],a[1],this.width_,b,this);this.layout_.setXTicks(c)},Dygraph.prototype.extremeValues_=function(a){var b,c,d=null,e=null,f=this.attr_("errorBars")||this.attr_("customBars");if(f){for(b=0;b<a.length;b++)if(c=a[b][1][0],null!==c&&!isNaN(c)){var g=c-a[b][1][1],h=c+a[b][1][2];g>c&&(g=c),c>h&&(h=c),(null===e||h>e)&&(e=h),(null===d||d>g)&&(d=g)}}else for(b=0;b<a.length;b++)c=a[b][1],null===c||isNaN(c)||((null===e||c>e)&&(e=c),(null===d||d>c)&&(d=c));return[d,e]},Dygraph.prototype.predraw_=function(){var a=new Date;this.layout_.computePlotArea(),this.computeYAxes_(),this.plotter_&&(this.cascadeEvents_("clearChart"),this.plotter_.clear()),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_("predraw"),this.rolledSeries_=[null];for(var b=1;b<this.numColumns();b++){var c=this.attr_("logscale"),d=this.extractSeries_(this.rawData_,b,c);d=this.rollingAverage(d,this.rollPeriod_),this.rolledSeries_.push(d)}this.drawGraph_();var e=new Date;this.drawingTimeMs_=e-a},Dygraph.PointType=void 0,Dygraph.seriesToPoints_=function(a,b,c,d){for(var e=[],f=0;f<a.length;++f){var g=a[f],h=b?g[1][0]:g[1],i=null===h?null:DygraphLayout.parseFloat_(h),j={"x":NaN,"y":NaN,"xval":DygraphLayout.parseFloat_(g[0]),"yval":i,"name":c,"idx":f+d};b&&(j.y_top=NaN,j.y_bottom=NaN,j.yval_minus=DygraphLayout.parseFloat_(g[1][1]),j.yval_plus=DygraphLayout.parseFloat_(g[1][2])),e.push(j)}return e},Dygraph.stackPoints_=function(a,b,c,d){for(var e=null,f=null,g=null,h=-1,i=function(b){if(!(h>=b))for(var c=b;c<a.length;++c)if(g=null,!isNaN(a[c].yval)&&null!==a[c].yval){h=c,g=a[c];break}},j=0;j<a.length;++j){var k=a[j],l=k.xval;void 0===b[l]&&(b[l]=0);var m=k.yval;isNaN(m)||null===m?(i(j),m=f&&g&&"none"!=d?f.yval+(g.yval-f.yval)*((l-f.xval)/(g.xval-f.xval)):f&&"all"==d?f.yval:g&&"all"==d?g.yval:0):f=k;var n=b[l];e!=l&&(n+=m,b[l]=n),e=l,k.yval_stacked=n,n>c[1]&&(c[1]=n),n<c[0]&&(c[0]=n)}},Dygraph.prototype.gatherDatasets_=function(a,b){var c,d,e,f=[],g=[],h=[],i={},j=this.attr_("errorBars"),k=this.attr_("customBars"),l=j||k,m=function(a){return l?k?null===a[1][1]:j?null===a[1][0]:!1:null===a[1]},n=a.length-1;for(c=n;c>=1;c--)if(this.visibility()[c-1]){if(b){e=a[c];var o=b[0],p=b[1],q=null,r=null;for(d=0;d<e.length;d++)e[d][0]>=o&&null===q&&(q=d),e[d][0]<=p&&(r=d);null===q&&(q=0);for(var s=q,t=!0;t&&s>0;)s--,t=m(e[s]);null===r&&(r=e.length-1);var u=r;for(t=!0;t&&u<e.length-1;)u++,t=m(e[u]);s!==q&&(q=s),u!==r&&(r=u),f[c-1]=[q,r],e=e.slice(q,r+1)}else e=a[c],f[c-1]=[0,e.length-1];var v=this.attr_("labels")[c],w=this.extremeValues_(e),x=Dygraph.seriesToPoints_(e,l,v,f[c-1][0]);this.attr_("stackedGraph")&&Dygraph.stackPoints_(x,h,w,this.attr_("stackedGraphNaNFill")),i[v]=w,g[c]=x}return{"points":g,"extremes":i,"boundaryIds":f}},Dygraph.prototype.drawGraph_=function(){var a=new Date,b=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.attr_("highlightCircleSize");var c=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),d=c.points,e=c.extremes;this.boundaryIds_=c.boundaryIds,this.setIndexByName_={};var f=this.attr_("labels");f.length>0&&(this.setIndexByName_[f[0]]=0);for(var g=0,h=1;h<d.length;h++)this.setIndexByName_[f[h]]=h,this.visibility()[h-1]&&(this.layout_.addDataset(f[h],d[h]),this.datasetIndex_[h]=g++);this.computeYAxisRanges_(e),this.layout_.setYAxes(this.axes_),this.addXTicks_();var i=this.zoomed_x_;if(this.zoomed_x_=i,this.layout_.evaluate(),this.renderGraph_(b),this.attr_("timingName")){var j=new Date;Dygraph.info(this.attr_("timingName")+" - drawGraph: "+(j-a)+"ms")}},Dygraph.prototype.renderGraph_=function(a){this.cascadeEvents_("clearChart"),this.plotter_.clear(),this.attr_("underlayCallback")&&this.attr_("underlayCallback")(this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var b={"canvas":this.hidden_,"drawingContext":this.hidden_ctx_};if(this.cascadeEvents_("willDrawChart",b),this.plotter_.render(),this.cascadeEvents_("didDrawChart",b),this.lastRow_=-1,this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height),null!==this.attr_("drawCallback")&&this.attr_("drawCallback")(this,a),a)for(this.readyFired_=!0;this.readyFns_.length>0;){var c=this.readyFns_.pop();c(this)}},Dygraph.prototype.computeYAxes_=function(){var a,b,c,d,e;if(void 0!==this.axes_&&this.user_attrs_.hasOwnProperty("valueRange")===!1)for(a=[],c=0;c<this.axes_.length;c++)a.push(this.axes_[c].valueWindow);for(this.axes_=[],b=0;b<this.attributes_.numAxes();b++)d={"g":this},Dygraph.update(d,this.attributes_.axisOptions(b)),this.axes_[b]=d;if(e=this.attr_("valueRange"),e&&(this.axes_[0].valueRange=e),void 0!==a){var f=Math.min(a.length,this.axes_.length);for(c=0;f>c;c++)this.axes_[c].valueWindow=a[c]}for(b=0;b<this.axes_.length;b++)if(0===b)d=this.optionsViewForAxis_("y"+(b?"2":"")),e=d("valueRange"),e&&(this.axes_[b].valueRange=e);else{var g=this.user_attrs_.axes;g&&g.y2&&(e=g.y2.valueRange,e&&(this.axes_[b].valueRange=e))}},Dygraph.prototype.numAxes=function(){return this.attributes_.numAxes()},Dygraph.prototype.axisPropertiesForSeries=function(a){return this.axes_[this.attributes_.axisForSeries(a)]},Dygraph.prototype.computeYAxisRanges_=function(a){for(var b,c,d,e,f,g=function(a){return isNaN(parseFloat(a))},h=this.attributes_.numAxes(),i=0;h>i;i++){var j=this.axes_[i],k=this.attributes_.getForAxis("logscale",i),l=this.attributes_.getForAxis("includeZero",i),m=this.attributes_.getForAxis("independentTicks",i);if(d=this.attributes_.seriesForAxis(i),b=!0,e=.1,null!==this.attr_("yRangePad")&&(b=!1,e=this.attr_("yRangePad")/this.plotter_.area.h),0===d.length)j.extremeRange=[0,1];else{for(var n,o,p=1/0,q=-(1/0),r=0;r<d.length;r++)a.hasOwnProperty(d[r])&&(n=a[d[r]][0],null!==n&&(p=Math.min(n,p)),o=a[d[r]][1],null!==o&&(q=Math.max(o,q)));l&&!k&&(p>0&&(p=0),0>q&&(q=0)),p==1/0&&(p=0),q==-(1/0)&&(q=1),c=q-p,0===c&&(0!==q?c=Math.abs(q):(q=1,c=1));var s,t;if(k)if(b)s=q+e*c,t=p;else{var u=Math.exp(Math.log(c)*e);s=q*u,t=p/u}else s=q+e*c,t=p-e*c,b&&!this.attr_("avoidMinZero")&&(0>t&&p>=0&&(t=0),s>0&&0>=q&&(s=0));j.extremeRange=[t,s]}if(j.valueWindow)j.computedValueRange=[j.valueWindow[0],j.valueWindow[1]];else if(j.valueRange){var v=g(j.valueRange[0])?j.extremeRange[0]:j.valueRange[0],w=g(j.valueRange[1])?j.extremeRange[1]:j.valueRange[1];if(!b)if(j.logscale){var u=Math.exp(Math.log(c)*e);v*=u,w/=u}else c=w-v,v-=c*e,w+=c*e;j.computedValueRange=[v,w]}else j.computedValueRange=j.extremeRange;if(m){j.independentTicks=m;var x=this.optionsViewForAxis_("y"+(i?"2":"")),y=x("ticker");j.ticks=y(j.computedValueRange[0],j.computedValueRange[1],this.height_,x,this),f||(f=j)}}if(void 0===f)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(var i=0;h>i;i++){var j=this.axes_[i];if(!j.independentTicks){for(var x=this.optionsViewForAxis_("y"+(i?"2":"")),y=x("ticker"),z=f.ticks,A=f.computedValueRange[1]-f.computedValueRange[0],B=j.computedValueRange[1]-j.computedValueRange[0],C=[],D=0;D<z.length;D++){var E=(z[D].v-f.computedValueRange[0])/A,F=j.computedValueRange[0]+E*B;C.push(F)}j.ticks=y(j.computedValueRange[0],j.computedValueRange[1],this.height_,x,this,C)}}},Dygraph.prototype.extractSeries_=function(a,b,c){for(var d=[],e=this.attr_("errorBars"),f=this.attr_("customBars"),g=0;g<a.length;g++){var h=a[g][0],i=a[g][b];if(c)if(e||f){for(var j=0;j<i.length;j++)if(i[j]<=0){i=null;break}}else 0>=i&&(i=null);null!==i?d.push([h,i]):d.push([h,e?[null,null]:f?[null,null,null]:i])}return d},Dygraph.prototype.rollingAverage=function(a,b){b=Math.min(b,a.length);var c,d,e,f,g,h,i,j,k=[],l=this.attr_("sigma");if(this.fractions_){var m=0,n=0,o=100;for(e=0;e<a.length;e++){m+=a[e][1][0],n+=a[e][1][1],e-b>=0&&(m-=a[e-b][1][0],n-=a[e-b][1][1]);var p=a[e][0],q=n?m/n:0;if(this.attr_("errorBars"))if(this.attr_("wilsonInterval"))if(n){var r=0>q?0:q,s=n,t=l*Math.sqrt(r*(1-r)/s+l*l/(4*s*s)),u=1+l*l/n;c=(r+l*l/(2*n)-t)/u,d=(r+l*l/(2*n)+t)/u,k[e]=[p,[r*o,(r-c)*o,(d-r)*o]]}else k[e]=[p,[0,0,0]];else j=n?l*Math.sqrt(q*(1-q)/n):1,k[e]=[p,[o*q,o*j,o*j]];else k[e]=[p,o*q]}}else if(this.attr_("customBars")){c=0;var v=0;d=0;var w=0;for(e=0;e<a.length;e++){var x=a[e][1];if(g=x[1],k[e]=[a[e][0],[g,g-x[0],x[2]-g]],null===g||isNaN(g)||(c+=x[0],v+=g,d+=x[2],w+=1),e-b>=0){var y=a[e-b];null===y[1][1]||isNaN(y[1][1])||(c-=y[1][0],v-=y[1][1],d-=y[1][2],w-=1)}w?k[e]=[a[e][0],[1*v/w,1*(v-c)/w,1*(d-v)/w]]:k[e]=[a[e][0],[null,null,null]]}}else if(this.attr_("errorBars"))for(e=0;e<a.length;e++){
h=0;var z=0;for(i=0,f=Math.max(0,e-b+1);e+1>f;f++)g=a[f][1][0],null===g||isNaN(g)||(i++,h+=a[f][1][0],z+=Math.pow(a[f][1][1],2));if(i)j=Math.sqrt(z)/i,k[e]=[a[e][0],[h/i,l*j,l*j]];else{var A=1==b?a[e][1][0]:null;k[e]=[a[e][0],[A,A,A]]}}else{if(1==b)return a;for(e=0;e<a.length;e++){for(h=0,i=0,f=Math.max(0,e-b+1);e+1>f;f++)g=a[f][1],null===g||isNaN(g)||(i++,h+=a[f][1]);i?k[e]=[a[e][0],h/i]:k[e]=[a[e][0],null]}}return k},Dygraph.prototype.detectTypeFromString_=function(a){var b=!1,c=a.indexOf("-");c>0&&"e"!=a[c-1]&&"E"!=a[c-1]||a.indexOf("/")>=0||isNaN(parseFloat(a))?b=!0:8==a.length&&a>"19700101"&&"20371231">a&&(b=!0),this.setXAxisOptions_(b)},Dygraph.prototype.setXAxisOptions_=function(a){a?(this.attrs_.xValueParser=Dygraph.dateParser,this.attrs_.axes.x.valueFormatter=Dygraph.dateString_,this.attrs_.axes.x.ticker=Dygraph.dateTicker,this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter):(this.attrs_.xValueParser=function(a){return parseFloat(a)},this.attrs_.axes.x.valueFormatter=function(a){return a},this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},Dygraph.prototype.parseFloat_=function(a,b,c){var d=parseFloat(a);if(!isNaN(d))return d;if(/^ *$/.test(a))return null;if(/^ *nan *$/i.test(a))return NaN;var e="Unable to parse '"+a+"' as a number";return null!==c&&null!==b&&(e+=" on line "+(1+b)+" ('"+c+"') of CSV."),this.error(e),null},Dygraph.prototype.parseCSV_=function(a){var b,c,d=[],e=Dygraph.detectLineDelimiter(a),f=a.split(e||"\n"),g=this.attr_("delimiter");-1==f[0].indexOf(g)&&f[0].indexOf(" ")>=0&&(g=" ");var h=0;"labels"in this.user_attrs_||(h=1,this.attrs_.labels=f[0].split(g),this.attributes_.reparseSeries());for(var i,j=0,k=!1,l=this.attr_("labels").length,m=!1,n=h;n<f.length;n++){var o=f[n];if(j=n,0!==o.length&&"#"!=o[0]){var p=o.split(g);if(!(p.length<2)){var q=[];if(k||(this.detectTypeFromString_(p[0]),i=this.attr_("xValueParser"),k=!0),q[0]=i(p[0],this),this.fractions_)for(c=1;c<p.length;c++)b=p[c].split("/"),2!=b.length?(this.error('Expected fractional "num/den" values in CSV data but found a value \''+p[c]+"' on line "+(1+n)+" ('"+o+"') which is not of this form."),q[c]=[0,0]):q[c]=[this.parseFloat_(b[0],n,o),this.parseFloat_(b[1],n,o)];else if(this.attr_("errorBars"))for(p.length%2!=1&&this.error("Expected alternating (value, stdev.) pairs in CSV data but line "+(1+n)+" has an odd number of values ("+(p.length-1)+"): '"+o+"'"),c=1;c<p.length;c+=2)q[(c+1)/2]=[this.parseFloat_(p[c],n,o),this.parseFloat_(p[c+1],n,o)];else if(this.attr_("customBars"))for(c=1;c<p.length;c++){var r=p[c];/^ *$/.test(r)?q[c]=[null,null,null]:(b=r.split(";"),3==b.length?q[c]=[this.parseFloat_(b[0],n,o),this.parseFloat_(b[1],n,o),this.parseFloat_(b[2],n,o)]:this.warn('When using customBars, values must be either blank or "low;center;high" tuples (got "'+r+'" on line '+(1+n)))}else for(c=1;c<p.length;c++)q[c]=this.parseFloat_(p[c],n,o);if(d.length>0&&q[0]<d[d.length-1][0]&&(m=!0),q.length!=l&&this.error("Number of columns in line "+n+" ("+q.length+") does not agree with number of labels ("+l+") "+o),0===n&&this.attr_("labels")){var s=!0;for(c=0;s&&c<q.length;c++)q[c]&&(s=!1);if(s){this.warn("The dygraphs 'labels' option is set, but the first row of CSV data ('"+o+"') appears to also contain labels. Will drop the CSV labels and use the option labels.");continue}}d.push(q)}}}return m&&(this.warn("CSV is out of order; order it correctly to speed loading."),d.sort(function(a,b){return a[0]-b[0]})),d},Dygraph.prototype.parseArray_=function(a){if(0===a.length)return this.error("Can't plot empty data set"),null;if(0===a[0].length)return this.error("Data set cannot contain an empty row"),null;var b;if(null===this.attr_("labels")){for(this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter"),this.attrs_.labels=["X"],b=1;b<a[0].length;b++)this.attrs_.labels.push("Y"+b);this.attributes_.reparseSeries()}else{var c=this.attr_("labels");if(c.length!=a[0].length)return this.error("Mismatch between number of labels ("+c+") and number of columns in array ("+a[0].length+")"),null}if(Dygraph.isDateLike(a[0][0])){this.attrs_.axes.x.valueFormatter=Dygraph.dateString_,this.attrs_.axes.x.ticker=Dygraph.dateTicker,this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter;var d=Dygraph.clone(a);for(b=0;b<a.length;b++){if(0===d[b].length)return this.error("Row "+(1+b)+" of data is empty"),null;if(null===d[b][0]||"function"!=typeof d[b][0].getTime||isNaN(d[b][0].getTime()))return this.error("x value in row "+(1+b)+" is not a Date"),null;d[b][0]=d[b][0].getTime()}return d}return this.attrs_.axes.x.valueFormatter=function(a){return a},this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks,this.attrs_.axes.x.axisLabelFormatter=Dygraph.numberAxisLabelFormatter,a},Dygraph.prototype.parseDataTable_=function(a){var b=function(a){var b=String.fromCharCode(65+a%26);for(a=Math.floor(a/26);a>0;)b=String.fromCharCode(65+(a-1)%26)+b.toLowerCase(),a=Math.floor((a-1)/26);return b},c=a.getNumberOfColumns(),d=a.getNumberOfRows(),e=a.getColumnType(0);if("date"==e||"datetime"==e)this.attrs_.xValueParser=Dygraph.dateParser,this.attrs_.axes.x.valueFormatter=Dygraph.dateString_,this.attrs_.axes.x.ticker=Dygraph.dateTicker,this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter;else{if("number"!=e)return this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+e+"')"),null;this.attrs_.xValueParser=function(a){return parseFloat(a)},this.attrs_.axes.x.valueFormatter=function(a){return a},this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var f,g,h=[],i={},j=!1;for(f=1;c>f;f++){var k=a.getColumnType(f);if("number"==k)h.push(f);else if("string"==k&&this.attr_("displayAnnotations")){var l=h[h.length-1];i.hasOwnProperty(l)?i[l].push(f):i[l]=[f],j=!0}else this.error("Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true")}var m=[a.getColumnLabel(0)];for(f=0;f<h.length;f++)m.push(a.getColumnLabel(h[f])),this.attr_("errorBars")&&(f+=1);this.attrs_.labels=m,c=m.length;var n=[],o=!1,p=[];for(f=0;d>f;f++){var q=[];if("undefined"!=typeof a.getValue(f,0)&&null!==a.getValue(f,0)){if("date"==e||"datetime"==e?q.push(a.getValue(f,0).getTime()):q.push(a.getValue(f,0)),this.attr_("errorBars"))for(g=0;c-1>g;g++)q.push([a.getValue(f,1+2*g),a.getValue(f,2+2*g)]);else{for(g=0;g<h.length;g++){var r=h[g];if(q.push(a.getValue(f,r)),j&&i.hasOwnProperty(r)&&null!==a.getValue(f,i[r][0])){var s={};s.series=a.getColumnLabel(r),s.xval=q[0],s.shortText=b(p.length),s.text="";for(var t=0;t<i[r].length;t++)t&&(s.text+="\n"),s.text+=a.getValue(f,i[r][t]);p.push(s)}}for(g=0;g<q.length;g++)isFinite(q[g])||(q[g]=null)}n.length>0&&q[0]<n[n.length-1][0]&&(o=!0),n.push(q)}else this.warn("Ignoring row "+f+" of DataTable because of undefined or null first column.")}o&&(this.warn("DataTable is out of order; order it correctly to speed loading."),n.sort(function(a,b){return a[0]-b[0]})),this.rawData_=n,p.length>0&&this.setAnnotations(p,!0),this.attributes_.reparseSeries()},Dygraph.prototype.start_=function(){var a=this.file_;if("function"==typeof a&&(a=a()),Dygraph.isArrayLike(a))this.rawData_=this.parseArray_(a),this.predraw_();else if("object"==typeof a&&"function"==typeof a.getColumnRange)this.parseDataTable_(a),this.predraw_();else if("string"==typeof a){var b=Dygraph.detectLineDelimiter(a);if(b)this.loadedEvent_(a);else{var c;c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var d=this;c.onreadystatechange=function(){4==c.readyState&&(200===c.status||0===c.status)&&d.loadedEvent_(c.responseText)},c.open("GET",a,!0),c.send(null)}}else this.error("Unknown data format: "+typeof a)},Dygraph.prototype.updateOptions=function(a,b){"undefined"==typeof b&&(b=!1);var c=a.file,d=Dygraph.mapLegacyOptions_(a);"rollPeriod"in d&&(this.rollPeriod_=d.rollPeriod),"dateWindow"in d&&(this.dateWindow_=d.dateWindow,"isZoomedIgnoreProgrammaticZoom"in d||(this.zoomed_x_=null!==d.dateWindow)),"valueRange"in d&&!("isZoomedIgnoreProgrammaticZoom"in d)&&(this.zoomed_y_=null!==d.valueRange);var e=Dygraph.isPixelChangingOptionList(this.attr_("labels"),d);Dygraph.updateDeep(this.user_attrs_,d),this.attributes_.reparseSeries(),c?(this.file_=c,b||this.start_()):b||(e?this.predraw_():this.renderGraph_(!1))},Dygraph.mapLegacyOptions_=function(a){var b={};for(var c in a)"file"!=c&&a.hasOwnProperty(c)&&(b[c]=a[c]);var d=function(a,c,d){b.axes||(b.axes={}),b.axes[a]||(b.axes[a]={}),b.axes[a][c]=d},e=function(c,e,f){"undefined"!=typeof a[c]&&(Dygraph.warn("Option "+c+" is deprecated. Use the "+f+" option for the "+e+" axis instead. (e.g. { axes : { "+e+" : { "+f+" : ... } } } (see http://dygraphs.com/per-axis.html for more information."),d(e,f,a[c]),delete b[c])};return e("xValueFormatter","x","valueFormatter"),e("pixelsPerXLabel","x","pixelsPerLabel"),e("xAxisLabelFormatter","x","axisLabelFormatter"),e("xTicker","x","ticker"),e("yValueFormatter","y","valueFormatter"),e("pixelsPerYLabel","y","pixelsPerLabel"),e("yAxisLabelFormatter","y","axisLabelFormatter"),e("yTicker","y","ticker"),b},Dygraph.prototype.resize=function(a,b){if(!this.resize_lock){this.resize_lock=!0,null===a!=(null===b)&&(this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),a=b=null);var c=this.width_,d=this.height_;a?(this.maindiv_.style.width=a+"px",this.maindiv_.style.height=b+"px",this.width_=a,this.height_=b):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),(c!=this.width_||d!=this.height_)&&(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a,this.predraw_()},Dygraph.prototype.visibility=function(){for(this.attr_("visibility")||(this.attrs_.visibility=[]);this.attr_("visibility").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.attr_("visibility")},Dygraph.prototype.setVisibility=function(a,b){var c=this.visibility();0>a||a>=c.length?this.warn("invalid series number in setVisibility: "+a):(c[a]=b,this.predraw_())},Dygraph.prototype.size=function(){return{"width":this.width_,"height":this.height_}},Dygraph.prototype.setAnnotations=function(a,b){return Dygraph.addAnnotationRule(),this.annotations_=a,this.layout_?(this.layout_.setAnnotations(this.annotations_),void(b||this.predraw_())):void this.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},Dygraph.prototype.annotations=function(){return this.annotations_},Dygraph.prototype.getLabels=function(){var a=this.attr_("labels");return a?a.slice():null},Dygraph.prototype.indexFromSetName=function(a){return this.setIndexByName_[a]},Dygraph.prototype.ready=function(a){this.is_initial_draw_?this.readyFns_.push(a):a(this)},Dygraph.addAnnotationRule=function(){if(!Dygraph.addedAnnotationCSS){var a="border: 1px solid black; background-color: white; text-align: center;",b=document.createElement("style");b.type="text/css",document.getElementsByTagName("head")[0].appendChild(b);for(var c=0;c<document.styleSheets.length;c++)if(!document.styleSheets[c].disabled){var d=document.styleSheets[c];try{if(d.insertRule){var e=d.cssRules?d.cssRules.length:0;d.insertRule(".dygraphDefaultAnnotation { "+a+" }",e)}else d.addRule&&d.addRule(".dygraphDefaultAnnotation",a);return void(Dygraph.addedAnnotationCSS=!0)}catch(f){}}this.warn("Unable to add default annotation CSS rule; display may be off.")}};var DateGraph=Dygraph;Dygraph.LOG_SCALE=10,Dygraph.LN_TEN=Math.log(Dygraph.LOG_SCALE),Dygraph.log10=function(a){return Math.log(a)/Dygraph.LN_TEN},Dygraph.DEBUG=1,Dygraph.INFO=2,Dygraph.WARNING=3,Dygraph.ERROR=3,Dygraph.LOG_STACK_TRACES=!1,Dygraph.DOTTED_LINE=[2,2],Dygraph.DASHED_LINE=[7,3],Dygraph.DOT_DASH_LINE=[7,2,2,2],Dygraph.log=function(a,b){var c;if("undefined"!=typeof printStackTrace)try{for(c=printStackTrace({"guess":!1});-1!=c[0].indexOf("stacktrace");)c.splice(0,1);c.splice(0,2);for(var d=0;d<c.length;d++)c[d]=c[d].replace(/\([^)]*\/(.*)\)/,"@$1").replace(/\@.*\/([^\/]*)/,"@$1").replace("[object Object].","");var e=c.splice(0,1)[0];b+=" ("+e.replace(/^.*@ ?/,"")+")"}catch(f){}if("undefined"!=typeof window.console){var g=window.console,h=function(a,b,c){b&&"function"==typeof b?b.call(a,c):a.log(c)};switch(a){case Dygraph.DEBUG:h(g,g.debug,"dygraphs: "+b);break;case Dygraph.INFO:h(g,g.info,"dygraphs: "+b);break;case Dygraph.WARNING:h(g,g.warn,"dygraphs: "+b);break;case Dygraph.ERROR:h(g,g.error,"dygraphs: "+b)}}Dygraph.LOG_STACK_TRACES&&window.console.log(c.join("\n"))},Dygraph.info=function(a){Dygraph.log(Dygraph.INFO,a)},Dygraph.prototype.info=Dygraph.info,Dygraph.warn=function(a){Dygraph.log(Dygraph.WARNING,a)},Dygraph.prototype.warn=Dygraph.warn,Dygraph.error=function(a){Dygraph.log(Dygraph.ERROR,a)},Dygraph.prototype.error=Dygraph.error,Dygraph.getContext=function(a){return a.getContext("2d")},Dygraph.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):(a[b+c]=function(){c(window.event)},a.attachEvent("on"+b,a[b+c]))},Dygraph.prototype.addAndTrackEvent=function(a,b,c){Dygraph.addEvent(a,b,c),this.registeredEvents_.push({"elem":a,"type":b,"fn":c})},Dygraph.removeEvent=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else{try{a.detachEvent("on"+b,a[b+c])}catch(d){}a[b+c]=null}},Dygraph.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var a=0;a<this.registeredEvents_.length;a++){var b=this.registeredEvents_[a];Dygraph.removeEvent(b.elem,b.type,b.fn)}this.registeredEvents_=[]},Dygraph.cancelEvent=function(a){return a=a?a:window.event,a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.cancel=!0,a.returnValue=!1,!1},Dygraph.hsvToRGB=function(a,b,c){var d,e,f;if(0===b)d=c,e=c,f=c;else{var g=Math.floor(6*a),h=6*a-g,i=c*(1-b),j=c*(1-b*h),k=c*(1-b*(1-h));switch(g){case 1:d=j,e=c,f=i;break;case 2:d=i,e=c,f=k;break;case 3:d=i,e=j,f=c;break;case 4:d=k,e=i,f=c;break;case 5:d=c,e=i,f=j;break;case 6:case 0:d=c,e=k,f=i}}return d=Math.floor(255*d+.5),e=Math.floor(255*e+.5),f=Math.floor(255*f+.5),"rgb("+d+","+e+","+f+")"},Dygraph.findPosX=function(a){var b=0;if(a.offsetParent)for(var c=a;;){var d="0";if(window.getComputedStyle&&(d=window.getComputedStyle(c,null).borderLeft||"0"),b+=parseInt(d,10),b+=c.offsetLeft,!c.offsetParent)break;c=c.offsetParent}else a.x&&(b+=a.x);for(;a&&a!=document.body;)b-=a.scrollLeft,a=a.parentNode;return b},Dygraph.findPosY=function(a){var b=0;if(a.offsetParent)for(var c=a;;){var d="0";if(window.getComputedStyle&&(d=window.getComputedStyle(c,null).borderTop||"0"),b+=parseInt(d,10),b+=c.offsetTop,!c.offsetParent)break;c=c.offsetParent}else a.y&&(b+=a.y);for(;a&&a!=document.body;)b-=a.scrollTop,a=a.parentNode;return b},Dygraph.pageX=function(a){if(a.pageX)return!a.pageX||a.pageX<0?0:a.pageX;var b=document.documentElement,c=document.body;return a.clientX+(b.scrollLeft||c.scrollLeft)-(b.clientLeft||0)},Dygraph.pageY=function(a){if(a.pageY)return!a.pageY||a.pageY<0?0:a.pageY;var b=document.documentElement,c=document.body;return a.clientY+(b.scrollTop||c.scrollTop)-(b.clientTop||0)},Dygraph.isOK=function(a){return!!a&&!isNaN(a)},Dygraph.isValidPoint=function(a,b){return a?null===a.yval?!1:null===a.x||void 0===a.x?!1:null===a.y||void 0===a.y?!1:isNaN(a.x)||!b&&isNaN(a.y)?!1:!0:!1},Dygraph.floatFormat=function(a,b){var c=Math.min(Math.max(1,b||2),21);return Math.abs(a)<.001&&0!==a?a.toExponential(c-1):a.toPrecision(c)},Dygraph.zeropad=function(a){return 10>a?"0"+a:""+a},Dygraph.hmsString_=function(a){var b=Dygraph.zeropad,c=new Date(a);return c.getSeconds()?b(c.getHours())+":"+b(c.getMinutes())+":"+b(c.getSeconds()):b(c.getHours())+":"+b(c.getMinutes())},Dygraph.round_=function(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c},Dygraph.binarySearch=function(a,b,c,d,e){if((null===d||void 0===d||null===e||void 0===e)&&(d=0,e=b.length-1),d>e)return-1;(null===c||void 0===c)&&(c=0);var f,g=function(a){return a>=0&&a<b.length},h=parseInt((d+e)/2,10),i=b[h];return i==a?h:i>a?c>0&&(f=h-1,g(f)&&b[f]<a)?h:Dygraph.binarySearch(a,b,c,d,h-1):a>i?0>c&&(f=h+1,g(f)&&b[f]>a)?h:Dygraph.binarySearch(a,b,c,h+1,e):-1},Dygraph.dateParser=function(a){var b,c;if((-1==a.search("-")||-1!=a.search("T")||-1!=a.search("Z"))&&(c=Dygraph.dateStrToMillis(a),c&&!isNaN(c)))return c;if(-1!=a.search("-")){for(b=a.replace("-","/","g");-1!=b.search("-");)b=b.replace("-","/");c=Dygraph.dateStrToMillis(b)}else 8==a.length?(b=a.substr(0,4)+"/"+a.substr(4,2)+"/"+a.substr(6,2),c=Dygraph.dateStrToMillis(b)):c=Dygraph.dateStrToMillis(a);return(!c||isNaN(c))&&Dygraph.error("Couldn't parse "+a+" as a date"),c},Dygraph.dateStrToMillis=function(a){return new Date(a).getTime()},Dygraph.update=function(a,b){if("undefined"!=typeof b&&null!==b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},Dygraph.updateDeep=function(a,b){function c(a){return"object"==typeof Node?a instanceof Node:"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName}if("undefined"!=typeof b&&null!==b)for(var d in b)b.hasOwnProperty(d)&&(null===b[d]?a[d]=null:Dygraph.isArrayLike(b[d])?a[d]=b[d].slice():c(b[d])?a[d]=b[d]:"object"==typeof b[d]?(("object"!=typeof a[d]||null===a[d])&&(a[d]={}),Dygraph.updateDeep(a[d],b[d])):a[d]=b[d]);return a},Dygraph.isArrayLike=function(a){var b=typeof a;return"object"!=b&&("function"!=b||"function"!=typeof a.item)||null===a||"number"!=typeof a.length||3===a.nodeType?!1:!0},Dygraph.isDateLike=function(a){return"object"!=typeof a||null===a||"function"!=typeof a.getTime?!1:!0},Dygraph.clone=function(a){for(var b=[],c=0;c<a.length;c++)Dygraph.isArrayLike(a[c])?b.push(Dygraph.clone(a[c])):b.push(a[c]);return b},Dygraph.createCanvas=function(){var a=document.createElement("canvas"),b=/MSIE/.test(navigator.userAgent)&&!window.opera;return b&&"undefined"!=typeof G_vmlCanvasManager&&(a=G_vmlCanvasManager.initElement(a)),a},Dygraph.isAndroid=function(){return/Android/.test(navigator.userAgent)},Dygraph.Iterator=function(a,b,c,d){b=b||0,c=c||a.length,this.hasNext=!0,this.peek=null,this.start_=b,this.array_=a,this.predicate_=d,this.end_=Math.min(a.length,b+c),this.nextIdx_=b-1,this.next()},Dygraph.Iterator.prototype.next=function(){if(!this.hasNext)return null;for(var a=this.peek,b=this.nextIdx_+1,c=!1;b<this.end_;){if(!this.predicate_||this.predicate_(this.array_,b)){this.peek=this.array_[b],c=!0;break}b++}return this.nextIdx_=b,c||(this.hasNext=!1,this.peek=null),a},Dygraph.createIterator=function(a,b,c,d){return new Dygraph.Iterator(a,b,c,d)},Dygraph.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),Dygraph.repeatAndCleanup=function(a,b,c,d){var e,f=0,g=(new Date).getTime();if(a(f),1==b)return void d();var h=b-1;!function i(){f>=b||Dygraph.requestAnimFrame.call(window,function(){var b=(new Date).getTime(),j=b-g;e=f,f=Math.floor(j/c);var k=f-e,l=f+k>h;l||f>=h?(a(h),d()):(0!==k&&a(f),i())})}()},Dygraph.isPixelChangingOptionList=function(a,b){var c={"annotationClickHandler":!0,"annotationDblClickHandler":!0,"annotationMouseOutHandler":!0,"annotationMouseOverHandler":!0,"axisLabelColor":!0,"axisLineColor":!0,"axisLineWidth":!0,"clickCallback":!0,"digitsAfterDecimal":!0,"drawCallback":!0,"drawHighlightPointCallback":!0,"drawPoints":!0,"drawPointCallback":!0,"drawXGrid":!0,"drawYGrid":!0,"fillAlpha":!0,"gridLineColor":!0,"gridLineWidth":!0,"hideOverlayOnMouseOut":!0,"highlightCallback":!0,"highlightCircleSize":!0,"interactionModel":!0,"isZoomedIgnoreProgrammaticZoom":!0,"labelsDiv":!0,"labelsDivStyles":!0,"labelsDivWidth":!0,"labelsKMB":!0,"labelsKMG2":!0,"labelsSeparateLines":!0,"labelsShowZeroValues":!0,"legend":!0,"maxNumberWidth":!0,"panEdgeFraction":!0,"pixelsPerYLabel":!0,"pointClickCallback":!0,"pointSize":!0,"rangeSelectorPlotFillColor":!0,"rangeSelectorPlotStrokeColor":!0,"showLabelsOnHighlight":!0,"showRoller":!0,"sigFigs":!0,"strokeWidth":!0,"underlayCallback":!0,"unhighlightCallback":!0,"xAxisLabelFormatter":!0,"xTicker":!0,"xValueFormatter":!0,"yAxisLabelFormatter":!0,"yValueFormatter":!0,"zoomCallback":!0},d=!1,e={};if(a)for(var f=1;f<a.length;f++)e[a[f]]=!0;for(var g in b){if(d)break;if(b.hasOwnProperty(g))if(e[g])for(var h in b[g]){if(d)break;b[g].hasOwnProperty(h)&&!c[h]&&(d=!0)}else c[g]||(d=!0)}return d},Dygraph.compareArrays=function(a,b){if(!Dygraph.isArrayLike(a)||!Dygraph.isArrayLike(b))return!1;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0},Dygraph.regularShape_=function(a,b,c,d,e,f,g){f=f||0,g=g||2*Math.PI/b,a.beginPath();var h=f,i=h,j=function(){var a=d+Math.sin(i)*c,b=e+-Math.cos(i)*c;return[a,b]},k=j(),l=k[0],m=k[1];a.moveTo(l,m);for(var n=0;b>n;n++){i=n==b-1?h:i+g;var o=j();a.lineTo(o[0],o[1])}a.fill(),a.stroke()},Dygraph.shapeFunction_=function(a,b,c){return function(d,e,f,g,h,i,j){f.strokeStyle=i,f.fillStyle="white",Dygraph.regularShape_(f,a,j,g,h,b,c)}},Dygraph.Circles={"DEFAULT":function(a,b,c,d,e,f,g){c.beginPath(),c.fillStyle=f,c.arc(d,e,g,0,2*Math.PI,!1),c.fill()},"TRIANGLE":Dygraph.shapeFunction_(3),"SQUARE":Dygraph.shapeFunction_(4,Math.PI/4),"DIAMOND":Dygraph.shapeFunction_(4),"PENTAGON":Dygraph.shapeFunction_(5),"HEXAGON":Dygraph.shapeFunction_(6),"CIRCLE":function(a,b,c,d,e,f,g){c.beginPath(),c.strokeStyle=f,c.fillStyle="white",c.arc(d,e,g,0,2*Math.PI,!1),c.fill(),c.stroke()},"STAR":Dygraph.shapeFunction_(5,0,4*Math.PI/5),"PLUS":function(a,b,c,d,e,f,g){c.strokeStyle=f,c.beginPath(),c.moveTo(d+g,e),c.lineTo(d-g,e),c.closePath(),c.stroke(),c.beginPath(),c.moveTo(d,e+g),c.lineTo(d,e-g),c.closePath(),c.stroke()},"EX":function(a,b,c,d,e,f,g){c.strokeStyle=f,c.beginPath(),c.moveTo(d+g,e+g),c.lineTo(d-g,e-g),c.closePath(),c.stroke(),c.beginPath(),c.moveTo(d+g,e-g),c.lineTo(d-g,e+g),c.closePath(),c.stroke()}},Dygraph.IFrameTarp=function(){this.tarps=[]},Dygraph.IFrameTarp.prototype.cover=function(){for(var a=document.getElementsByTagName("iframe"),b=0;b<a.length;b++){var c=a[b],d=Dygraph.findPosX(c),e=Dygraph.findPosY(c),f=c.offsetWidth,g=c.offsetHeight,h=document.createElement("div");h.style.position="absolute",h.style.left=d+"px",h.style.top=e+"px",h.style.width=f+"px",h.style.height=g+"px",h.style.zIndex=999,document.body.appendChild(h),this.tarps.push(h)}},Dygraph.IFrameTarp.prototype.uncover=function(){for(var a=0;a<this.tarps.length;a++)this.tarps[a].parentNode.removeChild(this.tarps[a]);this.tarps=[]},Dygraph.detectLineDelimiter=function(a){for(var b=0;b<a.length;b++){var c=a.charAt(b);if("\r"===c)return b+1<a.length&&"\n"===a.charAt(b+1)?"\r\n":c;if("\n"===c)return b+1<a.length&&"\r"===a.charAt(b+1)?"\n\r":c}return null},Dygraph.isNodeContainedBy=function(a,b){if(null===b||null===a)return!1;for(var c=a;c&&c!==b;)c=c.parentNode;return c===b},Dygraph.pow=function(a,b){return 0>b?1/Math.pow(a,-b):Math.pow(a,b)},Dygraph.dateSetters={"ms":Date.prototype.setMilliseconds,"s":Date.prototype.setSeconds,"m":Date.prototype.setMinutes,"h":Date.prototype.setHours},Dygraph.setDateSameTZ=function(a,b){var c=a.getTimezoneOffset();for(var d in b)if(b.hasOwnProperty(d)){var e=Dygraph.dateSetters[d];if(!e)throw"Invalid setter: "+d;e.call(a,b[d]),a.getTimezoneOffset()!=c&&a.setTime(a.getTime()+60*(c-a.getTimezoneOffset())*1e3)}},Dygraph.GVizChart=function(a){this.container=a},Dygraph.GVizChart.prototype.draw=function(a,b){this.container.innerHTML="","undefined"!=typeof this.date_graph&&this.date_graph.destroy(),this.date_graph=new Dygraph(this.container,a,b)},Dygraph.GVizChart.prototype.setSelection=function(a){var b=!1;a.length&&(b=a[0].row),this.date_graph.setSelection(b)},Dygraph.GVizChart.prototype.getSelection=function(){var a=[],b=this.date_graph.getSelection();if(0>b)return a;for(var c=this.date_graph.layout_.points,d=0;d<c.length;++d)a.push({"row":b,"column":d+1});return a},Dygraph.Interaction={},Dygraph.Interaction.startPan=function(a,b,c){var d,e;c.isPanning=!0;var f=b.xAxisRange();if(c.dateRange=f[1]-f[0],c.initialLeftmostDate=f[0],c.xUnitsPerPixel=c.dateRange/(b.plotter_.area.w-1),b.attr_("panEdgeFraction")){var g=b.width_*b.attr_("panEdgeFraction"),h=b.xAxisExtremes(),i=b.toDomXCoord(h[0])-g,j=b.toDomXCoord(h[1])+g,k=b.toDataXCoord(i),l=b.toDataXCoord(j);c.boundedDates=[k,l];var m=[],n=b.height_*b.attr_("panEdgeFraction");for(d=0;d<b.axes_.length;d++){e=b.axes_[d];var o=e.extremeRange,p=b.toDomYCoord(o[0],d)+n,q=b.toDomYCoord(o[1],d)-n,r=b.toDataYCoord(p,d),s=b.toDataYCoord(q,d);m[d]=[r,s]}c.boundedValues=m}for(c.is2DPan=!1,c.axes=[],d=0;d<b.axes_.length;d++){e=b.axes_[d];var t={},u=b.yAxisRange(d),v=b.attributes_.getForAxis("logscale",d);v?(t.initialTopValue=Dygraph.log10(u[1]),t.dragValueRange=Dygraph.log10(u[1])-Dygraph.log10(u[0])):(t.initialTopValue=u[1],t.dragValueRange=u[1]-u[0]),t.unitsPerPixel=t.dragValueRange/(b.plotter_.area.h-1),c.axes.push(t),(e.valueWindow||e.valueRange)&&(c.is2DPan=!0)}},Dygraph.Interaction.movePan=function(a,b,c){c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=c.initialLeftmostDate-(c.dragEndX-c.dragStartX)*c.xUnitsPerPixel;c.boundedDates&&(d=Math.max(d,c.boundedDates[0]));var e=d+c.dateRange;if(c.boundedDates&&e>c.boundedDates[1]&&(d-=e-c.boundedDates[1],e=d+c.dateRange),b.dateWindow_=[d,e],c.is2DPan)for(var f=c.dragEndY-c.dragStartY,g=0;g<b.axes_.length;g++){var h=b.axes_[g],i=c.axes[g],j=f*i.unitsPerPixel,k=c.boundedValues?c.boundedValues[g]:null,l=i.initialTopValue+j;k&&(l=Math.min(l,k[1]));var m=l-i.dragValueRange;k&&m<k[0]&&(l-=m-k[0],m=l-i.dragValueRange);var n=b.attributes_.getForAxis("logscale",g);n?h.valueWindow=[Math.pow(Dygraph.LOG_SCALE,m),Math.pow(Dygraph.LOG_SCALE,l)]:h.valueWindow=[m,l]}b.drawGraph_(!1)},Dygraph.Interaction.endPan=function(a,b,c){c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragEndX-c.dragStartX),e=Math.abs(c.dragEndY-c.dragStartY);2>d&&2>e&&void 0!==b.lastx_&&-1!=b.lastx_&&Dygraph.Interaction.treatMouseOpAsClick(b,a,c),c.isPanning=!1,c.is2DPan=!1,c.initialLeftmostDate=null,c.dateRange=null,c.valueRange=null,c.boundedDates=null,c.boundedValues=null,c.axes=null},Dygraph.Interaction.startZoom=function(a,b,c){c.isZooming=!0,c.zoomMoved=!1},Dygraph.Interaction.moveZoom=function(a,b,c){c.zoomMoved=!0,c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragStartX-c.dragEndX),e=Math.abs(c.dragStartY-c.dragEndY);c.dragDirection=e/2>d?Dygraph.VERTICAL:Dygraph.HORIZONTAL,b.drawZoomRect_(c.dragDirection,c.dragStartX,c.dragEndX,c.dragStartY,c.dragEndY,c.prevDragDirection,c.prevEndX,c.prevEndY),c.prevEndX=c.dragEndX,c.prevEndY=c.dragEndY,c.prevDragDirection=c.dragDirection},Dygraph.Interaction.treatMouseOpAsClick=function(a,b,c){var d=a.attr_("clickCallback"),e=a.attr_("pointClickCallback"),f=null;if(e){for(var g=-1,h=Number.MAX_VALUE,i=0;i<a.selPoints_.length;i++){var j=a.selPoints_[i],k=Math.pow(j.canvasx-c.dragEndX,2)+Math.pow(j.canvasy-c.dragEndY,2);!isNaN(k)&&(-1==g||h>k)&&(h=k,g=i)}var l=a.attr_("highlightCircleSize")+2;l*l>=h&&(f=a.selPoints_[g])}f&&e(b,f),d&&d(b,a.lastx_,a.selPoints_)},Dygraph.Interaction.endZoom=function(a,b,c){c.isZooming=!1,c.dragEndX=b.dragGetX_(a,c),c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragEndX-c.dragStartX),e=Math.abs(c.dragEndY-c.dragStartY);2>d&&2>e&&void 0!==b.lastx_&&-1!=b.lastx_&&Dygraph.Interaction.treatMouseOpAsClick(b,a,c);var f=b.getArea();if(d>=10&&c.dragDirection==Dygraph.HORIZONTAL){var g=Math.min(c.dragStartX,c.dragEndX),h=Math.max(c.dragStartX,c.dragEndX);g=Math.max(g,f.x),h=Math.min(h,f.x+f.w),h>g&&b.doZoomX_(g,h),c.cancelNextDblclick=!0}else if(e>=10&&c.dragDirection==Dygraph.VERTICAL){var i=Math.min(c.dragStartY,c.dragEndY),j=Math.max(c.dragStartY,c.dragEndY);i=Math.max(i,f.y),j=Math.min(j,f.y+f.h),j>i&&b.doZoomY_(i,j),c.cancelNextDblclick=!0}else c.zoomMoved&&b.clearZoomRect_();c.dragStartX=null,c.dragStartY=null},Dygraph.Interaction.startTouch=function(a,b,c){a.preventDefault(),a.touches.length>1&&(c.startTimeForDoubleTapMs=null);for(var d=[],e=0;e<a.touches.length;e++){var f=a.touches[e];d.push({"pageX":f.pageX,"pageY":f.pageY,"dataX":b.toDataXCoord(f.pageX),"dataY":b.toDataYCoord(f.pageY)})}if(c.initialTouches=d,1==d.length)c.initialPinchCenter=d[0],c.touchDirections={"x":!0,"y":!0};else if(d.length>=2){c.initialPinchCenter={"pageX":.5*(d[0].pageX+d[1].pageX),"pageY":.5*(d[0].pageY+d[1].pageY),"dataX":.5*(d[0].dataX+d[1].dataX),"dataY":.5*(d[0].dataY+d[1].dataY)};var g=180/Math.PI*Math.atan2(c.initialPinchCenter.pageY-d[0].pageY,d[0].pageX-c.initialPinchCenter.pageX);g=Math.abs(g),g>90&&(g=90-g),c.touchDirections={"x":67.5>g,"y":g>22.5}}c.initialRange={"x":b.xAxisRange(),"y":b.yAxisRange()}},Dygraph.Interaction.moveTouch=function(a,b,c){c.startTimeForDoubleTapMs=null;var d,e=[];for(d=0;d<a.touches.length;d++){var f=a.touches[d];e.push({"pageX":f.pageX,"pageY":f.pageY})}var g,h=c.initialTouches,i=c.initialPinchCenter;g=1==e.length?e[0]:{"pageX":.5*(e[0].pageX+e[1].pageX),"pageY":.5*(e[0].pageY+e[1].pageY)};var j={"pageX":g.pageX-i.pageX,"pageY":g.pageY-i.pageY},k=c.initialRange.x[1]-c.initialRange.x[0],l=c.initialRange.y[0]-c.initialRange.y[1];j.dataX=j.pageX/b.plotter_.area.w*k,j.dataY=j.pageY/b.plotter_.area.h*l;var m,n;if(1==e.length)m=1,n=1;else if(e.length>=2){var o=h[1].pageX-i.pageX;m=(e[1].pageX-g.pageX)/o;var p=h[1].pageY-i.pageY;n=(e[1].pageY-g.pageY)/p}m=Math.min(8,Math.max(.125,m)),n=Math.min(8,Math.max(.125,n));var q=!1;if(c.touchDirections.x&&(b.dateWindow_=[i.dataX-j.dataX+(c.initialRange.x[0]-i.dataX)/m,i.dataX-j.dataX+(c.initialRange.x[1]-i.dataX)/m],q=!0),c.touchDirections.y)for(d=0;1>d;d++){var r=b.axes_[d],s=b.attributes_.getForAxis("logscale",d);s||(r.valueWindow=[i.dataY-j.dataY+(c.initialRange.y[0]-i.dataY)/n,i.dataY-j.dataY+(c.initialRange.y[1]-i.dataY)/n],q=!0)}if(b.drawGraph_(!1),q&&e.length>1&&b.attr_("zoomCallback")){var t=b.xAxisRange();b.attr_("zoomCallback")(t[0],t[1],b.yAxisRanges())}},Dygraph.Interaction.endTouch=function(a,b,c){if(0!==a.touches.length)Dygraph.Interaction.startTouch(a,b,c);else if(1==a.changedTouches.length){var d=(new Date).getTime(),e=a.changedTouches[0];c.startTimeForDoubleTapMs&&d-c.startTimeForDoubleTapMs<500&&c.doubleTapX&&Math.abs(c.doubleTapX-e.screenX)<50&&c.doubleTapY&&Math.abs(c.doubleTapY-e.screenY)<50?b.resetZoom():(c.startTimeForDoubleTapMs=d,c.doubleTapX=e.screenX,c.doubleTapY=e.screenY)}},Dygraph.Interaction.defaultModel={"mousedown":function(a,b,c){a.button&&2==a.button||(c.initializeMouseDown(a,b,c),a.altKey||a.shiftKey?Dygraph.startPan(a,b,c):Dygraph.startZoom(a,b,c))},"mousemove":function(a,b,c){c.isZooming?Dygraph.moveZoom(a,b,c):c.isPanning&&Dygraph.movePan(a,b,c)},"mouseup":function(a,b,c){c.isZooming?Dygraph.endZoom(a,b,c):c.isPanning&&Dygraph.endPan(a,b,c)},"touchstart":function(a,b,c){Dygraph.Interaction.startTouch(a,b,c)},"touchmove":function(a,b,c){Dygraph.Interaction.moveTouch(a,b,c)},"touchend":function(a,b,c){Dygraph.Interaction.endTouch(a,b,c)},"mouseout":function(a,b,c){c.isZooming&&(c.dragEndX=null,c.dragEndY=null,b.clearZoomRect_())},"dblclick":function(a,b,c){return c.cancelNextDblclick?void(c.cancelNextDblclick=!1):void(a.altKey||a.shiftKey||b.resetZoom())}},Dygraph.DEFAULT_ATTRS.interactionModel=Dygraph.Interaction.defaultModel,Dygraph.defaultInteractionModel=Dygraph.Interaction.defaultModel,Dygraph.endZoom=Dygraph.Interaction.endZoom,Dygraph.moveZoom=Dygraph.Interaction.moveZoom,Dygraph.startZoom=Dygraph.Interaction.startZoom,Dygraph.endPan=Dygraph.Interaction.endPan,Dygraph.movePan=Dygraph.Interaction.movePan,Dygraph.startPan=Dygraph.Interaction.startPan,Dygraph.Interaction.nonInteractiveModel_={"mousedown":function(a,b,c){c.initializeMouseDown(a,b,c)},"mouseup":function(a,b,c){c.dragEndX=b.dragGetX_(a,c),
c.dragEndY=b.dragGetY_(a,c);var d=Math.abs(c.dragEndX-c.dragStartX),e=Math.abs(c.dragEndY-c.dragStartY);2>d&&2>e&&void 0!==b.lastx_&&-1!=b.lastx_&&Dygraph.Interaction.treatMouseOpAsClick(b,a,c)}},Dygraph.Interaction.dragIsPanInteractionModel={"mousedown":function(a,b,c){c.initializeMouseDown(a,b,c),Dygraph.startPan(a,b,c)},"mousemove":function(a,b,c){c.isPanning&&Dygraph.movePan(a,b,c)},"mouseup":function(a,b,c){c.isPanning&&Dygraph.endPan(a,b,c)}},Dygraph.TickList=void 0,Dygraph.Ticker=void 0,Dygraph.numericLinearTicks=function(a,b,c,d,e,f){var g=function(a){return"logscale"===a?!1:d(a)};return Dygraph.numericTicks(a,b,c,g,e,f)},Dygraph.numericTicks=function(a,b,c,d,e,f){var g,h,i,j,k=d("pixelsPerLabel"),l=[];if(f)for(g=0;g<f.length;g++)l.push({"v":f[g]});else{if(d("logscale")){j=Math.floor(c/k);var m=Dygraph.binarySearch(a,Dygraph.PREFERRED_LOG_TICK_VALUES,1),n=Dygraph.binarySearch(b,Dygraph.PREFERRED_LOG_TICK_VALUES,-1);-1==m&&(m=0),-1==n&&(n=Dygraph.PREFERRED_LOG_TICK_VALUES.length-1);var o=null;if(n-m>=j/4){for(var p=n;p>=m;p--){var q=Dygraph.PREFERRED_LOG_TICK_VALUES[p],r=Math.log(q/a)/Math.log(b/a)*c,s={"v":q};null===o?o={"tickValue":q,"pixel_coord":r}:Math.abs(r-o.pixel_coord)>=k?o={"tickValue":q,"pixel_coord":r}:s.label="",l.push(s)}l.reverse()}}if(0===l.length){var t,u,v=d("labelsKMG2");v?(t=[1,2,4,8,16,32,64,128,256],u=16):(t=[1,2,5,10,20,50,100],u=10);var w,x,y,z,A=Math.ceil(c/k),B=Math.abs(b-a)/A,C=Math.floor(Math.log(B)/Math.log(u)),D=Math.pow(u,C);for(h=0;h<t.length&&(w=D*t[h],x=Math.floor(a/w)*w,y=Math.ceil(b/w)*w,j=Math.abs(y-x)/w,z=c/j,!(z>k));h++);for(x>y&&(w*=-1),g=0;j>g;g++)i=x+g*w,l.push({"v":i})}}var E=d("axisLabelFormatter");for(g=0;g<l.length;g++)void 0===l[g].label&&(l[g].label=E(l[g].v,0,d,e));return l},Dygraph.dateTicker=function(a,b,c,d,e,f){var g=Dygraph.pickDateTickGranularity(a,b,c,d);return g>=0?Dygraph.getDateAxis(a,b,g,d,e):[]},Dygraph.SECONDLY=0,Dygraph.TWO_SECONDLY=1,Dygraph.FIVE_SECONDLY=2,Dygraph.TEN_SECONDLY=3,Dygraph.THIRTY_SECONDLY=4,Dygraph.MINUTELY=5,Dygraph.TWO_MINUTELY=6,Dygraph.FIVE_MINUTELY=7,Dygraph.TEN_MINUTELY=8,Dygraph.THIRTY_MINUTELY=9,Dygraph.HOURLY=10,Dygraph.TWO_HOURLY=11,Dygraph.SIX_HOURLY=12,Dygraph.DAILY=13,Dygraph.WEEKLY=14,Dygraph.MONTHLY=15,Dygraph.QUARTERLY=16,Dygraph.BIANNUAL=17,Dygraph.ANNUAL=18,Dygraph.DECADAL=19,Dygraph.CENTENNIAL=20,Dygraph.NUM_GRANULARITIES=21,Dygraph.SHORT_SPACINGS=[],Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1e3,Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=2e3,Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=5e3,Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1e4,Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=3e4,Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=6e4,Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=12e4,Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=3e5,Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=6e5,Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=18e5,Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=36e5,Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=72e5,Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=216e5,Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=864e5,Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=6048e5,Dygraph.LONG_TICK_PLACEMENTS=[],Dygraph.LONG_TICK_PLACEMENTS[Dygraph.MONTHLY]={"months":[0,1,2,3,4,5,6,7,8,9,10,11],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.QUARTERLY]={"months":[0,3,6,9],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.BIANNUAL]={"months":[0,6],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.ANNUAL]={"months":[0],"year_mod":1},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.DECADAL]={"months":[0],"year_mod":10},Dygraph.LONG_TICK_PLACEMENTS[Dygraph.CENTENNIAL]={"months":[0],"year_mod":100},Dygraph.PREFERRED_LOG_TICK_VALUES=function(){for(var a=[],b=-39;39>=b;b++)for(var c=Math.pow(10,b),d=1;9>=d;d++){var e=c*d;a.push(e)}return a}(),Dygraph.pickDateTickGranularity=function(a,b,c,d){for(var e=d("pixelsPerLabel"),f=0;f<Dygraph.NUM_GRANULARITIES;f++){var g=Dygraph.numDateTicks(a,b,f);if(c/g>=e)return f}return-1},Dygraph.numDateTicks=function(a,b,c){if(c<Dygraph.MONTHLY){var d=Dygraph.SHORT_SPACINGS[c];return Math.floor(.5+1*(b-a)/d)}var e=Dygraph.LONG_TICK_PLACEMENTS[c],f=31557807360,g=1*(b-a)/f;return Math.floor(.5+1*g*e.months.length/e.year_mod)},Dygraph.getDateAxis=function(a,b,c,d,e){var f,g=d("axisLabelFormatter"),h=[];if(c<Dygraph.MONTHLY){var i=Dygraph.SHORT_SPACINGS[c],j=i/1e3,k=new Date(a);Dygraph.setDateSameTZ(k,{"ms":0});var l;60>=j?(l=k.getSeconds(),Dygraph.setDateSameTZ(k,{"s":l-l%j})):(Dygraph.setDateSameTZ(k,{"s":0}),j/=60,60>=j?(l=k.getMinutes(),Dygraph.setDateSameTZ(k,{"m":l-l%j})):(Dygraph.setDateSameTZ(k,{"m":0}),j/=60,24>=j?(l=k.getHours(),k.setHours(l-l%j)):(k.setHours(0),j/=24,7==j&&k.setDate(k.getDate()-k.getDay())))),a=k.getTime();var m=new Date(a).getTimezoneOffset(),n=i>=Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY];for(f=a;b>=f;f+=i){if(k=new Date(f),n&&k.getTimezoneOffset()!=m){var o=k.getTimezoneOffset()-m;f+=60*o*1e3,k=new Date(f),m=k.getTimezoneOffset(),new Date(f+i).getTimezoneOffset()!=m&&(f+=i,k=new Date(f),m=k.getTimezoneOffset())}h.push({"v":f,"label":g(k,c,d,e)})}}else{var p,q=1;c<Dygraph.NUM_GRANULARITIES?(p=Dygraph.LONG_TICK_PLACEMENTS[c].months,q=Dygraph.LONG_TICK_PLACEMENTS[c].year_mod):Dygraph.warn("Span of dates is too long");for(var r=new Date(a).getFullYear(),s=new Date(b).getFullYear(),t=Dygraph.zeropad,u=r;s>=u;u++)if(u%q===0)for(var v=0;v<p.length;v++){var w=u+"/"+t(1+p[v])+"/01";f=Dygraph.dateStrToMillis(w),a>f||f>b||h.push({"v":f,"label":g(new Date(f),c,d,e)})}}return h},Dygraph&&Dygraph.DEFAULT_ATTRS&&Dygraph.DEFAULT_ATTRS.axes&&Dygraph.DEFAULT_ATTRS.axes.x&&Dygraph.DEFAULT_ATTRS.axes.y&&Dygraph.DEFAULT_ATTRS.axes.y2&&(Dygraph.DEFAULT_ATTRS.axes.x.ticker=Dygraph.dateTicker,Dygraph.DEFAULT_ATTRS.axes.y.ticker=Dygraph.numericTicks,Dygraph.DEFAULT_ATTRS.axes.y2.ticker=Dygraph.numericTicks),Dygraph.Plugins={},Dygraph.Plugins.Annotations=function(){var a=function(){this.annotations_=[]};return a.prototype.toString=function(){return"Annotations Plugin"},a.prototype.activate=function(a){return{"clearChart":this.clearChart,"didDrawChart":this.didDrawChart}},a.prototype.detachLabels=function(){for(var a=0;a<this.annotations_.length;a++){var b=this.annotations_[a];b.parentNode&&b.parentNode.removeChild(b),this.annotations_[a]=null}this.annotations_=[]},a.prototype.clearChart=function(a){this.detachLabels()},a.prototype.didDrawChart=function(a){var b=a.dygraph,c=b.layout_.annotated_points;if(c&&0!==c.length)for(var d=a.canvas.parentNode,e={"position":"absolute","fontSize":b.getOption("axisLabelFontSize")+"px","zIndex":10,"overflow":"hidden"},f=function(a,c,d){return function(e){var f=d.annotation;f.hasOwnProperty(a)?f[a](f,d,b,e):b.getOption(c)&&b.getOption(c)(f,d,b,e)}},g=a.dygraph.plotter_.area,h={},i=0;i<c.length;i++){var j=c[i];if(!(j.canvasx<g.x||j.canvasx>g.x+g.w||j.canvasy<g.y||j.canvasy>g.y+g.h)){var k=j.annotation,l=6;k.hasOwnProperty("tickHeight")&&(l=k.tickHeight);var m=document.createElement("div");for(var n in e)e.hasOwnProperty(n)&&(m.style[n]=e[n]);k.hasOwnProperty("icon")||(m.className="dygraphDefaultAnnotation"),k.hasOwnProperty("cssClass")&&(m.className+=" "+k.cssClass);var o=k.hasOwnProperty("width")?k.width:16,p=k.hasOwnProperty("height")?k.height:16;if(k.hasOwnProperty("icon")){var q=document.createElement("img");q.src=k.icon,q.width=o,q.height=p,m.appendChild(q)}else j.annotation.hasOwnProperty("shortText")&&m.appendChild(document.createTextNode(j.annotation.shortText));var r=j.canvasx-o/2;m.style.left=r+"px";var s=0;if(k.attachAtBottom){var t=g.y+g.h-p-l;h[r]?t-=h[r]:h[r]=0,h[r]+=l+p,s=t}else s=j.canvasy-p-l;m.style.top=s+"px",m.style.width=o+"px",m.style.height=p+"px",m.title=j.annotation.text,m.style.color=b.colorsMap_[j.name],m.style.borderColor=b.colorsMap_[j.name],k.div=m,b.addAndTrackEvent(m,"click",f("clickHandler","annotationClickHandler",j,this)),b.addAndTrackEvent(m,"mouseover",f("mouseOverHandler","annotationMouseOverHandler",j,this)),b.addAndTrackEvent(m,"mouseout",f("mouseOutHandler","annotationMouseOutHandler",j,this)),b.addAndTrackEvent(m,"dblclick",f("dblClickHandler","annotationDblClickHandler",j,this)),d.appendChild(m),this.annotations_.push(m);var u=a.drawingContext;if(u.save(),u.strokeStyle=b.colorsMap_[j.name],u.beginPath(),k.attachAtBottom){var t=s+p;u.moveTo(j.canvasx,t),u.lineTo(j.canvasx,t+l)}else u.moveTo(j.canvasx,j.canvasy),u.lineTo(j.canvasx,j.canvasy-2-l);u.closePath(),u.stroke(),u.restore()}}},a.prototype.destroy=function(){this.detachLabels()},a}(),Dygraph.Plugins.Axes=function(){var a=function(){this.xlabels_=[],this.ylabels_=[]};return a.prototype.toString=function(){return"Axes Plugin"},a.prototype.activate=function(a){return{"layout":this.layout,"clearChart":this.clearChart,"willDrawChart":this.willDrawChart}},a.prototype.layout=function(a){var b=a.dygraph;if(b.getOption("drawYAxis")){var c=b.getOption("yAxisLabelWidth")+2*b.getOption("axisTickSize");a.reserveSpaceLeft(c)}if(b.getOption("drawXAxis")){var d;d=b.getOption("xAxisHeight")?b.getOption("xAxisHeight"):b.getOptionForAxis("axisLabelFontSize","x")+2*b.getOption("axisTickSize"),a.reserveSpaceBottom(d)}if(2==b.numAxes()){if(b.getOption("drawYAxis")){var c=b.getOption("yAxisLabelWidth")+2*b.getOption("axisTickSize");a.reserveSpaceRight(c)}}else b.numAxes()>2&&b.error("Only two y-axes are supported at this time. (Trying to use "+b.numAxes()+")")},a.prototype.detachLabels=function(){function a(a){for(var b=0;b<a.length;b++){var c=a[b];c.parentNode&&c.parentNode.removeChild(c)}}a(this.xlabels_),a(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},a.prototype.clearChart=function(a){this.detachLabels()},a.prototype.willDrawChart=function(a){function b(a){return Math.round(a)+.5}function c(a){return Math.round(a)-.5}var d=a.dygraph;if(d.getOption("drawXAxis")||d.getOption("drawYAxis")){var e,f,g,h,i,j=a.drawingContext,k=a.canvas.parentNode,l=a.canvas.width,m=a.canvas.height,n=function(a){return{"position":"absolute","fontSize":d.getOptionForAxis("axisLabelFontSize",a)+"px","zIndex":10,"color":d.getOptionForAxis("axisLabelColor",a),"width":d.getOption("axisLabelWidth")+"px","lineHeight":"normal","overflow":"hidden"}},o={"x":n("x"),"y":n("y"),"y2":n("y2")},p=function(a,b,c){var d=document.createElement("div"),e=o["y2"==c?"y2":b];for(var f in e)e.hasOwnProperty(f)&&(d.style[f]=e[f]);var g=document.createElement("div");return g.className="dygraph-axis-label dygraph-axis-label-"+b+(c?" dygraph-axis-label-"+c:""),g.innerHTML=a,d.appendChild(g),d};j.save();var q=d.layout_,r=a.dygraph.plotter_.area;if(d.getOption("drawYAxis")){if(q.yticks&&q.yticks.length>0){var s=d.numAxes();for(i=0;i<q.yticks.length;i++){if(h=q.yticks[i],"function"==typeof h)return;f=r.x;var t=1,u="y1";1==h[0]&&(f=r.x+r.w,t=-1,u="y2");var v=d.getOptionForAxis("axisLabelFontSize",u);g=r.y+h[1]*r.h,e=p(h[2],"y",2==s?u:null);var w=g-v/2;0>w&&(w=0),w+v+3>m?e.style.bottom="0px":e.style.top=w+"px",0===h[0]?(e.style.left=r.x-d.getOption("yAxisLabelWidth")-d.getOption("axisTickSize")+"px",e.style.textAlign="right"):1==h[0]&&(e.style.left=r.x+r.w+d.getOption("axisTickSize")+"px",e.style.textAlign="left"),e.style.width=d.getOption("yAxisLabelWidth")+"px",k.appendChild(e),this.ylabels_.push(e)}var x=this.ylabels_[0],v=d.getOptionForAxis("axisLabelFontSize","y"),y=parseInt(x.style.top,10)+v;y>m-v&&(x.style.top=parseInt(x.style.top,10)-v/2+"px")}var z;if(d.getOption("drawAxesAtZero")){var A=d.toPercentXCoord(0);(A>1||0>A||isNaN(A))&&(A=0),z=b(r.x+A*r.w)}else z=b(r.x);j.strokeStyle=d.getOptionForAxis("axisLineColor","y"),j.lineWidth=d.getOptionForAxis("axisLineWidth","y"),j.beginPath(),j.moveTo(z,c(r.y)),j.lineTo(z,c(r.y+r.h)),j.closePath(),j.stroke(),2==d.numAxes()&&(j.strokeStyle=d.getOptionForAxis("axisLineColor","y2"),j.lineWidth=d.getOptionForAxis("axisLineWidth","y2"),j.beginPath(),j.moveTo(c(r.x+r.w),c(r.y)),j.lineTo(c(r.x+r.w),c(r.y+r.h)),j.closePath(),j.stroke())}if(d.getOption("drawXAxis")){if(q.xticks)for(i=0;i<q.xticks.length;i++){h=q.xticks[i],f=r.x+h[0]*r.w,g=r.y+r.h,e=p(h[1],"x"),e.style.textAlign="center",e.style.top=g+d.getOption("axisTickSize")+"px";var B=f-d.getOption("axisLabelWidth")/2;B+d.getOption("axisLabelWidth")>l&&(B=l-d.getOption("xAxisLabelWidth"),e.style.textAlign="right"),0>B&&(B=0,e.style.textAlign="left"),e.style.left=B+"px",e.style.width=d.getOption("xAxisLabelWidth")+"px",k.appendChild(e),this.xlabels_.push(e)}j.strokeStyle=d.getOptionForAxis("axisLineColor","x"),j.lineWidth=d.getOptionForAxis("axisLineWidth","x"),j.beginPath();var C;if(d.getOption("drawAxesAtZero")){var A=d.toPercentYCoord(0,0);(A>1||0>A)&&(A=1),C=c(r.y+A*r.h)}else C=c(r.y+r.h);j.moveTo(b(r.x),C),j.lineTo(b(r.x+r.w),C),j.closePath(),j.stroke()}j.restore()}},a}(),Dygraph.Plugins.ChartLabels=function(){var a=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};a.prototype.toString=function(){return"ChartLabels Plugin"},a.prototype.activate=function(a){return{"layout":this.layout,"didDrawChart":this.didDrawChart}};var b=function(a){var b=document.createElement("div");return b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=a.w+"px",b.style.height=a.h+"px",b};a.prototype.detachLabels_=function(){for(var a=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],b=0;b<a.length;b++){var c=a[b];c&&c.parentNode&&c.parentNode.removeChild(c)}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var c=function(a,b,c,d,e){var f=document.createElement("div");f.style.position="absolute",1==c?f.style.left="0px":f.style.left=b.x+"px",f.style.top=b.y+"px",f.style.width=b.w+"px",f.style.height=b.h+"px",f.style.fontSize=a.getOption("yLabelWidth")-2+"px";var g=document.createElement("div");g.style.position="absolute",g.style.width=b.h+"px",g.style.height=b.w+"px",g.style.top=b.h/2-b.w/2+"px",g.style.left=b.w/2-b.h/2+"px",g.style.textAlign="center";var h="rotate("+(1==c?"-":"")+"90deg)";g.style.transform=h,g.style.WebkitTransform=h,g.style.MozTransform=h,g.style.OTransform=h,g.style.msTransform=h,"undefined"!=typeof document.documentMode&&document.documentMode<9&&(g.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+(1==c?"3":"1")+")",g.style.left="0px",g.style.top="0px");var i=document.createElement("div");return i.className=d,i.innerHTML=e,g.appendChild(i),f.appendChild(g),f};return a.prototype.layout=function(a){this.detachLabels_();var d=a.dygraph,e=a.chart_div;if(d.getOption("title")){var f=a.reserveSpaceTop(d.getOption("titleHeight"));this.title_div_=b(f),this.title_div_.style.textAlign="center",this.title_div_.style.fontSize=d.getOption("titleHeight")-8+"px",this.title_div_.style.fontWeight="bold",this.title_div_.style.zIndex=10;var g=document.createElement("div");g.className="dygraph-label dygraph-title",g.innerHTML=d.getOption("title"),this.title_div_.appendChild(g),e.appendChild(this.title_div_)}if(d.getOption("xlabel")){var h=a.reserveSpaceBottom(d.getOption("xLabelHeight"));this.xlabel_div_=b(h),this.xlabel_div_.style.textAlign="center",this.xlabel_div_.style.fontSize=d.getOption("xLabelHeight")-2+"px";var g=document.createElement("div");g.className="dygraph-label dygraph-xlabel",g.innerHTML=d.getOption("xlabel"),this.xlabel_div_.appendChild(g),e.appendChild(this.xlabel_div_)}if(d.getOption("ylabel")){var i=a.reserveSpaceLeft(0);this.ylabel_div_=c(d,i,1,"dygraph-label dygraph-ylabel",d.getOption("ylabel")),e.appendChild(this.ylabel_div_)}if(d.getOption("y2label")&&2==d.numAxes()){var j=a.reserveSpaceRight(0);this.y2label_div_=c(d,j,2,"dygraph-label dygraph-y2label",d.getOption("y2label")),e.appendChild(this.y2label_div_)}},a.prototype.didDrawChart=function(a){var b=a.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=b.getOption("title")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=b.getOption("xlabel")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=b.getOption("ylabel")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=b.getOption("y2label"))},a.prototype.clearChart=function(){},a.prototype.destroy=function(){this.detachLabels_()},a}(),Dygraph.Plugins.Grid=function(){var a=function(){};return a.prototype.toString=function(){return"Gridline Plugin"},a.prototype.activate=function(a){return{"willDrawChart":this.willDrawChart}},a.prototype.willDrawChart=function(a){function b(a){return Math.round(a)+.5}function c(a){return Math.round(a)-.5}var d,e,f,g,h=a.dygraph,i=a.drawingContext,j=h.layout_,k=a.dygraph.plotter_.area;if(h.getOption("drawYGrid")){for(var l=["y","y2"],m=[],n=[],o=[],p=[],q=[],f=0;f<l.length;f++)o[f]=h.getOptionForAxis("drawGrid",l[f]),o[f]&&(m[f]=h.getOptionForAxis("gridLineColor",l[f]),n[f]=h.getOptionForAxis("gridLineWidth",l[f]),q[f]=h.getOptionForAxis("gridLinePattern",l[f]),p[f]=q[f]&&q[f].length>=2);for(g=j.yticks,i.save(),f=0;f<g.length;f++){var r=g[f][0];o[r]&&(p[r]&&i.installPattern(q[r]),i.strokeStyle=m[r],i.lineWidth=n[r],d=b(k.x),e=c(k.y+g[f][1]*k.h),i.beginPath(),i.moveTo(d,e),i.lineTo(d+k.w,e),i.closePath(),i.stroke(),p[r]&&i.uninstallPattern())}i.restore()}if(h.getOption("drawXGrid")&&h.getOptionForAxis("drawGrid","x")){g=j.xticks,i.save();var q=h.getOptionForAxis("gridLinePattern","x"),p=q&&q.length>=2;for(p&&i.installPattern(q),i.strokeStyle=h.getOptionForAxis("gridLineColor","x"),i.lineWidth=h.getOptionForAxis("gridLineWidth","x"),f=0;f<g.length;f++)d=b(k.x+g[f][0]*k.w),e=c(k.y+k.h),i.beginPath(),i.moveTo(d,e),i.lineTo(d,k.y),i.closePath(),i.stroke();p&&i.uninstallPattern(),i.restore()}},a.prototype.destroy=function(){},a}(),Dygraph.Plugins.Legend=function(){var a=function(){this.legend_div_=null,this.is_generated_div_=!1};a.prototype.toString=function(){return"Legend Plugin"};var b,c;a.prototype.activate=function(a){var b,c=a.getOption("labelsDivWidth"),d=a.getOption("labelsDiv");if(d&&null!==d)b="string"==typeof d||d instanceof String?document.getElementById(d):d;else{var e={"position":"absolute","fontSize":"14px","zIndex":10,"width":c+"px","top":"0px","left":a.size().width-c-2+"px","background":"white","lineHeight":"normal","textAlign":"left","overflow":"hidden"};Dygraph.update(e,a.getOption("labelsDivStyles")),b=document.createElement("div"),b.className="dygraph-legend";for(var f in e)if(e.hasOwnProperty(f))try{b.style[f]=e[f]}catch(g){this.warn("You are using unsupported css properties for your browser in labelsDivStyles")}a.graphDiv.appendChild(b),this.is_generated_div_=!0}return this.legend_div_=b,this.one_em_width_=10,{"select":this.select,"deselect":this.deselect,"predraw":this.predraw,"didDrawChart":this.didDrawChart}};var d=function(a){var b=document.createElement("span");b.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),a.appendChild(b);var c=b.offsetWidth;return a.removeChild(b),c};return a.prototype.select=function(a){var c=a.selectedX,d=a.selectedPoints,e=b(a.dygraph,c,d,this.one_em_width_);this.legend_div_.innerHTML=e},a.prototype.deselect=function(a){var c=d(this.legend_div_);this.one_em_width_=c;var e=b(a.dygraph,void 0,void 0,c);this.legend_div_.innerHTML=e},a.prototype.didDrawChart=function(a){this.deselect(a)},a.prototype.predraw=function(a){if(this.is_generated_div_){a.dygraph.graphDiv.appendChild(this.legend_div_);var b=a.dygraph.plotter_.area,c=a.dygraph.getOption("labelsDivWidth");this.legend_div_.style.left=b.x+b.w-c-1+"px",this.legend_div_.style.top=b.y+"px",this.legend_div_.style.width=c+"px"}},a.prototype.destroy=function(){this.legend_div_=null},b=function(a,b,d,e){if(a.getOption("showLabelsOnHighlight")!==!0)return"";var f,g,h,i,j,k=a.getLabels();if("undefined"==typeof b){if("always"!=a.getOption("legend"))return"";for(g=a.getOption("labelsSeparateLines"),f="",h=1;h<k.length;h++){var l=a.getPropertiesForSeries(k[h]);l.visible&&(""!==f&&(f+=g?"<br/>":" "),j=a.getOption("strokePattern",k[h]),i=c(j,l.color,e),f+="<span style='font-weight: bold; color: "+l.color+";'>"+i+" "+k[h]+"</span>")}return f}var m=a.optionsViewForAxis_("x"),n=m("valueFormatter");f=n(b,m,k[0],a),""!==f&&(f+=":");var o=[],p=a.numAxes();for(h=0;p>h;h++)o[h]=a.optionsViewForAxis_("y"+(h?1+h:""));var q=a.getOption("labelsShowZeroValues");g=a.getOption("labelsSeparateLines");var r=a.getHighlightSeries();for(h=0;h<d.length;h++){var s=d[h];if((0!==s.yval||q)&&Dygraph.isOK(s.canvasy)){g&&(f+="<br/>");var l=a.getPropertiesForSeries(s.name),t=o[l.axis-1],u=t("valueFormatter"),v=u(s.yval,t,s.name,a),w=s.name==r?" class='highlight'":"";f+="<span"+w+"> <b><span style='color: "+l.color+";'>"+s.name+"</span></b>: "+v+"</span>"}}return f},c=function(a,b,c){var d=/MSIE/.test(navigator.userAgent)&&!window.opera;if(d)return"—";if(!a||a.length<=1)return'<div style="display: inline-block; position: relative; bottom: .5ex; padding-left: 1em; height: 1px; border-bottom: 2px solid '+b+';"></div>';var e,f,g,h,i,j=0,k=0,l=[];for(e=0;e<=a.length;e++)j+=a[e%a.length];if(i=Math.floor(c/(j-a[0])),i>1){for(e=0;e<a.length;e++)l[e]=a[e]/c;k=l.length}else{for(i=1,e=0;e<a.length;e++)l[e]=a[e]/j;k=l.length+1}var m="";for(f=0;i>f;f++)for(e=0;k>e;e+=2)g=l[e%l.length],h=e<a.length?l[(e+1)%l.length]:0,m+='<div style="display: inline-block; position: relative; bottom: .5ex; margin-right: '+h+"em; padding-left: "+g+"em; height: 1px; border-bottom: 2px solid "+b+';"></div>';return m},a}(),Dygraph.Plugins.RangeSelector=function(){var a=function(){this.isIE_=/MSIE/.test(navigator.userAgent)&&!window.opera,this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};return a.prototype.toString=function(){return"RangeSelector Plugin"},a.prototype.activate=function(a){return this.dygraph_=a,this.isUsingExcanvas_=a.isUsingExcanvas_,this.getOption_("showRangeSelector")&&this.createInterface_(),{"layout":this.reserveSpace_,"predraw":this.renderStaticLayer_,"didDrawChart":this.renderInteractiveLayer_}},a.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null,this.iePanOverlay_=null},a.prototype.getOption_=function(a){return this.dygraph_.getOption(a)},a.prototype.setDefaultOption_=function(a,b){return this.dygraph_.attrs_[a]=b},a.prototype.createInterface_=function(){this.createCanvases_(),this.isUsingExcanvas_&&this.createIEPanOverlay_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(this.dygraph_.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({"animatedZooms":!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},a.prototype.addToGraph_=function(){var a=this.graphDiv_=this.dygraph_.graphDiv;a.appendChild(this.bgcanvas_),a.appendChild(this.fgcanvas_),a.appendChild(this.leftZoomHandle_),a.appendChild(this.rightZoomHandle_)},a.prototype.removeFromGraph_=function(){var a=this.graphDiv_;a.removeChild(this.bgcanvas_),a.removeChild(this.fgcanvas_),a.removeChild(this.leftZoomHandle_),a.removeChild(this.rightZoomHandle_),this.graphDiv_=null},a.prototype.reserveSpace_=function(a){this.getOption_("showRangeSelector")&&a.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},a.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},a.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},a.prototype.updateVisibility_=function(){var a=this.getOption_("showRangeSelector");if(a)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var b=this.dygraph_;setTimeout(function(){b.width_=0,b.resize()},1)}return a},a.prototype.resize_=function(){function a(a,b){a.style.top=b.y+"px",a.style.left=b.x+"px",a.width=b.w,a.height=b.h,a.style.width=a.width+"px",a.style.height=a.height+"px"}var b=this.dygraph_.layout_.getPlotArea(),c=0;this.getOption_("drawXAxis")&&(c=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={"x":b.x,"y":b.y+b.h+c+4,"w":b.w,"h":this.getOption_("rangeSelectorHeight")},a(this.bgcanvas_,this.canvasRect_),a(this.fgcanvas_,this.canvasRect_)},a.prototype.createCanvases_=function(){this.bgcanvas_=Dygraph.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=Dygraph.getContext(this.bgcanvas_),this.fgcanvas_=Dygraph.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=Dygraph.getContext(this.fgcanvas_)},a.prototype.createIEPanOverlay_=function(){this.iePanOverlay_=document.createElement("div"),this.iePanOverlay_.style.position="absolute",this.iePanOverlay_.style.backgroundColor="white",this.iePanOverlay_.style.filter="alpha(opacity=0)",this.iePanOverlay_.style.display="none",this.iePanOverlay_.style.cursor="move",this.fgcanvas_.appendChild(this.iePanOverlay_)},a.prototype.createZoomHandles_=function(){var a=new Image;a.className="dygraph-rangesel-zoomhandle",a.style.position="absolute",a.style.zIndex=10,a.style.visibility="hidden",a.style.cursor="col-resize",/MSIE 7/.test(navigator.userAgent)?(a.width=7,a.height=14,a.style.backgroundColor="white",a.style.border="1px solid #333333"):(a.width=9,a.height=16,a.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII="),this.isMobileDevice_&&(a.width*=2,a.height*=2),this.leftZoomHandle_=a,this.rightZoomHandle_=a.cloneNode(!1)},a.prototype.initInteraction_=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o=this,p=this.isIE_?document:window,q=0,r=null,s=!1,t=!1,u=!this.isMobileDevice_&&!this.isUsingExcanvas_,v=new Dygraph.IFrameTarp;a=function(a){var b=o.dygraph_.xAxisExtremes(),c=(b[1]-b[0])/o.canvasRect_.w,d=b[0]+(a.leftHandlePos-o.canvasRect_.x)*c,e=b[0]+(a.rightHandlePos-o.canvasRect_.x)*c;return[d,e]},b=function(a){return Dygraph.cancelEvent(a),s=!0,q=a.clientX,r=a.target?a.target:a.srcElement,("mousedown"===a.type||"dragstart"===a.type)&&(Dygraph.addEvent(p,"mousemove",c),Dygraph.addEvent(p,"mouseup",d)),o.fgcanvas_.style.cursor="col-resize",v.cover(),!0},c=function(a){if(!s)return!1;Dygraph.cancelEvent(a);var b=a.clientX-q;if(Math.abs(b)<4)return!0;q=a.clientX;var c,d=o.getZoomHandleStatus_();r==o.leftZoomHandle_?(c=d.leftHandlePos+b,c=Math.min(c,d.rightHandlePos-r.width-3),c=Math.max(c,o.canvasRect_.x)):(c=d.rightHandlePos+b,c=Math.min(c,o.canvasRect_.x+o.canvasRect_.w),c=Math.max(c,d.leftHandlePos+r.width+3));var f=r.width/2;return r.style.left=c-f+"px",o.drawInteractiveLayer_(),u&&e(),!0},d=function(a){return s?(s=!1,v.uncover(),Dygraph.removeEvent(p,"mousemove",c),Dygraph.removeEvent(p,"mouseup",d),o.fgcanvas_.style.cursor="default",u||e(),!0):!1},e=function(){try{var b=o.getZoomHandleStatus_();if(o.isChangingRange_=!0,b.isZoomed){var c=a(b);o.dygraph_.doZoomXDates_(c[0],c[1])}else o.dygraph_.resetZoom()}finally{o.isChangingRange_=!1}},f=function(a){if(o.isUsingExcanvas_)return a.srcElement==o.iePanOverlay_;var b=o.leftZoomHandle_.getBoundingClientRect(),c=b.left+b.width/2;b=o.rightZoomHandle_.getBoundingClientRect();var d=b.left+b.width/2;return a.clientX>c&&a.clientX<d},g=function(a){return!t&&f(a)&&o.getZoomHandleStatus_().isZoomed?(Dygraph.cancelEvent(a),t=!0,q=a.clientX,"mousedown"===a.type&&(Dygraph.addEvent(p,"mousemove",h),Dygraph.addEvent(p,"mouseup",i)),!0):!1},h=function(a){if(!t)return!1;Dygraph.cancelEvent(a);var b=a.clientX-q;if(Math.abs(b)<4)return!0;q=a.clientX;var c=o.getZoomHandleStatus_(),d=c.leftHandlePos,e=c.rightHandlePos,f=e-d;d+b<=o.canvasRect_.x?(d=o.canvasRect_.x,e=d+f):e+b>=o.canvasRect_.x+o.canvasRect_.w?(e=o.canvasRect_.x+o.canvasRect_.w,d=e-f):(d+=b,e+=b);var g=o.leftZoomHandle_.width/2;return o.leftZoomHandle_.style.left=d-g+"px",o.rightZoomHandle_.style.left=e-g+"px",o.drawInteractiveLayer_(),u&&j(),!0},i=function(a){return t?(t=!1,Dygraph.removeEvent(p,"mousemove",h),Dygraph.removeEvent(p,"mouseup",i),u||j(),!0):!1},j=function(){try{o.isChangingRange_=!0,o.dygraph_.dateWindow_=a(o.getZoomHandleStatus_()),o.dygraph_.drawGraph_(!1)}finally{o.isChangingRange_=!1}},k=function(a){if(!s&&!t){var b=f(a)?"move":"default";b!=o.fgcanvas_.style.cursor&&(o.fgcanvas_.style.cursor=b)}},l=function(a){"touchstart"==a.type&&1==a.targetTouches.length?b(a.targetTouches[0])&&Dygraph.cancelEvent(a):"touchmove"==a.type&&1==a.targetTouches.length?c(a.targetTouches[0])&&Dygraph.cancelEvent(a):d(a)},m=function(a){"touchstart"==a.type&&1==a.targetTouches.length?g(a.targetTouches[0])&&Dygraph.cancelEvent(a):"touchmove"==a.type&&1==a.targetTouches.length?h(a.targetTouches[0])&&Dygraph.cancelEvent(a):i(a)},n=function(a,b){for(var c=["touchstart","touchend","touchmove","touchcancel"],d=0;d<c.length;d++)o.dygraph_.addAndTrackEvent(a,c[d],b)},this.setDefaultOption_("interactionModel",Dygraph.Interaction.dragIsPanInteractionModel),this.setDefaultOption_("panEdgeFraction",1e-4);var w=window.opera?"mousedown":"dragstart";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,w,b),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,w,b),this.isUsingExcanvas_?this.dygraph_.addAndTrackEvent(this.iePanOverlay_,"mousedown",g):(this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousedown",g),this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousemove",k)),this.hasTouchInterface_&&(n(this.leftZoomHandle_,l),n(this.rightZoomHandle_,l),n(this.fgcanvas_,m))},a.prototype.drawStaticLayer_=function(){var a=this.bgcanvas_ctx_;a.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(b){Dygraph.warn(b)}var c=.5;this.bgcanvas_ctx_.lineWidth=1,a.strokeStyle="gray",a.beginPath(),a.moveTo(c,c),a.lineTo(c,this.canvasRect_.h-c),a.lineTo(this.canvasRect_.w-c,this.canvasRect_.h-c),a.lineTo(this.canvasRect_.w-c,c),a.stroke()},a.prototype.drawMiniPlot_=function(){var a=this.getOption_("rangeSelectorPlotFillColor"),b=this.getOption_("rangeSelectorPlotStrokeColor");if(a||b){var c=this.getOption_("stepPlot"),d=this.computeCombinedSeriesAndLimits_(),e=d.yMax-d.yMin,f=this.bgcanvas_ctx_,g=.5,h=this.dygraph_.xAxisExtremes(),i=Math.max(h[1]-h[0],1e-30),j=(this.canvasRect_.w-g)/i,k=(this.canvasRect_.h-g)/e,l=this.canvasRect_.w-g,m=this.canvasRect_.h-g,n=null,o=null;f.beginPath(),f.moveTo(g,m);for(var p=0;p<d.data.length;p++){var q=d.data[p],r=null!==q[0]?(q[0]-h[0])*j:NaN,s=null!==q[1]?m-(q[1]-d.yMin)*k:NaN;isFinite(r)&&isFinite(s)?(null===n?f.lineTo(r,m):c&&f.lineTo(r,o),f.lineTo(r,s),n=r,o=s):(null!==n&&(c?(f.lineTo(r,o),f.lineTo(r,m)):f.lineTo(n,m)),n=o=null)}if(f.lineTo(l,m),f.closePath(),a){var t=this.bgcanvas_ctx_.createLinearGradient(0,0,0,m);t.addColorStop(0,"white"),t.addColorStop(1,a),this.bgcanvas_ctx_.fillStyle=t,f.fill()}b&&(this.bgcanvas_ctx_.strokeStyle=b,this.bgcanvas_ctx_.lineWidth=1.5,f.stroke())}},a.prototype.computeCombinedSeriesAndLimits_=function(){var a,b,c,d,e,f,g,h,i=this.dygraph_.rawData_,j=this.getOption_("logscale"),k=[];for(d=0;d<i.length;d++)if(i[d].length>1&&null!==i[d][1]){if(c="number"!=typeof i[d][1])for(a=[],b=[],f=0;f<i[d][1].length;f++)a.push(0),b.push(0);break}for(d=0;d<i.length;d++){var l=i[d];if(g=l[0],c)for(f=0;f<a.length;f++)a[f]=b[f]=0;else a=b=0;for(e=1;e<l.length;e++)if(this.dygraph_.visibility()[e-1]){var m;if(c)for(f=0;f<a.length;f++)m=l[e][f],null===m||isNaN(m)||(a[f]+=m,b[f]++);else{if(m=l[e],null===m||isNaN(m))continue;a+=m,b++}}if(c){for(f=0;f<a.length;f++)a[f]/=b[f];h=a.slice(0)}else h=a/b;k.push([g,h])}if(k=this.dygraph_.rollingAverage(k,this.dygraph_.rollPeriod_),"number"!=typeof k[0][1])for(d=0;d<k.length;d++)h=k[d][1],
k[d][1]=h[0];var n=Number.MAX_VALUE,o=-Number.MAX_VALUE;for(d=0;d<k.length;d++)h=k[d][1],null!==h&&isFinite(h)&&(!j||h>0)&&(n=Math.min(n,h),o=Math.max(o,h));var p=.25;if(j)for(o=Dygraph.log10(o),o+=o*p,n=Dygraph.log10(n),d=0;d<k.length;d++)k[d][1]=Dygraph.log10(k[d][1]);else{var q,r=o-n;q=r<=Number.MIN_VALUE?o*p:r*p,o+=q,n-=q}return{"data":k,"yMin":n,"yMax":o}},a.prototype.placeZoomHandles_=function(){var a=this.dygraph_.xAxisExtremes(),b=this.dygraph_.xAxisRange(),c=a[1]-a[0],d=Math.max(0,(b[0]-a[0])/c),e=Math.max(0,(a[1]-b[1])/c),f=this.canvasRect_.x+this.canvasRect_.w*d,g=this.canvasRect_.x+this.canvasRect_.w*(1-e),h=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),i=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=f-i+"px",this.leftZoomHandle_.style.top=h+"px",this.rightZoomHandle_.style.left=g-i+"px",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility="visible",this.rightZoomHandle_.style.visibility="visible"},a.prototype.drawInteractiveLayer_=function(){var a=this.fgcanvas_ctx_;a.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var b=1,c=this.canvasRect_.w-b,d=this.canvasRect_.h-b,e=this.getZoomHandleStatus_();if(a.strokeStyle="black",e.isZoomed){var f=Math.max(b,e.leftHandlePos-this.canvasRect_.x),g=Math.min(c,e.rightHandlePos-this.canvasRect_.x);a.fillStyle="rgba(240, 240, 240, 0.6)",a.fillRect(0,0,f,this.canvasRect_.h),a.fillRect(g,0,this.canvasRect_.w-g,this.canvasRect_.h),a.beginPath(),a.moveTo(b,b),a.lineTo(f,b),a.lineTo(f,d),a.lineTo(g,d),a.lineTo(g,b),a.lineTo(c,b),a.stroke(),this.isUsingExcanvas_&&(this.iePanOverlay_.style.width=g-f+"px",this.iePanOverlay_.style.left=f+"px",this.iePanOverlay_.style.height=d+"px",this.iePanOverlay_.style.display="inline")}else a.beginPath(),a.moveTo(b,b),a.lineTo(b,d),a.lineTo(c,d),a.lineTo(c,b),a.stroke(),this.iePanOverlay_&&(this.iePanOverlay_.style.display="none")},a.prototype.getZoomHandleStatus_=function(){var a=this.leftZoomHandle_.width/2,b=parseFloat(this.leftZoomHandle_.style.left)+a,c=parseFloat(this.rightZoomHandle_.style.left)+a;return{"leftHandlePos":b,"rightHandlePos":c,"isZoomed":b-1>this.canvasRect_.x||c+1<this.canvasRect_.x+this.canvasRect_.w}},a}(),Dygraph.PLUGINS.push(Dygraph.Plugins.Legend,Dygraph.Plugins.Axes,Dygraph.Plugins.RangeSelector,Dygraph.Plugins.ChartLabels,Dygraph.Plugins.Annotations,Dygraph.Plugins.Grid);
/*!
* Chart.js
* http://chartjs.org/
* Version: 1.0.2
*
* Copyright 2015 Nick Downie
* Released under the MIT license
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
*/
(function(){"use strict";var a=this,b=a.Chart,c=function(a){this.canvas=a.canvas,this.ctx=a;var b=function(a,b){return a["offset"+b]?a["offset"+b]:document.defaultView.getComputedStyle(a).getPropertyValue(b)},c=this.width=b(a.canvas,"Width"),e=this.height=b(a.canvas,"Height");a.canvas.width=c,a.canvas.height=e;var c=this.width=a.canvas.width,e=this.height=a.canvas.height;return this.aspectRatio=this.width/this.height,d.retinaScale(this),this};c.defaults={"global":{"animation":!0,"animationSteps":60,"animationEasing":"easeOutQuart","showScale":!0,"scaleOverride":!1,"scaleSteps":null,"scaleStepWidth":null,"scaleStartValue":null,"scaleLineColor":"rgba(0,0,0,.1)","scaleLineWidth":1,"scaleShowLabels":!0,"scaleLabel":"<%=value%>","scaleIntegersOnly":!0,"scaleBeginAtZero":!1,"scaleFontFamily":"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif","scaleFontSize":12,"scaleFontStyle":"normal","scaleFontColor":"#666","responsive":!1,"maintainAspectRatio":!0,"showTooltips":!0,"customTooltips":!1,"tooltipEvents":["mousemove","touchstart","touchmove","mouseout"],"tooltipFillColor":"rgba(0,0,0,0.8)","tooltipFontFamily":"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif","tooltipFontSize":14,"tooltipFontStyle":"normal","tooltipFontColor":"#fff","tooltipTitleFontFamily":"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif","tooltipTitleFontSize":14,"tooltipTitleFontStyle":"bold","tooltipTitleFontColor":"#fff","tooltipYPadding":6,"tooltipXPadding":6,"tooltipCaretSize":8,"tooltipCornerRadius":6,"tooltipXOffset":10,"tooltipTemplate":"<%if (label){%><%=label%>: <%}%><%= value %>","multiTooltipTemplate":"<%= value %>","multiTooltipKeyBackground":"#fff","onAnimationProgress":function(){},"onAnimationComplete":function(){}}},c.types={};var d=c.helpers={},e=d.each=function(a,b,c){var d=Array.prototype.slice.call(arguments,3);if(a)if(a.length===+a.length){var e;for(e=0;e<a.length;e++)b.apply(c,[a[e],e].concat(d))}else for(var f in a)b.apply(c,[a[f],f].concat(d))},f=d.clone=function(a){var b={};return e(a,function(c,d){a.hasOwnProperty(d)&&(b[d]=c)}),b},g=d.extend=function(a){return e(Array.prototype.slice.call(arguments,1),function(b){e(b,function(c,d){b.hasOwnProperty(d)&&(a[d]=c)})}),a},h=d.merge=function(a,b){var c=Array.prototype.slice.call(arguments,0);return c.unshift({}),g.apply(null,c)},i=d.indexOf=function(a,b){if(Array.prototype.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},j=(d.where=function(a,b){var c=[];return d.each(a,function(a){b(a)&&c.push(a)}),c},d.findNextWhere=function(a,b,c){c||(c=-1);for(var d=c+1;d<a.length;d++){var e=a[d];if(b(e))return e}},d.findPreviousWhere=function(a,b,c){c||(c=a.length);for(var d=c-1;d>=0;d--){var e=a[d];if(b(e))return e}},d.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=j,a&&g(c.prototype,a),c.__super__=b.prototype,c}),k=d.noop=function(){},l=d.uid=function(){var a=0;return function(){return"chart-"+a++}}(),m=d.warn=function(a){window.console&&"function"==typeof window.console.warn&&console.warn(a)},n=d.amd="function"==typeof define&&define.amd,o=d.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},p=d.max=function(a){return Math.max.apply(Math,a)},q=d.min=function(a){return Math.min.apply(Math,a)},r=(d.cap=function(a,b,c){if(o(b)){if(a>b)return b}else if(o(c)&&c>a)return c;return a},d.getDecimalPlaces=function(a){return a%1!==0&&o(a)?a.toString().split(".")[1].length:0}),s=d.radians=function(a){return a*(Math.PI/180)},t=(d.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=2*Math.PI+Math.atan2(d,c);return 0>c&&0>d&&(f+=2*Math.PI),{"angle":f,"distance":e}},d.aliasPixel=function(a){return a%2===0?0:.5}),u=(d.splineCurve=function(a,b,c,d){var e=Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2)),f=Math.sqrt(Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2)),g=d*e/(e+f),h=d*f/(e+f);return{"inner":{"x":b.x-g*(c.x-a.x),"y":b.y-g*(c.y-a.y)},"outer":{"x":b.x+h*(c.x-a.x),"y":b.y+h*(c.y-a.y)}}},d.calculateOrderOfMagnitude=function(a){return Math.floor(Math.log(a)/Math.LN10)}),v=(d.calculateScaleRange=function(a,b,c,d,e){var f=2,g=Math.floor(b/(1.5*c)),h=f>=g,i=p(a),j=q(a);i===j&&(i+=.5,j>=.5&&!d?j-=.5:i+=.5);for(var k=Math.abs(i-j),l=u(k),m=Math.ceil(i/(1*Math.pow(10,l)))*Math.pow(10,l),n=d?0:Math.floor(j/(1*Math.pow(10,l)))*Math.pow(10,l),o=m-n,r=Math.pow(10,l),s=Math.round(o/r);(s>g||g>2*s)&&!h;)if(s>g)r*=2,s=Math.round(o/r),s%1!==0&&(h=!0);else if(e&&l>=0){if(r/2%1!==0)break;r/=2,s=Math.round(o/r)}else r/=2,s=Math.round(o/r);return h&&(s=f,r=o/s),{"steps":s,"stepValue":r,"min":n,"max":n+s*r}},d.template=function(a,b){function c(a,b){var c=/\W/.test(a)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):d[a]=d[a];return b?c(b):c}if(a instanceof Function)return a(b);var d={};return c(a,b)}),w=(d.generateLabels=function(a,b,c,d){var f=new Array(b);return labelTemplateString&&e(f,function(b,e){f[e]=v(a,{"value":c+d*(e+1)})}),f},d.easingEffects={"linear":function(a){return a},"easeInQuad":function(a){return a*a},"easeOutQuad":function(a){return-1*a*(a-2)},"easeInOutQuad":function(a){return(a/=.5)<1?.5*a*a:-0.5*(--a*(a-2)-1)},"easeInCubic":function(a){return a*a*a},"easeOutCubic":function(a){return 1*((a=a/1-1)*a*a+1)},"easeInOutCubic":function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},"easeInQuart":function(a){return a*a*a*a},"easeOutQuart":function(a){return-1*((a=a/1-1)*a*a*a-1)},"easeInOutQuart":function(a){return(a/=.5)<1?.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)},"easeInQuint":function(a){return 1*(a/=1)*a*a*a*a},"easeOutQuint":function(a){return 1*((a=a/1-1)*a*a*a*a+1)},"easeInOutQuint":function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},"easeInSine":function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},"easeOutSine":function(a){return 1*Math.sin(a/1*(Math.PI/2))},"easeInOutSine":function(a){return-0.5*(Math.cos(Math.PI*a/1)-1)},"easeInExpo":function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},"easeOutExpo":function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},"easeInOutExpo":function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},"easeInCirc":function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},"easeOutCirc":function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},"easeInOutCirc":function(a){return(a/=.5)<1?-0.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},"easeInElastic":function(a){var b=1.70158,c=0,d=1;return 0===a?0:1==(a/=1)?1:(c||(c=.3),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),-(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)))},"easeOutElastic":function(a){var b=1.70158,c=0,d=1;return 0===a?0:1==(a/=1)?1:(c||(c=.3),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),d*Math.pow(2,-10*a)*Math.sin((1*a-b)*(2*Math.PI)/c)+1)},"easeInOutElastic":function(a){var b=1.70158,c=0,d=1;return 0===a?0:2==(a/=.5)?1:(c||(c=1*(.3*1.5)),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),1>a?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},"easeInBack":function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},"easeOutBack":function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},"easeInOutBack":function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},"easeInBounce":function(a){return 1-w.easeOutBounce(1-a)},"easeOutBounce":function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},"easeInOutBounce":function(a){return.5>a?.5*w.easeInBounce(2*a):.5*w.easeOutBounce(2*a-1)+.5}}),x=d.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),y=d.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),z=(d.animationLoop=function(a,b,c,d,e,f){var g=0,h=w[c]||w.linear,i=function(){g++;var c=g/b,j=h(c);a.call(f,j,c,g),d.call(f,j,c),b>g?f.animationFrame=x(i):e.apply(f)};x(i)},d.getRelativePosition=function(a){var b,c,d=a.originalEvent||a,e=a.currentTarget||a.srcElement,f=e.getBoundingClientRect();return d.touches?(b=d.touches[0].clientX-f.left,c=d.touches[0].clientY-f.top):(b=d.clientX-f.left,c=d.clientY-f.top),{"x":b,"y":c}},d.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c}),A=d.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=k},B=(d.bindEvents=function(a,b,c){a.events||(a.events={}),e(b,function(b){a.events[b]=function(){c.apply(a,arguments)},z(a.chart.canvas,b,a.events[b])})},d.unbindEvents=function(a,b){e(b,function(b,c){A(a.chart.canvas,c,b)})}),C=d.getMaximumWidth=function(a){var b=a.parentNode;return b.clientWidth},D=d.getMaximumHeight=function(a){var b=a.parentNode;return b.clientHeight},E=(d.getMaximumSize=d.getMaximumWidth,d.retinaScale=function(a){var b=a.ctx,c=a.canvas.width,d=a.canvas.height;window.devicePixelRatio&&(b.canvas.style.width=c+"px",b.canvas.style.height=d+"px",b.canvas.height=d*window.devicePixelRatio,b.canvas.width=c*window.devicePixelRatio,b.scale(window.devicePixelRatio,window.devicePixelRatio))}),F=d.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},G=d.fontString=function(a,b,c){return b+" "+a+"px "+c},H=d.longestText=function(a,b,c){a.font=b;var d=0;return e(c,function(b){var c=a.measureText(b).width;d=c>d?c:d}),d},I=d.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()};c.instances={},c.Type=function(a,b,d){this.options=b,this.chart=d,this.id=l(),c.instances[this.id]=this,b.responsive&&this.resize(),this.initialize.call(this,a)},g(c.Type.prototype,{"initialize":function(){return this},"clear":function(){return F(this.chart),this},"stop":function(){return y(this.animationFrame),this},"resize":function(a){this.stop();var b=this.chart.canvas,c=C(this.chart.canvas),d=this.options.maintainAspectRatio?c/this.chart.aspectRatio:D(this.chart.canvas);return b.width=this.chart.width=c,b.height=this.chart.height=d,E(this.chart),"function"==typeof a&&a.apply(this,Array.prototype.slice.call(arguments,1)),this},"reflow":k,"render":function(a){return a&&this.reflow(),this.options.animation&&!a?d.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},"generateLegend":function(){return v(this.options.legendTemplate,this)},"destroy":function(){this.clear(),B(this,this.events);var a=this.chart.canvas;a.width=this.chart.width,a.height=this.chart.height,a.style.removeProperty?(a.style.removeProperty("width"),a.style.removeProperty("height")):(a.style.removeAttribute("width"),a.style.removeAttribute("height")),delete c.instances[this.id]},"showTooltip":function(a,b){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var f=function(a){var b=!1;return a.length!==this.activeElements.length?b=!0:(e(a,function(a,c){a!==this.activeElements[c]&&(b=!0)},this),b)}.call(this,a);if(f||b){if(this.activeElements=a,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),a.length>0)if(this.datasets&&this.datasets.length>1){for(var g,h,j=this.datasets.length-1;j>=0&&(g=this.datasets[j].points||this.datasets[j].bars||this.datasets[j].segments,h=i(g,a[0]),-1===h);j--);var k=[],l=[],m=function(a){var b,c,e,f,g,i=[],j=[],m=[];return d.each(this.datasets,function(a){b=a.points||a.bars||a.segments,b[h]&&b[h].hasValue()&&i.push(b[h])}),d.each(i,function(a){j.push(a.x),m.push(a.y),k.push(d.template(this.options.multiTooltipTemplate,a)),l.push({"fill":a._saved.fillColor||a.fillColor,"stroke":a._saved.strokeColor||a.strokeColor})},this),g=q(m),e=p(m),f=q(j),c=p(j),{"x":f>this.chart.width/2?f:c,"y":(g+e)/2}}.call(this,h);new c.MultiTooltip({"x":m.x,"y":m.y,"xPadding":this.options.tooltipXPadding,"yPadding":this.options.tooltipYPadding,"xOffset":this.options.tooltipXOffset,"fillColor":this.options.tooltipFillColor,"textColor":this.options.tooltipFontColor,"fontFamily":this.options.tooltipFontFamily,"fontStyle":this.options.tooltipFontStyle,"fontSize":this.options.tooltipFontSize,"titleTextColor":this.options.tooltipTitleFontColor,"titleFontFamily":this.options.tooltipTitleFontFamily,"titleFontStyle":this.options.tooltipTitleFontStyle,"titleFontSize":this.options.tooltipTitleFontSize,"cornerRadius":this.options.tooltipCornerRadius,"labels":k,"legendColors":l,"legendColorBackground":this.options.multiTooltipKeyBackground,"title":a[0].label,"chart":this.chart,"ctx":this.chart.ctx,"custom":this.options.customTooltips}).draw()}else e(a,function(a){var b=a.tooltipPosition();new c.Tooltip({"x":Math.round(b.x),"y":Math.round(b.y),"xPadding":this.options.tooltipXPadding,"yPadding":this.options.tooltipYPadding,"fillColor":this.options.tooltipFillColor,"textColor":this.options.tooltipFontColor,"fontFamily":this.options.tooltipFontFamily,"fontStyle":this.options.tooltipFontStyle,"fontSize":this.options.tooltipFontSize,"caretHeight":this.options.tooltipCaretSize,"cornerRadius":this.options.tooltipCornerRadius,"text":v(this.options.tooltipTemplate,a),"chart":this.chart,"custom":this.options.customTooltips}).draw()},this);return this}},"toBase64Image":function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),c.Type.extend=function(a){var b=this,d=function(){return b.apply(this,arguments)};if(d.prototype=f(b.prototype),g(d.prototype,a),d.extend=c.Type.extend,a.name||b.prototype.name){var e=a.name||b.prototype.name,i=c.defaults[b.prototype.name]?f(c.defaults[b.prototype.name]):{};c.defaults[e]=g(i,a.defaults),c.types[e]=d,c.prototype[e]=function(a,b){var f=h(c.defaults.global,c.defaults[e],b||{});return new d(a,f,this)}}else m("Name not provided for this chart, so it hasn't been registered");return b},c.Element=function(a){g(this,a),this.initialize.apply(this,arguments),this.save()},g(c.Element.prototype,{"initialize":function(){},"restore":function(a){return a?e(a,function(a){this[a]=this._saved[a]},this):g(this,this._saved),this},"save":function(){return this._saved=f(this),delete this._saved._saved,this},"update":function(a){return e(a,function(a,b){this._saved[b]=this[b],this[b]=a},this),this},"transition":function(a,b){return e(a,function(a,c){this[c]=(a-this._saved[c])*b+this._saved[c]},this),this},"tooltipPosition":function(){return{"x":this.x,"y":this.y}},"hasValue":function(){return o(this.value)}}),c.Element.extend=j,c.Point=c.Element.extend({"display":!0,"inRange":function(a,b){var c=this.hitDetectionRadius+this.radius;return Math.pow(a-this.x,2)+Math.pow(b-this.y,2)<Math.pow(c,2)},"draw":function(){if(this.display){var a=this.ctx;a.beginPath(),a.arc(this.x,this.y,this.radius,0,2*Math.PI),a.closePath(),a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.fillStyle=this.fillColor,a.fill(),a.stroke()}}}),c.Arc=c.Element.extend({"inRange":function(a,b){var c=d.getAngleFromPoint(this,{"x":a,"y":b}),e=c.angle>=this.startAngle&&c.angle<=this.endAngle,f=c.distance>=this.innerRadius&&c.distance<=this.outerRadius;return e&&f},"tooltipPosition":function(){var a=this.startAngle+(this.endAngle-this.startAngle)/2,b=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{"x":this.x+Math.cos(a)*b,"y":this.y+Math.sin(a)*b}},"draw":function(a){var b=this.ctx;b.beginPath(),b.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),b.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),b.closePath(),b.strokeStyle=this.strokeColor,b.lineWidth=this.strokeWidth,b.fillStyle=this.fillColor,b.fill(),b.lineJoin="bevel",this.showStroke&&b.stroke()}}),c.Rectangle=c.Element.extend({"draw":function(){var a=this.ctx,b=this.width/2,c=this.x-b,d=this.x+b,e=this.base-(this.base-this.y),f=this.strokeWidth/2;this.showStroke&&(c+=f,d-=f,e+=f),a.beginPath(),a.fillStyle=this.fillColor,a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.moveTo(c,this.base),a.lineTo(c,e),a.lineTo(d,e),a.lineTo(d,this.base),a.fill(),this.showStroke&&a.stroke()},"height":function(){return this.base-this.y},"inRange":function(a,b){return a>=this.x-this.width/2&&a<=this.x+this.width/2&&b>=this.y&&b<=this.base}}),c.Tooltip=c.Element.extend({"draw":function(){var a=this.chart.ctx;a.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var b=this.caretPadding=2,c=a.measureText(this.text).width+2*this.xPadding,d=this.fontSize+2*this.yPadding,e=d+this.caretHeight+b;this.x+c/2>this.chart.width?this.xAlign="left":this.x-c/2<0&&(this.xAlign="right"),this.y-e<0&&(this.yAlign="below");var f=this.x-c/2,g=this.y-e;if(a.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":a.beginPath(),a.moveTo(this.x,this.y-b),a.lineTo(this.x+this.caretHeight,this.y-(b+this.caretHeight)),a.lineTo(this.x-this.caretHeight,this.y-(b+this.caretHeight)),a.closePath(),a.fill();break;case"below":g=this.y+b+this.caretHeight,a.beginPath(),a.moveTo(this.x,this.y+b),a.lineTo(this.x+this.caretHeight,this.y+b+this.caretHeight),a.lineTo(this.x-this.caretHeight,this.y+b+this.caretHeight),a.closePath(),a.fill()}switch(this.xAlign){case"left":f=this.x-c+(this.cornerRadius+this.caretHeight);break;case"right":f=this.x-(this.cornerRadius+this.caretHeight)}I(a,f,g,c,d,this.cornerRadius),a.fill(),a.fillStyle=this.textColor,a.textAlign="center",a.textBaseline="middle",a.fillText(this.text,f+c/2,g+d/2)}}}),c.MultiTooltip=c.Element.extend({"initialize":function(){this.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=G(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var a=this.ctx.measureText(this.title).width,b=H(this.ctx,this.font,this.labels)+this.fontSize+3,c=p([b,a]);this.width=c+2*this.xPadding;var d=this.height/2;this.y-d<0?this.y=d:this.y+d>this.chart.height&&(this.y=this.chart.height-d),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},"getLineHeight":function(a){var b=this.y-this.height/2+this.yPadding,c=a-1;return 0===a?b+this.titleFontSize/2:b+(1.5*this.fontSize*c+this.fontSize/2)+1.5*this.titleFontSize},"draw":function(){if(this.custom)this.custom(this);else{I(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var a=this.ctx;a.fillStyle=this.fillColor,a.fill(),a.closePath(),a.textAlign="left",a.textBaseline="middle",a.fillStyle=this.titleTextColor,a.font=this.titleFont,a.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),a.font=this.font,d.each(this.labels,function(b,c){a.fillStyle=this.textColor,a.fillText(b,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(c+1)),a.fillStyle=this.legendColorBackground,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize),a.fillStyle=this.legendColors[c].fill,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),c.Scale=c.Element.extend({"initialize":function(){this.fit()},"buildYLabels":function(){this.yLabels=[];for(var a=r(this.stepValue),b=0;b<=this.steps;b++)this.yLabels.push(v(this.templateString,{"value":(this.min+b*this.stepValue).toFixed(a)}));this.yLabelWidth=this.display&&this.showLabels?H(this.ctx,this.font,this.yLabels):0},"addXLabel":function(a){this.xLabels.push(a),this.valuesCount++,this.fit()},"removeXLabel":function(){this.xLabels.shift(),this.valuesCount--,this.fit()},"fit":function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var a,b=this.endPoint-this.startPoint;for(this.calculateYRange(b),this.buildYLabels(),this.calculateXLabelRotation();b>this.endPoint-this.startPoint;)b=this.endPoint-this.startPoint,a=this.yLabelWidth,this.calculateYRange(b),this.buildYLabels(),a<this.yLabelWidth&&this.calculateXLabelRotation()},"calculateXLabelRotation":function(){this.ctx.font=this.font;var a,b,c=this.ctx.measureText(this.xLabels[0]).width,d=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=d/2+3,this.xScalePaddingLeft=c/2>this.yLabelWidth+10?c/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var e,f=H(this.ctx,this.font,this.xLabels);this.xLabelWidth=f;for(var g=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>g&&0===this.xLabelRotation||this.xLabelWidth>g&&this.xLabelRotation<=90&&this.xLabelRotation>0;)e=Math.cos(s(this.xLabelRotation)),a=e*c,b=e*d,a+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=a+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=e*f;this.xLabelRotation>0&&(this.endPoint-=Math.sin(s(this.xLabelRotation))*f+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},"calculateYRange":k,"drawingArea":function(){return this.startPoint-this.endPoint},"calculateY":function(a){var b=this.drawingArea()/(this.min-this.max);return this.endPoint-b*(a-this.min)},"calculateX":function(a){var b=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),c=b/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),d=c*a+this.xScalePaddingLeft;return this.offsetGridLines&&(d+=c/2),Math.round(d)},"update":function(a){d.extend(this,a),this.fit()},"draw":function(){var a=this.ctx,b=(this.endPoint-this.startPoint)/this.steps,c=Math.round(this.xScalePaddingLeft);this.display&&(a.fillStyle=this.textColor,a.font=this.font,e(this.yLabels,function(e,f){var g=this.endPoint-b*f,h=Math.round(g),i=this.showHorizontalLines;a.textAlign="right",a.textBaseline="middle",this.showLabels&&a.fillText(e,c-10,g),0!==f||i||(i=!0),i&&a.beginPath(),f>0?(a.lineWidth=this.gridLineWidth,a.strokeStyle=this.gridLineColor):(a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor),h+=d.aliasPixel(a.lineWidth),i&&(a.moveTo(c,h),a.lineTo(this.width,h),a.stroke(),a.closePath()),a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(c-5,h),a.lineTo(c,h),a.stroke(),a.closePath()},this),e(this.xLabels,function(b,c){var d=this.calculateX(c)+t(this.lineWidth),e=this.calculateX(c-(this.offsetGridLines?.5:0))+t(this.lineWidth),f=this.xLabelRotation>0,g=this.showVerticalLines;0!==c||g||(g=!0),g&&a.beginPath(),c>0?(a.lineWidth=this.gridLineWidth,a.strokeStyle=this.gridLineColor):(a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor),g&&(a.moveTo(e,this.endPoint),a.lineTo(e,this.startPoint-3),a.stroke(),a.closePath()),a.lineWidth=this.lineWidth,a.strokeStyle=this.lineColor,a.beginPath(),a.moveTo(e,this.endPoint),a.lineTo(e,this.endPoint+5),a.stroke(),a.closePath(),a.save(),a.translate(d,f?this.endPoint+12:this.endPoint+8),a.rotate(-1*s(this.xLabelRotation)),a.font=this.font,a.textAlign=f?"right":"center",a.textBaseline=f?"middle":"top",a.fillText(b,0,0),a.restore()},this))}}),c.RadialScale=c.Element.extend({"initialize":function(){this.size=q([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},"calculateCenterOffset":function(a){var b=this.drawingArea/(this.max-this.min);return(a-this.min)*b},"update":function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},"buildYLabels":function(){this.yLabels=[];for(var a=r(this.stepValue),b=0;b<=this.steps;b++)this.yLabels.push(v(this.templateString,{"value":(this.min+b*this.stepValue).toFixed(a)}))},"getCircumference":function(){return 2*Math.PI/this.valuesCount},"setScaleSize":function(){var a,b,c,d,e,f,g,h,i,j,k,l,m=q([this.height/2-this.pointLabelFontSize-5,this.width/2]),n=this.width,p=0;for(this.ctx.font=G(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),b=0;b<this.valuesCount;b++)a=this.getPointPosition(b,m),c=this.ctx.measureText(v(this.templateString,{"value":this.labels[b]})).width+5,0===b||b===this.valuesCount/2?(d=c/2,a.x+d>n&&(n=a.x+d,e=b),a.x-d<p&&(p=a.x-d,g=b)):b<this.valuesCount/2?a.x+c>n&&(n=a.x+c,e=b):b>this.valuesCount/2&&a.x-c<p&&(p=a.x-c,g=b);i=p,j=Math.ceil(n-this.width),f=this.getIndexAngle(e),h=this.getIndexAngle(g),k=j/Math.sin(f+Math.PI/2),l=i/Math.sin(h+Math.PI/2),k=o(k)?k:0,l=o(l)?l:0,this.drawingArea=m-(l+k)/2,this.setCenterPoint(l,k)},"setCenterPoint":function(a,b){var c=this.width-b-this.drawingArea,d=a+this.drawingArea;this.xCenter=(d+c)/2,this.yCenter=this.height/2},"getIndexAngle":function(a){var b=2*Math.PI/this.valuesCount;return a*b-Math.PI/2},"getPointPosition":function(a,b){var c=this.getIndexAngle(a);return{"x":Math.cos(c)*b+this.xCenter,"y":Math.sin(c)*b+this.yCenter}},"draw":function(){if(this.display){var a=this.ctx;if(e(this.yLabels,function(b,c){if(c>0){var d,e=c*(this.drawingArea/this.steps),f=this.yCenter-e;if(this.lineWidth>0)if(a.strokeStyle=this.lineColor,a.lineWidth=this.lineWidth,this.lineArc)a.beginPath(),a.arc(this.xCenter,this.yCenter,e,0,2*Math.PI),a.closePath(),a.stroke();else{a.beginPath();for(var g=0;g<this.valuesCount;g++)d=this.getPointPosition(g,this.calculateCenterOffset(this.min+c*this.stepValue)),0===g?a.moveTo(d.x,d.y):a.lineTo(d.x,d.y);a.closePath(),a.stroke()}if(this.showLabels){if(a.font=G(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=a.measureText(b).width;a.fillStyle=this.backdropColor,a.fillRect(this.xCenter-h/2-this.backdropPaddingX,f-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=this.fontColor,a.fillText(b,this.xCenter,f)}}},this),!this.lineArc){a.lineWidth=this.angleLineWidth,a.strokeStyle=this.angleLineColor;for(var b=this.valuesCount-1;b>=0;b--){if(this.angleLineWidth>0){var c=this.getPointPosition(b,this.calculateCenterOffset(this.max));a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(c.x,c.y),a.stroke(),a.closePath()}var d=this.getPointPosition(b,this.calculateCenterOffset(this.max)+5);a.font=G(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),a.fillStyle=this.pointLabelFontColor;var f=this.labels.length,g=this.labels.length/2,h=g/2,i=h>b||b>f-h,j=b===h||b===f-h;0===b?a.textAlign="center":b===g?a.textAlign="center":g>b?a.textAlign="left":a.textAlign="right",j?a.textBaseline="middle":i?a.textBaseline="bottom":a.textBaseline="top",a.fillText(this.labels[b],d.x,d.y)}}}}}),d.addEvent(window,"resize",function(){var a;return function(){clearTimeout(a),a=setTimeout(function(){e(c.instances,function(a){a.options.responsive&&a.resize(a.render,!0)})},50)}}()),n?define(function(){return c}):"object"==typeof module&&module.exports&&(module.exports=c),a.Chart=c,c.noConflict=function(){return a.Chart=b,c}}).call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"scaleBeginAtZero":!0,"scaleShowGridLines":!0,"scaleGridLineColor":"rgba(0,0,0,.05)","scaleGridLineWidth":1,"scaleShowHorizontalLines":!0,"scaleShowVerticalLines":!0,"barShowStroke":!0,"barStrokeWidth":2,"barValueSpacing":5,"barDatasetSpacing":1,"legendTemplate":'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};b.Type.extend({"name":"Bar","defaults":d,"initialize":function(a){var d=this.options;this.ScaleClass=b.Scale.extend({"offsetGridLines":!0,"calculateBarX":function(a,b,c){var e=this.calculateBaseWidth(),f=this.calculateX(c)-e/2,g=this.calculateBarWidth(a);return f+g*b+b*d.barDatasetSpacing+g/2},"calculateBaseWidth":function(){return this.calculateX(1)-this.calculateX(0)-2*d.barValueSpacing},"calculateBarWidth":function(a){var b=this.calculateBaseWidth()-(a-1)*d.barDatasetSpacing;return b/a}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getBarsAtEvent(a):[];this.eachBars(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),this.BarClass=b.Rectangle.extend({"strokeWidth":this.options.barStrokeWidth,"showStroke":this.options.barShowStroke,"ctx":this.chart.ctx}),c.each(a.datasets,function(b,d){var e={"label":b.label||null,"fillColor":b.fillColor,"strokeColor":b.strokeColor,"bars":[]};this.datasets.push(e),c.each(b.data,function(c,d){e.bars.push(new this.BarClass({"value":c,"label":a.labels[d],"datasetLabel":b.label,"strokeColor":b.strokeColor,"fillColor":b.fillColor,"highlightFill":b.highlightFill||b.fillColor,"highlightStroke":b.highlightStroke||b.strokeColor}))},this)},this),this.buildScale(a.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(a,b,d){c.extend(a,{"width":this.scale.calculateBarWidth(this.datasets.length),"x":this.scale.calculateBarX(this.datasets.length,d,b),"y":this.scale.endPoint}),a.save()},this),this.render()},"update":function(){this.scale.update(),c.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachBars(function(a){a.save()}),this.render()},"eachBars":function(a){c.each(this.datasets,function(b,d){c.each(b.bars,a,this,d)},this)},"getBarsAtEvent":function(a){for(var b,d=[],e=c.getRelativePosition(a),f=function(a){d.push(a.bars[b])},g=0;g<this.datasets.length;g++)for(b=0;b<this.datasets[g].bars.length;b++)if(this.datasets[g].bars[b].inRange(e.x,e.y))return c.each(this.datasets,f),d;return d},"buildScale":function(a){var b=this,d=function(){var a=[];return b.eachBars(function(b){a.push(b.value)}),a},e={"templateString":this.options.scaleLabel,"height":this.chart.height,"width":this.chart.width,"ctx":this.chart.ctx,"textColor":this.options.scaleFontColor,"fontSize":this.options.scaleFontSize,"fontStyle":this.options.scaleFontStyle,"fontFamily":this.options.scaleFontFamily,"valuesCount":a.length,"beginAtZero":this.options.scaleBeginAtZero,"integersOnly":this.options.scaleIntegersOnly,"calculateYRange":function(a){var b=c.calculateScaleRange(d(),a,this.fontSize,this.beginAtZero,this.integersOnly);c.extend(this,b)},"xLabels":a,"font":c.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),"lineWidth":this.options.scaleLineWidth,"lineColor":this.options.scaleLineColor,"showHorizontalLines":this.options.scaleShowHorizontalLines,"showVerticalLines":this.options.scaleShowVerticalLines,"gridLineWidth":this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,"gridLineColor":this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)","padding":this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,"showLabels":this.options.scaleShowLabels,"display":this.options.showScale};this.options.scaleOverride&&c.extend(e,{
"calculateYRange":c.noop,"steps":this.options.scaleSteps,"stepValue":this.options.scaleStepWidth,"min":this.options.scaleStartValue,"max":this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(e)},"addData":function(a,b){c.each(a,function(a,c){this.datasets[c].bars.push(new this.BarClass({"value":a,"label":b,"x":this.scale.calculateBarX(this.datasets.length,c,this.scale.valuesCount+1),"y":this.scale.endPoint,"width":this.scale.calculateBarWidth(this.datasets.length),"base":this.scale.endPoint,"strokeColor":this.datasets[c].strokeColor,"fillColor":this.datasets[c].fillColor}))},this),this.scale.addXLabel(b),this.update()},"removeData":function(){this.scale.removeXLabel(),c.each(this.datasets,function(a){a.bars.shift()},this),this.update()},"reflow":function(){c.extend(this.BarClass.prototype,{"y":this.scale.endPoint,"base":this.scale.endPoint});var a=c.extend({"height":this.chart.height,"width":this.chart.width});this.scale.update(a)},"draw":function(a){var b=a||1;this.clear();this.chart.ctx;this.scale.draw(b),c.each(this.datasets,function(a,d){c.each(a.bars,function(a,c){a.hasValue()&&(a.base=this.scale.endPoint,a.transition({"x":this.scale.calculateBarX(this.datasets.length,d,c),"y":this.scale.calculateY(a.value),"width":this.scale.calculateBarWidth(this.datasets.length)},b).draw())},this)},this)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"segmentShowStroke":!0,"segmentStrokeColor":"#fff","segmentStrokeWidth":2,"percentageInnerCutout":50,"animationSteps":100,"animationEasing":"easeOutBounce","animateRotate":!0,"animateScale":!1,"legendTemplate":'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};b.Type.extend({"name":"Doughnut","defaults":d,"initialize":function(a){this.segments=[],this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=b.Arc.extend({"ctx":this.chart.ctx,"x":this.chart.width/2,"y":this.chart.height/2}),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getSegmentsAtEvent(a):[];c.each(this.segments,function(a){a.restore(["fillColor"])}),c.each(b,function(a){a.fillColor=a.highlightColor}),this.showTooltip(b)}),this.calculateTotal(a),c.each(a,function(a,b){this.addData(a,b,!0)},this),this.render()},"getSegmentsAtEvent":function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.segments,function(a){a.inRange(d.x,d.y)&&b.push(a)},this),b},"addData":function(a,b,c){var d=b||this.segments.length;this.segments.splice(d,0,new this.SegmentArc({"value":a.value,"outerRadius":this.options.animateScale?0:this.outerRadius,"innerRadius":this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,"fillColor":a.color,"highlightColor":a.highlight||a.color,"showStroke":this.options.segmentShowStroke,"strokeWidth":this.options.segmentStrokeWidth,"strokeColor":this.options.segmentStrokeColor,"startAngle":1.5*Math.PI,"circumference":this.options.animateRotate?0:this.calculateCircumference(a.value),"label":a.label})),c||(this.reflow(),this.update())},"calculateCircumference":function(a){return 2*Math.PI*(Math.abs(a)/this.total)},"calculateTotal":function(a){this.total=0,c.each(a,function(a){this.total+=Math.abs(a.value)},this)},"update":function(){this.calculateTotal(this.segments),c.each(this.activeElements,function(a){a.restore(["fillColor"])}),c.each(this.segments,function(a){a.save()}),this.render()},"removeData":function(a){var b=c.isNumber(a)?a:this.segments.length-1;this.segments.splice(b,1),this.reflow(),this.update()},"reflow":function(){c.extend(this.SegmentArc.prototype,{"x":this.chart.width/2,"y":this.chart.height/2}),this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,c.each(this.segments,function(a){a.update({"outerRadius":this.outerRadius,"innerRadius":this.outerRadius/100*this.options.percentageInnerCutout})},this)},"draw":function(a){var b=a?a:1;this.clear(),c.each(this.segments,function(a,c){a.transition({"circumference":this.calculateCircumference(a.value),"outerRadius":this.outerRadius,"innerRadius":this.outerRadius/100*this.options.percentageInnerCutout},b),a.endAngle=a.startAngle+a.circumference,a.draw(),0===c&&(a.startAngle=1.5*Math.PI),c<this.segments.length-1&&(this.segments[c+1].startAngle=a.endAngle)},this)}}),b.types.Doughnut.extend({"name":"Pie","defaults":c.merge(d,{"percentageInnerCutout":0})})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"scaleShowGridLines":!0,"scaleGridLineColor":"rgba(0,0,0,.05)","scaleGridLineWidth":1,"scaleShowHorizontalLines":!0,"scaleShowVerticalLines":!0,"bezierCurve":!0,"bezierCurveTension":.4,"pointDot":!0,"pointDotRadius":4,"pointDotStrokeWidth":1,"pointHitDetectionRadius":20,"datasetStroke":!0,"datasetStrokeWidth":2,"datasetFill":!0,"legendTemplate":'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};b.Type.extend({"name":"Line","defaults":d,"initialize":function(a){this.PointClass=b.Point.extend({"strokeWidth":this.options.pointDotStrokeWidth,"radius":this.options.pointDotRadius,"display":this.options.pointDot,"hitDetectionRadius":this.options.pointHitDetectionRadius,"ctx":this.chart.ctx,"inRange":function(a){return Math.pow(a-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getPointsAtEvent(a):[];this.eachPoints(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),c.each(a.datasets,function(b){var d={"label":b.label||null,"fillColor":b.fillColor,"strokeColor":b.strokeColor,"pointColor":b.pointColor,"pointStrokeColor":b.pointStrokeColor,"points":[]};this.datasets.push(d),c.each(b.data,function(c,e){d.points.push(new this.PointClass({"value":c,"label":a.labels[e],"datasetLabel":b.label,"strokeColor":b.pointStrokeColor,"fillColor":b.pointColor,"highlightFill":b.pointHighlightFill||b.pointColor,"highlightStroke":b.pointHighlightStroke||b.pointStrokeColor}))},this),this.buildScale(a.labels),this.eachPoints(function(a,b){c.extend(a,{"x":this.scale.calculateX(b),"y":this.scale.endPoint}),a.save()},this)},this),this.render()},"update":function(){this.scale.update(),c.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachPoints(function(a){a.save()}),this.render()},"eachPoints":function(a){c.each(this.datasets,function(b){c.each(b.points,a,this)},this)},"getPointsAtEvent":function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.datasets,function(a){c.each(a.points,function(a){a.inRange(d.x,d.y)&&b.push(a)})},this),b},"buildScale":function(a){var d=this,e=function(){var a=[];return d.eachPoints(function(b){a.push(b.value)}),a},f={"templateString":this.options.scaleLabel,"height":this.chart.height,"width":this.chart.width,"ctx":this.chart.ctx,"textColor":this.options.scaleFontColor,"fontSize":this.options.scaleFontSize,"fontStyle":this.options.scaleFontStyle,"fontFamily":this.options.scaleFontFamily,"valuesCount":a.length,"beginAtZero":this.options.scaleBeginAtZero,"integersOnly":this.options.scaleIntegersOnly,"calculateYRange":function(a){var b=c.calculateScaleRange(e(),a,this.fontSize,this.beginAtZero,this.integersOnly);c.extend(this,b)},"xLabels":a,"font":c.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),"lineWidth":this.options.scaleLineWidth,"lineColor":this.options.scaleLineColor,"showHorizontalLines":this.options.scaleShowHorizontalLines,"showVerticalLines":this.options.scaleShowVerticalLines,"gridLineWidth":this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,"gridLineColor":this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)","padding":this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,"showLabels":this.options.scaleShowLabels,"display":this.options.showScale};this.options.scaleOverride&&c.extend(f,{"calculateYRange":c.noop,"steps":this.options.scaleSteps,"stepValue":this.options.scaleStepWidth,"min":this.options.scaleStartValue,"max":this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new b.Scale(f)},"addData":function(a,b){c.each(a,function(a,c){this.datasets[c].points.push(new this.PointClass({"value":a,"label":b,"x":this.scale.calculateX(this.scale.valuesCount+1),"y":this.scale.endPoint,"strokeColor":this.datasets[c].pointStrokeColor,"fillColor":this.datasets[c].pointColor}))},this),this.scale.addXLabel(b),this.update()},"removeData":function(){this.scale.removeXLabel(),c.each(this.datasets,function(a){a.points.shift()},this),this.update()},"reflow":function(){var a=c.extend({"height":this.chart.height,"width":this.chart.width});this.scale.update(a)},"draw":function(a){var b=a||1;this.clear();var d=this.chart.ctx,e=function(a){return null!==a.value},f=function(a,b,d){return c.findNextWhere(b,e,d)||a},g=function(a,b,d){return c.findPreviousWhere(b,e,d)||a};this.scale.draw(b),c.each(this.datasets,function(a){var h=c.where(a.points,e);c.each(a.points,function(a,c){a.hasValue()&&a.transition({"y":this.scale.calculateY(a.value),"x":this.scale.calculateX(c)},b)},this),this.options.bezierCurve&&c.each(h,function(a,b){var d=b>0&&b<h.length-1?this.options.bezierCurveTension:0;a.controlPoints=c.splineCurve(g(a,h,b),a,f(a,h,b),d),a.controlPoints.outer.y>this.scale.endPoint?a.controlPoints.outer.y=this.scale.endPoint:a.controlPoints.outer.y<this.scale.startPoint&&(a.controlPoints.outer.y=this.scale.startPoint),a.controlPoints.inner.y>this.scale.endPoint?a.controlPoints.inner.y=this.scale.endPoint:a.controlPoints.inner.y<this.scale.startPoint&&(a.controlPoints.inner.y=this.scale.startPoint)},this),d.lineWidth=this.options.datasetStrokeWidth,d.strokeStyle=a.strokeColor,d.beginPath(),c.each(h,function(a,b){if(0===b)d.moveTo(a.x,a.y);else if(this.options.bezierCurve){var c=g(a,h,b);d.bezierCurveTo(c.controlPoints.outer.x,c.controlPoints.outer.y,a.controlPoints.inner.x,a.controlPoints.inner.y,a.x,a.y)}else d.lineTo(a.x,a.y)},this),d.stroke(),this.options.datasetFill&&h.length>0&&(d.lineTo(h[h.length-1].x,this.scale.endPoint),d.lineTo(h[0].x,this.scale.endPoint),d.fillStyle=a.fillColor,d.closePath(),d.fill()),c.each(h,function(a){a.draw()})},this)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"scaleShowLabelBackdrop":!0,"scaleBackdropColor":"rgba(255,255,255,0.75)","scaleBeginAtZero":!0,"scaleBackdropPaddingY":2,"scaleBackdropPaddingX":2,"scaleShowLine":!0,"segmentShowStroke":!0,"segmentStrokeColor":"#fff","segmentStrokeWidth":2,"animationSteps":100,"animationEasing":"easeOutBounce","animateRotate":!0,"animateScale":!1,"legendTemplate":'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};b.Type.extend({"name":"PolarArea","defaults":d,"initialize":function(a){this.segments=[],this.SegmentArc=b.Arc.extend({"showStroke":this.options.segmentShowStroke,"strokeWidth":this.options.segmentStrokeWidth,"strokeColor":this.options.segmentStrokeColor,"ctx":this.chart.ctx,"innerRadius":0,"x":this.chart.width/2,"y":this.chart.height/2}),this.scale=new b.RadialScale({"display":this.options.showScale,"fontStyle":this.options.scaleFontStyle,"fontSize":this.options.scaleFontSize,"fontFamily":this.options.scaleFontFamily,"fontColor":this.options.scaleFontColor,"showLabels":this.options.scaleShowLabels,"showLabelBackdrop":this.options.scaleShowLabelBackdrop,"backdropColor":this.options.scaleBackdropColor,"backdropPaddingY":this.options.scaleBackdropPaddingY,"backdropPaddingX":this.options.scaleBackdropPaddingX,"lineWidth":this.options.scaleShowLine?this.options.scaleLineWidth:0,"lineColor":this.options.scaleLineColor,"lineArc":!0,"width":this.chart.width,"height":this.chart.height,"xCenter":this.chart.width/2,"yCenter":this.chart.height/2,"ctx":this.chart.ctx,"templateString":this.options.scaleLabel,"valuesCount":a.length}),this.updateScaleRange(a),this.scale.update(),c.each(a,function(a,b){this.addData(a,b,!0)},this),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getSegmentsAtEvent(a):[];c.each(this.segments,function(a){a.restore(["fillColor"])}),c.each(b,function(a){a.fillColor=a.highlightColor}),this.showTooltip(b)}),this.render()},"getSegmentsAtEvent":function(a){var b=[],d=c.getRelativePosition(a);return c.each(this.segments,function(a){a.inRange(d.x,d.y)&&b.push(a)},this),b},"addData":function(a,b,c){var d=b||this.segments.length;this.segments.splice(d,0,new this.SegmentArc({"fillColor":a.color,"highlightColor":a.highlight||a.color,"label":a.label,"value":a.value,"outerRadius":this.options.animateScale?0:this.scale.calculateCenterOffset(a.value),"circumference":this.options.animateRotate?0:this.scale.getCircumference(),"startAngle":1.5*Math.PI})),c||(this.reflow(),this.update())},"removeData":function(a){var b=c.isNumber(a)?a:this.segments.length-1;this.segments.splice(b,1),this.reflow(),this.update()},"calculateTotal":function(a){this.total=0,c.each(a,function(a){this.total+=a.value},this),this.scale.valuesCount=this.segments.length},"updateScaleRange":function(a){var b=[];c.each(a,function(a){b.push(a.value)});var d=this.options.scaleOverride?{"steps":this.options.scaleSteps,"stepValue":this.options.scaleStepWidth,"min":this.options.scaleStartValue,"max":this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:c.calculateScaleRange(b,c.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);c.extend(this.scale,d,{"size":c.min([this.chart.width,this.chart.height]),"xCenter":this.chart.width/2,"yCenter":this.chart.height/2})},"update":function(){this.calculateTotal(this.segments),c.each(this.segments,function(a){a.save()}),this.reflow(),this.render()},"reflow":function(){c.extend(this.SegmentArc.prototype,{"x":this.chart.width/2,"y":this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),c.extend(this.scale,{"xCenter":this.chart.width/2,"yCenter":this.chart.height/2}),c.each(this.segments,function(a){a.update({"outerRadius":this.scale.calculateCenterOffset(a.value)})},this)},"draw":function(a){var b=a||1;this.clear(),c.each(this.segments,function(a,c){a.transition({"circumference":this.scale.getCircumference(),"outerRadius":this.scale.calculateCenterOffset(a.value)},b),a.endAngle=a.startAngle+a.circumference,0===c&&(a.startAngle=1.5*Math.PI),c<this.segments.length-1&&(this.segments[c+1].startAngle=a.endAngle),a.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.Type.extend({"name":"Radar","defaults":{"scaleShowLine":!0,"angleShowLineOut":!0,"scaleShowLabels":!1,"scaleBeginAtZero":!0,"angleLineColor":"rgba(0,0,0,.1)","angleLineWidth":1,"pointLabelFontFamily":"'Arial'","pointLabelFontStyle":"normal","pointLabelFontSize":10,"pointLabelFontColor":"#666","pointDot":!0,"pointDotRadius":3,"pointDotStrokeWidth":1,"pointHitDetectionRadius":20,"datasetStroke":!0,"datasetStrokeWidth":2,"datasetFill":!0,"legendTemplate":'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},"initialize":function(a){this.PointClass=b.Point.extend({"strokeWidth":this.options.pointDotStrokeWidth,"radius":this.options.pointDotRadius,"display":this.options.pointDot,"hitDetectionRadius":this.options.pointHitDetectionRadius,"ctx":this.chart.ctx}),this.datasets=[],this.buildScale(a),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(a){var b="mouseout"!==a.type?this.getPointsAtEvent(a):[];this.eachPoints(function(a){a.restore(["fillColor","strokeColor"])}),c.each(b,function(a){a.fillColor=a.highlightFill,a.strokeColor=a.highlightStroke}),this.showTooltip(b)}),c.each(a.datasets,function(b){var d={"label":b.label||null,"fillColor":b.fillColor,"strokeColor":b.strokeColor,"pointColor":b.pointColor,"pointStrokeColor":b.pointStrokeColor,"points":[]};this.datasets.push(d),c.each(b.data,function(c,e){var f;this.scale.animation||(f=this.scale.getPointPosition(e,this.scale.calculateCenterOffset(c))),d.points.push(new this.PointClass({"value":c,"label":a.labels[e],"datasetLabel":b.label,"x":this.options.animation?this.scale.xCenter:f.x,"y":this.options.animation?this.scale.yCenter:f.y,"strokeColor":b.pointStrokeColor,"fillColor":b.pointColor,"highlightFill":b.pointHighlightFill||b.pointColor,"highlightStroke":b.pointHighlightStroke||b.pointStrokeColor}))},this)},this),this.render()},"eachPoints":function(a){c.each(this.datasets,function(b){c.each(b.points,a,this)},this)},"getPointsAtEvent":function(a){var b=c.getRelativePosition(a),d=c.getAngleFromPoint({"x":this.scale.xCenter,"y":this.scale.yCenter},b),e=2*Math.PI/this.scale.valuesCount,f=Math.round((d.angle-1.5*Math.PI)/e),g=[];return(f>=this.scale.valuesCount||0>f)&&(f=0),d.distance<=this.scale.drawingArea&&c.each(this.datasets,function(a){g.push(a.points[f])}),g},"buildScale":function(a){this.scale=new b.RadialScale({"display":this.options.showScale,"fontStyle":this.options.scaleFontStyle,"fontSize":this.options.scaleFontSize,"fontFamily":this.options.scaleFontFamily,"fontColor":this.options.scaleFontColor,"showLabels":this.options.scaleShowLabels,"showLabelBackdrop":this.options.scaleShowLabelBackdrop,"backdropColor":this.options.scaleBackdropColor,"backdropPaddingY":this.options.scaleBackdropPaddingY,"backdropPaddingX":this.options.scaleBackdropPaddingX,"lineWidth":this.options.scaleShowLine?this.options.scaleLineWidth:0,"lineColor":this.options.scaleLineColor,"angleLineColor":this.options.angleLineColor,"angleLineWidth":this.options.angleShowLineOut?this.options.angleLineWidth:0,"pointLabelFontColor":this.options.pointLabelFontColor,"pointLabelFontSize":this.options.pointLabelFontSize,"pointLabelFontFamily":this.options.pointLabelFontFamily,"pointLabelFontStyle":this.options.pointLabelFontStyle,"height":this.chart.height,"width":this.chart.width,"xCenter":this.chart.width/2,"yCenter":this.chart.height/2,"ctx":this.chart.ctx,"templateString":this.options.scaleLabel,"labels":a.labels,"valuesCount":a.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(a.datasets),this.scale.buildYLabels()},"updateScaleRange":function(a){var b=function(){var b=[];return c.each(a,function(a){a.data?b=b.concat(a.data):c.each(a.points,function(a){b.push(a.value)})}),b}(),d=this.options.scaleOverride?{"steps":this.options.scaleSteps,"stepValue":this.options.scaleStepWidth,"min":this.options.scaleStartValue,"max":this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:c.calculateScaleRange(b,c.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);c.extend(this.scale,d)},"addData":function(a,b){this.scale.valuesCount++,c.each(a,function(a,c){var d=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(a));this.datasets[c].points.push(new this.PointClass({"value":a,"label":b,"x":d.x,"y":d.y,"strokeColor":this.datasets[c].pointStrokeColor,"fillColor":this.datasets[c].pointColor}))},this),this.scale.labels.push(b),this.reflow(),this.update()},"removeData":function(){this.scale.valuesCount--,this.scale.labels.shift(),c.each(this.datasets,function(a){a.points.shift()},this),this.reflow(),this.update()},"update":function(){this.eachPoints(function(a){a.save()}),this.reflow(),this.render()},"reflow":function(){c.extend(this.scale,{"width":this.chart.width,"height":this.chart.height,"size":c.min([this.chart.width,this.chart.height]),"xCenter":this.chart.width/2,"yCenter":this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},"draw":function(a){var b=a||1,d=this.chart.ctx;this.clear(),this.scale.draw(),c.each(this.datasets,function(a){c.each(a.points,function(a,c){a.hasValue()&&a.transition(this.scale.getPointPosition(c,this.scale.calculateCenterOffset(a.value)),b)},this),d.lineWidth=this.options.datasetStrokeWidth,d.strokeStyle=a.strokeColor,d.beginPath(),c.each(a.points,function(a,b){0===b?d.moveTo(a.x,a.y):d.lineTo(a.x,a.y)},this),d.closePath(),d.stroke(),d.fillStyle=a.fillColor,d.fill(),c.each(a.points,function(a){a.hasValue()&&a.draw()})},this)}})}.call(this);
!function(){function a(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function b(a,b){return parseInt(a,b||10)}function c(a){return"string"==typeof a}function d(a){return"object"==typeof a}function e(a){return"number"==typeof a}function f(a){return U.log(a)/U.LN10}function g(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function h(a){return a!==F&&null!==a}function i(a,b,e){var f,g;if(c(b))h(e)?a.setAttribute(b,e):a&&a.getAttribute&&(g=a.getAttribute(b));else if(h(b)&&d(b))for(f in b)a.setAttribute(f,b[f]);return g}function j(a){return"[object Array]"===Object.prototype.toString.call(a)?a:[a]}function k(){var a,b,c=arguments,d=c.length;for(a=0;d>a;a++)if(b=c[a],"undefined"!=typeof b&&null!==b)return b}function l(b,c){ea&&c&&c.opacity!==F&&(c.filter="alpha(opacity="+100*c.opacity+")"),a(b.style,c)}function m(b,c,d,e,f){return b=S.createElement(b),c&&a(b,c),f&&l(b,{"padding":0,"border":va,"margin":0}),d&&l(b,d),e&&e.appendChild(b),b}function n(b,c){var d=function(){};return d.prototype=new b,a(d.prototype,c),d}function o(a,c,d,e){var f=B.lang;a=a;var g=isNaN(c=$(c))?2:c;c=void 0===d?f.decimalPoint:d,e=void 0===e?f.thousandsSep:e,f=0>a?"-":"",d=String(b(a=$(+a||0).toFixed(g)));var h=d.length>3?d.length%3:0;return f+(h?d.substr(0,h)+e:"")+d.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+e)+(g?c+$(a-d).toFixed(g).slice(2):"")}function p(a){var b={"left":a.offsetLeft,"top":a.offsetTop};for(a=a.offsetParent;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a!==S.body&&a!==S.documentElement&&(b.left-=a.scrollLeft,b.top-=a.scrollTop),a=a.offsetParent;return b}function q(){this.symbol=this.color=0}function r(a,b,c,d,e,f,g){var h=g.x;g=g.y;var i,j=h-a+c-25,k=g-b+d+10;return 7>j&&(j=c+h+15),j+a>c+e&&(j-=j+a-(c+e),k-=b,i=!0),5>k?(k=5,i&&g>=k&&k+b>=g&&(k=g+b-5)):k+b>d+f&&(k=d+f-b-5),{"x":j,"y":k}}function s(a,b){var c,d=a.length;for(c=0;d>c;c++)a[c].ss_i=c;for(a.sort(function(a,c){var d=b(a,c);return 0===d?a.ss_i-c.ss_i:d}),c=0;d>c;c++)delete a[c].ss_i}function t(a){for(var b in a)a[b]&&a[b].destroy&&a[b].destroy(),delete a[b]}function u(a,b){D=k(a,b.animation)}function v(){var a=B.global.useUTC;G=a?Date.UTC:function(a,b,c,d,e,f){return new Date(a,b,k(c,1),k(d,0),k(e,0),k(f,0)).getTime()},H=a?"getUTCMinutes":"getMinutes",I=a?"getUTCHours":"getHours",J=a?"getUTCDay":"getDay",K=a?"getUTCDate":"getDate",L=a?"getUTCMonth":"getMonth",M=a?"getUTCFullYear":"getFullYear",N=a?"setUTCMinutes":"setMinutes",O=a?"setUTCHours":"setHours",P=a?"setUTCDate":"setDate",Q=a?"setUTCMonth":"setMonth",R=a?"setUTCFullYear":"setFullYear"}function w(a){A||(A=m(oa)),a&&A.appendChild(a),A.innerHTML=""}function x(){}function y(e,n){function v(c){function d(a,b){this.pos=a,this.minor=b,this.isNew=!0,b||this.addLabel()}function e(a){return a&&(this.options=a,this.id=a.id),this}function i(a,b,c,d){this.isNegative=b,this.options=a,this.x=c,this.stack=d,this.alignOptions={"align":a.align||(Gb?b?"left":"right":"center"),"verticalAlign":a.verticalAlign||(Gb?"middle":b?"bottom":"top"),"y":k(a.y,Gb?4:b?14:-6),"x":k(a.x,Gb?b?-6:6:0)},this.textAlign=a.textAlign||(Gb?b?"right":"left":"center")}function j(){var a,b=[],c=[];S=T=null,_=[],Da(dc,function(d){if(a=!1,Da(["xAxis","yAxis"],function(b){d.isCartesian&&("xAxis"===b&&ha||"yAxis"===b&&!ha)&&(d.options[b]===ma.index||d.options[b]===F&&0===ma.index)&&(d[b]=oa,_.push(d),a=!0)}),!d.visible&&Ca.ignoreHiddenSeries&&(a=!1),a){var e,f,g,j,l,m;ha||(e=d.options.stacking,ga="percent"===e,e&&(l=d.options.stack,j=d.type+k(l,""),m="-"+j,d.stackKey=j,f=b[j]||[],b[j]=f,g=c[m]||[],c[m]=g),ga&&(S=0,T=99)),d.isCartesian&&(Da(d.data,function(a){var b=a.x,c=a.y,d=0>c,n=d?g:f,o=d?m:j;null===S&&(S=T=a[ya]),ha?b>T?T=b:S>b&&(S=b):h(c)&&(e&&(n[b]=h(n[b])?n[b]+c:c),c=n?n[b]:c,a=k(a.low,c),ga||(c>T?T=c:S>a&&(S=a)),e&&(la[o]||(la[o]={}),la[o][b]||(la[o][b]=new i(ma.stackLabels,d,b,l)),la[o][b].setTotal(c)))}),/(area|column|bar)/.test(d.type)&&!ha&&(S>=0?(S=0,ea=!0):0>T&&(T=0,fa=!0)))}})}function l(a,b){var c,d;for(Oa=b?1:U.pow(10,W(U.log(a)/U.LN10)),c=a/Oa,b||(b=[1,2,2.5,5,10],(ma.allowDecimals===!1||sa)&&(1===Oa?b=[1,2,5,10]:.1>=Oa&&(b=[1/Oa]))),d=0;d<b.length&&(a=b[d],!(c<=(b[d]+(b[d+1]||b[d]))/2));d++);return a*=Oa}function m(a){var b;return b=a,Oa=k(Oa,U.pow(10,W(U.log(Ma)/U.LN10))),1>Oa&&(b=10*V(1/Oa),b=V(a*b)/b),b}function n(){var a,b,c,d,e=ma.tickInterval,g=ma.tickPixelInterval;if(a=ma.maxZoom||(!ha||h(ma.min)||h(ma.max)?null:Z(5*$b.smallestInterval,T-S)),v=ja?xb:wb,Ka?(c=$b[ha?"xAxis":"yAxis"][ma.linkedTo],d=c.getExtremes(),Ba=k(d.min,d.dataMin),Aa=k(d.max,d.dataMax)):(Ba=k(aa,ma.min,S),Aa=k(ba,ma.max,T)),sa&&(Ba=f(Ba),Aa=f(Aa)),a>Aa-Ba&&(d=(a-Aa+Ba)/2,Ba=Y(Ba-d,k(ma.min,Ba-d),S),Aa=Z(Ba+a,k(ma.max,Ba+a),T)),lb||ga||Ka||!h(Ba)||!h(Aa)||(a=Aa-Ba||1,h(ma.min)||h(aa)||!Ea||!(0>S)&&ea||(Ba-=a*Ea),h(ma.max)||h(ba)||!Fa||!(T>0)&&fa||(Aa+=a*Fa)),Ma=Ba===Aa?1:Ka&&!e&&g===c.options.tickPixelInterval?c.tickInterval:k(e,lb?1:(Aa-Ba)*g/v),qa||h(ma.tickInterval)||(Ma=l(Ma)),oa.tickInterval=Ma,Na="auto"===ma.minorTickInterval&&Ma?Ma/5:ma.minorTickInterval,qa){Pa=[],e=B.global.useUTC;var i=1e3/na,j=6e4/na,n=36e5/na;g=864e5/na,a=6048e5/na,d=2592e6/na;var o=31556952e3/na,p=[["second",i,[1,2,5,10,15,30]],["minute",j,[1,2,5,10,15,30]],["hour",n,[1,2,3,4,6,8,12]],["day",g,[1,2]],["week",a,[1,2]],["month",d,[1,2,3,4,6]],["year",o,null]],q=p[6],r=q[1],s=q[2];for(c=0;c<p.length&&(q=p[c],r=q[1],s=q[2],!(p[c+1]&&Ma<=(r*s[s.length-1]+p[c+1][1])/2));c++);for(r===o&&5*r>Ma&&(s=[1,2,5]),p=l(Ma/r,s),s=new Date(Ba*na),s.setMilliseconds(0),r>=i&&s.setSeconds(r>=j?0:p*W(s.getSeconds()/p)),r>=j&&s[N](r>=n?0:p*W(s[H]()/p)),r>=n&&s[O](r>=g?0:p*W(s[I]()/p)),r>=g&&s[P](r>=d?1:p*W(s[K]()/p)),r>=d&&(s[Q](r>=o?0:p*W(s[L]()/p)),b=s[M]()),r>=o&&(b-=b%p,s[R](b)),r===a&&s[P](s[K]()-s[J]()+ma.startOfWeek),c=1,b=s[M](),i=s.getTime()/na,j=s[L](),n=s[K]();Aa>i&&xb>c;)Pa.push(i),r===o?i=G(b+c*p,0)/na:r===d?i=G(b,j+c*p)/na:e||r!==g&&r!==a?i+=r*p:i=G(b,j,n+c*p*(r===g?1:7)),c++;Pa.push(i),cb=ma.dateTimeLabelFormats[q[0]]}else for(c=m(W(Ba/Ma)*Ma),b=m(X(Aa/Ma)*Ma),Pa=[],c=m(c);b>=c;)Pa.push(c),c=m(c+Ma);Ka||((lb||ha&&$b.hasColumn)&&(b=.5*(lb?1:Ma),(lb||!h(k(ma.min,aa)))&&(Ba-=b),(lb||!h(k(ma.max,ba)))&&(Aa+=b)),b=Pa[0],c=Pa[Pa.length-1],ma.startOnTick?Ba=b:Ba>b&&Pa.shift(),ma.endOnTick?Aa=c:c>Aa&&Pa.pop(),Fb||(Fb={"x":0,"y":0}),!qa&&Pa.length>Fb[ya]&&(Fb[ya]=Pa.length))}function p(){var a,b;if(ca=Ba,da=Aa,j(),n(),x=w,w=v/(Aa-Ba||1),!ha)for(a in la)for(b in la[a])la[a][b].cum=la[a][b].total;oa.isDirty||(oa.isDirty=Ba!==ca||Aa!==da)}function q(a){return a=new e(a).render(),db.push(a),a}function r(){var a,c,f=ma.title,g=ma.stackLabels,i=ma.alternateGridColor,j=ma.lineWidth,k=(a=$b.hasRendered)&&h(ca)&&!isNaN(ca);if(c=_.length&&h(Ba)&&h(Aa),v=ja?xb:wb,w=v/(Aa-Ba||1),za=ja?_a:$a,c||Ka){if(Na&&!lb)for(c=Ba+(Pa[0]-Ba)%Na;Aa>=c;c+=Na)fb[c]||(fb[c]=new d(c,!0)),k&&fb[c].isNew&&fb[c].render(null,!0),fb[c].isActive=!0,fb[c].render();Da(Pa,function(a,b){(!Ka||a>=Ba&&Aa>=a)&&(k&&eb[a].isNew&&eb[a].render(b,!0),eb[a].isActive=!0,eb[a].render(b))}),i&&Da(Pa,function(a,b){b%2===0&&Aa>a&&(gb[a]||(gb[a]=new e),gb[a].options={"from":a,"to":Pa[b+1]!==F?Pa[b+1]:Aa,"color":i},gb[a].render(),gb[a].isActive=!0)}),a||Da((ma.plotLines||[]).concat(ma.plotBands||[]),function(a){db.push(new e(a).render())})}if(Da([eb,fb,gb],function(a){for(var b in a)a[b].isActive?a[b].isActive=!1:(a[b].destroy(),delete a[b])}),j&&(a=_a+(ia?xb:0)+va,c=ib-$a-(ia?wb:0)+va,a=Hb.crispLine([wa,ja?_a:a,ja?c:Xa,xa,ja?hb-Za:a,ja?c:ib-$a],j),E?E.animate({"d":a}):E=Hb.path(a).attr({"stroke":ma.lineColor,"stroke-width":j,"zIndex":7}).add()),u&&(a=ja?_a:Xa,j=b(f.style.fontSize||12),a={"low":a+(ja?0:v),"middle":a+v/2,"high":a+(ja?v:0)}[f.align],j=(ja?Xa+wb:_a)+(ja?1:-1)*(ia?-1:1)*bb+(2===ka?j:0),u[u.isNew?"attr":"animate"]({"x":ja?a:j+(ia?xb:0)+va+(f.x||0),"y":ja?j-(ia?wb:0)+va:a+(f.y||0)}),u.isNew=!1),g&&g.enabled){var l,m;g=oa.stackTotalGroup,g||(oa.stackTotalGroup=g=Hb.g("stack-labels").attr({"visibility":ta,"zIndex":6}).translate(_a,Xa).add());for(l in la){f=la[l];for(m in f)f[m].render(g)}}oa.isDirty=!1}function s(a){for(var b=db.length;b--;)db[b].id===a&&db[b].destroy()}var u,v,w,x,y,z,A,D,E,S,T,_,aa,ba,ca,da,ea,fa,ga,ha=c.isX,ia=c.opposite,ja=Gb?!ha:ha,ka=ja?ia?0:2:ia?1:3,la={},ma=Ga(ha?Qa:Ra,[Va,Ta,Ua,Sa][ka],c),oa=this,pa=ma.type,qa="datetime"===pa,sa="logarithmic"===pa,va=ma.offset||0,ya=ha?"x":"y",za=ja?_a:$a,Aa=null,Ba=null,Ea=ma.minPadding,Fa=ma.maxPadding,Ka=h(ma.linkedTo);pa=ma.events;var La,Ma,Na,Oa,Pa,Wa,Ya,bb,cb,db=[],eb={},fb={},gb={},lb=ma.categories,mb=ma.labels.formatter||function(){var a=this.value;return cb?C(cb,a):Ma%1e6===0?a/1e6+"M":Ma%1e3===0?a/1e3+"k":!lb&&a>=1e3?o(a,0):a},nb=ja&&ma.labels.staggerLines,ob=ma.reversed,pb=lb&&"between"===ma.tickmarkPlacement?.5:0;d.prototype={"addLabel":function(){var b=this.pos,c=ma.labels,d=!(b===Ba&&!k(ma.showFirstLabel,1)||b===Aa&&!k(ma.showLastLabel,0)),e=lb&&ja&&lb.length&&!c.step&&!c.staggerLines&&!c.rotation&&xb/lb.length||!ja&&xb/2,f=lb&&h(lb[b])?lb[b]:b,g=this.label;b=mb.call({"isFirst":b===Pa[0],"isLast":b===Pa[Pa.length-1],"dateTimeLabelFormat":cb,"value":sa?U.pow(10,f):f}),e=e&&{"width":Y(1,V(e-2*(c.padding||10)))+ua},e=a(e,c.style),g===F?this.label=h(b)&&d&&c.enabled?Hb.text(b,0,0,c.useHTML).attr({"align":c.align,"rotation":c.rotation}).css(e).add(A):null:g&&g.attr({"text":b}).css(e)},"getLabelSize":function(){var a=this.label;return a?(this.labelBBox=a.getBBox())[ja?"height":"width"]:0},"render":function(a,c){var d,e=!this.minor,f=this.label,g=this.pos,i=ma.labels,j=this.gridLine,k=e?ma.gridLineWidth:ma.minorGridLineWidth,l=e?ma.gridLineColor:ma.minorGridLineColor,m=e?ma.gridLineDashStyle:ma.minorGridLineDashStyle,n=this.mark,o=e?ma.tickLength:ma.minorTickLength,p=e?ma.tickWidth:ma.minorTickWidth||0,q=e?ma.tickColor:ma.minorTickColor,r=e?ma.tickPosition:ma.minorTickPosition,s=i.step,t=c&&kb||ib;d=ja?y(g+pb,null,null,c)+za:_a+va+(ia?(c&&jb||hb)-Za-_a:0),t=ja?t-$a+va-(ia?wb:0):t-y(g+pb,null,null,c)-za,k&&(g=z(g+pb,k,c),j===F&&(j={"stroke":l,"stroke-width":k},m&&(j.dashstyle=m),e&&(j.zIndex=1),this.gridLine=j=k?Hb.path(g).attr(j).add(D):null),!c&&j&&g&&j.animate({"d":g})),p&&("inside"===r&&(o=-o),ia&&(o=-o),e=Hb.crispLine([wa,d,t,xa,d+(ja?0:-o),t+(ja?o:0)],p),n?n.animate({"d":e}):this.mark=Hb.path(e).attr({"stroke":q,"stroke-width":p}).add(A)),f&&!isNaN(d)&&(d=d+i.x-(pb&&ja?pb*w*(ob?-1:1):0),t=t+i.y-(pb&&!ja?pb*w*(ob?1:-1):0),h(i.y)||(t+=.9*b(f.styles.lineHeight)-f.getBBox().height/2),nb&&(t+=a/(s||1)%nb*16),s&&f[a%s?"hide":"show"](),f[this.isNew?"attr":"animate"]({"x":d,"y":t})),this.isNew=!1},"destroy":function(){t(this)}},e.prototype={"render":function(){var a,b,c,d=this,e=d.options,g=e.label,i=d.label,j=e.width,l=e.to,m=e.from,n=e.value,o=e.dashStyle,p=d.svgElem,q=[],r=e.color;c=e.zIndex;var s=e.events;if(sa&&(m=f(m),l=f(l),n=f(n)),j)q=z(n,j),e={"stroke":r,"stroke-width":j},o&&(e.dashstyle=o);else{if(!h(m)||!h(l))return;m=Y(m,Ba),l=Z(l,Aa),a=z(l),(q=z(m))&&a?q.push(a[4],a[5],a[1],a[2]):q=null,e={"fill":r}}if(h(c)&&(e.zIndex=c),p)q?p.animate({"d":q},null,p.onGetPath):(p.hide(),p.onGetPath=function(){p.show()});else if(q&&q.length&&(d.svgElem=p=Hb.path(q).attr(e).add(),s)){o=function(a){p.on(a,function(b){s[a].apply(d,[b])})};for(b in s)o(b)}return g&&h(g.text)&&q&&q.length&&xb>0&&wb>0?(g=Ga({"align":ja&&a&&"center","x":ja?!a&&4:10,"verticalAlign":!ja&&a&&"middle","y":ja?a?16:10:a?6:-4,"rotation":ja&&!a&&90},g),i||(d.label=i=Hb.text(g.text,0,0).attr({"align":g.textAlign||g.align,"rotation":g.rotation,"zIndex":c}).css(g.style).add()),a=[q[1],q[4],k(q[6],q[1])],q=[q[2],q[5],k(q[7],q[2])],b=Z.apply(U,a),c=Z.apply(U,q),i.align(g,!1,{"x":b,"y":c,"width":Y.apply(U,a)-b,"height":Y.apply(U,q)-c}),i.show()):i&&i.hide(),d},"destroy":function(){t(this),g(db,this)}},i.prototype={"destroy":function(){t(this)},"setTotal":function(a){this.cum=this.total=a},"render":function(a){var b=this.options.formatter.call(this);this.label?this.label.attr({"text":b,"visibility":ra}):this.label=$b.renderer.text(b,0,0).css(this.options.style).attr({"align":this.textAlign,"rotation":this.options.rotation,"visibility":ra}).add(a)},"setOffset":function(a,b){var c=this.isNegative,d=oa.translate(this.total),e=oa.translate(0);e=$(d-e);var f=$b.xAxis[0].translate(this.x)+a,g=$b.plotHeight;c={"x":Gb?c?d:d-e:f,"y":Gb?g-f-b:c?g-d-e:g-d,"width":Gb?e:b,"height":Gb?b:e},this.label&&this.label.align(this.alignOptions,null,c).attr({"visibility":ta})}},y=function(a,b,c,d,e){var g=1,h=0,i=d?x:w;return d=d?ca:Ba,i||(i=w),c&&(g*=-1,h=v),ob&&(g*=-1,h-=g*v),b?(ob&&(a=v-a),a=a/i+d,sa&&e&&(a=U.pow(10,a))):(sa&&e&&(a=f(a)),a=g*(a-d)*i+h),a},z=function(a,b,c){var d,e,f;a=y(a,null,null,c);var g,h=c&&kb||ib,i=c&&jb||hb;return c=e=V(a+za),d=f=V(h-a-za),isNaN(a)?g=!0:ja?(d=Xa,f=h-$a,(_a>c||c>_a+xb)&&(g=!0)):(c=_a,e=i-Za,(Xa>d||d>Xa+wb)&&(g=!0)),g?null:Hb.crispLine([wa,c,d,xa,e,f],b||0)},Gb&&ha&&ob===F&&(ob=!0),a(oa,{"addPlotBand":q,"addPlotLine":q,"adjustTickAmount":function(){if(Fb&&!qa&&!lb&&!Ka){var a=Wa,b=Pa.length;if(Wa=Fb[ya],Wa>b){for(;Pa.length<Wa;)Pa.push(m(Pa[Pa.length-1]+Ma));w*=(b-1)/(Wa-1),Aa=Pa[Pa.length-1]}h(a)&&Wa!==a&&(oa.isDirty=!0)}},"categories":lb,"getExtremes":function(){return{"min":Ba,"max":Aa,"dataMin":S,"dataMax":T,"userMin":aa,"userMax":ba}},"getPlotLinePath":z,"getThreshold":function(a){return Ba>a?a=Ba:a>Aa&&(a=Aa),y(a,0,1)},"isXAxis":ha,"options":ma,"plotLinesAndBands":db,"getOffset":function(){var a,b=_.length&&h(Ba)&&h(Aa),c=0,e=0,f=ma.title,g=ma.labels,i=[-1,1,1,-1][ka];if(A||(A=Hb.g("axis").attr({"zIndex":7}).add(),D=Hb.g("grid").attr({"zIndex":1}).add()),Ya=0,b||Ka)Da(Pa,function(a){eb[a]?eb[a].addLabel():eb[a]=new d(a),(0===ka||2===ka||{"1":"left","3":"right"}[ka]===g.align)&&(Ya=Y(eb[a].getLabelSize(),Ya))}),nb&&(Ya+=16*(nb-1));else for(a in eb)eb[a].destroy(),delete eb[a];f&&f.text&&(u||(u=oa.axisTitle=Hb.text(f.text,0,0,f.useHTML).attr({"zIndex":7,"rotation":f.rotation||0,"align":f.textAlign||{"low":"left","middle":"center","high":"right"}[f.align]}).css(f.style).add(),u.isNew=!0),c=u.getBBox()[ja?"height":"width"],e=k(f.margin,ja?5:10)),va=i*(ma.offset||ab[ka]),bb=Ya+(2!==ka&&Ya&&i*ma.labels[ja?"y":"x"])+e,ab[ka]=Y(ab[ka],bb+c+i*va)},"render":r,"setCategories":function(a,b){oa.categories=c.categories=lb=a,Da(_,function(a){a.translate(),a.setTooltipPoints(!0)}),oa.isDirty=!0,k(b,!0)&&$b.redraw()},"setExtremes":function(a,b,c,d){c=k(c,!0),Ja(oa,"setExtremes",{"min":a,"max":b},function(){aa=a,ba=b,c&&$b.redraw(d)})},"setScale":p,"setTickPositions":n,"translate":y,"redraw":function(){yb.resetTracker&&yb.resetTracker(),r(),Da(db,function(a){a.render()}),Da(_,function(a){a.isDirty=!0})},"removePlotBand":s,"removePlotLine":s,"reversed":ob,"stacks":la,"destroy":function(){var a;Ia(oa);for(a in la)t(la[a]),la[a]=null;oa.stackTotalGroup&&(oa.stackTotalGroup=oa.stackTotalGroup.destroy()),Da([eb,fb,gb,db],function(a){t(a)}),Da([E,A,D,u],function(a){a&&a.destroy()}),E=A=D=u=null}});for(La in pa)Ha(oa,La,pa[La]);p()}function x(){var a={};return{"add":function(b,c,d,f){a[b]||(c=Hb.text(c,0,0).css(e.toolbar.itemStyle).align({"align":"right","x":-Za-20,"y":Xa+30}).on("click",f).attr({"align":"right","zIndex":20}).add(),a[b]=c)},"remove":function(b){w(a[b].element),a[b]=null}}}function y(a){function d(){var a=this.points||j(this),b=a[0].series.xAxis,d=this.x;b=b&&"datetime"===b.options.type;var e,f=c(d)||b;return e=f?['<span style="font-size: 10px">'+(b?C("%A, %b %e, %Y",d):d)+"</span>"]:[],Da(a,function(a){e.push(a.point.tooltipFormatter(f))}),e.join("<br/>")}function e(a,b){t=s?a:(2*t+a)/3,u=s?b:(u+b)/2,v.translate(t,u),Ib=$(a-t)>1||$(b-u)>1?function(){e(a,b)}:null}function f(){if(!s){var a=$b.hoverPoints;v.hide(),Da(m,function(a){a&&a.hide()}),a&&Da(a,function(a){a.setState()}),$b.hoverPoints=null,s=!0}}var g,h,i,k=a.borderWidth,l=a.crosshairs,m=[],n=a.style,o=a.shared,p=b(n.padding),q=k+p,s=!0,t=0,u=0;n.padding=0;var v=Hb.g("tooltip").attr({"zIndex":8}).add(),w=Hb.rect(q,q,0,0,a.borderRadius,k).attr({"fill":a.backgroundColor,"stroke-width":k}).add(v).shadow(a.shadow),x=Hb.text("",p+q,b(n.fontSize)+p+q,a.useHTML).attr({"zIndex":1}).css(n).add(v);return v.hide(),{"shared":o,"refresh":function(b){var c,k,n,t=0,u={},y=[];if(n=b.tooltipPos,c=a.formatter||d,u=$b.hoverPoints,o?(u&&Da(u,function(a){a.setState()}),$b.hoverPoints=b,Da(b,function(a){a.setState(Aa),t+=a.plotY,y.push(a.getLabelConfig())}),k=b[0].plotX,t=V(t)/b.length,u={"x":b[0].category},u.points=y,b=b[0]):u=b.getLabelConfig(),u=c.call(u),g=b.series,k=o?k:b.plotX,t=o?t:b.plotY,c=V(n?n[0]:Gb?xb-t:k),k=V(n?n[1]:Gb?wb-k:t),n=o||!b.series.isCartesian||qb(c,k),u!==!1&&n?(s&&(v.show(),s=!1),x.attr({"text":u}),n=x.getBBox(),h=n.width+2*p,i=n.height+2*p,w.attr({"width":h,"height":i,"stroke":a.borderColor||b.color||g.color||"#606060"}),c=r(h,i,_a,Xa,xb,wb,{"x":c,"y":k}),e(V(c.x-q),V(c.y-q))):f(),l)for(l=j(l),c=l.length;c--;)k=b.series[c?"yAxis":"xAxis"],l[c]&&k&&(k=k.getPlotLinePath(b[c?"y":"x"],1),m[c]?m[c].attr({"d":k,"visibility":ta}):(n={"stroke-width":l[c].width||1,"stroke":l[c].color||"#C0C0C0","zIndex":2},l[c].dashStyle&&(n.dashstyle=l[c].dashStyle),m[c]=Hb.path(k).attr(n).add()))},"hide":f,"destroy":function(){Da(m,function(a){a&&a.destroy()}),Da([w,x,v],function(a){a&&a.destroy()}),w=x=v=null}}}function A(b){function c(b){var c,d,e,f,g=ga&&S.width/S.body.scrollWidth-1;return b=b||T.event,b.target||(b.target=b.srcElement),c=b.touches?b.touches.item(0):b,("mousemove"!==b.type||T.opera||g)&&(Eb=p(db),d=Eb.left,e=Eb.top),ea?(f=b.x,c=b.y):c.layerX===F?(f=c.pageX-d,c=c.pageY-e):(f=b.layerX,c=b.layerY),g&&(f+=V((g+1)*d-d),c+=V((g+1)*e-e)),a(b,{"chartX":f,"chartY":c})}function d(a){var b={"xAxis":[],"yAxis":[]};return Da(cc,function(c){var d=c.translate,e=c.isXAxis;b[e?"xAxis":"yAxis"].push({"axis":c,"value":d((Gb?!e:e)?a.chartX-_a:wb-a.chartY+Xa,!0)})}),b}function e(){var a=$b.hoverSeries,b=$b.hoverPoint;b&&b.onMouseOut(),a&&a.onMouseOut(),rb&&rb.hide(),Kb=null}function f(){if(m){var a={"xAxis":[],"yAxis":[]},b=m.getBBox(),c=b.x-_a,d=b.y-Xa;l&&(Da(cc,function(e){var f=e.translate,g=e.isXAxis,h=Gb?!g:g,i=f(h?c:wb-d-b.height,!0,0,0,1);f=f(h?c+b.width:wb-d,!0,0,0,1),a[g?"xAxis":"yAxis"].push({"axis":e,"min":Z(i,f),"max":Y(i,f)})}),Ja($b,"selection",a,Qb)),m=m.destroy()}$b.mouseIsDown=sb=l=!1,Ia(S,ka?"touchend":"mouseup",f)}function g(a){var b=h(a.pageX)?a.pageX:a.page.x;a=h(a.pageX)?a.pageY:a.page.y,Eb&&!qb(b-Eb.left-_a,a-Eb.top-Xa)&&e()}var j,k,l,m,n=Ca.zoomType,o=/x/.test(n),q=/y/.test(n),r=o&&!Gb||q&&Gb,s=q&&!Gb||o&&Gb;Ab=function(){zb?(zb.translate(_a,Xa),Gb&&zb.attr({"width":$b.plotWidth,"height":$b.plotHeight}).invert()):$b.trackerGroup=zb=Hb.g("tracker").attr({"zIndex":9}).add()},Ab(),b.enabled&&($b.tooltip=rb=y(b)),function(){db.onmousedown=function(a){a=c(a),!ka&&a.preventDefault&&a.preventDefault(),$b.mouseIsDown=sb=!0,j=a.chartX,k=a.chartY,Ha(S,ka?"touchend":"mouseup",f)};var h=function(a){if(!(a&&a.touches&&a.touches.length>1)){a=c(a),ka||(a.returnValue=!1);var d=a.chartX,e=a.chartY,f=!qb(d-_a,e-Xa);if(Eb||(Eb=p(db)),ka&&"touchstart"===a.type&&(i(a.target,"isTracker")?$b.runTrackerClick||a.preventDefault():!_b&&!f&&a.preventDefault()),f&&(_a>d?d=_a:d>_a+xb&&(d=_a+xb),Xa>e?e=Xa:e>Xa+wb&&(e=Xa+wb)),sb&&"touchstart"!==a.type)l=Math.sqrt(Math.pow(j-d,2)+Math.pow(k-e,2)),l>10&&(ac&&(o||q)&&qb(j-_a,k-Xa)&&(m||(m=Hb.rect(_a,Xa,r?1:xb,s?1:wb,0).attr({"fill":Ca.selectionMarkerFill||"rgba(69,114,167,0.25)","zIndex":7}).add())),m&&r&&(d-=j,m.attr({"width":$(d),"x":(d>0?0:d)+j})),m&&s&&(e-=k,m.attr({"height":$(e),"y":(e>0?0:e)+k})));else if(!f){var g;e=$b.hoverPoint,d=$b.hoverSeries;var h,n,t=hb,u=Gb?a.chartY:a.chartX-_a;if(rb&&b.shared){for(g=[],h=dc.length,n=0;h>n;n++)dc[n].visible&&dc[n].tooltipPoints.length&&(a=dc[n].tooltipPoints[u],a._dist=$(u-a.plotX),t=Z(t,a._dist),g.push(a));for(h=g.length;h--;)g[h]._dist>t&&g.splice(h,1);g.length&&g[0].plotX!==Kb&&(rb.refresh(g),Kb=g[0].plotX)}d&&d.tracker&&(a=d.tooltipPoints[u])&&a!==e&&a.onMouseOver()}return f||!ac}};db.onmousemove=h,Ha(db,"mouseleave",e),Ha(S,"mousemove",g),db.ontouchstart=function(a){(o||q)&&db.onmousedown(a),h(a)},db.ontouchmove=h,db.ontouchend=function(){l&&e()},db.onclick=function(b){var e=$b.hoverPoint;if(b=c(b),b.cancelBubble=!0,!l)if(e&&i(b.target,"isTracker")){var f=e.plotX,g=e.plotY;a(e,{"pageX":Eb.left+_a+(Gb?xb-g:f),"pageY":Eb.top+Xa+(Gb?wb-f:g)}),Ja(e.series,"click",a(b,{"point":e})),e.firePointEvent("click",b)}else a(b,d(b)),qb(b.chartX-_a,b.chartY-Xa)&&Ja($b,"click",b);l=!1}}(),Jb=setInterval(function(){Ib&&Ib()},32),a(this,{"zoomX":o,"zoomY":q,"resetTracker":e,"destroy":function(){$b.trackerGroup&&($b.trackerGroup=zb=$b.trackerGroup.destroy()),Ia(S,"mousemove",g),db.onclick=db.onmousedown=db.onmousemove=db.ontouchstart=db.ontouchend=db.ontouchmove=null}})}function E(a){var b=a.type||Ca.type||Ca.defaultSeriesType,c=Ma[b],d=$b.hasRendered;return d&&(Gb&&"column"===b?c=Ma.bar:Gb||"bar"!==b||(c=Ma.column)),b=new c,b.init($b,a),!d&&b.inverted&&(Gb=!0),b.isCartesian&&(ac=b.isCartesian),dc.push(b),b}function _(){Ca.alignTicks!==!1&&Da(cc,function(a){a.adjustTickAmount()}),Fb=null}function aa(a){var b,c=$b.isDirtyLegend,d=$b.isDirtyBox,e=dc.length,f=e,g=$b.clipRect;for(u(a,$b);f--;)if(a=dc[f],a.isDirty&&a.options.stacking){b=!0;break}if(b)for(f=e;f--;)a=dc[f],a.options.stacking&&(a.isDirty=!0);Da(dc,function(a){a.isDirty&&(a.cleanData(),a.getSegments(),"point"===a.options.legendType&&(c=!0))}),c&&Bb.renderLegend&&(Bb.renderLegend(),$b.isDirtyLegend=!1),ac&&(bc||(Fb=null,Da(cc,function(a){a.setScale()})),_(),Mb(),Da(cc,function(a){(a.isDirty||d)&&(a.redraw(),d=!0)})),d&&(Lb(),Ab(),g&&(La(g),g.animate({"width":$b.plotSizeX,"height":$b.plotSizeY}))),Da(dc,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()}),yb&&yb.resetTracker&&yb.resetTracker(),Ja($b,"redraw")}function ba(){var a,b=e.xAxis||{},c=e.yAxis||{};b=j(b),Da(b,function(a,b){a.index=b,a.isX=!0}),c=j(c),Da(c,function(a,b){a.index=b}),cc=b.concat(c),$b.xAxis=[],$b.yAxis=[],cc=Fa(cc,function(b){return a=new v(b),$b[a.isXAxis?"xAxis":"yAxis"].push(a),a}),_()}function ca(a,b){Pa=Ga(e.title,a),Wa=Ga(e.subtitle,b),Da([["title",a,Pa],["subtitle",b,Wa]],function(a){var b=a[0],c=$b[b],d=a[1];a=a[2],c&&d&&(c=c.destroy()),a&&a.text&&!c&&($b[b]=Hb.text(a.text,0,0,a.useHTML).attr({"align":a.align,"class":"highcharts-"+b,"zIndex":1}).css(a.style).add().align(a,!1,Oa))})}function da(){bb=Ca.renderTo,eb=sa+ma++,c(bb)&&(bb=S.getElementById(bb)),bb.innerHTML="",bb.offsetWidth||(cb=bb.cloneNode(0),l(cb,{"position":pa,"top":"-9999px","display":""}),S.body.appendChild(cb)),fb=(cb||bb).offsetWidth,gb=(cb||bb).offsetHeight,$b.chartWidth=hb=Ca.width||fb||600,$b.chartHeight=ib=Ca.height||(gb>19?gb:400),$b.container=db=m(oa,{"className":"highcharts-container"+(Ca.className?" "+Ca.className:""),"id":eb},a({"position":qa,"overflow":ra,"width":hb+ua,"height":ib+ua,"textAlign":"left"},Ca.style),cb||bb),$b.renderer=Hb=Ca.forExport?new Ya(db,hb,ib,!0):new z(db,hb,ib);var d,e;ha&&db.getBoundingClientRect&&(d=function(){l(db,{"left":0,"top":0}),e=db.getBoundingClientRect(),l(db,{"left":-(e.left-b(e.left))+ua,"top":-(e.top-b(e.top))+ua})},d(),Ha(T,"resize",d),Ha($b,"destroy",function(){Ia(T,"resize",d)}))}function fa(){function a(){var a=Ca.width||bb.offsetWidth,c=Ca.height||bb.offsetHeight;a&&c&&((a!==fb||c!==gb)&&(clearTimeout(b),b=setTimeout(function(){Pb(a,c,!1)},100)),fb=a,gb=c)}var b;Ha(T,"resize",a),Ha($b,"destroy",function(){Ia(T,"resize",a)})}function ja(){Ja($b,"endResize",null,function(){bc-=1})}function la(){var c,d=e.labels,f=e.credits;ca(),Bb=$b.legend=new ec,Mb(),Da(cc,function(a){a.setTickPositions(!0)}),_(),Mb(),Lb(),ac&&Da(cc,function(a){a.render()}),$b.seriesGroup||($b.seriesGroup=Hb.g("series-group").attr({"zIndex":3}).add()),Da(dc,function(a){a.translate(),a.setTooltipPoints(),a.render()}),d.items&&Da(d.items,function(){var c=a(d.style,this.style),e=b(c.left)+_a,f=b(c.top)+Xa+12;delete c.left,delete c.top,Hb.text(this.html,e,f).attr({"zIndex":2}).css(c).add()}),$b.toolbar||($b.toolbar=x()),f.enabled&&!$b.credits&&(c=f.href,$b.credits=Hb.text(f.text,0,0).on("click",function(){c&&(location.href=c)}).attr({"align":f.position.align,"zIndex":8}).css(f.style).add().align(f.position)),Ab(),$b.hasRendered=!0,cb&&(bb.appendChild(db),w(cb))}function ya(){var a,b=db&&db.parentNode;if(null!==$b){for(Ja($b,"destroy"),Ia(T,"unload",ya),Ia($b),a=cc.length;a--;)cc[a]=cc[a].destroy();for(a=dc.length;a--;)dc[a]=dc[a].destroy();Da(["title","subtitle","seriesGroup","clipRect","credits","tracker"],function(a){var b=$b[a];b&&($b[a]=b.destroy())}),Da([lb,ob,mb,Bb,rb,Hb,yb],function(a){a&&a.destroy&&a.destroy()}),lb=ob=mb=Bb=rb=Hb=yb=null,db&&(db.innerHTML="",Ia(db),b&&w(db),db=null),clearInterval(Jb);for(a in $b)delete $b[a];$b=null}}function Ba(){ia||T!=T.top||"complete"===S.readyState?(da(),Nb(),Ob(),Da(e.series||[],function(a){E(a)}),$b.inverted=Gb=k(Gb,e.chart.inverted),ba(),$b.render=la,$b.tracker=yb=new A(e.tooltip),la(),Ja($b,"load"),n&&n.apply($b,[$b]),Da($b.callbacks,function(a){a.apply($b,[$b])})):S.attachEvent("onreadystatechange",function(){S.detachEvent("onreadystatechange",Ba),"complete"===S.readyState&&Ba()})}Qa=Ga(Qa,B.xAxis),Ra=Ga(Ra,B.yAxis),B.xAxis=B.yAxis=null,e=Ga(B,e);var Ca=e.chart,Na=Ca.margin;Na=d(Na)?Na:[Na,Na,Na,Na];var Oa,Pa,Wa,Xa,Za,$a,_a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb=k(Ca.marginTop,Na[0]),Tb=k(Ca.marginRight,Na[1]),Ub=k(Ca.marginBottom,Na[2]),Vb=k(Ca.marginLeft,Na[3]),Wb=Ca.spacingTop,Xb=Ca.spacingRight,Yb=Ca.spacingBottom,Zb=Ca.spacingLeft,$b=this,_b=(Na=Ca.events)&&!!Na.click,ac=Ca.showAxes,bc=0,cc=[],dc=[],ec=function(){function c(a,b){var c=a.legendItem,d=a.legendLine,e=a.legendSymbol,f=z.color,g=b?h.itemStyle.color:f,i=b?a.color:f;f=b?a.pointAttr[za]:{"stroke":f,"fill":f},c&&c.css({"fill":g}),d&&d.attr({"stroke":i}),e&&e.attr(f)}function d(a,b,c){var d=a.legendItem,e=a.legendLine,f=a.legendSymbol;a=a.checkbox,d&&d.attr({"x":b,"y":c}),e&&e.translate(b,c-4),f&&f.attr({"x":b+f.xOff,"y":c+f.yOff}),a&&(a.x=b,a.y=c)}function e(){Da(i,function(a){var b=a.checkbox,c=p.alignAttr;b&&l(b,{"left":c.translateX+a.legendItemWidth+b.x-40+ua,"top":c.translateY+b.y-11+ua})})}function f(a){var b,e,f,g,i=a.legendItem;g=a.series||a;var l=g.options,o=l&&l.borderWidth||0;if(!i){if(g=/^(bar|pie|area|column)$/.test(g.type),a.legendItem=i=Hb.text(h.labelFormatter.call(a),0,0).css(a.visible?x:z).on("mouseover",function(){a.setState(Aa),i.css(y)}).on("mouseout",function(){i.css(a.visible?x:z),a.setState()}).on("click",function(){var b=function(){a.setVisible()};a.firePointEvent?a.firePointEvent("legendItemClick",null,b):Ja(a,"legendItemClick",null,b)}).attr({"zIndex":2}).add(p),!g&&l&&l.lineWidth){var s={"stroke-width":l.lineWidth,"zIndex":2};l.dashStyle&&(s.dashstyle=l.dashStyle),a.legendLine=Hb.path([wa,-t-u,0,xa,-u,0]).attr(s).add(p)}g?b=Hb.rect(e=-t-u,f=-11,t,12,2).attr({"zIndex":3}).add(p):l&&l.marker&&l.marker.enabled&&(b=Hb.symbol(a.symbol,e=-t/2-u,f=-4,l.marker.radius).attr({"zIndex":3}).add(p)),b&&(b.xOff=e+o%2/2,b.yOff=f+o%2/2),a.legendSymbol=b,c(a,a.visible),l&&l.showCheckbox&&(a.checkbox=m("input",{"type":"checkbox","checked":a.selected,"defaultChecked":a.selected},h.itemCheckboxStyle,db),Ha(a.checkbox,"click",function(b){Ja(a,"checkboxClick",{"checked":b.target.checked},function(){a.select()})}))}b=i.getBBox(),e=a.legendItemWidth=h.itemWidth||t+u+b.width+A,D=b.height,r&&j-C+e>(G||hb-2*A-C)&&(j=C,k+=D),n=k,d(a,j,k),r?j+=e:k+=D,q=G||Y(r?j-C:e,q)}function g(){j=C,k=B,n=q=0,p||(p=Hb.g("legend").attr({"zIndex":7}).add()),i=[],Da(H,function(a){var b=a.options;b.showInLegend&&(i=i.concat("point"===b.legendType?a.data:a))}),s(i,function(a,b){return(a.options.legendIndex||0)-(b.options.legendIndex||0)}),I&&i.reverse(),Da(i,f),Cb=G||q,Db=n-B+D,(E||F)&&(Cb+=2*A,Db+=2*A,o?Cb>0&&Db>0&&(o[o.isNew?"attr":"animate"](o.crisp(null,null,null,Cb,Db)),o.isNew=!1):(o=Hb.rect(0,0,Cb,Db,h.borderRadius,E||0).attr({"stroke":h.borderColor,"stroke-width":E||0,"fill":F||va}).add(p).shadow(h.shadow),o.isNew=!0),o[i.length?"show":"hide"]());for(var c,d=["left","right","top","bottom"],g=4;g--;)c=d[g],v[c]&&"auto"!==v[c]&&(h[2>g?"align":"verticalAlign"]=c,h[2>g?"x":"y"]=b(v[c])*(g%2?-1:1));i.length&&p.align(a(h,{"width":Cb,"height":Db}),!0,Oa),bc||e()}var h=$b.options.legend;if(h.enabled){var i,j,k,n,o,p,q,r="horizontal"===h.layout,t=h.symbolWidth,u=h.symbolPadding,v=h.style,x=h.itemStyle,y=h.itemHoverStyle,z=h.itemHiddenStyle,A=b(v.padding),B=18,C=4+A+t+u,D=0,E=h.borderWidth,F=h.backgroundColor,G=h.width,H=$b.series,I=h.reversed;return g(),Ha($b,"endResize",e),{"colorizeItem":c,"destroyItem":function(a){var b=a.checkbox;Da(["legendItem","legendLine","legendSymbol"],function(b){a[b]&&a[b].destroy()}),b&&w(a.checkbox)},"renderLegend":g,"destroy":function(){o&&(o=o.destroy()),p&&(p=p.destroy())}}}};if(qb=function(a,b){return a>=0&&xb>=a&&b>=0&&wb>=b},Rb=function(){Ja($b,"selection",{"resetSelection":!0},Qb),$b.toolbar.remove("zoom")},Qb=function(a){var b=B.lang,c=$b.pointCount<100;$b.toolbar.add("zoom",b.resetZoom,b.resetZoomTitle,Rb),!a||a.resetSelection?Da(cc,function(a){a.setExtremes(null,null,!1,c)}):Da(a.xAxis.concat(a.yAxis),function(a){var b=a.axis;$b.tracker[b.isXAxis?"zoomX":"zoomY"]&&b.setExtremes(a.min,a.max,!1,c)}),aa()},Mb=function(){var a,b=e.legend,c=k(b.margin,10),d=b.x,f=b.y,g=b.align,i=b.verticalAlign;Nb(),!$b.title&&!$b.subtitle||h(Sb)||(a=Y($b.title&&!Pa.floating&&!Pa.verticalAlign&&Pa.y||0,$b.subtitle&&!Wa.floating&&!Wa.verticalAlign&&Wa.y||0))&&(Xa=Y(Xa,a+k(Pa.margin,15)+Wb)),b.enabled&&!b.floating&&("right"===g?h(Tb)||(Za=Y(Za,Cb-d+c+Xb)):"left"===g?h(Vb)||(_a=Y(_a,Cb+d+c+Zb)):"top"===i?h(Sb)||(Xa=Y(Xa,Db+f+c+Wb)):"bottom"===i&&(h(Ub)||($a=Y($a,Db-f+c+Yb)))),ac&&Da(cc,function(a){a.getOffset()}),h(Vb)||(_a+=ab[3]),h(Sb)||(Xa+=ab[0]),h(Ub)||($a+=ab[2]),h(Tb)||(Za+=ab[1]),Ob()},Pb=function(a,b,c){var d=$b.title,e=$b.subtitle;bc+=1,u(c,$b),kb=ib,jb=hb,$b.chartWidth=hb=V(a),$b.chartHeight=ib=V(b),l(db,{"width":hb+ua,"height":ib+ua}),Hb.setSize(hb,ib,c),xb=hb-_a-Za,wb=ib-Xa-$a,Fb=null,Da(cc,function(a){a.isDirty=!0,a.setScale()}),Da(dc,function(a){a.isDirty=!0}),$b.isDirtyLegend=!0,$b.isDirtyBox=!0,Mb(),d&&d.align(null,null,Oa),e&&e.align(null,null,Oa),aa(c),kb=null,Ja($b,"resize"),D===!1?ja():setTimeout(ja,D&&D.duration||500)},Ob=function(){$b.plotLeft=_a=V(_a),$b.plotTop=Xa=V(Xa),$b.plotWidth=xb=V(hb-_a-Za),$b.plotHeight=wb=V(ib-Xa-$a),$b.plotSizeX=Gb?wb:xb,$b.plotSizeY=Gb?xb:wb,Oa={"x":Zb,"y":Wb,"width":hb-Zb-Xb,"height":ib-Wb-Yb}},Nb=function(){Xa=k(Sb,Wb),Za=k(Tb,Xb),$a=k(Ub,Yb),_a=k(Vb,Zb),ab=[0,0,0,0]},Lb=function(){var a,b=Ca.borderWidth||0,c=Ca.backgroundColor,d=Ca.plotBackgroundColor,e=Ca.plotBackgroundImage,f={"x":_a,"y":Xa,"width":xb,"height":wb};a=b+(Ca.shadow?8:0),(b||c)&&(lb?lb.animate(lb.crisp(null,null,null,hb-a,ib-a)):lb=Hb.rect(a/2,a/2,hb-a,ib-a,Ca.borderRadius,b).attr({"stroke":Ca.borderColor,"stroke-width":b,"fill":c||va}).add().shadow(Ca.shadow)),d&&(mb?mb.animate(f):mb=Hb.rect(_a,Xa,xb,wb,0).attr({"fill":d}).add().shadow(Ca.plotShadow)),e&&(nb?nb.animate(f):nb=Hb.image(e,_a,Xa,xb,wb).add()),Ca.plotBorderWidth&&(ob?ob.animate(ob.crisp(null,_a,Xa,xb,wb)):ob=Hb.rect(_a,Xa,xb,wb,0,Ca.plotBorderWidth).attr({"stroke":Ca.plotBorderColor,"stroke-width":Ca.plotBorderWidth,"zIndex":4}).add()),$b.isDirtyBox=!1},Ha(T,"unload",ya),Ca.reflow!==!1&&Ha($b,"load",fa),Na)for(pb in Na)Ha($b,pb,Na[pb]);$b.options=e,$b.series=dc,$b.addSeries=function(a,b,c){var d;return a&&(u(c,$b),b=k(b,!0),Ja($b,"addSeries",{"options":a},function(){d=E(a),d.isDirty=!0,$b.isDirtyLegend=!0,b&&$b.redraw()})),d},$b.animation=k(Ca.animation,!0),$b.destroy=ya,$b.get=function(a){var b,c,d;for(b=0;b<cc.length;b++)if(cc[b].options.id===a)return cc[b];for(b=0;b<dc.length;b++)if(dc[b].options.id===a)return dc[b];for(b=0;b<dc.length;b++)for(d=dc[b].data,c=0;c<d.length;c++)if(d[c].id===a)return d[c];return null},$b.getSelectedPoints=function(){var a=[];return Da(dc,function(b){a=a.concat(Ea(b.data,function(a){return a.selected}));
}),a},$b.getSelectedSeries=function(){return Ea(dc,function(a){return a.selected})},$b.hideLoading=function(){Ka(tb,{"opacity":0},{"duration":e.loading.hideDuration,"complete":function(){l(tb,{"display":va})}}),vb=!1},$b.isInsidePlot=qb,$b.redraw=aa,$b.setSize=Pb,$b.setTitle=ca,$b.showLoading=function(b){var c=e.loading;tb||(tb=m(oa,{"className":"highcharts-loading"},a(c.style,{"left":_a+ua,"top":Xa+ua,"width":xb+ua,"height":wb+ua,"zIndex":10,"display":va}),db),ub=m("span",null,c.labelStyle,tb)),ub.innerHTML=b||e.lang.loading,vb||(l(tb,{"opacity":0,"display":""}),Ka(tb,{"opacity":c.style.opacity},{"duration":c.showDuration}),vb=!0)},$b.pointCount=0,$b.counters=new q,Ba()}var z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S=document,T=window,U=Math,V=U.round,W=U.floor,X=U.ceil,Y=U.max,Z=U.min,$=U.abs,_=U.cos,aa=U.sin,ba=U.PI,ca=2*ba/360,da=navigator.userAgent,ea=/msie/i.test(da)&&!T.opera,fa=8===S.documentMode,ga=/AppleWebKit/.test(da),ha=/Firefox/.test(da),ia=!!S.createElementNS&&!!S.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,ja=ha&&parseInt(da.split("Firefox/")[1],10)<4,ka=void 0!==S.documentElement.ontouchstart,la={},ma=0,na=1,oa="div",pa="absolute",qa="relative",ra="hidden",sa="highcharts-",ta="visible",ua="px",va="none",wa="M",xa="L",ya="rgba(192,192,192,"+(ia?1e-6:.002)+")",za="",Aa="hover",Ba=T.HighchartsAdapter,Ca=Ba||{},Da=Ca.each,Ea=Ca.grep,Fa=Ca.map,Ga=Ca.merge,Ha=Ca.addEvent,Ia=Ca.removeEvent,Ja=Ca.fireEvent,Ka=Ca.animate,La=Ca.stop,Ma={};if(C=function(a,b,c){function d(a){return a.toString().replace(/^([0-9])$/,"0$1")}if(!h(b)||isNaN(b))return"Invalid date";a=k(a,"%Y-%m-%d %H:%M:%S"),b=new Date(b*na);var e,f=b[I](),g=b[J](),i=b[K](),j=b[L](),l=b[M](),m=B.lang,n=m.weekdays;b={"a":n[g].substr(0,3),"A":n[g],"d":d(i),"e":i,"b":m.shortMonths[j],"B":m.months[j],"m":d(j+1),"y":l.toString().substr(2,2),"Y":l,"H":d(f),"I":d(f%12||12),"l":f%12||12,"M":d(b[H]()),"p":12>f?"AM":"PM","P":12>f?"am":"pm","S":d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a},q.prototype={"wrapColor":function(a){this.color>=a&&(this.color=0)},"wrapSymbol":function(a){this.symbol>=a&&(this.symbol=0)}},E={"init":function(a,b,c){b=b||"";var d,e=a.shift,f=b.indexOf("C")>-1,g=f?7:3;b=b.split(" "),c=[].concat(c);var h,i,j=function(a){for(d=a.length;d--;)a[d]===wa&&a.splice(d+1,0,a[d+1],a[d+2],a[d+1],a[d+2])};if(f&&(j(b),j(c)),a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6)),e&&(c=[].concat(c).splice(0,g).concat(c),a.shift=!1),b.length)for(a=c.length;b.length<a;)e=[].concat(b).splice(b.length-g,g),f&&(e[g-6]=e[g-2],e[g-5]=e[g-1]),b=b.concat(e);return h&&(b=b.concat(h),c=c.concat(i)),[b,c]},"step":function(a,b,c,d){var e=[],f=a.length;if(1===c)e=d;else if(f===b.length&&1>c)for(;f--;)d=parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}},Ba&&Ba.init&&Ba.init(E),!Ba&&T.jQuery){var Na=jQuery;Da=function(a,b){for(var c=0,d=a.length;d>c;c++)if(b.call(a[c],a[c],c,a)===!1)return c},Ea=Na.grep,Fa=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=b.call(a[d],a[d],d,a);return c},Ga=function(){var a=arguments;return Na.extend(!0,null,a[0],a[1],a[2],a[3])},Ha=function(a,b,c){Na(a).bind(b,c)},Ia=function(a,b,c){var d=S.removeEventListener?"removeEventListener":"detachEvent";S[d]&&!a[d]&&(a[d]=function(){}),Na(a).unbind(b,c)},Ja=function(b,c,d,e){var f=Na.Event(c),g="detached"+c;a(f,d),b[c]&&(b[g]=b[c],b[c]=null),Na(b).trigger(f),b[g]&&(b[c]=b[g],b[g]=null),e&&!f.isDefaultPrevented()&&e(f)},Ka=function(a,b,c){var d=Na(a);b.d&&(a.toD=b.d,b.d=1),d.stop(),d.animate(b,c)},La=function(a){Na(a).stop()},Na.extend(Na.easing,{"easeOutQuad":function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var Oa=jQuery.fx,Pa=Oa.step;Da(["cur","_default","width","height"],function(a,b){var c,d=b?Pa:Oa.prototype,e=d[a];e&&(d[a]=function(a){return a=b?a:this,c=a.elem,c.attr?c.attr(a.prop,a.now):e.apply(this,arguments)})}),Pa.d=function(a){var b=a.elem;if(!a.started){var c=E.init(b,b.d,b.toD);a.start=c[0],a.end=c[1],a.started=!0}b.attr("d",E.step(a.start,a.end,a.pos,b.toD))}}Ba={"enabled":!0,"align":"center","x":0,"y":15,"style":{"color":"#666","fontSize":"11px","lineHeight":"14px"}},B={"colors":["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],"symbols":["circle","diamond","square","triangle","triangle-down"],"lang":{"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"decimalPoint":".","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","thousandsSep":","},"global":{"useUTC":!0},"chart":{"borderColor":"#4572A7","borderRadius":5,"defaultSeriesType":"line","ignoreHiddenSeries":!0,"spacingTop":10,"spacingRight":10,"spacingBottom":15,"spacingLeft":10,"style":{"fontFamily":'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',"fontSize":"12px"},"backgroundColor":"#FFFFFF","plotBorderColor":"#C0C0C0"},"title":{"text":"Chart title","align":"center","y":15,"style":{"color":"#3E576F","fontSize":"16px"}},"subtitle":{"text":"","align":"center","y":30,"style":{"color":"#6D869F"}},"plotOptions":{"line":{"allowPointSelect":!1,"showCheckbox":!1,"animation":{"duration":1e3},"events":{},"lineWidth":2,"shadow":!0,"marker":{"enabled":!0,"lineWidth":0,"radius":4,"lineColor":"#FFFFFF","states":{"hover":{},"select":{"fillColor":"#FFFFFF","lineColor":"#000000","lineWidth":2}}},"point":{"events":{}},"dataLabels":Ga(Ba,{"enabled":!1,"y":-6,"formatter":function(){return this.y}}),"showInLegend":!0,"states":{"hover":{"marker":{}},"select":{"marker":{}}},"stickyTracking":!0}},"labels":{"style":{"position":pa,"color":"#3E576F"}},"legend":{"enabled":!0,"align":"center","layout":"horizontal","labelFormatter":function(){return this.name},"borderWidth":1,"borderColor":"#909090","borderRadius":5,"shadow":!1,"style":{"padding":"5px"},"itemStyle":{"cursor":"pointer","color":"#3E576F"},"itemHoverStyle":{"cursor":"pointer","color":"#000000"},"itemHiddenStyle":{"color":"#C0C0C0"},"itemCheckboxStyle":{"position":pa,"width":"13px","height":"13px"},"symbolWidth":16,"symbolPadding":5,"verticalAlign":"bottom","x":0,"y":0},"loading":{"hideDuration":100,"labelStyle":{"fontWeight":"bold","position":qa,"top":"1em"},"showDuration":100,"style":{"position":pa,"backgroundColor":"white","opacity":.5,"textAlign":"center"}},"tooltip":{"enabled":!0,"backgroundColor":"rgba(255, 255, 255, .85)","borderWidth":2,"borderRadius":5,"shadow":!0,"snap":ka?25:10,"style":{"color":"#333333","fontSize":"12px","padding":"5px","whiteSpace":"nowrap"}},"toolbar":{"itemStyle":{"color":"#4572A7","cursor":"pointer"}},"credits":{"enabled":!0,"text":"Highcharts.com","href":"http://www.highcharts.com","position":{"align":"right","x":-10,"verticalAlign":"bottom","y":-5},"style":{"cursor":"pointer","color":"#909090","fontSize":"10px"}}};var Qa={"dateTimeLabelFormats":{"second":"%H:%M:%S","minute":"%H:%M","hour":"%H:%M","day":"%e. %b","week":"%e. %b","month":"%b '%y","year":"%Y"},"endOnTick":!1,"gridLineColor":"#C0C0C0","labels":Ba,"lineColor":"#C0D0E0","lineWidth":1,"max":null,"min":null,"minPadding":.01,"maxPadding":.01,"minorGridLineColor":"#E0E0E0","minorGridLineWidth":1,"minorTickColor":"#A0A0A0","minorTickLength":2,"minorTickPosition":"outside","startOfWeek":1,"startOnTick":!1,"tickColor":"#C0D0E0","tickLength":5,"tickmarkPlacement":"between","tickPixelInterval":100,"tickPosition":"outside","tickWidth":1,"title":{"align":"middle","style":{"color":"#6D869F","fontWeight":"bold"}},"type":"linear"},Ra=Ga(Qa,{"endOnTick":!0,"gridLineWidth":1,"tickPixelInterval":72,"showLastLabel":!0,"labels":{"align":"right","x":-8,"y":3},"lineWidth":0,"maxPadding":.05,"minPadding":.05,"startOnTick":!0,"tickWidth":0,"title":{"rotation":270,"text":"Y-values"},"stackLabels":{"enabled":!1,"formatter":function(){return this.total},"style":Ba.style}}),Sa={"labels":{"align":"right","x":-8,"y":null},"title":{"rotation":270}},Ta={"labels":{"align":"left","x":8,"y":null},"title":{"rotation":90}},Ua={"labels":{"align":"center","x":0,"y":14},"title":{"rotation":0}},Va=Ga(Ua,{"labels":{"y":-5}}),Wa=B.plotOptions;Ba=Wa.line,Wa.spline=Ga(Ba),Wa.scatter=Ga(Ba,{"lineWidth":0,"states":{"hover":{"lineWidth":0}}}),Wa.area=Ga(Ba,{}),Wa.areaspline=Ga(Wa.area),Wa.column=Ga(Ba,{"borderColor":"#FFFFFF","borderWidth":1,"borderRadius":0,"groupPadding":.2,"marker":null,"pointPadding":.1,"minPointLength":0,"states":{"hover":{"brightness":.1,"shadow":!1},"select":{"color":"#C0C0C0","borderColor":"#000000","shadow":!1}},"dataLabels":{"y":null,"verticalAlign":null}}),Wa.bar=Ga(Wa.column,{"dataLabels":{"align":"left","x":5,"y":0}}),Wa.pie=Ga(Ba,{"borderColor":"#FFFFFF","borderWidth":1,"center":["50%","50%"],"colorByPoint":!0,"dataLabels":{"distance":30,"enabled":!0,"formatter":function(){return this.point.name},"y":5},"legendType":"point","marker":null,"size":"75%","showInLegend":!1,"slicedOffset":10,"states":{"hover":{"brightness":.1,"shadow":!1}}}),v();var Xa=function(a){var c,d=[];return function(a){(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))?d=[b(c[1]),b(c[2]),b(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))&&(d=[b(c[1],16),b(c[2],16),b(c[3],16),1])}(a),{"get":function(b){return d&&!isNaN(d[0])?"rgb"===b?"rgb("+d[0]+","+d[1]+","+d[2]+")":"a"===b?d[3]:"rgba("+d.join(",")+")":a},"brighten":function(a){if(e(a)&&0!==a){var c;for(c=0;3>c;c++)d[c]+=b(255*a),d[c]<0&&(d[c]=0),d[c]>255&&(d[c]=255)}return this},"setOpacity":function(a){return d[3]=a,this}}};x.prototype={"init":function(a,b){this.element=S.createElementNS("http://www.w3.org/2000/svg",b),this.renderer=a},"animate":function(a,b,c){(b=k(b,D,!0))?(b=Ga(b),c&&(b.complete=c),Ka(this,a,b)):(this.attr(a),c&&c())},"attr":function(d,e){var f,g,j,k,m,n,o=this.element,p=o.nodeName,q=this.renderer,r=this.shadows,s=this.htmlNode,t=this;if(c(d)&&h(e)&&(f=d,d={},d[f]=e),c(d))f=d,"circle"===p?f={"x":"cx","y":"cy"}[f]||f:"strokeWidth"===f&&(f="stroke-width"),t=i(o,f)||this[f]||0,"d"!==f&&"visibility"!==f&&(t=parseFloat(t));else for(f in d){if(m=!1,g=d[f],"d"===f)g&&g.join&&(g=g.join(" ")),/(NaN| {2}|^$)/.test(g)&&(g="M 0 0"),this.d=g;else if("x"===f&&"text"===p){for(j=0;j<o.childNodes.length;j++)k=o.childNodes[j],i(k,"x")===i(o,"x")&&i(k,"x",g);this.rotation&&i(o,"transform","rotate("+this.rotation+" "+g+" "+b(d.y||i(o,"y"))+")")}else if("fill"===f)g=q.color(g,o,f);else if("circle"!==p||"x"!==f&&"y"!==f)if("translateX"===f||"translateY"===f||"rotation"===f||"verticalAlign"===f)this[f]=g,this.updateTransform(),m=!0;else if("stroke"===f)g=q.color(g,o,f);else if("dashstyle"===f){if(f="stroke-dasharray",g=g&&g.toLowerCase(),"solid"===g)g=va;else if(g){for(g=g.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),j=g.length;j--;)g[j]=b(g[j])*d["stroke-width"];g=g.join(",")}}else"isTracker"===f?this[f]=g:"width"===f?g=b(g):"align"===f?(f="text-anchor",g={"left":"start","center":"middle","right":"end"}[g]):"title"===f&&(j=S.createElementNS("http://www.w3.org/2000/svg","title"),j.appendChild(S.createTextNode(g)),o.appendChild(j));else f={"x":"cx","y":"cy"}[f]||f;if("strokeWidth"===f&&(f="stroke-width"),ga&&"stroke-width"===f&&0===g&&(g=1e-6),this.symbolName&&/^(x|y|r|start|end|innerR)/.test(f)&&(n||(this.symbolAttr(d),n=!0),m=!0),r&&/^(width|height|visibility|x|y|d)$/.test(f))for(j=r.length;j--;)i(r[j],f,g);if(("width"===f||"height"===f)&&"rect"===p&&0>g&&(g=0),"text"===f?(this.textStr=g,this.added&&q.buildText(this)):m||i(o,f,g),s&&("x"===f||"y"===f||"translateX"===f||"translateY"===f||"visibility"===f)){j=s.length?s:[this],k=j.length;var u;for(u=0;k>u;u++)s=j[u],m=s.getBBox(),s=s.htmlNode,l(s,a(this.styles,{"left":m.x+(this.translateX||0)+ua,"top":m.y+(this.translateY||0)+ua})),"visibility"===f&&l(s,{"visibility":g})}}return t},"symbolAttr":function(a){var b=this;Da(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=k(a[c],b[c])}),b.attr({"d":b.renderer.symbols[b.symbolName](V(2*b.x)/2,V(2*b.y)/2,b.r,{"start":b.start,"end":b.end,"width":b.width,"height":b.height,"innerR":b.innerR})})},"clip":function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},"crisp":function(a,b,c,d,e){var f,g,h={},i={};a=a||this.strokeWidth||0,g=a%2/2,i.x=W(b||this.x||0)+g,i.y=W(c||this.y||0)+g,i.width=W((d||this.width||0)-2*g),i.height=W((e||this.height||0)-2*g),i.strokeWidth=a;for(f in i)this[f]!==i[f]&&(this[f]=h[f]=i[f]);return h},"css":function(b){var c=this.element;c=b&&b.width&&"text"===c.nodeName;var d,e="",f=function(a,b){return"-"+b.toLowerCase()};if(b&&b.color&&(b.fill=b.color),this.styles=b=a(this.styles,b),ea&&!ia)c&&delete b.width,l(this.element,b);else{for(d in b)e+=d.replace(/([A-Z])/g,f)+":"+b[d]+";";this.attr({"style":e})}return c&&this.added&&this.renderer.buildText(this),this},"on":function(a,b){var c=b;return ka&&"click"===a&&(a="touchstart",c=function(a){a.preventDefault(),b()}),this.element["on"+a]=c,this},"translate":function(a,b){return this.attr({"translateX":a,"translateY":b})},"invert":function(){return this.inverted=!0,this.updateTransform(),this},"updateTransform":function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];c&&(a+=this.attr("width"),b+=this.attr("height")),(a||b)&&e.push("translate("+a+","+b+")"),c?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+d+" "+this.x+" "+this.y+")"),e.length&&i(this.element,"transform",e.join(" "))},"toFront":function(){var a=this.element;return a.parentNode.appendChild(a),this},"align":function(a,b,c){a?(this.alignOptions=a,this.alignByTranslate=b,c||this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTranslate),c=k(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};return/^(right|center)$/.test(d)&&(f+=(c.width-(a.width||0))/{"right":1,"center":2}[d]),h[b?"translateX":"x"]=V(f),/^(bottom|middle)$/.test(e)&&(g+=(c.height-(a.height||0))/({"bottom":1,"middle":2}[e]||1)),h[b?"translateY":"y"]=V(g),this[this.placed?"animate":"attr"](h),this.placed=!0,this.alignAttr=h,this},"getBBox":function(){var b,c,d,e=this.rotation,f=e*ca;try{b=a({},this.element.getBBox())}catch(g){b={"width":0,"height":0}}return c=b.width,d=b.height,e&&(b.width=$(d*aa(f))+$(c*_(f)),b.height=$(d*_(f))+$(c*aa(f))),b},"show":function(){return this.attr({"visibility":ta})},"hide":function(){return this.attr({"visibility":ra})},"add":function(a){var c=this.renderer,d=a||c,e=d.element||c.box,f=e.childNodes,g=this.element,j=i(g,"zIndex");if(this.parentInverted=a&&a.inverted,void 0!==this.textStr&&c.buildText(this),a&&this.htmlNode&&(a.htmlNode||(a.htmlNode=[]),a.htmlNode.push(this)),j&&(d.handleZ=!0,j=b(j)),d.handleZ)for(d=0;d<f.length;d++)if(a=f[d],c=i(a,"zIndex"),a!==g&&(b(c)>j||!h(j)&&h(c)))return e.insertBefore(g,a),this;return e.appendChild(g),this.added=!0,this},"safeRemoveChild":function(a){var b=a.parentNode;b&&b.removeChild(a)},"destroy":function(){var a,b,c=this,d=c.element||{},e=c.shadows;if(d.onclick=d.onmouseout=d.onmouseover=d.onmousemove=null,La(c),c.clipPath&&(c.clipPath=c.clipPath.destroy()),c.stops){for(b=0;b<c.stops.length;b++)c.stops[b]=c.stops[b].destroy();c.stops=null}c.safeRemoveChild(d),e&&Da(e,function(a){c.safeRemoveChild(a)}),g(c.renderer.alignedObjects,c);for(a in c)delete c[a];return null},"empty":function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},"shadow":function(a,b){var c,d,e=[],f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(c=1;3>=c;c++)d=f.cloneNode(0),i(d,{"isShadow":"true","stroke":"rgb(0, 0, 0)","stroke-opacity":.05*c,"stroke-width":7-2*c,"transform":"translate"+g,"fill":va}),b?b.element.appendChild(d):f.parentNode.insertBefore(d,f),e.push(d);this.shadows=e}return this}};var Ya=function(){this.init.apply(this,arguments)};Ya.prototype={"Element":x,"init":function(a,b,c,d){var e,f=location;e=this.createElement("svg").attr({"xmlns":"http://www.w3.org/2000/svg","version":"1.1"}),a.appendChild(e.element),this.box=e.element,this.boxWrapper=e,this.alignedObjects=[],this.url=ea?"":f.href.replace(/#.*?$/,""),this.defs=this.createElement("defs").add(),this.forExport=d,this.gradients=[],this.setSize(b,c,!1)},"destroy":function(){var a,b=this.gradients,c=this.defs;if(this.box=null,this.boxWrapper=this.boxWrapper.destroy(),b){for(a=0;a<b.length;a++)this.gradients[a]=b[a].destroy();this.gradients=null}return c&&(this.defs=c.destroy()),this.alignedObjects=null},"createElement":function(a){var b=new this.Element;return b.init(this,a),b},"buildText":function(c){for(var d,e=c.element,f=k(c.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),g=e.childNodes,h=/style="([^"]+)"/,j=/href="([^"]+)"/,n=i(e,"x"),o=c.styles,p=o&&c.useHTML&&!this.forExport,q=c.htmlNode,r=o&&b(o.width),s=o&&o.lineHeight,t=g.length;t--;)e.removeChild(g[t]);if(r&&!c.added&&this.box.appendChild(e),Da(f,function(a,f){var g,k,m=0;a=a.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),g=a.split("|||"),Da(g,function(a){if(""!==a||1===g.length){var o={},p=S.createElementNS("http://www.w3.org/2000/svg","tspan");if(h.test(a)&&i(p,"style",a.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2")),j.test(a)&&(i(p,"onclick",'location.href="'+a.match(j)[1]+'"'),l(p,{"cursor":"pointer"})),a=(a.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">"),p.appendChild(S.createTextNode(a)),m?o.dx=3:o.x=n,m||(f&&(!ia&&c.renderer.forExport&&l(p,{"display":"block"}),k=T.getComputedStyle&&b(T.getComputedStyle(d,null).getPropertyValue("line-height")),(!k||isNaN(k))&&(k=s||d.offsetHeight||18),i(p,"dy",k)),d=p),i(p,o),e.appendChild(p),m++,r){a=a.replace(/-/g,"- ").split(" ");for(var q,t=[];a.length||t.length;)q=e.getBBox().width,o=q>r,o&&1!==a.length?(p.removeChild(p.firstChild),t.unshift(a.pop())):(a=t,t=[],a.length&&(p=S.createElementNS("http://www.w3.org/2000/svg","tspan"),i(p,{"dy":s||16,"x":n}),e.appendChild(p),q>r&&(r=q))),a.length&&p.appendChild(S.createTextNode(a.join(" ").replace(/- /g,"-")))}}})}),p)for(q||(q=c.htmlNode=m("span",null,a(o,{"position":pa,"top":0,"left":0}),this.box.parentNode)),q.innerHTML=c.textStr,t=g.length;t--;)g[t].style.visibility=ra},"crispLine":function(a,b){return a[1]===a[4]&&(a[1]=a[4]=V(a[1])+b%2/2),a[2]===a[5]&&(a[2]=a[5]=V(a[2])+b%2/2),a},"path":function(a){return this.createElement("path").attr({"d":a,"fill":va})},"circle":function(a,b,c){return a=d(a)?a:{"x":a,"y":b,"r":c},this.createElement("circle").attr(a)},"arc":function(a,b,c,e,f,g){return d(a)&&(b=a.y,c=a.r,e=a.innerR,f=a.start,g=a.end,a=a.x),this.symbol("arc",a||0,b||0,c||0,{"innerR":e||0,"start":f||0,"end":g||0})},"rect":function(a,b,c,e,f,g){return d(a)&&(b=a.y,c=a.width,e=a.height,f=a.r,g=a.strokeWidth,a=a.x),f=this.createElement("rect").attr({"rx":f,"ry":f,"fill":va}),f.attr(f.crisp(g,a,b,Y(c,0),Y(e,0)))},"setSize":function(a,b,c){var d=this.alignedObjects,e=d.length;for(this.width=a,this.height=b,this.boxWrapper[k(c,!0)?"animate":"attr"]({"width":a,"height":b});e--;)d[e].align()},"g":function(a){var b=this.createElement("g");return h(a)?b.attr({"class":sa+a}):b},"image":function(b,c,d,e,f){var g={"preserveAspectRatio":va};return arguments.length>1&&a(g,{"x":c,"y":d,"width":e,"height":f}),g=this.createElement("image").attr(g),g.element.setAttributeNS?g.element.setAttributeNS("http://www.w3.org/1999/xlink","href",b):g.element.setAttribute("hc-svg-href",b),g},"symbol":function(b,c,d,e,f){var g,h=this.symbols[b];h=h&&h(V(c),V(d),e,f);var i,j=/^url\((.*?)\)$/;if(h)g=this.path(h),a(g,{"symbolName":b,"x":c,"y":d,"r":e}),f&&a(g,f);else if(j.test(b)){var k=function(a,b){a.attr({"width":b[0],"height":b[1]}).translate(-V(b[0]/2),-V(b[1]/2))};i=b.match(j)[1],b=la[i],g=this.image(i).attr({"x":c,"y":d}),b?k(g,b):(g.attr({"width":0,"height":0}),m("img",{"onload":function(){k(g,la[i]=[this.width,this.height])},"src":i}))}else g=this.circle(c,d,e);return g},"symbols":{"square":function(a,b,c){return c=.707*c,[wa,a-c,b-c,xa,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},"triangle":function(a,b,c){return[wa,a,b-1.33*c,xa,a+c,b+.67*c,a-c,b+.67*c,"Z"]},"triangle-down":function(a,b,c){return[wa,a,b+1.33*c,xa,a-c,b-.67*c,a+c,b-.67*c,"Z"]},"diamond":function(a,b,c){return[wa,a,b-c,xa,a+c,b,a,b+c,a-c,b,"Z"]},"arc":function(a,b,c,d){var e=d.start,f=d.end-1e-6,g=d.innerR,h=_(e),i=aa(e),j=_(f);return f=aa(f),d=d.end-e<ba?0:1,[wa,a+c*h,b+c*i,"A",c,c,0,d,1,a+c*j,b+c*f,xa,a+g*j,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*i,"Z"]}},"clipRect":function(a,b,c,d){var e=sa+ma++,f=this.createElement("clipPath").attr({"id":e}).add(this.defs);return a=this.rect(a,b,c,d,0).add(f),a.id=e,a.clipPath=f,a},"color":function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient,c=sa+ma++;var g,h,j;return g=f.createElement("linearGradient").attr({"id":c,"gradientUnits":"userSpaceOnUse","x1":b[0],"y1":b[1],"x2":b[2],"y2":b[3]}).add(f.defs),f.gradients.push(g),g.stops=[],Da(a.stops,function(a){e.test(a[1])?(d=Xa(a[1]),h=d.get("rgb"),j=d.get("a")):(h=a[1],j=1),a=f.createElement("stop").attr({"offset":a[0],"stop-color":h,"stop-opacity":j}).add(g),g.stops.push(a)}),"url("+this.url+"#"+c+")"}return e.test(a)?(d=Xa(a),i(b,c+"-opacity",d.get("a")),d.get("rgb")):(b.removeAttribute(c+"-opacity"),a)},"text":function(a,b,c,d){var e=B.chart.style;return b=V(k(b,0)),c=V(k(c,0)),a=this.createElement("text").attr({"x":b,"y":c,"text":a}).css({"fontFamily":e.fontFamily,"fontSize":e.fontSize}),a.x=b,a.y=c,a.useHTML=d,a}},z=Ya,ia||(Ca=n(x,{"init":function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",pa,";"];("shape"===b||b===oa)&&d.push("left:0;top:0;width:10px;height:10px;"),fa&&d.push("visibility: ",b===oa?ra:ta),c.push(' style="',d.join(""),'"/>'),b&&(c=b===oa||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=m(c)),this.renderer=a},"add":function(a){var b=this.renderer,c=this.element,d=b.box;return d=a?a.element||a:d,a&&a.inverted&&b.invertChild(c,d),fa&&d.gVis===ra&&l(c,{"visibility":ra}),d.appendChild(c),this.added=!0,this.alignOnAdd&&this.updateTransform(),this},"attr":function(a,b){var d,f,g,j,k,n=this.element||{},o=n.style,p=n.nodeName,q=this.renderer,r=this.symbolName,s=this.shadows,t=this;if(c(a)&&h(b)&&(d=a,a={},a[d]=b),c(a))d=a,t="strokeWidth"===d||"stroke-width"===d?this.strokeweight:this[d];else for(d in a){if(f=a[d],j=!1,r&&/^(x|y|r|start|end|width|height|innerR)/.test(d))k||(this.symbolAttr(a),k=!0),j=!0;else if("d"===d){for(f=f||[],this.d=f.join(" "),g=f.length,j=[];g--;)j[g]=e(f[g])?V(10*f[g])-5:"Z"===f[g]?"x":f[g];if(f=j.join(" ")||"x",n.path=f,s)for(g=s.length;g--;)s[g].path=f;j=!0}else if("zIndex"===d||"visibility"===d){if(fa&&"visibility"===d&&"DIV"===p){for(n.gVis=f,j=n.childNodes,g=j.length;g--;)l(j[g],{"visibility":f});f===ta&&(f=null)}f&&(o[d]=f),j=!0}else/^(width|height)$/.test(d)?(this[d]=f,this.updateClipping?(this[d]=f,this.updateClipping()):o[d]=f,j=!0):/^(x|y)$/.test(d)?(this[d]=f,"SPAN"===n.tagName?this.updateTransform():o[{"x":"left","y":"top"}[d]]=f):"class"===d?n.className=f:"stroke"===d?(f=q.color(f,n,d),d="strokecolor"):"stroke-width"===d||"strokeWidth"===d?(n.stroked=f?!0:!1,d="strokeweight",this[d]=f,e(f)&&(f+=ua)):"dashstyle"===d?((n.getElementsByTagName("stroke")[0]||m(q.prepVML(["<stroke/>"]),null,null,n))[d]=f||"solid",this.dashstyle=f,j=!0):"fill"===d?"SPAN"===p?o.color=f:(n.filled=f!==va?!0:!1,f=q.color(f,n,d),d="fillcolor"):"translateX"===d||"translateY"===d||"rotation"===d||"align"===d?("align"===d&&(d="textAlign"),this[d]=f,this.updateTransform(),j=!0):"text"===d&&(this.bBox=null,n.innerHTML=f,j=!0);if(s&&"visibility"===d)for(g=s.length;g--;)s[g].style[d]=f;j||(fa?n[d]=f:i(n,d,f))}return t},"clip":function(a){var b=this,c=a.members;return c.push(b),b.destroyClip=function(){g(c,b)},b.css(a.getCSS(b.inverted))},"css":function(b){var c=this.element;return(c=b&&"SPAN"===c.tagName&&b.width)&&(delete b.width,this.textWidth=c,this.updateTransform()),this.styles=a(this.styles,b),l(this.element,b),this},"safeRemoveChild":function(a){a.parentNode&&w(a)},"destroy":function(){return this.destroyClip&&this.destroyClip(),x.prototype.destroy.apply(this)},"empty":function(){for(var a,b=this.element.childNodes,c=b.length;c--;)a=b[c],a.parentNode.removeChild(a)},"getBBox":function(){var a=this.element,b=this.bBox;return b||("text"===a.nodeName&&(a.style.position=pa),b=this.bBox={"x":a.offsetLeft,"y":a.offsetTop,"width":a.offsetWidth,"height":a.offsetHeight}),b},"on":function(a,b){return this.element["on"+a]=function(){var a=T.event;a.target=a.srcElement,b(a)},this},"updateTransform":function(){if(this.added){var a=this,c=a.element,d=a.translateX||0,e=a.translateY||0,f=a.x||0,g=a.y||0,i=a.textAlign||"left",j={"left":0,"center":.5,"right":1}[i],k=i&&"left"!==i;if((d||e)&&a.css({"marginLeft":d,"marginTop":e}),a.inverted&&Da(c.childNodes,function(b){a.renderer.invertChild(b,c)}),"SPAN"===c.tagName){var m,n;d=a.rotation;var o;m=0,e=1;var p,q=0;o=b(a.textWidth);var r=a.xCorr||0,s=a.yCorr||0,t=[d,i,c.innerHTML,a.textWidth].join(",");t!==a.cTT&&(h(d)&&(m=d*ca,e=_(m),q=aa(m),l(c,{"filter":d?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-q,", M21=",q,", M22=",e,", sizingMethod='auto expand')"].join(""):va})),m=c.offsetWidth,n=c.offsetHeight,m>o&&(l(c,{"width":o+ua,"display":"block","whiteSpace":"normal"}),m=o),o=V(1.2*(b(c.style.fontSize)||12)),r=0>e&&-m,s=0>q&&-n,p=0>e*q,r+=q*o*(p?1-j:j),s-=e*o*(d?p?j:1-j:1),k&&(r-=m*j*(0>e?-1:1),d&&(s-=n*j*(0>q?-1:1)),l(c,{"textAlign":i})),a.xCorr=r,a.yCorr=s),l(c,{"left":f+r,"top":g+s}),a.cTT=t}}else this.alignOnAdd=!0},"shadow":function(a,c){var d,e,f,g=[],h=this.element,i=this.renderer,j=h.style,k=h.path;if(k&&"string"!=typeof k.value&&(k="x"),a){for(d=1;3>=d;d++)f=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',k,'" coordsize="100,100" style="',h.style.cssText,'" />'],e=m(i.prepVML(f),null,{"left":b(j.left)+1,"top":b(j.top)+1}),f=['<stroke color="black" opacity="',.05*d,'"/>'],m(i.prepVML(f),null,null,e),c?c.element.appendChild(e):h.parentNode.insertBefore(e,h),g.push(e);this.shadows=g}return this}}),Ba=function(){this.init.apply(this,arguments)},Ba.prototype=Ga(Ya.prototype,{"Element":Ca,"isIE8":da.indexOf("MSIE 8.0")>-1,"init":function(a,b,c){var d;this.alignedObjects=[],d=this.createElement(oa),a.appendChild(d.element),this.box=d.element,this.boxWrapper=d,this.setSize(b,c,!1),S.namespaces.hcv||(S.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),S.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},"clipRect":function(b,c,d,e){var f=this.createElement();return a(f,{"members":[],"left":b,"top":c,"width":d,"height":e,"getCSS":function(b){var c=this.top,d=this.left,e=d+this.width,f=c+this.height;return c={"clip":"rect("+V(b?d:c)+"px,"+V(b?f:e)+"px,"+V(b?e:f)+"px,"+V(b?c:d)+"px)"},!b&&fa&&a(c,{"width":e+ua,"height":f+ua}),c},"updateClipping":function(){Da(f.members,function(a){a.css(f.getCSS(a.inverted))})}})},"color":function(a,b,c){var d,e=/^rgba/;if(!a||!a.linearGradient)return e.test(a)&&"IMG"!==b.tagName?(d=Xa(a),a=["<",c,' opacity="',d.get("a"),'"/>'],m(this.prepVML(a),null,null,b),d.get("rgb")):(b=b.getElementsByTagName(c),b.length&&(b[0].opacity=1),a);var f,g,h,i,j,k,l=a.linearGradient;Da(a.stops,function(a,b){e.test(a[1])?(d=Xa(a[1]),f=d.get("rgb"),g=d.get("a")):(f=a[1],g=1),b?(j=f,k=g):(h=f,i=g)}),a=90-180*U.atan((l[3]-l[1])/(l[2]-l[0]))/ba,a=["<",c,' colors="0% ',h,",100% ",j,'" angle="',a,'" opacity="',k,'" o:opacity2="',i,'" type="gradient" focus="100%" />'],m(this.prepVML(a),null,null,b)},"prepVML":function(a){var b=this.isIE8;return a=a.join(""),b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:"),a},"text":function(a,b,c){var d=B.chart.style;return this.createElement("span").attr({"text":a,"x":V(b),"y":V(c)}).css({"whiteSpace":"nowrap","fontFamily":d.fontFamily,"fontSize":d.fontSize})},"path":function(a){return this.createElement("shape").attr({"coordsize":"100 100","d":a})},"circle":function(a,b,c){return this.symbol("circle").attr({"x":a,"y":b,"r":c})},"g":function(a){var b;return a&&(b={"className":sa+a,"class":sa+a}),this.createElement(oa).attr(b)},"image":function(a,b,c,d,e){var f=this.createElement("img").attr({"src":a});return arguments.length>1&&f.css({"left":b,"top":c,"width":d,"height":e}),f},"rect":function(a,b,c,e,f,g){d(a)&&(b=a.y,c=a.width,e=a.height,f=a.r,g=a.strokeWidth,a=a.x);var h=this.symbol("rect");return h.r=f,h.attr(h.crisp(g,a,b,Y(c,0),Y(e,0)))},"invertChild":function(a,c){var d=c.style;l(a,{"flip":"x","left":b(d.width)-10,"top":b(d.height)-10,"rotation":-90})},"symbols":{"arc":function(a,b,c,d){var e=d.start,f=d.end,g=_(e),h=aa(e),i=_(f),j=aa(f);d=d.innerR;var k=.07/c,l=d&&.1/d||0;return f-e===0?["x"]:(k>2*ba-f+e?i=-k:l>f-e&&(i=_(e+l)),["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*i,b+c*j,"at",a-d,b-d,a+d,b+d,a+d*i,b+d*j,a+d*g,b+d*h,"x","e"])},"circle":function(a,b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},"rect":function(a,b,c,d){if(!h(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;return c=Z(c,e,d),[wa,a+c,b,xa,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,xa,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,xa,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,xa,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}}),z=Ba),y.prototype.callbacks=[];var Za=function(){};Za.prototype={"init":function(a,b){var c,d=a.chart.counters;return this.series=a,this.applyOptions(b),this.pointAttr={},a.options.colorByPoint&&(c=a.chart.options.colors,this.options||(this.options={}),this.color=this.options.color=this.color||c[d.color++],d.wrapColor(c.length)),a.chart.pointCount++,this},"applyOptions":function(b){var f=this.series;this.config=b,e(b)||null===b?this.y=b:d(b)&&!e(b.length)?(a(this,b),this.options=b):c(b[0])?(this.name=b[0],this.y=b[1]):e(b[0])&&(this.x=b[0],this.y=b[1]),this.x===F&&(this.x=f.autoIncrement())},"destroy":function(){var a,b=this,c=b.series,d=c.chart.hoverPoints;c.chart.pointCount--,d&&(b.setState(),g(d,b)),b===c.chart.hoverPoint&&b.onMouseOut(),Ia(b),Da(["graphic","tracker","group","dataLabel","connector","shadowGroup"],function(a){b[a]&&b[a].destroy()}),b.legendItem&&b.series.chart.legend.destroyItem(b);for(a in b)b[a]=null},"getLabelConfig":function(){return{"x":this.category,"y":this.y,"series":this.series,"point":this,"percentage":this.percentage,"total":this.total||this.stackTotal}},"select":function(a,b){var c=this,d=c.series.chart;a=k(a,!c.selected),c.firePointEvent(a?"select":"unselect",{"accumulate":b},function(){c.selected=a,c.setState(a&&"select"),b||Da(d.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=!1,a.setState(za),a.firePointEvent("unselect"))})})},"onMouseOver":function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut(),this.firePointEvent("mouseOver"),b&&!b.shared&&b.refresh(this),this.setState(Aa),a.hoverPoint=this},"onMouseOut":function(){this.firePointEvent("mouseOut"),this.setState(),this.series.chart.hoverPoint=null},"tooltipFormatter":function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",a?"":"<b>x = "+(this.name||this.x)+",</b> ","<b>",a?"":"y = ",this.y,"</b>"].join("")},"update":function(a,b,c){var e=this,f=e.series,g=e.graphic,h=f.chart;b=k(b,!0),e.firePointEvent("update",{
"options":a},function(){e.applyOptions(a),d(a)&&(f.getAttribs(),g&&g.attr(e.pointAttr[f.state])),f.isDirty=!0,b&&h.redraw(c)})},"remove":function(a,b){var c=this,d=c.series,e=d.chart,f=d.data;u(b,e),a=k(a,!0),c.firePointEvent("remove",null,function(){g(f,c),c.destroy(),d.isDirty=!0,a&&e.redraw()})},"firePointEvent":function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents(),"click"===a&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}),Ja(this,a,b,c)},"importEvents":function(){if(!this.hasImportedEvents){var a,b=Ga(this.series.options.point,this.options).events;this.events=b;for(a in b)Ha(this,a,b[a]);this.hasImportedEvents=!0}},"setState":function(a){var b=this.series,c=b.options.states,d=Wa[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===!1,g=b.stateMarkerGraphic,h=b.chart,i=this.pointAttr;a=a||za,a===this.state||this.selected&&"select"!==a||c[a]&&c[a].enabled===!1||a&&(f||e&&!d.enabled)||(this.graphic?this.graphic.attr(i[a]):(a&&(g||(b.stateMarkerGraphic=g=h.renderer.circle(0,0,i[a].r).attr(i[a]).add(b.group)),g.translate(this.plotX,this.plotY)),g&&g[a?"show":"hide"]()),this.state=a)}};var $a=function(){};$a.prototype={"isCartesian":!0,"type":"line","pointClass":Za,"pointAttrToOptions":{"stroke":"lineColor","stroke-width":"lineWidth","fill":"fillColor","r":"radius"},"init":function(b,c){var d,e;e=b.series.length,this.chart=b,c=this.setOptions(c),a(this,{"index":e,"options":c,"name":c.name||"Series "+(e+1),"state":za,"pointAttr":{},"visible":c.visible!==!1,"selected":c.selected===!0}),e=c.events;for(d in e)Ha(this,d,e[d]);(e&&e.click||c.point&&c.point.events&&c.point.events.click||c.allowPointSelect)&&(b.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.setData(c.data,!1)},"autoIncrement":function(){var a=this.options,b=this.xIncrement;return b=k(b,a.pointStart,0),this.pointInterval=k(this.pointInterval,a.pointInterval,1),this.xIncrement=b+this.pointInterval,b},"cleanData":function(){var a,b,c,d,e=this.chart,f=this.data,g=e.smallestInterval;if(s(f,function(a,b){return a.x-b.x}),this.options.connectNulls)for(d=f.length-1;d>=0;d--)null===f[d].y&&f[d-1]&&f[d+1]&&f.splice(d,1);for(d=f.length-1;d>=0;d--)f[d-1]&&(c=f[d].x-f[d-1].x,c>0&&(b===F||b>c)&&(b=c,a=d));(g===F||g>b)&&(e.smallestInterval=b),this.closestPoints=a},"getSegments":function(){var a=-1,b=[],c=this.data;Da(c,function(d,e){null===d.y?(e>a+1&&b.push(c.slice(a+1,e)),a=e):e===c.length-1&&b.push(c.slice(a+1,e+1))}),this.segments=b},"setOptions":function(a){var b=this.chart.options.plotOptions;return Ga(b[this.type],b.series,a)},"getColor":function(){var a=this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff",b.wrapColor(a.length)},"getSymbol":function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++],b.wrapSymbol(a.length)},"addPoint":function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a),u(d,h),f&&c&&(f.shift=c),g&&(g.shift=c,g.isArea=!0),b=k(b,!0),e.push(a),c&&e[0].remove(!1),this.getAttribs(),this.isDirty=!0,b&&h.redraw()},"setData":function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;for(c.xIncrement=null,h(e)&&(f.counters.color=e),a=Fa(j(a||[]),function(a){return(new c.pointClass).init(c,a)});g--;)d[g].destroy();c.data=a,c.cleanData(),c.getSegments(),c.getAttribs(),c.isDirty=!0,f.isDirtyBox=!0,k(b,!0)&&f.redraw(!1)},"remove":function(a,b){var c=this,d=c.chart;a=k(a,!0),c.isRemoving||(c.isRemoving=!0,Ja(c,"remove",null,function(){c.destroy(),d.isDirtyLegend=d.isDirtyBox=!0,a&&d.redraw(b)})),c.isRemoving=!1},"translate":function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],i=g.x,j=g.y,k=g.low,l=d.stacks[(0>j?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(i),b&&this.visible&&l&&l[i]&&(k=l[i],i=k.total,k.cum=k=k.cum-j,j=k+j,"percent"===b&&(k=i?100*k/i:0,j=i?100*j/i:0),g.percentage=i?100*g.y/i:0,g.stackTotal=i),h(k)&&(g.yBottom=d.translate(k,0,1,0,1)),null!==j&&(g.plotY=d.translate(j,0,1,0,1)),g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX,g.category=c&&c[g.x]!==F?c[g.x]:g.x}},"setTooltipPoints":function(a){var b,c,d=this.chart,e=d.inverted,f=[],g=V((e?d.plotTop:d.plotLeft)+d.plotSizeX),h=[];a&&(this.tooltipPoints=null),Da(this.segments,function(a){f=f.concat(a)}),this.xAxis&&this.xAxis.reversed&&(f=f.reverse()),Da(f,function(a,d){for(b=f[d-1]?f[d-1]._high+1:0,c=a._high=f[d+1]?W((a.plotX+(f[d+1]?f[d+1].plotX:g))/2):g;c>=b;)h[e?g-b++:b++]=a}),this.tooltipPoints=h},"onMouseOver":function(){var a=this.chart,b=a.hoverSeries;(ka||!a.mouseIsDown)&&(b&&b!==this&&b.onMouseOut(),this.options.events.mouseOver&&Ja(this,"mouseOver"),this.tracker&&this.tracker.toFront(),this.setState(Aa),a.hoverSeries=this)},"onMouseOut":function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut(),this&&a.events.mouseOut&&Ja(this,"mouseOut"),c&&!a.stickyTracking&&c.hide(),this.setState(),b.hoverSeries=null},"animate":function(a){var b=this.chart,c=this.clipRect,e=this.options.animation;e&&!d(e)&&(e={}),a?c.isAnimating||(c.attr("width",0),c.isAnimating=!0):(c.animate({"width":b.plotSizeX},e),this.animate=null)},"drawPoints":function(){var a,b,c,d,e,f,g,h=this.data,i=this.chart;if(this.options.marker.enabled)for(d=h.length;d--;)e=h[d],b=e.plotX,c=e.plotY,g=e.graphic,c===F||isNaN(c)||(a=e.pointAttr[e.selected?"select":za],f=a.r,g?g.animate({"x":b,"y":c,"r":f}):e.graphic=i.renderer.symbol(k(e.marker&&e.marker.symbol,this.symbol),b,c,f).attr(a).add(this.group))},"convertAttribs":function(a,b,c,d){var e,f,g=this.pointAttrToOptions,h={};a=a||{},b=b||{},c=c||{},d=d||{};for(e in g)f=g[e],h[e]=k(a[f],b[e],c[e],d[e]);return h},"getAttribs":function(){var a,b,c,d=this,e=Wa[d.type].marker?d.options.marker:d.options,f=e.states,g=f[Aa],i=d.color,j={"stroke":i,"fill":i},k=d.data,l=[],m=d.pointAttrToOptions;for(d.options.marker?(g.radius=g.radius||e.radius+2,g.lineWidth=g.lineWidth||e.lineWidth+1):g.color=g.color||Xa(g.color||i).brighten(g.brightness).get(),l[za]=d.convertAttribs(e,j),Da([Aa,"select"],function(a){l[a]=d.convertAttribs(f[a],l[za])}),d.pointAttr=l,i=k.length;i--;){if(j=k[i],(e=j.options&&j.options.marker||j.options)&&e.enabled===!1&&(e.radius=0),a=!1,j.options)for(c in m)h(e[m[c]])&&(a=!0);a?(b=[],f=e.states||{},a=f[Aa]=f[Aa]||{},d.options.marker||(a.color=Xa(a.color||j.options.color).brighten(a.brightness||g.brightness).get()),b[za]=d.convertAttribs(e,l[za]),b[Aa]=d.convertAttribs(f[Aa],l[Aa],b[za]),b.select=d.convertAttribs(f.select,l.select,b[za])):b=l,j.pointAttr=b}},"destroy":function(){var a,b,c=this,d=c.chart,e=c.clipRect,f=/\/5[0-9\.]+ (Safari|Mobile)\//.test(da);Ja(c,"destroy"),Ia(c),c.legendItem&&c.chart.legend.destroyItem(c),Da(c.data,function(a){a.destroy()}),e&&e!==d.clipRect&&(c.clipRect=e.destroy()),Da(["area","graph","dataLabelsGroup","group","tracker"],function(b){c[b]&&(a=f&&"group"===b?"hide":"destroy",c[b][a]())}),d.hoverSeries===c&&(d.hoverSeries=null),g(d.series,c);for(b in c)delete c[b]},"drawDataLabels":function(){if(this.options.dataLabels.enabled){var a,c,d,e,f=this.data,g=this.options,i=g.dataLabels,j=this.dataLabelsGroup,l=this.chart,m=l.renderer,n=l.inverted,o=this.type;e=g.stacking;var p="column"===o||"bar"===o,q=null===i.verticalAlign,r=null===i.y;p&&(e?(q&&(i=Ga(i,{"verticalAlign":"middle"})),r&&(i=Ga(i,{"y":{"top":14,"middle":4,"bottom":-6}[i.verticalAlign]}))):q&&(i=Ga(i,{"verticalAlign":"top"}))),j?j.translate(l.plotLeft,l.plotTop):j=this.dataLabelsGroup=m.g("data-labels").attr({"visibility":this.visible?ta:ra,"zIndex":6}).translate(l.plotLeft,l.plotTop).add(),e=i.color,"auto"===e&&(e=null),i.style.color=k(e,this.color,"black"),Da(f,function(e){var f=e.barX,q=f&&f+e.barW/2||e.plotX||-999,s=k(e.plotY,-999),t=e.dataLabel,u=i.align,v=r?e.y>=0?-6:12:i.y;d=i.formatter.call(e.getLabelConfig()),a=(n?l.plotWidth-s:q)+i.x,c=(n?l.plotHeight-q:s)+v,"column"===o&&(a+={"left":-1,"right":1}[u]*e.barW/2||0),n&&e.y<0&&(u="right",a-=10),t?(n&&!i.y&&(c=c+.9*b(t.styles.lineHeight)-t.getBBox().height/2),t.attr({"text":d}).animate({"x":a,"y":c})):h(d)&&(t=e.dataLabel=m.text(d,a,c).attr({"align":u,"rotation":i.rotation,"zIndex":1}).css(i.style).add(j),n&&!i.y&&t.attr({"y":c+.9*b(t.styles.lineHeight)-t.getBBox().height/2})),p&&g.stacking&&t&&(q=e.barY,s=e.barW,e=e.barH,t.align(i,null,{"x":n?l.plotWidth-q-e:f,"y":n?l.plotHeight-f-s:q,"width":n?e:s,"height":n?s:e}))})}},"drawGraph":function(){var a,b,c=this,d=c.options,e=c.graph,f=[],g=c.area,h=c.group,i=d.lineColor||c.color,j=d.lineWidth,l=d.dashStyle,m=c.chart.renderer,n=c.yAxis.getThreshold(d.threshold||0),o=/^area/.test(c.type),p=[],q=[];Da(c.segments,function(a){if(b=[],Da(a,function(e,f){c.getPointSpline?b.push.apply(b,c.getPointSpline(a,e,f)):(b.push(f?xa:wa),f&&d.step&&b.push(e.plotX,a[f-1].plotY),b.push(e.plotX,e.plotY))}),a.length>1?f=f.concat(b):p.push(a[0]),o){var e,g=[],h=b.length;for(e=0;h>e;e++)g.push(b[e]);if(3===h&&g.push(xa,b[1],b[2]),d.stacking&&"areaspline"!==c.type)for(e=a.length-1;e>=0;e--)g.push(a[e].plotX,a[e].yBottom);else g.push(xa,a[a.length-1].plotX,n,xa,a[0].plotX,n);q=q.concat(g)}}),c.graphPath=f,c.singlePoints=p,o&&(a=k(d.fillColor,Xa(c.color).setOpacity(d.fillOpacity||.75).get()),g?g.animate({"d":q}):c.area=c.chart.renderer.path(q).attr({"fill":a}).add(h)),e?(La(e),e.animate({"d":f})):j&&(e={"stroke":i,"stroke-width":j},l&&(e.dashstyle=l),c.graph=m.path(f).attr(e).add(h).shadow(d.shadow))},"render":function(){var a,b,c=this,d=c.chart,e=c.options,f=e.animation,g=f&&c.animate;f=g?f&&f.duration||500:0;var h=c.clipRect,i=d.renderer;h||(h=c.clipRect=!d.hasRendered&&d.clipRect?d.clipRect:i.clipRect(0,0,d.plotSizeX,d.plotSizeY),d.clipRect||(d.clipRect=h)),c.group||(a=c.group=i.g("series"),d.inverted&&(b=function(){a.attr({"width":d.plotWidth,"height":d.plotHeight}).invert()},b(),Ha(d,"resize",b),Ha(c,"destroy",function(){Ia(d,"resize",b)})),a.clip(c.clipRect).attr({"visibility":c.visible?ta:ra,"zIndex":e.zIndex}).translate(d.plotLeft,d.plotTop).add(d.seriesGroup)),c.drawDataLabels(),g&&c.animate(!0),c.drawGraph&&c.drawGraph(),c.drawPoints(),c.options.enableMouseTracking!==!1&&c.drawTracker(),g&&c.animate(),setTimeout(function(){h.isAnimating=!1,(a=c.group)&&h!==d.clipRect&&h.renderer&&(a.clip(c.clipRect=d.clipRect),h.destroy())},f),c.isDirty=!1},"redraw":function(){var a=this.chart,b=this.group;b&&(a.inverted&&b.attr({"width":a.plotWidth,"height":a.plotHeight}),b.animate({"translateX":a.plotLeft,"translateY":a.plotTop})),this.translate(),this.setTooltipPoints(!0),this.render()},"setState":function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth,a=a||za,this.state!==a&&(this.state=a,d[a]&&d[a].enabled===!1||(a&&(b=d[a].lineWidth||b+1),c&&!c.dashstyle&&c.attr({"stroke-width":b},a?0:500)))},"setVisible":function(a,b){var c,d=this.chart,e=this.legendItem,f=this.group,g=this.tracker,h=this.dataLabelsGroup,i=this.data,j=d.options.chart.ignoreHiddenSeries;if(c=this.visible,c=(this.visible=a=a===F?!c:a)?"show":"hide",f&&f[c](),g)g[c]();else for(f=i.length;f--;)g=i[f],g.tracker&&g.tracker[c]();h&&h[c](),e&&d.legend.colorizeItem(this,a),this.isDirty=!0,this.options.stacking&&Da(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)}),j&&(d.isDirtyBox=!0),b!==!1&&d.redraw(),Ja(this,c)},"show":function(){this.setVisible(!0)},"hide":function(){this.setVisible(!1)},"select":function(a){this.selected=a=a===F?!this.selected:a,this.checkbox&&(this.checkbox.checked=a),Ja(this,a?"select":"unselect")},"drawTracker":function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{"cursor":h};var i,j=a.singlePoints;if(d)for(i=d+1;i--;)c[i]===wa&&c.splice(i+1,0,c[i+1]-f,c[i+2],xa),(i&&c[i]===wa||i===d)&&c.splice(i,0,xa,c[i-2]+f,c[i-1]);for(i=0;i<j.length;i++)d=j[i],c.push(wa,d.plotX-f,d.plotY,xa,d.plotX+f,d.plotY);g?g.attr({"d":c}):a.tracker=e.renderer.path(c).attr({"isTracker":!0,"stroke":ya,"fill":va,"stroke-width":b.lineWidth+2*f,"visibility":a.visible?ta:ra,"zIndex":b.zIndex||1}).on(ka?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}},Ba=n($a),Ma.line=Ba,Ba=n($a,{"type":"area"}),Ma.area=Ba,Ba=n($a,{"type":"spline","getPointSpline":function(a,b,c){var d,e,f,g,h=b.plotX,i=b.plotY,j=a[c-1],k=a[c+1];if(c&&c<a.length-1){a=j.plotY,f=k.plotX,k=k.plotY;var l;d=(1.5*h+j.plotX)/2.5,e=(1.5*i+a)/2.5,f=(1.5*h+f)/2.5,g=(1.5*i+k)/2.5,l=(g-e)*(f-h)/(f-d)+i-g,e+=l,g+=l,e>a&&e>i?(e=Y(a,i),g=2*i-e):a>e&&i>e&&(e=Z(a,i),g=2*i-e),g>k&&g>i?(g=Y(k,i),e=2*i-g):k>g&&i>g&&(g=Z(k,i),e=2*i-g),b.rightContX=f,b.rightContY=g}return c?(b=["C",j.rightContX||j.plotX,j.rightContY||j.plotY,d||h,e||i,h,i],j.rightContX=j.rightContY=null):b=[wa,h,i],b}}),Ma.spline=Ba,Ba=n(Ba,{"type":"areaspline"}),Ma.areaspline=Ba;var _a=n($a,{"type":"column","pointAttrToOptions":{"stroke":"borderColor","stroke-width":"borderWidth","fill":"color","r":"borderRadius"},"init":function(){$a.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=!0,b.hasRendered&&Da(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},"translate":function(){var b,c,d=this,e=d.chart,f=d.options,g=f.stacking,i=f.borderWidth,j=0,l=d.xAxis.reversed,m=d.xAxis.categories,n={};$a.prototype.translate.apply(d),Da(e.series,function(a){a.type===d.type&&a.visible&&(a.options.stacking?(b=a.stackKey,n[b]===F&&(n[b]=j++),c=n[b]):c=j++,a.columnIndex=c)});var o=d.data,p=d.closestPoints;m=$(o[1]?o[p].plotX-o[p-1].plotX:e.plotSizeX/(m&&m.length||1)),p=m*f.groupPadding;var q=(m-2*p)/j,r=f.pointWidth,s=h(r)?(q-r)/2:q*f.pointPadding,t=Y(k(r,q-2*s),1),u=s+(p+((l?j-d.columnIndex:d.columnIndex)||0)*q-m/2)*(l?-1:1),v=d.yAxis.getThreshold(f.threshold||0),w=k(f.minPointLength,5);Da(o,function(b){var c,j=b.plotY,k=b.yBottom||v,l=b.plotX+u,m=X(Z(j,k)),n=X(Y(j,k)-m),o=d.yAxis.stacks[(b.y<0?"-":"")+d.stackKey];g&&d.visible&&o&&o[b.x]&&o[b.x].setOffset(u,t),$(n)<w&&(w&&(n=w,m=$(m-v)>w?k-w:v-(v>=j?w:0)),c=m-3),a(b,{"barX":l,"barY":m,"barW":t,"barH":n}),b.shapeType="rect",j=a(e.renderer.Element.prototype.crisp.apply({},[i,l,m,t,n]),{"r":f.borderRadius}),i%2&&(j.y-=1,j.height+=1),b.shapeArgs=j,b.trackerArgs=h(c)&&Ga(b.shapeArgs,{"height":Y(6,n+3),"y":c})})},"getSymbol":function(){},"drawGraph":function(){},"drawPoints":function(){var a,b,c=this,d=c.options,e=c.chart.renderer;Da(c.data,function(f){var g=f.plotY;g===F||isNaN(g)||null===f.y||(a=f.graphic,b=f.shapeArgs,a?(La(a),a.animate(b)):f.graphic=e[f.shapeType](b).attr(f.pointAttr[f.selected?"select":za]).add(c.group).shadow(d.shadow))})},"drawTracker":function(){var a,b,c,d=this,e=d.chart,f=e.renderer,g=+new Date,h=d.options,j=h.cursor,k=j&&{"cursor":j};Da(d.data,function(j){b=j.tracker,a=j.trackerArgs||j.shapeArgs,delete a.strokeWidth,null!==j.y&&(b?b.attr(a):j.tracker=f[j.shapeType](a).attr({"isTracker":g,"fill":ya,"visibility":d.visible?ta:ra,"zIndex":h.zIndex||1}).on(ka?"touchstart":"mouseover",function(a){c=a.relatedTarget||a.fromElement,e.hoverSeries!==d&&i(c,"isTracker")!==g&&d.onMouseOver(),j.onMouseOver()}).on("mouseout",function(a){h.stickyTracking||(c=a.relatedTarget||a.toElement,i(c,"isTracker")!==g&&d.onMouseOut())}).css(k).add(j.group||e.trackerGroup))})},"animate":function(a){var b=this,c=b.data;a||(Da(c,function(a){var c=a.graphic;a=a.shapeArgs,c&&(c.attr({"height":0,"y":b.yAxis.translate(0,0,1)}),c.animate({"height":a.height,"y":a.y},b.options.animation))}),b.animate=null)},"remove":function(){var a=this,b=a.chart;b.hasRendered&&Da(b.series,function(b){b.type===a.type&&(b.isDirty=!0)}),$a.prototype.remove.apply(a,arguments)}});Ma.column=_a,Ba=n(_a,{"type":"bar","init":function(a){a.inverted=this.inverted=!0,_a.prototype.init.apply(this,arguments)}}),Ma.bar=Ba,Ba=n($a,{"type":"scatter","translate":function(){var a=this;$a.prototype.translate.apply(a),Da(a.data,function(b){b.shapeType="circle",b.shapeArgs={"x":b.plotX,"y":b.plotY,"r":a.chart.options.tooltip.snap}})},"drawTracker":function(){var a,b=this,c=b.options.cursor,d=c&&{"cursor":c};Da(b.data,function(c){(a=c.graphic)&&a.attr({"isTracker":!0}).on("mouseover",function(){b.onMouseOver(),c.onMouseOver()}).on("mouseout",function(){b.options.stickyTracking||b.onMouseOut()}).css(d)})},"cleanData":function(){}}),Ma.scatter=Ba,Ba=n(Za,{"init":function(){Za.prototype.init.apply(this,arguments);var b,c=this;return a(c,{"visible":c.visible!==!1,"name":k(c.name,"Slice")}),b=function(){c.slice()},Ha(c,"select",b),Ha(c,"unselect",b),c},"setVisible":function(a){var b,c=this.series.chart,d=this.tracker,e=this.dataLabel,f=this.connector,g=this.shadowGroup;b=(this.visible=a=a===F?!this.visible:a)?"show":"hide",this.group[b](),d&&d[b](),e&&e[b](),f&&f[b](),g&&g[b](),this.legendItem&&c.legend.colorizeItem(this,a)},"slice":function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;u(c,d),k(b,!0),a=this.sliced=h(a)?a:!this.sliced,a={"translateX":a?e[0]:d.plotLeft,"translateY":a?e[1]:d.plotTop},this.group.animate(a),this.shadowGroup&&this.shadowGroup.animate(a)}}),Ba=n($a,{"type":"pie","isCartesian":!1,"pointClass":Ba,"pointAttrToOptions":{"stroke":"borderColor","stroke-width":"borderWidth","fill":"color"},"getColor":function(){this.initialColor=this.chart.counters.color},"animate":function(){var a=this;Da(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-ba/2;c&&(c.attr({"r":0,"start":d,"end":d}),c.animate({"r":b.r,"start":b.start,"end":b.end},a.options.animation))}),a.animate=null},"translate":function(){var a,c,d,e,f,g,h,i=0,j=-.25,k=this.options,l=k.slicedOffset,m=l+k.borderWidth,n=k.center.concat([k.size,k.innerSize||0]),o=this.chart,p=o.plotWidth,q=o.plotHeight,r=this.data,s=2*ba,t=Z(p,q),u=k.dataLabels.distance;n=Fa(n,function(a,c){return(f=/%$/.test(a))?[p,q,t,t][c]*b(a)/100:a}),this.getX=function(a,b){return d=U.asin((a-n[1])/(n[2]/2+u)),n[0]+(b?-1:1)*_(d)*(n[2]/2+u)},this.center=n,Da(r,function(a){i+=a.y}),Da(r,function(b){e=i?b.y/i:0,a=V(j*s*1e3)/1e3,j+=e,c=V(j*s*1e3)/1e3,b.shapeType="arc",b.shapeArgs={"x":n[0],"y":n[1],"r":n[2]/2,"innerR":n[3]/2,"start":a,"end":c},d=(c+a)/2,b.slicedTranslation=Fa([_(d)*l+o.plotLeft,aa(d)*l+o.plotTop],V),g=_(d)*n[2]/2,h=aa(d)*n[2]/2,b.tooltipPos=[n[0]+.7*g,n[1]+.7*h],b.labelPos=[n[0]+g+_(d)*u,n[1]+h+aa(d)*u,n[0]+g+_(d)*m,n[1]+h+aa(d)*m,n[0]+g,n[1]+h,0>u?"center":s/4>d?"left":"right",d],b.percentage=100*e,b.total=i}),this.setTooltipPoints()},"render":function(){this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),this.drawDataLabels(),this.options.animation&&this.animate&&this.animate(),this.isDirty=!1},"drawPoints":function(){var b,c,d,e,f,g=this.chart,h=g.renderer,i=this.options.shadow;Da(this.data,function(j){c=j.graphic,f=j.shapeArgs,d=j.group,e=j.shadowGroup,i&&!e&&(e=j.shadowGroup=h.g("shadow").attr({"zIndex":4}).add()),d||(d=j.group=h.g("point").attr({"zIndex":5}).add()),b=j.sliced?j.slicedTranslation:[g.plotLeft,g.plotTop],d.translate(b[0],b[1]),e&&e.translate(b[0],b[1]),c?c.animate(f):j.graphic=h.arc(f).attr(a(j.pointAttr[za],{"stroke-linejoin":"round"})).add(j.group).shadow(i,e),j.visible===!1&&j.setVisible(!1)})},"drawDataLabels":function(){var a,c,d,e=this.data,f=this.chart,g=this.options.dataLabels,h=k(g.connectorPadding,10),i=k(g.connectorWidth,1),j=k(g.softConnector,!0),l=g.distance,m=this.center,n=m[2]/2;m=m[1];var o,p,q,r,s,t=l>0,u=[[],[]],v=2;if(g.enabled)for($a.prototype.drawDataLabels.apply(this),Da(e,function(a){a.dataLabel&&u[a.labelPos[7]<ba/2?0:1].push(a)}),u[1].reverse(),r=function(a,b){return b.y-a.y},e=u[0][0]&&u[0][0].dataLabel&&b(u[0][0].dataLabel.styles.lineHeight);v--;){var w,x=[],y=[],z=u[v],A=z.length;for(s=m-n-l;m+n+l>=s;s+=e)x.push(s);if(q=x.length,A>q){for(d=[].concat(z),d.sort(r),s=A;s--;)d[s].rank=s;for(s=A;s--;)z[s].rank>=q&&z.splice(s,1);A=z.length}for(s=0;A>s;s++){for(a=z[s],d=a.labelPos,a=9999,p=0;q>p;p++)c=$(x[p]-d[1]),a>c&&(a=c,w=p);if(s>w&&null!==x[s])w=s;else for(A-s+w>q&&null!==x[s]&&(w=q-A+s);null===x[w];)w++;y.push({"i":w,"y":x[w]}),x[w]=null}for(y.sort(r),s=0;A>s;s++)a=z[s],d=a.labelPos,c=a.dataLabel,p=y.pop(),o=d[1],q=a.visible===!1?ra:ta,w=p.i,p=p.y,(o>p&&null!==x[w+1]||p>o&&null!==x[w-1])&&(p=o),o=this.getX(0===w||w===x.length-1?o:p,v),c.attr({"visibility":q,"align":d[6]})[c.moved?"animate":"attr"]({"x":o+g.x+({"left":h,"right":-h}[d[6]]||0),"y":p+g.y}),c.moved=!0,t&&i&&(c=a.connector,d=j?[wa,o+("left"===d[6]?5:-5),p,"C",o,p,2*d[2]-d[4],2*d[3]-d[5],d[2],d[3],xa,d[4],d[5]]:[wa,o+("left"===d[6]?5:-5),p,xa,d[2],d[3],xa,d[4],d[5]],c?(c.animate({"d":d}),c.attr("visibility",q)):a.connector=c=this.chart.renderer.path(d).attr({"stroke-width":i,"stroke":g.connectorColor||a.color||"#606060","visibility":q,"zIndex":3}).translate(f.plotLeft,f.plotTop).add())}},"drawTracker":_a.prototype.drawTracker,"getSymbol":function(){}}),Ma.pie=Ba,T.Highcharts={"Chart":y,"dateFormat":C,"pathAnim":E,"getOptions":function(){return B},"hasRtlBug":ja,"numberFormat":o,"Point":Za,"Color":Xa,"Renderer":z,"seriesTypes":Ma,"setOptions":function(a){return B=Ga(B,a),v(),B},"Series":$a,"addEvent":Ha,"removeEvent":Ia,"createElement":m,"discardElement":w,"css":l,"each":Da,"extend":a,"map":Fa,"merge":Ga,"pick":k,"extendClass":n,"product":"Highcharts","version":"2.1.9"}}();
!function(a){a.fn.highchartTable=function(){var d=["column","line","area","spline","pie"],e=function(b,c){var d=a(b).data(c);if("undefined"!=typeof d){for(var e=d.split("."),f=window[e[0]],g=1,h=e.length;h>g;g++)f=f[e[g]];return f}};return this.each(function(){var f,g=a(this),h=a(g),i=1,j=a("caption",g),k=j.length?a(j[0]).text():"";if(1!=h.data("graph-container-before")){var l=h.data("graph-container");if(!l)throw"graph-container data attribute is mandatory";if("#"===l[0]||-1===l.indexOf(".."))f=a(l);else{for(var m=g,n=l;-1!==n.indexOf("..");)n=n.replace(/^.. /,""),m=m.parent();f=a(n,m)}if(1!==f.length)throw"graph-container is not available in this DOM or available multiple times";f=f[0]}else h.before("<div></div>"),f=h.prev(),f=f[0];var o=h.data("graph-type");if(!o)throw"graph-type data attribute is mandatory";if(-1==a.inArray(o,d))throw"graph-container data attribute must be one of "+d.join(", ");var p=h.data("graph-stacking");p||(p="normal");var q=h.data("graph-datalabels-enabled"),r=1==h.data("graph-inverted"),s=a("thead th",g),t=[],u=[],v=0,w=!1;s.each(function(b,c){var e=a(c),f=e.data("graph-value-scale"),g=e.data("graph-type");-1==a.inArray(g,d)&&(g=o);var j=e.data("graph-stack-group");j&&(w=!0);var k=e.data("graph-datalabels-enabled");"undefined"==typeof k&&(k=q);var l=e.data("graph-yaxis");"undefined"!=typeof l&&"1"==l&&(i=2);var m=1==e.data("graph-skip");m&&(v+=1);var n={"libelle":e.text(),"skip":m,"indexTd":b-v-1,"color":e.data("graph-color"),"visible":!e.data("graph-hidden"),"yAxis":"undefined"!=typeof l?l:0,"dashStyle":e.data("graph-dash-style")||"solid","dataLabelsEnabled":1==k,"dataLabelsColor":e.data("graph-datalabels-color")||h.data("graph-datalabels-color")},p=e.data("graph-vline-x");"undefined"==typeof p?(n.scale="undefined"!=typeof f?parseFloat(f):1,n.graphType="column"==g&&r?"bar":g,n.stack=j,n.unit=e.data("graph-unit"),t[b]=n):(n.x=p,n.height=e.data("graph-vline-height"),n.name=e.data("graph-vline-name"),u[b]=n)});var x=[];a(t).each(function(a,b){if(0!=a&&!b.skip){var c={"name":b.libelle+(b.unit?" ("+b.unit+")":""),"data":[],"type":b.graphType,"stack":b.stack,"color":b.color,"visible":b.visible,"yAxis":b.yAxis,"dashStyle":b.dashStyle,"marker":{"enabled":!1},"dataLabels":{"enabled":b.dataLabelsEnabled,"color":b.dataLabelsColor,"align":h.data("graph-datalabels-align")||("column"==o&&1==r?void 0:"center")}};if(b.dataLabelsEnabled){var d=e(g,"graph-datalabels-formatter");d&&(c.dataLabels.formatter=function(){return d(this.y)})}x.push(c)}}),a(u).each(function(a,b){"undefined"==typeof b||b.skip||x.push({"name":b.libelle,"data":[{"x":b.x,"y":0,"name":b.name},{"x":b.x,"y":b.height,"name":b.name}],"type":"spline","color":b.color,"visible":b.visible,"marker":{"enabled":!1}})});var y=[],z=e(g,"graph-point-callback"),A="datetime"==h.data("graph-xaxis-type"),B=a("tbody:first tr",g);B.each(function(b,d){if(!a(d).data("graph-skip")){var e=a("td",d);e.each(function(e,f){var g,i=t[e];if(!i.skip){var j=a(f);if(0==e)g=j.text(),y.push(g);else{var k=j.text(),l=x[i.indexTd];if(0==k.length)A||l.data.push(null);else{var m=k.replace(/\s/g,"").replace(/,/,"."),n={"value":m,"rawValue":k,"td":j,"tr":a(d),"indexTd":e,"indexTr":b};h.trigger("highchartTable.cleanValue",n),g=Math.round(parseFloat(n.value)*i.scale*100)/100;var o=j.data("graph-x");if(A){o=a("td",a(d)).first().text();var p=c(o);o=p.getTime()-60*p.getTimezoneOffset()*1e3}var q=j.data("graph-name"),r={"name":"undefined"!=typeof q?q:k,"y":g,"x":o};z&&(r.events={"click":function(){return z(this)}}),"pie"===i.graphType&&j.data("graph-item-highlight")&&(r.sliced=1);var s=j.data("graph-item-color");"undefined"!=typeof s&&(r.color=s),l.data.push(r)}}}})}});var C,D=function(a,b,c){var d=a.data("graph-yaxis-"+b+"-"+c);return"undefined"!=typeof d?d:a.data("graph-yaxis"+b+"-"+c)},E=[];for(C=1;i>=C;C++){var F={"title":{"text":"undefined"!=typeof D(h,C,"title-text")?D(h,C,"title-text"):null},"max":"undefined"!=typeof D(h,C,"max")?D(h,C,"max"):null,"min":"undefined"!=typeof D(h,C,"min")?D(h,C,"min"):null,"reversed":"1"==D(h,C,"reversed"),"opposite":"1"==D(h,C,"opposite"),"tickInterval":D(h,C,"tick-interval")||null,"labels":{"rotation":D(h,C,"rotation")||0},"startOnTick":"0"!=D(h,C,"start-on-tick"),"endOnTick":"0"!=D(h,C,"end-on-tick"),"stackLabels":{"enabled":"1"==D(h,C,"stacklabels-enabled")},"gridLineInterpolation":D(h,C,"grid-line-interpolation")||null},G=e(g,"graph-yaxis-"+C+"-formatter-callback");G||(G=e(g,"graph-yaxis"+C+"-formatter-callback")),G&&(F.labels.formatter=function(){return G(this.value)}),E.push(F)}for(var H=["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],I=[],J="undefined"!=typeof Highcharts.theme&&"undefined"!=typeof Highcharts.theme.colors?Highcharts.theme.colors:[],K=h.data("graph-line-shadow"),L=h.data("graph-line-width")||2,M=Math.max(H.length,J.length),N=0;M>N;N++){var O="graph-color-"+(N+1);I.push("undefined"!=typeof h.data(O)?h.data(O):"undefined"!=typeof J[N]?J[N]:H[N])}var P=h.data("graph-margin-top"),Q=h.data("graph-margin-right"),R=h.data("graph-margin-bottom"),S=h.data("graph-margin-left"),T=h.data("graph-xaxis-labels-enabled"),U={},V=h.data("graph-xaxis-labels-font-size");"undefined"!=typeof V&&(U.fontSize=V);var W={"colors":I,"chart":{"renderTo":f,"inverted":r,"marginTop":"undefined"!=typeof P?P:null,"marginRight":"undefined"!=typeof Q?Q:null,"marginBottom":"undefined"!=typeof R?R:null,"marginLeft":"undefined"!=typeof S?S:null,"spacingTop":h.data("graph-spacing-top")||10,"height":h.data("graph-height")||null,"zoomType":h.data("graph-zoom-type")||null,"polar":h.data("graph-polar")||null},"title":{"text":k},"subtitle":{"text":h.data("graph-subtitle-text")||""},"legend":{"enabled":"1"!=h.data("graph-legend-disabled"),"layout":h.data("graph-legend-layout")||"horizontal","symbolWidth":h.data("graph-legend-width")||30,"x":h.data("graph-legend-x")||15,"y":h.data("graph-legend-y")||0},"xAxis":{"categories":"datetime"!=h.data("graph-xaxis-type")?y:void 0,"type":"datetime"==h.data("graph-xaxis-type")?"datetime":void 0,"reversed":"1"==h.data("graph-xaxis-reversed"),"opposite":"1"==h.data("graph-xaxis-opposite"),"showLastLabel":"undefined"!=typeof h.data("graph-xaxis-show-last-label")?h.data("graph-xaxis-show-last-label"):!0,"tickInterval":h.data("graph-xaxis-tick-interval")||null,"dateTimeLabelFormats":{"second":"%e. %b","minute":"%e. %b","hour":"%e. %b","day":"%e. %b","week":"%e. %b","month":"%e. %b","year":"%e. %b"},"labels":{"rotation":h.data("graph-xaxis-rotation")||void 0,"align":h.data("graph-xaxis-align")||void 0,"enabled":"undefined"!=typeof T?T:!0,"style":U},"startOnTick":h.data("graph-xaxis-start-on-tick"),"endOnTick":h.data("graph-xaxis-end-on-tick"),"min":b(g,"min"),"max":b(g,"max"),"alternateGridColor":h.data("graph-xaxis-alternateGridColor")||null,"title":{"text":h.data("graph-xaxis-title-text")||null},"gridLineWidth":h.data("graph-xaxis-gridLine-width")||0,"gridLineDashStyle":h.data("graph-xaxis-gridLine-style")||"ShortDot","tickmarkPlacement":h.data("graph-xaxis-tickmark-placement")||"between","lineWidth":h.data("graph-xaxis-line-width")||0},"yAxis":E,"tooltip":{"formatter":function(){if("datetime"==h.data("graph-xaxis-type"))return"<b>"+this.series.name+"</b><br/>"+Highcharts.dateFormat("%e. %b",this.x)+" : "+this.y;var a="undefined"!=typeof y[this.point.x]?y[this.point.x]:this.point.x;return"pie"===o?"<strong>"+this.series.name+"</strong><br />"+a+" : "+this.point.y:"<strong>"+this.series.name+"</strong><br />"+a+" : "+this.point.name}},"credits":{"enabled":!1},"plotOptions":{"line":{"dataLabels":{"enabled":!0},"lineWidth":L},"area":{"lineWidth":L,"shadow":"undefined"!=typeof K?K:!0,"fillOpacity":h.data("graph-area-fillOpacity")||.75},"pie":{"allowPointSelect":!0,"dataLabels":{"enabled":!0},"showInLegend":"1"==h.data("graph-pie-show-in-legend"),"size":"80%"},"series":{"animation":!1,"stickyTracking":!1,"stacking":w?p:null,"groupPadding":h.data("graph-group-padding")||0}},"series":x,"exporting":{"filename":k.replace(/ /g,"_"),"buttons":{"exportButton":{"menuItems":null,"onclick":function(){this.exportChart()}}}}};h.trigger("highchartTable.beforeRender",W),new Highcharts.Chart(W)}),this};var b=function(b,d){var e=a(b).data("graph-xaxis-"+d);if("undefined"!=typeof e){if("datetime"==a(b).data("graph-xaxis-type")){var f=c(e);return f.getTime()-60*f.getTimezoneOffset()*1e3}return e}return null},c=function(a){var b=a.split(" "),c=b[0].split("-"),d=null,e=null;if(b[1]){var f=b[1].split(":");d=parseInt(f[0],10),e=parseInt(f[1],10)}return new Date(parseInt(c[0],10),parseInt(c[1],10)-1,parseInt(c[2],10),d,e)}}(jQuery); |
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2022, OpenNebula Project, OpenNebula Systems */
/* */
/* 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. */
/* -------------------------------------------------------------------------- */
define(function(require){
return 'marketplaceapp_info_tab';
});
|
/**
* @providesModule AppContainers
*/
export { IntroContainer } from './Intro';
export { MainContainer } from './Main';
export { MapContainer } from './Map';
export { BrunchDetailContainer } from './BrunchDetail';
export { BrunchgramContainer } from './Brunchgram'; |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
def run_tests(**options):
import django
import sys
from django.conf import settings
from ginger.conf.settings import template_settings
defaults = dict(
MIDDLEWARE_CLASSES=(
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
),
TEMPLATE_DEBUG = True,
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:'
}
},
TEMPLATES = template_settings(dirs=[os.path.join(os.path.dirname(__file__), 'test_templates'),])
)
defaults.update(options)
settings.configure(**defaults)
django.setup()
# Run the test suite, including the extra validation tests.
from django.test.utils import get_runner
TestRunner = get_runner(settings)
test_runner = TestRunner(verbosity=1, interactive=False, failfast=False)
failures = test_runner.run_tests(sys.argv[1:] or settings.INSTALLED_APPS)
return failures
urlpatterns = []
ROOT_URLCONF = 'runtests'
INSTALLED_APPS = [
# 'django_nose',
'ginger',
'ginger.contrib.staging',
]
def main():
failures = run_tests(
INSTALLED_APPS=INSTALLED_APPS,
ROOT_URLCONF=ROOT_URLCONF,
# TEST_RUNNER='django_nose.NoseTestSuiteRunner'
)
sys.exit(failures)
if __name__ == "__main__":
main() |
export { default } from './EditUsers'; |
import time
from src.implementation import util
READER_INDEX = 0
def main():
connection = util.get_connection(READER_INDEX)
# SELECT AID
select_application_capdu = bytes([
0x00, 0xa4, 0x04, 0x00, 0x10, 0xa0, 0x00, 0x00, 0x00, 0x77, 0x01, 0x08, 0x00, 0x07, 0x00, 0x00, 0xFE, 0x00,
0x00, 0x01, 0x00
])
util.send_command(connection, select_application_capdu)
read_start = time.time()
# Select personal data file with FID 0x5000
header = bytes([0x00, 0xA4, 0x01, 0x0C])
data = bytes([0x02, 0x50, 0x00])
command = header + data
util.send_command(connection, command)
for i in range(1, 16):
FID = bytes([0x50, i])
read_entry(connection, FID)
read_end = time.time()
print("Time for reading personal data file: " + str(read_end - read_start) + " s")
def read_entry(connection, FID):
# Select entry with FID
header = bytes([0x00, 0xA4, 0x01, 0x0C])
data = bytes([len(FID)]) + FID
command = header + data
util.send_command(connection, command)
# Read binary
header = bytes([0x00, 0xB0, 0x00, 0x00])
le = bytes([0x00])
command = header + le
response = util.send_command(connection, command)
print("Entry with FID " + util.bh(FID) + ": " + response.decode())
if __name__ == '__main__':
main()
|
# TensorFlow external dependencies that can be loaded in WORKSPACE files.
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/gpus:rocm_configure.bzl", "rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
load("//third_party:nccl/nccl_configure.bzl", "nccl_configure")
load("//third_party/mkl:build_defs.bzl", "mkl_repository")
load("//third_party/git:git_configure.bzl", "git_configure")
load("//third_party/py:python_configure.bzl", "python_configure")
load("//third_party/sycl:sycl_configure.bzl", "sycl_configure")
load("//third_party/systemlibs:syslibs_configure.bzl", "syslibs_configure")
load("//third_party/toolchains/remote:configure.bzl", "remote_execution_configure")
load("//third_party/toolchains/clang6:repo.bzl", "clang6_configure")
load("//third_party/toolchains/cpus/arm:arm_compiler_configure.bzl", "arm_compiler_configure")
load("//third_party:repo.bzl", "tf_http_archive")
load("//third_party/clang_toolchain:cc_configure_clang.bzl", "cc_download_clang_toolchain")
load("@io_bazel_rules_closure//closure/private:java_import_external.bzl", "java_import_external")
load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external")
load(
"//tensorflow/tools/def_file_filter:def_file_filter_configure.bzl",
"def_file_filter_configure",
)
load("//third_party/aws:workspace.bzl", aws = "repo")
load("//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
load("//third_party/highwayhash:workspace.bzl", highwayhash = "repo")
load("//third_party/hwloc:workspace.bzl", hwloc = "repo")
load("//third_party/icu:workspace.bzl", icu = "repo")
load("//third_party/jpeg:workspace.bzl", jpeg = "repo")
load("//third_party/nasm:workspace.bzl", nasm = "repo")
load("//third_party/kissfft:workspace.bzl", kissfft = "repo")
load("//third_party/keras_applications_archive:workspace.bzl", keras_applications = "repo")
load("//third_party/pasta:workspace.bzl", pasta = "repo")
def initialize_third_party():
""" Load third party repositories. See above load() statements. """
aws()
flatbuffers()
highwayhash()
hwloc()
icu()
keras_applications()
kissfft()
jpeg()
nasm()
pasta()
# Sanitize a dependency so that it works correctly from code that includes
# TensorFlow as a submodule.
def clean_dep(dep):
return str(Label(dep))
# If TensorFlow is linked as a submodule.
# path_prefix is no longer used.
# tf_repo_name is thought to be under consideration.
def tf_workspace(path_prefix = "", tf_repo_name = ""):
# Note that we check the minimum bazel version in WORKSPACE.
clang6_configure(name = "local_config_clang6")
cc_download_clang_toolchain(name = "local_config_download_clang")
cuda_configure(name = "local_config_cuda")
tensorrt_configure(name = "local_config_tensorrt")
nccl_configure(name = "local_config_nccl")
git_configure(name = "local_config_git")
sycl_configure(name = "local_config_sycl")
syslibs_configure(name = "local_config_syslibs")
python_configure(name = "local_config_python")
rocm_configure(name = "local_config_rocm")
remote_execution_configure(name = "local_config_remote_execution")
initialize_third_party()
# For windows bazel build
# TODO: Remove def file filter when TensorFlow can export symbols properly on Windows.
def_file_filter_configure(name = "local_config_def_file_filter")
# Point //external/local_config_arm_compiler to //external/arm_compiler
arm_compiler_configure(
name = "local_config_arm_compiler",
build_file = clean_dep("//third_party/toolchains/cpus/arm:BUILD"),
remote_config_repo = "../arm_compiler",
)
mkl_repository(
name = "mkl_linux",
build_file = clean_dep("//third_party/mkl:mkl.BUILD"),
sha256 = "f84f92b047edad0467d68a925410b782e54eac9e7af61f4cc33d3d38b29bee5d",
strip_prefix = "mklml_lnx_2019.0.3.20190125",
urls = [
"https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.18-rc/mklml_lnx_2019.0.3.20190125.tgz",
"https://github.com/intel/mkl-dnn/releases/download/v0.18-rc/mklml_lnx_2019.0.3.20190125.tgz",
],
)
mkl_repository(
name = "mkl_windows",
build_file = clean_dep("//third_party/mkl:mkl.BUILD"),
sha256 = "8f968cdb175242f887efa9a6dbced76e65a584fbb35e5f5b05883a3584a2382a",
strip_prefix = "mklml_win_2019.0.3.20190125",
urls = [
"https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.18-rc/mklml_win_2019.0.3.20190125.zip",
"https://github.com/intel/mkl-dnn/releases/download/v0.18-rc/mklml_win_2019.0.3.20190125.zip",
],
)
mkl_repository(
name = "mkl_darwin",
build_file = clean_dep("//third_party/mkl:mkl.BUILD"),
sha256 = "60d6500f0e1a98f011324180fbf7a51a177f45494b4089e02867684d413c4293",
strip_prefix = "mklml_mac_2019.0.3.20190125",
urls = [
"https://mirror.bazel.build/github.com/intel/mkl-dnn/releases/download/v0.18-rc/mklml_mac_2019.0.3.20190125.tgz",
"https://github.com/intel/mkl-dnn/releases/download/v0.18-rc/mklml_mac_2019.0.3.20190125.tgz",
],
)
if path_prefix:
print("path_prefix was specified to tf_workspace but is no longer used " +
"and will be removed in the future.")
# Important: If you are upgrading MKL-DNN, then update the version numbers
# in third_party/mkl_dnn/mkldnn.BUILD. In addition, the new version of
# MKL-DNN might require upgrading MKL ML libraries also. If they need to be
# upgraded then update the version numbers on all three versions above
# (Linux, Mac, Windows).
tf_http_archive(
name = "mkl_dnn",
build_file = clean_dep("//third_party/mkl_dnn:mkldnn.BUILD"),
sha256 = "4d0522fc609b4194738dbbe14c8ee1546a2736b03886a07f498250cde53f38fb",
strip_prefix = "mkl-dnn-bdd1c7be2cbc0b451d3541ab140742db67f17684",
urls = [
"https://mirror.bazel.build/github.com/intel/mkl-dnn/archive/bdd1c7be2cbc0b451d3541ab140742db67f17684.tar.gz",
"https://github.com/intel/mkl-dnn/archive/bdd1c7be2cbc0b451d3541ab140742db67f17684.tar.gz",
],
)
tf_http_archive(
name = "com_google_absl",
build_file = clean_dep("//third_party:com_google_absl.BUILD"),
sha256 = "e379f50099490d6091cea5a6073f8db533b0a7c6250e0844a8ec54d55fd763e5",
strip_prefix = "abseil-cpp-e75672f6afc7e8f23ee7b532e86d1b3b9be3984e",
urls = [
"https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/e75672f6afc7e8f23ee7b532e86d1b3b9be3984e.tar.gz",
"https://github.com/abseil/abseil-cpp/archive/e75672f6afc7e8f23ee7b532e86d1b3b9be3984e.tar.gz",
],
)
tf_http_archive(
name = "eigen_archive",
build_file = clean_dep("//third_party:eigen.BUILD"),
patch_file = clean_dep("//third_party/eigen3:gpu_packet_math.patch"),
sha256 = "13a8885ab17cadb6c7e55538081f1f31d90e58d6415858d43ea72199bc0f5e22",
strip_prefix = "eigen-eigen-9632304bf806",
urls = [
"https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/9632304bf806.tar.gz",
"https://bitbucket.org/eigen/eigen/get/9632304bf806.tar.gz",
],
)
tf_http_archive(
name = "arm_compiler",
build_file = clean_dep("//:arm_compiler.BUILD"),
sha256 = "970285762565c7890c6c087d262b0a18286e7d0384f13a37786d8521773bc969",
strip_prefix = "tools-0e906ebc527eab1cdbf7adabff5b474da9562e9f/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf",
urls = [
"https://mirror.bazel.build/github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
# Please uncomment me, when the next upgrade happens. Then
# remove the whitelist entry in third_party/repo.bzl.
# "https://github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
],
)
tf_http_archive(
name = "libxsmm_archive",
build_file = clean_dep("//third_party:libxsmm.BUILD"),
sha256 = "cd8532021352b4a0290d209f7f9bfd7c2411e08286a893af3577a43457287bfa",
strip_prefix = "libxsmm-1.9",
urls = [
"https://mirror.bazel.build/github.com/hfp/libxsmm/archive/1.9.tar.gz",
"https://github.com/hfp/libxsmm/archive/1.9.tar.gz",
],
)
tf_http_archive(
name = "com_googlesource_code_re2",
sha256 = "a31397714a353587413d307337d0b58f8a2e20e2b9d02f2e24e3463fa4eeda81",
strip_prefix = "re2-2018-10-01",
system_build_file = clean_dep("//third_party/systemlibs:re2.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/google/re2/archive/2018-10-01.tar.gz",
"https://github.com/google/re2/archive/2018-10-01.tar.gz",
],
)
tf_http_archive(
name = "com_github_googlecloudplatform_google_cloud_cpp",
sha256 = "06bc735a117ec7ea92ea580e7f2ffa4b1cd7539e0e04f847bf500588d7f0fe90",
strip_prefix = "google-cloud-cpp-0.7.0",
system_build_file = clean_dep("//third_party/systemlibs:google_cloud_cpp.BUILD"),
system_link_files = {
"//third_party/systemlibs:google_cloud_cpp.google.cloud.bigtable.BUILD": "google/cloud/bigtable/BUILD",
},
urls = [
"https://mirror.bazel.build/github.com/googleapis/google-cloud-cpp/archive/v0.7.0.tar.gz",
"https://github.com/googleapis/google-cloud-cpp/archive/v0.7.0.tar.gz",
],
)
tf_http_archive(
name = "com_github_googleapis_googleapis",
build_file = clean_dep("//third_party:googleapis.BUILD"),
sha256 = "824870d87a176f26bcef663e92051f532fac756d1a06b404055dc078425f4378",
strip_prefix = "googleapis-f81082ea1e2f85c43649bee26e0d9871d4b41cdb",
system_build_file = clean_dep("//third_party/systemlibs:googleapis.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip",
"https://github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip",
],
)
tf_http_archive(
name = "gemmlowp",
sha256 = "4da5404de25eeda40e7ceb18cf4ac1ce935db91c61ca2b4b84ef9d03e0ad1d4c",
strip_prefix = "gemmlowp-1bf3b9c582c70bddb07b8004fc031d9765684f79",
urls = [
"https://mirror.bazel.build/github.com/google/gemmlowp/archive/1bf3b9c582c70bddb07b8004fc031d9765684f79.zip",
"https://github.com/google/gemmlowp/archive/1bf3b9c582c70bddb07b8004fc031d9765684f79.zip",
],
)
tf_http_archive(
name = "farmhash_archive",
build_file = clean_dep("//third_party:farmhash.BUILD"),
sha256 = "6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0",
strip_prefix = "farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45",
urls = [
"https://mirror.bazel.build/github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz",
"https://github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz",
],
)
tf_http_archive(
name = "png_archive",
build_file = clean_dep("//third_party:png.BUILD"),
patch_file = clean_dep("//third_party:png_fix_rpi.patch"),
sha256 = "e45ce5f68b1d80e2cb9a2b601605b374bdf51e1798ef1c2c2bd62131dfcf9eef",
strip_prefix = "libpng-1.6.34",
system_build_file = clean_dep("//third_party/systemlibs:png.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/glennrp/libpng/archive/v1.6.34.tar.gz",
"https://github.com/glennrp/libpng/archive/v1.6.34.tar.gz",
],
)
tf_http_archive(
name = "org_sqlite",
build_file = clean_dep("//third_party:sqlite.BUILD"),
sha256 = "ad68c1216c3a474cf360c7581a4001e952515b3649342100f2d7ca7c8e313da6",
strip_prefix = "sqlite-amalgamation-3240000",
system_build_file = clean_dep("//third_party/systemlibs:sqlite.BUILD"),
urls = [
"https://mirror.bazel.build/www.sqlite.org/2018/sqlite-amalgamation-3240000.zip",
"https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip",
],
)
tf_http_archive(
name = "gif_archive",
build_file = clean_dep("//third_party:gif.BUILD"),
sha256 = "34a7377ba834397db019e8eb122e551a49c98f49df75ec3fcc92b9a794a4f6d1",
strip_prefix = "giflib-5.1.4",
system_build_file = clean_dep("//third_party/systemlibs:gif.BUILD"),
urls = [
"https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz",
"http://pilotfiber.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz",
],
)
tf_http_archive(
name = "six_archive",
build_file = clean_dep("//third_party:six.BUILD"),
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
strip_prefix = "six-1.10.0",
system_build_file = clean_dep("//third_party/systemlibs:six.BUILD"),
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
],
)
tf_http_archive(
name = "astor_archive",
build_file = clean_dep("//third_party:astor.BUILD"),
sha256 = "95c30d87a6c2cf89aa628b87398466840f0ad8652f88eb173125a6df8533fb8d",
strip_prefix = "astor-0.7.1",
system_build_file = clean_dep("//third_party/systemlibs:astor.BUILD"),
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/99/80/f9482277c919d28bebd85813c0a70117214149a96b08981b72b63240b84c/astor-0.7.1.tar.gz",
"https://pypi.python.org/packages/99/80/f9482277c919d28bebd85813c0a70117214149a96b08981b72b63240b84c/astor-0.7.1.tar.gz",
],
)
tf_http_archive(
name = "gast_archive",
build_file = clean_dep("//third_party:gast.BUILD"),
sha256 = "7068908321ecd2774f145193c4b34a11305bd104b4551b09273dfd1d6a374930",
strip_prefix = "gast-0.2.0",
system_build_file = clean_dep("//third_party/systemlibs:gast.BUILD"),
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz",
"https://pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz",
],
)
tf_http_archive(
name = "termcolor_archive",
build_file = clean_dep("//third_party:termcolor.BUILD"),
sha256 = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b",
strip_prefix = "termcolor-1.1.0",
system_build_file = clean_dep("//third_party/systemlibs:termcolor.BUILD"),
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz",
"https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz",
],
)
tf_http_archive(
name = "absl_py",
sha256 = "595726be4bf3f7e6d64a1a255fa03717b693c01b913768abd52649cbb7ddf2bd",
strip_prefix = "abseil-py-pypi-v0.7.0",
system_build_file = clean_dep("//third_party/systemlibs:absl_py.BUILD"),
system_link_files = {
"//third_party/systemlibs:absl_py.absl.flags.BUILD": "absl/flags/BUILD",
"//third_party/systemlibs:absl_py.absl.testing.BUILD": "absl/testing/BUILD",
},
urls = [
"https://mirror.bazel.build/github.com/abseil/abseil-py/archive/pypi-v0.7.0.tar.gz",
"https://github.com/abseil/abseil-py/archive/pypi-v0.7.0.tar.gz",
],
)
tf_http_archive(
name = "enum34_archive",
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz",
"https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz",
],
sha256 = "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
build_file = clean_dep("//third_party:enum34.BUILD"),
strip_prefix = "enum34-1.1.6/enum",
)
tf_http_archive(
name = "org_python_pypi_backports_weakref",
build_file = clean_dep("//third_party:backports_weakref.BUILD"),
sha256 = "8813bf712a66b3d8b85dc289e1104ed220f1878cf981e2fe756dfaabe9a82892",
strip_prefix = "backports.weakref-1.0rc1/src",
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz",
"https://pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz",
],
)
filegroup_external(
name = "org_python_license",
licenses = ["notice"], # Python 2.0
sha256_urls = {
"7ca8f169368827781684f7f20876d17b4415bbc5cb28baa4ca4652f0dda05e9f": [
"https://mirror.bazel.build/docs.python.org/2.7/_sources/license.rst.txt",
"https://docs.python.org/2.7/_sources/license.rst.txt",
],
},
)
PROTOBUF_URLS = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.6.1.2.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v3.6.1.2.tar.gz",
]
PROTOBUF_SHA256 = "2244b0308846bb22b4ff0bcc675e99290ff9f1115553ae9671eba1030af31bc0"
PROTOBUF_STRIP_PREFIX = "protobuf-3.6.1.2"
tf_http_archive(
name = "protobuf_archive",
sha256 = PROTOBUF_SHA256,
strip_prefix = PROTOBUF_STRIP_PREFIX,
system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"),
system_link_files = {
"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",
},
urls = PROTOBUF_URLS,
)
# We need to import the protobuf library under the names com_google_protobuf
# and com_google_protobuf_cc to enable proto_library support in bazel.
# Unfortunately there is no way to alias http_archives at the moment.
tf_http_archive(
name = "com_google_protobuf",
sha256 = PROTOBUF_SHA256,
strip_prefix = PROTOBUF_STRIP_PREFIX,
system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"),
system_link_files = {
"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",
},
urls = PROTOBUF_URLS,
)
tf_http_archive(
name = "com_google_protobuf_cc",
sha256 = PROTOBUF_SHA256,
strip_prefix = PROTOBUF_STRIP_PREFIX,
system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"),
system_link_files = {
"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",
},
urls = PROTOBUF_URLS,
)
tf_http_archive(
name = "nsync",
sha256 = "704be7f58afa47b99476bbac7aafd1a9db4357cef519db361716f13538547ffd",
strip_prefix = "nsync-1.20.2",
system_build_file = clean_dep("//third_party/systemlibs:nsync.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/google/nsync/archive/1.20.2.tar.gz",
"https://github.com/google/nsync/archive/1.20.2.tar.gz",
],
)
tf_http_archive(
name = "com_google_googletest",
sha256 = "ff7a82736e158c077e76188232eac77913a15dac0b22508c390ab3f88e6d6d86",
strip_prefix = "googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb",
urls = [
"https://mirror.bazel.build/github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip",
"https://github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip",
],
)
tf_http_archive(
name = "com_github_gflags_gflags",
sha256 = "ae27cdbcd6a2f935baa78e4f21f675649271634c092b1be01469440495609d0e",
strip_prefix = "gflags-2.2.1",
urls = [
"https://mirror.bazel.build/github.com/gflags/gflags/archive/v2.2.1.tar.gz",
"https://github.com/gflags/gflags/archive/v2.2.1.tar.gz",
],
)
tf_http_archive(
name = "pcre",
build_file = clean_dep("//third_party:pcre.BUILD"),
sha256 = "69acbc2fbdefb955d42a4c606dfde800c2885711d2979e356c0636efde9ec3b5",
strip_prefix = "pcre-8.42",
system_build_file = clean_dep("//third_party/systemlibs:pcre.BUILD"),
urls = [
"https://mirror.bazel.build/ftp.exim.org/pub/pcre/pcre-8.42.tar.gz",
"http://ftp.exim.org/pub/pcre/pcre-8.42.tar.gz",
],
)
tf_http_archive(
name = "swig",
build_file = clean_dep("//third_party:swig.BUILD"),
sha256 = "58a475dbbd4a4d7075e5fe86d4e54c9edde39847cdb96a3053d87cb64a23a453",
strip_prefix = "swig-3.0.8",
system_build_file = clean_dep("//third_party/systemlibs:swig.BUILD"),
urls = [
"https://mirror.bazel.build/ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
"http://ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
"http://pilotfiber.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
],
)
tf_http_archive(
name = "curl",
build_file = clean_dep("//third_party:curl.BUILD"),
sha256 = "e9c37986337743f37fd14fe8737f246e97aec94b39d1b71e8a5973f72a9fc4f5",
strip_prefix = "curl-7.60.0",
system_build_file = clean_dep("//third_party/systemlibs:curl.BUILD"),
urls = [
"https://mirror.bazel.build/curl.haxx.se/download/curl-7.60.0.tar.gz",
"https://curl.haxx.se/download/curl-7.60.0.tar.gz",
],
)
# WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule
tf_http_archive(
name = "grpc",
sha256 = "e1e3a9edbfbe4230bee174d4aa45a15c1ec2b203cedb02d20df3e6345d8fa63e",
strip_prefix = "grpc-62688b6a05cc85b47fb77dd408611734253e47e2",
system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/62688b6a05cc85b47fb77dd408611734253e47e2.tar.gz",
"https://github.com/grpc/grpc/archive/62688b6a05cc85b47fb77dd408611734253e47e2.tar.gz",
],
)
tf_http_archive(
name = "com_github_nanopb_nanopb",
sha256 = "8bbbb1e78d4ddb0a1919276924ab10d11b631df48b657d960e0c795a25515735",
build_file = "@grpc//third_party:nanopb.BUILD",
strip_prefix = "nanopb-f8ac463766281625ad710900479130c7fcb4d63b",
urls = [
"https://mirror.bazel.build/github.com/nanopb/nanopb/archive/f8ac463766281625ad710900479130c7fcb4d63b.tar.gz",
"https://github.com/nanopb/nanopb/archive/f8ac463766281625ad710900479130c7fcb4d63b.tar.gz",
],
)
tf_http_archive(
name = "linenoise",
build_file = clean_dep("//third_party:linenoise.BUILD"),
sha256 = "7f51f45887a3d31b4ce4fa5965210a5e64637ceac12720cfce7954d6a2e812f7",
strip_prefix = "linenoise-c894b9e59f02203dbe4e2be657572cf88c4230c3",
urls = [
"https://mirror.bazel.build/github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
"https://github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
],
)
# TODO(phawkins): currently, this rule uses an unofficial LLVM mirror.
# Switch to an official source of snapshots if/when possible.
tf_http_archive(
name = "llvm",
build_file = clean_dep("//third_party/llvm:llvm.autogenerated.BUILD"),
sha256 = "8190b719480db70b4f9f69c4ceb12f987aac91e285fe42d2f20f9cfb1082f7c1",
strip_prefix = "llvm-d918576dc5ad47769f452f4863284b37f27455b8",
urls = [
"https://mirror.bazel.build/github.com/llvm-mirror/llvm/archive/d918576dc5ad47769f452f4863284b37f27455b8.tar.gz",
"https://github.com/llvm-mirror/llvm/archive/d918576dc5ad47769f452f4863284b37f27455b8.tar.gz",
],
)
tf_http_archive(
name = "lmdb",
build_file = clean_dep("//third_party:lmdb.BUILD"),
sha256 = "f3927859882eb608868c8c31586bb7eb84562a40a6bf5cc3e13b6b564641ea28",
strip_prefix = "lmdb-LMDB_0.9.22/libraries/liblmdb",
system_build_file = clean_dep("//third_party/systemlibs:lmdb.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz",
"https://github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz",
],
)
tf_http_archive(
name = "jsoncpp_git",
build_file = clean_dep("//third_party:jsoncpp.BUILD"),
sha256 = "c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6",
strip_prefix = "jsoncpp-1.8.4",
system_build_file = clean_dep("//third_party/systemlibs:jsoncpp.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz",
"https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz",
],
)
tf_http_archive(
name = "boringssl",
sha256 = "1188e29000013ed6517168600fc35a010d58c5d321846d6a6dfee74e4c788b45",
strip_prefix = "boringssl-7f634429a04abc48e2eb041c81c5235816c96514",
system_build_file = clean_dep("//third_party/systemlibs:boringssl.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/google/boringssl/archive/7f634429a04abc48e2eb041c81c5235816c96514.tar.gz",
"https://github.com/google/boringssl/archive/7f634429a04abc48e2eb041c81c5235816c96514.tar.gz",
],
)
tf_http_archive(
name = "zlib_archive",
build_file = clean_dep("//third_party:zlib.BUILD"),
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
system_build_file = clean_dep("//third_party/systemlibs:zlib.BUILD"),
urls = [
"https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz",
"https://zlib.net/zlib-1.2.11.tar.gz",
],
)
tf_http_archive(
name = "fft2d",
build_file = clean_dep("//third_party/fft2d:fft2d.BUILD"),
sha256 = "52bb637c70b971958ec79c9c8752b1df5ff0218a4db4510e60826e0cb79b5296",
urls = [
"https://mirror.bazel.build/www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
"http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
],
)
tf_http_archive(
name = "snappy",
build_file = clean_dep("//third_party:snappy.BUILD"),
sha256 = "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4",
strip_prefix = "snappy-1.1.7",
system_build_file = clean_dep("//third_party/systemlibs:snappy.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/google/snappy/archive/1.1.7.tar.gz",
"https://github.com/google/snappy/archive/1.1.7.tar.gz",
],
)
tf_http_archive(
name = "nccl_archive",
build_file = clean_dep("//third_party:nccl/archive.BUILD"),
sha256 = "19132b5127fa8e02d95a09795866923f04064c8f1e0770b2b42ab551408882a4",
strip_prefix = "nccl-f93fe9bfd94884cec2ba711897222e0df5569a53",
urls = [
"https://mirror.bazel.build/github.com/nvidia/nccl/archive/f93fe9bfd94884cec2ba711897222e0df5569a53.tar.gz",
"https://github.com/nvidia/nccl/archive/f93fe9bfd94884cec2ba711897222e0df5569a53.tar.gz",
],
)
tf_http_archive(
name = "kafka",
build_file = clean_dep("//third_party:kafka/BUILD"),
patch_file = clean_dep("//third_party/kafka:config.patch"),
sha256 = "cc6ebbcd0a826eec1b8ce1f625ffe71b53ef3290f8192b6cae38412a958f4fd3",
strip_prefix = "librdkafka-0.11.5",
urls = [
"https://mirror.bazel.build/github.com/edenhill/librdkafka/archive/v0.11.5.tar.gz",
"https://github.com/edenhill/librdkafka/archive/v0.11.5.tar.gz",
],
)
java_import_external(
name = "junit",
jar_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
jar_urls = [
"https://mirror.bazel.build/repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar",
"http://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar",
"http://maven.ibiblio.org/maven2/junit/junit/4.12/junit-4.12.jar",
],
licenses = ["reciprocal"], # Common Public License Version 1.0
testonly_ = True,
deps = ["@org_hamcrest_core"],
)
java_import_external(
name = "org_hamcrest_core",
jar_sha256 = "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9",
jar_urls = [
"https://mirror.bazel.build/repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
"http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
"http://maven.ibiblio.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar",
],
licenses = ["notice"], # New BSD License
testonly_ = True,
)
java_import_external(
name = "com_google_testing_compile",
jar_sha256 = "edc180fdcd9f740240da1a7a45673f46f59c5578d8cd3fbc912161f74b5aebb8",
jar_urls = [
"http://mirror.bazel.build/repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar",
"http://repo1.maven.org/maven2/com/google/testing/compile/compile-testing/0.11/compile-testing-0.11.jar",
],
licenses = ["notice"], # New BSD License
testonly_ = True,
deps = ["@com_google_guava", "@com_google_truth"],
)
java_import_external(
name = "com_google_truth",
jar_sha256 = "032eddc69652b0a1f8d458f999b4a9534965c646b8b5de0eba48ee69407051df",
jar_urls = [
"http://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
"http://repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
],
licenses = ["notice"], # Apache 2.0
testonly_ = True,
deps = ["@com_google_guava"],
)
java_import_external(
name = "org_checkerframework_qual",
jar_sha256 = "a17501717ef7c8dda4dba73ded50c0d7cde440fd721acfeacbf19786ceac1ed6",
jar_urls = [
"http://mirror.bazel.build/repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar",
"http://repo1.maven.org/maven2/org/checkerframework/checker-qual/2.4.0/checker-qual-2.4.0.jar",
],
licenses = ["notice"], # Apache 2.0
)
java_import_external(
name = "com_squareup_javapoet",
jar_sha256 = "5bb5abdfe4366c15c0da3332c57d484e238bd48260d6f9d6acf2b08fdde1efea",
jar_urls = [
"http://mirror.bazel.build/repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar",
"http://repo1.maven.org/maven2/com/squareup/javapoet/1.9.0/javapoet-1.9.0.jar",
],
licenses = ["notice"], # Apache 2.0
)
tf_http_archive(
name = "com_google_pprof",
build_file = clean_dep("//third_party:pprof.BUILD"),
sha256 = "e0928ca4aa10ea1e0551e2d7ce4d1d7ea2d84b2abbdef082b0da84268791d0c4",
strip_prefix = "pprof-c0fb62ec88c411cc91194465e54db2632845b650",
urls = [
"https://mirror.bazel.build/github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz",
"https://github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz",
],
)
tf_http_archive(
name = "cub_archive",
build_file = clean_dep("//third_party:cub.BUILD"),
sha256 = "6bfa06ab52a650ae7ee6963143a0bbc667d6504822cbd9670369b598f18c58c3",
strip_prefix = "cub-1.8.0",
urls = [
"https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.8.0.zip",
"https://github.com/NVlabs/cub/archive/1.8.0.zip",
],
)
tf_http_archive(
name = "cython",
build_file = clean_dep("//third_party:cython.BUILD"),
delete = ["BUILD.bazel"],
sha256 = "bccc9aa050ea02595b2440188813b936eaf345e85fb9692790cecfe095cf91aa",
strip_prefix = "cython-0.28.4",
system_build_file = clean_dep("//third_party/systemlibs:cython.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/cython/cython/archive/0.28.4.tar.gz",
"https://github.com/cython/cython/archive/0.28.4.tar.gz",
],
)
tf_http_archive(
name = "arm_neon_2_x86_sse",
build_file = clean_dep("//third_party:arm_neon_2_x86_sse.BUILD"),
sha256 = "213733991310b904b11b053ac224fee2d4e0179e46b52fe7f8735b8831e04dcc",
strip_prefix = "ARM_NEON_2_x86_SSE-1200fe90bb174a6224a525ee60148671a786a71f",
urls = [
"https://mirror.bazel.build/github.com/intel/ARM_NEON_2_x86_SSE/archive/1200fe90bb174a6224a525ee60148671a786a71f.tar.gz",
"https://github.com/intel/ARM_NEON_2_x86_SSE/archive/1200fe90bb174a6224a525ee60148671a786a71f.tar.gz",
],
)
tf_http_archive(
name = "double_conversion",
build_file = clean_dep("//third_party:double_conversion.BUILD"),
sha256 = "2f7fbffac0d98d201ad0586f686034371a6d152ca67508ab611adc2386ad30de",
strip_prefix = "double-conversion-3992066a95b823efc8ccc1baf82a1cfc73f6e9b8",
system_build_file = clean_dep("//third_party/systemlibs:double_conversion.BUILD"),
urls = [
"https://mirror.bazel.build/github.com/google/double-conversion/archive/3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip",
"https://github.com/google/double-conversion/archive/3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip",
],
)
tf_http_archive(
name = "tflite_mobilenet_float",
build_file = clean_dep("//third_party:tflite_mobilenet_float.BUILD"),
sha256 = "2fadeabb9968ec6833bee903900dda6e61b3947200535874ce2fe42a8493abc0",
urls = [
"http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224.tgz",
"http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224.tgz",
],
)
tf_http_archive(
name = "tflite_mobilenet_quant",
build_file = clean_dep("//third_party:tflite_mobilenet_quant.BUILD"),
sha256 = "d32432d28673a936b2d6281ab0600c71cf7226dfe4cdcef3012555f691744166",
urls = [
"http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224_quant.tgz",
"http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224_quant.tgz",
],
)
tf_http_archive(
name = "tflite_mobilenet_ssd",
build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
sha256 = "767057f2837a46d97882734b03428e8dd640b93236052b312b2f0e45613c1cf0",
urls = [
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip",
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_ssd_tflite_v1.zip",
],
)
tf_http_archive(
name = "tflite_mobilenet_ssd_quant",
build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
sha256 = "a809cd290b4d6a2e8a9d5dad076e0bd695b8091974e0eed1052b480b2f21b6dc",
urls = [
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip",
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_0.75_quant_2018_06_29.zip",
],
)
tf_http_archive(
name = "tflite_mobilenet_ssd_quant_protobuf",
build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
sha256 = "09280972c5777f1aa775ef67cb4ac5d5ed21970acd8535aeca62450ef14f0d79",
strip_prefix = "ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18",
urls = [
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18.tar.gz",
"http://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18.tar.gz",
],
)
tf_http_archive(
name = "tflite_conv_actions_frozen",
build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
sha256 = "d947b38cba389b5e2d0bfc3ea6cc49c784e187b41a071387b3742d1acac7691e",
urls = [
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip",
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/conv_actions_tflite.zip",
],
)
tf_http_archive(
name = "tflite_smartreply",
build_file = clean_dep("//third_party:tflite_smartreply.BUILD"),
sha256 = "8980151b85a87a9c1a3bb1ed4748119e4a85abd3cb5744d83da4d4bd0fbeef7c",
urls = [
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip",
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip",
],
)
tf_http_archive(
name = "tflite_ovic_testdata",
build_file = clean_dep("//third_party:tflite_ovic_testdata.BUILD"),
sha256 = "21288dccc517acee47fa9648d4d3da28bf0fef5381911ed7b4d2ee36366ffa20",
strip_prefix = "ovic",
urls = [
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/data/ovic_2018_10_23.zip",
"https://storage.googleapis.com/download.tensorflow.org/data/ovic_2018_10_23.zip",
],
)
tf_http_archive(
name = "build_bazel_rules_android",
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
strip_prefix = "rules_android-0.1.1",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_android/archive/v0.1.1.zip",
"https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip",
],
)
tf_http_archive(
name = "tbb",
build_file = clean_dep("//third_party/ngraph:tbb.BUILD"),
sha256 = "c3245012296f09f1418b78a8c2f17df5188b3bd0db620f7fd5fabe363320805a",
strip_prefix = "tbb-2019_U1",
urls = [
"https://mirror.bazel.build/github.com/01org/tbb/archive/2019_U1.zip",
"https://github.com/01org/tbb/archive/2019_U1.zip",
],
)
tf_http_archive(
name = "ngraph",
build_file = clean_dep("//third_party/ngraph:ngraph.BUILD"),
sha256 = "a1780f24a1381fc25e323b4b2d08b6ef5129f42e011305b2a34dcf43a48030d5",
strip_prefix = "ngraph-0.11.0",
urls = [
"https://mirror.bazel.build/github.com/NervanaSystems/ngraph/archive/v0.11.0.tar.gz",
"https://github.com/NervanaSystems/ngraph/archive/v0.11.0.tar.gz",
],
)
tf_http_archive(
name = "nlohmann_json_lib",
build_file = clean_dep("//third_party/ngraph:nlohmann_json.BUILD"),
sha256 = "c377963a95989270c943d522bfefe7b889ef5ed0e1e15d535fd6f6f16ed70732",
strip_prefix = "json-3.4.0",
urls = [
"https://mirror.bazel.build/github.com/nlohmann/json/archive/v3.4.0.tar.gz",
"https://github.com/nlohmann/json/archive/v3.4.0.tar.gz",
],
)
tf_http_archive(
name = "ngraph_tf",
build_file = clean_dep("//third_party/ngraph:ngraph_tf.BUILD"),
sha256 = "742a642d2c6622277df4c902b6830d616d0539cc8cd843d6cdb899bb99e66e36",
strip_prefix = "ngraph-tf-0.9.0",
urls = [
"https://mirror.bazel.build/github.com/NervanaSystems/ngraph-tf/archive/v0.9.0.zip",
"https://github.com/NervanaSystems/ngraph-tf/archive/v0.9.0.zip",
],
)
##############################################################################
# BIND DEFINITIONS
#
# Please do not add bind() definitions unless we have no other choice.
# If that ends up being the case, please leave a comment explaining
# why we can't depend on the canonical build target.
# gRPC wants a cares dependency but its contents is not actually
# important since we have set GRPC_ARES=0 in .bazelrc
native.bind(
name = "cares",
actual = "@com_github_nanopb_nanopb//:nanopb",
)
# Needed by Protobuf
native.bind(
name = "grpc_cpp_plugin",
actual = "@grpc//:grpc_cpp_plugin",
)
native.bind(
name = "grpc_python_plugin",
actual = "@grpc//:grpc_python_plugin",
)
native.bind(
name = "grpc_lib",
actual = "@grpc//:grpc++",
)
native.bind(
name = "grpc_lib_unsecure",
actual = "@grpc//:grpc++_unsecure",
)
# Needed by gRPC
native.bind(
name = "libssl",
actual = "@boringssl//:ssl",
)
# Needed by gRPC
native.bind(
name = "nanopb",
actual = "@com_github_nanopb_nanopb//:nanopb",
)
# Needed by gRPC
native.bind(
name = "protobuf",
actual = "@protobuf_archive//:protobuf",
)
# gRPC expects //external:protobuf_clib and //external:protobuf_compiler
# to point to Protobuf's compiler library.
native.bind(
name = "protobuf_clib",
actual = "@protobuf_archive//:protoc_lib",
)
# Needed by gRPC
native.bind(
name = "protobuf_headers",
actual = "@protobuf_archive//:protobuf_headers",
)
# Needed by Protobuf
native.bind(
name = "python_headers",
actual = clean_dep("//third_party/python_runtime:headers"),
)
# Needed by Protobuf
native.bind(
name = "six",
actual = "@six_archive//:six",
)
# Needed by gRPC
native.bind(
name = "zlib",
actual = "@zlib_archive//:zlib",
)
|
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
/**
* CryptoJS core components.
*/
var CryptoJS = CryptoJS || (function (Math, undefined) {
/**
* CryptoJS namespace.
*/
var C = {};
/**
* Library namespace.
*/
var C_lib = C.lib = {};
/**
* Base object for prototypal inheritance.
*/
var Base = C_lib.Base = (function () {
function F() {}
return {
/**
* Creates a new object that inherits from this object.
*
* @param {Object} overrides Properties to copy into the new object.
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* field: 'value',
*
* method: function () {
* }
* });
*/
extend: function (overrides) {
// Spawn
F.prototype = this;
var subtype = new F();
// Augment
if (overrides) {
subtype.mixIn(overrides);
}
// Create default initializer
if (!subtype.hasOwnProperty('init')) {
subtype.init = function () {
subtype.$super.init.apply(this, arguments);
};
}
// Initializer's prototype is the subtype object
subtype.init.prototype = subtype;
// Reference supertype
subtype.$super = this;
return subtype;
},
/**
* Extends this object and runs the init method.
* Arguments to create() will be passed to init().
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var instance = MyType.create();
*/
create: function () {
var instance = this.extend();
instance.init.apply(instance, arguments);
return instance;
},
/**
* Initializes a newly created object.
* Override this method to add some logic when your objects are created.
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* init: function () {
* // ...
* }
* });
*/
init: function () {
},
/**
* Copies properties into this object.
*
* @param {Object} properties The properties to mix in.
*
* @example
*
* MyType.mixIn({
* field: 'value'
* });
*/
mixIn: function (properties) {
for (var propertyName in properties) {
if (properties.hasOwnProperty(propertyName)) {
this[propertyName] = properties[propertyName];
}
}
// IE won't copy toString using the loop above
if (properties.hasOwnProperty('toString')) {
this.toString = properties.toString;
}
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = instance.clone();
*/
clone: function () {
return this.init.prototype.extend(this);
}
};
}());
/**
* An array of 32-bit words.
*
* @property {Array} words The array of 32-bit words.
* @property {number} sigBytes The number of significant bytes in this word array.
*/
var WordArray = C_lib.WordArray = Base.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of 32-bit words.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.create();
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
*/
init: function (words, sigBytes) {
words = this.words = words || [];
if (sigBytes != undefined) {
this.sigBytes = sigBytes;
} else {
this.sigBytes = words.length * 4;
}
},
/**
* Converts this word array to a string.
*
* @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
*
* @return {string} The stringified word array.
*
* @example
*
* var string = wordArray + '';
* var string = wordArray.toString();
* var string = wordArray.toString(CryptoJS.enc.Utf8);
*/
toString: function (encoder) {
return (encoder || Hex).stringify(this);
},
/**
* Concatenates a word array to this word array.
*
* @param {WordArray} wordArray The word array to append.
*
* @return {WordArray} This word array.
*
* @example
*
* wordArray1.concat(wordArray2);
*/
concat: function (wordArray) {
// Shortcuts
var thisWords = this.words;
var thatWords = wordArray.words;
var thisSigBytes = this.sigBytes;
var thatSigBytes = wordArray.sigBytes;
// Clamp excess bits
this.clamp();
// Concat
if (thisSigBytes % 4) {
// Copy one byte at a time
for (var i = 0; i < thatSigBytes; i++) {
var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
}
} else if (thatWords.length > 0xffff) {
// Copy one word at a time
for (var i = 0; i < thatSigBytes; i += 4) {
thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
}
} else {
// Copy all words at once
thisWords.push.apply(thisWords, thatWords);
}
this.sigBytes += thatSigBytes;
// Chainable
return this;
},
/**
* Removes insignificant bits.
*
* @example
*
* wordArray.clamp();
*/
clamp: function () {
// Shortcuts
var words = this.words;
var sigBytes = this.sigBytes;
// Clamp
words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
words.length = Math.ceil(sigBytes / 4);
},
/**
* Creates a copy of this word array.
*
* @return {WordArray} The clone.
*
* @example
*
* var clone = wordArray.clone();
*/
clone: function () {
var clone = Base.clone.call(this);
clone.words = this.words.slice(0);
return clone;
},
/**
* Creates a word array filled with random bytes.
*
* @param {number} nBytes The number of random bytes to generate.
*
* @return {WordArray} The random word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.random(16);
*/
random: function (nBytes) {
var words = [];
for (var i = 0; i < nBytes; i += 4) {
words.push((Math.random() * 0x100000000) | 0);
}
return new WordArray.init(words, nBytes);
}
});
/**
* Encoder namespace.
*/
var C_enc = C.enc = {};
/**
* Hex encoding strategy.
*/
var Hex = C_enc.Hex = {
/**
* Converts a word array to a hex string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The hex string.
*
* @static
*
* @example
*
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var hexChars = [];
for (var i = 0; i < sigBytes; i++) {
var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
hexChars.push((bite >>> 4).toString(16));
hexChars.push((bite & 0x0f).toString(16));
}
return hexChars.join('');
},
/**
* Converts a hex string to a word array.
*
* @param {string} hexStr The hex string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
*/
parse: function (hexStr) {
// Shortcut
var hexStrLength = hexStr.length;
// Convert
var words = [];
for (var i = 0; i < hexStrLength; i += 2) {
words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
}
return new WordArray.init(words, hexStrLength / 2);
}
};
/**
* Latin1 encoding strategy.
*/
var Latin1 = C_enc.Latin1 = {
/**
* Converts a word array to a Latin1 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Latin1 string.
*
* @static
*
* @example
*
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var latin1Chars = [];
for (var i = 0; i < sigBytes; i++) {
var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
latin1Chars.push(String.fromCharCode(bite));
}
return latin1Chars.join('');
},
/**
* Converts a Latin1 string to a word array.
*
* @param {string} latin1Str The Latin1 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
*/
parse: function (latin1Str) {
// Shortcut
var latin1StrLength = latin1Str.length;
// Convert
var words = [];
for (var i = 0; i < latin1StrLength; i++) {
words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
}
return new WordArray.init(words, latin1StrLength);
}
};
/**
* UTF-8 encoding strategy.
*/
var Utf8 = C_enc.Utf8 = {
/**
* Converts a word array to a UTF-8 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-8 string.
*
* @static
*
* @example
*
* var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
*/
stringify: function (wordArray) {
try {
return decodeURIComponent(escape(Latin1.stringify(wordArray)));
} catch (e) {
throw new Error('Malformed UTF-8 data');
}
},
/**
* Converts a UTF-8 string to a word array.
*
* @param {string} utf8Str The UTF-8 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
*/
parse: function (utf8Str) {
return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
}
};
/**
* Abstract buffered block algorithm template.
*
* The property blockSize must be implemented in a concrete subtype.
*
* @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
*/
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
/**
* Resets this block algorithm's data buffer to its initial state.
*
* @example
*
* bufferedBlockAlgorithm.reset();
*/
reset: function () {
// Initial values
this._data = new WordArray.init();
this._nDataBytes = 0;
},
/**
* Adds new data to this block algorithm's buffer.
*
* @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
*
* @example
*
* bufferedBlockAlgorithm._append('data');
* bufferedBlockAlgorithm._append(wordArray);
*/
_append: function (data) {
// Convert string to WordArray, else assume WordArray already
if (typeof data == 'string') {
data = Utf8.parse(data);
}
// Append
this._data.concat(data);
this._nDataBytes += data.sigBytes;
},
/**
* Processes available data blocks.
*
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
*
* @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
*
* @return {WordArray} The processed data.
*
* @example
*
* var processedData = bufferedBlockAlgorithm._process();
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
*/
_process: function (doFlush) {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var dataSigBytes = data.sigBytes;
var blockSize = this.blockSize;
var blockSizeBytes = blockSize * 4;
// Count blocks ready
var nBlocksReady = dataSigBytes / blockSizeBytes;
if (doFlush) {
// Round up to include partial blocks
nBlocksReady = Math.ceil(nBlocksReady);
} else {
// Round down to include only full blocks,
// less the number of blocks that must remain in the buffer
nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
}
// Count words ready
var nWordsReady = nBlocksReady * blockSize;
// Count bytes ready
var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
// Process blocks
if (nWordsReady) {
for (var offset = 0; offset < nWordsReady; offset += blockSize) {
// Perform concrete-algorithm logic
this._doProcessBlock(dataWords, offset);
}
// Remove processed words
var processedWords = dataWords.splice(0, nWordsReady);
data.sigBytes -= nBytesReady;
}
// Return processed words
return new WordArray.init(processedWords, nBytesReady);
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = bufferedBlockAlgorithm.clone();
*/
clone: function () {
var clone = Base.clone.call(this);
clone._data = this._data.clone();
return clone;
},
_minBufferSize: 0
});
/**
* Abstract hasher template.
*
* @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
*/
var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
/**
* Configuration options.
*/
cfg: Base.extend(),
/**
* Initializes a newly created hasher.
*
* @param {Object} cfg (Optional) The configuration options to use for this hash computation.
*
* @example
*
* var hasher = CryptoJS.algo.SHA256.create();
*/
init: function (cfg) {
// Apply config defaults
this.cfg = this.cfg.extend(cfg);
// Set initial values
this.reset();
},
/**
* Resets this hasher to its initial state.
*
* @example
*
* hasher.reset();
*/
reset: function () {
// Reset data buffer
BufferedBlockAlgorithm.reset.call(this);
// Perform concrete-hasher logic
this._doReset();
},
/**
* Updates this hasher with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {Hasher} This hasher.
*
* @example
*
* hasher.update('message');
* hasher.update(wordArray);
*/
update: function (messageUpdate) {
// Append
this._append(messageUpdate);
// Update the hash
this._process();
// Chainable
return this;
},
/**
* Finalizes the hash computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The hash.
*
* @example
*
* var hash = hasher.finalize();
* var hash = hasher.finalize('message');
* var hash = hasher.finalize(wordArray);
*/
finalize: function (messageUpdate) {
// Final message update
if (messageUpdate) {
this._append(messageUpdate);
}
// Perform concrete-hasher logic
var hash = this._doFinalize();
return hash;
},
blockSize: 512/32,
/**
* Creates a shortcut function to a hasher's object interface.
*
* @param {Hasher} hasher The hasher to create a helper for.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
*/
_createHelper: function (hasher) {
return function (message, cfg) {
return new hasher.init(cfg).finalize(message);
};
},
/**
* Creates a shortcut function to the HMAC's object interface.
*
* @param {Hasher} hasher The hasher to use in this HMAC helper.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
*/
_createHmacHelper: function (hasher) {
return function (message, key) {
return new C_algo.HMAC.init(hasher, key).finalize(message);
};
}
});
/**
* Algorithm namespace.
*/
var C_algo = C.algo = {};
return C;
}(Math));
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Initialization and round constants tables
var H = [];
var K = [];
// Compute constants
(function () {
function isPrime(n) {
var sqrtN = Math.sqrt(n);
for (var factor = 2; factor <= sqrtN; factor++) {
if (!(n % factor)) {
return false;
}
}
return true;
}
function getFractionalBits(n) {
return ((n - (n | 0)) * 0x100000000) | 0;
}
var n = 2;
var nPrime = 0;
while (nPrime < 64) {
if (isPrime(n)) {
if (nPrime < 8) {
H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
}
K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
nPrime++;
}
n++;
}
}());
// Reusable object
var W = [];
/**
* SHA-256 hash algorithm.
*/
var SHA256 = C_algo.SHA256 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init(H.slice(0));
},
_doProcessBlock: function (M, offset) {
// Shortcut
var H = this._hash.words;
// Working variables
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
var f = H[5];
var g = H[6];
var h = H[7];
// Computation
for (var i = 0; i < 64; i++) {
if (i < 16) {
W[i] = M[offset + i] | 0;
} else {
var gamma0x = W[i - 15];
var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
((gamma0x << 14) | (gamma0x >>> 18)) ^
(gamma0x >>> 3);
var gamma1x = W[i - 2];
var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
((gamma1x << 13) | (gamma1x >>> 19)) ^
(gamma1x >>> 10);
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
}
var ch = (e & f) ^ (~e & g);
var maj = (a & b) ^ (a & c) ^ (b & c);
var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));
var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));
var t1 = h + sigma1 + ch + K[i] + W[i];
var t2 = sigma0 + maj;
h = g;
g = f;
f = e;
e = (d + t1) | 0;
d = c;
c = b;
b = a;
a = (t1 + t2) | 0;
}
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
H[4] = (H[4] + e) | 0;
H[5] = (H[5] + f) | 0;
H[6] = (H[6] + g) | 0;
H[7] = (H[7] + h) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
// Hash final blocks
this._process();
// Return final computed hash
return this._hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA256('message');
* var hash = CryptoJS.SHA256(wordArray);
*/
C.SHA256 = Hasher._createHelper(SHA256);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA256(message, key);
*/
C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
}(Math));
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var C_enc = C.enc;
var Utf8 = C_enc.Utf8;
var C_algo = C.algo;
/**
* HMAC algorithm.
*/
var HMAC = C_algo.HMAC = Base.extend({
/**
* Initializes a newly created HMAC.
*
* @param {Hasher} hasher The hash algorithm to use.
* @param {WordArray|string} key The secret key.
*
* @example
*
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
*/
init: function (hasher, key) {
// Init hasher
hasher = this._hasher = new hasher.init();
// Convert string to WordArray, else assume WordArray already
if (typeof key == 'string') {
key = Utf8.parse(key);
}
// Shortcuts
var hasherBlockSize = hasher.blockSize;
var hasherBlockSizeBytes = hasherBlockSize * 4;
// Allow arbitrary length keys
if (key.sigBytes > hasherBlockSizeBytes) {
key = hasher.finalize(key);
}
// Clamp excess bits
key.clamp();
// Clone key for inner and outer pads
var oKey = this._oKey = key.clone();
var iKey = this._iKey = key.clone();
// Shortcuts
var oKeyWords = oKey.words;
var iKeyWords = iKey.words;
// XOR keys with pad constants
for (var i = 0; i < hasherBlockSize; i++) {
oKeyWords[i] ^= 0x5c5c5c5c;
iKeyWords[i] ^= 0x36363636;
}
oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
// Set initial values
this.reset();
},
/**
* Resets this HMAC to its initial state.
*
* @example
*
* hmacHasher.reset();
*/
reset: function () {
// Shortcut
var hasher = this._hasher;
// Reset
hasher.reset();
hasher.update(this._iKey);
},
/**
* Updates this HMAC with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {HMAC} This HMAC instance.
*
* @example
*
* hmacHasher.update('message');
* hmacHasher.update(wordArray);
*/
update: function (messageUpdate) {
this._hasher.update(messageUpdate);
// Chainable
return this;
},
/**
* Finalizes the HMAC computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The HMAC.
*
* @example
*
* var hmac = hmacHasher.finalize();
* var hmac = hmacHasher.finalize('message');
* var hmac = hmacHasher.finalize(wordArray);
*/
finalize: function (messageUpdate) {
// Shortcut
var hasher = this._hasher;
// Compute HMAC
var innerHash = hasher.finalize(messageUpdate);
hasher.reset();
var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
return hmac;
}
});
}());
/*
* Akamai mPulse JavaScript API
* http://mpulse.soasta.com/
* http://docs.soasta.com/mpulse.js/
*/
(function(window) {
"use strict";
//
// Constants
//
// Refresh config.json every 5 minutes
var REFRESH_CRUMB_INTERVAL = 5 * 1000 * 60;
// 5 seconds
var PROCESS_QUEUE_WAIT = 5 * 1000;
// Current version
var MPULSE_VERSION = "1.3.5";
// App public function names
var APP_FUNCTIONS = [
"startTimer",
"stopTimer",
"sendTimer",
"sendMetric",
"setPageGroup",
"getPageGroup",
"resetPageGroup",
"setABTest",
"getABTest",
"resetABTest",
"setDimension",
"resetDimension",
"setSessionID",
"getSessionID",
"startSession",
"incrementSessionLength",
"setSessionLength",
"getSessionLength",
"setSessionStart",
"getSessionStart",
"transferBoomerangSession",
"subscribe",
"sendBeacon",
"isInitialized"
];
var EVENTS = [
"before_beacon",
"beacon"
];
//
// Members
//
var i = 0;
// XHR function to use
var xhrFn;
// For the XHR function, to use onload vs onreadystatechange
var xhrFnOnload = false;
// now() implementation
var now = false;
// now() offset for environments w/out native support
var nowOffset = +(new Date());
/**
* setImmediate() function to use for browser and NodeJS
*
* @param {function} fn Function to run
*/
var setImm;
//
// Helper Functions
//
/**
* Fetches the specified URL via a XHR.
*
* @param {string|object} urlOpts URL Options or URL
* @param {string} urlOpts.url URL
* @param {string} urlOpts.ua User-Agent
* @param {function(data)} [callback] Callback w/ data
*/
function fetchUrl(urlOpts, callback) {
var url = typeof urlOpts === "string" ? urlOpts : urlOpts.url;
var ua = urlOpts && urlOpts.ua;
// determine which environment we're using to create the XHR
if (!xhrFn) {
if (typeof XDomainRequest === "function" ||
typeof XDomainRequest === "object") {
xhrFnOnload = true;
xhrFn = function() {
return new XDomainRequest();
};
} else if (typeof XMLHttpRequest === "function" ||
typeof XMLHttpRequest === "object") {
xhrFn = function() {
return new XMLHttpRequest();
};
} else if (typeof Ti !== "undefined" && Ti.Network && typeof Ti.Network.createHTTPClient === "function") {
xhrFn = Ti.Network.createHTTPClient;
} else if (typeof require === "function") {
xhrFn = function() {
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
return new XMLHttpRequest();
};
} else if (window && typeof window.ActiveXObject !== "undefined") {
xhrFn = function() {
return new window.ActiveXObject("Microsoft.XMLHTTP");
};
}
}
// create an XHR object to work with
var xhr = xhrFn();
// listen for state changes
if (typeof callback === "function") {
if (xhrFnOnload) {
xhr.onload = function() {
callback(xhr.responseText);
};
} else {
xhr.onreadystatechange = function() {
// response is ready
if (xhr.readyState === 4) {
callback(xhr.responseText);
}
};
}
}
xhr.open("GET", url, true);
if (ua) {
xhr.setRequestHeader("User-Agent", ua);
}
xhr.send();
}
//
// Cross-platform setImmediate() support
//
if (typeof process !== "undefined" &&
typeof process.nextTick === "function") {
// NodeJS
setImm = process.nextTick.bind(process);
} else if (typeof window !== "undefined") {
// Browser, check for native support
if (window.setImmediate) {
setImm = window.setImmediate.bind(window);
} else if (window.msSetImmediate) {
setImm = window.msSetImmediate.bind(window);
} else if (window.webkitSetImmediate) {
setImm = window.webkitSetImmediate.bind(window);
} else if (window.mozSetImmediate) {
setImm = window.mozSetImmediate.bind(window);
} else {
// No native suppot, run in 10ms
setImm = function(fn) {
setTimeout(fn, 10);
};
}
} else {
// Unknown, run in 10ms
setImm = function(fn) {
setTimeout(fn, 10);
};
}
//
// Cross-platform now() support
//
if (typeof window !== "undefined") {
// Browser environment
if (typeof window.performance !== "undefined" &&
typeof window.performance.now === "function") {
// native support
now = window.performance.now.bind(window.performance);
} else if (typeof window.performance !== "undefined") {
// check for prefixed versions
var methods = ["webkitNow", "msNow", "mozNow"];
for (i = 0; i < methods.length; i++) {
if (typeof window.performance[methods[i]] === "function") {
now = window.performance[methods[i]];
break;
}
}
}
}
// NavigationTiming support for a more accurate offset
if (typeof window !== "undefined" &&
"performance" in window &&
window.performance &&
window.performance.timing &&
window.performance.timing.navigationStart) {
nowOffset = window.performance.timing.navigationStart;
}
if (!now) {
// No browser support, fall back to Date.now
if (typeof Date !== "undefined" && Date.now) {
now = function() {
return Date.now() - nowOffset;
};
} else {
// no Date.now support, get the time from new Date()
now = function() {
return +(new Date()) - nowOffset;
};
}
}
/**
* Logs a console.warn (if console exists)
*
* @param {string} message Message
*/
function warn(message) {
if (typeof console === "object" && typeof console.warn === "function") {
console.warn("mPulse: " + message);
}
}
/**
* Generates a pseudo-random session ID in RFC 4122 (UDID Version 4) format
*
* @returns {string} Pseudo-random session ID
*/
function generateSessionID() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0;
var v = c === "x" ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
/**
* Generates a HMAC signature for a config.json request
*
* @param {string} apiKey API key
* @param {string} secretKey REST API Secret Key
* @param {number} t Timestamp
*
* @returns {string} HMAC signature
*/
function signConfig(apiKey, secretKey, t) {
var hmacSha256 = typeof CryptoJS !== "undefined" && CryptoJS.HmacSHA256;
if (typeof hmacSha256 !== "function" && typeof require === "function") {
hmacSha256 = require("crypto-js/hmac-sha256");
}
if (typeof hmacSha256 !== "function") {
warn("CryptoJS libraries not found! mpulse.js will not work.");
return "";
}
var message = "key=" + apiKey + "&t=" + t;
return hmacSha256(message, secretKey).toString();
}
//
// mPulse JavaScript App
//
/**
* Creates a new mPulse JavaScript App to work with
*
* @param {string} key API key
* @param {string} skey REST API Secret Key
* @param {object} [options] Options
*
* @returns {object} App
*/
function createApp(key, skey, options) {
options = options || {};
//
// Private members
//
// API key
var apiKey = key;
// REST API Secret key
var secretKey = skey;
// configuration URL (default)
var configUrl = "//c.go-mpulse.net/api/v2/config.json";
// User-Agent to use for config.json fetch
var ua = options.ua || "mpulse.js";
// whether or not to force SSL
var forceSSL = false;
// config.json data
var configJson = {};
// whether or not the next config.json request should be for a refresh
// of the crumb only
var configJsonRefresh = false;
// whether or not we're fully initialized
var initialized = false;
// beacon queue
var beaconQueue = [];
// whether or not we're already waiting to processQueue()
var processQueueWaiting = false;
// page group
var group = false;
// a/b
var ab = false;
// dimensions the user has set
var dimensions = {};
// dimension definitions from config.json
var dimensionDefs = {};
// whether or not the session ID was overridden
var sessionID = false;
// metric definitions from config.json
var metricDefs = {};
// timers
var timers = {};
// timer definitions from config.json
var timerDefs = {};
// current timer ID
var latestTimerId = -1;
// session start
var sessionStart = now();
// session length
var sessionLength = 0;
var subscribers = {};
for (i = 0; i < EVENTS.length; i++) {
subscribers[EVENTS[i]] = [];
}
//
// Initialization
//
// parse input options
if (typeof options.configUrl !== "undefined") {
configUrl = options.configUrl;
}
if (options.forceSSL) {
forceSSL = true;
}
//
// Private Functions
//
/**
* Ensures the URL has a protocol
*
* @param {string} url URL
*
* @returns {string} URL with protocol
*/
function ensureUrlPrefix(url) {
if (url.indexOf("http://") !== -1 ||
url.indexOf("https://") !== -1) {
// URL already has a protocol
return url;
}
if (forceSSL) {
// forced SSL connections
url = "https:" + url;
} else if (typeof window === "undefined") {
// NodeJS
if (url.indexOf("http:") === -1) {
url = "http:" + url;
}
} else if (typeof window !== "undefined" && window.location.protocol === "file:") {
// Browser
if (url.indexOf("http:") === -1) {
url = "http:" + url;
}
}
return url;
}
/**
* Gets the config.json URL
*
* @returns {string} config.json URL
*/
function getConfigUrl() {
var url = configUrl;
var ts = +(new Date());
if (url.indexOf("?") !== -1) {
url += "&";
} else {
url += "?";
}
// add API key
url += "key=" + apiKey;
// timestamp
url += "&t=" + ts;
// HMAC sign request
url += "&s=" + signConfig(apiKey, secretKey, ts);
return ensureUrlPrefix(url);
}
/**
* Gets the beacon URL
*
* @returns {string} Beacon URL
*/
function getBeaconUrl() {
var url = configJson.beacon_url;
if (!url) {
warn("No URL from config: " + JSON.stringify(configJson));
}
return ensureUrlPrefix(url);
}
/**
* Parses config.json data
*
* @param {string} data XHR data
*/
function parseConfig(data) {
try {
// parse the new JSON data
var newConfigJson = JSON.parse(data);
// clear any previous rate limit
delete configJson.rate_limited;
// merge in updates
for (var configkey in newConfigJson) {
if (newConfigJson.hasOwnProperty(configkey)) {
configJson[configkey] = newConfigJson[configkey];
}
}
} catch (e) {
warn("config.json could not be parsed!");
initialized = false;
return;
}
if (!configJson.beacon_url || configJson.rate_limited) {
warn("config.json shows rate limiting, no beacons will be sent!");
initialized = false;
return;
}
// start the session if we haven't already
if (!sessionID) {
startSession(configJson["session_id"]);
}
// reset definitions
metricDefs = {};
timerDefs = {};
dimensionDefs = {};
// look at PageParams definitions
if (configJson.PageParams) {
// parse custom metrics
var cms = configJson.PageParams.customMetrics;
var cts = configJson.PageParams.customTimers;
var cds = configJson.PageParams.customDimensions;
if (cms) {
for (i = 0; i < cms.length; i++) {
var m = cms[i];
metricDefs[m.name] = m.label;
}
}
// timers
if (cts) {
for (i = 0; i < cts.length; i++) {
var t = cts[i];
timerDefs[t.name] = t.label;
}
}
// dimensions
if (cds) {
for (i = 0; i < cds.length; i++) {
var d = cds[i];
dimensionDefs[d.name] = d.label;
}
}
}
// we're ready to send beacons
initialized = true;
// refresh the config after 5 minutes
configJsonRefresh = true;
setTimeout(fetchConfig, REFRESH_CRUMB_INTERVAL);
// process the beacon queue
setImm(processQueue);
}
/**
* Fetch the config.json
*/
function fetchConfig() {
if (configUrl === "") {
warn("No config.json URL specified!");
return;
}
var url = getConfigUrl();
// if we've already fetched it once, add an empty refresh crumb parameter
if (configJsonRefresh) {
// we know that the config.json URL always has at lease one param (API key)
url += "&r=";
}
fetchUrl({
url: url,
ua: ua
}, parseConfig);
}
/**
* Gets a copy of all current dimensions
*
* @returns {object} Dimensions
*/
function getCurrentDimensions() {
var copy = {};
for (var dimName in dimensions) {
if (dimensions.hasOwnProperty(dimName)) {
copy[dimName] = dimensions[dimName];
}
}
return copy;
}
/**
* Adds a timer or metric to the queue
*
* @param {string} type "metric" or "timer"
* @param {string} name Variable name
* @param {string} value Variable value
*/
function addToQueue(type, name, value) {
// add the current group and dimensions to this variable
beaconQueue.push({
type: type,
name: name,
value: value,
group: group,
ab: ab,
dimensions: getCurrentDimensions(),
when: +(new Date())
});
}
/**
* Processes the beacons queue
*
* @param {boolean} calledFromTimer Whether or not we were called from a timer
*/
function processQueue(calledFromTimer) {
if (beaconQueue.length === 0) {
// no work
return;
}
if (!initialized) {
warn("processQueue: Not yet initialized for " + apiKey + ", waiting " + PROCESS_QUEUE_WAIT);
// only have a single timer re-triggering processQueue
if (!processQueueWaiting || calledFromTimer) {
processQueueWaiting = true;
// no config.json yet, try again in 5 seconds
setTimeout(function() {
processQueue(true);
}, PROCESS_QUEUE_WAIT);
}
return;
}
// get and remove the top thing of the queue
var q = beaconQueue.shift();
var type = q.type;
var name = q.name;
var val = q.value;
// beacon data
var data = {};
// page group
if (typeof q.group !== "boolean") {
data["h.pg"] = q.group;
}
if (typeof q.ab !== "boolean") {
data["h.ab"] = q.ab;
}
// when this beacon fired
data["rt.tstart"] = data["rt.end"] = q.when;
// dimensions
for (var dimName in q.dimensions) {
if (q.dimensions.hasOwnProperty(dimName)) {
if (typeof dimensionDefs[dimName] !== "undefined") {
data[dimensionDefs[dimName]] = q.dimensions[dimName];
} else {
warn("Custom Dimension '" + dimName + "' is not defined");
}
}
}
// determine how to add this beacon type to the URL
if (type === "metric") {
if (typeof metricDefs[name] !== "undefined") {
data[metricDefs[name]] = val;
sendBeacon(data);
} else {
warn("Custom Metric '" + name + "' is not defined");
}
} else if (type === "timer") {
if (typeof timerDefs[name] !== "undefined") {
data["t_other"] = timerDefs[name] + "|" + val;
sendBeacon(data);
} else {
warn("Custom Timer '" + name + "' is not defined");
}
}
// and run again soon until it's empty
setImm(processQueue);
}
//
// Public functions
//
/**
* Sends a beacon
*
* @param {object} params Parameters array
*
* @returns {undefined}
*/
function sendBeacon(params) {
var ua;
if (!initialized) {
warn("sendBeacon: Not yet initialized for " + apiKey + ", waiting 1000");
return setTimeout(function() {
sendBeacon(params);
}, 1000);
}
// user-agent was specified
if (params.ua) {
ua = params.ua;
delete params.ua;
}
params["d"] = configJson["site_domain"];
params["h.key"] = configJson["h.key"];
params["h.d"] = configJson["h.d"];
params["h.cr"] = configJson["h.cr"];
params["h.t"] = configJson["h.t"];
params["http.initiator"] = "api";
params["rt.start"] = "api";
if (sessionID !== false) {
params["rt.si"] = sessionID;
params["rt.ss"] = sessionStart;
params["rt.sl"] = sessionLength;
}
params["api"] = 1;
params["api.v"] = 2;
params["api.l"] = "js";
params["api.lv"] = MPULSE_VERSION;
// let others add data to the beacon
fireEvent("before_beacon", params);
// build our parameters array
var paramsArray = [];
for (var name in params) {
if (params.hasOwnProperty(name)) {
paramsArray.push(encodeURIComponent(name)
+ "="
+ (
params[name] === undefined || params[name] === null
? ""
: encodeURIComponent(params[name])
)
);
}
}
// get the base beacon URL
var baseUrl = getBeaconUrl();
// add our parameters array
var url = baseUrl + ((baseUrl.indexOf("?") > -1) ? "&" : "?") + paramsArray.join("&");
// notify listeners
fireEvent("beacon", params);
// initiate the XHR
fetchUrl({
url: url,
ua: ua
});
}
/**
* Determines whether the app is initialized or not
*
* @returns {boolean} True if the app is initialized and can send beacons
*/
function isInitialized() {
return initialized;
}
/**
* Starts a timer
*
* @param {string} name Timer name
*
* @returns {number} Timer ID
*/
function startTimer(name) {
if (typeof name !== "string") {
return -1;
}
// increment the latest timer ID
latestTimerId++;
timers[latestTimerId] = {
time: now(),
name: name
};
return latestTimerId;
}
/**
* Stops and sends a timer
*
* @param {number} id Timer ID
*
* @returns {number} Number of milliseconds since the timer started,
* or -1 if there was an error
*/
function stopTimer(id) {
if (typeof id !== "number" || id < 0) {
return -1;
}
var timer = timers[id];
var deltaMs = 0;
if (timer) {
deltaMs = Math.round(now() - timer.time);
sendTimer(timer.name, deltaMs);
// remove old timer
delete timers[id];
} else {
return -1;
}
return deltaMs;
}
/**
* Sends the specified timer
*
* @param {string} name Timer name
* @param {number} value Timer value (ms)
*
* @returns {number} Number of milliseconds for the timer, or -1 if there was an error
*/
function sendTimer(name, value) {
if (typeof name !== "string") {
return -1;
}
if (typeof value !== "number" || value < 0) {
return -1;
}
value = Math.round(value);
addToQueue("timer", name, value);
setImm(processQueue);
return value;
}
/**
* Sends the specified metric
*
* @param {string} name Metric name
* @param {number} [value] Metric value (1 if not specified)
*/
function sendMetric(name, value) {
if (typeof name !== "string") {
return;
}
if (typeof value !== "undefined" &&
typeof value !== "number") {
return;
}
if (typeof value === "undefined") {
value = 1;
}
addToQueue("metric", name, value);
setImm(processQueue);
}
/**
* Sets the Page Group
*
* @param {string} name Page Group name
*/
function setPageGroup(name) {
if (typeof name !== "string") {
return;
}
group = name;
}
/**
* Gets the Page Group
*
* @returns {string} Page Group, or false if no group was set
*/
function getPageGroup() {
return group;
}
/**
* Resets (clears) the Page Group
*/
function resetPageGroup() {
group = false;
}
/**
* Sets the A/B bucket.
*
* Bucket name can only contain alphanumeric characters, dashes, underscores and spaces.
*
* Bucket name is limited to 25 characters.
*
* @param {string} bucket A/B bucket name
*
* @returns {boolean} True if the A/B bucket was set successfully, or false if it does not
* satisfy the bucket naming requirements.
*/
function setABTest(bucket) {
if (typeof bucket !== "string") {
return false;
}
if (/^[a-zA-Z0-9_ -]{1,25}$/.test(bucket) === false) {
return false;
}
ab = bucket;
return true;
}
/**
* Gets the A/B bucket
*
* @returns {string} A/B bucket name, or false if no bucket was set
*/
function getABTest() {
return ab;
}
/**
* Resets (clears) the A/B bucket name
*/
function resetABTest() {
ab = false;
}
/**
* Sets a dimension
*
* @param {string} name Dimension name
* @param {number} [value] Dimension value
*/
function setDimension(name, value) {
if (typeof name === "undefined") {
return;
}
if (typeof value === "undefined") {
// if the value isn't set, call reset dimension instead
resetDimension(name);
return;
}
dimensions[name] = value;
}
/**
* Resets (clears) the Dimension
*
* @param {string} name Dimension name
*/
function resetDimension(name) {
if (typeof name !== "undefined" &&
typeof dimensions[name] !== "undefined") {
delete dimensions[name];
}
}
/**
* Sets the Session ID
*
* @param {string} id Session ID
*/
function setSessionID(id) {
if (typeof id !== "string" &&
typeof id !== "number") {
return;
}
// convert any numbers into string session IDs
if (typeof id === "number") {
id = "" + id;
}
sessionID = id;
}
/**
* Gets the Session ID
*
* @returns {string} Session ID
*/
function getSessionID() {
return sessionID;
}
/**
* Starts a new session, changing the session ID and
* resetting the session length to zero.
*
* @param {string} [id] Session ID (optional)
*
* @returns {string} Session ID
*/
function startSession(id) {
// use the specifie ID or create our own
setSessionID(id || generateSessionID());
// reset session length to 0
setSessionLength(0);
// session start
setSessionStart(now());
return getSessionID();
}
/**
* Increments the session length
*/
function incrementSessionLength() {
sessionLength++;
}
/**
* Sets the session length
*
* @param {number} length Length
*/
function setSessionLength(length) {
if (typeof length !== "number" ||
length < 0) {
return;
}
sessionLength = length;
}
/**
* Gets the session length
*
* @returns {number} Session Length
*/
function getSessionLength() {
return sessionLength;
}
/**
* Sets the session start
*
* @param {number} start Start
*/
function setSessionStart(start) {
if (typeof start !== "number" ||
start < 0) {
return;
}
sessionStart = start;
}
/**
* Gets the session start
*
* @returns {number} Session start
*/
function getSessionStart() {
return sessionStart;
}
/**
* Transfers a Boomerang Session
*
* @param {Window} [frame] Root frame
*
* @returns {boolean} True on success
*/
function transferBoomerangSession(frame) {
if (typeof frame === "undefined" &&
typeof window !== "undefined") {
frame = window;
}
if (typeof frame !== "undefined" &&
frame.BOOMR &&
frame.BOOMR.session &&
frame.BOOMR.session.ID &&
frame.BOOMR.session.start &&
frame.BOOMR.session.length) {
// Boomerang is on the page
setSessionID(frame.BOOMR.session.ID + "-" + Math.round(frame.BOOMR.session.start / 1000).toString(36));
setSessionLength(frame.BOOMR.session.length);
setSessionStart(frame.BOOMR.session.start);
return true;
}
return false;
}
/**
* Subscribes to an event
*
* @param {string} eventName Event name
* @param {function} callback Callback
*/
function subscribe(eventName, callback) {
if (!subscribers.hasOwnProperty(eventName)) {
return;
}
if (typeof callback !== "function") {
return;
}
subscribers[eventName].push(callback);
}
/**
* Fires an event
*
* @param {string} eventName Event name
* @param {object} payload Event payload
*/
function fireEvent(eventName, payload) {
for (var i = 0; i < subscribers[eventName].length; i++) {
// run callback
subscribers[eventName][i](payload);
}
}
// fetch the config
fetchConfig();
//
// Exports
//
var exports = {
startTimer: startTimer,
stopTimer: stopTimer,
sendTimer: sendTimer,
sendMetric: sendMetric,
setPageGroup: setPageGroup,
getPageGroup: getPageGroup,
resetPageGroup: resetPageGroup,
setABTest: setABTest,
getABTest: getABTest,
resetABTest: resetABTest,
setDimension: setDimension,
resetDimension: resetDimension,
setSessionID: setSessionID,
getSessionID: getSessionID,
startSession: startSession,
incrementSessionLength: incrementSessionLength,
setSessionLength: setSessionLength,
getSessionLength: getSessionLength,
setSessionStart: setSessionStart,
getSessionStart: getSessionStart,
transferBoomerangSession: transferBoomerangSession,
subscribe: subscribe,
sendBeacon: sendBeacon,
isInitialized: isInitialized,
// test hooks
parseConfig: parseConfig
};
return exports;
}
//
// Static private members
//
// Exported object
var mPulse;
// default app to use (the latest created one)
var defaultApp = false;
// list of apps
var apps = {};
//
// Initialization
//
// save old mPulse object for noConflict()
var root;
var previousObj;
if (typeof window !== "undefined") {
root = window;
previousObj = root.mPulse;
}
//
// Public functions
//
/**
* Changes mPulse back to its original value
*
* @returns {object} mPulse object
*/
function noConflict() {
root.mPulse = previousObj;
return mPulse;
}
/**
* Initializes the mPulse library.
*
* @param {string} apiKey API key
* @param {string} secretKey REST API Secret Key
* @param {object} options Options
*
* @returns {object} New mPulse app
*/
function init(apiKey, secretKey, options) {
options = options || {};
if (typeof apiKey === "undefined") {
warn("init(): You need to specify an apiKey");
return;
}
if (typeof secretKey === "undefined") {
warn("init(): You need to specify a secretKey");
return;
}
// if the app already exists, return it
if (typeof options.name !== "undefined" &&
typeof apps[options.name] !== "undefined") {
return apps[options.name];
}
var app = createApp(apiKey, secretKey, options);
// set the default app if not already
if (defaultApp === false) {
defaultApp = app;
// copy the correct functions for this default app
for (var i = 0; i < APP_FUNCTIONS.length; i++) {
var fnName = APP_FUNCTIONS[i];
mPulse[fnName] = defaultApp[fnName];
}
}
// save in our list of apps if named
if (typeof options.name !== "undefined") {
apps[options.name] = app;
}
return app;
}
/**
* Gets the specified app.
*
* @param {string} name mPulse App name
*
* @returns {mPulseApp} mPulse App
*/
function getApp(name) {
return apps[name];
}
/**
* NO-OP placeholder function for default app until
* it is initialized.
*/
function nop() {
return;
}
/**
* Stops the specified app
*
* @param {string} name mPulse App name
*/
function stop(name) {
if (typeof apps[name] !== "undefined") {
delete apps[name];
}
}
//
// Exports
//
mPulse = {
// export the version
version: MPULSE_VERSION,
/**
* Changes the value of mPulse back to its original value, returning
* a reference to the mPulse object.
*/
noConflict: noConflict,
init: init,
getApp: getApp,
stop: stop,
now: now
};
// add a placeholder function for all public app functions until the
// default one is defined
for (i = 0; i < APP_FUNCTIONS.length; i++) {
mPulse[APP_FUNCTIONS[i]] = nop;
}
//
// Export to the appropriate location
//
if (typeof define === "function" && define.amd) {
//
// AMD / RequireJS
//
define([], function() {
return mPulse;
});
} else if (typeof module !== "undefined" && module.exports) {
//
// Node.js
//
module.exports = mPulse;
} else if (typeof root !== "undefined") {
//
// Browser Global
//
root.mPulse = mPulse;
}
}(typeof window !== "undefined" ? window : undefined));
|
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.2'
# jupytext_version: 1.2.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
# # [Krusell Smith (1998)](https://www.journals.uchicago.edu/doi/pdf/10.1086/250034)
#
# - Original version by Tim Munday
# - Comments and extensions by Tao Wang
# - Further edits by Chris Carroll
# %% [markdown]
# [](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks%2FKrusellSmith.ipynb)
#
# %% [markdown]
# ### Overview
#
# The benchmark Krusell-Smith model has the following broad features:
# * The aggregate state switches between "good" and "bad" with known probabilities
# * All consumers experience the same aggregate state for the economy (good or bad)
# * _ex ante_ there is only one type of consumer, which is infinitely lived
# * _ex post_ heterogeneity arises from uninsurable idiosyncratic income shocks
# * Specifically, individuals are at risk of spells of unemployment
# * In a spell of unemployment, their income is zero
#
# Thus, each agent faces two types of uncertainty: About their employment state, and about the income they will earn when employed. And the values of income and unemployment risk depend on the aggregate state.
#
# %% [markdown]
# ### Details
#
# #### Idiosyncratic
# Each agent _attempts_ to supply an amount of productive labor $\ell$ in each period. (Here and below we mostly follow the notation of Krusell and Smith (1998)).
#
# However, whether they _succeed_ in supplying that labor (and earning a corresponding wage) is governed by the realization of the stochastic variable $\epsilon$. If the agent is unlucky, $\epsilon$ is zero and the agent is unemployed. The amount of labor they succeed in supplying is thus $\epsilon\ell$.
#
# #### Aggregate
# Aggregate output ($\bar{y}$) is produced using a Cobb-Douglas production function using capital and labor. (Bars over variables indicate the aggregate value of a variable that has different values across different idiosyncratic consumers).
#
# $z$ denotes the aggregate shock to productivity. $z$ can take two values, either $z_g$ -- the "good" state, or $z_b < z_g$ -- the "bad" state. Consumers gain income from providing labor, and from the rental return on any capital they own. Labor and capital markets are perfectly efficient so both factors are both paid their marginal products.
#
# The agent can choose to save by buying capital $k$ which is bounded below at the borrowing constraint of 0.
#
#
# Putting all of this together, aggregate output is given by:
# \begin{eqnarray}
# \bar{y} & = & z\bar{k}^\alpha \bar{\ell}^{1-\alpha}
# \end{eqnarray}
#
# %% [markdown]
# The aggregate shocks $z$ follow first-order Markov chains with the transition probability of moving from state $s$ to state $s'$ denoted by $\pi_{ss'}$. The aggregate shocks and individual shocks are correlated: The probability of being unemployed is higher in bad times, when aggregate productivity is low, than in good times, when aggregate productivity is high.
#
# #### Idiosyncratic and Aggregate Together
#
# The individual shocks satisfy the law of large numbers, and the model is constructed so that the number of agents who are unemployed in the good state always equals $u_g$, and is always $u_b$ in the bad state. Given the aggregate state, individual shocks are independent from each other.
#
# For the individual, the probability of moving between a good state and employment to a bad state and unemployment is denoted $\pi_{gb10}$ with similar notation for the other transition probabilities.
#
# (Krusell and Smith allow for serially correlated unemployment at the idiosyncratic level. Here we will simplify this and have unemployment be serially uncorrelated.)
# %% [markdown]
# Finally, $\Gamma$ denotes the current distribution of consumers over capital and employment status, and $H$ denotes the law of motion of this distribution.
# %% [markdown]
# #### The Idiosyncratic Individual's Problem Given the Aggregate State
#
# The individual's problem is:
# \begin{eqnarray*}
# V(k, \epsilon; \Gamma, z) &=& \max_{k'}\{U(c) + \beta \mathbb{E}[V(k' ,\epsilon'; \Gamma', z')|z, \epsilon]\} \\
# c + k' &=& r(\bar{k}, \bar{\ell}, z)k + w(\bar{k}, \bar{\ell}, z)\ell\epsilon + (1-\delta)k \\
# \Gamma' &=& H(\Gamma, z, z') \\
# k' &\geq& 0 \\
# \end{eqnarray*}
# %% [markdown]
# Krusell and Smith define an equilibrium as a law of motion $H$, a value function $V$, a rule for updating capital $f$ and pricing functions $r$ and $w$, such that $V$ and $f$ solve the consumers problem, $r$ and $w$ denote the marginal products of capital and labour, and $H$ is consistent with $f$ (i.e. if we add up all of the individual agents capital choices we get the correct distribution of capital).
# %% [markdown]
# ##### Discussion of the KS Algorithm
#
# In principle, $\Gamma$ is a high-dimensional object because it includes the whole distribution of individuals' wealth and employment states. Because the optimal amount to save is a nonlinear function of the level of idiosyncratic $k$, next period's aggregate capital stock $\bar{k}'$ depends on the distribution of the holdings of idiosyncratic $k$ across the population of consumers. Therefore the law of motion $H$ is not a trivial function of the $\Gamma$.
#
# KS simplified this problem by noting the following.
#
# 1. The agent cares about the future aggregate aggregate state only insofar as that state affects their own personal value of $c$
# 1. Future values of $c$ depend on the aggregate state only through the budget constraint
# 1. The channels by which the budget constraint depends on the aggregate state are:
# * The probability distributions of $\epsilon$ and $z$ are affected by the aggregate state
# * Interest rates and wages depend on the future values of $\bar{k}$ and $\bar{\ell}$
# 1. The probability distributions for the future values of $\{\epsilon, z\}$ are known
# * They are fully determined by the Markov transition matrices
# 1. But the values of $r$ and $w$ are both determined by the future value of $\bar{k}$ (in combination with the exogenous value of $\bar{\ell}$)
# * So the only _endogenous_ object that the agent needs to form expectations about, in order to have a complete rational expectation about everything affecting them, is $\bar{k}'$
#
# The key result in Krusell and Smith is the discovery that a very simple linear rule does an extraordinarily good job (though not quite perfect) in forecasting $\bar{k'}$
#
# They then argue that, since rationality is surely bounded to some degree, the solution that an agent obtains using a good forecasting rule for $\bar{k}'$ is "good enough" to compute an "approximate" solution to the consumer's optimization problem.
#
# They define a generic algorithm to find a forecasting rule for $\bar{k}$ as follows
#
# 1. Choose the number of moments $n$ of the distribution of $k$ to be included in the set of variables to forecast $\bar{k}'$. In the simplest case, $n=1$, the only forecasting variable for next period's $\bar{k}'$ is the mean (the first moment, $n=1$)) of current capital, $\bar{k}$.
# 2. Each individual adopts the same belief about the law motion of these moments, $H_I$ and finds the optimal decision policy, $f_I$, contingent on that guess.
# 3. Use the optimal policy to simulate a history of aggregate capital with a large number of agents.
# 4. Characterize the realized law of motion using the same number of moments $n$
# 5. Compare it with the $H_I$, what is taken as given by individuals.
# 6. Iterate until the two converge.
#
# In the end, the solution to the original problem is well approximated by the following simplified problem:
#
# \begin{eqnarray*}
# V(k, \epsilon; \bar k, z) &=& max_{c, k'}\{U(c) + \beta E[V(k' ,\epsilon'; \bar k', z')|z, \epsilon]\} \\
# c + k' &=& r(\bar{k}, \bar{\ell}, z)k + w(\bar{k}, \bar{\ell}, z)l\epsilon + (1-\delta)k \\
# \text{When }~ z=z_g, \quad \mathbb{E}[\log\bar{k}'] & = & a_0 + a_1 \log\bar k \\
# \text{When }~ z=z_b, \quad \mathbb{E}[\log\bar{k}'] & = & b_0 + b_1 \log\bar k \\
# k' &\geq& 0 \\
# \end{eqnarray*}
# %% [markdown]
# ## Implementation Using the HARK Toolkit
# %% [markdown]
# #### The Consumer
# %% {"code_folding": [0]}
# Import generic setup tools
# This is a jupytext paired notebook that autogenerates KrusellSmith.py
# which can be executed from a terminal command line via "ipython KrusellSmith.py"
# But a terminal does not permit inline figures, so we need to test jupyter vs terminal
# Google "how can I check if code is executed in the ipython notebook"
# Determine whether to make the figures inline (for spyder or jupyter)
# vs whatever is the automatic setting that will apply if run from the terminal
# import remark # 20191113 CDC to Seb: Where do you propose that this module should go (permanently?)
# in the /binder folder, where it could be installed by postBuild (unix) or postBuild.bat?
# %matplotlib inline
# Import the plot-figure library matplotlib
import numpy as np
import matplotlib.pyplot as plt
from HARK.utilities import plotFuncs, plotFuncsDer, make_figs
from copy import deepcopy
# %% {"code_folding": []}
# Import components of HARK needed for solving the KS model
# from HARK.ConsumptionSaving.ConsAggShockModel import *
import HARK.ConsumptionSaving.ConsumerParameters as Params
# Markov consumer type that allows aggregate shocks (redundant but instructive)
from HARK.ConsumptionSaving.ConsAggShockModel import AggShockMarkovConsumerType
# %% {"code_folding": [0]}
# Define a dictionary to make an 'instance' of our Krusell-Smith consumer.
# The folded dictionary below contains many parameters to the
# AggShockMarkovConsumerType agent that are not needed for the KS model
KSAgentDictionary = {
"CRRA": 1.0, # Coefficient of relative risk aversion
"DiscFac": 0.99, # Intertemporal discount factor
"LivPrb" : [1.0], # Survival probability
"AgentCount" : 10000, # Number of agents of this type (only matters for simulation)
"aNrmInitMean" : 0.0, # Mean of log initial assets (only matters for simulation)
"aNrmInitStd" : 0.0, # Standard deviation of log initial assets (only for simulation)
"pLvlInitMean" : 0.0, # Mean of log initial permanent income (only matters for simulation)
"pLvlInitStd" : 0.0, # Standard deviation of log initial permanent income (only matters for simulation)
"PermGroFacAgg" : 1.0, # Aggregate permanent income growth factor (only matters for simulation)
"T_age" : None, # Age after which simulated agents are automatically killed
"T_cycle" : 1, # Number of periods in the cycle for this agent type
# Parameters for constructing the "assets above minimum" grid
"aXtraMin" : 0.001, # Minimum end-of-period "assets above minimum" value
"aXtraMax" : 20, # Maximum end-of-period "assets above minimum" value
"aXtraExtra" : [None], # Some other value of "assets above minimum" to add to the grid
"aXtraNestFac" : 3, # Exponential nesting factor when constructing "assets above minimum" grid
"aXtraCount" : 24, # Number of points in the grid of "assets above minimum"
# Parameters describing the income process
"PermShkCount" : 1, # Number of points in discrete approximation to permanent income shocks - no shocks of this kind!
"TranShkCount" : 1, # Number of points in discrete approximation to transitory income shocks - no shocks of this kind!
"PermShkStd" : [0.], # Standard deviation of log permanent income shocks - no shocks of this kind!
"TranShkStd" : [0.], # Standard deviation of log transitory income shocks - no shocks of this kind!
"UnempPrb" : 0.0, # Probability of unemployment while working - no shocks of this kind!
"UnempPrbRet" : 0.00, # Probability of "unemployment" while retired - no shocks of this kind!
"IncUnemp" : 0.0, # Unemployment benefits replacement rate
"IncUnempRet" : 0.0, # "Unemployment" benefits when retired
"tax_rate" : 0.0, # Flat income tax rate
"T_retire" : 0, # Period of retirement (0 --> no retirement)
"BoroCnstArt" : 0.0, # Artificial borrowing constraint; imposed minimum level of end-of period assets
"cycles": 0, # Consumer is infinitely lived
"PermGroFac" : [1.0], # Permanent income growth factor
# New Parameters that we need now
'MgridBase': np.array([0.1,0.3,0.6,
0.8,0.9,0.98,
1.0,1.02,1.1,
1.2,1.6,2.0,
3.0]), # Grid of capital-to-labor-ratios (factors)
'MrkvArray': np.array([[0.875,0.125],
[0.125,0.875]]), # Transition probabilities for macroecon. [i,j] is probability of being in state j next
# period conditional on being in state i this period.
'PermShkAggStd' : [0.0,0.0], # Standard deviation of log aggregate permanent shocks by state. No continous shocks in a state.
'TranShkAggStd' : [0.0,0.0], # Standard deviation of log aggregate transitory shocks by state. No continuous shocks in a state.
'PermGroFacAgg' : 1.0
}
# Here we restate just the "interesting" parts of the consumer's specification
KSAgentDictionary['CRRA'] = 1.0 # Relative risk aversion
KSAgentDictionary['DiscFac'] = 0.99 # Intertemporal discount factor
KSAgentDictionary['cycles'] = 0 # cycles=0 means consumer is infinitely lived
# KS assume that 'good' and 'bad' times are of equal expected duration
# The probability of a change in the aggregate state is p_change=0.125
p_change=0.125
p_remain=1-p_change
# Now we define macro transition probabilities for AggShockMarkovConsumerType
# [i,j] is probability of being in state j next period conditional on being in state i this period.
# In both states, there is 0.875 chance of staying, 0.125 chance of switching
AggMrkvArray = \
np.array([[p_remain,p_change], # Probabilities of states 0 and 1 next period if in state 0
[p_change,p_remain]]) # Probabilities of states 0 and 1 next period if in state 1
KSAgentDictionary['MrkvArray'] = AggMrkvArray
# %%
# Create the Krusell-Smith agent as an instance of AggShockMarkovConsumerType
KSAgent = AggShockMarkovConsumerType(**KSAgentDictionary)
# %% [markdown]
# Now we need to specify the income distribution.
#
# The HARK toolkit allows for two components of labor income: Persistent (or permanent), and transitory.
#
# Using the KS notation above, a HARK consumer's income is
# \begin{eqnarray}
# y & = & w p \ell \epsilon
# \end{eqnarray}
# where $p$ is the persistent component of income. Krusell and Smith did not incorporate a persistent component of income, however, so we will simply calibrate $p=1$ for all states.
#
# For each of the two aggregate states we need to specify:
# * The _proportion_ of consumers in the $e$ and the $u$ states
# * The level of persistent/permanent productivity $p$ (always 1)
# * The ratio of actual to permanent productivity in each state $\{e,u\}$
# * In the KS notation, this is $\epsilon\ell$
#
# %% {"code_folding": []}
# Construct the income distribution for the Krusell-Smith agent
prb_eg = 0.96 # Probability of employment in the good state
prb_ug = 1-prb_eg # Probability of unemployment in the good state
prb_eb = 0.90 # Probability of employment in the bad state
prb_ub = 1-prb_eb # Probability of unemployment in the bad state
p_ind = 1 # Persistent component of income is always 1
ell_ug = ell_ub = 0 # Labor supply is zero for unemployed consumers in either agg state
ell_eg = 1.0/prb_eg # Labor supply for employed consumer in good state
ell_eb = 1.0/prb_eb # 1=pe_g*ell_ge+pu_b*ell_gu=pe_b*ell_be+pu_b*ell_gu
# IncomeDstn is a list of lists, one for each aggregate Markov state
# Each contains three arrays of floats, representing a discrete approximation to the income process.
# Order:
# state probabilities
# idiosyncratic persistent income level by state (KS have no persistent shocks p_ind is always 1.0)
# idiosyncratic transitory income level by state
KSAgent.IncomeDstn[0] = \
[[np.array([prb_eg,prb_ug]),np.array([p_ind,p_ind]),np.array([ell_eg,ell_ug])], # Agg state good
[np.array([prb_eb,prb_ub]),np.array([p_ind,p_ind]),np.array([ell_eb,ell_ub])] # Agg state bad
]
# %% [markdown]
# Up to this point, individual agents do not have enough information to solve their decision problem yet. What is missing are beliefs about the endogenous macro variables $r$ and $w$, both of which are functions of $\bar{k}$.
# %% [markdown]
# #### The Aggregate Economy
# %% {"code_folding": []}
from HARK.ConsumptionSaving.ConsAggShockModel import CobbDouglasMarkovEconomy
KSEconomyDictionary = {
'PermShkAggCount': 1,
'TranShkAggCount': 1,
'PermShkAggStd': [0.0,0.0],
'TranShkAggStd': [0.0,0.0],
'DeprFac': 0.025, # Depreciation factor
'CapShare': 0.36, # Share of capital income in cobb-douglas production function
'DiscFac': 0.99,
'CRRA': 1.0,
'PermGroFacAgg': [1.0,1.0],
'AggregateL':1.0, # Fix aggregate labor supply at 1.0 - makes interpretation of z easier
'act_T':1200, # Number of periods for economy to run in simulation
'intercept_prev': [0.0,0.0], # Make some initial guesses at linear savings rule intercepts for each state
'slope_prev': [1.0,1.0], # Make some initial guesses at linear savings rule slopes for each state
'MrkvArray': np.array([[0.875,0.125],
[0.125,0.875]]), # Transition probabilities
'MrkvNow_init': 0 # Pick a state to start in (we pick the first state)
}
# The 'interesting' parts of the CobbDouglasMarkovEconomy
KSEconomyDictionary['CapShare'] = 0.36
KSEconomyDictionary['MrkvArray'] = AggMrkvArray
KSEconomy = CobbDouglasMarkovEconomy(agents = [KSAgent], **KSEconomyDictionary) # Combine production and consumption sides into an "Economy"
# %% [markdown]
# We have now populated the $\texttt{KSEconomy}$ with $\texttt{KSAgents}$ defined before. That is basically telling the agents to take the macro state from the $\texttt{KSEconomy}$.
#
# Now we construct the $\texttt{AggShkDstn}$ that specifies the evolution of the dynamics of the $\texttt{KSEconomy}$.
#
# The structure of the inputs for $\texttt{AggShkDstn}$ follows the same logic as for $\texttt{IncomeDstn}$. Now there is only one possible outcome for each aggregate state (the KS aggregate states are very simple), therefore, each aggregate state has only one possible condition which happens with probability 1.
# %% {"code_folding": []}
# Calibrate the magnitude of the aggregate shocks
Tran_g = 1.01 # Productivity z in the good aggregate state
Tran_b = 0.99 # and the bad state
# The HARK framework allows permanent shocks
Perm_g = Perm_b = 1.0 # KS assume there are no aggregate permanent shocks
# Aggregate productivity shock distribution by state.
# First element is probabilities of different outcomes, given the state you are in.
# Second element is agg permanent shocks (here we don't have any, so just they are just 1.).
# Third element is agg transitory shocks, which are calibrated the same as in Krusell Smith.
KSAggShkDstn = [
[np.array([1.0]),np.array([Perm_g]),np.array([Tran_g])], # Aggregate good
[np.array([1.0]),np.array([Perm_b]),np.array([Tran_b])] # Aggregate bad
]
KSEconomy.AggShkDstn = KSAggShkDstn
# %% [markdown]
# #### Summing Up
#
# The combined idiosyncratic and aggregate assumptions can be summarized mathematically as follows.
#
# $\forall \{s,s'\}=\{g,b\}\times\{g,b\}$, the following two conditions hold:
#
# $$\underbrace{\pi_{ss'01}}_{p(s \rightarrow s',u \rightarrow e)}+\underbrace{\pi_{ss'00}}_{p(s \rightarrow s', u \rightarrow u)} = \underbrace{\pi_{ss'11}}_{p(s\rightarrow s', e \rightarrow e) } + \underbrace{\pi_{ss'10}}_{p(s \rightarrow s', e \rightarrow u)} = \underbrace{\pi_{ss'}}_{p(s\rightarrow s')}$$
#
# $$u_s \frac{\pi_{ss'00}}{\pi_{ss'}}+ (1-u_s) \frac{\pi_{ss'10}}{\pi_{ss'}} = u_{s'}$$
# %% [markdown]
# ### Solving the Model
# Now, we have fully defined all of the elements of the macroeconomy, and we are in postion to construct an object that represents the economy and to construct a rational expectations equilibrium.
# %% {"code_folding": []}
# Construct the economy, make an initial history, then solve
KSAgent.getEconomyData(KSEconomy) # Makes attributes of the economy, attributes of the agent
KSEconomy.makeAggShkHist() # Make a simulated history of the economy
# Set tolerance level.
KSEconomy.tolerance = 0.01
# Solve macro problem by finding a fixed point for beliefs
KSEconomy.solve() # Solve the economy using the market method.
# i.e. guess the saving function, and iterate until a fixed point
# %% [markdown]
# The last line above is the converged aggregate saving rule for good and bad times, respectively.
# %% {"code_folding": []}
# Plot some key results
print('Aggregate savings as a function of aggregate market resources:')
fig = plt.figure()
bottom = 0.1
top = 2*KSEconomy.kSS
x = np.linspace(bottom,top,1000,endpoint=True)
print(KSEconomy.AFunc)
y0 = KSEconomy.AFunc[0](x)
y1 = KSEconomy.AFunc[1](x)
plt.plot(x,y0)
plt.plot(x,y1)
plt.xlim([bottom, top])
make_figs('aggregate_savings', True, False)
# remark.show('aggregate_savings')
print('Consumption function at each aggregate market resources gridpoint (in general equilibrium):')
KSAgent.unpackcFunc()
m_grid = np.linspace(0,10,200)
KSAgent.unpackcFunc()
for M in KSAgent.Mgrid:
c_at_this_M = KSAgent.solution[0].cFunc[0](m_grid,M*np.ones_like(m_grid)) #Have two consumption functions, check this
plt.plot(m_grid,c_at_this_M)
make_figs('consumption_function', True, False)
# remark.show('consumption_function')
print('Savings at each individual market resources gridpoint (in general equilibrium):')
fig = plt.figure()
KSAgent.unpackcFunc()
m_grid = np.linspace(0,10,200)
KSAgent.unpackcFunc()
for M in KSAgent.Mgrid:
s_at_this_M = m_grid-KSAgent.solution[0].cFunc[1](m_grid,M*np.ones_like(m_grid))
c_at_this_M = KSAgent.solution[0].cFunc[1](m_grid,M*np.ones_like(m_grid)) #Have two consumption functions, check this
plt.plot(m_grid,s_at_this_M)
make_figs('savings_function', True, False)
# remark.show('savings_function')
# %% [markdown]
# ### The Wealth Distribution in KS
#
# #### Benchmark Model
#
# %%
sim_wealth = KSEconomy.aLvlNow[0]
print("The mean of individual wealth is "+ str(sim_wealth.mean()) + ";\n the standard deviation is "
+ str(sim_wealth.std())+";\n the median is " + str(np.median(sim_wealth)) +".")
# %% {"code_folding": []}
# Get some tools for plotting simulated vs actual wealth distributions
from HARK.utilities import getLorenzShares, getPercentiles
# The cstwMPC model conveniently has data on the wealth distribution
# from the U.S. Survey of Consumer Finances
from HARK.cstwMPC.SetupParamsCSTW import SCF_wealth, SCF_weights
# %% {"code_folding": []}
# Construct the Lorenz curves and plot them
pctiles = np.linspace(0.001,0.999,15)
SCF_Lorenz_points = getLorenzShares(SCF_wealth,weights=SCF_weights,percentiles=pctiles)
sim_Lorenz_points = getLorenzShares(sim_wealth,percentiles=pctiles)
# Plot
plt.figure(figsize=(5,5))
plt.title('Wealth Distribution')
plt.plot(pctiles,SCF_Lorenz_points,'--k',label='SCF')
plt.plot(pctiles,sim_Lorenz_points,'-b',label='Benchmark KS')
plt.plot(pctiles,pctiles,'g-.',label='45 Degree')
plt.xlabel('Percentile of net worth')
plt.ylabel('Cumulative share of wealth')
plt.legend(loc=2)
plt.ylim([0,1])
make_figs('wealth_distribution_1', True, False)
# remark.show('')
# %%
# Calculate a measure of the difference between the simulated and empirical distributions
lorenz_distance = np.sqrt(np.sum((SCF_Lorenz_points - sim_Lorenz_points)**2))
print("The Euclidean distance between simulated wealth distribution and the estimates from the SCF data is "+str(lorenz_distance) )
# %% [markdown]
# #### Heterogeneous Time Preference Rates
#
# As the figures show, the distribution of wealth that the baseline KS model produces is very far from matching the empirical degree of inequality in the US data.
#
# This could matter for macroeconomic purposes. For example, the SCF data indicate that many agents are concentrated at low values of wealth where the MPC is very large. We might expect, therefore, that a fiscal policy "stimulus" that gives a fixed amount of money to every agent would have a large effect on the consumption of the low-wealth households who have a high Marginal Propensity to Consume.
#
# KS attempt to address this problem by assuming that an individual agent's time preference rate can change over time.
#
# The rationale is that this represents a generational transition: The "agent" is really a "dynasty" and the time preference rate of the "child" dynast may differ from that of the "parent."
#
# Specifically, KS assume that $\beta$ can take on three values, 0.9858, 0.9894, and 0.9930, and that the transition probabilities are such that
# - The invariant distribution for $\beta$’s has 80 percent of the population at the middle $\beta$ and 10 percent at each of the other $\beta$’s.
# - Immediate transitions between the extreme values of $\beta$ occur with probability zero.
# - The average duration of the highest and lowest $\beta$’s is 50 years.
#
# The HARK toolkit is not natively set up to accommodate stochastic time preference factors (though an extension to accommodate this would be easy).
#
# Here, instead, we assume that different agents have different values of $\beta$ that are uniformly distributed over some range. We approximate the uniform distribution by three points. The agents are heterogeneous _ex ante_ (and permanently).
# %% {"code_folding": []}
# Construct the distribution of types
from HARK.utilities import approxUniform
# Specify the distribution of the discount factor
num_types = 3 # number of types we want;
DiscFac_mean = 0.9858 # center of beta distribution
DiscFac_spread = 0.0085 # spread of beta distribution
DiscFac_dstn = approxUniform(num_types, DiscFac_mean-DiscFac_spread, DiscFac_mean+DiscFac_spread)[1]
BaselineType = deepcopy(KSAgent)
MyTypes = [] # initialize an empty list to hold our consumer types
for nn in range(len(DiscFac_dstn)):
# Now create the types, and append them to the list MyTypes
NewType = deepcopy(BaselineType)
NewType.DiscFac = DiscFac_dstn[nn]
NewType.seed = nn # give each consumer type a different RNG seed
MyTypes.append(NewType)
# %% {"code_folding": []}
# Put all agents into the economy
KSEconomy_sim = CobbDouglasMarkovEconomy(agents = MyTypes, **KSEconomyDictionary)
KSEconomy_sim.AggShkDstn = KSAggShkDstn # Agg shocks are the same as defined earlier
for ThisType in MyTypes:
ThisType.getEconomyData(KSEconomy_sim) # Makes attributes of the economy, attributes of the agent
KSEconomy_sim.makeAggShkHist() # Make a simulated prehistory of the economy
KSEconomy_sim.solve() # Solve macro problem by getting a fixed point dynamic rule
# %% {"code_folding": []}
# Get the level of end-of-period assets a for all types of consumers
aLvl_all = np.concatenate([KSEconomy_sim.aLvlNow[i] for i in range(len(MyTypes))])
print('Aggregate capital to income ratio is ' + str(np.mean(aLvl_all)))
# %% {"code_folding": []}
# Plot the distribution of wealth across all agent types
sim_3beta_wealth = aLvl_all
pctiles = np.linspace(0.001,0.999,15)
sim_Lorenz_points = getLorenzShares(sim_wealth,percentiles=pctiles)
SCF_Lorenz_points = getLorenzShares(SCF_wealth,weights=SCF_weights,percentiles=pctiles)
sim_3beta_Lorenz_points = getLorenzShares(sim_3beta_wealth,percentiles=pctiles)
## Plot
plt.figure(figsize=(5,5))
plt.title('Wealth Distribution')
plt.plot(pctiles,SCF_Lorenz_points,'--k',label='SCF')
plt.plot(pctiles,sim_Lorenz_points,'-b',label='Benchmark KS')
plt.plot(pctiles,sim_3beta_Lorenz_points,'-*r',label='3 Types')
plt.plot(pctiles,pctiles,'g-.',label='45 Degree')
plt.xlabel('Percentile of net worth')
plt.ylabel('Cumulative share of wealth')
plt.legend(loc=2)
plt.ylim([0,1])
make_figs('wealth_distribution_2', True, False)
# remark.show('wealth_distribution_2')
# %% {"code_folding": []}
# The mean levels of wealth for the three types of consumer are
[np.mean(KSEconomy_sim.aLvlNow[0]),np.mean(KSEconomy_sim.aLvlNow[1]),np.mean(KSEconomy_sim.aLvlNow[2])]
fig = plt.figure()
# %% {"code_folding": []}
# Plot the distribution of wealth
for i in range(len(MyTypes)):
if i<=2:
plt.hist(np.log(KSEconomy_sim.aLvlNow[i])\
,label=r'$\beta$='+str(round(DiscFac_dstn[i],4))\
,bins=np.arange(-2.,np.log(max(aLvl_all)),0.05))
plt.yticks([])
plt.legend(loc=2)
plt.title('Log Wealth Distribution of 3 Types')
make_figs('log_wealth_3_types', True, False)
# remark.show('log_wealth_3_types')
fig = plt.figure()
# %% {"code_folding": []}
# Distribution of wealth in original model with one type
plt.hist(np.log(sim_wealth),bins=np.arange(-2.,np.log(max(aLvl_all)),0.05))
plt.yticks([])
plt.title('Log Wealth Distribution of Original Model with One Type')
make_figs('log_wealth_1', True, False)
# remark.show('log_wea`lth_1')
# %% [markdown]
# ### Target Wealth is Nonlinear in Time Preference Rate
#
# Note the nonlinear relationship between wealth and time preference in the economy with three types. Although the three groups are uniformly spaced in $\beta$ values, there is a lot of overlap in the distribution of wealth of the two impatient types, who are both separated from the most patient type by a large gap.
#
# A model of buffer stock saving that has simplified enough to be [tractable](http://econ.jhu.edu/people/ccarroll/public/lecturenotes/Consumption/TractableBufferStock) yields some insight. If $\sigma$ is a measure of income risk, $r$ is the interest rate, and $\theta$ is the time preference rate, then for an 'impatient' consumer (for whom $\theta > r$), in the logarithmic utility case an approximate formula for the target level of wealth is:
#
# <!-- Search for 'an approximation to target market resources' and note that a=m-1, and \gamma=0 -->
#
# \begin{eqnarray}
# a & \approx & \left(\frac{1}{ \theta(1+(\theta-r)/\sigma)-r}\right)
# \end{eqnarray}
#
# Conceptually, this reflects the fact that the only reason any of these agents holds positive wealth is the precautionary motive. (If there is no uncertainty, $\sigma=0$ and thus $a=0$).
#
# For positive uncertainty $\sigma>0$, as the degree of impatience (given by $\theta-r$) approaches zero, the target level of wealth approaches infinity.
#
# A plot of $a$ as a function of $\theta$ for a particular parameterization is shown below.
# %% {"code_folding": []}
# Plot target wealth as a function of time preference rate for calibrated tractable model
fig = plt.figure()
ax = plt.axes()
sigma = 0.01
r = 0.02
theta = np.linspace(0.023,0.10,100)
plt.plot(theta,1/(theta*(1+(theta-r)/sigma)-r))
plt.xlabel(r'$\theta$')
plt.ylabel('Target wealth')
make_figs('target_wealth', True, False)
# remark.show('target_wealth')
|
from webapp1.websocks.tic_tac_toe.v2.consumer_base import TicTacToeV2ConsumerBase
# ^ two ^ two
# ------- ----------------------- ------------- -----------------------
# 1 2 3 4
# 1. アプリケーション フォルダー名
# 2. ディレクトリー名
# 3. Python ファイル名。拡張子抜き
# 4. クラス名
from webapp1.websocks.tic_tac_toe.v2.message_converter import TicTacToeV2MessageConverter
# ^ two ^ two
# ------- ----------------------- ----------------- ---------------------------
# 1 2 3 4
# 1. アプリケーション フォルダー名
# 2. ディレクトリー名
# 3. Python ファイル名。拡張子抜き
# 4. クラス名
class TicTacToeV2ConsumerCustom(TicTacToeV2ConsumerBase):
"""Webソケット用コンシューマー"""
def __init__(self):
super().__init__()
self._messageConverter = TicTacToeV2MessageConverter()
async def on_receive(self, doc_received):
"""クライアントからメッセージを受信したとき
Returns
-------
response
"""
return await self._messageConverter.on_receive(self.scope, doc_received)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.