text stringlengths 7 3.69M |
|---|
import React, { Component, PropTypes } from 'react'
import { head } from 'config'
import Helmet from 'react-helmet'
import './App.css'
export default class App extends Component {
static propTypes = {
children: PropTypes.node
}
render() {
const { children } = this.props;
return (<div>
<Helmet {...head}/>
{children}
</div>)
}
}
|
"use hyperloop"
Hyperloop.defineClass(AppActivity)
.package('com.test.app')
.extends('android.app.Activity')
.implements('android.view.View.OnTouchListener')
.method(
{
attributes: ['public'],
name: 'onCreate',
returns: 'void',
annotations: ['@Override'],
arguments: [{type:'android.os.Bundle', name:'savedInstanceState'}],
action: onCreate,
shouldCallSuper: true // true ... Call super method before callback
})
.method(
{
attributes: ['public'],
name: 'onTouch',
returns: 'boolean',
annotations: ['@Override'],
arguments: [{type:'android.view.View', name:'view'},{type:'android.view.MotionEvent',name:'event'}],
action: onTouch
}
).build();
function onTouch(v, e) {
var view = v.cast('android.view.View');
var event = e.cast('android.view.MotionEvent');
var _params = view.getLayoutParams();
var params = _params.cast('android.view.ViewGroup$MarginLayoutParams'); // TODO params = view.getLayoutParams().cast('..') does not work
var action = event.getAction();
if (action == android.view.MotionEvent.ACTION_MOVE || action == android.view.MotionEvent.ACTION_UP) {
params.topMargin = event.getRawY() - view.getHeight();
params.leftMargin = event.getRawX() - (view.getWidth() / 2);
view.setLayoutParams(params);
}
return true;
}
function onCreate(savedInstanceState) {
console.log('onCreate from JS');
// 'this' points to object that this function belongs to (in this case AppActivity)
var self = this.cast('android.app.Activity');
var main = Hyperloop.method('android.widget.FrameLayout','<init>(android.content.Context)').call(self);
var MATCH_PARENT = android.widget.FrameLayout$LayoutParams.MATCH_PARENT;
var TOP = android.view.Gravity.TOP;
var mainParams = Hyperloop.method('android.widget.FrameLayout$LayoutParams', '<init>(int,int,int)').call(MATCH_PARENT, MATCH_PARENT, TOP);
main.setLayoutParams(mainParams);
var red = Hyperloop.method('android.view.View','<init>(android.content.Context)').call(self);
red.setBackgroundColor(android.graphics.Color.RED);
var redParams = Hyperloop.method('android.widget.FrameLayout$LayoutParams','<init>(int,int,int)').call(200, 200, TOP);
red.setLayoutParams(redParams);
red.setOnTouchListener(self);
var blue = Hyperloop.method('android.view.View','<init>(android.content.Context)').call(self);
blue.setBackgroundColor(android.graphics.Color.BLUE);
var blueParams = Hyperloop.method('android.widget.FrameLayout$LayoutParams','<init>(int,int,int)').call(200, 200, TOP);
blueParams.setMargins(0, 300, 0, 0);
blue.setLayoutParams(blueParams);
blue.setOnTouchListener(self);
var yellow = Hyperloop.method('android.view.View','<init>(android.content.Context)').call(self);
yellow.setBackgroundColor(android.graphics.Color.YELLOW);
var yellowParams = Hyperloop.method('android.widget.FrameLayout$LayoutParams','<init>(int,int,int)').call(200, 200, TOP);
yellowParams.setMargins(0, 600, 0, 0);
yellow.setLayoutParams(yellowParams);
yellow.setOnTouchListener(self);
main.addView(yellow);
main.addView(blue);
main.addView(red);
Hyperloop.method(self, 'setContentView(android.view.View)').call(main);
}
|
import React from "react";
import { Link } from "react-router-dom";
import ThreadSearch from "../../Components/Threads/ThreadSearch";
import { connect } from 'react-redux';
import NamedRoutes from '../../Routes/NamedRoutes';
import { withRouter } from 'react-router-dom';
const Header = (props) => {
function logOut(event) {
event.preventDefault();
props.dispatch({
type: "LOGOUT",
value: null
});
props.dispatch({
type: "SHOW_FLASH",
value: {
message: "You are logged out successfully"
}
});
props.history.push("/");
}
return (
<nav className="navbar navbar-expand-lg navbar-dark bg-primary fixed-top ">
<Link className="navbar-brand" to="/">Forum</Link>
<button className="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01"
aria-label="Toggle navigation">
<span className="navbar-toggler-icon"/>
</button>
<div className="collapse navbar-collapse" id="navbarColor01">
<ul className="navbar-nav mr-auto">
<li className="nav-item active">
<Link className="nav-link" to="/">Home <span className="sr-only">(current)</span></Link>
</li>
</ul>
<ThreadSearch/>
<ul className="navbar-nav">
{
! props.auth.loggedIn &&
<>
<li className="nav-item">
<Link to="/signup" className="nav-link btn btn-info btn-signup" href="#"
>Signup</Link>
</li>
<li className="nav-item">
<Link to="/login" className="nav-link" >Login</Link>
</li>
</>
}
</ul>
{
props.auth.loggedIn &&
<div className="dropdown">
<button className="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{ props.auth.name } <i className="fa fa-user text-white" style={{ fontSize: "18px" }} />
</button>
<div className="dropdown-menu dropdown-menu-right" >
<Link to={ NamedRoutes['users.profile'] } className="dropdown-item">Profile</Link>
<Link to={ NamedRoutes['users.settings'] } className="dropdown-item">
<i className="fa fa-cogs" /> Settings
</Link>
<button className="dropdown-item" type="button" onClick={logOut}>Logout</button>
</div>
</div>
}
</div>
</nav>
)
};
const mapStateToProps = (state) => ({
auth: state.auth
});
export default connect(mapStateToProps)(
withRouter(Header)
);
|
/**
* Given a string, find the first non-repeating character in it and return it's index.
* If it doesn't exist, return -1.
*/
var firstUniqChar = function(s) {
let stringMap = new Map();
// create Map
// for (let i = 0; i < s.length; i++) {
// if(stringMap.has(s[i])) {
// stringMap.set(s[i], 2);
// } else {
// stringMap.set(s[i], 1);
// }
// }
for (let char of s) {
if(stringMap.has(char)) {
stringMap.set(char, 2);
} else {
stringMap.set(char, 1);
}
}
// iterate over string
for (let i in s) {
if (stringMap.get(s[i]) === 1) {
return i;
}
}
return -1;
}; |
var array = [ 1, null, '2', false, 3, { nome: 'Oi' } ];
array.lenght;
//6
array[99] = oi;
console.log(array);
//[ 1, null, '2', false, 3, { nome: 'Oi' }, undefined x 93, "oi" ]
/*
for (var i = 0; i < array.lenght; i++){
console.log(array[i]);
}
*/
for (var i = 0, len = array.length; i < len; i++){
console.log(array[i]);
}
var array = []; // forma mais utilizada
var array = new Array();
array.push('primeiro item');
array.push('segundo item');
//.push() retorna o lenght do array
|
import "./styles.css";
export const Button = ({ text, onClick, disabled, type }) => (
<button onClick={onClick} className={`button ${type}`} disabled={disabled}>
{text}
</button>
);
|
import React from "react";
import styled, { css } from "react-emotion";
import { LabelIcon, LocationIcon, AccessTimeIcon } from "mdi-react";
const NewInfo = props => {
const InfoText = styled("p")`
margin: 0px;
padding-top: 0.5em;
font-size: 1em;
font-weight: 500;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
`;
const InfoContainer = styled("div")`
display: flex;
flex-direction: column;
height: 15vh;
justify-content: space-around;
`;
const iconStyle = css`
padding-right: 8px;
color: #728dc3;
`;
return (
<InfoContainer>
<InfoText>
<LabelIcon className={iconStyle} size={20} />
Alture Festival, Padile Running Team
</InfoText>
<InfoText>
<AccessTimeIcon className={iconStyle} size={20} />
{props.startDate} - {props.endDate}
</InfoText>
<InfoText>
<LocationIcon className={iconStyle} size={20} />
{props.location} - mostra mappa
</InfoText>
</InfoContainer>
);
};
export default NewInfo;
|
import React from "react";
import { useAuth0 } from "../react-auth0-spa";
import styled from "@emotion/styled";
const NavBarStyle = styled.div`
display: flex;
justify-content: flex-end;
margin: 16px;
`;
const LoginLogoutButton = styled.button`
color: #555;
text-decoration: none;
border: 1px solid #898989;
padding: 10px 20px;
margin-right: 10px;
border-radius: 5px;
`;
const NavBar = () => {
const { isAuthenticated, loginWithRedirect, logout } = useAuth0();
return (
<NavBarStyle>
{/* if the user isn't logged in then it shows log in button */}
{!isAuthenticated && (
<LoginLogoutButton onClick={() => loginWithRedirect({})}>Log in</LoginLogoutButton>
)}
{/* if the user is logged in then it shows the log out button */}
{isAuthenticated && <LoginLogoutButton onClick={() => logout()}>Log out</LoginLogoutButton>}
</NavBarStyle>
);
};
export default NavBar;
|
/**
* Created by hridya on 2/25/16.
*/
(function() {
angular
.module("FormBuilderApp")
.factory("UserService", UserService);
function UserService($rootScope) {
var model = {
users: [
{ "_id":123, "firstName":"Alice", "lastName":"Wonderland",
"username":"alice", "password":"alice", "roles": ["student"] },
{ "_id":234, "firstName":"Bob", "lastName":"Hope",
"username":"bob", "password":"bob", "roles": ["admin"] },
{ "_id":345, "firstName":"Charlie", "lastName":"Brown",
"username":"charlie","password":"charlie", "roles": ["faculty"] },
{ "_id":456, "firstName":"Dan", "lastName":"Craig",
"username":"dan", "password":"dan", "roles": ["faculty", "admin"]},
{ "_id":567, "firstName":"Edward", "lastName":"Norton",
"username":"ed", "password":"ed", "roles": ["student"] }
],
setCurrentUser: setCurrentUser,
getCurrentUser: getCurrentUser,
findUserByCredentials: findUserByCredentials,
findAllUsers: findAllUsers,
createUser: createUser,
deleteUserById: deleteUserById,
updateUser: updateUser,
findUserByUsername: findUserByUsername
};
return model;
function setCurrentUser (user) {
$rootScope.currentUser = user;
}
function getCurrentUser () {
return $rootScope.currentUser;
}
function findUserByCredentials(credentials) {
for (var u in model.users) {
if (model.users[u].username === credentials.username &&
model.users[u].password === credentials.password) {
return model.users[u];
}
}
return null;
}
function findAllUsers() {
return model.users;
}
function createUser (user) {
var user = {
username: user.username,
password: user.password
};
model.users.push(user);
return user;
}
function deleteUserById(userId) {
for (var u in model.users) {
if (model.users[u]._id == userId) {
var index = model.users.indexOf(model.users[u]);
model.users.remove(index);
}
}
return model.users;
}
function updateUser (userId, user) {
for (var u in model.users) {
if (model.users[u]._id == userId) {
user1 = model.users[u];
user1.firstName = user.firstName;
user1.lastName = user.lastName;
user1.password = user.password;
return user1;
} else {
return null;
}
}
/*var user = model.findUserByUsername (currentUser.username);
if (user != null) {
user.firstName = currentUser.firstName;
user.lastName = currentUser.lastName;
user.password = currentUser.password;
return user;
} else {
return null;
}*/
}
function findUserByUsername (username) {
for (var u in model.users) {
if (model.users[u].username === username) {
return model.users[u];
}
}
return null;
}
}
})(); |
console.log('git');
console.log('dat'); |
const initialState = {
loadedDraftName: '',
};
const editorReducer = (state = initialState, action) => {
switch (action.type) {
case 'RESET':
return initialState;
case 'LOAD_DRAFT_NAME':
return { ...state, loadedDraftName: action.data };
case 'DELETE_DRAFT_NAME':
return { ...state, loadedDraftName: null };
default:
break;
}
return state;
};
export default editorReducer;
|
var data=require('../../common/common.js');
Page({
data:{
category:[
{ name: '果味', id: 'guowei' },
{ name: '蔬菜', id: 'shucai' },
{ name: '炒货', id: 'chaohuo' },
{ name: '点心', id: 'dianxin' },
{ name: '粗茶', id: 'cucha' },
{ name: '淡饭', id: 'danfan' }
],
detail:[],
curIndex: 0,
isScroll: true,
toView: ''
},
onLoad: function (options) {
this.setData({
detail: data.dataList
});
},
switchTab(e) {
this.setData({
toView: e.target.dataset.id,
curIndex: e.target.dataset.index,
isScroll: true
})
}
}) |
let Calculator = {
result: 0,
reset() {
Calculator.result = 0;
return Calculator.getResult;
},
getResult() {
console.log(Calculator.result);
return Calculator.getResult;
},
add(value) {
if (value === undefined) return Calculator.add;
Calculator.result += value;
return Calculator.add;
},
subtract(value) {
if (value === undefined) return Calculator.subtract;
Calculator.result -= value;
return Calculator.subtract;
},
divide(value) {
if (value === undefined) return Calculator.divide;
if ((value === 0) | (value === Infinity)) {
console.log("Недопустимая операция");
return Calculator.divide;
}
Calculator.result /= value;
return Calculator.divide;
},
multiply(value) {
if (value === undefined) return Calculator.multiply;
Calculator.result *= value;
return Calculator.multiply;
},
};
module.exports = Calculator;
|
import React from 'react';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles({
root: {
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translate(-50%, -50%)'
},
image: {
width: 100,
height: 80,
marginTop: 20
}
});
export default function ErrorScreen() {
const classes = useStyles();
return (
<div className={classes.root}>
<Typography gutterBottom variant='h5' component='h4'>
Oops! Something went worng...
</Typography>
<img className={classes.image} src='/images/sadcat.jpeg' alt='sadcat' />
</div>
);
} |
function blog(){
const blogs = document.querySelectorAll(".border");
blogs.forEach(function(blog){
blog.addEventListener("click",()=>{
const blogId = blog.getAttribute("data-id")
const xhr = new XMLHttpRequest();
xhr.open("GET",`blogs/${blogId}`, true);
xhr.responseType = "json";
xhr.send();
xhr.onload = ()=>{
const item = xhr.response.blog;
const detail = document.getElementById("blog-detail")
detail.innerHTML = `
<div class="blogItem" data-id=${item.id}>
${item.content.body}
</div>`;
}
});
});
}
window.addEventListener("load",blog) |
const Promise = require('bluebird');
const redis = require('redis');
const env = require('./env');
Promise.promisifyAll(redis.RedisClient.prototype);
Promise.promisifyAll(redis.Multi.prototype);
const options = { url: env.REDIS_DSN };
const client = redis.createClient(options);
module.exports = client;
|
import React, { useState } from "react";
const Login = ({ setLoggedIn }) => {
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
return (
<>
<form>
<label htmlFor="username">Username: </label>
<input
id="username"
value={username}
onChange={(e) => setUsername(e.target.value)}
/>
<br />
<label htmlFor="password">Password: </label>
<input
type="password"
id="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<br />
<button
id="loginBtn"
onClick={(e) => {
e.preventDefault();
if (username.length > 4) {
if (password.length > 4) {
setLoggedIn(username);
}
} else {
alert("username and password must be at least 5 char.");
}
}}
>
Log In
</button>
</form>
</>
);
};
export default Login;
|
var express = require("express"),
app = express(),
bodyParser = require("body-parser"),
mongoose = require("mongoose"),
passport = require('passport'),
FacebookStrategy = require('passport-facebook').Strategy,
cookieParser = require("cookie-parser"),
LocalStrategy = require('passport-local'),
flash = require("connect-flash"),
Pet = require("./models/pet"),
Comment = require("./models/comment"),
User = require("./models/user"),
session = require("express-session"),
methodOverride = require('method-override');
//requiring routes
var commentRoutes = require("./routes/comments"),
petRoutes = require("./routes/pets"),
indexRoutes = require("./routes/index");
var url = process.env.DATABASEURL || "mongodb://localhost/compete";
mongoose.connect(url);
app.use(bodyParser.urlencoded({extended: true}));
app.set("view engine", "ejs");
app.use(express.static(__dirname + '/public'));
app.use(methodOverride('_method'));
app.use(cookieParser('secret'));
app.use(require("express-session")({
secret: "Keyboard cat",
resave: false,
saveUninitialized: false
}));
app.use(flash());
app.use(passport.initialize());
app.use(passport.session());
passport.use(new LocalStrategy(User.authenticate()));
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());
app.use(function(req, res, next){
res.locals.currentUser = req.user;
res.locals.success = req.flash('success');
res.locals.error = req.flash('error');
next();
});
app.use(function(req, res, next){
// all the stuff from the example
if (req.session.user) {
res.locals.user = req.session.user
}
next();
});
app.use(function (req, res, next) {
res.locals.login = req.isAuthenticated();
next();
});
// passport.use(new FacebookStrategy({
// clientID: FACEBOOK_APP_ID,
// clientSecret: FACEBOOK_APP_SECRET,
// callbackURL: "http://localhost:8080/auth/facebook/callback",
// profileFields: ['id', 'displayName', 'photos', 'email']
// },
// function(accessToken, refreshToken, profile, done) {
// User.findOrCreate({ facebookId: profile.id }, function(err, user) {
// if (err) { return done(err); }
// done(null, user);
// });
// }
// ));
app.use("/", indexRoutes);
app.use("/pets", petRoutes);
app.use("/pets/:id/comment", commentRoutes);
app.listen(process.env.PORT, process.env.IP , function(){
console.log("The ComPETe server has started!");
});
|
import React, { PureComponent } from 'react'
import { connect } from 'react-redux'
import TakeMyLocationComp from './TakeMyLocationComp'
import { search } from './../../redux/actions/actions'
class TakeMyLocation extends PureComponent {
innerRef
constructor() {
super()
this.getInnerRef = this.getInnerRef.bind(this)
this.getLocation = this.getLocation.bind(this)
}
getInnerRef(ref) {
this.innerRef = ref
}
getLocation() {
this.innerRef && this.innerRef.getLocation()
}
render() {
const { getLocation, getInnerRef } = this
return (
<TakeMyLocationComp
ref={getInnerRef}
getLocation={getLocation}
{...this.props}
/>
)
}
}
const mapStateToProps = (state) => ({
currentApp: state.currentApp,
locations: state.locations
})
const mapDispatchtoProps = (dispatch) => ({
search: () => dispatch(search())
})
export default connect(mapStateToProps, mapDispatchtoProps)(TakeMyLocation)
|
// grab the form from HTML
var form = document.getElementById("dateRandom")
// create action for form (submit), then prevent refresh
form.addEventListener("submit", function(element){
element.preventDefault()
document.getElementsByClassName("drinks")[0].innerHTML = ""
document.getElementsByClassName("dates ")[0].innerHTML = ""
fetch("http://www.thecocktaildb.com/api/json/v1/1/random.php")
.then(function(response){
return response.json()
.then(function(drinkContent){
console.log(drinkContent);
var img = document.createElement("img")
var h2 = document.createElement("h2")
var drinkResults = document.getElementsByClassName("drinks")[0]
img.setAttribute("src", drinkContent.drinks["0"].strDrinkThumb)
drinkResults.append(img);
h2.innerText = drinkContent.drinks["0"].strDrink
drinkResults.append(h2);
})
})
fetch("https://randomuser.me/api/")
.then(function(response){
return response.json()
.then(function(datesContent){
console.log(datesContent);
var img = document.createElement("img")
var h2a = document.createElement("h2")
var h2b = document.createElement("h2")
var h3a = document.createElement("h3")
var h3b = document.createElement("h3")
var dateResults = document.getElementsByClassName("dates")[0]
img.setAttribute("src", datesContent.results["0"].picture.large)
dateResults.append(img);
h2a.innerText = datesContent.results["0"].name.first
dateResults.append(h2a);
h2b.innerText = datesContent.results["0"].name.last
dateResults.append(h2b);
// h3a.innerText = datesContent.results["0"].location.city
// dateResults.append(h3a);
// h3b.innerText = datesContent.results["0"].location.state
// dateResults.append(h3b);
})
})
})
|
import axios from 'axios'
import { ADDTOCART, ERRORADDINGTOCART, CARTPRODUCTS } from './__types'
export const addToCartAction = (product_id) => async dispatch => {
try {
const requestData = {
cart_id: localStorage.getItem('cartID'),
product_id,
quantity: 1
}
const response = await axios.post(`https://turing-ecommerce-challenge.herokuapp.com/api/shoppingCart/add`, requestData)
console.log(response.data)
dispatch({
type: ADDTOCART,
payload: 'Product added to cart',
status: response.data.status
})
} catch (error) {
dispatch({
type: ERRORADDINGTOCART,
payload: 'Error adding to cart',
status: error.status
})
}
}
export const CheckCartAction = () => async dispatch => {
try {
const cart_id = localStorage.getItem('cartID')
const response = await axios.get(`https://turing-ecommerce-challenge.herokuapp.com/api/shoppingCart/${cart_id}`)
console.log(response.data.products)
dispatch({
type: CARTPRODUCTS,
payload: response.data.products,
status: response.data.status
})
} catch (error) {
dispatch({
type: ERRORADDINGTOCART,
payload: ['Error adding to cart'],
status: error.status
})
}
} |
export const PLAYLIST_OPEN = "PLAYLIST_OPEN"
export const TOAST_OPEN = "TOAST_OPEN"
export const UPDATEPAGEINFODATA = "UPDATEPAGEINFODATA"
export const RATING_STATS = "RATING_STATS"
export const SEARCH_VALUE = "SEARCH_VALUE"
export const SEARCH_CHANGED = "SEARCH_CHANGED"
export const SHARE_POPUP = "SHARE_POPUP"
export const REPORT_CONTENT = "REPORT_CONTENT"
export const UPDATETIME_CONTENT = "UPDATETIME_CONTENT"
export const UPDATERELATEDPLAYLIST_CONTENT = "UPDATERELATEDPLAYLIST_CONTENT"
export const UPDATEAUDIO_CONTENT = "UPDATEAUDIO_CONTENT"
export const SEARCHCLICKED = "SEARCHCLICKED"
export const MENUOPENED = "MENUOPENED" |
export const API_KEY = 'AIzaSyCoJc7_HdAr12c7DDQ1VRqdPWbFsJDJuww';
|
/**
* @file demos/xui-switch.js
* @author leeight
*/
import {defineComponent} from 'san';
import {Switch, Button} from 'san-xui';
/* eslint-disable */
const template = `<template>
<xui-switch checked="{=switch.checked=}" />
<xui-switch checked="{{false}}" />
<xui-switch checked="{{false}}" disabled />
<xui-button disabled="{{!switch.checked}}">Hello xui-switch</xui-button>
</template>`;
/* eslint-enable */
export default defineComponent({
template,
components: {
'xui-button': Button,
'xui-switch': Switch
},
initData() {
return {
'switch': {
checked: true
}
};
}
});
|
'use strict';
// Author: ThemeREX.com
// basic-timeline.html scripts
//
(function ($) {
$(document).ready(function () {
"use strict";
// Init Theme Core
Core.init();
// Init Demo JS
Demo.init();
// Initialize Gmap
if ($('#map_canvas1').length) {
$('#map_canvas1').gmap({
'center': '40.7127837,-74.00594130000002',
'zoom': 10,
'disableDefaultUI': true,
'callback': function () {
var self = this;
self.addMarker({
'position': this.get('map').getCenter()
}).click(function () {
self.openInfoWindow({
'content': 'Welcome to New York!'
}, this);
});
}
});
}
function runVectorMaps() {
// Jvector Map
var runJvectorMap = function () {
// Set data
var mapData = [900, 700, 350, 500];
// Init map
$('#WidgetMap').vectorMap({
map: 'us_lcc_en',
backgroundColor: 'transparent',
series: {
markers: [{
attribute: 'r',
scale: [3, 7],
values: mapData
}]
},
regionStyle: {
initial: {
fill: '#E5E5E5'
},
hover: {
"fill-opacity": 0.3
}
},
markers: [{
latLng: [36, -119],
name: 'California,CA'
}, {
latLng: [30, -100],
name: 'Texas,TX'
}, {
latLng: [27, -81],
name: 'Florida,Fl'
}],
markerStyle: {
initial: {
fill: '#a288d5',
stroke: '#b49ae0',
"fill-opacity": 1,
"stroke-width": 10,
"stroke-opacity": 0.3,
r: 3
},
hover: {
stroke: 'black',
"stroke-width": 2
},
selected: {
fill: 'blue'
},
selectedHover: {}
}
});
// Add demo countries
var states = ['US-CA', 'US-TX', 'US-FL'];
var colors = [bgSuccessLr, bgWarningLr, bgPrimaryLr];
var colors2 = [bgSuccess, bgWarning, bgPrimary];
$.each(states, function (i, e) {
$("#WidgetMap path[data-code=" + e + "]").css({
fill: colors[i]
});
});
$('#WidgetMap').find('.jvectormap-marker')
.each(function (i, e) {
$(e).css({
fill: colors2[i],
stroke: colors2[i]
});
});
};
if ($('#WidgetMap').length) {
runJvectorMap();
}
}
runVectorMaps();
// Timeline toggle
$('#timeline-toggle').on('click', function () {
$('#timeline').toggleClass('timeline-single');
Holder.run();
});
// Attach debounced resize handler
var rescale = function () {
if ($(window).width() < 1250) {
$('#timeline').addClass('timeline-single');
$('#timeline-toggle').hide();
} else {
$('#timeline').removeClass('timeline-single');
$('#timeline-toggle').show();
}
Holder.run();
};
var lazyLayout = _.debounce(rescale, 300);
// Rebuild on resize
$(window).resize(lazyLayout);
rescale();
// Summernote
$('.summernote-quick').summernote({
height: 179,
focus: false,
toolbar: [
['style', ['bold', 'italic', 'underline']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
// Init Magnific Popup
$('a.gallery-item').magnificPopup({
type: 'image',
gallery: {
enabled: true
}
});
});
})(jQuery);
|
const awsconfig = {
API: {
endpoints: [
{
name: "Calculations",
endpoint: "https://b79swwgvvd.execute-api.eu-west-2.amazonaws.com/dev"
},
{
name: "MusicsAPI",
endpoint: "https://6rlbrm7lwe.execute-api.eu-west-2.amazonaws.com/dev"
},
{
name: "getNameAPI",
endpoint: "https://c0vyslztq3.execute-api.eu-west-2.amazonaws.com/dev"
},
{
name: "AccessUserDataAPI",
endpoint: "https://2yrl9uta8f.execute-api.eu-west-2.amazonaws.com/dev"
}
]
}
};
export default awsconfig; |
[
{
"creatDate": "2018-09-09",
"id": "11138",
"image": "/d/file/gcjp/91porn/2018-09-09/268e17b6894aaf595c0da4c93b9f8f41.gif",
"longTime": "00:14:36",
"title": "boss哥未公开视频 牛奶浴油亮大屁股美美哒720P完整版",
"video": "https://play.cdmbo.com/20180908/RebWBgVI/index.m3u8"
},
{
"creatDate": "2018-09-09",
"id": "11137",
"image": "/d/file/gcjp/91porn/2018-09-09/a86438b9bf8d18d42e5be401bce008f7.jpg",
"longTime": "00:23:21",
"title": "爆草黑丝人民女教师 户外口交床上爆草浴室边冲边操精彩剪辑",
"video": "https://play.cdmbo.com/20180908/arjSVf8z/index.m3u8"
}
] |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Game from './Game';
import actions from '../actions';
function mapStateToProps({ status }) {
return {
status,
};
}
function mapDispatchToProps(dispatch) {
return {
startGame: () => dispatch(actions.startGame()),
};
}
class Player extends Component {
render() {
const { username, role, status, startGame } = this.props;
if (status.startsWith('PLAYING')) {
return <Game/>;
}
return (
<div className="Player">
<h2>Hello <span className="username">{username}</span>!</h2>
{role === 'player' && <p>Wait for the master to start the game!</p>}
{role === 'master' && <button onClick={startGame}>Launch game!</button>}
</div>
);
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Player);
|
// import something here
import firebase from 'firebase'
// "async" is optional
export default async ({ router /* app, router, Vue, ... */ }) => {
// something to do
router.beforeEach( (to, from, next) => {
firebase.auth().onAuthStateChanged(user => {
const requiresAuth = to.matched.some(record => record.meta.auth)
if(requiresAuth && !user) next({name: 'login'})
else if(!requiresAuth && user) next({name: 'index'})
else next()
})
})
}
|
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const db = require('./queries.js');
const path = require('path');
const multer = require('multer');
const uidSafe = require('uid-safe');
const s3 = require('./s3.js')
//Middleware:
app.use(express.static(__dirname + '/public'));
app.use(bodyParser.urlencoded({
extended: false
}));
app.use(bodyParser.json());
var diskStorage = multer.diskStorage({
destination: (req, file, callback) => {
callback(null, __dirname + '/uploads');
},
filename: (req, file, callback) => {
uidSafe(24).then((uid) => {
callback(null, uid + path.extname(file.originalname));
});
}
});
var uploader = multer({
storage: diskStorage,
limits: {
fileSize: 2097152
}
});
//Routes:
app.get('/images', (req, res) => {
return db.getImages()
.then((results) => {
res.json(results);
}).catch((err) => {
console.log(err);
})
});
app.post('/upload', uploader.single('file'), (req, res) => {
console.log('inside post-upload', req.body);
console.log('inside post-upload', req.file);
if (req.file) {
s3.upload(req.file)
.then(() => {
db.addImage(req.file.filename, req.body.username, req.body.title, req.body.description, req.body.directions, req.body.ingredients)
})
}
})
app.get('/image/:id', (req, res) => {
Promise.all([
db.getImageById(req.params.id),
db.getComments(req.params.id)
])
.then((results) => {
console.log(results);
res.json(results);
})
.catch((err) => {
console.log(err);
})
})
app.post('/post-comment/:id', (req, res) => {
console.log(req.body);
if(req.body.username && req.body.comment) {
db.addComment(req.body.username, req.body.comment, req.params.id)
} else {
console.log('ERROR!');
}
})
app.get('*', (req, res) => {
res.sendFile(__dirname + '/public/index.html')
})
//Server:
app.listen(8080, () => {
console.log('Listening on port 8080...');
})
|
import React from 'react';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import Card from './Card'
const styles = {
ul: {
listStyle: 'none',
padding: '0',
},
input: {
color: 'black',
padding: '10px',
margin: '0 auto',
display: 'block',
width: '80%',
margin: '2% auto',
}
}
class Container extends React.Component {
constructor(props) {
super(props)
this.state = {
cards: [
{id: 1, text: 'Learn React'},
{id: 2, text: 'Eat food'},
],
currentCard: 'Add an item...'
}
this.handleSubmit = this.handleSubmit.bind(this)
this.handleChange = this.handleChange.bind(this)
this.moveCard = this.moveCard.bind(this)
}
handleChange(e) {
this.setState({ currentCard: e.target.value })
}
handleSubmit(e) {
if (e.keyCode == 13) {
const { cards, currentCard } = this.state;
const currentMax = Math.max(...cards.map(card => card.id))
const nextId = currentMax + 1;
const newCard = {
id: nextId,
text: currentCard
}
this.setState({
currentCard: null,
cards: [...cards, newCard],
})
}
}
moveCard(dragIndex, hoverIndex) {
const { cards } = this.state;
const dragCard = cards[dragIndex];
cards.splice(dragIndex, 1)
cards.splice(hoverIndex, 0, dragCard)
this.setState({ cards: cards});
}
render() {
const { cards, currentCard } = this.state;
const renderCards = cards.map((card, i) => {
return (
<Card
key={card.id}
index={i}
moveCard={this.moveCard}
{...card}
/>
)
});
return (
<div style={{width: '100%', display: 'block'}}>
<input
style={styles.input}
type="text"
onKeyDown={this.handleSubmit}
onChange={this.handleChange}
onFocus={() => this.setState({currentCard: null})}
onBlur={() => this.setState({currentCard: 'Add an item...'})}
value={currentCard}
/>
<ul style={styles.ul}>
{renderCards}
</ul>
</div>
)
}
}
export default DragDropContext(HTML5Backend)(Container);
|
import React from 'react';
import ChatDisplay from './ChatDisplay.js';
import './Chat.css';
import firebase from 'firebase';
var Chat = React.createClass({
save:function() {
var user = firebase.auth().currentUser.displayName
var val = this.refs.newText.value;
var listings = firebase.database().ref('Listings');
console.log(typeof this.props.chatInfo.id);
console.log(this.props.chatInfo.id);
listings.orderByKey().equalTo(this.props.chatInfo.id).once('value').then(function(snapshot){
var value = snapshot.val();
var key = Object.keys(value);
var chat = value[key].chat;
var ListingInfo = value[key].ListingInfo;
var friends = value[key].friends;
var newMessage = user + ': ' + val;
if(chat[0] == 'Start a conversation!'){
chat[0] = newMessage;
}
else {
chat.push(newMessage);
}
listings.child(this.props.chatInfo.id).set({
ListingInfo:ListingInfo,
chat:chat,
friends:friends
});
this.setState({text: chat})
}.bind(this));
},
render() {
return(
<div id="chat">
<div id="title">
<h4>{this.props.title}</h4>
</div>
<ChatDisplay key={this.props.chatInfo.id} text={this.props.chatInfo.chat} />
<div id="chatMessage">
<div className="input-field">
<input ref="newText" type="text" />
<button onClick={this.save} className="btn">SENT</button>
</div>
</div>
</div>
)
}
})
export default Chat;
|
const Currency = require('../../src/models/currencyModel');
const mongoose = require('mongoose');
const chai = require('chai');
module.exports = describe('Testes do banco de dados:', (req, res) => {
// Antes de começar os testes, verifica se a conexão está estabelecida com o BD
// Caso esteja, invoca done() e inicia os testes
before(done => {
var databaseUp = mongoose.connection.readyState
if (databaseUp == 1) {
/*
0: desconectado
1: conectado
2: conectando
3: desconectando
*/
done();
}
throw new Error('Conexão com banco de dados não estabelecida!')
})
after(done => {
Currency.deleteMany({}, (err) => {
done();
});
});
describe('Testando gravação e leitura no banco de dados', () => {
// Salva objeto com sigla "PHP" e nome "Peso Filipino"
it('Nova moeda salva no banco de dados', done => {
var currency = Currency({
sigla: 'PHP',
nome: 'Peso Filipino'
});
currency.save(done);
});
it('Deve retornar moeda previamente cadastrada (PHP)', done => {
// Retorna as informações do banco de dados
Currency.find({
sigla: 'PHP'
})
.then(currencies => {
if(currencies.length === 0) {
throw new Error('Moeda não encontrada!')
}
done();
})
.catch(err => {
res.status(500).send({
message:
err.message || 'Erro ao recuperar moedas.'
});
});
});
it('Deve retornar todas as informações do banco de dados', done => {
// Retorna as informações do banco de dados
Currency.find()
.then(currencies => {
if(currencies.length === 0) {
throw new Error('Não há dados no banco de dados!')
}
done();
})
.catch(err => {
res.status(500).send({
message:
err.message || 'Erro ao recuperar moedas.'
});
});
});
});
}); |
function bubbleSort(array) {
if (array.length === 0 || array.length === 1) {
return array;
}
var i=0;
while (i<array.length) {
for (var j=0; j<array.length-1; j++) {
if (array[j] > array[j+1]) {
swap(array[j], array[j+1], array, j)
}
}
i++
}
return array;
}
// hold onto bigger value
var swap = function (val1, val2, array, j) {
array[j] = val2;
array[j+1] = val1;
return array;
}
|
const fs = require('fs')
const path = require('path')
const args = process.argv.slice(2)
if (typeof args[0] !== 'string') {
throw new Error('image directory path is required')
}
const dir = args[0]
const files = fs.readdirSync(dir).filter((file) => {
return ['.png', '.jpg'].includes(path.extname(file))
})
const data = files.map((file) => {
const filePath = path.resolve(dir, file)
const stat = fs.statSync(filePath)
return [filePath, stat.birthtimeMs]
})
fs.writeFileSync('output.csv', data.map((row) => row.join(',')).join('\n'))
|
import { useEffect, useState } from 'react';
import Socket from '../Socket';
function useOnSocket(socket, room, setRoom) {
const [postMessage] = Socket();
const [hasRun, setHasRun] = useState(false);
useEffect(() => {
if(!hasRun) {
socket.on('message', (guest, message, messageClass, audio) => {
postMessage(guest, message, messageClass, audio)
});
setHasRun(true);
}
}, [socket, postMessage, hasRun]);
}
export default useOnSocket; |
import React from 'react'
import { throttle } from 'lodash'
const win = typeof window !== 'undefined' ? window : false
/**
* Parent component for Cell that calculates available
* width for setting Cells inline.
*/
class Grid extends React.Component {
constructor () {
super ()
this.updateWidth = this.updateWidth.bind(this)
this.getMinTotal = this.getMinTotal.bind(this)
this.state = {
width: 768
}
}
updateWidth () {
const el = this.refs.root
const { width } = el.getBoundingClientRect()
this.setState({ width })
}
getMinTotal () {
let total = 0
const { children, min } = this.props
React.Children.map(children, (child, i) => {
let childMin = child.props.min || false
if (!childMin) {
childMin = min
}
total += childMin
})
return total
}
componentDidMount () {
this.updateWidth()
if (win) {
this.startListeningForResize()
}
}
componentWillUnmount () {
if (win) {
this.stopListeningForResize()
}
}
componentDidUpdate (prevProps) {
if (win && prevProps.throttleResize !== this.props.throttleResize) {
this.stopListeningForResize()
this.startListeningForResize()
}
}
startListeningForResize () {
this.throttledUpdateWidth = throttle(this.updateWidth, this.props.throttleResize)
win.addEventListener('resize', this.throttledUpdateWidth)
}
stopListeningForResize () {
win.removeEventListener('resize', this.throttledUpdateWidth)
}
render () {
const { children, gutter } = this.props
const { width } = this.state
const style = {
overflow: 'hidden',
marginLeft: -gutter,
marginRight: -gutter,
position: 'relative'
}
// min width denominator
const dmin = this.getMinTotal()
// min values of max cells
let maxmins = []
// max values of max cells
let maxes = []
React.Children.map(children, (child) => {
if (child.props.max && child.props.min / dmin * width > child.props.max) {
maxes.push(child.props.max)
maxmins.push(child.props.min)
}
})
// sum of max cell values
const maxSum = maxes.length ? maxes.reduce((a, b) => { return a + b }) : 0
// sum of min values for max cells
const maxminSum = maxmins.length ? maxmins.reduce((a, b) => { return a + b }) : 0
// percent offset from remaining min cell widths
const offset = (maxSum / width) / ((children ? children.length : 0) - maxes.length)
const denominator = dmin - maxminSum
// set child props
const modifiedChildren = React.Children.map(children, (child) => {
let childWidth = child.props.min / denominator - offset
if (child.props.max && child.props.min / dmin * width > child.props.max) {
childWidth = child.props.max / width
}
let childProps = {
width: childWidth,
inline: dmin < width
}
if (!child.props.padding) {
childProps.padding = gutter
}
return React.cloneElement(child, childProps)
})
return (
<div
ref='root'
style={style}>
{modifiedChildren}
</div>
)
}
}
Grid.propTypes = {
/** Sets a default min prop on child Cell components */
min: React.PropTypes.number,
/** Sets negative left and right margins to compensate for Cell padding prop */
gutter: React.PropTypes.number,
/** Milliseconds for throttling window resize listener */
throttleResize: React.PropTypes.number,
}
Grid.defaultProps = {
min: 640,
gutter: 0,
throttleResize: 200
}
export default Grid
|
import Relation from '../../../models/im/relation'
import { tableColumnsByDomain } from '../../../scripts/utils/table-utils'
const width = App.options.styles.table.width
const options = {
customID: {
width: width.w_31,
title: '好友微信信息',
render(h, context) {
const row = context.row
return <div class='tl'>
<div class='avatar-img padding10-0 dpib'>
<im-avatar url={ row.contact.avatar }></im-avatar>
{ row.favorite === 1 ? <div class='star'></div> : '' }
</div>
<im-contact-info-widget contact={Object.assign(row.contact, { fromId: row.profile.contactID, toId: row.contact.id, sourceType: row.sourceType, alias: row.alias }) }></im-contact-info-widget>
</div>
}
},
'profile.customID': {
width: width.w_22,
title: '所属微信信息',
after: 'customID',
render(h, context) {
const row = context.row
return <div class='tl'>
<div class='avatar-img padding10-0 dpib'>
<im-avatar url={ row.profile.avatar }></im-avatar>
</div>
<im-account-ower-info-widget profile={ row.profile || {}}></im-account-ower-info-widget>
</div>
}
},
employee: {
width: width.w_14,
title: '员工信息',
render(h, context) {
const employee = _.result(context.row.profile, 'employee') || {}
const employeeName = _.result(employee, 'name') || ''
const sn = _.result(employee, 'sn')
const departments = (_.result(employee, 'departments') || []).map(it => { return it.name }).join('')
return <div class='padding10-0 tl'>
<span>
<div>
<span class='info-name'>归属员工:</span>
<span class='ellipsis info-value mw128 data-value'>
<tooltip transfer content={`${employeeName}(${sn})`}>{employeeName}{sn ? `(${sn})` : ''}</tooltip>
</span>
</div>
<div>
<span class='info-name'>归属部门:</span>
<span class='ellipsis info-value mw128 data-value'>
<tooltip transfer content={departments}>{departments}</tooltip>
</span>
</div>
</span>
</div>
}
},
alias: false,
tags: false,
type: false,
status: false,
favorite: false,
requestTime: false,
approvedTime: false,
ctime: false,
timelineBlockByAccount: false,
timelineBlockByContact: false,
blacklistByAccount: false,
blacklistByContact: false
}
export default tableColumnsByDomain(Relation, options)
|
import React, { Component } from 'react';
import SampleComponent2 from './SampleComponent2';
class SampleComponent1 extends Component {
constructor(props){
super(props);
this.state = {
answer: 0,
length: 4,
width: 5
}
}
onAnswer(answer) {
this.setState({ answer:answer });
}
render() {
const { answer, length, width } = this.state;
return (
<div>
<SampleComponent2
length={length}
width={width}
_onAnswer={this.onAnswer.bind(this)}
/>
<h1>Answer: {answer}</h1>
</div>
)
}
}
export default SampleComponent1; |
/*
https://jupyter-notebook.readthedocs.io/en/latest/extending/frontend_extensions.html
*/
define([
'base/js/namespace'
], function(
Jupyter
) {
function load_ipython_extension() {
if (Jupyter.notebook.get_cells().length===1){
//do your thing
Jupyter.notebook.insert_cell_above('code', 0).set_text("from __future__ import division, print_function\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nimport seaborn as sns\nimport re\nfrom calendar import monthrange\nfrom pandas_datareader import data as web\nfrom pandas.tseries.offsets import DateOffset, Second, Minute, Hour, Day\n\nimport xlwings as xw\nfrom xlwings import Workbook, Range, Sheet\n\nimport plotly.graph_objs as pgo\nfrom plotly.offline import plot, init_notebook_mode, iplot, iplot_mpl\nimport pdb\nimport cufflinks as cf\n\npd.options.display.max_rows = 10\npd.set_option('max_columns', 50)\nsns.set(style='ticks', context='talk')");
Jupyter.notebook.insert_cell_above('code', 1).set_text("import IPython\nthousand_c = lambda x: '{:,}'.format(x)\nthousands = lambda arg, p, cycle: p.text('{:,}'.format(arg))\nnp.set_printoptions(formatter={'float_kind': thousand_c, 'int_kind': thousand_c})\nclass IntFormatter(pd.formats.format.GenericArrayFormatter):\n pd.set_option('display.float_format', thousand_c)\n def _format_strings(self):\n formatter = self.formatter or thousand_c\n fmt_values = [formatter(x) for x in self.values]\n return fmt_values\npd.formats.format.IntArrayFormatter = IntFormatter\nfrm = get_ipython().display_formatter.formatters['text/plain']\nfrm.for_type(int, thousands)\nfrm.for_type(float, thousands)\nnp.set_printoptions(precision = 4)");
Jupyter.notebook.insert_cell_above('code', 2).set_text("from pivottablejs import pivot_ui");
}
}
return {
load_ipython_extension: load_ipython_extension
};
});
|
export * from './WeirdnessLayout/WeirdnessLayout'; |
saludalosojos.directive('classModelos', function (){
return {
restrict: 'EA',
scope: {
modelo: "=",
mainmodelo:"="
},
link: function(scope, element, attrs) {
if (scope.modelo == scope.mainmodelo)
element.addClass("active");
else{
element.addClass("no-active");
var index = angular.element(".modelo-thumbnail.no-active").length;
element.addClass("index-" + index);
}
}
};
}); |
import React, { useReducer } from "react";
import {
DEPOSIT_MONEY,
TRANSFER_MONEY,
WITHDRAW_MONEY,
LOAD_BALANCE,
WALLET_ERROR,
WALLET_HISTORY,
CLEAR_FIELDS,
CLEAR_ERRORS,
} from "../types";
import WalletContext from "./walletContext";
import walletReducer from "./walletReducer";
import axios from "axios";
import { WALLET_ROUTE, ONLINE_API } from "../../utils/routes";
const WalletState = (props) => {
const initialState = {
balance: 0,
loading: true,
error: null,
transactions: [],
field: null,
};
const config = {
headers: {
"Content-Type": "application/json",
},
};
const [state, dispatch] = useReducer(walletReducer, initialState);
const loadBalance = async () => {
try {
const res = await axios.get(`${ONLINE_API}${WALLET_ROUTE}/history`);
dispatch({
type: LOAD_BALANCE,
payload: res.data.data[0].balance,
});
} catch (error) {
dispatch({
type: WALLET_ERROR,
payload: error.response.data.errors[0].error,
});
}
};
const depositMoney = async (data) => {
try {
const res = await axios.post(
`${ONLINE_API}${WALLET_ROUTE}/deposit`,
data,
config
);
dispatch({ type: DEPOSIT_MONEY, payload: res.data.data });
loadBalance();
} catch (error) {
dispatch({
type: WALLET_ERROR,
payload: error.response.data.errors[0].error,
});
}
};
const withdrawMoney = async (data) => {
try {
const res = await axios.post(
`${ONLINE_API}${WALLET_ROUTE}/withdraw`,
data,
config
);
dispatch({ type: WITHDRAW_MONEY, payload: res.data.data });
loadBalance();
} catch (error) {
dispatch({
type: WALLET_ERROR,
payload: error.response.data.errors[0].error,
});
}
};
const transferMoney = async (data) => {
try {
const res = await axios.post(
`${ONLINE_API}${WALLET_ROUTE}/transfer`,
data,
config
);
dispatch({ type: TRANSFER_MONEY, payload: res.data.data });
loadBalance();
} catch (error) {
dispatch({
type: WALLET_ERROR,
payload: error.response.data.errors[0].error,
});
}
};
const transactionHistory = async () => {
try {
const res = await axios.get(`${ONLINE_API}${WALLET_ROUTE}/history`);
dispatch({
type: WALLET_HISTORY,
payload: res.data.data[0].walletTransactions,
});
} catch (error) {
dispatch({
type: WALLET_ERROR,
payload: error.response.data.errors[0].error,
});
}
};
const clearFields = () => dispatch({ type: CLEAR_FIELDS });
const clearErrors = () =>
setTimeout(() => dispatch({ type: CLEAR_ERRORS }), 3000);
return (
<WalletContext.Provider
value={{
balance: state.balance,
loading: state.loading,
error: state.error,
transactions: state.transactions,
field: state.field,
loadBalance,
withdrawMoney,
transferMoney,
depositMoney,
transactionHistory,
clearFields,
clearErrors,
}}
>
{props.children}
</WalletContext.Provider>
);
};
export default WalletState;
|
import { scaleRect } from '../utils/common';
export const selectApi = (state) => {
return {
dataApi: state.file.dataApi,
apiState: state.file.apiState,
};
};
export const selectFiles = (state) => {
const { dataApi, apiState } = state.file;
if (apiState === 'ok') {
return dataApi.GetCachedDocuments();
}
return [];
};
export const selectCurrentFile = (state) => {
return {
currentFile: state.file.currentFile,
documentLoaded: state.file.documentLoaded,
};
};
export const selectScale = (state) => {
return state.file.scale;
};
// get all notes
export const selectNotes = (state) => {
const { file } = state;
const { apiState, dataApi } = file || {};
let noteArray = [];
if (apiState === 'ok') {
noteArray = dataApi.GetCachedNotes();
}
return noteArray;
};
// used by notes tab
export const selectFilteredNotes = (state) => {
const { file } = state;
const { noteTodoFilter, apiState, dataApi } = file || {};
let noteArray = [];
if (apiState === 'ok') {
noteArray = dataApi.GetCachedNotes();
}
const noteArrayFiltered = noteTodoFilter
? noteArray.filter((n) => {
return (
n.todoDependency && n.todoDependency.indexOf(noteTodoFilter) !== -1
);
})
: noteArray;
const noteArraySorted = noteArrayFiltered.sort(function (n1, n2) {
const t1 = n1.lastModifiedTime ? Date.parse(n1.lastModifiedTime) : 0;
const t2 = n2.lastModifiedTime ? Date.parse(n2.lastModifiedTime) : 0;
if (t1 === 0) {
console.log('n1 = ', n1);
if (t2 === 0) {
return 0;
}
return -1;
}
if (t2 === 0) {
console.log('n2 = ', n2);
return 1;
}
return t2 - t1;
});
const noteSummaryArray = noteArraySorted.map((n) => {
return {
// eslint-disable-next-line no-underscore-dangle
id: n.id,
height: n.height,
scale: n.scale,
};
});
return { notes: noteSummaryArray };
};
export const selectNoteTodoFilter = (state) => {
const { file } = state;
const { noteTodoFilter } = file || {};
console.log('noteTodoFilter = ', noteTodoFilter);
return noteTodoFilter;
};
export const selectTodos = (state) => {
const { dataApi, apiState } = state.file;
if (apiState === 'ok') {
return dataApi.GetCachedTodos();
}
return [];
};
export const selectEditingNote = (state) => {
const { editingNid, apiState, dataApi } = state.file;
if (apiState !== 'ok') {
return {
editingNoteId: editingNid,
editingNote: null,
};
}
return {
editingNoteId: editingNid,
editingNote: dataApi.GetNoteById(editingNid),
};
};
export const selectDeletingNote = (state) => {
const { deletingNid } = state.file;
return { deletingNoteId: deletingNid };
};
export const selectNoteById = (noteId) => (state) => {
const { dataApi, apiState } = state.file;
if (apiState !== 'ok') {
return null;
}
return dataApi.GetNoteById(noteId);
};
export const selectTodoById = (todoId) => (state) => {
const { dataApi, apiState } = state.file;
if (apiState !== 'ok') {
return null;
}
return dataApi.GetTodoById(todoId);
};
export const selectEditingFile = (state) => {
const { editingFileId, apiState, dataApi } = state.file;
if (apiState !== 'ok') {
return {
editingFileId,
editingFile: null,
};
}
return {
editingFileId,
editingFile: dataApi.GetDocumentById(editingFileId),
};
};
export const selectDeletingFile = (state) => {
const { deletingFileId, apiState, dataApi } = state.file;
if (apiState !== 'ok') {
return {
deletingFileId,
deletingFile: null,
};
}
return {
deletingFileId,
deletingFile: dataApi.GetDocumentById(deletingFileId),
};
};
export const selectNoteUiState = (noteId) => (state) => {
const { editingNid } = state.file;
return {
// if editing this note, only show selection box, not the static box
visible: editingNid !== noteId,
disableClick: Boolean(editingNid),
};
};
export const selectSelectRect = (state) => {
const { showSelection, rect, scale } = state.file;
const scaledRect = rect
? scaleRect(rect, scale / 100)
: {
top: 0,
left: 0,
width: 0,
height: 0,
angle: 0,
};
return { showSelection, scaledRect };
};
// image search selection rectangle
export const selectImageSelectRect = (state) => {
const { imageSelectBox, imageSelectPage, scale } = state.file;
if (!imageSelectBox) {
return {
showSelection: false,
pageNum: -1,
scaledRect: null,
};
}
const scaledRect = scaleRect(imageSelectBox, scale / 100);
return { showSelection: true, scaledRect, pageNum: imageSelectPage };
};
// image search selection rectangle
export const selectRawImageSelectRect = (state) => {
const { imageSelectBox, imageSelectPage, currentFile } = state.file;
const fileId = currentFile ? currentFile.id : null;
return { imageSelectBox, imageSelectPage, fileId };
};
export const selectNoteImageScale = (state) => state.note.imageScale;
export const selectIsWeb = (state) => state.file.isWeb;
export const selectFilePageProps = (state) => {
const { file, search } = state;
const {
scale,
pageNum,
pageNumIsEffective,
numPages,
fileId,
doc,
docLoading,
noteLoaded,
pageWidth,
pageHeight,
} = file || {};
const { searchResults } = search || {};
let status = 'loading';
let message;
if (!doc) {
message = 'loading document';
} else {
status = 'ready';
}
return {
status,
message,
doc,
docLoading,
pageNum,
pageNumIsEffective,
numPages,
fileId,
scale,
searchResults,
noteLoaded,
pageWidth,
pageHeight,
};
};
|
const cities = [
'Ciudad de Mexico',
'Bogota',
'Lima',
'Buenos Aires',
'Guadalajara',
];
const randomCity = () => {
const city = cities[Math.floor(Math.random() * cities.length)];
return city;
};
module.exports = randomCity;
|
// import something here
import Dexie from 'dexie';
import moment from 'moment'
const db = new Dexie('sully');
db.version(1).stores({
cursos: `++id`,
temas: `++id, fecha, curso.id`,
user: `uid`
})
// db.open().catch(err => {
// console.error(`Open failed: ${err.stack}`);
// });
export async function setCursoWithTemas(curso){
return db.cursos.put(curso).then(id => {
return setTemasFromCurso(curso)
})
}
export async function setCursosWithTemas(cursos){
let promises = []
cursos.forEach(curso => {
promises.push(setCursoWithTemas(curso))
})
return Promise.all(promises)
}
export async function setCurso(curso){
return db.cursos.put(curso)
}
export async function setCursos(cursos){
let promises = [ ]
cursos.forEach(curso => {
promises.push(setCurso(curso))
});
return Promise.all(promises)
}
export async function setTemasFromCurso(curso){
let temas = []
curso.temas.forEach(tema => {
tema.curso = curso
temas.push(tema)
})
return db.temas.bulkPut(temas)
}
export async function setTemas(curso){
return db.temas.bulkPut(curso.temas)
}
export async function getCurso(id){
return db.cursos.get({id})
}
export async function getCursos(){
return db.cursos.toArray()
}
export async function getTemas(){
return db.temas.toArray()
}
export async function getTemasOrdenados(){
return db.temas.orderBy('fecha').toArray()
}
export async function getUser(){
return db.user.toArray()
}
export async function searchCurso(id){
return db.cursos.where({id}).first()
}
export async function setUser(usuario){
if (usuario) {
let u = {
uid: usuario.uid,
nombre: usuario.displayName,
email: usuario.email
}
return db.user.put(u)
}
}
export async function getTemasAgrupados(){
let temas = await db.temas.orderBy('fecha').toArray()
console.log('TEMAS', temas);
return agruparTemas(temas)
}
function agruparTemas(temas){
let temas_agrupados = {}
temas.forEach(tema => {
temas_agrupados[tema.fecha] = []
})
temas.forEach(tema => {
temas_agrupados[tema.fecha].push(tema)
// temas_agrupados[tema.fecha]
})
return temas_agrupados
}
export async function getTemasAgrupadosAtNow(){
// let hoy = moment().format()
let hoy = moment().format("YYYY-MM-DD")
console.log('Hoy', hoy);
return db.temas.where('fecha').aboveOrEqual(hoy).toArray().then(temas => {
let ordenado = temas.sort((a, b) => {
return a.fecha > b.fecha
})
console.log('ORDENADO', ordenado);
return agruparTemas(ordenado)
})
}
export async function deleteDB(){
return db.delete().then( () => db.open() )
}
export async function deleteCursoWithTemas(id){
return db.cursos.delete(id).then( () => {
return db.temas.where({ 'curso.id': id }).delete()
})
}
// export async function editMiCurso(){
// }
export default db;
// Import Dexie
// Open it
// |
export const CHANGE_VALUE_SEARCH = "CHANGE_VALUE_SEARCH";
export const GET_MOVIE_REQUEST = "GET_MOVIE_REQUEST";
export const GET_MOVIE_SUCCESS = "GET_MOVIE_SUCCESS";
export const GET_MOVIE_FAILURE = "GET_MOVIE_FAILURE";
|
/**
* 单独的某个项目api
*/
import request from '@/utils/request'
import Qs from 'qs'
const root = '/blockchain'
/**
** 首页API
*/
/**
* 查询所有矿机
*/
export function getMillList() {
return request({
url: root + '/mining-machine',
method: 'get',
data: {}
})
}
/**
* 查询会员货币资产信息
*/
export function getCoinAsset(data) {
return request({
url: root + `/asset/currency?${Qs.stringify(data, { arrayFormat: 'repeat' })}`,
method: 'get'
})
}
/**
* 今日预计收益
*/
export function getTodayEarning() {
return request({
url: root + '/machine-profit/expected',
method: 'get',
data: {}
})
}
/**
* 累计收益
*/
export function getTotalEarning() {
return request({
url: root + '/machine-profit/total',
method: 'get',
data: {}
})
}
/**
* 个人转卖
*/
export function getOneSelfList(data) {
return request({
url: root + `/member-sell?${Qs.stringify(data)}`,
method: 'get'
})
}
/**
* 官方购买算力
*/
export function operaBuyMill({ machineId, ...other }) {
return request({
url: root + `/member-machine/buy/${machineId}?${Qs.stringify(other)}`,
method: 'post'
})
}
/**
* 个人转卖购买算力
*/
export function buyMachine({ soldId, ...other }) {
return request({
url: root + `/member-sell/buy/${soldId}?${Qs.stringify(other)}`,
method: 'post'
})
}
/**
* *我的矿机API
*/
// const myMachine = {
// mining: root + '/member-machine',
// sell: root + '/member-sell/selling'
// }
// /**
// * 我的矿机
// */
// export function getMyMachineData(type, data) {
// let url = type === 'sell' ? `${myMachine[type]}?${Qs.stringify(data)}` : myMachine[type]
// console.log('-url-', url)
// return request({
// url,
// method: 'get',
// data: {}
// })
// }
/**
* 我的矿机信息 - 挖矿中
*/
export function geInMiningList() {
return request({
url: root + '/member-machine',
method: 'get',
data: {}
})
}
/**
* 我出售的 - 出售中
*/
export function getInSellList(data) {
return request({
url: root + '/member-sell/selling' + '?' + Qs.stringify(data),
method: 'get',
data: {}
})
}
/**
* 取消出售
*/
export function cancelSell({ soldId }) {
return request({
url: root + `/member-sell/cancel/${soldId}`,
method: 'post'
})
}
/**
* 出售矿机
*/
export function sellMachine(data) {
return request({
url: root + `/member-sell/sell?${Qs.stringify(data)}`,
method: 'post',
data
})
}
|
'use strict';
import { h, Component } from 'preact';
import Client from '../lib/client.js';
import { bind } from 'decko';
class LogoutButton extends Component {
@bind
handleSubmit(e) {
e.preventDefault();
Client.request('session', {
method: "DELETE",
}).then((r) => { this.props.onSuccess() })
}
render() {
if(document.cookie.indexOf('auth') < 0) {
return ''
}
return (
<a href="#" onClick={this.handleSubmit}>Sign out</a>
)
}
}
export default LogoutButton
|
import { StaticQuery, graphql } from "gatsby";
import React from "react";
const ContentPdc = () => (
<StaticQuery
query={graphql`
query {
wordpressPage(wordpress_id: { eq: 199 }) {
slug
content
}
}
`}
render={data => (
<section>
<div className="container">
<div className="row justify-content-center">
<div className="col-sm-12 p0 col-lg-10">
<div
className="card-Privacy"
dangerouslySetInnerHTML={{
__html: data.wordpressPage.content
}}
/>
</div>
</div>
</div>
</section>
)}
/>
);
export default ContentPdc;
|
import React, { useState } from 'react'
import { useParams, useHistory, withRouter } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import Signup from '../../../../containers/Signup';
import Singin from '../../../../containers/Login';
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth';
import fire, { uiConfig } from '../../../../firebase';
import Modal, { Header, Body } from '../../Modal';
import Lottie from 'react-lottie';
import hello from '../../../../Lottie/hello.json';
const ModalHolder = () => {
const { id } = useParams();
const history = useHistory();
const { t } = useTranslation();
const [show, setShow] = useState(true);
const [previsePath] = useState(history.location.state.modal);
const [isSignedIn, setisSignedIn] = useState(false);
React.useEffect(() => {
fire.auth().onAuthStateChanged((user) => {
setisSignedIn(!!user);
});
}, );
const handleClose = () => {
setShow(false);
history.push(previsePath);
};
const defaultOptions =(lottie) => ({
loop: false,
autoplay: true,
animationData:lottie ,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice',
},
});
return (
<div>
{isSignedIn ? null : (
<Modal show={show} onClick={handleClose}>
<div className="w-full ">
<Header
title={id === 'login' ? t('Login') : t('SignUP')}
onClick={handleClose}
/>
<Body>
<div className="flex flex-col w-full md:max-w-3xl xl:max-w-4xl md:flex-row-reverse">
<div class=" mt-0 md:mt-3 md:border-l-2 md:ml-5 md:w-2/5 ">
<div className="hidden overflow-hidden md:block">
<Lottie
isClickToPauseDisabled={true}
options={defaultOptions(hello)}
height="auto"
width="120%"
/>
</div>
<div className=" w-full">
<StyledFirebaseAuth
uiConfig={uiConfig}
firebaseAuth={fire.auth()}
/>
</div>
</div>
<div className="pr-3 mx-auto">
{id === 'login' ? <Singin /> : <Signup />}
</div>
</div>
</Body>
</div>
</Modal>
)}
</div>
);
};
export default withRouter(ModalHolder);
|
$(function(){
// 获取当前位置
getLocationFun();
var logininf = JSON.parse(localStorage.getItem("logininf"));
var partname = window.location.pathname;
var spotStr = getUrlParam('spot'); // 现付
var colStr = getUrlParam('col'); // 到付
// var monStr = getUrlParam('mon'); // 月结
var eqpNoStr = getUrlParam('eqpNo'); // 车牌号
var timeStr = getUrlParam('time'); // 时间
var ua = window.navigator.userAgent.toLowerCase();
$(".header .right").click(function(){
$(".searchLayer").toggle();
$("#startTime").val("");
$("#endTime").val("");
})
$(".header .returnBtn").click(function(){
location.href = "orderCostListDj00.html";
})
/* if(ua.match(/MicroMessenger/i) == 'micromessenger'){
$(".header").show();
$(".main").css({
"paddingTop":"0.88rem"
})
}*/
var pageNumVal = 1;
var totalNum = 1;
var pageInf = {
"carDrvEqpNo":"",
"extValue": "",
"startCompleteTime":timeStr,
"endCompleteTime":timeStr,
"pageInfo": {
pageNum: pageNumVal,
pageSize: 25
}
}
$("#startTime").attr("placeholder",getCurrentTime("0"));
$("#endTime").attr("placeholder",getCurrentTime("0"));
if(partname == "//orderCostListDj0.html" || partname == "/orderCostListDj0.html"){
pageInf.carDrvEqpNo = eqpNoStr;
pageInf.extValue = 'spot';
$(".additive .addItem1 h6").html(spotStr+'元');
var footerHtml = '<ul><li class="active"><a href="orderCostListDj0.html?spot='+spotStr+'&col='+colStr+'&eqpNo='+eqpNoStr+'">现付</a></li>'+
'<li><a href="orderCostListDj1.html?spot='+spotStr+'&col='+colStr+'&eqpNo='+eqpNoStr+'">到付</a></li></ul>';
$(".footer").html(footerHtml);
orderListFun(pageInf,"承运商");
}
if(partname == "//orderCostListDj1.html" || partname == "/orderCostListDj1.html"){
pageInf.carDrvEqpNo = eqpNoStr;
pageInf.extValue = 'collect';
$(".additive .addItem1 h6").html(colStr+'元');
var footerHtml = '<ul><li><a href="orderCostListDj0.html?spot='+spotStr+'&col='+colStr+'&eqpNo='+eqpNoStr+'">现付</a></li>'+
'<li class="active"><a href="orderCostListDj1.html?spot='+spotStr+'&col='+colStr+'&eqpNo='+eqpNoStr+'">到付</a></li></ul>';
$(".footer").html(footerHtml);
orderListFun(pageInf,"发货商");
}
/*if(partname == "//orderCostListDj2.html" || partname == "/orderCostListDj2.html"){
pageInf.extValue = 'monthly';
$(".additive .addItem1 h6").html(monStr+'元');
var footerHtml = '<ul><li><a href="orderCostListDj0.html?spot='+spotStr+'&col='+colStr+'&orderno='+orderNoStr+'&mon='+monStr+'">现付</a></li>'+
'<li><a href="orderCostListDj1.html?spot='+spotStr+'&col='+colStr+'&orderno='+orderNoStr+'&mon='+monStr+'">到付</a></li>';
$(".footer").html(footerHtml);
orderListFun(pageInf,"收货商");
}*/
//输入搜索条件查询
/*$(".searchCon .searchbtn").click(function(){
getSearchInf("1");
})
$(".mouthSearch p").click(function(){
$(this).addClass("active");
$(this).siblings().removeClass("active");
if($(this).index() == 0){
getSearchInf("0","+3","0");
}else if($(this).index() == 1){
getSearchInf("0","+6","+3");
}
})*/
//搜索
function getSearchInf(isGetTime,startmouthnum,endmouthnum){
$(".main .orderCon .orderList").html("");
$(".noContent").remove();
$(".searchLayer").hide();
pageNumVal = 1;
totalNum = 1;
var startCreateTime = $("#startTime").val().trim();
var endCreateTime = $("#endTime").val().trim();
if(isGetTime == 1){
if(startCreateTime == "" || startCreateTime == "null" || startCreateTime == null){
}else{
pageInf.startCompleteTime = startCreateTime
}
if(endCreateTime == "" || endCreateTime == "null" || endCreateTime == null){
}else{
pageInf.endCompleteTime = endCreateTime
}
}else{
pageInf.endCompleteTime = getCurrentTime(endmouthnum);
pageInf.startCompleteTime = getCurrentTime(startmouthnum);
}
pageInf.pageInfo.pageNum = "1";
if(partname == "//orderCostListDj0.html" || partname == "/orderCostListDj0.html"){
orderListFun(pageInf,"承运商");
}
if(partname == "//orderCostListDj1.html" || partname == "/orderCostListDj1.html"){
orderListFun(pageInf,"发货商");
}
/*if(partname == "//orderCostListDj2.html" || partname == "/orderCostListDj2.html"){
orderListFun(pageInf,"收货商");
}*/
}
$(".main").scroll(function(){
var scrollNum = document.documentElement.clientWidth / 7.5;
if($(".main .orderList").outerHeight() - $(".main").scrollTop() - $(".main").height() < 10){
if($(".ajax-loder-wrap").length > 0){
return false;
}
if(pageNumVal < totalNum){
pageNumVal = parseInt(pageNumVal) + parseInt(1)
pageInf.pageInfo.pageNum = pageNumVal;
if(partname == "//orderCostListDj0.html" || partname == "/orderCostListDj0.html"){
orderListFun(pageInf,"承运商");
}
if(partname == "//orderCostListDj1.html" || partname == "/orderCostListDj1.html"){
orderListFun(pageInf,"发货商");
}
/*if(partname == "//orderCostListDj2.html" || partname == "/orderCostListDj2.html"){
orderListFun(pageInf,"收货商");
}*/
}
}
})
//点击签收
$(".main .orderCon .orderList").on("click", "li .orderHandle .singFor", function(e) {
e.preventDefault();
e.stopPropagation();
var orderid = $(this).parents("li").attr("orderid");
var ordernum = $(this).parents("li").attr("ordernum");
imgUrl = [];
$(".uploadSealBtn").html('<li class="lastLi"><img src="images/cameraIcon.png" alt="" /></li>');
$(".main .orderCon .orderList li").removeClass("checkedli");
$(".main .orderCon .orderList li .round").removeClass("rounded");
$(this).parents("li").addClass("checkedli");
$(this).parents(".orderHandle").siblings(".round").addClass("rounded");
var totalweight = "0";
var totalvolume = "0";
var totalAmount = "0"
var totalQty = "0"
//获取选中订单的个数
var checkednum = $(".main .orderCon .orderList .checkedli").length;
//获取选中li的元素
var checkedli = $(".main .orderCon .orderList .checkedli")
//获取接单合计
$(".maskLayer .popup2 .orderCon .ordernum").html("接受总数: "+checkednum+"个");
$(".maskLayer .popup7 .orderCon .ordernum").html("接受总数: "+checkednum+"个");
//获取重量和体积
for(var i = 0; i < checkedli.length;i++){
totalweight = (parseFloat(totalweight) + parseFloat(checkedli.eq(i).children(".weightnum").val())).toFixed(2);
totalvolume = (parseFloat(totalvolume) + parseFloat(checkedli.eq(i).children(".volumenum").val())).toFixed(2);
totalQty = parseInt(totalQty) + parseInt(checkedli.eq(i).children(".qtyNum").val())
totalAmount = (parseFloat(totalAmount) + parseFloat(checkedli.eq(i).children(".amountnum").val())).toFixed(2);
}
$(".maskLayer .popup7 .orderCon .orderSize").html('数量:'+totalQty+' 重量:'+totalweight+'kg 体积:'+totalvolume+'m³ 价值:'+totalAmount+'元');
$(".maskLayer .popup2 .orderCon .orderSize").html('数量:'+totalQty+' 重量:'+totalweight+'kg 体积:'+totalvolume+'m³ 价值:'+totalAmount+'元');
//清除文本框内容
$(".abnormalDesc").val("");
$(".disposition").val("");
$(".customerTel").val("");
$(".customerName").val("");
$('.qsTextarea').val("");
$('.score_div img').attr('src', 'images/star_before.png');
$('.score_div img').removeAttr('class');
$(".normalorderbtn").removeClass("pointAndClick");
$(".abnormalorderbtn").removeClass("pointAndClick1");
$(".maskLayer").show();
$(".maskLayer .popup7").show();
})
var uploadImgOrderId = "";
var uploadImgOrderNum = "";
var orderReceiptImgList = "";
//点击上传图片
$(".main .orderCon .orderList").on("click", "li .orderHandle .uploadPic", function(e) {
$(".abnormalorderbtn").removeClass("pointAndClick");
e.preventDefault();
e.stopPropagation();
var orderid = $(this).parents("li").attr("orderid");
var ordernum = $(this).parents("li").attr("ordernum");
imgUrl = [];
uploadImgOrderId = $(this).parents("li").attr("orderid");
uploadImgOrderNum = $(this).parents("li").attr("ordernum");
$(".maskLayer .popup2").hide();
$(".maskLayer .popup7").hide();
$(".maskLayer .popup5").show();
$(".popup5 .imgList").html('<li class="lastLi"><img src="images/cameraIcon.png" alt="" /></li>');
$(".maskLayer").show();
//icdp-oms-app-1.0.0/select/OrderReceiptImgBase64.json
$.ajax({
url: omsUrl + '/driver/query/OrderInfoDetail?orderId='+orderid+'&orderNo='+ordernum,
type: "get",
beforeSend:function(){
loadData('show');
},
success: function(data) {
//改变状态成功 隐藏弹窗
console.log(data);
var imgLiEle1 = "";
if(data.result.extList.length == 0){
imgLiEle1 = "<p style='text-align:left;'>上传图片</p>";
}else{
for(var i = 0; i < data.result.extList.length;i++){
imgLiEle1 += '<li><img src="'+ ImgWebsite + data.result.extList[i].extValue +'" alt="" /></li>'
}
}
$(".popup5 .imgList").prepend(imgLiEle1);
loadData('hide');
}
})
})
// 确认上传图片的时候 将imgUrl提交即可
$(".maskLayer .popup5 .popupBot2 .abnormalorderbtn").click(function(){
if(imgUrl.length > 19){
loadData("show","每次最多上传20张图片!",true)
return false;
}
if($(this).hasClass("pointAndClick")){
console.log(1);
}else{
if(imgStatus == 1){
$(this).addClass("pointAndClick");
var list = [];
list.push({
orderId:uploadImgOrderId,
orderNo:uploadImgOrderNum,
imgBase64: imgUrl
})
console.log(list);
$.ajax({
url: omsUrl + '/driver/save/submitOrderActInfo',
type: "post",
beforeSend:function(){
loadData('show');
},
data: JSON.stringify(list),
contentType: 'application/json',
success: function(data) {
console.log(data);
//改变状态成功 隐藏弹窗
$(".maskLayer").hide();
$(".maskLayer .popup5").hide();
loadData('hide');
}
})
}else{
loadData("show","请先上传图片",true)
}
}
})
$(".maskLayer .popup5 .popupBot2 .normalorderbtn").click(function(){
$(".maskLayer").hide();
$(".maskLayer .popup5").hide();
$(".abnormalorderbtn").removeClass("pointAndClick");
})
//订单正常处理
$(".maskLayer .popup7 .popupBot2 .normalorderbtn").click(function(){
if($(this).hasClass("pointAndClick")){
}else{
var checkedli = $(".main .orderCon .orderList .checkedli");
var abnormalDesc = $(".abnormalDesc").val();
var disposition = $(".disposition").val();
var customerTel = $(".customerTel").val();
var customerName = $(".customerName").val();
//获取文本框的内容 拼接
var abnormalManageInf = abnormalDesc+","+disposition+","+customerTel+","+customerName;
/*console.log(checkedli);
console.log(abnormalManageInf);*/
if($('.stars_img').length == 0){
loadData("show","请对满意度评星级",true)
return false;
}
if(imgUrl.length > 19){
loadData("show","每次最多上传20张图片!",true)
return false;
}
if(imgStatus == 0){
loadData("show","请先上传签收图",true)
}else if(imgStatus == 1){
$(this).addClass("pointAndClick");
changeActCodeFun(checkedli,"ACPT",abnormalManageInf);
}
}
})
/*验收中的评分,五角星点亮 */
$(".score_div").on("click","img",function(){
var index = $(this).parent('.star_img').index()-1;
// console.log(index);
if (!$(this).hasClass('stars_img')) { // 该img无class stars_img(之前未被点亮)
for (var n = 0; n <= index; n++) { // 该img及之前的img都点亮(after)
$('.score_div img').eq(n).attr('src', 'images/star_after.png');
$('.score_div img').eq(n).attr('class', 'stars_img');
}
} else { // 该img有class stars_img(之前被点亮)
var img2;
if (!$('#img2').hasClass('stars_img')) {
img2 = 1;
} else {
img2 = 0;
}
if (index == 0) {
if (img2) {
// alert("img2是灭的,点击之后是0星");
$('.score_div img').attr('src', 'images/star_before.png');
$('.score_div img').removeAttr('class');
} else {
// alert("img2是亮的,点击之后是一星");
for (var ii = 4; ii > index; ii--) { // 该img之后的img都灭(before)
$('.score_div img').eq(ii).attr('src', 'images/star_before.png');
$('.score_div img').eq(ii).removeAttr('class');
}
}
} else {
for (var i = 0; i <= index; i++) { // 该img及之前的img都点亮
$('.score_div img').eq(i).attr('src', 'images/star_after.png');
$('.score_div img').eq(i).attr('class', 'stars_img');
}
for (var ii = 4; ii > index; ii--) { // 该img之后的img都灭(before)
$('.score_div img').eq(ii).attr('src', 'images/star_before.png');
$('.score_div img').eq(ii).removeAttr('class');
}
}
}
});
//正常接单、装车 改变code
function changeActCodeFun(checkedli,actcode,actRemark){
if(imgUrl.length > 19){
loadData("show","每次最多上传20张图片!",true)
return false;
}
var getLocationCodeVal = localStorage.getItem("locationCodeVal");
var list = [];
for(var i = 0; i < checkedli.length; i++) {
var orderid = checkedli.eq(i).attr("orderid");
var ordernum = checkedli.eq(i).attr("ordernum");
var actRemark1 = checkedli.eq(i).children(".actRemark").html();
if(actRemark1 == ",,,"){
var actRemarkTxt = actRemark
}else{
var actRemarkTxt = actRemark1
}
var par;
if(actcode == 'ACPT'){
par = {
orderId: orderid,
actCode: actcode,
exceptionRemark: actRemarkTxt,
orderNo: ordernum,
imgBase64:imgUrl,
operator:logininf.mobilePhone,
latLng:getLocationCodeVal,
satisfaction:$('.stars_img').length,
evaluate:$('.qsTextarea').val()
};
}else{
par = {
orderId: orderid,
actCode: actcode,
exceptionRemark: actRemarkTxt,
orderNo: ordernum,
imgBase64:imgUrl,
operator:logininf.mobilePhone,
latLng:getLocationCodeVal
};
}
list.push(par);
}
$.ajax({
url: tmsUrl + '/driver/save/submitOrderActInfo',
type: "post",
beforeSend:function(){
loadData('show');
},
data: JSON.stringify(list),
contentType: 'application/json',
success: function(data) {
//改变状态成功 隐藏弹窗
$(".maskLayer").hide();
$(".maskLayer .popup2").hide();
loadData('hide');
//$(".maskLayer .popup2 .orderDesc .orderTextBox").hide();
location.reload(true);
}
})
}
//end
//异常接单、装车 改变code
function abnormalActCodeFun(checkedli,actcode,actRemark,exceptionStatusNum){
if(imgUrl.length > 19){
loadData("show","每次最多上传20张图片!",true)
return false;
}
var getLocationCodeVal = localStorage.getItem("locationCodeVal");
var list = [];
for(var i = 0; i < checkedli.length; i++) {
var orderid = checkedli.eq(i).attr("orderid");
var ordernum = checkedli.eq(i).attr("ordernum");
list.push({
orderId: orderid,
actCode: actcode,
exceptionStatus:exceptionStatusNum,
orderNo: ordernum,
exceptionRemark: actRemark,
imgBase64:imgUrl,
operator:logininf.mobilePhone,
latLng:getLocationCodeVal
})
checkedli.eq(i).fadeOut();
}
$.ajax({
url: tmsUrl + '/driver/save/submitOrderActInfo',
type: "post",
beforeSend:function(){
loadData('show');
},
data: JSON.stringify(list),
contentType: 'application/json',
success: function(data) {
//改变状态成功 隐藏弹窗
$(".maskLayer").hide();
$(".maskLayer .popup2").hide();
loadData('hide');
//$(".maskLayer .popup2 .orderDesc .orderTextBox").hide();
location.reload(true);
}
})
}
//end
var imgUrl = [];
var imgStatus = 0;
$(".maskLayer .popup7 .uploadSeal").on("click",".lastLi",function(){
wx.chooseImage({
count: 9, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
var imgli = "";
var realLocalIds = localIds.toString().split(',');
var mediaIdArray = '';
for(var i=0;i< realLocalIds.length;i++){
imgli += '<li><img src="'+realLocalIds[i]+'" alt="" /></li>'
wx.getLocalImgData({
localId: realLocalIds[i], // 图片的localID
success: function (res) {
imgStatus = 1;
var localData = res.localData; //localData是图片的base64数据,可以用img标签显示
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isAndroid){
var resultStr = localData.replace(/[\r\n]/g, ""); //去掉回车换行
imgUrl.push(resultStr);
}else{
imgUrl.push(localData.split(',')[1])
}
}
});
}
$(".uploadSealBtn").prepend(imgli);
}
});
})
$(".maskLayer .popup2 .uploadSeal").on("click",".lastLi",function(){
wx.chooseImage({
count: 9, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
var imgli = "";
var realLocalIds = localIds.toString().split(',');
var mediaIdArray = '';
for(var i=0;i< realLocalIds.length;i++){
imgli += '<li><img src="'+realLocalIds[i]+'" alt="" /></li>'
wx.getLocalImgData({
localId: realLocalIds[i], // 图片的localID
success: function (res) {
imgStatus = 1;
var localData = res.localData; //localData是图片的base64数据,可以用img标签显示
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isAndroid){
var resultStr = localData.replace(/[\r\n]/g, ""); //去掉回车换行
imgUrl.push(resultStr);
}else{
imgUrl.push(localData.split(',')[1])
}
}
});
}
$(".uploadSealBtn").prepend(imgli);
}
});
})
$(".maskLayer .popup7 .popupBot2 .abnormalorderbtn").click(function(){
$(".maskLayer .popup7").hide();
$(".maskLayer .popup2").show();
})
//订单异常执行
$(".maskLayer .popup2 .popupBot2 .normalorderbtn").click(function(){
var checkedli = $(".main .orderCon .orderList .checkedli");
var abnormalDesc = $(".abnormalDesc").val();
var disposition = $(".disposition").val();
var customerTel = $(".customerTel").val();
var customerName = $(".customerName").val();
var choiceVal = $(".choiceVal").val();
var abnormalManageInf = abnormalDesc+","+disposition+","+customerTel+","+customerName;
var reg = /^[1][3,4,5,7,8][0-9]{9}$/;
if(abnormalDesc.trim() == ""){
loadData("show","异常描述不能为空",true)
return false;
}
if(disposition.trim() == ""){
loadData("show","处理意见不能为空",true)
return false;
}
if(customerName.trim() == ""){
loadData("show","客户电话不能为空",true)
return false;
}
if(!reg.test(customerName)){
loadData("show","请输入正确的手机号码",true)
return false;
}
if(choiceVal == 0){
loadData("show","请选择异常是否执行",true)
return false;
}
if(imgUrl.length > 19){
loadData("show","每次最多上传20张图片!",true)
return false;
}
if(imgStatus == 0){
loadData("show","请先上传签收图",true)
}else if(imgStatus == 1){
$(this).addClass("pointAndClick1");
abnormalActCodeFun(checkedli,"ACPT",abnormalManageInf,choiceVal);
}
})
//订单异常不执行
$(".maskLayer .popup2 .popupBot2 .abnormalorderbtn").click(function(){
var checkedli = $(".main .orderCon .orderList .checkedli");
var abnormalDesc = $(".abnormalDesc").val();
var disposition = $(".disposition").val();
var customerTel = $(".customerTel").val();
var customerName = $(".customerName").val();
var choiceVal = $(".choiceVal").val();
var abnormalManageInf = abnormalDesc+","+disposition+","+customerTel+","+customerName;
var reg = /^[1][3,4,5,7,8][0-9]{9}$/;
if(abnormalDesc.trim() == ""){
loadData("show","异常描述不能为空",true)
return false;
}
if(disposition.trim() == ""){
loadData("show","处理意见不能为空",true)
return false;
}
if(customerName.trim() == ""){
loadData("show","客户电话不能为空",true)
return false;
}
if(choiceVal == 0){
loadData("show","请选择异常是否执行",true)
return false;
}
if(!reg.test(customerName)){
loadData("show","请输入正确的手机号码",true)
return false;
}
if(imgUrl.length > 19){
loadData("show","每次最多上传20张图片!",true)
return false;
}
if(imgStatus == 0){
loadData("show","请先上传图片",true)
}else if(imgStatus == 1){
$(this).addClass("pointAndClick1");
abnormalActCodeFun(checkedli,"ACPT",abnormalManageInf,choiceVal);
}
})
function orderListFun(pageInf) {
$.ajax({
url: tmsUrl + '/wx/query/orderInfoPageByPayType?token='+logininf.token+'&timeStamp='+logininf.timeStamp,
type: "post",
contentType: 'application/json',
beforeSend:function(){
$(".main").append('<div class="ajax-loder-wrap"><img src="../images/ajax-loader.gif" class="ajax-loader-gif"/><p class="loading-text">加载中...</p></div>');
},
data: JSON.stringify(pageInf),
success: function(data) {
totalNum = data.pageInfo.pages
$(".ajax-loder-wrap").remove();
var orderData = data.result;
var orderlist = "";
var classname = "";
tasklistData = data.result;
console.log(orderData.length)
$(".additive .addItem0 h6").html(orderData.length);
if(orderData.length == 0){
var timer1 = setTimeout(function(){
$(".orderCon").append('<p class="noContent" style="width: 3rem; height: auto; margin: 0 auto; padding-top: 0.36rem;">'+
'<img src="images/noContent.png" alt="" style="width: 3rem; height: auto; display: block;"/>'+
'</p>');
},600)
}else{
for(var i = 0; i < orderData.length; i++) {
console.log(orderData[i].shpDtmTime);
orderlist += '<li class="'+classname+'" ordernum=' + orderData[i].orderNo + ' orderid=' + orderData[i].omOrderId + ' actCode=' + orderData[i].actCode + ' >'+
'<input type="hidden" class="weightnum" value="'+orderData[i].totalWeight+'" />'+
'<input type="hidden" class="weightunit" value="'+orderData[i].weightUnit+'" />'+
'<input type="hidden" class="volumenum" value="'+orderData[i].totalVolume+'" />'+
'<input type="hidden" class="volumeunit" value="'+orderData[i].volumeUnit+'" />'+
'<input type="hidden" class="amountnum" value="'+orderData[i].totalAmount+'" />'+
'<div class="right">'+
'<p class="ordernum">订单号:'+orderData[i].orderNo+'</p>'+
'<p class="ordernum"style="line-height:0.36rem;height:0.4rem;">原单号:'+orderData[i].customerOriginalNo+'</p>'+
'<p class="receiverAddress">金额:'+orderData[i].totalAmount+'元</p>'+
'<p class="receiverAddress">客户:'+orderData[i].stoPartyName+' 配送日期:'+timestampToTime1(orderData[i].shpDtmTime)+' </p>'+
'<p class="receiverAddress">收货地址:'+orderData[i].stoAddress+'</p>'+
'</div></li>';
}
$(".main .orderCon .orderList").append(orderlist);
}
},
error: function(xhr) {
// markmsg("不存在此账户");
}
})
}
var seeOrderDetailId = "";
//点击获取详情
$(".main .orderCon").on("click",".orderList li",function(e){
var orderid = $(this).attr("orderid");
var ordernum = $(this).attr("ordernum");
$(".maskLayer").show();
$(".maskLayer .popup3").show();
$.ajax({
url: omsUrl + '/driver/query/OrderInfoDetail?orderId='+orderid+'&orderNo='+ordernum,
type: "get",
beforeSend:function(){
loadData('show');
},
success: function(data) {
//获取商品信息
getGoodsList(data.result.orderItemList);
//获取图片信息
getOrderReceiptImg(data.result.imgList);
//获取订单基本信息
getOrderBaseInf(data.result);
orderReceiptImgList = data.result.imgList;
loadData('hide');
}
})
})
function getGoodsList(goodslistData){
var sortList = "";
for(var i = 0; i < goodslistData.length;i++){
sortList += '<ul>'+
'<li>'+goodslistData[i].itemName+'</li>'+
'<li>x'+goodslistData[i].qty+'</li>'+
'<li>'+goodslistData[i].weight+'</li>'+
'</ul>'
}
$(".ordersortList").html(sortList);
}
var imgLiEle = "";
function getOrderReceiptImg(receiptImgList){
imgLiEle = "";
var imgListPic = "";
if(receiptImgList == "" ||receiptImgList == null || receiptImgList == "null"){
imgLiEle = "暂无附件图片";
}else{
for(var i = 0; i < receiptImgList.length;i++){
imgLiEle += '<span><img src="'+ ImgWebsite + receiptImgList[i].extValue+'" alt="" /></span>'
imgListPic += ' <li class="swiper-slide"><img src="'+ ImgWebsite + receiptImgList[i].extValue+'" alt="" /></li>'
}
}
$(".maskLayer .popup5 .imgList").html(imgListPic);
$(".swiper-container .imgList").html(imgListPic);
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
slidesPerView: 1,
paginationClickable: true,
spaceBetween: 30,
loop: true,
observer:true,
observeParents:true
});
}
function getOrderBaseInf(tasklistData){
if(tasklistData.exceRemarkList == "null" || tasklistData.exceRemarkList == null || tasklistData.exceRemarkList == ""){
var actRemark = ["-","-","-","-"];
}else{
var actRemarkLen = tasklistData.exceRemarkList.length - 1;
console.log(actRemarkLen);
console.log(tasklistData.exceRemarkList[actRemarkLen]);
//var actRemark = tasklistData[i].actRemark
var actRemark = tasklistData.exceRemarkList[actRemarkLen].note.split(",");
}
if(tasklistData.exceptionStatus == "0"){
tasklistData.exceptionStatus = "正常";
}
if(tasklistData.stoAddress == "null" || tasklistData.stoAddress == null){
tasklistData.stoAddress = "-"
}
if(tasklistData.sfrAddress == "null" || tasklistData.sfrAddress == null){
tasklistData.sfrAddress = "-"
}
if(tasklistData.actCode == "DIST"){
tasklistData.actCode = "接单"
}else if(tasklistData.actCode == "COFM"){
tasklistData.actCode = "装车"
}else if(tasklistData.actCode == "LONT"){
tasklistData.actCode = "配送"
}else if(tasklistData.actCode == "ACPT"){
tasklistData.actCode = "签收"
}else if(tasklistData.actCode == "EXCP"){
tasklistData.actCode = "异常"
}
if(tasklistData.payStatus == "0"){
tasklistData.payStatus = "未支付"
}else if(tasklistData.payStatus == "1"){
tasklistData.payStatus = "已支付"
}else if(tasklistData.payStatus == "2"){
tasklistData.payStatus = "部分支付"
}
var manyiHtml = '';
switch (tasklistData.satisfaction)
{
case '1':
manyiHtml = '<table class="score_div2"><td class="star_img"><img src="images/star_after.png"/></td>' +
'<td class="star_img"><img src="images/star_before.png" id="img2" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td></tr></table>';
break;
case '2':
manyiHtml = '<table class="score_div2"><td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_after.png" id="img2"/></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td></tr></table>';
break;
case '3':
manyiHtml = '<table class="score_div2"><td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_after.png" id="img2" /></td>' +
'<td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td></tr></table>';
break;
case '4':
manyiHtml = '<table class="score_div2"><td class="star_img"><img src="images/star_after.png"/></td>' +
'<td class="star_img"><img src="images/star_after.png" id="img2" /></td>' +
'<td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_before.png" /></td></tr></table>';
break;
case '5':
manyiHtml = '<table class="score_div2"><td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_after.png" id="img2" /></td>' +
'<td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_after.png" /></td>' +
'<td class="star_img"><img src="images/star_after.png" /></td></tr></table>';
break;
}
var pjHtml = '';
if(tasklistData.evaluate == null){
pjHtml = '--';
}else{
pjHtml = tasklistData.evaluate;
}
//异常订单详细页面展示
if(tasklistData.exceptionStatus == "1" || tasklistData.exceptionStatus == "2" || tasklistData.exceptionStatus == "异常"){
tasklistData.exceptionStatus = "异常"
var orderdetail = '<li>'+
'<span class="txt">订单号</span>'+
'<p class="inf">'+tasklistData.orderNo+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">原单号</span>'+
'<p class="inf">'+tasklistData.customerOriginalNo+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">班次号</span>'+
'<p class="inf">'+tasklistData.tfoOrderNo+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">收货地址</span>'+
'<p class="inf">'+tasklistData.stoAddress+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">订单当前状态</span>'+
'<p class="inf">'+tasklistData.actCode+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">订单是否异常</span>'+
'<p class="inf">'+tasklistData.exceptionStatus+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">异常描述</span>'+
'<p class="inf">'+actRemark[0]+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">处理意见</span>'+
'<p class="inf">'+actRemark[1]+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">客户姓名</span>'+
'<p class="inf">'+actRemark[2]+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">客户电话</span>'+
'<p class="inf">'+actRemark[3]+'</p>'+
'</li>'+
'<li>'+
'<span class="txt" style="display:block;float:none;">附件图片</span>'+
'<p class="inf seeAnnex">'+ imgLiEle +'</p>'+
'</li>'+
'<li>'+
'<span class="txt" style="display:block;float:none;">满意度</span>'+
'<p class="inf">'+manyiHtml+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">评价</span>'+
'<p class="inf">'+ pjHtml +'</p>'+
'</li>'
}else{
console.log("imgLiEle" + imgLiEle);
tasklistData.exceptionStatus = "正常";
var orderdetail = '<li>'+
'<span class="txt">订单号</span>'+
'<p class="inf">'+tasklistData.orderNo+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">原单号</span>'+
'<p class="inf">'+tasklistData.customerOriginalNo+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">班次号</span>'+
'<p class="inf">'+tasklistData.tfoOrderNo+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">收货地址</span>'+
'<p class="inf">'+tasklistData.stoAddress+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">订单当前状态</span>'+
'<p class="inf">'+tasklistData.actCode+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">订单是否异常</span>'+
'<p class="inf">'+tasklistData.exceptionStatus+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">支付状态</span>'+
'<p class="inf">'+tasklistData.payStatus+'</p>'+
'</li>'+
'<li>'+
'<span class="txt" style="display:block;float:none;">附件图片</span>'+
'<p class="inf seeAnnex">'+ imgLiEle +'</p>'+
'</li>'+
'<li>'+
'<span class="txt" style="display:block;float:none;">满意度</span>'+
'<p class="inf">'+manyiHtml+'</p>'+
'</li>'+
'<li>'+
'<span class="txt">评价</span>'+
'<p class="inf">'+ pjHtml +'</p>'+
'</li>'
}
$(".popuptitle ul").html(orderdetail);
}
//关闭订单详细弹窗
$(".maskLayer .popup3 .popupCon .infHint .closeorderinf").click(function(){
$(".maskLayer").hide();
$(".maskLayer .popup3").hide();
})
//关闭订单提交弹窗
$(".maskLayer .popup2 .orderCon .closebtn").click(function(){
$(".maskLayer").hide();
$(".maskLayer .popup2").hide();
})
$(".maskLayer .popup7 .orderCon .closebtn").click(function(){
$(".maskLayer").hide();
$(".maskLayer .popup7").hide();
})
$(".maskLayer .popup5 .popupTitle").click(function(){
$(".maskLayer").hide();
$(".maskLayer .popup5").hide();
})
})
|
const express = require('express')
const router = express.Router()
router.get('/places', async (req, res) => {
try {
const Place = require('./Place')
res.json( await Place.find({}) )
}catch (err) {
res.json({ error: err.message || err.toString() });
}
})
module.exports = router
|
var express = require('express');
var multer = require('multer');
var path = require('path');
var fs = require('fs');
var uuid = require('uuidv4');
const Sequelize = require('sequelize');
var router = express.Router();
const { Post, Img, User, View, Heart, Category, Support } = require('../models');
const { isLoggedIn, isBetaNow } = require('./middlewares');
fs.readdir('uploads', (error) => {
if (error) {
console.error('uploads 폴더가 없어 uploads 폴더를 생성합니다.');
fs.mkdirSync('uploads');
}
});
const upload = multer({
storage: multer.diskStorage({
destination(req, file, cb) {
cb(null, 'uploads/');
},
filename(req, file, cb) {
const ext = path.extname(file.originalname);
cb(null, uuid() + ext);
},
}),
limits: { fileSize: 5 * 1024 * 1024 },
});
router.post('/img', isLoggedIn, isBetaNow, upload.array('img'), (req, res) => {
var filenameArray = new Array();
for (var i = 0; i < (req.files).length; i++) {
var filenames = new Object();
filenames.url = req.files[i].filename;
filenameArray.push(filenames);
}
res.json(filenameArray);
});
const upload2 = multer();
router.post('/post', isLoggedIn, isBetaNow, upload2.none(), async (req, res, next) => {
var imgs = (req.body.url).split(',');
try {
var postid;
await Post.create({
title: req.body.title,
content: req.body.content,
categories: req.body.categories,
author: req.user.name,
}).then(posts => {
postid = posts.id;
});
for(var i=0; i<imgs.length; i++){
await Img.create({
img: imgs[i],
uploder: req.user.name,
postId: postid,
type: 'P'
});
}
res.redirect(`/post/${postid}`);
} catch (error) {
console.error(error);
next(error);
}
});
router.post('/support', isLoggedIn, isBetaNow, upload2.none(), async (req, res, next) => {
var imgs = (req.body.url).split(',');
try {
var postid, answer;
if(req.body.answer == null){
answer = 0;
}else{
answer = 1;
}
await Support.create({
title: req.body.title,
content: req.body.content,
author: req.user.id,
answer: answer
}).then(posts => {
postid = posts.id;
});
for(var i=0; i<imgs.length; i++){
await Img.create({
img: imgs[i],
uploder: req.user.name,
postId: postid,
type: 'S'
});
}
res.redirect('/');
} catch (error) {
console.error(error);
next(error);
}
});
router.post('/edit/:id', isLoggedIn, isBetaNow, upload2.none(), async (req, res, next) => {
var imgs = (req.body.url).split(',');
try {
var postid = req.params.id;
await Post.update({
title: req.body.title,
content: req.body.content,
categories: req.body.categories,
author: req.user.name,
}, {where: {id: postid}});
for(var i=0; i<imgs.length; i++){
await Img.create({
img: imgs[i],
uploder: req.user.name,
postId: postid,
});
}
res.redirect(`/post/${postid}`);
} catch (error) {
console.error(error);
next(error);
}
});
/* GET home page. */
router.get('/:postid', isBetaNow, function (req, res, next) {
if(req.isAuthenticated()) {
Post.findOne({ where: { id : req.params.postid } })
.then(result => {
Heart.findOne({ where: { viewer : req.user.id, postid : req.params.postid } })
.then(heart => {
Heart.count({ where: { postid : req.params.postid } })
.then(heartCount => {
Category.findOne({ where: { name : result.categories } })
.then(category => {
Img.findAll({ where: { postid : req.params.postid, type:'P' } })
.then(img => {
Post.findAll({ where: { categories: result.categories}, order: [['id', 'DESC']], limit: 8 })
.then(post => {
res.render('post', {
user: req.user,
header: '게시물',
id: result.id,
categories: result.categories,
title: result.title,
content: result.content,
heart: heart,
heartCount: heartCount,
category: category.url,
img: img,
post: post
});
})
})
})
})
})
})
.catch(function(err){
console.log(err);
});
}else{
Post.findOne({ where: { id : req.params.postid } })
.then(result => {
Heart.count({ where: { postid : req.params.postid } })
.then(heartCount => {
Category.findOne({ where: { name : result.categories } })
.then(category => {
Img.findAll({ where: { postid : req.params.postid } })
.then(img => {
Post.findAll({ where: { categories: result.categories}, order: [['id', 'DESC']], limit: 8 })
.then(post => {
res.render('post', {
user: req.user,
header: '게시물',
id: result.id,
categories: result.categories,
title: result.title,
content: result.content,
heart: false,
heartCount: heartCount,
category: category.url,
img: img,
post: post
});
})
})
})
})
})
.catch(function(err){
console.log(err);
});
}
var ip = (req.headers['x-forwarded-for'] || req.connection.remoteAddress).replace('::ffff:', '');
if(req.isAuthenticated()) {
View.create({
postid: req.params.postid,
viewer: req.user.id,
ip: ip,
});
} else{
View.create({
postid: req.params.postid,
ip: ip,
});
}
});
module.exports = router;
|
export {Auth} from './auth';
export {Article} from './article';
|
import Header from './Header'
import Button from './Button'
import Spinner from './Spinner'
import Tab from './Tab'
import Divider from './Divider'
import Badge from './Badge'
import Avatar from './Avatar'
import Card from './Card'
import Stepper from './Stepper'
import CheckBox from './CheckBox'
import RadioButton from './RadioButton'
import Swiper from './Swiper'
import MediaGrid from './MediaGrid'
import Progress from './Progress'
export {
Header,
Button,
Spinner,
Tab,
Divider,
Badge,
Avatar,
Card,
Stepper,
CheckBox,
RadioButton,
Swiper,
MediaGrid,
Progress
} |
'use strict';
const loaf = {
flour: 300,
water: 210,
hydration: function() {
return this.water / this.flour * 100;
}
}
console.log(loaf['flour']);
console.log(loaf['water']);
console.log(loaf['hydration']()); |
import {BrowserRouter, Route, Link} from 'react-router-dom'
import HeadStrip from './components/HeadStrip';
import Landing from './components/Landing';
import Skills from './components/Skills';
import Contacts from './components/Contacts';
import './App.css';
function App() {
return (
<div className="App">
<BrowserRouter>
<HeadStrip />
<Route path='/' exact component={Landing}/>
<Route path='/skills' component={Skills}/>
<Route path='/contacts' component={Contacts}/>
</BrowserRouter>
</div>
);
}
export default App;
|
import React, { useCallback } from 'react';
import { Hijo } from './Hijo';
import { useState } from 'react';
import './styles.css';
export const Padre = () => {
const numeros = [2,4,6,8,10];
const [valor, setValor] = useState(0);
// Quitar la función original
// const incrementar = ( num ) => {
// setValor( valor + num )
// }
// Crear el useCallback
// Utilizar el nombre de la función original
// Agregar la lógica del hook
// Reemplazar el state por una función anónima
const incrementar = useCallback(( num ) => {
setValor( valor => valor + num )
},
[setValor]
);
return (
<div>
<h1>Padre</h1>
<p> Total: { valor } </p>
<hr />
{
numeros.map( n => (
<Hijo
key={ n }
numero={ n }
incrementar={ incrementar }
/>
))
}
{/* <Hijo /> */}
</div>
)
}
// Tarea
// Utilizar memo y useCallback para prevenir que se rendericen cada vez los 5 botones |
import React , {Component} from 'react';
import back01 from '../images/slider1.jpg';
import back02 from '../images/slider2.jpg';
import AnchorLink from 'react-anchor-link-smooth-scroll';
class Content02 extends Component {
constructor(props) {
super(props);
}
render(){
return (
<div>
{/* <!-- Banner --> */}
<section id="banner">
<header>
<h2>Nosotros</h2>
</header>
<p>Somos un conjunto de ingenieros y diseñadores enfocados en brindar el mejor servicio a nuestros clientes.<br />
Es de vital importancia para nosotros materializar sus proyectos,<br />
asesoraremos y brindaremos las herrramientas necesarias para lograr los objetivos propuestos.</p>
<footer>
<AnchorLink href='#first'><a className="button style2 scrolly-middle">Conociendonos</a></AnchorLink>
</footer>
</section>
{/* <!-- Feature 1 --> */}
<article id="first" className="container box style1 right">
<a href="#" className="image fit"><img src={back01} alt="slider1" /></a>
<div className="inner">
<header>
<h2>Diseño gráfico</h2>
</header>
<p>Daremos vida a sus ideas, con estilo y creatividad encontraremos la manera en la que sus visitantes se sientan a gusto conociendo su empresa y/o productos para que estos se conviertan en clientes.</p>
</div>
</article>
{/* <!-- Feature 2 --> */}
<article className="container box style1 left">
<a href="#" className="image fit"><img src={back02} alt="slider2" /></a>
<div className="inner">
<header>
<h2>Desarrollo de software y web</h2>
</header>
<p>Codificaremos de la mejor manera para tener un desarrollo destacable en las paginas web, en el software y aplicaciones, con metodologias agiles y sobretodo haciendo lo posible por cumplir las espectativas del cliente.</p>
</div>
</article>
</div>
)
}
}
export default Content02; |
export default function(instance) {
return {
getUser(payload) {
const token = localStorage.getItem("token")
return instance.get('users/', {
params: payload,
headers: {
'Authorization': 'Token ' + token
}
})
},
getUsers(payload){
const token = localStorage.getItem("token")
return instance.get('users/all', {
headers: {
'Authorization': 'Token ' + token
}
})
},
}
} |
const axios = require('axios-proxy-fix');
//const proxy = require('../proxy');
const http = require('http');
const Dev = require('../models/Dev');
function doGet(url) {
return new Promise((resolve,reject) => {
http.get(url, (response) => {
let chunks_of_data = [];
response.on('data', (fragments) => {
chunks_of_data.push(fragments);
});
response.on('end', () => {
let response_body = Buffer.concat(chunks_of_data);
resolve(JSON.parse(response_body.toString()));
});
response.on('error', (error) => {
reject(error);
});
});
});
}
module.exports = {
async index(req, res) {
const {user} = req.headers;
const loggedDev = await Dev.findById(user);
console.log(loggedDev);
const users = await Dev.find({
$and: [
{_id: {$ne: user}},
{_id: {$nin: loggedDev.likes }},
{_id: {$nin: loggedDev.dislikes }},
],
});
return res.json(users);
},
async store(req, res) {
const { username } = req.body;
//console.log(username);
//console.log(proxy);
const userExists = await Dev.findOne( { user: username});
if(userExists) {
return res.json(userExists);
}
//const url = `http://localhost:4444/categoria/github/${username}`;
//const url = `https://api.github.com/users/${username}`;
//let get_promise = doGet(url);
//let response_body = await get_promise;
let response = await axios.get(`https://api.github.com/users/${username}`);
console.log(response.data);
const {name, bio, avatar_url: avatar } = response.data;
const dev = await Dev.create({
name,
user: username,
bio,
avatar
});
return res.json(dev);
}
}; |
/* begin copyright text
*
* Copyright © 2016 PTC Inc., Its Subsidiary Companies, and /or its Partners. All Rights Reserved.
*
* end copyright text
*/
/*global module*/
/* jshint node: true */
/* jshint strict: global */
/* jshint camelcase: false */
'use strict';
var nconf = require('nconf');
var path = require('path');
var singletonConfigObject = function singletonConfigObject() {
var config;
this.init = function(app) {
config = app;
}
this.getPropertyValue = function(propertyName) {
if(config === null || config === undefined)
throw new Error('Config not initialized yet.');
return config.get(propertyName);
}
}
singletonConfigObject.instance = null;
singletonConfigObject.getInstance = function(){
if(this.instance === null){
this.instance = new singletonConfigObject();
}
return this.instance;
}
module.exports = singletonConfigObject.getInstance();
|
import React,{Component} from 'react';
class Projects extends Component {
constructor(props){
super(props)
this.state={}
}
componentDidMount() {
fetch('http://34.237.91.47:3030/projects')
.then(res => res.json())
.then(res =>this.setState({data:res}))
};
getAllProjects(){
let response = this.state.data
if(response){
console.log(response)
let allProjects = [];
for (let i = 0; i < response.length; i++){
console.log(response[i])
allProjects.push(
<div className= "projectCard" key ={i}>
<h1>{response[i].name}</h1>
<h1>{response[i].description}</h1>
<img src ={response[i].imageurl} height="100" alt={response[i].name}/>
<p> Tech: {response[i].techused}</p>
</div>)
}
return allProjects
}
}
render() {
return(
<div className="container">
{this.getAllProjects()}
</div>
)
}
}
export default Projects; |
class complexTree extends obj{
constructor(positionX,positionY,positionZ,scaleX,scaleY,scaleZ, index){
super();
this.geometry = new THREE.BoxGeometry(1,1,1);
//Aplica as texturas nos diferentes componentes da arvore
let texture1 = new THREE.TextureLoader().load('Imagens/pinetree.jpg');
texture1.wrapS = THREE.RepeatWrapping;
texture1.wrapT = THREE.RepeatWrapping;
texture1.repeat.set(2,2);
let texture2 = new THREE.TextureLoader().load('Imagens/pinetree2.jpg');
texture2.wrapS = THREE.RepeatWrapping;
texture2.wrapT = THREE.RepeatWrapping;
texture2.repeat.set(3,3);
let texture3 = new THREE.TextureLoader().load('Imagens/pinetree3.jpg');
texture3.wrapS = THREE.RepeatWrapping;
texture3.wrapT = THREE.RepeatWrapping;
texture3.repeat.set(2,2);
let texture4 = new THREE.TextureLoader().load('Imagens/stem.jpg');
texture4.wrapS = THREE.RepeatWrapping;
texture4.wrapT = THREE.RepeatWrapping;
texture4.repeat.set(1,5);
//Mesh aplicados as texturas da arvore
this.leaveDarkMaterial = new THREE.MeshPhongMaterial({map: texture1});
this.leaveLightMaterial = new THREE.MeshPhongMaterial({map: texture2});
this.leaveDarkDarkMaterial = new THREE.MeshPhongMaterial( {map: texture3} );
this.stemMaterial = new THREE.MeshLambertMaterial({ map: texture4});
//Instanciação da textura nos troncos
let stem = new THREE.Mesh( this.geometry, this.stemMaterial );
stem.position.set( 0, 0, 0 );
stem.scale.set( 0.3, 1.5, 0.3 ); //escala default do tamanho do tronco
//Instancião das texturas nas folhas
let squareLeave01 = new THREE.Mesh( this.geometry, this.leaveDarkMaterial );
squareLeave01.position.set( 0.5, 1.6, 0.5 );
squareLeave01.scale.set( 0.8, 0.8, 0.8 ); //escala default do tamanho da folha
let squareLeave02 = new THREE.Mesh( this.geometry, this.leaveDarkMaterial );
squareLeave02.position.set( -0.4, 1.3, -0.4 );
squareLeave02.scale.set( 0.7, 0.7, 0.7 ); //escala default do tamanho da folha
let squareLeave03 = new THREE.Mesh( this.geometry, this.leaveDarkDarkMaterial);
squareLeave03.position.set( 0.4, 1.7, -0.5 );
squareLeave03.scale.set( 0.7, 0.7, 0.7 ); //escala default do tamanho da folha
let leaveDark = new THREE.Mesh( this.geometry, this.leaveDarkMaterial );
leaveDark.position.set( 0, 1.2, 0 );
leaveDark.scale.set( 1, 2, 1 ); //escala default do tamanho da folha
let leaveLight = new THREE.Mesh( this.geometry, this.leaveLightMaterial );
leaveLight.position.set( 0, 1.2, 0 );
leaveLight.scale.set( 1.1, 0.5, 1.1 ); //escala default do tamanho da folha
//união dos diferentes componentes da arvore
this.tree = new THREE.Group();
this.tree.add( leaveDark );
this.tree.add( leaveLight );
this.tree.add( squareLeave01 );
this.tree.add( squareLeave02 );
this.tree.add( squareLeave03 );
this.tree.add( stem );
//escala default
if (scaleX === 0 && scaleY === 0 && scaleZ === 0){
this.tree.scale.set(50,50,50);
}
this.tree.name = "arvoreComplexa" + index; // para debugging no three js inspector
//orientação default das arvores
this.tree.position.x = positionX;
if(positionY === 0)
this.tree.position.y = 39;
else
this.tree.position.y = positionY;
this.tree.position.z = positionZ;
this.tree.castShadow = true;
this.tree.receiveShadow = false;
// https://stackoverflow.com/questions/8322759/three-js-bind-two-shapes-together-as-one/8328984
//y position para scale de 250 deve ser 183
//y position deve ser 10.5 para um tamanho de 15(scale)
}
getMesh(){
return this.tree;
}
}
|
!(function (e, t, n) {
"use strict";
function r(e, t) {
return (
(t = t || Error),
function () {
var n,
r,
i = 2,
o = arguments,
a = o[0],
s = "[" + (e ? e + ":" : "") + a + "] ",
u = o[1];
for (
s += u.replace(/\{\d+\}/g, function (e) {
var t = +e.slice(1, -1),
n = t + i;
return n < o.length ? ye(o[n]) : e;
}),
s +=
"\nhttps://errors.angularjs.org/1.4.10/" + (e ? e + "/" : "") + a,
r = i,
n = "?";
r < o.length;
r++, n = "&"
)
s += n + "p" + (r - i) + "=" + encodeURIComponent(ye(o[r]));
return new t(s);
}
);
}
function i(e) {
if (null == e || O(e)) return !1;
if (Lr(e) || S(e) || (Nr && e instanceof Nr)) return !0;
var t = "length" in Object(e) && e.length;
return (
E(t) &&
((t >= 0 && (t - 1 in e || e instanceof Array)) ||
"function" == typeof e.item)
);
}
function o(e, t, n) {
var r, a;
if (e)
if (A(e))
for (r in e)
"prototype" == r ||
"length" == r ||
"name" == r ||
(e.hasOwnProperty && !e.hasOwnProperty(r)) ||
t.call(n, e[r], r, e);
else if (Lr(e) || i(e)) {
var s = "object" != typeof e;
for (r = 0, a = e.length; a > r; r++)
(s || r in e) && t.call(n, e[r], r, e);
} else if (e.forEach && e.forEach !== o) e.forEach(t, n, e);
else if (x(e)) for (r in e) t.call(n, e[r], r, e);
else if ("function" == typeof e.hasOwnProperty)
for (r in e) e.hasOwnProperty(r) && t.call(n, e[r], r, e);
else for (r in e) kr.call(e, r) && t.call(n, e[r], r, e);
return e;
}
function a(e, t, n) {
for (var r = Object.keys(e).sort(), i = 0; i < r.length; i++)
t.call(n, e[r[i]], r[i]);
return r;
}
function s(e) {
return function (t, n) {
e(n, t);
};
}
function u() {
return ++Hr;
}
function c(e, t) {
t ? (e.$$hashKey = t) : delete e.$$hashKey;
}
function l(e, t, n) {
for (var r = e.$$hashKey, i = 0, o = t.length; o > i; ++i) {
var a = t[i];
if (w(a) || A(a))
for (var s = Object.keys(a), u = 0, f = s.length; f > u; u++) {
var h = s[u],
p = a[h];
n && w(p)
? C(p)
? (e[h] = new Date(p.valueOf()))
: k(p)
? (e[h] = new RegExp(p))
: p.nodeName
? (e[h] = p.cloneNode(!0))
: D(p)
? (e[h] = p.clone())
: (w(e[h]) || (e[h] = Lr(p) ? [] : {}), l(e[h], [p], !0))
: (e[h] = p);
}
}
return c(e, r), e;
}
function f(e) {
return l(e, Ir.call(arguments, 1), !1);
}
function h(e) {
return l(e, Ir.call(arguments, 1), !0);
}
function p(e) {
return parseInt(e, 10);
}
function d(e, t) {
return f(Object.create(e), t);
}
function $() {}
function v(e) {
return e;
}
function m(e) {
return function () {
return e;
};
}
function g(e) {
return A(e.toString) && e.toString !== qr;
}
function y(e) {
return "undefined" == typeof e;
}
function b(e) {
return "undefined" != typeof e;
}
function w(e) {
return null !== e && "object" == typeof e;
}
function x(e) {
return null !== e && "object" == typeof e && !_r(e);
}
function S(e) {
return "string" == typeof e;
}
function E(e) {
return "number" == typeof e;
}
function C(e) {
return "[object Date]" === qr.call(e);
}
function A(e) {
return "function" == typeof e;
}
function k(e) {
return "[object RegExp]" === qr.call(e);
}
function O(e) {
return e && e.window === e;
}
function M(e) {
return e && e.$evalAsync && e.$watch;
}
function j(e) {
return "[object File]" === qr.call(e);
}
function T(e) {
return "[object FormData]" === qr.call(e);
}
function N(e) {
return "[object Blob]" === qr.call(e);
}
function V(e) {
return "boolean" == typeof e;
}
function P(e) {
return e && A(e.then);
}
function I(e) {
return e && E(e.length) && zr.test(qr.call(e));
}
function D(e) {
return !(!e || !(e.nodeName || (e.prop && e.attr && e.find)));
}
function R(e) {
var t,
n = {},
r = e.split(",");
for (t = 0; t < r.length; t++) n[r[t]] = !0;
return n;
}
function q(e) {
return Ar(e.nodeName || (e[0] && e[0].nodeName));
}
function _(e, t) {
var n = e.indexOf(t);
return n >= 0 && e.splice(n, 1), n;
}
function F(e, t) {
function n(e, t) {
var n,
i = t.$$hashKey;
if (Lr(e)) for (var o = 0, a = e.length; a > o; o++) t.push(r(e[o]));
else if (x(e)) for (n in e) t[n] = r(e[n]);
else if (e && "function" == typeof e.hasOwnProperty)
for (n in e) e.hasOwnProperty(n) && (t[n] = r(e[n]));
else for (n in e) kr.call(e, n) && (t[n] = r(e[n]));
return c(t, i), t;
}
function r(e) {
if (!w(e)) return e;
var t = i.indexOf(e);
if (-1 !== t) return a[t];
if (O(e) || M(e))
throw Fr(
"cpws",
"Can't copy! Making copies of Window or Scope instances is not supported."
);
var r,
o = !1;
return (
Lr(e)
? ((r = []), (o = !0))
: I(e)
? (r = new e.constructor(e))
: C(e)
? (r = new Date(e.getTime()))
: k(e)
? ((r = new RegExp(e.source, e.toString().match(/[^\/]*$/)[0])),
(r.lastIndex = e.lastIndex))
: N(e)
? (r = new e.constructor([e], { type: e.type }))
: A(e.cloneNode)
? (r = e.cloneNode(!0))
: ((r = Object.create(_r(e))), (o = !0)),
i.push(e),
a.push(r),
o ? n(e, r) : r
);
}
var i = [],
a = [];
if (t) {
if (I(t))
throw Fr(
"cpta",
"Can't copy! TypedArray destination cannot be mutated."
);
if (e === t)
throw Fr("cpi", "Can't copy! Source and destination are identical.");
return (
Lr(t)
? (t.length = 0)
: o(t, function (e, n) {
"$$hashKey" !== n && delete t[n];
}),
i.push(e),
a.push(t),
n(e, t)
);
}
return r(e);
}
function U(e, t) {
if (Lr(e)) {
t = t || [];
for (var n = 0, r = e.length; r > n; n++) t[n] = e[n];
} else if (w(e)) {
t = t || {};
for (var i in e)
("$" === i.charAt(0) && "$" === i.charAt(1)) || (t[i] = e[i]);
}
return t || e;
}
function H(e, t) {
if (e === t) return !0;
if (null === e || null === t) return !1;
if (e !== e && t !== t) return !0;
var n,
r,
i,
o = typeof e,
a = typeof t;
if (o == a && "object" == o) {
if (!Lr(e)) {
if (C(e)) return C(t) ? H(e.getTime(), t.getTime()) : !1;
if (k(e)) return k(t) ? e.toString() == t.toString() : !1;
if (M(e) || M(t) || O(e) || O(t) || Lr(t) || C(t) || k(t)) return !1;
i = ve();
for (r in e)
if ("$" !== r.charAt(0) && !A(e[r])) {
if (!H(e[r], t[r])) return !1;
i[r] = !0;
}
for (r in t)
if (!(r in i) && "$" !== r.charAt(0) && b(t[r]) && !A(t[r]))
return !1;
return !0;
}
if (!Lr(t)) return !1;
if ((n = e.length) == t.length) {
for (r = 0; n > r; r++) if (!H(e[r], t[r])) return !1;
return !0;
}
}
return !1;
}
function B(e, t, n) {
return e.concat(Ir.call(t, n));
}
function L(e, t) {
return Ir.call(e, t || 0);
}
function z(e, t) {
var n = arguments.length > 2 ? L(arguments, 2) : [];
return !A(t) || t instanceof RegExp
? t
: n.length
? function () {
return arguments.length
? t.apply(e, B(n, arguments, 0))
: t.apply(e, n);
}
: function () {
return arguments.length ? t.apply(e, arguments) : t.call(e);
};
}
function W(e, r) {
var i = r;
return (
"string" == typeof e && "$" === e.charAt(0) && "$" === e.charAt(1)
? (i = n)
: O(r)
? (i = "$WINDOW")
: r && t === r
? (i = "$DOCUMENT")
: M(r) && (i = "$SCOPE"),
i
);
}
function G(e, t) {
return y(e) ? n : (E(t) || (t = t ? 2 : null), JSON.stringify(e, W, t));
}
function J(e) {
return S(e) ? JSON.parse(e) : e;
}
function Y(e, t) {
e = e.replace(Kr, "");
var n = Date.parse("Jan 01, 1970 00:00:00 " + e) / 6e4;
return isNaN(n) ? t : n;
}
function K(e, t) {
return (e = new Date(e.getTime())), e.setMinutes(e.getMinutes() + t), e;
}
function Z(e, t, n) {
n = n ? -1 : 1;
var r = e.getTimezoneOffset(),
i = Y(t, r);
return K(e, n * (i - r));
}
function X(e) {
e = Nr(e).clone();
try {
e.empty();
} catch (t) {}
var n = Nr("<div>").append(e).html();
try {
return e[0].nodeType === ni
? Ar(n)
: n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/, function (e, t) {
return "<" + Ar(t);
});
} catch (t) {
return Ar(n);
}
}
function Q(e) {
try {
return decodeURIComponent(e);
} catch (t) {}
}
function ee(e) {
var t = {};
return (
o((e || "").split("&"), function (e) {
var n, r, i;
e &&
((r = e = e.replace(/\+/g, "%20")),
(n = e.indexOf("=")),
-1 !== n && ((r = e.substring(0, n)), (i = e.substring(n + 1))),
(r = Q(r)),
b(r) &&
((i = b(i) ? Q(i) : !0),
kr.call(t, r)
? Lr(t[r])
? t[r].push(i)
: (t[r] = [t[r], i])
: (t[r] = i)));
}),
t
);
}
function te(e) {
var t = [];
return (
o(e, function (e, n) {
Lr(e)
? o(e, function (e) {
t.push(re(n, !0) + (e === !0 ? "" : "=" + re(e, !0)));
})
: t.push(re(n, !0) + (e === !0 ? "" : "=" + re(e, !0)));
}),
t.length ? t.join("&") : ""
);
}
function ne(e) {
return re(e, !0)
.replace(/%26/gi, "&")
.replace(/%3D/gi, "=")
.replace(/%2B/gi, "+");
}
function re(e, t) {
return encodeURIComponent(e)
.replace(/%40/gi, "@")
.replace(/%3A/gi, ":")
.replace(/%24/g, "$")
.replace(/%2C/gi, ",")
.replace(/%3B/gi, ";")
.replace(/%20/g, t ? "%20" : "+");
}
function ie(e, t) {
var n,
r,
i = Zr.length;
for (r = 0; i > r; ++r)
if (((n = Zr[r] + t), S((n = e.getAttribute(n))))) return n;
return null;
}
function oe(e, t) {
var n,
r,
i = {};
o(Zr, function (t) {
var i = t + "app";
!n &&
e.hasAttribute &&
e.hasAttribute(i) &&
((n = e), (r = e.getAttribute(i)));
}),
o(Zr, function (t) {
var i,
o = t + "app";
!n &&
(i = e.querySelector("[" + o.replace(":", "\\:") + "]")) &&
((n = i), (r = i.getAttribute(o)));
}),
n && ((i.strictDi = null !== ie(n, "strict-di")), t(n, r ? [r] : [], i));
}
function ae(n, r, i) {
w(i) || (i = {});
var a = { strictDi: !1 };
i = f(a, i);
var s = function () {
if (((n = Nr(n)), n.injector())) {
var e = n[0] === t ? "document" : X(n);
throw Fr(
"btstrpd",
"App Already Bootstrapped with this Element '{0}'",
e.replace(/</, "<").replace(/>/, ">")
);
}
(r = r || []),
r.unshift([
"$provide",
function (e) {
e.value("$rootElement", n);
},
]),
i.debugInfoEnabled &&
r.push([
"$compileProvider",
function (e) {
e.debugInfoEnabled(!0);
},
]),
r.unshift("ng");
var o = tt(r, i.strictDi);
return (
o.invoke([
"$rootScope",
"$rootElement",
"$compile",
"$injector",
function (e, t, n, r) {
e.$apply(function () {
t.data("$injector", r), n(t)(e);
});
},
]),
o
);
},
u = /^NG_ENABLE_DEBUG_INFO!/,
c = /^NG_DEFER_BOOTSTRAP!/;
return (
e &&
u.test(e.name) &&
((i.debugInfoEnabled = !0), (e.name = e.name.replace(u, ""))),
e && !c.test(e.name)
? s()
: ((e.name = e.name.replace(c, "")),
(Ur.resumeBootstrap = function (e) {
return (
o(e, function (e) {
r.push(e);
}),
s()
);
}),
void (A(Ur.resumeDeferredBootstrap) && Ur.resumeDeferredBootstrap()))
);
}
function se() {
(e.name = "NG_ENABLE_DEBUG_INFO!" + e.name), e.location.reload();
}
function ue(e) {
var t = Ur.element(e).injector();
if (!t)
throw Fr(
"test",
"no injector found for element argument to getTestability"
);
return t.get("$$testability");
}
function ce(e, t) {
return (
(t = t || "_"),
e.replace(Xr, function (e, n) {
return (n ? t : "") + e.toLowerCase();
})
);
}
function le() {
var t;
if (!Qr) {
var r = Yr();
(Vr = y(r) ? e.jQuery : r ? e[r] : n),
Vr && Vr.fn.on
? ((Nr = Vr),
f(Vr.fn, {
scope: wi.scope,
isolateScope: wi.isolateScope,
controller: wi.controller,
injector: wi.injector,
inheritedData: wi.inheritedData,
}),
(t = Vr.cleanData),
(Vr.cleanData = function (e) {
var n;
if (Br) Br = !1;
else
for (var r, i = 0; null != (r = e[i]); i++)
(n = Vr._data(r, "events")),
n && n.$destroy && Vr(r).triggerHandler("$destroy");
t(e);
}))
: (Nr = Me),
(Ur.element = Nr),
(Qr = !0);
}
}
function fe(e, t, n) {
if (!e)
throw Fr("areq", "Argument '{0}' is {1}", t || "?", n || "required");
return e;
}
function he(e, t, n) {
return (
n && Lr(e) && (e = e[e.length - 1]),
fe(
A(e),
t,
"not a function, got " +
(e && "object" == typeof e
? e.constructor.name || "Object"
: typeof e)
),
e
);
}
function pe(e, t) {
if ("hasOwnProperty" === e)
throw Fr("badname", "hasOwnProperty is not a valid {0} name", t);
}
function de(e, t, n) {
if (!t) return e;
for (var r, i = t.split("."), o = e, a = i.length, s = 0; a > s; s++)
(r = i[s]), e && (e = (o = e)[r]);
return !n && A(e) ? z(o, e) : e;
}
function $e(e) {
for (
var t, n = e[0], r = e[e.length - 1], i = 1;
n !== r && (n = n.nextSibling);
i++
)
(t || e[i] !== n) && (t || (t = Nr(Ir.call(e, 0, i))), t.push(n));
return t || e;
}
function ve() {
return Object.create(null);
}
function me(e) {
function t(e, t, n) {
return e[t] || (e[t] = n());
}
var n = r("$injector"),
i = r("ng"),
o = t(e, "angular", Object);
return (
(o.$$minErr = o.$$minErr || r),
t(o, "module", function () {
var e = {};
return function (r, o, a) {
var s = function (e, t) {
if ("hasOwnProperty" === e)
throw i("badname", "hasOwnProperty is not a valid {0} name", t);
};
return (
s(r, "module"),
o && e.hasOwnProperty(r) && (e[r] = null),
t(e, r, function () {
function e(e, t, n, r) {
return (
r || (r = i),
function () {
return r[n || "push"]([e, t, arguments]), l;
}
);
}
function t(e, t) {
return function (n, o) {
return (
o && A(o) && (o.$$moduleName = r),
i.push([e, t, arguments]),
l
);
};
}
if (!o)
throw n(
"nomod",
"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",
r
);
var i = [],
s = [],
u = [],
c = e("$injector", "invoke", "push", s),
l = {
_invokeQueue: i,
_configBlocks: s,
_runBlocks: u,
requires: o,
name: r,
provider: t("$provide", "provider"),
factory: t("$provide", "factory"),
service: t("$provide", "service"),
value: e("$provide", "value"),
constant: e("$provide", "constant", "unshift"),
decorator: t("$provide", "decorator"),
animation: t("$animateProvider", "register"),
filter: t("$filterProvider", "register"),
controller: t("$controllerProvider", "register"),
directive: t("$compileProvider", "directive"),
config: c,
run: function (e) {
return u.push(e), this;
},
};
return a && c(a), l;
})
);
};
})
);
}
function ge(e) {
var t = [];
return JSON.stringify(e, function (e, n) {
if (((n = W(e, n)), w(n))) {
if (t.indexOf(n) >= 0) return "...";
t.push(n);
}
return n;
});
}
function ye(e) {
return "function" == typeof e
? e.toString().replace(/ \{[\s\S]*$/, "")
: y(e)
? "undefined"
: "string" != typeof e
? ge(e)
: e;
}
function be(t) {
f(t, {
bootstrap: ae,
copy: F,
extend: f,
merge: h,
equals: H,
element: Nr,
forEach: o,
injector: tt,
noop: $,
bind: z,
toJson: G,
fromJson: J,
identity: v,
isUndefined: y,
isDefined: b,
isString: S,
isFunction: A,
isObject: w,
isNumber: E,
isElement: D,
isArray: Lr,
version: ai,
isDate: C,
lowercase: Ar,
uppercase: Or,
callbacks: { counter: 0 },
getTestability: ue,
$$minErr: r,
$$csp: Jr,
reloadWithDebugInfo: se,
}),
(Pr = me(e))(
"ng",
["ngLocale"],
[
"$provide",
function (e) {
e.provider({ $$sanitizeUri: bn }),
e
.provider("$compile", ft)
.directive({
a: Ao,
input: zo,
textarea: zo,
form: To,
script: Ra,
select: Fa,
style: Ha,
option: Ua,
ngBind: Jo,
ngBindHtml: Ko,
ngBindTemplate: Yo,
ngClass: Xo,
ngClassEven: ea,
ngClassOdd: Qo,
ngCloak: ta,
ngController: na,
ngForm: No,
ngHide: Ta,
ngIf: oa,
ngInclude: aa,
ngInit: ua,
ngNonBindable: xa,
ngPluralize: Aa,
ngRepeat: ka,
ngShow: ja,
ngStyle: Na,
ngSwitch: Va,
ngSwitchWhen: Pa,
ngSwitchDefault: Ia,
ngOptions: Ca,
ngTransclude: Da,
ngModel: ya,
ngList: ca,
ngChange: Zo,
pattern: La,
ngPattern: La,
required: Ba,
ngRequired: Ba,
minlength: Wa,
ngMinlength: Wa,
maxlength: za,
ngMaxlength: za,
ngValue: Go,
ngModelOptions: wa,
})
.directive({ ngInclude: sa })
.directive(ko)
.directive(ra),
e.provider({
$anchorScroll: nt,
$animate: Di,
$animateCss: _i,
$$animateJs: Pi,
$$animateQueue: Ii,
$$AnimateRunner: qi,
$$animateAsyncRun: Ri,
$browser: ut,
$cacheFactory: ct,
$controller: vt,
$document: mt,
$exceptionHandler: gt,
$filter: Pn,
$$forceReflow: Li,
$interpolate: Nt,
$interval: Vt,
$http: Ot,
$httpParamSerializer: bt,
$httpParamSerializerJQLike: wt,
$httpBackend: jt,
$xhrFactory: Mt,
$location: Gt,
$log: Jt,
$parse: dn,
$rootScope: yn,
$q: $n,
$$q: vn,
$sce: En,
$sceDelegate: Sn,
$sniffer: Cn,
$templateCache: lt,
$templateRequest: An,
$$testability: kn,
$timeout: On,
$window: Tn,
$$rAF: gn,
$$jqLite: Ke,
$$HashMap: Ci,
$$cookieReader: Vn,
});
},
]
);
}
function we() {
return ++ui;
}
function xe(e) {
return e
.replace(fi, function (e, t, n, r) {
return r ? n.toUpperCase() : n;
})
.replace(hi, "Moz$1");
}
function Se(e) {
return !vi.test(e);
}
function Ee(e) {
var t = e.nodeType;
return t === ei || !t || t === ii;
}
function Ce(e) {
for (var t in si[e.ng339]) return !0;
return !1;
}
function Ae(e, t) {
var n,
r,
i,
a,
s = t.createDocumentFragment(),
u = [];
if (Se(e)) u.push(t.createTextNode(e));
else {
for (
n = n || s.appendChild(t.createElement("div")),
r = (mi.exec(e) || ["", ""])[1].toLowerCase(),
i = yi[r] || yi._default,
n.innerHTML = i[1] + e.replace(gi, "<$1></$2>") + i[2],
a = i[0];
a--;
)
n = n.lastChild;
(u = B(u, n.childNodes)), (n = s.firstChild), (n.textContent = "");
}
return (
(s.textContent = ""),
(s.innerHTML = ""),
o(u, function (e) {
s.appendChild(e);
}),
s
);
}
function ke(e, n) {
n = n || t;
var r;
return (r = $i.exec(e))
? [n.createElement(r[1])]
: (r = Ae(e, n))
? r.childNodes
: [];
}
function Oe(e, t) {
var n = e.parentNode;
n && n.replaceChild(t, e), t.appendChild(e);
}
function Me(e) {
if (e instanceof Me) return e;
var t;
if ((S(e) && ((e = Wr(e)), (t = !0)), !(this instanceof Me))) {
if (t && "<" != e.charAt(0))
throw di(
"nosel",
"Looking up elements via selectors is not supported by jqLite! See: https://docs.angularjs.org/api/angular.element"
);
return new Me(e);
}
t ? _e(this, ke(e)) : _e(this, e);
}
function je(e) {
return e.cloneNode(!0);
}
function Te(e, t) {
if ((t || Ve(e), e.querySelectorAll))
for (var n = e.querySelectorAll("*"), r = 0, i = n.length; i > r; r++)
Ve(n[r]);
}
function Ne(e, t, n, r) {
if (b(r))
throw di(
"offargs",
"jqLite#off() does not support the `selector` argument"
);
var i = Pe(e),
a = i && i.events,
s = i && i.handle;
if (s)
if (t) {
var u = function (t) {
var r = a[t];
b(n) && _(r || [], n),
(b(n) && r && r.length > 0) || (li(e, t, s), delete a[t]);
};
o(t.split(" "), function (e) {
u(e), pi[e] && u(pi[e]);
});
} else for (t in a) "$destroy" !== t && li(e, t, s), delete a[t];
}
function Ve(e, t) {
var r = e.ng339,
i = r && si[r];
if (i) {
if (t) return void delete i.data[t];
i.handle && (i.events.$destroy && i.handle({}, "$destroy"), Ne(e)),
delete si[r],
(e.ng339 = n);
}
}
function Pe(e, t) {
var r = e.ng339,
i = r && si[r];
return (
t &&
!i &&
((e.ng339 = r = we()),
(i = si[r] = { events: {}, data: {}, handle: n })),
i
);
}
function Ie(e, t, n) {
if (Ee(e)) {
var r = b(n),
i = !r && t && !w(t),
o = !t,
a = Pe(e, !i),
s = a && a.data;
if (r) s[t] = n;
else {
if (o) return s;
if (i) return s && s[t];
f(s, t);
}
}
}
function De(e, t) {
return e.getAttribute
? (" " + (e.getAttribute("class") || "") + " ")
.replace(/[\n\t]/g, " ")
.indexOf(" " + t + " ") > -1
: !1;
}
function Re(e, t) {
t &&
e.setAttribute &&
o(t.split(" "), function (t) {
e.setAttribute(
"class",
Wr(
(" " + (e.getAttribute("class") || "") + " ")
.replace(/[\n\t]/g, " ")
.replace(" " + Wr(t) + " ", " ")
)
);
});
}
function qe(e, t) {
if (t && e.setAttribute) {
var n = (" " + (e.getAttribute("class") || "") + " ").replace(
/[\n\t]/g,
" "
);
o(t.split(" "), function (e) {
(e = Wr(e)), -1 === n.indexOf(" " + e + " ") && (n += e + " ");
}),
e.setAttribute("class", Wr(n));
}
}
function _e(e, t) {
if (t)
if (t.nodeType) e[e.length++] = t;
else {
var n = t.length;
if ("number" == typeof n && t.window !== t) {
if (n) for (var r = 0; n > r; r++) e[e.length++] = t[r];
} else e[e.length++] = t;
}
}
function Fe(e, t) {
return Ue(e, "$" + (t || "ngController") + "Controller");
}
function Ue(e, t, n) {
e.nodeType == ii && (e = e.documentElement);
for (var r = Lr(t) ? t : [t]; e; ) {
for (var i = 0, o = r.length; o > i; i++)
if (b((n = Nr.data(e, r[i])))) return n;
e = e.parentNode || (e.nodeType === oi && e.host);
}
}
function He(e) {
for (Te(e, !0); e.firstChild; ) e.removeChild(e.firstChild);
}
function Be(e, t) {
t || Te(e);
var n = e.parentNode;
n && n.removeChild(e);
}
function Le(t, n) {
(n = n || e),
"complete" === n.document.readyState
? n.setTimeout(t)
: Nr(n).on("load", t);
}
function ze(e, t) {
var n = xi[t.toLowerCase()];
return n && Si[q(e)] && n;
}
function We(e) {
return Ei[e];
}
function Ge(e, t) {
var n = function (n, r) {
n.isDefaultPrevented = function () {
return n.defaultPrevented;
};
var i = t[r || n.type],
o = i ? i.length : 0;
if (o) {
if (y(n.immediatePropagationStopped)) {
var a = n.stopImmediatePropagation;
n.stopImmediatePropagation = function () {
(n.immediatePropagationStopped = !0),
n.stopPropagation && n.stopPropagation(),
a && a.call(n);
};
}
n.isImmediatePropagationStopped = function () {
return n.immediatePropagationStopped === !0;
};
var s = i.specialHandlerWrapper || Je;
o > 1 && (i = U(i));
for (var u = 0; o > u; u++)
n.isImmediatePropagationStopped() || s(e, n, i[u]);
}
};
return (n.elem = e), n;
}
function Je(e, t, n) {
n.call(e, t);
}
function Ye(e, t, n) {
var r = t.relatedTarget;
(r && (r === e || bi.call(e, r))) || n.call(e, t);
}
function Ke() {
this.$get = function () {
return f(Me, {
hasClass: function (e, t) {
return e.attr && (e = e[0]), De(e, t);
},
addClass: function (e, t) {
return e.attr && (e = e[0]), qe(e, t);
},
removeClass: function (e, t) {
return e.attr && (e = e[0]), Re(e, t);
},
});
};
}
function Ze(e, t) {
var n = e && e.$$hashKey;
if (n) return "function" == typeof n && (n = e.$$hashKey()), n;
var r = typeof e;
return (n =
"function" == r || ("object" == r && null !== e)
? (e.$$hashKey = r + ":" + (t || u)())
: r + ":" + e);
}
function Xe(e, t) {
if (t) {
var n = 0;
this.nextUid = function () {
return ++n;
};
}
o(e, this.put, this);
}
function Qe(e) {
var t = e.toString().replace(Mi, ""),
n = t.match(Ai);
return n
? "function(" + (n[1] || "").replace(/[\s\r\n]+/, " ") + ")"
: "fn";
}
function et(e, t, n) {
var r, i, a, s;
if ("function" == typeof e) {
if (!(r = e.$inject)) {
if (((r = []), e.length)) {
if (t)
throw (
((S(n) && n) || (n = e.name || Qe(e)),
ji(
"strictdi",
"{0} is not using explicit annotation and cannot be invoked in strict mode",
n
))
);
(i = e.toString().replace(Mi, "")),
(a = i.match(Ai)),
o(a[1].split(ki), function (e) {
e.replace(Oi, function (e, t, n) {
r.push(n);
});
});
}
e.$inject = r;
}
} else
Lr(e)
? ((s = e.length - 1), he(e[s], "fn"), (r = e.slice(0, s)))
: he(e, "fn", !0);
return r;
}
function tt(e, t) {
function r(e) {
return function (t, n) {
return w(t) ? void o(t, s(e)) : e(t, n);
};
}
function i(e, t) {
if (
(pe(e, "service"), (A(t) || Lr(t)) && (t = E.instantiate(t)), !t.$get)
)
throw ji("pget", "Provider '{0}' must define $get factory method.", e);
return (x[e + v] = t);
}
function a(e, t) {
return function () {
var n = k.invoke(t, this);
if (y(n))
throw ji(
"undef",
"Provider '{0}' must return a value from $get factory method.",
e
);
return n;
};
}
function u(e, t, n) {
return i(e, { $get: n !== !1 ? a(e, t) : t });
}
function c(e, t) {
return u(e, [
"$injector",
function (e) {
return e.instantiate(t);
},
]);
}
function l(e, t) {
return u(e, m(t), !1);
}
function f(e, t) {
pe(e, "constant"), (x[e] = t), (C[e] = t);
}
function h(e, t) {
var n = E.get(e + v),
r = n.$get;
n.$get = function () {
var e = k.invoke(r, n);
return k.invoke(t, null, { $delegate: e });
};
}
function p(e) {
fe(y(e) || Lr(e), "modulesToLoad", "not an array");
var t,
n = [];
return (
o(e, function (e) {
function r(e) {
var t, n;
for (t = 0, n = e.length; n > t; t++) {
var r = e[t],
i = E.get(r[0]);
i[r[1]].apply(i, r[2]);
}
}
if (!b.get(e)) {
b.put(e, !0);
try {
S(e)
? ((t = Pr(e)),
(n = n.concat(p(t.requires)).concat(t._runBlocks)),
r(t._invokeQueue),
r(t._configBlocks))
: A(e)
? n.push(E.invoke(e))
: Lr(e)
? n.push(E.invoke(e))
: he(e, "module");
} catch (i) {
throw (
(Lr(e) && (e = e[e.length - 1]),
i.message &&
i.stack &&
-1 == i.stack.indexOf(i.message) &&
(i = i.message + "\n" + i.stack),
ji(
"modulerr",
"Failed to instantiate module {0} due to:\n{1}",
e,
i.stack || i.message || i
))
);
}
}
}),
n
);
}
function d(e, n) {
function r(t, r) {
if (e.hasOwnProperty(t)) {
if (e[t] === $)
throw ji(
"cdep",
"Circular dependency found: {0}",
t + " <- " + g.join(" <- ")
);
return e[t];
}
try {
return g.unshift(t), (e[t] = $), (e[t] = n(t, r));
} catch (i) {
throw (e[t] === $ && delete e[t], i);
} finally {
g.shift();
}
}
function i(e, n, i, o) {
"string" == typeof i && ((o = i), (i = null));
var a,
s,
u,
c = [],
l = tt.$$annotate(e, t, o);
for (s = 0, a = l.length; a > s; s++) {
if (((u = l[s]), "string" != typeof u))
throw ji(
"itkn",
"Incorrect injection token! Expected service name as string, got {0}",
u
);
c.push(i && i.hasOwnProperty(u) ? i[u] : r(u, o));
}
return Lr(e) && (e = e[a]), e.apply(n, c);
}
function o(e, t, n) {
var r = Object.create((Lr(e) ? e[e.length - 1] : e).prototype || null),
o = i(e, r, t, n);
return w(o) || A(o) ? o : r;
}
return {
invoke: i,
instantiate: o,
get: r,
annotate: tt.$$annotate,
has: function (t) {
return x.hasOwnProperty(t + v) || e.hasOwnProperty(t);
},
};
}
t = t === !0;
var $ = {},
v = "Provider",
g = [],
b = new Xe([], !0),
x = {
$provide: {
provider: r(i),
factory: r(u),
service: r(c),
value: r(l),
constant: r(f),
decorator: h,
},
},
E = (x.$injector = d(x, function (e, t) {
throw (
(Ur.isString(t) && g.push(t),
ji("unpr", "Unknown provider: {0}", g.join(" <- ")))
);
})),
C = {},
k = (C.$injector = d(C, function (e, t) {
var r = E.get(e + v, t);
return k.invoke(r.$get, r, n, e);
}));
return (
o(p(e), function (e) {
e && k.invoke(e);
}),
k
);
}
function nt() {
var e = !0;
(this.disableAutoScrolling = function () {
e = !1;
}),
(this.$get = [
"$window",
"$location",
"$rootScope",
function (t, n, r) {
function i(e) {
var t = null;
return (
Array.prototype.some.call(e, function (e) {
return "a" === q(e) ? ((t = e), !0) : void 0;
}),
t
);
}
function o() {
var e = s.yOffset;
if (A(e)) e = e();
else if (D(e)) {
var n = e[0],
r = t.getComputedStyle(n);
e = "fixed" !== r.position ? 0 : n.getBoundingClientRect().bottom;
} else E(e) || (e = 0);
return e;
}
function a(e) {
if (e) {
e.scrollIntoView();
var n = o();
if (n) {
var r = e.getBoundingClientRect().top;
t.scrollBy(0, r - n);
}
} else t.scrollTo(0, 0);
}
function s(e) {
e = S(e) ? e : n.hash();
var t;
e
? (t = u.getElementById(e))
? a(t)
: (t = i(u.getElementsByName(e)))
? a(t)
: "top" === e && a(null)
: a(null);
}
var u = t.document;
return (
e &&
r.$watch(
function () {
return n.hash();
},
function (e, t) {
(e === t && "" === e) ||
Le(function () {
r.$evalAsync(s);
});
}
),
s
);
},
]);
}
function rt(e, t) {
return e || t
? e
? t
? (Lr(e) && (e = e.join(" ")),
Lr(t) && (t = t.join(" ")),
e + " " + t)
: e
: t
: "";
}
function it(e) {
for (var t = 0; t < e.length; t++) {
var n = e[t];
if (n.nodeType === Ni) return n;
}
}
function ot(e) {
S(e) && (e = e.split(" "));
var t = ve();
return (
o(e, function (e) {
e.length && (t[e] = !0);
}),
t
);
}
function at(e) {
return w(e) ? e : {};
}
function st(e, t, n, r) {
function i(e) {
try {
e.apply(null, L(arguments, 1));
} finally {
if ((g--, 0 === g))
for (; b.length; )
try {
b.pop()();
} catch (t) {
n.error(t);
}
}
}
function a(e) {
var t = e.indexOf("#");
return -1 === t ? "" : e.substr(t);
}
function s() {
(C = null), c(), l();
}
function u() {
try {
return p.state;
} catch (e) {}
}
function c() {
(w = u()), (w = y(w) ? null : w), H(w, O) && (w = O), (O = w);
}
function l() {
(S === f.url() && x === w) ||
((S = f.url()),
(x = w),
o(A, function (e) {
e(f.url(), w);
}));
}
var f = this,
h = (t[0], e.location),
p = e.history,
d = e.setTimeout,
v = e.clearTimeout,
m = {};
f.isMock = !1;
var g = 0,
b = [];
(f.$$completeOutstandingRequest = i),
(f.$$incOutstandingRequestCount = function () {
g++;
}),
(f.notifyWhenNoOutstandingRequests = function (e) {
0 === g ? e() : b.push(e);
});
var w,
x,
S = h.href,
E = t.find("base"),
C = null;
c(),
(x = w),
(f.url = function (t, n, i) {
if (
(y(i) && (i = null),
h !== e.location && (h = e.location),
p !== e.history && (p = e.history),
t)
) {
var o = x === i;
if (S === t && (!r.history || o)) return f;
var s = S && qt(S) === qt(t);
return (
(S = t),
(x = i),
!r.history || (s && o)
? ((s && !C) || (C = t),
n ? h.replace(t) : s ? (h.hash = a(t)) : (h.href = t),
h.href !== t && (C = t))
: (p[n ? "replaceState" : "pushState"](i, "", t), c(), (x = w)),
f
);
}
return C || h.href.replace(/%27/g, "'");
}),
(f.state = function () {
return w;
});
var A = [],
k = !1,
O = null;
(f.onUrlChange = function (t) {
return (
k ||
(r.history && Nr(e).on("popstate", s),
Nr(e).on("hashchange", s),
(k = !0)),
A.push(t),
t
);
}),
(f.$$applicationDestroyed = function () {
Nr(e).off("hashchange popstate", s);
}),
(f.$$checkUrlChange = l),
(f.baseHref = function () {
var e = E.attr("href");
return e ? e.replace(/^(https?\:)?\/\/[^\/]*/, "") : "";
}),
(f.defer = function (e, t) {
var n;
return (
g++,
(n = d(function () {
delete m[n], i(e);
}, t || 0)),
(m[n] = !0),
n
);
}),
(f.defer.cancel = function (e) {
return m[e] ? (delete m[e], v(e), i($), !0) : !1;
});
}
function ut() {
this.$get = [
"$window",
"$log",
"$sniffer",
"$document",
function (e, t, n, r) {
return new st(e, r, t, n);
},
];
}
function ct() {
this.$get = function () {
function e(e, n) {
function i(e) {
e != h &&
(p ? p == e && (p = e.n) : (p = e),
o(e.n, e.p),
o(e, h),
(h = e),
(h.n = null));
}
function o(e, t) {
e != t && (e && (e.p = t), t && (t.n = e));
}
if (e in t)
throw r("$cacheFactory")("iid", "CacheId '{0}' is already taken!", e);
var a = 0,
s = f({}, n, { id: e }),
u = ve(),
c = (n && n.capacity) || Number.MAX_VALUE,
l = ve(),
h = null,
p = null;
return (t[e] = {
put: function (e, t) {
if (!y(t)) {
if (c < Number.MAX_VALUE) {
var n = l[e] || (l[e] = { key: e });
i(n);
}
return e in u || a++, (u[e] = t), a > c && this.remove(p.key), t;
}
},
get: function (e) {
if (c < Number.MAX_VALUE) {
var t = l[e];
if (!t) return;
i(t);
}
return u[e];
},
remove: function (e) {
if (c < Number.MAX_VALUE) {
var t = l[e];
if (!t) return;
t == h && (h = t.p),
t == p && (p = t.n),
o(t.n, t.p),
delete l[e];
}
e in u && (delete u[e], a--);
},
removeAll: function () {
(u = ve()), (a = 0), (l = ve()), (h = p = null);
},
destroy: function () {
(u = null), (s = null), (l = null), delete t[e];
},
info: function () {
return f({}, s, { size: a });
},
});
}
var t = {};
return (
(e.info = function () {
var e = {};
return (
o(t, function (t, n) {
e[n] = t.info();
}),
e
);
}),
(e.get = function (e) {
return t[e];
}),
e
);
};
}
function lt() {
this.$get = [
"$cacheFactory",
function (e) {
return e("templates");
},
];
}
function ft(e, r) {
function i(e, t, n) {
var r = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,
i = {};
return (
o(e, function (e, o) {
if (e in C) return void (i[o] = C[e]);
var a = e.match(r);
if (!a)
throw Fi(
"iscp",
"Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",
t,
o,
e,
n ? "controller bindings definition" : "isolate scope definition"
);
(i[o] = {
mode: a[1][0],
collection: "*" === a[2],
optional: "?" === a[3],
attrName: a[4] || o,
}),
a[4] && (C[e] = i[o]);
}),
i
);
}
function a(e, t) {
var n = { isolateScope: null, bindToController: null };
if (
(w(e.scope) &&
(e.bindToController === !0
? ((n.bindToController = i(e.scope, t, !0)), (n.isolateScope = {}))
: (n.isolateScope = i(e.scope, t, !1))),
w(e.bindToController) &&
(n.bindToController = i(e.bindToController, t, !0)),
w(n.bindToController))
) {
var r = e.controller,
o = e.controllerAs;
if (!r)
throw Fi(
"noctrl",
"Cannot bind to controller without directive '{0}'s controller.",
t
);
if (!$t(r, o))
throw Fi(
"noident",
"Cannot bind to controller without identifier for directive '{0}'.",
t
);
}
return n;
}
function u(e) {
var t = e.charAt(0);
if (!t || t !== Ar(t))
throw Fi(
"baddir",
"Directive name '{0}' is invalid. The first character must be a lowercase letter",
e
);
if (e !== e.trim())
throw Fi(
"baddir",
"Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",
e
);
}
var c = {},
l = "Directive",
h = /^\s*directive\:\s*([\w\-]+)\s+(.*)$/,
p = /(([\w\-]+)(?:\:([^;]+))?;?)/,
g = R("ngSrc,ngSrcset,src,srcset"),
x = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/,
E = /^(on[a-z]+|formaction)$/,
C = ve();
(this.directive = function O(t, n) {
return (
pe(t, "directive"),
S(t)
? (u(t),
fe(n, "directiveFactory"),
c.hasOwnProperty(t) ||
((c[t] = []),
e.factory(t + l, [
"$injector",
"$exceptionHandler",
function (e, n) {
var r = [];
return (
o(c[t], function (i, o) {
try {
var a = e.invoke(i);
A(a)
? (a = { compile: m(a) })
: !a.compile && a.link && (a.compile = m(a.link)),
(a.priority = a.priority || 0),
(a.index = o),
(a.name = a.name || t),
(a.require = a.require || (a.controller && a.name)),
(a.restrict = a.restrict || "EA"),
(a.$$moduleName = i.$$moduleName),
r.push(a);
} catch (s) {
n(s);
}
}),
r
);
},
])),
c[t].push(n))
: o(t, s(O)),
this
);
}),
(this.aHrefSanitizationWhitelist = function (e) {
return b(e)
? (r.aHrefSanitizationWhitelist(e), this)
: r.aHrefSanitizationWhitelist();
}),
(this.imgSrcSanitizationWhitelist = function (e) {
return b(e)
? (r.imgSrcSanitizationWhitelist(e), this)
: r.imgSrcSanitizationWhitelist();
});
var k = !0;
(this.debugInfoEnabled = function (e) {
return b(e) ? ((k = e), this) : k;
}),
(this.$get = [
"$injector",
"$interpolate",
"$exceptionHandler",
"$templateRequest",
"$parse",
"$controller",
"$rootScope",
"$sce",
"$animate",
"$$sanitizeUri",
function (e, r, i, s, u, m, b, C, O, j) {
function T(e, t) {
try {
e.addClass(t);
} catch (n) {}
}
function N(e, n, r, i, o) {
e instanceof Nr || (e = Nr(e));
for (var a = /\S+/, s = 0, u = e.length; u > s; s++) {
var c = e[s];
c.nodeType === ni &&
c.nodeValue.match(a) &&
Oe(c, (e[s] = t.createElement("span")));
}
var l = I(e, n, e, r, i, o);
N.$$addScopeClass(e);
var f = null;
return function (t, n, r) {
fe(t, "scope"),
o && o.needsNewScope && (t = t.$parent.$new()),
(r = r || {});
var i = r.parentBoundTranscludeFn,
a = r.transcludeControllers,
s = r.futureParentElement;
i && i.$$boundTransclude && (i = i.$$boundTransclude),
f || (f = P(s));
var u;
if (
((u =
"html" !== f
? Nr(ee(f, Nr("<div>").append(e).html()))
: n
? wi.clone.call(e)
: e),
a)
)
for (var c in a) u.data("$" + c + "Controller", a[c].instance);
return (
N.$$addScopeInfo(u, t), n && n(u, t), l && l(t, u, u, i), u
);
};
}
function P(e) {
var t = e && e[0];
return t && "foreignobject" !== q(t) && t.toString().match(/SVG/)
? "svg"
: "html";
}
function I(e, t, r, i, o, a) {
function s(e, r, i, o) {
var a, s, u, c, l, f, h, p, v;
if (d) {
var m = r.length;
for (v = new Array(m), l = 0; l < $.length; l += 3)
(h = $[l]), (v[h] = r[h]);
} else v = r;
for (l = 0, f = $.length; f > l; )
(u = v[$[l++]]),
(a = $[l++]),
(s = $[l++]),
a
? (a.scope
? ((c = e.$new()), N.$$addScopeInfo(Nr(u), c))
: (c = e),
(p = a.transcludeOnThisElement
? D(e, a.transclude, o)
: !a.templateOnThisElement && o
? o
: !o && t
? D(e, t)
: null),
a(s, c, u, i, p))
: s && s(e, u.childNodes, n, o);
}
for (var u, c, l, f, h, p, d, $ = [], v = 0; v < e.length; v++)
(u = new se()),
(c = R(e[v], [], u, 0 === v ? i : n, o)),
(l = c.length ? B(c, e[v], u, t, r, null, [], [], a) : null),
l && l.scope && N.$$addScopeClass(u.$$element),
(h =
(l && l.terminal) || !(f = e[v].childNodes) || !f.length
? null
: I(
f,
l
? (l.transcludeOnThisElement ||
!l.templateOnThisElement) &&
l.transclude
: t
)),
(l || h) && ($.push(v, l, h), (p = !0), (d = d || l)),
(a = null);
return p ? s : null;
}
function D(e, t, n) {
var r = function (r, i, o, a, s) {
return (
r || ((r = e.$new(!1, s)), (r.$$transcluded = !0)),
t(r, i, {
parentBoundTranscludeFn: n,
transcludeControllers: o,
futureParentElement: a,
})
);
};
return r;
}
function R(e, t, n, r, i) {
var o,
a,
s = e.nodeType,
u = n.$attr;
switch (s) {
case ei:
W(t, ht(q(e)), "E", r, i);
for (
var c,
l,
f,
d,
$,
v,
m = e.attributes,
g = 0,
y = m && m.length;
y > g;
g++
) {
var b = !1,
x = !1;
(c = m[g]),
(l = c.name),
($ = Wr(c.value)),
(d = ht(l)),
(v = pe.test(d)) &&
(l = l
.replace(Ui, "")
.substr(8)
.replace(/_(.)/g, function (e, t) {
return t.toUpperCase();
}));
var E = d.match(de);
E &&
G(E[1]) &&
((b = l),
(x = l.substr(0, l.length - 5) + "end"),
(l = l.substr(0, l.length - 6))),
(f = ht(l.toLowerCase())),
(u[f] = l),
(!v && n.hasOwnProperty(f)) ||
((n[f] = $), ze(e, f) && (n[f] = !0)),
ne(e, t, $, f, v),
W(t, f, "A", r, i, b, x);
}
if (
((a = e.className), w(a) && (a = a.animVal), S(a) && "" !== a)
)
for (; (o = p.exec(a)); )
(f = ht(o[2])),
W(t, f, "C", r, i) && (n[f] = Wr(o[3])),
(a = a.substr(o.index + o[0].length));
break;
case ni:
if (11 === Tr)
for (
;
e.parentNode &&
e.nextSibling &&
e.nextSibling.nodeType === ni;
)
(e.nodeValue = e.nodeValue + e.nextSibling.nodeValue),
e.parentNode.removeChild(e.nextSibling);
Q(t, e.nodeValue);
break;
case ri:
try {
(o = h.exec(e.nodeValue)),
o &&
((f = ht(o[1])), W(t, f, "M", r, i) && (n[f] = Wr(o[2])));
} catch (C) {}
}
return t.sort(K), t;
}
function F(e, t, n) {
var r = [],
i = 0;
if (t && e.hasAttribute && e.hasAttribute(t)) {
do {
if (!e)
throw Fi(
"uterdir",
"Unterminated attribute, found '{0}' but no matching '{1}' found.",
t,
n
);
e.nodeType == ei &&
(e.hasAttribute(t) && i++, e.hasAttribute(n) && i--),
r.push(e),
(e = e.nextSibling);
} while (i > 0);
} else r.push(e);
return Nr(r);
}
function U(e, t, n) {
return function (r, i, o, a, s) {
return (i = F(i[0], t, n)), e(r, i, o, a, s);
};
}
function B(e, r, o, a, s, u, c, l, f) {
function h(e, t, n, r) {
e &&
(n && (e = U(e, n, r)),
(e.require = v.require),
(e.directiveName = g),
(j === v || v.$$isolateScope) &&
(e = ie(e, { isolateScope: !0 })),
c.push(e)),
t &&
(n && (t = U(t, n, r)),
(t.require = v.require),
(t.directiveName = g),
(j === v || v.$$isolateScope) &&
(t = ie(t, { isolateScope: !0 })),
l.push(t));
}
function p(e, t, n, r) {
var i;
if (S(t)) {
var o = t.match(x),
a = t.substring(o[0].length),
s = o[1] || o[3],
u = "?" === o[2];
if (
("^^" === s
? (n = n.parent())
: ((i = r && r[a]), (i = i && i.instance)),
!i)
) {
var c = "$" + a + "Controller";
i = s ? n.inheritedData(c) : n.data(c);
}
if (!i && !u)
throw Fi(
"ctreq",
"Controller '{0}', required by directive '{1}', can't be found!",
a,
e
);
} else if (Lr(t)) {
i = [];
for (var l = 0, f = t.length; f > l; l++)
i[l] = p(e, t[l], n, r);
}
return i || null;
}
function d(e, t, n, r, i, o) {
var a = ve();
for (var s in r) {
var u = r[s],
c = {
$scope: u === j || u.$$isolateScope ? i : o,
$element: e,
$attrs: t,
$transclude: n,
},
l = u.controller;
"@" == l && (l = t[u.name]);
var f = m(l, c, !0, u.controllerAs);
(a[u.name] = f),
e.data("$" + u.name + "Controller", f.instance);
}
return a;
}
function $(e, t, i, a, s) {
function u(e, t, r) {
var i;
return (
M(e) || ((r = t), (t = e), (e = n)),
D && (i = v),
r || (r = D ? g.parent() : g),
s(e, t, i, r, V)
);
}
var f, h, $, v, m, g, y, b, w;
r === i
? ((y = o), (g = o.$$element))
: ((g = Nr(i)), (y = new se(g, o))),
($ = t),
j ? (h = t.$new(!0)) : k && ($ = t.$parent),
s && ((m = u), (m.$$boundTransclude = s)),
O && (v = d(g, y, m, O, h, t)),
j &&
(N.$$addScopeInfo(
g,
h,
!0,
!(T && (T === j || T === j.$$originalDirective))
),
N.$$addScopeClass(g, !0),
(h.$$isolateBindings = j.$$isolateBindings),
(b = ae(t, y, h, h.$$isolateBindings, j)),
b && h.$on("$destroy", b));
for (var x in v) {
var S = O[x],
E = v[x],
C = S.$$bindings.bindToController;
E.identifier && C && (w = ae($, y, E.instance, C, S));
var A = E();
A !== E.instance &&
((E.instance = A),
g.data("$" + S.name + "Controller", A),
w && w(),
(w = ae($, y, E.instance, C, S)));
}
for (B = 0, W = c.length; W > B; B++)
(f = c[B]),
oe(
f,
f.isolateScope ? h : t,
g,
y,
f.require && p(f.directiveName, f.require, g, v),
m
);
var V = t;
for (
j && (j.template || null === j.templateUrl) && (V = h),
e && e(V, i.childNodes, n, s),
B = l.length - 1;
B >= 0;
B--
)
(f = l[B]),
oe(
f,
f.isolateScope ? h : t,
g,
y,
f.require && p(f.directiveName, f.require, g, v),
m
);
}
f = f || {};
for (
var v,
g,
y,
b,
E,
C = -Number.MAX_VALUE,
k = f.newScopeDirective,
O = f.controllerDirectives,
j = f.newIsolateScopeDirective,
T = f.templateDirective,
V = f.nonTlbTranscludeDirective,
P = !1,
I = !1,
D = f.hasElementTranscludeDirective,
q = (o.$$element = Nr(r)),
_ = u,
H = a,
B = 0,
W = e.length;
W > B;
B++
) {
v = e[B];
var G = v.$$start,
K = v.$$end;
if ((G && (q = F(r, G, K)), (y = n), C > v.priority)) break;
if (
((E = v.scope) &&
(v.templateUrl ||
(w(E)
? (Z("new/isolated scope", j || k, v, q), (j = v))
: Z("new/isolated scope", j, v, q)),
(k = k || v)),
(g = v.name),
!v.templateUrl &&
v.controller &&
((E = v.controller),
(O = O || ve()),
Z("'" + g + "' controller", O[g], v, q),
(O[g] = v)),
(E = v.transclude) &&
((P = !0),
v.$$tlb || (Z("transclusion", V, v, q), (V = v)),
"element" == E
? ((D = !0),
(C = v.priority),
(y = q),
(q = o.$$element =
Nr(t.createComment(" " + g + ": " + o[g] + " "))),
(r = q[0]),
re(s, L(y), r),
(H = N(y, a, C, _ && _.name, {
nonTlbTranscludeDirective: V,
})))
: ((y = Nr(je(r)).contents()),
q.empty(),
(H = N(y, a, n, n, {
needsNewScope: v.$$isolateScope || v.$$newScope,
})))),
v.template)
)
if (
((I = !0),
Z("template", T, v, q),
(T = v),
(E = A(v.template) ? v.template(q, o) : v.template),
(E = he(E)),
v.replace)
) {
if (
((_ = v),
(y = Se(E) ? [] : dt(ee(v.templateNamespace, Wr(E)))),
(r = y[0]),
1 != y.length || r.nodeType !== ei)
)
throw Fi(
"tplrt",
"Template for directive '{0}' must have exactly one root element. {1}",
g,
""
);
re(s, q, r);
var Q = { $attr: {} },
te = R(r, [], Q),
ne = e.splice(B + 1, e.length - (B + 1));
(j || k) && z(te, j, k),
(e = e.concat(te).concat(ne)),
J(o, Q),
(W = e.length);
} else q.html(E);
if (v.templateUrl)
(I = !0),
Z("template", T, v, q),
(T = v),
v.replace && (_ = v),
($ = Y(e.splice(B, e.length - B), q, o, s, P && H, c, l, {
controllerDirectives: O,
newScopeDirective: k !== v && k,
newIsolateScopeDirective: j,
templateDirective: T,
nonTlbTranscludeDirective: V,
})),
(W = e.length);
else if (v.compile)
try {
(b = v.compile(q, o, H)),
A(b) ? h(null, b, G, K) : b && h(b.pre, b.post, G, K);
} catch (ue) {
i(ue, X(q));
}
v.terminal && (($.terminal = !0), (C = Math.max(C, v.priority)));
}
return (
($.scope = k && k.scope === !0),
($.transcludeOnThisElement = P),
($.templateOnThisElement = I),
($.transclude = H),
(f.hasElementTranscludeDirective = D),
$
);
}
function z(e, t, n) {
for (var r = 0, i = e.length; i > r; r++)
e[r] = d(e[r], { $$isolateScope: t, $$newScope: n });
}
function W(t, n, r, o, s, u, f) {
if (n === s) return null;
var h = null;
if (c.hasOwnProperty(n))
for (var p, $ = e.get(n + l), v = 0, m = $.length; m > v; v++)
try {
if (
((p = $[v]),
(y(o) || o > p.priority) && -1 != p.restrict.indexOf(r))
) {
if (
(u && (p = d(p, { $$start: u, $$end: f })), !p.$$bindings)
) {
var g = (p.$$bindings = a(p, p.name));
w(g.isolateScope) &&
(p.$$isolateBindings = g.isolateScope);
}
t.push(p), (h = p);
}
} catch (b) {
i(b);
}
return h;
}
function G(t) {
if (c.hasOwnProperty(t))
for (var n, r = e.get(t + l), i = 0, o = r.length; o > i; i++)
if (((n = r[i]), n.multiElement)) return !0;
return !1;
}
function J(e, t) {
var n = t.$attr,
r = e.$attr,
i = e.$$element;
o(e, function (r, i) {
"$" != i.charAt(0) &&
(t[i] &&
t[i] !== r &&
(r += ("style" === i ? ";" : " ") + t[i]),
e.$set(i, r, !0, n[i]));
}),
o(t, function (t, o) {
"class" == o
? (T(i, t),
(e["class"] = (e["class"] ? e["class"] + " " : "") + t))
: "style" == o
? (i.attr("style", i.attr("style") + ";" + t),
(e.style = (e.style ? e.style + ";" : "") + t))
: "$" == o.charAt(0) ||
e.hasOwnProperty(o) ||
((e[o] = t), (r[o] = n[o]));
});
}
function Y(e, t, n, r, i, a, u, c) {
var l,
f,
h = [],
p = t[0],
$ = e.shift(),
v = d($, {
templateUrl: null,
transclude: null,
replace: null,
$$originalDirective: $,
}),
m = A($.templateUrl) ? $.templateUrl(t, n) : $.templateUrl,
g = $.templateNamespace;
return (
t.empty(),
s(m).then(function (s) {
var d, y, b, x;
if (((s = he(s)), $.replace)) {
if (
((b = Se(s) ? [] : dt(ee(g, Wr(s)))),
(d = b[0]),
1 != b.length || d.nodeType !== ei)
)
throw Fi(
"tplrt",
"Template for directive '{0}' must have exactly one root element. {1}",
$.name,
m
);
(y = { $attr: {} }), re(r, t, d);
var S = R(d, [], y);
w($.scope) && z(S, !0), (e = S.concat(e)), J(n, y);
} else (d = p), t.html(s);
for (
e.unshift(v),
l = B(e, d, n, i, t, $, a, u, c),
o(r, function (e, n) {
e == d && (r[n] = t[0]);
}),
f = I(t[0].childNodes, i);
h.length;
) {
var E = h.shift(),
C = h.shift(),
A = h.shift(),
k = h.shift(),
O = t[0];
if (!E.$$destroyed) {
if (C !== p) {
var M = C.className;
(c.hasElementTranscludeDirective && $.replace) ||
(O = je(d)),
re(A, Nr(C), O),
T(Nr(O), M);
}
(x = l.transcludeOnThisElement ? D(E, l.transclude, k) : k),
l(f, E, O, r, x);
}
}
h = null;
}),
function (e, t, n, r, i) {
var o = i;
t.$$destroyed ||
(h
? h.push(t, n, r, o)
: (l.transcludeOnThisElement && (o = D(t, l.transclude, i)),
l(f, t, n, r, o)));
}
);
}
function K(e, t) {
var n = t.priority - e.priority;
return 0 !== n
? n
: e.name !== t.name
? e.name < t.name
? -1
: 1
: e.index - t.index;
}
function Z(e, t, n, r) {
function i(e) {
return e ? " (module: " + e + ")" : "";
}
if (t)
throw Fi(
"multidir",
"Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",
t.name,
i(t.$$moduleName),
n.name,
i(n.$$moduleName),
e,
X(r)
);
}
function Q(e, t) {
var n = r(t, !0);
n &&
e.push({
priority: 0,
compile: function (e) {
var t = e.parent(),
r = !!t.length;
return (
r && N.$$addBindingClass(t),
function (e, t) {
var i = t.parent();
r || N.$$addBindingClass(i),
N.$$addBindingInfo(i, n.expressions),
e.$watch(n, function (e) {
t[0].nodeValue = e;
});
}
);
},
});
}
function ee(e, n) {
switch ((e = Ar(e || "html"))) {
case "svg":
case "math":
var r = t.createElement("div");
return (
(r.innerHTML = "<" + e + ">" + n + "</" + e + ">"),
r.childNodes[0].childNodes
);
default:
return n;
}
}
function te(e, t) {
if ("srcdoc" == t) return C.HTML;
var n = q(e);
return "xlinkHref" == t ||
("form" == n && "action" == t) ||
("img" != n && ("src" == t || "ngSrc" == t))
? C.RESOURCE_URL
: void 0;
}
function ne(e, t, n, i, o) {
var a = te(e, i);
o = g[i] || o;
var s = r(n, !0, a, o);
if (s) {
if ("multiple" === i && "select" === q(e))
throw Fi(
"selmulti",
"Binding to the 'multiple' attribute is not supported. Element: {0}",
X(e)
);
t.push({
priority: 100,
compile: function () {
return {
pre: function (e, t, u) {
var c = u.$$observers || (u.$$observers = ve());
if (E.test(i))
throw Fi(
"nodomevents",
"Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead."
);
var l = u[i];
l !== n && ((s = l && r(l, !0, a, o)), (n = l)),
s &&
((u[i] = s(e)),
((c[i] || (c[i] = [])).$$inter = !0),
(
(u.$$observers && u.$$observers[i].$$scope) ||
e
).$watch(s, function (e, t) {
"class" === i && e != t
? u.$updateClass(e, t)
: u.$set(i, e);
}));
},
};
},
});
}
}
function re(e, n, r) {
var i,
o,
a = n[0],
s = n.length,
u = a.parentNode;
if (e)
for (i = 0, o = e.length; o > i; i++)
if (e[i] == a) {
e[i++] = r;
for (var c = i, l = c + s - 1, f = e.length; f > c; c++, l++)
f > l ? (e[c] = e[l]) : delete e[c];
(e.length -= s - 1), e.context === a && (e.context = r);
break;
}
u && u.replaceChild(r, a);
var h = t.createDocumentFragment();
h.appendChild(a),
Nr.hasData(a) &&
(Nr.data(r, Nr.data(a)),
Vr
? ((Br = !0), Vr.cleanData([a]))
: delete Nr.cache[a[Nr.expando]]);
for (var p = 1, d = n.length; d > p; p++) {
var $ = n[p];
Nr($).remove(), h.appendChild($), delete n[p];
}
(n[0] = r), (n.length = 1);
}
function ie(e, t) {
return f(
function () {
return e.apply(null, arguments);
},
e,
t
);
}
function oe(e, t, n, r, o, a) {
try {
e(t, n, r, o, a);
} catch (s) {
i(s, X(n));
}
}
function ae(e, t, n, i, a) {
var s = [];
return (
o(i, function (i, o) {
var c,
l,
f,
h,
p = i.attrName,
d = i.optional,
v = i.mode;
switch (v) {
case "@":
d || kr.call(t, p) || (n[o] = t[p] = void 0),
t.$observe(p, function (e) {
S(e) && (n[o] = e);
}),
(t.$$observers[p].$$scope = e),
(c = t[p]),
S(c) ? (n[o] = r(c)(e)) : V(c) && (n[o] = c);
break;
case "=":
if (!kr.call(t, p)) {
if (d) break;
t[p] = void 0;
}
if (d && !t[p]) break;
(l = u(t[p])),
(h = l.literal
? H
: function (e, t) {
return e === t || (e !== e && t !== t);
}),
(f =
l.assign ||
function () {
throw (
((c = n[o] = l(e)),
Fi(
"nonassign",
"Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",
t[p],
p,
a.name
))
);
}),
(c = n[o] = l(e));
var m = function (t) {
return (
h(t, n[o]) || (h(t, c) ? f(e, (t = n[o])) : (n[o] = t)),
(c = t)
);
};
m.$stateful = !0;
var g;
(g = i.collection
? e.$watchCollection(t[p], m)
: e.$watch(u(t[p], m), null, l.literal)),
s.push(g);
break;
case "&":
if (((l = t.hasOwnProperty(p) ? u(t[p]) : $), l === $ && d))
break;
n[o] = function (t) {
return l(e, t);
};
}
}),
s.length &&
function () {
for (var e = 0, t = s.length; t > e; ++e) s[e]();
}
);
}
var se = function (e, t) {
if (t) {
var n,
r,
i,
o = Object.keys(t);
for (n = 0, r = o.length; r > n; n++)
(i = o[n]), (this[i] = t[i]);
} else this.$attr = {};
this.$$element = e;
};
se.prototype = {
$normalize: ht,
$addClass: function (e) {
e && e.length > 0 && O.addClass(this.$$element, e);
},
$removeClass: function (e) {
e && e.length > 0 && O.removeClass(this.$$element, e);
},
$updateClass: function (e, t) {
var n = pt(e, t);
n && n.length && O.addClass(this.$$element, n);
var r = pt(t, e);
r && r.length && O.removeClass(this.$$element, r);
},
$set: function (e, t, n, r) {
var a,
s = this.$$element[0],
u = ze(s, e),
c = We(e),
l = e;
if (
(u
? (this.$$element.prop(e, t), (r = u))
: c && ((this[c] = t), (l = c)),
(this[e] = t),
r
? (this.$attr[e] = r)
: ((r = this.$attr[e]),
r || (this.$attr[e] = r = ce(e, "-"))),
(a = q(this.$$element)),
("a" === a && "href" === e) || ("img" === a && "src" === e))
)
this[e] = t = j(t, "src" === e);
else if ("img" === a && "srcset" === e) {
for (
var f = "",
h = Wr(t),
p = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,
d = /\s/.test(h) ? p : /(,)/,
$ = h.split(d),
v = Math.floor($.length / 2),
m = 0;
v > m;
m++
) {
var g = 2 * m;
(f += j(Wr($[g]), !0)), (f += " " + Wr($[g + 1]));
}
var b = Wr($[2 * m]).split(/\s/);
(f += j(Wr(b[0]), !0)),
2 === b.length && (f += " " + Wr(b[1])),
(this[e] = t = f);
}
n !== !1 &&
(null === t || y(t)
? this.$$element.removeAttr(r)
: this.$$element.attr(r, t));
var w = this.$$observers;
w &&
o(w[l], function (e) {
try {
e(t);
} catch (n) {
i(n);
}
});
},
$observe: function (e, t) {
var n = this,
r = n.$$observers || (n.$$observers = ve()),
i = r[e] || (r[e] = []);
return (
i.push(t),
b.$evalAsync(function () {
i.$$inter || !n.hasOwnProperty(e) || y(n[e]) || t(n[e]);
}),
function () {
_(i, t);
}
);
},
};
var ue = r.startSymbol(),
le = r.endSymbol(),
he =
"{{" == ue && "}}" == le
? v
: function (e) {
return e.replace(/\{\{/g, ue).replace(/}}/g, le);
},
pe = /^ngAttr[A-Z]/,
de = /^(.+)Start$/;
return (
(N.$$addBindingInfo = k
? function (e, t) {
var n = e.data("$binding") || [];
Lr(t) ? (n = n.concat(t)) : n.push(t), e.data("$binding", n);
}
: $),
(N.$$addBindingClass = k
? function (e) {
T(e, "ng-binding");
}
: $),
(N.$$addScopeInfo = k
? function (e, t, n, r) {
var i = n
? r
? "$isolateScopeNoTemplate"
: "$isolateScope"
: "$scope";
e.data(i, t);
}
: $),
(N.$$addScopeClass = k
? function (e, t) {
T(e, t ? "ng-isolate-scope" : "ng-scope");
}
: $),
N
);
},
]);
}
function ht(e) {
return xe(e.replace(Ui, ""));
}
function pt(e, t) {
var n = "",
r = e.split(/\s+/),
i = t.split(/\s+/);
e: for (var o = 0; o < r.length; o++) {
for (var a = r[o], s = 0; s < i.length; s++) if (a == i[s]) continue e;
n += (n.length > 0 ? " " : "") + a;
}
return n;
}
function dt(e) {
e = Nr(e);
var t = e.length;
if (1 >= t) return e;
for (; t--; ) {
var n = e[t];
n.nodeType === ri && Dr.call(e, t, 1);
}
return e;
}
function $t(e, t) {
if (t && S(t)) return t;
if (S(e)) {
var n = Bi.exec(e);
if (n) return n[3];
}
}
function vt() {
var e = {},
t = !1;
(this.register = function (t, n) {
pe(t, "controller"), w(t) ? f(e, t) : (e[t] = n);
}),
(this.allowGlobals = function () {
t = !0;
}),
(this.$get = [
"$injector",
"$window",
function (i, o) {
function a(e, t, n, i) {
if (!e || !w(e.$scope))
throw r("$controller")(
"noscp",
"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",
i,
t
);
e.$scope[t] = n;
}
return function (r, s, u, c) {
var l, h, p, d;
if (((u = u === !0), c && S(c) && (d = c), S(r))) {
if (((h = r.match(Bi)), !h))
throw Hi(
"ctrlfmt",
"Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",
r
);
(p = h[1]),
(d = d || h[3]),
(r = e.hasOwnProperty(p)
? e[p]
: de(s.$scope, p, !0) || (t ? de(o, p, !0) : n)),
he(r, p, !0);
}
if (u) {
var $ = (Lr(r) ? r[r.length - 1] : r).prototype;
(l = Object.create($ || null)), d && a(s, d, l, p || r.name);
var v;
return (v = f(
function () {
var e = i.invoke(r, l, s, p);
return (
e !== l &&
(w(e) || A(e)) &&
((l = e), d && a(s, d, l, p || r.name)),
l
);
},
{ instance: l, identifier: d }
));
}
return (
(l = i.instantiate(r, s, p)), d && a(s, d, l, p || r.name), l
);
};
},
]);
}
function mt() {
this.$get = [
"$window",
function (e) {
return Nr(e.document);
},
];
}
function gt() {
this.$get = [
"$log",
function (e) {
return function (t, n) {
e.error.apply(e, arguments);
};
},
];
}
function yt(e) {
return w(e) ? (C(e) ? e.toISOString() : G(e)) : e;
}
function bt() {
this.$get = function () {
return function (e) {
if (!e) return "";
var t = [];
return (
a(e, function (e, n) {
null === e ||
y(e) ||
(Lr(e)
? o(e, function (e, r) {
t.push(re(n) + "=" + re(yt(e)));
})
: t.push(re(n) + "=" + re(yt(e))));
}),
t.join("&")
);
};
};
}
function wt() {
this.$get = function () {
return function (e) {
function t(e, r, i) {
null === e ||
y(e) ||
(Lr(e)
? o(e, function (e, n) {
t(e, r + "[" + (w(e) ? n : "") + "]");
})
: w(e) && !C(e)
? a(e, function (e, n) {
t(e, r + (i ? "" : "[") + n + (i ? "" : "]"));
})
: n.push(re(r) + "=" + re(yt(e))));
}
if (!e) return "";
var n = [];
return t(e, "", !0), n.join("&");
};
};
}
function xt(e, t) {
if (S(e)) {
var n = e.replace(Yi, "").trim();
if (n) {
var r = t("Content-Type");
((r && 0 === r.indexOf(zi)) || St(n)) && (e = J(n));
}
}
return e;
}
function St(e) {
var t = e.match(Gi);
return t && Ji[t[0]].test(e);
}
function Et(e) {
function t(e, t) {
e && (r[e] = r[e] ? r[e] + ", " + t : t);
}
var n,
r = ve();
return (
S(e)
? o(e.split("\n"), function (e) {
(n = e.indexOf(":")),
t(Ar(Wr(e.substr(0, n))), Wr(e.substr(n + 1)));
})
: w(e) &&
o(e, function (e, n) {
t(Ar(n), Wr(e));
}),
r
);
}
function Ct(e) {
var t;
return function (n) {
if ((t || (t = Et(e)), n)) {
var r = t[Ar(n)];
return void 0 === r && (r = null), r;
}
return t;
};
}
function At(e, t, n, r) {
return A(r)
? r(e, t, n)
: (o(r, function (r) {
e = r(e, t, n);
}),
e);
}
function kt(e) {
return e >= 200 && 300 > e;
}
function Ot() {
var e = (this.defaults = {
transformResponse: [xt],
transformRequest: [
function (e) {
return !w(e) || j(e) || N(e) || T(e) ? e : G(e);
},
],
headers: {
common: { Accept: "application/json, text/plain, */*" },
post: U(Wi),
put: U(Wi),
patch: U(Wi),
},
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
paramSerializer: "$httpParamSerializer",
}),
t = !1;
this.useApplyAsync = function (e) {
return b(e) ? ((t = !!e), this) : t;
};
var i = !0;
this.useLegacyPromiseExtensions = function (e) {
return b(e) ? ((i = !!e), this) : i;
};
var a = (this.interceptors = []);
this.$get = [
"$httpBackend",
"$$cookieReader",
"$cacheFactory",
"$rootScope",
"$q",
"$injector",
function (s, u, c, l, h, p) {
function d(t) {
function a(e) {
var t = f({}, e);
return (
(t.data = At(e.data, e.headers, e.status, c.transformResponse)),
kt(e.status) ? t : h.reject(t)
);
}
function s(e, t) {
var n,
r = {};
return (
o(e, function (e, i) {
A(e) ? ((n = e(t)), null != n && (r[i] = n)) : (r[i] = e);
}),
r
);
}
function u(t) {
var n,
r,
i,
o = e.headers,
a = f({}, t.headers);
o = f({}, o.common, o[Ar(t.method)]);
e: for (n in o) {
r = Ar(n);
for (i in a) if (Ar(i) === r) continue e;
a[n] = o[n];
}
return s(a, U(t));
}
if (!Ur.isObject(t))
throw r("$http")(
"badreq",
"Http request configuration must be an object. Received: {0}",
t
);
if (!S(t.url))
throw r("$http")(
"badreq",
"Http request configuration url must be a string. Received: {0}",
t.url
);
var c = f(
{
method: "get",
transformRequest: e.transformRequest,
transformResponse: e.transformResponse,
paramSerializer: e.paramSerializer,
},
t
);
(c.headers = u(t)),
(c.method = Or(c.method)),
(c.paramSerializer = S(c.paramSerializer)
? p.get(c.paramSerializer)
: c.paramSerializer);
var l = function (t) {
var r = t.headers,
i = At(t.data, Ct(r), n, t.transformRequest);
return (
y(i) &&
o(r, function (e, t) {
"content-type" === Ar(t) && delete r[t];
}),
y(t.withCredentials) &&
!y(e.withCredentials) &&
(t.withCredentials = e.withCredentials),
m(t, i).then(a, a)
);
},
d = [l, n],
$ = h.when(c);
for (
o(E, function (e) {
(e.request || e.requestError) &&
d.unshift(e.request, e.requestError),
(e.response || e.responseError) &&
d.push(e.response, e.responseError);
});
d.length;
) {
var v = d.shift(),
g = d.shift();
$ = $.then(v, g);
}
return (
i
? (($.success = function (e) {
return (
he(e, "fn"),
$.then(function (t) {
e(t.data, t.status, t.headers, c);
}),
$
);
}),
($.error = function (e) {
return (
he(e, "fn"),
$.then(null, function (t) {
e(t.data, t.status, t.headers, c);
}),
$
);
}))
: (($.success = Zi("success")), ($.error = Zi("error"))),
$
);
}
function $(e) {
o(arguments, function (e) {
d[e] = function (t, n) {
return d(f({}, n || {}, { method: e, url: t }));
};
});
}
function v(e) {
o(arguments, function (e) {
d[e] = function (t, n, r) {
return d(f({}, r || {}, { method: e, url: t, data: n }));
};
});
}
function m(r, i) {
function o(e, n, r, i) {
function o() {
a(n, e, r, i);
}
p && (kt(e) ? p.put(E, [e, n, Et(r), i]) : p.remove(E)),
t ? l.$applyAsync(o) : (o(), l.$$phase || l.$apply());
}
function a(e, t, n, i) {
(t = t >= -1 ? t : 0),
(kt(t) ? v.resolve : v.reject)({
data: e,
status: t,
headers: Ct(n),
config: r,
statusText: i,
});
}
function c(e) {
a(e.data, e.status, U(e.headers()), e.statusText);
}
function f() {
var e = d.pendingRequests.indexOf(r);
-1 !== e && d.pendingRequests.splice(e, 1);
}
var p,
$,
v = h.defer(),
m = v.promise,
S = r.headers,
E = g(r.url, r.paramSerializer(r.params));
if (
(d.pendingRequests.push(r),
m.then(f, f),
(!r.cache && !e.cache) ||
r.cache === !1 ||
("GET" !== r.method && "JSONP" !== r.method) ||
(p = w(r.cache) ? r.cache : w(e.cache) ? e.cache : x),
p &&
(($ = p.get(E)),
b($)
? P($)
? $.then(c, c)
: Lr($)
? a($[1], $[0], U($[2]), $[3])
: a($, 200, {}, "OK")
: p.put(E, m)),
y($))
) {
var C = jn(r.url) ? u()[r.xsrfCookieName || e.xsrfCookieName] : n;
C && (S[r.xsrfHeaderName || e.xsrfHeaderName] = C),
s(
r.method,
E,
i,
o,
S,
r.timeout,
r.withCredentials,
r.responseType
);
}
return m;
}
function g(e, t) {
return (
t.length > 0 && (e += (-1 == e.indexOf("?") ? "?" : "&") + t), e
);
}
var x = c("$http");
e.paramSerializer = S(e.paramSerializer)
? p.get(e.paramSerializer)
: e.paramSerializer;
var E = [];
return (
o(a, function (e) {
E.unshift(S(e) ? p.get(e) : p.invoke(e));
}),
(d.pendingRequests = []),
$("get", "delete", "head", "jsonp"),
v("post", "put", "patch"),
(d.defaults = e),
d
);
},
];
}
function Mt() {
this.$get = function () {
return function () {
return new e.XMLHttpRequest();
};
};
}
function jt() {
this.$get = [
"$browser",
"$window",
"$document",
"$xhrFactory",
function (e, t, n, r) {
return Tt(e, r, e.defer, t.angular.callbacks, n[0]);
},
];
}
function Tt(e, t, n, r, i) {
function a(e, t, n) {
var o = i.createElement("script"),
a = null;
return (
(o.type = "text/javascript"),
(o.src = e),
(o.async = !0),
(a = function (e) {
li(o, "load", a),
li(o, "error", a),
i.body.removeChild(o),
(o = null);
var s = -1,
u = "unknown";
e &&
("load" !== e.type || r[t].called || (e = { type: "error" }),
(u = e.type),
(s = "error" === e.type ? 404 : 200)),
n && n(s, u);
}),
ci(o, "load", a),
ci(o, "error", a),
i.body.appendChild(o),
a
);
}
return function (i, s, u, c, l, f, h, p) {
function d() {
g && g(), w && w.abort();
}
function v(t, r, i, o, a) {
b(E) && n.cancel(E),
(g = w = null),
t(r, i, o, a),
e.$$completeOutstandingRequest($);
}
if (
(e.$$incOutstandingRequestCount(), (s = s || e.url()), "jsonp" == Ar(i))
) {
var m = "_" + (r.counter++).toString(36);
r[m] = function (e) {
(r[m].data = e), (r[m].called = !0);
};
var g = a(
s.replace("JSON_CALLBACK", "angular.callbacks." + m),
m,
function (e, t) {
v(c, e, r[m].data, "", t), (r[m] = $);
}
);
} else {
var w = t(i, s);
w.open(i, s, !0),
o(l, function (e, t) {
b(e) && w.setRequestHeader(t, e);
}),
(w.onload = function () {
var e = w.statusText || "",
t = "response" in w ? w.response : w.responseText,
n = 1223 === w.status ? 204 : w.status;
0 === n && (n = t ? 200 : "file" == Mn(s).protocol ? 404 : 0),
v(c, n, t, w.getAllResponseHeaders(), e);
});
var x = function () {
v(c, -1, null, null, "");
};
if (
((w.onerror = x), (w.onabort = x), h && (w.withCredentials = !0), p)
)
try {
w.responseType = p;
} catch (S) {
if ("json" !== p) throw S;
}
w.send(y(u) ? null : u);
}
if (f > 0) var E = n(d, f);
else P(f) && f.then(d);
};
}
function Nt() {
var e = "{{",
t = "}}";
(this.startSymbol = function (t) {
return t ? ((e = t), this) : e;
}),
(this.endSymbol = function (e) {
return e ? ((t = e), this) : t;
}),
(this.$get = [
"$parse",
"$exceptionHandler",
"$sce",
function (n, r, i) {
function o(e) {
return "\\\\\\" + e;
}
function a(n) {
return n.replace(h, e).replace(p, t);
}
function s(e) {
if (null == e) return "";
switch (typeof e) {
case "string":
break;
case "number":
e = "" + e;
break;
default:
e = G(e);
}
return e;
}
function u(o, u, h, p) {
function d(e) {
try {
return (e = O(e)), p && !b(e) ? e : s(e);
} catch (t) {
r(Xi.interr(o, t));
}
}
p = !!p;
for (
var $, v, m, g = 0, w = [], x = [], S = o.length, E = [], C = [];
S > g;
) {
if (
-1 == ($ = o.indexOf(e, g)) ||
-1 == (v = o.indexOf(t, $ + c))
) {
g !== S && E.push(a(o.substring(g)));
break;
}
g !== $ && E.push(a(o.substring(g, $))),
(m = o.substring($ + c, v)),
w.push(m),
x.push(n(m, d)),
(g = v + l),
C.push(E.length),
E.push("");
}
if ((h && E.length > 1 && Xi.throwNoconcat(o), !u || w.length)) {
var k = function (e) {
for (var t = 0, n = w.length; n > t; t++) {
if (p && y(e[t])) return;
E[C[t]] = e[t];
}
return E.join("");
},
O = function (e) {
return h ? i.getTrusted(h, e) : i.valueOf(e);
};
return f(
function (e) {
var t = 0,
n = w.length,
i = new Array(n);
try {
for (; n > t; t++) i[t] = x[t](e);
return k(i);
} catch (a) {
r(Xi.interr(o, a));
}
},
{
exp: o,
expressions: w,
$$watchDelegate: function (e, t) {
var n;
return e.$watchGroup(x, function (r, i) {
var o = k(r);
A(t) && t.call(this, o, r !== i ? n : o, e), (n = o);
});
},
}
);
}
}
var c = e.length,
l = t.length,
h = new RegExp(e.replace(/./g, o), "g"),
p = new RegExp(t.replace(/./g, o), "g");
return (
(u.startSymbol = function () {
return e;
}),
(u.endSymbol = function () {
return t;
}),
u
);
},
]);
}
function Vt() {
this.$get = [
"$rootScope",
"$window",
"$q",
"$$q",
function (e, t, n, r) {
function i(i, a, s, u) {
var c = arguments.length > 4,
l = c ? L(arguments, 4) : [],
f = t.setInterval,
h = t.clearInterval,
p = 0,
d = b(u) && !u,
$ = (d ? r : n).defer(),
v = $.promise;
return (
(s = b(s) ? s : 0),
v.then(
null,
null,
c
? function () {
i.apply(null, l);
}
: i
),
(v.$$intervalId = f(function () {
$.notify(p++),
s > 0 &&
p >= s &&
($.resolve(p), h(v.$$intervalId), delete o[v.$$intervalId]),
d || e.$apply();
}, a)),
(o[v.$$intervalId] = $),
v
);
}
var o = {};
return (
(i.cancel = function (e) {
return e && e.$$intervalId in o
? (o[e.$$intervalId].reject("canceled"),
t.clearInterval(e.$$intervalId),
delete o[e.$$intervalId],
!0)
: !1;
}),
i
);
},
];
}
function Pt(e) {
for (var t = e.split("/"), n = t.length; n--; ) t[n] = ne(t[n]);
return t.join("/");
}
function It(e, t) {
var n = Mn(e);
(t.$$protocol = n.protocol),
(t.$$host = n.hostname),
(t.$$port = p(n.port) || eo[n.protocol] || null);
}
function Dt(e, t) {
var n = "/" !== e.charAt(0);
n && (e = "/" + e);
var r = Mn(e);
(t.$$path = decodeURIComponent(
n && "/" === r.pathname.charAt(0) ? r.pathname.substring(1) : r.pathname
)),
(t.$$search = ee(r.search)),
(t.$$hash = decodeURIComponent(r.hash)),
t.$$path && "/" != t.$$path.charAt(0) && (t.$$path = "/" + t.$$path);
}
function Rt(e, t) {
return 0 === t.indexOf(e) ? t.substr(e.length) : void 0;
}
function qt(e) {
var t = e.indexOf("#");
return -1 == t ? e : e.substr(0, t);
}
function _t(e) {
return e.replace(/(#.+)|#$/, "$1");
}
function Ft(e) {
return e.substr(0, qt(e).lastIndexOf("/") + 1);
}
function Ut(e) {
return e.substring(0, e.indexOf("/", e.indexOf("//") + 2));
}
function Ht(e, t, n) {
(this.$$html5 = !0),
(n = n || ""),
It(e, this),
(this.$$parse = function (e) {
var n = Rt(t, e);
if (!S(n))
throw to(
"ipthprfx",
'Invalid url "{0}", missing path prefix "{1}".',
e,
t
);
Dt(n, this), this.$$path || (this.$$path = "/"), this.$$compose();
}),
(this.$$compose = function () {
var e = te(this.$$search),
n = this.$$hash ? "#" + ne(this.$$hash) : "";
(this.$$url = Pt(this.$$path) + (e ? "?" + e : "") + n),
(this.$$absUrl = t + this.$$url.substr(1));
}),
(this.$$parseLinkUrl = function (r, i) {
if (i && "#" === i[0]) return this.hash(i.slice(1)), !0;
var o, a, s;
return (
b((o = Rt(e, r)))
? ((a = o), (s = b((o = Rt(n, o))) ? t + (Rt("/", o) || o) : e + a))
: b((o = Rt(t, r)))
? (s = t + o)
: t == r + "/" && (s = t),
s && this.$$parse(s),
!!s
);
});
}
function Bt(e, t, n) {
It(e, this),
(this.$$parse = function (r) {
function i(e, t, n) {
var r,
i = /^\/[A-Z]:(\/.*)/;
return (
0 === t.indexOf(n) && (t = t.replace(n, "")),
i.exec(t) ? e : ((r = i.exec(e)), r ? r[1] : e)
);
}
var o,
a = Rt(e, r) || Rt(t, r);
y(a) || "#" !== a.charAt(0)
? this.$$html5
? (o = a)
: ((o = ""), y(a) && ((e = r), this.replace()))
: ((o = Rt(n, a)), y(o) && (o = a)),
Dt(o, this),
(this.$$path = i(this.$$path, o, e)),
this.$$compose();
}),
(this.$$compose = function () {
var t = te(this.$$search),
r = this.$$hash ? "#" + ne(this.$$hash) : "";
(this.$$url = Pt(this.$$path) + (t ? "?" + t : "") + r),
(this.$$absUrl = e + (this.$$url ? n + this.$$url : ""));
}),
(this.$$parseLinkUrl = function (t, n) {
return qt(e) == qt(t) ? (this.$$parse(t), !0) : !1;
});
}
function Lt(e, t, n) {
(this.$$html5 = !0),
Bt.apply(this, arguments),
(this.$$parseLinkUrl = function (r, i) {
if (i && "#" === i[0]) return this.hash(i.slice(1)), !0;
var o, a;
return (
e == qt(r)
? (o = r)
: (a = Rt(t, r))
? (o = e + n + a)
: t === r + "/" && (o = t),
o && this.$$parse(o),
!!o
);
}),
(this.$$compose = function () {
var t = te(this.$$search),
r = this.$$hash ? "#" + ne(this.$$hash) : "";
(this.$$url = Pt(this.$$path) + (t ? "?" + t : "") + r),
(this.$$absUrl = e + n + this.$$url);
});
}
function zt(e) {
return function () {
return this[e];
};
}
function Wt(e, t) {
return function (n) {
return y(n) ? this[e] : ((this[e] = t(n)), this.$$compose(), this);
};
}
function Gt() {
var e = "",
t = { enabled: !1, requireBase: !0, rewriteLinks: !0 };
(this.hashPrefix = function (t) {
return b(t) ? ((e = t), this) : e;
}),
(this.html5Mode = function (e) {
return V(e)
? ((t.enabled = e), this)
: w(e)
? (V(e.enabled) && (t.enabled = e.enabled),
V(e.requireBase) && (t.requireBase = e.requireBase),
V(e.rewriteLinks) && (t.rewriteLinks = e.rewriteLinks),
this)
: t;
}),
(this.$get = [
"$rootScope",
"$browser",
"$sniffer",
"$rootElement",
"$window",
function (n, r, i, o, a) {
function s(e, t, n) {
var i = c.url(),
o = c.$$state;
try {
r.url(e, t, n), (c.$$state = r.state());
} catch (a) {
throw (c.url(i), (c.$$state = o), a);
}
}
function u(e, t) {
n.$broadcast("$locationChangeSuccess", c.absUrl(), e, c.$$state, t);
}
var c,
l,
f,
h = r.baseHref(),
p = r.url();
if (t.enabled) {
if (!h && t.requireBase)
throw to(
"nobase",
"$location in HTML5 mode requires a <base> tag to be present!"
);
(f = Ut(p) + (h || "/")), (l = i.history ? Ht : Lt);
} else (f = qt(p)), (l = Bt);
var d = Ft(f);
(c = new l(f, d, "#" + e)),
c.$$parseLinkUrl(p, p),
(c.$$state = r.state());
var $ = /^\s*(javascript|mailto):/i;
o.on("click", function (e) {
if (
t.rewriteLinks &&
!e.ctrlKey &&
!e.metaKey &&
!e.shiftKey &&
2 != e.which &&
2 != e.button
) {
for (var i = Nr(e.target); "a" !== q(i[0]); )
if (i[0] === o[0] || !(i = i.parent())[0]) return;
var s = i.prop("href"),
u = i.attr("href") || i.attr("xlink:href");
w(s) &&
"[object SVGAnimatedString]" === s.toString() &&
(s = Mn(s.animVal).href),
$.test(s) ||
!s ||
i.attr("target") ||
e.isDefaultPrevented() ||
(c.$$parseLinkUrl(s, u) &&
(e.preventDefault(),
c.absUrl() != r.url() &&
(n.$apply(),
(a.angular["ff-684208-preventDefault"] = !0))));
}
}),
_t(c.absUrl()) != _t(p) && r.url(c.absUrl(), !0);
var v = !0;
return (
r.onUrlChange(function (e, t) {
return y(Rt(d, e))
? void (a.location.href = e)
: (n.$evalAsync(function () {
var r,
i = c.absUrl(),
o = c.$$state;
(e = _t(e)),
c.$$parse(e),
(c.$$state = t),
(r = n.$broadcast(
"$locationChangeStart",
e,
i,
t,
o
).defaultPrevented),
c.absUrl() === e &&
(r
? (c.$$parse(i), (c.$$state = o), s(i, !1, o))
: ((v = !1), u(i, o)));
}),
void (n.$$phase || n.$digest()));
}),
n.$watch(function () {
var e = _t(r.url()),
t = _t(c.absUrl()),
o = r.state(),
a = c.$$replace,
l = e !== t || (c.$$html5 && i.history && o !== c.$$state);
(v || l) &&
((v = !1),
n.$evalAsync(function () {
var t = c.absUrl(),
r = n.$broadcast(
"$locationChangeStart",
t,
e,
c.$$state,
o
).defaultPrevented;
c.absUrl() === t &&
(r
? (c.$$parse(e), (c.$$state = o))
: (l && s(t, a, o === c.$$state ? null : c.$$state),
u(e, o)));
})),
(c.$$replace = !1);
}),
c
);
},
]);
}
function Jt() {
var e = !0,
t = this;
(this.debugEnabled = function (t) {
return b(t) ? ((e = t), this) : e;
}),
(this.$get = [
"$window",
function (n) {
function r(e) {
return (
e instanceof Error &&
(e.stack
? (e =
e.message && -1 === e.stack.indexOf(e.message)
? "Error: " + e.message + "\n" + e.stack
: e.stack)
: e.sourceURL &&
(e = e.message + "\n" + e.sourceURL + ":" + e.line)),
e
);
}
function i(e) {
var t = n.console || {},
i = t[e] || t.log || $,
a = !1;
try {
a = !!i.apply;
} catch (s) {}
return a
? function () {
var e = [];
return (
o(arguments, function (t) {
e.push(r(t));
}),
i.apply(t, e)
);
}
: function (e, t) {
i(e, null == t ? "" : t);
};
}
return {
log: i("log"),
info: i("info"),
warn: i("warn"),
error: i("error"),
debug: (function () {
var n = i("debug");
return function () {
e && n.apply(t, arguments);
};
})(),
};
},
]);
}
function Yt(e, t) {
if (
"__defineGetter__" === e ||
"__defineSetter__" === e ||
"__lookupGetter__" === e ||
"__lookupSetter__" === e ||
"__proto__" === e
)
throw ro(
"isecfld",
"Attempting to access a disallowed field in Angular expressions! Expression: {0}",
t
);
return e;
}
function Kt(e, t) {
if (((e += ""), !S(e)))
throw ro(
"iseccst",
"Cannot convert object to primitive value! Expression: {0}",
t
);
return e;
}
function Zt(e, t) {
if (e) {
if (e.constructor === e)
throw ro(
"isecfn",
"Referencing Function in Angular expressions is disallowed! Expression: {0}",
t
);
if (e.window === e)
throw ro(
"isecwindow",
"Referencing the Window in Angular expressions is disallowed! Expression: {0}",
t
);
if (e.children && (e.nodeName || (e.prop && e.attr && e.find)))
throw ro(
"isecdom",
"Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",
t
);
if (e === Object)
throw ro(
"isecobj",
"Referencing Object in Angular expressions is disallowed! Expression: {0}",
t
);
}
return e;
}
function Xt(e, t) {
if (e) {
if (e.constructor === e)
throw ro(
"isecfn",
"Referencing Function in Angular expressions is disallowed! Expression: {0}",
t
);
if (e === io || e === oo || e === ao)
throw ro(
"isecff",
"Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",
t
);
}
}
function Qt(e, t) {
if (
e &&
(e === (0).constructor ||
e === (!1).constructor ||
e === "".constructor ||
e === {}.constructor ||
e === [].constructor ||
e === Function.constructor)
)
throw ro(
"isecaf",
"Assigning to a constructor is disallowed! Expression: {0}",
t
);
}
function en(e, t) {
return "undefined" != typeof e ? e : t;
}
function tn(e, t) {
return "undefined" == typeof e ? t : "undefined" == typeof t ? e : e + t;
}
function nn(e, t) {
var n = e(t);
return !n.$stateful;
}
function rn(e, t) {
var n, r;
switch (e.type) {
case lo.Program:
(n = !0),
o(e.body, function (e) {
rn(e.expression, t), (n = n && e.expression.constant);
}),
(e.constant = n);
break;
case lo.Literal:
(e.constant = !0), (e.toWatch = []);
break;
case lo.UnaryExpression:
rn(e.argument, t),
(e.constant = e.argument.constant),
(e.toWatch = e.argument.toWatch);
break;
case lo.BinaryExpression:
rn(e.left, t),
rn(e.right, t),
(e.constant = e.left.constant && e.right.constant),
(e.toWatch = e.left.toWatch.concat(e.right.toWatch));
break;
case lo.LogicalExpression:
rn(e.left, t),
rn(e.right, t),
(e.constant = e.left.constant && e.right.constant),
(e.toWatch = e.constant ? [] : [e]);
break;
case lo.ConditionalExpression:
rn(e.test, t),
rn(e.alternate, t),
rn(e.consequent, t),
(e.constant =
e.test.constant && e.alternate.constant && e.consequent.constant),
(e.toWatch = e.constant ? [] : [e]);
break;
case lo.Identifier:
(e.constant = !1), (e.toWatch = [e]);
break;
case lo.MemberExpression:
rn(e.object, t),
e.computed && rn(e.property, t),
(e.constant =
e.object.constant && (!e.computed || e.property.constant)),
(e.toWatch = [e]);
break;
case lo.CallExpression:
(n = e.filter ? nn(t, e.callee.name) : !1),
(r = []),
o(e.arguments, function (e) {
rn(e, t),
(n = n && e.constant),
e.constant || r.push.apply(r, e.toWatch);
}),
(e.constant = n),
(e.toWatch = e.filter && nn(t, e.callee.name) ? r : [e]);
break;
case lo.AssignmentExpression:
rn(e.left, t),
rn(e.right, t),
(e.constant = e.left.constant && e.right.constant),
(e.toWatch = [e]);
break;
case lo.ArrayExpression:
(n = !0),
(r = []),
o(e.elements, function (e) {
rn(e, t),
(n = n && e.constant),
e.constant || r.push.apply(r, e.toWatch);
}),
(e.constant = n),
(e.toWatch = r);
break;
case lo.ObjectExpression:
(n = !0),
(r = []),
o(e.properties, function (e) {
rn(e.value, t),
(n = n && e.value.constant),
e.value.constant || r.push.apply(r, e.value.toWatch);
}),
(e.constant = n),
(e.toWatch = r);
break;
case lo.ThisExpression:
(e.constant = !1), (e.toWatch = []);
}
}
function on(e) {
if (1 == e.length) {
var t = e[0].expression,
r = t.toWatch;
return 1 !== r.length ? r : r[0] !== t ? r : n;
}
}
function an(e) {
return e.type === lo.Identifier || e.type === lo.MemberExpression;
}
function sn(e) {
return 1 === e.body.length && an(e.body[0].expression)
? {
type: lo.AssignmentExpression,
left: e.body[0].expression,
right: { type: lo.NGValueParameter },
operator: "=",
}
: void 0;
}
function un(e) {
return (
0 === e.body.length ||
(1 === e.body.length &&
(e.body[0].expression.type === lo.Literal ||
e.body[0].expression.type === lo.ArrayExpression ||
e.body[0].expression.type === lo.ObjectExpression))
);
}
function cn(e) {
return e.constant;
}
function ln(e, t) {
(this.astBuilder = e), (this.$filter = t);
}
function fn(e, t) {
(this.astBuilder = e), (this.$filter = t);
}
function hn(e) {
return "constructor" == e;
}
function pn(e) {
return A(e.valueOf) ? e.valueOf() : ho.call(e);
}
function dn() {
var e = ve(),
t = ve();
this.$get = [
"$filter",
function (r) {
function i(n, i, o) {
var s, p, g;
switch (((o = o || m), typeof n)) {
case "string":
(n = n.trim()), (g = n);
var y = o ? t : e;
if (((s = y[g]), !s)) {
":" === n.charAt(0) &&
":" === n.charAt(1) &&
((p = !0), (n = n.substring(2)));
var b = o ? v : d,
w = new co(b),
x = new fo(w, r, b);
(s = x.parse(n)),
s.constant
? (s.$$watchDelegate = f)
: p
? (s.$$watchDelegate = s.literal ? l : c)
: s.inputs && (s.$$watchDelegate = u),
o && (s = a(s)),
(y[g] = s);
}
return h(s, i);
case "function":
return h(n, i);
default:
return h($, i);
}
}
function a(e) {
function t(t, n, r, i) {
var o = m;
m = !0;
try {
return e(t, n, r, i);
} finally {
m = o;
}
}
if (!e) return e;
(t.$$watchDelegate = e.$$watchDelegate),
(t.assign = a(e.assign)),
(t.constant = e.constant),
(t.literal = e.literal);
for (var n = 0; e.inputs && n < e.inputs.length; ++n)
e.inputs[n] = a(e.inputs[n]);
return (t.inputs = e.inputs), t;
}
function s(e, t) {
return null == e || null == t
? e === t
: "object" == typeof e && ((e = pn(e)), "object" == typeof e)
? !1
: e === t || (e !== e && t !== t);
}
function u(e, t, r, i, o) {
var a,
u = i.inputs;
if (1 === u.length) {
var c = s;
return (
(u = u[0]),
e.$watch(
function (e) {
var t = u(e);
return (
s(t, c) || ((a = i(e, n, n, [t])), (c = t && pn(t))), a
);
},
t,
r,
o
)
);
}
for (var l = [], f = [], h = 0, p = u.length; p > h; h++)
(l[h] = s), (f[h] = null);
return e.$watch(
function (e) {
for (var t = !1, r = 0, o = u.length; o > r; r++) {
var c = u[r](e);
(t || (t = !s(c, l[r]))) && ((f[r] = c), (l[r] = c && pn(c)));
}
return t && (a = i(e, n, n, f)), a;
},
t,
r,
o
);
}
function c(e, t, n, r) {
var i, o;
return (i = e.$watch(
function (e) {
return r(e);
},
function (e, n, r) {
(o = e),
A(t) && t.apply(this, arguments),
b(e) &&
r.$$postDigest(function () {
b(o) && i();
});
},
n
));
}
function l(e, t, n, r) {
function i(e) {
var t = !0;
return (
o(e, function (e) {
b(e) || (t = !1);
}),
t
);
}
var a, s;
return (a = e.$watch(
function (e) {
return r(e);
},
function (e, n, r) {
(s = e),
A(t) && t.call(this, e, n, r),
i(e) &&
r.$$postDigest(function () {
i(s) && a();
});
},
n
));
}
function f(e, t, n, r) {
var i;
return (i = e.$watch(
function (e) {
return r(e);
},
function (e, n, r) {
A(t) && t.apply(this, arguments), i();
},
n
));
}
function h(e, t) {
if (!t) return e;
var n = e.$$watchDelegate,
r = !1,
i = n !== l && n !== c,
o = i
? function (n, i, o, a) {
var s = r && a ? a[0] : e(n, i, o, a);
return t(s, n, i);
}
: function (n, r, i, o) {
var a = e(n, r, i, o),
s = t(a, n, r);
return b(a) ? s : a;
};
return (
e.$$watchDelegate && e.$$watchDelegate !== u
? (o.$$watchDelegate = e.$$watchDelegate)
: t.$stateful ||
((o.$$watchDelegate = u),
(r = !e.inputs),
(o.inputs = e.inputs ? e.inputs : [e])),
o
);
}
var p = Jr().noUnsafeEval,
d = { csp: p, expensiveChecks: !1 },
v = { csp: p, expensiveChecks: !0 },
m = !1;
return (
(i.$$runningExpensiveChecks = function () {
return m;
}),
i
);
},
];
}
function $n() {
this.$get = [
"$rootScope",
"$exceptionHandler",
function (e, t) {
return mn(function (t) {
e.$evalAsync(t);
}, t);
},
];
}
function vn() {
this.$get = [
"$browser",
"$exceptionHandler",
function (e, t) {
return mn(function (t) {
e.defer(t);
}, t);
},
];
}
function mn(e, t) {
function i(e, t, n) {
function r(t) {
return function (n) {
i || ((i = !0), t.call(e, n));
};
}
var i = !1;
return [r(t), r(n)];
}
function a() {
this.$$state = { status: 0 };
}
function s(e, t) {
return function (n) {
t.call(e, n);
};
}
function u(e) {
var r, i, o;
(o = e.pending), (e.processScheduled = !1), (e.pending = n);
for (var a = 0, s = o.length; s > a; ++a) {
(i = o[a][0]), (r = o[a][e.status]);
try {
A(r)
? i.resolve(r(e.value))
: 1 === e.status
? i.resolve(e.value)
: i.reject(e.value);
} catch (u) {
i.reject(u), t(u);
}
}
}
function c(t) {
!t.processScheduled &&
t.pending &&
((t.processScheduled = !0),
e(function () {
u(t);
}));
}
function l() {
(this.promise = new a()),
(this.resolve = s(this, this.resolve)),
(this.reject = s(this, this.reject)),
(this.notify = s(this, this.notify));
}
function h(e) {
var t = new l(),
n = 0,
r = Lr(e) ? [] : {};
return (
o(e, function (e, i) {
n++,
g(e).then(
function (e) {
r.hasOwnProperty(i) || ((r[i] = e), --n || t.resolve(r));
},
function (e) {
r.hasOwnProperty(i) || t.reject(e);
}
);
}),
0 === n && t.resolve(r),
t.promise
);
}
var p = r("$q", TypeError),
d = function () {
return new l();
};
f(a.prototype, {
then: function (e, t, n) {
if (y(e) && y(t) && y(n)) return this;
var r = new l();
return (
(this.$$state.pending = this.$$state.pending || []),
this.$$state.pending.push([r, e, t, n]),
this.$$state.status > 0 && c(this.$$state),
r.promise
);
},
catch: function (e) {
return this.then(null, e);
},
finally: function (e, t) {
return this.then(
function (t) {
return m(t, !0, e);
},
function (t) {
return m(t, !1, e);
},
t
);
},
}),
f(l.prototype, {
resolve: function (e) {
this.promise.$$state.status ||
(e === this.promise
? this.$$reject(
p(
"qcycle",
"Expected promise to be resolved with value other than itself '{0}'",
e
)
)
: this.$$resolve(e));
},
$$resolve: function (e) {
var n, r;
r = i(this, this.$$resolve, this.$$reject);
try {
(w(e) || A(e)) && (n = e && e.then),
A(n)
? ((this.promise.$$state.status = -1),
n.call(e, r[0], r[1], this.notify))
: ((this.promise.$$state.value = e),
(this.promise.$$state.status = 1),
c(this.promise.$$state));
} catch (o) {
r[1](o), t(o);
}
},
reject: function (e) {
this.promise.$$state.status || this.$$reject(e);
},
$$reject: function (e) {
(this.promise.$$state.value = e),
(this.promise.$$state.status = 2),
c(this.promise.$$state);
},
notify: function (n) {
var r = this.promise.$$state.pending;
this.promise.$$state.status <= 0 &&
r &&
r.length &&
e(function () {
for (var e, i, o = 0, a = r.length; a > o; o++) {
(i = r[o][0]), (e = r[o][3]);
try {
i.notify(A(e) ? e(n) : n);
} catch (s) {
t(s);
}
}
});
},
});
var $ = function (e) {
var t = new l();
return t.reject(e), t.promise;
},
v = function (e, t) {
var n = new l();
return t ? n.resolve(e) : n.reject(e), n.promise;
},
m = function (e, t, n) {
var r = null;
try {
A(n) && (r = n());
} catch (i) {
return v(i, !1);
}
return P(r)
? r.then(
function () {
return v(e, t);
},
function (e) {
return v(e, !1);
}
)
: v(e, t);
},
g = function (e, t, n, r) {
var i = new l();
return i.resolve(e), i.promise.then(t, n, r);
},
b = g,
x = function S(e) {
function t(e) {
r.resolve(e);
}
function n(e) {
r.reject(e);
}
if (!A(e)) throw p("norslvr", "Expected resolverFn, got '{0}'", e);
if (!(this instanceof S)) return new S(e);
var r = new l();
return e(t, n), r.promise;
};
return (
(x.defer = d),
(x.reject = $),
(x.when = g),
(x.resolve = b),
(x.all = h),
x
);
}
function gn() {
this.$get = [
"$window",
"$timeout",
function (e, t) {
var n = e.requestAnimationFrame || e.webkitRequestAnimationFrame,
r =
e.cancelAnimationFrame ||
e.webkitCancelAnimationFrame ||
e.webkitCancelRequestAnimationFrame,
i = !!n,
o = i
? function (e) {
var t = n(e);
return function () {
r(t);
};
}
: function (e) {
var n = t(e, 16.66, !1);
return function () {
t.cancel(n);
};
};
return (o.supported = i), o;
},
];
}
function yn() {
function e(e) {
function t() {
(this.$$watchers =
this.$$nextSibling =
this.$$childHead =
this.$$childTail =
null),
(this.$$listeners = {}),
(this.$$listenerCount = {}),
(this.$$watchersCount = 0),
(this.$id = u()),
(this.$$ChildScope = null);
}
return (t.prototype = e), t;
}
var t = 10,
n = r("$rootScope"),
a = null,
s = null;
(this.digestTtl = function (e) {
return arguments.length && (t = e), t;
}),
(this.$get = [
"$injector",
"$exceptionHandler",
"$parse",
"$browser",
function (r, c, l, f) {
function h(e) {
e.currentScope.$$destroyed = !0;
}
function p(e) {
9 === Tr &&
(e.$$childHead && p(e.$$childHead),
e.$$nextSibling && p(e.$$nextSibling)),
(e.$parent =
e.$$nextSibling =
e.$$prevSibling =
e.$$childHead =
e.$$childTail =
e.$root =
e.$$watchers =
null);
}
function d() {
(this.$id = u()),
(this.$$phase =
this.$parent =
this.$$watchers =
this.$$nextSibling =
this.$$prevSibling =
this.$$childHead =
this.$$childTail =
null),
(this.$root = this),
(this.$$destroyed = !1),
(this.$$listeners = {}),
(this.$$listenerCount = {}),
(this.$$watchersCount = 0),
(this.$$isolateBindings = null);
}
function v(e) {
if (C.$$phase)
throw n("inprog", "{0} already in progress", C.$$phase);
C.$$phase = e;
}
function m() {
C.$$phase = null;
}
function g(e, t) {
do e.$$watchersCount += t;
while ((e = e.$parent));
}
function b(e, t, n) {
do
(e.$$listenerCount[n] -= t),
0 === e.$$listenerCount[n] && delete e.$$listenerCount[n];
while ((e = e.$parent));
}
function x() {}
function S() {
for (; M.length; )
try {
M.shift()();
} catch (e) {
c(e);
}
s = null;
}
function E() {
null === s &&
(s = f.defer(function () {
C.$apply(S);
}));
}
d.prototype = {
constructor: d,
$new: function (t, n) {
var r;
return (
(n = n || this),
t
? ((r = new d()), (r.$root = this.$root))
: (this.$$ChildScope || (this.$$ChildScope = e(this)),
(r = new this.$$ChildScope())),
(r.$parent = n),
(r.$$prevSibling = n.$$childTail),
n.$$childHead
? ((n.$$childTail.$$nextSibling = r), (n.$$childTail = r))
: (n.$$childHead = n.$$childTail = r),
(t || n != this) && r.$on("$destroy", h),
r
);
},
$watch: function (e, t, n, r) {
var i = l(e);
if (i.$$watchDelegate) return i.$$watchDelegate(this, t, n, i, e);
var o = this,
s = o.$$watchers,
u = { fn: t, last: x, get: i, exp: r || e, eq: !!n };
return (
(a = null),
A(t) || (u.fn = $),
s || (s = o.$$watchers = []),
s.unshift(u),
g(this, 1),
function () {
_(s, u) >= 0 && g(o, -1), (a = null);
}
);
},
$watchGroup: function (e, t) {
function n() {
(u = !1), c ? ((c = !1), t(i, i, s)) : t(i, r, s);
}
var r = new Array(e.length),
i = new Array(e.length),
a = [],
s = this,
u = !1,
c = !0;
if (!e.length) {
var l = !0;
return (
s.$evalAsync(function () {
l && t(i, i, s);
}),
function () {
l = !1;
}
);
}
return 1 === e.length
? this.$watch(e[0], function (e, n, o) {
(i[0] = e), (r[0] = n), t(i, e === n ? i : r, o);
})
: (o(e, function (e, t) {
var o = s.$watch(e, function (e, o) {
(i[t] = e), (r[t] = o), u || ((u = !0), s.$evalAsync(n));
});
a.push(o);
}),
function () {
for (; a.length; ) a.shift()();
});
},
$watchCollection: function (e, t) {
function n(e) {
o = e;
var t, n, r, s, u;
if (!y(o)) {
if (w(o))
if (i(o)) {
a !== p && ((a = p), (v = a.length = 0), f++),
(t = o.length),
v !== t && (f++, (a.length = v = t));
for (var c = 0; t > c; c++)
(u = a[c]),
(s = o[c]),
(r = u !== u && s !== s),
r || u === s || (f++, (a[c] = s));
} else {
a !== d && ((a = d = {}), (v = 0), f++), (t = 0);
for (n in o)
kr.call(o, n) &&
(t++,
(s = o[n]),
(u = a[n]),
n in a
? ((r = u !== u && s !== s),
r || u === s || (f++, (a[n] = s)))
: (v++, (a[n] = s), f++));
if (v > t) {
f++;
for (n in a) kr.call(o, n) || (v--, delete a[n]);
}
}
else a !== o && ((a = o), f++);
return f;
}
}
function r() {
if (($ ? (($ = !1), t(o, o, u)) : t(o, s, u), c))
if (w(o))
if (i(o)) {
s = new Array(o.length);
for (var e = 0; e < o.length; e++) s[e] = o[e];
} else {
s = {};
for (var n in o) kr.call(o, n) && (s[n] = o[n]);
}
else s = o;
}
n.$stateful = !0;
var o,
a,
s,
u = this,
c = t.length > 1,
f = 0,
h = l(e, n),
p = [],
d = {},
$ = !0,
v = 0;
return this.$watch(h, r);
},
$digest: function () {
var e,
r,
i,
o,
u,
l,
h,
p,
d,
$,
g,
y,
b = t,
w = this,
E = [];
v("$digest"),
f.$$checkUrlChange(),
this === C && null !== s && (f.defer.cancel(s), S()),
(a = null);
do {
for (p = !1, $ = w; k.length; ) {
try {
(y = k.shift()), y.scope.$eval(y.expression, y.locals);
} catch (M) {
c(M);
}
a = null;
}
e: do {
if ((l = $.$$watchers))
for (h = l.length; h--; )
try {
if ((e = l[h]))
if (
((u = e.get),
(r = u($)) === (i = e.last) ||
(e.eq
? H(r, i)
: "number" == typeof r &&
"number" == typeof i &&
isNaN(r) &&
isNaN(i)))
) {
if (e === a) {
p = !1;
break e;
}
} else
(p = !0),
(a = e),
(e.last = e.eq ? F(r, null) : r),
(o = e.fn),
o(r, i === x ? r : i, $),
5 > b &&
((g = 4 - b),
E[g] || (E[g] = []),
E[g].push({
msg: A(e.exp)
? "fn: " + (e.exp.name || e.exp.toString())
: e.exp,
newVal: r,
oldVal: i,
}));
} catch (M) {
c(M);
}
if (
!(d =
($.$$watchersCount && $.$$childHead) ||
($ !== w && $.$$nextSibling))
)
for (; $ !== w && !(d = $.$$nextSibling); ) $ = $.$parent;
} while (($ = d));
if ((p || k.length) && !b--)
throw (
(m(),
n(
"infdig",
"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",
t,
E
))
);
} while (p || k.length);
for (m(); O.length; )
try {
O.shift()();
} catch (M) {
c(M);
}
},
$destroy: function () {
if (!this.$$destroyed) {
var e = this.$parent;
this.$broadcast("$destroy"),
(this.$$destroyed = !0),
this === C && f.$$applicationDestroyed(),
g(this, -this.$$watchersCount);
for (var t in this.$$listenerCount)
b(this, this.$$listenerCount[t], t);
e &&
e.$$childHead == this &&
(e.$$childHead = this.$$nextSibling),
e &&
e.$$childTail == this &&
(e.$$childTail = this.$$prevSibling),
this.$$prevSibling &&
(this.$$prevSibling.$$nextSibling = this.$$nextSibling),
this.$$nextSibling &&
(this.$$nextSibling.$$prevSibling = this.$$prevSibling),
(this.$destroy =
this.$digest =
this.$apply =
this.$evalAsync =
this.$applyAsync =
$),
(this.$on =
this.$watch =
this.$watchGroup =
function () {
return $;
}),
(this.$$listeners = {}),
(this.$$nextSibling = null),
p(this);
}
},
$eval: function (e, t) {
return l(e)(this, t);
},
$evalAsync: function (e, t) {
C.$$phase ||
k.length ||
f.defer(function () {
k.length && C.$digest();
}),
k.push({ scope: this, expression: l(e), locals: t });
},
$$postDigest: function (e) {
O.push(e);
},
$apply: function (e) {
try {
v("$apply");
try {
return this.$eval(e);
} finally {
m();
}
} catch (t) {
c(t);
} finally {
try {
C.$digest();
} catch (t) {
throw (c(t), t);
}
}
},
$applyAsync: function (e) {
function t() {
n.$eval(e);
}
var n = this;
e && M.push(t), (e = l(e)), E();
},
$on: function (e, t) {
var n = this.$$listeners[e];
n || (this.$$listeners[e] = n = []), n.push(t);
var r = this;
do
r.$$listenerCount[e] || (r.$$listenerCount[e] = 0),
r.$$listenerCount[e]++;
while ((r = r.$parent));
var i = this;
return function () {
var r = n.indexOf(t);
-1 !== r && ((n[r] = null), b(i, 1, e));
};
},
$emit: function (e, t) {
var n,
r,
i,
o = [],
a = this,
s = !1,
u = {
name: e,
targetScope: a,
stopPropagation: function () {
s = !0;
},
preventDefault: function () {
u.defaultPrevented = !0;
},
defaultPrevented: !1,
},
l = B([u], arguments, 1);
do {
for (
n = a.$$listeners[e] || o,
u.currentScope = a,
r = 0,
i = n.length;
i > r;
r++
)
if (n[r])
try {
n[r].apply(null, l);
} catch (f) {
c(f);
}
else n.splice(r, 1), r--, i--;
if (s) return (u.currentScope = null), u;
a = a.$parent;
} while (a);
return (u.currentScope = null), u;
},
$broadcast: function (e, t) {
var n = this,
r = n,
i = n,
o = {
name: e,
targetScope: n,
preventDefault: function () {
o.defaultPrevented = !0;
},
defaultPrevented: !1,
};
if (!n.$$listenerCount[e]) return o;
for (var a, s, u, l = B([o], arguments, 1); (r = i); ) {
for (
o.currentScope = r,
a = r.$$listeners[e] || [],
s = 0,
u = a.length;
u > s;
s++
)
if (a[s])
try {
a[s].apply(null, l);
} catch (f) {
c(f);
}
else a.splice(s, 1), s--, u--;
if (
!(i =
(r.$$listenerCount[e] && r.$$childHead) ||
(r !== n && r.$$nextSibling))
)
for (; r !== n && !(i = r.$$nextSibling); ) r = r.$parent;
}
return (o.currentScope = null), o;
},
};
var C = new d(),
k = (C.$$asyncQueue = []),
O = (C.$$postDigestQueue = []),
M = (C.$$applyAsyncQueue = []);
return C;
},
]);
}
function bn() {
var e = /^\s*(https?|ftp|mailto|tel|file):/,
t = /^\s*((https?|ftp|file|blob):|data:image\/)/;
(this.aHrefSanitizationWhitelist = function (t) {
return b(t) ? ((e = t), this) : e;
}),
(this.imgSrcSanitizationWhitelist = function (e) {
return b(e) ? ((t = e), this) : t;
}),
(this.$get = function () {
return function (n, r) {
var i,
o = r ? t : e;
return (i = Mn(n).href), "" === i || i.match(o) ? n : "unsafe:" + i;
};
});
}
function wn(e) {
if ("self" === e) return e;
if (S(e)) {
if (e.indexOf("***") > -1)
throw po(
"iwcard",
"Illegal sequence *** in string matcher. String: {0}",
e
);
return (
(e = Gr(e).replace("\\*\\*", ".*").replace("\\*", "[^:/.?&;]*")),
new RegExp("^" + e + "$")
);
}
if (k(e)) return new RegExp("^" + e.source + "$");
throw po(
"imatcher",
'Matchers may only be "self", string patterns or RegExp objects'
);
}
function xn(e) {
var t = [];
return (
b(e) &&
o(e, function (e) {
t.push(wn(e));
}),
t
);
}
function Sn() {
this.SCE_CONTEXTS = $o;
var e = ["self"],
t = [];
(this.resourceUrlWhitelist = function (t) {
return arguments.length && (e = xn(t)), e;
}),
(this.resourceUrlBlacklist = function (e) {
return arguments.length && (t = xn(e)), t;
}),
(this.$get = [
"$injector",
function (n) {
function r(e, t) {
return "self" === e ? jn(t) : !!e.exec(t.href);
}
function i(n) {
var i,
o,
a = Mn(n.toString()),
s = !1;
for (i = 0, o = e.length; o > i; i++)
if (r(e[i], a)) {
s = !0;
break;
}
if (s)
for (i = 0, o = t.length; o > i; i++)
if (r(t[i], a)) {
s = !1;
break;
}
return s;
}
function o(e) {
var t = function (e) {
this.$$unwrapTrustedValue = function () {
return e;
};
};
return (
e && (t.prototype = new e()),
(t.prototype.valueOf = function () {
return this.$$unwrapTrustedValue();
}),
(t.prototype.toString = function () {
return this.$$unwrapTrustedValue().toString();
}),
t
);
}
function a(e, t) {
var n = f.hasOwnProperty(e) ? f[e] : null;
if (!n)
throw po(
"icontext",
"Attempted to trust a value in invalid context. Context: {0}; Value: {1}",
e,
t
);
if (null === t || y(t) || "" === t) return t;
if ("string" != typeof t)
throw po(
"itype",
"Attempted to trust a non-string value in a content requiring a string: Context: {0}",
e
);
return new n(t);
}
function s(e) {
return e instanceof l ? e.$$unwrapTrustedValue() : e;
}
function u(e, t) {
if (null === t || y(t) || "" === t) return t;
var n = f.hasOwnProperty(e) ? f[e] : null;
if (n && t instanceof n) return t.$$unwrapTrustedValue();
if (e === $o.RESOURCE_URL) {
if (i(t)) return t;
throw po(
"insecurl",
"Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",
t.toString()
);
}
if (e === $o.HTML) return c(t);
throw po(
"unsafe",
"Attempting to use an unsafe value in a safe context."
);
}
var c = function (e) {
throw po(
"unsafe",
"Attempting to use an unsafe value in a safe context."
);
};
n.has("$sanitize") && (c = n.get("$sanitize"));
var l = o(),
f = {};
return (
(f[$o.HTML] = o(l)),
(f[$o.CSS] = o(l)),
(f[$o.URL] = o(l)),
(f[$o.JS] = o(l)),
(f[$o.RESOURCE_URL] = o(f[$o.URL])),
{ trustAs: a, getTrusted: u, valueOf: s }
);
},
]);
}
function En() {
var e = !0;
(this.enabled = function (t) {
return arguments.length && (e = !!t), e;
}),
(this.$get = [
"$parse",
"$sceDelegate",
function (t, n) {
if (e && 8 > Tr)
throw po(
"iequirks",
"Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See https://docs.angularjs.org/api/ng.$sce for more information."
);
var r = U($o);
(r.isEnabled = function () {
return e;
}),
(r.trustAs = n.trustAs),
(r.getTrusted = n.getTrusted),
(r.valueOf = n.valueOf),
e ||
((r.trustAs = r.getTrusted =
function (e, t) {
return t;
}),
(r.valueOf = v)),
(r.parseAs = function (e, n) {
var i = t(n);
return i.literal && i.constant
? i
: t(n, function (t) {
return r.getTrusted(e, t);
});
});
var i = r.parseAs,
a = r.getTrusted,
s = r.trustAs;
return (
o($o, function (e, t) {
var n = Ar(t);
(r[xe("parse_as_" + n)] = function (t) {
return i(e, t);
}),
(r[xe("get_trusted_" + n)] = function (t) {
return a(e, t);
}),
(r[xe("trust_as_" + n)] = function (t) {
return s(e, t);
});
}),
r
);
},
]);
}
function Cn() {
this.$get = [
"$window",
"$document",
function (e, t) {
var n,
r,
i = {},
o = p(
(/android (\d+)/.exec(Ar((e.navigator || {}).userAgent)) || [])[1]
),
a = /Boxee/i.test((e.navigator || {}).userAgent),
s = t[0] || {},
u = /^(Moz|webkit|ms)(?=[A-Z])/,
c = s.body && s.body.style,
l = !1,
f = !1;
if (c) {
for (var h in c)
if ((r = u.exec(h))) {
(n = r[0]), (n = n.substr(0, 1).toUpperCase() + n.substr(1));
break;
}
n || (n = "WebkitOpacity" in c && "webkit"),
(l = !!("transition" in c || n + "Transition" in c)),
(f = !!("animation" in c || n + "Animation" in c)),
!o ||
(l && f) ||
((l = S(c.webkitTransition)), (f = S(c.webkitAnimation)));
}
return {
history: !(!e.history || !e.history.pushState || 4 > o || a),
hasEvent: function (e) {
if ("input" === e && 11 >= Tr) return !1;
if (y(i[e])) {
var t = s.createElement("div");
i[e] = "on" + e in t;
}
return i[e];
},
csp: Jr(),
vendorPrefix: n,
transitions: l,
animations: f,
android: o,
};
},
];
}
function An() {
this.$get = [
"$templateCache",
"$http",
"$q",
"$sce",
function (e, t, n, r) {
function i(o, a) {
function s(e) {
if (!a)
throw Fi(
"tpload",
"Failed to load template: {0} (HTTP status: {1} {2})",
o,
e.status,
e.statusText
);
return n.reject(e);
}
i.totalPendingRequests++,
(S(o) && e.get(o)) || (o = r.getTrustedResourceUrl(o));
var u = t.defaults && t.defaults.transformResponse;
Lr(u)
? (u = u.filter(function (e) {
return e !== xt;
}))
: u === xt && (u = null);
var c = { cache: e, transformResponse: u };
return t
.get(o, c)
["finally"](function () {
i.totalPendingRequests--;
})
.then(function (t) {
return e.put(o, t.data), t.data;
}, s);
}
return (i.totalPendingRequests = 0), i;
},
];
}
function kn() {
this.$get = [
"$rootScope",
"$browser",
"$location",
function (e, t, n) {
var r = {};
return (
(r.findBindings = function (e, t, n) {
var r = e.getElementsByClassName("ng-binding"),
i = [];
return (
o(r, function (e) {
var r = Ur.element(e).data("$binding");
r &&
o(r, function (r) {
if (n) {
var o = new RegExp("(^|\\s)" + Gr(t) + "(\\s|\\||$)");
o.test(r) && i.push(e);
} else -1 != r.indexOf(t) && i.push(e);
});
}),
i
);
}),
(r.findModels = function (e, t, n) {
for (
var r = ["ng-", "data-ng-", "ng\\:"], i = 0;
i < r.length;
++i
) {
var o = n ? "=" : "*=",
a = "[" + r[i] + "model" + o + '"' + t + '"]',
s = e.querySelectorAll(a);
if (s.length) return s;
}
}),
(r.getLocation = function () {
return n.url();
}),
(r.setLocation = function (t) {
t !== n.url() && (n.url(t), e.$digest());
}),
(r.whenStable = function (e) {
t.notifyWhenNoOutstandingRequests(e);
}),
r
);
},
];
}
function On() {
this.$get = [
"$rootScope",
"$browser",
"$q",
"$$q",
"$exceptionHandler",
function (e, t, n, r, i) {
function o(o, s, u) {
A(o) || ((u = s), (s = o), (o = $));
var c,
l = L(arguments, 3),
f = b(u) && !u,
h = (f ? r : n).defer(),
p = h.promise;
return (
(c = t.defer(function () {
try {
h.resolve(o.apply(null, l));
} catch (t) {
h.reject(t), i(t);
} finally {
delete a[p.$$timeoutId];
}
f || e.$apply();
}, s)),
(p.$$timeoutId = c),
(a[c] = h),
p
);
}
var a = {};
return (
(o.cancel = function (e) {
return e && e.$$timeoutId in a
? (a[e.$$timeoutId].reject("canceled"),
delete a[e.$$timeoutId],
t.defer.cancel(e.$$timeoutId))
: !1;
}),
o
);
},
];
}
function Mn(e) {
var t = e;
return (
Tr && (vo.setAttribute("href", t), (t = vo.href)),
vo.setAttribute("href", t),
{
href: vo.href,
protocol: vo.protocol ? vo.protocol.replace(/:$/, "") : "",
host: vo.host,
search: vo.search ? vo.search.replace(/^\?/, "") : "",
hash: vo.hash ? vo.hash.replace(/^#/, "") : "",
hostname: vo.hostname,
port: vo.port,
pathname:
"/" === vo.pathname.charAt(0) ? vo.pathname : "/" + vo.pathname,
}
);
}
function jn(e) {
var t = S(e) ? Mn(e) : e;
return t.protocol === mo.protocol && t.host === mo.host;
}
function Tn() {
this.$get = m(e);
}
function Nn(e) {
function t(e) {
try {
return decodeURIComponent(e);
} catch (t) {
return e;
}
}
var n = e[0] || {},
r = {},
i = "";
return function () {
var e,
o,
a,
s,
u,
c = n.cookie || "";
if (c !== i)
for (i = c, e = i.split("; "), r = {}, a = 0; a < e.length; a++)
(o = e[a]),
(s = o.indexOf("=")),
s > 0 &&
((u = t(o.substring(0, s))),
y(r[u]) && (r[u] = t(o.substring(s + 1))));
return r;
};
}
function Vn() {
this.$get = Nn;
}
function Pn(e) {
function t(r, i) {
if (w(r)) {
var a = {};
return (
o(r, function (e, n) {
a[n] = t(n, e);
}),
a
);
}
return e.factory(r + n, i);
}
var n = "Filter";
(this.register = t),
(this.$get = [
"$injector",
function (e) {
return function (t) {
return e.get(t + n);
};
},
]),
t("currency", _n),
t("date", er),
t("filter", In),
t("json", tr),
t("limitTo", nr),
t("lowercase", Eo),
t("number", Fn),
t("orderBy", rr),
t("uppercase", Co);
}
function In() {
return function (e, t, n) {
if (!i(e)) {
if (null == e) return e;
throw r("filter")("notarray", "Expected array but received: {0}", e);
}
var o,
a,
s = qn(t);
switch (s) {
case "function":
o = t;
break;
case "boolean":
case "null":
case "number":
case "string":
a = !0;
case "object":
o = Dn(t, n, a);
break;
default:
return e;
}
return Array.prototype.filter.call(e, o);
};
}
function Dn(e, t, n) {
var r,
i = w(e) && "$" in e;
return (
t === !0
? (t = H)
: A(t) ||
(t = function (e, t) {
return y(e)
? !1
: null === e || null === t
? e === t
: w(t) || (w(e) && !g(e))
? !1
: ((e = Ar("" + e)), (t = Ar("" + t)), -1 !== e.indexOf(t));
}),
(r = function (r) {
return i && !w(r) ? Rn(r, e.$, t, !1) : Rn(r, e, t, n);
})
);
}
function Rn(e, t, n, r, i) {
var o = qn(e),
a = qn(t);
if ("string" === a && "!" === t.charAt(0))
return !Rn(e, t.substring(1), n, r);
if (Lr(e))
return e.some(function (e) {
return Rn(e, t, n, r);
});
switch (o) {
case "object":
var s;
if (r) {
for (s in e) if ("$" !== s.charAt(0) && Rn(e[s], t, n, !0)) return !0;
return i ? !1 : Rn(e, t, n, !1);
}
if ("object" === a) {
for (s in t) {
var u = t[s];
if (!A(u) && !y(u)) {
var c = "$" === s,
l = c ? e : e[s];
if (!Rn(l, u, n, c, c)) return !1;
}
}
return !0;
}
return n(e, t);
case "function":
return !1;
default:
return n(e, t);
}
}
function qn(e) {
return null === e ? "null" : typeof e;
}
function _n(e) {
var t = e.NUMBER_FORMATS;
return function (e, n, r) {
return (
y(n) && (n = t.CURRENCY_SYM),
y(r) && (r = t.PATTERNS[1].maxFrac),
null == e
? e
: Bn(e, t.PATTERNS[1], t.GROUP_SEP, t.DECIMAL_SEP, r).replace(
/\u00A4/g,
n
)
);
};
}
function Fn(e) {
var t = e.NUMBER_FORMATS;
return function (e, n) {
return null == e
? e
: Bn(e, t.PATTERNS[0], t.GROUP_SEP, t.DECIMAL_SEP, n);
};
}
function Un(e) {
var t,
n,
r,
i,
o,
a = 0;
for (
(n = e.indexOf(yo)) > -1 && (e = e.replace(yo, "")),
(r = e.search(/e/i)) > 0
? (0 > n && (n = r), (n += +e.slice(r + 1)), (e = e.substring(0, r)))
: 0 > n && (n = e.length),
r = 0;
e.charAt(r) == bo;
r++
);
if (r == (o = e.length)) (t = [0]), (n = 1);
else {
for (o--; e.charAt(o) == bo; ) o--;
for (n -= r, t = [], i = 0; o >= r; r++, i++) t[i] = +e.charAt(r);
}
return (
n > go && ((t = t.splice(0, go - 1)), (a = n - 1), (n = 1)),
{ d: t, e: a, i: n }
);
}
function Hn(e, t, n, r) {
var i = e.d,
o = i.length - e.i;
t = y(t) ? Math.min(Math.max(n, o), r) : +t;
var a = t + e.i,
s = i[a];
if (a > 0) i.splice(a);
else {
(e.i = 1), (i.length = a = t + 1);
for (var u = 0; a > u; u++) i[u] = 0;
}
for (s >= 5 && i[a - 1]++; t > o; o++) i.push(0);
var c = i.reduceRight(function (e, t, n, r) {
return (t += e), (r[n] = t % 10), Math.floor(t / 10);
}, 0);
c && (i.unshift(c), e.i++);
}
function Bn(e, t, n, r, i) {
if ((!S(e) && !E(e)) || isNaN(e)) return "";
var o,
a = !isFinite(e),
s = !1,
u = Math.abs(e) + "",
c = "";
if (a) c = "∞";
else {
(o = Un(u)), Hn(o, i, t.minFrac, t.maxFrac);
var l = o.d,
f = o.i,
h = o.e,
p = [];
for (
s = l.reduce(function (e, t) {
return e && !t;
}, !0);
0 > f;
)
l.unshift(0), f++;
f > 0 ? (p = l.splice(f)) : ((p = l), (l = [0]));
var d = [];
for (
l.length > t.lgSize && d.unshift(l.splice(-t.lgSize).join(""));
l.length > t.gSize;
)
d.unshift(l.splice(-t.gSize).join(""));
l.length && d.unshift(l.join("")),
(c = d.join(n)),
p.length && (c += r + p.join("")),
h && (c += "e+" + h);
}
return 0 > e && !s ? t.negPre + c + t.negSuf : t.posPre + c + t.posSuf;
}
function Ln(e, t, n) {
var r = "";
for (0 > e && ((r = "-"), (e = -e)), e = "" + e; e.length < t; ) e = bo + e;
return n && (e = e.substr(e.length - t)), r + e;
}
function zn(e, t, n, r) {
return (
(n = n || 0),
function (i) {
var o = i["get" + e]();
return (
(n > 0 || o > -n) && (o += n),
0 === o && -12 == n && (o = 12),
Ln(o, t, r)
);
}
);
}
function Wn(e, t) {
return function (n, r) {
var i = n["get" + e](),
o = Or(t ? "SHORT" + e : e);
return r[o][i];
};
}
function Gn(e, t, n) {
var r = -1 * n,
i = r >= 0 ? "+" : "";
return (i +=
Ln(Math[r > 0 ? "floor" : "ceil"](r / 60), 2) + Ln(Math.abs(r % 60), 2));
}
function Jn(e) {
var t = new Date(e, 0, 1).getDay();
return new Date(e, 0, (4 >= t ? 5 : 12) - t);
}
function Yn(e) {
return new Date(
e.getFullYear(),
e.getMonth(),
e.getDate() + (4 - e.getDay())
);
}
function Kn(e) {
return function (t) {
var n = Jn(t.getFullYear()),
r = Yn(t),
i = +r - +n,
o = 1 + Math.round(i / 6048e5);
return Ln(o, e);
};
}
function Zn(e, t) {
return e.getHours() < 12 ? t.AMPMS[0] : t.AMPMS[1];
}
function Xn(e, t) {
return e.getFullYear() <= 0 ? t.ERAS[0] : t.ERAS[1];
}
function Qn(e, t) {
return e.getFullYear() <= 0 ? t.ERANAMES[0] : t.ERANAMES[1];
}
function er(e) {
function t(e) {
var t;
if ((t = e.match(n))) {
var r = new Date(0),
i = 0,
o = 0,
a = t[8] ? r.setUTCFullYear : r.setFullYear,
s = t[8] ? r.setUTCHours : r.setHours;
t[9] && ((i = p(t[9] + t[10])), (o = p(t[9] + t[11]))),
a.call(r, p(t[1]), p(t[2]) - 1, p(t[3]));
var u = p(t[4] || 0) - i,
c = p(t[5] || 0) - o,
l = p(t[6] || 0),
f = Math.round(1e3 * parseFloat("0." + (t[7] || 0)));
return s.call(r, u, c, l, f), r;
}
return e;
}
var n =
/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
return function (n, r, i) {
var a,
s,
u = "",
c = [];
if (
((r = r || "mediumDate"),
(r = e.DATETIME_FORMATS[r] || r),
S(n) && (n = So.test(n) ? p(n) : t(n)),
E(n) && (n = new Date(n)),
!C(n) || !isFinite(n.getTime()))
)
return n;
for (; r; )
(s = xo.exec(r)),
s ? ((c = B(c, s, 1)), (r = c.pop())) : (c.push(r), (r = null));
var l = n.getTimezoneOffset();
return (
i && ((l = Y(i, l)), (n = Z(n, i, !0))),
o(c, function (t) {
(a = wo[t]),
(u += a
? a(n, e.DATETIME_FORMATS, l)
: "''" === t
? "'"
: t.replace(/(^'|'$)/g, "").replace(/''/g, "'"));
}),
u
);
};
}
function tr() {
return function (e, t) {
return y(t) && (t = 2), G(e, t);
};
}
function nr() {
return function (e, t, n) {
return (
(t = Math.abs(Number(t)) === 1 / 0 ? Number(t) : p(t)),
isNaN(t)
? e
: (E(e) && (e = e.toString()),
Lr(e) || S(e)
? ((n = !n || isNaN(n) ? 0 : p(n)),
(n = 0 > n ? Math.max(0, e.length + n) : n),
t >= 0
? e.slice(n, n + t)
: 0 === n
? e.slice(t, e.length)
: e.slice(Math.max(0, n + t), n))
: e)
);
};
}
function rr(e) {
function t(t, n) {
return (
(n = n ? -1 : 1),
t.map(function (t) {
var r = 1,
i = v;
if (A(t)) i = t;
else if (
S(t) &&
(("+" != t.charAt(0) && "-" != t.charAt(0)) ||
((r = "-" == t.charAt(0) ? -1 : 1), (t = t.substring(1))),
"" !== t && ((i = e(t)), i.constant))
) {
var o = i();
i = function (e) {
return e[o];
};
}
return { get: i, descending: r * n };
})
);
}
function n(e) {
switch (typeof e) {
case "number":
case "boolean":
case "string":
return !0;
default:
return !1;
}
}
function r(e, t) {
return "function" == typeof e.valueOf && ((e = e.valueOf()), n(e))
? e
: g(e) && ((e = e.toString()), n(e))
? e
: t;
}
function o(e, t) {
var n = typeof e;
return (
null === e
? ((n = "string"), (e = "null"))
: "string" === n
? (e = e.toLowerCase())
: "object" === n && (e = r(e, t)),
{ value: e, type: n }
);
}
function a(e, t) {
var n = 0;
return (
e.type === t.type
? e.value !== t.value && (n = e.value < t.value ? -1 : 1)
: (n = e.type < t.type ? -1 : 1),
n
);
}
return function (e, n, r) {
function s(e, t) {
return {
value: e,
predicateValues: c.map(function (n) {
return o(n.get(e), t);
}),
};
}
function u(e, t) {
for (
var n = 0, r = 0, i = c.length;
i > r &&
!(n =
a(e.predicateValues[r], t.predicateValues[r]) * c[r].descending);
++r
);
return n;
}
if (!i(e)) return e;
Lr(n) || (n = [n]), 0 === n.length && (n = ["+"]);
var c = t(n, r);
c.push({
get: function () {
return {};
},
descending: r ? -1 : 1,
});
var l = Array.prototype.map.call(e, s);
return (
l.sort(u),
(e = l.map(function (e) {
return e.value;
}))
);
};
}
function ir(e) {
return A(e) && (e = { link: e }), (e.restrict = e.restrict || "AC"), m(e);
}
function or(e, t) {
e.$name = t;
}
function ar(e, t, r, i, a) {
var s = this,
u = [];
(s.$error = {}),
(s.$$success = {}),
(s.$pending = n),
(s.$name = a(t.name || t.ngForm || "")(r)),
(s.$dirty = !1),
(s.$pristine = !0),
(s.$valid = !0),
(s.$invalid = !1),
(s.$submitted = !1),
(s.$$parentForm = Oo),
(s.$rollbackViewValue = function () {
o(u, function (e) {
e.$rollbackViewValue();
});
}),
(s.$commitViewValue = function () {
o(u, function (e) {
e.$commitViewValue();
});
}),
(s.$addControl = function (e) {
pe(e.$name, "input"),
u.push(e),
e.$name && (s[e.$name] = e),
(e.$$parentForm = s);
}),
(s.$$renameControl = function (e, t) {
var n = e.$name;
s[n] === e && delete s[n], (s[t] = e), (e.$name = t);
}),
(s.$removeControl = function (e) {
e.$name && s[e.$name] === e && delete s[e.$name],
o(s.$pending, function (t, n) {
s.$setValidity(n, null, e);
}),
o(s.$error, function (t, n) {
s.$setValidity(n, null, e);
}),
o(s.$$success, function (t, n) {
s.$setValidity(n, null, e);
}),
_(u, e),
(e.$$parentForm = Oo);
}),
wr({
ctrl: this,
$element: e,
set: function (e, t, n) {
var r = e[t];
if (r) {
var i = r.indexOf(n);
-1 === i && r.push(n);
} else e[t] = [n];
},
unset: function (e, t, n) {
var r = e[t];
r && (_(r, n), 0 === r.length && delete e[t]);
},
$animate: i,
}),
(s.$setDirty = function () {
i.removeClass(e, ha),
i.addClass(e, pa),
(s.$dirty = !0),
(s.$pristine = !1),
s.$$parentForm.$setDirty();
}),
(s.$setPristine = function () {
i.setClass(e, ha, pa + " " + Mo),
(s.$dirty = !1),
(s.$pristine = !0),
(s.$submitted = !1),
o(u, function (e) {
e.$setPristine();
});
}),
(s.$setUntouched = function () {
o(u, function (e) {
e.$setUntouched();
});
}),
(s.$setSubmitted = function () {
i.addClass(e, Mo), (s.$submitted = !0), s.$$parentForm.$setSubmitted();
});
}
function sr(e) {
e.$formatters.push(function (t) {
return e.$isEmpty(t) ? t : t.toString();
});
}
function ur(e, t, n, r, i, o) {
cr(e, t, n, r, i, o), sr(r);
}
function cr(e, t, n, r, i, o) {
var a = Ar(t[0].type);
if (!i.android) {
var s = !1;
t.on("compositionstart", function (e) {
s = !0;
}),
t.on("compositionend", function () {
(s = !1), c();
});
}
var u,
c = function (e) {
if ((u && (o.defer.cancel(u), (u = null)), !s)) {
var i = t.val(),
c = e && e.type;
"password" === a || (n.ngTrim && "false" === n.ngTrim) || (i = Wr(i)),
(r.$viewValue !== i || ("" === i && r.$$hasNativeValidators)) &&
r.$setViewValue(i, c);
}
};
if (i.hasEvent("input")) t.on("input", c);
else {
var l = function (e, t, n) {
u ||
(u = o.defer(function () {
(u = null), (t && t.value === n) || c(e);
}));
};
t.on("keydown", function (e) {
var t = e.keyCode;
91 === t ||
(t > 15 && 19 > t) ||
(t >= 37 && 40 >= t) ||
l(e, this, this.value);
}),
i.hasEvent("paste") && t.on("paste cut", l);
}
t.on("change", c),
Bo[a] &&
r.$$hasNativeValidators &&
a === n.type &&
t.on(Ho, function (e) {
if (!u) {
var t = this[Cr],
n = t.badInput,
r = t.typeMismatch;
u = o.defer(function () {
(u = null), (t.badInput === n && t.typeMismatch === r) || c(e);
});
}
}),
(r.$render = function () {
var e = r.$isEmpty(r.$viewValue) ? "" : r.$viewValue;
t.val() !== e && t.val(e);
});
}
function lr(e, t) {
if (C(e)) return e;
if (S(e)) {
_o.lastIndex = 0;
var n = _o.exec(e);
if (n) {
var r = +n[1],
i = +n[2],
o = 0,
a = 0,
s = 0,
u = 0,
c = Jn(r),
l = 7 * (i - 1);
return (
t &&
((o = t.getHours()),
(a = t.getMinutes()),
(s = t.getSeconds()),
(u = t.getMilliseconds())),
new Date(r, 0, c.getDate() + l, o, a, s, u)
);
}
}
return NaN;
}
function fr(e, t) {
return function (n, r) {
var i, a;
if (C(n)) return n;
if (S(n)) {
if (
('"' == n.charAt(0) &&
'"' == n.charAt(n.length - 1) &&
(n = n.substring(1, n.length - 1)),
Vo.test(n))
)
return new Date(n);
if (((e.lastIndex = 0), (i = e.exec(n))))
return (
i.shift(),
(a = r
? {
yyyy: r.getFullYear(),
MM: r.getMonth() + 1,
dd: r.getDate(),
HH: r.getHours(),
mm: r.getMinutes(),
ss: r.getSeconds(),
sss: r.getMilliseconds() / 1e3,
}
: { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }),
o(i, function (e, n) {
n < t.length && (a[t[n]] = +e);
}),
new Date(
a.yyyy,
a.MM - 1,
a.dd,
a.HH,
a.mm,
a.ss || 0,
1e3 * a.sss || 0
)
);
}
return NaN;
};
}
function hr(e, t, r, i) {
return function (o, a, s, u, c, l, f) {
function h(e) {
return e && !(e.getTime && e.getTime() !== e.getTime());
}
function p(e) {
return b(e) && !C(e) ? r(e) || n : e;
}
pr(o, a, s, u), cr(o, a, s, u, c, l);
var d,
$ = u && u.$options && u.$options.timezone;
if (
((u.$$parserName = e),
u.$parsers.push(function (e) {
if (u.$isEmpty(e)) return null;
if (t.test(e)) {
var i = r(e, d);
return $ && (i = Z(i, $)), i;
}
return n;
}),
u.$formatters.push(function (e) {
if (e && !C(e)) throw ma("datefmt", "Expected `{0}` to be a date", e);
return h(e)
? ((d = e), d && $ && (d = Z(d, $, !0)), f("date")(e, i, $))
: ((d = null), "");
}),
b(s.min) || s.ngMin)
) {
var v;
(u.$validators.min = function (e) {
return !h(e) || y(v) || r(e) >= v;
}),
s.$observe("min", function (e) {
(v = p(e)), u.$validate();
});
}
if (b(s.max) || s.ngMax) {
var m;
(u.$validators.max = function (e) {
return !h(e) || y(m) || r(e) <= m;
}),
s.$observe("max", function (e) {
(m = p(e)), u.$validate();
});
}
};
}
function pr(e, t, r, i) {
var o = t[0],
a = (i.$$hasNativeValidators = w(o.validity));
a &&
i.$parsers.push(function (e) {
var r = t.prop(Cr) || {};
return r.badInput && !r.typeMismatch ? n : e;
});
}
function dr(e, t, r, i, o, a) {
if (
(pr(e, t, r, i),
cr(e, t, r, i, o, a),
(i.$$parserName = "number"),
i.$parsers.push(function (e) {
return i.$isEmpty(e) ? null : Do.test(e) ? parseFloat(e) : n;
}),
i.$formatters.push(function (e) {
if (!i.$isEmpty(e)) {
if (!E(e)) throw ma("numfmt", "Expected `{0}` to be a number", e);
e = e.toString();
}
return e;
}),
b(r.min) || r.ngMin)
) {
var s;
(i.$validators.min = function (e) {
return i.$isEmpty(e) || y(s) || e >= s;
}),
r.$observe("min", function (e) {
b(e) && !E(e) && (e = parseFloat(e, 10)),
(s = E(e) && !isNaN(e) ? e : n),
i.$validate();
});
}
if (b(r.max) || r.ngMax) {
var u;
(i.$validators.max = function (e) {
return i.$isEmpty(e) || y(u) || u >= e;
}),
r.$observe("max", function (e) {
b(e) && !E(e) && (e = parseFloat(e, 10)),
(u = E(e) && !isNaN(e) ? e : n),
i.$validate();
});
}
}
function $r(e, t, n, r, i, o) {
cr(e, t, n, r, i, o),
sr(r),
(r.$$parserName = "url"),
(r.$validators.url = function (e, t) {
var n = e || t;
return r.$isEmpty(n) || Po.test(n);
});
}
function vr(e, t, n, r, i, o) {
cr(e, t, n, r, i, o),
sr(r),
(r.$$parserName = "email"),
(r.$validators.email = function (e, t) {
var n = e || t;
return r.$isEmpty(n) || Io.test(n);
});
}
function mr(e, t, n, r) {
y(n.name) && t.attr("name", u());
var i = function (e) {
t[0].checked && r.$setViewValue(n.value, e && e.type);
};
t.on("click", i),
(r.$render = function () {
var e = n.value;
t[0].checked = e == r.$viewValue;
}),
n.$observe("value", r.$render);
}
function gr(e, t, n, r, i) {
var o;
if (b(r)) {
if (((o = e(r)), !o.constant))
throw ma(
"constexpr",
"Expected constant expression for `{0}`, but saw `{1}`.",
n,
r
);
return o(t);
}
return i;
}
function yr(e, t, n, r, i, o, a, s) {
var u = gr(s, e, "ngTrueValue", n.ngTrueValue, !0),
c = gr(s, e, "ngFalseValue", n.ngFalseValue, !1),
l = function (e) {
r.$setViewValue(t[0].checked, e && e.type);
};
t.on("click", l),
(r.$render = function () {
t[0].checked = r.$viewValue;
}),
(r.$isEmpty = function (e) {
return e === !1;
}),
r.$formatters.push(function (e) {
return H(e, u);
}),
r.$parsers.push(function (e) {
return e ? u : c;
});
}
function br(e, t) {
return (
(e = "ngClass" + e),
[
"$animate",
function (n) {
function r(e, t) {
var n = [];
e: for (var r = 0; r < e.length; r++) {
for (var i = e[r], o = 0; o < t.length; o++)
if (i == t[o]) continue e;
n.push(i);
}
return n;
}
function i(e) {
var t = [];
return Lr(e)
? (o(e, function (e) {
t = t.concat(i(e));
}),
t)
: S(e)
? e.split(" ")
: w(e)
? (o(e, function (e, n) {
e && (t = t.concat(n.split(" ")));
}),
t)
: e;
}
return {
restrict: "AC",
link: function (a, s, u) {
function c(e) {
var t = f(e, 1);
u.$addClass(t);
}
function l(e) {
var t = f(e, -1);
u.$removeClass(t);
}
function f(e, t) {
var n = s.data("$classCounts") || ve(),
r = [];
return (
o(e, function (e) {
(t > 0 || n[e]) &&
((n[e] = (n[e] || 0) + t),
n[e] === +(t > 0) && r.push(e));
}),
s.data("$classCounts", n),
r.join(" ")
);
}
function h(e, t) {
var i = r(t, e),
o = r(e, t);
(i = f(i, 1)),
(o = f(o, -1)),
i && i.length && n.addClass(s, i),
o && o.length && n.removeClass(s, o);
}
function p(e) {
if (t === !0 || a.$index % 2 === t) {
var n = i(e || []);
if (d) {
if (!H(e, d)) {
var r = i(d);
h(r, n);
}
} else c(n);
}
d = U(e);
}
var d;
a.$watch(u[e], p, !0),
u.$observe("class", function (t) {
p(a.$eval(u[e]));
}),
"ngClass" !== e &&
a.$watch("$index", function (n, r) {
var o = 1 & n;
if (o !== (1 & r)) {
var s = i(a.$eval(u[e]));
o === t ? c(s) : l(s);
}
});
},
};
},
]
);
}
function wr(e) {
function t(e, t, u) {
y(t) ? r("$pending", e, u) : i("$pending", e, u),
V(t)
? t
? (f(s.$error, e, u), l(s.$$success, e, u))
: (l(s.$error, e, u), f(s.$$success, e, u))
: (f(s.$error, e, u), f(s.$$success, e, u)),
s.$pending
? (o(va, !0), (s.$valid = s.$invalid = n), a("", null))
: (o(va, !1),
(s.$valid = xr(s.$error)),
(s.$invalid = !s.$valid),
a("", s.$valid));
var c;
(c =
s.$pending && s.$pending[e]
? n
: s.$error[e]
? !1
: s.$$success[e]
? !0
: null),
a(e, c),
s.$$parentForm.$setValidity(e, c, s);
}
function r(e, t, n) {
s[e] || (s[e] = {}), l(s[e], t, n);
}
function i(e, t, r) {
s[e] && f(s[e], t, r), xr(s[e]) && (s[e] = n);
}
function o(e, t) {
t && !c[e]
? (h.addClass(u, e), (c[e] = !0))
: !t && c[e] && (h.removeClass(u, e), (c[e] = !1));
}
function a(e, t) {
(e = e ? "-" + ce(e, "-") : ""), o(la + e, t === !0), o(fa + e, t === !1);
}
var s = e.ctrl,
u = e.$element,
c = {},
l = e.set,
f = e.unset,
h = e.$animate;
(c[fa] = !(c[la] = u.hasClass(la))), (s.$setValidity = t);
}
function xr(e) {
if (e) for (var t in e) if (e.hasOwnProperty(t)) return !1;
return !0;
}
function Sr(e) {
e[0].hasAttribute("selected") && (e[0].selected = !0);
}
var Er = /^\/(.+)\/([a-z]*)$/,
Cr = "validity",
Ar = function (e) {
return S(e) ? e.toLowerCase() : e;
},
kr = Object.prototype.hasOwnProperty,
Or = function (e) {
return S(e) ? e.toUpperCase() : e;
},
Mr = function (e) {
return S(e)
? e.replace(/[A-Z]/g, function (e) {
return String.fromCharCode(32 | e.charCodeAt(0));
})
: e;
},
jr = function (e) {
return S(e)
? e.replace(/[a-z]/g, function (e) {
return String.fromCharCode(-33 & e.charCodeAt(0));
})
: e;
};
"i" !== "I".toLowerCase() && ((Ar = Mr), (Or = jr));
var Tr,
Nr,
Vr,
Pr,
Ir = [].slice,
Dr = [].splice,
Rr = [].push,
qr = Object.prototype.toString,
_r = Object.getPrototypeOf,
Fr = r("ng"),
Ur = e.angular || (e.angular = {}),
Hr = 0;
(Tr = t.documentMode), ($.$inject = []), (v.$inject = []);
var Br,
Lr = Array.isArray,
zr =
/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,
Wr = function (e) {
return S(e) ? e.trim() : e;
},
Gr = function (e) {
return e
.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1")
.replace(/\x08/g, "\\x08");
},
Jr = function () {
function e() {
try {
return new Function(""), !1;
} catch (e) {
return !0;
}
}
if (!b(Jr.rules)) {
var n = t.querySelector("[ng-csp]") || t.querySelector("[data-ng-csp]");
if (n) {
var r = n.getAttribute("ng-csp") || n.getAttribute("data-ng-csp");
Jr.rules = {
noUnsafeEval: !r || -1 !== r.indexOf("no-unsafe-eval"),
noInlineStyle: !r || -1 !== r.indexOf("no-inline-style"),
};
} else Jr.rules = { noUnsafeEval: e(), noInlineStyle: !1 };
}
return Jr.rules;
},
Yr = function () {
if (b(Yr.name_)) return Yr.name_;
var e,
n,
r,
i,
o = Zr.length;
for (n = 0; o > n; ++n)
if (
((r = Zr[n]),
(e = t.querySelector("[" + r.replace(":", "\\:") + "jq]")))
) {
i = e.getAttribute(r + "jq");
break;
}
return (Yr.name_ = i);
},
Kr = /:/g,
Zr = ["ng-", "data-ng-", "ng:", "x-ng-"],
Xr = /[A-Z]/g,
Qr = !1,
ei = 1,
ti = 2,
ni = 3,
ri = 8,
ii = 9,
oi = 11,
ai = {
full: "1.4.10",
major: 1,
minor: 4,
dot: 10,
codeName: "benignant-oscillation",
};
Me.expando = "ng339";
var si = (Me.cache = {}),
ui = 1,
ci = function (e, t, n) {
e.addEventListener(t, n, !1);
},
li = function (e, t, n) {
e.removeEventListener(t, n, !1);
};
Me._data = function (e) {
return this.cache[e[this.expando]] || {};
};
var fi = /([\:\-\_]+(.))/g,
hi = /^moz([A-Z])/,
pi = { mouseleave: "mouseout", mouseenter: "mouseover" },
di = r("jqLite"),
$i = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,
vi = /<|&#?\w+;/,
mi = /<([\w:-]+)/,
gi =
/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
yi = {
option: [1, '<select multiple="multiple">', "</select>"],
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""],
};
(yi.optgroup = yi.option),
(yi.tbody = yi.tfoot = yi.colgroup = yi.caption = yi.thead),
(yi.th = yi.td);
var bi =
Node.prototype.contains ||
function (e) {
return !!(16 & this.compareDocumentPosition(e));
},
wi = (Me.prototype = {
ready: function (n) {
function r() {
i || ((i = !0), n());
}
var i = !1;
"complete" === t.readyState
? setTimeout(r)
: (this.on("DOMContentLoaded", r), Me(e).on("load", r));
},
toString: function () {
var e = [];
return (
o(this, function (t) {
e.push("" + t);
}),
"[" + e.join(", ") + "]"
);
},
eq: function (e) {
return Nr(e >= 0 ? this[e] : this[this.length + e]);
},
length: 0,
push: Rr,
sort: [].sort,
splice: [].splice,
}),
xi = {};
o(
"multiple,selected,checked,disabled,readOnly,required,open".split(","),
function (e) {
xi[Ar(e)] = e;
}
);
var Si = {};
o(
"input,select,option,textarea,button,form,details".split(","),
function (e) {
Si[e] = !0;
}
);
var Ei = {
ngMinlength: "minlength",
ngMaxlength: "maxlength",
ngMin: "min",
ngMax: "max",
ngPattern: "pattern",
};
o({ data: Ie, removeData: Ve, hasData: Ce }, function (e, t) {
Me[t] = e;
}),
o(
{
data: Ie,
inheritedData: Ue,
scope: function (e) {
return (
Nr.data(e, "$scope") ||
Ue(e.parentNode || e, ["$isolateScope", "$scope"])
);
},
isolateScope: function (e) {
return (
Nr.data(e, "$isolateScope") || Nr.data(e, "$isolateScopeNoTemplate")
);
},
controller: Fe,
injector: function (e) {
return Ue(e, "$injector");
},
removeAttr: function (e, t) {
e.removeAttribute(t);
},
hasClass: De,
css: function (e, t, n) {
return (t = xe(t)), b(n) ? void (e.style[t] = n) : e.style[t];
},
attr: function (e, t, r) {
var i = e.nodeType;
if (i !== ni && i !== ti && i !== ri) {
var o = Ar(t);
if (xi[o]) {
if (!b(r))
return e[t] || (e.attributes.getNamedItem(t) || $).specified
? o
: n;
r
? ((e[t] = !0), e.setAttribute(t, o))
: ((e[t] = !1), e.removeAttribute(o));
} else if (b(r)) e.setAttribute(t, r);
else if (e.getAttribute) {
var a = e.getAttribute(t, 2);
return null === a ? n : a;
}
}
},
prop: function (e, t, n) {
return b(n) ? void (e[t] = n) : e[t];
},
text: (function () {
function e(e, t) {
if (y(t)) {
var n = e.nodeType;
return n === ei || n === ni ? e.textContent : "";
}
e.textContent = t;
}
return (e.$dv = ""), e;
})(),
val: function (e, t) {
if (y(t)) {
if (e.multiple && "select" === q(e)) {
var n = [];
return (
o(e.options, function (e) {
e.selected && n.push(e.value || e.text);
}),
0 === n.length ? null : n
);
}
return e.value;
}
e.value = t;
},
html: function (e, t) {
return y(t) ? e.innerHTML : (Te(e, !0), void (e.innerHTML = t));
},
empty: He,
},
function (e, t) {
Me.prototype[t] = function (t, n) {
var r,
i,
o = this.length;
if (e !== He && y(2 == e.length && e !== De && e !== Fe ? t : n)) {
if (w(t)) {
for (r = 0; o > r; r++)
if (e === Ie) e(this[r], t);
else for (i in t) e(this[r], i, t[i]);
return this;
}
for (
var a = e.$dv, s = y(a) ? Math.min(o, 1) : o, u = 0;
s > u;
u++
) {
var c = e(this[u], t, n);
a = a ? a + c : c;
}
return a;
}
for (r = 0; o > r; r++) e(this[r], t, n);
return this;
};
}
),
o(
{
removeData: Ve,
on: function (e, t, r, i) {
if (b(i))
throw di(
"onargs",
"jqLite#on() does not support the `selector` or `eventData` parameters"
);
if (Ee(e)) {
var o = Pe(e, !0),
a = o.events,
s = o.handle;
s || (s = o.handle = Ge(e, a));
for (
var u = t.indexOf(" ") >= 0 ? t.split(" ") : [t],
c = u.length,
l = function (t, n, i) {
var o = a[t];
o ||
((o = a[t] = []),
(o.specialHandlerWrapper = n),
"$destroy" === t || i || ci(e, t, s)),
o.push(r);
};
c--;
)
(t = u[c]), pi[t] ? (l(pi[t], Ye), l(t, n, !0)) : l(t);
}
},
off: Ne,
one: function (e, t, n) {
(e = Nr(e)),
e.on(t, function r() {
e.off(t, n), e.off(t, r);
}),
e.on(t, n);
},
replaceWith: function (e, t) {
var n,
r = e.parentNode;
Te(e),
o(new Me(t), function (t) {
n ? r.insertBefore(t, n.nextSibling) : r.replaceChild(t, e),
(n = t);
});
},
children: function (e) {
var t = [];
return (
o(e.childNodes, function (e) {
e.nodeType === ei && t.push(e);
}),
t
);
},
contents: function (e) {
return e.contentDocument || e.childNodes || [];
},
append: function (e, t) {
var n = e.nodeType;
if (n === ei || n === oi) {
t = new Me(t);
for (var r = 0, i = t.length; i > r; r++) {
var o = t[r];
e.appendChild(o);
}
}
},
prepend: function (e, t) {
if (e.nodeType === ei) {
var n = e.firstChild;
o(new Me(t), function (t) {
e.insertBefore(t, n);
});
}
},
wrap: function (e, t) {
Oe(e, Nr(t).eq(0).clone()[0]);
},
remove: Be,
detach: function (e) {
Be(e, !0);
},
after: function (e, t) {
var n = e,
r = e.parentNode;
t = new Me(t);
for (var i = 0, o = t.length; o > i; i++) {
var a = t[i];
r.insertBefore(a, n.nextSibling), (n = a);
}
},
addClass: qe,
removeClass: Re,
toggleClass: function (e, t, n) {
t &&
o(t.split(" "), function (t) {
var r = n;
y(r) && (r = !De(e, t)), (r ? qe : Re)(e, t);
});
},
parent: function (e) {
var t = e.parentNode;
return t && t.nodeType !== oi ? t : null;
},
next: function (e) {
return e.nextElementSibling;
},
find: function (e, t) {
return e.getElementsByTagName ? e.getElementsByTagName(t) : [];
},
clone: je,
triggerHandler: function (e, t, n) {
var r,
i,
a,
s = t.type || t,
u = Pe(e),
c = u && u.events,
l = c && c[s];
l &&
((r = {
preventDefault: function () {
this.defaultPrevented = !0;
},
isDefaultPrevented: function () {
return this.defaultPrevented === !0;
},
stopImmediatePropagation: function () {
this.immediatePropagationStopped = !0;
},
isImmediatePropagationStopped: function () {
return this.immediatePropagationStopped === !0;
},
stopPropagation: $,
type: s,
target: e,
}),
t.type && (r = f(r, t)),
(i = U(l)),
(a = n ? [r].concat(n) : [r]),
o(i, function (t) {
r.isImmediatePropagationStopped() || t.apply(e, a);
}));
},
},
function (e, t) {
(Me.prototype[t] = function (t, n, r) {
for (var i, o = 0, a = this.length; a > o; o++)
y(i)
? ((i = e(this[o], t, n, r)), b(i) && (i = Nr(i)))
: _e(i, e(this[o], t, n, r));
return b(i) ? i : this;
}),
(Me.prototype.bind = Me.prototype.on),
(Me.prototype.unbind = Me.prototype.off);
}
),
(Xe.prototype = {
put: function (e, t) {
this[Ze(e, this.nextUid)] = t;
},
get: function (e) {
return this[Ze(e, this.nextUid)];
},
remove: function (e) {
var t = this[(e = Ze(e, this.nextUid))];
return delete this[e], t;
},
});
var Ci = [
function () {
this.$get = [
function () {
return Xe;
},
];
},
],
Ai = /^[^\(]*\(\s*([^\)]*)\)/m,
ki = /,/,
Oi = /^\s*(_?)(\S+?)\1\s*$/,
Mi = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,
ji = r("$injector");
tt.$$annotate = et;
var Ti = r("$animate"),
Ni = 1,
Vi = "ng-animate",
Pi = function () {
this.$get = function () {};
},
Ii = function () {
var e = new Xe(),
t = [];
this.$get = [
"$$AnimateRunner",
"$rootScope",
function (n, r) {
function i(e, t, n) {
var r = !1;
return (
t &&
((t = S(t) ? t.split(" ") : Lr(t) ? t : []),
o(t, function (t) {
t && ((r = !0), (e[t] = n));
})),
r
);
}
function a() {
o(t, function (t) {
var n = e.get(t);
if (n) {
var r = ot(t.attr("class")),
i = "",
a = "";
o(n, function (e, t) {
var n = !!r[t];
e !== n &&
(e
? (i += (i.length ? " " : "") + t)
: (a += (a.length ? " " : "") + t));
}),
o(t, function (e) {
i && qe(e, i), a && Re(e, a);
}),
e.remove(t);
}
}),
(t.length = 0);
}
function s(n, o, s) {
var u = e.get(n) || {},
c = i(u, o, !0),
l = i(u, s, !1);
(c || l) &&
(e.put(n, u), t.push(n), 1 === t.length && r.$$postDigest(a));
}
return {
enabled: $,
on: $,
off: $,
pin: $,
push: function (e, t, r, i) {
i && i(),
(r = r || {}),
r.from && e.css(r.from),
r.to && e.css(r.to),
(r.addClass || r.removeClass) &&
s(e, r.addClass, r.removeClass);
var o = new n();
return o.complete(), o;
},
};
},
];
},
Di = [
"$provide",
function (e) {
var t = this;
(this.$$registeredAnimations = Object.create(null)),
(this.register = function (n, r) {
if (n && "." !== n.charAt(0))
throw Ti(
"notcsel",
"Expecting class selector starting with '.' got '{0}'.",
n
);
var i = n + "-animation";
(t.$$registeredAnimations[n.substr(1)] = i), e.factory(i, r);
}),
(this.classNameFilter = function (e) {
if (
1 === arguments.length &&
((this.$$classNameFilter = e instanceof RegExp ? e : null),
this.$$classNameFilter)
) {
var t = new RegExp("(\\s+|\\/)" + Vi + "(\\s+|\\/)");
if (t.test(this.$$classNameFilter.toString()))
throw Ti(
"nongcls",
'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',
Vi
);
}
return this.$$classNameFilter;
}),
(this.$get = [
"$$animateQueue",
function (e) {
function t(e, t, n) {
if (n) {
var r = it(n);
!r || r.parentNode || r.previousElementSibling || (n = null);
}
n ? n.after(e) : t.prepend(e);
}
return {
on: e.on,
off: e.off,
pin: e.pin,
enabled: e.enabled,
cancel: function (e) {
e.end && e.end();
},
enter: function (n, r, i, o) {
return (
(r = r && Nr(r)),
(i = i && Nr(i)),
(r = r || i.parent()),
t(n, r, i),
e.push(n, "enter", at(o))
);
},
move: function (n, r, i, o) {
return (
(r = r && Nr(r)),
(i = i && Nr(i)),
(r = r || i.parent()),
t(n, r, i),
e.push(n, "move", at(o))
);
},
leave: function (t, n) {
return e.push(t, "leave", at(n), function () {
t.remove();
});
},
addClass: function (t, n, r) {
return (
(r = at(r)),
(r.addClass = rt(r.addclass, n)),
e.push(t, "addClass", r)
);
},
removeClass: function (t, n, r) {
return (
(r = at(r)),
(r.removeClass = rt(r.removeClass, n)),
e.push(t, "removeClass", r)
);
},
setClass: function (t, n, r, i) {
return (
(i = at(i)),
(i.addClass = rt(i.addClass, n)),
(i.removeClass = rt(i.removeClass, r)),
e.push(t, "setClass", i)
);
},
animate: function (t, n, r, i, o) {
return (
(o = at(o)),
(o.from = o.from ? f(o.from, n) : n),
(o.to = o.to ? f(o.to, r) : r),
(i = i || "ng-inline-animate"),
(o.tempClasses = rt(o.tempClasses, i)),
e.push(t, "animate", o)
);
},
};
},
]);
},
],
Ri = function () {
this.$get = [
"$$rAF",
function (e) {
function t(t) {
n.push(t),
n.length > 1 ||
e(function () {
for (var e = 0; e < n.length; e++) n[e]();
n = [];
});
}
var n = [];
return function () {
var e = !1;
return (
t(function () {
e = !0;
}),
function (n) {
e ? n() : t(n);
}
);
};
},
];
},
qi = function () {
this.$get = [
"$q",
"$sniffer",
"$$animateAsyncRun",
"$document",
"$timeout",
function (e, t, n, r, i) {
function a(e) {
this.setHost(e);
var t = n(),
o = function (e) {
i(e, 0, !1);
};
(this._doneCallbacks = []),
(this._tick = function (e) {
var n = r[0];
n && n.hidden ? o(e) : t(e);
}),
(this._state = 0);
}
var s = 0,
u = 1,
c = 2;
return (
(a.chain = function (e, t) {
function n() {
return r === e.length
? void t(!0)
: void e[r](function (e) {
return e === !1 ? void t(!1) : (r++, void n());
});
}
var r = 0;
n();
}),
(a.all = function (e, t) {
function n(n) {
(i = i && n), ++r === e.length && t(i);
}
var r = 0,
i = !0;
o(e, function (e) {
e.done(n);
});
}),
(a.prototype = {
setHost: function (e) {
this.host = e || {};
},
done: function (e) {
this._state === c ? e() : this._doneCallbacks.push(e);
},
progress: $,
getPromise: function () {
if (!this.promise) {
var t = this;
this.promise = e(function (e, n) {
t.done(function (t) {
t === !1 ? n() : e();
});
});
}
return this.promise;
},
then: function (e, t) {
return this.getPromise().then(e, t);
},
catch: function (e) {
return this.getPromise()["catch"](e);
},
finally: function (e) {
return this.getPromise()["finally"](e);
},
pause: function () {
this.host.pause && this.host.pause();
},
resume: function () {
this.host.resume && this.host.resume();
},
end: function () {
this.host.end && this.host.end(), this._resolve(!0);
},
cancel: function () {
this.host.cancel && this.host.cancel(), this._resolve(!1);
},
complete: function (e) {
var t = this;
t._state === s &&
((t._state = u),
t._tick(function () {
t._resolve(e);
}));
},
_resolve: function (e) {
this._state !== c &&
(o(this._doneCallbacks, function (t) {
t(e);
}),
(this._doneCallbacks.length = 0),
(this._state = c));
},
}),
a
);
},
];
},
_i = function () {
this.$get = [
"$$rAF",
"$q",
"$$AnimateRunner",
function (e, t, n) {
return function (t, r) {
function i() {
return (
e(function () {
o(), s || u.complete(), (s = !0);
}),
u
);
}
function o() {
a.addClass && (t.addClass(a.addClass), (a.addClass = null)),
a.removeClass &&
(t.removeClass(a.removeClass), (a.removeClass = null)),
a.to && (t.css(a.to), (a.to = null));
}
var a = r || {};
a.$$prepared || (a = F(a)),
a.cleanupStyles && (a.from = a.to = null),
a.from && (t.css(a.from), (a.from = null));
var s,
u = new n();
return { start: i, end: i };
};
},
];
},
Fi = r("$compile");
ft.$inject = ["$provide", "$$sanitizeUriProvider"];
var Ui = /^((?:x|data)[\:\-_])/i,
Hi = r("$controller"),
Bi = /^(\S+)(\s+as\s+([\w$]+))?$/,
Li = function () {
this.$get = [
"$document",
function (e) {
return function (t) {
return (
t
? !t.nodeType && t instanceof Nr && (t = t[0])
: (t = e[0].body),
t.offsetWidth + 1
);
};
},
];
},
zi = "application/json",
Wi = { "Content-Type": zi + ";charset=utf-8" },
Gi = /^\[|^\{(?!\{)/,
Ji = { "[": /]$/, "{": /}$/ },
Yi = /^\)\]\}',?\n/,
Ki = r("$http"),
Zi = function (e) {
return function () {
throw Ki(
"legacy",
"The method `{0}` on the promise returned from `$http` has been disabled.",
e
);
};
},
Xi = (Ur.$interpolateMinErr = r("$interpolate"));
(Xi.throwNoconcat = function (e) {
throw Xi(
"noconcat",
"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See https://docs.angularjs.org/api/ng.$sce",
e
);
}),
(Xi.interr = function (e, t) {
return Xi("interr", "Can't interpolate: {0}\n{1}", e, t.toString());
});
var Qi = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
eo = { http: 80, https: 443, ftp: 21 },
to = r("$location"),
no = {
$$html5: !1,
$$replace: !1,
absUrl: zt("$$absUrl"),
url: function (e) {
if (y(e)) return this.$$url;
var t = Qi.exec(e);
return (
(t[1] || "" === e) && this.path(decodeURIComponent(t[1])),
(t[2] || t[1] || "" === e) && this.search(t[3] || ""),
this.hash(t[5] || ""),
this
);
},
protocol: zt("$$protocol"),
host: zt("$$host"),
port: zt("$$port"),
path: Wt("$$path", function (e) {
return (
(e = null !== e ? e.toString() : ""), "/" == e.charAt(0) ? e : "/" + e
);
}),
search: function (e, t) {
switch (arguments.length) {
case 0:
return this.$$search;
case 1:
if (S(e) || E(e)) (e = e.toString()), (this.$$search = ee(e));
else {
if (!w(e))
throw to(
"isrcharg",
"The first argument of the `$location#search()` call must be a string or an object."
);
(e = F(e, {})),
o(e, function (t, n) {
null == t && delete e[n];
}),
(this.$$search = e);
}
break;
default:
y(t) || null === t
? delete this.$$search[e]
: (this.$$search[e] = t);
}
return this.$$compose(), this;
},
hash: Wt("$$hash", function (e) {
return null !== e ? e.toString() : "";
}),
replace: function () {
return (this.$$replace = !0), this;
},
};
o([Lt, Bt, Ht], function (e) {
(e.prototype = Object.create(no)),
(e.prototype.state = function (t) {
if (!arguments.length) return this.$$state;
if (e !== Ht || !this.$$html5)
throw to(
"nostate",
"History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API"
);
return (this.$$state = y(t) ? null : t), this;
});
});
var ro = r("$parse"),
io = Function.prototype.call,
oo = Function.prototype.apply,
ao = Function.prototype.bind,
so = ve();
o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "), function (e) {
so[e] = !0;
});
var uo = { n: "\n", f: "\f", r: "\r", t: " ", v: "\x0B", "'": "'", '"': '"' },
co = function (e) {
this.options = e;
};
co.prototype = {
constructor: co,
lex: function (e) {
for (
this.text = e, this.index = 0, this.tokens = [];
this.index < this.text.length;
) {
var t = this.text.charAt(this.index);
if ('"' === t || "'" === t) this.readString(t);
else if (this.isNumber(t) || ("." === t && this.isNumber(this.peek())))
this.readNumber();
else if (this.isIdent(t)) this.readIdent();
else if (this.is(t, "(){}[].,;:?"))
this.tokens.push({ index: this.index, text: t }), this.index++;
else if (this.isWhitespace(t)) this.index++;
else {
var n = t + this.peek(),
r = n + this.peek(2),
i = so[t],
o = so[n],
a = so[r];
if (i || o || a) {
var s = a ? r : o ? n : t;
this.tokens.push({ index: this.index, text: s, operator: !0 }),
(this.index += s.length);
} else
this.throwError(
"Unexpected next character ",
this.index,
this.index + 1
);
}
}
return this.tokens;
},
is: function (e, t) {
return -1 !== t.indexOf(e);
},
peek: function (e) {
var t = e || 1;
return this.index + t < this.text.length
? this.text.charAt(this.index + t)
: !1;
},
isNumber: function (e) {
return e >= "0" && "9" >= e && "string" == typeof e;
},
isWhitespace: function (e) {
return (
" " === e ||
"\r" === e ||
" " === e ||
"\n" === e ||
"\x0B" === e ||
" " === e
);
},
isIdent: function (e) {
return (
(e >= "a" && "z" >= e) ||
(e >= "A" && "Z" >= e) ||
"_" === e ||
"$" === e
);
},
isExpOperator: function (e) {
return "-" === e || "+" === e || this.isNumber(e);
},
throwError: function (e, t, n) {
n = n || this.index;
var r = b(t)
? "s " + t + "-" + this.index + " [" + this.text.substring(t, n) + "]"
: " " + n;
throw ro(
"lexerr",
"Lexer Error: {0} at column{1} in expression [{2}].",
e,
r,
this.text
);
},
readNumber: function () {
for (var e = "", t = this.index; this.index < this.text.length; ) {
var n = Ar(this.text.charAt(this.index));
if ("." == n || this.isNumber(n)) e += n;
else {
var r = this.peek();
if ("e" == n && this.isExpOperator(r)) e += n;
else if (
this.isExpOperator(n) &&
r &&
this.isNumber(r) &&
"e" == e.charAt(e.length - 1)
)
e += n;
else {
if (
!this.isExpOperator(n) ||
(r && this.isNumber(r)) ||
"e" != e.charAt(e.length - 1)
)
break;
this.throwError("Invalid exponent");
}
}
this.index++;
}
this.tokens.push({ index: t, text: e, constant: !0, value: Number(e) });
},
readIdent: function () {
for (var e = this.index; this.index < this.text.length; ) {
var t = this.text.charAt(this.index);
if (!this.isIdent(t) && !this.isNumber(t)) break;
this.index++;
}
this.tokens.push({
index: e,
text: this.text.slice(e, this.index),
identifier: !0,
});
},
readString: function (e) {
var t = this.index;
this.index++;
for (var n = "", r = e, i = !1; this.index < this.text.length; ) {
var o = this.text.charAt(this.index);
if (((r += o), i)) {
if ("u" === o) {
var a = this.text.substring(this.index + 1, this.index + 5);
a.match(/[\da-f]{4}/i) ||
this.throwError("Invalid unicode escape [\\u" + a + "]"),
(this.index += 4),
(n += String.fromCharCode(parseInt(a, 16)));
} else {
var s = uo[o];
n += s || o;
}
i = !1;
} else if ("\\" === o) i = !0;
else {
if (o === e)
return (
this.index++,
void this.tokens.push({
index: t,
text: r,
constant: !0,
value: n,
})
);
n += o;
}
this.index++;
}
this.throwError("Unterminated quote", t);
},
};
var lo = function (e, t) {
(this.lexer = e), (this.options = t);
};
(lo.Program = "Program"),
(lo.ExpressionStatement = "ExpressionStatement"),
(lo.AssignmentExpression = "AssignmentExpression"),
(lo.ConditionalExpression = "ConditionalExpression"),
(lo.LogicalExpression = "LogicalExpression"),
(lo.BinaryExpression = "BinaryExpression"),
(lo.UnaryExpression = "UnaryExpression"),
(lo.CallExpression = "CallExpression"),
(lo.MemberExpression = "MemberExpression"),
(lo.Identifier = "Identifier"),
(lo.Literal = "Literal"),
(lo.ArrayExpression = "ArrayExpression"),
(lo.Property = "Property"),
(lo.ObjectExpression = "ObjectExpression"),
(lo.ThisExpression = "ThisExpression"),
(lo.NGValueParameter = "NGValueParameter"),
(lo.prototype = {
ast: function (e) {
(this.text = e), (this.tokens = this.lexer.lex(e));
var t = this.program();
return (
0 !== this.tokens.length &&
this.throwError("is an unexpected token", this.tokens[0]),
t
);
},
program: function () {
for (var e = []; ; )
if (
(this.tokens.length > 0 &&
!this.peek("}", ")", ";", "]") &&
e.push(this.expressionStatement()),
!this.expect(";"))
)
return { type: lo.Program, body: e };
},
expressionStatement: function () {
return { type: lo.ExpressionStatement, expression: this.filterChain() };
},
filterChain: function () {
for (var e, t = this.expression(); (e = this.expect("|")); )
t = this.filter(t);
return t;
},
expression: function () {
return this.assignment();
},
assignment: function () {
var e = this.ternary();
return (
this.expect("=") &&
(e = {
type: lo.AssignmentExpression,
left: e,
right: this.assignment(),
operator: "=",
}),
e
);
},
ternary: function () {
var e,
t,
n = this.logicalOR();
return this.expect("?") && ((e = this.expression()), this.consume(":"))
? ((t = this.expression()),
{
type: lo.ConditionalExpression,
test: n,
alternate: e,
consequent: t,
})
: n;
},
logicalOR: function () {
for (var e = this.logicalAND(); this.expect("||"); )
e = {
type: lo.LogicalExpression,
operator: "||",
left: e,
right: this.logicalAND(),
};
return e;
},
logicalAND: function () {
for (var e = this.equality(); this.expect("&&"); )
e = {
type: lo.LogicalExpression,
operator: "&&",
left: e,
right: this.equality(),
};
return e;
},
equality: function () {
for (
var e, t = this.relational();
(e = this.expect("==", "!=", "===", "!=="));
)
t = {
type: lo.BinaryExpression,
operator: e.text,
left: t,
right: this.relational(),
};
return t;
},
relational: function () {
for (
var e, t = this.additive();
(e = this.expect("<", ">", "<=", ">="));
)
t = {
type: lo.BinaryExpression,
operator: e.text,
left: t,
right: this.additive(),
};
return t;
},
additive: function () {
for (var e, t = this.multiplicative(); (e = this.expect("+", "-")); )
t = {
type: lo.BinaryExpression,
operator: e.text,
left: t,
right: this.multiplicative(),
};
return t;
},
multiplicative: function () {
for (var e, t = this.unary(); (e = this.expect("*", "/", "%")); )
t = {
type: lo.BinaryExpression,
operator: e.text,
left: t,
right: this.unary(),
};
return t;
},
unary: function () {
var e;
return (e = this.expect("+", "-", "!"))
? {
type: lo.UnaryExpression,
operator: e.text,
prefix: !0,
argument: this.unary(),
}
: this.primary();
},
primary: function () {
var e;
this.expect("(")
? ((e = this.filterChain()), this.consume(")"))
: this.expect("[")
? (e = this.arrayDeclaration())
: this.expect("{")
? (e = this.object())
: this.constants.hasOwnProperty(this.peek().text)
? (e = F(this.constants[this.consume().text]))
: this.peek().identifier
? (e = this.identifier())
: this.peek().constant
? (e = this.constant())
: this.throwError("not a primary expression", this.peek());
for (var t; (t = this.expect("(", "[", ".")); )
"(" === t.text
? ((e = {
type: lo.CallExpression,
callee: e,
arguments: this.parseArguments(),
}),
this.consume(")"))
: "[" === t.text
? ((e = {
type: lo.MemberExpression,
object: e,
property: this.expression(),
computed: !0,
}),
this.consume("]"))
: "." === t.text
? (e = {
type: lo.MemberExpression,
object: e,
property: this.identifier(),
computed: !1,
})
: this.throwError("IMPOSSIBLE");
return e;
},
filter: function (e) {
for (
var t = [e],
n = {
type: lo.CallExpression,
callee: this.identifier(),
arguments: t,
filter: !0,
};
this.expect(":");
)
t.push(this.expression());
return n;
},
parseArguments: function () {
var e = [];
if (")" !== this.peekToken().text)
do e.push(this.expression());
while (this.expect(","));
return e;
},
identifier: function () {
var e = this.consume();
return (
e.identifier || this.throwError("is not a valid identifier", e),
{ type: lo.Identifier, name: e.text }
);
},
constant: function () {
return { type: lo.Literal, value: this.consume().value };
},
arrayDeclaration: function () {
var e = [];
if ("]" !== this.peekToken().text)
do {
if (this.peek("]")) break;
e.push(this.expression());
} while (this.expect(","));
return this.consume("]"), { type: lo.ArrayExpression, elements: e };
},
object: function () {
var e,
t = [];
if ("}" !== this.peekToken().text)
do {
if (this.peek("}")) break;
(e = { type: lo.Property, kind: "init" }),
this.peek().constant
? (e.key = this.constant())
: this.peek().identifier
? (e.key = this.identifier())
: this.throwError("invalid key", this.peek()),
this.consume(":"),
(e.value = this.expression()),
t.push(e);
} while (this.expect(","));
return this.consume("}"), { type: lo.ObjectExpression, properties: t };
},
throwError: function (e, t) {
throw ro(
"syntax",
"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",
t.text,
e,
t.index + 1,
this.text,
this.text.substring(t.index)
);
},
consume: function (e) {
if (0 === this.tokens.length)
throw ro("ueoe", "Unexpected end of expression: {0}", this.text);
var t = this.expect(e);
return (
t ||
this.throwError(
"is unexpected, expecting [" + e + "]",
this.peek()
),
t
);
},
peekToken: function () {
if (0 === this.tokens.length)
throw ro("ueoe", "Unexpected end of expression: {0}", this.text);
return this.tokens[0];
},
peek: function (e, t, n, r) {
return this.peekAhead(0, e, t, n, r);
},
peekAhead: function (e, t, n, r, i) {
if (this.tokens.length > e) {
var o = this.tokens[e],
a = o.text;
if (
a === t ||
a === n ||
a === r ||
a === i ||
(!t && !n && !r && !i)
)
return o;
}
return !1;
},
expect: function (e, t, n, r) {
var i = this.peek(e, t, n, r);
return i ? (this.tokens.shift(), i) : !1;
},
constants: {
true: { type: lo.Literal, value: !0 },
false: { type: lo.Literal, value: !1 },
null: { type: lo.Literal, value: null },
undefined: { type: lo.Literal, value: n },
this: { type: lo.ThisExpression },
},
}),
(ln.prototype = {
compile: function (e, t) {
var r = this,
i = this.astBuilder.ast(e);
(this.state = {
nextId: 0,
filters: {},
expensiveChecks: t,
fn: { vars: [], body: [], own: {} },
assign: { vars: [], body: [], own: {} },
inputs: [],
}),
rn(i, r.$filter);
var a,
s = "";
if (((this.stage = "assign"), (a = sn(i)))) {
this.state.computing = "assign";
var u = this.nextId();
this.recurse(a, u),
this.return_(u),
(s = "fn.assign=" + this.generateFunction("assign", "s,v,l"));
}
var c = on(i.body);
(r.stage = "inputs"),
o(c, function (e, t) {
var n = "fn" + t;
(r.state[n] = { vars: [], body: [], own: {} }),
(r.state.computing = n);
var i = r.nextId();
r.recurse(e, i),
r.return_(i),
r.state.inputs.push(n),
(e.watchId = t);
}),
(this.state.computing = "fn"),
(this.stage = "main"),
this.recurse(i);
var l =
'"' +
this.USE +
" " +
this.STRICT +
'";\n' +
this.filterPrefix() +
"var fn=" +
this.generateFunction("fn", "s,l,a,i") +
s +
this.watchFns() +
"return fn;",
f = new Function(
"$filter",
"ensureSafeMemberName",
"ensureSafeObject",
"ensureSafeFunction",
"getStringValue",
"ensureSafeAssignContext",
"ifDefined",
"plus",
"text",
l
)(this.$filter, Yt, Zt, Xt, Kt, Qt, en, tn, e);
return (
(this.state = this.stage = n),
(f.literal = un(i)),
(f.constant = cn(i)),
f
);
},
USE: "use",
STRICT: "strict",
watchFns: function () {
var e = [],
t = this.state.inputs,
n = this;
return (
o(t, function (t) {
e.push("var " + t + "=" + n.generateFunction(t, "s"));
}),
t.length && e.push("fn.inputs=[" + t.join(",") + "];"),
e.join("")
);
},
generateFunction: function (e, t) {
return (
"function(" + t + "){" + this.varsPrefix(e) + this.body(e) + "};"
);
},
filterPrefix: function () {
var e = [],
t = this;
return (
o(this.state.filters, function (n, r) {
e.push(n + "=$filter(" + t.escape(r) + ")");
}),
e.length ? "var " + e.join(",") + ";" : ""
);
},
varsPrefix: function (e) {
return this.state[e].vars.length
? "var " + this.state[e].vars.join(",") + ";"
: "";
},
body: function (e) {
return this.state[e].body.join("");
},
recurse: function (e, t, r, i, a, s) {
var u,
c,
l,
f,
h = this;
if (((i = i || $), !s && b(e.watchId)))
return (
(t = t || this.nextId()),
void this.if_(
"i",
this.lazyAssign(t, this.computedMember("i", e.watchId)),
this.lazyRecurse(e, t, r, i, a, !0)
)
);
switch (e.type) {
case lo.Program:
o(e.body, function (t, r) {
h.recurse(t.expression, n, n, function (e) {
c = e;
}),
r !== e.body.length - 1
? h.current().body.push(c, ";")
: h.return_(c);
});
break;
case lo.Literal:
(f = this.escape(e.value)), this.assign(t, f), i(f);
break;
case lo.UnaryExpression:
this.recurse(e.argument, n, n, function (e) {
c = e;
}),
(f = e.operator + "(" + this.ifDefined(c, 0) + ")"),
this.assign(t, f),
i(f);
break;
case lo.BinaryExpression:
this.recurse(e.left, n, n, function (e) {
u = e;
}),
this.recurse(e.right, n, n, function (e) {
c = e;
}),
(f =
"+" === e.operator
? this.plus(u, c)
: "-" === e.operator
? this.ifDefined(u, 0) + e.operator + this.ifDefined(c, 0)
: "(" + u + ")" + e.operator + "(" + c + ")"),
this.assign(t, f),
i(f);
break;
case lo.LogicalExpression:
(t = t || this.nextId()),
h.recurse(e.left, t),
h.if_(
"&&" === e.operator ? t : h.not(t),
h.lazyRecurse(e.right, t)
),
i(t);
break;
case lo.ConditionalExpression:
(t = t || this.nextId()),
h.recurse(e.test, t),
h.if_(
t,
h.lazyRecurse(e.alternate, t),
h.lazyRecurse(e.consequent, t)
),
i(t);
break;
case lo.Identifier:
(t = t || this.nextId()),
r &&
((r.context =
"inputs" === h.stage
? "s"
: this.assign(
this.nextId(),
this.getHasOwnProperty("l", e.name) + "?l:s"
)),
(r.computed = !1),
(r.name = e.name)),
Yt(e.name),
h.if_(
"inputs" === h.stage || h.not(h.getHasOwnProperty("l", e.name)),
function () {
h.if_("inputs" === h.stage || "s", function () {
a &&
1 !== a &&
h.if_(
h.not(h.nonComputedMember("s", e.name)),
h.lazyAssign(h.nonComputedMember("s", e.name), "{}")
),
h.assign(t, h.nonComputedMember("s", e.name));
});
},
t && h.lazyAssign(t, h.nonComputedMember("l", e.name))
),
(h.state.expensiveChecks || hn(e.name)) &&
h.addEnsureSafeObject(t),
i(t);
break;
case lo.MemberExpression:
(u = (r && (r.context = this.nextId())) || this.nextId()),
(t = t || this.nextId()),
h.recurse(
e.object,
u,
n,
function () {
h.if_(
h.notNull(u),
function () {
a && 1 !== a && h.addEnsureSafeAssignContext(u),
e.computed
? ((c = h.nextId()),
h.recurse(e.property, c),
h.getStringValue(c),
h.addEnsureSafeMemberName(c),
a &&
1 !== a &&
h.if_(
h.not(h.computedMember(u, c)),
h.lazyAssign(h.computedMember(u, c), "{}")
),
(f = h.ensureSafeObject(h.computedMember(u, c))),
h.assign(t, f),
r && ((r.computed = !0), (r.name = c)))
: (Yt(e.property.name),
a &&
1 !== a &&
h.if_(
h.not(h.nonComputedMember(u, e.property.name)),
h.lazyAssign(
h.nonComputedMember(u, e.property.name),
"{}"
)
),
(f = h.nonComputedMember(u, e.property.name)),
(h.state.expensiveChecks || hn(e.property.name)) &&
(f = h.ensureSafeObject(f)),
h.assign(t, f),
r &&
((r.computed = !1), (r.name = e.property.name)));
},
function () {
h.assign(t, "undefined");
}
),
i(t);
},
!!a
);
break;
case lo.CallExpression:
(t = t || this.nextId()),
e.filter
? ((c = h.filter(e.callee.name)),
(l = []),
o(e.arguments, function (e) {
var t = h.nextId();
h.recurse(e, t), l.push(t);
}),
(f = c + "(" + l.join(",") + ")"),
h.assign(t, f),
i(t))
: ((c = h.nextId()),
(u = {}),
(l = []),
h.recurse(e.callee, c, u, function () {
h.if_(
h.notNull(c),
function () {
h.addEnsureSafeFunction(c),
o(e.arguments, function (e) {
h.recurse(e, h.nextId(), n, function (e) {
l.push(h.ensureSafeObject(e));
});
}),
u.name
? (h.state.expensiveChecks ||
h.addEnsureSafeObject(u.context),
(f =
h.member(u.context, u.name, u.computed) +
"(" +
l.join(",") +
")"))
: (f = c + "(" + l.join(",") + ")"),
(f = h.ensureSafeObject(f)),
h.assign(t, f);
},
function () {
h.assign(t, "undefined");
}
),
i(t);
}));
break;
case lo.AssignmentExpression:
if (((c = this.nextId()), (u = {}), !an(e.left)))
throw ro("lval", "Trying to assign a value to a non l-value");
this.recurse(
e.left,
n,
u,
function () {
h.if_(h.notNull(u.context), function () {
h.recurse(e.right, c),
h.addEnsureSafeObject(
h.member(u.context, u.name, u.computed)
),
h.addEnsureSafeAssignContext(u.context),
(f =
h.member(u.context, u.name, u.computed) + e.operator + c),
h.assign(t, f),
i(t || f);
});
},
1
);
break;
case lo.ArrayExpression:
(l = []),
o(e.elements, function (e) {
h.recurse(e, h.nextId(), n, function (e) {
l.push(e);
});
}),
(f = "[" + l.join(",") + "]"),
this.assign(t, f),
i(f);
break;
case lo.ObjectExpression:
(l = []),
o(e.properties, function (e) {
h.recurse(e.value, h.nextId(), n, function (t) {
l.push(
h.escape(
e.key.type === lo.Identifier
? e.key.name
: "" + e.key.value
) +
":" +
t
);
});
}),
(f = "{" + l.join(",") + "}"),
this.assign(t, f),
i(f);
break;
case lo.ThisExpression:
this.assign(t, "s"), i("s");
break;
case lo.NGValueParameter:
this.assign(t, "v"), i("v");
}
},
getHasOwnProperty: function (e, t) {
var n = e + "." + t,
r = this.current().own;
return (
r.hasOwnProperty(n) ||
(r[n] = this.nextId(
!1,
e + "&&(" + this.escape(t) + " in " + e + ")"
)),
r[n]
);
},
assign: function (e, t) {
return e ? (this.current().body.push(e, "=", t, ";"), e) : void 0;
},
filter: function (e) {
return (
this.state.filters.hasOwnProperty(e) ||
(this.state.filters[e] = this.nextId(!0)),
this.state.filters[e]
);
},
ifDefined: function (e, t) {
return "ifDefined(" + e + "," + this.escape(t) + ")";
},
plus: function (e, t) {
return "plus(" + e + "," + t + ")";
},
return_: function (e) {
this.current().body.push("return ", e, ";");
},
if_: function (e, t, n) {
if (e === !0) t();
else {
var r = this.current().body;
r.push("if(", e, "){"),
t(),
r.push("}"),
n && (r.push("else{"), n(), r.push("}"));
}
},
not: function (e) {
return "!(" + e + ")";
},
notNull: function (e) {
return e + "!=null";
},
nonComputedMember: function (e, t) {
return e + "." + t;
},
computedMember: function (e, t) {
return e + "[" + t + "]";
},
member: function (e, t, n) {
return n ? this.computedMember(e, t) : this.nonComputedMember(e, t);
},
addEnsureSafeObject: function (e) {
this.current().body.push(this.ensureSafeObject(e), ";");
},
addEnsureSafeMemberName: function (e) {
this.current().body.push(this.ensureSafeMemberName(e), ";");
},
addEnsureSafeFunction: function (e) {
this.current().body.push(this.ensureSafeFunction(e), ";");
},
addEnsureSafeAssignContext: function (e) {
this.current().body.push(this.ensureSafeAssignContext(e), ";");
},
ensureSafeObject: function (e) {
return "ensureSafeObject(" + e + ",text)";
},
ensureSafeMemberName: function (e) {
return "ensureSafeMemberName(" + e + ",text)";
},
ensureSafeFunction: function (e) {
return "ensureSafeFunction(" + e + ",text)";
},
getStringValue: function (e) {
this.assign(e, "getStringValue(" + e + ",text)");
},
ensureSafeAssignContext: function (e) {
return "ensureSafeAssignContext(" + e + ",text)";
},
lazyRecurse: function (e, t, n, r, i, o) {
var a = this;
return function () {
a.recurse(e, t, n, r, i, o);
};
},
lazyAssign: function (e, t) {
var n = this;
return function () {
n.assign(e, t);
};
},
stringEscapeRegex: /[^ a-zA-Z0-9]/g,
stringEscapeFn: function (e) {
return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4);
},
escape: function (e) {
if (S(e))
return (
"'" + e.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'"
);
if (E(e)) return e.toString();
if (e === !0) return "true";
if (e === !1) return "false";
if (null === e) return "null";
if ("undefined" == typeof e) return "undefined";
throw ro("esc", "IMPOSSIBLE");
},
nextId: function (e, t) {
var n = "v" + this.state.nextId++;
return e || this.current().vars.push(n + (t ? "=" + t : "")), n;
},
current: function () {
return this.state[this.state.computing];
},
}),
(fn.prototype = {
compile: function (e, t) {
var n = this,
r = this.astBuilder.ast(e);
(this.expression = e), (this.expensiveChecks = t), rn(r, n.$filter);
var i, a;
(i = sn(r)) && (a = this.recurse(i));
var s,
u = on(r.body);
u &&
((s = []),
o(u, function (e, t) {
var r = n.recurse(e);
(e.input = r), s.push(r), (e.watchId = t);
}));
var c = [];
o(r.body, function (e) {
c.push(n.recurse(e.expression));
});
var l =
0 === r.body.length
? function () {}
: 1 === r.body.length
? c[0]
: function (e, t) {
var n;
return (
o(c, function (r) {
n = r(e, t);
}),
n
);
};
return (
a &&
(l.assign = function (e, t, n) {
return a(e, n, t);
}),
s && (l.inputs = s),
(l.literal = un(r)),
(l.constant = cn(r)),
l
);
},
recurse: function (e, t, r) {
var i,
a,
s,
u = this;
if (e.input) return this.inputs(e.input, e.watchId);
switch (e.type) {
case lo.Literal:
return this.value(e.value, t);
case lo.UnaryExpression:
return (
(a = this.recurse(e.argument)), this["unary" + e.operator](a, t)
);
case lo.BinaryExpression:
return (
(i = this.recurse(e.left)),
(a = this.recurse(e.right)),
this["binary" + e.operator](i, a, t)
);
case lo.LogicalExpression:
return (
(i = this.recurse(e.left)),
(a = this.recurse(e.right)),
this["binary" + e.operator](i, a, t)
);
case lo.ConditionalExpression:
return this["ternary?:"](
this.recurse(e.test),
this.recurse(e.alternate),
this.recurse(e.consequent),
t
);
case lo.Identifier:
return (
Yt(e.name, u.expression),
u.identifier(
e.name,
u.expensiveChecks || hn(e.name),
t,
r,
u.expression
)
);
case lo.MemberExpression:
return (
(i = this.recurse(e.object, !1, !!r)),
e.computed ||
(Yt(e.property.name, u.expression), (a = e.property.name)),
e.computed && (a = this.recurse(e.property)),
e.computed
? this.computedMember(i, a, t, r, u.expression)
: this.nonComputedMember(
i,
a,
u.expensiveChecks,
t,
r,
u.expression
)
);
case lo.CallExpression:
return (
(s = []),
o(e.arguments, function (e) {
s.push(u.recurse(e));
}),
e.filter && (a = this.$filter(e.callee.name)),
e.filter || (a = this.recurse(e.callee, !0)),
e.filter
? function (e, r, i, o) {
for (var u = [], c = 0; c < s.length; ++c)
u.push(s[c](e, r, i, o));
var l = a.apply(n, u, o);
return t ? { context: n, name: n, value: l } : l;
}
: function (e, n, r, i) {
var o,
c = a(e, n, r, i);
if (null != c.value) {
Zt(c.context, u.expression), Xt(c.value, u.expression);
for (var l = [], f = 0; f < s.length; ++f)
l.push(Zt(s[f](e, n, r, i), u.expression));
o = Zt(c.value.apply(c.context, l), u.expression);
}
return t ? { value: o } : o;
}
);
case lo.AssignmentExpression:
return (
(i = this.recurse(e.left, !0, 1)),
(a = this.recurse(e.right)),
function (e, n, r, o) {
var s = i(e, n, r, o),
c = a(e, n, r, o);
return (
Zt(s.value, u.expression),
Qt(s.context),
(s.context[s.name] = c),
t ? { value: c } : c
);
}
);
case lo.ArrayExpression:
return (
(s = []),
o(e.elements, function (e) {
s.push(u.recurse(e));
}),
function (e, n, r, i) {
for (var o = [], a = 0; a < s.length; ++a)
o.push(s[a](e, n, r, i));
return t ? { value: o } : o;
}
);
case lo.ObjectExpression:
return (
(s = []),
o(e.properties, function (e) {
s.push({
key:
e.key.type === lo.Identifier
? e.key.name
: "" + e.key.value,
value: u.recurse(e.value),
});
}),
function (e, n, r, i) {
for (var o = {}, a = 0; a < s.length; ++a)
o[s[a].key] = s[a].value(e, n, r, i);
return t ? { value: o } : o;
}
);
case lo.ThisExpression:
return function (e) {
return t ? { value: e } : e;
};
case lo.NGValueParameter:
return function (e, n, r, i) {
return t ? { value: r } : r;
};
}
},
"unary+": function (e, t) {
return function (n, r, i, o) {
var a = e(n, r, i, o);
return (a = b(a) ? +a : 0), t ? { value: a } : a;
};
},
"unary-": function (e, t) {
return function (n, r, i, o) {
var a = e(n, r, i, o);
return (a = b(a) ? -a : 0), t ? { value: a } : a;
};
},
"unary!": function (e, t) {
return function (n, r, i, o) {
var a = !e(n, r, i, o);
return t ? { value: a } : a;
};
},
"binary+": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a),
u = t(r, i, o, a),
c = tn(s, u);
return n ? { value: c } : c;
};
},
"binary-": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a),
u = t(r, i, o, a),
c = (b(s) ? s : 0) - (b(u) ? u : 0);
return n ? { value: c } : c;
};
},
"binary*": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) * t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary/": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) / t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary%": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) % t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary===": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) === t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary!==": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) !== t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary==": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) == t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary!=": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) != t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary<": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) < t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary>": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) > t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary<=": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) <= t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary>=": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) >= t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary&&": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) && t(r, i, o, a);
return n ? { value: s } : s;
};
},
"binary||": function (e, t, n) {
return function (r, i, o, a) {
var s = e(r, i, o, a) || t(r, i, o, a);
return n ? { value: s } : s;
};
},
"ternary?:": function (e, t, n, r) {
return function (i, o, a, s) {
var u = e(i, o, a, s) ? t(i, o, a, s) : n(i, o, a, s);
return r ? { value: u } : u;
};
},
value: function (e, t) {
return function () {
return t ? { context: n, name: n, value: e } : e;
};
},
identifier: function (e, t, r, i, o) {
return function (a, s, u, c) {
var l = s && e in s ? s : a;
i && 1 !== i && l && !l[e] && (l[e] = {});
var f = l ? l[e] : n;
return t && Zt(f, o), r ? { context: l, name: e, value: f } : f;
};
},
computedMember: function (e, t, n, r, i) {
return function (o, a, s, u) {
var c,
l,
f = e(o, a, s, u);
return (
null != f &&
((c = t(o, a, s, u)),
(c = Kt(c)),
Yt(c, i),
r && 1 !== r && (Qt(f), f && !f[c] && (f[c] = {})),
(l = f[c]),
Zt(l, i)),
n ? { context: f, name: c, value: l } : l
);
};
},
nonComputedMember: function (e, t, r, i, o, a) {
return function (s, u, c, l) {
var f = e(s, u, c, l);
o && 1 !== o && (Qt(f), f && !f[t] && (f[t] = {}));
var h = null != f ? f[t] : n;
return (
(r || hn(t)) && Zt(h, a), i ? { context: f, name: t, value: h } : h
);
};
},
inputs: function (e, t) {
return function (n, r, i, o) {
return o ? o[t] : e(n, r, i);
};
},
});
var fo = function (e, t, n) {
(this.lexer = e),
(this.$filter = t),
(this.options = n),
(this.ast = new lo(this.lexer)),
(this.astCompiler = n.csp ? new fn(this.ast, t) : new ln(this.ast, t));
};
fo.prototype = {
constructor: fo,
parse: function (e) {
return this.astCompiler.compile(e, this.options.expensiveChecks);
},
};
var ho = Object.prototype.valueOf,
po = r("$sce"),
$o = {
HTML: "html",
CSS: "css",
URL: "url",
RESOURCE_URL: "resourceUrl",
JS: "js",
},
Fi = r("$compile"),
vo = t.createElement("a"),
mo = Mn(e.location.href);
(Nn.$inject = ["$document"]), (Pn.$inject = ["$provide"]);
var go = 22,
yo = ".",
bo = "0";
(_n.$inject = ["$locale"]), (Fn.$inject = ["$locale"]);
var wo = {
yyyy: zn("FullYear", 4),
yy: zn("FullYear", 2, 0, !0),
y: zn("FullYear", 1),
MMMM: Wn("Month"),
MMM: Wn("Month", !0),
MM: zn("Month", 2, 1),
M: zn("Month", 1, 1),
dd: zn("Date", 2),
d: zn("Date", 1),
HH: zn("Hours", 2),
H: zn("Hours", 1),
hh: zn("Hours", 2, -12),
h: zn("Hours", 1, -12),
mm: zn("Minutes", 2),
m: zn("Minutes", 1),
ss: zn("Seconds", 2),
s: zn("Seconds", 1),
sss: zn("Milliseconds", 3),
EEEE: Wn("Day"),
EEE: Wn("Day", !0),
a: Zn,
Z: Gn,
ww: Kn(2),
w: Kn(1),
G: Xn,
GG: Xn,
GGG: Xn,
GGGG: Qn,
},
xo =
/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,
So = /^\-?\d+$/;
er.$inject = ["$locale"];
var Eo = m(Ar),
Co = m(Or);
rr.$inject = ["$parse"];
var Ao = m({
restrict: "E",
compile: function (e, t) {
return t.href || t.xlinkHref
? void 0
: function (e, t) {
if ("a" === t[0].nodeName.toLowerCase()) {
var n =
"[object SVGAnimatedString]" === qr.call(t.prop("href"))
? "xlink:href"
: "href";
t.on("click", function (e) {
t.attr(n) || e.preventDefault();
});
}
};
},
}),
ko = {};
o(xi, function (e, t) {
function n(e, n, i) {
e.$watch(i[r], function (e) {
i.$set(t, !!e);
});
}
if ("multiple" != e) {
var r = ht("ng-" + t),
i = n;
"checked" === e &&
(i = function (e, t, i) {
i.ngModel !== i[r] && n(e, t, i);
}),
(ko[r] = function () {
return { restrict: "A", priority: 100, link: i };
});
}
}),
o(Ei, function (e, t) {
ko[t] = function () {
return {
priority: 100,
link: function (e, n, r) {
if ("ngPattern" === t && "/" == r.ngPattern.charAt(0)) {
var i = r.ngPattern.match(Er);
if (i) return void r.$set("ngPattern", new RegExp(i[1], i[2]));
}
e.$watch(r[t], function (e) {
r.$set(t, e);
});
},
};
};
}),
o(["src", "srcset", "href"], function (e) {
var t = ht("ng-" + e);
ko[t] = function () {
return {
priority: 99,
link: function (n, r, i) {
var o = e,
a = e;
"href" === e &&
"[object SVGAnimatedString]" === qr.call(r.prop("href")) &&
((a = "xlinkHref"), (i.$attr[a] = "xlink:href"), (o = null)),
i.$observe(t, function (t) {
return t
? (i.$set(a, t), void (Tr && o && r.prop(o, i[a])))
: void ("href" === e && i.$set(a, null));
});
},
};
};
});
var Oo = {
$addControl: $,
$$renameControl: or,
$removeControl: $,
$setValidity: $,
$setDirty: $,
$setPristine: $,
$setSubmitted: $,
},
Mo = "ng-submitted";
ar.$inject = ["$element", "$attrs", "$scope", "$animate", "$interpolate"];
var jo = function (e) {
return [
"$timeout",
"$parse",
function (t, r) {
function i(e) {
return "" === e ? r('this[""]').assign : r(e).assign || $;
}
var o = {
name: "form",
restrict: e ? "EAC" : "E",
require: ["form", "^^?form"],
controller: ar,
compile: function (r, o) {
r.addClass(ha).addClass(la);
var a = o.name ? "name" : e && o.ngForm ? "ngForm" : !1;
return {
pre: function (e, r, o, s) {
var u = s[0];
if (!("action" in o)) {
var c = function (t) {
e.$apply(function () {
u.$commitViewValue(), u.$setSubmitted();
}),
t.preventDefault();
};
ci(r[0], "submit", c),
r.on("$destroy", function () {
t(
function () {
li(r[0], "submit", c);
},
0,
!1
);
});
}
var l = s[1] || u.$$parentForm;
l.$addControl(u);
var h = a ? i(u.$name) : $;
a &&
(h(e, u),
o.$observe(a, function (t) {
u.$name !== t &&
(h(e, n),
u.$$parentForm.$$renameControl(u, t),
(h = i(u.$name))(e, u));
})),
r.on("$destroy", function () {
u.$$parentForm.$removeControl(u), h(e, n), f(u, Oo);
});
},
};
},
};
return o;
},
];
},
To = jo(),
No = jo(!0),
Vo =
/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,
Po =
/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,
Io =
/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,
Do = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,
Ro = /^(\d{4})-(\d{2})-(\d{2})$/,
qo = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,
_o = /^(\d{4})-W(\d\d)$/,
Fo = /^(\d{4})-(\d\d)$/,
Uo = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,
Ho = "keydown wheel mousedown",
Bo = ve();
o("date,datetime-local,month,time,week".split(","), function (e) {
Bo[e] = !0;
});
var Lo = {
text: ur,
date: hr("date", Ro, fr(Ro, ["yyyy", "MM", "dd"]), "yyyy-MM-dd"),
"datetime-local": hr(
"datetimelocal",
qo,
fr(qo, ["yyyy", "MM", "dd", "HH", "mm", "ss", "sss"]),
"yyyy-MM-ddTHH:mm:ss.sss"
),
time: hr("time", Uo, fr(Uo, ["HH", "mm", "ss", "sss"]), "HH:mm:ss.sss"),
week: hr("week", _o, lr, "yyyy-Www"),
month: hr("month", Fo, fr(Fo, ["yyyy", "MM"]), "yyyy-MM"),
number: dr,
url: $r,
email: vr,
radio: mr,
checkbox: yr,
hidden: $,
button: $,
submit: $,
reset: $,
file: $,
},
zo = [
"$browser",
"$sniffer",
"$filter",
"$parse",
function (e, t, n, r) {
return {
restrict: "E",
require: ["?ngModel"],
link: {
pre: function (i, o, a, s) {
s[0] && (Lo[Ar(a.type)] || Lo.text)(i, o, a, s[0], t, e, n, r);
},
},
};
},
],
Wo = /^(true|false|\d+)$/,
Go = function () {
return {
restrict: "A",
priority: 100,
compile: function (e, t) {
return Wo.test(t.ngValue)
? function (e, t, n) {
n.$set("value", e.$eval(n.ngValue));
}
: function (e, t, n) {
e.$watch(n.ngValue, function (e) {
n.$set("value", e);
});
};
},
};
},
Jo = [
"$compile",
function (e) {
return {
restrict: "AC",
compile: function (t) {
return (
e.$$addBindingClass(t),
function (t, n, r) {
e.$$addBindingInfo(n, r.ngBind),
(n = n[0]),
t.$watch(r.ngBind, function (e) {
n.textContent = y(e) ? "" : e;
});
}
);
},
};
},
],
Yo = [
"$interpolate",
"$compile",
function (e, t) {
return {
compile: function (n) {
return (
t.$$addBindingClass(n),
function (n, r, i) {
var o = e(r.attr(i.$attr.ngBindTemplate));
t.$$addBindingInfo(r, o.expressions),
(r = r[0]),
i.$observe("ngBindTemplate", function (e) {
r.textContent = y(e) ? "" : e;
});
}
);
},
};
},
],
Ko = [
"$sce",
"$parse",
"$compile",
function (e, t, n) {
return {
restrict: "A",
compile: function (r, i) {
var o = t(i.ngBindHtml),
a = t(i.ngBindHtml, function (e) {
return (e || "").toString();
});
return (
n.$$addBindingClass(r),
function (t, r, i) {
n.$$addBindingInfo(r, i.ngBindHtml),
t.$watch(a, function () {
r.html(e.getTrustedHtml(o(t)) || "");
});
}
);
},
};
},
],
Zo = m({
restrict: "A",
require: "ngModel",
link: function (e, t, n, r) {
r.$viewChangeListeners.push(function () {
e.$eval(n.ngChange);
});
},
}),
Xo = br("", !0),
Qo = br("Odd", 0),
ea = br("Even", 1),
ta = ir({
compile: function (e, t) {
t.$set("ngCloak", n), e.removeClass("ng-cloak");
},
}),
na = [
function () {
return { restrict: "A", scope: !0, controller: "@", priority: 500 };
},
],
ra = {},
ia = { blur: !0, focus: !0 };
o(
"click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(
" "
),
function (e) {
var t = ht("ng-" + e);
ra[t] = [
"$parse",
"$rootScope",
function (n, r) {
return {
restrict: "A",
compile: function (i, o) {
var a = n(o[t], null, !0);
return function (t, n) {
n.on(e, function (n) {
var i = function () {
a(t, { $event: n });
};
ia[e] && r.$$phase ? t.$evalAsync(i) : t.$apply(i);
});
};
},
};
},
];
}
);
var oa = [
"$animate",
function (e) {
return {
multiElement: !0,
transclude: "element",
priority: 600,
terminal: !0,
restrict: "A",
$$tlb: !0,
link: function (n, r, i, o, a) {
var s, u, c;
n.$watch(i.ngIf, function (n) {
n
? u ||
a(function (n, o) {
(u = o),
(n[n.length++] = t.createComment(
" end ngIf: " + i.ngIf + " "
)),
(s = { clone: n }),
e.enter(n, r.parent(), r);
})
: (c && (c.remove(), (c = null)),
u && (u.$destroy(), (u = null)),
s &&
((c = $e(s.clone)),
e.leave(c).then(function () {
c = null;
}),
(s = null)));
});
},
};
},
],
aa = [
"$templateRequest",
"$anchorScroll",
"$animate",
function (e, t, n) {
return {
restrict: "ECA",
priority: 400,
terminal: !0,
transclude: "element",
controller: Ur.noop,
compile: function (r, i) {
var o = i.ngInclude || i.src,
a = i.onload || "",
s = i.autoscroll;
return function (r, i, u, c, l) {
var f,
h,
p,
d = 0,
$ = function () {
h && (h.remove(), (h = null)),
f && (f.$destroy(), (f = null)),
p &&
(n.leave(p).then(function () {
h = null;
}),
(h = p),
(p = null));
};
r.$watch(o, function (o) {
var u = function () {
!b(s) || (s && !r.$eval(s)) || t();
},
h = ++d;
o
? (e(o, !0).then(
function (e) {
if (!r.$$destroyed && h === d) {
var t = r.$new();
c.template = e;
var s = l(t, function (e) {
$(), n.enter(e, null, i).then(u);
});
(f = t),
(p = s),
f.$emit("$includeContentLoaded", o),
r.$eval(a);
}
},
function () {
r.$$destroyed ||
(h === d &&
($(), r.$emit("$includeContentError", o)));
}
),
r.$emit("$includeContentRequested", o))
: ($(), (c.template = null));
});
};
},
};
},
],
sa = [
"$compile",
function (e) {
return {
restrict: "ECA",
priority: -400,
require: "ngInclude",
link: function (n, r, i, o) {
return /SVG/.test(r[0].toString())
? (r.empty(),
void e(Ae(o.template, t).childNodes)(
n,
function (e) {
r.append(e);
},
{ futureParentElement: r }
))
: (r.html(o.template), void e(r.contents())(n));
},
};
},
],
ua = ir({
priority: 450,
compile: function () {
return {
pre: function (e, t, n) {
e.$eval(n.ngInit);
},
};
},
}),
ca = function () {
return {
restrict: "A",
priority: 100,
require: "ngModel",
link: function (e, t, r, i) {
var a = t.attr(r.$attr.ngList) || ", ",
s = "false" !== r.ngTrim,
u = s ? Wr(a) : a,
c = function (e) {
if (!y(e)) {
var t = [];
return (
e &&
o(e.split(u), function (e) {
e && t.push(s ? Wr(e) : e);
}),
t
);
}
};
i.$parsers.push(c),
i.$formatters.push(function (e) {
return Lr(e) ? e.join(a) : n;
}),
(i.$isEmpty = function (e) {
return !e || !e.length;
});
},
};
},
la = "ng-valid",
fa = "ng-invalid",
ha = "ng-pristine",
pa = "ng-dirty",
da = "ng-untouched",
$a = "ng-touched",
va = "ng-pending",
ma = r("ngModel"),
ga = [
"$scope",
"$exceptionHandler",
"$attrs",
"$element",
"$parse",
"$animate",
"$timeout",
"$rootScope",
"$q",
"$interpolate",
function (e, t, r, i, a, s, u, c, l, f) {
(this.$viewValue = Number.NaN),
(this.$modelValue = Number.NaN),
(this.$$rawModelValue = n),
(this.$validators = {}),
(this.$asyncValidators = {}),
(this.$parsers = []),
(this.$formatters = []),
(this.$viewChangeListeners = []),
(this.$untouched = !0),
(this.$touched = !1),
(this.$pristine = !0),
(this.$dirty = !1),
(this.$valid = !0),
(this.$invalid = !1),
(this.$error = {}),
(this.$$success = {}),
(this.$pending = n),
(this.$name = f(r.name || "", !1)(e)),
(this.$$parentForm = Oo);
var h,
p = a(r.ngModel),
d = p.assign,
v = p,
m = d,
g = null,
w = this;
(this.$$setOptions = function (e) {
if (((w.$options = e), e && e.getterSetter)) {
var t = a(r.ngModel + "()"),
n = a(r.ngModel + "($$$p)");
(v = function (e) {
var n = p(e);
return A(n) && (n = t(e)), n;
}),
(m = function (e, t) {
A(p(e)) ? n(e, { $$$p: w.$modelValue }) : d(e, w.$modelValue);
});
} else if (!p.assign)
throw ma(
"nonassign",
"Expression '{0}' is non-assignable. Element: {1}",
r.ngModel,
X(i)
);
}),
(this.$render = $),
(this.$isEmpty = function (e) {
return y(e) || "" === e || null === e || e !== e;
});
var x = 0;
wr({
ctrl: this,
$element: i,
set: function (e, t) {
e[t] = !0;
},
unset: function (e, t) {
delete e[t];
},
$animate: s,
}),
(this.$setPristine = function () {
(w.$dirty = !1),
(w.$pristine = !0),
s.removeClass(i, pa),
s.addClass(i, ha);
}),
(this.$setDirty = function () {
(w.$dirty = !0),
(w.$pristine = !1),
s.removeClass(i, ha),
s.addClass(i, pa),
w.$$parentForm.$setDirty();
}),
(this.$setUntouched = function () {
(w.$touched = !1), (w.$untouched = !0), s.setClass(i, da, $a);
}),
(this.$setTouched = function () {
(w.$touched = !0), (w.$untouched = !1), s.setClass(i, $a, da);
}),
(this.$rollbackViewValue = function () {
u.cancel(g),
(w.$viewValue = w.$$lastCommittedViewValue),
w.$render();
}),
(this.$validate = function () {
if (!E(w.$modelValue) || !isNaN(w.$modelValue)) {
var e = w.$$lastCommittedViewValue,
t = w.$$rawModelValue,
r = w.$valid,
i = w.$modelValue,
o = w.$options && w.$options.allowInvalid;
w.$$runValidators(t, e, function (e) {
o ||
r === e ||
((w.$modelValue = e ? t : n),
w.$modelValue !== i && w.$$writeModelToScope());
});
}
}),
(this.$$runValidators = function (e, t, r) {
function i() {
var e = w.$$parserName || "parse";
return y(h)
? (u(e, null), !0)
: (h ||
(o(w.$validators, function (e, t) {
u(t, null);
}),
o(w.$asyncValidators, function (e, t) {
u(t, null);
})),
u(e, h),
h);
}
function a() {
var n = !0;
return (
o(w.$validators, function (r, i) {
var o = r(e, t);
(n = n && o), u(i, o);
}),
n
? !0
: (o(w.$asyncValidators, function (e, t) {
u(t, null);
}),
!1)
);
}
function s() {
var r = [],
i = !0;
o(w.$asyncValidators, function (o, a) {
var s = o(e, t);
if (!P(s))
throw ma(
"nopromise",
"Expected asynchronous validator to return a promise but got '{0}' instead.",
s
);
u(a, n),
r.push(
s.then(
function () {
u(a, !0);
},
function (e) {
(i = !1), u(a, !1);
}
)
);
}),
r.length
? l.all(r).then(function () {
c(i);
}, $)
: c(!0);
}
function u(e, t) {
f === x && w.$setValidity(e, t);
}
function c(e) {
f === x && r(e);
}
x++;
var f = x;
return i() && a() ? void s() : void c(!1);
}),
(this.$commitViewValue = function () {
var e = w.$viewValue;
u.cancel(g),
(w.$$lastCommittedViewValue !== e ||
("" === e && w.$$hasNativeValidators)) &&
((w.$$lastCommittedViewValue = e),
w.$pristine && this.$setDirty(),
this.$$parseAndValidate());
}),
(this.$$parseAndValidate = function () {
function t() {
w.$modelValue !== a && w.$$writeModelToScope();
}
var r = w.$$lastCommittedViewValue,
i = r;
if ((h = y(i) ? n : !0))
for (var o = 0; o < w.$parsers.length; o++)
if (((i = w.$parsers[o](i)), y(i))) {
h = !1;
break;
}
E(w.$modelValue) && isNaN(w.$modelValue) && (w.$modelValue = v(e));
var a = w.$modelValue,
s = w.$options && w.$options.allowInvalid;
(w.$$rawModelValue = i),
s && ((w.$modelValue = i), t()),
w.$$runValidators(i, w.$$lastCommittedViewValue, function (e) {
s || ((w.$modelValue = e ? i : n), t());
});
}),
(this.$$writeModelToScope = function () {
m(e, w.$modelValue),
o(w.$viewChangeListeners, function (e) {
try {
e();
} catch (n) {
t(n);
}
});
}),
(this.$setViewValue = function (e, t) {
(w.$viewValue = e),
(w.$options && !w.$options.updateOnDefault) ||
w.$$debounceViewValueCommit(t);
}),
(this.$$debounceViewValueCommit = function (t) {
var n,
r = 0,
i = w.$options;
i &&
b(i.debounce) &&
((n = i.debounce),
E(n)
? (r = n)
: E(n[t])
? (r = n[t])
: E(n["default"]) && (r = n["default"])),
u.cancel(g),
r
? (g = u(function () {
w.$commitViewValue();
}, r))
: c.$$phase
? w.$commitViewValue()
: e.$apply(function () {
w.$commitViewValue();
});
}),
e.$watch(function () {
var t = v(e);
if (
t !== w.$modelValue &&
(w.$modelValue === w.$modelValue || t === t)
) {
(w.$modelValue = w.$$rawModelValue = t), (h = n);
for (var r = w.$formatters, i = r.length, o = t; i--; )
o = r[i](o);
w.$viewValue !== o &&
((w.$viewValue = w.$$lastCommittedViewValue = o),
w.$render(),
w.$$runValidators(t, o, $));
}
return t;
});
},
],
ya = [
"$rootScope",
function (e) {
return {
restrict: "A",
require: ["ngModel", "^?form", "^?ngModelOptions"],
controller: ga,
priority: 1,
compile: function (t) {
return (
t.addClass(ha).addClass(da).addClass(la),
{
pre: function (e, t, n, r) {
var i = r[0],
o = r[1] || i.$$parentForm;
i.$$setOptions(r[2] && r[2].$options),
o.$addControl(i),
n.$observe("name", function (e) {
i.$name !== e && i.$$parentForm.$$renameControl(i, e);
}),
e.$on("$destroy", function () {
i.$$parentForm.$removeControl(i);
});
},
post: function (t, n, r, i) {
var o = i[0];
o.$options &&
o.$options.updateOn &&
n.on(o.$options.updateOn, function (e) {
o.$$debounceViewValueCommit(e && e.type);
}),
n.on("blur", function (n) {
o.$touched ||
(e.$$phase
? t.$evalAsync(o.$setTouched)
: t.$apply(o.$setTouched));
});
},
}
);
},
};
},
],
ba = /(\s+|^)default(\s+|$)/,
wa = function () {
return {
restrict: "A",
controller: [
"$scope",
"$attrs",
function (e, t) {
var n = this;
(this.$options = F(e.$eval(t.ngModelOptions))),
b(this.$options.updateOn)
? ((this.$options.updateOnDefault = !1),
(this.$options.updateOn = Wr(
this.$options.updateOn.replace(ba, function () {
return (n.$options.updateOnDefault = !0), " ";
})
)))
: (this.$options.updateOnDefault = !0);
},
],
};
},
xa = ir({ terminal: !0, priority: 1e3 }),
Sa = r("ngOptions"),
Ea =
/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
Ca = [
"$compile",
"$parse",
function (e, n) {
function r(e, t, r) {
function o(e, t, n, r, i) {
(this.selectValue = e),
(this.viewValue = t),
(this.label = n),
(this.group = r),
(this.disabled = i);
}
function a(e) {
var t;
if (!c && i(e)) t = e;
else {
t = [];
for (var n in e)
e.hasOwnProperty(n) && "$" !== n.charAt(0) && t.push(n);
}
return t;
}
var s = e.match(Ea);
if (!s)
throw Sa(
"iexp",
"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",
e,
X(t)
);
var u = s[5] || s[7],
c = s[6],
l = / as /.test(s[0]) && s[1],
f = s[9],
h = n(s[2] ? s[1] : u),
p = l && n(l),
d = p || h,
$ = f && n(f),
v = f
? function (e, t) {
return $(r, t);
}
: function (e) {
return Ze(e);
},
m = function (e, t) {
return v(e, S(e, t));
},
g = n(s[2] || s[1]),
y = n(s[3] || ""),
b = n(s[4] || ""),
w = n(s[8]),
x = {},
S = c
? function (e, t) {
return (x[c] = t), (x[u] = e), x;
}
: function (e) {
return (x[u] = e), x;
};
return {
trackBy: f,
getTrackByValue: m,
getWatchables: n(w, function (e) {
var t = [];
e = e || [];
for (var n = a(e), i = n.length, o = 0; i > o; o++) {
var u = e === n ? o : n[o],
c = (e[u], S(e[u], u)),
l = v(e[u], c);
if ((t.push(l), s[2] || s[1])) {
var f = g(r, c);
t.push(f);
}
if (s[4]) {
var h = b(r, c);
t.push(h);
}
}
return t;
}),
getOptions: function () {
for (
var e = [],
t = {},
n = w(r) || [],
i = a(n),
s = i.length,
u = 0;
s > u;
u++
) {
var c = n === i ? u : i[u],
l = n[c],
h = S(l, c),
p = d(r, h),
$ = v(p, h),
x = g(r, h),
E = y(r, h),
C = b(r, h),
A = new o($, p, x, E, C);
e.push(A), (t[$] = A);
}
return {
items: e,
selectValueMap: t,
getOptionFromViewValue: function (e) {
return t[m(e)];
},
getViewValueFromOption: function (e) {
return f ? Ur.copy(e.viewValue) : e.viewValue;
},
};
},
};
}
function a(t, n, i, a) {
function c(e, t) {
(e.element = t),
(t.disabled = e.disabled),
e.label !== t.label &&
((t.label = e.label), (t.textContent = e.label)),
e.value !== t.value && (t.value = e.selectValue);
}
function l(e, t, n, r) {
var i;
return (
t && Ar(t.nodeName) === n
? (i = t)
: ((i = r.cloneNode(!1)),
t ? e.insertBefore(i, t) : e.appendChild(i)),
i
);
}
function f(e) {
for (var t; e; ) (t = e.nextSibling), Be(e), (e = t);
}
function h(e) {
var t = $ && $[0],
n = x && x[0];
if (t || n)
for (
;
e &&
(e === t ||
e === n ||
e.nodeType === ri ||
("option" === q(e) && "" === e.value));
)
e = e.nextSibling;
return e;
}
function p() {
var e = S && v.readValue();
S = E.getOptions();
var t = {},
r = n[0].firstChild;
if (
(w && n.prepend($),
(r = h(r)),
S.items.forEach(function (e) {
var i, o, a;
e.group
? ((i = t[e.group]),
i ||
((o = l(n[0], r, "optgroup", u)),
(r = o.nextSibling),
(o.label = e.group),
(i = t[e.group] =
{
groupElement: o,
currentOptionElement: o.firstChild,
})),
(a = l(
i.groupElement,
i.currentOptionElement,
"option",
s
)),
c(e, a),
(i.currentOptionElement = a.nextSibling))
: ((a = l(n[0], r, "option", s)),
c(e, a),
(r = a.nextSibling));
}),
Object.keys(t).forEach(function (e) {
f(t[e].currentOptionElement);
}),
f(r),
d.$render(),
!d.$isEmpty(e))
) {
var i = v.readValue(),
o = E.trackBy || m;
(o ? H(e, i) : e === i) || (d.$setViewValue(i), d.$render());
}
}
var d = a[1];
if (d) {
for (
var $,
v = a[0],
m = i.multiple,
g = 0,
y = n.children(),
b = y.length;
b > g;
g++
)
if ("" === y[g].value) {
$ = y.eq(g);
break;
}
var w = !!$,
x = Nr(s.cloneNode(!1));
x.val("?");
var S,
E = r(i.ngOptions, n, t),
C = function () {
w || n.prepend($),
n.val(""),
$.prop("selected", !0),
$.attr("selected", !0);
},
A = function () {
w || $.remove();
},
k = function () {
n.prepend(x),
n.val("?"),
x.prop("selected", !0),
x.attr("selected", !0);
},
O = function () {
x.remove();
};
m
? ((d.$isEmpty = function (e) {
return !e || 0 === e.length;
}),
(v.writeValue = function (e) {
S.items.forEach(function (e) {
e.element.selected = !1;
}),
e &&
e.forEach(function (e) {
var t = S.getOptionFromViewValue(e);
t && !t.disabled && (t.element.selected = !0);
});
}),
(v.readValue = function () {
var e = n.val() || [],
t = [];
return (
o(e, function (e) {
var n = S.selectValueMap[e];
n && !n.disabled && t.push(S.getViewValueFromOption(n));
}),
t
);
}),
E.trackBy &&
t.$watchCollection(
function () {
return Lr(d.$viewValue)
? d.$viewValue.map(function (e) {
return E.getTrackByValue(e);
})
: void 0;
},
function () {
d.$render();
}
))
: ((v.writeValue = function (e) {
var t = S.getOptionFromViewValue(e);
t && !t.disabled
? (n[0].value !== t.selectValue &&
(O(),
A(),
(n[0].value = t.selectValue),
(t.element.selected = !0)),
t.element.setAttribute("selected", "selected"))
: null === e || w
? (O(), C())
: (A(), k());
}),
(v.readValue = function () {
var e = S.selectValueMap[n.val()];
return e && !e.disabled
? (A(), O(), S.getViewValueFromOption(e))
: null;
}),
E.trackBy &&
t.$watch(
function () {
return E.getTrackByValue(d.$viewValue);
},
function () {
d.$render();
}
)),
w
? ($.remove(), e($)(t), $.removeClass("ng-scope"))
: ($ = Nr(s.cloneNode(!1))),
p(),
t.$watchCollection(E.getWatchables, p);
}
}
var s = t.createElement("option"),
u = t.createElement("optgroup");
return {
restrict: "A",
terminal: !0,
require: ["select", "?ngModel"],
link: {
pre: function (e, t, n, r) {
r[0].registerOption = $;
},
post: a,
},
};
},
],
Aa = [
"$locale",
"$interpolate",
"$log",
function (e, t, n) {
var r = /{}/g,
i = /^when(Minus)?(.+)$/;
return {
link: function (a, s, u) {
function c(e) {
s.text(e || "");
}
var l,
f = u.count,
h = u.$attr.when && s.attr(u.$attr.when),
p = u.offset || 0,
d = a.$eval(h) || {},
v = {},
m = t.startSymbol(),
g = t.endSymbol(),
b = m + f + "-" + p + g,
w = Ur.noop;
o(u, function (e, t) {
var n = i.exec(t);
if (n) {
var r = (n[1] ? "-" : "") + Ar(n[2]);
d[r] = s.attr(u.$attr[t]);
}
}),
o(d, function (e, n) {
v[n] = t(e.replace(r, b));
}),
a.$watch(f, function (t) {
var r = parseFloat(t),
i = isNaN(r);
if (
(i || r in d || (r = e.pluralCat(r - p)),
r !== l && !(i && E(l) && isNaN(l)))
) {
w();
var o = v[r];
y(o)
? (null != t &&
n.debug(
"ngPluralize: no rule defined for '" + r + "' in " + h
),
(w = $),
c())
: (w = a.$watch(o, c)),
(l = r);
}
});
},
};
},
],
ka = [
"$parse",
"$animate",
function (e, a) {
var s = "$$NG_REMOVED",
u = r("ngRepeat"),
c = function (e, t, n, r, i, o, a) {
(e[n] = r),
i && (e[i] = o),
(e.$index = t),
(e.$first = 0 === t),
(e.$last = t === a - 1),
(e.$middle = !(e.$first || e.$last)),
(e.$odd = !(e.$even = 0 === (1 & t)));
},
l = function (e) {
return e.clone[0];
},
f = function (e) {
return e.clone[e.clone.length - 1];
};
return {
restrict: "A",
multiElement: !0,
transclude: "element",
priority: 1e3,
terminal: !0,
$$tlb: !0,
compile: function (r, h) {
var p = h.ngRepeat,
d = t.createComment(" end ngRepeat: " + p + " "),
$ = p.match(
/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/
);
if (!$)
throw u(
"iexp",
"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",
p
);
var v = $[1],
m = $[2],
g = $[3],
y = $[4];
if (
(($ = v.match(
/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/
)),
!$)
)
throw u(
"iidexp",
"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
v
);
var b = $[3] || $[1],
w = $[2];
if (
g &&
(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(g) ||
/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(
g
))
)
throw u(
"badident",
"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",
g
);
var x,
S,
E,
C,
A = { $id: Ze };
return (
y
? (x = e(y))
: ((E = function (e, t) {
return Ze(t);
}),
(C = function (e) {
return e;
})),
function (e, t, r, h, $) {
x &&
(S = function (t, n, r) {
return w && (A[w] = t), (A[b] = n), (A.$index = r), x(e, A);
});
var v = ve();
e.$watchCollection(m, function (r) {
var h,
m,
y,
x,
A,
k,
O,
M,
j,
T,
N,
V,
P = t[0],
I = ve();
if ((g && (e[g] = r), i(r))) (j = r), (M = S || E);
else {
(M = S || C), (j = []);
for (var D in r)
kr.call(r, D) && "$" !== D.charAt(0) && j.push(D);
}
for (x = j.length, N = new Array(x), h = 0; x > h; h++)
if (
((A = r === j ? h : j[h]),
(k = r[A]),
(O = M(A, k, h)),
v[O])
)
(T = v[O]), delete v[O], (I[O] = T), (N[h] = T);
else {
if (I[O])
throw (
(o(N, function (e) {
e && e.scope && (v[e.id] = e);
}),
u(
"dupes",
"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
p,
O,
k
))
);
(N[h] = { id: O, scope: n, clone: n }), (I[O] = !0);
}
for (var R in v) {
if (
((T = v[R]),
(V = $e(T.clone)),
a.leave(V),
V[0].parentNode)
)
for (h = 0, m = V.length; m > h; h++) V[h][s] = !0;
T.scope.$destroy();
}
for (h = 0; x > h; h++)
if (
((A = r === j ? h : j[h]),
(k = r[A]),
(T = N[h]),
T.scope)
) {
y = P;
do y = y.nextSibling;
while (y && y[s]);
l(T) != y && a.move($e(T.clone), null, P),
(P = f(T)),
c(T.scope, h, b, k, w, A, x);
} else
$(function (e, t) {
T.scope = t;
var n = d.cloneNode(!1);
(e[e.length++] = n),
a.enter(e, null, P),
(P = n),
(T.clone = e),
(I[T.id] = T),
c(T.scope, h, b, k, w, A, x);
});
v = I;
});
}
);
},
};
},
],
Oa = "ng-hide",
Ma = "ng-hide-animate",
ja = [
"$animate",
function (e) {
return {
restrict: "A",
multiElement: !0,
link: function (t, n, r) {
t.$watch(r.ngShow, function (t) {
e[t ? "removeClass" : "addClass"](n, Oa, { tempClasses: Ma });
});
},
};
},
],
Ta = [
"$animate",
function (e) {
return {
restrict: "A",
multiElement: !0,
link: function (t, n, r) {
t.$watch(r.ngHide, function (t) {
e[t ? "addClass" : "removeClass"](n, Oa, { tempClasses: Ma });
});
},
};
},
],
Na = ir(function (e, t, n) {
e.$watch(
n.ngStyle,
function (e, n) {
n &&
e !== n &&
o(n, function (e, n) {
t.css(n, "");
}),
e && t.css(e);
},
!0
);
}),
Va = [
"$animate",
function (e) {
return {
require: "ngSwitch",
controller: [
"$scope",
function () {
this.cases = {};
},
],
link: function (n, r, i, a) {
var s = i.ngSwitch || i.on,
u = [],
c = [],
l = [],
f = [],
h = function (e, t) {
return function () {
e.splice(t, 1);
};
};
n.$watch(s, function (n) {
var r, i;
for (r = 0, i = l.length; i > r; ++r) e.cancel(l[r]);
for (l.length = 0, r = 0, i = f.length; i > r; ++r) {
var s = $e(c[r].clone);
f[r].$destroy();
var p = (l[r] = e.leave(s));
p.then(h(l, r));
}
(c.length = 0),
(f.length = 0),
(u = a.cases["!" + n] || a.cases["?"]) &&
o(u, function (n) {
n.transclude(function (r, i) {
f.push(i);
var o = n.element;
r[r.length++] = t.createComment(" end ngSwitchWhen: ");
var a = { clone: r };
c.push(a), e.enter(r, o.parent(), o);
});
});
});
},
};
},
],
Pa = ir({
transclude: "element",
priority: 1200,
require: "^ngSwitch",
multiElement: !0,
link: function (e, t, n, r, i) {
(r.cases["!" + n.ngSwitchWhen] = r.cases["!" + n.ngSwitchWhen] || []),
r.cases["!" + n.ngSwitchWhen].push({ transclude: i, element: t });
},
}),
Ia = ir({
transclude: "element",
priority: 1200,
require: "^ngSwitch",
multiElement: !0,
link: function (e, t, n, r, i) {
(r.cases["?"] = r.cases["?"] || []),
r.cases["?"].push({ transclude: i, element: t });
},
}),
Da = ir({
restrict: "EAC",
link: function (e, t, n, i, o) {
if (!o)
throw r("ngTransclude")(
"orphan",
"Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",
X(t)
);
o(function (e) {
t.empty(), t.append(e);
});
},
}),
Ra = [
"$templateCache",
function (e) {
return {
restrict: "E",
terminal: !0,
compile: function (t, n) {
if ("text/ng-template" == n.type) {
var r = n.id,
i = t[0].text;
e.put(r, i);
}
},
};
},
],
qa = { $setViewValue: $, $render: $ },
_a = [
"$element",
"$scope",
"$attrs",
function (e, r, i) {
var o = this,
a = new Xe();
(o.ngModelCtrl = qa),
(o.unknownOption = Nr(t.createElement("option"))),
(o.renderUnknownOption = function (t) {
var n = "? " + Ze(t) + " ?";
o.unknownOption.val(n), e.prepend(o.unknownOption), e.val(n);
}),
r.$on("$destroy", function () {
o.renderUnknownOption = $;
}),
(o.removeUnknownOption = function () {
o.unknownOption.parent() && o.unknownOption.remove();
}),
(o.readValue = function () {
return o.removeUnknownOption(), e.val();
}),
(o.writeValue = function (t) {
o.hasOption(t)
? (o.removeUnknownOption(),
e.val(t),
"" === t && o.emptyOption.prop("selected", !0))
: null == t && o.emptyOption
? (o.removeUnknownOption(), e.val(""))
: o.renderUnknownOption(t);
}),
(o.addOption = function (e, t) {
if (t[0].nodeType !== ri) {
pe(e, '"option value"'), "" === e && (o.emptyOption = t);
var n = a.get(e) || 0;
a.put(e, n + 1), o.ngModelCtrl.$render(), Sr(t);
}
}),
(o.removeOption = function (e) {
var t = a.get(e);
t &&
(1 === t
? (a.remove(e), "" === e && (o.emptyOption = n))
: a.put(e, t - 1));
}),
(o.hasOption = function (e) {
return !!a.get(e);
}),
(o.registerOption = function (e, t, n, r, i) {
if (r) {
var a;
n.$observe("value", function (e) {
b(a) && o.removeOption(a), (a = e), o.addOption(e, t);
});
} else
i
? e.$watch(i, function (e, r) {
n.$set("value", e),
r !== e && o.removeOption(r),
o.addOption(e, t);
})
: o.addOption(n.value, t);
t.on("$destroy", function () {
o.removeOption(n.value), o.ngModelCtrl.$render();
});
});
},
],
Fa = function () {
function e(e, t, n, r) {
var i = r[1];
if (i) {
var a = r[0];
if (
((a.ngModelCtrl = i),
t.on("change", function () {
e.$apply(function () {
i.$setViewValue(a.readValue());
});
}),
n.multiple)
) {
(a.readValue = function () {
var e = [];
return (
o(t.find("option"), function (t) {
t.selected && e.push(t.value);
}),
e
);
}),
(a.writeValue = function (e) {
var n = new Xe(e);
o(t.find("option"), function (e) {
e.selected = b(n.get(e.value));
});
});
var s,
u = NaN;
e.$watch(function () {
u !== i.$viewValue ||
H(s, i.$viewValue) ||
((s = U(i.$viewValue)), i.$render()),
(u = i.$viewValue);
}),
(i.$isEmpty = function (e) {
return !e || 0 === e.length;
});
}
}
}
function t(e, t, n, r) {
var i = r[1];
if (i) {
var o = r[0];
i.$render = function () {
o.writeValue(i.$viewValue);
};
}
}
return {
restrict: "E",
require: ["select", "?ngModel"],
controller: _a,
priority: 1,
link: { pre: e, post: t },
};
},
Ua = [
"$interpolate",
function (e) {
return {
restrict: "E",
priority: 100,
compile: function (t, n) {
if (b(n.value)) var r = e(n.value, !0);
else {
var i = e(t.text(), !0);
i || n.$set("value", t.text());
}
return function (e, t, n) {
var o = "$selectController",
a = t.parent(),
s = a.data(o) || a.parent().data(o);
s && s.registerOption(e, t, n, r, i);
};
},
};
},
],
Ha = m({ restrict: "E", terminal: !1 }),
Ba = function () {
return {
restrict: "A",
require: "?ngModel",
link: function (e, t, n, r) {
r &&
((n.required = !0),
(r.$validators.required = function (e, t) {
return !n.required || !r.$isEmpty(t);
}),
n.$observe("required", function () {
r.$validate();
}));
},
};
},
La = function () {
return {
restrict: "A",
require: "?ngModel",
link: function (e, t, i, o) {
if (o) {
var a,
s = i.ngPattern || i.pattern;
i.$observe("pattern", function (e) {
if (
(S(e) && e.length > 0 && (e = new RegExp("^" + e + "$")),
e && !e.test)
)
throw r("ngPattern")(
"noregexp",
"Expected {0} to be a RegExp but was {1}. Element: {2}",
s,
e,
X(t)
);
(a = e || n), o.$validate();
}),
(o.$validators.pattern = function (e, t) {
return o.$isEmpty(t) || y(a) || a.test(t);
});
}
},
};
},
za = function () {
return {
restrict: "A",
require: "?ngModel",
link: function (e, t, n, r) {
if (r) {
var i = -1;
n.$observe("maxlength", function (e) {
var t = p(e);
(i = isNaN(t) ? -1 : t), r.$validate();
}),
(r.$validators.maxlength = function (e, t) {
return 0 > i || r.$isEmpty(t) || t.length <= i;
});
}
},
};
},
Wa = function () {
return {
restrict: "A",
require: "?ngModel",
link: function (e, t, n, r) {
if (r) {
var i = 0;
n.$observe("minlength", function (e) {
(i = p(e) || 0), r.$validate();
}),
(r.$validators.minlength = function (e, t) {
return r.$isEmpty(t) || t.length >= i;
});
}
},
};
};
return e.angular.bootstrap
? void (
e.console &&
console.log("WARNING: Tried to load angular more than once.")
)
: (le(),
be(Ur),
Ur.module(
"ngLocale",
[],
[
"$provide",
function (e) {
function t(e) {
e += "";
var t = e.indexOf(".");
return -1 == t ? 0 : e.length - t - 1;
}
function r(e, r) {
var i = r;
n === i && (i = Math.min(t(e), 3));
var o = Math.pow(10, i),
a = ((e * o) | 0) % o;
return { v: i, f: a };
}
var i = {
ZERO: "zero",
ONE: "one",
TWO: "two",
FEW: "few",
MANY: "many",
OTHER: "other",
};
e.value("$locale", {
DATETIME_FORMATS: {
AMPMS: ["AM", "PM"],
DAY: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
],
ERANAMES: ["Before Christ", "Anno Domini"],
ERAS: ["BC", "AD"],
FIRSTDAYOFWEEK: 6,
MONTH: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
SHORTDAY: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
SHORTMONTH: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
STANDALONEMONTH: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
WEEKENDRANGE: [5, 6],
fullDate: "EEEE, MMMM d, y",
longDate: "MMMM d, y",
medium: "MMM d, y h:mm:ss a",
mediumDate: "MMM d, y",
mediumTime: "h:mm:ss a",
short: "M/d/yy h:mm a",
shortDate: "M/d/yy",
shortTime: "h:mm a",
},
NUMBER_FORMATS: {
CURRENCY_SYM: "$",
DECIMAL_SEP: ".",
GROUP_SEP: ",",
PATTERNS: [
{
gSize: 3,
lgSize: 3,
maxFrac: 3,
minFrac: 0,
minInt: 1,
negPre: "-",
negSuf: "",
posPre: "",
posSuf: "",
},
{
gSize: 3,
lgSize: 3,
maxFrac: 2,
minFrac: 2,
minInt: 1,
negPre: "-¤",
negSuf: "",
posPre: "¤",
posSuf: "",
},
],
},
id: "en-us",
localeID: "en_US",
pluralCat: function (e, t) {
var n = 0 | e,
o = r(e, t);
return 1 == n && 0 == o.v ? i.ONE : i.OTHER;
},
});
},
]
),
void Nr(t).ready(function () {
oe(t, ae);
}));
})(window, document),
!window.angular.$$csp().noInlineStyle &&
window.angular
.element(document.head)
.prepend(
'<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'
),
"undefined" != typeof module &&
"undefined" != typeof exports &&
module.exports === exports &&
(module.exports = "ui.router"),
(function (e, t, n) {
"use strict";
function r(e, t) {
return B(new (B(function () {}, { prototype: e }))(), t);
}
function i(e) {
return (
H(arguments, function (t) {
t !== e &&
H(t, function (t, n) {
e.hasOwnProperty(n) || (e[n] = t);
});
}),
e
);
}
function o(e, t) {
var n = [];
for (var r in e.path) {
if (e.path[r] !== t.path[r]) break;
n.push(e.path[r]);
}
return n;
}
function a(e) {
if (Object.keys) return Object.keys(e);
var t = [];
return (
H(e, function (e, n) {
t.push(n);
}),
t
);
}
function s(e, t) {
if (Array.prototype.indexOf)
return e.indexOf(t, Number(arguments[2]) || 0);
var n = e.length >>> 0,
r = Number(arguments[2]) || 0;
for (
r = 0 > r ? Math.ceil(r) : Math.floor(r), 0 > r && (r += n);
n > r;
r++
)
if (r in e && e[r] === t) return r;
return -1;
}
function u(e, t, n, r) {
var i,
u = o(n, r),
c = {},
l = [];
for (var f in u)
if (u[f] && u[f].params && ((i = a(u[f].params)), i.length))
for (var h in i)
s(l, i[h]) >= 0 || (l.push(i[h]), (c[i[h]] = e[i[h]]));
return B({}, c, t);
}
function c(e, t, n) {
if (!n) {
n = [];
for (var r in e) n.push(r);
}
for (var i = 0; i < n.length; i++) {
var o = n[i];
if (e[o] != t[o]) return !1;
}
return !0;
}
function l(e, t) {
var n = {};
return (
H(e, function (e) {
n[e] = t[e];
}),
n
);
}
function f(e) {
var t = {},
n = Array.prototype.concat.apply(
Array.prototype,
Array.prototype.slice.call(arguments, 1)
);
return (
H(n, function (n) {
n in e && (t[n] = e[n]);
}),
t
);
}
function h(e) {
var t = {},
n = Array.prototype.concat.apply(
Array.prototype,
Array.prototype.slice.call(arguments, 1)
);
for (var r in e) -1 == s(n, r) && (t[r] = e[r]);
return t;
}
function p(e, t) {
var n = U(e),
r = n ? [] : {};
return (
H(e, function (e, i) {
t(e, i) && (r[n ? r.length : i] = e);
}),
r
);
}
function d(e, t) {
var n = U(e) ? [] : {};
return (
H(e, function (e, r) {
n[r] = t(e, r);
}),
n
);
}
function $(e, t) {
var r = 1,
o = 2,
u = {},
c = [],
l = u,
f = B(e.when(u), { $$promises: u, $$values: u });
(this.study = function (u) {
function p(e, n) {
if (g[n] !== o) {
if ((m.push(n), g[n] === r))
throw (
(m.splice(0, s(m, n)),
new Error("Cyclic dependency: " + m.join(" -> ")))
);
if (((g[n] = r), _(e)))
v.push(
n,
[
function () {
return t.get(e);
},
],
c
);
else {
var i = t.annotate(e);
H(i, function (e) {
e !== n && u.hasOwnProperty(e) && p(u[e], e);
}),
v.push(n, e, i);
}
m.pop(), (g[n] = o);
}
}
function d(e) {
return F(e) && e.then && e.$$promises;
}
if (!F(u)) throw new Error("'invocables' must be an object");
var $ = a(u || {}),
v = [],
m = [],
g = {};
return (
H(u, p),
(u = m = g = null),
function (r, o, a) {
function s() {
--b ||
(w || i(y, o.$$values),
(m.$$values = y),
(m.$$promises = m.$$promises || !0),
delete m.$$inheritedValues,
p.resolve(y));
}
function u(e) {
(m.$$failure = e), p.reject(e);
}
function c(n, i, o) {
function c(e) {
f.reject(e), u(e);
}
function l() {
if (!R(m.$$failure))
try {
f.resolve(t.invoke(i, a, y)),
f.promise.then(function (e) {
(y[n] = e), s();
}, c);
} catch (e) {
c(e);
}
}
var f = e.defer(),
h = 0;
H(o, function (e) {
g.hasOwnProperty(e) &&
!r.hasOwnProperty(e) &&
(h++,
g[e].then(function (t) {
(y[e] = t), --h || l();
}, c));
}),
h || l(),
(g[n] = f.promise);
}
if ((d(r) && a === n && ((a = o), (o = r), (r = null)), r)) {
if (!F(r)) throw new Error("'locals' must be an object");
} else r = l;
if (o) {
if (!d(o))
throw new Error(
"'parent' must be a promise returned by $resolve.resolve()"
);
} else o = f;
var p = e.defer(),
m = p.promise,
g = (m.$$promises = {}),
y = B({}, r),
b = 1 + v.length / 3,
w = !1;
if (R(o.$$failure)) return u(o.$$failure), m;
o.$$inheritedValues && i(y, h(o.$$inheritedValues, $)),
B(g, o.$$promises),
o.$$values
? ((w = i(y, h(o.$$values, $))),
(m.$$inheritedValues = h(o.$$values, $)),
s())
: (o.$$inheritedValues &&
(m.$$inheritedValues = h(o.$$inheritedValues, $)),
o.then(s, u));
for (var x = 0, S = v.length; S > x; x += 3)
r.hasOwnProperty(v[x]) ? s() : c(v[x], v[x + 1], v[x + 2]);
return m;
}
);
}),
(this.resolve = function (e, t, n, r) {
return this.study(e)(t, n, r);
});
}
function v(e, t, n) {
(this.fromConfig = function (e, t, n) {
return R(e.template)
? this.fromString(e.template, t)
: R(e.templateUrl)
? this.fromUrl(e.templateUrl, t)
: R(e.templateProvider)
? this.fromProvider(e.templateProvider, t, n)
: null;
}),
(this.fromString = function (e, t) {
return q(e) ? e(t) : e;
}),
(this.fromUrl = function (n, r) {
return (
q(n) && (n = n(r)),
null == n
? null
: e
.get(n, { cache: t, headers: { Accept: "text/html" } })
.then(function (e) {
return e.data;
})
);
}),
(this.fromProvider = function (e, t, r) {
return n.invoke(e, null, r || { params: t });
});
}
function m(e, t, i) {
function o(t, n, r, i) {
if ((v.push(t), d[t])) return d[t];
if (!/^\w+([-.]+\w+)*(?:\[\])?$/.test(t))
throw new Error(
"Invalid parameter name '" + t + "' in pattern '" + e + "'"
);
if ($[t])
throw new Error(
"Duplicate parameter name '" + t + "' in pattern '" + e + "'"
);
return ($[t] = new W.Param(t, n, r, i)), $[t];
}
function a(e, t, n, r) {
var i = ["", ""],
o = e.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&");
if (!t) return o;
switch (n) {
case !1:
i = ["(", ")" + (r ? "?" : "")];
break;
case !0:
(o = o.replace(/\/$/, "")), (i = ["(?:/(", ")|/)?"]);
break;
default:
i = ["(" + n + "|", ")?"];
}
return o + i[0] + t + i[1];
}
function s(i, o) {
var a, s, u, c, l;
return (
(a = i[2] || i[3]),
(l = t.params[a]),
(u = e.substring(h, i.index)),
(s = o ? i[4] : i[4] || ("*" == i[1] ? ".*" : null)),
s &&
(c =
W.type(s) ||
r(W.type("string"), {
pattern: new RegExp(s, t.caseInsensitive ? "i" : n),
})),
{ id: a, regexp: s, segment: u, type: c, cfg: l }
);
}
t = B({ params: {} }, F(t) ? t : {});
var u,
c =
/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,
l =
/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,
f = "^",
h = 0,
p = (this.segments = []),
d = i ? i.params : {},
$ = (this.params = i ? i.params.$$new() : new W.ParamSet()),
v = [];
this.source = e;
for (
var m, g, y;
(u = c.exec(e)) && ((m = s(u, !1)), !(m.segment.indexOf("?") >= 0));
)
(g = o(m.id, m.type, m.cfg, "path")),
(f += a(m.segment, g.type.pattern.source, g.squash, g.isOptional)),
p.push(m.segment),
(h = c.lastIndex);
y = e.substring(h);
var b = y.indexOf("?");
if (b >= 0) {
var w = (this.sourceSearch = y.substring(b));
if (
((y = y.substring(0, b)),
(this.sourcePath = e.substring(0, h + b)),
w.length > 0)
)
for (h = 0; (u = l.exec(w)); )
(m = s(u, !0)),
(g = o(m.id, m.type, m.cfg, "search")),
(h = c.lastIndex);
} else (this.sourcePath = e), (this.sourceSearch = "");
(f += a(y) + (t.strict === !1 ? "/?" : "") + "$"),
p.push(y),
(this.regexp = new RegExp(f, t.caseInsensitive ? "i" : n)),
(this.prefix = p[0]),
(this.$$paramNames = v);
}
function g(e) {
B(this, e);
}
function y() {
function e(e) {
return null != e
? e.toString().replace(/~/g, "~~").replace(/\//g, "~2F")
: e;
}
function i(e) {
return null != e
? e.toString().replace(/~2F/g, "/").replace(/~~/g, "~")
: e;
}
function o() {
return { strict: $, caseInsensitive: h };
}
function u(e) {
return q(e) || (U(e) && q(e[e.length - 1]));
}
function c() {
for (; x.length; ) {
var e = x.shift();
if (e.pattern)
throw new Error(
"You cannot override a type's .pattern at runtime."
);
t.extend(b[e.name], f.invoke(e.def));
}
}
function l(e) {
B(this, e || {});
}
W = this;
var f,
h = !1,
$ = !0,
v = !1,
b = {},
w = !0,
x = [],
S = {
string: {
encode: e,
decode: i,
is: function (e) {
return null == e || !R(e) || "string" == typeof e;
},
pattern: /[^\/]*/,
},
int: {
encode: e,
decode: function (e) {
return parseInt(e, 10);
},
is: function (e) {
return R(e) && this.decode(e.toString()) === e;
},
pattern: /\d+/,
},
bool: {
encode: function (e) {
return e ? 1 : 0;
},
decode: function (e) {
return 0 !== parseInt(e, 10);
},
is: function (e) {
return e === !0 || e === !1;
},
pattern: /0|1/,
},
date: {
encode: function (e) {
return this.is(e)
? [
e.getFullYear(),
("0" + (e.getMonth() + 1)).slice(-2),
("0" + e.getDate()).slice(-2),
].join("-")
: n;
},
decode: function (e) {
if (this.is(e)) return e;
var t = this.capture.exec(e);
return t ? new Date(t[1], t[2] - 1, t[3]) : n;
},
is: function (e) {
return e instanceof Date && !isNaN(e.valueOf());
},
equals: function (e, t) {
return (
this.is(e) && this.is(t) && e.toISOString() === t.toISOString()
);
},
pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,
capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,
},
json: {
encode: t.toJson,
decode: t.fromJson,
is: t.isObject,
equals: t.equals,
pattern: /[^\/]*/,
},
any: {
encode: t.identity,
decode: t.identity,
equals: t.equals,
pattern: /.*/,
},
};
(y.$$getDefaultValue = function (e) {
if (!u(e.value)) return e.value;
if (!f)
throw new Error(
"Injectable functions cannot be called at configuration time"
);
return f.invoke(e.value);
}),
(this.caseInsensitive = function (e) {
return R(e) && (h = e), h;
}),
(this.strictMode = function (e) {
return R(e) && ($ = e), $;
}),
(this.defaultSquashPolicy = function (e) {
if (!R(e)) return v;
if (e !== !0 && e !== !1 && !_(e))
throw new Error(
"Invalid squash policy: " +
e +
". Valid policies: false, true, arbitrary-string"
);
return (v = e), e;
}),
(this.compile = function (e, t) {
return new m(e, B(o(), t));
}),
(this.isMatcher = function (e) {
if (!F(e)) return !1;
var t = !0;
return (
H(m.prototype, function (n, r) {
q(n) && (t = t && R(e[r]) && q(e[r]));
}),
t
);
}),
(this.type = function (e, t, n) {
if (!R(t)) return b[e];
if (b.hasOwnProperty(e))
throw new Error(
"A type named '" + e + "' has already been defined."
);
return (
(b[e] = new g(B({ name: e }, t))),
n && (x.push({ name: e, def: n }), w || c()),
this
);
}),
H(S, function (e, t) {
b[t] = new g(B({ name: t }, e));
}),
(b = r(b, {})),
(this.$get = [
"$injector",
function (e) {
return (
(f = e),
(w = !1),
c(),
H(S, function (e, t) {
b[t] || (b[t] = new g(e));
}),
this
);
},
]),
(this.Param = function (e, r, i, o) {
function c(e) {
var t = F(e) ? a(e) : [],
n =
-1 === s(t, "value") &&
-1 === s(t, "type") &&
-1 === s(t, "squash") &&
-1 === s(t, "array");
return (
n && (e = { value: e }),
(e.$$fn = u(e.value)
? e.value
: function () {
return e.value;
}),
e
);
}
function l(n, r, i) {
if (n.type && r)
throw new Error("Param '" + e + "' has two type configurations.");
return r
? r
: n.type
? t.isString(n.type)
? b[n.type]
: n.type instanceof g
? n.type
: new g(n.type)
: "config" === i
? b.any
: b.string;
}
function h() {
var t = { array: "search" === o ? "auto" : !1 },
n = e.match(/\[\]$/) ? { array: !0 } : {};
return B(t, n, i).array;
}
function $(e, t) {
var n = e.squash;
if (!t || n === !1) return !1;
if (!R(n) || null == n) return v;
if (n === !0 || _(n)) return n;
throw new Error(
"Invalid squash policy: '" +
n +
"'. Valid policies: false, true, or arbitrary string"
);
}
function m(e, t, r, i) {
var o,
a,
u = [
{ from: "", to: r || t ? n : "" },
{ from: null, to: r || t ? n : "" },
];
return (
(o = U(e.replace) ? e.replace : []),
_(i) && o.push({ from: i, to: n }),
(a = d(o, function (e) {
return e.from;
})),
p(u, function (e) {
return -1 === s(a, e.from);
}).concat(o)
);
}
function y() {
if (!f)
throw new Error(
"Injectable functions cannot be called at configuration time"
);
var e = f.invoke(i.$$fn);
if (null !== e && e !== n && !S.type.is(e))
throw new Error(
"Default value (" +
e +
") for parameter '" +
S.id +
"' is not an instance of Type (" +
S.type.name +
")"
);
return e;
}
function w(e) {
function t(e) {
return function (t) {
return t.from === e;
};
}
function n(e) {
var n = d(p(S.replace, t(e)), function (e) {
return e.to;
});
return n.length ? n[0] : e;
}
return (e = n(e)), R(e) ? S.type.$normalize(e) : y();
}
function x() {
return (
"{Param:" +
e +
" " +
r +
" squash: '" +
A +
"' optional: " +
C +
"}"
);
}
var S = this;
(i = c(i)), (r = l(i, r, o));
var E = h();
(r = E ? r.$asArray(E, "search" === o) : r),
"string" !== r.name ||
E ||
"path" !== o ||
i.value !== n ||
(i.value = "");
var C = i.value !== n,
A = $(i, C),
k = m(i, E, C, A);
B(this, {
id: e,
type: r,
location: o,
array: E,
squash: A,
replace: k,
isOptional: C,
value: w,
dynamic: n,
config: i,
toString: x,
});
}),
(l.prototype = {
$$new: function () {
return r(this, B(new l(), { $$parent: this }));
},
$$keys: function () {
for (var e = [], t = [], n = this, r = a(l.prototype); n; )
t.push(n), (n = n.$$parent);
return (
t.reverse(),
H(t, function (t) {
H(a(t), function (t) {
-1 === s(e, t) && -1 === s(r, t) && e.push(t);
});
}),
e
);
},
$$values: function (e) {
var t = {},
n = this;
return (
H(n.$$keys(), function (r) {
t[r] = n[r].value(e && e[r]);
}),
t
);
},
$$equals: function (e, t) {
var n = !0,
r = this;
return (
H(r.$$keys(), function (i) {
var o = e && e[i],
a = t && t[i];
r[i].type.equals(o, a) || (n = !1);
}),
n
);
},
$$validates: function (e) {
var r,
i,
o,
a,
s,
u = this.$$keys();
for (
r = 0;
r < u.length &&
((i = this[u[r]]),
(o = e[u[r]]),
(o !== n && null !== o) || !i.isOptional);
r++
) {
if (((a = i.type.$normalize(o)), !i.type.is(a))) return !1;
if (
((s = i.type.encode(a)),
t.isString(s) && !i.type.pattern.exec(s))
)
return !1;
}
return !0;
},
$$parent: n,
}),
(this.ParamSet = l);
}
function b(e, r) {
function i(e) {
var t = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(
e.source
);
return null != t ? t[1].replace(/\\(.)/g, "$1") : "";
}
function o(e, t) {
return e.replace(/\$(\$|\d{1,2})/, function (e, n) {
return t["$" === n ? 0 : Number(n)];
});
}
function a(e, t, n) {
if (!n) return !1;
var r = e.invoke(t, t, { $match: n });
return R(r) ? r : !0;
}
function s(r, i, o, a, s) {
function h(e, t, n) {
return "/" === v
? e
: t
? v.slice(0, -1) + e
: n
? v.slice(1) + e
: e;
}
function p(e) {
function t(e) {
var t = e(o, r);
return t ? (_(t) && r.replace().url(t), !0) : !1;
}
if (!e || !e.defaultPrevented) {
$ && r.url() === $;
$ = n;
var i,
a = c.length;
for (i = 0; a > i; i++) if (t(c[i])) return;
l && t(l);
}
}
function d() {
return (u = u || i.$on("$locationChangeSuccess", p));
}
var $,
v = a.baseHref(),
m = r.url();
return (
f || d(),
{
sync: function () {
p();
},
listen: function () {
return d();
},
update: function (e) {
return e
? void (m = r.url())
: void (r.url() !== m && (r.url(m), r.replace()));
},
push: function (e, t, i) {
var o = e.format(t || {});
null !== o && t && t["#"] && (o += "#" + t["#"]),
r.url(o),
($ = i && i.$$avoidResync ? r.url() : n),
i && i.replace && r.replace();
},
href: function (n, i, o) {
if (!n.validates(i)) return null;
var a = e.html5Mode();
t.isObject(a) && (a = a.enabled), (a = a && s.history);
var u = n.format(i);
if (
((o = o || {}),
a || null === u || (u = "#" + e.hashPrefix() + u),
null !== u && i && i["#"] && (u += "#" + i["#"]),
(u = h(u, a, o.absolute)),
!o.absolute || !u)
)
return u;
var c = !a && u ? "/" : "",
l = r.port();
return (
(l = 80 === l || 443 === l ? "" : ":" + l),
[r.protocol(), "://", r.host(), l, c, u].join("")
);
},
}
);
}
var u,
c = [],
l = null,
f = !1;
(this.rule = function (e) {
if (!q(e)) throw new Error("'rule' must be a function");
return c.push(e), this;
}),
(this.otherwise = function (e) {
if (_(e)) {
var t = e;
e = function () {
return t;
};
} else if (!q(e)) throw new Error("'rule' must be a function");
return (l = e), this;
}),
(this.when = function (e, t) {
var n,
s = _(t);
if ((_(e) && (e = r.compile(e)), !s && !q(t) && !U(t)))
throw new Error("invalid 'handler' in when()");
var u = {
matcher: function (e, t) {
return (
s &&
((n = r.compile(t)),
(t = [
"$match",
function (e) {
return n.format(e);
},
])),
B(
function (n, r) {
return a(n, t, e.exec(r.path(), r.search()));
},
{ prefix: _(e.prefix) ? e.prefix : "" }
)
);
},
regex: function (e, t) {
if (e.global || e.sticky)
throw new Error("when() RegExp must not be global or sticky");
return (
s &&
((n = t),
(t = [
"$match",
function (e) {
return o(n, e);
},
])),
B(
function (n, r) {
return a(n, t, e.exec(r.path()));
},
{ prefix: i(e) }
)
);
},
},
c = { matcher: r.isMatcher(e), regex: e instanceof RegExp };
for (var l in c) if (c[l]) return this.rule(u[l](e, t));
throw new Error("invalid 'what' in when()");
}),
(this.deferIntercept = function (e) {
e === n && (e = !0), (f = e);
}),
(this.$get = s),
(s.$inject = [
"$location",
"$rootScope",
"$injector",
"$browser",
"$sniffer",
]);
}
function w(e, i) {
function o(e) {
return 0 === e.indexOf(".") || 0 === e.indexOf("^");
}
function h(e, t) {
if (!e) return n;
var r = _(e),
i = r ? e : e.name,
a = o(i);
if (a) {
if (!t)
throw new Error("No reference point given for path '" + i + "'");
t = h(t);
for (var s = i.split("."), u = 0, c = s.length, l = t; c > u; u++)
if ("" !== s[u] || 0 !== u) {
if ("^" !== s[u]) break;
if (!l.parent)
throw new Error(
"Path '" + i + "' not valid for state '" + t.name + "'"
);
l = l.parent;
} else l = t;
(s = s.slice(u).join(".")),
(i = l.name + (l.name && s ? "." : "") + s);
}
var f = C[i];
return !f || (!r && (r || (f !== e && f.self !== e))) ? n : f;
}
function p(e, t) {
A[e] || (A[e] = []), A[e].push(t);
}
function $(e) {
for (var t = A[e] || []; t.length; ) v(t.shift());
}
function v(t) {
t = r(t, {
self: t,
resolve: t.resolve || {},
toString: function () {
return this.name;
},
});
var n = t.name;
if (!_(n) || n.indexOf("@") >= 0)
throw new Error("State must have a valid name");
if (C.hasOwnProperty(n))
throw new Error("State '" + n + "' is already defined");
var i =
-1 !== n.indexOf(".")
? n.substring(0, n.lastIndexOf("."))
: _(t.parent)
? t.parent
: F(t.parent) && _(t.parent.name)
? t.parent.name
: "";
if (i && !C[i]) return p(i, t.self);
for (var o in O) q(O[o]) && (t[o] = O[o](t, O.$delegates[o]));
return (
(C[n] = t),
!t[k] &&
t.url &&
e.when(t.url, [
"$match",
"$stateParams",
function (e, n) {
(E.$current.navigable == t && c(e, n)) ||
E.transitionTo(t, e, { inherit: !0, location: !1 });
},
]),
$(n),
t
);
}
function m(e) {
return e.indexOf("*") > -1;
}
function g(e) {
for (
var t = e.split("."),
n = E.$current.name.split("."),
r = 0,
i = t.length;
i > r;
r++
)
"*" === t[r] && (n[r] = "*");
return (
"**" === t[0] && ((n = n.slice(s(n, t[1]))), n.unshift("**")),
"**" === t[t.length - 1] &&
(n.splice(s(n, t[t.length - 2]) + 1, Number.MAX_VALUE),
n.push("**")),
t.length != n.length ? !1 : n.join("") === t.join("")
);
}
function y(e, t) {
return _(e) && !R(t)
? O[e]
: q(t) && _(e)
? (O[e] && !O.$delegates[e] && (O.$delegates[e] = O[e]),
(O[e] = t),
this)
: this;
}
function b(e, t) {
return F(e) ? (t = e) : (t.name = e), v(t), this;
}
function w(e, i, o, s, f, p, $, v, y) {
function b(t, n, r, o) {
var a = e.$broadcast("$stateNotFound", t, n, r);
if (a.defaultPrevented) return $.update(), M;
if (!a.retry) return null;
if (o.$retry) return $.update(), j;
var s = (E.transition = i.when(a.retry));
return (
s.then(
function () {
return s !== E.transition
? A
: ((t.options.$retry = !0),
E.transitionTo(t.to, t.toParams, t.options));
},
function () {
return M;
}
),
$.update(),
s
);
}
function w(e, n, r, a, u, c) {
function h() {
var n = [];
return (
H(e.views, function (r, i) {
var a = r.resolve && r.resolve !== e.resolve ? r.resolve : {};
(a.$template = [
function () {
return (
o.load(i, {
view: r,
locals: u.globals,
params: p,
notify: c.notify,
}) || ""
);
},
]),
n.push(
f.resolve(a, u.globals, u.resolve, e).then(function (n) {
if (q(r.controllerProvider) || U(r.controllerProvider)) {
var o = t.extend({}, a, u.globals);
n.$$controller = s.invoke(
r.controllerProvider,
null,
o
);
} else n.$$controller = r.controller;
(n.$$state = e),
(n.$$controllerAs = r.controllerAs),
(u[i] = n);
})
);
}),
i.all(n).then(function () {
return u.globals;
})
);
}
var p = r ? n : l(e.params.$$keys(), n),
d = { $stateParams: p };
u.resolve = f.resolve(e.resolve, d, u.resolve, e);
var $ = [
u.resolve.then(function (e) {
u.globals = e;
}),
];
return (
a && $.push(a),
i
.all($)
.then(h)
.then(function (e) {
return u;
})
);
}
var A = i.reject(new Error("transition superseded")),
O = i.reject(new Error("transition prevented")),
M = i.reject(new Error("transition aborted")),
j = i.reject(new Error("transition failed"));
return (
(S.locals = { resolve: null, globals: { $stateParams: {} } }),
(E = { params: {}, current: S.self, $current: S, transition: null }),
(E.reload = function (e) {
return E.transitionTo(E.current, p, {
reload: e || !0,
inherit: !1,
notify: !0,
});
}),
(E.go = function (e, t, n) {
return E.transitionTo(
e,
t,
B({ inherit: !0, relative: E.$current }, n)
);
}),
(E.transitionTo = function (t, n, o) {
(n = n || {}),
(o = B(
{
location: !0,
inherit: !1,
relative: null,
notify: !0,
reload: !1,
$retry: !1,
},
o || {}
));
var a,
c = E.$current,
f = E.params,
d = c.path,
v = h(t, o.relative),
m = n["#"];
if (!R(v)) {
var g = { to: t, toParams: n, options: o },
y = b(g, c.self, f, o);
if (y) return y;
if (
((t = g.to),
(n = g.toParams),
(o = g.options),
(v = h(t, o.relative)),
!R(v))
) {
if (!o.relative) throw new Error("No such state '" + t + "'");
throw new Error(
"Could not resolve '" +
t +
"' from state '" +
o.relative +
"'"
);
}
}
if (v[k])
throw new Error(
"Cannot transition to abstract state '" + t + "'"
);
if (
(o.inherit && (n = u(p, n || {}, E.$current, v)),
!v.params.$$validates(n))
)
return j;
(n = v.params.$$values(n)), (t = v);
var C = t.path,
M = 0,
T = C[M],
N = S.locals,
V = [];
if (o.reload) {
if (_(o.reload) || F(o.reload)) {
if (F(o.reload) && !o.reload.name)
throw new Error("Invalid reload state object");
var P = o.reload === !0 ? d[0] : h(o.reload);
if (o.reload && !P)
throw new Error(
"No such reload state '" +
(_(o.reload) ? o.reload : o.reload.name) +
"'"
);
for (; T && T === d[M] && T !== P; )
(N = V[M] = T.locals), M++, (T = C[M]);
}
} else
for (; T && T === d[M] && T.ownParams.$$equals(n, f); )
(N = V[M] = T.locals), M++, (T = C[M]);
if (x(t, n, c, f, N, o))
return (
m && (n["#"] = m),
(E.params = n),
L(E.params, p),
L(l(t.params.$$keys(), p), t.locals.globals.$stateParams),
o.location &&
t.navigable &&
t.navigable.url &&
($.push(t.navigable.url, n, {
$$avoidResync: !0,
replace: "replace" === o.location,
}),
$.update(!0)),
(E.transition = null),
i.when(E.current)
);
if (
((n = l(t.params.$$keys(), n || {})),
m && (n["#"] = m),
o.notify &&
e.$broadcast("$stateChangeStart", t.self, n, c.self, f, o)
.defaultPrevented)
)
return (
e.$broadcast("$stateChangeCancel", t.self, n, c.self, f),
null == E.transition && $.update(),
O
);
for (var I = i.when(N), D = M; D < C.length; D++, T = C[D])
(N = V[D] = r(N)), (I = w(T, n, T === t, I, N, o));
var q = (E.transition = I.then(
function () {
var r, i, a;
if (E.transition !== q) return A;
for (r = d.length - 1; r >= M; r--)
(a = d[r]),
a.self.onExit &&
s.invoke(a.self.onExit, a.self, a.locals.globals),
(a.locals = null);
for (r = M; r < C.length; r++)
(i = C[r]),
(i.locals = V[r]),
i.self.onEnter &&
s.invoke(i.self.onEnter, i.self, i.locals.globals);
return E.transition !== q
? A
: ((E.$current = t),
(E.current = t.self),
(E.params = n),
L(E.params, p),
(E.transition = null),
o.location &&
t.navigable &&
$.push(
t.navigable.url,
t.navigable.locals.globals.$stateParams,
{ $$avoidResync: !0, replace: "replace" === o.location }
),
o.notify &&
e.$broadcast("$stateChangeSuccess", t.self, n, c.self, f),
$.update(!0),
E.current);
},
function (r) {
return E.transition !== q
? A
: ((E.transition = null),
(a = e.$broadcast(
"$stateChangeError",
t.self,
n,
c.self,
f,
r
)),
a.defaultPrevented || $.update(),
i.reject(r));
}
));
return q;
}),
(E.is = function (e, t, r) {
r = B({ relative: E.$current }, r || {});
var i = h(e, r.relative);
return R(i)
? E.$current !== i
? !1
: t
? c(i.params.$$values(t), p)
: !0
: n;
}),
(E.includes = function (e, t, r) {
if (((r = B({ relative: E.$current }, r || {})), _(e) && m(e))) {
if (!g(e)) return !1;
e = E.$current.name;
}
var i = h(e, r.relative);
return R(i)
? R(E.$current.includes[i.name])
? t
? c(i.params.$$values(t), p, a(t))
: !0
: !1
: n;
}),
(E.href = function (e, t, r) {
r = B(
{ lossy: !0, inherit: !0, absolute: !1, relative: E.$current },
r || {}
);
var i = h(e, r.relative);
if (!R(i)) return null;
r.inherit && (t = u(p, t || {}, E.$current, i));
var o = i && r.lossy ? i.navigable : i;
return o && o.url !== n && null !== o.url
? $.href(o.url, l(i.params.$$keys().concat("#"), t || {}), {
absolute: r.absolute,
})
: null;
}),
(E.get = function (e, t) {
if (0 === arguments.length)
return d(a(C), function (e) {
return C[e].self;
});
var n = h(e, t || E.$current);
return n && n.self ? n.self : null;
}),
E
);
}
function x(e, t, n, r, i, o) {
function a(e, t, n) {
function r(t) {
return "search" != e.params[t].location;
}
var i = e.params.$$keys().filter(r),
o = f.apply({}, [e.params].concat(i)),
a = new W.ParamSet(o);
return a.$$equals(t, n);
}
return !o.reload &&
e === n &&
(i === n.locals || (e.self.reloadOnSearch === !1 && a(n, r, t)))
? !0
: void 0;
}
var S,
E,
C = {},
A = {},
k = "abstract",
O = {
parent: function (e) {
if (R(e.parent) && e.parent) return h(e.parent);
var t = /^(.+)\.[^.]+$/.exec(e.name);
return t ? h(t[1]) : S;
},
data: function (e) {
return (
e.parent &&
e.parent.data &&
(e.data = e.self.data = r(e.parent.data, e.data)),
e.data
);
},
url: function (e) {
var t = e.url,
n = { params: e.params || {} };
if (_(t))
return "^" == t.charAt(0)
? i.compile(t.substring(1), n)
: (e.parent.navigable || S).url.concat(t, n);
if (!t || i.isMatcher(t)) return t;
throw new Error("Invalid url '" + t + "' in state '" + e + "'");
},
navigable: function (e) {
return e.url ? e : e.parent ? e.parent.navigable : null;
},
ownParams: function (e) {
var t = (e.url && e.url.params) || new W.ParamSet();
return (
H(e.params || {}, function (e, n) {
t[n] || (t[n] = new W.Param(n, null, e, "config"));
}),
t
);
},
params: function (e) {
var t = f(e.ownParams, e.ownParams.$$keys());
return e.parent && e.parent.params
? B(e.parent.params.$$new(), t)
: new W.ParamSet();
},
views: function (e) {
var t = {};
return (
H(R(e.views) ? e.views : { "": e }, function (n, r) {
r.indexOf("@") < 0 && (r += "@" + e.parent.name), (t[r] = n);
}),
t
);
},
path: function (e) {
return e.parent ? e.parent.path.concat(e) : [];
},
includes: function (e) {
var t = e.parent ? B({}, e.parent.includes) : {};
return (t[e.name] = !0), t;
},
$delegates: {},
};
(S = v({ name: "", url: "^", views: null, abstract: !0 })),
(S.navigable = null),
(this.decorator = y),
(this.state = b),
(this.$get = w),
(w.$inject = [
"$rootScope",
"$q",
"$view",
"$injector",
"$resolve",
"$stateParams",
"$urlRouter",
"$location",
"$urlMatcherFactory",
]);
}
function x() {
function e(e, t) {
return {
load: function (e, n) {
var r,
i = {
template: null,
controller: null,
view: null,
locals: null,
notify: !0,
async: !0,
params: {},
};
return (
(n = B(i, n)),
n.view && (r = t.fromConfig(n.view, n.params, n.locals)),
r
);
},
};
}
(this.$get = e), (e.$inject = ["$rootScope", "$templateFactory"]);
}
function S() {
var e = !1;
(this.useAnchorScroll = function () {
e = !0;
}),
(this.$get = [
"$anchorScroll",
"$timeout",
function (t, n) {
return e
? t
: function (e) {
return n(
function () {
e[0].scrollIntoView();
},
0,
!1
);
};
},
]);
}
function E(e, n, r, i) {
function o() {
return n.has
? function (e) {
return n.has(e) ? n.get(e) : null;
}
: function (e) {
try {
return n.get(e);
} catch (t) {
return null;
}
};
}
function a(e, n) {
function r(e) {
return 1 === G && J >= 4
? !!c.enabled(e)
: 1 === G && J >= 2
? !!c.enabled()
: !!u;
}
var i = {
enter: function (e, t, n) {
t.after(e), n();
},
leave: function (e, t) {
e.remove(), t();
},
};
if (e.noanimation) return i;
if (c)
return {
enter: function (e, n, o) {
r(e)
? t.version.minor > 2
? c.enter(e, null, n).then(o)
: c.enter(e, null, n, o)
: i.enter(e, n, o);
},
leave: function (e, n) {
r(e)
? t.version.minor > 2
? c.leave(e).then(n)
: c.leave(e, n)
: i.leave(e, n);
},
};
if (u) {
var o = u && u(n, e);
return {
enter: function (e, t, n) {
o.enter(e, null, t), n();
},
leave: function (e, t) {
o.leave(e), t();
},
};
}
return i;
}
var s = o(),
u = s("$animator"),
c = s("$animate"),
l = {
restrict: "ECA",
terminal: !0,
priority: 400,
transclude: "element",
compile: function (n, o, s) {
return function (n, o, u) {
function c() {
function e() {
t && t.remove(), n && n.$destroy();
}
var t = f,
n = p;
n && (n._willBeDestroyed = !0),
h
? (m.leave(h, function () {
e(), (f = null);
}),
(f = h))
: (e(), (f = null)),
(h = null),
(p = null);
}
function l(a) {
var l,
f = A(n, u, o, i),
g = f && e.$current && e.$current.locals[f];
if ((a || g !== d) && !n._willBeDestroyed) {
(l = n.$new()),
(d = e.$current.locals[f]),
l.$emit("$viewContentLoading", f);
var y = s(l, function (e) {
m.enter(e, o, function () {
p && p.$emit("$viewContentAnimationEnded"),
((t.isDefined(v) && !v) || n.$eval(v)) && r(e);
}),
c();
});
(h = y),
(p = l),
p.$emit("$viewContentLoaded", f),
p.$eval($);
}
}
var f,
h,
p,
d,
$ = u.onload || "",
v = u.autoscroll,
m = a(u, n);
n.$on("$stateChangeSuccess", function () {
l(!1);
}),
l(!0);
};
},
};
return l;
}
function C(e, t, n, r) {
return {
restrict: "ECA",
priority: -400,
compile: function (i) {
var o = i.html();
return function (i, a, s) {
var u = n.$current,
c = A(i, s, a, r),
l = u && u.locals[c];
if (l) {
a.data("$uiView", { name: c, state: l.$$state }),
a.html(l.$template ? l.$template : o);
var f = e(a.contents());
if (l.$$controller) {
(l.$scope = i), (l.$element = a);
var h = t(l.$$controller, l);
l.$$controllerAs && (i[l.$$controllerAs] = h),
a.data("$ngControllerController", h),
a.children().data("$ngControllerController", h);
}
f(i);
}
};
},
};
}
function A(e, t, n, r) {
var i = r(t.uiView || t.name || "")(e),
o = n.inheritedData("$uiView");
return i.indexOf("@") >= 0 ? i : i + "@" + (o ? o.state.name : "");
}
function k(e, t) {
var n,
r = e.match(/^\s*({[^}]*})\s*$/);
if (
(r && (e = t + "(" + r[1] + ")"),
(n = e.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/)),
!n || 4 !== n.length)
)
throw new Error("Invalid state ref '" + e + "'");
return { state: n[1], paramExpr: n[3] || null };
}
function O(e) {
var t = e.parent().inheritedData("$uiView");
return t && t.state && t.state.name ? t.state : void 0;
}
function M(e) {
var t =
"[object SVGAnimatedString]" ===
Object.prototype.toString.call(e.prop("href")),
n = "FORM" === e[0].nodeName;
return {
attr: n ? "action" : t ? "xlink:href" : "href",
isAnchor: "A" === e.prop("tagName").toUpperCase(),
clickable: !n,
};
}
function j(e, t, n, r, i) {
return function (o) {
var a = o.which || o.button,
s = i();
if (
!(a > 1 || o.ctrlKey || o.metaKey || o.shiftKey || e.attr("target"))
) {
var u = n(function () {
t.go(s.state, s.params, s.options);
});
o.preventDefault();
var c = r.isAnchor && !s.href ? 1 : 0;
o.preventDefault = function () {
c-- <= 0 && n.cancel(u);
};
}
};
}
function T(e, t) {
return { relative: O(e) || t.$current, inherit: !0 };
}
function N(e, n) {
return {
restrict: "A",
require: ["?^uiSrefActive", "?^uiSrefActiveEq"],
link: function (r, i, o, a) {
var s = k(o.uiSref, e.current.name),
u = { state: s.state, href: null, params: null },
c = M(i),
l = a[1] || a[0];
u.options = B(T(i, e), o.uiSrefOpts ? r.$eval(o.uiSrefOpts) : {});
var f = function (n) {
n && (u.params = t.copy(n)),
(u.href = e.href(s.state, u.params, u.options)),
l && l.$$addStateInfo(s.state, u.params),
null !== u.href && o.$set(c.attr, u.href);
};
s.paramExpr &&
(r.$watch(
s.paramExpr,
function (e) {
e !== u.params && f(e);
},
!0
),
(u.params = t.copy(r.$eval(s.paramExpr)))),
f(),
c.clickable &&
i.bind(
"click",
j(i, e, n, c, function () {
return u;
})
);
},
};
}
function V(e, t) {
return {
restrict: "A",
require: ["?^uiSrefActive", "?^uiSrefActiveEq"],
link: function (n, r, i, o) {
function a(t) {
(f.state = t[0]),
(f.params = t[1]),
(f.options = t[2]),
(f.href = e.href(f.state, f.params, f.options)),
u && u.$$addStateInfo(f.state, f.params),
f.href && i.$set(s.attr, f.href);
}
var s = M(r),
u = o[1] || o[0],
c = [i.uiState, i.uiStateParams || null, i.uiStateOpts || null],
l =
"[" +
c
.map(function (e) {
return e || "null";
})
.join(", ") +
"]",
f = { state: null, params: null, options: null, href: null };
n.$watch(l, a, !0),
a(n.$eval(l)),
s.clickable &&
r.bind(
"click",
j(r, e, t, s, function () {
return f;
})
);
},
};
}
function P(e, t, n) {
return {
restrict: "A",
controller: [
"$scope",
"$element",
"$attrs",
"$timeout",
function (t, r, i, o) {
function a(t, n, i) {
var o = e.get(t, O(r)),
a = s(t, n);
$.push({ state: o || { name: t }, params: n, hash: a }),
(v[a] = i);
}
function s(e, n) {
if (!_(e)) throw new Error("state should be a string");
return F(n) ? e + z(n) : ((n = t.$eval(n)), F(n) ? e + z(n) : e);
}
function u() {
for (var e = 0; e < $.length; e++)
f($[e].state, $[e].params)
? c(r, v[$[e].hash])
: l(r, v[$[e].hash]),
h($[e].state, $[e].params) ? c(r, p) : l(r, p);
}
function c(e, t) {
o(function () {
e.addClass(t);
});
}
function l(e, t) {
e.removeClass(t);
}
function f(t, n) {
return e.includes(t.name, n);
}
function h(t, n) {
return e.is(t.name, n);
}
var p,
d,
$ = [],
v = {};
p = n(i.uiSrefActiveEq || "", !1)(t);
try {
d = t.$eval(i.uiSrefActive);
} catch (m) {}
(d = d || n(i.uiSrefActive || "", !1)(t)),
F(d) &&
H(d, function (n, r) {
if (_(n)) {
var i = k(n, e.current.name);
a(i.state, t.$eval(i.paramExpr), r);
}
}),
(this.$$addStateInfo = function (e, t) {
(F(d) && $.length > 0) || (a(e, t, d), u());
}),
t.$on("$stateChangeSuccess", u),
u();
},
],
};
}
function I(e) {
var t = function (t, n) {
return e.is(t, n);
};
return (t.$stateful = !0), t;
}
function D(e) {
var t = function (t, n, r) {
return e.includes(t, n, r);
};
return (t.$stateful = !0), t;
}
var R = t.isDefined,
q = t.isFunction,
_ = t.isString,
F = t.isObject,
U = t.isArray,
H = t.forEach,
B = t.extend,
L = t.copy,
z = t.toJson;
t.module("ui.router.util", ["ng"]),
t.module("ui.router.router", ["ui.router.util"]),
t.module("ui.router.state", ["ui.router.router", "ui.router.util"]),
t.module("ui.router", ["ui.router.state"]),
t.module("ui.router.compat", ["ui.router"]),
($.$inject = ["$q", "$injector"]),
t.module("ui.router.util").service("$resolve", $),
(v.$inject = ["$http", "$templateCache", "$injector"]),
t.module("ui.router.util").service("$templateFactory", v);
var W;
(m.prototype.concat = function (e, t) {
var n = {
caseInsensitive: W.caseInsensitive(),
strict: W.strictMode(),
squash: W.defaultSquashPolicy(),
};
return new m(this.sourcePath + e + this.sourceSearch, B(n, t), this);
}),
(m.prototype.toString = function () {
return this.source;
}),
(m.prototype.exec = function (e, t) {
function n(e) {
function t(e) {
return e.split("").reverse().join("");
}
function n(e) {
return e.replace(/\\-/g, "-");
}
var r = t(e).split(/-(?!\\)/),
i = d(r, t);
return d(i, n).reverse();
}
var r = this.regexp.exec(e);
if (!r) return null;
t = t || {};
var i,
o,
a,
s = this.parameters(),
u = s.length,
c = this.segments.length - 1,
l = {};
if (c !== r.length - 1)
throw new Error(
"Unbalanced capture group in route '" + this.source + "'"
);
var f, h;
for (i = 0; c > i; i++) {
for (
a = s[i], f = this.params[a], h = r[i + 1], o = 0;
o < f.replace.length;
o++
)
f.replace[o].from === h && (h = f.replace[o].to);
h && f.array === !0 && (h = n(h)),
R(h) && (h = f.type.decode(h)),
(l[a] = f.value(h));
}
for (; u > i; i++) {
for (
a = s[i],
l[a] = this.params[a].value(t[a]),
f = this.params[a],
h = t[a],
o = 0;
o < f.replace.length;
o++
)
f.replace[o].from === h && (h = f.replace[o].to);
R(h) && (h = f.type.decode(h)), (l[a] = f.value(h));
}
return l;
}),
(m.prototype.parameters = function (e) {
return R(e) ? this.params[e] || null : this.$$paramNames;
}),
(m.prototype.validates = function (e) {
return this.params.$$validates(e);
}),
(m.prototype.format = function (e) {
function t(e) {
return encodeURIComponent(e).replace(/-/g, function (e) {
return "%5C%" + e.charCodeAt(0).toString(16).toUpperCase();
});
}
e = e || {};
var n = this.segments,
r = this.parameters(),
i = this.params;
if (!this.validates(e)) return null;
var o,
a = !1,
s = n.length - 1,
u = r.length,
c = n[0];
for (o = 0; u > o; o++) {
var l = s > o,
f = r[o],
h = i[f],
p = h.value(e[f]),
$ = h.isOptional && h.type.equals(h.value(), p),
v = $ ? h.squash : !1,
m = h.type.encode(p);
if (l) {
var g = n[o + 1],
y = o + 1 === s;
if (v === !1)
null != m &&
(c += U(m) ? d(m, t).join("-") : encodeURIComponent(m)),
(c += g);
else if (v === !0) {
var b = c.match(/\/$/) ? /\/?(.*)/ : /(.*)/;
c += g.match(b)[1];
} else _(v) && (c += v + g);
y && h.squash === !0 && "/" === c.slice(-1) && (c = c.slice(0, -1));
} else {
if (null == m || ($ && v !== !1)) continue;
if ((U(m) || (m = [m]), 0 === m.length)) continue;
(m = d(m, encodeURIComponent).join("&" + f + "=")),
(c += (a ? "&" : "?") + (f + "=" + m)),
(a = !0);
}
}
return c;
}),
(g.prototype.is = function (e, t) {
return !0;
}),
(g.prototype.encode = function (e, t) {
return e;
}),
(g.prototype.decode = function (e, t) {
return e;
}),
(g.prototype.equals = function (e, t) {
return e == t;
}),
(g.prototype.$subPattern = function () {
var e = this.pattern.toString();
return e.substr(1, e.length - 2);
}),
(g.prototype.pattern = /.*/),
(g.prototype.toString = function () {
return "{Type:" + this.name + "}";
}),
(g.prototype.$normalize = function (e) {
return this.is(e) ? e : this.decode(e);
}),
(g.prototype.$asArray = function (e, t) {
function r(e, t) {
function r(e, t) {
return function () {
return e[t].apply(e, arguments);
};
}
function i(e) {
return U(e) ? e : R(e) ? [e] : [];
}
function o(e) {
switch (e.length) {
case 0:
return n;
case 1:
return "auto" === t ? e[0] : e;
default:
return e;
}
}
function a(e) {
return !e;
}
function s(e, t) {
return function (n) {
if (U(n) && 0 === n.length) return n;
n = i(n);
var r = d(n, e);
return t === !0 ? 0 === p(r, a).length : o(r);
};
}
function u(e) {
return function (t, n) {
var r = i(t),
o = i(n);
if (r.length !== o.length) return !1;
for (var a = 0; a < r.length; a++) if (!e(r[a], o[a])) return !1;
return !0;
};
}
(this.encode = s(r(e, "encode"))),
(this.decode = s(r(e, "decode"))),
(this.is = s(r(e, "is"), !0)),
(this.equals = u(r(e, "equals"))),
(this.pattern = e.pattern),
(this.$normalize = s(r(e, "$normalize"))),
(this.name = e.name),
(this.$arrayMode = t);
}
if (!e) return this;
if ("auto" === e && !t)
throw new Error("'auto' array mode is for query parameters only");
return new r(this, e);
}),
t.module("ui.router.util").provider("$urlMatcherFactory", y),
t.module("ui.router.util").run(["$urlMatcherFactory", function (e) {}]),
(b.$inject = ["$locationProvider", "$urlMatcherFactoryProvider"]),
t.module("ui.router.router").provider("$urlRouter", b),
(w.$inject = ["$urlRouterProvider", "$urlMatcherFactoryProvider"]),
t
.module("ui.router.state")
.factory("$stateParams", function () {
return {};
})
.provider("$state", w),
(x.$inject = []),
t.module("ui.router.state").provider("$view", x),
t.module("ui.router.state").provider("$uiViewScroll", S);
var G = t.version.major,
J = t.version.minor;
(E.$inject = ["$state", "$injector", "$uiViewScroll", "$interpolate"]),
(C.$inject = ["$compile", "$controller", "$state", "$interpolate"]),
t.module("ui.router.state").directive("uiView", E),
t.module("ui.router.state").directive("uiView", C),
(N.$inject = ["$state", "$timeout"]),
(V.$inject = ["$state", "$timeout"]),
(P.$inject = ["$state", "$stateParams", "$interpolate"]),
t
.module("ui.router.state")
.directive("uiSref", N)
.directive("uiSrefActive", P)
.directive("uiSrefActiveEq", P)
.directive("uiState", V),
(I.$inject = ["$state"]),
(D.$inject = ["$state"]),
t
.module("ui.router.state")
.filter("isState", I)
.filter("includedByState", D);
})(window, window.angular);
|
const _ = require('lodash');
// function d$(){ ...print debug msg... }
class Utils {
constructor(){
this.File = require('./Utils.File');
}
EXIT(message,data){
if(message) console.log("\n"+message);
if(data) console.log(data);
console.log("Process terminated.\n");
process.exit(0);
}
sortFilesArray(array){
array.sort(function(a,b){
let a_name = _.toLower(a);
let b_name = _.toLower(b);
if(a_name<b_name) return -1;
if(a_name>b_name) return 1;
return 0;
});
return array;
}
sortParallelArrays(array, compare_fn, swap_fn){
if(!compare_fn) compare_fn=function(){};
if(!swap_fn) swap_fn=function(){};
for(let i=0,j=0,tmp=null; i<array.length-1; i++){
for(j=i+1; j<array.length; j++){
if(compare_fn(array[i],array[j])>0){
tmp = array[i];
array[i] = array[j];
array[j] = tmp;
swap_fn(i /*old index*/, j /*new index*/, array[i], array[j]);
}
}
}
return array;
}
sortParallelFileArrays(array, swap_fn){
this.sortParallelArrays(array,function(a,b){
let a_name = _.toLower(a);
let b_name = _.toLower(b);
if(a_name<b_name) return -1;
if(a_name>b_name) return 1;
return 0;
},swap_fn);
return array;
}
sortObjectByValue(obj){
return _(obj).toPairs().sortBy(1).fromPairs().value();
}
sortObjectByKey(obj){
return _(obj).toPairs().sortBy(0).fromPairs().value();
}
replaceAll(str, str1, str2, ignore){
return str.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(str2)=="string")?str2.replace(/\$/g,"$$$$"):str2);
}
newFunction(){
try{
function F(args) { return Function.apply(this, args); }
F.prototype = Function.prototype;
return new F(arguments);
}catch(e){
d$(e);
return null;
}
return null;
}
onlyLettersNumbers(s){
return s.replace(/[^a-zA-Z0-9]/g,'');
}
printArrayOrderedList(array,prefix,processFn){
let padding = (""+array.length+"").length+1;
if(!processFn) processFn=function(n){ return n; };
if(!prefix) prefix='';
array.forEach(function(v,i,a){
console.log(prefix+_.padStart((i+1)+')', padding)+" "+processFn(v));
});
}
strToInteger(s){
if(!_.isString(s)) return null;
s = _.trim(s);
if(s.length<=0) return null;
let n = parseInt(s);
if(_.isNil(n) || _.isNaN(n) || ""+n+""!=s) return null;
return n;
}
strToFloat(s){
if(!_.isString(s)) return null;
s = _.trim(s);
if(s.length<=0) return null;
let n = parseFloat(s);
if(_.isNil(n) || _.isNaN(n) || ""+n+""!=s) return null;
return n;
}
strToBoolean(s){
s = _.trim(s);
if(s.length<=0) return null;
s = _.toLower(s);
let n = null;
if(s==="true" || s==="1" || s==="y") n=true;
if(s==="false" || s==="0" || s==="n") n=false;
return n;
}
strToString(s){
if(!_.isString(s)) return null;
s = _.trim(s);
if(s.length<=0) return null;
return s;
}
searchInObjectArray(array,key,value){
for(let i=0; i<array.length; i++){
if(array[i][key]==value) return true;
}
return false;
}
dateToYYYYMMDD(date) {
if(_.isNil(date)) date=Date.now();
let d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();
if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;
return [year, month, day].join('');
}
}
module.exports = new Utils();
|
import React from 'react';
import { SignIn } from 'aws-amplify-react';
import { Auth, I18n } from 'aws-amplify';
import logo from '../../sprouts_logo.png';
export class MySignIn extends SignIn {
constructor(props) {
super(props);
this._validAuthStates = ['signIn'];
this.state = {
email: "",
password: ""
};
this.signIn = this.signIn.bind(this);
this.handleEmail = this.handleEmail.bind(this);
this.handlePassword = this.handlePassword.bind(this);
}
signIn() {
const { email, password } = this.state;
Auth.signIn(email, password)
.then(user => {
if (user.challengeName === 'NEW_PASSWORD_REQUIRED') {
//TODO: fix require new password page
console.log('require new password', user.challengeParam);
this.changeState('requireNewPassword', user);
} else {
this.checkContact(user);
window.location.reload();
}
})
// .then(window.location.reload())
.catch(err => {
if (err.code === 'UserNotConfirmedException') {
console.log('the user is not confirmed');
alert("Please check your email and verify your account before signing in.")
} else {
this.error(err);
}
});
}
handleEmail(event) {
this.setState({ email: event.target.value });
}
handlePassword(event) {
this.setState({ password: event.target.value });
}
showComponent() {
return (
<div className="container">
<div className="row justify-content-center">
<div className="col-12 col-sm-10 col-md-8 col-lg-6 col-xl-5 text-center my-3">
<div className="mb-4">
<img src={logo} alt="logo" width={300/1.5} height={143/1.5}/>
<h5 className="mt-2">Sign in with your Sprouts Account</h5>
</div>
<form>
<div className="form-group">
<h6 className="text-left mb-0">Username or Email</h6>
<input className="form-control rounded-0 border-left-0 border-right-0 border-top-0" type="email" id="username" key="username" name="username" onChange={ this.handleEmail }/>
</div>
<div className="form-group">
<h6 className="text-left mb-0">Password</h6>
<input className="form-control rounded-0 border-left-0 border-right-0 border-top-0" type="password" id="password" key="password" name="password" onChange={ this.handlePassword }/>
</div>
<div className="py-1">
<button type="button" className="btn btn-block rounded-0 btn-primary" onClick={ this.signIn } value="Sign In" >{ I18n.get('Sign In') }</button>
</div>
</form>
<div className="py-1">
<button type="button" className="btn btn-block rounded-0 btn-primary text-white" onClick={ () => this.changeState('signUp') }>
{I18n.get('Create Account')}
</button>
</div>
<div className="py-1">
<button type="button" className="btn btn-link" onClick={() => this.changeState('forgotPassword')}>
{I18n.get('Forgot password?')}
</button>
</div>
<div className="mt-5">
<p className="text-muted small">© 2018 Sprouts UBC. Developed by <a className="text-muted" href="http://codethechange.ca">Code the Change Foundation</a>.</p>
</div>
</div>
</div>
</div>
)
}
} |
import React, { Component } from 'react';
import { connect } from "react-redux"
import store from "../store/index"
import { Layout, Stack, Card, Checkbox, Button } from '@shopify/polaris';
import { addProductId, removeProductId } from '../actions';
class ListedProduct extends Component {
constructor(props) {
super(props);
this.state = {
checked: false,
testObj: { test: "string" }
}
}
componentDidUpdate = (prevProps, prevState) => {
if (this.props.selectAllProducts !== prevProps.selectAllProducts) {
if (this.props.selectAllProducts === true) {
store.dispatch(removeProductId(this.props.id));
store.dispatch(addProductId(this.props.id));
this.setState({ checked: true });
} else {
store.dispatch(removeProductId(this.props.id));
this.setState({ checked: false });
}
}
}
handleChange = () => {
if (this.state.checked === false) {
store.dispatch(addProductId(this.props.id));
this.setState({ checked: true });
} else if (this.state.checked === true) {
store.dispatch(removeProductId(this.props.id));
this.setState({ checked: false });
}
}
render() {
return (
<li class="productButton">
<Button
id={this.props.id}
onClick={this.handleChange}
>
<div style={{ display: "flex" }} >
{this.props.title}
<div style={{ width: "10px" }} />
<Checkbox
checked={this.state.checked}
/>
</div>
</Button>
</li>
)
}
}
const mapStateToProps = (state) => {
return {
selectAllProducts: state.selectAllProducts,
productIds: state.productIds
};
};
export default connect(mapStateToProps)(ListedProduct)
|
import * as Croquet from "@croquet/croquet";
import {
AmbientLight,
Mesh,
MeshBasicMaterial,
Object3D,
Scene,
TextureLoader,
Vector3,
SphereBufferGeometry,
SphereGeometry,
} from "three";
import loadScene from "../engine/engine";
import Renderer from "../engine/renderer";
import XRInput from "../engine/xrinput";
class ViewerView extends Croquet.View {
constructor(model) {
super(model);
this.scene = new Scene();
this.scene.add(new AmbientLight(0xffffff, 4));
loadScene(this.scene);
this.loader = new TextureLoader();
this.photos = [
this.loader.load(require("./assets/images/photo1.jpg")),
this.loader.load(require("./assets/images/photo2.jpg")),
this.loader.load(require("./assets/images/168BFF65-4395-4C32-8C00-8D512118DB28.jpg")),
this.loader.load(require("./assets/images/PANO_20150408_183912.jpg")),
this.loader.load(require("./assets/images/PANO_20160222_122611.jpg")),
this.loader.load(require("./assets/images/PANO_20160410_103408.jpg")),
this.loader.load(require("./assets/images/PANO_20190710_105358.jpg")),
this.loader.load(require("./assets/images/PANO_20200302_132151.jpg")),
this.loader.load(require("./assets/images/PANO_20191112_182609.jpg")),
];
this.orbRadius = .15;
// croquet events
this.subscribe("viewer", "selectphoto", this.LoadPhoto);
this.currentPhoto = 0;
this.isSelecting = false;
//xrpk alternative using gamepad:
const InputHandler = new Object3D();
InputHandler.Update = () => {
if (!XRInput.inputSources) return;
XRInput.inputSources.forEach(e => {
if (!e.gamepad) return;
e.gamepad.buttons.forEach((button, i) => {
if (button.pressed === true && this.isSelecting === false) {
this.pressedButton = button;
this.isSelecting = true;
this.HandlePhotoSelection(e, button);
}
});
if (this.pressedButton && this.pressedButton.pressed === false && this.isSelecting === true) {
this.isSelecting = false;
}
});
};
this.scene.add(InputHandler);
// input init
// default to right hand.
// avoid XRInputs data structures due to XRPK oninputsourcechange bug
this.primaryController = Renderer.xr.getController(0);
this.scene.add(this.primaryController);
this.CreateSkybox();
this.CreateSelectionOrb();
}
HandlePhotoSelection(e, button) {
// xrpk way
XRInput.inputSources.forEach((inputSource, i) => {
if (e.handedness === inputSource.handedness) {
this.primaryIndex = i;
}
});
this.primaryController = Renderer.xr.getController(this.primaryIndex);
let handInSphere = this.SphereDistanceTest(this.primaryController.position, this.orbRadius)
if (handInSphere)
this.CyclePhoto();
}
SphereDistanceTest(pos, dist) {
if (!this.selectionOrb) return;
let controllerPos = new Vector3(pos.x, pos.y, pos.z);
let spherePos = new Vector3();
this.selectionOrb.getWorldPosition(spherePos);
let d = controllerPos.sub(spherePos);
return (d.x * d.x + d.y * d.y + d.z * d.z) < Math.pow(dist, 2);
}
LoadPhoto(data) {
this.Select(data.photoIndex);
}
CreateSkybox() {
let geometry = new SphereBufferGeometry(500, 180, 180);
geometry.scale(- 1, 1, 1);
let photoTexture = this.photos[this.currentPhoto];
this.skyboxMaterial = new MeshBasicMaterial({
map: photoTexture,
precision: "highp",
});
this.skybox = new Mesh(geometry, this.skyboxMaterial);
this.scene.add(this.skybox);
};
CreateSelectionOrb() {
let photoTexture = this.photos[this.NextPhoto()];
let geometry = new SphereGeometry(this.orbRadius, 20, 20);
geometry.scale(- 1, 1, 1);
let material = new MeshBasicMaterial({
color: 0xffffff,
map: photoTexture,
});
let sphere = new Mesh( geometry, material );
sphere.position.setY(1.2);
sphere.position.setZ(-1);
this.selectionOrb = sphere;
this.scene.add(this.selectionOrb);
}
Select(index) {
this.currentPhoto = index;
this.skybox.material.map = this.photos[this.currentPhoto];
this.selectionOrb.material.map = this.photos[this.NextPhoto()]
}
CyclePhoto() {
this.Select(this.NextPhoto());
let data = { photoIndex: this.currentPhoto };
this.publish("viewer", "remoteselectphoto", data);
}
NextPhoto() {
return (this.currentPhoto + 1) % this.photos.length;
}
}
export default ViewerView;
|
class ErrorHandlingApp extends React.Component {
constructor(props) {
super(props);
this.state = {
error: null,
};
}
componentDidMount() {
const url = "http://not_exists";
fetch(url)
.then(response => {
let json = response.json()
// console.log(json);
return json;
})
.then(result => {
// console.log(result);
this.setState({...result})
})
.catch(error => this.setState({ error }));
}
render() {
if(this.state.error) {
console.log(this.state.error);
return <div>{JSON.stringify(this.state)}</div>
}
return (
<div onClick={this.handleClick}>starting error test.</div>
);
}
}
ReactDOM.render(
<ErrorHandlingApp />,
document.getElementById('errorHandlingApp')
)
|
import * as esprima from 'esprima';
import * as escodegen from 'escodegen';
const makeRecord = (l, t, n, c, v) => {
return {'Line': l, 'Type': t, 'Name': n, 'Condition': c, 'Value': v};
};
function flat(arr1) {
return arr1.reduce((acc, val) => Array.isArray(val) ? acc.concat(flat(val)) : acc.concat(val), []);
}
const findHandler = (x) =>
Handlers[x.type](x);
const functionDeclarationHandler = (x) => {
let tmp = [makeRecord(x.loc.start.line, 'function statement', x.id.name, null, null)];
return tmp.concat(x.params.map(y => IdentifierHandler(y))).concat(findHandler(x.body));
};
const variableDeclaratorHandler = (x) =>
makeRecord(x.loc.start.line, 'variable declaration',
x.id.name, null, x.init != null ? escodegen.generate(x.init) : null);
const IdentifierHandler = (x) =>
makeRecord(x.loc.start.line, 'variable declaration', x.name, null, null);
const variableDeclarationHandler = (x) =>
x.declarations.map(y => variableDeclaratorHandler(y));
const blockStatementHandler = (x) =>
x.body.map(x => findHandler(x));
const assignmentExpressionHandler = (x) =>
makeRecord(x.loc.start.line, 'assignment expression',
x.left.name, null, escodegen.generate(x.right));
const sequenceExpressionHandler = (x) =>
x.expressions.map(x => findHandler(x));
const expressionStatementHandler = (x) => {
let y = [x.expression];
return [].concat(y.map(x => findHandler(x)));
};
const whileStatementHandler = (x) => {
let tmp = [makeRecord(x.loc.start.line, 'while statement', null, escodegen.generate(x.test), null)];
return tmp.concat([x.body].map(x => findHandler(x)));
};
const forStatementHandler = (x) => {
let tmp = [makeRecord(x.loc.start.line, 'for statement', null, escodegen.generate(x.test), null)];
return tmp.concat(findHandler(x.init)).concat(findHandler(x.update)).concat(findHandler(x.body));
};
const ifStatementHandler = (x) => {
let ret = [makeRecord(x.loc.start.line, 'if statement', null, escodegen.generate(x.test), null)];
ret = ret.concat(findHandler(x.consequent));
let tmp = x.alternate != null ? findHandler(x.alternate) : [];
return ret.concat(tmp);
};
const returnStatementHandler = (x) =>
makeRecord(x.loc.start.line, 'return statement', null, null, escodegen.generate(x.argument));
let Handlers = {
'FunctionDeclaration': functionDeclarationHandler,
'VariableDeclaration': variableDeclarationHandler,
'BlockStatement': blockStatementHandler,
'VariableDeclarator': variableDeclaratorHandler,
'Identifier': IdentifierHandler,
'ExpressionStatement': expressionStatementHandler,
'SequenceExpression': sequenceExpressionHandler,
'AssignmentExpression': assignmentExpressionHandler,
'WhileStatement': whileStatementHandler,
'ForStatement': forStatementHandler,
'IfStatement': ifStatementHandler,
'ReturnStatement': returnStatementHandler
};
const parseCode = (codeToParse) => {
let ret = esprima.parseScript(codeToParse, {loc: true}).body;
return flat((ret.map(x => findHandler(x))));
};
export {parseCode};
|
import React from 'react';
const Header = ({toDo, done, todos}) => {
return (
<div className="Header mb-3">
<h1 className="title">To do List</h1>
<div>
<p className="m-0">{(new Date()).toDateString()}</p>
{todos.length > 0 && (
<h2 className="position">
<span className="num-color">{toDo}</span> More to do, <span className="num-color">{done}</span> done
</h2>
)}
</div>
</div>
);
};
export default Header; |
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { StackNavigator } from 'react-navigation'
import Login from './Screens/Login' //Login skærm
import GameInfo from './Screens/GameInfo' //Info om spil
import Game1 from './Screens/Game1Props/Game' //Internet connection
import Scanner2 from './Screens/Game2Props/Scanner' //Scanner barcode
import Checking2 from './Screens/Game2Props/Checking' //Checker barcode
import Game2 from './Screens/Game2Props/Game' // Scanner spil -startSide
import Checking3 from './Screens/Game3Props/Checking' //Checker kvadratrod af pi
import Game3 from './Screens/Game3Props/Game' //Kvadratrod pi -startSide
import Game4 from './Screens/Game4Props/Game' //Bevægelse/løb -Spil
import Game5 from './Screens/Game5Props/Game' //MultipleChoice
import Checking6 from './Screens/Game6Props/Checking' //Checker for rigtig tidspunkt studievejledning
import Game6 from './Screens/Game6Props/Game' //Studievejledning spil
import Done7 from './Screens/Game7Props/Done' // Færdig
export default class App extends React.Component {
render() {
return (
<AppNavigator />
);
}
}
const AppNavigator = StackNavigator({
Login: { screen: Login, },
GameInfo: { screen: GameInfo, },
Game1: { screen: Game1, },
Scanner2: { screen: Scanner2, },
Checking2: { screen: Checking2, },
Game2: { screen: Game2, },
Checking3: { screen: Checking3, },
Game3: { screen: Game3, },
Game4: { screen: Game4, },
Game5: { screen: Game5, },
Checking6: {screen: Checking6, },
Game6: { screen: Game6, },
Done7: { screen: Done7, },
}, {
headerMode: 'none',
})
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
|
const path = require('path');
const {log, copyDir, copyFile, } = require('@js-lib/util');
log()
function init(cmdPath, name, option) {
console.log('@js-lib/root: init');
const lang = option.lang;
copyDir(path.resolve(__dirname, `./template/base`), path.resolve(cmdPath, name));
copyFile(
path.resolve(__dirname, `./template/ISSUE_TEMPLATE.${lang}.md`),
path.resolve(cmdPath, name, './.github/ISSUE_TEMPLATE.md')
);
copyFile(
path.resolve(__dirname, `./template/TODO.${lang}.md`),
path.resolve(cmdPath, name, './TODO.md')
);
copyFile(
path.resolve(__dirname, `./template/CHANGELOG.${lang}.md`),
path.resolve(cmdPath, name, './CHANGELOG.md')
);
copyFile(
path.resolve(__dirname, `./template/doc.${lang}.md`),
path.resolve(cmdPath, name, './doc/api.md')
);
}
function update(cmdPath, option) {
console.log('@js-lib/root: update');
}
module.exports = {
init: init,
update: update,
} |
var categoryModel = require('../../../dbs/category');
var articleModel = require('../../../dbs/article');
/*
res, view,
another:其他数据,需要是对象形式,
currCategory: 当前页面的导航url用于导航条高亮
*/
function renderPublic(res,view,another,currCategory){
//获取头部栏目
var getCategory = new Promise(function(reslove, reject){
categoryModel.find({},"-_id title category",function(error, ret){
if(ret){
ret.unshift({ //组织导航栏
"title": "首页",
"category": "/"
});
//获取当前currNavIndex
var currNavIndex;
for(var i = 0; i< ret.length; i++){
if(ret[i].category === currCategory){
currNavIndex = i;
break;
}
}
//重新组织list的url
ret = ret.map(function(item,i){
if(i === 0){
return {
title:item.title,
category:item.category
}
}
return {
title:item.title,
category:"/list/"+item.category
}
});
// 数据移交下一步操作
reslove({
nav:ret,
currNav: currNavIndex
});
}
});
});
//获取热门文章
var hotArticles = getCategory.then(function(result){
articleModel.find({hot:true},"title",function(error, ret){
if(ret){
result["hot"] = ret;
// 拼接所有数据
if(Object.prototype.toString.call(another) === "[object Object]"){
for(var i in another){
result[i] = another[i];
}
}
res.render(view,result);
}
});
});
}
module.exports = renderPublic; |
'use strict';
var assert = require('assert');
var fs = require('fs');
var Extractor = require('..').Extractor;
var testExtract = require('./utils').testExtract;
describe('Extract', function () {
it('Extracts strings from views', function () {
var files = [
'test/fixtures/single.dust'
];
var catalog = testExtract(files);
assert.equal(catalog.items.length, 1);
assert.equal(catalog.items[0].msgid, 'Hello!');
assert.equal(catalog.items[0].msgstr, '');
assert.deepEqual(catalog.items[0].references, ['test/fixtures/single.dust:3', 'test/fixtures/single.dust:4']);
});
});
|
import React, { useEffect, useState } from "react";
import { Link, withRouter } from "react-router-dom";
import Hamburger from './Hamburger'
const Header = ({ history, state, setState }) => {
const [disabled, setDisabled] = useState(false)
const handleMenu = (e) => {
disableMenu();
e.preventDefault();
if (state.initial === false) {
setState({
initial: true,
clicked: true,
menuName: "Close"
})
}
if (state.clicked === true) {
setState(e => ({ ...e, menuName: "Menu", clicked: false }))
} else {
setState(e => ({ ...e, menuName: "Close", clicked: true }))
}
}
useEffect(() => {
history.listen(() => {
setState(e => ({ ...e, clicked: false, menuName: "Menu" }));
})
}, [history, setState])
//Pour désactiver le button Menu durant la transition
const disableMenu = () => {
setDisabled(e => !e)
setTimeout(() => {
setDisabled(false)
}, 1200);
}
return (
<header>
<div className="container">
<div className="wrapper">
<div className="inner-header">
<div className="logo">
<Link to="/portfolio">KOCEILA.</Link>
</div>
<div className="menu">
<button
disabled={disabled}
onClick={handleMenu}>{state.menuName}</button>
</div>
</div>
</div>
</div>
<Hamburger state={state} />
</header>);
};
export default withRouter(Header);
|
const path = require('path'),
express = require('express'),
morgan = require('morgan'),
http = require('http');
const SERVER_PORT = 8888;
var app = express();
var server = http.createServer(app);
app.use('/public', express.static('public'));
// logger
app.use(morgan('[:date[iso]] :method :url :status :response-time[digits]ms :res[content-length] :remote-user :remote-addr HTTP/:http-version'));
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, 'index.html'));
});
app.get('*', function (req, res) {
res.sendFile(path.join(__dirname, 'index.html'));
});
server.listen(SERVER_PORT, function (err) {
if (err) {
console.log(err);
return;
}
console.log('Listening at ' + SERVER_PORT);
});
|
import React from 'react';
import Typography from '@material-ui/core/Typography';
const PageNotFound = () => {
return (
<div className="content">
<Typography variant="h5">Страница не найдена.</Typography>
<a href="/">на главную</a>
</div>
);
};
export default PageNotFound;
|
const { validateConnection } = require('../../../services/database');
module.exports = async (_req, res, next) => {
try {
await validateConnection();
res.json({ status: 'It\'s all OK' });
} catch (error) {
next(error);
}
};
|
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "0f8ea6661c133b1cad2b3e5bfdc7a4ec",
"url": "/index.html"
},
{
"revision": "8bb6ddad6838d0b731c8",
"url": "/static/css/2.de424728.chunk.css"
},
{
"revision": "51ec30c08ee61758cdea",
"url": "/static/css/main.1d5396f5.chunk.css"
},
{
"revision": "8bb6ddad6838d0b731c8",
"url": "/static/js/2.d9b4e33f.chunk.js"
},
{
"revision": "11a928b57aca5049fe950bf8bcde77c5",
"url": "/static/js/2.d9b4e33f.chunk.js.LICENSE.txt"
},
{
"revision": "51ec30c08ee61758cdea",
"url": "/static/js/main.9a9ed87f.chunk.js"
},
{
"revision": "24f6ee7d82b2afaee7d5",
"url": "/static/js/runtime-main.4cdd0ab0.js"
},
{
"revision": "517cd72b9ed5d71b4019fe3f72575f1a",
"url": "/static/media/Hello My Name Is Love.517cd72b.jpg"
},
{
"revision": "b8f829f16d44707773e59e3ad9c3d660",
"url": "/static/media/Hendrix.b8f829f1.jpg"
},
{
"revision": "7dcd83d45b63573a853b83ed4fde501c",
"url": "/static/media/LV Heart RED.7dcd83d4.jpg"
},
{
"revision": "c14a9a0975afd3fff35628af67bd3d43",
"url": "/static/media/LV X Supreme Camo Skull.c14a9a09.jpg"
},
{
"revision": "b11fc8ed39498d2e1a6b013f5c46b9e3",
"url": "/static/media/Marilyn.b11fc8ed.jpg"
},
{
"revision": "5f502ba93fc35af9cd084a43386ac3d8",
"url": "/static/media/TK-Portraitgoldentiger.5f502ba9.jpg"
},
{
"revision": "136be20b13ce865279e52481f595f191",
"url": "/static/media/TKStudio-5.136be20b.jpg"
},
{
"revision": "a6e04ceb12e7e53e60f7e8d6e1db9bf8",
"url": "/static/media/Toto Ski.a6e04ceb.jpg"
}
]); |
module.exports = [
{ party: 'Republican',
first_name: 'Lamar',
last_name: 'Alexander',
state_abv: 'TN',
state_name: 'Tennessee' },
{ party: 'Republican',
first_name: 'Susan',
last_name: 'Collins',
state_abv: 'ME',
state_name: 'Maine' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Cornyn',
state_abv: 'TX',
state_name: 'Texas' },
{ party: 'Democrat',
first_name: 'Richard',
last_name: 'Durbin',
state_abv: 'IL',
state_name: 'Illinois' },
{ party: 'Republican',
first_name: 'Michael',
last_name: 'Enzi',
state_abv: 'WY',
state_name: 'Wyoming' },
{ party: 'Republican',
first_name: 'Lindsey',
last_name: 'Graham',
state_abv: 'SC',
state_name: 'South Carolina' },
{ party: 'Republican',
first_name: 'James',
last_name: 'Inhofe',
state_abv: 'OK',
state_name: 'Oklahoma' },
{ party: 'Republican',
first_name: 'Mitch',
last_name: 'McConnell',
state_abv: 'KY',
state_name: 'Kentucky' },
{ party: 'Democrat',
first_name: 'John',
last_name: 'Reed',
state_abv: 'RI',
state_name: 'Rhode Island' },
{ party: 'Republican',
first_name: 'Pat',
last_name: 'Roberts',
state_abv: 'KS',
state_name: 'Kansas' },
{ party: 'Republican',
first_name: 'Shelley',
last_name: 'Capito',
state_abv: 'WV',
state_name: 'West Virginia' },
{ party: 'Democrat',
first_name: 'Edward',
last_name: 'Markey',
state_abv: 'MA',
state_name: 'Massachusetts' },
{ party: 'Democrat',
first_name: 'Tom',
last_name: 'Udall',
state_abv: 'NM',
state_name: 'New Mexico' },
{ party: 'Republican',
first_name: 'Bill',
last_name: 'Cassidy',
state_abv: 'LA',
state_name: 'Louisiana' },
{ party: 'Democrat',
first_name: 'Gary',
last_name: 'Peters',
state_abv: 'MI',
state_name: 'Michigan' },
{ party: 'Democrat',
first_name: 'Mark',
last_name: 'Warner',
state_abv: 'VA',
state_name: 'Virginia' },
{ party: 'Republican',
first_name: 'James',
last_name: 'Risch',
state_abv: 'ID',
state_name: 'Idaho' },
{ party: 'Democrat',
first_name: 'Jeanne',
last_name: 'Shaheen',
state_abv: 'NH',
state_name: 'New Hampshire' },
{ party: 'Democrat',
first_name: 'Jeff',
last_name: 'Merkley',
state_abv: 'OR',
state_name: 'Oregon' },
{ party: 'Democrat',
first_name: 'Chris',
last_name: 'Coons',
state_abv: 'DE',
state_name: 'Delaware' },
{ party: 'Republican',
first_name: 'Cory',
last_name: 'Gardner',
state_abv: 'CO',
state_name: 'Colorado' },
{ party: 'Republican',
first_name: 'Tom',
last_name: 'Cotton',
state_abv: 'AR',
state_name: 'Arkansas' },
{ party: 'Republican',
first_name: 'Steve',
last_name: 'Daines',
state_abv: 'MT',
state_name: 'Montana' },
{ party: 'Democrat',
first_name: 'Cory',
last_name: 'Booker',
state_abv: 'NJ',
state_name: 'New Jersey' },
{ party: 'Republican',
first_name: 'Dan',
last_name: 'Sullivan',
state_abv: 'AK',
state_name: 'Alaska' },
{ party: 'Republican',
first_name: 'David',
last_name: 'Perdue',
state_abv: 'GA',
state_name: 'Georgia' },
{ party: 'Republican',
first_name: 'Joni',
last_name: 'Ernst',
state_abv: 'IA',
state_name: 'Iowa' },
{ party: 'Republican',
first_name: 'Thom',
last_name: 'Tillis',
state_abv: 'NC',
state_name: 'North Carolina' },
{ party: 'Republican',
first_name: 'Mike',
last_name: 'Rounds',
state_abv: 'SD',
state_name: 'South Dakota' },
{ party: 'Republican',
first_name: 'Benjamin',
last_name: 'Sasse',
state_abv: 'NE',
state_name: 'Nebraska' },
{ party: 'Republican',
first_name: 'Michael',
last_name: 'Crapo',
state_abv: 'ID',
state_name: 'Idaho' },
{ party: 'Republican',
first_name: 'Charles',
last_name: 'Grassley',
state_abv: 'IA',
state_name: 'Iowa' },
{ party: 'Democrat',
first_name: 'Patrick',
last_name: 'Leahy',
state_abv: 'VT',
state_name: 'Vermont' },
{ party: 'Republican',
first_name: 'Lisa',
last_name: 'Murkowski',
state_abv: 'AK',
state_name: 'Alaska' },
{ party: 'Democrat',
first_name: 'Patty',
last_name: 'Murray',
state_abv: 'WA',
state_name: 'Washington' },
{ party: 'Democrat',
first_name: 'Charles',
last_name: 'Schumer',
state_abv: 'NY',
state_name: 'New York' },
{ party: 'Republican',
first_name: 'Richard',
last_name: 'Shelby',
state_abv: 'AL',
state_name: 'Alabama' },
{ party: 'Democrat',
first_name: 'Ron',
last_name: 'Wyden',
state_abv: 'OR',
state_name: 'Oregon' },
{ party: 'Republican',
first_name: 'Roy',
last_name: 'Blunt',
state_abv: 'MO',
state_name: 'Missouri' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Boozman',
state_abv: 'AR',
state_name: 'Arkansas' },
{ party: 'Republican',
first_name: 'Richard',
last_name: 'Burr',
state_abv: 'NC',
state_name: 'North Carolina' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Isakson',
state_abv: 'GA',
state_name: 'Georgia' },
{ party: 'Republican',
first_name: 'Jerry',
last_name: 'Moran',
state_abv: 'KS',
state_name: 'Kansas' },
{ party: 'Republican',
first_name: 'Robert',
last_name: 'Portman',
state_abv: 'OH',
state_name: 'Ohio' },
{ party: 'Republican',
first_name: 'Patrick',
last_name: 'Toomey',
state_abv: 'PA',
state_name: 'Pennsylvania' },
{ party: 'Democrat',
first_name: 'Chris',
last_name: 'Van Hollen',
state_abv: 'MD',
state_name: 'Maryland' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Thune',
state_abv: 'SD',
state_name: 'South Dakota' },
{ party: 'Democrat',
first_name: 'Michael',
last_name: 'Bennet',
state_abv: 'CO',
state_name: 'Colorado' },
{ party: 'Republican',
first_name: 'Todd',
last_name: 'Young',
state_abv: 'IN',
state_name: 'Indiana' },
{ party: 'Republican',
first_name: 'James',
last_name: 'Lankford',
state_abv: 'OK',
state_name: 'Oklahoma' },
{ party: 'Republican',
first_name: 'Tim',
last_name: 'Scott',
state_abv: 'SC',
state_name: 'South Carolina' },
{ party: 'Democrat',
first_name: 'Richard',
last_name: 'Blumenthal',
state_abv: 'CT',
state_name: 'Connecticut' },
{ party: 'Republican',
first_name: 'Marco',
last_name: 'Rubio',
state_abv: 'FL',
state_name: 'Florida' },
{ party: 'Republican',
first_name: 'Rand',
last_name: 'Paul',
state_abv: 'KY',
state_name: 'Kentucky' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Hoeven',
state_abv: 'ND',
state_name: 'North Dakota' },
{ party: 'Republican',
first_name: 'Mike',
last_name: 'Lee',
state_abv: 'UT',
state_name: 'Utah' },
{ party: 'Republican',
first_name: 'Ron',
last_name: 'Johnson',
state_abv: 'WI',
state_name: 'Wisconsin' },
{ party: 'Democrat',
first_name: 'Brian',
last_name: 'Schatz',
state_abv: 'HI',
state_name: 'Hawaii' },
{ party: 'Democrat',
first_name: 'Tammy',
last_name: 'Duckworth',
state_abv: 'IL',
state_name: 'Illinois' },
{ party: 'Democrat',
first_name: 'Kamala',
last_name: 'Harris',
state_abv: 'CA',
state_name: 'California' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Kennedy',
state_abv: 'LA',
state_name: 'Louisiana' },
{ party: 'Democrat',
first_name: 'Margaret',
last_name: 'Hassan',
state_abv: 'NH',
state_name: 'New Hampshire' },
{ party: 'Democrat',
first_name: 'Catherine',
last_name: 'Cortez Masto',
state_abv: 'NV',
state_name: 'Nevada' },
{ party: 'Democrat',
first_name: 'Doug',
last_name: 'Jones',
state_abv: 'AL',
state_name: 'Alabama' },
{ party: 'Democrat',
first_name: 'Tina',
last_name: 'Smith',
state_abv: 'MN',
state_name: 'Minnesota' },
{ party: 'Republican',
first_name: 'Cindy',
last_name: 'Hyde-Smith',
state_abv: 'MS',
state_name: 'Mississippi' },
{ party: 'Democrat',
first_name: 'Maria',
last_name: 'Cantwell',
state_abv: 'WA',
state_name: 'Washington' },
{ party: 'Democrat',
first_name: 'Thomas',
last_name: 'Carper',
state_abv: 'DE',
state_name: 'Delaware' },
{ party: 'Democrat',
first_name: 'Dianne',
last_name: 'Feinstein',
state_abv: 'CA',
state_name: 'California' },
{ party: 'Democrat',
first_name: 'Debbie',
last_name: 'Stabenow',
state_abv: 'MI',
state_name: 'Michigan' },
{ party: 'Democrat',
first_name: 'Tammy',
last_name: 'Baldwin',
state_abv: 'WI',
state_name: 'Wisconsin' },
{ party: 'Republican',
first_name: 'Marsha',
last_name: 'Blackburn',
state_abv: 'TN',
state_name: 'Tennessee' },
{ party: 'Democrat',
first_name: 'Sherrod',
last_name: 'Brown',
state_abv: 'OH',
state_name: 'Ohio' },
{ party: 'Democrat',
first_name: 'Benjamin',
last_name: 'Cardin',
state_abv: 'MD',
state_name: 'Maryland' },
{ party: 'Democrat',
first_name: 'Robert',
last_name: 'Menendez',
state_abv: 'NJ',
state_name: 'New Jersey' },
{ party: 'Independent',
first_name: 'Bernard',
last_name: 'Sanders',
state_abv: 'VT',
state_name: 'Vermont' },
{ party: 'Republican',
first_name: 'Roger',
last_name: 'Wicker',
state_abv: 'MS',
state_name: 'Mississippi' },
{ party: 'Democrat',
first_name: 'Christopher',
last_name: 'Murphy',
state_abv: 'CT',
state_name: 'Connecticut' },
{ party: 'Democrat',
first_name: 'Mazie',
last_name: 'Hirono',
state_abv: 'HI',
state_name: 'Hawaii' },
{ party: 'Democrat',
first_name: 'Kirsten',
last_name: 'Gillibrand',
state_abv: 'NY',
state_name: 'New York' },
{ party: 'Democrat',
first_name: 'Amy',
last_name: 'Klobuchar',
state_abv: 'MN',
state_name: 'Minnesota' },
{ party: 'Democrat',
first_name: 'Jon',
last_name: 'Tester',
state_abv: 'MT',
state_name: 'Montana' },
{ party: 'Democrat',
first_name: 'Robert',
last_name: 'Casey',
state_abv: 'PA',
state_name: 'Pennsylvania' },
{ party: 'Democrat',
first_name: 'Sheldon',
last_name: 'Whitehouse',
state_abv: 'RI',
state_name: 'Rhode Island' },
{ party: 'Republican',
first_name: 'John',
last_name: 'Barrasso',
state_abv: 'WY',
state_name: 'Wyoming' },
{ party: 'Democrat',
first_name: 'Martin',
last_name: 'Heinrich',
state_abv: 'NM',
state_name: 'New Mexico' },
{ party: 'Democrat',
first_name: 'Joe',
last_name: 'Manchin',
state_abv: 'WV',
state_name: 'West Virginia' },
{ party: 'Democrat',
first_name: 'Kyrsten',
last_name: 'Sinema',
state_abv: 'AZ',
state_name: 'Arizona' },
{ party: 'Democrat',
first_name: 'Elizabeth',
last_name: 'Warren',
state_abv: 'MA',
state_name: 'Massachusetts' },
{ party: 'Independent',
first_name: 'Angus',
last_name: 'King',
state_abv: 'ME',
state_name: 'Maine' },
{ party: 'Republican',
first_name: 'Kevin',
last_name: 'Cramer',
state_abv: 'ND',
state_name: 'North Dakota' },
{ party: 'Republican',
first_name: 'Deb',
last_name: 'Fischer',
state_abv: 'NE',
state_name: 'Nebraska' },
{ party: 'Republican',
first_name: 'Ted',
last_name: 'Cruz',
state_abv: 'TX',
state_name: 'Texas' },
{ party: 'Democrat',
first_name: 'Timothy',
last_name: 'Kaine',
state_abv: 'VA',
state_name: 'Virginia' },
{ party: 'Republican',
first_name: 'Martha',
last_name: 'McSally',
state_abv: 'AZ',
state_name: 'Arizona' },
{ party: 'Democrat',
first_name: 'Jacky',
last_name: 'Rosen',
state_abv: 'NV',
state_name: 'Nevada' },
{ party: 'Republican',
first_name: 'Rick',
last_name: 'Scott',
state_abv: 'FL',
state_name: 'Florida' },
{ party: 'Republican',
first_name: 'Mike',
last_name: 'Braun',
state_abv: 'IN',
state_name: 'Indiana' },
{ party: 'Republican',
first_name: 'Joshua',
last_name: 'Hawley',
state_abv: 'MO',
state_name: 'Missouri' },
{ party: 'Republican',
first_name: 'Mitt',
last_name: 'Romney',
state_abv: 'UT',
state_name: 'Utah' }
]
// const result = senators.map(senator => {
// const obj = {}
// obj.party = senator.party
// obj.first_name = senator.person.firstname
// obj.last_name = senator.person.lastname
// obj.state_abv = senator.state
// obj.state_name = senator.description.split(' ').slice(3).join(' ')
// return obj
// });
// console.log(result)
|
/*!
* FastPoll - FastCGI Poll
* @copyright 2015 The FastPoll authors
*/
;(function() {
'use strict';
var win = window,
doc = document;
/* ------------------------------------ */
var MAX_FIELDS = 100;
/* ------------------------------------ */
/* language functions */
var lang = win.i18n || {};
/**
* gettext-look-alike
* @param {String} key
* @return {String}
*/
function _(key) {
if (typeof lang[key] !== 'undefined')
return lang[key];
return key;
}
/**
* "create new poll" form setup
*/
(function() {
var fp = doc.querySelector('.form--poll'),
id, mc, ab, ti = 0;
if (!fp) return; // no poll form
id = fp.dataset.answ|0;
mc = fp.querySelector('.more'); // additional answers container
ab = fp.querySelector('.btn.add'); // add-button
/**
* adds a new form-field
*/
function addField() {
if (id >= MAX_FIELDS) return;
var el = doc.createElement('div'),
lb = doc.createElement('label'),
ip = doc.createElement('input');
// setup container
el.classList.add('fbox');
el.classList.add('answ');
// setup label
lb.setAttribute('for', 'poll_answ' + id /* zero based */);
lb.textContent = 'Answer #' + (id + 1) + ':';
// setup checkbox
ip.setAttribute('type', 'text');
ip.classList.add('text');
ip.setAttribute('id', 'poll_answ' + id /* zero based */);
ip.setAttribute('placeholder', 'Enter option here ...');
// combine
el.appendChild(lb);
el.appendChild(ip);
mc.appendChild(el);
// update form
fp.dataset.answ = ++id;
// disable button if necessary
ab.disabled = id >= MAX_FIELDS;
}
/**
* checks if a new form-field should be added
* and adds one if necessary
*/
function maybeAddField() {
var af = fp.querySelectorAll('.answ input');
// noting found? add a field ...
if (!af || af.length === 0) return true;
for (var i = 0, l = af.length; i < l; ++i)
if (af[i].value === '') return;
addField();
}
/**
* adjusts the form
*/
function adjustForm() {
win.cancelAnimationFrame(ti);
ti = win.requestAnimationFrame(maybeAddField);
}
// setup form
fp.addEventListener('keyup', adjustForm); // less frequent than keydown
fp.addEventListener('paste', adjustForm);
adjustForm(); // directly
// setup add-button
var af = fp.querySelectorAll('.answ input');
ab.disabled = af && af.length >= MAX_FIELDS;
ab.addEventListener('click', addField);
})();
})();
|
//角色控制
if (typeof Global === "undefined") {
Global = {};
}
Global.sMenuTreeLoader = new Ext.tree.TreeLoader({
iconCls : 'disco-tree-node-icon',
varName : "Global.DEPT_DIR_LOADER",
url : "sMenu.java?cmd=getTree",
listeners : {
'beforeload' : function(treeLoader, node) {
treeLoader.baseParams.id = (node.id.indexOf('root') < 0 ? node.id: "");
if (typeof node.attributes.checked !== "undefined") {
treeLoader.baseParams.checked = false;
}
}
}
});
SRoleManagePanel = Ext.extend(Disco.Ext.CrudPanel, {
id: "sRoleManagePanel",
baseUrl: "sRole.java",
gridSelModel: 'checkbox',
pageSize: 20,
showView: false,
status:[["启用","1"],["禁用","0"]],
statusFormat:function(v){
if(v ==1){
return "启用";
}else{
return "停用";
}
},
deletepermissincheckele:function(){
this.fp.items.items[0].items.items[1].items.items[1].removeAll();
this.fp.items.items[0].items.items[1].items.items[2].removeAll();
this.win.un("beforehide",this.deletepermissincheckele,this);
},
edit: function() {
var win = SRoleManagePanel.superclass.edit.call(this);
if(!this.win.hasListener("beforehide")){
this.win.on("beforehide",this.deletepermissincheckele,this)
}
if(this.systemPersissionItems.length<1){
Ext.Ajax.request({
method:"post",
url:"sRole.java?cmd=systemPermissions",
success:function(response){
this.systemPersissionItems = eval("("+response.responseText+")");
this.innitSystemPermission();
},
scope:this
});
}else{
this.innitSystemPermission();
}
},
systemPersissionItems:[],
innitSystemPermission:function(){
if(this.systemPersissionItems.length<1){
return;
}
var systemps = this.fp.items.items[0].items.items[1].items.items[2];
var record = this.grid.getSelectionModel().getSelected();
var sPermissions = record.get('sPermissions');
var roleId = record.get("id");
for(var i = 0;i<this.systemPersissionItems.length;i++){
var curcheckele = this.systemPersissionItems[i];
curcheckele.roleId = roleId;
if(sPermissions.indexOf(curcheckele.id)!=-1){
curcheckele.checked=true;
}else{
curcheckele.checked=false;
}
var checkboxele = new Ext.form.Checkbox(curcheckele);
checkboxele.on("check",this.sPermissionsSave,this)
systemps.add(checkboxele);
}
this.fp.doLayout();
},
// 保存权限信息
sPermissionsSave:function(ele){
if(!ele.roleId){
return;
}
Ext.Ajax.request({
method:"post",
url:"sRole.java?cmd=update",
params:{
roleId:ele.roleId,
id:ele.id,
savetype:"permission",
checked:ele.checked
},
success:function(response){
var record = this.grid.getSelectionModel().getSelected();
var sPermissions = record.get('sPermissions');
if(ele.checked){
sPermissions.push(ele.id)
}else{
for(var i = 0;i<sPermissions.length;i++){
if(sPermissions[i]==ele.id){
sPermissions.splice(i,1);
return;
}
}
}
},
scope:this
});
},
// 树节点点击监听函数
menuTreeListener:function(node){
var roleId = this.fp.form.findField("id").getValue();
if(!roleId){
return
}
var menuId = node.id;
var record = this.grid.getSelectionModel().getSelected();
var sPermissions = record.get('sPermissions');
var spermission = this.fp.items.items[0].items.items[1].items.items[1];
spermission.removeAll();
var menuPermissions = node.attributes.sPermission;
for(var i =0;i<menuPermissions.length;i++){
var checked=false;
if(sPermissions.indexOf(menuPermissions[i].id)!=-1){
checked=true;
}
var checkboxele = new Ext.form.Checkbox({
id:menuPermissions[i].id,
boxLabel:menuPermissions[i].name,
roleId:roleId,
checked:checked
});
checkboxele.on("check",this.sPermissionsSave,this)
spermission.add(checkboxele);
}
this.fp.doLayout();
},
createForm : function() {
var formPanel = new Ext.form.FormPanel({
frame : false,
labelWidth : 80,
labelAlign : 'right',
layout : "fit",
items : [{
xtype:'tabpanel',
deferredRender : false,
monitorResize:true,
border:true,
activeTab:0,
items:[{title:'角色基本信息',frame: true,border:false,layout:'form', defaults: {
width: 320,
xtype: "textfield"
},
items:[{
xtype : "hidden",
name : "id"
},{
fieldLabel: "角色名",
name: "rName",
emptyText: '角色名不能为空',
allowBlank: false,
blankText: '角色名不能为空'
},{
fieldLabel: "角色代码",
name: "code",
emptyText: '角色代码不能为空',
allowBlank: false,
blankText: '角色代码不能为空'
},{
fieldLabel: '启用状态',
xtype: 'radiogroup',
name: 'status',
items: [{
checked: true,
boxLabel: '启用',
name: 'status',
inputValue: "1"
}, {
boxLabel: '禁用',
name: 'status',
inputValue: "0"
}]
},{
xtype: "textarea",
fieldLabel: "描述",
name: "description",
height: 50
}]},
{
title:'角色权限',
layout:"border",
items:[new Ext.tree.TreePanel({
title : "菜单信息",
autoScroll : true,
region:"west",
width:200,
margins : '0 2 0 0',
tools : [ {
id : "refresh",
handler : function() {
this.tree.root.reload();
},
scope : this
} ],
root : new Ext.tree.AsyncTreeNode({
id : "root",
text : "所有菜单",
iconCls : 'treeroot-icon',
expanded : true,
loader : Global.sMenuTreeLoader
}),
listeners:{
click:this.menuTreeListener,
scope:this
}
}),{id:"sPermission",
title:"资源权限",
region:"center",
defaults:{
xtype:"checkbox",
width:100
}},{
id:"systemPermission",
title:"系统权限",
width:110,
region:"east",
defaults:{
xtype:"checkbox",
width:100
}
}]
}]
}]
});
return formPanel;
},
createWin: function() {
return this.initWin(448, 400, "角色管理");
},
storeMapping: ["id", "rName", "createDate", "description","sequence","status","sPermissions","code"],
initComponent: function() {
this.cm = new Ext.grid.ColumnModel([{
header: "名称",
sortable: true,
width: 100,
dataIndex: "rName"
},{
header: "角色代码",
sortable: true,
width: 100,
dataIndex: "code"
},{
header: "创建日期",
sortable: true,
width: 100,
dataIndex: "createDate",
renderer: this.dateRender()
},{
header: "启用状态",
sortable: true,
width: 100,
dataIndex: "status",renderer:this.statusFormat
}]);
SRoleManagePanel.superclass.initComponent.call(this);
}
});
|
$( document ).ready(function() {
console.log("ready");
$( "#header" ).on( "click", function() {
$("header").toggle("slow");
});
$( "#color" ).on( "click", function() {
$("#Favecolor").toggle("slow");
});
});
|
'use strict'
const { randomBytes } = require('crypto')
module.exports = {
getRandomValues (typedArray) {
const size = typedArray.length * typedArray.BYTES_PER_ELEMENT
const buffer = randomBytes(size).buffer
typedArray.set(new typedArray.constructor(buffer))
}
}
|
let resultsDiv = document.querySelector(".results-div");
function reversal(str) {
str = str.split("").reverse().join("");
// console.log(str);
let reversalH3 = document.createElement("h3");
reversalH3.innerHTML = "Your input reversed is :" + str;
resultsDiv.appendChild(reversalH3);
}
function alphabits(str) {
str = str.split("").sort().join("");
// console.log(str);
let alphabeticalH3 = document.createElement("h3");
alphabeticalH3.innerHTML = "Your input in alphabetical order is :" + str;
resultsDiv.appendChild(alphabeticalH3);
}
function palindrome(str) {
if (str === str.split("").reverse().join("")) {
// console.log("Your string is a palindrome");
let palindromeH3 = document.createElement("h3");
palindromeH3.innerHTML = "Your string is a palindrome";
resultsDiv.appendChild(palindromeH3);
}
}
function callFunctions() {
let testString = document.querySelector("input").value;
resultsDiv.innerHTML = "";
// console.log(testString);
reversal(testString);
alphabits(testString);
palindrome(testString);
}
|
// Get the refresh rate from MH
var refresh_frequency=(<!-- #include var="$config_parms{html_refresh_rate}" -->*1000);
// Start the update timer for the refresh interval
jQuery(document).ready(function(){
setTimeout("ajaxUpdate();", refresh_frequency);
});
// Function to update ajax fields
function ajaxUpdate(){
// Check the refresh frequency is greater or equal to 10 seconds, anything lower hammers Misterhouse too much
// If less than 10 seconds, we set the refresh to 10 seconds, and skip the current update
// otherwise proceed as normal
if (refresh_frequency < 10000){
refresh_frequency=10000;
} else {
// Loop through each ajax include
jQuery("span.ajax_update").each(function(){
// Get the url we use to update the data
var source_url = jQuery(this).find("input:hidden").val();
// Get the span we should be updating
var span = jQuery(this).find("span.content");
// Update the field
jQuery.ajax({
url: source_url,
dataType: "html",
success: function(data){
span.html(data);
}
});
});
}
// Restart the refresh timer
setTimeout("ajaxUpdate();", refresh_frequency);
}
jQuery.fn.vertCenter = function () {
this.css("top", ((jQuery(window).height() - this.outerHeight()) / 2) + jQuery(window).scrollTop() + "px");
return this;
}
|
// you can write to stdout for debugging purposes, e.g.
// console.log('this is a debug message');
function solution(A) {
// write your code in JavaScript (Node.js 8.9.4)
// [−1,000,000..1,000,000]
// return Min positive int not occuring in A
if (A.length == 0)
return 1;
var min = 1;
while (true) {
if (A.indexOf(min) == -1)
return min;
else {
min++;
}
}
} |
function CardapioController(app) {
this._app = app;
var ItemCardapio = app.models.itemCardapio;
this.getAll = function(callback) {
ItemCardapio.find({}).sort('ordem').exec(callback);
}
this.getByNome = function(nome, callback) {
ItemCardapio.find({nome: new RegExp(nome, "i")}).sort('ordem').exec(callback);
}
this.get = function(id, callback) {
ItemCardapio.findById(id, callback);
}
this.post = function(item, callback) {
ItemCardapio.count({}, function(err, count) {
if (err) {
callback(err, null);
return;
}
item.ordem = count + 1;
new ItemCardapio(item).save(callback);
});
}
this.put = function(id, item, callback) {
ItemCardapio.findByIdAndUpdate(id, item, callback);
}
this.delete = function(id, callback) {
ItemCardapio.findByIdAndDelete(id, callback);
}
}
module.exports = function(app) {
return new CardapioController(app);
} |
const express = require('express');
const router = express.Router();
const dealsservice = require('../service /users');
router.get('/deals',async(req,res,next)=>{
try{
let dealsArray = await dealsservice.getAllDeals();
res.json(dealsArray);
}catch(err){
next(err);
}
})
module.exports = router; |
import React, { Component } from 'react'
import cta from '../images/cta.png'
// const CustomizedButton = Button.extend`
// background: url("./../images/cta.png");
// :hover {
// background-color: #ff0000;
// }
// `
class DownloadButton extends Component {
render() {
return (
<div className="App-button">
<a href="https://github.com/ff0000-ad-tech/tmpl-standard-base" target="_blank" rel="noopener noreferrer">
<img src={cta} className="cta" alt="cta" />
</a>
</div>
)
}
}
export default DownloadButton
|
import firebase from "firebase/app";
import { firebaseConfig } from "../config";
import "firebase/firestore";
import types from "./types";
import _ from "lodash";
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
export const search = (payload) => {
return function (dispatch) {
const { query, items } = payload;
const filteredData = _.filter(items, (item) => {
if (
item.title.toLowerCase().includes(query) ||
item.description.toLowerCase().includes(query)
) {
return true;
}
return false;
});
dispatch({ type: types.SEARCHING, data: filteredData });
};
};
export const getAllItems = (payload) => {
const { uid } = payload;
return async function (dispatch) {
dispatch({ type: types.GET_ALL_ITEMS_START });
const eventRef = firebase
.database()
.ref("/users/")
.child(uid)
.child("items");
const snapshot = await eventRef.once("value");
const value = snapshot.val();
if (!_.isEmpty(value)) {
var myData = Object.keys(value).map((key) => {
return value[key];
});
const items = Object.values(myData);
dispatch({
type: types.GET_ALL_ITEMS_SUCCESS,
data: items,
totalItems: items.length,
});
} else {
dispatch({ type: types.NO_DATA_AVAILABLE });
}
};
};
export const newUser = (uid) => {
return function (dispatch) {
dispatch({ type: "SET_INFO_START" });
dispatch({ type: types.SET_INFO_SUCCESS, payload: uid });
};
};
export const addItem = (payload) => {
return async function (dispatch) {
const { uid, item } = payload;
console.log("uid we get in add obj", uid);
const ref = await firebase
.database()
.ref("/users/")
.child(uid)
.child("items")
.push(item);
await ref.update({ key: ref.key });
dispatch({ type: types.ADD_ITEM_SUCCESS });
};
};
export const deleteItem = (payload) => {
return async function (dispatch) {
dispatch({ type: types.DELETE_ITEM_START });
console.log("payload is", payload);
const { uid, key, data } = payload;
const refFromStorage = firebase.storage().refFromURL(data.image);
refFromStorage.delete().catch(() => console.log("err"));
firebase
.database()
.ref("/users/")
.child(uid)
.child("items")
.child(key)
.remove();
dispatch({ type: types.DELETE_ITEM_SUCCESS });
};
};
export const updateItem = (payload) => {
return async function (dispatch) {
const { key, uid, item } = payload;
dispatch({ type: types.UPDATE_ITEM_START });
console.log("INSIDE REDUX FUNCTIONS UPDATE, payloadis", payload);
const update = await firebase
.database()
.ref("/users/")
.child(uid)
.child("items")
.child(key)
.update(item);
dispatch({ type: types.UPDATE_ITEM_SUCCESS });
};
};
|
import React from "react"
import Desktop from "./index"
import {root} from "baobab-react/higher-order"
import tree from "resources/tree"
class DesktopRouteHandler extends React.Component {
render() {
return <Desktop />
}
}
export default root(DesktopRouteHandler, tree)
|
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import configureStore from './store/ConfigureStore';
import HomePage from './home/HomePage';
import './App.css';
const store = configureStore();
export default (props) => {
return (
<Provider store={store}>
<HomePage/>
</Provider>
);
};
|
import { createSlice } from '@reduxjs/toolkit';
import { addItemToWishlist, loadWishlist, removeWishlistItem } from './wishlistReducers';
const initialWishlistState = {
wishlistItems: [], wishlistUsername: "",
isWishlistLoading: false, wishlistError: ""
}
const wishlistSlice = createSlice({
name: "wishlist",
initialState: initialWishlistState,
reducers: {
resetWishlist: state => {
state = initialWishlistState
return state
},
setWishlistUsername: (state, action) => {
state.wishlistUsername = action.payload
},
},
extraReducers: {
// Add items to cart
[addItemToWishlist.pending]: (state, action) => {
state.wishlistError = ""
state.isWishlistLoading = true
},
[addItemToWishlist.fulfilled]: (state, action) => {
state.isWishlistLoading = false
state.wishlistItems.push(action.payload.book)
},
[addItemToWishlist.rejected]: (state, action) => {
state.isWishlistLoading = false
state.wishlistError = action.payload.message
},
// Load cart
[loadWishlist.pending]: (state, action) => {
state.isWishlistLoading = true
state.wishlistError = ""
},
[loadWishlist.fulfilled]: (state, action) => {
state.isWishlistLoading = false
state.wishlistItems = action.payload.items
state.wishlistUsername = action.payload.wishlistUsername
},
[loadWishlist.rejected]: (state, action) => {
state.isWishlistLoading = false
state.wishlistError = action.payload.message
},
// Remove Cart Item
[removeWishlistItem.pending]: (state, action) => {
state.isWishlistLoading = true
state.wishlistError = ""
},
[removeWishlistItem.fulfilled]: (state, action) => {
state.isWishlistLoading = false
state.wishlistItems.splice(action.payload, 1)
},
[removeWishlistItem.rejected]: (state, action) => {
state.isWishlistLoading = false
state.wishlistError = action.payload.message
},
}
})
export const { resetWishlist, setWishlistUsername } = wishlistSlice.actions
export default wishlistSlice.reducer |
var WebNTP;
(function (WebNTP) {
class Connection {
constructor(url) {
this.requests = [];
this.url = url;
}
open() {
return new Promise((resolve, reject) => {
const conn = new WebSocket(this.url, ["webntp.shogo82148.com"]);
this.connection = conn;
conn.addEventListener("open", ev => {
resolve(conn);
});
conn.addEventListener("message", ev => {
this.onmessage(conn, ev);
});
conn.addEventListener("error", ev => {
this.onerror(conn, ev);
});
conn.addEventListener("close", ev => {
this.onclose(conn, ev);
});
});
}
do_get() {
if (this.requests.length === 0) {
// nothing to do.
return;
}
let promise;
if (this.connection) {
promise = Promise.resolve(this.connection);
}
else {
promise = this.open();
}
promise.then(conn => {
const now = Date.now() / 1000;
conn.send(now);
}).catch(reason => {
if (this.requests.length > 0) {
this.requests.shift().reject(reason);
}
this.connection = null;
this.do_get();
});
}
onmessage(conn, ev) {
const now = Date.now() / 1000;
const res = JSON.parse(ev.data);
const delay = now - res.it;
const offset = res.it - res.st + delay / 2;
const result = {
delay: delay,
offset: offset
};
if (this.requests.length > 0) {
this.requests.shift().resolve(result);
}
this.do_get();
}
onerror(conn, ev) {
if (this.requests.length > 0) {
this.requests.shift().reject(ev);
}
}
onclose(conn, ev) {
this.connection = null;
this.do_get();
}
get() {
return new Promise((resolve, reject) => {
this.requests.push({
resolve: resolve,
reject: reject
});
if (this.requests.length === 1) {
this.do_get();
}
});
}
}
class Client {
constructor() {
// connection pool
this.pool = new Map();
}
// get_connection from the pool
get_connection(url) {
if (this.pool.has(url)) {
// reuse connection
return this.pool.get(url);
}
// create new connection
const c = new Connection(url);
this.pool.set(url, c);
return c;
}
get(url) {
return this.get_connection(url).get();
}
get_multi(url, samples) {
if (samples === 0) {
return Promise.resolve({
delay: 0,
offset: 0
});
}
let promise = Promise.resolve([]);
for (let i = 0; i < samples; i++) {
promise = promise.then(results => {
return this.get(url).then(result => {
results.push(result);
return results;
});
});
}
return promise.then(results => {
// get min delay.
let min = results[0].delay;
for (let result of results) {
if (result.delay < min) {
min = result.delay;
}
}
// calulate the avarage.
let delay = 0;
let offset = 0;
let count = 0;
for (let result of results) {
if (result.delay > min * 2) {
// this sample may be re-sent. ignore it.
continue;
}
delay += result.delay;
offset += result.offset;
count++;
}
return {
delay: delay / count,
offset: offset / count
};
});
}
}
WebNTP.Client = Client;
})(WebNTP || (WebNTP = {}));
|
import React from 'react'
export class Footer extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render() {
return <footer className="footer">
<div className="content has-text-centered">
<p>
<strong>Твиттер-хуитер</strong> by <a href="">Dimas</a>. The source code is licensed MIT. Написал хуйню и рад.
</p>
</div>
</footer>
}
} |
import { Meteor } from 'meteor/meteor';
import { withTracker } from 'meteor/react-meteor-data';
import GroupEdit from './GroupEdit';
import { Groups } from '../../../api/groups/groups';
import { Foods } from '../../../api/foods/foods';
export default GroupEditContainer = withTracker(({groupId}) => {
const sub$ = Meteor.subscribe('groups.editGroupDetails', groupId);
let group = Groups.findOne({_id: groupId});
if (!sub$.ready() || !group) {
return { group: {}, onPublishStop: () => {}, loading: false, isGroupOwner: false };
}
const groupUsers = Meteor.users.find({_id: {$in: group.users}}).fetch();
const groupCreator = Meteor.users.findOne({_id: group.groupCreator});
const invitedUsers = Meteor.users.find({_id: {$in: group.invitedUsers}}).fetch();
invitedUsers.forEach(invUser => invUser.checked = true);
const allUsers = Meteor.users.find().fetch();
let userList = allUsers.filter(user => {
const index = invitedUsers.findIndex(item => user._id === item._id);
const indexInGroupUsers = groupUsers.findIndex(item => user._id === item._id);
user.checked = indexInGroupUsers !== -1;
return index === -1;
});
userList = userList.filter(user => user._id !== Meteor.userId());
console.log(userList)
const allFoods = Foods.find({}).fetch();
const groupMenuItems = group.menuItems;
allFoods.forEach(food => {
const index = groupMenuItems.findIndex((menuItem) => menuItem.foodId === food._id );
if (index !== -1) {
food.discountPercent = groupMenuItems[index].discountPercent;
}
food.checked = index !== -1;
});
group = {...group, invitedUsers, users: userList, groupCreator, menuItems: allFoods};
return {
group: group,
allFoods: allFoods,
isGroupOwner: Meteor.userId() === group.groupCreator._id,
loading: true,
onPublishStop: sub$.stop,
};
})(GroupEdit); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.