text
stringlengths
3
1.05M
/*! * JavaScript Cookie v2.1.2 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ ;(function (factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { var OldCookies = window.Cookies; var api = window.Cookies = factory(); api.noConflict = function () { window.Cookies = OldCookies; return api; }; } }(function () { function extend () { var i = 0; var result = {}; for (; i < arguments.length; i++) { var attributes = arguments[ i ]; for (var key in attributes) { result[key] = attributes[key]; } } return result; } function init (converter) { function api (key, value, attributes) { var result; if (typeof document === 'undefined') { return; } // Write if (arguments.length > 1) { attributes = extend({ path: '/' }, api.defaults, attributes); if (typeof attributes.expires === 'number') { var expires = new Date(); expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); attributes.expires = expires; } try { result = JSON.stringify(value); if (/^[\{\[]/.test(result)) { value = result; } } catch (e) {} if (!converter.write) { value = encodeURIComponent(String(value)) .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); } else { value = converter.write(value, key); } key = encodeURIComponent(String(key)); key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); key = key.replace(/[\(\)]/g, escape); return (document.cookie = [ key, '=', value, attributes.expires ? '; expires=' + attributes.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE attributes.path ? '; path=' + attributes.path : '', attributes.domain ? '; domain=' + attributes.domain : '', attributes.secure ? '; secure' : '' ].join('')); } // Read if (!key) { result = {}; } // To prevent the for loop in the first place assign an empty array // in case there are no cookies at all. Also prevents odd result when // calling "get()" var cookies = document.cookie ? document.cookie.split('; ') : []; var rdecode = /(%[0-9A-Z]{2})+/g; var i = 0; for (; i < cookies.length; i++) { var parts = cookies[i].split('='); var cookie = parts.slice(1).join('='); if (cookie.charAt(0) === '"') { cookie = cookie.slice(1, -1); } try { var name = parts[0].replace(rdecode, decodeURIComponent); cookie = converter.read ? converter.read(cookie, name) : converter(cookie, name) || cookie.replace(rdecode, decodeURIComponent); if (this.json) { try { cookie = JSON.parse(cookie); } catch (e) {} } if (key === name) { result = cookie; break; } if (!key) { result[name] = cookie; } } catch (e) {} } return result; } api.set = api; api.get = function (key) { return api(key); }; api.getJSON = function () { return api.apply({ json: true }, [].slice.call(arguments)); }; api.defaults = {}; api.remove = function (key, attributes) { api(key, '', extend(attributes, { expires: -1 })); }; api.withConverter = init; return api; } return init(function () {}); }));
#!/usr/local/bin/python3 class Cat(): species = 'mamal' def __init__(self, name, age): self.name = name self.age = age # Instantiate the Cat object with 3 cats cat1 = Cat('Tigger', 1) cat2 = Cat('Smokey', 4) cat3 = Cat('Patch', 10) def oldest_cat(*args): ''' INFO: Create a function that finds the oldest cat ''' return max(args) if __name__ == '__main__': # 3 Print out: "The oldest cat is x years old.". x will be the oldest cat age by using the function print(f'The oldest cat is {oldest_cat(cat1.age,cat2.age,cat3.age)}')
//>>built define( "dijit/form/nls/tr/ComboBox", //begin v1.x content ({ previousMessage: "Önceki seçenekler", nextMessage: "Diğer seçenekler" }) //end v1.x content );
import numpy as np import matplotlib.pyplot as plt from numpy import vstack, array from pylab import plot, show, savefig import csv import random from scipy.cluster.vq import kmeans2, vq import numpy_indexed as npi import time if __name__ == "__main__": # read data as 2D array of data type 'np.float' result = np.array(list(csv.reader(open("data-clustering-2.csv", "rb"), delimiter=","))).astype("float") ti = [] colors = ['red', 'green', 'blue', 'cyan', 'orange'] X = result[0, :] Y = result[1, :] result = result.T k = 0 while (k < 10): start = time.time() Ct = np.hstack( (result, np.reshape(np.random.choice(range(0, 3), result.shape[0], replace=True), (result.shape[0], 1)))) meu = (npi.group_by(Ct[:, 2]).mean(Ct))[1][:, 0:2] Converged = False while Converged is False: Converged = True for j in range(0, Ct.shape[0]): Cj = Ct[j, 2] dmin = [] for i in range(0, 3): Ct[j, 2] = i G = (npi.group_by(Ct[:, 2])).split(Ct) dist = 0 # print(G) for p in range(0, 3): t = (G[p][:, 0:2]) mi = np.reshape(np.mean(t, axis=0), (1, 2)) t = np.sum((t - mi) ** 2, axis=1) dist = dist + np.sum(t, axis=0) dmin.append(dist) Cw = np.argmin(dmin) if Cw != Cj: Converged = False Ct[j, 2] = Cw meu = (npi.group_by(Ct[:, 2]).mean(Ct))[1][:, 0:2] else: Ct[j, 2] = Cj end = time.time() time_taken = end - start ti.append(time_taken) k = k + 1 print("time_taken") print(sum(ti) / len(ti)) meu = np.hstack((meu, np.reshape(np.array(list(range(3))), (3, 1)))) cp = Ct plt.title("Hartigan") plt.xlim(xmin=np.min(Ct[:, 0]) - 1, xmax=np.max(1 + Ct[:, 0])) plt.ylim(ymin=np.min(Ct[:, 1]) - 1, ymax=np.max(1 + Ct[:, 1])) plt.scatter(Ct[:, 0], Ct[:, 1], c=[colors[i] for i in (Ct[:, 2]).astype(int)], s=5.5, label='Points') plt.scatter(meu[:, 0], meu[:, 1], c=[colors[i] for i in (meu[:, 2]).astype(int)], s=40, marker='*', label='Centroids') plt.savefig("Hartigan Clustering-2.pdf", facecolor='w', edgecolor='w', papertype=None, format='pdf', transparent=False, bbox_inches='tight', pad_inches=0.1) plt.legend() plt.show()
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); var _pass = _interopRequireDefault(require("./pass")); var RenderPass = function (_Pass) { (0, _inherits2["default"])(RenderPass, _Pass); function RenderPass(gl) { var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; (0, _classCallCheck2["default"])(this, RenderPass); return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(RenderPass).call(this, gl, Object.assign({ id: 'render-pass' }, props))); } (0, _createClass2["default"])(RenderPass, [{ key: "_renderPass", value: function _renderPass(_ref) { var animationProps = _ref.animationProps; var _this$props = this.props, _this$props$models = _this$props.models, models = _this$props$models === void 0 ? [] : _this$props$models, drawParams = _this$props.drawParams; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = models[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var model = _step.value; model.draw(Object.assign({}, drawParams, { animationProps: animationProps })); } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator["return"] != null) { _iterator["return"](); } } finally { if (_didIteratorError) { throw _iteratorError; } } } } }]); return RenderPass; }(_pass["default"]); exports["default"] = RenderPass; //# sourceMappingURL=render-pass.js.map
import { dew as _toStringDewDew } from "./toString.dew.js"; var exports = {}, _dewExec = false; export function dew() { if (_dewExec) return exports; _dewExec = true; var toString = _toStringDewDew(); /** * Replaces matches for `pattern` in `string` with `replacement`. * * **Note:** This method is based on * [`String#replace`](https://mdn.io/String/replace). * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to modify. * @param {RegExp|string} pattern The pattern to replace. * @param {Function|string} replacement The match replacement. * @returns {string} Returns the modified string. * @example * * _.replace('Hi Fred', 'Fred', 'Barney'); * // => 'Hi Barney' */ function replace() { var args = arguments, string = toString(args[0]); return args.length < 3 ? string : string.replace(args[1], args[2]); } exports = replace; return exports; }
import discord from discord.ext import commands import asyncio from googletrans import Translator class Translation(commands.Cog): def __init__(self,client): self.client = client @commands.cooldown(1,5,commands.BucketType.user) @commands.command() async def trans(self, ctx): """translation""" first_run = True translation = ctx.message.content[7:] while True: if first_run: embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzir") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=translation, inline=True) first_run = False msg = await ctx.send(embed=embed) reactmoji = [] reactmoji.extend(['🇺🇸']) reactmoji.append('🇧🇷') reactmoji.append('🇻🇳') reactmoji.append('🇯🇵') reactmoji.append('🇦🇲') reactmoji.append('🇿🇦') reactmoji.append('🇦🇱') reactmoji.append('🇦🇴') #exit reactmoji.append('❌') for react in reactmoji: await msg.add_reaction(react) def check_react(reaction, user): if reaction.message.id != msg.id: return False if user != ctx.message.author: return False if str(reaction.emoji) not in reactmoji: return False return True try: res, user = await self.client.wait_for('reaction_add', timeout=30.0, check=check_react) except asyncio.TimeoutError: return await msg.clear_reactions() if user != ctx.message.author: pass elif '🇺🇸' in str(res.emoji): country = 'en' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇧🇷' in str(res.emoji): country = 'pt' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇻🇳' in str(res.emoji): country = 'zh-tw' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇯🇵' in str(res.emoji): country = 'ja' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇦🇲' in str(res.emoji): country = 'hy' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇿🇦' in str(res.emoji): country = 'af' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇦🇱' in str(res.emoji): country = 'sq' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '🇦🇴' in str(res.emoji): country = 'am' translator = Translator() traduzido=translator.translate(translation, dest=country) embed = discord.Embed(color=0x19212d) icon = "https://i.imgur.com/6zMLSah.png" embed = discord.Embed(color=0x1ccc09) embed.set_thumbnail(url=icon) embed.set_author(name="Traduzido") embed.set_footer(text="Athus V1.0") embed.add_field(name="Texto", value=traduzido.text, inline=True) await msg.clear_reactions() await msg.edit(embed=embed) elif '❌' in str(res.emoji): await ctx.message.delete() return await msg.delete() self.client.counter += 1 def setup(client): client.add_cog(Translation(client))
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 'use strict'; // MAIN // // Mapping from array constructors to data types... var ctor2dtypes = { 'Float32Array': 'float32', 'Float64Array': 'float64', 'Array': 'generic', 'Int16Array': 'int16', 'Int32Array': 'int32', 'Int8Array': 'int8', 'Uint16Array': 'uint16', 'Uint32Array': 'uint32', 'Uint8Array': 'uint8', 'Uint8ClampedArray': 'uint8c' }; // EXPORTS // module.exports = ctor2dtypes;
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Tests for TF Agents reinforce_agent.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized from absl.testing.absltest import mock import tensorflow as tf # pylint: disable=g-explicit-tensorflow-version-import import tensorflow_probability as tfp from tf_agents.agents.reinforce import reinforce_agent from tf_agents.networks import actor_distribution_rnn_network from tf_agents.networks import network from tf_agents.networks import utils as network_utils from tf_agents.specs import tensor_spec from tf_agents.trajectories import time_step as ts from tf_agents.trajectories import trajectory from tf_agents.utils import common from tf_agents.utils import nest_utils from tensorflow.python.util import nest # pylint:disable=g-direct-tensorflow-import # TF internal class DummyActorNet(network.Network): def __init__(self, input_tensor_spec, output_tensor_spec, unbounded_actions=False, stateful=False): # When unbounded_actions=True, we skip the final tanh activation and the # action shift and scale. This allows us to compute the actor and critic # losses by hand more easily. # If stateful=True, the network state has the same shape as # `input_tensor_spec`. Otherwise it is empty. state_spec = (tf.TensorSpec(input_tensor_spec.shape, tf.float32) if stateful else ()) super(DummyActorNet, self).__init__( input_tensor_spec=input_tensor_spec, state_spec=state_spec, name='DummyActorNet') single_action_spec = tf.nest.flatten(output_tensor_spec)[0] activation_fn = None if unbounded_actions else tf.nn.tanh self._output_tensor_spec = output_tensor_spec self._layers = [ tf.keras.layers.Dense( single_action_spec.shape.num_elements() * 2, activation=activation_fn, kernel_initializer=tf.compat.v1.initializers.constant( [[2, 1], [1, 1]]), bias_initializer=tf.compat.v1.initializers.constant(5), ), ] def call(self, observations, step_type, network_state): del step_type states = tf.cast(tf.nest.flatten(observations)[0], tf.float32) for layer in self.layers: states = layer(states) single_action_spec = tf.nest.flatten(self._output_tensor_spec)[0] actions, stdevs = states[..., 0], states[..., 1] actions = tf.reshape(actions, [-1] + single_action_spec.shape.as_list()) stdevs = tf.reshape(stdevs, [-1] + single_action_spec.shape.as_list()) actions = tf.nest.pack_sequence_as(self._output_tensor_spec, [actions]) stdevs = tf.nest.pack_sequence_as(self._output_tensor_spec, [stdevs]) distribution = nest.map_structure_up_to( self._output_tensor_spec, tfp.distributions.Normal, actions, stdevs) return distribution, network_state class DummyValueNet(network.Network): def __init__(self, observation_spec, name=None, outer_rank=1): super(DummyValueNet, self).__init__(observation_spec, (), 'DummyValueNet') self._outer_rank = outer_rank self._layers.append( tf.keras.layers.Dense( 1, kernel_initializer=tf.compat.v1.initializers.constant([2, 1]), bias_initializer=tf.compat.v1.initializers.constant([5]))) def call(self, inputs, step_type=None, network_state=()): del step_type hidden_state = tf.cast(tf.nest.flatten(inputs), tf.float32)[0] batch_squash = network_utils.BatchSquash(self._outer_rank) hidden_state = batch_squash.flatten(hidden_state) for layer in self.layers: hidden_state = layer(hidden_state) value_pred = tf.squeeze(batch_squash.unflatten(hidden_state), axis=-1) return value_pred, network_state class ReinforceAgentTest(tf.test.TestCase, parameterized.TestCase): def setUp(self): super(ReinforceAgentTest, self).setUp() tf.compat.v1.enable_resource_variables() self._obs_spec = tensor_spec.TensorSpec([2], tf.float32) self._time_step_spec = ts.time_step_spec(self._obs_spec) self._action_spec = tensor_spec.BoundedTensorSpec([1], tf.float32, -1, 1) def testCreateAgent(self): reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=False), optimizer=None, ) def testCreateAgentWithValueNet(self): reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=False), value_network=DummyValueNet(self._obs_spec), value_estimation_loss_coef=0.5, optimizer=None, ) def testPolicyGradientLoss(self): agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=None, ) observations = tf.constant([[1, 2], [3, 4]], dtype=tf.float32) time_steps = ts.restart(observations, batch_size=2) actions = tf.constant([[0], [1]], dtype=tf.float32) actions_distribution = agent.collect_policy.distribution( time_steps).action returns = tf.constant([1.9, 1.0], dtype=tf.float32) expected_loss = 10.983667373657227 loss = agent.policy_gradient_loss( actions_distribution, actions, time_steps.is_last(), returns, 1) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) def testPolicyGradientLossMultipleEpisodes(self): agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=None, ) step_type = tf.constant( [ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST]) reward = tf.constant([0, 0, 0, 0], dtype=tf.float32) discount = tf.constant([1, 1, 1, 1], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32) time_steps = ts.TimeStep(step_type, reward, discount, observations) actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32) actions_distribution = agent.collect_policy.distribution( time_steps).action returns = tf.constant([1.9, 1.9, 1.0, 1.0], dtype=tf.float32) expected_loss = 5.140229225158691 loss = agent.policy_gradient_loss( actions_distribution, actions, time_steps.is_last(), returns, 2) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) def testMaskingRewardSingleEpisodeRewardOnFirst(self): # Test that policy_gradient_loss reacts correctly to rewards when there are: # * A single MDP episode # * Returns on the tf.StepType.FIRST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) # observation : [1, 2] [1, 2] # action : [0] [1] # reward : 3 0 # ~is_boundary: 1 0 # is_last : 1 0 # valid reward: 3*1 4*0 # # The second action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. # # The expected_loss is > 0.0 in this case, only LAST should be excluded. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=None, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST]) reward = tf.constant([3, 4], dtype=tf.float32) discount = tf.constant([1, 0], dtype=tf.float32) observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32) time_steps = ts.TimeStep(step_type, reward, discount, observations) actions = tf.constant([[0], [1]], dtype=tf.float32) actions_distribution = agent.collect_policy.distribution( time_steps).action returns = tf.constant([3.0, 0.0], dtype=tf.float32) # Returns on the StepType.FIRST should be counted. expected_loss = 10.8935775757 loss = agent.policy_gradient_loss( actions_distribution, actions, time_steps.is_last(), returns, 1) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) def testMaskingReturnSingleEpisodeRewardOnLast(self): # Test that policy_gradient_loss reacts correctly to rewards when there are: # * A single MDP episode # * Returns on the tf.StepType.LAST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) # observation : [1, 2] [1, 2] # action : [0] [1] # reward : 0 3 # ~is_boundary: 1 0 # is_last : 1 0 # valid reward: 0*1 3*0 # # The second action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. The first has a 0 reward. # # The expected_loss is 0.0 in this case. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=None, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST]) reward = tf.constant([0, 3], dtype=tf.float32) discount = tf.constant([1, 0], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2]], dtype=tf.float32) time_steps = ts.TimeStep(step_type, reward, discount, observations) actions = tf.constant([[0], [1]], dtype=tf.float32) actions_distribution = agent.collect_policy.distribution( time_steps).action returns = tf.constant([0.0, 3.0], dtype=tf.float32) # Returns on the StepType.LAST should not be counted. expected_loss = 0.0 loss = agent.policy_gradient_loss( actions_distribution, actions, time_steps.is_last(), returns, 1) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) def testMaskingReturnMultipleEpisodesRewardOnFirst(self): # Test that policy_gradient_loss reacts correctly to rewards when there are: # * Multiple MDP episodes # * Returns on the tf.StepType.FIRST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F) # observation : [1, 2] [1, 2] [1, 2] [1, 2] # action : [0] [1] [2] [3] # reward : 3 0 4 0 # ~is_boundary: 1 0 1 0 # is_last : 1 0 1 0 # valid reward: 3*1 0*0 4*1 0*0 # # The second & fourth action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. # # The expected_loss is > 0.0 in this case, only LAST should be excluded. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=None, ) step_type = tf.constant( [ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST]) reward = tf.constant([3, 0, 4, 0], dtype=tf.float32) discount = tf.constant([1, 0, 1, 0], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32) time_steps = ts.TimeStep(step_type, reward, discount, observations) actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32) actions_distribution = agent.collect_policy.distribution( time_steps).action returns = tf.constant([3.0, 0.0, 4.0, 0.0], dtype=tf.float32) # Returns on the StepType.FIRST should be counted. expected_loss = 12.2091741562 loss = agent.policy_gradient_loss( actions_distribution, actions, time_steps.is_last(), returns, 2) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) def testMaskingReturnMultipleEpisodesRewardOnLast(self): # Test that policy_gradient_loss reacts correctly to returns when there are: # * Multiple MDP episodes # * Returns on the tf.StepType.LAST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F) # observation : [1, 2] [1, 2] [1, 2] [1, 2] # action : [0] [1] [2] [3] # reward : 0 3 0 4 # ~is_boundary: 1 0 1 0 # is_last : 1 0 1 0 # valid reward: 0*1 3*0 0*1 4*0 # # The second & fourth action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. # # The expected_loss is 0.0 in this case. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=None, ) step_type = tf.constant( [ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST]) reward = tf.constant([0, 3, 0, 4], dtype=tf.float32) discount = tf.constant([1, 0, 1, 0], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32) time_steps = ts.TimeStep(step_type, reward, discount, observations) actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32) actions_distribution = agent.collect_policy.distribution( time_steps).action returns = tf.constant([0.0, 3.0, 0.0, 4.0], dtype=tf.float32) # Returns on the StepType.LAST should not be counted. expected_loss = 0.0 loss = agent.policy_gradient_loss( actions_distribution, actions, time_steps.is_last(), returns, 2) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) @parameterized.parameters( ([[[0.8, 0.2]]], [1],), ([[[0.8, 0.2]], [[0.3, 0.7]]], [0.5, 0.5],), ) def testEntropyLoss(self, probs, weights): probs = tf.convert_to_tensor(probs) distribution = tfp.distributions.Categorical(probs=probs) shape = probs.shape.as_list() action_spec = tensor_spec.TensorSpec(shape[2:-1], dtype=tf.int32) expected = tf.reduce_mean( -tf.reduce_mean(distribution.entropy()) * weights) actual = reinforce_agent._entropy_loss( distribution, action_spec, weights) self.assertAlmostEqual(self.evaluate(actual), self.evaluate(expected), places=4) def testValueEstimationLoss(self): agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=False), value_network=DummyValueNet(self._obs_spec), value_estimation_loss_coef=0.5, optimizer=None, ) observations = tf.constant([[1, 2], [3, 4]], dtype=tf.float32) time_steps = ts.restart(observations, batch_size=2) returns = tf.constant([1.9, 1.0], dtype=tf.float32) value_preds, _ = agent._value_network(time_steps.observation, time_steps.step_type) expected_loss = 123.20500 loss = agent.value_estimation_loss( value_preds, returns, 1) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_ = self.evaluate(loss) self.assertAllClose(loss_, expected_loss) def testTrainMaskingRewardSingleBanditEpisode(self): # Test that train reacts correctly to experience when there is only a # single Bandit episode. Bandit episodes are encoded differently than # MDP episodes. They have only a single transition with # step_type=StepType.FIRST and next_step_type=StepType.LAST. # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) # observation : [1, 2] # action : [0] # reward : 3 # ~is_boundary: 0 # is_last : 1 # valid reward: 3*1 # # The single bandit transition is valid and not masked. # # The expected_loss is > 0.0 in this case, matching the expected_loss of the # testMaskingRewardSingleEpisodeRewardOnFirst policy_gradient_loss test. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST]) next_step_type = tf.constant([ts.StepType.LAST]) reward = tf.constant([3], dtype=tf.float32) discount = tf.constant([0], dtype=tf.float32) observations = tf.constant([[1, 2]], dtype=tf.float32) actions = tf.constant([[0]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards should be counted. expected_loss = 10.8935775757 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testTrainMaskingRewardMultipleBanditEpisodes(self): # Test that train reacts correctly to experience when there are multiple # Bandit episodes. Bandit episodes are encoded differently than # MDP episodes. They (each) have only a single transition with # step_type=StepType.FIRST and next_step_type=StepType.LAST. This test # helps ensure that LAST->FIRST->LAST transitions are handled correctly. # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (F, L) # observation : [1, 2] [1, 2] # action : [0] [2] # reward : 3 4 # ~is_boundary: 0 0 # is_last : 1 1 # valid reward: 3*1 4*1 # # All bandit transitions are valid and none are masked. # # The expected_loss is > 0.0 in this case, matching the expected_loss of the # testMaskingRewardMultipleEpisodesRewardOnFirst policy_gradient_loss test. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.FIRST]) next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.LAST]) reward = tf.constant([3, 4], dtype=tf.float32) discount = tf.constant([0, 0], dtype=tf.float32) observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32) actions = tf.constant([[0], [2]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards on the StepType.FIRST should be counted. expected_loss = 12.2091741562 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testTrainMaskingRewardSingleEpisodeRewardOnFirst(self): # Test that train reacts correctly to experience when there are: # * A single MDP episode # * Rewards on the tf.StepType.FIRST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) # observation : [1, 2] [1, 2] # action : [0] [1] # reward : 3 4 # ~is_boundary: 1 0 # is_last : 1 0 # valid reward: 3*1 4*0 # # The second action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. # # The expected_loss is > 0.0 in this case, matching the expected_loss of the # testMaskingRewardSingleEpisodeRewardOnFirst policy_gradient_loss test. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST]) next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST]) reward = tf.constant([3, 4], dtype=tf.float32) discount = tf.constant([1, 0], dtype=tf.float32) observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32) actions = tf.constant([[0], [1]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards on the StepType.FIRST should be counted. expected_loss = 10.8935775757 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testTrainMaskingRewardSingleEpisodeRewardOnLast(self): # Test that train reacts correctly to experience when there are: # * A single MDP episode # * Rewards on the tf.StepType.LAST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) # observation : [1, 2] [1, 2] # action : [0] [1] # reward : 0 3 # ~is_boundary: 1 0 # is_last : 1 0 # valid reward: 0*1 3*0 # # The second action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. The first has a 0 reward. # # The expected_loss is = 0.0 in this case. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST]) next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST]) reward = tf.constant([0, 3], dtype=tf.float32) discount = tf.constant([1, 0], dtype=tf.float32) observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32) actions = tf.constant([[0], [1]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards on the StepType.LAST should not be counted. expected_loss = 0.0 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testTrainMaskingRewardMultipleEpisodesRewardOnFirst(self): # Test that train reacts correctly to experience when there are: # * Multiple MDP episodes # * Rewards on the tf.StepType.FIRST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F) # observation : [1, 2] [1, 2] [1, 2] [1, 2] # action : [0] [1] [2] [3] # reward : 3 0 4 0 # ~is_boundary: 1 0 1 0 # is_last : 1 0 1 0 # valid reward: 3*1 0*0 4*1 0*0 # # The second & fourth action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. # # The expected_loss is > 0.0 in this case, matching the expected_loss of the # testMaskingRewardMultipleEpisodesRewardOnFirst policy_gradient_loss test. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST]) next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST]) reward = tf.constant([3, 0, 4, 0], dtype=tf.float32) discount = tf.constant([1, 0, 1, 0], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32) actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards on the StepType.FIRST should be counted. expected_loss = 12.2091741562 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testTrainMaskingPartialEpisodeMultipleEpisodesRewardOnFirst(self): # Test that train reacts correctly to experience when there are: # * Multiple MDP episodes # * Rewards on the tf.StepType.FIRST transitions # * Partial episode at end of experience # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) -> (F, M) -> (M, M) # observation : [1, 2] [1, 2] [1, 2] [1, 2] # action : [0] [1] [2] [3] # reward : 3 0 4 0 # ~is_boundary: 1 0 1 1 # is_last : 1 0 0 0 # valid reward: 3*1 0*0 4*0 0*0 # # The second action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. The third & fourth transitions # should get masked out for everything due to it being an incomplete episode # (notice there is no trailing step_type=(F,L)). # # The expected_loss is > 0.0 in this case, matching the expected_loss of the # testMaskingRewardSingleEpisodeRewardOnFirst policy_gradient_loss test, # because the partial second episode should be masked out. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.MID]) next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.MID, ts.StepType.MID]) reward = tf.constant([3, 0, 4, 0], dtype=tf.float32) discount = tf.constant([1, 0, 1, 0], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32) actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards on the StepType.FIRST should be counted. expected_loss = 10.8935775757 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testTrainMaskingRewardMultipleEpisodesRewardOnLast(self): # Test that train reacts correctly to experience when there are: # * Multiple MDP episodes # * Rewards on the tf.StepType.LAST transitions # # F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below. # # Experience looks like this: # Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F) # observation : [1, 2] [1, 2] [1, 2] [1, 2] # action : [0] [1] [2] [3] # reward : 0 3 0 4 # ~is_boundary: 1 0 1 0 # is_last : 1 0 1 0 # valid reward: 0*1 3*0 0*1 4*0 # # The second & fourth action & reward should be masked out due to being on a # boundary (step_type=(L, F)) transition. # # The expected_loss is = 0.0 in this case. agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=True), optimizer=tf.compat.v1.train.AdamOptimizer(0.001), use_advantage_loss=False, normalize_returns=False, ) step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST]) next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST]) reward = tf.constant([0, 3, 0, 4], dtype=tf.float32) discount = tf.constant([1, 0, 1, 0], dtype=tf.float32) observations = tf.constant( [[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32) actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32) experience = nest_utils.batch_nested_tensors(trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount)) # Rewards on the StepType.LAST should be counted. expected_loss = 0.0 if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) loss_info = self.evaluate(loss) self.assertAllClose(loss_info.loss, expected_loss) def testPolicy(self): agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=False), optimizer=None, ) observations = tf.constant([[1, 2]], dtype=tf.float32) time_steps = ts.restart(observations, batch_size=2) actions = agent.policy.action(time_steps).action self.assertEqual(actions.shape.as_list(), [1, 1]) self.evaluate(tf.compat.v1.global_variables_initializer()) action_values = self.evaluate(actions) tf.nest.map_structure( lambda v, s: self.assertAllInRange(v, s.minimum, s.maximum), action_values, self._action_spec) @parameterized.parameters( (False,), (True,), ) def testGetInitialPolicyState(self, stateful): agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=False, stateful=stateful), optimizer=None, ) observations = tf.constant([[1, 2]], dtype=tf.float32) time_steps = ts.restart(observations, batch_size=3) initial_state = reinforce_agent._get_initial_policy_state( agent.collect_policy, time_steps) if stateful: self.assertAllEqual(self.evaluate(initial_state), self.evaluate(tf.zeros((3, 2), dtype=tf.float32))) else: self.assertEqual(initial_state, ()) def testTrainWithRnn(self): actor_net = actor_distribution_rnn_network.ActorDistributionRnnNetwork( self._obs_spec, self._action_spec, input_fc_layer_params=None, output_fc_layer_params=None, conv_layer_params=None, lstm_size=(40,)) counter = common.create_variable('test_train_counter') agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=actor_net, optimizer=tf.compat.v1.train.AdamOptimizer(0.001), train_step_counter=counter ) batch_size = 5 observations = tf.constant( [[[1, 2], [3, 4], [5, 6]]] * batch_size, dtype=tf.float32) time_steps = ts.TimeStep( step_type=tf.constant([[1, 1, 2]] * batch_size, dtype=tf.int32), reward=tf.constant([[1] * 3] * batch_size, dtype=tf.float32), discount=tf.constant([[1] * 3] * batch_size, dtype=tf.float32), observation=observations) actions = tf.constant([[[0], [1], [1]]] * batch_size, dtype=tf.float32) experience = trajectory.Trajectory( time_steps.step_type, observations, actions, (), time_steps.step_type, time_steps.reward, time_steps.discount) # Force variable creation. agent.policy.variables() if tf.executing_eagerly(): loss = lambda: agent.train(experience) else: loss = agent.train(experience) self.evaluate(tf.compat.v1.global_variables_initializer()) self.assertEqual(self.evaluate(counter), 0) self.evaluate(loss) self.assertEqual(self.evaluate(counter), 1) @parameterized.parameters( (False,), (True,) ) def testWithAdvantageFn(self, with_value_network): advantage_fn = mock.Mock( side_effect=lambda returns, _: returns) value_network = (DummyValueNet(self._obs_spec) if with_value_network else None) agent = reinforce_agent.ReinforceAgent( self._time_step_spec, self._action_spec, actor_network=DummyActorNet( self._obs_spec, self._action_spec, unbounded_actions=False), value_network=value_network, advantage_fn=advantage_fn, optimizer=None, ) step_type = tf.constant([[ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST]]) next_step_type = tf.constant([[ts.StepType.LAST, ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST]]) reward = tf.constant([[0, 0, 0, 0]], dtype=tf.float32) discount = tf.constant([[1, 1, 1, 1]], dtype=tf.float32) observations = tf.constant( [[[1, 2], [1, 2], [1, 2], [1, 2]]], dtype=tf.float32) actions = tf.constant([[[0], [1], [2], [3]]], dtype=tf.float32) experience = trajectory.Trajectory( step_type, observations, actions, (), next_step_type, reward, discount) agent.total_loss(experience, reward, None) advantage_fn.assert_called_once() if __name__ == '__main__': tf.test.main()
// 12.4.2017 mko // Berechnung des Konfigurierten Sortiertermes $(document).ready(function () { $("#btnSave").click(function () { let AppFolder = $("#AppFolder").attr("value"); let rpnFName = $("#rpnFName").attr("value"); let ControllerName = $("#ControllerName").attr("value"); let pnWithoutFunction = $("#pnWithoutFunction").attr("value"); let desc = $("#SortDescending").prop('checked'); let ParamTag = $("#ParamTag").attr("value"); let pn = pnWithoutFunction + ' ' + rpnFName + ' ' + ParamTag + ' ' + (desc ? "desc" : "asc"); let uri = AppFolder + ControllerName + '/Index' + '?pn=' + encodeURI(pn); //window.location.href = uri; window.location.assign(uri); }); });
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. import functools import itertools import operator import sys import types __author__ = "Benjamin Peterson <benjamin@python.org>" __version__ = "1.9.0" # Useful for very coarse version differentiation. PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 if PY3: string_types = str, integer_types = int, class_types = type, text_type = str binary_type = bytes MAXSIZE = sys.maxsize else: string_types = str, integer_types = (int, int) class_types = (type, type) text_type = str binary_type = str if sys.platform.startswith("java"): # Jython always uses 32 bits. MAXSIZE = int((1 << 31) - 1) else: # It's possible to have sizeof(long) != sizeof(Py_ssize_t). class X(object): def __len__(self): return 1 << 31 try: len(X()) except OverflowError: # 32-bit MAXSIZE = int((1 << 31) - 1) else: # 64-bit MAXSIZE = int((1 << 63) - 1) del X def _add_doc(func, doc): """Add documentation to a function.""" func.__doc__ = doc def _import_module(name): """Import module, returning the module after the last dot.""" __import__(name) return sys.modules[name] class _LazyDescr(object): def __init__(self, name): self.name = name def __get__(self, obj, tp): result = self._resolve() setattr(obj, self.name, result) # Invokes __set__. try: # This is a bit ugly, but it avoids running this again by # removing this descriptor. delattr(obj.__class__, self.name) except AttributeError: pass return result class MovedModule(_LazyDescr): def __init__(self, name, old, new=None): super(MovedModule, self).__init__(name) if PY3: if new is None: new = name self.mod = new else: self.mod = old def _resolve(self): return _import_module(self.mod) def __getattr__(self, attr): _module = self._resolve() value = getattr(_module, attr) setattr(self, attr, value) return value class _LazyModule(types.ModuleType): def __init__(self, name): super(_LazyModule, self).__init__(name) self.__doc__ = self.__class__.__doc__ def __dir__(self): attrs = ["__doc__", "__name__"] attrs += [attr.name for attr in self._moved_attributes] return attrs # Subclasses should override this _moved_attributes = [] class MovedAttribute(_LazyDescr): def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): super(MovedAttribute, self).__init__(name) if PY3: if new_mod is None: new_mod = name self.mod = new_mod if new_attr is None: if old_attr is None: new_attr = name else: new_attr = old_attr self.attr = new_attr else: self.mod = old_mod if old_attr is None: old_attr = name self.attr = old_attr def _resolve(self): module = _import_module(self.mod) return getattr(module, self.attr) class _SixMetaPathImporter(object): """ A meta path importer to import six.moves and its submodules. This class implements a PEP302 finder and loader. It should be compatible with Python 2.5 and all existing versions of Python3 """ def __init__(self, six_module_name): self.name = six_module_name self.known_modules = {} def _add_module(self, mod, *fullnames): for fullname in fullnames: self.known_modules[self.name + "." + fullname] = mod def _get_module(self, fullname): return self.known_modules[self.name + "." + fullname] def find_module(self, fullname, path=None): if fullname in self.known_modules: return self return None def __get_module(self, fullname): try: return self.known_modules[fullname] except KeyError: raise ImportError("This loader does not know module " + fullname) def load_module(self, fullname): try: # in case of a reload return sys.modules[fullname] except KeyError: pass mod = self.__get_module(fullname) if isinstance(mod, MovedModule): mod = mod._resolve() else: mod.__loader__ = self sys.modules[fullname] = mod return mod def is_package(self, fullname): """ Return true, if the named module is a package. We need this method to get correct spec objects with Python 3.4 (see PEP451) """ return hasattr(self.__get_module(fullname), "__path__") def get_code(self, fullname): """Return None Required, if is_package is implemented""" self.__get_module(fullname) # eventually raises ImportError return None get_source = get_code # same as get_code _importer = _SixMetaPathImporter(__name__) class _MovedItems(_LazyModule): """Lazy loading of moved objects""" __path__ = [] # mark as package _moved_attributes = [ MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), MovedAttribute("intern", "__builtin__", "sys"), MovedAttribute("map", "itertools", "builtins", "imap", "map"), MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), MovedAttribute("reload_module", "__builtin__", "imp", "reload"), MovedAttribute("reduce", "__builtin__", "functools"), MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), MovedAttribute("StringIO", "StringIO", "io"), MovedAttribute("UserDict", "UserDict", "collections"), MovedAttribute("UserList", "UserList", "collections"), MovedAttribute("UserString", "UserString", "collections"), MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), MovedModule("builtins", "__builtin__"), MovedModule("configparser", "ConfigParser"), MovedModule("copyreg", "copy_reg"), MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), MovedModule("http_cookies", "Cookie", "http.cookies"), MovedModule("html_entities", "htmlentitydefs", "html.entities"), MovedModule("html_parser", "HTMLParser", "html.parser"), MovedModule("http_client", "httplib", "http.client"), MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), MovedModule("cPickle", "cPickle", "pickle"), MovedModule("queue", "Queue"), MovedModule("reprlib", "repr"), MovedModule("socketserver", "SocketServer"), MovedModule("_thread", "thread", "_thread"), MovedModule("tkinter", "Tkinter"), MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), MovedModule("tkinter_tix", "Tix", "tkinter.tix"), MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), MovedModule("tkinter_colorchooser", "tkColorChooser", "tkinter.colorchooser"), MovedModule("tkinter_commondialog", "tkCommonDialog", "tkinter.commondialog"), MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), MovedModule("tkinter_font", "tkFont", "tkinter.font"), MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", "tkinter.simpledialog"), MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), MovedModule("winreg", "_winreg"), ] for attr in _moved_attributes: setattr(_MovedItems, attr.name, attr) if isinstance(attr, MovedModule): _importer._add_module(attr, "moves." + attr.name) del attr _MovedItems._moved_attributes = _moved_attributes moves = _MovedItems(__name__ + ".moves") _importer._add_module(moves, "moves") class Module_six_moves_urllib_parse(_LazyModule): """Lazy loading of moved objects in six.moves.urllib_parse""" _urllib_parse_moved_attributes = [ MovedAttribute("ParseResult", "urlparse", "urllib.parse"), MovedAttribute("SplitResult", "urlparse", "urllib.parse"), MovedAttribute("parse_qs", "urlparse", "urllib.parse"), MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), MovedAttribute("urldefrag", "urlparse", "urllib.parse"), MovedAttribute("urljoin", "urlparse", "urllib.parse"), MovedAttribute("urlparse", "urlparse", "urllib.parse"), MovedAttribute("urlsplit", "urlparse", "urllib.parse"), MovedAttribute("urlunparse", "urlparse", "urllib.parse"), MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), MovedAttribute("quote", "urllib", "urllib.parse"), MovedAttribute("quote_plus", "urllib", "urllib.parse"), MovedAttribute("unquote", "urllib", "urllib.parse"), MovedAttribute("unquote_plus", "urllib", "urllib.parse"), MovedAttribute("urlencode", "urllib", "urllib.parse"), MovedAttribute("splitquery", "urllib", "urllib.parse"), MovedAttribute("splittag", "urllib", "urllib.parse"), MovedAttribute("splituser", "urllib", "urllib.parse"), MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), MovedAttribute("uses_params", "urlparse", "urllib.parse"), MovedAttribute("uses_query", "urlparse", "urllib.parse"), MovedAttribute("uses_relative", "urlparse", "urllib.parse"), ] for attr in _urllib_parse_moved_attributes: setattr(Module_six_moves_urllib_parse, attr.name, attr) del attr Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes _importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), "moves.urllib_parse", "moves.urllib.parse") class Module_six_moves_urllib_error(_LazyModule): """Lazy loading of moved objects in six.moves.urllib_error""" _urllib_error_moved_attributes = [ MovedAttribute("URLError", "urllib2", "urllib.error"), MovedAttribute("HTTPError", "urllib2", "urllib.error"), MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), ] for attr in _urllib_error_moved_attributes: setattr(Module_six_moves_urllib_error, attr.name, attr) del attr Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes _importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), "moves.urllib_error", "moves.urllib.error") class Module_six_moves_urllib_request(_LazyModule): """Lazy loading of moved objects in six.moves.urllib_request""" _urllib_request_moved_attributes = [ MovedAttribute("urlopen", "urllib2", "urllib.request"), MovedAttribute("install_opener", "urllib2", "urllib.request"), MovedAttribute("build_opener", "urllib2", "urllib.request"), MovedAttribute("pathname2url", "urllib", "urllib.request"), MovedAttribute("url2pathname", "urllib", "urllib.request"), MovedAttribute("getproxies", "urllib", "urllib.request"), MovedAttribute("Request", "urllib2", "urllib.request"), MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), MovedAttribute("BaseHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), MovedAttribute("FileHandler", "urllib2", "urllib.request"), MovedAttribute("FTPHandler", "urllib2", "urllib.request"), MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), MovedAttribute("urlretrieve", "urllib", "urllib.request"), MovedAttribute("urlcleanup", "urllib", "urllib.request"), MovedAttribute("URLopener", "urllib", "urllib.request"), MovedAttribute("FancyURLopener", "urllib", "urllib.request"), MovedAttribute("proxy_bypass", "urllib", "urllib.request"), ] for attr in _urllib_request_moved_attributes: setattr(Module_six_moves_urllib_request, attr.name, attr) del attr Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes _importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), "moves.urllib_request", "moves.urllib.request") class Module_six_moves_urllib_response(_LazyModule): """Lazy loading of moved objects in six.moves.urllib_response""" _urllib_response_moved_attributes = [ MovedAttribute("addbase", "urllib", "urllib.response"), MovedAttribute("addclosehook", "urllib", "urllib.response"), MovedAttribute("addinfo", "urllib", "urllib.response"), MovedAttribute("addinfourl", "urllib", "urllib.response"), ] for attr in _urllib_response_moved_attributes: setattr(Module_six_moves_urllib_response, attr.name, attr) del attr Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes _importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), "moves.urllib_response", "moves.urllib.response") class Module_six_moves_urllib_robotparser(_LazyModule): """Lazy loading of moved objects in six.moves.urllib_robotparser""" _urllib_robotparser_moved_attributes = [ MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), ] for attr in _urllib_robotparser_moved_attributes: setattr(Module_six_moves_urllib_robotparser, attr.name, attr) del attr Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes _importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), "moves.urllib_robotparser", "moves.urllib.robotparser") class Module_six_moves_urllib(types.ModuleType): """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" __path__ = [] # mark as package parse = _importer._get_module("moves.urllib_parse") error = _importer._get_module("moves.urllib_error") request = _importer._get_module("moves.urllib_request") response = _importer._get_module("moves.urllib_response") robotparser = _importer._get_module("moves.urllib_robotparser") def __dir__(self): return ['parse', 'error', 'request', 'response', 'robotparser'] _importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), "moves.urllib") def add_move(move): """Add an item to six.moves.""" setattr(_MovedItems, move.name, move) def remove_move(name): """Remove item from six.moves.""" try: delattr(_MovedItems, name) except AttributeError: try: del moves.__dict__[name] except KeyError: raise AttributeError("no such move, %r" % (name,)) if PY3: _meth_func = "__func__" _meth_self = "__self__" _func_closure = "__closure__" _func_code = "__code__" _func_defaults = "__defaults__" _func_globals = "__globals__" else: _meth_func = "im_func" _meth_self = "im_self" _func_closure = "func_closure" _func_code = "func_code" _func_defaults = "func_defaults" _func_globals = "func_globals" try: advance_iterator = next except NameError: def advance_iterator(it): return it.__next__() next = advance_iterator try: callable = callable except NameError: def callable(obj): return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) if PY3: def get_unbound_function(unbound): return unbound create_bound_method = types.MethodType Iterator = object else: def get_unbound_function(unbound): return unbound.__func__ def create_bound_method(func, obj): return types.MethodType(func, obj, obj.__class__) class Iterator(object): def __next__(self): return type(self).__next__(self) callable = callable _add_doc(get_unbound_function, """Get the function out of a possibly unbound function""") get_method_function = operator.attrgetter(_meth_func) get_method_self = operator.attrgetter(_meth_self) get_function_closure = operator.attrgetter(_func_closure) get_function_code = operator.attrgetter(_func_code) get_function_defaults = operator.attrgetter(_func_defaults) get_function_globals = operator.attrgetter(_func_globals) if PY3: def iterkeys(d, **kw): return iter(d.keys(**kw)) def itervalues(d, **kw): return iter(d.values(**kw)) def iteritems(d, **kw): return iter(d.items(**kw)) def iterlists(d, **kw): return iter(d.lists(**kw)) viewkeys = operator.methodcaller("keys") viewvalues = operator.methodcaller("values") viewitems = operator.methodcaller("items") else: def iterkeys(d, **kw): return iter(d.iterkeys(**kw)) def itervalues(d, **kw): return iter(d.itervalues(**kw)) def iteritems(d, **kw): return iter(d.iteritems(**kw)) def iterlists(d, **kw): return iter(d.iterlists(**kw)) viewkeys = operator.methodcaller("viewkeys") viewvalues = operator.methodcaller("viewvalues") viewitems = operator.methodcaller("viewitems") _add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") _add_doc(itervalues, "Return an iterator over the values of a dictionary.") _add_doc(iteritems, "Return an iterator over the (key, value) pairs of a dictionary.") _add_doc(iterlists, "Return an iterator over the (key, [values]) pairs of a dictionary.") if PY3: def b(s): return s.encode("latin-1") def u(s): return s chr = chr if sys.version_info[1] <= 1: def int2byte(i): return bytes((i,)) else: # This is about 2x faster than the implementation above on 3.2+ int2byte = operator.methodcaller("to_bytes", 1, "big") byte2int = operator.itemgetter(0) indexbytes = operator.getitem iterbytes = iter import io StringIO = io.StringIO BytesIO = io.BytesIO _assertCountEqual = "assertCountEqual" _assertRaisesRegex = "assertRaisesRegex" _assertRegex = "assertRegex" else: def b(s): return s # Workaround for standalone backslash def u(s): return str(s.replace(r'\\', r'\\\\'), "unicode_escape") chr = chr int2byte = chr def byte2int(bs): return ord(bs[0]) def indexbytes(buf, i): return ord(buf[i]) iterbytes = functools.partial(itertools.imap, ord) import io StringIO = BytesIO = io.StringIO _assertCountEqual = "assertItemsEqual" _assertRaisesRegex = "assertRaisesRegexp" _assertRegex = "assertRegexpMatches" _add_doc(b, """Byte literal""") _add_doc(u, """Text literal""") def assertCountEqual(self, *args, **kwargs): return getattr(self, _assertCountEqual)(*args, **kwargs) def assertRaisesRegex(self, *args, **kwargs): return getattr(self, _assertRaisesRegex)(*args, **kwargs) def assertRegex(self, *args, **kwargs): return getattr(self, _assertRegex)(*args, **kwargs) if PY3: exec_ = getattr(moves.builtins, "exec") def reraise(tp, value, tb=None): if value is None: value = tp() if value.__traceback__ is not tb: raise value.with_traceback(tb) raise value else: def exec_(_code_, _globs_=None, _locs_=None): """Execute code in a namespace.""" if _globs_ is None: frame = sys._getframe(1) _globs_ = frame.f_globals if _locs_ is None: _locs_ = frame.f_locals del frame elif _locs_ is None: _locs_ = _globs_ exec("""exec _code_ in _globs_, _locs_""") exec_("""def reraise(tp, value, tb=None): raise tp, value, tb """) if sys.version_info[:2] == (3, 2): exec_("""def raise_from(value, from_value): if from_value is None: raise value raise value from from_value """) elif sys.version_info[:2] > (3, 2): exec_("""def raise_from(value, from_value): raise value from from_value """) else: def raise_from(value, from_value): raise value print_ = getattr(moves.builtins, "print", None) if print_ is None: def print_(*args, **kwargs): """The new-style print function for Python 2.4 and 2.5.""" fp = kwargs.pop("file", sys.stdout) if fp is None: return def write(data): if not isinstance(data, str): data = str(data) # If the file has an encoding, encode unicode with it. if (isinstance(fp, file) and isinstance(data, str) and fp.encoding is not None): errors = getattr(fp, "errors", None) if errors is None: errors = "strict" data = data.encode(fp.encoding, errors) fp.write(data) want_unicode = False sep = kwargs.pop("sep", None) if sep is not None: if isinstance(sep, str): want_unicode = True elif not isinstance(sep, str): raise TypeError("sep must be None or a string") end = kwargs.pop("end", None) if end is not None: if isinstance(end, str): want_unicode = True elif not isinstance(end, str): raise TypeError("end must be None or a string") if kwargs: raise TypeError("invalid keyword arguments to print()") if not want_unicode: for arg in args: if isinstance(arg, str): want_unicode = True break if want_unicode: newline = str("\n") space = str(" ") else: newline = "\n" space = " " if sep is None: sep = space if end is None: end = newline for i, arg in enumerate(args): if i: write(sep) write(arg) write(end) if sys.version_info[:2] < (3, 3): _print = print_ def print_(*args, **kwargs): fp = kwargs.get("file", sys.stdout) flush = kwargs.pop("flush", False) _print(*args, **kwargs) if flush and fp is not None: fp.flush() _add_doc(reraise, """Reraise an exception.""") if sys.version_info[0:2] < (3, 4): def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES): def wrapper(f): f = functools.wraps(wrapped, assigned, updated)(f) f.__wrapped__ = wrapped return f return wrapper else: wraps = functools.wraps def with_metaclass(meta, *bases): """Create a base class with a metaclass.""" # This requires a bit of explanation: the basic idea is to make a dummy # metaclass for one level of class instantiation that replaces itself with # the actual metaclass. class metaclass(meta): def __new__(cls, name, this_bases, d): return meta(name, bases, d) return type.__new__(metaclass, 'temporary_class', (), {}) def add_metaclass(metaclass): """Class decorator for creating a class with a metaclass.""" def wrapper(cls): orig_vars = cls.__dict__.copy() slots = orig_vars.get('__slots__') if slots is not None: if isinstance(slots, str): slots = [slots] for slots_var in slots: orig_vars.pop(slots_var) orig_vars.pop('__dict__', None) orig_vars.pop('__weakref__', None) return metaclass(cls.__name__, cls.__bases__, orig_vars) return wrapper def python_2_unicode_compatible(klass): """ A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing. To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class. """ if PY2: if '__str__' not in klass.__dict__: raise ValueError("@python_2_unicode_compatible cannot be applied " "to %s because it doesn't define __str__()." % klass.__name__) klass.__unicode__ = klass.__str__ klass.__str__ = lambda self: self.__unicode__().encode('utf-8') return klass # Complete the moves implementation. # This code is at the end of this module to speed up module loading. # Turn this module into a package. __path__ = [] # required for PEP 302 and PEP 451 __package__ = __name__ # see PEP 366 @ReservedAssignment if globals().get("__spec__") is not None: __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable # Remove other six meta path importers, since they cause problems. This can # happen if six is removed from sys.modules and then reloaded. (Setuptools does # this for some reason.) if sys.meta_path: for i, importer in enumerate(sys.meta_path): # Here's some real nastiness: Another "instance" of the six module might # be floating around. Therefore, we can't use isinstance() to check for # the six meta path importer, since the other six instance will have # inserted an importer with different class. if (type(importer).__name__ == "_SixMetaPathImporter" and importer.name == __name__): del sys.meta_path[i] break del i, importer # Finally, add the importer to the meta path import hook. sys.meta_path.append(_importer)
import React from 'react'; import SortColumn, { SortByDirection } from '../../SortColumn'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/patternfly/components/Table/table.css'; import buttonStyles from '@patternfly/patternfly/components/Button/button.css'; export default (label, { columnIndex, column, property }) => { const { extraParams: { sortBy, onSort } } = column; const extraData = { columnIndex, column, property }; const isSortedBy = sortBy && columnIndex === sortBy.index; function sortClicked(event) { let reversedDirection; if (!isSortedBy) { reversedDirection = SortByDirection.asc; } else { reversedDirection = sortBy.direction === SortByDirection.asc ? SortByDirection.desc : SortByDirection.asc; } onSort && onSort(event, columnIndex, reversedDirection, extraData); } return { className: css(styles.tableSort, isSortedBy && styles.modifiers.selected), 'aria-sort': isSortedBy ? `${sortBy.direction}ending` : 'none', children: ( <SortColumn isSortedBy={isSortedBy} sortDirection={isSortedBy ? sortBy.direction : ''} onSort={sortClicked} className={css(buttonStyles.button, buttonStyles.modifiers.plain)} > {label} </SortColumn> ) }; };
// // Tests autosplit locations with force : true, for small collections // (function() { 'use strict'; var st = new ShardingTest( {shards: 1, mongos: 1, other: {chunkSize: 1, mongosOptions: {noAutoSplit: ""}}}); var mongos = st.s0; var admin = mongos.getDB("admin"); var config = mongos.getDB("config"); var shardAdmin = st.shard0.getDB("admin"); var coll = mongos.getCollection("foo.bar"); assert.commandWorked(admin.runCommand({enableSharding: coll.getDB() + ""})); assert.commandWorked(admin.runCommand({shardCollection: coll + "", key: {_id: 1}})); assert.commandWorked(admin.runCommand({split: coll + "", middle: {_id: 0}})); jsTest.log("Insert a bunch of data into the low chunk of a collection," + " to prevent relying on stats."); var data128k = "x"; for (var i = 0; i < 7; i++) data128k += data128k; var bulk = coll.initializeUnorderedBulkOp(); for (var i = 0; i < 1024; i++) { bulk.insert({_id: -(i + 1)}); } assert.writeOK(bulk.execute()); jsTest.log("Insert 32 docs into the high chunk of a collection"); bulk = coll.initializeUnorderedBulkOp(); for (var i = 0; i < 32; i++) { bulk.insert({_id: i}); } assert.writeOK(bulk.execute()); jsTest.log("Split off MaxKey chunk..."); assert.commandWorked(admin.runCommand({split: coll + "", middle: {_id: 32}})); jsTest.log("Keep splitting chunk multiple times..."); st.printShardingStatus(); for (var i = 0; i < 5; i++) { assert.commandWorked(admin.runCommand({split: coll + "", find: {_id: 0}})); st.printShardingStatus(); } // Make sure we can't split further than 5 (2^5) times assert.commandFailed(admin.runCommand({split: coll + "", find: {_id: 0}})); var chunks = config.chunks.find({'min._id': {$gte: 0, $lt: 32}}).sort({min: 1}).toArray(); printjson(chunks); // Make sure the chunks grow by 2x (except the first) var nextSize = 1; for (var i = 0; i < chunks.size; i++) { assert.eq(coll.count({_id: {$gte: chunks[i].min._id, $lt: chunks[i].max._id}}), nextSize); if (i != 0) nextSize += nextSize; } st.stop(); })();
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import nodemailer from 'nodemailer'; import { Action, ActionResult } from '../'; export const EMAIL_ACTION_ID = 'xpack-notifications-email'; /** * Email Action enables generic sending of emails, when configured. */ export class EmailAction extends Action { /** * Create a new Action capable of sending emails. * * @param {Object} server Kibana server object. * @param {Object} options Configuration options for Nodemailer. * @param {Object} defaults Default fields used when sending emails. * @param {Object} _nodemailer Exposed for tests. */ constructor({ server, options, defaults = { }, _nodemailer = nodemailer }) { super({ server, id: EMAIL_ACTION_ID, name: 'Email' }); this.transporter = _nodemailer.createTransport(options, defaults); this.defaults = defaults; } getMissingFields(notification) { const missingFields = []; if (!Boolean(this.defaults.to) && !Boolean(notification.to)) { missingFields.push({ field: 'to', name: 'To', type: 'email', }); } if (!Boolean(this.defaults.from) && !Boolean(notification.from)) { missingFields.push({ field: 'from', name: 'From', type: 'email', }); } if (!Boolean(notification.subject)) { missingFields.push({ field: 'subject', name: 'Subject', type: 'text', }); } if (!Boolean(notification.markdown)) { missingFields.push({ field: 'markdown', name: 'Body', type: 'markdown', }); } return missingFields; } async doPerformHealthCheck() { // this responds with a boolean 'true' response, otherwise throws an Error const response = await this.transporter.verify(); return new ActionResult({ message: `Email action SMTP configuration has been verified.`, response: { verified: response }, }); } async doPerformAction(notification) { // Note: This throws an Error upon failure const response = await this.transporter.sendMail({ // email routing from: notification.from, to: notification.to, cc: notification.cc, bcc: notification.bcc, // email content subject: notification.subject, html: notification.markdown, text: notification.markdown, }); return new ActionResult({ message: `Sent email for '${notification.subject}'.`, response, }); } }
var path = require('path'); module.exports = { mode: 'production', context: path.join(__dirname, '/dist'), entry: './client.js', output: { path: path.join(__dirname, '/browser'), filename: 'client.js', library: 'SubscriptionsTransportWs' } };
""" Print out Py-ART version information. This file can also be run as a script to report on dependencies before a build: python pyart/_debug_info.py """ from __future__ import print_function import os import sys def _debug_info(stream=None): """ Print out version and status information for debugging. This file can be run as a script from the source directory to report on dependecies before a build using: **python pyart/_debug_info.py**. Parameters ---------- stream : file-like object Stream to print the information to, None prints to sys.stdout. """ if stream is None: stream = sys.stdout # remove the current path from the import search path # if this is not done ./io is found and not the std library io module. current_dir = os.path.dirname(os.path.abspath(__file__)) if current_dir in sys.path: sys.path.remove(current_dir) try: import pyart pyart_version = pyart.__version__ except: pyart_version = "MISSING" try: import platform python_version = platform.python_version() except: python_version = "MISSING" try: import numpy numpy_version = numpy.__version__ except: numpy_version = "MISSING" try: import numpy numpy_version = numpy.__version__ except: numpy_version = "MISSING" try: import scipy scipy_version = scipy.__version__ except: scipy_version = "MISSING" try: import matplotlib matplotlib_version = matplotlib.__version__ except: matplotlib_version = "MISSING" try: import netCDF4 netCDF4_version = netCDF4.__version__ except: netCDF4_version = "MISSING" try: rsl_version = pyart.io._rsl_interface._RSL_VERSION_STR except: rsl_version = "MISSING" try: import cylp cylp_available = "Available" except: cylp_available = "MISSING" try: import glpk glpk_version = "%i.%i" % (glpk.env.version) except: glpk_version = "MISSING" try: import cvxopt.info cvxopt_version = cvxopt.info.version except: cvxopt_version = "MISSING" try: from mpl_toolkits import basemap basemap_version = basemap.__version__ except: basemap_version = "MISSING" try: import nose nose_version = nose.__version__ except: nose_version = "MISSING" print("Py-ART version:", pyart_version, file=stream) print("", file=stream) print("---- Dependencies ----", file=stream) print("Python version:", python_version, file=stream) print("NumPy version:", numpy_version, file=stream) print("SciPy version:", scipy_version, file=stream) print("matplotlib version:", matplotlib_version, file=stream) print("netCDF4 version:", netCDF4_version, file=stream) print("", file=stream) print("---- Optional dependencies ----", file=stream) print("TRMM RSL version:", rsl_version, file=stream) print("CyLP:", cylp_available, file=stream) print("PyGLPK version:", glpk_version, file=stream) print("CVXOPT version:", cvxopt_version, file=stream) print("basemap version:", basemap_version, file=stream) print("nose version:", nose_version, file=stream) if __name__ == "__main__": _debug_info()
/** * @category saltcorn-data * @module models/user * @subcategory models */ const db = require("../db"); const bcrypt = require("bcryptjs"); const { contract, is } = require("contractis"); const { v4: uuidv4 } = require("uuid"); const dumbPasswords = require("dumb-passwords"); const validator = require("email-validator"); /** * @param {object} o * @returns {*} */ const safeUserFields = (o) => { const { email, password, language, _attributes, api_token, verification_token, verified_on, disabled, id, reset_password_token, reset_password_expiry, role_id, ...rest } = o; return rest; }; /** * User * @category saltcorn-data */ class User { /** * User constructor * @param {object} o */ constructor(o) { this.email = o.email; this.password = o.password; this.language = o.language; this._attributes = typeof o._attributes === "string" ? JSON.parse(o._attributes) : o._attributes || {}; this.api_token = o.api_token; this.verification_token = o.verification_token; this.verified_on = ["string", "number"].includes(typeof o.verified_on) ? new Date(o.verified_on) : o.verified_on; this.disabled = !!o.disabled; this.id = o.id ? +o.id : o.id; this.reset_password_token = o.reset_password_token || null; this.reset_password_expiry = (typeof o.reset_password_expiry === "string" && o.reset_password_expiry.length > 0) || typeof o.reset_password_expiry === "number" ? new Date(o.reset_password_expiry) : o.reset_password_expiry || null; this.role_id = o.role_id ? +o.role_id : 8; Object.assign(this, safeUserFields(o)); contract.class(this); } /** * Get bcrypt hash for Password * @param pw - password string * @returns {Promise<string>} */ static async hashPassword(pw) { return await bcrypt.hash(pw, 10); } /** * Check password * @param pw - password string * @returns {boolean} */ checkPassword(pw) { return bcrypt.compareSync(pw, this.password); } /** * Change password * @param newpw - new password string * @param expireToken - if true than force reset password token * @returns {Promise<void>} no result */ async changePasswordTo(newpw, expireToken) { const password = await User.hashPassword(newpw); this.password = password; const upd = { password }; if (expireToken) upd.reset_password_token = null; await db.update("users", upd, this.id); } /** * Find or Create User * @param k * @param v * @param {object} [uo = {}] * @returns {Promise<{session_object: {_attributes: {}}, _attributes: {}}|User|*|boolean|{error: string}|User>} */ static async findOrCreateByAttribute(k, v, uo = {}) { const u = await User.findOne({ _attributes: { json: [k, v] } }); if (u) return u; else { const { getState } = require("../db/state"); const email_mask = getState().getConfig("email_mask"); if (email_mask && uo.email) { const { check_email_mask } = require("./config"); if (!check_email_mask(uo.email)) { return false; } } const new_user_form = getState().getConfig("new_user_form"); if (new_user_form) { // cannot create user, return pseudo-user const pseudoUser = { ...uo, _attributes: { [k]: v } }; return { ...pseudoUser, session_object: pseudoUser }; } else { const extra = {}; if (!uo.password) extra.password = User.generate_password(); return await User.create({ ...uo, ...extra, _attributes: { [k]: v } }); } } } /** * Create user * @param uo - user object * @returns {Promise<{error: string}|User>} */ static async create(uo) { const { email, password, passwordRepeat, role_id, ...rest } = uo; const u = new User({ email, password, role_id }); if (User.unacceptable_password_reason(u.password)) return { error: "Password not accepted: " + User.unacceptable_password_reason(u.password), }; const hashpw = await User.hashPassword(u.password); const ex = await User.findOne({ email: u.email }); if (ex) return { error: `User with this email already exists` }; const id = await db.insert("users", { email: u.email, password: hashpw, role_id: u.role_id, ...rest, }); u.id = id; return u; } /** * Create session object for user * @type {{role_id: number, language, id, email, tenant: *}} */ get session_object() { const so = { email: this.email, id: this.id, role_id: this.role_id, language: this.language, tenant: db.getTenantSchema(), }; Object.assign(so, safeUserFields(this)); return so; } /** * Authenticate User * @param uo - user object * @returns {Promise<boolean|User>} */ static async authenticate(uo) { const { password, ...uoSearch } = uo; const urows = await User.find(uoSearch, { limit: 2 }); if (urows.length !== 1) return false; const [urow] = urows; if (urow.disabled) return false; const cmp = urow.checkPassword(password || ""); if (cmp) return new User(urow); else return false; } /** * Find users list * @param where - where object * @param selectopts - select options * @returns {Promise<User[]>} */ static async find(where, selectopts) { const us = await db.select("users", where, selectopts); return us.map((u) => new User(u)); } /** * Find one user * @param where - where object * @returns {Promise<User|*>} */ static async findOne(where) { const u = await db.selectMaybeOne("users", where); return u ? new User(u) : u; } /** * Check that user table is not empty in database * @deprecated use method count() * @returns {Promise<boolean>} true if there are users in db */ static async nonEmpty() { const res = await db.count("users"); return res > 0; } /** * Delete user based on session object * @returns {Promise<void>} */ async delete() { const schema = db.getTenantSchemaPrefix(); this.destroy_sessions(); await db.query(`delete FROM ${schema}users WHERE id = $1`, [this.id]); } /** * Set language for User in database * @param language * @returns {Promise<void>} */ async set_language(language) { await this.update({ language }); } /** * Update User * @param row * @returns {Promise<void>} */ async update(row) { await db.update("users", row, this.id); } /** * Get new reset token * @returns {Promise<*|string>} */ async getNewResetToken() { const reset_password_token_uuid = uuidv4(); const reset_password_expiry = new Date(); reset_password_expiry.setDate(new Date().getDate() + 1); const reset_password_token = await bcrypt.hash( reset_password_token_uuid, 10 ); await db.update( "users", { reset_password_token, reset_password_expiry }, this.id ); return reset_password_token_uuid; } /** * Add new API token to user * @returns {Promise<string>} */ async getNewAPIToken() { const api_token = uuidv4(); await db.update("users", { api_token }, this.id); this.api_token = api_token; return api_token; } /** * Remove API token for user * @returns {Promise<string>} */ async removeAPIToken() { const api_token = null; await db.update("users", { api_token }, this.id); this.api_token = api_token; return api_token; } /** * Validate password * @param pw * @returns {string} */ static unacceptable_password_reason(pw) { if (typeof pw !== "string") return "Not a string"; if (pw.length < 8) return "Too short"; if (dumbPasswords.check(pw)) return "Too common"; } /** * Validate email * @param email * @returns {boolean} */ // TBD that validation works static valid_email(email) { return validator.validate(email); } /** * Verification with token * @param email - email sting * @param verification_token - verification token string * @returns {Promise<{error: string}|boolean>} true if verification passed, error string if not */ static async verifyWithToken({ email, verification_token }) { if ( typeof verification_token !== "string" || typeof email !== "string" || verification_token.length < 10 || !email ) return { error: "Invalid token" }; const u = await User.findOne({ email, verification_token }); if (!u) return { error: "Invalid token" }; return await u.set_to_verified(); } /** * @returns {Promise<boolean>} */ async set_to_verified() { const upd = { verified_on: new Date() }; const { getState } = require("../db/state"); const elevate_verified = +getState().getConfig("elevate_verified"); if (elevate_verified) upd.role_id = Math.min(elevate_verified, this.role_id); await db.update("users", upd, this.id); Object.assign(this, upd); const Trigger = require("./trigger"); Trigger.emitEvent("UserVerified", null, this, this); return true; } /** * Reset password using token * @param email - email address string * @param reset_password_token - reset password token string * @param password * @returns {Promise<{error: string}|{success: boolean}>} */ static async resetPasswordWithToken({ email, reset_password_token, password, }) { if ( typeof reset_password_token !== "string" || typeof email !== "string" || reset_password_token.length < 10 ) return { error: "Invalid token or invalid token length or incorrect email", }; const u = await User.findOne({ email }); if (u && new Date() < u.reset_password_expiry && u.reset_password_token) { const match = bcrypt.compareSync( reset_password_token, u.reset_password_token ); if (match) { if (User.unacceptable_password_reason(password)) return { error: "Password not accepted: " + User.unacceptable_password_reason(password), }; await u.changePasswordTo(password, true); return { success: true }; } else return { error: "User not found or expired token" }; } else { return { error: "User not found or expired token" }; } } /** * Count users in database * @param where * @returns {Promise<number>} */ // TBD I think that method is simular to notEmppty() but more powerfull. // TBD use some rules for naming of methods - e.g. this method will have name count_users or countUsers because of methods relay on roles in this class static async count(where) { return await db.count("users", where || {}); } /** * Get available roles * @returns {Promise<*>} */ static async get_roles() { const rs = await db.select("_sc_roles", {}, { orderBy: "id" }); return rs; } /** * Generate password * @returns {string} */ static generate_password() { const candidate = is.str.generate().split(" ").join(""); // TBD low performance impact - un if (candidate.length < 10) return User.generate_password(); else return candidate; } /** * @returns {Promise<void>} */ async destroy_sessions() { if (!db.isSQLite) { const schema = db.getTenantSchema(); await db.query( `delete from _sc_session where sess->'passport'->'user'->>'id' = $1 and sess->'passport'->'user'->>'tenant' = $2`, [`${this.id}`, schema] ); } } /** * @param {object} req */ relogin(req) { req.login(this.session_object, function (err) { if (err) req.flash("danger", err); }); } } User.contract = { variables: { id: is.maybe(is.posint), email: is.str, //password: is.str, disabled: is.bool, language: is.maybe(is.str), _attributes: is.maybe(is.obj({})), role_id: is.posint, reset_password_token: is.maybe( is.and( is.str, is.sat((s) => s.length > 10) ) ), reset_password_expiry: is.maybe(is.class("Date")), }, methods: { delete: is.fun([], is.promise(is.undefined)), destroy_sessions: is.fun([], is.promise(is.undefined)), changePasswordTo: is.fun(is.str, is.promise(is.undefined)), checkPassword: is.fun(is.str, is.bool), }, static_methods: { find: is.fun(is.maybe(is.obj()), is.promise(is.array(is.class("User")))), findOne: is.fun(is.obj(), is.promise(is.maybe(is.class("User")))), nonEmpty: is.fun([], is.promise(is.bool)), hashPassword: is.fun(is.str, is.promise(is.str)), authenticate: is.fun( is.objVals(is.str), is.promise(is.or(is.class("User"), is.eq(false))) ), verifyWithToken: is.fun( is.obj({ email: is.str, verification_token: is.str }), is.promise(is.any) ), resetPasswordWithToken: is.fun( is.obj({ email: is.str, reset_password_token: is.str, password: is.str }), is.promise(is.any) ), create: is.fun( is.obj({ email: is.str }), is.promise(is.or(is.obj({ error: is.str }), is.class("User"))) ), get_roles: is.fun( [], is.promise(is.array(is.obj({ id: is.posint, role: is.str }))) ), }, }; module.exports = User;
let hist = Array() let hist_id = 0 let prev_command = "" ///// Firebase parameters ///// const database = firebase.database(); const provider = new firebase.auth.GoogleAuthProvider(); //provider.addScope('https://www.googleapis.com/auth/plus.login'); const userLogin = { name: "hackntu" } const emailregex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ /* new var and config [Start] */ let commands = []; // window.commands = commands; Vue.config.debug = true Vue.config.devtools = true /* new var and config [End] */ let Prompt = { template: ` <div :id="promptId" class="cmd"> <span id="p-h">{{ name }}@taipei</span> <span id="p-t"> {{ time }}</span>&nbsp; <span id="p-d" > {{ dir }} </span> <span id="p-s">$</span > <span id="p-text">{{ text }}</span > <template id="control" v-if="control"> <span id="_front" >{{front}}</span><span id="cursor">{{cursorText}}</span ><span id="_back">{{back}}</span > <input @keyup.stop.prevent="keyup($event)" type="text" id="command" v-model="input"></input> </template> </div > `, created() { this.time = new Date().toTimeString().substring(0, 5) console.log("Prompted.") }, data() { return { // hr: '', // min: '', dir: '~', time: '10:00', //debug input: '123456', //test cursorIndex: 0, } }, props: { control: Boolean, text: String, index: Number, }, watch: { cursorIndex() { if (this.cursorIndex > 0) this.cursorIndex = 0 if (-this.cursorIndex > this.input.length) this.cursorIndex = -this.input.length }, }, computed: { name: () => userLogin.name, promptId: () => 'prompt-' + this.index, front() { return ((this.cursorIndex < 0) ? this.input.slice(0, this.cursorIndex) : this.input) }, cursorText() { return ((this.cursorIndex < 0) ? this.input.substr((this.cursorIndex), 1) : ' ') }, back() { return ((this.cursorIndex < -1) ? this.input.slice(this.cursorIndex + 1) : '') }, }, methods: { moveCursor(dir) { if (dir === 'left') this.cursorIndex -= 1 if (dir === 'right') this.cursorIndex += 1 }, enter() { console.log("Enter here again") commands.push({ 'text': this.input }); // need content // if (this.input.length == 0) // return; this.$parent.run(this.input) this.input = '' //clean input this.cursorIndex = 0 }, keyup(e) { switch (e.which) { case 37: // Left this.moveCursor('left') break; case 39: // Right this.moveCursor('right') break; case 13: // Enter this.enter() break; default: break; } }, } } let Prompts = new Vue({ el: '#prompts', template: ` <div id="console"> <template v-for="(command, index) in commands"> <prompt :index="index + 1" :text="command.text"></prompt> </template> <prompt :index="0" :control="control"></prompt> </div> `, components: { Prompt, }, created() { // Blinks the cursor setInterval(function() { if ($('#cursor').css('background-color') == 'rgb(255, 255, 255)') { $('#cursor').css('background-color', 'transparent') } else { $('#cursor').css('background-color', 'white') } }, 500) $('#command').focus() $(document).keydown(function(e) { $('#command').focus(); }) }, data() { return { dir: '~', control: true, } }, computed: { name: () => userLogin.name, commands: () => commands, }, methods: { run(command) { this.control = false console.log("Get command:", command) for (let prop in law) { if (law.hasOwnProperty(prop) && law[prop].reg.test(command)) { law[prop].exec(command) return; } } this.done() }, done() { this.$nextTick(function() { this.control = true }) }, } }); /* function prompt(dir = '~') { let date = new Date() let hr = date.getHours().toString() if (date.getHours() < 10) hr = "0" + hr let min = date.getMinutes().toString() if (date.getMinutes() < 10) min = "0" + min $('#console').append('<div id="prompt" class="cmd"><span id="p-h">' + userLogin.name + '@taipei</span> <span id="p-t">' + hr + ':' + min + '</span>&nbsp;' + '<span id="p-d">' + dir + '</span> <span id="p-s">$</span> <span id="control">' + '<span id="_front"></span><span id="cursor"></span>' + '<input type="text" id="command"></input><span id="_back"></span></span></div>') $('#command').focus() console.log("Prompted.") } */ $(function() { // prompt() $("#greeting-typed-1").typed({ stringsElement: $('#greeting-1'), showCursor: false, typeSpeed: 10, callback: function() { $("#greeting-typed-2").typed({ stringsElement: $('#greeting-2'), showCursor: false, typeSpeed: 10, callback: function() { //prompt(); } }) } }); }); /* $(document).keyup(function(e) { let front = $('#_front').text() let back = $('#_back').text() if (e.which == 37) { // Left if (back.length > 0) { $('#_front').text(front.slice(0, -1)) $('#_back').text(front.slice(-1) + back) } } else if (e.which == 38) { // Up if (hist_id > 0) { $('#_front').text(hist[hist_id - 1]) $('#_back').text("") } if (hist_id == hist.length) { prev_command = front + back } hist_id = Math.max(hist_id - 1, 0); } else if (e.which == 39) { // Right if (back.length > 0) { $('#_front').text(front + back[0]) $('#_back').text(back.slice(1)) } } else if (e.which == 40) { // Down if (hist_id < hist.length - 1) { $('#_front').text(hist[hist_id + 1]) $('#_back').text("") } else { // Fill in previous command. $('#_front').text(prev_command) $('#_back').text("") } hist_id = Math.min(hist_id + 1, hist.length) } else if (e.which == 13) { // Enter console.log("Enter here again") let com = front + back // Remove old control & rename line id $('#control').remove() $('#prompt').append('<span>' + com + '</span>') $('#prompt').attr('id', 'line-' + hist_id) prev_command = "" if (com.length == 0) return; runcommand(com) hist.push(com) hist_id = hist.length } else if (e.which == 8) { // BackSpace $('#_front').text(front.slice(0, -1)) e.preventDefault(); } else { $('#_front').text(front + $('#command').val()) // console.log("Get input:", $('#command').val()) $('#command').val("") } }) */ /* $(document).keydown(function(e) { $('#command').focus(); }) // Blinks the cursor setInterval(function() { if ($('#cursor').css('background-color') == 'rgb(255, 255, 255)') { $('#cursor').css('background-color', 'transparent') } else { $('#cursor').css('background-color', 'white') } }, 500) */ var law = { bye: { reg: /^bye$/, exec: function() { if (confirm("Ready to say goodbye?")) { setInterval(function() { window.open('about:blank','_self'); }, 500) } doneCommand() } }, contact: { reg: /^contact$/, exec: function() { function loadUserMeta(meta, column, regex) { return new Promise((resolve, reject) => { $('#console').append('<div class="interactive cmd">' + column + ': <input type="text" id="meta" class="text"></input></div>') $('#meta').focus().keyup(function(e) { // Avoids enter been interpreted by document event handler. e.stopPropagation(); if (e.which == 13) { if (regex.test($('#meta').val())) { meta[column] = $('#meta').val() console.log("Load!!!!!", $('#meta').val()) resolve(meta) $('#meta').attr('id', ''); } else { $('#console').append('<div class="error cmd">Illegal input of ' + column + '</div>') reject("Illegal input") } } }) }) }; loadUserMeta({}, "name", /^.*$/).then(obj => { return loadUserMeta(obj, "email", emailregex) }).then(obj => { return loadUserMeta(obj, "quote", /^.*$/) }).then(obj => { // Done loading user data console.log(obj) database.ref().child('contact').push().set(obj); doneCommand() }).catch(error => { console.log(error) doneCommand() }) } }, sudo: { reg: /^sudo$/, exec: loginGoogle }, login: { reg: /^login$/, exec: loginGoogle }, cat: { reg: /^cat.*$/, exec: function(command) { ascii['cat'].forEach((line, idx, array) => { if (idx === 3) { let sentence = command.split(' ').slice(1).join(' ') $('#console').append('<div class="cmd">'+line+'&nbsp;&nbsp;&nbsp;&nbsp;Meow: "'+sentence+'"</div>') } else { $('#console').append('<div class="cmd">'+line+'</div>') } }) doneCommand() } }, dog: { reg: /^dog.*$/, exec: function(command) { let target = "<div class='cmd'><pre>" ascii['dog'].forEach((line, idx, array) => { target += line if (idx === 3) { target += '&nbsp;&nbsp;' + command.split(' ').slice(1).join(' ') } target += '\n' }) target += "</pre></div>" $('#console').append(target) doneCommand() } } } function enterSecret() { $("#console").append('<div class="sudo cmd">Enter password: ' + '<input type="password" id="password"></input></div>') $('#password').focus().keyup(function(e) { if (e.which == 13) { alert("Password:" + $('#password').val()) doneCommand() } }) } function loginGoogle() { firebase.auth().signInWithPopup(provider).then(function(result) { // This gives you a Google Access Token. You can use it to access the Google API. var token = result.credential.accessToken; // The signed-in user info. var user = result.user; // ... console.log("Login:", user) $('#console').append('<div class="cmd">Welcome, <span id="p-h">' + user.displayName + '</span></div>') userLogin.name = user.displayName userLogin.email = user.email doneCommand() }).catch(function(error) { // Handle Errors here. var errorCode = error.code; var errorMessage = error.message; // The email of the user's account used. var email = error.email; // The firebase.auth.AuthCredential type that was used. var credential = error.credential; // ... console.log(errorCode, errorMessage) $('#console').append('<div class="error cmd"><span id="p-d">Error! </span>' + errorMessage + '</div>') doneCommand() }); } function doneCommand() { // prompt() Prompts.done() } /* function runcommand(command) { console.log("Get command:", command) for (let prop in law) { if (law.hasOwnProperty(prop) && law[prop].reg.test(command)) { law[prop].exec(command) return; } } doneCommand() } */ var ascii = { cat: ["&nbsp;&nbsp;/\\ ___ /\\" ,"&nbsp;(&nbsp;&nbsp;o&nbsp;&nbsp;&nbsp;o&nbsp;&nbsp;) " ,"&nbsp;&nbsp;\\&nbsp;&nbsp;>#<&nbsp;&nbsp;/" ,"&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\ " ,"&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ " ,"|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;//" ,"&nbsp;\\&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;// " ,"&nbsp;&nbsp;///&nbsp;&nbsp;///&nbsp;&nbsp;--"], dog: [ " ,:'/ _... ", " // ( `\"\"-.._.' ", " \\| / 6\\___ /", " | 6 4 ", " | / \\", " \\_ .--' ", " (_\'---\'`) ", " / `\'---`() ", " ,\' | ", " , .\'` | ", " )\ _.-\' ; ", " / | .\'` _ / ", " /` / .\' '. , | ", " / / / \ ; | | ", " | \ | | .| | | ", " \ `\"| /.-\' | | | ", " '-..-\ _.;.._ | |.;-. ", " \ <`.._ )) | .;-. )) ", " (__. ` ))-\' \_ ))' ", " `\'--\"` jgs `\"\"\"` " ] };
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2019 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * Calculate the distance between two sets of coordinates (points). * * @function Phaser.Math.Distance.Between * @since 3.0.0 * * @param {number} x1 - The x coordinate of the first point. * @param {number} y1 - The y coordinate of the first point. * @param {number} x2 - The x coordinate of the second point. * @param {number} y2 - The y coordinate of the second point. * * @return {number} The distance between each point. */ var DistanceBetween = function (x1, y1, x2, y2) { var dx = x1 - x2; var dy = y1 - y2; return Math.sqrt(dx * dx + dy * dy); }; module.exports = DistanceBetween;
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Riccardo Malpica Galassi, Sapienza University, Roma, Italy """ import numpy as np from .ThermoKinetics import CanteraThermoKinetics class CanteraCSP(CanteraThermoKinetics): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.jacobiantype = 'full' self.rtol = 1.0e-2 self.atol = 1.0e-8 self._rhs = [] self._jac = [] self._evals = [] self._Revec = [] self._Levec = [] self._f = [] self._tau = [] self._nUpdates = 0 self._changed = False @property def jacobiantype(self): return self._jacobiantype @jacobiantype.setter def jacobiantype(self,value): if value == 'full': self.nv = self.n_species + 1 self._jacobiantype = value elif value == 'kinetic' or value == 'constrained': self.nv = self.n_species self._jacobiantype = value else: raise ValueError("Invalid jacobian type --> %s" %value) @property def rtol(self): return self._rtol @rtol.setter def rtol(self,value): self._rtol = value @property def atol(self): return self._atol @atol.setter def atol(self,value): self._atol = value @property def rhs(self): return self._rhs @property def jac(self): return self._jac @property def evals(self): return self._evals @property def Revec(self): return self._Revec @property def Levec(self): return self._Levec @property def f(self): return self._f @property def tau(self): return self._tau @property def nUpdates(self): return self._nUpdates def __setattr__(self, key, value): if key != '_changed': self._changed = True super().__setattr__(key, value) def is_changed(self): return self._changed def update_kernel(self): if self.jacobiantype == 'full': self._evals,self._Revec,self._Levec,self._f = self.kernel() elif self.jacobiantype == 'constrained': self._evals,self._Revec,self._Levec,self._f = self.kernel_constrained_jac() elif self.jacobiantype == 'kinetic': self._evals,self._Revec,self._Levec,self._f = self.kernel_kinetic_only() self._tau = timescales(self.evals) self._changed = False def get_kernel(self): """Retrieves the stored CSP kernel. If any attributes changed before latest query, kernel is recomputed""" if self.is_changed(): self.update_kernel() self._changed = False return [self.evals,self.Revec,self.Levec,self.f] def calc_exhausted_modes(self, **kwargs): """Computes number of exhausted modes (M). Optional arguments are rtol and atol for the calculation of M. If not provided, uses default or previously set values""" rtol = self.rtol atol = self.atol for key, value in kwargs.items(): if (key == 'rtol'): rtol = value elif (key == 'atol'): atol = value else: raise ValueError("unknown argument --> %s" %key) if self.is_changed(): self.update_kernel() self._changed = False M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol) return M def calc_TSR(self,**kwargs): """Computes number of exhausted modes (M) and the TSR. Optional arguments are rtol and atol for the calculation of M. If not provided, uses default or previously set values. The calculated value of M can be retrieved by passing the optional argument getM=True""" getM = False rtol = self.rtol atol = self.atol for key, value in kwargs.items(): if (key == 'rtol'): rtol = value elif (key == 'atol'): atol = value elif (key == 'getM'): getM = value else: raise ValueError("unknown argument --> %s" %key) if self.is_changed(): self.update_kernel() self._changed = False M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol) TSR, weights = findTSR(self.n_elements,self.rhs,self.evals,self.Revec,self.f,M) if getM: return [TSR, M] else: return TSR def calc_TSRindices(self,**kwargs): """Computes number of exhausted modes (M), the TSR and its indices. Optional argument is type, which can be timescale or amplitude. Default value is amplitude. Other optional arguments are rtol and atol for the calculation of M. If not provided, uses default or previously set values. The calculated value of M can be retrieved by passing the optional argument getM=True""" getM = False useTPI = False rtol = self.rtol atol = self.atol for key, value in kwargs.items(): if (key == 'rtol'): rtol = value elif (key == 'atol'): atol = value elif (key == 'getM'): getM = value elif (key == 'type'): if(value == 'timescale'): useTPI = True elif(value != 'amplitude'): raise ValueError("unknown type --> %s" %value) else: raise ValueError("unknown argument --> %s" %key) if self.is_changed(): self.update_kernel() self._changed = False Smat = self.generalized_Stoich_matrix rvec = self.R_vector M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol) TSR, weights = findTSR(self.n_elements,self.rhs,self.evals,self.Revec,self.f,M) TSRidx = TSRindices(weights, self.evals) if (useTPI): JacK = self.jac_contribution() CSPidx = CSP_timescale_participation_indices(self.n_reactions, JacK, self.evals, self.Revec, self.Levec) else: CSPidx = CSP_amplitude_participation_indices(self.Levec, Smat, rvec) TSRind = TSR_participation_indices(TSRidx, CSPidx) if getM: return TSR, TSRind, M else: return TSR, TSRind def calc_CSPindices(self,**kwargs): """Computes number of exhausted modes (M) and the CSP Indices. Optional arguments are rtol and atol for the calculation of M. If not provided, uses default or previously set values. The calculated value of M can be retrieved by passing the optional argument getM=True""" getM = False getAPI = False getImpo = False getspeciestype = False getTPI = False API = None Ifast = None Islow = None species_type = None TPI = None rtol = self.rtol atol = self.atol for key, value in kwargs.items(): if (key == 'rtol'): rtol = value elif (key == 'atol'): atol = value elif (key == 'getM'): getM = value elif (key == 'API'): getAPI = value elif (key == 'Impo'): getImpo = value elif (key == 'species_type'): getspeciestype = value elif (key == 'TPI'): getTPI = value else: raise ValueError("unknown argument --> %s" %key) if self.is_changed(): self.update_kernel() self._changed = False M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol) Smat = self.generalized_Stoich_matrix rvec = self.R_vector if getAPI: API = CSP_amplitude_participation_indices(self.Levec, Smat, rvec) if getImpo: Ifast,Islow = CSP_importance_indices(self.Revec,self.Levec,M,Smat,rvec) if getspeciestype: pointers = CSP_pointers(self.Revec,self.Levec) species_type = classify_species(self.stateYT(), self.rhs, pointers, M) if getTPI: JacK = self.jac_contribution() TPI = CSP_timescale_participation_indices(self.n_reactions, JacK, self.evals, self.Revec, self.Levec) if getM: return [API, TPI, Ifast, Islow, species_type, M] else: return [API, TPI, Ifast, Islow, species_type] def calc_extended_TSR(self,**kwargs): """Computes number of Extended exhausted modes (Mext) and the extended TSR. Caller must provide either a diffusion rhs with the keywork rhs_diffYT or a convection rhs with the keywork rhs_convYT, or both. Optional arguments are rtol and atol for the calculation of Mext. If not provided, uses default or previously set values. The calculated value of Mext can be retrieved by passing the optional argument getMext=True""" if self.is_changed(): self.update_kernel() self._changed = False nv=len(self.Revec) getMext = False rtol = self.rtol atol = self.atol rhs_convYT = np.zeros(nv) rhs_diffYT = np.zeros(nv) for key, value in kwargs.items(): if (key == 'rtol'): rtol = value elif (key == 'atol'): atol = value elif (key == 'getMext'): getMext = value elif (key == 'conv'): rhs_convYT = value elif (key == 'diff'): rhs_diffYT = value else: raise ValueError("unknown argument --> %s" %key) if(len(rhs_convYT)!=nv): raise ValueError("Check dimension of Convection rhs. Should be %d", nv) if(len(rhs_diffYT)!=nv): raise ValueError("Check dimension of Diffusion rhs. Should be %d", nv) Smat = self.generalized_Stoich_matrix rvec = self.R_vector rhs_ext, h, Smat_ext, rvec_ext = add_transport(self.rhs,self.Levec,Smat,rvec,rhs_convYT,rhs_diffYT) Mext = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,h,rtol,atol) TSR_ext, weights_ext = findTSR(self.n_elements,rhs_ext,self.evals,self.Revec,h,Mext) if getMext: return [TSR_ext, Mext] else: return TSR_ext def calc_extended_TSRindices(self,**kwargs): """Computes number of Extended exhausted modes (Mext), the extended TSR and its indices. Caller must provide either a diffusion rhs with the keywork rhs_diffYT or a convection rhs with the keywork rhs_convYT, or both. Other optional arguments are rtol and atol for the calculation of Mext. If not provided, uses default or previously set values. The calculated value of Mext can be retrieved by passing the optional argument getMext=True""" if self.is_changed(): self.update_kernel() self._changed = False getMext = False nv=len(self.Revec) rtol = self.rtol atol = self.atol rhs_convYT = np.zeros(nv) rhs_diffYT = np.zeros(nv) for key, value in kwargs.items(): if (key == 'rtol'): rtol = value elif (key == 'atol'): atol = value elif (key == 'getMext'): getMext = value elif (key == 'conv'): rhs_convYT = value elif (key == 'diff'): rhs_diffYT = value else: raise ValueError("unknown argument --> %s" %key) if(len(rhs_convYT)!=nv): raise ValueError("Check dimension of Convection rhs. Should be %d", nv) if(len(rhs_diffYT)!=nv): raise ValueError("Check dimension of Diffusion rhs. Should be %d", nv) Smat = self.generalized_Stoich_matrix rvec = self.R_vector rhs_ext, h, Smat_ext, rvec_ext = add_transport(self.rhs,self.Levec,Smat,rvec,rhs_convYT,rhs_diffYT) Mext = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,h,rtol,atol) TSR_ext, weights_ext = findTSR(self.n_elements,rhs_ext,self.evals,self.Revec,h,Mext) TSRidx = TSRindices(weights_ext, self.evals) CSPidx = CSP_amplitude_participation_indices(self.Levec, Smat_ext, rvec_ext) TSRind_ext = TSR_participation_indices(TSRidx, CSPidx) if getMext: return TSR_ext, TSRind_ext, Mext else: return TSR_ext, TSRind_ext """ ~~~~~~~~~~~~ KERNEL ~~~~~~~~~~~~~ """ def kernel(self): """Computes CSP kernel. Its dimension is Nspecies + 1. Returns [evals,Revec,Levec,amplitudes]. Input must be an instance of the CSPCantera class""" #self.nv = self.n_species + 1 self._rhs = self.source.copy() self._jac = self.jacobian.copy() #eigensystem evals,Revec,Levec = eigsys(self.jac) self.clean_conserved(evals) f = np.matmul(Levec,self.rhs) self._nUpdates = self._nUpdates + 1 #rotate eigenvectors such that amplitudes are positive Revec,Levec,f = evec_pos_ampl(Revec,Levec,f) return[evals,Revec,Levec,f] def kernel_kinetic_only(self): """Computes kinetic kernel. Its dimension is Nspecies. Returns [evals,Revec,Levec,amplitudes]. Input must be an instance of the CSPCantera class""" #self.nv = self.n_species self._rhs = self.source.copy()[:self.nv] self._jac = self.jacKinetic().copy() #eigensystem evals,Revec,Levec = eigsys(self.jac) self.clean_conserved(evals) f = np.matmul(Levec,self.rhs) self._nUpdates = self._nUpdates + 1 #rotate eigenvectors such that amplitudes are positive Revec,Levec,f = evec_pos_ampl(Revec,Levec,f) return[evals,Revec,Levec,f] def kernel_constrained_jac(self): """Computes constrained (to enthalpy) kernel. Its dimension is Nspecies . Returns [evals,Revec,Levec,amplitudes]. Input must be an instance of the CSPCantera class""" #self.nv = self.n_species self._rhs = self.source.copy()[:self.nv] kineticjac = self.jacKinetic() thermaljac = self.jacThermal() self._jac = kineticjac - thermaljac #eigensystem evals,Revec,Levec = eigsys(self.jac) self.clean_conserved(evals) f = np.matmul(Levec,self.rhs) self._nUpdates = self._nUpdates + 1 #rotate eigenvectors such that amplitudes are positive Revec,Levec,f = evec_pos_ampl(Revec,Levec,f) return[evals,Revec,Levec,f] def clean_conserved(self,evals): """Zero-out conserved modes eigenvalues""" i = self.nv-self.n_elements evals[i:] = 0.0 """ ~~~~~~~~~~~~ EXHAUSTED MODES ~~~~~~~~~~~~~ """ def findM(n_elements,stateYT,evals,Revec,tau,f,rtol,atol): nv = len(Revec) nEl = n_elements #nconjpairs = sum(1 for x in self.eval.imag if x != 0)/2 imPart = evals.imag!=0 nModes = nv - nEl #removing conserved modes ewt = setEwt(stateYT,rtol,atol) delw = np.zeros(nv) for j in range(nModes-1): #loop over eligible modes (last excluded) taujp1 = tau[j+1] #timescale of next (slower) mode Aj = Revec[j] #this mode right evec fj = f[j] #this mode amplitued lamj = evals[j].real #this mode eigenvalue (real part) for i in range(nv): Aji = Aj[i] #i-th component of this mode Revec delw[i] = delw[i] + modeContribution(Aji,fj,taujp1,lamj) #contribution of j-th mode to i-th var if np.abs(delw[i]) > ewt[i]: if j==0: M = 0 else: M = j-1 if (imPart[j] and imPart[j-1] and evals[j].real==evals[j-1].real) else j #if j is the second of a pair, move back by 2 return M #print("All modes are exhausted") M = nModes - 1 #if criterion is never verified, all modes are exhausted. Leave 1 active mode. return M def setEwt(y,rtol,atol): ewt = [rtol * absy + atol if absy >= 1.0e-6 else absy + atol for absy in np.absolute(y)] return ewt def modeContribution(a,f,tau,lam): delwMi = a*f*(np.exp(tau*lam) - 1)/lam if lam != 0.0 else 0.0 return delwMi """ ~~~~~~~~~~~~~~ TSR ~~~~~~~~~~~~~~~~ """ def findTSR(n_elements,rhs,evals,Revec,f,M): n = len(Revec) nEl = n_elements #deal with amplitudes of cmplx conjugates fvec = f.copy() imPart = evals.imag!=0 for i in range(1,n): if (imPart[i] and imPart[i-1] and evals[i].real==evals[i-1].real): fvec[i] = np.sqrt(fvec[i]**2 + fvec[i-1]**2) fvec[i-1] = fvec[i] fnorm = fvec / np.linalg.norm(rhs) #deal with zero-eigenvalues (if any) fvec[evals==0.0] = 0.0 weights = fnorm**2 weights[0:M] = 0.0 #excluding fast modes weights[n-nEl:n] = 0.0 #excluding conserved modes normw = np.sum(weights) weights = weights / normw if normw > 0 else np.zeros(n) TSR = np.sum([weights[i] * np.sign(evals[i].real) * np.abs(evals[i]) for i in range(n)]) return [TSR, weights] def TSRindices(weights, evals): """Ns array containing participation index of mode i to TSR""" n = len(weights) Index = np.zeros((n)) norm = np.sum([weights[i] * np.abs(evals[i]) for i in range(n)]) for i in range(n): Index[i] = weights[i] * np.abs(evals[i]) Index[i] = Index[i]/norm if norm > 1e-10 else 0.0 return Index def TSR_participation_indices(TSRidx, CSPidx): """2Nr array containing participation index of reaction k to TSR""" Index = np.matmul(np.transpose(CSPidx),np.abs(TSRidx)) norm = np.sum(np.abs(Index)) Index = Index/norm if norm > 0 else Index*0.0 return Index """ ~~~~~~~~~~~~ EIGEN FUNC ~~~~~~~~~~~~~ """ def eigsys(jac): """Returns eigensystem (evals, Revec, Levec). Input must be a 2D array. Both Revec (since it is transposed) and Levec (naturally) contain row vectors, such that an eigenvector can be retrieved using R/Levec[index,:] """ #ncons = len(jac) - np.linalg.matrix_rank(jac) evals, Revec = np.linalg.eig(jac) #sort idx = np.argsort(abs(evals))[::-1] evals = evals[idx] Revec = Revec[:,idx] #zero-out conserved eigenvalues (last ncons) #evals[-ncons:] = 0.0 #adjust complex conjugates cmplx = Revec.imag.any(axis=0) #boolean indexing of complex eigenvectors (cols) icmplx = np.flatnonzero(cmplx) #indexes of complex eigenvectors for i in icmplx[::2]: re = (Revec[:,i]+Revec[:,i+1])/2.0 im = (Revec[:,i]-Revec[:,i+1])/(2.0j) Revec[:,i] = re Revec[:,i+1] = im Revec = Revec.real #no need to carry imaginary part anymore #compute left eigenvectors, amplitudes try: Levec = np.linalg.inv(Revec) except: print('Warning: looks like the R martrix is singular (rank[R] = %i).' %np.linalg.matrix_rank(Revec)) print(' Kernel is zeroed-out.') return[np.zeros(len(jac)),np.zeros((len(jac),len(jac))),np.zeros((len(jac),len(jac)))] #transpose Revec Revec = np.transpose(Revec) return[evals,Revec,Levec] def evec_pos_ampl(Revec,Levec,f): """changes sign to eigenvectors based on sign of corresponding mode amplitude.""" idx = np.flatnonzero(f < 0) Revec[idx,:] = - Revec[idx,:] Levec[idx,:] = - Levec[idx,:] f[idx] = -f[idx] return[Revec,Levec,f] def timescales(evals): tau = [1.0/abslam if abslam > 0 else 1e+20 for abslam in np.absolute(evals)] return np.array(tau) """ ~~~~~~~~~~~~ INDEXES FUNC ~~~~~~~~~~~~~ """ def CSPIndices(Proj, Smat, rvec): """Returns a Nv x 2Nr matrix of indexes, computed as Proj S r """ ns = Smat.shape[0] nr = Smat.shape[1] Index = np.zeros((ns,nr)) for i in range(ns): Proj_i = Proj[i,:] Index[i,:] = CSPIndices_one_var(Proj_i, Smat, rvec) #np.sum(abs(Index),axis=1) check: a n-long array of ones return Index def CSPIndices_one_var(Proj_i, Smat, rvec): """Given the i-th row of the projector, computes 2Nr indexes of reactions to variable i. Proj_i must be a nv-long array. Returns a 2Nr-long array""" nr = Smat.shape[1] PS = np.matmul(Proj_i,Smat) Index = np.multiply(PS,rvec) norm = np.sum(abs(Index)) if norm != 0.0: Index = Index/norm else: Index = np.zeros((nr)) #np.sum(abs(Index),axis=1) check: a n-long array of ones return Index def CSP_amplitude_participation_indices(B, Smat, rvec): """Ns x 2Nr array containing participation index of reaction k to variable i""" API = CSPIndices(B, Smat, rvec) return API def CSP_importance_indices(A,B,M,Smat,rvec): """Ns x 2Nr array containing fast/slow importance index of reaction k to variable i""" fastProj = np.matmul(np.transpose(A[0:M]),B[0:M]) Ifast = CSPIndices(fastProj, Smat, rvec) slowProj = np.matmul(np.transpose(A[M:]),B[M:]) Islow = CSPIndices(slowProj, Smat, rvec) return [Ifast,Islow] def CSP_pointers(A,B): nv = A.shape[0] pointers = np.array([[np.transpose(A)[spec,mode]*B[mode,spec] for spec in range(nv)] for mode in range(nv)]) return pointers def classify_species(stateYT, rhs, pointers, M): """species classification """ n = len(stateYT) ytol = 1e-20 rhstol = 1e-13 sort = np.absolute(np.sum(pointers[:,:M],axis=1)).argsort()[::-1] species_type = np.full(n,'slow',dtype=object) species_type[sort[0:M]] = 'fast' species_type[-1] = 'slow' #temperature is always slow for i in range(n-1): if (stateYT[i] < ytol and abs(rhs[i]) < rhstol): species_type[i] = 'trace' return species_type def CSP_participation_to_one_timescale(i, nr, JacK, evals, A, B): imPart = evals.imag!=0 if(imPart[i] and imPart[i-1] and evals[i].real==evals[i-1].real): i = i-1 #if the second of a complex pair, shift back the index by 1 Index = np.zeros(2*nr) norm = 0.0 if(imPart[i]): for k in range(2*nr): Index[k] = 0.5 * ( np.matmul(np.matmul(B[i],JacK[k]),np.transpose(A)[:,i]) - np.matmul(np.matmul(B[i+1],JacK[k]),np.transpose(A)[:,i+1])) norm = norm + abs(Index[k]) else: for k in range(2*nr): Index[k] = np.matmul(np.matmul(B[i],JacK[k]),np.transpose(A)[:,i]) norm = norm + abs(Index[k]) for k in range(2*nr): Index[k] = Index[k]/norm if (norm != 0.0) else 0.0 return Index def CSP_timescale_participation_indices(nr, JacK, evals, A, B): """Ns x 2Nr array containing TPI of reaction k to variable i""" nv = A.shape[0] TPI = np.zeros((nv,2*nr)) for i in range(nv): TPI[i] = CSP_participation_to_one_timescale(i, nr, JacK, evals, A, B) return TPI def CSPtiming(gas): import time ns = gas.n_species randY = np.random.dirichlet(np.ones(ns),size=1) gas.TP = 1000,101325.0 gas.Y = randY gas.constP = 101325.0 gas.jacobiantype='full' gas.rtol=1.0e-3 gas.atol=1.0e-10 starttime = time.time() gas.update_kernel() endtime = time.time() timekernel = endtime - starttime starttime = time.time() M = gas.calc_exhausted_modes() endtime = time.time() timeM = endtime - starttime starttime = time.time() TSR = gas.calc_TSR() endtime = time.time() timeTSR = endtime - starttime starttime = time.time() api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=True,Impo=False,species_type=False,TPI=False) endtime = time.time() timeAPI = endtime - starttime starttime = time.time() api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=False,Impo=True,species_type=False,TPI=False) endtime = time.time() timeImpo = endtime - starttime starttime = time.time() api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=False,Impo=False,species_type=True,TPI=False) endtime = time.time() timeclassify = endtime - starttime starttime = time.time() api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=False,Impo=False,species_type=False,TPI=True) endtime = time.time() timeTPI = endtime - starttime print ('Time Kernel: %10.3e' %timekernel) print ('Time findM: %10.3e' %timeM) print ('Time TSR: %10.3e' %timeTSR) print ('Time API indexes: %10.3e' %timeAPI) print ('Time Imp indexes: %10.3e' %timeImpo) print ('Time TPI indexes: %10.3e' %timeTPI) print ('Time class specs: %10.3e' %timeclassify) print ('*** all times in seconds') """ ~~~~~~~~~~~ EXTENDED FUNC ~~~~~~~~~~~~ """ def add_transport(rhs,Levec,Smat,rvec,rhs_convYT,rhs_diffYT): nv=len(Levec) nr=Smat.shape[1] rhs_ext = rhs + rhs_convYT + rhs_diffYT h = np.matmul(Levec,rhs_ext) Smat_ext = np.zeros((nv,nr+2*nv)) Smat_ext[:,0:nr] = Smat Smat_ext[:,nr:nr+nv] = np.eye(nv) Smat_ext[:,nr+nv:nr+2*nv] = np.eye(nv) rvec_ext = np.zeros((nr+2*nv)) rvec_ext[0:nr] = rvec rvec_ext[nr:nr+nv] = rhs_convYT rvec_ext[nr+nv:nr+2*nv] = rhs_diffYT #splitrhs_ext = np.dot(Smat_ext,rvec_ext) #checksplitrhs = np.isclose(rhs_ext, splitrhs_ext, rtol=1e-6, atol=0, equal_nan=False) #if(np.any(checksplitrhs == False)): # raise ValueError('Mismatch between numerical extended RHS and S.r') return rhs_ext, h, Smat_ext, rvec_ext
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tf = require("@tensorflow/tfjs-core"); var common_1 = require("../common"); function boxPredictionLayer(x, params) { return tf.tidy(function () { var batchSize = x.shape[0]; var boxPredictionEncoding = tf.reshape(common_1.convLayer(x, params.box_encoding_predictor), [batchSize, -1, 1, 4]); var classPrediction = tf.reshape(common_1.convLayer(x, params.class_predictor), [batchSize, -1, 3]); return { boxPredictionEncoding: boxPredictionEncoding, classPrediction: classPrediction }; }); } exports.boxPredictionLayer = boxPredictionLayer; //# sourceMappingURL=boxPredictionLayer.js.map
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.nipplejs=e()}}(function(){function e(){}function t(e,i){return this.identifier=i.identifier,this.position=i.position,this.frontPosition=dataoptions.frontPosition,this.collection=e,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,restJoystick:!0,restOpacity:.5,mode:"dynamic",zone:document.body,lockX:!1,lockY:!1},this.config(i),"dynamic"===this.options.mode&&(this.options.restOpacity=0),this.id=t.id,t.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}function i(e,t){var n=this;return n.nipples=[],n.idles=[],n.actives=[],n.ids=[],n.pressureIntervals={},n.manager=e,n.id=i.id,i.id+=1,n.defaults={zzz:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1},n.config(t),"static"!==n.options.mode&&"semi"!==n.options.mode||(n.options.multitouch=!1),n.options.multitouch||(n.options.maxNumberOfNipples=1),n.updateBox(),n.prepareNipples(),n.bindings(),n.begin(),n.nipples}function n(e){var t=this;t.ids={},t.index=0,t.collections=[],t.config(e),t.prepareCollections();var i;return c.bindEvt(window,"resize",function(e){clearTimeout(i),i=setTimeout(function(){var e,i=c.getScroll();t.collections.forEach(function(t){t.forEach(function(t){e=t.el.getBoundingClientRect(),t.position={x:i.x+e.left,y:i.y+e.top}})})},100)}),t.collections}var o,r=!!("ontouchstart"in window),s=!!window.PointerEvent,d=!!window.MSPointerEvent,a={touch:{start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"},MSPointer:{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}},p={};s?o=a.pointer:d?o=a.MSPointer:r?(o=a.touch,p=a.mouse):o=a.mouse;var c={};c.distance=function(e,t){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},c.angle=function(e,t){var i=t.x-e.x,n=t.y-e.y;return c.degrees(Math.atan2(n,i))},c.findCoord=function(e,t,i){var n={x:0,y:0};return i=c.radians(i),n.x=e.x-t*Math.cos(i),n.y=e.y-t*Math.sin(i),n},c.radians=function(e){return e*(Math.PI/180)},c.degrees=function(e){return e*(180/Math.PI)},c.bindEvt=function(e,t,i){for(var n,o=t.split(/[ ,]+/g),r=0;r<o.length;r+=1)n=o[r],e.addEventListener?e.addEventListener(n,i,!1):e.attachEvent&&e.attachEvent(n,i)},c.unbindEvt=function(e,t,i){for(var n,o=t.split(/[ ,]+/g),r=0;r<o.length;r+=1)n=o[r],e.removeEventListener?e.removeEventListener(n,i):e.detachEvent&&e.detachEvent(n,i)},c.trigger=function(e,t,i){var n=new CustomEvent(t,i);e.dispatchEvent(n)},c.prepareEvent=function(e){return e.preventDefault(),e.type.match(/^touch/)?e.changedTouches:e},c.getScroll=function(){return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},c.applyPosition=function(e,t){t.top||t.right||t.bottom||t.left?(e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left):(e.style.left=t.x+"px",e.style.top=t.y+"px")},c.getTransitionStyle=function(e,t,i){var n=c.configStylePropertyObject(e);for(var o in n)if(n.hasOwnProperty(o))if("string"==typeof t)n[o]=t+" "+i;else{for(var r="",s=0,d=t.length;s<d;s+=1)r+=t[s]+" "+i+", ";n[o]=r.slice(0,-2)}return n},c.getVendorStyle=function(e,t){var i=c.configStylePropertyObject(e);for(var n in i)i.hasOwnProperty(n)&&(i[n]=t);return i},c.configStylePropertyObject=function(e){var t={};return t[e]="",["webkit","Moz","o"].forEach(function(i){t[i+e.charAt(0).toUpperCase()+e.slice(1)]=""}),t},c.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},c.safeExtend=function(e,t){var i={};for(var n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)?i[n]=t[n]:e.hasOwnProperty(n)&&(i[n]=e[n]);return i},c.map=function(e,t){if(e.length)for(var i=0,n=e.length;i<n;i+=1)t(e[i]);else t(e)},e.prototype.on=function(e,t){var i,n=this,o=e.split(/[ ,]+/g);n._handlers_=n._handlers_||{};for(var r=0;r<o.length;r+=1)i=o[r],n._handlers_[i]=n._handlers_[i]||[],n._handlers_[i].push(t);return n},e.prototype.off=function(e,t){var i=this;return i._handlers_=i._handlers_||{},void 0===e?i._handlers_={}:void 0===t?i._handlers_[e]=null:i._handlers_[e]&&i._handlers_[e].indexOf(t)>=0&&i._handlers_[e].splice(i._handlers_[e].indexOf(t),1),i},e.prototype.trigger=function(e,t){var i,n=this,o=e.split(/[ ,]+/g);n._handlers_=n._handlers_||{};for(var r=0;r<o.length;r+=1)i=o[r],n._handlers_[i]&&n._handlers_[i].length&&n._handlers_[i].forEach(function(e){e.call(n,{type:i,target:n},t)})},e.prototype.config=function(e){var t=this;t.options=t.defaults||{},e&&(t.options=c.safeExtend(t.options,e))},e.prototype.bindEvt=function(e,t){var i=this;return i._domHandlers_=i._domHandlers_||{},i._domHandlers_[t]=function(){"function"==typeof i["on"+t]?i["on"+t].apply(i,arguments):console.warn('[WARNING] : Missing "on'+t+'" handler.')},c.bindEvt(e,o[t],i._domHandlers_[t]),p[t]&&c.bindEvt(e,p[t],i._domHandlers_[t]),i},e.prototype.unbindEvt=function(e,t){var i=this;return i._domHandlers_=i._domHandlers_||{},c.unbindEvt(e,o[t],i._domHandlers_[t]),p[t]&&c.unbindEvt(e,p[t],i._domHandlers_[t]),delete i._domHandlers_[t],this},t.prototype=new e,t.constructor=t,t.id=0,t.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off()},t.prototype.restPosition=function(e){var t=this;t.frontPosition={x:0,y:0};var i=t.options.fadeTime+"ms",n={};n.front=c.getTransitionStyle("transition",["top","left"],i);var o={front:{}};o.front={left:t.frontPosition.x+"px",top:t.frontPosition.y+"px"},t.applyStyles(n),t.applyStyles(o),t.restTimeout=setTimeout(function(){"function"==typeof e&&e.call(t),t.restCallback()},t.options.fadeTime)},t.prototype.restCallback=function(){var e=this,t={};t.front=c.getTransitionStyle("transition","none",""),e.applyStyles(t),e.trigger("rested",e.instance)},t.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}},t.prototype.computeDirection=function(e){var t,i,n,o=e.angle.radian,r=Math.PI/4,s=Math.PI/2;if(o>r&&o<3*r&&!e.lockX?t="up":o>-r&&o<=r&&!e.lockY?t="left":o>3*-r&&o<=-r&&!e.lockX?t="down":e.lockY||(t="right"),e.lockY||(i=o>-s&&o<s?"left":"right"),e.lockX||(n=o>0?"up":"down"),e.force>this.options.threshold){var d={};for(var a in this.direction)this.direction.hasOwnProperty(a)&&(d[a]=this.direction[a]);var p={};this.direction={x:i,y:n,angle:t},e.direction=this.direction;for(var a in d)d[a]===this.direction[a]&&(p[a]=!0);if(p.x&&p.y&&p.angle)return e;p.x&&p.y||this.trigger("plain",e),p.x||this.trigger("plain:"+i,e),p.y||this.trigger("plain:"+n,e),p.angle||this.trigger("dir dir:"+t,e)}return e},i.prototype=new e,i.constructor=i,i.id=0,i.prototype.prepareNipples=function(){var e=this,t=e.nipples;t.on=e.on.bind(e),t.off=e.off.bind(e),t.options=e.options,t.destroy=e.destroy.bind(e),t.ids=e.ids,t.id=e.id,t.processOnMove=e.processOnMove.bind(e),t.processOnEnd=e.processOnEnd.bind(e),t.get=function(e){if(void 0===e)return t[0];for(var i=0,n=t.length;i<n;i+=1)if(t[i].identifier===e)return t[i];return!1}},i.prototype.bindings=function(){var e=this;e.bindEvt(e.options.zone,"start"),e.options.zone.style.touchAction="none",e.options.zone.style.msTouchAction="none"},i.prototype.begin=function(){var e=this,t=e.options;if("static"===t.mode){var i=e.createNipple(t.position,e.manager.getIdentifier());i.add(),e.idles.push(i)}},i.prototype.createNipple=function(e,i){var n=this,o=c.getScroll(),r=n.options;if(e.x&&e.y)({x:e.x-(o.x+n.box.left),y:e.y-(o.y+n.box.top)});else if(e.top||e.right||e.bottom||e.left){var s=document.createElement("DIV");s.style.display="hidden",s.style.top=e.top,s.style.right=e.right,s.style.bottom=e.bottom,s.style.left=e.left,s.style.position="absolute",r.zone.appendChild(s);var d=s.getBoundingClientRect();r.zone.removeChild(s),e,e={x:d.left+o.x,y:d.top+o.y}}var a=new t(n,{color:r.color,size:r.size,threshold:r.threshold,fadeTime:r.fadeTime,restJoystick:r.restJoystick,restOpacity:r.restOpacity,mode:r.mode,identifier:i,position:e,zone:r.zone,frontPosition:{x:0,y:0}});return n.nipples.push(a),n.trigger("added "+a.identifier+":added",a),n.manager.trigger("added "+a.identifier+":added",a),n.bindNipple(a),a},i.prototype.updateBox=function(){var e=this;e.box=e.options.zone.getBoundingClientRect()},i.prototype.bindNipple=function(e){var t,i=this,n=function(e,n){t=e.type+" "+n.id+":"+e.type,i.trigger(t,n)};e.on("destroyed",i.onDestroyed.bind(i)),e.on("shown hidden rested dir plain",n),e.on("dir:up dir:right dir:down dir:left",n),e.on("plain:up plain:right plain:down plain:left",n)},i.prototype.pressureFn=function(e,t,i){var n=this,o=0;clearInterval(n.pressureIntervals[i]),n.pressureIntervals[i]=setInterval(function(){var i=e.force||e.pressure||e.webkitForce||0;i!==o&&(t.trigger("pressure",i),n.trigger("pressure "+t.identifier+":pressure",i),o=i)}.bind(n),100)},i.prototype.onstart=function(e){var t=this,i=t.options;e=c.prepareEvent(e),t.updateBox();var n=function(e){t.actives.length<i.maxNumberOfNipples&&t.processOnStart(e)};return c.map(e,n),t.manager.bindDocument(),!1},i.prototype.processOnStart=function(e){var t,i=this,n=i.options,o=i.manager.getIdentifier(e),r=e.force||e.pressure||e.webkitForce||0,s={x:e.pageX,y:e.pageY},d=i.getOrCreate(o,s);d.identifier!==o&&i.manager.removeIdentifier(d.identifier),d.identifier=o;var a=function(t){t.trigger("start",t),i.trigger("start "+t.id+":start",t),t.show(),r>0&&i.pressureFn(e,t,t.identifier),i.processOnMove(e)};if((t=i.idles.indexOf(d))>=0&&i.idles.splice(t,1),i.actives.push(d),i.ids.push(d.identifier),"semi"!==n.mode)a(d);else{if(!(c.distance(s,d.position)<=n.catchDistance))return d.destroy(),void i.processOnStart(e);a(d)}return d},i.prototype.getOrCreate=function(e,t){var i,n=this,o=n.options;return/(semi|static)/.test(o.mode)?(i=n.idles[0])?(n.idles.splice(0,1),i):"semi"===o.mode?n.createNipple(t,e):(console.warn("Coudln't find the needed nipple."),!1):i=n.createNipple(t,e)},i.prototype.processOnMove=function(e){var t=this,i=t.options,n=t.manager.getIdentifier(e),o=t.nipples.get(n);if(!o)return console.error("Found zombie joystick with ID "+n),void t.manager.removeIdentifier(n);o.identifier=n;var r=o.options.size/2,s={x:e.pageX,y:e.pageY},d=c.distance(s,o.position),a=c.angle(s,o.position),p=c.radians(a),l=d/r;d>r&&(d=r,s=c.findCoord(o.position,d,a));var f=s.x-o.position.x,u=s.y-o.position.y;i.lockX&&(u=0),i.lockY&&(f=0),o.frontPosition={x:f,y:u};var h={identifier:o.identifier,position:s,force:l,pressure:e.force||e.pressure||e.webkitForce||0,distance:d,angle:{radian:p,degree:a},instance:o,lockX:i.lockX,lockY:i.lockY};h=o.computeDirection(h),h.angle={radian:c.radians(180-a),degree:180-a},o.trigger("move",h),t.trigger("move "+o.id+":move",h)},i.prototype.processOnEnd=function(e){var t=this,i=t.options,n=t.manager.getIdentifier(e),o=t.nipples.get(n),r=t.manager.removeIdentifier(o.identifier);o&&(clearInterval(t.pressureIntervals[o.identifier]),o.resetDirection(),o.trigger("end",o),t.trigger("end "+o.id+":end",o),t.ids.indexOf(o.identifier)>=0&&t.ids.splice(t.ids.indexOf(o.identifier),1),t.actives.indexOf(o)>=0&&t.actives.splice(t.actives.indexOf(o),1),/(semi|static)/.test(i.mode)?t.idles.push(o):t.nipples.indexOf(o)>=0&&t.nipples.splice(t.nipples.indexOf(o),1),t.manager.unbindDocument(),/(semi|static)/.test(i.mode)&&(t.manager.ids[r.id]=r.identifier))},i.prototype.onDestroyed=function(e,t){var i=this;i.nipples.indexOf(t)>=0&&i.nipples.splice(i.nipples.indexOf(t),1),i.actives.indexOf(t)>=0&&i.actives.splice(i.actives.indexOf(t),1),i.idles.indexOf(t)>=0&&i.idles.splice(i.idles.indexOf(t),1),i.ids.indexOf(t.identifier)>=0&&i.ids.splice(i.ids.indexOf(t.identifier),1),i.manager.removeIdentifier(t.identifier),i.manager.unbindDocument()},i.prototype.destroy=function(){var e=this;e.unbindEvt(e.options.zone,"start"),e.nipples.forEach(function(e){e.destroy()});for(var t in e.pressureIntervals)e.pressureIntervals.hasOwnProperty(t)&&clearInterval(e.pressureIntervals[t]);e.trigger("destroyed",e.nipples),e.manager.unbindDocument(),e.off()},n.prototype=new e,n.constructor=n,n.prototype.prepareCollections=function(){var e=this;e.collections.create=e.create.bind(e),e.collections.on=e.on.bind(e),e.collections.off=e.off.bind(e),e.collections.destroy=e.destroy.bind(e),e.collections.get=function(t){var i;return e.collections.every(function(e){return!(i=e.get(t))}),i}},n.prototype.create=function(e){return this.createCollection(e)},n.prototype.createCollection=function(e){var t=this,n=new i(t,e);return t.bindCollection(n),t.collections.push(n),n},n.prototype.bindCollection=function(e){var t,i=this,n=function(e,n){t=e.type+" "+n.id+":"+e.type,i.trigger(t,n)};e.on("destroyed",i.onDestroyed.bind(i)),e.on("shown hidden rested dir plain",n),e.on("dir:up dir:right dir:down dir:left",n),e.on("plain:up plain:right plain:down plain:left",n)},n.prototype.bindDocument=function(){var e=this;e.binded||(e.bindEvt(document,"move").bindEvt(document,"end"),e.binded=!0)},n.prototype.unbindDocument=function(e){var t=this;Object.keys(t.ids).length&&!0!==e||(t.unbindEvt(document,"move").unbindEvt(document,"end"),t.binded=!1)},n.prototype.getIdentifier=function(e){var t;return e?void 0===(t=void 0===e.identifier?e.pointerId:e.identifier)&&(t=this.latest||0):t=this.index,void 0===this.ids[t]&&(this.ids[t]=this.index,this.index+=1),this.latest=t,this.ids[t]},n.prototype.removeIdentifier=function(e){var t={};for(var i in this.ids)if(this.ids[i]===e){t.id=i,t.identifier=this.ids[i],delete this.ids[i];break}return t},n.prototype.onmove=function(e){return this.onAny("move",e),!1},n.prototype.onend=function(e){return this.onAny("end",e),!1},n.prototype.oncancel=function(e){return this.onAny("end",e),!1},n.prototype.onAny=function(e,t){var i,n=this,o="processOn"+e.charAt(0).toUpperCase()+e.slice(1);t=c.prepareEvent(t);var r=function(e,t,i){i.ids.indexOf(t)>=0&&(i[o](e),e._found_=!0)},s=function(e){i=n.getIdentifier(e),c.map(n.collections,r.bind(null,e,i)),e._found_||n.removeIdentifier(i)};return c.map(t,s),!1},n.prototype.destroy=function(){var e=this;e.unbindDocument(!0),e.ids={},e.index=0,e.collections.forEach(function(e){e.destroy()}),e.off()},n.prototype.onDestroyed=function(e,t){var i=this;if(i.collections.indexOf(t)<0)return!1;i.collections.splice(i.collections.indexOf(t),1)};var l=new n;return{create:function(e){return l.create(e)},factory:l}});
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _stringWithLength = require('./string-with-length.generator'); Object.keys(_stringWithLength).forEach(function (key) { if (key === "default" || key === "__esModule") return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _stringWithLength[key]; } }); }); var _personalData = require('./personalData.generator'); Object.keys(_personalData).forEach(function (key) { if (key === "default" || key === "__esModule") return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _personalData[key]; } }); });
/** * Welcome to your Workbox-powered service worker! * * You'll need to register this file in your web app and you should * disable HTTP caching for this file too. * See https://goo.gl/nhQhGp * * The rest of the code is auto-generated. Please don't update this file * directly; instead, make changes to your Workbox build configuration * and re-run your build process. * See https://goo.gl/2aRDsh */ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); workbox.core.skipWaiting(); workbox.core.clientsClaim(); /** * The workboxSW.precacheAndRoute() method efficiently caches and responds to * requests for URLs in the manifest. * See https://goo.gl/S9QRab */ self.__precacheManifest = [ { "url": "android-chrome-192x192.0fcebb82.png", "revision": "71c32dc8b4da4840d61a1796a2bc230b" }, { "url": "android-chrome-512x512.ae40f73d.png", "revision": "8bf8012c4f4ae251d660b4739171b7ed" }, { "url": "apple-touch-icon-120x120-precomposed.044c6f3f.png", "revision": "a6e447e90b691da286286ab18849adac" }, { "url": "apple-touch-icon-120x120.044c6f3f.png", "revision": "a6e447e90b691da286286ab18849adac" }, { "url": "apple-touch-icon-precomposed.fdeabd24.png", "revision": "de5e22b15cf20cb0d586a036d714ee3f" }, { "url": "apple-touch-icon.fdeabd24.png", "revision": "de5e22b15cf20cb0d586a036d714ee3f" }, { "url": "certificate.1e3570bc.pdf", "revision": "623cac53a40c141642b22bf50fe14628" }, { "url": "confidentialite.2f395007.js", "revision": "fdaad1887614bbc6822d8a5abb2234ff" }, { "url": "confidentialite.daef9682.css", "revision": "9caf330c4bbb593fbc8d2eb58a9e085c" }, { "url": "confidentialite.html", "revision": "4bce5357393a4b0e58eee0842ffa7e8d" }, { "url": "favicon-16x16.a4687270.png", "revision": "652605ae0182d51781ab0be639ad2bda" }, { "url": "favicon-32x32.623384d0.png", "revision": "674c9c4ef1e4c7ea9de1218ee0bfd0cf" }, { "url": "index.html", "revision": "717a9a9a16b984000cc6e4539c49e936" }, { "url": "logo_dnum_dark.0fe33c5b.svg", "revision": "da8bdc57d4f231585216c53da752d00a" }, { "url": "logo_dnum.19ebc682.svg", "revision": "3a41bfa41e4671414da29db168c37d66" }, { "url": "main.26b14001.js", "revision": "80920b563c1f746ea1d101a6f62a8c60" }, { "url": "main.31fdc5e2.js", "revision": "382ce23520ff206b81f17bf12bad787c" }, { "url": "main.61387d31.js", "revision": "f2ab86a88b51e1e07dc6f703efb93652" }, { "url": "main.daef9682.css", "revision": "7d236ed06e460d3f2096e07384bbc079" }, { "url": "marianne-bold-webfont.1505950c.woff2", "revision": "e67f6cefe32cc39f909e605c8d6337a9" }, { "url": "marianne-bold-webfont.7424dbde.woff", "revision": "0bcc99dd4adfb78e11098fedfe531cbb" }, { "url": "marianne-regular-webfont.0a959359.woff", "revision": "89f4f2326c77429e98693cf83703face" }, { "url": "marianne-regular-webfont.daa94941.woff2", "revision": "d2c09e5f58d8360f541e2a8726c33587" }, { "url": "MIN_Interieur_RVB_dark.0e5ee525.svg", "revision": "345794cee228a40837ab654184cd2c96" }, { "url": "MIN_Interieur_RVB.124e26ea.svg", "revision": "6823b6d87f43d208b17ff81e178f9ae9" }, { "url": "safari-pinned-tab.1551797e.svg", "revision": "f53452e6ac8760f12bab91672e91d39b" }, { "url": "./", "revision": "a1ca98525a5046713bfb5f2cbf458e89" } ].concat(self.__precacheManifest || []); workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"));
import React, { Component } from 'react'; import {Icon } from 'antd'; import './style/style.less'; export default class Card extends Component { constructor(props) { super(props); this.state={ flag:false, }; } render() { const {title,icon,more,className} = this.props; let flag = this.state.flag; if(more){ flag=true; } return ( <div className={`card1 ${className?className:''}`}> <div className="title"> <span><img className="img" src={icon} /></span> <span className="s1">{title}</span> {flag?<span><a className="s21 a-style1">更多<Icon type="double-right" /></a></span>:''} </div> <div className="content"> {this.props.children} </div> </div> ); } }
// For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html module.exports = { // Automatically clear mock calls and instances between every test clearMocks: true, // Indicates whether the coverage information should be collected while executing the test collectCoverage: true, // An array of glob patterns indicating a set of files for which coverage information should be collected // collectCoverageFrom: undefined, // The directory where Jest should output its coverage files coverageDirectory: 'coverage', // An array of regexp pattern strings used to skip coverage collection coveragePathIgnorePatterns: [ 'index.ts', '/node_modules/' ], // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { global: { 'branches': 70, 'functions': 70, 'lines': 70, 'statements': 70 } }, // An array of file extensions your modules use moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ], // The test environment that will be used for testing testEnvironment: 'node', // The glob patterns Jest uses to detect test files testMatch: [ '**/src/**/__tests__/**/*.[jt]s?(x)', '**/src/**/?(*.)+(spec|test).[tj]s?(x)' ], // A map from regular expressions to paths to transformers transform: { '\\.(ts)$': 'ts-jest' } }
module.exports = { env: { browser: true, es6: true, }, extends: [ 'airbnb', 'airbnb/hooks', 'plugin:prettier/recommended', 'prettier/react', ], globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly', }, parserOptions: { ecmaFeatures: { jsx: true, }, ecmaVersion: 2018, sourceType: 'module', }, plugins: ['react'], rules: { 'prettier/prettier': 'error', 'jsx-a11y/label-has-associated-control': [ 'error', { required: { some: ['nesting', 'id'], }, }, ], 'no-underscore-dangle': [2, { allow: ['_id', '_groups'] }], }, };
var destinos = [], categorias = [], perfiles = []; var exp = undefined; function addElement (array, element){ if (!$.isArray(array)){ return false; } array.push(element); } function deleteElement (array, element){ if (!$.isArray(array)){ return false; }else { if (array.length == 0){ return false; } } $.each(array, function(index, value){ if (value == element){ array.splice(index, 1); return; } }); } function change (object, array, element){ if (!$(object).is(':checked')){ deleteElement (array, element); }else{ addElement (array, element); } console.log(array); }
(async () => { const gameID = prompt('Please enter the game set ID you are playing: '); const GetAnswers = await fetch(`https://api.blooket.com/api/games?gameId=${gameID}`, { headers: { "accept": "application/json, text/plain, */*", "accept-language": "en-US,en;q=0.9", "content-type": "application/json;charset=UTF-8", }, method: 'GET' }); const Answers = await GetAnswers.json(); Answers.questions.forEach(question => { console.log(`Q: ${question.question} A: ${question.correctAnswers.join(', ')}`); }); })();
/* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ // @flow import * as React from 'react'; import { Block } from '../../block/index.js'; import { Button } from '../../button/index.js'; import { ProgressSteps, NumberedStep } from '../index.js'; export class Scenario extends React.Component<{}, { current: number }> { state = { current: 0 }; render() { return ( <ProgressSteps current={this.state.current}> <NumberedStep title="Create Account"> <Block data-e2e="content-1" font="font400"> Here is some step content </Block> <Button data-e2e="button-next" onClick={() => this.setState({ current: 1 })}> Next </Button> </NumberedStep> <NumberedStep title="Verify Payment"> <Block data-e2e="content-2" font="font400"> Here is some more content </Block> <Button data-e2e="button-previous" onClick={() => this.setState({ current: 0 })}> Previous </Button> <Button onClick={() => this.setState({ current: 2 })}>Next</Button> </NumberedStep> <NumberedStep title="Add Payment Method"> <Block data-e2e="content-3" font="font400"> Here too! </Block> <Button onClick={() => this.setState({ current: 1 })}>Previous</Button> </NumberedStep> </ProgressSteps> ); } }
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"+QRC":function(e,t,n){"use strict";var r=n("E9nw"),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,c,l,s,u=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),c=document.createRange(),l=document.getSelection(),(s=document.createElement("span")).textContent=e,s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),c.selectNodeContents(s),l.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(c):l.removeAllRanges()),s&&document.body.removeChild(s),i()}return u}},"/3gg":function(e,t,n){},"/9aa":function(e,t,n){var r=n("NykK"),o=n("ExA7");e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},"1NmI":function(e,t,n){e.exports={aboutTile:"about-module--aboutTile--381PW",aboutBlock:"about-module--aboutBlock--1fLBr",mrTp26PX:"about-module--mrTp26PX--x5qv6"}},"2mql":function(e,t,n){"use strict";var r=n("TOwV"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=d(n);o&&o!==m&&e(t,o,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var c=l(t),v=l(n),h=0;h<i.length;++h){var b=i[h];if(!(a[b]||r&&r[b]||v&&v[b]||c&&c[b])){var g=p(n,b);try{s(t,b,g)}catch(y){}}}}return t}},"3M/l":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAZgklEQVR4Xu2dC5QcVZnH/9/tmTymqycTTEAjMdPVEwE5BpC3KwKCGFEyXZ2MengpuIorKqy4y8LqLiycxaOIirq6yIq6shLGdHUSBKJ4DBKeQQWFJZBM9fAKHsyQx3TPJJnp+vbUJHFjmEf17Xp23TpnTnLO3O/1/+o31VVd916COpQCSoEJFSCljVJAKTCxAgoQdXYoBSZRQAGiTg+lgAJEnQNKATkF1BVETjdllRAFFCAJabQqU04BBYicbsoqIQooQBLSaFWmnAIKEDndlFVCFFCAJKTRqkw5BRQgcropq4QooABJSKNVmXIKKEDkdFNWCVFAAZKQRqsy5RRQgMjppqwSooACJCGNVmXKKaAAkdNNWSVEAQVIQhqtypRTQAEip5uySogCCpCENFqVKaeAAkRON2WVEAUUIAlptCpTTgEFiJxuyiohCihAEtJoVaacAgoQOd2UVUIUUIAkpNGqTDkFFCByuimrhCigAElIo70qk5/umTY0w14EgUPtGh8CgYMFcDCDDwbg/KRBaAMj7fyQoDZmThNQYaBKhAqz8y9VmHnv/51/aex3RFyxITYQ84ZXajs3LFx4zy6vcpfxowCRUS0hNvxiz8yhWu09NRtHCdiLQLQIjCOCLJ8IFoM2gHmDDWxoTeGZkZ2jG9oPW70liDxiC8jgxvxpogWnBiHSeDHS2dK1YcX2M27FWrII1LIYzGcBOMPPWI34JtAmAPeCeU2b4HWULW1rxN9EtrEGhFL0az9EceNT083Yandgfbue737baC2VZ2AJwCe6qT96Y/g+Bq0FYZ3W2bKOqLfmRY6xbbJzBVGAyJ8CO549Z06qNdUNiG4GnyPvKXqWRPQyg+8jpmJaL65qJEMFiKR6cb2C7Hyxp2t098jFILoIwBsly4+T2R+JeMX26bWvzpu3eqjexBUg9Sq2d3zcANm6cckxLSlxEZguIoImWXaszZhxh0iJr6Q7V/zebSEKELdKHTAuLoAMW4UFNbIvB9PlkqU2lRkzb8nkSnPdFqUAcatUzABxvq+oto3sA+NNkmU2nRmDb8nopUvcFqYAcatUjAAZ7i+cXmO+EYx3SJbXvGYkFmvZFWvcFqgAcatUTAAZ7Mv/nSD6OgPTJUtrarN6PxorQCRPh3qFlgxTl1mlz/gGCJfVZZSkwYzfajnzuHpKVoDUo9Z+Y6MGSNUy7mSgR7KcRJgR6J/TevHf6ylWAVKPWhEFpNKX/zmIzpYsJTFmNokj2rMrNtRTsAKkHrUiCEjFMsoAOiXLSJLZiKab0+otWAFSr2J7x0fhI1bVKgwzeIZkCYkyY0YxkzOX1lu0AqRexSICSMUyngXwVsn0k2fGOF/LmbfXW7gCpF7FIgBIxSr8EuAzJVNPpFm6taWN5vcO11u8AqRexUIGZLDP+DYRLpVMO6lmGzXdlLraKkAkT5kw7kEqlnEhgB9Jppxks5s03bxCRgAFiIxqAIIGZEd56eEC9n1gvFky5cSa2YxT2nPmOhkBFCAyqoUASLVsFJlhSKabaLNG/pgpQCRPnUZErzfkoFVYRuDeeu3UeEcBvk/TS++V1UIBIqlckIBULMOZe3+aZKqJNmMbl2W6zJtlRVCASCoXFCCVsnERGD+QTDPxZsK239LWtfJFWSEUIJLKBQaIZTwG4HjJNAM3I2AXCC/bNjaD+GUCvQygBsYcEM9h0BwC5mDPz2yfE3xV081DGomhAJFULwhAqv1Lz2bb/rlkigGYUZmZHxWCN9gsnrbt0Sdmda1y1qtydTD3pKrlXXPYTs0F8xxqwQnM4gQCnwBgvisnkwwi4Na0bn6iET8KEEn1ggCkUi7cBuaPSabom5nzXlNLilbM4PYiZX+4049AO1/I50Zq4jhiPg6EY8Fw5nFk6olFoG617E89ink41m9AtpbzndMgnnLWtfUw7YZcOWAw219r71r5UEOOJIy3Pf+B2anatDMBOtN5zYYAfSo3XvRIXUGmUnmC33sh/mShBzcVLiHB35NMz1szxlOpFN0ws7P4P946lvdW6SuMgQKC807asQd6IuCxtG42vEqkAkSyR34DUunL3w6icyXT89JsbUq0XDyzs9eZdxLJY5uVP6sFOB+gC/YlSOAvpfXS9Y0mrACRVNBPQJyb16Hy6DZGuAu8EaHYNrN6Ib3xF1VJmQI1q/YX3sE2nwfA+XmfpptPNpqAAkRSQT8BqfR1nwkSv5RMzSuz/hHi02dnS/1eOQzKj3P/5lXeChDJrvkKiGV8FcAXJFPzxMy2+aL2rtIPPXEWYycKEMnm+QtI/l6A3ieZmhdmv9B0M8z4XtTgiQ8FiKSM/gJiON8+z5NMzQMzvlDTS//tgaPYu1CASLbQL0B2PGO8QUxHINuLTVS6X7VJSh2qmQJEUn6/TqKwNwYiwuZ01lSTsvaeFwqQiAGyo2x0C0ZJMi0vzH6r6fUtz+lF0Kj6UIBIdsavK0gE5p0/penm2yVlaTozBYhkS/0CZNDKf5ZA0hN8JMvZ32wknZ2bJrplxANfsXehAJFsoY+AfJFA10mm5Y0Z8TFatvSEN87i7UUBItk/HwH5DIG+JZmWN2aMz2s58+veOIu3FwWIZP/8AmSov2DYNhcl0/LKbK2mm6d75SzOfhQgkt3zDZBy94k2i0ck0/LMTIBPbNNLznTfRB8KEMn2+wXIwKbu+dOFeEEyLS/N1mu66Ux9TfShAJFsv1+AMF8jquUna5JpeW2W+HeyFCCSp5RfgDjpVCzjFQBvlEzNWzPmG7Rc6WpvncbHmwJEsld+AlK1jMd5nGmkkqk2bsa4LS1mfdqvBRoaT9A/DwoQSW39BGSwz/geEVxvdi9ZQl1mBKwTgv5lZmfRWeUxMYcCRLLVfgKyva/77BSJSK6HRUQ3tE0fuZ7mrR6SlC5WZgoQyXb5CQiXT5tR5dk7ALRKpuezGT1OxNens+ZKnwOF7l4BItkCPwFxUhrsy/+MiOredFKyHCkzAq1Gim9JLzDvknIQAyMFiGST/AfE+BQRviuZXqBmzQyKAkTyVPIbkLEdpdh+RjK9UMyY8WtBfMcubl1+UK53eyhJeBxUASIpqN+AOGlVLeNhBk6STDFMM2e7geWjXFvekVv1eJiJNBpbASKpYBCADPcXzq3ZXPfe3pIl+WLGwMoU4Y6ZneZyIrAvQXx0qgCRFDcIQPbcrBsriFCQTDM6ZoSniWl5jXl5e858LjqJTZ6JAkSyU0EBsmNT9zuFEA9Kphk5MwJ2M3h5jcXyWbliJL/r2V80BYjkKRQUIE56FSt/I0BS+3xLlheU2XoAvSPEvV4tFep14goQSUWDBKT6v4U38Qw8CHBWMt1ImxFRlYFeIupNd664O0rJKkAkuxEkIGP3IpZxKQHflkw3TmaRuqooQCRPnaABGfuo1Ze/DUSR25JNUsJJzZyrim3jxzxKN7cftmKDHzHc+FSAuFFpnDFhALLnfsR4FECSZvptI8bNtd24uf0Ic0CyXdJmChBJ6cICpNpfeBPb/Gy9G1pKlhkZM2beBMbNma5SoCu+KEAkT4GwANlzP1J4N4Hvl0w91mYEPGzbDijmHUEUogCRVDlMQJyUq/2Fj7PNt0qmH3szIpgprl01Q1/lXE19OxQgktKGDcie+5H8FQDdKFlC/M0YL4H4Kk0v/cSvYhQgkspGAZCxj1sb86dRihI1DfZ1LSN8M93SchXN7x2WbOeEZgoQSUWjAsjYlaScPxpMv0najfv+rWOmh0C4KqMXHR08OxQgklJGCRCnBGdn11am2wCcJllS7M3G3vMSuErrNG/yqhgFiKSSUQNkLyQd0yBuY+a8ZFlNYUbE16SzpWu9KEYBIqliFAHZV0rVKlwNwtXMnJYsL/ZmXkGiAJE8FaIMiFNStb/wDti4msGRXvhBUn5XZl5AogBxJfXrB0UdkH0Z77CMTwjAWTq0U7LUWJs1CokCRLL9cQHEKc9ZMX4aiauJ8CnJcmNt1ggkChDJ1scJkL/cmzxvfBA1+iSDz5EsO7Zmto2PtXeZP6q3AAVIvYrtHR9HQBIOypZRmxd3dJV+W0/LFSD1qLXf2DgDkmBQ1r5S27l44cJ7drltuwLErVIHjGsGQJIICoG+ndaLn3XbdgWIW6WaGJB9pQ2WjVMF0zIGL4vMBj6S/ZnMjIg+lc4W/9ONawWIG5XGGdNMV5ADy9v+dM9BYvrIMhLkgPJeSYmibPZSehqOpkOnnqGoAJFsYzMDsr8kQ+XCSTZjGYGXMbBAUq7ImQmBK9pcvLOlAJFsXVIA2ScP/+mCdHW4sowYDigflJQtOmaMP6b1o44musae9ONYdDKuL5Ow50EkDZD9u1PdlD+WiZYRjd2vdNXXuQiNJlysZU3nDegJD3UFkexXkgH5y1Xl6Z5p1XRtGdfsHiKK4xvE92u6Oen0AAWIAkRSgb82q1hLFzFqywhjN/ZHeOI0ACc2sdGeLZUmCqUAkWyCuoKMLxwzaLhsLLMJF4OxWFLewMwYuDWjm59QgHgsuQJkakEr5cLHwHw5gKOmHh3aiD9oujlhfuoKItkXBYg74fjFnpnV0ZHLwXQlgFnurIIdJabR/LZDiy+NFzW2gFT6CmeC+JfBSvn/0RQg9Sk/9uQrRdeB8f76LP0fzcCHMrrZ21SAVJ83Psg1rPZfvnEjDGu62RZS7FiHHbTyXyTQdZEqgvF1LWd+vqkAGbSMHgLuDEno1zTdfENIsWMfdsemfF6IsRVYOqJQDBEeTmfNdzYVIBWrcAHAPw5FYMbLWs48NJTYTRJ02Oo+pQbh9C8SU4En+sgc23uQqpX/JINcvZHp9TnlrDSeyZUWeu03af6q/UuPgW2vYyD0j6u11pY3zJrf+9qBPYgtIENl43M245shnVSTPhoMKadYhq2W8//KTNeEnXxLa8vCGfN7NzUNIJWycSUYXw5DWAI9mtaLJ4URu9libt58Tlv7ztQ6gI4Js7Ya2SfNyq50Nif6qyO2V5CQ//Ks1XTz9DAb2kyxQ+7lmJRk89nprtI9TQNIxTKcYsJ6leEnmm5e0EwnaZi17Owz3jpK8HWfjynrY5yv5czbmwmQPwE4ZMrC/RjA+LKWM6/yw3VSfVYsw9nCIbSFtwXoc2168XXbu8XyI9YOa8lhAqnwdj5lujSdK/5HUk9mP+quWsadDPT44duNz4kWl4slIBUrfwFA4XwH4nxeBXWn9eIqN8KrMe4UGOzLf4eIPu1utPejmgwQ46sAvuC9TO48jtbo2I6Fxd+5G61GuVEg7Bv1ZgNkDYCz3AjvxxiutRycWdj7Zz98J9XnoJW/mUCu16vyWqemAaTS1/12kPiD1wK59UdE1XS2qLkdr8a5U6BiGc5GnOe5G+39qKYBZNAqfInA/+a9RK49rtd08wTXo9VAVwpUysbdYb4Kz8yfzuRK3z0w2djdpFcs43EAx7pS3Y9BRD/UssWL/HCdZJ+VPuNVEOaGpYHNOKU9Z66LNSBhT5LaK94/arrpPCRQh0cKVPsLH2Cb7/LInZSb3dzScVCud3u8ASkb/wXGxVIKeGREQnwg3bnibo/cKTfOXu8hP+IF+AVNL427amRsPmJVrcISBq8M+4waIc7Ozpb6g8zDeQRq12hFpst8Ksi4QcSq9i05DpRyXnmfHkS88WIQsDKtm+Ou6xUjQIxq2PMGGLw1o5cOCrqRVct42GYcScDPaow7Z3WZ9wadg1/xqmWjjxm6X/5d+v0HTTdvnAAely5CHDbYZ/yUCB8JMYW9oXm5ppcCz6NiGXxA7b+yQXdsb03dPn9+73D4ushlMNhnPECEd8lZe2cliE5uyxYfiSUgg31GkQiGd3LIeyKBj6c7zR/Ie6jfcutz+aNbW+j3E1huJOLbCWLNRA2uP2IwFoN9xjoi/E0w0SaNslnTzTdPNCKyH7F2bOp+JwlxK0VoGUth229p61r5YpBNdT0xjPE7CFrD4DWZrHl/kDnWE6tiLTkEEN8HKCobif5Y082PxgqQvfPNnUep7fWI7/PYBzTdfLfPMV7nXvI18KcAWgPwGk03Q1s7bP9iyuXTZszl2Z8B4PxEZp8RImGksyvk1+Z1iCekvmUDvUQtD2jZXmcehi/HXjA+GeoXgRNU1she242INc79R13uGNhI4EfA9ATAT6Z3tj5KR/ZW6nLSwODBjT1zhaj1MPElABY14MpzUwY2ZHRz0oW2p/yIVe0rHM/Ej+2fHQG9zPxQTYhHZk1wc+OmmqGXCofWdvPJxDgZBOevc3jfkE+RMKX4uPSC+rYQdqPBZGN2WksOG/V63gtjFMRPgPEkMx6jGj2qHWY+2WiuB9o7+7dAoIdAPWF+Qz5pXUQ3aNni1ZONmRKQob78UpvoZ1MI6HwDuQPAdmbeQYLG/gXEdgJvZ9AuIs7ARjsRMgy0MyNHhJzXjfHDHwO/yejmqX74nsxnpZy/DEzfCCDuEIDHCDRgAwNEGADbA7aNgVQrbSHGgKhhYPd0DLQfag78ecOSTNuMFi1V40yNOWMzMmihwwk4HOxsfcCHA/SWAPJuJESNBJ2Q7px82sLUgJSNv7cZNzWSSRPYhvJ6SbVs3M0RXMu2CfrpzHr7ppY1nZXnJ7/ITDVgsM/4BhEum2pcM/+eR/G2zFvNZ4KusWIZNQAi6LgJiLe1xuLEWbkVG6eqdcorSJS+h5iqGH9+z6s1vbTEH98Tex22Cgtq4EBfaQm6xrDiMej6jF78kpv4UwJSsfK/C3tRLzeF+DaGxGItu8KZwRjoMbipcAkJ/l6gQZMR7I+jqd2ndiz4+VY35U4KyObHz2mbdVDLn8N+B8pNIb6MIfxUy5rn+uJ7Cqfqyu2P6gz+cEYvud4VYFJAdpSXHi7YDvyztz/S1O9VpOhdbQuKD9Zv2bhFxSpUAE437kl52KfAVPsRjqfUpIBUrPxZe76RTd7BwPczuul8aRn4sed1jJRvX8gGXlAEAjLwXAvorJl68fl60pkUkKpV+FsGf78eh80wlkCbdvHuMw7K3fVCGPVULONCAD8KI3azxuQan55ZWFpbb32TAjJoFa4j8BfrdRr78cznarnST8Oqo9KXvx1Eodz7hFWzr3GJz9Wycv2cHJDIzMPwVb6/ck7Ad9K66bxQF9pRsQxnza05oSXQTIEbXGRjqnuQRD3iJcITo0MtZ8w68vU7DQV1zvDAee3V7UOvWzwgqPhNFqfhbSqmuAcJf5prgA0bohqdkg55SdFBK/8hAi0PsO5mDXWnppsfbrS4CQEZerbnzXbr6LibqzcaNIr2DDo1oxd/E3ZuFatwK8AfDzuPmMe/SdPNK7yoYWJA+o2TbRsPeREk6j6YsTSTM4tRyLNqGS8wMD8KucQwh21s0z9luoqebe46ISCDZeMjxAjtSU5gzbH5Sq2r9JXA4k0SiJ/umVadOborCrnELQdm/FqArkzniuu9zH1CQMJejt7LIsfzxYxBQXR+lPb5qFrd5zCE2nek7ubz19LZ1iuJep23nz09Jr6CNPcj3l/ZqF3arq8Kd1+8A1pZtQrfYnCoj5g9Pbv8d3YvmG/UcqVf+RVqQkCa9S3esOaWu2ngoFVYJsCXMyKxHI6blMMa8xwBN6Z10/e3PCb+iGU13SPetVzja2VeNwj6LBh7SRT2R4npcgbPCDp+VOMRYTPAt9Sm177TPm/1liDyHBeQgY3vb5+emtEUX1btEzWdLV0bhKBexuBXe7Shau08m/k8Ak7x0necfO3rIUjcku4svhJk7uMCUu1fegzbdqz34AtTVD8aWCkbi8F8JojOAONoP2JEzSeBHgfZd4UBxj4txgUkzo94nbWOBPEdYYrq94lW3bjkGG5pWQzbAQbv8TteoP4Jz4BxVwp018wIfHE7/hXEWW7fxvlE1BWoOA0EI2AVC1qeXpBa7sfjvgZS89X0tb6eWdMwcjaIzmbgbAICX33egwLXMvgBotSDYUxvniz/Sd/FevXpHq1t5ojBTEZUFpDeVwyDdwjQGiY8TDat8/oLIg+aHoqLbRvzuWmtYhGzvci26SghsMhZgyyUZCYI6qz2COB+MO4BY12my3w1Svntn8uUizbsP9hZZRHA8SxwPMDHg3FkQIUNAngOjOdI8LO1UfpF+0Lz4YBixz6M84duxvTdi1Ipsci2cZQQtAjMixjwfbdeInoZwHow1jN4/Qjx+tnZ0ra4iFoXIAcW9acnz0qn29qOR0rMAdtzBYk5TDwHNuaCnPkM3A6mNMiZW03pPXOsKe1sRCOIXmPmrQC9BvBWZtoKwmsEbCXh/EtbayP2VtEqng36yUVcmtdons5TsuHdtQ57V222TehIoaWDbXs2p9AhgA4GOmDzbIboIOIOEIYJGGbGMAPDAA8TY5gEhmzGAGjPKowkxBZqHd2yjeyBefNWO6s2xvZoCJDYVq0SVwq4VEAB4lIoNSyZCihAktl3VbVLBRQgLoVSw5KpgAIkmX1XVbtUQAHiUig1LJkKKECS2XdVtUsFFCAuhVLDkqmAAiSZfVdVu1RAAeJSKDUsmQooQJLZd1W1SwUUIC6FUsOSqYACJJl9V1W7VEAB4lIoNSyZCihAktl3VbVLBRQgLoVSw5KpgAIkmX1XVbtUQAHiUig1LJkKKECS2XdVtUsFFCAuhVLDkqmAAiSZfVdVu1RAAeJSKDUsmQooQJLZd1W1SwUUIC6FUsOSqYACJJl9V1W7VEAB4lIoNSyZCihAktl3VbVLBRQgLoVSw5KpwP8BZwP5QXRrpIIAAAAASUVORK5CYII="},"4i/N":function(e,t,n){"use strict";var r=n("q1tI"),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"},a=n("6VBw"),i=function(e,t){return r.createElement(a.a,Object.assign({},e,{ref:t,icon:o}))};i.displayName="CloseOutlined";t.a=r.forwardRef(i)},"74dF":function(e,t,n){},AP2z:function(e,t,n){var r=n("nmnc"),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(l){}var o=i.call(e);return r&&(t?e[c]=n:delete e[c]),o}},BUzJ:function(e,t,n){},"Dt+G":function(e,t,n){},Dtc0:function(e,t,n){"use strict";n.r(t);n("M7k7");var r=n("Ol7k"),o=n("q1tI"),a=n.n(o),i=n("U4IR"),c=n("kuUC"),l=(n("Jmwx"),n("BMrR")),s=(n("rO+z"),n("kPKH")),u=n("1NmI"),f=n.n(u),p=function(e){var t=e.img,n=e.textH4,r=e.textH3,o=e.alt,i=e.height,c=e.width;return a.a.createElement("div",{className:f.a.aboutTile},a.a.createElement("div",{className:f.a.aboutBlock},a.a.createElement("img",{src:"../"+t,height:i||64,width:c||64,alt:o||""})),a.a.createElement("div",{className:"textCenter "+f.a.mrTp26PX},a.a.createElement("h4",null,n||""),a.a.createElement("h3",null,r||"")))},d=function(e){return{__html:e}},m=n("JkAW"),v="Hola mi nombre es <b>Mario Ezequiel Garcia Huerta</b>.\n Soy un autodidacta en el desarrollo web, actualmente estoy especializandome en\n aprender el Stack MERN siendo mi fuerte la parte del backend con <b>Node JS con Express, \n MongoDB con Mongoose</b>, y en menor medida el frontend en el cual me enfoco en \n <b>React JS con Ant Design</b>.",h="Actualmente estoy en busca de mi primera oportunidad laboral con <b>programador jr</b>,\n pues toda mi experiencia es en proyectos personales y en cursos que tomo de manera autodicta, \n por lo cual siempre estoy dispuesto a aprender alguna nueva tecnologia.",b=function(){var e,t=v+" "+(null!==(e=h)&&""!==e&&(e=e.toString()).replace(/(<([^>]+)>)/gi,""));return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",null,a.a.createElement(m.a,{title:"About",description:t,path:"",keywords:["Mario","Ezequiel","Garcia","Huerta","FullStack developer","Javascript","ReactJS","NodeJS","MongoDB","Ant-desig"]}),a.a.createElement("h1",{className:"titleSeparate"},"About Me"),a.a.createElement("p",{dangerouslySetInnerHTML:d(v)}),a.a.createElement("p",{dangerouslySetInnerHTML:d(h)})),a.a.createElement(l.a,{gutter:[20,20]},a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"location.png",height:60,alt:"location image",textH4:"Soy de",textH3:"Cunduacan, Tabasco, México"})),a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"meeting.png",alt:"trabajo en equipo",textH4:"Trabajo en equipo",textH3:"para cumplir los objetivos"})),a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"cinema.png",alt:"cinema",textH4:"Mi pasatiempo",textH3:"es llegar al cine"})),a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"web.png",alt:"web image",textH4:"Programador autodidacta",textH3:"Me gusta leer la documentacion y tomar cursos online para aprender",height:60,width:60}))))},g=(n("SchZ"),n("GJlF"),n("Dt+G"),n("wx14")),y=n("rePB"),O=n("U8pU"),j=n("ODXe"),C=n("TSYQ"),E=n.n(C),w=n("t23M"),x=n("c+Xe"),I=n("H84U"),M=n("uaoM"),N=n("ACnJ");var S=function(){var e=Object(o.useState)({}),t=Object(j.a)(e,2),n=t[0],r=t[1];return Object(o.useEffect)((function(){var e=N.a.subscribe((function(e){r(e)}));return function(){return N.a.unsubscribe(e)}}),[]),n},A=o.createContext("default"),k=function(e){var t=e.children,n=e.size;return o.createElement(A.Consumer,null,(function(e){return o.createElement(A.Provider,{value:n||e},t)}))},P=A,T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},D=function(e,t){var n,r,a=o.useContext(P),i=o.useState(1),c=Object(j.a)(i,2),l=c[0],s=c[1],u=o.useState(!1),f=Object(j.a)(u,2),p=f[0],d=f[1],m=o.useState(!0),v=Object(j.a)(m,2),h=v[0],b=v[1],C=o.useRef(),A=o.useRef(),k=Object(x.a)(t,C),D=o.useContext(I.b).getPrefixCls,R=function(){if(A.current&&C.current){var t=A.current.offsetWidth,n=C.current.offsetWidth;if(0!==t&&0!==n){var r=e.gap,o=void 0===r?4:r;2*o<n&&s(n-2*o<t?(n-2*o)/t:1)}}};o.useEffect((function(){d(!0)}),[]),o.useEffect((function(){b(!0),s(1)}),[e.src]),o.useEffect((function(){R()}),[e.gap]);var z=e.prefixCls,L=e.shape,F=e.size,K=e.src,V=e.srcSet,U=e.icon,B=e.className,H=e.alt,Q=e.draggable,W=e.children,J=T(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children"]),G="default"===F?a:F,Z=S(),Y=o.useMemo((function(){if("object"!==Object(O.a)(G))return{};var e=N.b.find((function(e){return Z[e]})),t=G[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:U?t/2:18}:{}}),[Z,G]);Object(M.a)(!("string"==typeof U&&U.length>2),"Avatar","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(U,"` at https://ant.design/components/icon"));var q,X=D("avatar",z),_=E()((n={},Object(y.a)(n,"".concat(X,"-lg"),"large"===G),Object(y.a)(n,"".concat(X,"-sm"),"small"===G),n)),$=o.isValidElement(K),ee=E()(X,_,(r={},Object(y.a)(r,"".concat(X,"-").concat(L),L),Object(y.a)(r,"".concat(X,"-image"),$||K&&h),Object(y.a)(r,"".concat(X,"-icon"),U),r),B),te="number"==typeof G?{width:G,height:G,lineHeight:"".concat(G,"px"),fontSize:U?G/2:18}:{};if("string"==typeof K&&h)q=o.createElement("img",{src:K,draggable:Q,srcSet:V,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&b(!1)},alt:H});else if($)q=K;else if(U)q=U;else if(p||1!==l){var ne="scale(".concat(l,") translateX(-50%)"),re={msTransform:ne,WebkitTransform:ne,transform:ne},oe="number"==typeof G?{lineHeight:"".concat(G,"px")}:{};q=o.createElement(w.a,{onResize:R},o.createElement("span",{className:"".concat(X,"-string"),ref:function(e){A.current=e},style:Object(g.a)(Object(g.a)({},oe),re)},W))}else q=o.createElement("span",{className:"".concat(X,"-string"),style:{opacity:0},ref:function(e){A.current=e}},W);return delete J.onError,delete J.gap,o.createElement("span",Object(g.a)({},J,{style:Object(g.a)(Object(g.a)(Object(g.a)({},te),Y),J.style),className:ee,ref:k}),q)},R=o.forwardRef(D);R.displayName="Avatar",R.defaultProps={shape:"circle",size:"default"};var z=R,L=n("Zm9Q"),F=n("0n0R"),K=n("VTBJ"),V=n("Ff2n"),U=n("1OyB"),B=n("vuIU"),H=n("JX7q"),Q=n("Ji7U"),W=n("LK+K"),J=n("i8i4"),G=n.n(J),Z=n("wgJM");function Y(e,t){return!!e&&e.contains(t)}var q=n("m+aA"),X=n("zT1h"),_=n("MNnm"),$=Object(o.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,a=e.children,i=Object(o.useRef)();Object(o.useImperativeHandle)(t,(function(){return{}}));var c=Object(o.useRef)(!1);return!c.current&&Object(_.a)()&&(i.current=r(),c.current=!0),Object(o.useEffect)((function(){null==n||n(e)})),Object(o.useEffect)((function(){return function(){var e,t;null===(e=i.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(i.current)}}),[]),i.current?G.a.createPortal(a,i.current):null}));function ee(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var te=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))},ne=n("8XRh");function re(e){var t=e.prefixCls,n=e.motion,r=e.animation,o=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:o?{motionName:o}:null)}function oe(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,a=e.mask,i=e.maskMotion,c=e.maskAnimation,l=e.maskTransitionName;if(!a)return null;var s={};return(i||l||c)&&(s=Object(K.a)({motionAppear:!0},re({motion:i,prefixCls:t,transitionName:l,animation:c}))),o.createElement(ne.b,Object(g.a)({},s,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return o.createElement("div",{style:{zIndex:r},className:E()("".concat(t,"-mask"),n)})}))}var ae;function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var se={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function ue(){if(void 0!==ae)return ae;ae="";var e=document.createElement("p").style;for(var t in se)t+"Transform"in e&&(ae=t);return ae}function fe(){return ue()?"".concat(ue(),"TransitionProperty"):"transitionProperty"}function pe(){return ue()?"".concat(ue(),"Transform"):"transform"}function de(e,t){var n=fe();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function me(e,t){var n=pe();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var ve,he=/matrix\((.*)\)/,be=/matrix3d\((.*)\)/;function ge(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function ye(e,t,n){var r=n;if("object"!==ie(t))return void 0!==r?("number"==typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):ve(e,t);for(var o in t)t.hasOwnProperty(o)&&ye(e,o,t[o])}function Oe(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function je(e){return Oe(e)}function Ce(e){return Oe(e,!0)}function Ee(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||a.clientLeft||0,top:r-=i.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=je(r),t.top+=Ce(r),t}function we(e){return null!=e&&e==e.window}function xe(e){return we(e)?e.document:9===e.nodeType?e:e.ownerDocument}var Ie=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Me=/^(top|right|bottom|left)$/,Ne="left";function Se(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function Ae(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function ke(e,t,n){"static"===ye(e,"position")&&(e.style.position="relative");var r=-999,o=-999,a=Se("left",n),i=Se("top",n),c=Ae(a),l=Ae(i);"left"!==a&&(r=999),"top"!==i&&(o=999);var s,u="",f=Ee(e);("left"in t||"top"in t)&&(u=(s=e).style.transitionProperty||s.style[fe()]||"",de(e,"none")),"left"in t&&(e.style[c]="",e.style[a]="".concat(r,"px")),"top"in t&&(e.style[l]="",e.style[i]="".concat(o,"px")),ge(e);var p=Ee(e),d={};for(var m in t)if(t.hasOwnProperty(m)){var v=Se(m,n),h="left"===m?r:o,b=f[m]-p[m];d[v]=v===m?h+b:h-b}ye(e,d),ge(e),("left"in t||"top"in t)&&de(e,u);var g={};for(var y in t)if(t.hasOwnProperty(y)){var O=Se(y,n),j=t[y]-f[y];g[O]=y===O?d[O]+j:d[O]-j}ye(e,g)}function Pe(e,t){var n=Ee(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(pe());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),o={x:r.x,y:r.y};"left"in t&&(o.x=r.x+t.left-n.left),"top"in t&&(o.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(pe());if(r&&"none"!==r){var o,a=r.match(he);if(a)(o=(a=a[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,o[5]=t.y,me(e,"matrix(".concat(o.join(","),")"));else(o=r.match(be)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,o[13]=t.y,me(e,"matrix3d(".concat(o.join(","),")"))}else me(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,o)}function Te(e,t){for(var n=0;n<e.length;n++)t(e[n])}function De(e){return"border-box"===ve(e,"boxSizing")}"undefined"!=typeof window&&(ve=window.getComputedStyle?function(e,t,n){var r=n,o="",a=xe(e);return(r=r||a.defaultView.getComputedStyle(e,null))&&(o=r.getPropertyValue(t)||r[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(Ie.test(n)&&!Me.test(t)){var r=e.style,o=r[Ne],a=e.runtimeStyle[Ne];e.runtimeStyle[Ne]=e.currentStyle[Ne],r[Ne]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[Ne]=o,e.runtimeStyle[Ne]=a}return""===n?"auto":n});var Re=["margin","border","padding"];function ze(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}function Le(e,t,n){var r,o,a,i=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var c=void 0;c="border"===r?"".concat(r).concat(n[a],"Width"):r+n[a],i+=parseFloat(ve(e,c))||0}return i}var Fe={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function Ke(e,t,n){var r=n;if(we(e))return"width"===t?Fe.viewportWidth(e):Fe.viewportHeight(e);if(9===e.nodeType)return"width"===t?Fe.docWidth(e):Fe.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],a="width"===t?e.getBoundingClientRect().width:e.getBoundingClientRect().height,i=(ve(e),De(e)),c=0;(null==a||a<=0)&&(a=void 0,(null==(c=ve(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===r&&(r=i?1:-1);var l=void 0!==a||i,s=a||c;return-1===r?l?s-Le(e,["border","padding"],o):c:l?1===r?s:s+(2===r?-Le(e,["border"],o):Le(e,["margin"],o)):c+Le(e,Re.slice(r),o)}Te(["Width","Height"],(function(e){Fe["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],Fe["viewport".concat(e)](n))},Fe["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var Ve={position:"absolute",visibility:"hidden",display:"block"};function Ue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t[0];return 0!==o.offsetWidth?r=Ke.apply(void 0,t):ze(o,Ve,(function(){r=Ke.apply(void 0,t)})),r}function Be(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}Te(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);Fe["outer".concat(t)]=function(t,n){return t&&Ue(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];Fe[e]=function(t,r){var o=r;if(void 0===o)return t&&Ue(t,e,-1);if(t){ve(t);return De(t)&&(o+=Le(t,["padding","border"],n)),ye(t,e,o)}}}));var He={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:xe,offset:function(e,t,n){if(void 0===t)return Ee(e);!function(e,t,n){if(n.ignoreShake){var r=Ee(e),o=r.left.toFixed(0),a=r.top.toFixed(0),i=t.left.toFixed(0),c=t.top.toFixed(0);if(o===i&&a===c)return}n.useCssRight||n.useCssBottom?ke(e,t,n):n.useCssTransform&&pe()in document.body.style?Pe(e,t):ke(e,t,n)}(e,t,n||{})},isWindow:we,each:Te,css:ye,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:Be,getWindowScrollLeft:function(e){return je(e)},getWindowScrollTop:function(e){return Ce(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)He.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};Be(He,Fe);var Qe=He.getParent;function We(e){if(He.isWindow(e)||9===e.nodeType)return null;var t,n=He.getDocument(e).body,r=He.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:Qe(e);for(t=Qe(e);t&&t!==n&&9!==t.nodeType;t=Qe(t))if("static"!==(r=He.css(t,"position")))return t;return null}var Je=He.getParent;function Ge(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=We(e),o=He.getDocument(e),a=o.defaultView||o.parentWindow,i=o.body,c=o.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===i||r===c||"visible"===He.css(r,"overflow")){if(r===i||r===c)break}else{var l=He.offset(r);l.left+=r.clientLeft,l.top+=r.clientTop,n.top=Math.max(n.top,l.top),n.right=Math.min(n.right,l.left+r.clientWidth),n.bottom=Math.min(n.bottom,l.top+r.clientHeight),n.left=Math.max(n.left,l.left)}r=We(r)}var s=null;He.isWindow(e)||9===e.nodeType||(s=e.style.position,"absolute"===He.css(e,"position")&&(e.style.position="fixed"));var u=He.getWindowScrollLeft(a),f=He.getWindowScrollTop(a),p=He.viewportWidth(a),d=He.viewportHeight(a),m=c.scrollWidth,v=c.scrollHeight,h=window.getComputedStyle(i);if("hidden"===h.overflowX&&(m=a.innerWidth),"hidden"===h.overflowY&&(v=a.innerHeight),e.style&&(e.style.position=s),t||function(e){if(He.isWindow(e)||9===e.nodeType)return!1;var t=He.getDocument(e).body,n=null;for(n=Je(e);n&&n!==t;n=Je(n)){if("fixed"===He.css(n,"position"))return!0}return!1}(e))n.left=Math.max(n.left,u),n.top=Math.max(n.top,f),n.right=Math.min(n.right,u+p),n.bottom=Math.min(n.bottom,f+d);else{var b=Math.max(m,u+p);n.right=Math.min(n.right,b);var g=Math.max(v,f+d);n.bottom=Math.min(n.bottom,g)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Ze(e){var t,n,r;if(He.isWindow(e)||9===e.nodeType){var o=He.getWindow(e);t={left:He.getWindowScrollLeft(o),top:He.getWindowScrollTop(o)},n=He.viewportWidth(o),r=He.viewportHeight(o)}else t=He.offset(e),n=He.outerWidth(e),r=He.outerHeight(e);return t.width=n,t.height=r,t}function Ye(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,a=e.height,i=e.left,c=e.top;return"c"===n?c+=a/2:"b"===n&&(c+=a),"c"===r?i+=o/2:"r"===r&&(i+=o),{left:i,top:c}}function qe(e,t,n,r,o){var a=Ye(t,n[1]),i=Ye(e,n[0]),c=[i.left-a.left,i.top-a.top];return{left:Math.round(e.left-c[0]+r[0]-o[0]),top:Math.round(e.top-c[1]+r[1]-o[1])}}function Xe(e,t,n){return e.left<n.left||e.left+t.width>n.right}function _e(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function $e(e,t,n){var r=[];return He.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function et(e,t){return e[t]=-e[t],e}function tt(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function nt(e,t){e[0]=tt(e[0],t.width),e[1]=tt(e[1],t.height)}function rt(e,t,n,r){var o=n.points,a=n.offset||[0,0],i=n.targetOffset||[0,0],c=n.overflow,l=n.source||e;a=[].concat(a),i=[].concat(i);var s={},u=0,f=Ge(l,!(!(c=c||{})||!c.alwaysByViewport)),p=Ze(l);nt(a,p),nt(i,t);var d=qe(p,t,o,a,i),m=He.merge(p,d);if(f&&(c.adjustX||c.adjustY)&&r){if(c.adjustX&&Xe(d,p,f)){var v=$e(o,/[lr]/gi,{l:"r",r:"l"}),h=et(a,0),b=et(i,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(qe(p,t,v,h,b),p,f)||(u=1,o=v,a=h,i=b)}if(c.adjustY&&_e(d,p,f)){var g=$e(o,/[tb]/gi,{t:"b",b:"t"}),y=et(a,1),O=et(i,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(qe(p,t,g,y,O),p,f)||(u=1,o=g,a=y,i=O)}u&&(d=qe(p,t,o,a,i),He.mix(m,d));var j=Xe(d,p,f),C=_e(d,p,f);if(j||C){var E=o;j&&(E=$e(o,/[lr]/gi,{l:"r",r:"l"})),C&&(E=$e(o,/[tb]/gi,{t:"b",b:"t"})),o=E,a=n.offset||[0,0],i=n.targetOffset||[0,0]}s.adjustX=c.adjustX&&j,s.adjustY=c.adjustY&&C,(s.adjustX||s.adjustY)&&(m=function(e,t,n,r){var o=He.clone(e),a={width:t.width,height:t.height};return r.adjustX&&o.left<n.left&&(o.left=n.left),r.resizeWidth&&o.left>=n.left&&o.left+a.width>n.right&&(a.width-=o.left+a.width-n.right),r.adjustX&&o.left+a.width>n.right&&(o.left=Math.max(n.right-a.width,n.left)),r.adjustY&&o.top<n.top&&(o.top=n.top),r.resizeHeight&&o.top>=n.top&&o.top+a.height>n.bottom&&(a.height-=o.top+a.height-n.bottom),r.adjustY&&o.top+a.height>n.bottom&&(o.top=Math.max(n.bottom-a.height,n.top)),He.mix(o,a)}(d,p,f,s))}return m.width!==p.width&&He.css(l,"width",He.width(l)+m.width-p.width),m.height!==p.height&&He.css(l,"height",He.height(l)+m.height-p.height),He.offset(l,{left:m.left,top:m.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:a,targetOffset:i,overflow:s}}function ot(e,t,n){var r=n.target||t;return rt(e,Ze(r),n,!function(e,t){var n=Ge(e,t),r=Ze(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function at(e,t,n){var r,o,a=He.getDocument(e),i=a.defaultView||a.parentWindow,c=He.getWindowScrollLeft(i),l=He.getWindowScrollTop(i),s=He.viewportWidth(i),u=He.viewportHeight(i);r="pageX"in t?t.pageX:c+t.clientX,o="pageY"in t?t.pageY:l+t.clientY;var f=r>=0&&r<=c+s&&o>=0&&o<=l+u;return rt(e,{left:r,top:o,width:0,height:0},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(n,!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{points:[n.points[0],"cc"]}),f)}ot.__getOffsetParent=We,ot.__getVisibleRectForElement=Ge;var it=n("bdgK");function ct(e,t){var n=null,r=null;var o=new it.a((function(e){var o=Object(j.a)(e,1)[0].target;if(document.documentElement.contains(o)){var a=o.getBoundingClientRect(),i=a.width,c=a.height,l=Math.floor(i),s=Math.floor(c);n===l&&r===s||Promise.resolve().then((function(){t({width:l,height:s})})),n=l,r=s}}));return e&&o.observe(e),function(){o.disconnect()}}function lt(e){return"function"!=typeof e?null:e()}function st(e){return"object"===Object(O.a)(e)&&e?e:null}var ut=a.a.forwardRef((function(e,t){var n=e.children,r=e.disabled,o=e.target,i=e.align,c=e.onAlign,l=e.monitorWindowResize,s=e.monitorBufferTime,u=void 0===s?0:s,f=a.a.useRef({}),p=a.a.useRef(),d=a.a.Children.only(n),m=a.a.useRef({});m.current.disabled=r,m.current.target=o,m.current.onAlign=c;var v=function(e,t){var n=a.a.useRef(!1),r=a.a.useRef(null);function o(){window.clearTimeout(r.current)}return[function a(i){if(n.current&&!0!==i)o(),r.current=window.setTimeout((function(){n.current=!1,a()}),t);else{if(!1===e())return;n.current=!0,o(),r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,o()}]}((function(){var e=m.current,t=e.disabled,n=e.target,r=e.onAlign;if(!t&&n){var o,a=p.current,c=lt(n),l=st(n);f.current.element=c,f.current.point=l;var s=document.activeElement;return c&&function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}(c)?o=ot(a,c,i):l&&(o=at(a,l,i)),function(e,t){e!==document.activeElement&&Y(t,e)&&"function"==typeof e.focus&&e.focus()}(s,a),r&&o&&r(a,o),!0}return!1}),u),h=Object(j.a)(v,2),b=h[0],g=h[1],y=a.a.useRef({cancel:function(){}}),O=a.a.useRef({cancel:function(){}});a.a.useEffect((function(){var e,t,n=lt(o),r=st(o);p.current!==O.current.element&&(O.current.cancel(),O.current.element=p.current,O.current.cancel=ct(p.current,b)),f.current.element===n&&((e=f.current.point)===(t=r)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))||(b(),y.current.element!==n&&(y.current.cancel(),y.current.element=n,y.current.cancel=ct(n,b)))})),a.a.useEffect((function(){r?g():b()}),[r]);var C=a.a.useRef(null);return a.a.useEffect((function(){l?C.current||(C.current=Object(X.a)(window,"resize",b)):C.current&&(C.current.remove(),C.current=null)}),[l]),a.a.useEffect((function(){return function(){y.current.cancel(),O.current.cancel(),C.current&&C.current.remove(),g()}}),[]),a.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return b(!0)}}})),a.a.isValidElement(d)&&(d=a.a.cloneElement(d,{ref:Object(x.a)(d.ref,p)})),d}));ut.displayName="Align";var ft=ut,pt=n("o0o1"),dt=n.n(pt),mt=n("HaE+"),vt=["measure","align",null,"motion"],ht=o.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,i=e.style,c=e.children,l=e.zIndex,s=e.stretch,u=e.destroyPopupOnHide,f=e.align,p=e.point,d=e.getRootDomNode,m=e.getClassNameFromAlign,v=e.onAlign,h=e.onMouseEnter,b=e.onMouseLeave,y=e.onMouseDown,O=e.onTouchStart,C=Object(o.useRef)(),w=Object(o.useRef)(),x=Object(o.useState)(),I=Object(j.a)(x,2),M=I[0],N=I[1],S=function(e){var t=o.useState({width:0,height:0}),n=Object(j.a)(t,2),r=n[0],a=n[1];return[o.useMemo((function(){var t={};if(e){var n=r.width,o=r.height;-1!==e.indexOf("height")&&o?t.height=o:-1!==e.indexOf("minHeight")&&o&&(t.minHeight=o),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(s),A=Object(j.a)(S,2),k=A[0],P=A[1];var T=function(e,t){var n=Object(o.useState)(null),r=Object(j.a)(n,2),a=r[0],i=r[1],c=Object(o.useRef)(),l=Object(o.useRef)(!1);function s(e){l.current||i(e)}function u(){Z.a.cancel(c.current)}return Object(o.useEffect)((function(){s("measure")}),[e]),Object(o.useEffect)((function(){switch(a){case"measure":t()}a&&(c.current=Object(Z.a)(Object(mt.a)(dt.a.mark((function e(){var t,n;return dt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=vt.indexOf(a),(n=vt[t+1])&&-1!==t&&s(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(o.useEffect)((function(){return function(){l.current=!0,u()}}),[]),[a,function(e){u(),c.current=Object(Z.a)((function(){s((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){s&&P(d())})),D=Object(j.a)(T,2),R=D[0],z=D[1],L=Object(o.useRef)();function F(){var e;null===(e=C.current)||void 0===e||e.forceAlign()}function V(e,t){if("align"===R){var n=m(t);N(n),M!==n?Promise.resolve().then((function(){F()})):z((function(){var e;null===(e=L.current)||void 0===e||e.call(L)})),null==v||v(e,t)}}var U=Object(K.a)({},re(e));function B(){return new Promise((function(e){L.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=U[e];U[e]=function(e,n){return z(),null==t?void 0:t(e,n)}})),o.useEffect((function(){U.motionName||"motion"!==R||z()}),[U.motionName,R]),o.useImperativeHandle(t,(function(){return{forceAlign:F,getElement:function(){return w.current}}}));var H=Object(K.a)(Object(K.a)(Object(K.a)({},k),{},{zIndex:l},i),{},{opacity:"motion"!==R&&"stable"!==R&&n?0:void 0,pointerEvents:"stable"===R?void 0:"none"}),Q=!0;!(null==f?void 0:f.points)||"align"!==R&&"stable"!==R||(Q=!1);var W=c;return o.Children.count(c)>1&&(W=o.createElement("div",{className:"".concat(r,"-content")},c)),o.createElement(ne.b,Object(g.a)({visible:n,ref:w,leavedClassName:"".concat(r,"-hidden")},U,{onAppearPrepare:B,onEnterPrepare:B,removeOnLeave:u}),(function(e,t){var n=e.className,i=e.style,c=E()(r,a,M,n);return o.createElement(ft,{target:p||d,key:"popup",ref:C,monitorWindowResize:!0,disabled:Q,align:f,onAlign:V},o.createElement("div",{ref:t,className:c,onMouseEnter:h,onMouseLeave:b,onMouseDown:y,onTouchStart:O,style:Object(K.a)(Object(K.a)({},i),H)},W))}))}));ht.displayName="PopupInner";var bt=ht,gt=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,a=e.zIndex,i=e.children,c=e.mobile,l=(c=void 0===c?{}:c).popupClassName,s=c.popupStyle,u=c.popupMotion,f=void 0===u?{}:u,p=c.popupRender,d=o.useRef();o.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return d.current}}}));var m=Object(K.a)({zIndex:a},s),v=i;return o.Children.count(i)>1&&(v=o.createElement("div",{className:"".concat(n,"-content")},i)),p&&(v=p(v)),o.createElement(ne.b,Object(g.a)({visible:r,ref:d,removeOnLeave:!0},f),(function(e,t){var r=e.className,a=e.style,i=E()(n,l,r);return o.createElement("div",{ref:t,className:i,style:Object(K.a)(Object(K.a)({},a),m)},v)}))}));gt.displayName="MobilePopupInner";var yt=gt,Ot=o.forwardRef((function(e,t){var n=e.visible,r=e.mobile,a=Object(V.a)(e,["visible","mobile"]),i=Object(o.useState)(n),c=Object(j.a)(i,2),l=c[0],s=c[1],u=Object(o.useState)(!1),f=Object(j.a)(u,2),p=f[0],d=f[1],m=Object(K.a)(Object(K.a)({},a),{},{visible:l});Object(o.useEffect)((function(){s(n),n&&r&&d(te())}),[n,r]);var v=p?o.createElement(yt,Object(g.a)({},m,{mobile:r,ref:t})):o.createElement(bt,Object(g.a)({},m,{ref:t}));return o.createElement("div",null,o.createElement(oe,m),v)}));Ot.displayName="Popup";var jt=Ot,Ct=o.createContext(null);function Et(){}function wt(){return""}function xt(e){return e?e.ownerDocument:window.document}var It=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var Mt,Nt,St=(Mt=$,(Nt=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r,a;return Object(U.a)(this,n),(r=t.call(this,e)).popupRef=o.createRef(),r.triggerRef=o.createRef(),r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Y(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),o=r.getPopupDomNode();Y(n,t)||Y(o,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(q.a)(r.triggerRef.current);if(t)return t}catch(n){}return G.a.findDOMNode(Object(H.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,o=n.popupPlacement,a=n.builtinPlacements,i=n.prefixCls,c=n.alignPoint,l=n.getPopupClassNameFromAlign;return o&&a&&t.push(function(e,t,n,r){for(var o=n.points,a=Object.keys(e),i=0;i<a.length;i+=1){var c=a[i];if(ee(e[c].points,o,r))return"".concat(t,"-placement-").concat(c)}return""}(a,i,e,c)),l&&t.push(l(e)),t.join(" ")},r.getComponent=function(){var e=r.props,t=e.prefixCls,n=e.destroyPopupOnHide,a=e.popupClassName,i=e.onPopupAlign,c=e.popupMotion,l=e.popupAnimation,s=e.popupTransitionName,u=e.popupStyle,f=e.mask,p=e.maskAnimation,d=e.maskTransitionName,m=e.maskMotion,v=e.zIndex,h=e.popup,b=e.stretch,y=e.alignPoint,O=e.mobile,j=r.state,C=j.popupVisible,E=j.point,w=r.getPopupAlign(),x={};return r.isMouseEnterToShow()&&(x.onMouseEnter=r.onPopupMouseEnter),r.isMouseLeaveToHide()&&(x.onMouseLeave=r.onPopupMouseLeave),x.onMouseDown=r.onPopupMouseDown,x.onTouchStart=r.onPopupMouseDown,o.createElement(jt,Object(g.a)({prefixCls:t,destroyPopupOnHide:n,visible:C,point:y&&E,className:a,align:w,onAlign:i,animation:l,getClassNameFromAlign:r.getPopupClassNameFromAlign},x,{stretch:b,getRootDomNode:r.getRootDomNode,style:u,mask:f,zIndex:v,transitionName:s,maskAnimation:p,maskTransitionName:d,maskMotion:m,ref:r.popupRef,motion:c,mobile:O}),"function"==typeof h?h():h)},r.attachParent=function(e){Z.a.cancel(r.attachId);var t,n=r.props,o=n.getPopupContainer,a=n.getDocument,i=r.getRootDomNode();o?(i||0===o.length)&&(t=o(i)):t=a(r.getRootDomNode()).body,t?t.appendChild(e):r.attachId=Object(Z.a)((function(){r.attachParent(e)}))},r.getContainer=function(){var e=(0,r.props.getDocument)(r.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",r.attachParent(e),e},r.setPoint=function(e){r.props.alignPoint&&e&&r.setState({point:{pageX:e.pageX,pageY:e.pageY}})},r.handlePortalUpdate=function(){r.state.prevPopupVisible!==r.state.popupVisible&&r.props.afterPopupVisibleChange(r.state.popupVisible)},a="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,r.state={prevPopupVisible:a,popupVisible:a},It.forEach((function(e){r["fire".concat(e)]=function(t){r.fireEvents(e,t)}})),r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(X.a)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(X.a)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(X.a)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(X.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Z.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return Object(K.a)(Object(K.a)({},r),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,o=1e3*t;if(this.clearDelayTimer(),o){var a=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,a),r.clearDelayTimer()}),o)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,a=t.alignPoint,i=t.className,c=t.autoDestroy,l=o.Children.only(n),s={key:"trigger"};this.isContextMenuToShow()?s.onContextMenu=this.onContextMenu:s.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(s.onClick=this.onClick,s.onMouseDown=this.onMouseDown,s.onTouchStart=this.onTouchStart):(s.onClick=this.createTwoChains("onClick"),s.onMouseDown=this.createTwoChains("onMouseDown"),s.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(s.onMouseEnter=this.onMouseEnter,a&&(s.onMouseMove=this.onMouseMove)):s.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?s.onMouseLeave=this.onMouseLeave:s.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(s.onFocus=this.onFocus,s.onBlur=this.onBlur):(s.onFocus=this.createTwoChains("onFocus"),s.onBlur=this.createTwoChains("onBlur"));var u=E()(l&&l.props&&l.props.className,i);u&&(s.className=u);var f=Object(K.a)({},s);Object(x.c)(l)&&(f.ref=Object(x.a)(this.triggerRef,l.ref));var p,d=o.cloneElement(l,f);return(e||this.popupRef.current||r)&&(p=o.createElement(Mt,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&c&&(p=null),o.createElement(Ct.Provider,{value:{onPopupMouseDown:this.onPopupMouseDown}},d,p)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),n}(o.Component)).contextType=Ct,Nt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:wt,getDocument:xt,onPopupVisibleChange:Et,afterPopupVisibleChange:Et,onPopupAlign:Et,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Nt),At={adjustX:1,adjustY:1},kt=[0,0],Pt={left:{points:["cr","cl"],overflow:At,offset:[-4,0],targetOffset:kt},right:{points:["cl","cr"],overflow:At,offset:[4,0],targetOffset:kt},top:{points:["bc","tc"],overflow:At,offset:[0,-4],targetOffset:kt},bottom:{points:["tc","bc"],overflow:At,offset:[0,4],targetOffset:kt},topLeft:{points:["bl","tl"],overflow:At,offset:[0,-4],targetOffset:kt},leftTop:{points:["tr","tl"],overflow:At,offset:[-4,0],targetOffset:kt},topRight:{points:["br","tr"],overflow:At,offset:[0,-4],targetOffset:kt},rightTop:{points:["tl","tr"],overflow:At,offset:[4,0],targetOffset:kt},bottomRight:{points:["tr","br"],overflow:At,offset:[0,4],targetOffset:kt},rightBottom:{points:["bl","br"],overflow:At,offset:[4,0],targetOffset:kt},bottomLeft:{points:["tl","bl"],overflow:At,offset:[0,4],targetOffset:kt},leftBottom:{points:["br","bl"],overflow:At,offset:[-4,0],targetOffset:kt}},Tt=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:a},"function"==typeof t?t():t)},Dt=function(e,t){var n=e.overlayClassName,r=e.trigger,a=void 0===r?["hover"]:r,i=e.mouseEnterDelay,c=void 0===i?0:i,l=e.mouseLeaveDelay,s=void 0===l?.1:l,u=e.overlayStyle,f=e.prefixCls,p=void 0===f?"rc-tooltip":f,d=e.children,m=e.onVisibleChange,v=e.afterVisibleChange,h=e.transitionName,b=e.animation,y=e.motion,j=e.placement,C=void 0===j?"right":j,E=e.align,w=void 0===E?{}:E,x=e.destroyTooltipOnHide,I=void 0!==x&&x,M=e.defaultVisible,N=e.getTooltipContainer,S=e.overlayInnerStyle,A=Object(V.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),k=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return k.current}));var P=Object(K.a)({},A);"visible"in e&&(P.popupVisible=e.visible);var T=!1,D=!1;if("boolean"==typeof I)T=I;else if(I&&"object"===Object(O.a)(I)){var R=I.keepParent;T=!0===R,D=!1===R}return o.createElement(St,Object(g.a)({popupClassName:n,prefixCls:p,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,a=e.id;return[o.createElement("div",{className:"".concat(p,"-arrow"),key:"arrow"},n),o.createElement(Tt,{key:"content",prefixCls:p,id:a,overlay:r,overlayInnerStyle:S})]},action:a,builtinPlacements:Pt,popupPlacement:C,ref:k,popupAlign:w,getPopupContainer:N,onPopupVisibleChange:m,afterPopupVisibleChange:v,popupTransitionName:h,popupAnimation:b,popupMotion:y,defaultPopupVisible:M,destroyPopupOnHide:T,autoDestroy:D,mouseLeaveDelay:s,popupStyle:u,mouseEnterDelay:c},P),d)},Rt=Object(o.forwardRef)(Dt);function zt(e,t){var n=t||{},r=n.defaultValue,a=n.value,i=n.onChange,c=n.postState,l=o.useState((function(){return void 0!==a?a:void 0!==r?"function"==typeof r?r():r:"function"==typeof e?e():e})),s=Object(j.a)(l,2),u=s[0],f=s[1],p=void 0!==a?a:u;c&&(p=c(p));var d=o.useRef(!0);return o.useEffect((function(){d.current?d.current=!1:void 0===a&&f(a)}),[a]),[p,function(e){f(e),p!==e&&i&&i(e,p)}]}var Lt={adjustX:1,adjustY:1},Ft={adjustX:0,adjustY:0},Kt=[0,0];function Vt(e){return"boolean"==typeof e?e?Lt:Ft:Object(g.a)(Object(g.a)({},Ft),e)}var Ut=n("CWQg"),Bt=(Object(Ut.a)("success","processing","error","default","warning"),Object(Ut.a)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")),Ht=function(e,t,n){return void 0!==n?n:"".concat(e,"-").concat(t)},Qt=new RegExp("^(".concat(Bt.join("|"),")(-inverse)?$"));function Wt(e,t){var n=e.type;if((!0===n.__ANT_BUTTON||!0===n.__ANT_SWITCH||!0===n.__ANT_CHECKBOX||"button"===e.type)&&e.props.disabled){var r=function(e,t){var n={},r=Object(g.a)({},e);return t.forEach((function(t){e&&t in e&&(n[t]=e[t],delete r[t])})),{picked:n,omitted:r}}(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),a=r.picked,i=r.omitted,c=Object(g.a)(Object(g.a)({display:"inline-block"},a),{cursor:"not-allowed",width:e.props.block?"100%":null}),l=Object(g.a)(Object(g.a)({},i),{pointerEvents:"none"}),s=Object(F.a)(e,{style:l,className:null});return o.createElement("span",{style:c,className:E()(e.props.className,"".concat(t,"-disabled-compatible-wrapper"))},s)}return e}var Jt=o.forwardRef((function(e,t){var n,r=o.useContext(I.b),a=r.getPopupContainer,i=r.getPrefixCls,c=r.direction,l=zt(!1,{value:e.visible,defaultValue:e.defaultVisible}),s=Object(j.a)(l,2),u=s[0],f=s[1],p=function(){var t=e.title,n=e.overlay;return!t&&!n&&0!==t},d=function(){var t=e.builtinPlacements,n=e.arrowPointAtCenter,r=e.autoAdjustOverflow;return t||function(e){var t=e.arrowWidth,n=void 0===t?5:t,r=e.horizontalArrowShift,o=void 0===r?16:r,a=e.verticalArrowShift,i=void 0===a?8:a,c=e.autoAdjustOverflow,l={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(o+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(i+n)]},topRight:{points:["br","tc"],offset:[o+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(i+n)]},bottomRight:{points:["tr","bc"],offset:[o+n,4]},rightBottom:{points:["bl","cr"],offset:[4,i+n]},bottomLeft:{points:["tl","bc"],offset:[-(o+n),4]},leftBottom:{points:["br","cl"],offset:[-4,i+n]}};return Object.keys(l).forEach((function(t){l[t]=e.arrowPointAtCenter?Object(g.a)(Object(g.a)({},l[t]),{overflow:Vt(c),targetOffset:Kt}):Object(g.a)(Object(g.a)({},Pt[t]),{overflow:Vt(c)}),l[t].ignoreShake=!0})),l}({arrowPointAtCenter:n,autoAdjustOverflow:r})},m=e.prefixCls,v=e.openClassName,h=e.getPopupContainer,b=e.getTooltipContainer,O=e.overlayClassName,C=e.color,w=e.overlayInnerStyle,x=e.children,M=i("tooltip",m),N=i(),S=u;!("visible"in e)&&p()&&(S=!1);var A,k,P,T=Wt(Object(F.b)(x)?x:o.createElement("span",null,x),M),D=T.props,R=E()(D.className,Object(y.a)({},v||"".concat(M,"-open"),!0)),z=E()(O,(n={},Object(y.a)(n,"".concat(M,"-rtl"),"rtl"===c),Object(y.a)(n,"".concat(M,"-").concat(C),C&&Qt.test(C)),n)),L=w;return C&&!Qt.test(C)&&(L=Object(g.a)(Object(g.a)({},w),{background:C}),A={background:C}),o.createElement(Rt,Object(g.a)({},e,{prefixCls:M,overlayClassName:z,getTooltipContainer:h||b||a,ref:t,builtinPlacements:d(),overlay:(k=e.title,P=e.overlay,0===k?k:P||k||""),visible:S,onVisibleChange:function(t){var n;f(!p()&&t),p()||null===(n=e.onVisibleChange)||void 0===n||n.call(e,t)},onPopupAlign:function(e,t){var n=d(),r=Object.keys(n).filter((function(e){return n[e].points[0]===t.points[0]&&n[e].points[1]===t.points[1]}))[0];if(r){var o=e.getBoundingClientRect(),a={top:"50%",left:"50%"};r.indexOf("top")>=0||r.indexOf("Bottom")>=0?a.top="".concat(o.height-t.offset[1],"px"):(r.indexOf("Top")>=0||r.indexOf("bottom")>=0)&&(a.top="".concat(-t.offset[1],"px")),r.indexOf("left")>=0||r.indexOf("Right")>=0?a.left="".concat(o.width-t.offset[0],"px"):(r.indexOf("right")>=0||r.indexOf("Left")>=0)&&(a.left="".concat(-t.offset[0],"px")),e.style.transformOrigin="".concat(a.left," ").concat(a.top)}},overlayInnerStyle:L,arrowContent:o.createElement("span",{className:"".concat(M,"-arrow-content"),style:A}),motion:{motionName:Ht(N,"zoom-big-fast",e.transitionName),motionDeadline:1e3}}),S?Object(F.a)(T,{className:R}):T)}));Jt.displayName="Tooltip",Jt.defaultProps={placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0};var Gt=Jt,Zt=function(e){return e?"function"==typeof e?e():e:null},Yt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},qt=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.title,a=e.content,i=Yt(e,["prefixCls","title","content"]),c=o.useContext(I.b).getPrefixCls,l=c("popover",n),s=c();return o.createElement(Gt,Object(g.a)({},i,{prefixCls:l,ref:t,overlay:function(e){return o.createElement(o.Fragment,null,r&&o.createElement("div",{className:"".concat(e,"-title")},Zt(r)),o.createElement("div",{className:"".concat(e,"-inner-content")},Zt(a)))}(l),transitionName:Ht(s,"zoom-big",i.transitionName)}))}));qt.displayName="Popover",qt.defaultProps={placement:"top",trigger:"hover",mouseEnterDelay:.1,mouseLeaveDelay:.1,overlayStyle:{}};var Xt=qt,_t=function(e){var t=o.useContext(I.b),n=t.getPrefixCls,r=t.direction,a=e.prefixCls,i=e.className,c=void 0===i?"":i,l=e.maxCount,s=e.maxStyle,u=e.size,f=n("avatar-group",a),p=E()(f,Object(y.a)({},"".concat(f,"-rtl"),"rtl"===r),c),d=e.children,m=e.maxPopoverPlacement,v=void 0===m?"top":m,h=Object(L.a)(d).map((function(e,t){return Object(F.a)(e,{key:"avatar-key-".concat(t)})})),b=h.length;if(l&&l<b){var g=h.slice(0,l),O=h.slice(l,b);return g.push(o.createElement(Xt,{key:"avatar-popover-key",content:O,trigger:"hover",placement:v,overlayClassName:"".concat(f,"-popover")},o.createElement(z,{style:s},"+".concat(b-l)))),o.createElement(k,{size:u},o.createElement("div",{className:p,style:e.style},g))}return o.createElement(k,{size:u},o.createElement("div",{className:p,style:e.style},h))},$t=z;$t.Group=_t;var en=$t,tn=(n("HdAM"),n("BUzJ"),n("RXDR"),n("L/Qf"),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}),nn=function(e,t){var n=e.prefixCls,r=e.component,a=void 0===r?"article":r,i=e.className,c=e["aria-label"],l=e.setContentRef,s=e.children,u=tn(e,["prefixCls","component","className","aria-label","setContentRef","children"]),f=t;return l&&(Object(M.a)(!1,"Typography","`setContentRef` is deprecated. Please use `ref` instead."),f=Object(x.a)(t,l)),o.createElement(I.a,null,(function(e){var t=e.getPrefixCls,r=e.direction,l=a,p=t("typography",n),d=E()(p,Object(y.a)({},"".concat(p,"-rtl"),"rtl"===r),i);return o.createElement(l,Object(g.a)({className:d,"aria-label":c,ref:f},u),s)}))},rn=o.forwardRef(nn);rn.displayName="Typography";var on=rn,an=n("bT9E"),cn=n("KQm4"),ln=n("+QRC"),sn=n.n(ln),un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},fn=n("6VBw"),pn=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:un}))};pn.displayName="EditOutlined";var dn=o.forwardRef(pn),mn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},vn=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:mn}))};vn.displayName="CheckOutlined";var hn=o.forwardRef(vn),bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},gn=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:bn}))};gn.displayName="CopyOutlined";var yn=o.forwardRef(gn),On=n("wEI+"),jn=n("YMnH"),Cn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Cn.F1&&t<=Cn.F12)return!1;switch(t){case Cn.ALT:case Cn.CAPS_LOCK:case Cn.CONTEXT_MENU:case Cn.CTRL:case Cn.DOWN:case Cn.END:case Cn.ESC:case Cn.HOME:case Cn.INSERT:case Cn.LEFT:case Cn.MAC_FF_META:case Cn.META:case Cn.NUMLOCK:case Cn.NUM_CENTER:case Cn.PAGE_DOWN:case Cn.PAGE_UP:case Cn.PAUSE:case Cn.PRINT_SCREEN:case Cn.RIGHT:case Cn.SHIFT:case Cn.UP:case Cn.WIN_KEY:case Cn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Cn.ZERO&&e<=Cn.NINE)return!0;if(e>=Cn.NUM_ZERO&&e<=Cn.NUM_MULTIPLY)return!0;if(e>=Cn.A&&e<=Cn.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Cn.SPACE:case Cn.QUESTION_MARK:case Cn.NUM_PLUS:case Cn.NUM_MINUS:case Cn.NUM_PERIOD:case Cn.NUM_DIVISION:case Cn.SEMICOLON:case Cn.DASH:case Cn.EQUALS:case Cn.COMMA:case Cn.PERIOD:case Cn.SLASH:case Cn.APOSTROPHE:case Cn.SINGLE_QUOTE:case Cn.OPEN_SQUARE_BRACKET:case Cn.BACKSLASH:case Cn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},En=Cn,wn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},xn={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},In=o.forwardRef((function(e,t){var n=e.style,r=e.noStyle,a=e.disabled,i=wn(e,["style","noStyle","disabled"]),c={};return r||(c=Object(g.a)({},xn)),a&&(c.pointerEvents="none"),c=Object(g.a)(Object(g.a)({},c),n),o.createElement("div",Object(g.a)({role:"button",tabIndex:0,ref:t},i,{onKeyDown:function(e){e.keyCode===En.ENTER&&e.preventDefault()},onKeyUp:function(t){var n=t.keyCode,r=e.onClick;n===En.ENTER&&r&&r()},style:c}))})),Mn=n("oHiP"),Nn=n("R3zJ"),Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},An=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Sn}))};An.displayName="EnterOutlined";var kn,Pn,Tn=o.forwardRef(An),Dn="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",Rn=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"],zn={};function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&zn[n])return zn[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),i=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c=Rn.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:c,paddingSize:a,borderSize:i,boxSizing:o};return t&&n&&(zn[n]=l),l}!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(Pn||(Pn={}));var Fn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;return Object(U.a)(this,n),(r=t.call(this,e)).saveTextArea=function(e){r.textArea=e},r.handleResize=function(e){var t=r.state.resizeStatus,n=r.props,o=n.autoSize,a=n.onResize;t===Pn.NONE&&("function"==typeof a&&a(e),o&&r.resizeOnNextFrame())},r.resizeOnNextFrame=function(){cancelAnimationFrame(r.nextFrameActionId),r.nextFrameActionId=requestAnimationFrame(r.resizeTextarea)},r.resizeTextarea=function(){var e=r.props.autoSize;if(e&&r.textArea){var t=e.minRows,n=e.maxRows,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;kn||((kn=document.createElement("textarea")).setAttribute("tab-index","-1"),kn.setAttribute("aria-hidden","true"),document.body.appendChild(kn)),e.getAttribute("wrap")?kn.setAttribute("wrap",e.getAttribute("wrap")):kn.removeAttribute("wrap");var o=Ln(e,t),a=o.paddingSize,i=o.borderSize,c=o.boxSizing,l=o.sizingStyle;kn.setAttribute("style","".concat(l,";").concat(Dn)),kn.value=e.value||e.placeholder||"";var s,u=Number.MIN_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER,p=kn.scrollHeight;if("border-box"===c?p+=i:"content-box"===c&&(p-=a),null!==n||null!==r){kn.value=" ";var d=kn.scrollHeight-a;null!==n&&(u=d*n,"border-box"===c&&(u=u+a+i),p=Math.max(u,p)),null!==r&&(f=d*r,"border-box"===c&&(f=f+a+i),s=p>f?"":"hidden",p=Math.min(f,p))}return{height:p,minHeight:u,maxHeight:f,overflowY:s,resize:"none"}}(r.textArea,!1,t,n);r.setState({textareaStyles:o,resizeStatus:Pn.RESIZING},(function(){cancelAnimationFrame(r.resizeFrameId),r.resizeFrameId=requestAnimationFrame((function(){r.setState({resizeStatus:Pn.RESIZED},(function(){r.resizeFrameId=requestAnimationFrame((function(){r.setState({resizeStatus:Pn.NONE}),r.fixFirefoxAutoScroll()}))}))}))}))}},r.renderTextArea=function(){var e=r.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,a=e.autoSize,i=e.onResize,c=e.className,l=e.disabled,s=r.state,u=s.textareaStyles,f=s.resizeStatus,p=Object(an.a)(r.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),d=E()(n,c,Object(y.a)({},"".concat(n,"-disabled"),l));"value"in p&&(p.value=p.value||"");var m=Object(K.a)(Object(K.a)(Object(K.a)({},r.props.style),u),f===Pn.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return o.createElement(w.a,{onResize:r.handleResize,disabled:!(a||i)},o.createElement("textarea",Object(g.a)({},p,{className:d,style:m,ref:r.saveTextArea})))},r.state={textareaStyles:{},resizeStatus:Pn.NONE},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.resizeTextarea()}},{key:"componentDidUpdate",value:function(e){e.value!==this.props.value&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(n){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(o.Component),Kn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,o=t.onKeyDown;13===e.keyCode&&n&&n(e),o&&o(e)};var o=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:o},r}return Object(B.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return o.createElement(Fn,Object(g.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(o.Component),Vn=n("jN4g"),Un=n("3Nzz");function Bn(e){return null==e?"":e}function Hn(e,t,n){if(n){var r=t;if("click"===t.type){(r=Object.create(t)).target=e,r.currentTarget=e;var o=e.value;return e.value="",n(r),void(e.value=o)}n(r)}}function Qn(e,t,n,r,o){var a;return E()(e,(a={},Object(y.a)(a,"".concat(e,"-sm"),"small"===n),Object(y.a)(a,"".concat(e,"-lg"),"large"===n),Object(y.a)(a,"".concat(e,"-disabled"),r),Object(y.a)(a,"".concat(e,"-rtl"),"rtl"===o),Object(y.a)(a,"".concat(e,"-borderless"),!t),a))}function Wn(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var Jn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).direction="ltr",r.focus=function(e){Wn(r.input,e)},r.saveClearableInput=function(e){r.clearableInput=e},r.saveInput=function(e){r.input=e},r.onFocus=function(e){var t=r.props.onFocus;r.setState({focused:!0},r.clearPasswordValueAttribute),null==t||t(e)},r.onBlur=function(e){var t=r.props.onBlur;r.setState({focused:!1},r.clearPasswordValueAttribute),null==t||t(e)},r.handleReset=function(e){r.setValue("",(function(){r.focus()})),Hn(r.input,e,r.props.onChange)},r.renderInput=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.props,c=i.className,l=i.addonBefore,s=i.addonAfter,u=i.size,f=i.disabled,p=Object(an.a)(r.props,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","inputType","bordered"]);return o.createElement("input",Object(g.a)({autoComplete:a.autoComplete},p,{onChange:r.handleChange,onFocus:r.onFocus,onBlur:r.onBlur,onKeyDown:r.handleKeyDown,className:E()(Qn(e,n,u||t,f,r.direction),Object(y.a)({},c,c&&!l&&!s)),ref:r.saveInput}))},r.clearPasswordValueAttribute=function(){r.removePasswordTimeout=setTimeout((function(){r.input&&"password"===r.input.getAttribute("type")&&r.input.hasAttribute("value")&&r.input.removeAttribute("value")}))},r.handleChange=function(e){r.setValue(e.target.value,r.clearPasswordValueAttribute),Hn(r.input,e,r.props.onChange)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,o=t.onKeyDown;n&&13===e.keyCode&&n(e),null==o||o(e)},r.renderComponent=function(e){var t=e.getPrefixCls,n=e.direction,a=e.input,i=r.state,c=i.value,l=i.focused,s=r.props,u=s.prefixCls,f=s.bordered,p=void 0===f||f,d=t("input",u);return r.direction=n,o.createElement(Un.b.Consumer,null,(function(e){return o.createElement(Xn,Object(g.a)({size:e},r.props,{prefixCls:d,inputType:"input",value:Bn(c),element:r.renderInput(d,e,p,a),handleReset:r.handleReset,ref:r.saveClearableInput,direction:n,focused:l,triggerFocus:r.focus,bordered:p}))}))};var a=void 0===e.value?e.defaultValue:e.value;return r.state={value:a,focused:!1,prevValue:e.value},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.clearPasswordValueAttribute()}},{key:"componentDidUpdate",value:function(){}},{key:"getSnapshotBeforeUpdate",value:function(e){return Zn(e)!==Zn(this.props)&&Object(M.a)(this.input!==document.activeElement,"Input","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),null}},{key:"componentWillUnmount",value:function(){this.removePasswordTimeout&&clearTimeout(this.removePasswordTimeout)}},{key:"blur",value:function(){this.input.blur()}},{key:"setSelectionRange",value:function(e,t,n){this.input.setSelectionRange(e,t,n)}},{key:"select",value:function(){this.input.select()}},{key:"setValue",value:function(e,t){void 0===this.props.value?this.setState({value:e},t):null==t||t()}},{key:"render",value:function(){return o.createElement(I.a,null,this.renderComponent)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevValue,r={prevValue:e.value};return void 0===e.value&&n===e.value||(r.value=e.value),r}}]),n}(o.Component);Jn.defaultProps={type:"text"};var Gn=Object(Ut.a)("text","input");function Zn(e){return!!(e.prefix||e.suffix||e.allowClear)}function Yn(e){return!(!e.addonBefore&&!e.addonAfter)}var qn,Xn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).containerRef=o.createRef(),e.onInputMouseUp=function(t){var n;if(null===(n=e.containerRef.current)||void 0===n?void 0:n.contains(t.target)){var r=e.props.triggerFocus;null==r||r()}},e}return Object(B.a)(n,[{key:"renderClearIcon",value:function(e){var t=this.props,n=t.allowClear,r=t.value,a=t.disabled,i=t.readOnly,c=t.handleReset;if(!n)return null;var l=!a&&!i&&r,s="".concat(e,"-clear-icon");return o.createElement(Vn.a,{onClick:c,className:E()(Object(y.a)({},"".concat(s,"-hidden"),!l),s),role:"button"})}},{key:"renderSuffix",value:function(e){var t=this.props,n=t.suffix,r=t.allowClear;return n||r?o.createElement("span",{className:"".concat(e,"-suffix")},this.renderClearIcon(e),n):null}},{key:"renderLabeledIcon",value:function(e,t){var n,r=this.props,a=r.focused,i=r.value,c=r.prefix,l=r.className,s=r.size,u=r.suffix,f=r.disabled,p=r.allowClear,d=r.direction,m=r.style,v=r.readOnly,h=r.bordered,b=this.renderSuffix(e);if(!Zn(this.props))return Object(F.a)(t,{value:i});var g=c?o.createElement("span",{className:"".concat(e,"-prefix")},c):null,O=E()("".concat(e,"-affix-wrapper"),(n={},Object(y.a)(n,"".concat(e,"-affix-wrapper-focused"),a),Object(y.a)(n,"".concat(e,"-affix-wrapper-disabled"),f),Object(y.a)(n,"".concat(e,"-affix-wrapper-sm"),"small"===s),Object(y.a)(n,"".concat(e,"-affix-wrapper-lg"),"large"===s),Object(y.a)(n,"".concat(e,"-affix-wrapper-input-with-clear-btn"),u&&p&&i),Object(y.a)(n,"".concat(e,"-affix-wrapper-rtl"),"rtl"===d),Object(y.a)(n,"".concat(e,"-affix-wrapper-readonly"),v),Object(y.a)(n,"".concat(e,"-affix-wrapper-borderless"),!h),Object(y.a)(n,"".concat(l),!Yn(this.props)&&l),n));return o.createElement("span",{ref:this.containerRef,className:O,style:m,onMouseUp:this.onInputMouseUp},g,Object(F.a)(t,{style:null,value:i,className:Qn(e,h,s,f)}),b)}},{key:"renderInputWithLabel",value:function(e,t){var n,r=this.props,a=r.addonBefore,i=r.addonAfter,c=r.style,l=r.size,s=r.className,u=r.direction;if(!Yn(this.props))return t;var f="".concat(e,"-group"),p="".concat(f,"-addon"),d=a?o.createElement("span",{className:p},a):null,m=i?o.createElement("span",{className:p},i):null,v=E()("".concat(e,"-wrapper"),f,Object(y.a)({},"".concat(f,"-rtl"),"rtl"===u)),h=E()("".concat(e,"-group-wrapper"),(n={},Object(y.a)(n,"".concat(e,"-group-wrapper-sm"),"small"===l),Object(y.a)(n,"".concat(e,"-group-wrapper-lg"),"large"===l),Object(y.a)(n,"".concat(e,"-group-wrapper-rtl"),"rtl"===u),n),s);return o.createElement("span",{className:h,style:c},o.createElement("span",{className:v},d,Object(F.a)(t,{style:null}),m))}},{key:"renderTextAreaWithClearIcon",value:function(e,t){var n,r=this.props,a=r.value,i=r.allowClear,c=r.className,l=r.style,s=r.direction,u=r.bordered;if(!i)return Object(F.a)(t,{value:a});var f=E()("".concat(e,"-affix-wrapper"),"".concat(e,"-affix-wrapper-textarea-with-clear-btn"),(n={},Object(y.a)(n,"".concat(e,"-affix-wrapper-rtl"),"rtl"===s),Object(y.a)(n,"".concat(e,"-affix-wrapper-borderless"),!u),Object(y.a)(n,"".concat(c),!Yn(this.props)&&c),n));return o.createElement("span",{className:f,style:l},Object(F.a)(t,{style:null,value:a}),this.renderClearIcon(e))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.inputType,r=e.element;return n===Gn[0]?this.renderTextAreaWithClearIcon(t,r):this.renderInputWithLabel(t,this.renderLabeledIcon(t,r))}}]),n}(o.Component),_n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},$n=o.forwardRef((function(e,t){var n,r=e.prefixCls,a=e.bordered,i=void 0===a||a,c=e.showCount,l=void 0!==c&&c,s=e.maxLength,u=e.className,f=e.style,p=e.size,d=_n(e,["prefixCls","bordered","showCount","maxLength","className","style","size"]),m=o.useContext(I.b),v=m.getPrefixCls,h=m.direction,b=o.useContext(Un.b),C=o.useRef(null),w=o.useRef(null),x=zt(d.defaultValue,{value:d.value}),M=Object(j.a)(x,2),N=M[0],S=M[1],A=o.useRef(d.value);o.useEffect((function(){void 0===d.value&&A.current===d.value||(S(d.value),A.current=d.value)}),[d.value,A.current]);var k=function(e,t){void 0===d.value&&(S(e),null==t||t())},P=v("input",r);o.useImperativeHandle(t,(function(){var e;return{resizableTextArea:null===(e=C.current)||void 0===e?void 0:e.resizableTextArea,focus:function(e){var t,n;Wn(null===(n=null===(t=C.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:function(){var e;return null===(e=C.current)||void 0===e?void 0:e.blur()}}}));var T=o.createElement(Kn,Object(g.a)({},Object(an.a)(d,["allowClear"]),{maxLength:s,className:E()((n={},Object(y.a)(n,"".concat(P,"-borderless"),!i),Object(y.a)(n,u,u&&!l),Object(y.a)(n,"".concat(P,"-sm"),"small"===b||"small"===p),Object(y.a)(n,"".concat(P,"-lg"),"large"===b||"large"===p),n)),style:l?void 0:f,prefixCls:P,onChange:function(e){k(e.target.value),Hn(C.current,e,d.onChange)},ref:C})),D=Bn(N),R=Number(s)>0;D=R?Object(cn.a)(D).slice(0,s).join(""):D;var z=o.createElement(Xn,Object(g.a)({},d,{prefixCls:P,direction:h,inputType:"text",value:D,element:T,handleReset:function(e){k("",(function(){var e;null===(e=C.current)||void 0===e||e.focus()})),Hn(C.current,e,d.onChange)},ref:w,bordered:i}));if(l){var L=Math.min(D.length,null!=s?s:1/0),F="";return F="object"===Object(O.a)(l)?l.formatter({count:L,maxLength:s}):"".concat(L).concat(R?" / ".concat(s):""),o.createElement("div",{className:E()("".concat(P,"-textarea"),Object(y.a)({},"".concat(P,"-textarea-rtl"),"rtl"===h),"".concat(P,"-textarea-show-count"),u),style:f,"data-count":F},z)}return z})),er=function(e){var t=e.prefixCls,n=e["aria-label"],r=e.className,a=e.style,i=e.direction,c=e.maxLength,l=e.autoSize,s=void 0===l||l,u=e.value,f=e.onSave,p=e.onCancel,d=e.onEnd,m=o.useRef(),v=o.useRef(!1),h=o.useRef(),b=o.useState(u),g=Object(j.a)(b,2),O=g[0],C=g[1];o.useEffect((function(){C(u)}),[u]),o.useEffect((function(){if(m.current&&m.current.resizableTextArea){var e=m.current.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}}),[]);var w=function(){f(O.trim())},x=E()(t,"".concat(t,"-edit-content"),Object(y.a)({},"".concat(t,"-rtl"),"rtl"===i),r);return o.createElement("div",{className:x,style:a},o.createElement($n,{ref:m,maxLength:c,value:O,onChange:function(e){var t=e.target;C(t.value.replace(/[\n\r]/g,""))},onKeyDown:function(e){var t=e.keyCode;v.current||(h.current=t)},onKeyUp:function(e){var t=e.keyCode,n=e.ctrlKey,r=e.altKey,o=e.metaKey,a=e.shiftKey;h.current!==t||v.current||n||r||o||a||(t===En.ENTER?(w(),null==d||d()):t===En.ESC&&p())},onCompositionStart:function(){v.current=!0},onCompositionEnd:function(){v.current=!1},onBlur:function(){w()},"aria-label":n,autoSize:s}),o.createElement(Tn,{className:"".concat(t,"-edit-content-confirm")}))},tr={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function nr(e){if(!e)return 0;var t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}var rr=function(e,t,n,r,a){qn||((qn=document.createElement("div")).setAttribute("aria-hidden","true"),document.body.appendChild(qn));var i,c=t.rows,l=t.suffix,s=void 0===l?"":l,u=window.getComputedStyle(e),f=(i=u,Array.prototype.slice.apply(i).map((function(e){return"".concat(e,": ").concat(i.getPropertyValue(e),";")})).join("")),p=nr(u.lineHeight),d=Math.round(p*(c+1)+nr(u.paddingTop)+nr(u.paddingBottom));qn.setAttribute("style",f),qn.style.position="fixed",qn.style.left="0",qn.style.height="auto",qn.style.minHeight="auto",qn.style.maxHeight="auto",qn.style.top="-999999px",qn.style.zIndex="-1000",qn.style.textOverflow="clip",qn.style.whiteSpace="normal",qn.style.webkitLineClamp="none";var m,v,h=(m=Object(L.a)(n),v=[],m.forEach((function(e){var t=v[v.length-1];"string"==typeof e&&"string"==typeof t?v[v.length-1]+=e:v.push(e)})),v);function b(){return qn.offsetHeight<d}if(Object(J.render)(o.createElement("div",{style:tr},o.createElement("span",{style:tr},h,s),o.createElement("span",{style:tr},r)),qn),b())return Object(J.unmountComponentAtNode)(qn),{content:n,text:qn.innerHTML,ellipsis:!1};var g=Array.prototype.slice.apply(qn.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter((function(e){return 8!==e.nodeType})),y=Array.prototype.slice.apply(qn.childNodes[0].childNodes[1].cloneNode(!0).childNodes);Object(J.unmountComponentAtNode)(qn);var O=[];qn.innerHTML="";var j=document.createElement("span");qn.appendChild(j);var C=document.createTextNode(a+s);function E(e){j.insertBefore(e,C)}function w(e,t){var n=e.nodeType;if(1===n)return E(e),b()?{finished:!1,reactNode:h[t]}:(j.removeChild(e),{finished:!0,reactNode:null});if(3===n){var r=e.textContent||"",o=document.createTextNode(r);return E(o),function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=Math.floor((r+o)/2),c=n.slice(0,i);if(t.textContent=c,r>=o-1)for(var l=o;l>=r;l-=1){var s=n.slice(0,l);if(t.textContent=s,b()||!s)return l===n.length?{finished:!1,reactNode:n}:{finished:!0,reactNode:s}}return b()?e(t,n,i,o,i):e(t,n,r,i,a)}(o,r)}return{finished:!1,reactNode:null}}return j.appendChild(C),y.forEach((function(e){qn.appendChild(e)})),g.some((function(e,t){var n=w(e,t),r=n.finished,o=n.reactNode;return o&&O.push(o),r})),{content:O,text:qn.innerHTML,ellipsis:!0}},or=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ar=Object(Nn.b)("webkitLineClamp"),ir=Object(Nn.b)("textOverflow");var cr=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).contentRef=o.createRef(),e.state={edit:!1,copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1},e.getPrefixCls=function(){var t=e.props.prefixCls;return(0,e.context.getPrefixCls)("typography",t)},e.onExpandClick=function(t){var n,r=e.getEllipsis().onExpand;e.setState({expanded:!0}),null===(n=r)||void 0===n||n(t)},e.onEditClick=function(){e.triggerEdit(!0)},e.onEditChange=function(t){var n=e.getEditable().onChange;null==n||n(t),e.triggerEdit(!1)},e.onEditCancel=function(){var t,n;null===(n=(t=e.getEditable()).onCancel)||void 0===n||n.call(t),e.triggerEdit(!1)},e.onCopyClick=function(t){t.preventDefault();var n=e.props,r=n.children,o=n.copyable,a=Object(g.a)({},"object"===Object(O.a)(o)?o:null);void 0===a.text&&(a.text=String(r)),sn()(a.text||""),e.setState({copied:!0},(function(){a.onCopy&&a.onCopy(),e.copyId=window.setTimeout((function(){e.setState({copied:!1})}),3e3)}))},e.setEditRef=function(t){e.editIcon=t},e.triggerEdit=function(t){var n=e.getEditable().onStart;t&&n&&n(),e.setState({edit:t},(function(){!t&&e.editIcon&&e.editIcon.focus()}))},e.resizeOnNextFrame=function(){Mn.a.cancel(e.rafId),e.rafId=Object(Mn.a)((function(){e.syncEllipsis()}))},e}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.setState({clientRendered:!0}),this.resizeOnNextFrame()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.getEllipsis(),r=this.getEllipsis(e);t===e.children&&n.rows===r.rows||this.resizeOnNextFrame()}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.copyId),Mn.a.cancel(this.rafId)}},{key:"getEditable",value:function(e){var t=this.state.edit,n=(e||this.props).editable;return n?Object(g.a)({editing:t},"object"===Object(O.a)(n)?n:null):{editing:t}}},{key:"getEllipsis",value:function(e){var t=(e||this.props).ellipsis;return t?Object(g.a)({rows:1,expandable:!1},"object"===Object(O.a)(t)?t:null):{}}},{key:"canUseCSSEllipsis",value:function(){var e=this.state.clientRendered,t=this.props,n=t.editable,r=t.copyable,o=this.getEllipsis(),a=o.rows,i=o.expandable,c=o.suffix,l=o.onEllipsis,s=o.tooltip;return!c&&!s&&(!(n||r||i||!e||l)&&(1===a?ir:ar))}},{key:"syncEllipsis",value:function(){var e=this.state,t=e.ellipsisText,n=e.isEllipsis,r=e.expanded,o=this.getEllipsis(),a=o.rows,i=o.suffix,c=o.onEllipsis,l=this.props.children;if(a&&!(a<0)&&this.contentRef.current&&!r&&!this.canUseCSSEllipsis()){Object(M.a)(Object(L.a)(l).every((function(e){return"string"==typeof e})),"Typography","`ellipsis` should use string as children only.");var s=rr(this.contentRef.current,{rows:a,suffix:i},l,this.renderOperations(!0),"..."),u=s.content,f=s.text,p=s.ellipsis;t===f&&n===p||(this.setState({ellipsisText:f,ellipsisContent:u,isEllipsis:p}),n!==p&&c&&c(p))}}},{key:"renderExpand",value:function(e){var t,n=this.getEllipsis(),r=n.expandable,a=n.symbol,i=this.state,c=i.expanded,l=i.isEllipsis;return r&&(e||!c&&l)?(t=a||this.expandStr,o.createElement("a",{key:"expand",className:"".concat(this.getPrefixCls(),"-expand"),onClick:this.onExpandClick,"aria-label":this.expandStr},t)):null}},{key:"renderEdit",value:function(){var e=this.props.editable;if(e){var t=e.icon,n=e.tooltip,r=Object(L.a)(n)[0]||this.editStr,a="string"==typeof r?r:"";return o.createElement(Gt,{key:"edit",title:!1===n?"":r},o.createElement(In,{ref:this.setEditRef,className:"".concat(this.getPrefixCls(),"-edit"),onClick:this.onEditClick,"aria-label":a},t||o.createElement(dn,{role:"button"})))}}},{key:"renderCopy",value:function(){var e=this.state.copied,t=this.props.copyable;if(t){var n=this.getPrefixCls(),r=t.tooltips,a=Object(L.a)(r);0===a.length&&(a=[this.copyStr,this.copiedStr]);var i=e?a[1]:a[0],c="string"==typeof i?i:"",l=Object(L.a)(t.icon);return o.createElement(Gt,{key:"copy",title:!1===r?"":i},o.createElement(In,{className:E()("".concat(n,"-copy"),e&&"".concat(n,"-copy-success")),onClick:this.onCopyClick,"aria-label":c},e?l[1]||o.createElement(hn,null):l[0]||o.createElement(yn,null)))}}},{key:"renderEditInput",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style,a=this.context.direction,i=this.getEditable(),c=i.maxLength,l=i.autoSize,s=i.onEnd;return o.createElement(er,{value:"string"==typeof t?t:"",onSave:this.onEditChange,onCancel:this.onEditCancel,onEnd:s,prefixCls:this.getPrefixCls(),className:n,style:r,direction:a,maxLength:c,autoSize:l})}},{key:"renderOperations",value:function(e){return[this.renderExpand(e),this.renderEdit(),this.renderCopy()].filter((function(e){return e}))}},{key:"renderContent",value:function(){var e=this,t=this.state,n=t.ellipsisContent,r=t.isEllipsis,a=t.expanded,i=this.props,c=i.component,l=i.children,s=i.className,u=i.type,f=i.disabled,p=i.style,d=or(i,["component","children","className","type","disabled","style"]),m=this.context.direction,v=this.getEllipsis(),h=v.rows,b=v.suffix,O=v.tooltip,j=this.getPrefixCls(),C=Object(an.a)(d,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard"].concat(Object(cn.a)(On.a))),x=this.canUseCSSEllipsis(),I=1===h&&x,M=h&&h>1&&x,N=l;if(h&&r&&!a&&!x){var S=d.title,A=S||"";S||"string"!=typeof l&&"number"!=typeof l||(A=String(l)),A=null==A?void 0:A.slice(String(n||"").length),N=o.createElement(o.Fragment,null,n,o.createElement("span",{title:A,"aria-hidden":"true"},"..."),b),O&&(N=o.createElement(Gt,{title:!0===O?l:O},o.createElement("span",null,N)))}else N=o.createElement(o.Fragment,null,l,b);return N=function(e,t){var n=e.mark,r=e.code,a=e.underline,i=e.delete,c=e.strong,l=e.keyboard,s=t;function u(e,t){e&&(s=o.createElement(t,{},s))}return u(c,"strong"),u(a,"u"),u(i,"del"),u(r,"code"),u(n,"mark"),u(l,"kbd"),s}(this.props,N),o.createElement(jn.a,{componentName:"Text"},(function(t){var n,r=t.edit,a=t.copy,i=t.copied,l=t.expand;return e.editStr=r,e.copyStr=a,e.copiedStr=i,e.expandStr=l,o.createElement(w.a,{onResize:e.resizeOnNextFrame,disabled:!h},o.createElement(on,Object(g.a)({className:E()((n={},Object(y.a)(n,"".concat(j,"-").concat(u),u),Object(y.a)(n,"".concat(j,"-disabled"),f),Object(y.a)(n,"".concat(j,"-ellipsis"),h),Object(y.a)(n,"".concat(j,"-ellipsis-single-line"),I),Object(y.a)(n,"".concat(j,"-ellipsis-multiple-line"),M),n),s),style:Object(g.a)(Object(g.a)({},p),{WebkitLineClamp:M?h:void 0}),component:c,ref:e.contentRef,direction:m},C),N,e.renderOperations()))}))}},{key:"render",value:function(){return this.getEditable().editing?this.renderEditInput():this.renderContent()}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.children,n=e.editable;return Object(M.a)(!n||"string"==typeof t,"Typography","When `editable` is enabled, the `children` should use string."),{}}}]),n}(o.Component);cr.contextType=I.b,cr.defaultProps={children:""};var lr=cr,sr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ur=function(e){var t=e.ellipsis,n=sr(e,["ellipsis"]),r=o.useMemo((function(){return t&&"object"===Object(O.a)(t)?Object(an.a)(t,["expandable","rows"]):t}),[t]);return Object(M.a)("object"!==Object(O.a)(t)||!t||!("expandable"in t)&&!("rows"in t),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props."),o.createElement(lr,Object(g.a)({},n,{ellipsis:r,component:"span"}))},fr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pr=function(e,t){var n=e.ellipsis,r=e.rel,a=fr(e,["ellipsis","rel"]);Object(M.a)("object"!==Object(O.a)(n),"Typography.Link","`ellipsis` only supports boolean value.");var i=o.useRef(null);o.useImperativeHandle(t,(function(){var e;return null===(e=i.current)||void 0===e?void 0:e.contentRef.current}));var c=Object(g.a)(Object(g.a)({},a),{rel:void 0===r&&"_blank"===a.target?"noopener noreferrer":r});return delete c.navigate,o.createElement(lr,Object(g.a)({},c,{ref:i,ellipsis:!!n,component:"a"}))},dr=o.forwardRef(pr),mr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},vr=Object(Ut.b)(1,2,3,4,5),hr=function(e){var t,n=e.level,r=void 0===n?1:n,a=mr(e,["level"]);return-1!==vr.indexOf(r)?t="h".concat(r):(Object(M.a)(!1,"Typography.Title","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version."),t="h1"),o.createElement(lr,Object(g.a)({},a,{component:t}))},br=function(e){return o.createElement(lr,Object(g.a)({},e,{component:"div"}))},gr=on;gr.Text=ur,gr.Link=dr,gr.Title=hr,gr.Paragraph=br;var yr=gr,Or=(n("74dF"),n("dfTv"),n("/3gg"),n("F3x0"),n("IYBL"),n("4t1q"),n("sEfC")),jr=n.n(Or),Cr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Er=(Object(Ut.a)("small","default","large"),null);var wr=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).debouncifyUpdateSpinning=function(e){var t=(e||r.props).delay;t&&(r.cancelExistingSpin(),r.updateSpinning=jr()(r.originalUpdateSpinning,t))},r.updateSpinning=function(){var e=r.props.spinning;r.state.spinning!==e&&r.setState({spinning:e})},r.renderSpin=function(e){var t,n=e.getPrefixCls,a=e.direction,i=r.props,c=i.prefixCls,l=i.className,s=i.size,u=i.tip,f=i.wrapperClassName,p=i.style,d=Cr(i,["prefixCls","className","size","tip","wrapperClassName","style"]),m=r.state.spinning,v=n("spin",c),h=E()(v,(t={},Object(y.a)(t,"".concat(v,"-sm"),"small"===s),Object(y.a)(t,"".concat(v,"-lg"),"large"===s),Object(y.a)(t,"".concat(v,"-spinning"),m),Object(y.a)(t,"".concat(v,"-show-text"),!!u),Object(y.a)(t,"".concat(v,"-rtl"),"rtl"===a),t),l),b=Object(an.a)(d,["spinning","delay","indicator"]),O=o.createElement("div",Object(g.a)({},b,{style:p,className:h}),function(e,t){var n=t.indicator,r="".concat(e,"-dot");return null===n?null:Object(F.b)(n)?Object(F.a)(n,{className:E()(n.props.className,r)}):Object(F.b)(Er)?Object(F.a)(Er,{className:E()(Er.props.className,r)}):o.createElement("span",{className:E()(r,"".concat(e,"-dot-spin"))},o.createElement("i",{className:"".concat(e,"-dot-item")}),o.createElement("i",{className:"".concat(e,"-dot-item")}),o.createElement("i",{className:"".concat(e,"-dot-item")}),o.createElement("i",{className:"".concat(e,"-dot-item")}))}(v,r.props),u?o.createElement("div",{className:"".concat(v,"-text")},u):null);if(r.isNestedPattern()){var j=E()("".concat(v,"-container"),Object(y.a)({},"".concat(v,"-blur"),m));return o.createElement("div",Object(g.a)({},b,{className:E()("".concat(v,"-nested-loading"),f)}),m&&o.createElement("div",{key:"loading"},O),o.createElement("div",{className:j,key:"container"},r.props.children))}return O};var a=e.spinning,i=function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(a,e.delay);return r.state={spinning:a&&!i},r.originalUpdateSpinning=r.updateSpinning,r.debouncifyUpdateSpinning(e),r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.updateSpinning()}},{key:"componentDidUpdate",value:function(){this.debouncifyUpdateSpinning(),this.updateSpinning()}},{key:"componentWillUnmount",value:function(){this.cancelExistingSpin()}},{key:"cancelExistingSpin",value:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()}},{key:"isNestedPattern",value:function(){return!(!this.props||void 0===this.props.children)}},{key:"render",value:function(){return o.createElement(I.a,null,this.renderSpin)}}],[{key:"setDefaultIndicator",value:function(e){Er=e}}]),n}(o.Component);wr.defaultProps={spinning:!0,size:"default",wrapperClassName:""};var xr=wr,Ir=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=E()(n,"".concat(n,"-").concat(e.page),(t={},Object(y.a)(t,"".concat(n,"-active"),e.active),Object(y.a)(t,e.className,!!e.className),Object(y.a)(t,"".concat(n,"-disabled"),!e.page),t));return a.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",a.a.createElement("a",{rel:"nofollow"},e.page)))},Mr=13,Nr=38,Sr=40,Ar=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;Object(U.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,o=n.quickGo,a=n.rootPrefixCls,i=e.state.goInputText;r||""===i||(e.setState({goInputText:""}),t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(a,"-item-link"))>=0||t.relatedTarget.className.indexOf("".concat(a,"-item"))>=0)||o(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==Mr&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(B.a)(n,[{key:"getValidValue",value:function(){var e=this.state.goInputText;return!e||isNaN(e)?void 0:Number(e)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,o=t.rootPrefixCls,i=t.changeSize,c=t.quickGo,l=t.goButton,s=t.selectComponentClass,u=t.buildOptionText,f=t.selectPrefixCls,p=t.disabled,d=this.state.goInputText,m="".concat(o,"-options"),v=s,h=null,b=null,g=null;if(!i&&!c)return null;var y=this.getPageSizeOptions();if(i&&v){var O=y.map((function(t,n){return a.a.createElement(v.Option,{key:n,value:t.toString()},(u||e.buildOptionText)(t))}));h=a.a.createElement(v,{disabled:p,prefixCls:f,showSearch:!1,className:"".concat(m,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||y[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},O)}return c&&(l&&(g="boolean"==typeof l?a.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:p,className:"".concat(m,"-quick-jumper-button")},r.jump_to_confirm):a.a.createElement("span",{onClick:this.go,onKeyUp:this.go},l)),b=a.a.createElement("div",{className:"".concat(m,"-quick-jumper")},r.jump_to,a.a.createElement("input",{disabled:p,type:"text",value:d,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,g)),a.a.createElement("li",{className:"".concat(m)},h,b)}}]),n}(a.a.Component);Ar.defaultProps={pageSizeOptions:["10","20","50","100"]};var kr=Ar;function Pr(){}function Tr(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var Dr=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(Tr(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,o=e||a.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(o=a.a.createElement(e,Object(K.a)({},r.props))),o},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==Nr&&e.keyCode!==Sr||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===Mr?r.handleChange(t):e.keyCode===Nr?r.handleChange(t-1):e.keyCode===Sr&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=Tr(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var o=Tr(void 0,r.state,r.props);n>o?n=o:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<Tr(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==Mr&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var o=e.onChange!==Pr;"current"in e&&!o&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var i=e.defaultCurrent;"current"in e&&(i=e.current);var c=e.defaultPageSize;return"pageSize"in e&&(c=e.pageSize),i=Math.min(i,Tr(c,void 0,e)),r.state={current:i,currentInputValue:i,pageSize:c},r}return Object(B.a)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=Tr(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),a=!this.hasPrev();return Object(o.isValidElement)(r)?Object(o.cloneElement)(r,{disabled:a}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),a=!this.hasNext();return Object(o.isValidElement)(r)?Object(o.cloneElement)(r,{disabled:a}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,i=t.style,c=t.disabled,l=t.hideOnSinglePage,s=t.total,u=t.locale,f=t.showQuickJumper,p=t.showLessItems,d=t.showTitle,m=t.showTotal,v=t.simple,h=t.itemRender,b=t.showPrevNextJumpers,O=t.jumpPrevIcon,j=t.jumpNextIcon,C=t.selectComponentClass,w=t.selectPrefixCls,x=t.pageSizeOptions,I=this.state,M=I.current,N=I.pageSize,S=I.currentInputValue;if(!0===l&&s<=N)return null;var A=Tr(void 0,this.state,this.props),k=[],P=null,T=null,D=null,R=null,z=null,L=f&&f.goButton,F=p?1:2,K=M-1>0?M-1:0,V=M+1<A?M+1:A,U=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{});if(v)return L&&(z="boolean"==typeof L?a.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},u.jump_to_confirm):a.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},L),z=a.a.createElement("li",{title:d?"".concat(u.jump_to).concat(M,"/").concat(A):null,className:"".concat(n,"-simple-pager")},z)),a.a.createElement("ul",Object(g.a)({className:E()(n,"".concat(n,"-simple"),Object(y.a)({},"".concat(n,"-disabled"),c),r),style:i,ref:this.savePaginationNode},U),a.a.createElement("li",{title:d?u.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:E()("".concat(n,"-prev"),Object(y.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(K)),a.a.createElement("li",{title:d?"".concat(M,"/").concat(A):null,className:"".concat(n,"-simple-pager")},a.a.createElement("input",{type:"text",value:S,disabled:c,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),a.a.createElement("span",{className:"".concat(n,"-slash")},"/"),A),a.a.createElement("li",{title:d?u.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:E()("".concat(n,"-next"),Object(y.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),z);if(A<=3+2*F){var B={locale:u,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:d,itemRender:h};A||k.push(a.a.createElement(Ir,Object(g.a)({},B,{key:"noPager",page:A,className:"".concat(n,"-disabled")})));for(var H=1;H<=A;H+=1){var Q=M===H;k.push(a.a.createElement(Ir,Object(g.a)({},B,{key:H,page:H,active:Q})))}}else{var W=p?u.prev_3:u.prev_5,J=p?u.next_3:u.next_5;b&&(P=a.a.createElement("li",{title:d?W:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:E()("".concat(n,"-jump-prev"),Object(y.a)({},"".concat(n,"-jump-prev-custom-icon"),!!O))},h(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(O,"prev page"))),T=a.a.createElement("li",{title:d?J:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:E()("".concat(n,"-jump-next"),Object(y.a)({},"".concat(n,"-jump-next-custom-icon"),!!j))},h(this.getJumpNextPage(),"jump-next",this.getItemIcon(j,"next page")))),R=a.a.createElement(Ir,{locale:u,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:A,page:A,active:!1,showTitle:d,itemRender:h}),D=a.a.createElement(Ir,{locale:u,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:d,itemRender:h});var G=Math.max(1,M-F),Z=Math.min(M+F,A);M-1<=F&&(Z=1+2*F),A-M<=F&&(G=A-2*F);for(var Y=G;Y<=Z;Y+=1){var q=M===Y;k.push(a.a.createElement(Ir,{locale:u,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Y,page:Y,active:q,showTitle:d,itemRender:h}))}M-1>=2*F&&3!==M&&(k[0]=Object(o.cloneElement)(k[0],{className:"".concat(n,"-item-after-jump-prev")}),k.unshift(P)),A-M>=2*F&&M!==A-2&&(k[k.length-1]=Object(o.cloneElement)(k[k.length-1],{className:"".concat(n,"-item-before-jump-next")}),k.push(T)),1!==G&&k.unshift(D),Z!==A&&k.push(R)}var X=null;m&&(X=a.a.createElement("li",{className:"".concat(n,"-total-text")},m(s,[0===s?0:(M-1)*N+1,M*N>s?s:M*N])));var _=!this.hasPrev()||!A,$=!this.hasNext()||!A;return a.a.createElement("ul",Object(g.a)({className:E()(n,r,Object(y.a)({},"".concat(n,"-disabled"),c)),style:i,unselectable:"unselectable",ref:this.savePaginationNode},U),X,a.a.createElement("li",{title:d?u.prev_page:null,onClick:this.prev,tabIndex:_?null:0,onKeyPress:this.runIfEnterPrev,className:E()("".concat(n,"-prev"),Object(y.a)({},"".concat(n,"-disabled"),_)),"aria-disabled":_},this.renderPrev(K)),k,a.a.createElement("li",{title:d?u.next_page:null,onClick:this.next,tabIndex:$?null:0,onKeyPress:this.runIfEnterNext,className:E()("".concat(n,"-next"),Object(y.a)({},"".concat(n,"-disabled"),$)),"aria-disabled":$},this.renderNext(V)),a.a.createElement(kr,{disabled:c,locale:u,rootPrefixCls:n,selectComponentClass:C,selectPrefixCls:w,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:M,pageSize:N,pageSizeOptions:x,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:L}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,o=Tr(e.pageSize,t,e);r=r>o?o:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(a.a.Component);Dr.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Pr,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Pr,locale:{items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"},style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var Rr=Dr,zr=n("H4fg"),Lr=n("5bA4"),Fr=n("UESt"),Kr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Vr=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Kr}))};Vr.displayName="DoubleLeftOutlined";var Ur=o.forwardRef(Vr),Br={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Hr=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Br}))};Hr.displayName="DoubleRightOutlined";var Qr=o.forwardRef(Hr);function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach((function(t){Object(y.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gr="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function Zr(e,t){return 0===e.indexOf(t)}function Yr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:Jr({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||Zr(n,"aria-"))||t.data&&Zr(n,"data-")||t.attr&&Gr.includes(n))&&(r[n]=e[n])})),r}var qr=n("YrtM");function Xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(n),!0).forEach((function(t){$r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eo=o.forwardRef((function(e,t){var n=e.height,r=e.offset,a=e.children,i=e.prefixCls,c=e.onInnerResize,l={},s={display:"flex",flexDirection:"column"};return void 0!==r&&(l={height:n,position:"relative",overflow:"hidden"},s=_r(_r({},s),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),o.createElement("div",{style:l},o.createElement(w.a,{onResize:function(e){e.offsetHeight&&c&&c()}},o.createElement("div",{style:s,className:E()($r({},"".concat(i,"-holder-inner"),i)),ref:t},a)))}));eo.displayName="Filler";var to=eo;function no(e){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ro(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ao(e,t){return(ao=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function io(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lo(e);if(t){var o=lo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return co(this,n)}}function co(e,t){return!t||"object"!==no(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function so(e){return"touches"in e?e.touches[0].pageY:e.pageY}var uo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ao(e,t)}(i,e);var t,n,r,a=io(i);function i(){var e;return ro(this,i),(e=a.apply(this,arguments)).moveRaf=null,e.scrollbarRef=o.createRef(),e.thumbRef=o.createRef(),e.visibleTimeout=null,e.state={dragging:!1,pageY:null,startTop:null,visible:!1},e.delayHidden=function(){clearTimeout(e.visibleTimeout),e.setState({visible:!0}),e.visibleTimeout=setTimeout((function(){e.setState({visible:!1})}),2e3)},e.onScrollbarTouchStart=function(e){e.preventDefault()},e.onContainerMouseDown=function(e){e.stopPropagation(),e.preventDefault()},e.patchEvents=function(){window.addEventListener("mousemove",e.onMouseMove),window.addEventListener("mouseup",e.onMouseUp),e.thumbRef.current.addEventListener("touchmove",e.onMouseMove),e.thumbRef.current.addEventListener("touchend",e.onMouseUp)},e.removeEvents=function(){window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp),e.scrollbarRef.current.removeEventListener("touchstart",e.onScrollbarTouchStart),e.thumbRef.current.removeEventListener("touchstart",e.onMouseDown),e.thumbRef.current.removeEventListener("touchmove",e.onMouseMove),e.thumbRef.current.removeEventListener("touchend",e.onMouseUp),Z.a.cancel(e.moveRaf)},e.onMouseDown=function(t){var n=e.props.onStartMove;e.setState({dragging:!0,pageY:so(t),startTop:e.getTop()}),n(),e.patchEvents(),t.stopPropagation(),t.preventDefault()},e.onMouseMove=function(t){var n=e.state,r=n.dragging,o=n.pageY,a=n.startTop,i=e.props.onScroll;if(Z.a.cancel(e.moveRaf),r){var c=a+(so(t)-o),l=e.getEnableScrollRange(),s=e.getEnableHeightRange(),u=s?c/s:0,f=Math.ceil(u*l);e.moveRaf=Object(Z.a)((function(){i(f)}))}},e.onMouseUp=function(){var t=e.props.onStopMove;e.setState({dragging:!1}),t(),e.removeEvents()},e.getSpinHeight=function(){var t=e.props,n=t.height,r=n/t.count*10;return r=Math.max(r,20),r=Math.min(r,n/2),Math.floor(r)},e.getEnableScrollRange=function(){var t=e.props;return t.scrollHeight-t.height||0},e.getEnableHeightRange=function(){return e.props.height-e.getSpinHeight()||0},e.getTop=function(){var t=e.props.scrollTop,n=e.getEnableScrollRange(),r=e.getEnableHeightRange();return 0===t||0===n?0:t/n*r},e.getVisible=function(){var t=e.state.visible,n=e.props;return!(n.height>=n.scrollHeight)&&t},e}return t=i,(n=[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e,t,n,r=this.state.dragging,a=this.props.prefixCls,i=this.getSpinHeight(),c=this.getTop(),l=this.getVisible();return o.createElement("div",{ref:this.scrollbarRef,className:"".concat(a,"-scrollbar"),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:l?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},o.createElement("div",{ref:this.thumbRef,className:E()("".concat(a,"-scrollbar-thumb"),(e={},t="".concat(a,"-scrollbar-thumb-moving"),n=r,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),style:{width:"100%",height:i,top:c,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}])&&oo(t.prototype,n),r&&oo(t,r),i}(o.Component);function fo(e){var t=e.children,n=e.setRef,r=o.useCallback((function(e){n(e)}),[]);return o.cloneElement(t,{ref:r})}function po(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var mo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maps={},this.maps.prototype=null}var t,n,r;return t=e,(n=[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}])&&po(t.prototype,n),r&&po(t,r),e}();function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ho(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ho(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bo(e){return(bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function go(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oo(e,t,n){var r=go(o.useState(e),2),a=r[0],i=r[1],c=go(o.useState(null),2),l=c[0],s=c[1];return o.useEffect((function(){var r=function(e,t,n){var r,o,a=e.length,i=t.length;if(0===a&&0===i)return null;a<i?(r=e,o=t):(r=t,o=e);var c={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):c}for(var s=null,u=1!==Math.abs(a-i),f=0;f<o.length;f+=1){var p=l(r[f]);if(p!==l(o[f])){s=f,u=u||p!==l(o[f+1]);break}}return null===s?null:{index:s,multiple:u}}(a||[],e||[],t);void 0!==(null==r?void 0:r.index)&&(null==n||n(r.index),s(e[r.index])),i(e)}),[e]),[l]}function jo(e){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Co="object"===("undefined"==typeof navigator?"undefined":jo(navigator))&&/Firefox/i.test(navigator.userAgent),Eo=function(e,t){var n=Object(o.useRef)(!1),r=Object(o.useRef)(null);function a(){clearTimeout(r.current),n.current=!0,r.current=setTimeout((function(){n.current=!1}),50)}var i=Object(o.useRef)({top:e,bottom:t});return i.current.top=e,i.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e<0&&i.current.top||e>0&&i.current.bottom;return t&&o?(clearTimeout(r.current),n.current=!1):o&&!n.current||a(),!n.current&&o}};function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){Io(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return No(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return No(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function No(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function So(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ao=[],ko={overflowY:"auto",overflowAnchor:"none"};function Po(e,t){var n=e.prefixCls,r=void 0===n?"rc-virtual-list":n,a=e.className,i=e.height,c=e.itemHeight,l=e.fullHeight,s=void 0===l||l,u=e.style,f=e.data,p=e.children,d=e.itemKey,m=e.virtual,v=e.component,h=void 0===v?"div":v,b=e.onScroll,g=So(e,["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll"]),y=!(!1===m||!i||!c),O=y&&f&&c*f.length>i,j=Mo(Object(o.useState)(0),2),C=j[0],w=j[1],x=Mo(Object(o.useState)(!1),2),I=x[0],M=x[1],N=E()(r,a),S=f||Ao,A=Object(o.useRef)(),k=Object(o.useRef)(),P=Object(o.useRef)(),T=o.useCallback((function(e){return"function"==typeof d?d(e):null==e?void 0:e[d]}),[d]),D={getKey:T};function R(e){w((function(t){var n=function(e){var t=e;Number.isNaN(_.current)||(t=Math.min(t,_.current));return t=Math.max(t,0)}("function"==typeof e?e(t):e);return A.current.scrollTop=n,n}))}var z=Object(o.useRef)({start:0,end:S.length}),L=Object(o.useRef)(),F=Mo(Oo(S,T),1)[0];L.current=F;var K=Mo(function(e,t,n){var r=vo(o.useState(0),2),a=r[0],i=r[1],c=Object(o.useRef)(new Map),l=Object(o.useRef)(new mo),s=Object(o.useRef)(0);function u(){s.current+=1;var e=s.current;Promise.resolve().then((function(){e===s.current&&(c.current.forEach((function(e,t){if(e&&e.offsetParent){var n=Object(q.a)(e),r=n.offsetHeight;l.current.get(t)!==r&&l.current.set(t,n.offsetHeight)}})),i((function(e){return e+1})))}))}return[function(r,o){var a=e(r),i=c.current.get(a);o?(c.current.set(a,o),u()):c.current.delete(a),!i!=!o&&(o?null==t||t(r):null==n||n(r))},u,l.current,a]}(T,null,null),4),V=K[0],U=K[1],B=K[2],H=K[3],Q=o.useMemo((function(){if(!y)return{scrollHeight:void 0,start:0,end:S.length-1,offset:void 0};var e;if(!O)return{scrollHeight:(null===(e=k.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:S.length-1,offset:void 0};for(var t,n,r,o=0,a=S.length,l=0;l<a;l+=1){var s=S[l],u=T(s),f=B.get(u),p=o+(void 0===f?c:f);p>=C&&void 0===t&&(t=l,n=o),p>C+i&&void 0===r&&(r=l),o=p}return void 0===t&&(t=0,n=0),void 0===r&&(r=S.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,S.length),offset:n}}),[O,y,C,S,H,i]),W=Q.scrollHeight,J=Q.start,G=Q.end,Y=Q.offset;z.current.start=J,z.current.end=G;var X=W-i,_=Object(o.useRef)(X);_.current=X;var $=C<=0,ee=C>=X,te=Eo($,ee);var ne=Mo(function(e,t,n,r){var a=Object(o.useRef)(0),i=Object(o.useRef)(null),c=Object(o.useRef)(null),l=Object(o.useRef)(!1),s=Eo(t,n);return[function(t){if(e){Z.a.cancel(i.current);var n=t.deltaY;a.current+=n,c.current=n,s(n)||(Co||t.preventDefault(),i.current=Object(Z.a)((function(){var e=l.current?10:1;r(a.current*e),a.current=0})))}},function(t){e&&(l.current=t.detail===c.current)}]}(y,$,ee,(function(e){R((function(t){return t+e}))})),2),re=ne[0],oe=ne[1];!function(e,t,n){var r,a=Object(o.useRef)(!1),i=Object(o.useRef)(0),c=Object(o.useRef)(null),l=Object(o.useRef)(null),s=function(e){if(a.current){var t=Math.ceil(e.touches[0].pageY),r=i.current-t;i.current=t,n(r)&&e.preventDefault(),clearInterval(l.current),l.current=setInterval((function(){(!n(r*=14/15,!0)||Math.abs(r)<=.1)&&clearInterval(l.current)}),16)}},u=function(){a.current=!1,r()},f=function(e){r(),1!==e.touches.length||a.current||(a.current=!0,i.current=Math.ceil(e.touches[0].pageY),c.current=e.target,c.current.addEventListener("touchmove",s),c.current.addEventListener("touchend",u))};r=function(){c.current&&(c.current.removeEventListener("touchmove",s),c.current.removeEventListener("touchend",u))},o.useLayoutEffect((function(){return e&&t.current.addEventListener("touchstart",f),function(){t.current.removeEventListener("touchstart",f),r(),clearInterval(l.current)}}),[e])}(y,A,(function(e,t){return!te(e,t)&&(re({preventDefault:function(){},deltaY:e}),!0)})),o.useLayoutEffect((function(){function e(e){y&&e.preventDefault()}return A.current.addEventListener("wheel",re),A.current.addEventListener("DOMMouseScroll",oe),A.current.addEventListener("MozMousePixelScroll",e),function(){A.current.removeEventListener("wheel",re),A.current.removeEventListener("DOMMouseScroll",oe),A.current.removeEventListener("MozMousePixelScroll",e)}}),[y]);var ae=function(e,t,n,r,a,i,c,l){var s=o.useRef();return function(o){if(null!=o){if(Z.a.cancel(s.current),"number"==typeof o)c(o);else if(o&&"object"===bo(o)){var u,f=o.align;u="index"in o?o.index:t.findIndex((function(e){return a(e)===o.key}));var p=o.offset,d=void 0===p?0:p;!function o(l,p){if(!(l<0)&&e.current){var m=e.current.clientHeight,v=!1,h=p;if(m){for(var b=p||f,g=0,y=0,O=0,j=Math.min(t.length,u),C=0;C<=j;C+=1){var E=a(t[C]);y=g;var w=n.get(E);g=O=y+(void 0===w?r:w),C===u&&void 0===w&&(v=!0)}var x=null;switch(b){case"top":x=y-d;break;case"bottom":x=O-m+d;break;default:var I=e.current.scrollTop;y<I?h="top":O>I+m&&(h="bottom")}null!==x&&x!==e.current.scrollTop&&c(x)}s.current=Object(Z.a)((function(){v&&i(),o(l-1,h)}))}}(3)}}else l()}}(A,S,B,c,T,U,R,(function(){var e;null===(e=P.current)||void 0===e||e.delayHidden()}));o.useImperativeHandle(t,(function(){return{scrollTo:ae}}));var ie=function(e,t,n,r,a,i){var c=i.getKey;return e.slice(t,n+1).map((function(e,n){var i=a(e,t+n,{}),l=c(e);return o.createElement(fo,{key:l,setRef:function(t){return r(e,t)}},i)}))}(S,J,G,V,p,D),ce=null;return i&&(ce=xo(Io({},s?"height":"maxHeight",i),ko),y&&(ce.overflowY="hidden",I&&(ce.pointerEvents="none"))),o.createElement("div",Object.assign({style:xo(xo({},u),{},{position:"relative"}),className:N},g),o.createElement(h,{className:"".concat(r,"-holder"),style:ce,ref:A,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==C&&R(t),null==b||b(e)}},o.createElement(to,{prefixCls:r,height:W,offset:Y,onInnerResize:U,ref:k},ie)),y&&o.createElement(uo,{ref:P,prefixCls:r,scrollTop:C,height:i,scrollHeight:W,count:S.length,onScroll:function(e){R(e)},onStartMove:function(){M(!0)},onStopMove:function(){M(!1)}}))}var To=o.forwardRef(Po);To.displayName="List";var Do=To,Ro=function(e){var t,n=e.className,r=e.customizeIcon,a=e.customizeIconProps,i=e.onMouseDown,c=e.onClick,l=e.children;return t="function"==typeof r?r(a):r,o.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),i&&i(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},void 0!==t?t:o.createElement("span",{className:E()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},l))},zo=function(e,t){var n=e.prefixCls,r=e.id,a=e.flattenOptions,i=e.childrenAsData,c=e.values,l=e.searchValue,s=e.multiple,u=e.defaultActiveFirstOption,f=e.height,p=e.itemHeight,d=e.notFoundContent,m=e.open,v=e.menuItemSelectedIcon,h=e.virtual,b=e.onSelect,O=e.onToggleOpen,C=e.onActiveValue,w=e.onScroll,x=e.onMouseEnter,I="".concat(n,"-item"),M=Object(qr.a)((function(){return a}),[m,a],(function(e,t){return t[0]&&e[1]!==t[1]})),N=o.useRef(null),S=function(e){e.preventDefault()},A=function(e){N.current&&N.current.scrollTo({index:e})},k=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=M.length,r=0;r<n;r+=1){var o=(e+r*t+n)%n,a=M[o],i=a.group,c=a.data;if(!i&&!c.disabled)return o}return-1},P=o.useState((function(){return k(0)})),T=Object(j.a)(P,2),D=T[0],R=T[1],z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];R(e);var n={source:t?"keyboard":"mouse"},r=M[e];r?C(r.data.value,e,n):C(null,-1,n)};o.useEffect((function(){z(!1!==u?k(0):-1)}),[M.length,l]),o.useEffect((function(){var e,t=setTimeout((function(){if(!s&&m&&1===c.size){var e=Array.from(c)[0],t=M.findIndex((function(t){return t.data.value===e}));z(t),A(t)}}));m&&(null===(e=N.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[m]);var L=function(e){void 0!==e&&b(e,{selected:!c.has(e)}),s||O(!1)};if(o.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case En.UP:case En.DOWN:var n=0;if(t===En.UP?n=-1:t===En.DOWN&&(n=1),0!==n){var r=k(D+n,n);A(r),z(r,!0)}break;case En.ENTER:var o=M[D];o&&!o.data.disabled?L(o.data.value):L(void 0),m&&e.preventDefault();break;case En.ESC:O(!1),m&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){A(e)}}})),0===M.length)return o.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(I,"-empty"),onMouseDown:S},d);function F(e){var t=M[e];if(!t)return null;var n=t.data||{},a=n.value,l=n.label,s=n.children,u=Yr(n,!0),f=i?s:l;return t?o.createElement("div",Object(g.a)({"aria-label":"string"==typeof f?f:null},u,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":c.has(a)}),a):null}return o.createElement(o.Fragment,null,o.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},F(D-1),F(D),F(D+1)),o.createElement(Do,{itemKey:"key",ref:N,data:M,height:f,itemHeight:p,fullHeight:!1,onMouseDown:S,onScroll:w,virtual:h,onMouseEnter:x},(function(e,t){var n,r=e.group,a=e.groupOption,l=e.data,s=l.label,u=l.key;if(r)return o.createElement("div",{className:E()(I,"".concat(I,"-group"))},void 0!==s?s:u);var f=l.disabled,p=l.value,d=l.title,m=l.children,h=l.style,b=l.className,O=Object(V.a)(l,["disabled","value","title","children","style","className"]),j=c.has(p),C="".concat(I,"-option"),w=E()(I,C,b,(n={},Object(y.a)(n,"".concat(C,"-grouped"),a),Object(y.a)(n,"".concat(C,"-active"),D===t&&!f),Object(y.a)(n,"".concat(C,"-disabled"),f),Object(y.a)(n,"".concat(C,"-selected"),j),n)),x=!v||"function"==typeof v||j,M=(i?m:s)||p,N="string"==typeof M||"number"==typeof M?M.toString():void 0;return void 0!==d&&(N=d),o.createElement("div",Object(g.a)({},O,{"aria-selected":j,className:w,title:N,onMouseMove:function(){D===t||f||z(t)},onClick:function(){f||L(p)},style:h}),o.createElement("div",{className:"".concat(C,"-content")},M),o.isValidElement(v)||j,x&&o.createElement(Ro,{className:"".concat(I,"-option-state"),customizeIcon:v,customizeIconProps:{isSelected:j}},j?"✓":null))})))},Lo=o.forwardRef(zo);Lo.displayName="OptionList";var Fo=Lo,Ko=function(){return null};Ko.isSelectOption=!0;var Vo=Ko,Uo=function(){return null};Uo.isSelectOptGroup=!0;var Bo=Uo;function Ho(e){var t=e.key,n=e.props,r=n.children,o=n.value,a=Object(V.a)(n,["children","value"]);return Object(K.a)({key:t,value:void 0!==o?o:t,children:r},a)}function Qo(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(L.a)(e).map((function(e,n){if(!o.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,a=e.key,i=e.props,c=i.children,l=Object(V.a)(i,["children"]);return t||!r?Ho(e):Object(K.a)(Object(K.a)({key:"__RC_SELECT_GRP__".concat(null===a?n:a,"__"),label:a},l),{},{options:Qo(c)})})).filter((function(e){return e}))}var Wo=n("T5bk"),Jo=n("Kwbf");function Go(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function Zo(e,t){var n,r=Object(cn.a)(t);for(n=e.length-1;n>=0&&e[n].disabled;n-=1);var o=null;return-1!==n&&(o=r[n],r.splice(n,1)),{values:r,removedValue:o}}var Yo="undefined"!=typeof window&&window.document&&window.document.documentElement,qo=0;function Xo(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!=r?r:void 0!==n?n:"rc-index-key-".concat(t)}function _o(e){var t=Object(K.a)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Object(Jo.a)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function $o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.prevValueOptions,o=void 0===r?[]:r,a=new Map;return t.forEach((function(e){if(!e.group){var t=e.data;a.set(t.value,t)}})),e.map((function(e){var t=a.get(e);return t||(t=Object(K.a)({},o.find((function(t){return t._INTERNAL_OPTION_VALUE_===e})))),_o(t)}))}function ea(e){return Go(e).join("")}function ta(e){var t=e.prefixCls,n=e.item,r=e.renderItem,a=e.responsive,i=e.registerSize,c=e.itemKey,l=e.className,s=e.style,u=e.children,f=e.display,p=e.order,d=a&&!f;function m(e){i(c,e)}o.useEffect((function(){return function(){m(null)}}),[]);var v=void 0!==n?r(n):u,h=o.createElement("div",{className:E()(t,l),style:Object(K.a)({opacity:d?.2:1,height:d?0:void 0,overflowY:d?"hidden":void 0,order:a?p:void 0,pointerEvents:d?"none":void 0},s)},v);return a&&(h=o.createElement(w.a,{onResize:function(e){m(e.offsetWidth)}},h)),h}function na(e){return"+ ".concat(e.length," ...")}function ra(e,t){var n=e.prefixCls,r=void 0===n?"rc-overflow":n,a=e.data,i=void 0===a?[]:a,c=e.renderItem,l=e.itemKey,s=e.itemWidth,u=void 0===s?10:s,f=e.style,p=e.className,d=e.maxCount,m=e.renderRest,v=void 0===m?na:m,h=e.suffix,b=function(){var e=Object(o.useState)({}),t=Object(j.a)(e,2)[1],n=Object(o.useRef)([]),r=Object(o.useRef)(!1),a=0,i=0;return Object(o.useEffect)((function(){return function(){r.current=!0}}),[]),function(e){var o=a;return a+=1,n.current.length<o+1&&(n.current[o]=e),[n.current[o],function(e){n.current[o]="function"==typeof e?e(n.current[o]):e,Z.a.cancel(i),i=Object(Z.a)((function(){r.current||t({})}))}]}}(),y=b(0),O=Object(j.a)(y,2),C=O[0],x=O[1],I=b(new Map),M=Object(j.a)(I,2),N=M[0],S=M[1],A=b(0),k=Object(j.a)(A,2),P=k[0],T=k[1],D=b(0),R=Object(j.a)(D,2),z=R[0],L=R[1],F=b(0),K=Object(j.a)(F,2),V=K[0],U=K[1],B=Object(o.useState)(null),H=Object(j.a)(B,2),Q=H[0],W=H[1],J=Object(o.useState)(0),G=Object(j.a)(J,2),Y=G[0],q=G[1],X=Object(o.useState)(!1),_=Object(j.a)(X,2),$=_[0],ee=_[1],te="".concat(r,"-item"),ne=Math.max(P,z),re=i.length&&"responsive"===d,oe=re||"number"==typeof d&&i.length>d,ae=Object(o.useMemo)((function(){var e=i;return re?e=i.slice(0,Math.min(i.length,C/u)):"number"==typeof d&&(e=i.slice(0,d)),e}),[i,u,C,d,re]),ie=Object(o.useMemo)((function(){return re?i.slice(Y+1):i.slice(ae.length)}),[i,ae,re,Y]),ce=Object(o.useCallback)((function(e,t){var n;return"function"==typeof l?l(e):null!==(n=l&&(null==e?void 0:e[l]))&&void 0!==n?n:t}),[l]),le=Object(o.useCallback)(c||function(e){return e},[c]);function se(e,t){q(e),t||ee(e<i.length-1)}function ue(e,t){S((function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r}))}function fe(e){return N.get(ce(ae[e],e))}o.useLayoutEffect((function(){if(C&&ne&&ae){var e=V,t=ae.length,n=t-1;if(!t)return se(0),void W(null);for(var r=0;r<t;r+=1){var o=fe(r);if(void 0===o){se(r-1,!0);break}if(e+=o,r===n-1&&e+fe(n)<=C){se(n),W(null);break}if(e+ne>C){se(r-1),W(e-o-V+z);break}if(r===n){se(n),W(e-V);break}}h&&fe(0)+V>C&&W(null)}}),[C,N,z,V,ce,ae]);var pe=$&&!!ie.length,de={};null!==Q&&re&&(de={position:"absolute",left:Q,top:0});var me={prefixCls:te,responsive:re},ve=o.createElement("div",{className:E()(r,p),style:f,ref:t},ae.map((function(e,t){var n=ce(e,t);return o.createElement(ta,Object(g.a)({},me,{order:t,key:n,item:e,renderItem:le,itemKey:n,registerSize:ue,display:t<=Y}))})),oe?o.createElement(ta,Object(g.a)({},me,{order:pe?Y:Number.MAX_SAFE_INTEGER,className:"".concat(te,"-rest"),registerSize:function(e,t){L(t),T(z)},display:pe}),"function"==typeof v?v(ie):v):null,h&&o.createElement(ta,Object(g.a)({},me,{order:Y,className:"".concat(te,"-suffix"),registerSize:function(e,t){U(t)},display:!0,style:de}),h));return re&&(ve=o.createElement(w.a,{onResize:function(e,t){x(t.clientWidth)}},ve)),ve}var oa=o.forwardRef(ra);oa.displayName="Overflow";var aa=oa,ia=function(e,t){var n,r,a=e.prefixCls,i=e.id,c=e.inputElement,l=e.disabled,s=e.tabIndex,u=e.autoFocus,f=e.autoComplete,p=e.editable,d=e.accessibilityIndex,m=e.value,v=e.maxLength,h=e.onKeyDown,b=e.onMouseDown,g=e.onChange,y=e.onPaste,O=e.onCompositionStart,j=e.onCompositionEnd,C=e.open,w=e.attrs,I=c||o.createElement("input",null),M=I,N=M.ref,S=M.props,A=S.onKeyDown,k=S.onChange,P=S.onMouseDown,T=S.onCompositionStart,D=S.onCompositionEnd,R=S.style;return I=o.cloneElement(I,Object(K.a)(Object(K.a)({id:i,ref:Object(x.a)(t,N),disabled:l,tabIndex:s,autoComplete:f||"off",type:"search",autoFocus:u,className:E()("".concat(a,"-selection-search-input"),null===(n=I)||void 0===n||null===(r=n.props)||void 0===r?void 0:r.className),style:Object(K.a)(Object(K.a)({},R),{},{opacity:p?null:0}),role:"combobox","aria-expanded":C,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":"".concat(i,"_list_").concat(d)},w),{},{value:p?m:"",maxLength:v,readOnly:!p,unselectable:p?null:"on",onKeyDown:function(e){h(e),A&&A(e)},onMouseDown:function(e){b(e),P&&P(e)},onChange:function(e){g(e),k&&k(e)},onCompositionStart:function(e){O(e),T&&T(e)},onCompositionEnd:function(e){j(e),D&&D(e)},onPaste:y}))},ca=o.forwardRef(ia);ca.displayName="Input";var la=ca;function sa(e,t){Yo?o.useLayoutEffect(e,t):o.useEffect(e,t)}var ua=function(e){e.preventDefault(),e.stopPropagation()},fa=function(e){var t=e.id,n=e.prefixCls,r=e.values,a=e.open,i=e.searchValue,c=e.inputRef,l=e.placeholder,s=e.disabled,u=e.mode,f=e.showSearch,p=e.autoFocus,d=e.autoComplete,m=e.accessibilityIndex,v=e.tabIndex,h=e.removeIcon,b=e.maxTagCount,g=e.maxTagTextLength,O=e.maxTagPlaceholder,C=void 0===O?function(e){return"+ ".concat(e.length," ...")}:O,w=e.tagRender,x=e.onToggleOpen,I=e.onSelect,M=e.onInputChange,N=e.onInputPaste,S=e.onInputKeyDown,A=e.onInputMouseDown,k=e.onInputCompositionStart,P=e.onInputCompositionEnd,T=o.useRef(null),D=Object(o.useState)(0),R=Object(j.a)(D,2),z=R[0],L=R[1],F=Object(o.useState)(!1),K=Object(j.a)(F,2),V=K[0],U=K[1],B="".concat(n,"-selection"),H=a||"tags"===u?i:"",Q="tags"===u||f&&(a||V);function W(e,t,n,r){return o.createElement("span",{className:E()("".concat(B,"-item"),Object(y.a)({},"".concat(B,"-item-disabled"),t))},o.createElement("span",{className:"".concat(B,"-item-content")},e),n&&o.createElement(Ro,{className:"".concat(B,"-item-remove"),onMouseDown:ua,onClick:r,customizeIcon:h},"×"))}sa((function(){L(T.current.scrollWidth)}),[H]);var J=o.createElement("div",{className:"".concat(B,"-search"),style:{width:z},onFocus:function(){U(!0)},onBlur:function(){U(!1)}},o.createElement(la,{ref:c,open:a,prefixCls:n,id:t,inputElement:null,disabled:s,autoFocus:p,autoComplete:d,editable:Q,accessibilityIndex:m,value:H,onKeyDown:S,onMouseDown:A,onChange:M,onPaste:N,onCompositionStart:k,onCompositionEnd:P,tabIndex:v,attrs:Yr(e,!0)}),o.createElement("span",{ref:T,className:"".concat(B,"-search-mirror"),"aria-hidden":!0},H," ")),G=o.createElement(aa,{prefixCls:"".concat(B,"-overflow"),data:r,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,a=!s&&!t,i=n;if("number"==typeof g&&("string"==typeof n||"number"==typeof n)){var c=String(i);c.length>g&&(i="".concat(c.slice(0,g),"..."))}var l=function(e){e&&e.stopPropagation(),I(r,{selected:!1})};return"function"==typeof w?function(e,t,n,r,a){return o.createElement("span",{onMouseDown:function(e){ua(e),x(!0)}},w({label:t,value:e,disabled:n,closable:r,onClose:a}))}(r,i,t,a,l):W(i,t,a,l)},renderRest:function(e){return W("function"==typeof C?C(e):C,!1)},suffix:J,itemKey:"key",maxCount:b});return o.createElement(o.Fragment,null,G,!r.length&&!H&&o.createElement("span",{className:"".concat(B,"-placeholder")},l))},pa=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,a=e.inputRef,i=e.disabled,c=e.autoFocus,l=e.autoComplete,s=e.accessibilityIndex,u=e.mode,f=e.open,p=e.values,d=e.placeholder,m=e.tabIndex,v=e.showSearch,h=e.searchValue,b=e.activeValue,g=e.maxLength,y=e.onInputKeyDown,O=e.onInputMouseDown,C=e.onInputChange,E=e.onInputPaste,w=e.onInputCompositionStart,x=e.onInputCompositionEnd,I=o.useState(!1),M=Object(j.a)(I,2),N=M[0],S=M[1],A="combobox"===u,k=A||v,P=p[0],T=h||"";A&&b&&!N&&(T=b),o.useEffect((function(){A&&S(!1)}),[A,b]);var D=!("combobox"!==u&&!f)&&!!T,R=!P||"string"!=typeof P.label&&"number"!=typeof P.label?void 0:P.label.toString();return o.createElement(o.Fragment,null,o.createElement("span",{className:"".concat(n,"-selection-search")},o.createElement(la,{ref:a,prefixCls:n,id:r,open:f,inputElement:t,disabled:i,autoFocus:c,autoComplete:l,editable:k,accessibilityIndex:s,value:T,onKeyDown:y,onMouseDown:O,onChange:function(e){S(!0),C(e)},onPaste:E,onCompositionStart:w,onCompositionEnd:x,tabIndex:m,attrs:Yr(e,!0),maxLength:A?g:void 0})),!A&&P&&!D&&o.createElement("span",{className:"".concat(n,"-selection-item"),title:R},P.label),!P&&!D&&o.createElement("span",{className:"".concat(n,"-selection-placeholder")},d))};function da(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=o.useRef(null),n=o.useRef(null);function r(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return o.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},r]}var ma=function(e,t){var n=Object(o.useRef)(null),r=Object(o.useRef)(!1),a=e.prefixCls,i=e.multiple,c=e.open,l=e.mode,s=e.showSearch,u=e.tokenWithEnter,f=e.onSearch,p=e.onSearchSubmit,d=e.onToggleOpen,m=e.onInputKeyDown,v=e.domRef;o.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var h=da(0),b=Object(j.a)(h,2),y=b[0],O=b[1],C=Object(o.useRef)(null),E=function(e){!1!==f(e,!0,r.current)&&d(!0)},w={inputRef:n,onInputKeyDown:function(e){var t=e.which;t!==En.UP&&t!==En.DOWN||e.preventDefault(),m&&m(e),t!==En.ENTER||"tags"!==l||r.current||c||p(e.target.value),[En.SHIFT,En.TAB,En.BACKSPACE,En.ESC].includes(t)||d(!0)},onInputMouseDown:function(){O(!0)},onInputChange:function(e){var t=e.target.value;if(u&&C.current&&/[\r\n]/.test(C.current)){var n=C.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,C.current)}C.current=null,E(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");C.current=t},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==l&&E(e.target.value)}},x=i?o.createElement(fa,Object(g.a)({},e,w)):o.createElement(pa,Object(g.a)({},e,w));return o.createElement("div",{ref:v,className:"".concat(a,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=y();e.target===n.current||t||e.preventDefault(),("combobox"===l||s&&t)&&c||(c&&f("",!0,!1),d())}},x)},va=o.forwardRef(ma);va.displayName="Selector";var ha=va,ba=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),a=e.children,i=e.popupElement,c=e.containerWidth,l=e.animation,s=e.transitionName,u=e.dropdownStyle,f=e.dropdownClassName,p=e.direction,d=void 0===p?"ltr":p,m=e.dropdownMatchSelectWidth,v=void 0===m||m,h=e.dropdownRender,b=e.dropdownAlign,O=e.getPopupContainer,j=e.empty,C=e.getTriggerDOMNode,w=Object(V.a)(e,["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode"]),x="".concat(n,"-dropdown"),I=i;h&&(I=h(i));var M=o.useMemo((function(){return function(e){var t="number"!=typeof e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(v)}),[v]),N=l?"".concat(x,"-").concat(l):s,S=o.useRef(null);o.useImperativeHandle(t,(function(){return{getPopupElement:function(){return S.current}}}));var A=Object(K.a)({minWidth:c},u);return"number"==typeof v?A.width=v:v&&(A.width=c),o.createElement(St,Object(g.a)({},w,{showAction:[],hideAction:[],popupPlacement:"rtl"===d?"bottomRight":"bottomLeft",builtinPlacements:M,prefixCls:x,popupTransitionName:N,popup:o.createElement("div",{ref:S},I),popupAlign:b,popupVisible:r,getPopupContainer:O,popupClassName:E()(f,Object(y.a)({},"".concat(x,"-empty"),j)),popupStyle:A,getTriggerDOMNode:C}),a)},ga=o.forwardRef(ba);ga.displayName="SelectTrigger";var ya=ga;var Oa=["removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","tabIndex"];var ja=function(e){var t=e.mode,n=e.options,r=e.children,a=e.backfill,i=e.allowClear,c=e.placeholder,l=e.getInputElement,s=e.showSearch,u=e.onSearch,f=e.defaultOpen,p=e.autoFocus,d=e.labelInValue,m=e.value,v=e.inputValue,h=e.optionLabelProp,b="multiple"===t||"tags"===t,g=void 0!==s?s:b||"combobox"===t,y=n||Qo(r);if(Object(Jo.a)("tags"!==t||y.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var j=y.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(Jo.a)(!j,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Jo.a)("combobox"!==t||!h,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Jo.a)("combobox"===t||!a,"`backfill` only works with `combobox` mode."),Object(Jo.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(Jo.b)("combobox"!==t||!l||!i||!c,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!g&&"combobox"!==t&&"tags"!==t&&Object(Jo.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Jo.b)(!f||p,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=m){var C=Go(m);Object(Jo.a)(!d||C.every((function(e){return"object"===Object(O.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Jo.a)(!b||Array.isArray(m),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var E=null;Object(L.a)(r).some((function(e){if(!o.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(L.a)(e.props.children).every((function(t){return!(o.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(E=t.type,!1)})):(E=t,!0))})),E&&Object(Jo.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(Jo.a)(void 0===v,"`inputValue` is deprecated, please use `searchValue` instead.")}},Ca=function(e){var t=e.prefixCls,n=e.components.optionList,r=e.convertChildrenToData,a=e.flattenOptions,i=e.getLabeledValue,c=e.filterOptions,l=e.isValueDisabled,s=e.findValueOption,u=(e.warningProps,e.fillOptionsWithMissingValue),f=e.omitDOMProps;function p(e,p){var d,m=e.prefixCls,v=void 0===m?t:m,h=e.className,b=e.id,O=e.open,C=e.defaultOpen,w=e.options,x=e.children,I=e.mode,M=e.value,N=e.defaultValue,S=e.labelInValue,A=e.showSearch,k=e.inputValue,P=e.searchValue,T=e.filterOption,D=e.filterSort,R=e.optionFilterProp,z=void 0===R?"value":R,L=e.autoClearSearchValue,F=void 0===L||L,U=e.onSearch,B=e.allowClear,H=e.clearIcon,Q=e.showArrow,W=e.inputIcon,J=e.menuItemSelectedIcon,G=e.disabled,Z=e.loading,Y=e.defaultActiveFirstOption,q=e.notFoundContent,X=void 0===q?"Not Found":q,_=e.optionLabelProp,$=e.backfill,ee=(e.tabIndex,e.getInputElement),ne=e.getPopupContainer,re=e.listHeight,oe=void 0===re?200:re,ae=e.listItemHeight,ie=void 0===ae?20:ae,ce=e.animation,le=e.transitionName,se=e.virtual,ue=e.dropdownStyle,fe=e.dropdownClassName,pe=e.dropdownMatchSelectWidth,de=e.dropdownRender,me=e.dropdownAlign,ve=e.showAction,he=void 0===ve?[]:ve,be=e.direction,ge=e.tokenSeparators,ye=e.tagRender,Oe=e.onPopupScroll,je=e.onDropdownVisibleChange,Ce=e.onFocus,Ee=e.onBlur,we=e.onKeyUp,xe=e.onKeyDown,Ie=e.onMouseDown,Me=e.onChange,Ne=e.onSelect,Se=e.onDeselect,Ae=e.onClear,ke=e.internalProps,Pe=void 0===ke?{}:ke,Te=Object(V.a)(e,["prefixCls","className","id","open","defaultOpen","options","children","mode","value","defaultValue","labelInValue","showSearch","inputValue","searchValue","filterOption","filterSort","optionFilterProp","autoClearSearchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","menuItemSelectedIcon","disabled","loading","defaultActiveFirstOption","notFoundContent","optionLabelProp","backfill","tabIndex","getInputElement","getPopupContainer","listHeight","listItemHeight","animation","transitionName","virtual","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","onChange","onSelect","onDeselect","onClear","internalProps"]),De="RC_SELECT_INTERNAL_PROPS_MARK"===Pe.mark,Re=f?f(Te):Te;Oa.forEach((function(e){delete Re[e]}));var ze=Object(o.useRef)(null),Le=Object(o.useRef)(null),Fe=Object(o.useRef)(null),Ke=Object(o.useRef)(null),Ve=Object(o.useMemo)((function(){return(ge||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ge]),Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=o.useState(!1),n=Object(j.a)(t,2),r=n[0],a=n[1],i=o.useRef(null),c=function(){window.clearTimeout(i.current)};o.useEffect((function(){return c}),[]);var l=function(t,n){c(),i.current=window.setTimeout((function(){a(t),n&&n()}),e)};return[r,l,c]}(),Be=Object(j.a)(Ue,3),He=Be[0],Qe=Be[1],We=Be[2],Je=Object(o.useState)(),Ge=Object(j.a)(Je,2),Ze=Ge[0],Ye=Ge[1];Object(o.useEffect)((function(){var e;Ye("rc_select_".concat((Yo?(e=qo,qo+=1):e="TEST_OR_SSR",e)))}),[]);var qe=b||Ze,Xe=_;void 0===Xe&&(Xe=w?"label":"children");var _e="combobox"!==I&&S,$e="tags"===I||"multiple"===I,et=void 0!==A?A:$e||"combobox"===I,tt=Object(o.useState)(!1),nt=Object(j.a)(tt,2),rt=nt[0],ot=nt[1];Object(o.useEffect)((function(){ot(te())}),[]);var at=Object(o.useRef)(null);o.useImperativeHandle(p,(function(){var e,t,n;return{focus:null===(e=Fe.current)||void 0===e?void 0:e.focus,blur:null===(t=Fe.current)||void 0===t?void 0:t.blur,scrollTo:null===(n=Ke.current)||void 0===n?void 0:n.scrollTo}}));var it=zt(N,{value:M}),ct=Object(j.a)(it,2),lt=ct[0],st=ct[1],ut=Object(o.useMemo)((function(){return function(e,t){var n=t.labelInValue,r=t.combobox,o=new Map;if(void 0===e||""===e&&r)return[[],o];var a=Array.isArray(e)?e:[e],i=a;return n&&(i=a.map((function(e){var t=e.key,n=e.value,r=void 0!==n?n:t;return o.set(r,e),r}))),[i,o]}(lt,{labelInValue:_e,combobox:"combobox"===I})}),[lt,_e]),ft=Object(j.a)(ut,2),pt=ft[0],dt=ft[1],mt=Object(o.useMemo)((function(){return new Set(pt)}),[pt]),vt=Object(o.useState)(null),ht=Object(j.a)(vt,2),bt=ht[0],gt=ht[1],yt=Object(o.useState)(""),Ot=Object(j.a)(yt,2),jt=Ot[0],Ct=Ot[1],Et=jt;"combobox"===I&&void 0!==lt?Et=lt:void 0!==P?Et=P:k&&(Et=k);var wt=Object(o.useMemo)((function(){var e=w;return void 0===e&&(e=r(x)),"tags"===I&&u&&(e=u(e,lt,Xe,S)),e||[]}),[w,x,I,lt]),xt=Object(o.useMemo)((function(){return a(wt,e)}),[wt]),It=function(e){var t=o.useRef(null),n=o.useMemo((function(){var t=new Map;return e.forEach((function(e){var n=e.data.value;t.set(n,e)})),t}),[e]);return t.current=n,function(e){return e.map((function(e){return t.current.get(e)})).filter(Boolean)}}(xt),Mt=Object(o.useMemo)((function(){if(!Et||!et)return Object(cn.a)(wt);var e=c(Et,wt,{optionFilterProp:z,filterOption:"combobox"===I&&void 0===T?function(){return!0}:T});return"tags"===I&&e.every((function(e){return e[z]!==Et}))&&e.unshift({value:Et,label:Et,key:"__RC_SELECT_TAG_PLACEHOLDER__"}),D&&Array.isArray(e)?Object(cn.a)(e).sort(D):e}),[wt,Et,I,et,D]),Nt=Object(o.useMemo)((function(){return a(Mt,e)}),[Mt]);Object(o.useEffect)((function(){Ke.current&&Ke.current.scrollTo&&Ke.current.scrollTo(0)}),[Et]);var St,At,kt=Object(o.useMemo)((function(){var e=pt.map((function(e){var t=It([e]),n=i(e,{options:t,prevValueMap:dt,labelInValue:_e,optionLabelProp:Xe});return Object(K.a)(Object(K.a)({},n),{},{disabled:l(e,t)})}));return I||1!==e.length||null!==e[0].value||null!==e[0].label?e:[]}),[lt,wt,I]);St=kt,At=o.useRef(St),kt=o.useMemo((function(){var e=new Map;At.current.forEach((function(t){var n=t.value,r=t.label;n!==r&&e.set(n,r)}));var t=St.map((function(t){var n=e.get(t.value);return t.isCacheable&&n?Object(K.a)(Object(K.a)({},t),{},{label:n}):t}));return At.current=t,t}),[St]);var Pt=function(e,t,n){var r=It([e]),o=s([e],r)[0];if(!Pe.skipTriggerSelect){var a=_e?i(e,{options:r,prevValueMap:dt,labelInValue:_e,optionLabelProp:Xe}):e;t&&Ne?Ne(a,o):!t&&Se&&Se(a,o)}De&&(t&&Pe.onRawSelect?Pe.onRawSelect(e,o,n):!t&&Pe.onRawDeselect&&Pe.onRawDeselect(e,o,n))},Tt=Object(o.useState)([]),Dt=Object(j.a)(Tt,2),Rt=Dt[0],Lt=Dt[1],Ft=function(e){if(!De||!Pe.skipTriggerChange){var t=It(e),n=function(e,t){var n=t.optionLabelProp,r=t.labelInValue,o=t.prevValueMap,a=t.options,i=t.getLabeledValue,c=e;return r&&(c=c.map((function(e){return i(e,{options:a,prevValueMap:o,labelInValue:r,optionLabelProp:n})}))),c}(Array.from(e),{labelInValue:_e,options:t,getLabeledValue:i,prevValueMap:dt,optionLabelProp:Xe}),r=$e?n:n[0];if(Me&&(0!==pt.length||0!==n.length)){var o=s(e,t,{prevValueOptions:Rt});Lt(o.map((function(t,n){var r=Object(K.a)({},t);return Object.defineProperty(r,"_INTERNAL_OPTION_VALUE_",{get:function(){return e[n]}}),r}))),Me(r,$e?o:o[0])}st(r)}},Kt=function(e,t){var n,r=t.selected,o=t.source;G||($e?(n=new Set(pt),r?n.add(e):n.delete(e)):(n=new Set).add(e),($e||!$e&&Array.from(pt)[0]!==e)&&Ft(Array.from(n)),Pt(e,!$e||r,o),"combobox"===I?(Ct(String(e)),gt("")):$e&&!F||(Ct(""),gt("")))},Vt="combobox"===I&&ee&&ee()||null,Ut=zt(void 0,{defaultValue:C,value:O}),Bt=Object(j.a)(Ut,2),Ht=Bt[0],Qt=Bt[1],Wt=Ht,Jt=!X&&!Mt.length;(G||Jt&&Wt&&"combobox"===I)&&(Wt=!1);var Gt=!Jt&&Wt,Zt=function(e){var t=void 0!==e?e:!Wt;Ht===t||G||(Qt(t),je&&je(t))};!function(e,t,n){var r=o.useRef(null);r.current={elements:e.filter((function(e){return e})),open:t,triggerOpen:n},o.useEffect((function(){function e(e){var t=e.target;t.shadowRoot&&e.composed&&(t=e.composedPath()[0]||t),r.current.open&&r.current.elements.every((function(e){return!e.contains(t)&&e!==t}))&&r.current.triggerOpen(!1)}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}([ze.current,Le.current&&Le.current.getPopupElement()],Gt,Zt);var Yt=function(e,t,n){var r=!0,o=e;gt(null);var a=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,r=function e(t,r){var o=Object(Wo.a)(r),a=o[0],i=o.slice(1);if(!a)return[t];var c=t.split(a);return n=n||c.length>1,c.reduce((function(t,n){return[].concat(Object(cn.a)(t),Object(cn.a)(e(n,i)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}(e,ge),i=a;if("combobox"===I)t&&Ft([o]);else if(a){o="","tags"!==I&&(i=a.map((function(e){var t=xt.find((function(t){return t.data[Xe]===e}));return t?t.data.value:null})).filter((function(e){return null!==e})));var c=Array.from(new Set([].concat(Object(cn.a)(pt),Object(cn.a)(i))));Ft(c),c.forEach((function(e){Pt(e,!0,"input")})),Zt(!1),r=!1}return Ct(o),U&&Et!==o&&U(o),r};Object(o.useEffect)((function(){Ht&&G&&Qt(!1)}),[G]),Object(o.useEffect)((function(){Wt||$e||"combobox"===I||Yt("",!1,!1)}),[Wt]);var qt=da(),Xt=Object(j.a)(qt,2),_t=Xt[0],$t=Xt[1],en=Object(o.useRef)(!1),tn=[];Object(o.useEffect)((function(){return function(){tn.forEach((function(e){return clearTimeout(e)})),tn.splice(0,tn.length)}}),[]);var nn=Object(o.useState)(0),rn=Object(j.a)(nn,2),on=rn[0],an=rn[1],ln=void 0!==Y?Y:"combobox"!==I,sn=Object(o.useState)(null),un=Object(j.a)(sn,2),fn=un[0],pn=un[1],dn=Object(o.useState)({}),mn=Object(j.a)(dn,2)[1];sa((function(){if(Gt){var e=Math.ceil(ze.current.offsetWidth);fn!==e&&pn(e)}}),[Gt]);var vn,hn=o.createElement(n,{ref:Ke,prefixCls:v,id:qe,open:Wt,childrenAsData:!w,options:Mt,flattenOptions:Nt,multiple:$e,values:mt,height:oe,itemHeight:ie,onSelect:function(e,t){Kt(e,Object(K.a)(Object(K.a)({},t),{},{source:"option"}))},onToggleOpen:Zt,onActiveValue:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source,o=void 0===r?"keyboard":r;an(t),$&&"combobox"===I&&null!==e&&"keyboard"===o&&gt(String(e))},defaultActiveFirstOption:ln,notFoundContent:X,onScroll:Oe,searchValue:Et,menuItemSelectedIcon:J,virtual:!1!==se&&!1!==pe,onMouseEnter:function(){mn({})}});!G&&B&&(pt.length||Et)&&(vn=o.createElement(Ro,{className:"".concat(v,"-clear"),onMouseDown:function(){De&&Pe.onClear&&Pe.onClear(),Ae&&Ae(),Ft([]),Yt("",!1,!1)},customizeIcon:H},"×"));var bn,gn=void 0!==Q?Q:Z||!$e&&"combobox"!==I;gn&&(bn=o.createElement(Ro,{className:E()("".concat(v,"-arrow"),Object(y.a)({},"".concat(v,"-arrow-loading"),Z)),customizeIcon:W,customizeIconProps:{loading:Z,searchValue:Et,open:Wt,focused:He,showSearch:et}}));var yn=E()(v,h,(d={},Object(y.a)(d,"".concat(v,"-focused"),He),Object(y.a)(d,"".concat(v,"-multiple"),$e),Object(y.a)(d,"".concat(v,"-single"),!$e),Object(y.a)(d,"".concat(v,"-allow-clear"),B),Object(y.a)(d,"".concat(v,"-show-arrow"),gn),Object(y.a)(d,"".concat(v,"-disabled"),G),Object(y.a)(d,"".concat(v,"-loading"),Z),Object(y.a)(d,"".concat(v,"-open"),Wt),Object(y.a)(d,"".concat(v,"-customize-input"),Vt),Object(y.a)(d,"".concat(v,"-show-search"),et),d));return o.createElement("div",Object(g.a)({className:yn},Re,{ref:ze,onMouseDown:function(e){var t=e.target,n=Le.current&&Le.current.getPopupElement();if(n&&n.contains(t)){var r=setTimeout((function(){var e,t=tn.indexOf(r);(-1!==t&&tn.splice(t,1),We(),rt||n.contains(document.activeElement))||(null===(e=Fe.current)||void 0===e||e.focus())}));tn.push(r)}if(Ie){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];Ie.apply(void 0,[e].concat(a))}},onKeyDown:function(e){var t,n=_t(),r=e.which;if(r===En.ENTER&&("combobox"!==I&&e.preventDefault(),Wt||Zt(!0)),$t(!!Et),r===En.BACKSPACE&&!n&&$e&&!Et&&pt.length){var o=Zo(kt,pt);null!==o.removedValue&&(Ft(o.values),Pt(o.removedValue,!1,"input"))}for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];Wt&&Ke.current&&(t=Ke.current).onKeyDown.apply(t,[e].concat(i));xe&&xe.apply(void 0,[e].concat(i))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o;Wt&&Ke.current&&(o=Ke.current).onKeyUp.apply(o,[e].concat(n));we&&we.apply(void 0,[e].concat(n))},onFocus:function(){Qe(!0),G||(Ce&&!en.current&&Ce.apply(void 0,arguments),he.includes("focus")&&Zt(!0)),en.current=!0},onBlur:function(){Qe(!1,(function(){en.current=!1,Zt(!1)})),G||(Et&&("tags"===I?(Yt("",!1,!1),Ft(Array.from(new Set([].concat(Object(cn.a)(pt),[Et]))))):"multiple"===I&&Ct("")),Ee&&Ee.apply(void 0,arguments))}}),He&&!Wt&&o.createElement("span",{style:{width:0,height:0,display:"flex",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(pt.join(", "))),o.createElement(ya,{ref:Le,disabled:G,prefixCls:v,visible:Gt,popupElement:hn,containerWidth:fn,animation:ce,transitionName:le,dropdownStyle:ue,dropdownClassName:fe,direction:be,dropdownMatchSelectWidth:pe,dropdownRender:de,dropdownAlign:me,getPopupContainer:ne,empty:!wt.length,getTriggerDOMNode:function(){return at.current}},o.createElement(ha,Object(g.a)({},e,{domRef:at,prefixCls:v,inputElement:Vt,ref:Fe,id:qe,showSearch:et,mode:I,accessibilityIndex:on,multiple:$e,tagRender:ye,values:kt,open:Wt,onToggleOpen:Zt,searchValue:Et,activeValue:bt,onSearch:Yt,onSearchSubmit:function(e){if(e&&e.trim()){var t=Array.from(new Set([].concat(Object(cn.a)(pt),[e])));Ft(t),t.forEach((function(e){Pt(e,!0,"input")})),Ct("")}},onSelect:function(e,t){Kt(e,Object(K.a)(Object(K.a)({},t),{},{source:"selection"}))},tokenWithEnter:Ve}))),bn,vn)}return o.forwardRef(p)}({prefixCls:"rc-select",components:{optionList:Fo},convertChildrenToData:Qo,flattenOptions:function(e){var t=[];return function e(n,r){n.forEach((function(n){r||!("options"in n)?t.push({key:Xo(n,t.length),groupOption:r,data:n}):(t.push({key:Xo(n,t.length),group:!0,data:n}),e(n.options,!0))}))}(e,!1),t},getLabeledValue:function(e,t){var n=t.options,r=t.prevValueMap,o=t.labelInValue,a=t.optionLabelProp,i=$o([e],n)[0],c={value:e},l=o?r.get(e):void 0;return l&&"object"===Object(O.a)(l)&&"label"in l?(c.label=l.label,i&&"string"==typeof l.label&&"string"==typeof i[a]&&l.label.trim()!==i[a].trim()&&Object(Jo.a)(!1,"`label` of `value` is not same as `label` in Select options.")):i&&a in i?c.label=i[a]:(c.label=e,c.isCacheable=!0),c.key=c.value,c},filterOptions:function(e,t,n){var r,o=n.optionFilterProp,a=n.filterOption,i=[];return!1===a?Object(cn.a)(t):(r="function"==typeof a?a:function(e){return function(t,n){var r=t.toLowerCase();return"options"in n?ea(n.label).toLowerCase().includes(r):ea(n[e]).toLowerCase().includes(r)}}(o),t.forEach((function(t){if("options"in t)if(r(e,t))i.push(t);else{var n=t.options.filter((function(t){return r(e,t)}));n.length&&i.push(Object(K.a)(Object(K.a)({},t),{},{options:n}))}else r(e,_o(t))&&i.push(t)})),i)},isValueDisabled:function(e,t){return $o([e],t)[0].disabled},findValueOption:$o,warningProps:ja,fillOptionsWithMissingValue:function(e,t,n,r){var o=Go(t).slice().sort(),a=Object(cn.a)(e),i=new Set;return e.forEach((function(e){e.options?e.options.forEach((function(e){i.add(e.value)})):i.add(e.value)})),o.forEach((function(e){var t,o=r?e.value:e;i.has(o)||a.push(r?(t={},Object(y.a)(t,n,e.label),Object(y.a)(t,"value",o),t):{value:o})})),a}}),Ea=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).selectRef=o.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(B.a)(n,[{key:"render",value:function(){return o.createElement(Ca,Object(g.a)({ref:this.selectRef},this.props))}}]),n}(o.Component);Ea.Option=Vo,Ea.OptGroup=Bo;var wa=Ea,xa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Ia=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:xa}))};Ia.displayName="DownOutlined";var Ma=o.forwardRef(Ia),Na=n("ye1Q"),Sa=n("4i/N"),Aa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ka=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Aa}))};ka.displayName="SearchOutlined";var Pa=o.forwardRef(ka);var Ta=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Da=function(e,t){var n,r,a=e.prefixCls,i=e.bordered,c=void 0===i||i,l=e.className,s=e.getPopupContainer,u=e.dropdownClassName,f=e.listHeight,p=void 0===f?256:f,d=e.listItemHeight,m=void 0===d?24:d,v=e.size,h=e.notFoundContent,b=Ta(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","listHeight","listItemHeight","size","notFoundContent"]),O=o.useContext(I.b),j=O.getPopupContainer,C=O.getPrefixCls,w=O.renderEmpty,x=O.direction,M=O.virtual,N=O.dropdownMatchSelectWidth,S=o.useContext(Un.b),A=C("select",a),k=C(),P=o.useMemo((function(){var e=b.mode;if("combobox"!==e)return"SECRET_COMBOBOX_MODE_DO_NOT_USE"===e?"combobox":e}),[b.mode]),T="multiple"===P||"tags"===P;r=void 0!==h?h:"combobox"===P?null:w("Select");var D=function(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,a=e.removeIcon,i=e.loading,c=e.multiple,l=e.prefixCls,s=n;n||(s=o.createElement(Vn.a,null));var u=null;if(void 0!==t)u=t;else if(i)u=o.createElement(Na.a,{spin:!0});else{var f="".concat(l,"-suffix");u=function(e){var t=e.open,n=e.showSearch;return t&&n?o.createElement(Pa,{className:f}):o.createElement(Ma,{className:f})}}return{clearIcon:s,suffixIcon:u,itemIcon:void 0!==r?r:c?o.createElement(hn,null):null,removeIcon:void 0!==a?a:o.createElement(Sa.a,null)}}(Object(g.a)(Object(g.a)({},b),{multiple:T,prefixCls:A})),R=D.suffixIcon,z=D.itemIcon,L=D.removeIcon,F=D.clearIcon,K=Object(an.a)(b,["suffixIcon","itemIcon"]),V=E()(u,Object(y.a)({},"".concat(A,"-dropdown-").concat(x),"rtl"===x)),U=v||S,B=E()((n={},Object(y.a)(n,"".concat(A,"-lg"),"large"===U),Object(y.a)(n,"".concat(A,"-sm"),"small"===U),Object(y.a)(n,"".concat(A,"-rtl"),"rtl"===x),Object(y.a)(n,"".concat(A,"-borderless"),!c),n),l);return o.createElement(wa,Object(g.a)({ref:t,virtual:M,dropdownMatchSelectWidth:N},K,{transitionName:Ht(k,"slide-up",b.transitionName),listHeight:p,listItemHeight:m,mode:P,prefixCls:A,direction:x,inputIcon:R,menuItemSelectedIcon:z,removeIcon:L,clearIcon:F,notFoundContent:r,className:B,getPopupContainer:s||j,dropdownClassName:V}))},Ra=o.forwardRef(Da);Ra.SECRET_COMBOBOX_MODE_DO_NOT_USE="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ra.Option=Vo,Ra.OptGroup=Bo;var za=Ra,La=function(e){return o.createElement(za,Object(g.a)({size:"small"},e))};La.Option=za.Option;var Fa=La,Ka=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Va=function(e){var t=e.prefixCls,n=e.selectPrefixCls,r=e.className,a=e.size,i=e.locale,c=Ka(e,["prefixCls","selectPrefixCls","className","size","locale"]),l=S().xs,s=o.useContext(I.b),u=s.getPrefixCls,f=s.direction,p=u("pagination",t),d=function(e){var t=Object(g.a)(Object(g.a)({},e),i),s="small"===a||!(!l||a||!c.responsive),d=u("select",n),m=E()(Object(y.a)({mini:s},"".concat(p,"-rtl"),"rtl"===f),r);return o.createElement(Rr,Object(g.a)({},c,{prefixCls:p,selectPrefixCls:d},function(){var e=o.createElement("span",{className:"".concat(p,"-item-ellipsis")},"•••"),t=o.createElement("button",{className:"".concat(p,"-item-link"),type:"button",tabIndex:-1},o.createElement(Lr.a,null)),n=o.createElement("button",{className:"".concat(p,"-item-link"),type:"button",tabIndex:-1},o.createElement(Fr.a,null)),r=o.createElement("a",{className:"".concat(p,"-item-link")},o.createElement("div",{className:"".concat(p,"-item-container")},o.createElement(Ur,{className:"".concat(p,"-item-link-icon")}),e)),a=o.createElement("a",{className:"".concat(p,"-item-link")},o.createElement("div",{className:"".concat(p,"-item-container")},o.createElement(Qr,{className:"".concat(p,"-item-link-icon")}),e));if("rtl"===f){var i=[n,t];t=i[0],n=i[1];var c=[a,r];r=c[0],a=c[1]}return{prevIcon:t,nextIcon:n,jumpPrevIcon:r,jumpNextIcon:a}}(),{className:m,selectComponentClass:s?Fa:za,locale:t}))};return o.createElement(jn.a,{componentName:"Pagination",defaultLocale:zr.a},d)},Ua=n("qrJ5"),Ba=n("/kpp"),Ha=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Qa=function(e){var t,n=e.prefixCls,r=e.children,a=e.actions,i=e.extra,c=e.className,l=e.colStyle,s=Ha(e,["prefixCls","children","actions","extra","className","colStyle"]),u=o.useContext(Ga),f=u.grid,p=u.itemLayout,d=o.useContext(I.b).getPrefixCls,m=d("list",n),v=a&&a.length>0&&o.createElement("ul",{className:"".concat(m,"-item-action"),key:"actions"},a.map((function(e,t){return o.createElement("li",{key:"".concat(m,"-item-action-").concat(t)},e,t!==a.length-1&&o.createElement("em",{className:"".concat(m,"-item-action-split")}))}))),h=f?"div":"li",b=o.createElement(h,Object(g.a)({},s,{className:E()("".concat(m,"-item"),Object(y.a)({},"".concat(m,"-item-no-flex"),!("vertical"===p?i:(o.Children.forEach(r,(function(e){"string"==typeof e&&(t=!0)})),!(t&&o.Children.count(r)>1)))),c)}),"vertical"===p&&i?[o.createElement("div",{className:"".concat(m,"-item-main"),key:"content"},r,v),o.createElement("div",{className:"".concat(m,"-item-extra"),key:"extra"},i)]:[r,v,Object(F.a)(i,{key:"extra"})]);return f?o.createElement(Ba.a,{flex:1,style:l},b):b};Qa.Meta=function(e){var t=e.prefixCls,n=e.className,r=e.avatar,a=e.title,i=e.description,c=Ha(e,["prefixCls","className","avatar","title","description"]),l=(0,o.useContext(I.b).getPrefixCls)("list",t),s=E()("".concat(l,"-item-meta"),n),u=o.createElement("div",{className:"".concat(l,"-item-meta-content")},a&&o.createElement("h4",{className:"".concat(l,"-item-meta-title")},a),i&&o.createElement("div",{className:"".concat(l,"-item-meta-description")},i));return o.createElement("div",Object(g.a)({},c,{className:s}),r&&o.createElement("div",{className:"".concat(l,"-item-meta-avatar")},r),(a||i)&&u)};var Wa=Qa,Ja=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Ga=o.createContext({});Ga.Consumer;function Za(e){var t,n=e.pagination,r=void 0!==n&&n,a=e.prefixCls,i=e.bordered,c=void 0!==i&&i,l=e.split,s=void 0===l||l,u=e.className,f=e.children,p=e.itemLayout,d=e.loadMore,m=e.grid,v=e.dataSource,h=void 0===v?[]:v,b=e.size,C=e.header,w=e.footer,x=e.loading,M=void 0!==x&&x,A=e.rowKey,k=e.renderItem,P=e.locale,T=Ja(e,["pagination","prefixCls","bordered","split","className","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),D=r&&"object"===Object(O.a)(r)?r:{},R=o.useState(D.defaultCurrent||1),z=Object(j.a)(R,2),L=z[0],F=z[1],K=o.useState(D.defaultPageSize||10),V=Object(j.a)(K,2),U=V[0],B=V[1],H=o.useContext(I.b),Q=H.getPrefixCls,W=H.renderEmpty,J=H.direction,G={},Z=function(e){return function(t,n){F(t),B(n),r&&r[e]&&r[e](t,n)}},Y=Z("onChange"),q=Z("onShowSizeChange"),X=Q("list",a),_=M;"boolean"==typeof _&&(_={spinning:_});var $=_&&_.spinning,ee="";switch(b){case"large":ee="lg";break;case"small":ee="sm"}var te=E()(X,(t={},Object(y.a)(t,"".concat(X,"-vertical"),"vertical"===p),Object(y.a)(t,"".concat(X,"-").concat(ee),ee),Object(y.a)(t,"".concat(X,"-split"),s),Object(y.a)(t,"".concat(X,"-bordered"),c),Object(y.a)(t,"".concat(X,"-loading"),$),Object(y.a)(t,"".concat(X,"-grid"),m),Object(y.a)(t,"".concat(X,"-something-after-last-item"),!!(d||r||w)),Object(y.a)(t,"".concat(X,"-rtl"),"rtl"===J),t),u),ne=Object(g.a)(Object(g.a)(Object(g.a)({},{current:1,total:0}),{total:h.length,current:L,pageSize:U}),r||{}),re=Math.ceil(ne.total/ne.pageSize);ne.current>re&&(ne.current=re);var oe=r?o.createElement("div",{className:"".concat(X,"-pagination")},o.createElement(Va,Object(g.a)({},ne,{onChange:Y,onShowSizeChange:q}))):null,ae=Object(cn.a)(h);r&&h.length>(ne.current-1)*ne.pageSize&&(ae=Object(cn.a)(h).splice((ne.current-1)*ne.pageSize,ne.pageSize));var ie=S(),ce=o.useMemo((function(){for(var e=0;e<N.b.length;e+=1){var t=N.b[e];if(ie[t])return t}}),[ie]),le=o.useMemo((function(){if(m){var e=ce&&m[ce]?m[ce]:m.column;return e?{width:"".concat(100/e,"%"),maxWidth:"".concat(100/e,"%")}:void 0}}),[null==m?void 0:m.column,ce]),se=$&&o.createElement("div",{style:{minHeight:53}});if(ae.length>0){var ue=ae.map((function(e,t){return function(e,t){return k?((n="function"==typeof A?A(e):"string"==typeof A?e[A]:e.key)||(n="list-item-".concat(t)),G[t]=n,k(e,t)):null;var n}(e,t)})),fe=o.Children.map(ue,(function(e,t){return o.createElement("div",{key:G[t],style:le},e)}));se=m?o.createElement(Ua.a,{gutter:m.gutter},fe):o.createElement("ul",{className:"".concat(X,"-items")},ue)}else f||$||(se=function(e,t){return o.createElement("div",{className:"".concat(e,"-empty-text")},P&&P.emptyText||t("List"))}(X,W));var pe=ne.position||"bottom";return o.createElement(Ga.Provider,{value:{grid:m,itemLayout:p}},o.createElement("div",Object(g.a)({className:te},T),("top"===pe||"both"===pe)&&oe,C&&o.createElement("div",{className:"".concat(X,"-header")},C),o.createElement(xr,_,se,f),w&&o.createElement("div",{className:"".concat(X,"-footer")},w),d||("bottom"===pe||"both"===pe)&&oe))}Za.Item=Wa;var Ya=Za,qa=(n("HJMW"),n("OQrj"),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}),Xa=function(e){var t=e.prefixCls,n=e.className,r=e.hoverable,a=void 0===r||r,i=qa(e,["prefixCls","className","hoverable"]);return o.createElement(I.a,null,(function(e){var r=(0,e.getPrefixCls)("card",t),c=E()("".concat(r,"-grid"),n,Object(y.a)({},"".concat(r,"-grid-hoverable"),a));return o.createElement("div",Object(g.a)({},i,{className:c}))}))},_a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},$a=function(e){return o.createElement(I.a,null,(function(t){var n=t.getPrefixCls,r=e.prefixCls,a=e.className,i=e.avatar,c=e.title,l=e.description,s=_a(e,["prefixCls","className","avatar","title","description"]),u=n("card",r),f=E()("".concat(u,"-meta"),a),p=i?o.createElement("div",{className:"".concat(u,"-meta-avatar")},i):null,d=c?o.createElement("div",{className:"".concat(u,"-meta-title")},c):null,m=l?o.createElement("div",{className:"".concat(u,"-meta-description")},l):null,v=d||m?o.createElement("div",{className:"".concat(u,"-meta-detail")},d,m):null;return o.createElement("div",Object(g.a)({},s,{className:f}),p,v)}))};function ei(e){var t=Object(o.useRef)(),n=Object(o.useRef)(!1);return Object(o.useEffect)((function(){return function(){n.current=!0,Z.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n.current||(Z.a.cancel(t.current),t.current=Object(Z.a)((function(){e.apply(void 0,o)})))}}function ti(e,t){var n,r=e.prefixCls,a=e.id,i=e.active,c=e.rtl,l=e.tab,s=l.key,u=l.tab,f=l.disabled,p=l.closeIcon,d=e.tabBarGutter,m=e.tabPosition,v=e.closable,h=e.renderWrapper,b=e.removeAriaLabel,g=e.editable,O=e.onClick,j=e.onRemove,C=e.onFocus,w="".concat(r,"-tab");o.useEffect((function(){return j}),[]);var x={};"top"===m||"bottom"===m?x[c?"marginLeft":"marginRight"]=d:x.marginBottom=d;var I=g&&!1!==v&&!f;function M(e){f||O(e)}var N=o.createElement("div",{key:s,ref:t,className:E()(w,(n={},Object(y.a)(n,"".concat(w,"-with-remove"),I),Object(y.a)(n,"".concat(w,"-active"),i),Object(y.a)(n,"".concat(w,"-disabled"),f),n)),style:x,onClick:M},o.createElement("div",{role:"tab","aria-selected":i,id:a&&"".concat(a,"-tab-").concat(s),className:"".concat(w,"-btn"),"aria-controls":a&&"".concat(a,"-panel-").concat(s),"aria-disabled":f,tabIndex:f?null:0,onClick:function(e){e.stopPropagation(),M(e)},onKeyDown:function(e){[En.SPACE,En.ENTER].includes(e.which)&&(e.preventDefault(),M(e))},onFocus:C},u),I&&o.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:"".concat(w,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),g.onEdit("remove",{key:s,event:t})}},p||g.removeIcon||"×"));return h&&(N=h(N)),N}var ni=o.forwardRef(ti),ri={width:0,height:0,left:0,top:0};var oi={width:0,height:0,left:0,top:0,right:0};var ai,ii=(ai=function(e,t){return(ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ai(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ci=o.createContext(null),li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ii(t,e),t.prototype.render=function(){return o.createElement(ci.Provider,{value:this.props.store},this.props.children)},t}(o.Component),si=n("Gytx"),ui=n.n(si),fi=n("2mql"),pi=n.n(fi),di=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mi=function(){return(mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var vi=function(){return{}};function hi(e,t){void 0===t&&(t={});var n=!!e,r=e||vi;return function(a){var i=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.unsubscribe=null,o.handleChange=function(){if(o.unsubscribe){var e=r(o.store.getState(),o.props);o.setState({subscribed:e})}},o.store=o.context,o.state={subscribed:r(o.store.getState(),e),store:o.store,props:e},o}return di(i,t),i.getDerivedStateFromProps=function(t,n){return e&&2===e.length&&t!==n.props?{subscribed:r(n.store.getState(),t),props:t}:{props:t}},i.prototype.componentDidMount=function(){this.trySubscribe()},i.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},i.prototype.shouldComponentUpdate=function(e,t){return!ui()(this.props,e)||!ui()(this.state.subscribed,t.subscribed)},i.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},i.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},i.prototype.render=function(){var e=mi(mi(mi({},this.props),this.state.subscribed),{store:this.store});return o.createElement(a,mi({},e,{ref:this.props.miniStoreForwardedRef}))},i.displayName="Connect("+function(e){return e.displayName||e.name||"Component"}(a)+")",i.contextType=ci,i}(o.Component);if(t.forwardRef){var c=o.forwardRef((function(e,t){return o.createElement(i,mi({},e,{miniStoreForwardedRef:t}))}));return pi()(c,a)}return pi()(i,a)}}var bi=function(){return(bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function gi(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t<e.length;t++)e[t]&&e[t].apply&&e[t].apply(this,arguments)}}var yi=/iPhone/i,Oi=/iPod/i,ji=/iPad/i,Ci=/\bAndroid(?:.+)Mobile\b/i,Ei=/Android/i,wi=/\bAndroid(?:.+)SD4930UR\b/i,xi=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Ii=/Windows Phone/i,Mi=/\bWindows(?:.+)ARM\b/i,Ni=/BlackBerry/i,Si=/BB10/i,Ai=/Opera Mini/i,ki=/\b(CriOS|Chrome)(?:.+)Mobile/i,Pi=/Mobile(?:.+)Firefox\b/i;function Ti(e,t){return e.test(t)}function Di(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(j.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var o=n;t=Object(j.a)(o,1)[0]}var a={apple:{phone:Ti(yi,t)&&!Ti(Ii,t),ipod:Ti(Oi,t),tablet:!Ti(yi,t)&&Ti(ji,t)&&!Ti(Ii,t),device:(Ti(yi,t)||Ti(Oi,t)||Ti(ji,t))&&!Ti(Ii,t)},amazon:{phone:Ti(wi,t),tablet:!Ti(wi,t)&&Ti(xi,t),device:Ti(wi,t)||Ti(xi,t)},android:{phone:!Ti(Ii,t)&&Ti(wi,t)||!Ti(Ii,t)&&Ti(Ci,t),tablet:!Ti(Ii,t)&&!Ti(wi,t)&&!Ti(Ci,t)&&(Ti(xi,t)||Ti(Ei,t)),device:!Ti(Ii,t)&&(Ti(wi,t)||Ti(xi,t)||Ti(Ci,t)||Ti(Ei,t))||Ti(/\bokhttp\b/i,t)},windows:{phone:Ti(Ii,t),tablet:Ti(Mi,t),device:Ti(Ii,t)||Ti(Mi,t)},other:{blackberry:Ti(Ni,t),blackberry10:Ti(Si,t),opera:Ti(Ai,t),firefox:Ti(Pi,t),chrome:Ti(ki,t),device:Ti(Ni,t)||Ti(Si,t)||Ti(Ai,t)||Ti(Pi,t)||Ti(ki,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Ri=Object(K.a)(Object(K.a)({},Di()),{},{isMobile:Di});function zi(){}function Li(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function Fi(e){return"".concat(e,"-menu-")}function Ki(e,t){var n=-1;o.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?o.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var Vi=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],Ui=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),o=r.marginLeft,a=r.marginRight;n+=+o.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},Bi=function(e,t,n){e&&"object"===Object(O.a)(e.style)&&(e.style[t]=n)},Hi={adjustX:1,adjustY:1},Qi={topLeft:{points:["bl","tl"],overflow:Hi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Hi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Hi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Hi,offset:[4,0]}},Wi={topLeft:{points:["bl","tl"],overflow:Hi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Hi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Hi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Hi,offset:[4,0]}},Ji=0,Gi={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Zi=function(e,t,n){var r=Fi(t),o=e.getState();e.setState({defaultActiveFirst:Object(K.a)(Object(K.a)({},o.defaultActiveFirst),{},Object(y.a)({},r,n))})},Yi=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).onDestroy=function(e){r.props.onDestroy(e)},r.onKeyDown=function(e){var t=e.keyCode,n=r.menuInstance,o=r.props.store,a=r.getVisible();if(t===En.ENTER)return r.onTitleClick(e),Zi(o,r.props.eventKey,!0),!0;if(t===En.RIGHT)return a?n.onKeyDown(e):(r.triggerOpenChange(!0),Zi(o,r.props.eventKey,!0)),!0;if(t===En.LEFT){var i;if(!a)return;return(i=n.onKeyDown(e))||(r.triggerOpenChange(!1),i=!0),i}return!a||t!==En.UP&&t!==En.DOWN?void 0:n.onKeyDown(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onPopupVisibleChange=function(e){r.triggerOpenChange(e,e?"mouseenter":"mouseleave")},r.onMouseEnter=function(e){var t=r.props,n=t.eventKey,o=t.onMouseEnter,a=t.store;Zi(a,r.props.eventKey,!1),o({key:n,domEvent:e})},r.onMouseLeave=function(e){var t=r.props,n=t.parentMenu,o=t.eventKey,a=t.onMouseLeave;n.subMenuInstance=Object(H.a)(r),a({key:o,domEvent:e})},r.onTitleMouseEnter=function(e){var t=r.props,n=t.eventKey,o=t.onItemHover,a=t.onTitleMouseEnter;o({key:n,hover:!0}),a({key:n,domEvent:e})},r.onTitleMouseLeave=function(e){var t=r.props,n=t.parentMenu,o=t.eventKey,a=t.onItemHover,i=t.onTitleMouseLeave;n.subMenuInstance=Object(H.a)(r),a({key:o,hover:!1}),i({key:o,domEvent:e})},r.onTitleClick=function(e){var t=Object(H.a)(r).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(r.triggerOpenChange(!r.getVisible(),"click"),Zi(t.store,r.props.eventKey,!1))},r.onSubMenuClick=function(e){"function"==typeof r.props.onClick&&r.props.onClick(r.addKeyPath(e))},r.onSelect=function(e){r.props.onSelect(e)},r.onDeselect=function(e){r.props.onDeselect(e)},r.getPrefixCls=function(){return"".concat(r.props.rootPrefixCls,"-submenu")},r.getActiveClassName=function(){return"".concat(r.getPrefixCls(),"-active")},r.getDisabledClassName=function(){return"".concat(r.getPrefixCls(),"-disabled")},r.getSelectedClassName=function(){return"".concat(r.getPrefixCls(),"-selected")},r.getOpenClassName=function(){return"".concat(r.props.rootPrefixCls,"-submenu-open")},r.getVisible=function(){return r.state.isOpen},r.getMode=function(){return r.state.mode},r.saveMenuInstance=function(e){r.menuInstance=e},r.addKeyPath=function(e){return Object(K.a)(Object(K.a)({},e),{},{keyPath:(e.keyPath||[]).concat(r.props.eventKey)})},r.triggerOpenChange=function(e,t){var n=r.props.eventKey,o=function(){r.onOpenChange({key:n,item:Object(H.a)(r),trigger:t,open:e})};"mouseenter"===t?r.mouseenterTimeout=setTimeout((function(){o()}),0):o()},r.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&o.Children.forEach(t,(function(t){if(t){var o=t.type;if(!o||!(o.isSubMenu||o.isMenuItem||o.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(r.props.children,r.props.selectedKeys,e),e.find},r.isInlineMode=function(){return"inline"===r.getMode()},r.adjustWidth=function(){if(r.subMenuTitle&&r.menuInstance){var e=J.findDOMNode(r.menuInstance);e.offsetWidth>=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(H.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(H.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Fi(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(H.a)(r).haveRendered,o=r.props,a=o.motion,i=o.rootPrefixCls;return Object(K.a)(Object(K.a)({},a),{},{leavedClassName:"".concat(i,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var a=e.store,i=e.eventKey,c=a.getState().defaultActiveFirst;r.isRootMenu=!1;var l=!1;return c&&(l=c[i]),Zi(a,i,l),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,o=t.manualRef,a=t.isOpen,i=function(){e.setState({mode:n,isOpen:a})},c=a!==this.state.isOpen,l=n!==this.state.mode;(l||c)&&(Z.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(Z.a)(i):i()),o&&o(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Z.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return o.createElement(ac,Object(g.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,r=t.visible,a=t.forceSubMenuRender,i=t.direction,c=this.getMotion(n,r);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||r||a,!this.haveOpened)return o.createElement("div",null);var l=E()("".concat(t.prefixCls,"-sub"),Object(y.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===i));return this.isInlineMode()?o.createElement(ne.b,Object(g.a)({visible:t.visible},c),(function(t){var n=t.className,r=t.style,o=E()(l,n);return e.renderPopupMenu(o,r)})):this.renderPopupMenu(l)}},{key:"render",value:function(){var e,t,n,r=Object(K.a)({},this.props),a=this.getVisible(),i=this.getPrefixCls(),c=this.isInlineMode(),l=this.getMode(),s=E()(i,"".concat(i,"-").concat(l),(e={},Object(y.a)(e,r.className,!!r.className),Object(y.a)(e,this.getOpenClassName(),a),Object(y.a)(e,this.getActiveClassName(),r.active||a&&!c),Object(y.a)(e,this.getDisabledClassName(),r.disabled),Object(y.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(r.eventKey?this.internalMenuId="".concat(r.eventKey,"$Menu"):(Ji+=1,this.internalMenuId="$__$".concat(Ji,"$Menu")));var u={},f={},p={};r.disabled||(u={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},f={onClick:this.onTitleClick},p={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var d={},m="rtl"===r.direction;c&&(m?d.paddingRight=r.inlineIndent*r.level:d.paddingLeft=r.inlineIndent*r.level);var v={};this.getVisible()&&(v={"aria-owns":this.internalMenuId});var h=null;"horizontal"!==l&&(h=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(h=o.createElement(this.props.expandIcon,Object(K.a)({},this.props))));var b=o.createElement("div",Object(g.a)({ref:this.saveSubMenuTitle,style:d,className:"".concat(i,"-title"),role:"button"},p,f,{"aria-expanded":a},v,{"aria-haspopup":"true",title:"string"==typeof r.title?r.title:void 0}),r.title,h||o.createElement("i",{className:"".concat(i,"-arrow")})),O=this.renderChildren(),j=(null===(t=r.parentMenu)||void 0===t?void 0:t.isRootMenu)?r.parentMenu.props.getPopupContainer:function(e){return e.parentNode},C=Gi[l],w=r.popupOffset?{offset:r.popupOffset}:{},x=E()((n={},Object(y.a)(n,r.popupClassName,r.popupClassName&&!c),Object(y.a)(n,"".concat(i,"-rtl"),m),n)),I=r.disabled,M=r.triggerSubMenuAction,N=r.subMenuOpenDelay,S=r.forceSubMenuRender,A=r.subMenuCloseDelay,k=r.builtinPlacements;Vi.forEach((function(e){return delete r[e]})),delete r.onClick;var P=m?Object(K.a)(Object(K.a)({},Wi),k):Object(K.a)(Object(K.a)({},Qi),k);delete r.direction;var T=this.getBaseProps(),D=c?null:this.getMotion(T.mode,T.visible);return o.createElement("li",Object(g.a)({},r,u,{className:s,role:"menuitem"}),o.createElement(St,{prefixCls:i,popupClassName:E()("".concat(i,"-popup"),x),getPopupContainer:j,builtinPlacements:P,popupPlacement:C,popupVisible:!c&&a,popupAlign:w,popup:c?null:O,action:I||c?[]:[M],mouseEnterDelay:N,mouseLeaveDelay:A,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:S,popupMotion:D},b),c?O:null)}}]),n}(o.Component);Yi.defaultProps={onMouseEnter:zi,onMouseLeave:zi,onTitleMouseEnter:zi,onTitleMouseLeave:zi,onTitleClick:zi,manualRef:zi,mode:"vertical",title:""};var qi=hi((function(e,t){var n=e.openKeys,r=e.activeKey,o=e.selectedKeys,a=t.eventKey,i=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[i]===a,selectedKeys:o}}))(Yi);qi.isSubMenu=!0;var Xi=qi,_i=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=o.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var a=e.props,i=a.overflowedIndicator,c=a.level,l=a.mode,s=a.prefixCls,u=a.theme;if(1!==c||"horizontal"!==l)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),d=Object(V.a)(f,["children","title","style"]),m=Object(K.a)({},p),v="".concat(t,"-overflowed-indicator"),h="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?m=Object(K.a)(Object(K.a)({},m),{},{display:"none"}):r&&(m=Object(K.a)(Object(K.a)({},m),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),h="".concat(h,"-placeholder"));var b=u?"".concat(s,"-").concat(u):"",y={};return Vi.forEach((function(e){void 0!==d[e]&&(y[e]=d[e])})),o.createElement(Xi,Object(g.a)({title:i,className:"".concat(s,"-overflowed-submenu"),popupClassName:b},y,{key:v,eventKey:h,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];Bi(r,"display","inline-block");var o=e.getMenuItemNodes(),a=o.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){Bi(e,"display","inline-block")})),e.menuItemSizes=o.map((function(e){return Ui(e,!0)})),a.forEach((function(e){Bi(e,"display","none")})),e.overflowedIndicatorWidth=Ui(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),Bi(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=Ui(t);e.overflowedItems=[];var r,o=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(o+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(B.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new it.a((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,a,i){var c=a;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(a.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(i>n&&(c=o.cloneElement(a,{style:{display:"none"},eventKey:"".concat(a.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),i===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return o.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(a.props.eventKey,t.overflowedItems)));var s=[].concat(Object(cn.a)(r),[l,c]);return i===e.length-1&&s.push(t.getOverflowedSubMenuItem(a.props.eventKey,[],!0)),s}return[].concat(Object(cn.a)(r),[c])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(V.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),a=t;return o.createElement(a,Object(g.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(o.Component);_i.defaultProps={tag:"div",className:""};var $i=_i;function ec(e,t,n){var r=e.getState();e.setState({activeKey:Object(K.a)(Object(K.a)({},r.activeKey),{},Object(y.a)({},t,n))})}function tc(e){return e.eventKey||"0-menu-"}function nc(e,t){var n,r=t,o=e.children,a=e.eventKey;if(r&&(Ki(o,(function(e,t){e&&e.props&&!e.props.disabled&&r===Li(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Ki(o,(function(e,t){r||!e||e.props.disabled||(r=Li(e,a,t))})),r):r}function rc(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var oc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;return Object(U.a)(this,n),(r=t.call(this,e)).onKeyDown=function(e,t){var n,o=e.keyCode;if(r.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return o!==En.UP&&o!==En.DOWN||(a=r.step(o===En.UP?-1:1)),a?(e.preventDefault(),ec(r.props.store,tc(r.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},r.onItemHover=function(e){var t=e.key,n=e.hover;ec(r.props.store,tc(r.props),n?t:null)},r.onDeselect=function(e){r.props.onDeselect(e)},r.onSelect=function(e){r.props.onSelect(e)},r.onClick=function(e){r.props.onClick(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onDestroy=function(e){r.props.onDestroy(e)},r.getFlatInstanceArray=function(){return r.instanceArray},r.step=function(e){var t=r.getFlatInstanceArray(),n=r.props.store.getState().activeKey[tc(r.props)],o=t.length;if(!o)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),r.props.defaultActiveFirst||-1===a||(i=t.slice(a,o-1)).length&&!i.every((function(e){return!!e.props.disabled}))){var i,c=(a+1)%o,l=c;do{var s=t[l];if(s&&!s.props.disabled)return s;l=(l+1)%o}while(l!==c);return null}},r.renderCommonMenuItem=function(e,t,n){var a=r.props.store.getState(),i=Object(H.a)(r).props,c=Li(e,i.eventKey,t),l=e.props;if(!l||"string"==typeof e.type)return e;var s=c===a.activeKey,u=Object(K.a)(Object(K.a)({mode:l.mode||i.mode,level:i.level,inlineIndent:i.inlineIndent,renderMenuItem:r.renderMenuItem,rootPrefixCls:i.prefixCls,index:t,parentMenu:i.parentMenu,manualRef:l.disabled?void 0:gi(e.ref,rc.bind(Object(H.a)(r))),eventKey:c,active:!l.disabled&&s,multiple:i.multiple,onClick:function(e){(l.onClick||zi)(e),r.onClick(e)},onItemHover:r.onItemHover,motion:i.motion,subMenuOpenDelay:i.subMenuOpenDelay,subMenuCloseDelay:i.subMenuCloseDelay,forceSubMenuRender:i.forceSubMenuRender,onOpenChange:r.onOpenChange,onDeselect:r.onDeselect,onSelect:r.onSelect,builtinPlacements:i.builtinPlacements,itemIcon:l.itemIcon||r.props.itemIcon,expandIcon:l.expandIcon||r.props.expandIcon},n),{},{direction:i.direction});return("inline"===i.mode||Ri.any)&&(u.triggerSubMenuAction="click"),o.cloneElement(e,Object(K.a)(Object(K.a)({},u),{},{key:c||t}))},r.renderMenuItem=function(e,t,n){if(!e)return null;var o=r.props.store.getState(),a={openKeys:o.openKeys,selectedKeys:o.selectedKeys,triggerSubMenuAction:r.props.triggerSubMenuAction,subMenuKey:n};return r.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(K.a)(Object(K.a)({},e.store.getState().activeKey),{},Object(y.a)({},e.eventKey,nc(e,e.activeKey)))}),r.instanceArray=[],r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!ui()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[tc(t)],r=nc(t,n);if(r!==n)ec(t.store,tc(t),r);else if("activeKey"in e){r!==nc(e,e.activeKey)&&ec(t.store,tc(t),r)}}},{key:"render",value:function(){var e=this,t=Object(g.a)({},this.props);this.instanceArray=[];var n={className:E()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,a=t.eventKey,i=t.visible,c=t.level,l=t.mode,s=t.overflowedIndicator,u=t.theme;return Vi.forEach((function(e){return delete t[e]})),delete t.onClick,o.createElement($i,Object(g.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:c,theme:u,visible:i,overflowedIndicator:s},n),Object(L.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,a||"0-menu-")})))}}]),n}(o.Component);oc.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:zi};var ac=hi()(oc);function ic(e,t,n){var r=e.prefixCls,o=e.motion,a=e.defaultMotions,i=void 0===a?{}:a,c=e.openAnimation,l=e.openTransitionName,s=t.switchingModeFromInline;if(o)return o;if("object"===Object(O.a)(c)&&c)Object(Jo.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof c)return{motionName:"".concat(r,"-open-").concat(c)};if(l)return{motionName:l};var u=i[n];return u||(s?null:i.other)}var cc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(H.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,o=e.key;n=t.multiple?n.concat([o]):[o],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(K.a)(Object(K.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(H.a)(r),o=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(o.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(H.a)(r).props,n=r.store.getState().openKeys.concat(),o=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}o=o||t};Array.isArray(e)?e.forEach(a):a(e),o&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(H.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),o=e.key,a=n.indexOf(o);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(K.a)(Object(K.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,o="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&o.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var o,a,i,c=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(c=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),r.store=(o={selectedKeys:c,openKeys:l,activeKey:{"0-menu-":nc(e,e.activeKey)}},a=o,i=[],{setState:function(e){a=bi(bi({},a),e);for(var t=0;t<i.length;t++)i[t]()},getState:function(){return a},subscribe:function(e){return i.push(e),function(){var t=i.indexOf(e);i.splice(t,1)}}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,o=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&o([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(K.a)({},Object(an.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(K.a)(Object(K.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ic(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,o.createElement(li,{store:this.store},o.createElement(ac,Object(g.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,o=r.getState(),a={},i={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(i.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(i.switchingModeFromInline=!0,i.inlineOpenKeys=o.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,i.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),i}}]),n}(o.Component);cc.defaultProps={selectable:!0,onClick:zi,onSelect:zi,onOpenChange:zi,onDeselect:zi,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:o.createElement("span",null,"···")};var lc=cc,sc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===En.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,o=n.onItemHover,a=n.onMouseLeave;o({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,o=n.onItemHover,a=n.onMouseEnter;o({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,o=n.multiple,a=n.onClick,i=n.onSelect,c=n.onDeselect,l=n.isSelected,s={key:r,keyPath:[r],item:Object(H.a)(e),domEvent:t};a(s),o?l?c(s):i(s):l||i(s)},e.saveNode=function(t){e.node=t},e}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(K.a)({},this.props),n=E()(this.getPrefixCls(),t.className,(e={},Object(y.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(y.a)(e,this.getSelectedClassName(),t.isSelected),Object(y.a)(e,this.getDisabledClassName(),t.disabled),e)),r=Object(K.a)(Object(K.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?r=Object(K.a)(Object(K.a)({},r),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(r.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},i=Object(K.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?i.paddingRight=t.inlineIndent*t.level:i.paddingLeft=t.inlineIndent*t.level),Vi.forEach((function(e){return delete t[e]})),delete t.direction;var c=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(c=o.createElement(this.props.itemIcon,this.props)),o.createElement("li",Object(g.a)({},Object(an.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),r,a,{style:i,ref:this.saveNode}),t.children,c)}}]),n}(o.Component);sc.isMenuItem=!0,sc.defaultProps={onSelect:zi,onMouseEnter:zi,onMouseLeave:zi,manualRef:zi};var uc=hi((function(e,t){var n=e.activeKey,r=e.selectedKeys,o=t.eventKey;return{active:n[t.subMenuKey]===o,isSelected:Array.isArray(r)?-1!==r.indexOf(o):r===o}}))(sc),fc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(B.a)(n,[{key:"render",value:function(){var e=Object(g.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,a="".concat(r,"-item-group-title"),i="".concat(r,"-item-group-list"),c=e.title,l=e.children;return Vi.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,o.createElement("li",Object(g.a)({},e,{className:"".concat(n," ").concat(r,"-item-group")}),o.createElement("div",{className:a,title:"string"==typeof c?c:void 0},c),o.createElement("ul",{className:i},o.Children.map(l,this.renderInnerMenuItem)))}}]),n}(o.Component);fc.isMenuItemGroup=!0,fc.defaultProps={disabled:!0};var pc=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return o.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};pc.defaultProps={disabled:!0,className:"",style:{}};var dc=lc,mc={adjustX:1,adjustY:1},vc=[0,0],hc={topLeft:{points:["bl","tl"],overflow:mc,offset:[0,-4],targetOffset:vc},topCenter:{points:["bc","tc"],overflow:mc,offset:[0,-4],targetOffset:vc},topRight:{points:["br","tr"],overflow:mc,offset:[0,-4],targetOffset:vc},bottomLeft:{points:["tl","bl"],overflow:mc,offset:[0,4],targetOffset:vc},bottomCenter:{points:["tc","bc"],overflow:mc,offset:[0,4],targetOffset:vc},bottomRight:{points:["tr","br"],overflow:mc,offset:[0,4],targetOffset:vc}};var bc=o.forwardRef((function(e,t){var n=e.arrow,r=void 0!==n&&n,a=e.prefixCls,i=void 0===a?"rc-dropdown":a,c=e.transitionName,l=e.animation,s=e.align,u=e.placement,f=void 0===u?"bottomLeft":u,p=e.placements,d=void 0===p?hc:p,m=e.getPopupContainer,v=e.showAction,h=e.hideAction,b=e.overlayClassName,g=e.overlayStyle,O=e.visible,C=e.trigger,w=void 0===C?["hover"]:C,x=Object(V.a)(e,["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger"]),I=o.useState(),M=Object(j.a)(I,2),N=M[0],S=M[1],A="visible"in e?O:N,k=o.useRef(null);o.useImperativeHandle(t,(function(){return k.current}));var P,T,D,R,z,L,F=function(){var t=e.overlay;return"function"==typeof t?t():t},K=function(t){var n=e.onOverlayClick,r=F().props;S(!1),n&&n(t),r.onClick&&r.onClick(t)},U=function(){var e=F(),t={prefixCls:"".concat(i,"-menu"),onClick:K};return"string"==typeof e.type&&delete t.prefixCls,o.createElement(o.Fragment,null,r&&o.createElement("div",{className:"".concat(i,"-arrow")}),o.cloneElement(e,t))},B=h;return B||-1===w.indexOf("contextMenu")||(B=["click"]),o.createElement(St,Object.assign({},x,{prefixCls:i,ref:k,popupClassName:E()(b,Object(y.a)({},"".concat(i,"-show-arrow"),r)),popupStyle:g,builtinPlacements:d,action:w,showAction:v,hideAction:B||[],popupPlacement:f,popupAlign:s,popupTransitionName:c,popupAnimation:l,popupVisible:A,stretch:(z=e.minOverlayWidthMatchTrigger,L=e.alignPoint,("minOverlayWidthMatchTrigger"in e?z:!L)?"minWidth":""),popup:"function"==typeof e.overlay?U:U(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;S(t),"function"==typeof n&&n(t)},getPopupContainer:m}),(T=e.children,D=T.props?T.props:{},R=E()(D.className,void 0!==(P=e.openClassName)?P:"".concat(i,"-open")),N&&T?o.cloneElement(T,{className:R}):T))}));function gc(e,t){var n=e.prefixCls,r=e.editable,a=e.locale,i=e.style;return r&&!1!==r.showAdd?o.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:i,"aria-label":(null==a?void 0:a.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}var yc=o.forwardRef(gc);function Oc(e,t){var n=e.prefixCls,r=e.id,a=e.tabs,i=e.locale,c=e.mobile,l=e.moreIcon,s=void 0===l?"More":l,u=e.moreTransitionName,f=e.style,p=e.className,d=e.editable,m=e.tabBarGutter,v=e.rtl,h=e.onTabClick,b=Object(o.useState)(!1),g=Object(j.a)(b,2),O=g[0],C=g[1],w=Object(o.useState)(null),x=Object(j.a)(w,2),I=x[0],M=x[1],N="".concat(r,"-more-popup"),S="".concat(n,"-dropdown"),A=null!==I?"".concat(N,"-").concat(I):null,k=null==i?void 0:i.dropdownAriaLabel,P=o.createElement(dc,{onClick:function(e){var t=e.key,n=e.domEvent;h(t,n),C(!1)},id:N,tabIndex:-1,role:"listbox","aria-activedescendant":A,selectedKeys:[I],"aria-label":void 0!==k?k:"expanded dropdown"},a.map((function(e){return o.createElement(uc,{key:e.key,id:"".concat(N,"-").concat(e.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function T(e){for(var t=a.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===I}))||0,r=t.length,o=0;o<r;o+=1){var i=t[n=(n+e+r)%r];if(!i.disabled)return void M(i.key)}}Object(o.useEffect)((function(){var e=document.getElementById(A);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[I]),Object(o.useEffect)((function(){O||M(null)}),[O]);var D=Object(y.a)({},v?"marginLeft":"marginRight",m);a.length||(D.visibility="hidden",D.order=1);var R=E()(Object(y.a)({},"".concat(S,"-rtl"),v)),z=c?null:o.createElement(bc,{prefixCls:S,overlay:P,trigger:["hover"],visible:O,transitionName:u,onVisibleChange:C,overlayClassName:R,mouseEnterDelay:.1,mouseLeaveDelay:.1},o.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:D,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":N,id:"".concat(r,"-more"),"aria-expanded":O,onKeyDown:function(e){var t=e.which;if(O)switch(t){case En.UP:T(-1),e.preventDefault();break;case En.DOWN:T(1),e.preventDefault();break;case En.ESC:C(!1);break;case En.SPACE:case En.ENTER:null!==I&&h(I,e)}else[En.DOWN,En.SPACE,En.ENTER].includes(t)&&(C(!0),e.preventDefault())}},s));return o.createElement("div",{className:E()("".concat(n,"-nav-operations"),p),style:f,ref:t},z,o.createElement(yc,{prefixCls:n,locale:i,editable:d}))}var jc=o.forwardRef(Oc),Cc=Object(o.createContext)(null),Ec=Math.pow(.995,20);function wc(e,t){var n=o.useRef(e),r=o.useState({}),a=Object(j.a)(r,2)[1];return[n.current,function(e){var r="function"==typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,a({})}]}var xc=function(e){var t,n=e.position,r=e.prefixCls,a=e.extra;if(!a)return null;var i=a;return"right"===n&&(t=i.right||!i.left&&i||null),"left"===n&&(t=i.left||null),t?o.createElement("div",{className:"".concat(r,"-extra-content")},t):null};function Ic(e,t){var n,r,a=o.useContext(Cc),i=a.prefixCls,c=a.tabs,l=e.className,s=e.style,u=e.id,f=e.animated,p=e.activeKey,d=e.rtl,m=e.extra,v=e.editable,h=e.locale,b=e.tabPosition,O=e.tabBarGutter,C=e.children,x=e.onTabClick,I=e.onTabScroll,M=Object(o.useRef)(),N=Object(o.useRef)(),S=Object(o.useRef)(),A=Object(o.useRef)(),k=(r=Object(o.useRef)(new Map),[function(e){return r.current.has(e)||r.current.set(e,o.createRef()),r.current.get(e)},function(e){r.current.delete(e)}]),P=Object(j.a)(k,2),T=P[0],D=P[1],R="top"===b||"bottom"===b,z=wc(0,(function(e,t){R&&I&&I({direction:e>t?"left":"right"})})),L=Object(j.a)(z,2),F=L[0],V=L[1],U=wc(0,(function(e,t){!R&&I&&I({direction:e>t?"top":"bottom"})})),B=Object(j.a)(U,2),H=B[0],Q=B[1],W=Object(o.useState)(0),J=Object(j.a)(W,2),G=J[0],Y=J[1],q=Object(o.useState)(0),X=Object(j.a)(q,2),_=X[0],$=X[1],ee=Object(o.useState)(0),te=Object(j.a)(ee,2),ne=te[0],re=te[1],oe=Object(o.useState)(0),ae=Object(j.a)(oe,2),ie=ae[0],ce=ae[1],le=Object(o.useState)(null),se=Object(j.a)(le,2),ue=se[0],fe=se[1],pe=Object(o.useState)(null),de=Object(j.a)(pe,2),me=de[0],ve=de[1],he=Object(o.useState)(0),be=Object(j.a)(he,2),ge=be[0],ye=be[1],Oe=Object(o.useState)(0),je=Object(j.a)(Oe,2),Ce=je[0],Ee=je[1],we=function(e){var t=Object(o.useRef)([]),n=Object(o.useState)({}),r=Object(j.a)(n,2)[1],a=Object(o.useRef)("function"==typeof e?e():e),i=ei((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),i()}]}(new Map),xe=Object(j.a)(we,2),Ie=xe[0],Me=xe[1],Ne=function(e,t,n){return Object(o.useMemo)((function(){for(var n,r=new Map,o=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||ri,a=o.left+o.width,i=0;i<e.length;i+=1){var c,l=e[i].key,s=t.get(l);if(!s)s=t.get(null===(c=e[i-1])||void 0===c?void 0:c.key)||ri;var u=r.get(l)||Object(K.a)({},s);u.right=a-u.left-u.width,r.set(l,u)}return r}),[e.map((function(e){return e.key})).join("_"),t,n])}(c,Ie,G),Se="".concat(i,"-nav-operations-hidden"),Ae=0,ke=0;function Pe(e){return e<Ae?Ae:e>ke?ke:e}R?d?(Ae=0,ke=Math.max(0,G-ue)):(Ae=Math.min(0,ue-G),ke=0):(Ae=Math.min(0,me-_),ke=0);var Te=Object(o.useRef)(),De=Object(o.useState)(),Re=Object(j.a)(De,2),ze=Re[0],Le=Re[1];function Fe(){Le(Date.now())}function Ke(){window.clearTimeout(Te.current)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=Ne.get(e)||{width:0,height:0,left:0,right:0,top:0};if(R){var n=F;d?t.right<F?n=t.right:t.right+t.width>F+ue&&(n=t.right+t.width-ue):t.left<-F?n=-t.left:t.left+t.width>-F+ue&&(n=-(t.left+t.width-ue)),Q(0),V(Pe(n))}else{var r=H;t.top<-H?r=-t.top:t.top+t.height>-H+me&&(r=-(t.top+t.height-me)),V(0),Q(Pe(r))}}!function(e,t){var n=Object(o.useState)(),r=Object(j.a)(n,2),a=r[0],i=r[1],c=Object(o.useState)(0),l=Object(j.a)(c,2),s=l[0],u=l[1],f=Object(o.useState)(0),p=Object(j.a)(f,2),d=p[0],m=p[1],v=Object(o.useState)(),h=Object(j.a)(v,2),b=h[0],g=h[1],y=Object(o.useRef)(),O=Object(o.useRef)(),C=Object(o.useRef)(null);C.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;i({x:n,y:r}),window.clearInterval(y.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,o=n.screenY;i({x:r,y:o});var c=r-a.x,l=o-a.y;t(c,l);var f=Date.now();u(f),m(f-s),g({x:c,y:l})}},onTouchEnd:function(){if(a&&(i(null),g(null),b)){var e=b.x/d,n=b.y/d,r=Math.abs(e),o=Math.abs(n);if(Math.max(r,o)<.1)return;var c=e,l=n;y.current=window.setInterval((function(){Math.abs(c)<.01&&Math.abs(l)<.01?window.clearInterval(y.current):t(20*(c*=Ec),20*(l*=Ec))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,o=0,a=Math.abs(n),i=Math.abs(r);a===i?o="x"===O.current?n:r:a>i?(o=n,O.current="x"):(o=r,O.current="y"),t(-o,-o)&&e.preventDefault()}},o.useEffect((function(){function t(e){C.current.onTouchMove(e)}function n(e){C.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){C.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){C.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(M,(function(e,t){function n(e,t){e((function(e){return Pe(e+t)}))}if(R){if(ue>=G)return!1;n(V,e)}else{if(me>=_)return!1;n(Q,t)}return Ke(),Fe(),!0})),Object(o.useEffect)((function(){return Ke(),ze&&(Te.current=window.setTimeout((function(){Le(0)}),100)),Ke}),[ze]);var Ue=function(e,t,n,r,a){var i,c,l,s=a.tabs,u=a.tabPosition,f=a.rtl;["top","bottom"].includes(u)?(i="width",c=f?"right":"left",l=Math.abs(t.left)):(i="height",c="top",l=-t.top);var p=t[i],d=n[i],m=r[i],v=p;return d+m>p&&(v=p-m),Object(o.useMemo)((function(){if(!s.length)return[0,0];for(var t=s.length,n=t,r=0;r<t;r+=1){var o=e.get(s[r].key)||oi;if(o[c]+o[i]>l+v){n=r-1;break}}for(var a=0,u=t-1;u>=0;u-=1){if((e.get(s[u].key)||oi)[c]<l){a=u+1;break}}return[a,n]}),[e,l,v,u,s.map((function(e){return e.key})).join("_"),f])}(Ne,{width:ue,height:me,left:F,top:H},{width:ne,height:ie},{width:ge,height:Ce},Object(K.a)(Object(K.a)({},e),{},{tabs:c})),Be=Object(j.a)(Ue,2),He=Be[0],Qe=Be[1],We=c.map((function(e){var t=e.key;return o.createElement(ni,{id:u,prefixCls:i,key:t,rtl:d,tab:e,closable:e.closable,editable:v,active:t===p,tabPosition:b,tabBarGutter:O,renderWrapper:C,removeAriaLabel:null==h?void 0:h.removeAriaLabel,ref:T(t),onClick:function(e){x(t,e)},onRemove:function(){D(t)},onFocus:function(){Ve(t),Fe(),d||(M.current.scrollLeft=0),M.current.scrollTop=0}})})),Je=ei((function(){var e,t,n,r,o,a,i,l,s,u=(null===(e=M.current)||void 0===e?void 0:e.offsetWidth)||0,f=(null===(t=M.current)||void 0===t?void 0:t.offsetHeight)||0,p=(null===(n=A.current)||void 0===n?void 0:n.offsetWidth)||0,d=(null===(r=A.current)||void 0===r?void 0:r.offsetHeight)||0,m=(null===(o=S.current)||void 0===o?void 0:o.offsetWidth)||0,v=(null===(a=S.current)||void 0===a?void 0:a.offsetHeight)||0;fe(u),ve(f),ye(p),Ee(d);var h=((null===(i=N.current)||void 0===i?void 0:i.offsetWidth)||0)-p,b=((null===(l=N.current)||void 0===l?void 0:l.offsetHeight)||0)-d;Y(h),$(b);var g=null===(s=S.current)||void 0===s?void 0:s.className.includes(Se);re(h-(g?0:m)),ce(b-(g?0:v)),Me((function(){var e=new Map;return c.forEach((function(t){var n=t.key,r=T(n).current;r&&e.set(n,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),e}))})),Ge=c.slice(0,He),Ze=c.slice(Qe+1),Ye=[].concat(Object(cn.a)(Ge),Object(cn.a)(Ze)),qe=Object(o.useState)(),Xe=Object(j.a)(qe,2),_e=Xe[0],$e=Xe[1],et=Ne.get(p),tt=Object(o.useRef)();function nt(){Z.a.cancel(tt.current)}Object(o.useEffect)((function(){var e={};return et&&(R?(d?e.right=et.right:e.left=et.left,e.width=et.width):(e.top=et.top,e.height=et.height)),nt(),tt.current=Object(Z.a)((function(){$e(e)})),nt}),[et,R,d]),Object(o.useEffect)((function(){Ve()}),[p,et,Ne,R]),Object(o.useEffect)((function(){Je()}),[d,O,p,c.map((function(e){return e.key})).join("_")]);var rt,ot,at,it,ct=!!Ye.length,lt="".concat(i,"-nav-wrap");return R?d?(ot=F>0,rt=F+ue<G):(rt=F<0,ot=-F+ue<G):(at=H<0,it=-H+me<_),o.createElement("div",{ref:t,role:"tablist",className:E()("".concat(i,"-nav"),l),style:s,onKeyDown:function(){Fe()}},o.createElement(xc,{position:"left",extra:m,prefixCls:i}),o.createElement(w.a,{onResize:Je},o.createElement("div",{className:E()(lt,(n={},Object(y.a)(n,"".concat(lt,"-ping-left"),rt),Object(y.a)(n,"".concat(lt,"-ping-right"),ot),Object(y.a)(n,"".concat(lt,"-ping-top"),at),Object(y.a)(n,"".concat(lt,"-ping-bottom"),it),n)),ref:M},o.createElement(w.a,{onResize:Je},o.createElement("div",{ref:N,className:"".concat(i,"-nav-list"),style:{transform:"translate(".concat(F,"px, ").concat(H,"px)"),transition:ze?"none":void 0}},We,o.createElement(yc,{ref:A,prefixCls:i,locale:h,editable:v,style:{visibility:ct?"hidden":null}}),o.createElement("div",{className:E()("".concat(i,"-ink-bar"),Object(y.a)({},"".concat(i,"-ink-bar-animated"),f.inkBar)),style:_e}))))),o.createElement(jc,Object(g.a)({},e,{ref:S,prefixCls:i,tabs:Ye,className:!ct&&Se})),o.createElement(xc,{position:"right",extra:m,prefixCls:i}))}var Mc=o.forwardRef(Ic);function Nc(e){var t=e.id,n=e.activeKey,r=e.animated,a=e.tabPosition,i=e.rtl,c=e.destroyInactiveTabPane,l=o.useContext(Cc),s=l.prefixCls,u=l.tabs,f=r.tabPane,p=u.findIndex((function(e){return e.key===n}));return o.createElement("div",{className:E()("".concat(s,"-content-holder"))},o.createElement("div",{className:E()("".concat(s,"-content"),"".concat(s,"-content-").concat(a),Object(y.a)({},"".concat(s,"-content-animated"),f)),style:p&&f?Object(y.a)({},i?"marginRight":"marginLeft","-".concat(p,"00%")):null},u.map((function(e){return o.cloneElement(e.node,{key:e.key,prefixCls:s,tabKey:e.key,id:t,animated:f,active:e.key===n,destroyInactiveTabPane:c})}))))}function Sc(e){var t=e.prefixCls,n=e.forceRender,r=e.className,a=e.style,i=e.id,c=e.active,l=e.animated,s=e.destroyInactiveTabPane,u=e.tabKey,f=e.children,p=o.useState(n),d=Object(j.a)(p,2),m=d[0],v=d[1];o.useEffect((function(){c?v(!0):s&&v(!1)}),[c,s]);var h={};return c||(l?(h.visibility="hidden",h.height=0,h.overflowY="hidden"):h.display="none"),o.createElement("div",{id:i&&"".concat(i,"-panel-").concat(u),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":i&&"".concat(i,"-tab-").concat(u),"aria-hidden":!c,style:Object(K.a)(Object(K.a)({},h),a),className:E()("".concat(t,"-tabpane"),c&&"".concat(t,"-tabpane-active"),r)},(c||m||n)&&f)}var Ac=0;function kc(e,t){var n,r,a=e.id,i=e.prefixCls,c=void 0===i?"rc-tabs":i,l=e.className,s=e.children,u=e.direction,f=e.activeKey,p=e.defaultActiveKey,d=e.editable,m=e.animated,v=void 0===m?{inkBar:!0,tabPane:!1}:m,h=e.tabPosition,b=void 0===h?"top":h,C=e.tabBarGutter,w=e.tabBarStyle,x=e.tabBarExtraContent,I=e.locale,M=e.moreIcon,N=e.moreTransitionName,S=e.destroyInactiveTabPane,A=e.renderTabBar,k=e.onChange,P=e.onTabClick,T=e.onTabScroll,D=Object(V.a)(e,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),R=function(e){return Object(L.a)(e).map((function(e){if(o.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return Object(K.a)(Object(K.a)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(s),z="rtl"===u;r=!1===v?{inkBar:!1,tabPane:!1}:!0===v?{inkBar:!0,tabPane:!0}:Object(K.a)({inkBar:!0,tabPane:!1},"object"===Object(O.a)(v)?v:{});var F=Object(o.useState)(!1),U=Object(j.a)(F,2),B=U[0],H=U[1];Object(o.useEffect)((function(){H(te())}),[]);var Q=zt((function(){var e;return null===(e=R[0])||void 0===e?void 0:e.key}),{value:f,defaultValue:p}),W=Object(j.a)(Q,2),J=W[0],G=W[1],Z=Object(o.useState)((function(){return R.findIndex((function(e){return e.key===J}))})),Y=Object(j.a)(Z,2),q=Y[0],X=Y[1];Object(o.useEffect)((function(){var e,t=R.findIndex((function(e){return e.key===J}));-1===t&&(t=Math.max(0,Math.min(q,R.length-1)),G(null===(e=R[t])||void 0===e?void 0:e.key));X(t)}),[R.map((function(e){return e.key})).join("_"),J,q]);var _=zt(null,{value:a}),$=Object(j.a)(_,2),ee=$[0],ne=$[1],re=b;B&&!["left","right"].includes(b)&&(re="top"),Object(o.useEffect)((function(){a||(ne("rc-tabs-".concat(Ac)),Ac+=1)}),[]);var oe,ae={id:ee,activeKey:J,animated:r,tabPosition:re,rtl:z,mobile:B},ie=Object(K.a)(Object(K.a)({},ae),{},{editable:d,locale:I,moreIcon:M,moreTransitionName:N,tabBarGutter:C,onTabClick:function(e,t){null==P||P(e,t),G(e),null==k||k(e)},onTabScroll:T,extra:x,style:w,panes:s});return oe=A?A(ie,Mc):o.createElement(Mc,ie),o.createElement(Cc.Provider,{value:{tabs:R,prefixCls:c}},o.createElement("div",Object(g.a)({ref:t,id:a,className:E()(c,"".concat(c,"-").concat(re),(n={},Object(y.a)(n,"".concat(c,"-mobile"),B),Object(y.a)(n,"".concat(c,"-editable"),d),Object(y.a)(n,"".concat(c,"-rtl"),z),n),l)},D),oe,o.createElement(Nc,Object(g.a)({destroyInactiveTabPane:S},ae,{animated:r}))))}var Pc=o.forwardRef(kc);Pc.TabPane=Sc;var Tc=Pc,Dc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Rc=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Dc}))};Rc.displayName="EllipsisOutlined";var zc=o.forwardRef(Rc),Lc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},Fc=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Lc}))};Fc.displayName="PlusOutlined";var Kc=o.forwardRef(Fc),Vc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Uc(e){var t,n,r=e.type,a=e.className,i=e.size,c=e.onEdit,l=e.hideAdd,s=e.centered,u=e.addIcon,f=Vc(e,["type","className","size","onEdit","hideAdd","centered","addIcon"]),p=f.prefixCls,d=f.moreIcon,m=void 0===d?o.createElement(zc,null):d,v=o.useContext(I.b),h=v.getPrefixCls,b=v.direction,O=h("tabs",p);"editable-card"===r&&(n={onEdit:function(e,t){var n=t.key,r=t.event;null==c||c("add"===e?r:n,e)},removeIcon:o.createElement(Sa.a,null),addIcon:u||o.createElement(Kc,null),showAdd:!0!==l});var j=h();return Object(M.a)(!("onPrevClick"in f)&&!("onNextClick"in f),"Tabs","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),o.createElement(Tc,Object(g.a)({direction:b,moreTransitionName:"".concat(j,"-slide-up")},f,{className:E()((t={},Object(y.a)(t,"".concat(O,"-").concat(i),i),Object(y.a)(t,"".concat(O,"-card"),["card","editable-card"].includes(r)),Object(y.a)(t,"".concat(O,"-editable-card"),"editable-card"===r),Object(y.a)(t,"".concat(O,"-centered"),s),t),a),editable:n,moreIcon:m,prefixCls:O}))}Uc.TabPane=Sc;var Bc=Uc,Hc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var Qc=function(e){var t,n,r,a=o.useContext(I.b),i=a.getPrefixCls,c=a.direction,u=o.useContext(Un.b),f=e.prefixCls,p=e.className,d=e.extra,m=e.headStyle,v=void 0===m?{}:m,h=e.bodyStyle,b=void 0===h?{}:h,O=e.title,j=e.loading,C=e.bordered,w=void 0===C||C,x=e.size,M=e.type,N=e.cover,S=e.actions,A=e.tabList,k=e.children,P=e.activeTabKey,T=e.defaultActiveTabKey,D=e.tabBarExtraContent,R=e.hoverable,z=e.tabProps,L=void 0===z?{}:z,F=Hc(e,["prefixCls","className","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),K=i("card",f),V=0===b.padding||"0px"===b.padding?{padding:24}:void 0,U=o.createElement("div",{className:"".concat(K,"-loading-block")}),B=o.createElement("div",{className:"".concat(K,"-loading-content"),style:V},o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:22},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:8},U),o.createElement(s.a,{span:15},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:6},U),o.createElement(s.a,{span:18},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:13},U),o.createElement(s.a,{span:9},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:4},U),o.createElement(s.a,{span:3},U),o.createElement(s.a,{span:16},U))),H=void 0!==P,Q=Object(g.a)(Object(g.a)({},L),(t={},Object(y.a)(t,H?"activeKey":"defaultActiveKey",H?P:T),Object(y.a)(t,"tabBarExtraContent",D),t)),W=A&&A.length?o.createElement(Bc,Object(g.a)({size:"large"},Q,{className:"".concat(K,"-head-tabs"),onChange:function(t){var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)}}),A.map((function(e){return o.createElement(Bc.TabPane,{tab:e.tab,disabled:e.disabled,key:e.key})}))):null;(O||d||W)&&(r=o.createElement("div",{className:"".concat(K,"-head"),style:v},o.createElement("div",{className:"".concat(K,"-head-wrapper")},O&&o.createElement("div",{className:"".concat(K,"-head-title")},O),d&&o.createElement("div",{className:"".concat(K,"-extra")},d)),W));var J,G=N?o.createElement("div",{className:"".concat(K,"-cover")},N):null,Z=o.createElement("div",{className:"".concat(K,"-body"),style:b},j?B:k),Y=S&&S.length?o.createElement("ul",{className:"".concat(K,"-actions")},function(e){return e.map((function(t,n){return o.createElement("li",{style:{width:"".concat(100/e.length,"%")},key:"action-".concat(n)},o.createElement("span",null,t))}))}(S)):null,q=Object(an.a)(F,["onTabChange"]),X=x||u,_=E()(K,(n={},Object(y.a)(n,"".concat(K,"-loading"),j),Object(y.a)(n,"".concat(K,"-bordered"),w),Object(y.a)(n,"".concat(K,"-hoverable"),R),Object(y.a)(n,"".concat(K,"-contain-grid"),(o.Children.forEach(e.children,(function(e){e&&e.type&&e.type===Xa&&(J=!0)})),J)),Object(y.a)(n,"".concat(K,"-contain-tabs"),A&&A.length),Object(y.a)(n,"".concat(K,"-").concat(X),X),Object(y.a)(n,"".concat(K,"-type-").concat(M),!!M),Object(y.a)(n,"".concat(K,"-rtl"),"rtl"===c),n),p);return o.createElement("div",Object(g.a)({},q,{className:_}),r,G,Z,Y)};Qc.Grid=Xa,Qc.Meta=$a;var Wc=Qc,Jc=n("3M/l"),Gc=n.n(Jc),Zc=n("OTLn"),Yc=n.n(Zc),qc=n("uWrK"),Xc=n.n(qc),_c=n("k9j6"),$c=n.n(_c),el=n("QaN9"),tl=n.n(el),nl=n("Qq2X"),rl=n.n(nl),ol=[{title:"JavaScript",src:Gc.a},{title:"React JS",src:Yc.a},{title:"Ant Design",src:Xc.a},{title:"Node JS",src:$c.a},{title:"MongoDB",src:rl.a},{title:"Python",src:tl.a}],al=function(e){e.text,e.percent;return a.a.createElement("div",{style:{marginTop:"20px"}},a.a.createElement("div",null,a.a.createElement(Ya,{grid:{gutter:16,xs:1,sm:1,md:1,lg:2,xl:3,xxl:3},dataSource:ol,renderItem:function(e){return a.a.createElement(Ya.Item,null,a.a.createElement(cl,{item:e}))}})))},il=yr.Title;function cl(e){var t=e.item;return console.log(t),a.a.createElement(a.a.Fragment,null,a.a.createElement(Wc,null,a.a.createElement(l.a,{justify:"space-around",align:"middle"},a.a.createElement(s.a,null,a.a.createElement(en,{shape:"square",size:{xs:80,sm:80,md:80,lg:80,xl:80,xxl:100},src:t.src})),a.a.createElement(s.a,null,a.a.createElement(il,{level:3},t.title)))))}var ll=function(){return a.a.createElement("div",null,a.a.createElement("h2",null,"Mis Habilidades"),a.a.createElement(al,null))};t.default=function(){return a.a.createElement(r.a,{className:"outerPadding"},a.a.createElement(r.a,{className:"container"},a.a.createElement(i.a,null),a.a.createElement(c.b,null,a.a.createElement(a.a.Fragment,null,a.a.createElement(b,null),a.a.createElement(ll,null)))))}},E9nw:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},ExA7:function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},F3x0:function(e,t,n){},GJlF:function(e,t,n){},GoyQ:function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},HJMW:function(e,t,n){},"HaE+":function(e,t,n){"use strict";function r(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function c(e){r(i,o,a,c,l,"next",e)}function l(e){r(i,o,a,c,l,"throw",e)}c(void 0)}))}}n.d(t,"a",(function(){return o}))},HdAM:function(e,t,n){},IYBL:function(e,t,n){},KfNM:function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},KpVd:function(e,t,n){"use strict";(function(e){function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function i(e,t,n){return(i=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&o(a,n.prototype),a}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return i(e,arguments,r(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),o(a,e)})(e)}var l=/%[sdj%]/g,s=function(){};function u(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,o=t[0],a=t.length;if("function"==typeof o)return o.apply(null,t.slice(1));if("string"==typeof o){var i=String(o).replace(l,(function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(n){return"[Circular]"}break;default:return e}}));return i}return o}function p(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function d(e,t,n){var r=0,o=e.length;!function a(i){if(i&&i.length)n(i);else{var c=r;r+=1,c<o?t(e[c],a):n([])}}([])}var m=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(c(Error));function v(e,t,n,r){if(t.first){var o=new Promise((function(t,o){d(function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n])})),t}(e),n,(function(e){return r(e),e.length?o(new m(e,u(e))):t()}))}));return o.catch((function(e){return e})),o}var a=t.firstFields||[];!0===a&&(a=Object.keys(e));var i=Object.keys(e),c=i.length,l=0,s=[],f=new Promise((function(t,o){var f=function(e){if(s.push.apply(s,e),++l===c)return r(s),s.length?o(new m(s,u(s))):t()};i.length||(r(s),t()),i.forEach((function(t){var r=e[t];-1!==a.indexOf(t)?d(r,n,f):function(e,t,n){var r=[],o=0,a=e.length;function i(e){r.push.apply(r,e),++o===a&&n(r)}e.forEach((function(e){t(e,i)}))}(r,n,f)}))}));return f.catch((function(e){return e})),f}function h(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"==typeof t?t():t,field:t.field||e.fullField}}}function b(e,t){if(t)for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];"object"==typeof o&&"object"==typeof e[r]?e[r]=n(n({},e[r]),o):e[r]=o}return e}function g(e,t,n,r,o,a){!e.required||n.hasOwnProperty(e.field)&&!p(t,a||e.type)||r.push(f(o.messages.required,e.fullField))}var y={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},O={integer:function(e){return O.number(e)&&parseInt(e,10)===e},float:function(e){return O.number(e)&&!O.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!O.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(y.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(y.url)},hex:function(e){return"string"==typeof e&&!!e.match(y.hex)}};var j={required:g,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(f(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t)g(e,t,n,r,o);else{var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?O[a](t)||r.push(f(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(f(o.messages.types[a],e.fullField,e.type))}},range:function(e,t,n,r,o){var a="number"==typeof e.len,i="number"==typeof e.min,c="number"==typeof e.max,l=t,s=null,u="number"==typeof t,p="string"==typeof t,d=Array.isArray(t);if(u?s="number":p?s="string":d&&(s="array"),!s)return!1;d&&(l=t.length),p&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?l!==e.len&&r.push(f(o.messages[s].len,e.fullField,e.len)):i&&!c&&l<e.min?r.push(f(o.messages[s].min,e.fullField,e.min)):c&&!i&&l>e.max?r.push(f(o.messages[s].max,e.fullField,e.max)):i&&c&&(l<e.min||l>e.max)&&r.push(f(o.messages[s].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&r.push(f(o.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,r,o){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(f(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(f(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function C(e,t,n,r,o){var a=e.type,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,a)&&!e.required)return n();j.required(e,t,r,i,o,a),p(t,a)||j.type(e,t,r,i,o)}n(i)}var E={string:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,"string")&&!e.required)return n();j.required(e,t,r,a,o,"string"),p(t,"string")||(j.type(e,t,r,a,o),j.range(e,t,r,a,o),j.pattern(e,t,r,a,o),!0===e.whitespace&&j.whitespace(e,t,r,a,o))}n(a)},method:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.type(e,t,r,a,o)}n(a)},number:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},boolean:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.type(e,t,r,a,o)}n(a)},regexp:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),p(t)||j.type(e,t,r,a,o)}n(a)},integer:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},float:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},array:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();j.required(e,t,r,a,o,"array"),null!=t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},object:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.type(e,t,r,a,o)}n(a)},enum:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.enum(e,t,r,a,o)}n(a)},pattern:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,"string")&&!e.required)return n();j.required(e,t,r,a,o),p(t,"string")||j.pattern(e,t,r,a,o)}n(a)},date:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,"date")&&!e.required)return n();var i;if(j.required(e,t,r,a,o),!p(t,"date"))i=t instanceof Date?t:new Date(t),j.type(e,i,r,a,o),i&&j.range(e,i.getTime(),r,a,o)}n(a)},url:C,hex:C,email:C,required:function(e,t,n,r,o){var a=[],i=Array.isArray(t)?"array":typeof t;j.required(e,t,r,a,o,i),n(a)},any:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o)}n(a)}};function w(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var x=w();function I(e){this.rules=null,this._messages=x,this.define(e)}I.prototype={messages:function(e){return e&&(this._messages=b(w(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var a,i,c=e,l=t,s=r;if("function"==typeof l&&(s=l,l={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(),Promise.resolve();if(l.messages){var p=this.messages();p===x&&(p=w()),b(p,l.messages),l.messages=p}else l.messages=this.messages();var d={};(l.keys||Object.keys(this.rules)).forEach((function(t){a=o.rules[t],i=c[t],a.forEach((function(r){var a=r;"function"==typeof a.transform&&(c===e&&(c=n({},c)),i=c[t]=a.transform(i)),(a="function"==typeof a?{validator:a}:n({},a)).validator=o.getValidationMethod(a),a.field=t,a.fullField=a.fullField||t,a.type=o.getType(a),a.validator&&(d[t]=d[t]||[],d[t].push({rule:a,value:i,source:c,field:t}))}))}));var m={};return v(d,l,(function(e,t){var r,o=e.rule,a=!("object"!==o.type&&"array"!==o.type||"object"!=typeof o.fields&&"object"!=typeof o.defaultField);function i(e,t){return n(n({},t),{},{fullField:o.fullField+"."+e})}function c(r){void 0===r&&(r=[]);var c=r;if(Array.isArray(c)||(c=[c]),!l.suppressWarning&&c.length&&I.warning("async-validator:",c),c.length&&void 0!==o.message&&(c=[].concat(o.message)),c=c.map(h(o)),l.first&&c.length)return m[o.field]=1,t(c);if(a){if(o.required&&!e.value)return void 0!==o.message?c=[].concat(o.message).map(h(o)):l.error&&(c=[l.error(o,f(l.messages.required,o.field))]),t(c);var s={};if(o.defaultField)for(var u in e.value)e.value.hasOwnProperty(u)&&(s[u]=o.defaultField);for(var p in s=n(n({},s),e.rule.fields))if(s.hasOwnProperty(p)){var d=Array.isArray(s[p])?s[p]:[s[p]];s[p]=d.map(i.bind(null,p))}var v=new I(s);v.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),v.validate(e.value,e.rule.options||l,(function(e){var n=[];c&&c.length&&n.push.apply(n,c),e&&e.length&&n.push.apply(n,e),t(n.length?n:null)}))}else t(c)}a=a&&(o.required||!o.required&&e.value),o.field=e.field,o.asyncValidator?r=o.asyncValidator(o,e.value,c,e.source,l):o.validator&&(!0===(r=o.validator(o,e.value,c,e.source,l))?c():!1===r?c(o.message||o.field+" fails"):r instanceof Array?c(r):r instanceof Error&&c(r.message)),r&&r.then&&r.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){!function(e){var t,n,r,o=[],a={};for(t=0;t<e.length;t++)n=e[t],r=void 0,Array.isArray(n)?o=(r=o).concat.apply(r,n):o.push(n);o.length?a=u(o):(o=null,a=null),s(o,a)}(e)}))},getType:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!E.hasOwnProperty(e.type))throw new Error(f("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?E.required:E[this.getType(e)]||!1}},I.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");E[e]=t},I.warning=s,I.messages=x,I.validators=E,t.a=I}).call(this,n("8oxB"))},Kz5y:function(e,t,n){var r=n("WFqU"),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},NykK:function(e,t,n){var r=n("nmnc"),o=n("AP2z"),a=n("KfNM"),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},OQrj:function(e,t,n){},OTLn:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAfhklEQVR4Xu1dPXAkyVLOHHUP8ax3Z4B7WmBn7x3GaR3AgDityXNWa7znQMTNLAEesVoD+3QuzmoDDwLNKAIczlitAZhPCjAA50YGd7ez73FaF4yTrAs0PZNE9vToRqPpzqzq6r+ZmogzblVVXZWZX+VPZWUh+J+ngKdAKgXQ08ZTwFMgnQIeIF46PAUyKOAB4sXDU8ADxMuAp4AdBbwGsaOb77UhFPAA2RBG+2XaUcADxI5uvteGUMADZEMY7ZdpRwEPEDu6+V4bQgEPkA1htF+mHQU8QOzo5nttCAU8QDaE0X6ZdhTwALGjm++1IRTwANkQRvtl2lHAA8SObr7XhlDAA2RDGO2XaUcBDxA7uvleG0IBD5ANYbRfph0FPEDs6OZ7bQgFPEA2hNF+mXYU8ACxo5vvtSEU2CiA9L6JHlOLdhFgBwB2V/B4CACXBDDEKZ7Sr22dDe7h5TrLQvdbeg//b/LJAl3egxl9ln+nc7r0PwxerzNNFte29gBhAYAoeoYE+wDAzDf9DQloAJPJ68FPfnRh2rmO7btff78NW1uPEbCbAgZp2peEcAhB8HLdN5C1Bkh3dP0MAQ8sgXFHSBDhhKZ40n8QHEsSVMe/995En2KL9ohgz9H8LgnoYNBpv3Q0Xu2GWUuAxGbDOHqVYkY5YAJdALUOmgIUBgbg9AAAtx0sftUQpxQGT9ZRm6wdQBJw/MLSdDCUn3oDpQRgLNJrSGHwaN1AslYAKRcci7JBF4TYG9wPTw0RVkjz7tvxLhL1C9QYafNeO5CsFUCevh2/cmhfGwsv+yjTKHpelTPPzncrCF5UTYOj++ETY+LVtMPaAKQ7uu4iYN+AzmdAcIkAHNoFQtpOdlwOcf7YYJzlpnGEZ3A//DzHGMZdu2/Hn+WI1M2/dwVMj0W6cMgX4+jfJ9pJEVBv0GkPtO3r3G4tAJKYVt8qolVXSHA4nUaDrF2+O7reaSHsEiFHe9SCscToU5pEvaK1CWsN3Ao4ILHq7EIje2eIdDIlOB102vFmseoXa6dW0CWMw+XSBnJJYXBvHfyRtQDI0zfjA0L4TJCGc5pEe6YCmwggCwWfGUiCcVebEPYGD4ITjaSatum+ifYQ2dcwPt9hTTGgSXRoSQ9ez8dZ80WCz48ehBxib/Sv8QBRao9zCoPdPDsaf6d1He0rd9BbQhEfNIbh8zzfXxwwPvwcj18kB30mAjjToO3gMM9cEppzQCILJGuhRRoPkKdvr/eJ8EWGlFzRJNox3SlTTQ17oPCJPNvmqWaMRtLZ/Et8LROTygkwboF0ZtrxWlK1KiI9P7rfPtSsq65tGg+Q3mj8ZZb9XRSTEtOLHVETH+WScphclibVGU2irqsNYlGQFabtsN8JH9ZV+DXzajRAEiFl53z1j+hd/0G7qNPj+JuJ0DJQ1P4JAe2bpmckaTMmu/EVEXaL8n/mBO+9ub4AxA9SWTCJ7hUBTo1wu2jTaIBI5lVZjuLMJh8fAuCnWqZo/RI7f4OOKQz38/gZ2nVIWqQoDa6dX952jQZI7834BBAe12X3Ss5ieJfXapPMk2eLzICrRDuVdgYha3F43X8QukqOzCvvxv2bDZDR+LuMEOd5vxOaOLLGxFvVIREYMQy60HclSCzAYRXGdrHo3mjMznpaROuy3wnfd/GdKsZoLEASAWKApP1e9jshn19U8uuNrgcGJtetCNcsUgWv9LlUdNzvtPmcppJfb8TmJTxL1eRh8H4Z5l4Ri28uQOKEPOCs3ZW/OqQ7GKa/8N2KR7wYBOR1qS53NWGdhPCoLomcpiBqLEAk55CAHuY9czAl5kqTawZkNrk0fsn8eq8GHFeEsFcHwUvOZjjcvvJXVrDEBb+Wx1hbgPQ7YW3WlggQO86Z6RkGDD4noG4dNoD5nHujMXmAGHCw6KZCBOuq3wk1u3DR07wZX5meoZlP7rQZzUdM2/RGY9Z+KVqyWh/JdC2L7Wuzy5ouojcacy5Q2in2Wb8TrqpaYvoZp+0dgOSMwmCvjg5vE/mhYa4HiIZKjtsYRriSr9d7F/YAcSwkeYdrOkOkQ85b9KH6H7Y1nR+p/lNeQa2qf5MZokzRXyRt7VPHm8yPLBn2JlbJCLc4IZ/PsNYFETxAShYk6XNNZYiUni+su7bp403lhyRnXoNIFHL49+7oum9xC3DJHaHBoNPuOZyWk6E8QJyQ0d0gTWOIlK9kSJlK88xWzbVp/NDS22sQLaVytNPnZNExEL6XlcI/n0YdcrAWSSKYjrU8l9KwdF0BAnVJNZHylBaYFJ+Q8//jOJIKIsTd6pJvxnPJSjWBBoSp1y7MKyUr1gEgyd0QTuKT0l5upY/Eka7r8TDrKmvC0EuaRA/rcKXV52Jp9FGJbSSAUMV3oQ3CuXwLcHc58TDRPKxJpCzgysO/0q1Cn81bIjDmn5Ls+qrvICgjVivBsbBGLvGTmka+4I9UGtmaFcvOuJtD+KTo4hFFiWBjfRCRKRXWh5WKSZg42tJGMB+ryuII0hyr3qzygKe5AJkVLkst+VOVWtc65Sbzk8zJBcBVcklMml/V5u5GAqSOkRN1jpVFVEeZ3FhJzpY0tzoETGxB0lgNkgAkq5pG6WkZvdGY75JL91CsLjwZRLZO+50wvtte1k84A6mkuoyrtTcbIEJdrDJ3LsnMSBiW6ZRLTNVGtkzMN+mbmr+v6xlIfCalIUBd20hCWdZBmhQwMHHKJVpLDvHNt0qqJCL5XGWDVaKf6d8bDZCkLi4/HrPyV0Y6RlJ29EtFDStn+VO6vC66oDB8WPT1XAmw1OAQb+M1iHRABQDOhDINhMp3ES8JYID2r0Dd+jwhnGqeW+M3E4t+L1ACa5MjWI0HSOKoZ1TTACeOeu/tOC4OQXMHnGgbZ2+OcwpJ6eVNDc0EDmRwUTquwn6RMD1+jbd/PzwzHOtOc8FBr111GdP1NtrESgCSVd1EnbQY29LT1ge0RTvwAwBY+KU8KlOa1609bzBc+jQGEE5wSK3pO03NLUX518Zm8c6Z1HiAiI76krMaMzWKPmZt0ALYIQLWBHXXAlWBaogIF1OAIQKcUhCcL/o0UnCi6Q76WphYEpPidzgAhi3EXSLaUTjTVQljQ75LF4g4nBKx5uZcsdSi2U1OMVkbDaJQ8w0RvPWbJjW4qvv6ACTOydr6hdcMdQMYXdBk8qgOd1XyUKaRPgg71Pz2Bs6iSk30H/idctPXbnmd0t2QPLJQVN8hAZwC0LHG8S9qErbjNgYgP4CC9mqsLeInCW4xIwiGRR7WsQ+2+D2DpxZsZSZHP7ogwJMmgaXWAOGDQAiCT5GoWwEokl2eLpDwgjB+QSkz5FuHU2Mpu2Am3fGajglpO6FrBdqJLghxAFF0XGczrJYA6X0TPcYt6hIt7cY59q7UrkTvAJDDmMMpzs4Clh+lUV2AskhhL2I58dmQkMQZhy+Rnh/db996VjrWRkTbLcJtwhvztXCzjk/8aYKD/ofB66JoYjtubQCSPHfMfsV+gdriCghOYzC04BQU5o+y8MIVhcF2kaaUCYOTyB6fmmcJt+ruSKzFW+FOC2ineNCwCQaHEIbHdaFl5QCJgRFFzzS5RSZCsqKtVdqJJteqDqbV8no1ppZtrlbO8qkaNl4SwiEEwcuqgVIZQEoExg1DTBPnNEIGALVNp9CYWqaHeYoEUQ0AtG0qB0rpACkAGOccuZkinSSnuqnPEZsUNlCmsV/RJNqpq5OpM7Xoot9p39NKrMIfe8nZCy3CvSSi5+JdxsqAUipAZjvy9IUDH+MckQbTaHKyKJzS5R0+e+h3wocaYZByvNIcXc3YZbaR7mvE6yD4/OhBeKCZl2ReLV9SY43TCrb2iOKUlJxgoQui1vMySwiVApBELfcV97XTeUT0DgEH02k0yNqxe2+uORL1QdpAGjNLaUY05q61UFiaSaWq0CjShehd/0Gbkz9X/mKwtIIuv9CrqBqZhddTmkS9MjR34QDpjq6fISDvTpZp43TM8XLte+DSBR6NmaVyzEu60qrZ1aU2Cs0KGoddNq/07yjOkkzj861Ppfmn/J3vuBwMOu2Xlv1V3QoDCNu/rSjqW51lzLVFOzg0jWIohCHTzJKyg2dU1QuCigslNJI2jnhVAuhF88riem0sJ9fRPiGH981TaRjY0yDomcqJluSFAGQmpPDK2NcgekcIvCtwirr1L4+ZJQkBANTqzENLJJ3Dnu6jieYVQO7bg7G/RHBgbn7F5ydPisj1cg6QJDTK/obepHIEjLmwKHbLlXfVVQ7tihNorZCuavenX33/wSQMfxeAPmoR/A63mSL8FwB+tTUe/+ffffSjd3nGX+yrWV9aoQtbmtrM3RIol0TYc+3AOwWIhgFLBLtCgkNtBEVLbIWZddnvhO/fEh6+aTgeS9VJnDjmT99EfwSt6RMg/AMC+EnWuhDga0D6N5i2Xh09CP5FS4O0drLDvroaSm80/i5r0yuixFISSTQyvVxXsnEGEHNw0DGF4X5RtmNvNM6qugjLp9+asK5ko0vC2xtd/x4B/AUC/rHUdtXfCegfEOCv+532f9j05z4aH2s57KvgrZONY9WakvOoQxNn3iVInABEeeKc+Lf0jlrY1UalbAVBjLgsJBcqa+rmOjEX52OwUE0kLmu43uh6IAjcrTwtqaRq3vlolh4De0oDrX/iKv0nN0ASc4Zr0so+B8FragfdorTGXZMpYrMg9Tc/E1HY16A5P0n7UPft+LPY+XT4i4MZ98PPbYZUONw3h4eatnloYzL/WX3iaKB5wzEpdfQor+OeCyDKdIyYBmXsMsvElnKR2JTgg8esZxQStXfc77RTixNkMVlhnpjIyK22eUwJlUk5ie7hVsA+QGr6ThXvD+q1cf7qkrkAotl547Ao0H7e0K2NFMmmH3FK+JlgbliHdbtvo58h0T/azF3bhxB/PrgffKFtP2+nC/vSMQB8khWud2XKGM+fQ8KAfJ9Fuq+Sq7qmNUA0zh4vOq9ja0q4u1okO/VEGt8kT2lxLHbIAfDfpfHd/J1+38Zx12iRzPkJqSVu1pY+ShkyaA0QyXGLwVHhM2hzsurV8QpG8PlMO9yx8Zm6o+u/t41WmQoWR7cGnfafmPbj9tKhataYtpuHzTzT+ihNWOs3U6wAojhnMMoQdUmw5bHy1M2yBTifcxDSPxe5ruWxkfCnNuckSgFbuZS61L3SaELbcxorgCjChIXFxW2ETjHfu8PmMB96o+gIgHo2c7Xvg/1+J3hq099Oi9QrH00697LNn7MEiHCqWrNMV62tuihcttojNltG0VsA+m0bYbXvg7/sd4L7Nv1ttEjVvuUdS0F4iprDvsvZExpaGQNEYV7lOlDTTNqmjZxisTBqDu3xdES/SRD9ymaOefsgBL911MH/thnHUIs0ksc2ZpYNQDi8xsmIK39VnHdoBMJkl8yjPbq/in6KE/onzZxct7EN+fI8yqKP6zUvjietwYavxgCRHCIblBZJtMWxVbtkDu1hKmiu153ndD02DYXbmPF8c9LH9ZqXAMLV5r9M3bwNrhbPx3AOkDJfljUltibka7PL3GbS+C8R4K9M5+aiPQJ8cdQJf247lrQD87h1tRDma856cdcmLL1ZAHkzPiCEz7IEyAMk3XyOAWKxC9sC1qZf7QFSaxNrdP2t4pajquJgGvM0u7AN4zV9cptYSvrYRIM088/bRgog2YDbWINIAlBXFSzNe5E5NoSc9/dOel4xt+8vmdA21oENQDIdIZPaU/akMO+puGu+OKi1FuErtNMgiF+TLfvXiqJt2yu6PZ32mC9JXV+sTBpIPLZJyzcGCC+4NxpnPb1ceYLiMlNsDgrzaJGno/FX0lVa14LDV3OPOuFHNuNKkclVYzbwoNCqqIQtQDjNOP2OAJiVs7Rhqkkf6V5IyljWWuTp2+u/IcI/M5lj3raI9LdH99t/bjqO8jbl3WFr9NzDbNMW/UurtHcrgEjOEE+Y67MOOu2S85Hu8lFzIy5NqGy1SJOSFW20x5xeNiaLKYA17TX3kmyDR1YAiRGreKTFxinSEMSkTR4BiK9thsG9dU13t9YeCQNsNxAT/kltVcGXHNrOGiDanblqkChUbyYPbIVgIy5MVWxKq8DB1swkumdbx9caICxV2t25KpCIV275+TXkF1iz68PaElgKO0q7o+bvtmF13QZHx0Cwm1kMvKJLcVpw2G5wc9rnAkgS0cqsP3VjrwIcDjrhcw3TXbWRzEAWrmkQDnAcCc+V2d99KKKiyQ1Nc1Q2UdyRie/it6JxlwhfZPDE+raeLZ+7o/GL2VN94i/3vaTcAEkc9lPF5XlezZAm0RNbdSeSY6GBZoecawaNJrR18nhK2t3OZH15tLImyDLfeU3oaDJ/m7aJz8QlpvhVXunHxUJ2Ky37M5+hhuALqymlbL1o3twtHCc9eplrp3RZ4SRPWnui9VnIbr2vviRttyq5iJq4hPws02c08mxoi7TIrUEWQJJ5T2QF3At9BEVyzn3p0fQN+E7p0fhlMHqV3qO4cy+bx5fyaNflNToDiK0pwQl2rl8zFTVayp0G+T6EG0GYnZPAzwDgD+WrufhLAPhXJPjCpijDMsOldIy0+x4SbVzt2Dcb7g+vHxtVpHQJDp6LU4AkIOFcLa1PMqeH00capYOjtMiGxlfIGxVZFli+ojvdmnwIk+lvAOCvz/5O/wtbrf9pTba+sb1Cu2q3V/laKY/gyH3tAxmLc83xyKsTn6NQDXKD/q+/38at4MTi0UYnQBFL9WfExRV311Xv+UkeZNl/T0wVvm2XVUM59a65wlm3KoqwQmNwdEqu83ybgOc0ifaKCP441yCLC8ZxxOoxI2crVUwuCWAAk+il6aLFsw+AzNCfJrFR855f2QCQvufi3UWptI5NGVIGHmwFzxCAax+bAoOX/ZLC4MAm20GiWSEm1vJHE4HlJ9WkGqpp8z0FwkH/QcB1YsWfFN/XHKxJY8RGUM1KG2URRgN6Td0oMTJo8HZj75voMbSItUVWNC1rWVf8tLTrF6VKMbHugGT2epPRIygrKDPTKkDHWbHtPObVkvaTDg8v+p32PRGxNWggRfS07y7mNbM4eMJZCzm0RULNYh9fWmRZYSbWKrkwfQQlXbb40UY8WQZLXvNq8Xvybln/+9m8Htm5NivEYGpm/QAK2lNcd87eTrhWcgmPL1UGkJsdWl+6XrH/zsCCUzyN3/3LyKvSmFeLH5SEIc72nUQPTf0kxaKcNFE65kbpGPLGQcf8niK1aBfBAShmlKjsCY1SNcgi1/O+j20jQaZJhzrbHXKdsNusQ9tHVYHf0JdSmFna6WnaxY+8TtvBYVFOuDSJygCyaO/HD8kDdbXvz0mLSvm7VblMjcNuqpks52/UTd7peTi7swuFZjWa653GRO8QcFAlMOZzqhwgt7TKzPTiyMbH+Sic2fuUAIZIOCScnkvJbLqXmOplailNK9XLWXFWArU+JqQdnCUJ2kadNCw9J6DDKl4jS5tcrQByo1XiSt3UBcC9HOFhDUPmbWLQAMIlApwS0dUicDQn7AD1MbVUptXSiXkMBMQfEwOA4L0SwDCn/RUAnRDioOiXj00EopYaZHkBcdrBeLxXglZJox3fdeHT/VOk+P5B5kFWHUwtRSSP1xpnLCBfhpqtSZM+biNfWX1ibQFheFKVf6FZUC01yKqJs9nQCrb2+HCoYBNMQ7e0NjPBm+IFtOIHQm9+/fvhWZ6Bl/v23o4/ufVvU9ymFm1rgOxyHoZjnSPSYBpNTuoa+VteT2MAcstX+QEsbILdFhRDjtWsOSd58q9IO7/sJZ8h0kmTQLFIoEYC5BZYZqf0X+Y+hCpbbNb+e/nfKK8DidYEINF3dSCmn8NtCtTlkc88fGk+QOTbbscEcIqA8xBlkSHkPLxoSl/2pYYENMTYFEyvCGOT3Vs3IjQeIFKu0aqsWz4hbwHtEOF2EsFZJz/GlYxdMRD4P0S6mAIOl8OwUqaB68tlrhZmMk7jASJdcNK+eBXfSwiC7dYUdglvQp8cAl13jXPOYV8krg8GMG3BKQTBUBN6VbxBb5W9YCLARbddB4BQBpGcMGgOHpjie6x5+HuEN5GmumufOLx8AwDAIbToEqLowkWoVUg7yXXLsGjh14zfaICIxRkArCp6awg3byOVxJm3Y3NjBizato+40QUSxucr0lNys+/a5VoZrX/E93zSb42aJoiafLuMts0GiOCgu65wsYohsZlxPR4qEi2dgbU7uu4jxAemWb9zCoNdjamUR9CkNJymO+qNBojooAM9lJIR8wjHvK9Ck832cwd1bCWBnM/JdRmeNDpJa2+6o95ogLhy0F2ARJdeDlxV8pEtaBNh5KqItcoJy3pZFgCc+IEueGQzRtMBwmVs0hLtjG7K2RBvuY8E2MQvuKAwfGhq+swiRoqMgRxvYdjSQHDUa/meoXatTQdIegSrAkEx8EeMbyFqUti5KiK1wx1T8GmFJa2dFKjQhtrzzqOI/o0FSF1tX2leC0xUO+1SpchkzEIqC2qEri6+oGaupm2aC5D4UhWwPb7yV2X0xMCR7km351yOZSoc2vbSHJtUQ2x5zc0FyOx6bj8VIIbFCLTCoG2nucseR7ZSauHy35SXn0o578hat5Ry4iJ6p6W763aNBYio1sPg/bJt8UXmJGkYnL4hpaqsjGxpI1YglFJ1LTCrxpMqnTQ51Lu2AKmDY6gs+MAyd6u+lrLoAvdTFV4oAyRZoV4PkDI4sPQNKaRaB4DEZhIXQ9A9BzGkMHjEfXAcaZ4Zq8wpX8XuzLOQCiKKrkSysRpEAEitDqckJ3aBmZxezj+xiELd7HrhLKRW/DABjweICbVytJV8JpOh62iyNGnDMqK1SeM6tW0iQ7SRrWw6F5+ha8PnJvJDs06vQTRUcthG8p0yP1VjW94DxKGQuBiqqQwxCP8uk6mU9HVb3jSVH9J6vQaRKFTA3w1ytuZfrzU4eJIeIAUISp4hm84QzZuBc/o04U3EpvMjTRa9BsmDUsu+yhuBt0YnoMGg0+5ZfrLwbh4ghZPY7ANNZEjif7yyLS3KmmQaBL0qU2jSuNREfmgkrsEa5HqQUbSsdtU0EnBoTsglvsUn7nUDSfatwnqGpiVC898bCxDp4K0uqSZM5CTdhDOPxRNyDdPiyoaT6ImLsj3K74nNfC6WSKJyG0h3wMsqWiCt2iArl4fiaob807wpn+t+uzRvk79L6e51eDfFZD2LbRurQSSm1CFXKcnBeiEVWUgYEicfztQ6cpq8FiTPpUtXtsKh7SflmvkLU1pKOmynKHupvtLqcFo3Q3VH4xcI8atUmt+tzFyDDOB4bAI4HHTC55oPFdFGuhLc5CrvjdUgzOjeaHyZsdNWUk3Dwhk/p0m0t+xPJHdCThQXruYyf0ph8KQK5703uv42o1rkVb8TZpYpKgK0rsZsNkDejE8A4XEaMcoue5lckWVnXCsQmSfkFmkp/ATckzIfw5RuE5ZR/tQVGFaN02iASLZvWWnhs8dGo88MTCq2i15TO+hKO/4sLSUaZG0Ey4xlkwvC4HNpbBeCJZpXDqpJupin7RjNBsjX32/jVvBt+uKLfwZsFiygvllBavNzAfNUebogxF6R2iTRcEz/VI1Ztha3BUJav0YDJPFD+BZeamGEorQIC0crivpEwA+Jqn95omuSxlw1CU5RgTB8XoQ2kc6iml52lOnZeIAohMbpeUFsTkXRM4vnlp3cITeNcCWgiZ+nhiB46QoomvOdPJuBescpuGHzARLXrI34zYyscwMn6Rm9N9GngMTvYWid8Dn7zigM9pwJ52zNHOEyfLyHLoBaB/0HwXEeuVJG6mpTcSXPWhsPEF68QtVzM354kisZzgsjqOiWvC71qYXGiMcvysQzWPeqdc40ShQdm6araNNmily3inGOGq0FQAwuIF0SwAAm0csswYhBsbX1OHmkxi5/igtJI+yZAtKUr7HAEpwoHvBZOTRnCNMUT2g6PhNpEgS6jaKiItqmtNO0XwuA8EL1ZTpvyMKahAEzBIRLINpGuHn11tSEWqb1SwqDA1cmlcTIxOQ5yHoKTRpj7qvMNG1CE/7HGV14k1BvFFXWRVauU91sbQDCKzYPharppG14Tgj7RYZWsyaS5KexjySVO9Wux6KdeQjb4iOldVkrgMxAMs4M+xZE2StEOji632bhrPyXZDqzRtEkPLqcb+mPFrmc/Kqx1g4gFukZeWh8hQSH03ZwWJY5pZ1sfE5zHe2zRisJKLUvLKGl3WK7tQNI7I/Mnis7zLhxaEOrxT61Bcbywhz6Jxk0o2MKw/26bRJ5mcz91xIgc8IkjvvA2Q5K9A5bcDgNwkHThGF28j/u0hT2bSNeKwTuigi7gwcBn8ms5W+tATLXJrGpAdS1Egyid4B4QggnVTnfriUvceb3gGjPliYIOKijaemaVmsPkEWC8ZlBi3CPEPjmHoctVzmxZxzqRKSLKcFp0ecYrhlqOl5ME4RdIqZHHOZedTrPV4GHSHA6RTpZd5qsvQ9iKiS+vadAGgU2SoN4MfAUMKWAB4gpxXz7jaKAB8hGsdsv1pQCHiCmFPPtN4oCHiAbxW6/WFMKeICYUsy33ygKeIBsFLv9Yk0p4AFiSjHffqMo4AGyUez2izWlgAeIKcV8+42igAfIRrHbL9aUAh4gphTz7TeKAh4gG8Vuv1hTCniAmFLMt98oCniAbBS7/WJNKeABYkox336jKOABslHs9os1pYAHiCnFfPuNooAHyEax2y/WlAIeIKYU8+03igIeIBvFbr9YUwr8PzOAaNcXJtF1AAAAAElFTkSuQmCC"},QIyF:function(e,t,n){var r=n("Kz5y");e.exports=function(){return r.Date.now()}},QaN9:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAWb0lEQVR4Xu2dD5AcdZXHv697shARFdG7uixYchJmNvyJkJ2Jm53NJZd4cKCUAjubHIgo/kU5AobsLFJnLISdTZA/KsKB/NEzkJ0NYKmIudMzx84msLPhIJLsTuDUUjd4d6h3RhKzme53NUnAmGNnuqd/PfPr7jdVVFE17/d+731efzJ/tqebIA8hIASmJUDCRggIgekJiCBydAiBKgREEDk8hIAIIseAEKiPgLyC1MdNVkWEgAgSkUFLm/UREEHq4yarIkJABInIoKXN+giIIPVxk1URISCCRGTQ0mZ9BESQ+rjJqogQEEEiMmhpsz4CIkh93GRVRAiIIBEZtLRZHwERpD5usioiBEQQj4NO9T1yvGmXZ5lkHe8xldLlFpu/tozYrtH+C36tNHHEkokgLgbe1TfYyTDOYeYlAP4CwCwCWlykaHgoA1MAdgF4kYh+SLC/P9zfM9LwQgK6oQhSY3CdfYPngqmbgKUATgjonI8s+5cM/ADEQyP9Pd8LSU++tCGCTIN1Ye/gQtswPgXmjC/kdUlKlDds+44nBnqe0KUkneoQQY6YRtfKDWdwjK8C+MM6Dcr/Wug+KtPtwzdftM3/vYKzgwhy2KzS2aFugG+rfLYIzgiVVroLoBWFXPeQ0qwBTiaCHBpeZ3bwEwS6M8CzVFY6gz85kuu5S1nCACcSQQCks/nPAvhCgOfoR+nXF3KZG/1IHKSckRcknX1oEWD+KEhDa1yt1uJCbvmmxu2n306RFiTdt/4UsFHSbywaVUR2vNC/bKdGFTW0lMgK0rnq3mPJOPbbABY1lHjwNtvE9u7zR9Zcvjt4pXuvOLKCdGWH7mHwR7wjDH8GAn1tONf90fB3+v87jKQg6ezDSwHrX6I48Pp7Nt9dyF34g/rXB3NlRAXJfxfAecEcWdOqfqyQy7ynabs3aePICZLuy38AjG845s38HyDjFrA1EivbkzOn3rT75TfueZttcRzMHwPwXse5gh5IuLTQn/mnoLfhpv7oCdKbfwqElENIm4iQGe7P/Pd08ens4HKAHnSYL9hhjNHCQGZ+sJtwV32kBFnQl+8wGJsdItptW1i4eW3mmVrxXb1DtzLxilpxYXjeJizY3J/ZEoZenPQQKUHSvYMDIFrlEMzgcC6zzEls13Xrz2Lb2OokNvAxzGsKAz29ge/DYQNRE2QHiNocsrmxkMtc7yR2zup8y5v/gN8DmOEkPtAxzOOFgZ45ge7BRfGREWTByvWnGTHjx07ZMLBsJJcZdBqfzuZ3AHAqn9O0WsbZZfv0zTcve07L4hQXFRlBulblL2IDjk/jZqILR/q7H3HKO9039CyYz3AaH+Q4stE9vCazIcg9OK09MoKke/NXgVD5rYejBxH1Dvd3r3EUfPCM4D0AZjqND3QcY0VhIHN7oHtwWHxkBOnM5tcQcK1DLgDovkKu+3In8Z2r8nEyMOEkNgwxDKwdyWUcfdkR9H4jI0hXduibDL7Y8cAYT/9mJjp2rM5UrgpS9dHVl/8kM75aKy4szxNo3XCu+5Kw9FOtj8gIks7mK7/5cHXmLhNdO9LffXM1gOnsuuOAGZW/C8SjcMAc6nFTIZdZHIV+RZDqU/4lGcZ5wzdNfyGDdHbocwCvjsLBcliPIkjYBl7PK8ghBv9JjMuHBzKPHc5k4fX5k6wy1hJwYdhYOehHBHEAKVAhHgQ51CdtB3gHMU0yceVcrspXuq8PFAR1xYog6ljqkcm7IHr0oUkVIogmg1BWhgiiDGUlkQiiFKcGyUQQpUMQQZTi1CCZCKJ0CCKIUpwaJBNBlA5BBFGKU4NkIojSIYggSnFqkEwEUToEEUQpTg2SiSBKhyCCKMWpQTIRROkQRBClODVIJoIoHYIIohSnBskOnlSo04PfAeBvAPy5TlU5rEUEcQhKwjwS6MzmewhY7zFNo5eLII0mHuX9OrP5TxPw5QAxEEECNKxQlJruzX8NBEc/8dWgYRFEgyFEqoTOvqEuYg7KrZirCrJ/vH2RSeToMx8Dk7ZNuwyDJxk8aRE/d1R8qza/74/MLwqDYFu6d/BREL0vALXWFMQgqvu2dkR4kokeNAzzcTp5ywvN5CGCNJP+EXt39Q5dycRf0qik6UrxVZDDNyXCd20b98faio6vUaaSnwiikqbHXOlsfh6AMY9pGrG8YYK80gwBm2yi+2PxUee3rlBAQjtBFn3mwbeUY0YrG9Rq2GhlMmYp6DNAKQJxAYiGC3KYKGMEYxUlnqr7LZybg6HpgixcmT+JTe5kwrsJdB4Dx7tpQGKbQqBpghzqdp9B9DFqwKtJ0wQ5cKcnm68A0buaMmLZ1AuBZgtysHaia8z46K1eGqm1tuGCHLqBZuVmM3KPwFrT0fd5PQSp8GG+0mwb+4pfqBomSMfV+Zmxo+hLcutlv0bZ0Lz6CALAIKQoXiz6QaAhgixa9fAJZbIeBaHdjyYkZ8MJaCUIgD1Tlt0289StP1dNwndB0r3r54KMYQDHqi5e8jWNgG6CgIGNpvXy+XTqjpoXG3dDzVdBOletfxcZRmRu+OgGfMBjtRPkAE9Gv9lWvE4lW98EOfC2yrB+obJYyaUNAT0FAfZaZepoOW30WVWkfBFk0Yr732QdfUyRgZNVFSp5tCKgqyBgxgOxtuKHVNFSLkh3d9781TvwCAPnqypS8mhGgLGhMJDpnq6qytm8Xk5W9NqtYdI5NHt0o9c8lfXKBenMDt5EoD4VxUkObQncXshlKn/Les1HswVh5odibWN/p4KeUkEOfWNV+VAejZtZqphAAHMQsGo4l1mrqyAAdhtoaaXEyG6veJUK0pnN30/AZV6LkvV6E2DYl4zklq3TWBAw8Qdj8THPZ/4qE6Trug1ns21/X+/RSnVqCFiLC7nlm3QWhAiPGvHiBV77VSdIdugBBn/Qa0GyXncCvKuQ62mtVmWzP4O8UpuZKHo+vj0neKWYdHbw5wCdqPt4pT5vBIj55uGBnqr3m9dFEAMtb/D6OUSJIAv68h0GY7M39LI6CATItpYOr1n+wyC8ghgUO4HiWya9cFUiSLp36HoQ3+ClEFkbCAI7C7lMzfvBa/MKQnYbebxCihpBsvnKzx8XBWLEUmTdBAh03XCuu79WgvJEqpvA+Vpxfj9vWTy/5dSxUS/7qBJkJ4DZXgqRtdoTeNbah44tt2b21qrUKqWuBvMtteL8ft5mXjyjbWzab9uc7K9KkJcBvM7JhhITTAIEfGg4l3nASfXWePstILraSayfMVoIks6uOw6Y8Rs/G5XcTSfw/UIu87dOq7AnknkGpj1Xy2ker3FaCLJg5frTjJjxY6/NyHptCexjxtKRgUzBaYXWRPsOgNqcxvsVp4Ug6exDiwCzIdco8guk5K1CgPCZQn/G8eeJqe3tZ5omPa0DUxFEhymEuga6r5DrdnXFeWsimQPQqwMWEUSHKYS1BuaNhYGec9y2Z40nnwbhTLfr/IgXQfygKjlBRJ8d7u++yS0K3jlvvm0bT7pd51e8COIX2QjnZcJHRvoz99aDwJpI3gHginrW+rFGBPGDalRzEp5hRm4klxmsBwFPtMdt0L/r9GM5EaSeScqaPyFAwAs2+Ku/PZru2LE6U/c1payJ9gGAVumEVwTRaRrBq2Ung79p76M7ttya8fSHXi51tNpcrrx6vFUnDCKITtMIQC0MFIl4I9u00c0f/mq1Vh5P3k2Ej9aKa/TzIoh/xPcBNAnwrspNJokxCaLf+bed+swM/jWDXwTRLputF393tLnLy1uo6Sq0SqlrwPxF9R14zyiCeGd4WAb6CZi/xcCjKv91VVqiZsm4lHqfzfyoZmW9Wo4IomYyd9ughzfnuv9ZTbpoZOHx1Nk2sdYX6RBBvB2LdwO4u5DLbPWWJnqrrfHUjSBWepFoPyiKIHVQZWCQgLUiRh3wAFil5D1gfKS+1Y1dJYK45E2grw3nurX7tsVlG00J51Jqrs1cuaRsT1MKqGNTEcQFNGa+aWSg57MulkgogD9sP+vkGbHYFWD+FICWIEERQRxOiwzjnOGbLlJytW+HWwY+7MCpIwZdDBsVMd4cxIZEEEdT48sLuZ77HIVGPIhLySU2sISAJcxIBR2HCFJrgoxbCgOZz9QKq+f5yukV+8v7W2fEjFmA3WoDb6knT9PW2HgjEZ0A4AQGKlfErPx/qB4iSPVxFo59+VdLH//y3+9TMfWp7e0p06AlTAf/hVWRU3L4S0AEqcJXxecO/kXHTHtPeQUYlYty17yioL/jluxuCYgg0xBj4IGRXMbTfep4Z/IytrGCgbluByPxehAQQV57DnvBdkdhYFlddzrl5+edxZZxIwOuf4+tx2EhVbxCQAR5jWOBwf0juZ66ToPgUvu5NuhBMN4oh1nwCYggrzVDsuOF/mWVawW7eljj7R8H0V2uFkmw1gREkCPHQ/TDQn/3UrdTs0upx5j5XLfrJF5vAiLIEfNh4mtH+ntudjO28kT7owR6n5s1EhsMAiLIkYLYVuvImuW7nI5v/3j7Fw2ia5zGS1ywCIggfzqvTYVcZrHTEXIp+VGbUflNiDxCSsAgpCheLHppz/P9QXS5eDWB1g3nui9xAoOfP/OtthWrXIWj6t1aneSSGH0JGOAEJcZKXioMjSAMrB3JZRxdl8maSK0CeMALOFmrPwHDtmfRnK0veqk0NIKAsaIwkLm9FowDp4+8fOAaTnLqSC1YAX/e2Lfv9TR3W+XuZ3U/PAvS0Zs/3SRsq7sCRQvJRvfwmsyGWumsUvIKMCrXkJVHuAm8ZCaKni9k51mQVN8jx7dw+aXms7YWF3LLa96w0S6lnmTm+c2vVyrwlQDhHjNe/JjXPTwLUimgM5vfR03/OWZtQaa2z5tvmvpcnt/r8GT99ASY+LxYfOx7XhmpEuSnBLzdazHe1tcWxCq1fw5Mq73tI6sDQOBnZqJ4koo6VQmymYAOFQXVn8OBIBPJn6LpItffoax0RoCZvxJrG7vSWXT1KCWCpPuGbgDz9SoKqj9HdUH2j7cvMojkZqP1Aw7KyimDKEXx0bp+7nBkk0oE6eob7GQmx7cJ9od0dUHKE8mLCfimP3tLVm0IEN1qxkeVnT6kRJAKnHQ2/4vm/vC/uiDWRPu1AK3RZpBSiB8EfrPfsuYfferTL6hKrkyQzmz+fgIuU1WY+zy1BEneBuAq93llRWAIGLjBPKX4DyrrVSdI3+C5xPSYyuLc5aouiD2RGmLwRe5ySnRQCBDwbYq//QKiIUtlzcoEOfA2q29oEMwZlQU6z1VLkOSPGFjkPJ9EBoUAEb3wv3umksed+cz/qK5ZqSALewcX2kT/prpIZ/lEEGecwhdlmMaJNPupX/rRmVJBDn5YH7oX4A/7UWz1nCJI45k3f0fDNDpo9lNP+lWJckG6Vm44g2P24wBm+VX0a+cVQRrLu+m77TaIulT9vWO6bpQLcuhVpBvgfGMRiiCN5d283RgYM03j/X69rTq8M18EqWzQmR38BIHubBxGEaRxrJu4E+Ee43Wxq+jELXsbUYVvghx8JclXbljzhUY0AoggjeHcpF2IHzIYd1BibKSRFfgqyEFJHloEmA04B0oEaeSB06C9ygw8bjLdQW2jTbkBku+CHJCkb/0pYOMf4evfIUSQBh20fm/zEgjfYuaN5r6pJ2jutv/ye8Nq+RsiyIHPJKvuPdYw3nALg326Q2pIBCGO1O9V2KZdMHjShDEJWJMU36rBr1P/qEzDBHlly3T24aWAtQLAeWr/ZQiHIAabJ1Hbkz9Ty0ay1Uug4YK8Kkpf/gOw8WmQqnvhhUMQZnwo1lZ8oN6Byjq1BJomyCttLOjLdxg2V66N+14QtdXfXkgEAX8rlhh7f/0cZKVKAk0X5PBmFqxcf5ppGAkmtFb+M0CzGOzw6ofW56td1cSeCM7JigbRQoqPDqsctOSqj4BWgtTXgrNVQRIE4HvNxJhPX2Y44yVRBwmIILoeCcTXmPGxW3UtLyp1iSAaT9ogLKN4cVDjEkNfmgii/4hfIuBHTLxdp1LN+NjndarHr1pEEL/IhjgvAZuMRNHxvViCjEIECfL0mlS7CNIk8H5uG6xvsfwk4T23COKdoXYZRBB1IxFB1LHUJpMIom4UIog6ltpkEkHUjUIEUcdSm0wiiLpRiCDqWGqTSQRRNwoRRB1LbTKJIOpGIYKoY6lNJhFE3ShEEHUstckUbUHo9wzeRsAoQMcD9lyAzqh3OCJIveQ0XhdVQRh42ARdS4nRyu3nXn2UJ9rPJ9A9AP7M7dhEELfEAhAfSUGIV1c7qXBqe/KdponvuL3xkQgSgAPebYkRFKS0e+oPHW8648e/rcbK2plcCRtr3fAUQdzQCkisNZGs3J/w4oCUq6LMK8xEsealX7dvn9OSMI/ZAuAsF5uuMxPFS1zEBzY0Mmfz7t+RWmMYfG1gJ+WycAOcoMRYyckyq5T6OpgvdRJbibFtWjtjzugqp/FBjouMINZEsnJ/wsp9CqPw2Gsmiq9z2qhVav8cmNxcsG6FmSje7jR/kOMiI0h5ov0iAg0FeVhOayfQNiMxOtdpfHki1U0ublfB4O5YYmyD0/xBjouMIPtK8xIxNsaDPCwXtT9nJoqnO40vjycvI8L9TuMN0ziVZj+1w2l8kOMiI8iB986l5BZmvCvIA3NY+37j9/Yx1L51v5P48kT7nQT6hJNYAM+aieI7HcYGPixSglg7U1fC5i8FfmoOGrAsnNlyavEZB6GwJtrHAJrnJBY1/rbiKEeAgiIlCL/QcbJdLj8foPnUXSqD74olxj5ZK4HbfzSi9Paqwi5Sghx6m/UdZryn1oEThucZuCSWKK6brhe3314R4btGvPjeMLBx2kPkBCmPJy8gwsNOAQU9joDvkEF3T7H1QkvLsT9Dee9fWhZ3VG7VTcACN/0x48JYW/ERN2uCHhs5QQ68igToQta6HGBROr3kcOaRFKRcSl1KzF/X5eALQh1M9MFYfPQbQahVZY2RFOTQq0iRgXaVMMOai4AxI1FMhrW/an1FVhCemL/Yhv04gKOiOHjHPTP2WGx3tczZ+rTjNSEKjKwglRlyKXWpLW+1qh7OhoG/olOKT4TomHfVSqQFqZCySqmrwXyLK2oRCY7it1ZHjjbyghyQZLz90yD6ckSOe4dtUq+ZGF3jMDi0YSLIodFyKZm0GZsAOD5NPKRHxRQzlkft7x3TzVIEOYzM3u3z3jbDNO4m4OyQHvxV22LCkxZbHz8q8fS2KPb/Wj2LIEdQ4e1zWmzjmNUgrAAwMyIHyl4wbjNeH7uBTtyyNyI9O2pTBJkG09RzqbmGySuIcJkjkgENYsYDtkW3tZw2+mxAW/C1bBGkBl5+PnW2bfNyMP4awIm+TqNByQn4CYM2GSbyNHt0Y4O2DeQ2IoiLsfF4qsMmXkLAEgZawWgFaf6hnrEHhEkCJpnxmBGz/5VmR/OPfi5G/WqoCFIPtcPW8LbTj5uKHdVqEN7iMZXS5TbjpZbyvkmqcV0spZuGMJkIEsKhSkvqCIgg6lhKphASEEFCOFRpSR0BEUQdS8kUQgIiSAiHKi2pIyCCqGMpmUJIQAQJ4VClJXUERBB1LCVTCAmIICEcqrSkjoAIoo6lZAohAREkhEOVltQREEHUsZRMISQggoRwqNKSOgIiiDqWkimEBESQEA5VWlJHQARRx1IyhZDA/wHhjTBBJKIq5gAAAABJRU5ErkJggg=="},Qq2X:function(e,t,n){e.exports=n.p+"static/mongo-6b00c806480bf27d259b65b49e46450f.png"},RXDR:function(e,t,n){},T5bk:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("DSFK"),o=n("25BE"),a=n("BsWD"),i=n("PYwp");function c(e){return Object(r.a)(e)||Object(o.a)(e)||Object(a.a)(e)||Object(i.a)()}},TO8r:function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},WFqU:function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n("yLpj"))},YrtM:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI");function o(e,t,n){var o=r.useRef({});return"value"in o.current&&!n(o.current.condition,t)||(o.current.value=e(),o.current.condition=t),o.current.value}},dfTv:function(e,t,n){},jN4g:function(e,t,n){"use strict";var r=n("q1tI"),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},a=n("6VBw"),i=function(e,t){return r.createElement(a.a,Object.assign({},e,{ref:t,icon:o}))};i.displayName="CloseCircleFilled";t.a=r.forwardRef(i)},jXQH:function(e,t,n){var r=n("TO8r"),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},k9j6:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAgAElEQVR4Xu19C5gdVZXuv+p0JySQwIiJ4oPHEFB56IgDiALqiA8UFZ1JvEMefarq9Hl0CAkdmBmv3mvmu168d+CcSELSdU5OVZ1OeDgEgyAq8hiD4gUNI46gSGAQUMQrkhGiSeh01Zpvn+6GTOik67HrnNNdu74vH4+s9e+1117/2bV3rb02QT3KA8oDB/QAKd8oDygPHNgDiiAqOpQHDuIBRRAVHsoDiiAqBpQHonlAzSDR/Ka0UuIBRZCUDLTqZjQPKIJE85vSSokHFEFSMtCqm9E8oAgSzW9KKyUeUARJyUCrbkbzgCJINL8prZR4QBGkzQOddbOHTAOOJWSOJcY8YQ4THmd4Tw4BTzb0xp42m5jq5hVB2jT8fQ3jwz7TZwj4DANzxjODgOcY2KIRb1mfde5ok6mpblYRpMXDX2wYC8FYDtDp4ZrmbSBcbWWd68LpKek4HlAEieO9ELolN3cOwP0MXBhC7VWiBHwdoMqAXv9+HBylG8wDiiDB/BRZaul15jHeXu4H0yWRQcZ9/+I1mW6qrFtoPyUVV4H9Fw8ogiQVEAwqDub6iZuzxhuSaIaA3zBRxeqpV0DgJNpIO6YiSAIRUHLN+Qz0A3h3AvDjQd5PQGVAtze3qL3UNKMIInGolzr6mZ6W6QfzAomwwaGIbsz4XmWd4f4wuJKSPJgHFEEkxEd+U/6ojOf1MzdnDU0CZBwInwgVL5Op1BbXno0DpHQBRZCYUVByjWUMEsQ4NiaUbPUnCVwZ0J21soHThKcIEnG0C07uU0QsiHFuRIhWqX2PmSpVo35LqxqcSu0ogoQczeKg+U7xKkWMRSFVJxRnYLsQIuDECYVDCjDhWvHqZfXYD4ZUTbW4IkjA4V86uORIz5/WLz72ATgkoFpQsR+BuGxlnRuFgtgF85lXEtGZQQECyu0RHxkz2lBlXc/G5wPqpFpMESTA8Bcds8CE/gR+2UWuVfnRp/69vHXV1uF9TWFmKrq5lUTNhf9RAcwMLCJmKmJULMOuBlZKqaAiyEEGvjRonM+siW3b82THB4Es8ri8Pmc/fjDsops9ltHVT+Blsm0A0V1EfmWgx/m2dOwpAqgIMs5A9jZ6T86wL365DdnjTMDt0LTyQM+Gu8JgF+rmuZRpziafCqMXUNbxSKtsyG74WUD51Igpguwz1IZtzJqmiSBsbtvOlhwFjwJctnRnQxzcgpNbRGIdRHhnHJxxdF8EuDLko+KYzk7J2JMWThFkdOgKTk4fDbxTJI/mSwCV93pctnP2DhnY4pDVDGj9o99fjpSB+TIG42FGc1vYlYo7ScFST5BCw/wgjXwB/5j0MWS+gcTrVLb+r9KxAfQO9p6Y8ZuvgoUE8L/FhEo1a9+dAPakgUwtQQpu9gSMLH6L0keLcF/zdSrrfE069jiAJcc4rzmbEM6X3R6DLGC4UtUbj8nGngx4qSPIsjXLpg8dtkts2YqAeq3UQSI8K16nrGy9Io6WS8UOAFZ0TUNkERNwcgDx4CKM3zNQmfbHmZW1l6x9Kbji5JdMFUHEcdfmV3DQabKHjsHrvIxWri+p/1I2dhi8ZdcunL1374yxD5qzwuhOJMvgHze/xqfo2G8qCCKOu/pg8csa67jreAFEwDdJ4/L6Hue7EwVYK/++WDdPYY37iUiX3S4DX9dScux3ShPErJvHdGtiS1TycdeRiPs5gLKl247sAJSJV3BzH2vuzgEflInbxGJes9enip2busd+pypBqGgb/dCa3zNkH3fdJRbg/lBXuVaovSA96BICLLhGkUa+75wguYnfwOeKZTptWXdJ7sur4KYcQfKuOV9L6LgrM671yStv0Bs/SXpgksDPV/OvzUx/+WDXdMlt3O8DldoUO/Y7ZQhSHDTPIB+iQMJnJQ88iHAvGOUB3f66bOx24OUd/TSNMmIhv1B2+wT8M2vNtPofycZuB96kJ0ifm329N/I9Q7w+ZKQ6kfBrYioP6PWvSMXtELCSa144WlziHMkmeeJrfAbDlfV647eSsVsKN6kJUhw0LxZfwZlxnHSvMa/xM13lWk/taenYHQZYbOQuATd/YI6RaRoRfim+xls99jUycVuJNSkJUmoYn2ymoYPfJ91ZhFvFGY1q1v6edOwOBrzYNt4wLM6eiI0Nll2rgO5pptVnnVs72AXjmjapCNLn9v6Fj2bu0WLZjmbwQ5p4nTLsQdnYkwmv5ObezSOvq/MTsHuTBq2yXt8waTY5JgVBzLr5mm6Rht78deMZkgdup9i21Q49pLx+wfo/SsaetHDFhrGAmMSmh9xjv0S7xbbwXh/i+4mU7OYkndzxBCk1cnkeeT9+SwKOaPjwKjW98VAC2JMectWqVdqzx/5qJG+N5R77BfAoEVUGsvVaJzuqYwlScM2PNgcG+JB8B/I9DCpXdfsb8rGnHmLRLR5LGO7nJI79AneKRMiqbt/eiZ7rOIIUHP0ksUfPYDMBhz1F4LIqphbNs4WGee7o2Rnpx34JZPvsVaqGK1J4OubpGIL03dh3mLfrJVFvSswah0v3EGM1MnvLVs/GZ6RjpwywNJhb1HztZenHfl8Q28KZmdMrnbIe7AiCFF0jCzS3bU+VHmtEN48cXrJ/IB07xYAjx367+kfqd+E1cl1BDwF+xdKdhlzc8GhtJUjRyf0VUzMN/ePhTT+4BgM/AVO5atSvlY2t8F7xwNLB3hOHPU8UucvL9guLowRMFcuo/4ts7KB4bSFIX92c53c1d0ZKQQ0NKsfAHzRG+ZDDXiyvXrB5d1A9JRfPAwU39yFRdZKAj8ZDGkebMKANozJRDTHp7Y6UgW3tU3DNPgJW4QA3u8axRiz0KIPy+iX1R+LgKN3oHijYhkkjpZNOio4yrqaoQrmqqtvrJeMeFK6lBCm6pp1EMTaA/4Whlat6/VutdJ5qa3wP5Kv5w6nbGzv3f5hkPzmWbiexwzmumS0jSNE1RSVB2afanmjmTbX4V0XygE9ZuLybPVWDSKtHVnIn77Z0W3o52PFsbAlBCo75OSJcIctJDGaRN0XklSd7OrUsn3QyTr5hflxrZkPQX8mykxjZVuTNJU6QkS1cklelj/gmYk2c0bhflrMVTms8UHRypeb1EYR5MlpkD++r5pLNuk6UIKKyBjKQk+dEeIB9X3xpvUGGcxVGezygO/qc6SSSIEmsUabFsoLwgJW1T4+FMYFysgRxzC+B8PmYHXieGeUdh71Y3rxg81BMLKXeIR4oNXLvGk1CvSiOScy0OMlvXYkR5NLK/Bm7/2y2mD2Oj+oAIqppROV1PRuaV5OpZ+p5oGgbn+YMiRSjsyP1juguK1tPIKF1xJrECFIc7L0Avh81W/ZOsF+2DPc7kZymlCadBwquuXw0e/vosMYz6MNVvX5nWL0g8skRZOSc89VBjNhH5jFRPURdDRbSa1NEvDi45I3sd498PwnzMJZZRjLn3hMjSMHNrSbwiqD9ZLA1xPw/XcN9LqiOkpuaHhCXmDLQvNA0yMOgtVW9fkkQ2bAyCRLEvDlMLdxu9ueuVeQIO35TVr7omv8G4O2BOkj4tpW15d/vkugaxDVFMef3B+ogAEu3EyNrUBuUXOd4oBgufrZauv2BJKxPLChDdlARJInRncSYIeNHEWQSj7V00/PV/EzqGj6JKHMk2JuJDGYS0QxmmgnGTADdGvFu38ce1ni3xrSbNW03DXt7xD+Hh/FIvbf+/6UbJhFQEWQ/Z6pXrPGjK9/IH6+xdzrAbyHQ25jwdjDeJiEWRcmdRxj8CyLtEWY8clT2TbevolW+BOzYEIogHUqQZdfm3jS8l89i8MHPMzDf3z1t6L61i657MXY07Acg6g2zlrmAfVwANP/IrTl8YIM9ZtyQEceUD512RzvPhSuCdChBSq4pSo9+IlDQM/7JMuy/DyQbQGj0spuFIFwAln5PewALXhERJzMJ+AYD17ejJI8iSIcSpOiaYS7flLI4bJbT8WkpiBeEiuIWCRPzRg98dc1wf9yiJqEIogiC0WznS5M5ZSk5lAlD7GON59HV9d76ryWjvwpOESTlBCkMGmeRRxtlnY1IOmDH8AnYThoXk760VBEkxQTpaxgf9hmbAJrbqsCW3M4uAnoHdPt6ybgvwymCpJQgxYbx1/DpOhBk3xGYVKweGJfoMitbLyfRsCJICgmSd/Nv1eDfBfAbkwiqtmASL7KyznWy21YESSFBio3cFjB/WnYwtROPgJ8NeThX9l0fiiApI4jsyi77uM9jYCcBO8H4Iwg7Sew4MR8OkCgCPvYnOR4xly3DuUxmA4ogKSLIyKuVF7/aI+NBEN8C0BMgPOFnMk/UFteeDRKYopgbDsHh8IcOh68drpF2KojPAONMUPzUFSacV83adwexJYiMIkiKCBJn9mBgiMBXQKNbrR77wSDBFVZGHI8m388HziAYrwGmGy2jLu2OekWQFBGk2DB/CMYZYQMXwC0++1+uGe4PI+iGVmnusEHbAOY/C60MeOTzyQOm82gE3VepKIKkhCDixiwi7Wehg4ZxjWXYy0LrxVQQqfRat3cvKPzlOAT+/IDuSKmgqQiSEoIUXeOLAIlq9oEfkSQ4oNufDKyQgGDIAG1awOAfV3XnXTLMCdm+lJy48exWJwr384rsZMWSa9QZFK4auaZ9wurZcJuMQIuKkduQe11XF98R+Fz4aEO+zx+pmY7Qi/UogqRnBrkdoI+EixbvOEtvPBlOR7706BXc1TDIzLi8athXhdEZT1YRJCUEKbnmwwycHCJg/sPSbcl3/oVo/dUz6gMAwrw2bbJ0e0n0Fkc0FUFSQpCia7wA0OzgAcPbLN2JsuMVvIkQkiXXEIWmw+Rb/dTS7XeEaGJcUUWQlBCk4JovEjArcMAwHrcM+4TA8gkLFurmuZTBPWGaef7QF6fHLTSuCJISghRd4xGA3homwJj9k6uG+/MwOknJjhYhFwekAr/2sc+nV01HvJpFfhRBUkOQKFfP8SpLd/4xcnRJViy4oapkPjnk89sd09kZxwxFkJQQpOTkBpk49KKViS6qZusdcVlQn6O/2afMlwOl6RPdJuOMiCJIWgjSMK9gxuei/Joy4Vp4vL5qOvdF0Z/MOoogqSFI8yalWO/jzPg1Ee4D4z504U5rif3wZA7+ILYrgqSEIKKbRdcM+y3hoDE0SpjvQsOPNObtPk/bbulW2z8sBgn8oDKKIGkiSCO3Esyxvy5PEFx7WVQcYd7ORNtF9RHf5+1a997t1pJNvwsamJ0ipwiSIoIsHew90fN9KWngUQJ4tEridoAeA/zHQHjc9/lxz9cek31UNop94+kogqSIIKKrBcf8AhH+l6wAkoizg4DHfPADGuj/0TA9uL63Hv/0Y0wDFUFSRpDmWqRhfguM82PGTivUfwPGNhA/SKTdNpCt/2srGt23DUWQFBJkdMH+h9FCCq2OuTjtfY/At9GwdlurZhdFkJQSRHS71DC/w4wPx4nYtukS38asuVW9viVJGxRBUkyQJklc43IG/VOSQZYw9lYmdqtZZ2MS7SiCpJwgovt517xIG7kTPMx5iyTiMTom4QHf48/LOEWo1iAHGYZOuYJN9pHbIJE3enIvP5mJQozeAcOuB+lvEBk1g6gZ5FVxMkoUsTZ5L4DXBwmkTpJRVU1CjEbIX4COuQa6HTPIeG7NO/qZmpY5G8zngPFeEF4bwv1tE/V9PqdmOvfGNSBk/KiqJnEdHlS/Uwiyv729td4TM93eewB6DwhngXFK0D61Ws7XMsfUempPx2lXEUS9YsWJH2Td7CGHat1HD/t8TIZwtM/+Mcw4hoiObt5axXhTrAZiKDPwzapui9t5Iz+KIIogkYMniGKTQNR9/LDP80jDPICPB2MeA/MIOC4IRhwZAhYM6PbmqBiKIIogUWMntt4qXqU9t/GZeU3yMOaB+B1EOJsZJ8YGfwVgs6XbkW/tVQRRBJEYi3KgCm7hBI28s5lZ7KSJ0qcz4yD7Q5kjaoXaC1EwFEEUQaLETct0mufQoX0KRP8Q6Cz6eJYx9VlGfSCK0YogiiBR4qblOs3Lf8i/IsrVcQy+sqo7fxfFaEWQKU4QUdWdQPMDlB19DuC/s3SnESWQWqVTdM0bAcwP0x6BrAG9XgqjMyarCDLFCVJyzWcYeEPA4HjSH8qcXCvUdgWUb7lY3tFP00gLeS6ErrP0+qIoxiqCTHGCFBumuFTzsMDBoeG0pK5YC2zDQQTn3zh/2pF/mv1HAN1B8Rj4RjXiPSeKIFOfIL8K+bHuby3d/mrQ4GuHXNExfx7yws/IKSCKIFOfIA+FSwfprHKj4xGw6JjbQPjL4ORUr1gH9FXIX4Apl6xYapjfZ8bZQYOJgJ8N6HbH5leJfhRdU+RXvTlon9Qu1kE8lXaCFNzcagKvCBpMQi5uekaYtsLK5jflj9KGPVGcblpQXQZWVHX76qDy+8qFjJ/Ir3IT2abuKNzPQ7KyeZtXKjPdNNEA7Pf3iQ10SDteJR7lMlJmml816mF90GxbEWSqr0Hc7LFA5pfhA7Pz1iKi8J3v+98NsW3d7LaWoZPWL4lWY0sRZIoTZORXMPdTgE8NSxJmWlw16teG1UtKPmSwjphBeNDK2qdFtSlkm4nNvOoVK6FXrBGChL8j/WVziC6Tcc9G1AAd0yu45v8h4O/D4jDwD1Xd/r9h9cbkFUFSMIOIhW1m2Hsg7KvJmGsI2MKgtZZe3xo10KLqFQfNM+DjsrDpJS+3F/PDpyJICggSexYZ8xGjToQ7hjzcnWSx6bybP1Vj7zxQM9X9/VHJxcAPq7r97qj6apE+juematmfuLPIq1zVvEiHvwPgNwztGfj+Mzyj65naRbXfTxSQhm3M6sp4czPcPQfkz4VPc0E81wedTiO1uQJ/4zhoWxnto9aSDcLGyI+aQVIyg4zOIlmA3MjREkzRA/Cn5h/Cn8Di31n8dzdAcwGeC9CMYFDRpZjw36tZ+8vREUY0FUFSRBDR1ULD/BwxrogbOB2tT3yTlXVCpcQfqD+KICkjSPNX0TGuBtElHR3kkY2jh4j9CwcM54nIEPsoKoKkkCCiyyXX/CoDn5URRB2E8QPAW2TpDWn3JCqCpJQgott511hBoC8ScEQHBXkkUxi4nadnFgfZJAjTgCJIigkiut7r9v6FBl+Q5MIwgdNRssQ3Pb9j55LN/Zt3y7ZLESTlBBnrvphNNKJLwThadpAlhUfAN1jTalbPhtuSakMRRBHkZQ9k3ewRM6hrIfu8sFl3t0OfVhBjrOuKIIog49Ig75oXaiyIQn/TCTwh4CkffLMGbcuAXv9+q2xSBFEEOWisFTYaf0m+9h4wzmCw+NItsyzoxHFOdAN5/lcHTOfWiYXlSyiCKIKEiqriyPmSdzPoTAKLPKdYuU7Nxgm/B+NRAI+Kf5LGv4CHRwdMR/y/tj6KIIogsQNQ5FZN6xqe7fuHzNI8bzZ3YZbGmOUTz9agzfJ9nk0aPPKxwyfaQcAOGsYOntb1/IwZz+9YvUD+7lPsTo0CpIEg4qjlXwd1mNaFE9Yvth8PKp+UnKwjt0nZlxbcomuK05jHBuzv1yzdTmTNltyBqYb5JTA+H7CDQmxzN/tL1xrucyF0pIsqgkh3aSjAvo25t3nD/goiEpeaBnsI/9vK2l8IJhxOKjGClBwzx4QN4czBvzNQqer2+pB60sQVQaS5MhTQpZX5M3YdMXslCCvDZhjIvmF3X8MTJIhxHhPdGcpLrwhvJeLVA9nW76AogkQcsRhqxYaxEKCVYLwzCgwxf2jAcO6KojuRTmIEEQ0XG7k7wXzeREYc6O+ZcC37/uqa4f44KkZYPUWQsB6LLl9smO+FTytB/OnIKER3Wdn6hyLrT6CYKEEKTm4REW+KafxLAK/uZq4kvT5ZtmbZ9L2zdu0JYe/dlm5H/gEI0c6UEi0OLnkjvG7xOnVp3I4lXQEmUYKMzCLmNnCYeq4HdFni65N8I3+8xl7wnTTmmy3D+UzcQU6Tfsk1lrF4nQKOid1vwgNW1j49Ns5BAFpAkEgVBg/W58TWJ0U3936AvxvC4Q1Lt/UQ8qkVLbjmJwi8EqD3SXMC8d9YWedr0vDGAUqcIM1ZxDHXgnCxzI4ksT4puuY6AH2B7SReY2Wd5YHlUyhY3GieAg9ixshK7T7jGsuwl0nFbBdBmiRxzW8C+JjkDklbnxQc/SQiTdSfmhPURiZ8qZq1/0dQ+TTJ9a3rO8yfuUfMGIIcs6T2nXGrZdifkop5ALCWzCBjbRcd82IQ1ibQsdjrk5JrPhzgPsH/arqmfSLJMxEJ+KklkCXH7GEN/WC8XXqDxJ+1so64L7ElT0sJIno0srPll0dK0Uh/Qq9PRneubo9SKM2fnpkj+6ipdI+0ELDQMM8lH2J3ShSek/owcEcG2hfW6xu2SQWeAKzlBBH2lBzjzxlYnlyFD94Gphssw159oP5n3ewh06lrAXzuJQp+0c0YHhHuHcja57RysDq1rXw1f7TWPbwyofF81Ge/UjPcWjv63xaCjHW0MGicRR5WgGhBEp0n4E8M3APgdwx6TiMmZryOCK9jUVqTg18Gs799oykx4v061U/Jza1gYvEV/E2SHfESQOWMNlRZ17PxecnYgeHaSpAxK4u28Wlo2nKA5W0BBnZBNEHf53NqpnNvNO3Jr1VyzQt9xsoos2+A3l/vs19uZQbFgWzqCIK8PKO4RpHQJMpbAzixbSIMfLOq2xe0zYA2NlzYZLyDhps7U4sTMOMHDKpU9fqWBLAjQXYUQUQPVrjZI/ZAW86gFWGzOiN5IIISAQsHdPv6CKqTViVfzR+uTRse27adKbcj/AyIylb2wGtGue0FR+s4goyZnnezb82gazmDi8G70xLJxG4zaon1ERopuqYBZrEIPymC+sFVmNf4ma5yracmbtDtuKdjCTLmqZKjv4+1zHJwjIxPiW4njd4x0FP/qUTIjoXqGzQ+4Pkkzmd8PAEjb2EPlWrO/l4C2NIgO54gYz0tNnoXwPdXtLlu1BJLt+NmJ0sbvKSAchtyx2W6/JUEWppAG/8GoDxZ/DhpCPIyUZzcJSAW+U9/nsDgHRCSiC4eyNZFrtaUfoqN3EqIpELGUTI7SsAfGFzxh7rKtUJtl0zsJLEmHUGEM4obi3PhDZUIlI96/19QpzKwk0CfbMc9gUFtlCHXvNe9eXhJfmVHAtk+e5Wq4f5chq2txJiUBBlzkLjeTBsezidFFAa+7kP7xw36hp+0clBa2dbSTfnTvGFPbNtelEC7d5PG5YEe59sJYLcEclITZH+igGkRCPMkeK4B0OBUnjXMuvma7oz4niHOaGC6BJ+9AkF4HD5VLKM+IBW3DWBTgiD7+m1pw/ygB3xc7LwwBy7XKS5+2QrwPYC/VeZFMG0Y0wmbLLpGL7j5OvWWCYXDCDCGiVDmzFDFWrLpd2FUO1V2yhFkX0cv3rj40EO9zBwN3XOY/LnNPCzw65m1/yCNn/bYexpD056uFWovdOoAybSrNGicJ9YZDHxUJq7AYuCfM9DKrc62ld2P/fGmNEGSdt5kwe+rm/M4I4iRyEfX+wmoDOj25snijzB2KoKE8dYkk51/4/zMkbtmr2y+TjWvgZb6/JYJ5aOefHNl1apVvlTkDgJTBIk5GLqjz5lOmZO7u/H42kX1X8eEk6ZebBgLRoiBM6SBjgIxeF13Ritfs6Qu6udO6UcRJMbwFkT28chit7lzRoyruKv7SmuJ1bYFarFungGtmTcl/4wN0W2+51dqphOm8ksMD7dfVREkwhiUbON8zmj941aNbG5x4irLsKsRoCOrLHP0OcOkrWSC+AreFRloPEXGwyAuW7rTkIo7CcAUQUIMUskxzgNp/43B5kRqBNzuE66qZu27J5KN+/f7z2Rx8fbR3wlQZcj3y47p7JSIO2mgFEEmGKq8mz9Vw/CFAIkyM+8KO7Lifb3LoyvX5eynwupOJF90ej8C8sU6I4natA0fXqWmNx6ayI6p/PeKIAcY3aJrfBEQeUn0kfgBQM8Q/KsGdOcr8bGAkm28hbXmArxXBt5+GFuhaWVVzmjEK4ogBySIuVH+sVK6B0xXWUa0+8WXrTl/+vDsN/QzNysVHimTHET4JfuoWIZ9jUzcyY6lCHKQESw6xlWg5i+17Mfxkbmyptd+ERS40Mj9LYlTfRFe8yZog0V6iPdSplIr1J4Nak9a5BRBJhjpvsHcZ32fL08gMHcw46qjjnvzlas+sGr4QGYUbOMsGnmdCnzfY+DgJb6JWCsP6PX7A+ukTFARJMCAL/vWsunDv911OZMgCs0OoBJchPAj8f1k/1SNPjf7eqaMyJsS27ZSx4lA28ThJUu3vxrc0HRKSnX8VHdhsW6ewhpfTkRLEujr9Rr76zLAY8MaLfC5eRb8OMntPEdA2Rtqvk7tlYw9JeEUQSIM62ihu8sAfk8E9baoEMiiLi53wlXbbXFAxEYVQSI6TuwAllzjMgaJ9UngKxOiNxdRk/Bt8rmS1CWXEa2aNGqKIDGHquBmTyBkBEmS+CYR3TrGI5pG5fXZuh0dRGkqgkiKgYKb+5hGfBkzPiAJMiIM72ai8gz2yl/RG3+ICKLURj2gCCI5FIqN3CUAX55AtfMglm7yoFWmcpGJIE6QKaMIItObo1j5wfzRGnuCJFLvZTyIqd9npnLVqN+SQHdSDakIkuDwFxrmB0l8ZCQZ+VzjGvorBspV3b46wW6kGloRpAXDX3TMAghiIX+8tOYIq4f3UqXe2zmnGKX1rYOAFEFaNBjLr8+97qU9vphN4uV2Ed0MsLgq4ActMj3VzSiCtHj487ZxtkZ0efiLLnkbCFdbWee6Fpuc6uYUQdo0/MVB853wmgmInwHhbeOZQcBzDGzRiLeszzp3tMnUVDerCNIBw9+3yZzHQ3wCNMxj0ghET7A3/MRLxE809MaeDjAxtSYogqR26FXHg3hAESSIl5RMaj2gCJLaoVcdD+IBRZAgXmeHe04AAABUSURBVFIyqfWAIkhqh151PIgHFEGCeEnJpNYDiiCpHXrV8SAeUAQJ4iUlk1oPKIKkduhVx4N4QBEkiJeUTGo9oAiS2qFXHQ/iAUWQIF5SMqn1wH8C5giCm/gJb3YAAAAASUVORK5CYII="},nmnc:function(e,t,n){var r=n("Kz5y").Symbol;e.exports=r},sEfC:function(e,t,n){var r=n("GoyQ"),o=n("QIyF"),a=n("tLB3"),i=Math.max,c=Math.min;e.exports=function(e,t,n){var l,s,u,f,p,d,m=0,v=!1,h=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=l,r=s;return l=s=void 0,m=t,f=e.apply(r,n)}function y(e){return m=e,p=setTimeout(j,t),v?g(e):f}function O(e){var n=e-d;return void 0===d||n>=t||n<0||h&&e-m>=u}function j(){var e=o();if(O(e))return C(e);p=setTimeout(j,function(e){var n=t-(e-d);return h?c(n,u-(e-m)):n}(e))}function C(e){return p=void 0,b&&l?g(e):(l=s=void 0,f)}function E(){var e=o(),n=O(e);if(l=arguments,s=this,d=e,n){if(void 0===p)return y(d);if(h)return clearTimeout(p),p=setTimeout(j,t),g(d)}return void 0===p&&(p=setTimeout(j,t)),f}return t=a(t)||0,r(n)&&(v=!!n.leading,u=(h="maxWait"in n)?i(a(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),E.cancel=function(){void 0!==p&&clearTimeout(p),m=0,l=d=s=p=void 0},E.flush=function(){return void 0===p?f:C(o())},E}},tLB3:function(e,t,n){var r=n("jXQH"),o=n("GoyQ"),a=n("/9aa"),i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||l.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}},uWrK:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9IjIwMHB4IiB2aWV3Qm94PSIwIDAgMjAwIDIwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDcuMSAoNDU0MjIpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPHRpdGxlPkdyb3VwIDI4IENvcHkgNTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iNjIuMTAyMzI3MyUiIHkxPSIwJSIgeDI9IjEwOC4xOTcxOCUiIHkyPSIzNy44NjM1NzY0JSIgaWQ9ImxpbmVhckdyYWRpZW50LTEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjNDI4NUVCIiBvZmZzZXQ9IjAlIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyRUM3RkYiIG9mZnNldD0iMTAwJSI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI2OS42NDQxMTYlIiB5MT0iMCUiIHgyPSI1NC4wNDI4OTc1JSIgeTI9IjEwOC40NTY3MTQlIiBpZD0ibGluZWFyR3JhZGllbnQtMiI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyOUNERkYiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzE0OEVGRiIgb2Zmc2V0PSIzNy44NjAwNjg3JSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMEE2MEZGIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iNjkuNjkwODE2NSUiIHkxPSItMTIuOTc0MzU4NyUiIHgyPSIxNi43MjI4OTgxJSIgeTI9IjExNy4zOTEyNDglIiBpZD0ibGluZWFyR3JhZGllbnQtMyI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGQTgxNkUiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0Y3NEE1QyIgb2Zmc2V0PSI0MS40NzI2MDYlIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGNTFEMkMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI2OC4xMjc5ODcyJSIgeTE9Ii0zNS42OTA1NzM3JSIgeDI9IjMwLjQ0MDA5MTQlIiB5Mj0iMTE0Ljk0MjY3OSUiIGlkPSJsaW5lYXJHcmFkaWVudC00Ij4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZBOEU3RCIgb2Zmc2V0PSIwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRjc0QTVDIiBvZmZzZXQ9IjUxLjI2MzUxOTElIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGNTFEMkMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0ibG9nbyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIwLjAwMDAwMCwgLTIwLjAwMDAwMCkiPgogICAgICAgICAgICA8ZyBpZD0iR3JvdXAtMjgtQ29weS01IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMC4wMDAwMDAsIDIwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTI3LUNvcHktMyI+CiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTI1IiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iMiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTEuNTg4MDg2Myw0LjE3NjUyODIzIEw0LjE3OTk2NTQ0LDkxLjUxMjc3MjggQy0wLjUxOTI0MDYwNSw5Ni4yMDgxMTQ2IC0wLjUxOTI0MDYwNSwxMDMuNzkxODg1IDQuMTc5OTY1NDQsMTA4LjQ4NzIyNyBMOTEuNTg4MDg2MywxOTUuODIzNDcyIEM5Ni4yODcyOTIzLDIwMC41MTg4MTQgMTAzLjg3NzMwNCwyMDAuNTE4ODE0IDEwOC41NzY1MSwxOTUuODIzNDcyIEwxNDUuMjI1NDg3LDE1OS4yMDQ2MzIgQzE0OS40MzM5NjksMTU0Ljk5OTYxMSAxNDkuNDMzOTY5LDE0OC4xODE5MjQgMTQ1LjIyNTQ4NywxNDMuOTc2OTAzIEMxNDEuMDE3MDA1LDEzOS43NzE4ODEgMTM0LjE5MzcwNywxMzkuNzcxODgxIDEyOS45ODUyMjUsMTQzLjk3NjkwMyBMMTAyLjIwMTkzLDE3MS43MzczNTIgQzEwMS4wMzIzMDUsMTcyLjkwNjAxNSA5OS4yNTcxNjA5LDE3Mi45MDYwMTUgOTguMDg3NTM1OSwxNzEuNzM3MzUyIEwyOC4yODU5MDgsMTAxLjk5MzEyMiBDMjcuMTE2MjgzMSwxMDAuODI0NDU5IDI3LjExNjI4MzEsOTkuMDUwNzc1IDI4LjI4NTkwOCw5Ny44ODIxMTE4IEw5OC4wODc1MzU5LDI4LjEzNzg4MjMgQzk5LjI1NzE2MDksMjYuOTY5MjE5MSAxMDEuMDMyMzA1LDI2Ljk2OTIxOTEgMTAyLjIwMTkzLDI4LjEzNzg4MjMgTDEyOS45ODUyMjUsNTUuODk4MzMxNCBDMTM0LjE5MzcwNyw2MC4xMDMzNTI4IDE0MS4wMTcwMDUsNjAuMTAzMzUyOCAxNDUuMjI1NDg3LDU1Ljg5ODMzMTQgQzE0OS40MzM5NjksNTEuNjkzMzEgMTQ5LjQzMzk2OSw0NC44NzU2MjMyIDE0NS4yMjU0ODcsNDAuNjcwNjAxOCBMMTA4LjU4MDU1LDQuMDU1NzQ1OTIgQzEwMy44NjIwNDksLTAuNTM3OTg2ODQ2IDk2LjI2OTI2MTgsLTAuNTAwNzk3OTA2IDkxLjU4ODA4NjMsNC4xNzY1MjgyMyBaIiBpZD0iU2hhcGUiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMSkiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik05MS41ODgwODYzLDQuMTc2NTI4MjMgTDQuMTc5OTY1NDQsOTEuNTEyNzcyOCBDLTAuNTE5MjQwNjA1LDk2LjIwODExNDYgLTAuNTE5MjQwNjA1LDEwMy43OTE4ODUgNC4xNzk5NjU0NCwxMDguNDg3MjI3IEw5MS41ODgwODYzLDE5NS44MjM0NzIgQzk2LjI4NzI5MjMsMjAwLjUxODgxNCAxMDMuODc3MzA0LDIwMC41MTg4MTQgMTA4LjU3NjUxLDE5NS44MjM0NzIgTDE0NS4yMjU0ODcsMTU5LjIwNDYzMiBDMTQ5LjQzMzk2OSwxNTQuOTk5NjExIDE0OS40MzM5NjksMTQ4LjE4MTkyNCAxNDUuMjI1NDg3LDE0My45NzY5MDMgQzE0MS4wMTcwMDUsMTM5Ljc3MTg4MSAxMzQuMTkzNzA3LDEzOS43NzE4ODEgMTI5Ljk4NTIyNSwxNDMuOTc2OTAzIEwxMDIuMjAxOTMsMTcxLjczNzM1MiBDMTAxLjAzMjMwNSwxNzIuOTA2MDE1IDk5LjI1NzE2MDksMTcyLjkwNjAxNSA5OC4wODc1MzU5LDE3MS43MzczNTIgTDI4LjI4NTkwOCwxMDEuOTkzMTIyIEMyNy4xMTYyODMxLDEwMC44MjQ0NTkgMjcuMTE2MjgzMSw5OS4wNTA3NzUgMjguMjg1OTA4LDk3Ljg4MjExMTggTDk4LjA4NzUzNTksMjguMTM3ODgyMyBDMTAwLjk5OTg2NCwyNS42MjcxODM2IDEwNS43NTE2NDIsMjAuNTQxODI0IDExMi43Mjk2NTIsMTkuMzUyNDQ4NyBDMTE3LjkxNTU4NSwxOC40Njg1MjYxIDEyMy41ODUyMTksMjAuNDE0MDIzOSAxMjkuNzM4NTU0LDI1LjE4ODk0MjQgQzEyNS42MjQ2NjMsMjEuMDc4NDI5MiAxMTguNTcxOTk1LDE0LjAzNDAzMDQgMTA4LjU4MDU1LDQuMDU1NzQ1OTIgQzEwMy44NjIwNDksLTAuNTM3OTg2ODQ2IDk2LjI2OTI2MTgsLTAuNTAwNzk3OTA2IDkxLjU4ODA4NjMsNC4xNzY1MjgyMyBaIiBpZD0iU2hhcGUiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMikiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTUzLjY4NTYzMywxMzUuODU0NTc5IEMxNTcuODk0MTE1LDE0MC4wNTk2IDE2NC43MTc0MTIsMTQwLjA1OTYgMTY4LjkyNTg5NCwxMzUuODU0NTc5IEwxOTUuOTU5OTc3LDEwOC44NDI3MjYgQzIwMC42NTkxODMsMTA0LjE0NzM4NCAyMDAuNjU5MTgzLDk2LjU2MzYxMzMgMTk1Ljk2MDUyNyw5MS44Njg4MTk0IEwxNjguNjkwNzc3LDY0LjcxODExNTkgQzE2NC40NzIzMzIsNjAuNTE4MDg1OCAxNTcuNjQ2ODY4LDYwLjUyNDE0MjUgMTUzLjQzNTg5NSw2NC43MzE2NTI2IEMxNDkuMjI3NDEzLDY4LjkzNjY3NCAxNDkuMjI3NDEzLDc1Ljc1NDM2MDcgMTUzLjQzNTg5NSw3OS45NTkzODIxIEwxNzEuODU0MDM1LDk4LjM2MjM3NjUgQzE3My4wMjM2Niw5OS41MzEwMzk2IDE3My4wMjM2NiwxMDEuMzA0NzI0IDE3MS44NTQwMzUsMTAyLjQ3MzM4NyBMMTUzLjY4NTYzMywxMjAuNjI2ODQ5IEMxNDkuNDc3MTUsMTI0LjgzMTg3IDE0OS40NzcxNSwxMzEuNjQ5NTU3IDE1My42ODU2MzMsMTM1Ljg1NDU3OSBaIiBpZD0iU2hhcGUiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMykiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICAgICAgPGVsbGlwc2UgaWQ9IkNvbWJpbmVkLVNoYXBlIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTQpIiBjeD0iMTAwLjUxOTMzOSIgY3k9IjEwMC40MzY2ODEiIHJ4PSIyMy42MDAxOTI2IiByeT0iMjMuNTgwNzg2Ij48L2VsbGlwc2U+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},"wEI+":function(e,t,n){"use strict";n.d(t,"a",(function(){return Lt})),n.d(t,"b",(function(){return Vt}));var r=n("wx14"),o=n("q1tI"),a=n("Pw59"),i=n("Ff2n"),c=n("rePB"),l=n("VTBJ"),s=n("KQm4"),u=n("1OyB"),f=n("vuIU"),p=n("JX7q"),d=n("Ji7U"),m=n("LK+K"),v=n("Zm9Q"),h=n("Kwbf"),b="RC_FORM_INTERNAL_HOOKS",g=function(){Object(h.a)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},y=o.createContext({getFieldValue:g,getFieldsValue:g,getFieldError:g,getFieldsError:g,isFieldsTouched:g,isFieldTouched:g,isFieldValidating:g,isFieldsValidating:g,resetFields:g,setFields:g,setFieldsValue:g,validateFields:g,submit:g,getInternalHooks:function(){return g(),{dispatch:g,initEntityValue:g,registerField:g,useSubscribe:g,setInitialValues:g,setCallbacks:g,getFields:g,setValidateMessages:g,setPreserve:g}}});function O(e){return null==e?[]:Array.isArray(e)?e:[e]}var j=n("o0o1"),C=n.n(j),E=n("HaE+"),w=n("U8pU"),x=n("KpVd");function I(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}var M=n("T5bk");function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e,t,n,r){if(!t.length)return n;var o,a=Object(M.a)(t),i=a[0],l=a.slice(1);return o=e||"number"!=typeof i?Array.isArray(e)?Object(s.a)(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){Object(c.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e):[],r&&void 0===n&&1===l.length?delete o[i][l[0]]:o[i]=S(o[i],l,n,r),o}function A(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!I(e,t.slice(0,-1))?e:S(e,t,n,r)}function k(e){return O(e)}function P(e,t){return I(e,t)}function T(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=A(e,t,n,r);return o}function D(e,t){var n={};return t.forEach((function(t){var r=P(e,t);n=T(n,t,r)})),n}function R(e,t){return e&&e.some((function(e){return K(e,t)}))}function z(e){return"object"===Object(w.a)(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function L(e,t){var n=Array.isArray(e)?Object(s.a)(e):Object(l.a)({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],o=t[e],a=z(r)&&z(o);n[e]=a?L(r,o||{}):o})),n):n}function F(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return L(e,t)}),e)}function K(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))}function V(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&e in t.target?t.target[e]:t}function U(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],a=t-n;return a>0?[].concat(Object(s.a)(e.slice(0,n)),[o],Object(s.a)(e.slice(n,t)),Object(s.a)(e.slice(t+1,r))):a<0?[].concat(Object(s.a)(e.slice(0,t)),Object(s.a)(e.slice(t+1,n+1)),[o],Object(s.a)(e.slice(n+1,r))):e}var B="'${name}' is not a valid ${type}",H={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:B,method:B,array:B,object:B,number:B,date:B,boolean:B,integer:B,float:B,regexp:B,email:B,url:B,hex:B},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Q=x.a;function W(e,t,n,r){var o=Object(l.a)(Object(l.a)({},n),{},{name:t,enum:(n.enum||[]).join(", ")}),a=function(e,t){return function(){return function(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}(e,Object(l.a)(Object(l.a)({},o),t))}};return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(o){var i=t[o];"string"==typeof i?n[o]=a(i,r):i&&"object"===Object(w.a)(i)?(n[o]={},e(i,n[o])):n[o]=i})),n}(F({},H,e))}function J(e,t,n,r,o){return G.apply(this,arguments)}function G(){return(G=Object(E.a)(C.a.mark((function e(t,n,r,a,i){var u,f,p,d,m,v;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=Object(l.a)({},r),f=null,u&&"array"===u.type&&u.defaultField&&(f=u.defaultField,delete u.defaultField),p=new Q(Object(c.a)({},t,[u])),d=W(a.validateMessages,t,u,i),p.messages(d),m=[],e.prev=7,e.next=10,Promise.resolve(p.validate(Object(c.a)({},t,n),Object(l.a)({},a)));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),e.t0.errors?m=e.t0.errors.map((function(e,t){var n=e.message;return o.isValidElement(n)?o.cloneElement(n,{key:"error_".concat(t)}):n})):(console.error(e.t0),m=[d.default()]);case 15:if(m.length||!f){e.next=20;break}return e.next=18,Promise.all(n.map((function(e,n){return J("".concat(t,".").concat(n),e,f,a,i)})));case 18:return v=e.sent,e.abrupt("return",v.reduce((function(e,t){return[].concat(Object(s.a)(e),Object(s.a)(t))}),[]));case 20:return e.abrupt("return",m);case 21:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function Z(e,t,n,r,o,a){var i,c=e.join("."),s=n.map((function(e){var t=e.validator;return t?Object(l.a)(Object(l.a)({},e),{},{validator:function(e,n,r){var o=!1,a=t(e,n,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){Object(h.a)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)}))}));o=a&&"function"==typeof a.then&&"function"==typeof a.catch,Object(h.a)(o,"`callback` is deprecated. Please return a promise instead."),o&&a.then((function(){r()})).catch((function(e){r(e||" ")}))}}):e}));if(!0===o)i=new Promise(function(){var e=Object(E.a)(C.a.mark((function e(n,o){var i,l;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i<s.length)){e.next=11;break}return e.next=4,J(c,t,s[i],r,a);case 4:if(!(l=e.sent).length){e.next=8;break}return o(l),e.abrupt("return");case 8:i+=1,e.next=1;break;case 11:n([]);case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var u=s.map((function(e){return J(c,t,e,r,a)}));i=(o?function(e){return q.apply(this,arguments)}(u):function(e){return Y.apply(this,arguments)}(u)).then((function(e){return e.length?Promise.reject(e):[]}))}return i.catch((function(e){return e})),i}function Y(){return(Y=Object(E.a)(C.a.mark((function e(t){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,Object(s.a)(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=Object(E.a)(C.a.mark((function e(t){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.length&&e(r),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e,t,n,r,o,a){return"function"==typeof e?e(t,n,"source"in a?{source:a.source}:{}):r!==o}var _=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(e){var r;(Object(u.a)(this,n),(r=t.call(this,e)).state={resetCount:0},r.cancelRegisterFunc=null,r.mounted=!1,r.touched=!1,r.dirty=!1,r.validatePromise=null,r.errors=[],r.cancelRegister=function(){var e=r.props,t=e.preserve,n=e.isListField,o=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,k(o)),r.cancelRegisterFunc=null},r.getNamePath=function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName,o=void 0===n?[]:n;return void 0!==t?[].concat(Object(s.a)(o),Object(s.a)(t)):[]},r.getRules=function(){var e=r.props,t=e.rules,n=void 0===t?[]:t,o=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(o):e}))},r.refresh=function(){r.mounted&&r.setState((function(e){return{resetCount:e.resetCount+1}}))},r.onStoreChange=function(e,t,n){var o=r.props,a=o.shouldUpdate,i=o.dependencies,c=void 0===i?[]:i,l=o.onReset,s=n.store,u=r.getNamePath(),f=r.getValue(e),p=r.getValue(s),d=t&&R(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&f!==p&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=[]),n.type){case"reset":if(!t||d)return r.touched=!1,r.dirty=!1,r.validatePromise=null,r.errors=[],l&&l(),void r.refresh();break;case"setField":if(d){var m=n.data;return"touched"in m&&(r.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(r.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(r.errors=m.errors||[]),r.dirty=!0,void r.reRender()}if(a&&!u.length&&X(a,e,s,f,p,n))return void r.reRender();break;case"dependenciesUpdate":if(c.map(k).some((function(e){return R(n.relatedFields,e)})))return void r.reRender();break;default:if(d||(!c.length||u.length||a)&&X(a,e,s,f,p,n))return void r.reRender()}!0===a&&r.reRender()},r.validateRules=function(e){var t=r.getNamePath(),n=r.getValue(),o=Promise.resolve().then((function(){if(!r.mounted)return[];var a=r.props,i=a.validateFirst,c=void 0!==i&&i,l=a.messageVariables,s=(e||{}).triggerName,u=r.getRules();s&&(u=u.filter((function(e){var t=e.validateTrigger;return!t||O(t).includes(s)})));var f=Z(t,n,u,e,c,l);return f.catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.validatePromise===o&&(r.validatePromise=null,r.errors=e,r.reRender())})),f}));return r.validatePromise=o,r.dirty=!0,r.errors=[],r.reRender(),o},r.isFieldValidating=function(){return!!r.validatePromise},r.isFieldTouched=function(){return r.touched},r.isFieldDirty=function(){return r.dirty},r.getErrors=function(){return r.errors},r.isListField=function(){return r.props.isListField},r.isList=function(){return r.props.isList},r.isPreserve=function(){return r.props.preserve},r.getMeta=function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,name:r.getNamePath()}},r.getOnlyChild=function(e){if("function"==typeof e){var t=r.getMeta();return Object(l.a)(Object(l.a)({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=Object(v.a)(e);return 1===n.length&&o.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}},r.getValue=function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return P(e||t(!0),n)},r.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.trigger,o=t.validateTrigger,a=t.getValueFromEvent,i=t.normalize,s=t.valuePropName,u=t.getValueProps,f=t.fieldContext,p=void 0!==o?o:f.validateTrigger,d=r.getNamePath(),m=f.getInternalHooks,v=f.getFieldsValue,h=m(b),g=h.dispatch,y=r.getValue(),j=u||function(e){return Object(c.a)({},s,e)},C=e[n],E=Object(l.a)(Object(l.a)({},e),j(y));E[n]=function(){var e;r.touched=!0,r.dirty=!0;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];e=a?a.apply(void 0,n):V.apply(void 0,[s].concat(n)),i&&(e=i(e,y,v(!0))),g({type:"updateValue",namePath:d,value:e}),C&&C.apply(void 0,n)};var w=O(p||[]);return w.forEach((function(e){var t=E[e];E[e]=function(){t&&t.apply(void 0,arguments);var n=r.props.rules;n&&n.length&&g({type:"validateField",namePath:d,triggerName:e})}})),E},e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(b).initEntityValue)(Object(p.a)(r));return r}return Object(f.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(b).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,r=this.getOnlyChild(n),a=r.child;return r.isFunction?e=a:o.isValidElement(a)?e=o.cloneElement(a,this.getControlled(a.props)):(Object(h.a)(!a,"`children` of Field is not validate ReactElement."),e=a),o.createElement(o.Fragment,{key:t},e)}}]),n}(o.Component);_.contextType=y,_.defaultProps={trigger:"onChange",valuePropName:"value"};var $=function(e){var t=e.name,n=Object(i.a)(e,["name"]),a=o.useContext(y),c=void 0!==t?k(t):void 0,l="keep";return n.isListField||(l="_".concat((c||[]).join("_"))),o.createElement(_,Object(r.a)({key:l,name:c},n,{fieldContext:a}))},ee=function(e){var t=e.name,n=e.initialValue,r=e.children,a=e.rules,i=e.validateTrigger,c=o.useContext(y),u=o.useRef({keys:[],id:0}).current;if("function"!=typeof r)return Object(h.a)(!1,"Form.List only accepts function as children."),null;var f=k(c.prefixName)||[],p=[].concat(Object(s.a)(f),Object(s.a)(k(t)));return o.createElement(y.Provider,{value:Object(l.a)(Object(l.a)({},c),{},{prefixName:p})},o.createElement($,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:a,validateTrigger:i,initialValue:n,isList:!0},(function(e,t){var n=e.value,o=void 0===n?[]:n,a=e.onChange,i=c.getFieldValue,l=function(){return i(p||[])||[]},f={add:function(e,t){var n=l();t>=0&&t<=n.length?(u.keys=[].concat(Object(s.a)(u.keys.slice(0,t)),[u.id],Object(s.a)(u.keys.slice(t))),a([].concat(Object(s.a)(n.slice(0,t)),[e],Object(s.a)(n.slice(t))))):(u.keys=[].concat(Object(s.a)(u.keys),[u.id]),a([].concat(Object(s.a)(n),[e]))),u.id+=1},remove:function(e){var t=l(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(u.keys=u.keys.filter((function(e,t){return!n.has(t)})),a(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=l();e<0||e>=n.length||t<0||t>=n.length||(u.keys=U(u.keys,e,t),a(U(n,e,t)))}}},d=o||[];return Array.isArray(d)||(d=[]),r(d.map((function(e,t){var n=u.keys[t];return void 0===n&&(u.keys[t]=u.id,n=u.keys[t],u.id+=1),{name:t,key:n,isListField:!0}})),f,t)})))},te=n("ODXe");var ne="__@field_split__";function re(e){return e.map((function(e){return"".concat(Object(w.a)(e),":").concat(e)})).join(ne)}var oe=function(){function e(){Object(u.a)(this,e),this.kvs=new Map}return Object(f.a)(e,[{key:"set",value:function(e,t){this.kvs.set(re(e),t)}},{key:"get",value:function(e){return this.kvs.get(re(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(re(e))}},{key:"map",value:function(e){return Object(s.a)(this.kvs.entries()).map((function(t){var n=Object(te.a)(t,2),r=n[0],o=n[1],a=r.split(ne);return e({key:a.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=Object(te.a)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o})),value:o})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}(),ae=function e(t){var n=this;Object(u.a)(this,e),this.formHooked=!1,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===b?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve}):(Object(h.a)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){n.subscribable=e},this.setInitialValues=function(e,t){n.initialValues=e||{},t&&(n.store=F({},e,n.store))},this.getInitialValue=function(e){return P(n.initialValues,e)},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.timeoutId=null,this.warningUnhooked=function(){0},this.getFieldEntities=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new oe;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=k(e);return t.get(n)||{INVALIDATE_NAME_PATH:k(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),o=[];return r.forEach((function(n){var r,a="INVALIDATE_NAME_PATH"in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var i="getMeta"in n?n.getMeta():null;t(i)&&o.push(a)}else o.push(a)})),D(n.store,o.map(k))},this.getFieldValue=function(e){n.warningUnhooked();var t=k(e);return P(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors()}:{name:k(e[n]),errors:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=k(e);return n.getFieldsError([t])[0].errors},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,a=t[0],i=t[1],c=!1;0===t.length?o=null:1===t.length?Array.isArray(a)?(o=a.map(k),c=!1):(o=null,c=a):(o=a.map(k),c=i);var l=n.getFieldEntities(!0),u=function(e){return e.isFieldTouched()};if(!o)return c?l.every(u):l.some(u);var f=new oe;o.forEach((function(e){f.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();o.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&f.update(n,(function(t){return[].concat(Object(s.a)(t),[e])}))}))}));var p=function(e){return e.some(u)},d=f.map((function(e){return e.value}));return c?d.every(p):d.some(p)},this.isFieldTouched=function(e){return n.warningUnhooked(),n.isFieldsTouched([e])},this.isFieldsValidating=function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(k);return t.some((function(e){var t=e.getNamePath();return R(r,t)&&e.isFieldValidating()}))},this.isFieldValidating=function(e){return n.warningUnhooked(),n.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new oe,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var o=t.get(r)||new Set;o.add({entity:e,value:n}),t.set(r,o)}}));var o,a=function(r){r.forEach((function(r){if(void 0!==r.props.initialValue){var o=r.getNamePath();if(void 0!==n.getInitialValue(o))Object(h.a)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var a=t.get(o);if(a&&a.size>1)Object(h.a)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(a){var i=n.getFieldValue(o);e.skipExist&&void 0!==i||(n.store=T(n.store,o,Object(s.a)(a)[0].value))}}}}))};e.entities?o=e.entities:e.namePathList?(o=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=o).push.apply(n,Object(s.a)(Object(s.a)(r).map((function(e){return e.entity}))))}))):o=r,a(o)},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.store=F({},n.initialValues),n.resetWithFieldInitialValue(),void n.notifyObservers(t,null,{type:"reset"});var r=e.map(k);r.forEach((function(e){var t=n.getInitialValue(e);n.store=T(n.store,e,t)})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"})},this.setFields=function(e){n.warningUnhooked();var t=n.store;e.forEach((function(e){var r=e.name,o=(e.errors,Object(i.a)(e,["name","errors"])),a=k(r);"value"in o&&(n.store=T(n.store,a,o.value)),n.notifyObservers(t,[a],{type:"setField",data:e})}))},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),o=Object(l.a)(Object(l.a)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===P(n.store,r)&&(n.store=T(n.store,r,t))}},this.registerField=function(e){if(n.fieldEntities.push(e),void 0!==e.props.initialValue){var t=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(t,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e}));var a=void 0!==r?r:n.preserve;if(!1===a&&(!t||o.length>1)){var i=e.getNamePath(),c=t?void 0:P(n.initialValues,i);i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every((function(e){return!K(e.getNamePath(),i)}))&&(n.store=T(n.store,i,c,!0))}}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,a=e.triggerName;n.validateFields([o],{triggerName:a})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var o=Object(l.a)(Object(l.a)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()},this.updateValue=function(e,t){var r=k(e),o=n.store;n.store=T(n.store,r,t),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"});var a=n.getDependencyChildrenFields(r);a.length&&n.validateFields(a),n.notifyObservers(o,a,{type:"dependenciesUpdate",relatedFields:[r].concat(Object(s.a)(a))});var i=n.callbacks.onValuesChange;i&&i(D(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(Object(s.a)(a)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;e&&(n.store=F(n.store,e)),n.notifyObservers(t,null,{type:"valueUpdate",source:"external"})},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],o=new oe;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=k(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var a=new oe;t.forEach((function(e){var t=e.name,n=e.errors;a.set(t,n)})),o.forEach((function(e){e.errors=a.get(e.name)||e.errors}))}r(o.filter((function(t){var n=t.name;return R(e,n)})),o)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,o=r?e.map(k):[],a=[];n.getFieldEntities(!0).forEach((function(i){if(r||o.push(i.getNamePath()),(null==t?void 0:t.recursive)&&r){var c=i.getNamePath();c.every((function(t,n){return e[n]===t||void 0===e[n]}))&&o.push(c)}if(i.props.rules&&i.props.rules.length){var s=i.getNamePath();if(!r||R(o,s)){var u=i.validateRules(Object(l.a)({validateMessages:Object(l.a)(Object(l.a)({},H),n.validateMessages)},t));a.push(u.then((function(){return{name:s,errors:[]}})).catch((function(e){return Promise.reject({name:s,errors:e})})))}}}));var i=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,a){e.forEach((function(e,i){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[i]=e,n>0||(t&&a(r),o(r))}))}))})):Promise.resolve([])}(a);n.lastValidatePromise=i,i.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var c=i.then((function(){return n.lastValidatePromise===i?Promise.resolve(n.getFieldsValue(o)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(o),errorFields:t,outOfDate:n.lastValidatePromise!==i})}));return c.catch((function(e){return e})),c},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t};var ie=function(e){var t=o.useRef(),n=o.useState({}),r=Object(te.a)(n,2)[1];if(!t.current)if(e)t.current=e;else{var a=new ae((function(){r({})}));t.current=a.getForm()}return[t.current]},ce=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),le=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,a=e.children,i=o.useContext(ce),s=o.useRef({});return o.createElement(ce.Provider,{value:Object(l.a)(Object(l.a)({},i),{},{validateMessages:Object(l.a)(Object(l.a)({},i.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),i.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:s.current}),i.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=Object(l.a)(Object(l.a)({},s.current),{},Object(c.a)({},e,t))),i.registerForm(e,t)},unregisterForm:function(e){var t=Object(l.a)({},s.current);delete t[e],s.current=t,i.unregisterForm(e)}})},a)},se=ce,ue=function(e,t){var n=e.name,a=e.initialValues,c=e.fields,u=e.form,f=e.preserve,p=e.children,d=e.component,m=void 0===d?"form":d,v=e.validateMessages,h=e.validateTrigger,g=void 0===h?"onChange":h,O=e.onValuesChange,j=e.onFieldsChange,C=e.onFinish,E=e.onFinishFailed,x=Object(i.a)(e,["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"]),I=o.useContext(se),M=ie(u),N=Object(te.a)(M,1)[0],S=N.getInternalHooks(b),A=S.useSubscribe,k=S.setInitialValues,P=S.setCallbacks,T=S.setValidateMessages,D=S.setPreserve;o.useImperativeHandle(t,(function(){return N})),o.useEffect((function(){return I.registerForm(n,N),function(){I.unregisterForm(n)}}),[I,N,n]),T(Object(l.a)(Object(l.a)({},I.validateMessages),v)),P({onValuesChange:O,onFieldsChange:function(e){if(I.triggerFormChange(n,e),j){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];j.apply(void 0,[e].concat(r))}},onFinish:function(e){I.triggerFormFinish(n,e),C&&C(e)},onFinishFailed:E}),D(f);var R=o.useRef(null);k(a,!R.current),R.current||(R.current=!0);var z=p,L="function"==typeof p;L&&(z=p(N.getFieldsValue(!0),N));A(!L);var F=o.useRef();o.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==Object(w.a)(e)||"object"!==Object(w.a)(t))return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(Object(s.a)(n),Object(s.a)(r)));return Object(s.a)(o).every((function(n){var r=e[n],o=t[n];return"function"==typeof r&&"function"==typeof o||r===o}))})(F.current||[],c||[])||N.setFields(c||[]),F.current=c}),[c,N]);var K=o.useMemo((function(){return Object(l.a)(Object(l.a)({},N),{},{validateTrigger:g})}),[N,g]),V=o.createElement(y.Provider,{value:K},z);return!1===m?V:o.createElement(m,Object(r.a)({},x,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),N.submit()},onReset:function(e){var t;e.preventDefault(),N.resetFields(),null===(t=x.onReset)||void 0===t||t.call(x,e)}}),V)},fe=o.forwardRef(ue);fe.FormProvider=le,fe.Field=$,fe.List=ee,fe.useForm=ie;var pe=n("YrtM"),de=n("uaoM"),me=n("ZvpZ"),ve=Object(r.a)({},me.a.Modal);function he(e){ve=e?Object(r.a)(Object(r.a)({},ve),e):Object(r.a)({},me.a.Modal)}var be=n("YlG9"),ge=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(e){var r;return Object(u.a)(this,n),r=t.call(this,e),he(e.locale&&e.locale.Modal),Object(de.a)("internalMark"===e._ANT_MARK__,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),r}return Object(f.a)(n,[{key:"componentDidMount",value:function(){he(this.props.locale&&this.props.locale.Modal)}},{key:"componentDidUpdate",value:function(e){var t=this.props.locale;e.locale!==t&&he(t&&t.Modal)}},{key:"componentWillUnmount",value:function(){he()}},{key:"render",value:function(){var e=this.props,t=e.locale,n=e.children;return o.createElement(be.a.Provider,{value:Object(r.a)(Object(r.a)({},t),{exist:!0})},n)}}]),n}(o.Component);ge.defaultProps={locale:{}};var ye=n("YMnH"),Oe=n("H84U"),je=n("3Nzz"),Ce=n("TSYQ"),Ee=n.n(Ce),we=n("i8i4"),xe=n.n(we),Ie=n("8XRh"),Me=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(){var e;return Object(u.a)(this,n),(e=t.apply(this,arguments)).closeTimer=null,e.close=function(t){t&&t.stopPropagation(),e.clearCloseTimer();var n=e.props,r=n.onClose,o=n.noticeKey;r&&r(o)},e.startCloseTimer=function(){e.props.duration&&(e.closeTimer=window.setTimeout((function(){e.close()}),1e3*e.props.duration))},e.clearCloseTimer=function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)},e}return Object(f.a)(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(e){this.props.duration===e.duration&&this.props.updateMark===e.updateMark||this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,i=t.closable,l=t.closeIcon,s=t.style,u=t.onClick,f=t.children,p=t.holder,d="".concat(n,"-notice"),m=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{}),v=o.createElement("div",Object(r.a)({className:Ee()(d,a,Object(c.a)({},"".concat(d,"-closable"),i)),style:s,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:u},m),o.createElement("div",{className:"".concat(d,"-content")},f),i?o.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(d,"-close")},l||o.createElement("span",{className:"".concat(d,"-close-x")})):null);return p?xe.a.createPortal(v,p):v}}]),n}(o.Component);function Ne(e){var t=o.useRef({}),n=o.useState([]),a=Object(te.a)(n,2),i=a[0],c=a[1];return[function(n){var a=!0;e.add(n,(function(e,n){var i=n.key;if(e&&(!t.current[i]||a)){var l=o.createElement(Me,Object(r.a)({},n,{holder:e}));t.current[i]=l,c((function(e){var t=e.findIndex((function(e){return e.key===n.key}));if(-1===t)return[].concat(Object(s.a)(e),[l]);var r=Object(s.a)(e);return r[t]=l,r}))}a=!1}))},o.createElement(o.Fragment,null,i)]}Me.defaultProps={onClose:function(){},duration:1.5};var Se=0,Ae=Date.now();function ke(){var e=Se;return Se+=1,"rcNotification_".concat(Ae,"_").concat(e)}var Pe=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(){var e;return Object(u.a)(this,n),(e=t.apply(this,arguments)).state={notices:[]},e.hookRefs=new Map,e.add=function(t,n){var r=t.key||ke(),o=Object(l.a)(Object(l.a)({},t),{},{key:r}),a=e.props.maxCount;e.setState((function(e){var t=e.notices,i=t.map((function(e){return e.notice.key})).indexOf(r),c=t.concat();return-1!==i?c.splice(i,1,{notice:o,holderCallback:n}):(a&&t.length>=a&&(o.key=c[0].notice.key,o.updateMark=ke(),o.userPassKey=r,c.shift()),c.push({notice:o,holderCallback:n})),{notices:c}}))},e.remove=function(t){e.setState((function(e){return{notices:e.notices.filter((function(e){var n=e.notice,r=n.key;return(n.userPassKey||r)!==t}))}}))},e.noticePropsMap={},e}return Object(f.a)(n,[{key:"getTransitionName",value:function(){var e=this.props,t=e.prefixCls,n=e.animation,r=this.props.transitionName;return!r&&n&&(r="".concat(t,"-").concat(n)),r}},{key:"render",value:function(){var e=this,t=this.state.notices,n=this.props,a=n.prefixCls,i=n.className,c=n.closeIcon,s=n.style,u=[];return t.forEach((function(n,r){var o=n.notice,i=n.holderCallback,s=r===t.length-1?o.updateMark:void 0,f=o.key,p=o.userPassKey,d=Object(l.a)(Object(l.a)(Object(l.a)({prefixCls:a,closeIcon:c},o),o.props),{},{key:f,noticeKey:p||f,updateMark:s,onClose:function(t){var n;e.remove(t),null===(n=o.onClose)||void 0===n||n.call(o)},onClick:o.onClick,children:o.content});u.push(f),e.noticePropsMap[f]={props:d,holderCallback:i}})),o.createElement("div",{className:Ee()(a,i),style:s},o.createElement(Ie.a,{keys:u,motionName:this.getTransitionName(),onVisibleChanged:function(t,n){var r=n.key;t||delete e.noticePropsMap[r]}},(function(t){var n=t.key,i=t.className,c=t.style,s=e.noticePropsMap[n],u=s.props,f=s.holderCallback;return f?o.createElement("div",{key:n,className:Ee()(i,"".concat(a,"-hook-holder")),style:Object(l.a)({},c),ref:function(t){void 0!==n&&(t?(e.hookRefs.set(n,t),f(t,u)):e.hookRefs.delete(n))}}):o.createElement(Me,Object(r.a)({},u,{className:Ee()(i,null==u?void 0:u.className),style:Object(l.a)(Object(l.a)({},c),null==u?void 0:u.style)}))})))}}]),n}(o.Component);Pe.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},Pe.newInstance=function(e,t){var n=e||{},a=n.getContainer,c=Object(i.a)(n,["getContainer"]),l=document.createElement("div");a?a().appendChild(l):document.body.appendChild(l);var s=!1;xe.a.render(o.createElement(Pe,Object(r.a)({},c,{ref:function(e){s||(s=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){xe.a.unmountComponentAtNode(l),l.parentNode&&l.parentNode.removeChild(l)},useNotification:function(){return Ne(e)}}))}})),l)};var Te=Pe,De=n("ye1Q"),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},ze=n("6VBw"),Le=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:Re}))};Le.displayName="ExclamationCircleFilled";var Fe=o.forwardRef(Le),Ke=n("jN4g"),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},Ue=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:Ve}))};Ue.displayName="CheckCircleFilled";var Be,He=o.forwardRef(Ue),Qe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},We=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:Qe}))};We.displayName="InfoCircleFilled";var Je,Ge,Ze,Ye=3,qe=1,Xe="",_e="move-up",$e=!1,et=!1;function tt(e,t){var n=e.prefixCls,r=Vt(),o=r.getPrefixCls,a=r.getRootPrefixCls,i=o("message",n||Xe),c=a(e.rootPrefixCls,i);if(Be)t({prefixCls:i,rootPrefixCls:c,instance:Be});else{var l={prefixCls:i,transitionName:$e?_e:"".concat(c,"-").concat(_e),style:{top:Je},getContainer:Ge,maxCount:Ze};Te.newInstance(l,(function(e){Be?t({prefixCls:i,rootPrefixCls:c,instance:Be}):(Be=e,t({prefixCls:i,rootPrefixCls:c,instance:e}))}))}}var nt={info:o.forwardRef(We),success:He,error:Ke.a,warning:Fe,loading:De.a};function rt(e,t){var n,r=void 0!==e.duration?e.duration:Ye,a=nt[e.type],i=Ee()("".concat(t,"-custom-content"),(n={},Object(c.a)(n,"".concat(t,"-").concat(e.type),e.type),Object(c.a)(n,"".concat(t,"-rtl"),!0===et),n));return{key:e.key,duration:r,style:e.style||{},className:e.className,content:o.createElement("div",{className:i},e.icon||a&&o.createElement(a,null),o.createElement("span",null,e.content)),onClose:e.onClose,onClick:e.onClick}}var ot,at,it={open:function(e){var t=e.key||qe++,n=new Promise((function(n){var o=function(){return"function"==typeof e.onClose&&e.onClose(),n(!0)};tt(e,(function(n){var a=n.prefixCls;n.instance.notice(rt(Object(r.a)(Object(r.a)({},e),{key:t,onClose:o}),a))}))})),o=function(){Be&&Be.removeNotice(t)};return o.then=function(e,t){return n.then(e,t)},o.promise=n,o},config:function(e){void 0!==e.top&&(Je=e.top,Be=null),void 0!==e.duration&&(Ye=e.duration),void 0!==e.prefixCls&&(Xe=e.prefixCls),void 0!==e.getContainer&&(Ge=e.getContainer),void 0!==e.transitionName&&(_e=e.transitionName,Be=null,$e=!0),void 0!==e.maxCount&&(Ze=e.maxCount,Be=null),void 0!==e.rtl&&(et=e.rtl)},destroy:function(e){if(Be)if(e){(0,Be.removeNotice)(e)}else{var t=Be.destroy;t(),Be=null}}};function ct(e,t){e[t]=function(n,o,a){return function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!!e.content}(n)?e.open(Object(r.a)(Object(r.a)({},n),{type:t})):("function"==typeof o&&(a=o,o=void 0),e.open({content:n,duration:o,type:t,onClose:a}))}}["success","info","warning","error","loading"].forEach((function(e){return ct(it,e)})),it.warn=it.warning,it.useMessage=(ot=tt,at=rt,function(){var e,t=null,n=Ne({add:function(e,n){null==t||t.component.add(e,n)}}),a=Object(te.a)(n,2),i=a[0],c=a[1],l=o.useRef({});return l.current.open=function(n){var o=n.prefixCls,a=e("message",o),c=e(),l=n.key||qe++,s=new Promise((function(e){var o=function(){return"function"==typeof n.onClose&&n.onClose(),e(!0)};ot(Object(r.a)(Object(r.a)({},n),{prefixCls:a,rootPrefixCls:c}),(function(e){var a=e.prefixCls,c=e.instance;t=c,i(at(Object(r.a)(Object(r.a)({},n),{key:l,onClose:o}),a))}))})),u=function(){t&&t.removeNotice(l)};return u.then=function(e,t){return s.then(e,t)},u.promise=s,u},["success","info","warning","error","loading"].forEach((function(e){return ct(l.current,e)})),[l.current,o.createElement(Oe.a,{key:"holder"},(function(t){return e=t.getPrefixCls,c}))]});var lt=it,st=n("4i/N"),ut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},ft=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:ut}))};ft.displayName="CheckCircleOutlined";var pt=o.forwardRef(ft),dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"},mt=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:dt}))};mt.displayName="CloseCircleOutlined";var vt=o.forwardRef(mt),ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},bt=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:ht}))};bt.displayName="ExclamationCircleOutlined";var gt=o.forwardRef(bt),yt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Ot=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:yt}))};Ot.displayName="InfoCircleOutlined";var jt,Ct,Et={},wt=4.5,xt=24,It=24,Mt="",Nt="topRight",St=!1;function At(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:It;switch(e){case"topLeft":t={left:0,top:n,bottom:"auto"};break;case"topRight":t={right:0,top:n,bottom:"auto"};break;case"bottomLeft":t={left:0,top:"auto",bottom:r};break;default:t={right:0,top:"auto",bottom:r}}return t}function kt(e,t){var n=e.placement,r=void 0===n?Nt:n,a=e.top,i=e.bottom,l=e.getContainer,s=void 0===l?jt:l,u=e.closeIcon,f=void 0===u?Ct:u,p=e.prefixCls,d=(0,Vt().getPrefixCls)("notification",p||Mt),m="".concat(d,"-").concat(r),v=Et[m];if(v)Promise.resolve(v).then((function(e){t({prefixCls:"".concat(d,"-notice"),instance:e})}));else{var h=o.createElement("span",{className:"".concat(d,"-close-x")},f||o.createElement(st.a,{className:"".concat(d,"-close-icon")})),b=Ee()("".concat(d,"-").concat(r),Object(c.a)({},"".concat(d,"-rtl"),!0===St));Et[m]=new Promise((function(e){Te.newInstance({prefixCls:d,className:b,style:At(r,a,i),getContainer:s,closeIcon:h},(function(n){e(n),t({prefixCls:"".concat(d,"-notice"),instance:n})}))}))}}var Pt={success:pt,info:o.forwardRef(Ot),error:vt,warning:gt};function Tt(e,t){var n=e.duration,r=e.icon,a=e.type,i=e.description,l=e.message,s=e.btn,u=e.onClose,f=e.onClick,p=e.key,d=e.style,m=e.className,v=void 0===n?wt:n,h=null;r?h=o.createElement("span",{className:"".concat(t,"-icon")},e.icon):a&&(h=o.createElement(Pt[a]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(a)}));var b=!i&&h?o.createElement("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:o.createElement("div",{className:h?"".concat(t,"-with-icon"):"",role:"alert"},h,o.createElement("div",{className:"".concat(t,"-message")},b,l),o.createElement("div",{className:"".concat(t,"-description")},i),s?o.createElement("span",{className:"".concat(t,"-btn")},s):null),duration:v,closable:!0,onClose:u,onClick:f,key:p,style:d||{},className:Ee()(m,Object(c.a)({},"".concat(t,"-").concat(a),!!a))}}var Dt={open:function(e){kt(e,(function(t){var n=t.prefixCls;t.instance.notice(Tt(e,n))}))},close:function(e){Object.keys(Et).forEach((function(t){return Promise.resolve(Et[t]).then((function(t){t.removeNotice(e)}))}))},config:function(e){var t=e.duration,n=e.placement,r=e.bottom,o=e.top,a=e.getContainer,i=e.closeIcon,c=e.prefixCls;void 0!==c&&(Mt=c),void 0!==t&&(wt=t),void 0!==n?Nt=n:e.rtl&&(Nt="topLeft"),void 0!==r&&(It=r),void 0!==o&&(xt=o),void 0!==a&&(jt=a),void 0!==i&&(Ct=i),void 0!==e.rtl&&(St=e.rtl)},destroy:function(){Object.keys(Et).forEach((function(e){Promise.resolve(Et[e]).then((function(e){e.destroy()})),delete Et[e]}))}};["success","info","warning","error"].forEach((function(e){Dt[e]=function(t){return Dt.open(Object(r.a)(Object(r.a)({},t),{type:e}))}})),Dt.warn=Dt.warning,Dt.useNotification=function(e,t){return function(){var n,a=null,i=Ne({add:function(e,t){null==a||a.component.add(e,t)}}),c=Object(te.a)(i,2),l=c[0],s=c[1];var u=o.useRef({});return u.current.open=function(o){var i=o.prefixCls,c=n("notification",i);e(Object(r.a)(Object(r.a)({},o),{prefixCls:c}),(function(e){var n=e.prefixCls,r=e.instance;a=r,l(t(o,n))}))},["success","info","warning","error"].forEach((function(e){u.current[e]=function(t){return u.current.open(Object(r.a)(Object(r.a)({},t),{type:e}))}})),[u.current,o.createElement(Oe.a,{key:"holder"},(function(e){return n=e.getPrefixCls,s}))]}}(kt,Tt);var Rt,zt=Dt,Lt=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"],Ft=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","form"];function Kt(){return Rt||"ant"}var Vt=function(){return{getPrefixCls:function(e,t){return t||(e?"".concat(Kt(),"-").concat(e):Kt())},getRootPrefixCls:function(e,t){return e||(Rt||(t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):Kt()))}}},Ut=function(e){var t=e.children,n=e.csp,i=e.autoInsertSpaceInButton,c=e.form,l=e.locale,s=e.componentSize,u=e.direction,f=e.space,p=e.virtual,d=e.dropdownMatchSelectWidth,m=e.legacyLocale,v=e.parentContext,h=e.iconPrefixCls,b=o.useCallback((function(t,n){var r=e.prefixCls;if(n)return n;var o=r||v.getPrefixCls("");return t?"".concat(o,"-").concat(t):o}),[v.getPrefixCls]),g=Object(r.a)(Object(r.a)({},v),{csp:n,autoInsertSpaceInButton:i,locale:l||m,direction:u,space:f,virtual:p,dropdownMatchSelectWidth:d,getPrefixCls:b});Ft.forEach((function(t){var n=e[t];n&&(g[t]=n)}));var y=Object(pe.a)((function(){return g}),g,(function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((function(n){return e[n]!==t[n]}))})),O=o.useMemo((function(){return{prefixCls:h,csp:n}}),[h]),j=t,C={};return l&&l.Form&&l.Form.defaultValidateMessages&&(C=l.Form.defaultValidateMessages),c&&c.validateMessages&&(C=Object(r.a)(Object(r.a)({},C),c.validateMessages)),Object.keys(C).length>0&&(j=o.createElement(le,{validateMessages:C},t)),l&&(j=o.createElement(ge,{locale:l,_ANT_MARK__:"internalMark"},j)),h&&(j=o.createElement(a.a.Provider,{value:O},j)),s&&(j=o.createElement(je.a,{size:s},j)),o.createElement(Oe.b.Provider,{value:y},j)},Bt=function(e){return o.useEffect((function(){e.direction&&(lt.config({rtl:"rtl"===e.direction}),zt.config({rtl:"rtl"===e.direction}))}),[e.direction]),o.createElement(ye.a,null,(function(t,n,a){return o.createElement(Oe.a,null,(function(t){return o.createElement(Ut,Object(r.a)({parentContext:t,legacyLocale:a},e))}))}))};Bt.ConfigContext=Oe.b,Bt.SizeContext=je.b,Bt.config=function(e){void 0!==e.prefixCls&&(Rt=e.prefixCls)}}}]); //# sourceMappingURL=component---src-pages-index-jsx-8935528286d1b9fe679d.js.map
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="delete_macros_online_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # </summary> # ----------------------------------------------------------------------------------- import json from six.moves.urllib.parse import quote from asposewordscloud import * from asposewordscloud.models import * from asposewordscloud.models.requests import * from asposewordscloud.models.responses import * class DeleteMacrosOnlineRequest(BaseRequestObject): """ Request model for delete_macros_online operation. Initializes a new instance. :param document The document. :param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML. :param password Password for opening an encrypted document. :param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document. :param revision_author Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions. :param revision_date_time The date and time to use for revisions. """ def __init__(self, document, load_encoding=None, password=None, dest_file_name=None, revision_author=None, revision_date_time=None): self.document = document self.load_encoding = load_encoding self.password = password self.dest_file_name = dest_file_name self.revision_author = revision_author self.revision_date_time = revision_date_time def create_http_request(self, api_client): # verify the required parameter 'document' is set if self.document is None: raise ValueError("Missing the required parameter `document` when calling `delete_macros_online`") # noqa: E501 path = '/v4.0/words/online/delete/macros' path_params = {} # path parameters collection_formats = {} if path_params: path_params = api_client.sanitize_for_serialization(path_params) path_params = api_client.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything path = path.replace( '{%s}' % k, quote(str(v), safe=api_client.configuration.safe_chars_for_path_param) ) # remove optional path parameters path = path.replace('//', '/') query_params = [] if self.load_encoding is not None: query_params.append(('loadEncoding', self.load_encoding)) # noqa: E501 if self.password is not None: query_params.append(('password', self.password)) # noqa: E501 if self.dest_file_name is not None: query_params.append(('destFileName', self.dest_file_name)) # noqa: E501 if self.revision_author is not None: query_params.append(('revisionAuthor', self.revision_author)) # noqa: E501 if self.revision_date_time is not None: query_params.append(('revisionDateTime', self.revision_date_time)) # noqa: E501 header_params = {} # HTTP header `Content-Type` header_params['Content-Type'] = api_client.select_header_content_type( # noqa: E501 ['multipart/form-data']) # noqa: E501 form_params = [] if self.document is not None: form_params.append(['document', self.document, 'file']) # noqa: E501 body_params = None return { "method": "PUT", "path": path, "query_params": query_params, "header_params": header_params, "form_params": form_params, "body": body_params, "collection_formats": collection_formats, "response_type": 'file' # noqa: E501 } def get_response_type(self): return 'file' # noqa: E501 def deserialize_response(self, api_client, response): return self.deserialize_file(response.data, response.getheaders(), api_client)
import React, {Component} from 'react'; import {Avatar, Chip, withStyles} from "@material-ui/core"; import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; import withRoot from "../withRoot"; import {blue, blueGrey, grey, red} from "@material-ui/core/colors"; import postgres from '../assets/images/psql.svg'; import rails from '../assets/images/rails.png'; const styles = theme => ({ chip: { margin: theme.spacing(0.5), }, reactAvatar: { color: blue[200], backgroundColor: grey[900] }, angularAvatar: { color: grey[50], backgroundColor: red[900] }, pythonAvatar: { color: blue[500], backgroundColor: blueGrey[200] }, railsAvatar: { color: grey[50], backgroundColor: red[900] }, postgresAvatar: { backgroundColor: blueGrey[50] }, defaultAvatar: { color: blueGrey[50], backgroundColor: blueGrey[900] } }); class Technology extends Component { technologyIcon = (technologyName, classes) => { switch (technologyName.toLowerCase()) { case 'react': return (<Avatar className={classes.reactAvatar}> <FontAwesomeIcon icon={['fab', 'react']}/> </Avatar>); case 'python': return (<Avatar className={classes.pythonAvatar}> <FontAwesomeIcon icon={['fab', 'python']}/> </Avatar>); case 'angular': return (<Avatar className={classes.angularAvatar}> <FontAwesomeIcon icon={['fab', 'angular']}/> </Avatar>); case 'postgresql': return (<Avatar className={classes.postgresAvatar} src={postgres}/>); case 'ruby on rails': return (<Avatar className={classes.railsAvatar} src={rails}/>); default: return (<Avatar className={classes.defaultAvatar}>{technologyName.toUpperCase()[0]}</Avatar>); } }; render() { const {classes} = this.props; return ( <Chip className={classes.chip} label={this.props.label} variant="outlined" avatar={this.technologyIcon(this.props.label, classes)}/> ) } } export default withRoot(withStyles(styles)(Technology));
// @flow import type { Course } from 'lib/types'; export const actionTypes = { SET_COURSES: 'dgclr/SET_COURSES', }; /** * Set courses action * @param {Array} courses * @return {Object} action of SET_COURSES */ export const setCourses = (courses: Array<Course> = []) => ({ type: actionTypes.SET_COURSES, courses, });
'use strict'; /** * DESIGN NOTES * * The design decisions behind the scope are heavily favored for speed and memory consumption. * * The typical use of scope is to watch the expressions, which most of the time return the same * value as last time so we optimize the operation. * * Closures construction is expensive in terms of speed as well as memory: * - No closures, instead use prototypical inheritance for API * - Internal state needs to be stored on scope directly, which means that private state is * exposed as $$____ properties * * Loop operations are optimized by using while(count--) { ... } * - this means that in order to keep the same order of execution as addition we have to add * items to the array at the beginning (unshift) instead of at the end (push) * * Child scopes are created and removed often * - Using an array would be slow since inserts in middle are expensive so we use linked list * * There are few watches then a lot of observers. This is why you don't want the observer to be * implemented in the same way as watch. Watch requires return of initialization function which * are expensive to construct. */ /** * @ngdoc provider * @name $rootScopeProvider * @description * * Provider for the $rootScope service. */ /** * @ngdoc method * @name $rootScopeProvider#digestTtl * @description * * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and * assuming that the model is unstable. * * The current default is 10 iterations. * * In complex applications it's possible that the dependencies between `$watch`s will result in * several digest iterations. However if an application needs more than the default 10 digest * iterations for its model to stabilize then you should investigate what is causing the model to * continuously change during the digest. * * Increasing the TTL could have performance implications, so you should not change it without * proper justification. * * @param {number} limit The number of digest iterations. */ /** * @ngdoc service * @name $rootScope * @description * * Every application has a single root {@link ng.$rootScope.Scope scope}. * All other scopes are descendant scopes of the root scope. Scopes provide separation * between the model and the view, via a mechanism for watching the model for changes. * They also provide an event emission/broadcast and subscription facility. See the * {@link guide/scope developer guide on scopes}. */ function $RootScopeProvider(){ var TTL = 10; var $rootScopeMinErr = minErr('$rootScope'); var lastDirtyWatch = null; this.digestTtl = function(value) { if (arguments.length) { TTL = value; } return TTL; }; this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser', function( $injector, $exceptionHandler, $parse, $browser) { /** * @ngdoc type * @name $rootScope.Scope * * @description * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the * {@link auto.$injector $injector}. Child scopes are created using the * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when * compiled HTML template is executed.) * * Here is a simple scope snippet to show how you can interact with the scope. * ```html * <file src="./test/ng/rootScopeSpec.js" tag="docs1" /> * ``` * * # Inheritance * A scope can inherit from a parent scope, as in this example: * ```js var parent = $rootScope; var child = parent.$new(); parent.salutation = "Hello"; child.name = "World"; expect(child.salutation).toEqual('Hello'); child.salutation = "Welcome"; expect(child.salutation).toEqual('Welcome'); expect(parent.salutation).toEqual('Hello'); * ``` * * * @param {Object.<string, function()>=} providers Map of service factory which need to be * provided for the current scope. Defaults to {@link ng}. * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should * append/override services provided by `providers`. This is handy * when unit-testing and having the need to override a default * service. * @returns {Object} Newly created scope. * */ function Scope() { this.$id = nextUid(); this.$$phase = this.$parent = this.$$watchers = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = null; this['this'] = this.$root = this; this.$$destroyed = false; this.$$asyncQueue = []; this.$$postDigestQueue = []; this.$$listeners = {}; this.$$listenerCount = {}; this.$$isolateBindings = {}; } /** * @ngdoc property * @name $rootScope.Scope#$id * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for * debugging. */ Scope.prototype = { constructor: Scope, /** * @ngdoc method * @name $rootScope.Scope#$new * @function * * @description * Creates a new child {@link ng.$rootScope.Scope scope}. * * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} and * {@link ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the * scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}. * * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is * desired for the scope and its child scopes to be permanently detached from the parent and * thus stop participating in model change detection and listener notification by invoking. * * @param {boolean} isolate If true, then the scope does not prototypically inherit from the * parent scope. The scope is isolated, as it can not see parent scope properties. * When creating widgets, it is useful for the widget to not accidentally read parent * state. * * @returns {Object} The newly created child scope. * */ $new: function(isolate) { var ChildScope, child; if (isolate) { child = new Scope(); child.$root = this.$root; // ensure that there is just one async queue per $rootScope and its children child.$$asyncQueue = this.$$asyncQueue; child.$$postDigestQueue = this.$$postDigestQueue; } else { // Only create a child scope class if somebody asks for one, // but cache it to allow the VM to optimize lookups. if (!this.$$childScopeClass) { this.$$childScopeClass = function() { this.$$watchers = this.$$nextSibling = this.$$childHead = this.$$childTail = null; this.$$listeners = {}; this.$$listenerCount = {}; this.$id = nextUid(); this.$$childScopeClass = null; }; this.$$childScopeClass.prototype = this; } child = new this.$$childScopeClass(); } child['this'] = child; child.$parent = this; child.$$prevSibling = this.$$childTail; if (this.$$childHead) { this.$$childTail.$$nextSibling = child; this.$$childTail = child; } else { this.$$childHead = this.$$childTail = child; } return child; }, /** * @ngdoc method * @name $rootScope.Scope#$watch * @function * * @description * Registers a `listener` callback to be executed whenever the `watchExpression` changes. * * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest * $digest()} and should return the value that will be watched. (Since * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the * `watchExpression` can execute multiple times per * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.) * - The `listener` is called only when the value from the current `watchExpression` and the * previous call to `watchExpression` are not equal (with the exception of the initial run, * see below). The inequality is determined according to * {@link angular.equals} function. To save the value of the object for later comparison, * the {@link angular.copy} function is used. It also means that watching complex options * will have adverse memory and performance implications. * - The watch `listener` may change the model, which may trigger other `listener`s to fire. * This is achieved by rerunning the watchers until no changes are detected. The rerun * iteration limit is 10 to prevent an infinite loop deadlock. * * * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called, * you can register a `watchExpression` function with no `listener`. (Since `watchExpression` * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a * change is detected, be prepared for multiple calls to your listener.) * * After a watcher is registered with the scope, the `listener` fn is called asynchronously * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the * watcher. In rare cases, this is undesirable because the listener is called when the result * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the * listener was called due to initialization. * * The example below contains an illustration of using a function as your $watch listener * * * # Example * ```js // let's assume that scope was dependency injected as the $rootScope var scope = $rootScope; scope.name = 'misko'; scope.counter = 0; expect(scope.counter).toEqual(0); scope.$watch('name', function(newValue, oldValue) { scope.counter = scope.counter + 1; }); expect(scope.counter).toEqual(0); scope.$digest(); // no variable change expect(scope.counter).toEqual(0); scope.name = 'adam'; scope.$digest(); expect(scope.counter).toEqual(1); // Using a listener function var food; scope.foodCounter = 0; expect(scope.foodCounter).toEqual(0); scope.$watch( // This is the listener function function() { return food; }, // This is the change handler function(newValue, oldValue) { if ( newValue !== oldValue ) { // Only increment the counter if the value changed scope.foodCounter = scope.foodCounter + 1; } } ); // No digest has been run so the counter will be zero expect(scope.foodCounter).toEqual(0); // Run the digest but since food has not changed count will still be zero scope.$digest(); expect(scope.foodCounter).toEqual(0); // Update food and run digest. Now the counter will increment food = 'cheeseburger'; scope.$digest(); expect(scope.foodCounter).toEqual(1); * ``` * * * * @param {(function()|string)} watchExpression Expression that is evaluated on each * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers * a call to the `listener`. * * - `string`: Evaluated as {@link guide/expression expression} * - `function(scope)`: called with current `scope` as a parameter. * @param {(function()|string)=} listener Callback called whenever the return value of * the `watchExpression` changes. * * - `string`: Evaluated as {@link guide/expression expression} * - `function(newValue, oldValue, scope)`: called with current and previous values as * parameters. * * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of * comparing for reference equality. * @returns {function()} Returns a deregistration function for this listener. */ $watch: function(watchExp, listener, objectEquality) { var scope = this, get = compileToFn(watchExp, 'watch'), array = scope.$$watchers, watcher = { fn: listener, last: initWatchVal, get: get, exp: watchExp, eq: !!objectEquality }; lastDirtyWatch = null; // in the case user pass string, we need to compile it, do we really need this ? if (!isFunction(listener)) { var listenFn = compileToFn(listener || noop, 'listener'); watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);}; } if (!array) { array = scope.$$watchers = []; } // we use unshift since we use a while loop in $digest for speed. // the while loop reads in reverse order. array.unshift(watcher); return function deregisterWatch() { arrayRemove(array, watcher); lastDirtyWatch = null; }; }, /** * @ngdoc method * @name $rootScope.Scope#$watchGroup * @function * * @description * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`. * If any one expression in the collection changes the `listener` is executed. * * - The items in the `watchCollection` array are observed via standard $watch operation and are examined on every * call to $digest() to see if any items changes. * - The `listener` is called whenever any expression in the `watchExpressions` array changes. * * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually * watched using {@link ng.$rootScope.Scope#$watch $watch()} * * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any * expression in `watchExpressions` changes * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching * those of `watchExpression` * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching * those of `watchExpression` * The `scope` refers to the current scope. * * @returns {function()} Returns a de-registration function for all listeners. */ $watchGroup: function(watchExpressions, listener) { var oldValues = new Array(watchExpressions.length); var newValues = new Array(watchExpressions.length); var deregisterFns = []; var changeCount = 0; var self = this; var unwatchFlags = new Array(watchExpressions.length); var unwatchCount = watchExpressions.length; forEach(watchExpressions, function (expr, i) { var exprFn = $parse(expr); deregisterFns.push(self.$watch(exprFn, function (value, oldValue) { newValues[i] = value; oldValues[i] = oldValue; changeCount++; if (unwatchFlags[i] && !exprFn.$$unwatch) unwatchCount++; if (!unwatchFlags[i] && exprFn.$$unwatch) unwatchCount--; unwatchFlags[i] = exprFn.$$unwatch; })); }, this); deregisterFns.push(self.$watch(watchGroupFn, function () { listener(newValues, oldValues, self); if (unwatchCount === 0) { watchGroupFn.$$unwatch = true; } else { watchGroupFn.$$unwatch = false; } })); return function deregisterWatchGroup() { forEach(deregisterFns, function (fn) { fn(); }); }; function watchGroupFn() {return changeCount;} }, /** * @ngdoc method * @name $rootScope.Scope#$watchCollection * @function * * @description * Shallow watches the properties of an object and fires whenever any of the properties change * (for arrays, this implies watching the array items; for object maps, this implies watching * the properties). If a change is detected, the `listener` callback is fired. * * - The `obj` collection is observed via standard $watch operation and is examined on every * call to $digest() to see if any items have been added, removed, or moved. * - The `listener` is called whenever anything within the `obj` has changed. Examples include * adding, removing, and moving items belonging to an object or array. * * * # Example * ```js $scope.names = ['igor', 'matias', 'misko', 'james']; $scope.dataCount = 4; $scope.$watchCollection('names', function(newNames, oldNames) { $scope.dataCount = newNames.length; }); expect($scope.dataCount).toEqual(4); $scope.$digest(); //still at 4 ... no changes expect($scope.dataCount).toEqual(4); $scope.names.pop(); $scope.$digest(); //now there's been a change expect($scope.dataCount).toEqual(3); * ``` * * * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The * expression value should evaluate to an object or an array which is observed on each * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the * collection will trigger a call to the `listener`. * * @param {function(newCollection, oldCollection, scope)} listener a callback function called * when a change is detected. * - The `newCollection` object is the newly modified data obtained from the `obj` expression * - The `oldCollection` object is a copy of the former collection data. * Due to performance considerations, the`oldCollection` value is computed only if the * `listener` function declares two or more arguments. * - The `scope` argument refers to the current scope. * * @returns {function()} Returns a de-registration function for this listener. When the * de-registration function is executed, the internal watch operation is terminated. */ $watchCollection: function(obj, listener) { var self = this; // the current value, updated on each dirty-check run var newValue; // a shallow copy of the newValue from the last dirty-check run, // updated to match newValue during dirty-check run var oldValue; // a shallow copy of the newValue from when the last change happened var veryOldValue; // only track veryOldValue if the listener is asking for it var trackVeryOldValue = (listener.length > 1); var changeDetected = 0; var objGetter = $parse(obj); var internalArray = []; var internalObject = {}; var initRun = true; var oldLength = 0; function $watchCollectionWatch() { newValue = objGetter(self); var newLength, key; if (!isObject(newValue)) { // if primitive if (oldValue !== newValue) { oldValue = newValue; changeDetected++; } } else if (isArrayLike(newValue)) { if (oldValue !== internalArray) { // we are transitioning from something which was not an array into array. oldValue = internalArray; oldLength = oldValue.length = 0; changeDetected++; } newLength = newValue.length; if (oldLength !== newLength) { // if lengths do not match we need to trigger change notification changeDetected++; oldValue.length = oldLength = newLength; } // copy the items to oldValue and look for changes. for (var i = 0; i < newLength; i++) { var bothNaN = (oldValue[i] !== oldValue[i]) && (newValue[i] !== newValue[i]); if (!bothNaN && (oldValue[i] !== newValue[i])) { changeDetected++; oldValue[i] = newValue[i]; } } } else { if (oldValue !== internalObject) { // we are transitioning from something which was not an object into object. oldValue = internalObject = {}; oldLength = 0; changeDetected++; } // copy the items to oldValue and look for changes. newLength = 0; for (key in newValue) { if (newValue.hasOwnProperty(key)) { newLength++; if (oldValue.hasOwnProperty(key)) { if (oldValue[key] !== newValue[key]) { changeDetected++; oldValue[key] = newValue[key]; } } else { oldLength++; oldValue[key] = newValue[key]; changeDetected++; } } } if (oldLength > newLength) { // we used to have more keys, need to find them and destroy them. changeDetected++; for(key in oldValue) { if (oldValue.hasOwnProperty(key) && !newValue.hasOwnProperty(key)) { oldLength--; delete oldValue[key]; } } } } $watchCollectionWatch.$$unwatch = objGetter.$$unwatch; return changeDetected; } function $watchCollectionAction() { if (initRun) { initRun = false; listener(newValue, newValue, self); } else { listener(newValue, veryOldValue, self); } // make a copy for the next time a collection is changed if (trackVeryOldValue) { if (!isObject(newValue)) { //primitive veryOldValue = newValue; } else if (isArrayLike(newValue)) { veryOldValue = new Array(newValue.length); for (var i = 0; i < newValue.length; i++) { veryOldValue[i] = newValue[i]; } } else { // if object veryOldValue = {}; for (var key in newValue) { if (hasOwnProperty.call(newValue, key)) { veryOldValue[key] = newValue[key]; } } } } } return this.$watch($watchCollectionWatch, $watchCollectionAction); }, /** * @ngdoc method * @name $rootScope.Scope#$digest * @function * * @description * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} * until no more listeners are firing. This means that it is possible to get into an infinite * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of * iterations exceeds 10. * * Usually, you don't call `$digest()` directly in * {@link ng.directive:ngController controllers} or in * {@link ng.$compileProvider#directive directives}. * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`. * * If you want to be notified whenever `$digest()` is called, * you can register a `watchExpression` function with * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`. * * In unit tests, you may need to call `$digest()` to simulate the scope life cycle. * * # Example * ```js var scope = ...; scope.name = 'misko'; scope.counter = 0; expect(scope.counter).toEqual(0); scope.$watch('name', function(newValue, oldValue) { scope.counter = scope.counter + 1; }); expect(scope.counter).toEqual(0); scope.$digest(); // no variable change expect(scope.counter).toEqual(0); scope.name = 'adam'; scope.$digest(); expect(scope.counter).toEqual(1); * ``` * */ $digest: function() { var watch, value, last, watchers, asyncQueue = this.$$asyncQueue, postDigestQueue = this.$$postDigestQueue, length, dirty, ttl = TTL, next, current, target = this, watchLog = [], stableWatchesCandidates = [], logIdx, logMsg, asyncTask; beginPhase('$digest'); lastDirtyWatch = null; do { // "while dirty" loop dirty = false; current = target; while(asyncQueue.length) { try { asyncTask = asyncQueue.shift(); asyncTask.scope.$eval(asyncTask.expression); } catch (e) { clearPhase(); $exceptionHandler(e); } lastDirtyWatch = null; } traverseScopesLoop: do { // "traverse the scopes" loop if ((watchers = current.$$watchers)) { // process our watches length = watchers.length; while (length--) { try { watch = watchers[length]; // Most common watches are on primitives, in which case we can short // circuit it with === operator, only when === fails do we use .equals if (watch) { if ((value = watch.get(current)) !== (last = watch.last) && !(watch.eq ? equals(value, last) : (typeof value == 'number' && typeof last == 'number' && isNaN(value) && isNaN(last)))) { dirty = true; lastDirtyWatch = watch; watch.last = watch.eq ? copy(value) : value; watch.fn(value, ((last === initWatchVal) ? value : last), current); if (ttl < 5) { logIdx = 4 - ttl; if (!watchLog[logIdx]) watchLog[logIdx] = []; logMsg = (isFunction(watch.exp)) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp; logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last); watchLog[logIdx].push(logMsg); } if (watch.get.$$unwatch) stableWatchesCandidates.push({watch: watch, array: watchers}); } else if (watch === lastDirtyWatch) { // If the most recently dirty watcher is now clean, short circuit since the remaining watchers // have already been tested. dirty = false; break traverseScopesLoop; } } } catch (e) { clearPhase(); $exceptionHandler(e); } } } // Insanity Warning: scope depth-first traversal // yes, this code is a bit crazy, but it works and we have tests to prove it! // this piece should be kept in sync with the traversal in $broadcast if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) { while(current !== target && !(next = current.$$nextSibling)) { current = current.$parent; } } } while ((current = next)); // `break traverseScopesLoop;` takes us to here if((dirty || asyncQueue.length) && !(ttl--)) { clearPhase(); throw $rootScopeMinErr('infdig', '{0} $digest() iterations reached. Aborting!\n' + 'Watchers fired in the last 5 iterations: {1}', TTL, toJson(watchLog)); } } while (dirty || asyncQueue.length); clearPhase(); while(postDigestQueue.length) { try { postDigestQueue.shift()(); } catch (e) { $exceptionHandler(e); } } for (length = stableWatchesCandidates.length - 1; length >= 0; --length) { var candidate = stableWatchesCandidates[length]; if (candidate.watch.get.$$unwatch) { arrayRemove(candidate.array, candidate.watch); } } }, /** * @ngdoc event * @name $rootScope.Scope#$destroy * @eventType broadcast on scope being destroyed * * @description * Broadcasted when a scope and its children are being destroyed. * * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to * clean up DOM bindings before an element is removed from the DOM. */ /** * @ngdoc method * @name $rootScope.Scope#$destroy * @function * * @description * Removes the current scope (and all of its children) from the parent scope. Removal implies * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer * propagate to the current scope and its children. Removal also implies that the current * scope is eligible for garbage collection. * * The `$destroy()` is usually used by directives such as * {@link ng.directive:ngRepeat ngRepeat} for managing the * unrolling of the loop. * * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope. * Application code can register a `$destroy` event handler that will give it a chance to * perform any necessary cleanup. * * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to * clean up DOM bindings before an element is removed from the DOM. */ $destroy: function() { // we can't destroy the root scope or a scope that has been already destroyed if (this.$$destroyed) return; var parent = this.$parent; this.$broadcast('$destroy'); this.$$destroyed = true; if (this === $rootScope) return; forEach(this.$$listenerCount, bind(null, decrementListenerCount, this)); // sever all the references to parent scopes (after this cleanup, the current scope should // not be retained by any of our references and should be eligible for garbage collection) if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling; if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling; if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling; if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling; // All of the code below is bogus code that works around V8's memory leak via optimized code // and inline caches. // // see: // - https://code.google.com/p/v8/issues/detail?id=2073#c26 // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909 // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451 this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = this.$root = null; // don't reset these to null in case some async task tries to register a listener/watch/task this.$$listeners = {}; this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = []; // prevent NPEs since these methods have references to properties we nulled out this.$destroy = this.$digest = this.$apply = noop; this.$on = this.$watch = this.$watchGroup = function() { return noop; }; }, /** * @ngdoc method * @name $rootScope.Scope#$eval * @function * * @description * Executes the `expression` on the current scope and returns the result. Any exceptions in * the expression are propagated (uncaught). This is useful when evaluating Angular * expressions. * * # Example * ```js var scope = ng.$rootScope.Scope(); scope.a = 1; scope.b = 2; expect(scope.$eval('a+b')).toEqual(3); expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); * ``` * * @param {(string|function())=} expression An angular expression to be executed. * * - `string`: execute using the rules as defined in {@link guide/expression expression}. * - `function(scope)`: execute the function with the current `scope` parameter. * * @param {(object)=} locals Local variables object, useful for overriding values in scope. * @returns {*} The result of evaluating the expression. */ $eval: function(expr, locals) { return $parse(expr)(this, locals); }, /** * @ngdoc method * @name $rootScope.Scope#$evalAsync * @function * * @description * Executes the expression on the current scope at a later point in time. * * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only * that: * * - it will execute after the function that scheduled the evaluation (preferably before DOM * rendering). * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after * `expression` execution. * * Any exceptions from the execution of the expression are forwarded to the * {@link ng.$exceptionHandler $exceptionHandler} service. * * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle * will be scheduled. However, it is encouraged to always call code that changes the model * from within an `$apply` call. That includes code evaluated via `$evalAsync`. * * @param {(string|function())=} expression An angular expression to be executed. * * - `string`: execute using the rules as defined in {@link guide/expression expression}. * - `function(scope)`: execute the function with the current `scope` parameter. * */ $evalAsync: function(expr) { // if we are outside of an $digest loop and this is the first time we are scheduling async // task also schedule async auto-flush if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) { $browser.defer(function() { if ($rootScope.$$asyncQueue.length) { $rootScope.$digest(); } }); } this.$$asyncQueue.push({scope: this, expression: expr}); }, $$postDigest : function(fn) { this.$$postDigestQueue.push(fn); }, /** * @ngdoc method * @name $rootScope.Scope#$apply * @function * * @description * `$apply()` is used to execute an expression in angular from outside of the angular * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries). * Because we are calling into the angular framework we need to perform proper scope life * cycle of {@link ng.$exceptionHandler exception handling}, * {@link ng.$rootScope.Scope#$digest executing watches}. * * ## Life cycle * * # Pseudo-Code of `$apply()` * ```js function $apply(expr) { try { return $eval(expr); } catch (e) { $exceptionHandler(e); } finally { $root.$digest(); } } * ``` * * * Scope's `$apply()` method transitions through the following stages: * * 1. The {@link guide/expression expression} is executed using the * {@link ng.$rootScope.Scope#$eval $eval()} method. * 2. Any exceptions from the execution of the expression are forwarded to the * {@link ng.$exceptionHandler $exceptionHandler} service. * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method. * * * @param {(string|function())=} exp An angular expression to be executed. * * - `string`: execute using the rules as defined in {@link guide/expression expression}. * - `function(scope)`: execute the function with current `scope` parameter. * * @returns {*} The result of evaluating the expression. */ $apply: function(expr) { try { beginPhase('$apply'); return this.$eval(expr); } catch (e) { $exceptionHandler(e); } finally { clearPhase(); try { $rootScope.$digest(); } catch (e) { $exceptionHandler(e); throw e; } } }, /** * @ngdoc method * @name $rootScope.Scope#$on * @function * * @description * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for * discussion of event life cycle. * * The event listener function format is: `function(event, args...)`. The `event` object * passed into the listener has the following attributes: * * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or * `$broadcast`-ed. * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the * event propagates through the scope hierarchy, this property is set to null. * - `name` - `{string}`: name of the event. * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel * further event propagation (available only for events that were `$emit`-ed). * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag * to true. * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called. * * @param {string} name Event name to listen on. * @param {function(event, ...args)} listener Function to call when the event is emitted. * @returns {function()} Returns a deregistration function for this listener. */ $on: function(name, listener) { var namedListeners = this.$$listeners[name]; if (!namedListeners) { this.$$listeners[name] = namedListeners = []; } namedListeners.push(listener); var current = this; do { if (!current.$$listenerCount[name]) { current.$$listenerCount[name] = 0; } current.$$listenerCount[name]++; } while ((current = current.$parent)); var self = this; return function() { namedListeners[indexOf(namedListeners, listener)] = null; decrementListenerCount(self, 1, name); }; }, /** * @ngdoc method * @name $rootScope.Scope#$emit * @function * * @description * Dispatches an event `name` upwards through the scope hierarchy notifying the * registered {@link ng.$rootScope.Scope#$on} listeners. * * The event life cycle starts at the scope on which `$emit` was called. All * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get * notified. Afterwards, the event traverses upwards toward the root scope and calls all * registered listeners along the way. The event will stop propagating if one of the listeners * cancels it. * * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed * onto the {@link ng.$exceptionHandler $exceptionHandler} service. * * @param {string} name Event name to emit. * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}). */ $emit: function(name, args) { var empty = [], namedListeners, scope = this, stopPropagation = false, event = { name: name, targetScope: scope, stopPropagation: function() {stopPropagation = true;}, preventDefault: function() { event.defaultPrevented = true; }, defaultPrevented: false }, listenerArgs = concat([event], arguments, 1), i, length; do { namedListeners = scope.$$listeners[name] || empty; event.currentScope = scope; for (i=0, length=namedListeners.length; i<length; i++) { // if listeners were deregistered, defragment the array if (!namedListeners[i]) { namedListeners.splice(i, 1); i--; length--; continue; } try { //allow all listeners attached to the current scope to run namedListeners[i].apply(null, listenerArgs); } catch (e) { $exceptionHandler(e); } } //if any listener on the current scope stops propagation, prevent bubbling if (stopPropagation) { event.currentScope = null; return event; } //traverse upwards scope = scope.$parent; } while (scope); event.currentScope = null; return event; }, /** * @ngdoc method * @name $rootScope.Scope#$broadcast * @function * * @description * Dispatches an event `name` downwards to all child scopes (and their children) notifying the * registered {@link ng.$rootScope.Scope#$on} listeners. * * The event life cycle starts at the scope on which `$broadcast` was called. All * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get * notified. Afterwards, the event propagates to all direct and indirect scopes of the current * scope and calls all registered listeners along the way. The event cannot be canceled. * * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed * onto the {@link ng.$exceptionHandler $exceptionHandler} service. * * @param {string} name Event name to broadcast. * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on} */ $broadcast: function(name, args) { var target = this, current = target, next = target, event = { name: name, targetScope: target, preventDefault: function() { event.defaultPrevented = true; }, defaultPrevented: false }, listenerArgs = concat([event], arguments, 1), listeners, i, length; //down while you can, then up and next sibling or up and next sibling until back at root while ((current = next)) { event.currentScope = current; listeners = current.$$listeners[name] || []; for (i=0, length = listeners.length; i<length; i++) { // if listeners were deregistered, defragment the array if (!listeners[i]) { listeners.splice(i, 1); i--; length--; continue; } try { listeners[i].apply(null, listenerArgs); } catch(e) { $exceptionHandler(e); } } // Insanity Warning: scope depth-first traversal // yes, this code is a bit crazy, but it works and we have tests to prove it! // this piece should be kept in sync with the traversal in $digest // (though it differs due to having the extra check for $$listenerCount) if (!(next = ((current.$$listenerCount[name] && current.$$childHead) || (current !== target && current.$$nextSibling)))) { while(current !== target && !(next = current.$$nextSibling)) { current = current.$parent; } } } event.currentScope = null; return event; } }; var $rootScope = new Scope(); return $rootScope; function beginPhase(phase) { if ($rootScope.$$phase) { throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase); } $rootScope.$$phase = phase; } function clearPhase() { $rootScope.$$phase = null; } function compileToFn(exp, name) { var fn = $parse(exp); assertArgFn(fn, name); return fn; } function decrementListenerCount(current, count, name) { do { current.$$listenerCount[name] -= count; if (current.$$listenerCount[name] === 0) { delete current.$$listenerCount[name]; } } while ((current = current.$parent)); } /** * function used as an initial value for watchers. * because it's unique we can easily tell it apart from other values */ function initWatchVal() {} }]; }
export default (num, nth) => (nth > 0 ? +[...`${num}`].reverse()[nth - 1] || 0 : -1);
import Animation from './Animation.js'; import './App.css'; function App() { return ( <div className="App"> <header className="App-header"> <Animation asset="https://cdn.rive.app/animations/off_road_car_blog_0_6.riv" /> <p> Edit the <code>src/Animation.js</code> Rive React component. </p> <a className="App-link" href="https://beta.rive.app" target="_blank" rel="noopener noreferrer" > Learn Rive </a> </header> </div> ); } export default App;
import { Icons } from './assets'; document.querySelectorAll('icon').forEach(toSvg); /** * Convert element to svg image * @example * ```html * <!-- USAGE --> * * <icon id="logo" width="150" height="150"></icon> * * <!-- RESULT --> * * <svg id="logo" width="150" height="150" ...>...</svg> * ``` */ function toSvg(el) { const { attributes } = el; el.innerHTML = Icons[el.getAttribute('id')]; Object.keys(attributes).forEach(attrKey => { const { name, value } = attributes[attrKey]; el.firstChild.setAttribute(name, value); }); el.firstChild.classList.add('icon'); el.outerHTML = el.innerHTML; }
from utils import CanadianScraper, CanadianPerson as Person import csv from io import StringIO COUNCIL_PAGE = 'https://www.assembly.ab.ca/txt/mla_home/contacts.csv' MEMBER_INDEX_URL = ( 'https://www.assembly.ab.ca/members/members-of-the-legislative-assembly' ) PARTIES = { 'AL': 'Alberta Liberal Party', 'AP': 'Alberta Party', 'IC': 'Independent Conservative', 'IND': 'Independent', 'FCP': 'Freedom Conservative Party', 'ND': 'Alberta New Democratic Party', 'NDP': 'Alberta New Democratic Party', 'PC': 'Progressive Conservative Association of Alberta', 'UC': 'United Conservative', 'UCP': 'United Conservative Party', 'W': 'Wildrose Alliance Party', } def get_party(abbr): """Return full party name from abbreviation""" return PARTIES[abbr] OFFICE_FIELDS = ( 'Address Type', 'Address Line1', 'Address Line2', 'City', 'Province', 'Country', 'Postal Code', 'Phone Number', 'Fax Number', ) ADDRESS_FIELDS = ( 'Address Line1', 'Address Line2', 'City', 'Province', 'Country', ) class AlbertaPersonScraper(CanadianScraper): def scrape(self): index = self.lxmlize(MEMBER_INDEX_URL) csv_text = self.get(COUNCIL_PAGE).text csv_text = '\n'.join(csv_text.split('\n')[3:]) # discard first 3 rows reader = csv.reader(StringIO(csv_text)) # make unique field names for the two sets of address fields field_names = next(reader) for name in OFFICE_FIELDS: assert(field_names.count(name) == 2) field_names[field_names.index(name)] = '{} 1'.format(name) field_names[field_names.index(name)] = '{} 2'.format(name) rows = [dict(zip(field_names, row)) for row in reader] assert len(rows), 'No members found' for mla in rows: name = '{} {} {}'.format( mla['MLA First Name'], mla['MLA Middle Names'], mla['MLA Last Name'], ) if name.strip() == '': continue party = get_party(mla['Caucus']) name_without_status = name.split(',')[0] row_xpath = '//td[normalize-space()="{}"]/..'.format( mla['Constituency Name'], ) detail_url, = index.xpath('{}//a/@href'.format(row_xpath)) photo_url, = index.xpath('{}//img/@src'.format(row_xpath)) p = Person( primary_org='legislature', name=name_without_status, district=mla['Constituency Name'], role='MLA', party=party, image=photo_url, ) p.add_source(COUNCIL_PAGE) p.add_source(detail_url) if mla['Email']: p.add_contact('email', mla['Email']) elif mla.get('MLA Email'): p.add_contact('email', mla['MLA Email']) assert(mla['Address Type 1'] == 'Legislature Office') assert(mla['Address Type 2'] == 'Constituency Office') for suffix, note in ((1, 'legislature'), (2, 'constituency')): for key, contact_type in (('Phone', 'voice'), ('Fax', 'fax')): value = mla['{} Number {}'.format(key, suffix)] if value and value != 'Pending': p.add_contact(contact_type, value, note) address = ', '.join( filter( bool, [ mla[ '{} {}'.format(field, suffix) ] for field in ADDRESS_FIELDS ] ) ) if address: p.add_contact('address', address, note) yield p
import React from 'react'; const VideoDetail = ({video}) => { if(!video){ return <div>Loading...</div> } const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col-md-8"> <div className="embed-responsive embed-responsive-16by9"> <iframe className="embed-responsive-item" src={url}></iframe> </div> <div className="details"> <div>{video.snippet.title}</div> <div>{video.snippet.description}</div> </div> </div> ) } export default VideoDetail;
import * as Sentry from '@sentry/react-native'; import {version, revAppId, revSentryDsn} from '../package.json'; function shouldEnableSentry() { return !__DEV__ && revSentryDsn; } if (shouldEnableSentry()) { Sentry.init({ dsn: revSentryDsn, release: `${revAppId}@${version}`, dist: version, }); } function captureException(ex, {section, extra, clear} = {}) { if (shouldEnableSentry()) { Sentry.captureException(ex, (scope) => { if (clear) { scope.clear(); } if (section) { scope.setTag('section', section); } if (extra) { for (const key in extra) { scope.setExtra(key, extra[key]); } } return scope; }); } } export {captureException};
from typing import Dict from frozendict import frozendict from consts import consts, resources from triggers.env_trigger import Trigger from triggers.olm_operators_trigger import OlmOperatorsTrigger _default_triggers = frozendict( { "production": Trigger( condition=("remote_service_url", consts.RemoteEnvironment.PRODUCTION), worker_disk=consts.DISK_SIZE_120GB ), "staging": Trigger( condition=("remote_service_url", consts.RemoteEnvironment.STAGING), worker_disk=consts.DISK_SIZE_120GB ), "integration": Trigger( condition=("remote_service_url", consts.RemoteEnvironment.INTEGRATION), worker_disk=consts.DISK_SIZE_120GB ), "none_platform": Trigger( ("platform", consts.Platforms.NONE), user_managed_networking=True, vip_dhcp_allocation=False ), "vsphere_platform": Trigger(("platform", consts.Platforms.VSPHERE), user_managed_networking=False), "sno": Trigger( condition=("masters_count", 1), workers_count=0, high_availability_mode=consts.HighAvailabilityMode.NONE, user_managed_networking=True, vip_dhcp_allocation=False, master_memory=resources.DEFAULT_MASTER_SNO_MEMORY, master_vcpu=resources.DEFAULT_MASTER_SNO_CPU, network_type=consts.NetworkType.OVNKubernetes, ), "ipv4": Trigger( condition=(("is_ipv4", True), ("is_ipv6", False)), cluster_networks=consts.DEFAULT_CLUSTER_NETWORKS_IPV4, service_networks=consts.DEFAULT_SERVICE_NETWORKS_IPV4, ), "ipv6": Trigger( condition=(("is_ipv4", False), ("is_ipv6", True)), cluster_networks=consts.DEFAULT_CLUSTER_NETWORKS_IPV6, service_networks=consts.DEFAULT_SERVICE_NETWORKS_IPV6, ), "ipv6_required_configurations": Trigger( condition=("is_ipv6", True), vip_dhcp_allocation=False, network_type=consts.NetworkType.OVNKubernetes ), "OVNKubernetes": Trigger( condition=("network_type", consts.NetworkType.OVNKubernetes), vip_dhcp_allocation=False, ), "dualstack": Trigger( condition=(("is_ipv4", True), ("is_ipv6", True)), cluster_networks=consts.DEFAULT_CLUSTER_NETWORKS_IPV4V6, service_networks=consts.DEFAULT_SERVICE_NETWORKS_IPV4V6, ), "ocs_operator": OlmOperatorsTrigger(condition="ocs"), "lso_operator": OlmOperatorsTrigger(condition="lso"), "cnv_operator": OlmOperatorsTrigger(condition="cnv"), "odf_operator": OlmOperatorsTrigger(condition="odf"), } ) def get_default_triggers() -> Dict[str, Trigger]: """Make _triggers read only""" return _default_triggers
export const URL = 'http://5e6753ea1937020016fed960.mockapi.io'; export const AUTH_USER = 'AUTH_USER'; export const SIGN_OUT = 'SIGN_OUT'; export const SIGN_UP = 'SIGN_UP'; export const FETCH_USERS = 'FETCH_USERS'; export const FETCH_ITEMS = 'FETCH_ITEMS'; export const FETCH_ITEMS_ERROR = 'FETCH_ITEMS_ERROR'; export const SAVE_ITEM = 'SAVE_ITEM'; export const SAVE_ITEM_ERROR = 'SAVE_ITEM_ERROR'; export const DELETE_ITEM = 'DELETE_ITEM'; export const DELETE_ITEM_ERROR = 'DELETE_ITEM_ERROR'; export const SEARCH_ITEM = 'SEARCH_ITEM'; export const SORT_ITEM = 'SORT_ITEM'; export const FETCH_ITEM_EDIT = 'FETCH_ITEM_EDIT'; export const CLEAR_ITEM_EDIT = 'CLEAR_ITEM_EDIT'; export const SHOW_MODAL = 'SHOW_MODAL'; export const HIDE_MODAL = 'HIDE_MODAL'; export const SHOW_LOADING = 'SHOW_LOADING'; export const HIDE_LOADING = 'HIDE_LOADING'; export const STATUS_CODE = { SUCCESS: 200, CREATED: 201, ERROR: 404, }; export const GOOGLE_TRANSLATE_URL = 'https://translate.google.com/?hl=vi#view=home&op=translate&sl=en&tl=vi&text=';
'use strict'; module.exports = app => { app.resources('users', '/users', app.controller.user); app.resources('posts', '/posts', app.controller.post); };
# -*- coding: utf-8 -*- """ pyvisa-py.gpib ~~~~~~~~~~~~~~ GPIB Session implementation using linux-gpib or gpib-ctypes. :copyright: 2015-2020 by PyVISA-py Authors, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ import ctypes # Used for missing bindings not ideal from bisect import bisect from pyvisa import attributes, constants, logger from .sessions import Session, UnknownAttribute try: GPIB_CTYPES = True from gpib_ctypes import gpib from gpib_ctypes.Gpib import Gpib from gpib_ctypes.gpib.gpib import _lib as gpib_lib # Add some extra binding not available by default extra_funcs = [ ("ibcac", [ctypes.c_int, ctypes.c_int], ctypes.c_int), ("ibgts", [ctypes.c_int, ctypes.c_int], ctypes.c_int), ("ibpct", [ctypes.c_int], ctypes.c_int), ] for name, argtypes, restype in extra_funcs: libfunction = gpib_lib[name] libfunction.argtypes = argtypes libfunction.restype = restype except ImportError: GPIB_CTYPES = False try: import gpib from Gpib import Gpib, GpibError except ImportError as e: Session.register_unavailable( constants.InterfaceType.gpib, "INSTR", "Please install linux-gpib (Linux) or " "gpib-ctypes (Windows, Linux) to use " "this resource type. Note that installing" " gpib-ctypes will give you access to a " "broader range of funcionality.\n%s" % e, ) raise # patch Gpib to avoid double closing of handles def _patch_Gpib(): if not hasattr(Gpib, "close"): _old_del = Gpib.__del__ def _inner(self): _old_del(self) self._own = False Gpib.__del__ = _inner Gpib.close = _inner _patch_Gpib() def _find_boards(): """Find GPIB board addresses. """ for board in range(16): try: yield board, gpib.ask(board, 1) except gpib.GpibError as e: logger.debug("GPIB board %i error in _find_boards(): %s", board, repr(e)) def _find_listeners(): """Find GPIB listeners. """ for board, boardpad in _find_boards(): for i in range(31): try: if boardpad != i and gpib.listener(board, i): yield board, i except gpib.GpibError as e: logger.debug( "GPIB board %i addr %i error in _find_listeners(): %s", board, i, repr(e), ) def _analyse_lines_value(value, line): """Determine the state of a GPIB line based on the iblines byte. """ if line == constants.VI_ATTR_GPIB_REN_STATE: # REN bit valid = 0x10, REN bit value = 0x100 validity_mask = 0x10 value_mask = 0x100 elif line == constants.VI_ATTR_GPIB_ATN_STATE: # ATN bit valid = 0x40, ATN bit value = 0x4000 validity_mask = 0x40 value_mask = 0x4000 elif line == constants.VI_ATTR_GPIB_NDAC_STATE: # NDAC bit valid = 0x2, NDAC bit value = 0x200 validity_mask = 0x2 value_mask = 0x200 elif line == constants.VI_ATTR_GPIB_SRQ_STATE: # SRQ bit valid = 0x20, SRQ bit value = 0x2000 validity_mask = 0x20 value_mask = 0x2000 if not value & validity_mask: return constants.VI_STATE_UNKNOWN, StatusCode.success else: if value & value_mask: return constants.VI_STATE_ASSERTED, StatusCode.success else: return constants.VI_STATE_UNASSERTED, StatusCode.success StatusCode = constants.StatusCode # linux-gpib timeout constants, in seconds. See GPIBSession._set_timeout. TIMETABLE = ( 0, 10e-6, 30e-6, 100e-6, 300e-6, 1e-3, 3e-3, 10e-3, 30e-3, 100e-3, 300e-3, 1.0, 3.0, 10.0, 30.0, 100.0, 300.0, 1000.0, ) def convert_gpib_error(error, status, operation): """Convert a GPIB error to a VISA StatusCode. :param error: Error to use to determine the proper status code. :type error: gpib.GpibError :param status: Status byte of the GPIB library. :type status: int :param operation: Name of the operation that caused an exception. Used in logging. :type operation: str :return: Status code matching the GPIB error. :rtype: constants.StatusCode """ # First check the imeout condition in the status byte if status & 0x4000: return constants.StatusCode.error_timeout # All other cases are hard errors. # In particular linux-gpib simply gives a string we could parse but that # feels brittle. As a consequence we only try to be smart when using # gpib-ctypes. However in both cases we log the exception at debug level. else: logger.debug("Failed to %s.", exc_info=error) if not GPIB_CTYPES: return constants.StatusCode.error_system_error if error.code == 1: return constants.StatusCode.error_not_cic elif error.code == 2: return constants.StatusCode.error_no_listeners elif error.code == 4: return constants.StatusCode.error_invalid_mode elif error.code == 11: return constants.StatusCode.error_nonsupported_operation elif error.code == 1: return constants.StatusCode.error_not_cic elif error.code == 21: return constants.StatusCode.error_resource_locked else: return constants.StatusCode.error_system_error def convert_gpib_status(status): if status & 0x4000: return constants.StatusCode.error_timeout elif status & 0x8000: return constants.StatusCode.error_system_error else: return constants.StatusCode.success class _GPIBCommon(object): """Common base class for GPIB sessions. Both INSTR and INTFC resources share the following attributes: - VI_ATTR_INTF_TYPE - VI_ATTR_TMO_VALUE - VI_ATTR_INTF_INST_NAME - VI_ATTR_INTF_NUM - VI_ATTR_DMA_ALLOW_EN - VI_ATTR_SEND_END_EN - VI_ATTR_TERMCHAR - VI_ATTR_TERM_CHAR_EN - VI_ATTR_RD_BUF_OPER_MODE - VI_ATTR_WR_BUF_OPER_MODE - VI_ATTR_FILE_APPEND_EN - VI_ATTR_GPIB_PRIMARY_ADDR - VI_ATTR_GPIB_SECONDARY_ADDR - VI_ATTR_GPIB_REN_STATE """ @classmethod def get_low_level_info(cls): try: ver = gpib.version() except AttributeError: ver = "< 4.0" return "via Linux GPIB (%s)" % ver def after_parsing(self): minor = int(self.parsed.board) sad = 0 timeout = 13 send_eoi = 1 eos_mode = 0 self.interface = None if self.parsed.resource_class == "INSTR": pad = int(self.parsed.primary_address) # Used to talk to a specific resource self.interface = Gpib( name=minor, pad=pad, sad=sad, timeout=timeout, send_eoi=send_eoi, eos_mode=eos_mode, ) # Bus wide operation self.controller = Gpib(name=minor) # Force timeout setting to interface self.set_attribute( constants.VI_ATTR_TMO_VALUE, attributes.AttributesByID[constants.VI_ATTR_TMO_VALUE].default, ) for name in ("TERMCHAR", "TERMCHAR_EN"): attribute = getattr(constants, "VI_ATTR_" + name) self.attrs[attribute] = attributes.AttributesByID[attribute].default def _get_timeout(self, attribute): if self.interface: # 0x3 is the hexadecimal reference to the IbaTMO (timeout) configuration # option in linux-gpib. gpib_timeout = self.interface.ask(3) if gpib_timeout and gpib_timeout < len(TIMETABLE): self.timeout = TIMETABLE[gpib_timeout] else: # value is 0 or out of range -> infinite self.timeout = None return super(_GPIBCommon, self)._get_timeout(attribute) def _set_timeout(self, attribute, value): """ linux-gpib only supports 18 discrete timeout values. If a timeout value other than these is requested, it will be rounded up to the closest available value. Values greater than the largest available timout value will instead be rounded down. The available timeout values are: 0 Never timeout. 1 10 microseconds 2 30 microseconds 3 100 microseconds 4 300 microseconds 5 1 millisecond 6 3 milliseconds 7 10 milliseconds 8 30 milliseconds 9 100 milliseconds 10 300 milliseconds 11 1 second 12 3 seconds 13 10 seconds 14 30 seconds 15 100 seconds 16 300 seconds 17 1000 seconds """ status = super(_GPIBCommon, self)._set_timeout(attribute, value) if self.interface: if self.timeout is None: gpib_timeout = 0 else: # round up only values that are higher by 0.1% than discrete values gpib_timeout = min(bisect(TIMETABLE, 0.999 * self.timeout), 17) self.timeout = TIMETABLE[gpib_timeout] self.interface.timeout(gpib_timeout) return status def close(self): if self.interface: self.interface.close() self.controller.close() def read(self, count): """Reads data from device or interface synchronously. Corresponds to viRead function of the VISA library. :param count: Number of bytes to be read. :return: data read, return value of the library call. :rtype: bytes, constants.StatusCode """ # INTFC don't have an interface so use the controller ifc = self.interface or self.controller # END 0x2000 checker = lambda current: ifc.ibsta() & 0x2000 reader = lambda: ifc.read(count) return self._read(reader, count, checker, False, None, False, gpib.GpibError) def write(self, data): """Writes data to device or interface synchronously. Corresponds to viWrite function of the VISA library. :param data: data to be written. :type data: bytes :return: Number of bytes actually transferred, return value of the library call. :rtype: int, VISAStatus """ logger.debug("GPIB.write %r" % data) # INTFC don't have an interface so use the controller ifc = self.interface or self.controller try: ifc.write(data) count = ifc.ibcnt() # number of bytes transmitted return count, StatusCode.success except gpib.GpibError as e: return 0, convert_gpib_error(e, ifc.ibsta(), "write") def gpib_control_ren(self, mode): """Controls the state of the GPIB Remote Enable (REN) interface line, and optionally the remote/local state of the device. Corresponds to viGpibControlREN function of the VISA library. :param session: Unique logical identifier to a session. :param mode: Specifies the state of the REN line and optionally the device remote/local state. (Constants.VI_GPIB_REN*) :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode` """ if self.parsed.interface_type == "INTFC": if mode not in ( constants.VI_GPIB_REN_ASSERT, constants.VI_GPIB_REN_DEASSERT, constants.VI_GPIB_REN_ASSERT_LLO, ): return constants.StatusCode.error_nonsupported_operation # INTFC don't have an interface so use the controller ifc = self.interface or self.controller try: if mode == constants.VI_GPIB_REN_DEASSERT_GTL: # Send GTL command byte (cf linux-gpib documentation) ifc.command(chr(1)) if mode in ( constants.VI_GPIB_REN_DEASSERT, constants.VI_GPIB_REN_DEASSERT_GTL, ): self.controller.remote_enable(0) if mode == constants.VI_GPIB_REN_ASSERT_LLO: # LLO ifc.command(b"0x11") elif mode == constants.VI_GPIB_REN_ADDRESS_GTL: # GTL ifc.command(b"0x1") elif mode == constants.VI_GPIB_REN_ASSERT_ADDRESS_LLO: pass elif mode in ( constants.VI_GPIB_REN_ASSERT, constants.VI_GPIB_REN_ASSERT_ADDRESS, ): ifc.remote_enable(1) if mode == constants.VI_GPIB_REN_ASSERT_ADDRESS: # 0 for the secondary address means don't use it ifc.listener( self.parsed.primary_address, self.parsed.secondary_address ) except GpibError as e: return convert_gpib_error(e, self.interface.ibsta(), "perform control REN") return constants.StatusCode.success def _get_attribute(self, attribute): """Get the value for a given VISA attribute for this session. Use to implement custom logic for attributes. :param attribute: Resource attribute for which the state query is made :return: The state of the queried attribute for a specified resource, return value of the library call. :rtype: (unicode | str | list | int, VISAStatus) """ # TODO implement the following attributes # - VI_ATTR_INTF_INST_NAME RO # - VI_ATTR_DMA_ALLOW_EN RW # - VI_ATTR_RD_BUF_OPER_MODE RW # - VI_ATTR_WR_BUF_OPER_MODE RW # - VI_ATTR_FILE_APPEND_EN RW # INTFC don't have an interface so use the controller ifc = self.interface or self.controller if attribute == constants.VI_ATTR_GPIB_PRIMARY_ADDR: # IbaPAD 0x1 return ifc.ask(1), StatusCode.success elif attribute == constants.VI_ATTR_GPIB_SECONDARY_ADDR: # IbaSAD 0x2 # Remove 0x60 because National Instruments. sad = ifc.ask(2) # noqa if ifc.ask(2): return ifc.ask(2) - 96, StatusCode.success else: return constants.VI_NO_SEC_ADDR, StatusCode.success elif attribute == constants.VI_ATTR_GPIB_REN_STATE: try: lines = self.controller.lines() return _analyse_lines_value(lines, attribute) except AttributeError: # some versions of linux-gpib do not expose Gpib.lines() return constants.VI_STATE_UNKNOWN, StatusCode.success elif attribute == constants.VI_ATTR_SEND_END_EN: # Do not use IbaEndBitIsNormal 0x1a which relates to EOI on read() # not write(). see issue #196 # IbcEOT 0x4 if ifc.ask(4): return constants.VI_TRUE, StatusCode.success else: return constants.VI_FALSE, StatusCode.success elif attribute == constants.VI_ATTR_INTF_NUM: # IbaBNA 0x200 return ifc.ask(512), StatusCode.success elif attribute == constants.VI_ATTR_INTF_TYPE: return constants.InterfaceType.gpib, StatusCode.success raise UnknownAttribute(attribute) def _set_attribute(self, attribute, attribute_state): """Sets the state of an attribute. Corresponds to viSetAttribute function of the VISA library. :param attribute: Attribute for which the state is to be modified. (Attributes.*) :param attribute_state: The state of the attribute to be set for the specified object. :return: return value of the library call. :rtype: VISAStatus """ # TODO implement the following attributes # - VI_ATTR_DMA_ALLOW_EN RW # - VI_ATTR_RD_BUF_OPER_MODE RW # - VI_ATTR_WR_BUF_OPER_MODE RW # - VI_ATTR_FILE_APPEND_EN RW # INTFC don't have an interface so use the controller ifc = self.interface or self.controller if attribute == constants.VI_ATTR_GPIB_READDR_EN: # IbcREADDR 0x6 # Setting has no effect in linux-gpib. if isinstance(attribute_state, int): ifc.config(6, attribute_state) return StatusCode.success else: return StatusCode.error_nonsupported_attribute_state elif attribute == constants.VI_ATTR_GPIB_PRIMARY_ADDR: # IbcPAD 0x1 if isinstance(attribute_state, int) and 0 <= attribute_state <= 30: ifc.config(1, attribute_state) return StatusCode.success else: return StatusCode.error_nonsupported_attribute_state elif attribute == constants.VI_ATTR_GPIB_SECONDARY_ADDR: # IbcSAD 0x2 # Add 0x60 because National Instruments. if isinstance(attribute_state, int) and 0 <= attribute_state <= 30: if ifc.ask(2): ifc.config(2, attribute_state + 96) return StatusCode.success else: return StatusCode.error_nonsupported_attribute else: return StatusCode.error_nonsupported_attribute_state elif attribute == constants.VI_ATTR_GPIB_UNADDR_EN: # IbcUnAddr 0x1b try: ifc.config(27, attribute_state) return StatusCode.success except gpib.GpibError: return StatusCode.error_nonsupported_attribute_state elif attribute == constants.VI_ATTR_SEND_END_EN: # Do not use IbaEndBitIsNormal 0x1a which relates to EOI on read() # not write(). see issue #196 # IbcEOT 0x4 if isinstance(attribute_state, int): ifc.config(4, attribute_state) return StatusCode.success else: return StatusCode.error_nonsupported_attribute_state raise UnknownAttribute(attribute) # TODO: Check secondary addresses. @Session.register(constants.InterfaceType.gpib, "INSTR") class GPIBSession(_GPIBCommon, Session): """A GPIB Session that uses linux-gpib to do the low level communication. """ @staticmethod def list_resources(): return ["GPIB%d::%d::INSTR" % (board, pad) for board, pad in _find_listeners()] def clear(self): """Clears a device. Corresponds to viClear function of the VISA library. :param session: Unique logical identifier to a session. :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode` """ logger.debug("GPIB.device clear") try: self.interface.clear() return StatusCode.success except gpib.GpibError as e: return convert_gpib_error(e, self.interface.ibsta(), "clear") def assert_trigger(self, protocol): """Asserts hardware trigger. Only supports protocol = constants.VI_TRIG_PROT_DEFAULT :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode` """ logger.debug("GPIB.device assert hardware trigger") try: if protocol == constants.VI_TRIG_PROT_DEFAULT: self.interface.trigger() return StatusCode.success else: return StatusCode.error_nonsupported_operation except gpib.GpibError as e: return convert_gpib_error(e, self.interface.ibsta(), "assert trigger") def read_stb(self): try: return self.interface.serial_poll(), StatusCode.success except gpib.GpibError as e: return 0, convert_gpib_error(e, self.interface.ibsta(), "read STB") def _get_attribute(self, attribute): """Get the value for a given VISA attribute for this session. Use to implement custom logic for attributes. GPIB::INSTR have the following specific attributes: - VI_ATTR_TRIG_ID - VI_ATTR_IO_PROT - VI_ATTR_SUPPRESS_END_EN - VI_ATTR_GPIB_READDR_EN - VI_ATTR_GPIB_UNADDR_EN :param attribute: Resource attribute for which the state query is made :return: The state of the queried attribute for a specified resource, return value of the library call. :rtype: (unicode | str | list | int, VISAStatus) """ # TODO implement the following attributes # - VI_ATTR_TRIG_ID RW or RO see specs # - VI_ATTR_IO_PROT RW # - VI_ATTR_SUPPRESS_END_EN RW ifc = self.interface if attribute == constants.VI_ATTR_GPIB_READDR_EN: # IbaREADDR 0x6 # Setting has no effect in linux-gpib. return ifc.ask(6), StatusCode.success elif attribute == constants.VI_ATTR_GPIB_UNADDR_EN: # IbaUnAddr 0x1b if ifc.ask(27): return constants.VI_TRUE, StatusCode.success else: return constants.VI_FALSE, StatusCode.success return super(GPIBSession, self)._get_attribute(attribute) def _set_attribute(self, attribute, attribute_state): """Sets the state of an attribute. Corresponds to viSetAttribute function of the VISA library. :param attribute: Attribute for which the state is to be modified. (Attributes.*) :param attribute_state: The state of the attribute to be set for the specified object. :return: return value of the library call. :rtype: VISAStatus """ # TODO implement the following attributes # - VI_ATTR_TRIG_ID RW or RO see specs # - VI_ATTR_IO_PROT RW # - VI_ATTR_SUPPRESS_END_EN RW ifc = self.interface if attribute == constants.VI_ATTR_GPIB_READDR_EN: # IbcREADDR 0x6 # Setting has no effect in linux-gpib. if isinstance(attribute_state, int): ifc.config(6, attribute_state) return StatusCode.success else: return StatusCode.error_nonsupported_attribute_state elif attribute == constants.VI_ATTR_GPIB_UNADDR_EN: # IbcUnAddr 0x1b try: ifc.config(27, attribute_state) return StatusCode.success except gpib.GpibError: return StatusCode.error_nonsupported_attribute_state return super(GPIBSession, self)._set_attribute(attribute, attribute_state) @Session.register(constants.InterfaceType.gpib, "INTFC") class GPIBInterface(_GPIBCommon, Session): """A GPIB Interface that uses linux-gpib to do the low level communication. """ @staticmethod def list_resources(): return ["GPIB%d::INTFC" % board for board, pad in _find_boards()] def gpib_command(self, command_bytes): """Write GPIB command byte on the bus. Corresponds to viGpibCommand function of the VISA library. See: https://linux-gpib.sourceforge.io/doc_html/gpib-protocol.html#REFERENCE-COMMAND-BYTES :param command_bytes: command bytes to send :type command_bytes: bytes :return: Number of written bytes, return value of the library call. :rtype: int, :class:`pyvisa.constants.StatusCode` """ try: return self.controller.command(command_bytes), StatusCode.success except gpib.GpibError as e: return convert_gpib_error(e, self.controller.ibsta(), "gpib command") def gpib_send_ifc(self): """Pulse the interface clear line (IFC) for at least 100 microseconds. Corresponds to viGpibSendIFC function of the VISA library. :param session: Unique logical identifier to a session. :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode` """ logger.debug("GPIB.interface clear") try: self.controller.interface_clear() return StatusCode.success except gpib.GpibError as e: return convert_gpib_error(e, self.controller.ibsta(), "send IFC") def gpib_control_atn(self, mode): """Specifies the state of the ATN line and the local active controller state. Corresponds to viGpibControlATN function of the VISA library. :param session: Unique logical identifier to a session. :param mode: Specifies the state of the ATN line and optionally the local active controller state. (Constants.VI_GPIB_ATN*) :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode` """ logger.debug("GPIB.control atn") if mode == constants.VI_GPIB_ATN_ASSERT: status = gpib_lib.ibcac(self.controller.id, 0) elif mode == constants.VI_GPIB_ATN_DEASSERT: status = gpib_lib.ibgts(self.controller.id, 0) elif mode == constants.VI_GPIB_ATN_ASSERT_IMMEDIATE: # Asynchronous assertion (the name is counter intuitive) status = gpib_lib.ibcac(self.controller.id, 1) elif mode == constants.VI_GPIB_ATN_DEASSERT_HANDSHAKE: status = gpib_lib.ibgts(self.controller.id, 1) else: return constants.StatusCode.error_invalid_mode return convert_gpib_status(status) def gpib_pass_control(self, primary_address, secondary_address): """Tell the GPIB device at the specified address to become controller in charge (CIC). Corresponds to viGpibPassControl function of the VISA library. :param session: Unique logical identifier to a session. :param primary_address: Primary address of the GPIB device to which you want to pass control. :param secondary_address: Secondary address of the targeted GPIB device. If the targeted device does not have a secondary address, this parameter should contain the value Constants.VI_NO_SEC_ADDR. :return: return value of the library call. :rtype: :class:`pyvisa.constants.StatusCode` """ # ibpct need to get the device id matching the primary and secondary address logger.debug("GPIB.pass control") try: did = gpib.dev(self.parsed.board, primary_address, secondary_address) except gpib.GpibError: logger.exception( "Failed to get id for %s, %d", primary_address, secondary_address ) return StatusCode.error_resource_not_found status = gpib_lib.ibpct(did) return convert_gpib_status(status) def _get_attribute(self, attribute): """Get the value for a given VISA attribute for this session. Use to implement custom logic for attributes. GPIB::INTFC have the following specific attributes: - VI_ATTR_DEV_STATUS_BYTE - VI_ATTR_GPIB_ATN_STATE - VI_ATTR_GPIB_NDAC_STATE - VI_ATTR_GPIB_SRQ_STATE - VI_ATTR_GPIB_CIC_STATE - VI_ATTR_GPIB_SYS_CNTRL_STATE - VI_ATTR_GPIB_HS488_CBL_LEN - VI_ATTR_GPIB_ADDR_STATE :param attribute: Resource attribute for which the state query is made :return: The state of the queried attribute for a specified resource, return value of the library call. :rtype: (unicode | str | list | int, VISAStatus) """ # TODO implement the following attributes # - VI_ATTR_DEV_STATUS_BYTE RW # - VI_ATTR_GPIB_SYS_CNTRL_STATE RW # - VI_ATTR_GPIB_HS488_CBL_LEN RO # - VI_ATTR_GPIB_ADDR_STATE RO ifc = self.controller if attribute == constants.VI_ATTR_GPIB_CIC_STATE: # ibsta CIC = 0x0020 if ifc.ibsta() & 0x0020: return constants.VI_TRUE, StatusCode.success else: return constants.VI_FALSE, StatusCode.success elif attribute in ( constants.VI_ATTR_GPIB_ATN_STATE, constants.VI_ATTR_GPIB_NDAC_STATE, constants.VI_ATTR_GPIB_SRQ_STATE, ): try: lines = ifc.lines() return _analyse_lines_value(lines, attribute) except AttributeError: # some versions of linux-gpib do not expose Gpib.lines() return constants.VI_STATE_UNKNOWN, StatusCode.success return super(GPIBSession, self)._get_attribute(attribute) def _set_attribute(self, attribute, attribute_state): """Sets the state of an attribute. Corresponds to viSetAttribute function of the VISA library. :param attribute: Attribute for which the state is to be modified. (Attributes.*) :param attribute_state: The state of the attribute to be set for the specified object. :return: return value of the library call. :rtype: VISAStatus """ # TODO implement the following attributes # - VI_ATTR_GPIB_SYS_CNTRL_STATE # - VI_ATTR_DEV_STATUS_BYTE # INTFC don't have an interface so use the controller ifc = self.controller # noqa return super(GPIBSession, self)._set_attribute(attribute, attribute_state)
/* artifact generator: C:\My\wizzi\stfnbssl\wizzi-examples\packages\wizzi-starter-mern\node_modules\wizzi-js\lib\artifacts\js\module\gen\main.js package: wizzi-js@0.7.7 primary source IttfDocument: C:\My\wizzi\stfnbssl\wizzi-examples\packages\wizzi-starter-mern\.wizzi\server\src\site\controllers\auth.js.ittf */ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthController = void 0; var _express = require("express"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var AuthController = /*#__PURE__*/function () { function AuthController() { _classCallCheck(this, AuthController); this.router = (0, _express.Router)(); } _createClass(AuthController, [{ key: "initialize", value: function initialize(initValues) { this.router.get('/auth/login', this.login); this.router.get('/auth/login2', this.login2); } }, { key: "login", value: function login(req, res) { res.render('auth/login.html.ittf', {}); } }, { key: "login2", value: function login2(req, res) { res.render('auth/login2.html.ittf', {}); } }]); return AuthController; }(); exports.AuthController = AuthController;
// Putting in ECMA to provide behavior to Help Page // This is a self-call function to show the person the soul they traded for power (function() { 'use strict'; function Helping(){ this.name = document.querySelector('#name').value; this.email = document.querySelector('#email').value; this.tel = document.querySelector('#phone').value; this.help = document.querySelector('#help').value; } var formSoulSell = document.querySelector('form'); formSoulSell.addEventListener('submit', (event) => { // Need to stop it from refreshing page and loosing information // should we falsify onclick event with button? //event.stopPropagation(); event.preventDefault(); var soul = new Helping(); document.getElementById("infoName").innerHTML = soul.name; document.getElementById("infoEmail").innerHTML = soul.email; document.getElementById("infoTel").innerHTML = soul.tel; document.getElementById("infoHelp").innerHTML = soul.help; console.log(soul); }) }())
import injectpromise from 'injectpromise'; import Validator from 'paramValidator'; export default class SideChain { constructor(sideOptions, TronWeb = false, mainchain = false, privateKey = false) { this.mainchain = mainchain; const { fullHost, fullNode, solidityNode, eventServer, mainGatewayAddress, sideGatewayAddress, sideChainId } = sideOptions; this.sidechain = new TronWeb(fullHost || fullNode, fullHost || solidityNode, fullHost || eventServer, privateKey); this.isAddress = this.mainchain.isAddress; this.utils = this.mainchain.utils; this.setMainGatewayAddress(mainGatewayAddress); this.setSideGatewayAddress(sideGatewayAddress); this.setChainId(sideChainId); this.injectPromise = injectpromise(this); this.validator = new Validator(this.sidechain); const self = this; this.sidechain.trx.sign = (...args) => { return self.sign(...args); }; this.sidechain.trx.multiSign = (...args) => { return self.multiSign(...args); }; } setMainGatewayAddress(mainGatewayAddress) { if (!this.isAddress(mainGatewayAddress)) throw new Error('Invalid main gateway address provided'); this.mainGatewayAddress = mainGatewayAddress; } setSideGatewayAddress(sideGatewayAddress) { if (!this.isAddress(sideGatewayAddress)) throw new Error('Invalid side gateway address provided'); this.sideGatewayAddress = sideGatewayAddress; } setChainId(sideChainId) { if (!this.utils.isString(sideChainId) || !sideChainId) throw new Error('Invalid side chainId provided'); this.chainId = sideChainId; } signTransaction(priKeyBytes, transaction) { if (typeof priKeyBytes === 'string') { priKeyBytes = this.utils.code.hexStr2byteArray(priKeyBytes); } let chainIdByteArr = this.utils.code.hexStr2byteArray(this.chainId); let byteArr = this.utils.code.hexStr2byteArray(transaction.txID).concat(chainIdByteArr); let byteArrHash = this.sidechain.utils.ethersUtils.sha256(byteArr); const signature = this.utils.crypto.ECKeySign(this.utils.code.hexStr2byteArray(byteArrHash.replace(/^0x/, '')), priKeyBytes); if (Array.isArray(transaction.signature)) { if (!transaction.signature.includes(signature)) transaction.signature.push(signature); } else transaction.signature = [signature]; return transaction; } async multiSign(transaction = false, privateKey = this.sidechain.defaultPrivateKey, permissionId = false, callback = false) { if (this.utils.isFunction(permissionId)) { callback = permissionId; permissionId = 0; } if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; permissionId = 0; } if (!callback) return this.injectPromise(this.multiSign, transaction, privateKey, permissionId); if (!this.utils.isObject(transaction) || !transaction.raw_data || !transaction.raw_data.contract) return callback('Invalid transaction provided'); if (!transaction.raw_data.contract[0].Permission_id && permissionId > 0) { // set permission id transaction.raw_data.contract[0].Permission_id = permissionId; // check if private key insides permission list const address = this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(privateKey)).toLowerCase(); const signWeight = await this.sidechain.trx.getSignWeight(transaction, permissionId); if (signWeight.result.code === 'PERMISSION_ERROR') { return callback(signWeight.result.message); } let foundKey = false; signWeight.permission.keys.map(key => { if (key.address === address) foundKey = true; }); if (!foundKey) return callback(privateKey + ' has no permission to sign'); if (signWeight.approved_list && signWeight.approved_list.indexOf(address) != -1) { return callback(privateKey + ' already sign transaction'); } // reset transaction if (signWeight.transaction && signWeight.transaction.transaction) { transaction = signWeight.transaction.transaction; transaction.raw_data.contract[0].Permission_id = permissionId; } else { return callback('Invalid transaction provided'); } } // sign try { return callback(null, this.signTransaction(privateKey, transaction)); } catch (ex) { callback(ex); } } async sign(transaction = false, privateKey = this.sidechain.defaultPrivateKey, useTronHeader = true, multisig = false, callback = false) { if (this.utils.isFunction(multisig)) { callback = multisig; multisig = false; } if (this.utils.isFunction(useTronHeader)) { callback = useTronHeader; useTronHeader = true; multisig = false; } if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.sidechain.defaultPrivateKey; useTronHeader = true; multisig = false; } if (!callback) return this.injectPromise(this.sign, transaction, privateKey, useTronHeader, multisig); // Message signing if (this.utils.isString(transaction)) { if (!this.utils.isHex(transaction)) return callback('Expected hex message input'); try { const signatureHex = this.sidechain.trx.signString(transaction, privateKey, useTronHeader); return callback(null, signatureHex); } catch (ex) { callback(ex); } } if (!this.utils.isObject(transaction)) return callback('Invalid transaction provided'); if (!multisig && transaction.signature) return callback('Transaction is already signed'); try { if (!multisig) { const address = this.sidechain.address.toHex( this.sidechain.address.fromPrivateKey(privateKey) ).toLowerCase(); if (address !== this.sidechain.address.toHex(transaction.raw_data.contract[0].parameter.value.owner_address)) return callback('Private key does not match address in transaction'); } return callback(null, this.signTransaction(privateKey, transaction) ); } catch (ex) { callback(ex); } } /** * deposit asset to sidechain */ async depositTrx( callValue, depositFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.depositTrx, callValue, depositFee, feeLimit, options, privateKey); } if (this.validator.notValid([ { name: 'callValue', type: 'integer', value: callValue, gte: 0 }, { name: 'depositFee', type: 'integer', value: depositFee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 } ], callback)) { return; } options = { callValue: Number(callValue) + Number(depositFee), feeLimit, ...options }; try { const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); const result = await contractInstance.depositTRX().send(options, privateKey); return callback(null, result); } catch (ex) { return callback(ex); } } async depositTrc10( tokenId, tokenValue, depositFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.depositTrc10, tokenId, tokenValue, depositFee, feeLimit, options, privateKey); } if (this.validator.notValid([ { name: 'tokenValue', type: 'integer', value: tokenValue, gte: 0 }, { name: 'depositFee', type: 'integer', value: depositFee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 }, { name: 'tokenId', type: 'integer', value: tokenId, gte: 0 } ], callback)) { return; } options = { tokenId, tokenValue, feeLimit, ...options, callValue: depositFee }; try { const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); const result = await contractInstance.depositTRC10(tokenId, tokenValue).send(options, privateKey); callback(null, result); } catch (ex) { return callback(ex); } } async depositTrc( functionSelector, num, fee, feeLimit, contractAddress, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.depositTrc, functionSelector, num, fee, feeLimit, contractAddress, options, privateKey); } if (this.validator.notValid([ { name: 'functionSelector', type: 'not-empty-string', value: functionSelector }, { name: 'num', type: 'integer', value: num, gte: 0 }, { name: 'fee', type: 'integer', value: fee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 }, { name: 'contractAddress', type: 'address', value: contractAddress } ], callback)) { return; } options = { feeLimit, ...options, callValue: fee, tokenId: '', tokenValue: 0 }; try { let result = null; if (functionSelector === 'approve') { const approveInstance = await this.mainchain.contract().at(contractAddress); result = await approveInstance.approve(this.mainGatewayAddress, num).send(options, privateKey); } else { const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); switch (functionSelector) { case 'depositTRC20': result = await contractInstance.depositTRC20(contractAddress, num).send(options, privateKey); break; case 'depositTRC721': result = await contractInstance.depositTRC721(contractAddress, num).send(options, privateKey); break; case 'retryDeposit': result = await contractInstance.retryDeposit(num).send(options, privateKey); break; case 'retryMapping': result = await contractInstance.retryMapping(num).send(options, privateKey); break; default: break; } } callback(null, result); } catch (ex) { return callback(ex); } } async approveTrc20( num, feeLimit, contractAddress, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'approve'; return this.depositTrc( functionSelector, num, 0, feeLimit, contractAddress, options, privateKey, callback ); } async approveTrc721( id, feeLimit, contractAddress, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'approve'; return this.depositTrc( functionSelector, id, 0, feeLimit, contractAddress, options, privateKey, callback ); } async depositTrc20( num, depositFee, feeLimit, contractAddress, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'depositTRC20'; return this.depositTrc( functionSelector, num, depositFee, feeLimit, contractAddress, options, privateKey, callback ); } async depositTrc721( id, depositFee, feeLimit, contractAddress, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'depositTRC721'; return this.depositTrc( functionSelector, id, depositFee, feeLimit, contractAddress, options, privateKey, callback ); } /** * mapping asset TRC20 or TRC721 to DAppChain */ async mappingTrc( trxHash, mappingFee, feeLimit, functionSelector, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.mappingTrc, trxHash, mappingFee, feeLimit, functionSelector, options, privateKey); } if (this.validator.notValid([ { name: 'trxHash', type: 'not-empty-string', value: trxHash }, { name: 'mappingFee', type: 'integer', value: mappingFee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 } ], callback)) { return; } trxHash = trxHash.startsWith('0x') ? trxHash : ('0x' + trxHash); options = { feeLimit, ...options, callValue: mappingFee }; try { const contractInstance = await this.mainchain.contract().at(this.mainGatewayAddress); let result = null; if (functionSelector === 'mappingTRC20') { result = await contractInstance.mappingTRC20(trxHash).send(options, privateKey); } else if (functionSelector === 'mappingTRC721') { result = await contractInstance.mappingTRC721(trxHash).send(options, privateKey); } else { callback(new Error('type must be trc20 or trc721')); } callback(null, result); } catch (ex) { return callback(ex); } } async mappingTrc20( trxHash, mappingFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'mappingTRC20'; return this.mappingTrc( trxHash, mappingFee, feeLimit, functionSelector, options, privateKey, callback); } async mappingTrc721( trxHash, mappingFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'mappingTRC721'; return this.mappingTrc( trxHash, mappingFee, feeLimit, functionSelector, options, privateKey, callback); } /** * withdraw trx from sidechain to mainchain */ async withdrawTrx( callValue, withdrawFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.withdrawTrx, callValue, withdrawFee, feeLimit, options, privateKey); } if (this.validator.notValid([ { name: 'callValue', type: 'integer', value: callValue, gte: 0 }, { name: 'withdrawFee', type: 'integer', value: withdrawFee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 } ], callback)) { return; } options = { callValue: Number(callValue) + Number(withdrawFee), feeLimit, ...options }; try { const contractInstance = await this.sidechain.contract().at(this.sideGatewayAddress); const result = await contractInstance.withdrawTRX().send(options, privateKey); return callback(null, result); } catch (ex) { return callback(ex); } } async withdrawTrc10( tokenId, tokenValue, withdrawFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.withdrawTrc10, tokenId, tokenValue, withdrawFee, feeLimit, options, privateKey); } if (this.validator.notValid([ { name: 'tokenId', type: 'integer', value: tokenId, gte: 0 }, { name: 'tokenValue', type: 'integer', value: tokenValue, gte: 0 }, { name: 'withdrawFee', type: 'integer', value: withdrawFee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 } ], callback)) { return; } options = { tokenValue, tokenId, callValue: withdrawFee, feeLimit, ...options }; try { const contractInstance = await this.sidechain.contract().at(this.sideGatewayAddress); const result = await contractInstance.withdrawTRC10(tokenId, tokenValue).send(options, privateKey); return callback(null, result); } catch (ex) { return callback(ex); } } async withdrawTrc( functionSelector, numOrId, withdrawFee, feeLimit, contractAddress, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.withdrawTrc, functionSelector, numOrId, withdrawFee, feeLimit, contractAddress, options, privateKey); } if (this.validator.notValid([ { name: 'functionSelector', type: 'not-empty-string', value: functionSelector }, { name: 'numOrId', type: 'integer', value: numOrId, gte: 0 }, { name: 'withdrawFee', type: 'integer', value: withdrawFee, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 }, { name: 'contractAddress', type: 'address', value: contractAddress } ], callback)) { return; } options = { feeLimit, ...options, callValue: withdrawFee }; const parameters = [ { type: 'uint256', value: numOrId } ]; try { const address = privateKey ? this.sidechain.address.fromPrivateKey(privateKey) : this.sidechain.defaultAddress.base58; const transaction = await this.sidechain.transactionBuilder.triggerSmartContract( contractAddress, functionSelector, options, parameters, this.sidechain.address.toHex(address) ); if (!transaction.result || !transaction.result.result) { return callback('Unknown error: ' + JSON.stringify(transaction.transaction, null, 2)); } const signedTransaction = await this.sidechain.trx.sign(transaction.transaction, privateKey); if (!signedTransaction.signature) { if (!privateKey) return callback('Transaction was not signed properly'); return callback('Invalid private key provided'); } const broadcast = await this.sidechain.trx.sendRawTransaction(signedTransaction); if (broadcast.code) { const err = { error: broadcast.code, message: broadcast.code }; if (broadcast.message) err.message = this.sidechain.toUtf8(broadcast.message); return callback(err) } if (!options.shouldPollResponse) return callback(null, signedTransaction.txID); const checkResult = async (index = 0) => { if (index == 20) { return callback({ error: 'Cannot find result in solidity node', transaction: signedTransaction }); } const output = await this.sidechain.trx.getTransactionInfo(signedTransaction.txID); if (!Object.keys(output).length) { return setTimeout(() => { checkResult(index + 1); }, 3000); } if (output.result && output.result == 'FAILED') { return callback({ error: this.sidechain.toUtf8(output.resMessage), transaction: signedTransaction, output }); } if (!this.utils.hasProperty(output, 'contractResult')) { return callback({ error: 'Failed to execute: ' + JSON.stringify(output, null, 2), transaction: signedTransaction, output }); } if (options.rawResponse) return callback(null, output); let decoded = decodeOutput(this.outputs, '0x' + output.contractResult[0]); if (decoded.length === 1) decoded = decoded[0]; return callback(null, decoded); } checkResult(); } catch (ex) { return callback(ex); } } async withdrawTrc20( num, withdrawFee, feeLimit, contractAddress, options, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'withdrawal(uint256)'; return this.withdrawTrc( functionSelector, num, withdrawFee, feeLimit, contractAddress, options, privateKey, callback); } async withdrawTrc721( id, withdrawFee, feeLimit, contractAddress, options, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'withdrawal(uint256)'; return this.withdrawTrc( functionSelector, id, withdrawFee, feeLimit, contractAddress, options, privateKey, callback); } async injectFund( num, feeLimit, options, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { if (this.utils.isFunction(privateKey)) { callback = privateKey; privateKey = this.mainchain.defaultPrivateKey; } if (this.utils.isFunction(options)) { callback = options; options = {}; } if (!callback) { return this.injectPromise(this.injectFund, num, feeLimit, options, privateKey); } if (this.validator.notValid([ { name: 'num', type: 'integer', value: num, gte: 0 }, { name: 'feeLimit', type: 'integer', value: feeLimit, gte: 0 } ], callback)) { return; } try { const address = this.sidechain.address.fromPrivateKey(privateKey); const hexAddress = this.sidechain.address.toHex(address); const transaction = await this.sidechain.fullNode.request('/wallet/fundinject', { owner_address: hexAddress, amount: num }, 'post'); const signedTransaction = await this.sidechain.trx.sign(transaction, privateKey); if (!signedTransaction.signature) { if (!privateKey) return callback('Transaction was not signed properly'); return callback('Invalid private key provided'); } const broadcast = await this.sidechain.trx.sendRawTransaction(signedTransaction); if (broadcast.code) { const err = { error: broadcast.code, message: broadcast.code }; if (broadcast.message) err.message = this.mainchain.toUtf8(broadcast.message); return callback(err) } return callback(null, signedTransaction.txID); } catch (ex) { return callback(ex); } } async retryWithdraw( nonce, retryWithdrawFee, feeLimit, options = {}, privateKey = this.sidechain.defaultPrivateKey, callback = false ) { const functionSelector = 'retryWithdraw(uint256)'; return this.withdrawTrc( functionSelector, nonce, retryWithdrawFee, feeLimit, this.sideGatewayAddress, options, privateKey, callback ); } async retryDeposit( nonce, retryDepositFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'retryDeposit'; return this.depositTrc( functionSelector, nonce, retryDepositFee, feeLimit, this.mainGatewayAddress, options, privateKey, callback ); } async retryMapping( nonce, retryMappingFee, feeLimit, options = {}, privateKey = this.mainchain.defaultPrivateKey, callback = false ) { const functionSelector = 'retryMapping'; return this.depositTrc( functionSelector, nonce, retryMappingFee, feeLimit, this.mainGatewayAddress, options, privateKey, callback ); } }
import { observable, computed, transaction, autorun, extendObservable, action, isObservableObject, observe, isObservable, isObservableProp, isComputedProp, spy, isAction, configure } from "../../../src/v5/mobx.ts" import * as mobx from "../../../src/v5/mobx.ts" test("babel", function() { class Box { @observable uninitialized @observable height = 20 @observable sizes = [2] @observable someFunc = function() { return 2 } @computed get width() { return this.height * this.sizes.length * this.someFunc() * (this.uninitialized ? 2 : 1) } @action addSize() { this.sizes.push(3) this.sizes.push(4) } } const box = new Box() const ar = [] autorun(() => { ar.push(box.width) }) let s = ar.slice() expect(s).toEqual([40]) box.height = 10 s = ar.slice() expect(s).toEqual([40, 20]) box.sizes.push(3, 4) s = ar.slice() expect(s).toEqual([40, 20, 60]) box.someFunc = () => 7 s = ar.slice() expect(s).toEqual([40, 20, 60, 210]) box.uninitialized = true s = ar.slice() expect(s).toEqual([40, 20, 60, 210, 420]) box.addSize() s = ar.slice() expect(s).toEqual([40, 20, 60, 210, 420, 700]) }) test("should not be possible to use @action with getters", () => { expect(() => { class A { @action get Test() {} } A // just to avoid the linter warning }).toThrowError(/@action cannot be used with getters/) mobx._resetGlobalState() }) test("babel: parameterized computed decorator", () => { class TestClass { @observable x = 3 @observable y = 3 @computed.struct get boxedSum() { return { sum: Math.round(this.x) + Math.round(this.y) } } } const t1 = new TestClass() const changes = [] const d = autorun(() => changes.push(t1.boxedSum)) t1.y = 4 // change expect(changes.length).toBe(2) t1.y = 4.2 // no change expect(changes.length).toBe(2) transaction(() => { t1.y = 3 t1.x = 4 }) // no change expect(changes.length).toBe(2) t1.x = 6 // change expect(changes.length).toBe(3) d() expect(changes).toEqual([{ sum: 6 }, { sum: 7 }, { sum: 9 }]) }) test("computed value should be the same around changing which was considered equivalent", () => { class TestClass { @observable c = null defaultCollection = [] @computed.struct get collection() { return this.c || this.defaultCollection } } const t1 = new TestClass() const d = autorun(() => t1.collection) const oldCollection = t1.collection t1.c = [] const newCollection = t1.collection expect(oldCollection).toBe(newCollection) d() }) class Order { @observable price = 3 @observable amount = 2 @observable orders = [] @observable aFunction = function() {} @computed get total() { return this.amount * this.price * (1 + this.orders.length) } } test("decorators", function() { const o = new Order() expect(isObservableObject(o)).toBe(true) expect(isObservableProp(o, "amount")).toBe(true) expect(o.total).toBe(6) // .... this is required to initialize the props which are made reactive lazily... expect(isObservableProp(o, "total")).toBe(true) const events = [] const d1 = observe(o, ev => events.push(ev.name, ev.oldValue)) const d2 = observe(o, "price", ev => events.push(ev.newValue, ev.oldValue)) const d3 = observe(o, "total", ev => events.push(ev.newValue, ev.oldValue)) o.price = 4 d1() d2() d3() o.price = 5 expect(events).toEqual([ 8, // new total 6, // old total 4, // new price 3, // old price "price", // event name 3 // event oldValue ]) }) test("issue 191 - shared initializers (babel)", function() { class Test { @observable obj = { a: 1 } @observable array = [2] } const t1 = new Test() t1.obj.a = 2 t1.array.push(3) const t2 = new Test() t2.obj.a = 3 t2.array.push(4) expect(t1.obj).not.toBe(t2.obj) expect(t1.array).not.toBe(t2.array) expect(t1.obj.a).toBe(2) expect(t2.obj.a).toBe(3) expect(t1.array.slice()).toEqual([2, 3]) expect(t2.array.slice()).toEqual([2, 4]) }) test("705 - setter undoing caching (babel)", () => { let recomputes = 0 let autoruns = 0 class Person { @observable name @observable title set fullName(val) { // Noop } @computed get fullName() { recomputes++ return this.title + " " + this.name } } let p1 = new Person() p1.name = "Tom Tank" p1.title = "Mr." expect(recomputes).toBe(0) expect(autoruns).toBe(0) const d1 = autorun(() => { autoruns++ p1.fullName }) const d2 = autorun(() => { autoruns++ p1.fullName }) expect(recomputes).toBe(1) expect(autoruns).toBe(2) p1.title = "Master" expect(recomputes).toBe(2) expect(autoruns).toBe(4) d1() d2() }) function normalizeSpyEvents(events) { events.forEach(ev => { delete ev.fn delete ev.time }) return events } test("action decorator (babel)", function() { class Store { constructor(multiplier) { this.multiplier = multiplier } @action add(a, b) { return (a + b) * this.multiplier } } const store1 = new Store(2) const store2 = new Store(3) const events = [] const d = spy(events.push.bind(events)) expect(store1.add(3, 4)).toBe(14) expect(store2.add(3, 4)).toBe(21) expect(store1.add(1, 1)).toBe(4) expect(normalizeSpyEvents(events)).toEqual([ { arguments: [3, 4], name: "add", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true }, { arguments: [3, 4], name: "add", spyReportStart: true, object: store2, type: "action" }, { spyReportEnd: true }, { arguments: [1, 1], name: "add", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true } ]) d() }) test("custom action decorator (babel)", function() { class Store { constructor(multiplier) { this.multiplier = multiplier } @action("zoem zoem") add(a, b) { return (a + b) * this.multiplier } } const store1 = new Store(2) const store2 = new Store(3) const events = [] const d = spy(events.push.bind(events)) expect(store1.add(3, 4)).toBe(14) expect(store2.add(3, 4)).toBe(21) expect(store1.add(1, 1)).toBe(4) expect(normalizeSpyEvents(events)).toEqual([ { arguments: [3, 4], name: "zoem zoem", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true }, { arguments: [3, 4], name: "zoem zoem", spyReportStart: true, object: store2, type: "action" }, { spyReportEnd: true }, { arguments: [1, 1], name: "zoem zoem", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true } ]) d() }) test("action decorator on field (babel)", function() { class Store { constructor(multiplier) { this.multiplier = multiplier } @action add = (a, b) => { return (a + b) * this.multiplier } } const store1 = new Store(2) const store2 = new Store(7) const events = [] const d = spy(events.push.bind(events)) expect(store1.add(3, 4)).toBe(14) expect(store2.add(5, 4)).toBe(63) expect(store1.add(2, 2)).toBe(8) expect(normalizeSpyEvents(events)).toEqual([ { arguments: [3, 4], name: "add", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true }, { arguments: [5, 4], name: "add", spyReportStart: true, object: store2, type: "action" }, { spyReportEnd: true }, { arguments: [2, 2], name: "add", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true } ]) d() }) test("custom action decorator on field (babel)", function() { class Store { constructor(multiplier) { this.multiplier = multiplier } @action("zoem zoem") add = (a, b) => { return (a + b) * this.multiplier } } const store1 = new Store(2) const store2 = new Store(7) const events = [] const d = spy(events.push.bind(events)) expect(store1.add(3, 4)).toBe(14) expect(store2.add(5, 4)).toBe(63) expect(store1.add(2, 2)).toBe(8) expect(normalizeSpyEvents(events)).toEqual([ { arguments: [3, 4], name: "zoem zoem", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true }, { arguments: [5, 4], name: "zoem zoem", spyReportStart: true, object: store2, type: "action" }, { spyReportEnd: true }, { arguments: [2, 2], name: "zoem zoem", spyReportStart: true, object: store1, type: "action" }, { spyReportEnd: true } ]) d() }) test("267 (babel) should be possible to declare properties observable outside strict mode", () => { configure({ enforceActions: "observed" }) class Store { @observable timer } Store // just to avoid linter warning configure({ enforceActions: "never" }) }) test("288 atom not detected for object property", () => { class Store { @mobx.observable foo = "" } const store = new Store() let changed = false mobx.observe( store, "foo", () => { changed = true }, true ) expect(changed).toBe(true) }) test("observable performance", () => { const AMOUNT = 100000 class A { @observable a = 1 @observable b = 2 @observable c = 3 @computed get d() { return this.a + this.b + this.c } } const objs = [] const start = Date.now() for (let i = 0; i < AMOUNT; i++) { const a = new A() objs.push(a) // force initialization a.a a.b a.c a.d } console.log("created in ", Date.now() - start) for (let j = 0; j < 4; j++) { for (let i = 0; i < AMOUNT; i++) { const obj = objs[i] obj.a += 3 obj.b *= 4 obj.c = obj.b - obj.a obj.d } } console.log("changed in ", Date.now() - start) }) test("unbound methods", () => { class A { // shared across all instances @action m1() {} // per instance @action m2 = () => {} } const a1 = new A() const a2 = new A() expect(a1.m1).toBe(a2.m1) expect(a1.m2).not.toBe(a2.m2) expect(a1.hasOwnProperty("m1")).toBe(false) expect(a1.hasOwnProperty("m2")).toBe(true) expect(a2.hasOwnProperty("m1")).toBe(false) expect(a2.hasOwnProperty("m2")).toBe(true) }) test("inheritance", () => { class A { @observable a = 2 } class B extends A { @observable b = 3 @computed get c() { return this.a + this.b } } const b1 = new B() const b2 = new B() const values = [] mobx.autorun(() => values.push(b1.c + b2.c)) b1.a = 3 b1.b = 4 b2.b = 5 b2.a = 6 expect(values).toEqual([10, 11, 12, 14, 18]) }) test("inheritance overrides observable", () => { class A { @observable a = 2 } class B extends A { @observable a = 5 @observable b = 3 @computed get c() { return this.a + this.b } } const b1 = new B() const b2 = new B() const values = [] mobx.autorun(() => values.push(b1.c + b2.c)) b1.a = 3 b1.b = 4 b2.b = 5 b2.a = 6 expect(values).toEqual([16, 14, 15, 17, 18]) }) test("reusing initializers", () => { class A { @observable a = 3 @observable b = this.a + 2 @computed get c() { return this.a + this.b } @computed get d() { return this.c + 1 } } const a = new A() const values = [] mobx.autorun(() => values.push(a.d)) a.a = 4 expect(values).toEqual([9, 10]) }) test("enumerability", () => { class A { @observable a = 1 // enumerable, on proto @observable a2 = 2 @computed get b() { return this.a } // non-enumerable, (and, ideally, on proto) @action m() {} // non-enumerable, on proto @action m2 = () => {} // non-enumerable, on self } const a = new A() // not initialized yet let ownProps = Object.keys(a) let props = [] for (const key in a) props.push(key) expect(ownProps).toEqual([ // should have a, not supported yet in babel... ]) expect(props).toEqual(["a", "a2"]) expect("a" in a).toBe(true) expect(a.hasOwnProperty("a")).toBe(false) expect(a.hasOwnProperty("b")).toBe(false) // true would be more consistent, see below expect(a.hasOwnProperty("m")).toBe(false) expect(a.hasOwnProperty("m2")).toBe(true) expect(mobx.isAction(a.m)).toBe(true) expect(mobx.isAction(a.m2)).toBe(true) // after initialization a.a a.b a.m a.m2 ownProps = Object.keys(a) props = [] for (const key in a) props.push(key) expect(ownProps).toEqual([ "a", "a2" // a2 is now initialized as well, altough never accessed! ]) expect(props).toEqual(["a", "a2"]) expect("a" in a).toBe(true) expect(a.hasOwnProperty("a")).toBe(true) expect(a.hasOwnProperty("a2")).toBe(true) expect(a.hasOwnProperty("b")).toBe(true) // true would better.. but, #1777 expect(a.hasOwnProperty("m")).toBe(false) expect(a.hasOwnProperty("m2")).toBe(true) }) test("enumerability - workaround", () => { class A { @observable a = 1 // enumerable, on proto @observable a2 = 2 @computed get b() { return this.a } // non-enumerable, (and, ideally, on proto) @action m() {} // non-enumerable, on proto @action m2 = () => {} // non-enumerable, on self constructor() { this.a = 1 this.a2 = 2 } } const a = new A() const ownProps = Object.keys(a) const props = [] for (const key in a) props.push(key) expect(ownProps).toEqual([ "a", "a2" // a2 is now initialized as well, altough never accessed! ]) expect(props).toEqual(["a", "a2"]) expect("a" in a).toBe(true) expect(a.hasOwnProperty("a")).toBe(true) expect(a.hasOwnProperty("a2")).toBe(true) expect(a.hasOwnProperty("b")).toBe(true) // ideally, false, but #1777 expect(a.hasOwnProperty("m")).toBe(false) expect(a.hasOwnProperty("m2")).toBe(true) }) test("issue 285 (babel)", () => { const { observable, toJS } = mobx class Todo { id = 1 @observable title @observable finished = false @observable childThings = [1, 2, 3] constructor(title) { this.title = title } } const todo = new Todo("Something to do") expect(toJS(todo)).toEqual({ id: 1, title: "Something to do", finished: false, childThings: [1, 2, 3] }) }) test("verify object assign (babel)", () => { class Todo { @observable title = "test" @computed get upperCase() { return this.title.toUpperCase() } } const todo = new Todo() expect(Object.assign({}, todo)).toEqual({ // Should be: title: "test"! }) todo.title // lazy initialization :'( expect(Object.assign({}, todo)).toEqual({ title: "test" }) }) test("379, inheritable actions (babel)", () => { class A { @action method() { return 42 } } class B extends A { @action method() { return super.method() * 2 } } class C extends B { @action method() { return super.method() + 3 } } const b = new B() expect(b.method()).toBe(84) expect(isAction(b.method)).toBe(true) const a = new A() expect(a.method()).toBe(42) expect(isAction(a.method)).toBe(true) const c = new C() expect(c.method()).toBe(87) expect(isAction(c.method)).toBe(true) }) test("379, inheritable actions - 2 (babel)", () => { class A { @action("a method") method() { return 42 } } class B extends A { @action("b method") method() { return super.method() * 2 } } class C extends B { @action("c method") method() { return super.method() + 3 } } const b = new B() expect(b.method()).toBe(84) expect(isAction(b.method)).toBe(true) const a = new A() expect(a.method()).toBe(42) expect(isAction(a.method)).toBe(true) const c = new C() expect(c.method()).toBe(87) expect(isAction(c.method)).toBe(true) }) test("505, don't throw when accessing subclass fields in super constructor (babel)", () => { const values = {} class A { @observable a = 1 constructor() { values.b = this.b values.a = this.a } } class B extends A { @observable b = 2 } new B() expect(values).toEqual({ a: 1, b: 2 }) // In the TS test b is undefined, which is actually the expected behavior? }) test("computed setter should succeed (babel)", function() { class Bla { @observable a = 3 @computed get propX() { return this.a * 2 } set propX(v) { this.a = v } } const b = new Bla() expect(b.propX).toBe(6) b.propX = 4 expect(b.propX).toBe(8) }) test("computed getter / setter for plan objects should succeed (babel)", function() { const b = observable({ a: 3, get propX() { return this.a * 2 }, set propX(v) { this.a = v } }) const values = [] mobx.autorun(() => values.push(b.propX)) expect(b.propX).toBe(6) b.propX = 4 expect(b.propX).toBe(8) expect(values).toEqual([6, 8]) }) test("issue #701", () => { class Model { @observable a = 5 } const model = new Model() expect(mobx.toJS(model)).toEqual({ a: 5 }) expect(mobx.isObservable(model)).toBe(true) expect(mobx.isObservableObject(model)).toBe(true) }) test("@observable.ref (Babel)", () => { class A { @observable.ref ref = { a: 3 } } const a = new A() expect(a.ref.a).toBe(3) expect(mobx.isObservable(a.ref)).toBe(false) expect(mobx.isObservableProp(a, "ref")).toBe(true) }) test("@observable.shallow (Babel)", () => { class A { @observable.shallow arr = [{ todo: 1 }] } const a = new A() const todo2 = { todo: 2 } a.arr.push(todo2) expect(mobx.isObservable(a.arr)).toBe(true) expect(mobx.isObservableProp(a, "arr")).toBe(true) expect(mobx.isObservable(a.arr[0])).toBe(false) expect(mobx.isObservable(a.arr[1])).toBe(false) expect(a.arr[1] === todo2).toBeTruthy() }) test("@observable.deep (Babel)", () => { class A { @observable.deep arr = [{ todo: 1 }] } const a = new A() const todo2 = { todo: 2 } a.arr.push(todo2) expect(mobx.isObservable(a.arr)).toBe(true) expect(mobx.isObservableProp(a, "arr")).toBe(true) expect(mobx.isObservable(a.arr[0])).toBe(true) expect(mobx.isObservable(a.arr[1])).toBe(true) expect(a.arr[1] !== todo2).toBeTruthy() expect(isObservable(todo2)).toBe(false) }) test("action.bound binds (Babel)", () => { class A { @observable x = 0 @action.bound inc(value) { this.x += value } } const a = new A() const runner = a.inc runner(2) expect(a.x).toBe(2) }) test("@computed.equals (Babel)", () => { const sameTime = (from, to) => from.hour === to.hour && from.minute === to.minute class Time { constructor(hour, minute) { this.hour = hour this.minute = minute } @observable hour @observable minute @computed({ equals: sameTime }) get time() { return { hour: this.hour, minute: this.minute } } } const time = new Time(9, 0) const changes = [] const disposeAutorun = autorun(() => changes.push(time.time)) expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 9 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.minute = 0 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 10 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 } ]) time.minute = 30 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 }, { hour: 10, minute: 30 } ]) disposeAutorun() }) test("computed comparer works with decorate (babel)", () => { const sameTime = (from, to) => from.hour === to.hour && from.minute === to.minute class Time { constructor(hour, minute) { this.hour = hour this.minute = minute } get time() { return { hour: this.hour, minute: this.minute } } } mobx.decorate(Time, { hour: observable, minute: observable, time: computed({ equals: sameTime }) }) const time = new Time(9, 0) const changes = [] const disposeAutorun = autorun(() => changes.push(time.time)) expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 9 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.minute = 0 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 10 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 } ]) time.minute = 30 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 }, { hour: 10, minute: 30 } ]) disposeAutorun() }) test("computed comparer works with decorate (babel) - 2", () => { const sameTime = (from, to) => from.hour === to.hour && from.minute === to.minute class Time { constructor(hour, minute) { extendObservable( this, { hour, minute, get time() { return { hour: this.hour, minute: this.minute } } }, { time: computed({ equals: sameTime }) } ) } } const time = new Time(9, 0) const changes = [] const disposeAutorun = autorun(() => changes.push(time.time)) expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 9 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.minute = 0 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 10 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 } ]) time.minute = 30 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 }, { hour: 10, minute: 30 } ]) disposeAutorun() }) test("computed comparer works with decorate (babel) - 3", () => { const sameTime = (from, to) => from.hour === to.hour && from.minute === to.minute const time = observable.object( { hour: 9, minute: 0, get time() { return { hour: this.hour, minute: this.minute } } }, { time: computed({ equals: sameTime }) } ) const changes = [] const disposeAutorun = autorun(() => changes.push(time.time)) expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 9 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.minute = 0 expect(changes).toEqual([{ hour: 9, minute: 0 }]) time.hour = 10 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 } ]) time.minute = 30 expect(changes).toEqual([ { hour: 9, minute: 0 }, { hour: 10, minute: 0 }, { hour: 10, minute: 30 } ]) disposeAutorun() }) test("actions are reassignable", () => { // See #1398, make actions reassignable to support stubbing class A { @action m1() {} @action m2 = () => {} @action.bound m3() {} @action.bound m4 = () => {} } const a = new A() expect(isAction(a.m1)).toBe(true) expect(isAction(a.m2)).toBe(true) expect(isAction(a.m3)).toBe(true) expect(isAction(a.m4)).toBe(true) a.m1 = () => {} expect(isAction(a.m1)).toBe(false) a.m2 = () => {} expect(isAction(a.m2)).toBe(false) a.m3 = () => {} expect(isAction(a.m3)).toBe(false) a.m4 = () => {} expect(isAction(a.m4)).toBe(false) }) test("it should support asyncAction (babel)", async () => { mobx.configure({ enforceActions: "observed" }) class X { @observable a = 1 f = mobx.flow(function* f(initial) { this.a = initial // this runs in action this.a += yield Promise.resolve(5) this.a = this.a * 2 return this.a }) } const x = new X() expect(await x.f(3)).toBe(16) }) test("toJS bug #1413 (babel)", () => { class X { @observable test = { test1: 1 } } const x = new X() const res = mobx.toJS(x.test) expect(res).toEqual({ test1: 1 }) expect(res.__mobxDidRunLazyInitializers).toBe(undefined) }) test("computed setter problem", () => { class Contact { @observable firstName = "" @observable lastName = "" @computed({ set(value) { const [firstName, lastName] = value.split(" ") this.firstName = firstName this.lastName = lastName } }) get fullName() { return `${this.firstName} ${this.lastName}` } set fullName(value) { const [firstName, lastName] = value.split(" ") this.firstName = firstName this.lastName = lastName } } const c = new Contact() c.firstName = "Pavan" c.lastName = "Podila" expect(c.fullName).toBe("Pavan Podila") c.fullName = "Michel Weststrate" expect(c.firstName).toBe("Michel") expect(c.lastName).toBe("Weststrate") }) test("computed setter problem - 2", () => { class Contact { @observable firstName = "" @observable lastName = "" get fullName() { return `${this.firstName} ${this.lastName}` } } mobx.decorate(Contact, { fullName: computed({ // This doesn't work set: function(value) { const [firstName, lastName] = value.split(" ") this.firstName = firstName this.lastName = lastName }, equals: mobx.comparer.identity }) }) const c = new Contact() c.firstName = "Pavan" c.lastName = "Podila" expect(c.fullName).toBe("Pavan Podila") c.fullName = "Michel Weststrate" expect(c.firstName).toBe("Michel") expect(c.lastName).toBe("Weststrate") }) test("#1740, combining extendObservable & decorators", () => { class AppState { constructor(id) { extendObservable(this, { id }) expect(this.foo).toBe(id) } @computed get foo() { return this.id } } let app = new AppState(1) expect(app.id).toBe(1) expect(app.foo).toBe(1) expect(isObservableProp(app, "id")).toBe(true) expect(isComputedProp(app, "foo")).toBe(true) app = new AppState(2) expect(app.id).toBe(2) expect(app.foo).toBe(2) expect(isObservableProp(app, "id")).toBe(true) expect(isComputedProp(app, "foo")).toBe(true) })
""" .. module: lemur.authorities.service :platform: Unix :synopsis: This module contains all of the services level functions used to administer authorities in Lemur :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ import json from flask import current_app from lemur import database from lemur.common.utils import truthiness, data_encrypt from lemur.extensions import metrics from lemur.authorities.models import Authority from lemur.certificates.models import Certificate from lemur.roles import service as role_service from lemur.logs import service as log_service from lemur.certificates.service import upload def update(authority_id, description, owner, active, roles): """ Update an authority with new values. :param authority_id: :param roles: roles that are allowed to use this authority :return: """ authority = get(authority_id) authority.roles = roles authority.active = active authority.description = description authority.owner = owner log_service.audit_log("update_authority", authority.name, "Updating authority") # check ui what can be updated return database.update(authority) def update_options(authority_id, options): """ Update an authority with new options. :param authority_id: :param options: the new options to be saved into the authority :return: """ authority = get(authority_id) authority.options = options return database.update(authority) def mint(**kwargs): """ Creates the authority based on the plugin provided. """ issuer = kwargs["plugin"]["plugin_object"] values = issuer.create_authority(kwargs) # support older plugins if len(values) == 3: body, chain, roles = values private_key = None elif len(values) == 4: body, private_key, chain, roles = values roles = create_authority_roles( roles, kwargs["owner"], kwargs["plugin"]["plugin_object"].title, kwargs["creator"], ) log_service.audit_log("create_authority_with_issuer", issuer.title, "Created new authority") return body, private_key, chain, roles def create_authority_roles(roles, owner, plugin_title, creator): """ Creates all of the necessary authority roles. :param creator: :param roles: :return: """ role_objs = [] for r in roles: role = role_service.get_by_name(r["name"]) if not role: role = role_service.create( r["name"], password=r["password"], description="Auto generated role for {0}".format(plugin_title), username=r["username"], ) # the user creating the authority should be able to administer it if role.username == "admin": creator.roles.append(role) role_objs.append(role) # create an role for the owner and assign it owner_role = role_service.get_by_name(owner) if not owner_role: owner_role = role_service.create( owner, description="Auto generated role based on owner: {0}".format(owner) ) role_objs.append(owner_role) return role_objs def create(**kwargs): """ Creates a new authority. """ ca_name = kwargs.get("name") if get_by_name(ca_name): raise Exception(f"Authority with name {ca_name} already exists") if role_service.get_by_name(f"{ca_name}_admin") or role_service.get_by_name(f"{ca_name}_operator"): raise Exception(f"Admin and/or operator roles for authority {ca_name} already exist") body, private_key, chain, roles = mint(**kwargs) kwargs["creator"].roles = list(set(list(kwargs["creator"].roles) + roles)) kwargs["body"] = body kwargs["private_key"] = private_key kwargs["chain"] = chain if kwargs.get("roles"): kwargs["roles"] += roles else: kwargs["roles"] = roles cert = upload(**kwargs) kwargs["authority_certificate"] = cert if kwargs.get("plugin", {}).get("plugin_options", []): # encrypt the private key before persisting in DB for option in kwargs.get("plugin").get("plugin_options"): if option["name"] == "acme_private_key" and option["value"]: option["value"] = data_encrypt(option["value"]) kwargs["options"] = json.dumps(kwargs["plugin"]["plugin_options"]) authority = Authority(**kwargs) authority = database.create(authority) kwargs["creator"].authorities.append(authority) log_service.audit_log("create_authority", ca_name, "Created new authority") issuer = kwargs["plugin"]["plugin_object"] current_app.logger.warning(f"Created new authority {ca_name} with issuer {issuer.title}") metrics.send( "authority_created", "counter", 1, metric_tags=dict(owner=authority.owner) ) return authority def get_all(): """ Get all authorities that are currently in Lemur. :rtype : List :return: """ query = database.session_query(Authority) return database.find_all(query, Authority, {}).all() def get(authority_id): """ Retrieves an authority given it's ID :param authority_id: :return: """ return database.get(Authority, authority_id) def get_by_name(authority_name): """ Retrieves an authority given it's name. :param authority_name: :return: """ return database.get(Authority, authority_name, field="name") def get_authorities_by_name(authority_names): """ Retrieves an authority given it's name. :param authority_names: list with authority names to match :return: """ return Authority.query.filter(Authority.name.in_(authority_names)).all() def get_authority_role(ca_name, creator=None): """ Attempts to get the authority role for a given ca uses current_user as a basis for accomplishing that. :param ca_name: """ if creator: if creator.is_admin: return role_service.get_by_name("{0}_admin".format(ca_name)) return role_service.get_by_name("{0}_operator".format(ca_name)) def render(args): """ Helper that helps us render the REST Api responses. :param args: :return: """ query = database.session_query(Authority) filt = args.pop("filter") if filt: terms = filt.split(";") if "active" in filt: query = query.filter(Authority.active == truthiness(terms[1])) elif "cn" in filt: term = "%{0}%".format(terms[1]) sub_query = ( database.session_query(Certificate.root_authority_id) .filter(Certificate.cn.ilike(term)) .subquery() ) query = query.filter(Authority.id.in_(sub_query)) else: query = database.filter(query, Authority, terms) # we make sure that a user can only use an authority they either own are a member of - admins can see all if not args["user"].is_admin: authority_ids = [] for authority in args["user"].authorities: authority_ids.append(authority.id) for role in args["user"].roles: for authority in role.authorities: authority_ids.append(authority.id) query = query.filter(Authority.id.in_(authority_ids)) return database.sort_and_page(query, Authority, args)
const express = require("express"); const bodyParser = require("body-parser"); const cors = require("cors"); const chai = require("chai"); const chaiHttp = require("chai-http"); const should = chai.should(); const config = require("../config"); const SERVER_URL = process.env.APP_URL || "http://localhost:8000"; const MOCK_SERVER_PORT = process.env.MOCK_SERVER_PORT || 8002; chai.use(chaiHttp); const redis = require("redis").createClient({ host: config.redis.host, port: config.redis.port }); const TEST_USER = { email: "roland@doe.com", firstname: "roland" }; let createdUserId; const mock = { app: express(), server: null, requests: [], status: 404, responseBody: {} }; const setupMock = (status, body) => { mock.status = status; mock.responseBody = body; }; const initMock = async () => { mock.app.use(bodyParser.urlencoded({ extended: false })); mock.app.use(bodyParser.json()); mock.app.use(cors()); mock.app.get("*", (req, res) => { mock.requests.push(req); res.status(mock.status).send(mock.responseBody); }); mock.server = await mock.app.listen(MOCK_SERVER_PORT); console.log(`Mock server started on port: ${MOCK_SERVER_PORT}`); }; const teardownMock = () => { if (mock.server) { mock.server.close(); delete mock.server; } }; describe("Users", () => { before(async () => await initMock()); after(() => { redis.quit(); teardownMock(); }); beforeEach(() => (mock.requests = [])); it("should create a new user", done => { setupMock(200, { result: "valid" }); chai .request(SERVER_URL) .post("/api/users") .send(TEST_USER) .end((err, res) => { if (err) { done(err); } else { res.should.have.status(201); res.should.be.json; res.body.should.be.a("object"); res.body.should.have.property("id"); res.body.should.have.property("email"); res.body.should.have.property("firstname"); res.body.id.should.not.be.null; res.body.email.should.equal(TEST_USER.email); res.body.firstname.should.equal(TEST_USER.firstname); createdUserId = res.body.id; mock.requests.length.should.equal(1); mock.requests[0].path.should.equal("/api/validate"); mock.requests[0].query.should.have.property("email"); mock.requests[0].query.email.should.equal(TEST_USER.email); redis.get(createdUserId, (err, cacheData) => { if (err) throw err; cacheData = JSON.parse(cacheData); cacheData.should.have.property("email"); cacheData.should.have.property("firstname"); cacheData.email.should.equal(TEST_USER.email); cacheData.firstname.should.equal(TEST_USER.firstname); done(); }); } }); }); it("should get the created user", done => { chai .request(SERVER_URL) .get("/api/users") .end((err, res) => { if (err) { done(err); } else { res.should.have.status(200); res.body.should.be.a("array"); const user = res.body.pop(); user.id.should.equal(createdUserId); user.email.should.equal(TEST_USER.email); user.firstname.should.equal(TEST_USER.firstname); done(); } }); }); it("should not create user if mail is spammy", done => { setupMock(200, { result: "invalid" }); chai .request(SERVER_URL) .post("/api/users") .send(TEST_USER) .end((err, res) => { res.should.have.status(403); done(); }); }); it("should not create user if spammy mail API is down", done => { setupMock(404, { result: "invalid" }); chai .request(SERVER_URL) .post("/api/users") .send(TEST_USER) .end((err, res) => { res.should.have.status(403); done(); }); }); });
_base_ = [ '../_base_/models/ssd300.py', '../_base_/datasets/ShipRSImageNet_Level1_detection.py', '../_base_/schedules/schedule_100e.py', '../_base_/default_runtime.py' ] input_size = 512 model = dict( backbone=dict(input_size=input_size), bbox_head=dict( num_classes=4, in_channels=(512, 1024, 512, 256, 256, 256, 256), anchor_generator=dict( type='SSDAnchorGenerator', scale_major=False, input_size=input_size, basesize_ratio_range=(0.1, 0.9), strides=[8, 16, 32, 64, 128, 256, 512], ratios=[[2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]]))) # dataset settings dataset_type = 'ShipRSImageNet_Level1' data_root = './data/ShipRSImageNet/' img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[1, 1, 1], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile', to_float32=True), dict(type='LoadAnnotations', with_bbox=True), dict( type='PhotoMetricDistortion', brightness_delta=32, contrast_range=(0.5, 1.5), saturation_range=(0.5, 1.5), hue_delta=18), dict( type='Expand', mean=img_norm_cfg['mean'], to_rgb=img_norm_cfg['to_rgb'], ratio_range=(1, 4)), dict( type='MinIoURandomCrop', min_ious=(0.1, 0.3, 0.5, 0.7, 0.9), min_crop_size=0.3), dict(type='Resize', img_scale=(512, 512), keep_ratio=False), dict(type='Normalize', **img_norm_cfg), dict(type='RandomFlip', flip_ratio=0.5), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(512, 512), flip=False, transforms=[ dict(type='Resize', keep_ratio=False), dict(type='Normalize', **img_norm_cfg), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img']), ]) ] data = dict( samples_per_gpu=8, workers_per_gpu=2, train=dict( _delete_=True, type='RepeatDataset', times=5, dataset=dict( type=dataset_type, ann_file=data_root + 'COCO_Format/ShipRSImageNet_bbox_train_level_1.json', img_prefix=data_root + 'VOC_Format/JPEGImages/', pipeline=train_pipeline)), val=dict(pipeline=test_pipeline), test=dict(pipeline=test_pipeline)) # optimizer optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=5e-4) optimizer_config = dict(_delete_=True) checkpoint_config = dict(interval=20) evaluation = dict(interval=50, metric='bbox')
/** * scripts/pages/store/index.js * Does logic for picking product variants and adding to cart */ /* global ga */ import jQuery from '~/lib/jquery' import modal from '~/lib/modal' Promise.all([jQuery, modal]).then(([$]) => { ga('send', 'event', 'Store', 'Store Visit') $('document').ready(function () { var baseUrl = $('base').attr('href') var products = [] if (typeof window.products !== 'undefined') { products = window.products } else if (products.length === 0) { console.error('Unable to find store data') $.getJSON(baseUrl + 'data/store.json', function (data) { console.log('Was able to fetch store data manually') products = data }) } /** * Opens product modal on image click */ $('.grid--product .grid__item *').on('click', function (e) { if (e.target !== this) return var $item = $(this).closest('.grid__item') if ($item.attr('id').indexOf('product') === -1) return e.preventDefault() var $trigger = $item.find('.open-modal') $trigger.leanModal({ overlayOpacity: 0.5, closeButton: '.close-modal' }) $trigger.click() ga('send', 'event', 'Store', 'View Product', $item.data('product-name')) }) /** * updateVariant * Updates a modal with new variant data * * @param {Object} $f - the jQuery form to update * @param {Object} p - the product object * @param {Object} v - the variant object * * @return {Void} */ var updateVariant = function ($f, p, v) { var $m = $f.closest('.modal') // Update price information $f.find('input[name="variant"]').val(v['id']) $m.find('.modal__price').text('$' + parseFloat(v['price']).toFixed(2)) if (v['image'] != null) { $m.find('img').prop('src', v['image']) } else { $m.find('img').prop('src', p['image']) } // Update modal information setValue($f, 'size', v['size']) setValue($f, 'color', v['color']) } /** * getValue * Returns the current value of X in the form * NOTE: currently only supports buttons and select elements * * @param {Object} $f - the jQuery form to look in * @param {String} n - the name of the value to lookup * * @return {String} - the value of n */ var getValue = function ($f, n) { var $b = $f.find('button[name=' + n + ']') if ($b.length) { return $b.filter('.checked').val() } else { return $f.find('select[name=' + n + ']').val() } } /** * setValue * Sets the value of X in the form * NOTE: currently only supports buttons and select elements * * @param {Object} $f - the jQuery form to look in * @param {String} n - the name of the value to change * @param {String} v - the value to change it to * * @return {Void} */ var setValue = function ($f, n, v) { var $i = $f.find('input[name=' + n + ']') var $s = $f.find('select[name=' + n + ']') var $b = $i.siblings('button.target-amount') $i.val(v) $s.val(v) if ($b.length) { $b.removeClass('checked') $b.filter('[value="' + v + '"]').addClass('checked') } } /** * updateInfo * Updates the product modal based on new user input * * @param {Object} $f - the jQuery object of the form * @param {String} t - type of input that changed (color, size, etc) * @param {String} v - new value of input * * @return {Void} */ var updateInfo = function ($f, t, v) { var $id = $f.find('input[name="id"]') var id = Number($id.val()) var size = getValue($f, 'size') var color = getValue($f, 'color') if (t === 'size') { size = v } else if (t === 'color') { color = v } else { throw new Error('Unable to use updateInfo on anything besides size or color') } var p = null for (var pi in products) { if (products[pi]['id'] !== id) continue p = products[pi] } if (p == null) { $('.alert--error', $f).text('Unable to find product') $('input[type="submit"]', $f).prop('disabled', true) return } for (var i in p['variants']) { var variant = p['variants'][i] if (size != null && variant['size'] !== size) continue if (color != null && variant['color'] !== color) continue updateVariant($f, p, variant) $('.alert--error', $f).text('') $('input[type="submit"]', $f).prop('disabled', false) return } $('.alert--error', $f).text('Unable to find variant') $('input[type="submit"]', $f).prop('disabled', true) } /** * Handles button selection input and switching */ $('.modal--product form[action$="inventory"] button.target-amount').on('click', function (e) { e.preventDefault() var $input = $(this).siblings('input') var $form = $(this).closest('form') var type = $input.attr('name') var value = $(this).attr('value') updateInfo($form, type, value) }) /** * Updates product variance based on user input (size, color, etc) */ $('.modal--product form[action$="inventory"] select').on('change', function (e) { e.preventDefault() var $form = $(this).closest('form') var type = $(this).attr('name') var value = $(this).val() updateInfo($form, type, value) }) }) })
let aid = getQueryString('id'); document.getElementById('praise').addEventListener('click', praise); //点赞 function praise(){ let heartImg = document.getElementsByClassName('heart-img')[0]; if(heartImg.className === 'heart-img') { ajax({ url: '/article/details/addpraisenum', type: 'POST', dataType: 'JSON', data: { aid: aid, }, success: function(data) { data = JSON.parse(data); if(data.status == 1) { let praisenum = document.getElementById('praisenum'); praisenum.innerHTML = parseInt(praisenum.innerHTML) + 1; heartImg.className = 'heart-img heart-img-like'; }else{ alert('点赞失败!'); } }, fail: function(status) { console.log(status); } }); }else{ alert('不要重复点赞哦!'); } }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import torch import torch.nn as nn from datasets import load_dataset from noise2noise import Noise2Noise from argparse import ArgumentParser def parse_args(): """Command-line argument parser for training.""" # New parser parser = ArgumentParser(description='PyTorch implementation of Noise2Noise from Lehtinen et al. (2018)') # Data parameters parser.add_argument('-t', '--train-dir', help='training set path', default='./../data/train') parser.add_argument('-v', '--valid-dir', help='test set path', default='./../data/valid') parser.add_argument('--ckpt-save-path', help='checkpoint save path', default='./../ckpts') parser.add_argument('--ckpt-overwrite', help='overwrite model checkpoint on save', action='store_true') parser.add_argument('--report-interval', help='batch report interval', default=500, type=int) parser.add_argument('-ts', '--train-size', help='size of train dataset', type=int) parser.add_argument('-vs', '--valid-size', help='size of valid dataset', type=int) # Training hyperparameters parser.add_argument('-lr', '--learning-rate', help='learning rate', default=0.001, type=float) parser.add_argument('-a', '--adam', help='adam parameters', nargs='+', default=[0.9, 0.99, 1e-8], type=list) parser.add_argument('-b', '--batch-size', help='minibatch size', default=4, type=int) parser.add_argument('-e', '--nb-epochs', help='number of epochs', default=100, type=int) parser.add_argument('-l', '--loss', help='loss function', choices=['l1', 'l2', 'hdr'], default='l1', type=str) parser.add_argument('--cuda', help='use cuda', action='store_true') parser.add_argument('--plot-stats', help='plot stats after every epoch', action='store_true') # Corruption parameters parser.add_argument('-n', '--noise-type', help='noise type', choices=['gaussian', 'poisson', 'text', 'mc', 'precomputed'], default='gaussian', type=str) parser.add_argument('-p', '--noise-param', help='noise parameter (e.g. std for gaussian)', default=50, type=float) parser.add_argument('-s', '--seed', help='fix random seed', type=int) parser.add_argument('-c', '--crop-size', help='random crop size', default=128, type=int) parser.add_argument('--clean-targets', help='use clean targets for training', action='store_true') return parser.parse_args() if __name__ == '__main__': """Trains Noise2Noise.""" # Parse training parameters params = parse_args() # Train/valid datasets train_loader = load_dataset(params.train_dir, params.train_size, params, shuffled=True) valid_loader = load_dataset(params.valid_dir, params.valid_size, params, shuffled=False) # Initialize model and train n2n = Noise2Noise(params, trainable=True) n2n.train(train_loader, valid_loader)
Clazz.declarePackage ("J.adapter.writers"); Clazz.load (["JU.SB", "JU.JSONWriter", "java.util.Hashtable"], "J.adapter.writers.QCJSONWriter", ["java.lang.Boolean", "java.util.Date", "JU.DF", "$.P3", "$.PT", "J.quantum.SlaterData", "org.qcschema.QCSchemaUnits"], function () { c$ = Clazz.decorateAsClass (function () { this.moBases = null; this.htBasisMap = null; this.filterMOs = false; this.vwr = null; this.basisID = 0; this.shells = null; this.dfCoefMaps = null; if (!Clazz.isClassDefined ("J.adapter.writers.QCJSONWriter.SparseArray")) { J.adapter.writers.QCJSONWriter.$QCJSONWriter$SparseArray$ (); } Clazz.instantialize (this, arguments); }, J.adapter.writers, "QCJSONWriter", JU.JSONWriter); Clazz.prepareFields (c$, function () { this.moBases = new java.util.Hashtable (); this.htBasisMap = new java.util.Hashtable (); }); Clazz.defineMethod (c$, "set", function (viewer, os) { this.vwr = viewer; this.setWriteNullAsString (false); this.setStream (os); }, "JV.Viewer,java.io.OutputStream"); Clazz.defineMethod (c$, "toString", function () { return (this.oc == null ? "{}" : this.oc.toString ()); }); Clazz.defineMethod (c$, "writeJSON", function () { this.openSchema (); this.writeMagic (); this.oc.append (",\n"); this.writeSchemaMetadata (); this.writeJobs (); this.closeSchema (); }); Clazz.defineMethod (c$, "writeSchemaMetadata", function () { this.mapOpen (); this.mapAddKeyValue ("__jmol_created", new java.util.Date (), ",\n"); this.mapAddKeyValue ("__jmol_source", this.vwr.getP ("_modelFile"), ""); this.mapClose (); }); Clazz.defineMethod (c$, "openSchema", function () { this.arrayOpen (false); }); Clazz.defineMethod (c$, "writeMagic", function () { this.writeString (org.qcschema.QCSchemaUnits.version); }); Clazz.defineMethod (c$, "closeSchema", function () { this.oc.append ("\n"); this.arrayClose (false); this.closeStream (); }); Clazz.defineMethod (c$, "writeJobs", function () { this.writeJob (1); }); Clazz.defineMethod (c$, "writeJob", function (iJob) { this.append (",\n"); this.mapOpen (); { this.mapAddKeyValue ("__jmol_block", "Job " + iJob, ",\n"); this.writeJobMetadata (); this.writeModels (); this.writeMOBases (); }this.mapClose (); }, "~N"); Clazz.defineMethod (c$, "writeJobMetadata", function () { this.mapAddKey ("metadata"); this.mapOpen (); { this.mapAddMapAllExcept ("__jmol_info", this.vwr.getModelSetAuxiliaryInfo (), ";group3Counts;properties;group3Lists;models;unitCellParams;"); }this.mapClose (); }); Clazz.defineMethod (c$, "writeModels", function () { var nModels = this.vwr.ms.mc; this.oc.append (",\n"); this.mapAddKey ("steps"); this.arrayOpen (true); { this.oc.append ("\n"); for (var i = 0; i < nModels; ) { if (i > 0) this.append (",\n"); i = this.writeModel (i); } }this.arrayClose (true); }); Clazz.defineMethod (c$, "writeModel", function (modelIndex) { var nextModel = modelIndex + 1; this.append (""); this.mapOpen (); { this.mapAddKeyValue ("__jmol_block", "Model " + (modelIndex + 1), ",\n"); this.writeTopology (modelIndex); if (this.isVibration (modelIndex)) { this.oc.append (",\n"); nextModel = this.writeVibrations (modelIndex); }if (this.haveMOData (modelIndex)) { this.oc.append (",\n"); this.writeMOData (modelIndex); }this.oc.append (",\n"); this.writeModelMetadata (modelIndex); }this.mapClose (); this.oc.append ("\n"); return nextModel; }, "~N"); Clazz.defineMethod (c$, "writeTopology", function (modelIndex) { this.mapAddKey ("topology"); this.mapOpen (); { this.writeAtoms (modelIndex); this.writeBonds (modelIndex); }this.mapClose (); }, "~N"); Clazz.defineMethod (c$, "getProperty", function (modelIndex, key) { var props = (modelIndex >= this.vwr.ms.am.length ? null : this.vwr.ms.am[modelIndex].auxiliaryInfo.get ("modelProperties")); return (props == null ? null : props.get (key)); }, "~N,~S"); Clazz.defineMethod (c$, "isVibration", function (modelIndex) { return (this.vwr.ms.getLastVibrationVector (modelIndex, 0) >= 0); }, "~N"); Clazz.defineMethod (c$, "writeModelMetadata", function (modelIndex) { this.mapAddKey ("metadata"); this.mapOpen (); { this.mapAddMapAllExcept ("__jmol_info", this.vwr.ms.am[modelIndex].auxiliaryInfo, ";.PATH;PATH;fileName;moData;unitCellParams;"); }this.mapClose (); }, "~N"); Clazz.defineMethod (c$, "writeAtoms", function (modelIndex) { var symbols = Clazz.innerTypeInstance (J.adapter.writers.QCJSONWriter.SparseArray, this, null, "_RLE_"); var numbers = Clazz.innerTypeInstance (J.adapter.writers.QCJSONWriter.SparseArray, this, null, "_RLE_"); var charges = Clazz.innerTypeInstance (J.adapter.writers.QCJSONWriter.SparseArray, this, null, "_RLE_"); var names = Clazz.innerTypeInstance (J.adapter.writers.QCJSONWriter.SparseArray, this, null, "_RLE_"); var types = Clazz.innerTypeInstance (J.adapter.writers.QCJSONWriter.SparseArray, this, null, "_RLE_"); this.mapAddKey ("atoms"); this.mapOpen (); { var unitCell = this.vwr.ms.getUnitCell (modelIndex); var isFractional = (unitCell != null && !unitCell.isBio ()); if (isFractional) { var params = unitCell.getUnitCellAsArray (false); this.writePrefix_Units ("unit_cell", "angstroms"); this.mapAddKeyValue ("unit_cell", params, ",\n"); }this.writePrefix_Units ("coords", isFractional ? "fractional" : "angstroms"); this.mapAddKey ("coords"); this.arrayOpen (true); { this.oc.append ("\n"); var bs = this.vwr.getModelUndeletedAtomsBitSet (modelIndex); var last = bs.length () - 1; var pt = new JU.P3 (); for (var i = bs.nextSetBit (0); i >= 0; i = bs.nextSetBit (i + 1)) { var a = this.vwr.ms.at[i]; this.append (""); pt.setT (a); if (isFractional) unitCell.toFractional (pt, false); this.oc.append (this.formatNumber (pt.x)).append (",\t").append (this.formatNumber (pt.y)).append (",\t").append (this.formatNumber (pt.z)).append (i < last ? ",\n" : "\n"); symbols.add (JU.PT.esc (a.getElementSymbol ())); numbers.add ("" + a.getElementNumber ()); charges.add ("" + a.getPartialCharge ()); var name = a.getAtomName (); names.add (name); var type = a.getAtomType (); types.add (type.equals (name) ? null : type); } }this.arrayClose (true); this.oc.append (",\n"); if (charges.isNumericAndNonZero ()) { this.mapAddKeyValueRaw ("charge", charges, ",\n"); }if (types.hasValues ()) { this.mapAddKeyValueRaw ("types", types, ",\n"); }this.mapAddKeyValueRaw ("symbol", symbols, ",\n"); this.mapAddKeyValueRaw ("atom_number", numbers, "\n"); }this.mapClose (); }, "~N"); Clazz.defineMethod (c$, "formatNumber", function (x) { return (x < 0 ? "" : " ") + JU.DF.formatDecimal (x, -6); }, "~N"); Clazz.defineMethod (c$, "writePrefix_Units", function (prefix, units) { this.mapAddKeyValueRaw (prefix + "_units", org.qcschema.QCSchemaUnits.getUnitsJSON (units, false), ",\n"); }, "~S,~S"); Clazz.defineMethod (c$, "writeBonds", function (modelIndex) { }, "~N"); Clazz.defineMethod (c$, "writeVibrations", function (modelIndex) { this.mapAddKey ("vibrations"); this.arrayOpen (true); { this.oc.append ("\n"); var sep = null; var ivib = 0; modelIndex--; while (this.isVibration (++modelIndex)) { if (sep != null) this.oc.append (sep); sep = ",\n"; this.append (""); this.mapOpen (); { this.mapAddKeyValue ("__jmol_block", "Vibration " + (++ivib), ",\n"); var value = this.getProperty (modelIndex, "FreqValue"); var freq = this.getProperty (modelIndex, "Frequency"); var intensity = this.getProperty (modelIndex, "IRIntensity"); var tokens; if (value == null) { System.out.println ("model " + modelIndex + " has no _M.properties.FreqValue"); }if (freq == null) { System.out.println ("model " + modelIndex + " has no _M.properties.Frequency"); } else { tokens = JU.PT.split (freq, " "); if (tokens.length == 1) { System.out.println ("model " + modelIndex + " has no frequency units"); }this.writeMapKeyValueUnits ("frequency", value, tokens[1]); }if (intensity != null) { tokens = JU.PT.split (intensity, " "); this.writeMapKeyValueUnits ("ir_intensity", tokens[0], tokens[1]); }var label = this.getProperty (modelIndex, "FrequencyLabel"); if (label != null) this.mapAddKeyValue ("label", label, ",\n"); this.mapAddKey ("vectors"); this.arrayOpen (true); { this.oc.append ("\n"); var bs = this.vwr.getModelUndeletedAtomsBitSet (modelIndex); var last = bs.length () - 1; for (var i = bs.nextSetBit (0); i >= 0; i = bs.nextSetBit (i + 1)) { var a = this.vwr.ms.at[i]; var v = a.getVibrationVector (); this.append (""); this.oc.append (this.formatNumber (v.x)).append (",\t").append (this.formatNumber (v.y)).append (",\t").append (this.formatNumber (v.z)).append (i < last ? ",\n" : "\n"); } }this.arrayClose (true); }this.append (""); this.mapClose (); } }this.oc.append ("\n"); this.arrayClose (true); return modelIndex; }, "~N"); Clazz.defineMethod (c$, "writeMapKeyValueUnits", function (key, value, units) { this.mapAddKeyValueRaw (key, "{\"value\":" + value + ",\"units\":" + org.qcschema.QCSchemaUnits.getUnitsJSON (units, false) + "}", ",\n"); }, "~S,~O,~S"); Clazz.defineMethod (c$, "haveMOData", function (modelIndex) { return (this.getAuxiliaryData (modelIndex, "moData") != null); }, "~N"); Clazz.defineMethod (c$, "getAuxiliaryData", function (modelIndex, key) { return this.vwr.ms.am[modelIndex].auxiliaryInfo.get (key); }, "~N,~S"); Clazz.defineMethod (c$, "writeMOData", function (modelIndex) { var moData = this.getAuxiliaryData (modelIndex, "moData"); var moDataJSON = new java.util.Hashtable (); moDataJSON.put ("orbitals", moData.get ("mos")); var units = moData.get ("EnergyUnits"); if (units == null) units = "?"; moDataJSON.put ("orbitals_energy_units", org.qcschema.QCSchemaUnits.getUnitsJSON (units, true)); moDataJSON.put ("__jmol_normalized", Boolean.$valueOf (moData.get ("isNormalized") === Boolean.TRUE)); var type = moData.get ("calculationType"); moDataJSON.put ("__jmol_calculation_type", type == null ? "?" : type); this.setDFCoord (moData); moDataJSON.put ("basis_id", this.addBasis (moData)); this.filterMOs = true; this.setModifyKeys (J.adapter.writers.QCJSONWriter.fixIntegration ()); this.mapAddKeyValue ("molecular_orbitals", moDataJSON, "\n"); this.setModifyKeys (null); this.filterMOs = false; this.append (""); }, "~N"); c$.fixIntegration = Clazz.defineMethod (c$, "fixIntegration", function () { if (J.adapter.writers.QCJSONWriter.integrationKeyMap == null) { J.adapter.writers.QCJSONWriter.integrationKeyMap = new java.util.Hashtable (); J.adapter.writers.QCJSONWriter.integrationKeyMap.put ("integration", "__jmol_integration"); }return J.adapter.writers.QCJSONWriter.integrationKeyMap; }); Clazz.overrideMethod (c$, "getAndCheckValue", function (map, key) { if (this.filterMOs) { if (key.equals ("dfCoefMaps")) return null; if (key.equals ("symmetry")) return (map.get (key)).$replace ('_', ' ').trim (); if (key.equals ("coefficients") && this.dfCoefMaps != null) { return this.fixCoefficients (map.get (key)); }}return map.get (key); }, "java.util.Map,~S"); Clazz.defineMethod (c$, "fixCoefficients", function (coeffs) { var c = Clazz.newDoubleArray (coeffs.length, 0); for (var i = 0, n = this.shells.size (); i < n; i++) { var shell = this.shells.get (i); var type = shell[1]; var map = this.dfCoefMaps[type]; for (var j = 0, coefPtr = 0; j < map.length; j++, coefPtr++) c[coefPtr + j] = coeffs[coefPtr + map[j]]; } return c; }, "~A"); Clazz.defineMethod (c$, "setDFCoord", function (moData) { this.dfCoefMaps = moData.get ("dfCoefMaps"); if (this.dfCoefMaps != null) { var haveMap = false; for (var i = 0; !haveMap && i < this.dfCoefMaps.length; i++) { var m = this.dfCoefMaps[i]; for (var j = 0; j < m.length; j++) if (m[j] != 0) { haveMap = true; break; } } if (!haveMap) this.dfCoefMaps = null; }}, "java.util.Map"); Clazz.defineMethod (c$, "addBasis", function (moData) { var hash = 1; var gaussians = moData.get ("gaussians"); if (gaussians != null) { hash ^= gaussians.hashCode (); }this.shells = moData.get ("shells"); if (this.shells != null) { hash ^= this.shells.hashCode (); }var slaters = moData.get ("slaters"); if (slaters != null) { hash ^= slaters.hashCode (); }var strHash = "" + hash; var key = this.htBasisMap.get (strHash); if (key == null) { this.htBasisMap.put (strHash, key = "MOBASIS_" + ++this.basisID); var map = new java.util.Hashtable (); if (gaussians != null) map.put ("gaussians", gaussians); if (this.shells != null) { map.put ("shells", this.shells); }if (slaters != null) map.put ("slaters", slaters); this.moBases.put (key, map); }return key; }, "java.util.Map"); Clazz.defineMethod (c$, "writeMOBases", function () { if (this.moBases.isEmpty ()) return; this.oc.append (",\n"); this.mapAddKey ("mo_bases"); this.mapOpen (); { var sep = null; for (var key, $key = this.moBases.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { if (key.startsWith ("!")) continue; this.append (sep); this.mapAddKeyValue (key, this.moBases.get (key), "\n"); sep = ",\n"; } }this.mapClose (); this.moBases.clear (); }); Clazz.defineMethod (c$, "writeObject", function (o) { if (Clazz.instanceOf (o, J.quantum.SlaterData)) { this.oc.append (o.toString ()); } else { Clazz.superCall (this, J.adapter.writers.QCJSONWriter, "writeObject", [o]); }}, "~O"); c$.$QCJSONWriter$SparseArray$ = function () { Clazz.pu$h(self.c$); c$ = Clazz.decorateAsClass (function () { Clazz.prepareCallback (this, arguments); this.repeatCount = 0; this.elementCount = 0; this.$lastElement = null; this.sep = ""; this.type = null; this.isRLE = false; Clazz.instantialize (this, arguments); }, J.adapter.writers.QCJSONWriter, "SparseArray", JU.SB); Clazz.makeConstructor (c$, function (a) { Clazz.superConstructor (this, J.adapter.writers.QCJSONWriter.SparseArray, []); this.type = a; this.isRLE = (a.equals ("_RLE_")); }, "~S"); Clazz.defineMethod (c$, "add", function (a) { if (a == null) a = "null"; if (!this.isRLE) { this.append (this.sep); this.append (a); this.sep = ","; return; }if (this.repeatCount > 0 && !a.equals (this.$lastElement)) { this.append (this.sep); this.appendI (this.repeatCount); this.sep = ","; this.append (this.sep); this.append (this.$lastElement); this.repeatCount = 0; }this.$lastElement = a; this.repeatCount++; this.elementCount++; }, "~S"); Clazz.defineMethod (c$, "lastElement", function () { return this.$lastElement; }); Clazz.defineMethod (c$, "isEmpty", function () { return (this.elementCount == 0); }); Clazz.defineMethod (c$, "allNaN", function () { return (this.allSame () && JU.PT.parseFloat (this.$lastElement) == NaN); }); Clazz.defineMethod (c$, "allNull", function () { return (this.allSame () && this.$lastElement.equals ("null")); }); Clazz.defineMethod (c$, "allEmptyString", function () { return (this.allSame () && this.$lastElement.equals ("")); }); Clazz.defineMethod (c$, "allSame", function () { return (!this.isEmpty () && this.elementCount == this.repeatCount); }); Clazz.defineMethod (c$, "allZero", function () { return (this.allSame () && JU.PT.parseFloat (this.$lastElement) != NaN); }); Clazz.defineMethod (c$, "hasValues", function () { return (!this.allSame () || !this.allNull () && !this.allEmptyString ()); }); Clazz.defineMethod (c$, "isNumericAndNonZero", function () { return (this.allSame () && !this.allNaN () && !this.allZero ()); }); Clazz.defineMethod (c$, "toString", function () { var a = Clazz.superCall (this, J.adapter.writers.QCJSONWriter.SparseArray, "toString", []); return (a.length == 0 ? "[]" : "[\"" + this.type + "\"," + a + (this.repeatCount > 0 ? this.sep + this.repeatCount + "," + this.$lastElement : "") + "]"); }); c$ = Clazz.p0p (); }; Clazz.defineStatics (c$, "integrationKeyMap", null); });
from datetime import datetime from dagster import Out, job, op from dagster.utils import script_relative_path from dagster_pandas import create_dagster_pandas_dataframe_type from pandas import DataFrame, read_csv # start_summary def compute_trip_dataframe_summary_statistics(dataframe): return { "min_start_time": min(dataframe["start_time"]).strftime("%Y-%m-%d"), "max_end_time": max(dataframe["end_time"]).strftime("%Y-%m-%d"), "num_unique_bikes": str(dataframe["bike_id"].nunique()), "n_rows": len(dataframe), "columns": str(dataframe.columns), } SummaryStatsTripDataFrame = create_dagster_pandas_dataframe_type( name="SummaryStatsTripDataFrame", event_metadata_fn=compute_trip_dataframe_summary_statistics ) # end_summary @op(out=Out(SummaryStatsTripDataFrame)) def load_summary_stats_trip_dataframe() -> DataFrame: return read_csv( script_relative_path("./ebike_trips.csv"), parse_dates=["start_time", "end_time"], date_parser=lambda x: datetime.strptime(x, "%Y-%m-%d %H:%M:%S.%f"), dtype={"color": "category"}, ) @job def summary_stats_trip(): load_summary_stats_trip_dataframe()
import store from "store" let { id , nm} = store.get("currentCity") || {id:1,nm:"北京"} const state = { cityId:id, nm } const mutations = { setCity(state,{id , nm}){ state.cityId = id state.nm = nm } } const actions = { saveCity({commit},payload ){ commit('setCity',payload) } } export default { namespaced: true, state, mutations, actions }
import React from 'react'; import ShallowRenderer from 'react-test-renderer/shallow'; import FormData from '../components/FormData'; import puppeteer from 'puppeteer'; let page = null; let browser = null; beforeAll(async () => { browser = await puppeteer.launch(); page = await browser.newPage(); }); describe('<FormData/>', () => { test('test if form is filled', async () => { const renderer = new ShallowRenderer(); renderer.render(<FormData firstName="Krishna" lastName="Chaitanya" email="test@test.com" message="test"/>); const result = renderer.getRenderOutput(); expect(result.props.children).toEqual([ <h5>Form Data</h5>, <pre className="black white-text"> {JSON.stringify({ firstName: 'Krishna', lastName: 'Chaitanya', email: 'test@test.com', message: 'test' }, null, 2)} </pre>, <br/>, <br/> ]) }) }) afterAll(() => { browser.close(); });
(window.webpackJsonp=window.webpackJsonp||[]).push([["locale-display-names.sah"],{"./node_modules/@formatjs/intl-displaynames/locale-data/sah.js":function(a,M){Intl.DisplayNames&&"function"==typeof Intl.DisplayNames.__addLocaleData&&Intl.DisplayNames.__addLocaleData({data:{types:{language:{long:{ab:"Абхаастыы",af:"Аппырыкааныстыы",agq:"agq",ak:"ak",ale:"Алеуттуу",am:"Амхаардыы",ar:"Араабтыы","ar-001":"Араабтыы (Аан дойду)",as:"as",asa:"asa",ast:"Астуурдуу",av:"Аваардыы",az:"Адьырбайдьаанныы",bas:"bas",be:"Бөлөрүүстүү",bem:"bem",bez:"bez",bg:"Булҕаардыы",bm:"bm",bn:"Бенгаллыы",bo:"Тибиэттии",br:"br",brx:"brx",bs:"Босныйалыы",ca:"Каталаанныы",ccp:"ccp",ce:"Чэчиэннии",ceb:"ceb",cgg:"cgg",chr:"chr",ckb:"Киин куурдуу",co:"co",cs:"Чиэхтии",cu:"cu",cy:"cy",da:"Даатскайдыы",dav:"dav",de:"Ниэмэстии","de-AT":"Ниэмэстии (AT)","de-CH":"Ниэмэстии (CH)",dje:"dje",doi:"doi",dsb:"dsb",dua:"dua",dyo:"dyo",dz:"dz",ebu:"ebu",ee:"ee",el:"Гириэктии",en:"Ааҥыллыы","en-AU":"Ааҥыллыы (AU)","en-CA":"Ааҥыллыы (Канаада)","en-GB":"Ааҥыллыы (Улуу Британия)","en-US":"Ааҥыллыы (Америка Холбоһуктаах Штааттара)",eo:"eo",es:"Ыспаанныы","es-419":"Ыспаанныы (419)","es-ES":"Ыспаанныы (ES)","es-MX":"Ыспаанныы (Миэксикэ)",et:"Эстиэнийэлии",eu:"eu",ewo:"ewo",fa:"Пиэристии","fa-AF":"Пиэристии (AF)",ff:"ff",fi:"Пииннии",fil:"Пилипииннии",fo:"fo",fr:"Боронсуустуу","fr-CA":"Боронсуустуу (Канаада)","fr-CH":"Боронсуустуу (CH)",frc:"frc",fur:"fur",fy:"fy",ga:"ga",gd:"gd",gl:"gl",gsw:"gsw",gu:"gu",guz:"guz",gv:"gv",ha:"ha",haw:"haw",he:"he",hi:"hi",hmn:"hmn",hr:"hr",hsb:"hsb",ht:"ht",hu:"Бэҥгиэрдии",hy:"Эрмээннии",ia:"ia",id:"id",ig:"ig",ii:"ii",is:"is",it:"Ытаалыйалыы",ja:"Дьоппуоннуу",jgo:"jgo",jmc:"jmc",jv:"jv",ka:"Курусууннуу",kab:"kab",kam:"kam",kde:"kde",kea:"kea",kgp:"kgp",khq:"khq",ki:"ki",kk:"Хаһаахтыы",kkj:"kkj",kl:"kl",kln:"kln",km:"km",kn:"kn",ko:"Кэриэйдии",kok:"kok",ks:"ks",ksb:"ksb",ksf:"ksf",ksh:"ksh",ku:"ku",kw:"kw",ky:"Кыргыстыы",la:"Латыынныы",lag:"lag",lb:"lb",lg:"lg",lij:"lij",lkt:"lkt",ln:"ln",lo:"lo",lou:"lou",lrc:"lrc",lt:"lt",lu:"lu",luo:"luo",luy:"luy",lv:"lv",mai:"mai",mas:"mas",mer:"mer",mfe:"mfe",mg:"mg",mgh:"mgh",mgo:"mgo",mi:"mi",mk:"mk",ml:"ml",mn:"Моҕуоллуу",mni:"mni",mr:"mr",ms:"Малаайдыы",mt:"mt",mua:"mua",mul:"mul",my:"my",mzn:"mzn",naq:"naq",nb:"nb",nd:"nd",nds:"nds","nds-NL":"nds (NL)",ne:"Ньыпааллыы",nl:"nl","nl-BE":"nl (BE)",nmg:"nmg",nn:"nn",nnh:"nnh",no:"no",nog:"Нагаайдыы",nus:"nus",nv:"nv",ny:"ny",nyn:"nyn",om:"om",or:"or",os:"os",pa:"Пандьаабтыы",pcm:"pcm",pl:"pl",prg:"prg",ps:"ps",pt:"Португааллыы","pt-BR":"Португааллыы (Бразилия)","pt-PT":"Португааллыы (PT)",qu:"qu",rm:"rm",rn:"rn",ro:"Румыынныы","ro-MD":"Румыынныы (MD)",rof:"rof",ru:"Нууччалыы",rw:"rw",rwk:"rwk",sa:"sa",sah:"саха тыла",saq:"saq",sat:"sat",sbp:"sbp",sd:"sd",se:"se",seh:"seh",ses:"ses",sg:"sg",shi:"shi",si:"si",sk:"Словаактыы",sl:"sl",sm:"sm",smn:"smn",sn:"sn",so:"so",sq:"Албаанныы",sr:"sr",st:"st",su:"su",sv:"sv",sw:"sw","sw-CD":"sw (CD)",ta:"Тамыллыы",te:"Төлүгүлүү",teo:"teo",tg:"Тадьыыктыы",th:"th",ti:"ti",tk:"tk",to:"to",tr:"tr",tt:"Татаардыы",twq:"twq",tzm:"tzm",ug:"Уйгуурдуу",uk:"Украйыыньыстыы",und:"und",ur:"ur",uz:"Үзбиэктии",vai:"vai",vi:"vi",vo:"vo",vun:"vun",wae:"wae",wo:"wo",xh:"xh",xog:"xog",yav:"yav",yi:"yi",yo:"yo",yue:"yue",zgh:"zgh",zh:"Кытайдыы","zh-Hans":"Кытайдыы (Hans)","zh-Hant":"Кытайдыы (Hant)",zu:"Зуулулуу",zxx:"zxx"},short:{az:"Адьырбайдьаанныы","en-GB":"Ааҥыллыы (Улуу Британия)","en-US":"Ааҥыллыы (АХШ)"},narrow:{}},region:{long:{142:"142",143:"143",145:"145",150:"150",151:"151",154:"154",155:"155",202:"202",419:"419","001":"Аан дойду","002":"Аапырыка","003":"Хотугу Эмиэрикэ","005":"Соҕуруу Эмиэрикэ","009":"009","011":"011","013":"013","014":"014","015":"015","017":"017","018":"018","019":"019","021":"021","029":"029","030":"030","034":"034","035":"035","039":"039","053":"053","054":"054","057":"057","061":"061",AC:"AC",AD:"AD",AE:"AE",AF:"AF",AG:"AG",AI:"AI",AL:"AL",AM:"AM",AO:"AO",AQ:"AQ",AR:"AR",AS:"AS",AT:"AT",AU:"AU",AW:"AW",AX:"AX",AZ:"AZ",BA:"BA",BB:"BB",BD:"BD",BE:"BE",BF:"BF",BG:"BG",BH:"BH",BI:"BI",BJ:"BJ",BL:"BL",BM:"BM",BN:"BN",BO:"BO",BQ:"BQ",BR:"Бразилия",BS:"BS",BT:"BT",BV:"BV",BW:"BW",BY:"BY",BZ:"BZ",CA:"Канаада",CC:"CC",CD:"CD",CF:"CF",CG:"CG",CH:"CH",CI:"CI",CK:"CK",CL:"Чиили",CM:"CM",CN:"Кытай",CO:"CO",CP:"CP",CR:"CR",CU:"Кууба",CV:"CV",CW:"CW",CX:"CX",CY:"CY",CZ:"CZ",DE:"DE",DG:"DG",DJ:"DJ",DK:"DK",DM:"DM",DO:"DO",DZ:"DZ",EA:"EA",EC:"EC",EE:"Эстония",EG:"EG",EH:"EH",ER:"ER",ES:"ES",ET:"ET",EU:"EU",EZ:"EZ",FI:"Финляндия",FJ:"FJ",FK:"FK",FM:"FM",FO:"FO",FR:"FR",GA:"GA",GB:"Улуу Британия",GD:"GD",GE:"GE",GF:"GF",GG:"GG",GH:"GH",GI:"GI",GL:"GL",GM:"GM",GN:"GN",GP:"GP",GQ:"GQ",GR:"GR",GS:"GS",GT:"GT",GU:"GU",GW:"GW",GY:"GY",HK:"HK",HM:"HM",HN:"HN",HR:"HR",HT:"HT",HU:"HU",IC:"IC",ID:"ID",IE:"Ирландия",IL:"IL",IM:"Мэн арыы",IN:"IN",IO:"IO",IQ:"IQ",IR:"IR",IS:"Исландия",IT:"IT",JE:"JE",JM:"Дьамаайка",JO:"JO",JP:"JP",KE:"KE",KG:"KG",KH:"KH",KI:"KI",KM:"KM",KN:"KN",KP:"KP",KR:"KR",KW:"KW",KY:"KY",KZ:"KZ",LA:"LA",LB:"LB",LC:"LC",LI:"LI",LK:"LK",LR:"LR",LS:"LS",LT:"Литва",LU:"LU",LV:"Латвия",LY:"Лиибийэ",MA:"MA",MC:"MC",MD:"MD",ME:"ME",MF:"MF",MG:"MG",MH:"MH",MK:"MK",ML:"ML",MM:"MM",MN:"MN",MO:"MO",MP:"MP",MQ:"MQ",MR:"MR",MS:"MS",MT:"MT",MU:"MU",MV:"MV",MW:"MW",MX:"Миэксикэ",MY:"MY",MZ:"MZ",NA:"NA",NC:"NC",NE:"NE",NF:"NF",NG:"NG",NI:"NI",NL:"NL",NO:"Норвегия",NP:"NP",NR:"NR",NU:"NU",NZ:"NZ",OM:"OM",PA:"PA",PE:"PE",PF:"PF",PG:"PG",PH:"PH",PK:"PK",PL:"PL",PM:"PM",PN:"PN",PR:"PR",PS:"PS",PT:"PT",PW:"PW",PY:"PY",QA:"QA",QO:"QO",RE:"RE",RO:"RO",RS:"RS",RU:"Арассыыйа",RW:"RW",SA:"SA",SB:"SB",SC:"SC",SD:"Судаан",SE:"Швеция",SG:"SG",SH:"SH",SI:"SI",SJ:"SJ",SK:"SK",SL:"SL",SM:"SM",SN:"SN",SO:"SO",SR:"SR",SS:"SS",ST:"ST",SV:"SV",SX:"SX",SY:"SY",SZ:"SZ",TA:"TA",TC:"TC",TD:"TD",TF:"TF",TG:"TG",TH:"TH",TJ:"TJ",TK:"TK",TL:"TL",TM:"TM",TN:"TN",TO:"TO",TR:"TR",TT:"TT",TV:"TV",TW:"TW",TZ:"TZ",UA:"UA",UG:"UG",UM:"UM",UN:"UN",US:"Америка Холбоһуктаах Штааттара",UY:"UY",UZ:"UZ",VA:"VA",VC:"VC",VE:"VE",VG:"VG",VI:"VI",VN:"VN",VU:"VU",WF:"WF",WS:"WS",XA:"XA",XB:"XB",XK:"XK",YE:"YE",YT:"YT",ZA:"ZA",ZM:"ZM",ZW:"ZW",ZZ:"ZZ"},short:{GB:"Улуу Британия",HK:"HK",MO:"MO",PS:"PS",US:"АХШ"},narrow:{}},script:{long:{Adlm:"Adlm",Aghb:"Aghb",Ahom:"Ahom",Arab:"Арааптыы",Aran:"Aran",Armi:"Armi",Armn:"Эрмээннии",Avst:"Avst",Bali:"Bali",Bamu:"Bamu",Bass:"Bass",Batk:"Batk",Beng:"Beng",Bhks:"Bhks",Bopo:"Bopo",Brah:"Brah",Brai:"Brai",Bugi:"Bugi",Buhd:"Buhd",Cakm:"Cakm",Cans:"Cans",Cari:"Cari",Cham:"Cham",Cher:"Cher",Chrs:"Chrs",Copt:"Copt",Cprt:"Cprt",Cyrl:"Нууччалыы",Deva:"Deva",Diak:"Diak",Dogr:"Dogr",Dsrt:"Dsrt",Dupl:"Dupl",Egyp:"Egyp",Elba:"Elba",Elym:"Elym",Ethi:"Ethi",Geor:"Geor",Glag:"Glag",Gong:"Gong",Gonm:"Gonm",Goth:"Goth",Gran:"Gran",Grek:"Гириэктии",Gujr:"Gujr",Guru:"Guru",Hanb:"Hanb",Hang:"Hang",Hani:"Hani",Hano:"Hano",Hans:"Hans",Hant:"Hant",Hatr:"Hatr",Hebr:"Hebr",Hira:"Hira",Hluw:"Hluw",Hmng:"Hmng",Hmnp:"Hmnp",Hrkt:"Hrkt",Hung:"Hung",Ital:"Ital",Jamo:"Jamo",Java:"Java",Jpan:"Дьоппуоннуу",Kali:"Kali",Kana:"Kana",Khar:"Khar",Khmr:"Khmr",Khoj:"Khoj",Kits:"Kits",Knda:"Knda",Kore:"Кэриэйдии",Kthi:"Kthi",Lana:"Lana",Laoo:"Laoo",Latn:"Латыынныы",Lepc:"Lepc",Limb:"Limb",Lina:"Lina",Linb:"Linb",Lisu:"Lisu",Lyci:"Lyci",Lydi:"Lydi",Mahj:"Mahj",Maka:"Maka",Mand:"Mand",Mani:"Mani",Marc:"Marc",Medf:"Medf",Mend:"Mend",Merc:"Merc",Mero:"Mero",Mlym:"Mlym",Modi:"Modi",Mong:"Моҕуоллуу",Mroo:"Mroo",Mtei:"Mtei",Mult:"Mult",Mymr:"Mymr",Nand:"Nand",Narb:"Narb",Nbat:"Nbat",Newa:"Newa",Nkoo:"Nkoo",Nshu:"Nshu",Ogam:"Ogam",Olck:"Olck",Orkh:"Orkh",Orya:"Orya",Osge:"Osge",Osma:"Osma",Palm:"Palm",Pauc:"Pauc",Perm:"Perm",Phag:"Phag",Phli:"Phli",Phlp:"Phlp",Phnx:"Phnx",Plrd:"Plrd",Prti:"Prti",Qaag:"Qaag",Rjng:"Rjng",Rohg:"Rohg",Runr:"Runr",Samr:"Samr",Sarb:"Sarb",Saur:"Saur",Sgnw:"Sgnw",Shaw:"Shaw",Shrd:"Shrd",Sidd:"Sidd",Sind:"Sind",Sinh:"Sinh",Sogd:"Sogd",Sogo:"Sogo",Sora:"Sora",Soyo:"Soyo",Sund:"Sund",Sylo:"Sylo",Syrc:"Syrc",Tagb:"Tagb",Takr:"Takr",Tale:"Tale",Talu:"Talu",Taml:"Taml",Tang:"Tang",Tavt:"Tavt",Telu:"Telu",Tfng:"Tfng",Tglg:"Tglg",Thaa:"Thaa",Thai:"Таайдыы",Tibt:"Tibt",Tirh:"Tirh",Ugar:"Ugar",Vaii:"Vaii",Wara:"Wara",Wcho:"Wcho",Xpeo:"Xpeo",Xsux:"Xsux",Yezi:"Yezi",Yiii:"Yiii",Zanb:"Zanb",Zinh:"Zinh",Zmth:"Zmth",Zsye:"Zsye",Zsym:"Zsym",Zxxx:"Суруллубатах",Zyyy:"Zyyy",Zzzz:"Биллибэт сурук"},short:{},narrow:{}},currency:{long:{ADP:"ADP",AED:"AED",AFA:"AFA",AFN:"AFN",ALK:"ALK",ALL:"ALL",AMD:"AMD",ANG:"ANG",AOA:"AOA",AOK:"AOK",AON:"AON",AOR:"AOR",ARA:"ARA",ARL:"ARL",ARM:"ARM",ARP:"ARP",ARS:"ARS",ATS:"ATS",AUD:"AUD",AWG:"AWG",AZM:"AZM",AZN:"AZN",BAD:"BAD",BAM:"BAM",BAN:"BAN",BBD:"BBD",BDT:"BDT",BEC:"BEC",BEF:"BEF",BEL:"BEL",BGL:"BGL",BGM:"BGM",BGN:"BGN",BGO:"BGO",BHD:"BHD",BIF:"BIF",BMD:"BMD",BND:"BND",BOB:"BOB",BOL:"BOL",BOP:"BOP",BOV:"BOV",BRB:"BRB",BRC:"BRC",BRE:"BRE",BRL:"BRL",BRN:"BRN",BRR:"BRR",BRZ:"BRZ",BSD:"BSD",BTN:"BTN",BUK:"BUK",BWP:"BWP",BYB:"BYB",BYN:"BYN",BYR:"BYR",BZD:"BZD",CAD:"CAD",CDF:"CDF",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLE:"CLE",CLF:"CLF",CLP:"CLP",CNH:"CNH",CNX:"CNX",CNY:"CNY",COP:"COP",COU:"COU",CRC:"CRC",CSD:"CSD",CSK:"CSK",CUC:"CUC",CUP:"CUP",CVE:"CVE",CYP:"CYP",CZK:"CZK",DDM:"DDM",DEM:"DEM",DJF:"DJF",DKK:"DKK",DOP:"DOP",DZD:"DZD",ECS:"ECS",ECV:"ECV",EEK:"EEK",EGP:"EGP",ERN:"ERN",ESA:"ESA",ESB:"ESB",ESP:"ESP",ETB:"ETB",EUR:"EUR",FIM:"FIM",FJD:"FJD",FKP:"FKP",FRF:"FRF",GBP:"GBP",GEK:"GEK",GEL:"GEL",GHC:"GHC",GHS:"GHS",GIP:"GIP",GMD:"GMD",GNF:"GNF",GNS:"GNS",GQE:"GQE",GRD:"GRD",GTQ:"GTQ",GWE:"GWE",GWP:"GWP",GYD:"GYD",HKD:"HKD",HNL:"HNL",HRD:"HRD",HRK:"HRK",HTG:"HTG",HUF:"HUF",IDR:"IDR",IEP:"IEP",ILP:"ILP",ILR:"ILR",ILS:"ILS",INR:"INR",IQD:"IQD",IRR:"IRR",ISJ:"ISJ",ISK:"ISK",ITL:"ITL",JMD:"JMD",JOD:"JOD",JPY:"JPY",KES:"KES",KGS:"KGS",KHR:"KHR",KMF:"KMF",KPW:"KPW",KRH:"KRH",KRO:"KRO",KRW:"KRW",KWD:"KWD",KYD:"KYD",KZT:"KZT",LAK:"LAK",LBP:"LBP",LKR:"LKR",LRD:"LRD",LSL:"LSL",LTL:"LTL",LTT:"LTT",LUC:"LUC",LUF:"LUF",LUL:"LUL",LVL:"LVL",LVR:"LVR",LYD:"LYD",MAD:"MAD",MAF:"MAF",MCF:"MCF",MDC:"MDC",MDL:"MDL",MGA:"MGA",MGF:"MGF",MKD:"MKD",MKN:"MKN",MLF:"MLF",MMK:"MMK",MNT:"MNT",MOP:"MOP",MRO:"MRO",MRU:"MRU",MTL:"MTL",MTP:"MTP",MUR:"MUR",MVP:"MVP",MVR:"MVR",MWK:"MWK",MXN:"MXN",MXP:"MXP",MXV:"MXV",MYR:"MYR",MZE:"MZE",MZM:"MZM",MZN:"MZN",NAD:"NAD",NGN:"NGN",NIC:"NIC",NIO:"NIO",NLG:"NLG",NOK:"NOK",NPR:"NPR",NZD:"NZD",OMR:"OMR",PAB:"PAB",PEI:"PEI",PEN:"PEN",PES:"PES",PGK:"PGK",PHP:"PHP",PKR:"PKR",PLN:"PLN",PLZ:"PLZ",PTE:"PTE",PYG:"PYG",QAR:"QAR",RHD:"RHD",ROL:"ROL",RON:"RON",RSD:"RSD",RUB:"Арассыыйа солкуобайа",RUR:"RUR",RWF:"RWF",SAR:"SAR",SBD:"SBD",SCR:"SCR",SDD:"SDD",SDG:"SDG",SDP:"SDP",SEK:"SEK",SGD:"SGD",SHP:"SHP",SIT:"SIT",SKK:"SKK",SLL:"SLL",SOS:"SOS",SRD:"SRD",SRG:"SRG",SSP:"SSP",STD:"STD",STN:"STN",SUR:"SUR",SVC:"SVC",SYP:"SYP",SZL:"SZL",THB:"THB",TJR:"TJR",TJS:"TJS",TMM:"TMM",TMT:"TMT",TND:"TND",TOP:"TOP",TPE:"TPE",TRL:"TRL",TRY:"TRY",TTD:"TTD",TWD:"TWD",TZS:"TZS",UAH:"UAH",UAK:"UAK",UGS:"UGS",UGX:"UGX",USD:"АХШ дуоллара",USN:"USN",USS:"USS",UYI:"UYI",UYP:"UYP",UYU:"UYU",UYW:"UYW",UZS:"UZS",VEB:"VEB",VEF:"VEF",VES:"VES",VND:"VND",VNN:"VNN",VUV:"VUV",WST:"WST",XAF:"XAF",XAG:"XAG",XAU:"XAU",XBA:"XBA",XBB:"XBB",XBC:"XBC",XBD:"XBD",XCD:"XCD",XDR:"XDR",XEU:"XEU",XFO:"XFO",XFU:"XFU",XOF:"XOF",XPD:"XPD",XPF:"XPF",XPT:"XPT",XRE:"XRE",XSU:"XSU",XTS:"XTS",XUA:"XUA",XXX:"XXX",YDD:"YDD",YER:"YER",YUD:"YUD",YUM:"YUM",YUN:"YUN",YUR:"YUR",ZAL:"ZAL",ZAR:"ZAR",ZMK:"ZMK",ZMW:"ZMW",ZRN:"ZRN",ZRZ:"ZRZ",ZWD:"ZWD",ZWL:"ZWL",ZWR:"ZWR"},short:{},narrow:{}}},patterns:{locale:"{0} ({1})"}},locale:"sah"})}}]);
from modules.layers.encoders import * from modules.layers.decoders import * from modules.layers.embedders import * import abc import sys from .released_models import released_models class NerModel(nn.Module, metaclass=abc.ABCMeta): """Base class for all Models""" def __init__(self, encoder, decoder, use_cuda=True): super(NerModel, self).__init__() self.encoder = encoder self.decoder = decoder self.use_cuda = use_cuda if use_cuda: self.cuda() @abc.abstractmethod def forward(self, *batch): # return self.decoder(self.encoder(batch)) raise NotImplementedError("abstract method forward must be implemented") @abc.abstractmethod def score(self, *batch): # return self.decoder.score(self.encoder(batch)) raise NotImplementedError("abstract method score must be implemented") @abc.abstractmethod def create(self, *args): raise NotImplementedError("abstract method create must be implemented") def get_n_trainable_params(self): pp = 0 for p in list(self.parameters()): if p.requires_grad: num = 1 for s in list(p.size()): num = num * s pp += num return pp def get_config(self): try: config = { "name": self.__class__.__name__, "params": { "encoder": self.encoder.get_config(), "decoder": self.decoder.get_config(), "use_cuda": self.use_cuda } } except AttributeError: config = {} print("config is empty :(. Maybe for this model from_config has not implemented yet.", file=sys.stderr) except NotImplemented: config = {} print("config is empty :(. Maybe for this model from_config has not implemented yet.", file=sys.stderr) return config @classmethod def from_config(cls, config): encoder = released_models["encoder"].from_config(**config["encoder"]["params"]) decoder = released_models["decoder"].from_config(**config["decoder"]["params"]) return cls(encoder, decoder, config["use_cuda"]) class BertBiLSTMCRF(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # CRFDecoder params input_dropout=0.5, # Global params use_cuda=True, # Meta meta_dim=None): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = CRFDecoder.create(label_size, encoder.output_dim, input_dropout) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnCRF(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # AttnCRFDecoder params key_dim=64, val_dim=64, num_heads=3, input_dropout=0.5, # Global params use_cuda=True, # Meta meta_dim=None): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = AttnCRFDecoder.create( label_size, encoder.output_dim, input_dropout, key_dim, val_dim, num_heads) return cls(encoder, decoder, use_cuda) class BertAttnCRF(NerModel): def forward(self, batch): output, _ = self.encoder(*batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # AttnCRFDecoder params key_dim=64, val_dim=64, num_heads=3, input_dropout=0.5, # Global params use_cuda=True): encoder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) decoder = AttnCRFDecoder.create( label_size, embedding_dim, input_dropout, key_dim, val_dim, num_heads) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnNMT(NerModel): """Reused from https://github.com/DSKSD/RNN-for-Joint-NLU""" def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # NMTDecoder params dec_embedding_dim=64, dec_hidden_dim=256, dec_rnn_layers=1, input_dropout=0.5, pad_idx=0, # Global params use_cuda=True, # Meta meta_dim=None): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = NMTDecoder.create( label_size, dec_embedding_dim, dec_hidden_dim, dec_rnn_layers, input_dropout, pad_idx, use_cuda) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnNMTCRF(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # NMTDecoder params dec_embedding_dim=64, dec_hidden_dim=256, dec_rnn_layers=1, input_dropout=0.5, pad_idx=0, # Global params use_cuda=True, # Meta meta_dim=None): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = NMTCRFDecoder.create( label_size, dec_embedding_dim, dec_hidden_dim, dec_rnn_layers, input_dropout, pad_idx, use_cuda) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnCRFJoint(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1], batch[-3]) @classmethod def create(cls, label_size, intent_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # AttnCRFDecoder params key_dim=64, val_dim=64, num_heads=3, input_dropout=0.5, # Global params use_cuda=True, # Meta meta_dim=None): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = AttnCRFJointDecoder.create( label_size, encoder.output_dim, intent_size, input_dropout, key_dim, val_dim, num_heads) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnNMTJoint(NerModel): """Reused from https://github.com/DSKSD/RNN-for-Joint-NLU""" def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1], batch[-3]) @classmethod def create(cls, label_size, intent_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # NMTDecoder params dec_embedding_dim=64, dec_hidden_dim=256, dec_rnn_layers=1, input_dropout=0.5, pad_idx=0, # Global params use_cuda=True, # Meta meta_dim=None): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = NMTJointDecoder.create( label_size, intent_size, dec_embedding_dim, dec_hidden_dim, dec_rnn_layers, input_dropout, pad_idx, use_cuda) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnNCRFJoint(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1], batch[-3]) @classmethod def create(cls, label_size, intent_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # AttnNCRFDecoder params key_dim=64, val_dim=64, num_heads=3, input_dropout=0.5, # Global params use_cuda=True, # Meta meta_dim=None, # NCRFpp nbest=8): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = AttnNCRFJointDecoder.create( label_size, encoder.output_dim, intent_size, input_dropout, key_dim, val_dim, num_heads, use_cuda, nbest=nbest) return cls(encoder, decoder, use_cuda) class BertBiLSTMAttnNCRF(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, # AttnNCRFDecoder params key_dim=64, val_dim=64, num_heads=3, input_dropout=0.5, # Global params use_cuda=True, # Meta meta_dim=None, # NCRFpp nbest=8): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = AttnNCRFDecoder.create( label_size, encoder.output_dim, input_dropout, key_dim, val_dim, num_heads, nbest) return cls(encoder, decoder, use_cuda) class BertBiLSTMNCRF(NerModel): def forward(self, batch): output, _ = self.encoder(batch) return self.decoder(output, batch[-2]) def score(self, batch): output, _ = self.encoder(batch) return self.decoder.score(output, batch[-2], batch[-1]) @classmethod def create(cls, label_size, # BertEmbedder params bert_config_file, init_checkpoint_pt, embedding_dim=768, bert_mode="weighted", freeze=True, # BertBiLSTMEncoder params enc_hidden_dim=128, rnn_layers=1, input_dropout=0.5, # Global params use_cuda=True, # Meta meta_dim=None, # NCRFpp nbest=8): embedder = BertEmbedder.create( bert_config_file, init_checkpoint_pt, embedding_dim, use_cuda, bert_mode, freeze) if meta_dim is None: encoder = BertBiLSTMEncoder.create(embedder, enc_hidden_dim, rnn_layers, use_cuda) else: encoder = BertMetaBiLSTMEncoder.create(embedder, meta_dim, enc_hidden_dim, rnn_layers, use_cuda) decoder = NCRFDecoder.create( label_size, encoder.output_dim, input_dropout, nbest) return cls(encoder, decoder, use_cuda)
const ageUpSound = new Audio ("/client/sound/ageUp.mp3") const shipSelectSound = new Audio ("/client/sound/frigateSelect.mp3") const townSelectSound = new Audio ("/client/sound/townSelect.mp3") const nationSelectMusic = new Audio ("/client/sound/music/nationSelectMusic.mp3") const buttonClickAudio2 = new Audio ( "https://raw.githubusercontent.com/AvixSoft/CW/master/sound/buttonClick2.mp3?raw=true"); const ageOfExplorationMusic = new Audio ("/client/sound/music/ageOfExplorationMusic.mp3") const ageOfReasonMusic = new Audio ("/client/sound/music/ageOfReasonMusic.mp3") const industrialRevolutionMusic = new Audio ("/client/sound/music/industrialAgeMusic.mp3") const ageOfReformMusic = new Audio ("/client/sound/music/ageOfReformMusic.mp3") const prog = document; const RULERNAME = "rulerName"; const CURRENTWEALTH = "currentWealth"; const ARMYPOP = "armyPop"; const CURRENTINCOME = "currentIncome"; const TURNCOUNT = "turnCount"; const CURRENTYEAR = "currentYear" const CURRENTAGE = "currentAge" const AGETAB = "ageTab" const AGENAME = "ageName" const AGEYEARS = "ageYears" const AGEINFO = "ageInfo" const AGEICON = "ageIcon" const VIS = "visibility"; const visTrue = "visible"; const visFalse = "hidden"; const visNone = "none"; const RULERICON = "rulerIcon"; const NATIONFLAG = "nationFlag" const rulerNameJS = prog.getElementById(RULERNAME); const currentWealthJS = prog.getElementById(CURRENTWEALTH); const armyPopJS = prog.getElementById(ARMYPOP); const currentIncomeJS = prog.getElementById(CURRENTINCOME); const turnCountJS = prog.getElementById(TURNCOUNT); const currentYearJS = prog.getElementById(CURRENTYEAR); const currentAgeJS = prog.getElementById(CURRENTAGE); const ageTabJS = prog.getElementById(AGETAB); const ageNameJS = prog.getElementById(AGENAME); const ageYearJS = prog.getElementById(AGEYEARS); const ageInfoJS = prog.getElementById(AGEINFO); const mapJS = prog.getElementById('module'); const ageIconJS = prog.getElementById(AGEICON); const rulerInfoJS = prog.getElementById("rulerInfo"); const flagJS = prog.getElementById(NATIONFLAG); const rulerJS = prog.getElementById(RULERICON); const civInfoJS = prog.getElementById("civInfo"); let turnClock = 0; let armyTurnCount = 0; let year = 1600 let yearTurnCount = 0; let age = "Age of Exploration" let mapMaxValue = 1.5 let devMode = false let franceMapColor = "rgba(13, 20, 132, 0.7)" let englandMapColor = "rgba(255, 2, 2, 0.7)" let spainMapColor = "rgba(255, 251, 0, 0.849)" let dutchMapColor = "rgba(42, 187, 23, 0.849)" let dutchColor = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" let englandColor = "radial-gradient(circle, rgba(0,0,0,1) 0%, rgba(83,10,30,1) 0%, rgba(186,22,22,1) 100%)" let franceColor = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 100%)" let spainColor = "radial-gradient(circle, rgba(0,0,0,1) 0%, rgba(186,113,22,1) 0%, rgba(215,255,0,1) 100%)" let nativeColor = "rgba(87, 67, 2, 0.89)" let franceMode = false let englandMode = false let dutchMode = false let spainMode = false let franceColony = false let englandColony = false let dutchColony = false let spainColony = false let ns1 = false let ns2 = false let ns3 = false let ns4 = false let ns5 = false let ns6 = false let englishBuy = false let frenchBuy = false let spanishBuy = false let dutchBuy = false let ns1SELECT = false let ns2SELECT = false let ns3SELECT = false let ns4SELECT = false let ns5SELECT = false let ns6SELECT = false let ns1Colonized = false let ns2Colonized = false let ns3Colonized = false let ns4Colonized = false let ns5Colonized = false let ns6Colonized = false let colonized = false let colonizeCost = 5000 let nativeSettlement = false let frenchUnit = false let englandUnit = false let spanishUnit = false let dutchUnit = false let selectedArmy = "..." let pixelLoc = "px" let frenchTurnEnded = false let englishTurnEnded = false let spanishTurnEnded = false let dutchTurnEnded = false let turnADD = 0 let frenchArmyMoves = 1 let englishArmyMoves = 1 let spanishArmyMoves = 1 let dutchArmyMoves = 1 let age1 = false let age2 = false let age3 = false let age4 = false let age5 = false let age6 = false let age7 = false let quebec = false let jamestown = false let santoDomingo = false let newAmsterdam = false let frenchVictory = false let endTurnNow = false //Map algorythem var dragItem = document.querySelector("#module"); var container = document.body var active = false; var currentX; var currentY; var initialX; var initialY; var xOffset = 0; var yOffset = 0; let mapLoc = { x: 0, y: 0, xSize: 2700, ySize: 1800, camX: 0, camY: 0, scrollSpeedX: 0, scrollSpeedY: 0, } let bindings = { mouse: { x: 0, y: 0, buttons: [], actual: { x: 0, y: 0 } } }; document.onmousemove = event => { bindings.mouse.x = event.clientX + mapLoc.camX; bindings.mouse.y = event.clientY + mapLoc.camY; bindings.mouse.actual.x = event.clientX; bindings.mouse.actual.y = event.clientY; }; document.onmousedown = event => { bindings.mouse.buttons[event.button] = true; console.log(bindings.mouse.x + " " + bindings.mouse.y); }; document.onmouseup = event => { bindings.mouse.buttons[event.button] = false; }; let cityInfo = { cityName: "City Name", foundedYear: "1600", owner: "Some Nation", icon: "url(/client/img/somePic.xxx)" } let dutchObject = { wealth: 5000, income: 60, armyNumber: 50, navyNumber: 5, incomeADD: 1, defenseMult: 1.5, } let spainObject = { wealth: 5250, income: 40, armyNumber: 200, navyNumber: 5, incomeADD: 1, defenseMult: 1.5, } let englandObject = { wealth: 4900, income: 45, armyNumber: 300, navyNumber: 5, incomeADD: 1, defenseMult: 1.5, } let franceObject = { wealth: 5000, income: 50, armyNumber: 150, navyNumber: 5, incomeADD: 1, defenseMult: 1.5, } let nativesObject = { wealth: 10000, defenseMult: 1.5, } let ns1OwningDefMult = nativesObject.defenseMult let ns2OwningDefMult = nativesObject.defenseMult let ns3OwningDefMult = nativesObject.defenseMult let ns4OwningDefMult = nativesObject.defenseMult let ns5OwningDefMult = nativesObject.defenseMult let ns6OwningDefMult = nativesObject.defenseMult function displayInlineBlockTrue(){ prog.getElementById('buildMenuButton').style.display = "inline-block" prog.getElementById('recruitMenuButton').style.display = "inline-block" prog.getElementById('colonizeMenuButton').style.display = "none" prog.getElementById('travelMenuButton').style.display = "none" prog.getElementById('attackMenuButton').style.display = "none" prog.getElementById('siegeMenuButton').style.display = "none" prog.getElementById('tradeMenuButton').style.display = "none" } function displayInlineBlockFalse(){ prog.getElementById('buildMenuButton').style.display = "none" prog.getElementById('recruitMenuButton').style.display = "none" prog.getElementById('colonizeMenuButton').style.display = "none" prog.getElementById('travelMenuButton').style.display = "none" prog.getElementById('attackMenuButton').style.display = "none" prog.getElementById('siegeMenuButton').style.display = "inline-block" prog.getElementById('tradeMenuButton').style.display = "none" } function displayInlineBlockNatives(){ prog.getElementById('travelMenuButton').style.display = "none" prog.getElementById('attackMenuButton').style.display = "none" prog.getElementById('colonizeMenuButton').style.display = "inline-block" prog.getElementById('buildMenuButton').style.display = "none" prog.getElementById('recruitMenuButton').style.display = "none" prog.getElementById('siegeMenuButton').style.display = "inline-block" prog.getElementById('tradeMenuButton').style.display = "inline-block" } function displayInlineBlockYourUnit() { prog.getElementById('buildMenuButton').style.display = "none" prog.getElementById('recruitMenuButton').style.display = "none" prog.getElementById('colonizeMenuButton').style.display = "none" prog.getElementById('travelMenuButton').style.display = "inline-block" prog.getElementById('attackMenuButton').style.display = "none" prog.getElementById('siegeMenuButton').style.display = "none" prog.getElementById('tradeMenuButton').style.display = "none" } function displayInlineBlockNotYourUnit() { prog.getElementById('buildMenuButton').style.display = "none" prog.getElementById('recruitMenuButton').style.display = "none" prog.getElementById('colonizeMenuButton').style.display = "none" prog.getElementById('travelMenuButton').style.display = "none" prog.getElementById('attackMenuButton').style.display = "inline-block" prog.getElementById('siegeMenuButton').style.display = "none" prog.getElementById('tradeMenuButton').style.display = "none" } function displayInlineBlockYourNavy() { prog.getElementById('buildMenuButton').style.display = "none" prog.getElementById('recruitMenuButton').style.display = "none" prog.getElementById('colonizeMenuButton').style.display = "none" prog.getElementById('travelMenuButton').style.display = "none" prog.getElementById('attackMenuButton').style.display = "none" prog.getElementById('siegeMenuButton').style.display = "none" prog.getElementById('tradeMenuButton').style.display = "inline-block" } function displayInlineBlockNothing() { prog.getElementById('buildMenuButton').style.display = "none" prog.getElementById('recruitMenuButton').style.display = "none" prog.getElementById('colonizeMenuButton').style.display = "none" prog.getElementById('travelMenuButton').style.display = "none" prog.getElementById('attackMenuButton').style.display = "none" prog.getElementById('siegeMenuButton').style.display = "none" prog.getElementById('tradeMenuButton').style.display = "none" } //main variables for menu function removeElementMainMenu(mainX) { // Removes an element from the document let element = prog.getElementById("mainX"); element.parentNode.removeChild(element); }; function showGame() { prog.getElementById('module').style.backgroundImage = "url(/client/img/earthEuropa.jpg)" prog.getElementById('module').style.visibility = "visible" prog.getElementById('mainSelectionTabs').style.visibility = "visible" prog.getElementById('nationMenuInfo').style.visibility = "visible" prog.getElementById('rulerTab').style.visibility = "visible" // prog.getElementById('tabs').style.visibility = "visible" // prog.getElementById('locationsForEverything').style.visibility = "visible" } function removeMainX() { removeElementMainMenu(mainX) } function playSelectMusic(){ nationSelectMusic.play() nationSelectMusic.loop = true } //musicFunctions function enterGame() { setTimeout(playSelectMusic, 4000) setTimeout(showGame, 3000) prog.getElementById('topWoodLoad').style.animation = "topLoadComeDown 4s forwards" prog.getElementById('bottomWoodLoad').style.animation = "bottomLoadComeUp 4s forwards" prog.getElementById('mainTitle').style.setProperty("animation", "fadeX 1s"); prog.getElementById('mainSubTitle').style.setProperty("animation", "fadeX 1s"); setTimeout(removeMainX, 1500) }; const frenchColonies = ["Le Souixseau", "Oiile Memeleaux"]; let nationInfo = { initValues: { armySize: 150, wealth: 5000, settlers: 1, explorers: 2, fleetShips: 5, income: 50 }, ruler: "Henry IV", nationality: "French", flagIcon: "url(/client/img/flagFranceIcon.png)", rulerIcon: "url(/client/img/rulerFranceIcon.png)", nationColor: "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 100%)", }; function checkData() { currentAgeJS.innerHTML = age; rulerNameJS.innerHTML = nationInfo.ruler; if(franceMode) { currentWealthJS.innerHTML = franceObject.wealth + " Gold"; armyPopJS.innerHTML = "Garrison: " + franceObject.armyNumber; currentIncomeJS.innerHTML = franceObject.income + "+ GPT"; } if(englandMode) { currentWealthJS.innerHTML = englandObject.wealth + " Gold"; armyPopJS.innerHTML = "Garrison: " + englandObject.armyNumber; currentIncomeJS.innerHTML = englandObject.income + "+ GPT"; } if(spainMode) { currentWealthJS.innerHTML = spainObject.wealth + " Gold"; armyPopJS.innerHTML = "Garrison: " + spainObject.armyNumber; currentIncomeJS.innerHTML = spainObject.income + "+ GPT"; } if(dutchMode) { currentWealthJS.innerHTML = dutchObject.wealth + " Gold"; armyPopJS.innerHTML = "Garrison: " + dutchObject.armyNumber; currentIncomeJS.innerHTML = dutchObject.income + "+ GPT"; } turnCountJS.innerHTML = "Turn: " + turnClock; currentYearJS.innerHTML = year + " A.D."; mouseOutIcon() } function colonizeWealthCheck() { if(franceMode) { franceObject.wealth -= colonizeCost; franceObject.income += 5; currentIncomeJS.innerHTML = franceObject.income + "+ GPT"; currentWealthJS.innerHTML = franceObject.wealth + " Gold"; } if(englandMode) { englandObject.wealth -= colonizeCost; englandObject.income += 5; currentIncomeJS.innerHTML = englandObject.income + "+ GPT"; currentWealthJS.innerHTML = englandObject.wealth + " Gold"; } if(spainMode) { spainObject.wealth -= colonizeCost; spainObject.income += 5; currentIncomeJS.innerHTML = spainObject.income + "+ GPT"; currentWealthJS.innerHTML = spainObject.wealth + " Gold"; } if(dutchMode) { dutchObject.wealth -= colonizeCost; dutchObject.income += 5; currentIncomeJS.innerHTML = dutchObject.income + "+ GPT"; currentWealthJS.innerHTML = dutchObject.wealth + " Gold"; } } function gameStart() { if(year == 1600 && turnClock == 0){ } let isMobile = false; //initiate as false // device detection if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) { isMobile = true; } } function endTurn() { buttonClickAudio2.play() endTurnNow = true if(franceMode && endTurnNow){ frenchTurnEnded = true englishTurnEnded = false spanishTurnEnded = false dutchTurnEnded = false turnADD += 1 switchENG() armyPopJS.innerHTML = "Garrison: " + englandObject.armyNumber; currentWealthJS.innerHTML = englandObject.wealth + " Gold"; currentIncomeJS.innerHTML = englandObject.income + "+ GPT"; } if(englandMode && endTurnNow){ frenchTurnEnded = false englishTurnEnded = true spanishTurnEnded = false dutchTurnEnded = false turnADD += 1 switchSPN() armyPopJS.innerHTML = "Garrison: " + spainObject.armyNumber; currentWealthJS.innerHTML = spainObject.wealth + " Gold"; currentIncomeJS.innerHTML = spainObject.income + "+ GPT"; } if(spainMode && endTurnNow){ frenchTurnEnded = false englishTurnEnded = false spanishTurnEnded = true dutchTurnEnded = false turnADD += 1 switchDUT() armyPopJS.innerHTML = "Garrison: " + dutchObject.armyNumber; currentWealthJS.innerHTML = dutchObject.wealth + " Gold"; currentIncomeJS.innerHTML = dutchObject.income + "+ GPT"; } if(dutchMode && endTurnNow){ frenchTurnEnded = false englishTurnEnded = false spanishTurnEnded = false dutchTurnEnded = true turnADD += 1 switchFRN() currentWealthJS.innerHTML = franceObject.wealth + " Gold"; armyPopJS.innerHTML = "Garrison: " + franceObject.armyNumber; currentIncomeJS.innerHTML = franceObject.income + "+ GPT"; } if(turnADD == 4) { franceObject.income += franceObject.incomeADD; englandObject.income += englandObject.incomeADD; spainObject.income += spainObject.incomeADD; dutchObject.income += dutchObject.incomeADD; franceObject.wealth += franceObject.income; englandObject.wealth += englandObject.income; spainObject.wealth += spainObject.income; dutchObject.wealth += dutchObject.income; if(franceMode){ armyPopJS.innerHTML = "Garrison: " + franceObject.armyNumber; currentWealthJS.innerHTML = franceObject.wealth + " Gold"; currentIncomeJS.innerHTML = franceObject.income + "+ GPT"; } if(englandMode){ armyPopJS.innerHTML = "Garrison: " + englandObject.armyNumber; currentWealthJS.innerHTML = englandObject.wealth + " Gold"; currentIncomeJS.innerHTML = englandObject.income + "+ GPT"; } if(spainMode){ armyPopJS.innerHTML = "Garrison: " + spainObject.armyNumber; currentWealthJS.innerHTML = spainObject.wealth + " Gold"; currentIncomeJS.innerHTML = spainObject.income + "+ GPT"; } if(dutchMode){ armyPopJS.innerHTML = "Garrison: " + dutchObject.armyNumber; currentWealthJS.innerHTML = dutchObject.wealth + " Gold"; currentIncomeJS.innerHTML = dutchObject.income + "+ GPT"; } turnClock++; armyTurnCount++; year++ armyCheck() yearCheck() ageCheck() turnCountJS.innerHTML = "Turn: " + turnClock; currentYearJS.innerHTML = year + " A.D."; frenchArmyMoves += 1 englishArmyMoves += 1 spanishArmyMoves += 1 dutchArmyMoves += 1 turnADD -= 4 if(frenchArmyMoves == 2) { frenchArmyMoves -= 1 } if(englishArmyMoves == 2) { englishArmyMoves -= 1 } if(spanishArmyMoves == 2) { spanishArmyMoves -= 1 } if(dutchArmyMoves == 2) { dutchArmyMoves -= 1 } } } function switchENG() { endTurnNow = false ENGtest() } function switchFRN() { endTurnNow = false FRNtest() } function switchSPN() { endTurnNow = false SPNtest() } function switchDUT() { endTurnNow = false DUTtest() } function noVis() { ageTabJS.style.setProperty(VIS, visFalse) } function armyCheck() { if (armyTurnCount == 2) { franceObject.armyNumber +=50; englandObject.armyNumber +=60; spainObject.armyNumber +=55; dutchObject.armyNumber +=50; if(franceMode) { armyPopJS.innerHTML = "Garrison: " + franceObject.armyNumber; console.clear() console.log("franceArmy: " + franceObject.armyNumber) console.log("englandArmy: " + englandObject.armyNumber) console.log("spainArmy: " + spainObject.armyNumber) console.log("dutchArmy: " + dutchObject.armyNumber) } if(englandMode) { armyPopJS.innerHTML = "Garrison: " + englandObject.armyNumber; console.clear() console.log("franceArmy: " + franceObject.armyNumber) console.log("englandArmy: " + englandObject.armyNumber) console.log("spainArmy: " + spainObject.armyNumber) console.log("dutchArmy: " + dutchObject.armyNumber) } if(spainMode) { armyPopJS.innerHTML = "Garrison: " + spainObject.armyNumber; console.clear() console.log("franceArmy: " + franceObject.armyNumber) console.log("englandArmy: " + englandObject.armyNumber) console.log("spainArmy: " + spainObject.armyNumber) console.log("dutchArmy: " + dutchObject.armyNumber) } if(dutchMode) { armyPopJS.innerHTML = "Garrison: " + dutchObject.armyNumber; console.clear() console.log("franceArmy: " + franceObject.armyNumber) console.log("englandArmy: " + englandObject.armyNumber) console.log("spainArmy: " + spainObject.armyNumber) console.log("dutchArmy: " + dutchObject.armyNumber) } armyTurnCount-=2 } } function yearCheck() { if (yearTurnCount == 1) { year+=1 currentYearJS.innerHTML = year + " A.D."; yearTurnCount-=1 } } function closeAgeTab() { ageTabJS.style.animation = "fadeOut 0.5s forwards" setTimeout(noVis, 300) gameStart() } function shipSelect() { shipSelectSound.play() } function townSelect() { townSelectSound.play() townSelectSound.volume = 5; } function changeMusic1() { ageOfReasonMusic.play() ageOfReasonMusic.loop = true } function changeMusic2() { ageOfReasonMusic.pause() industrialRevolutionMusic.play() industrialRevolutionMusic.loop = true } function changeMusic3() { industrialRevolutionMusic.pause() ageOfReformMusic.play() ageOfReformMusic.loop = true } function ageCheck() { if(year == 1624) { ageUpSound.play() ageIconJS.style.backgroundImage = "url(/client/img/ageOfReason.jpg)" prog.getElementById('iconTab').style.background = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" ageTabJS.style.setProperty(VIS, visTrue) age = "Age of Reason" ageTabJS.style.animation = "fadeIn 0.5s forwards" currentAgeJS.innerHTML = age; ageNameJS.innerHTML = age ageYearJS.innerHTML = "(1623 - 1696)" ageInfoJS.innerHTML = "The period when philosophy, science, and social thought were associated with the principles of rationalism and the celebration of the achievements of human reason." ageOfExplorationMusic.pause() setTimeout(changeMusic1, 2000) prog.getElementById('quebecLocation').style.backgroundImage = colony2Select_1 prog.getElementById('jamestownLocation').style.backgroundImage = colony2Select_2 prog.getElementById('santoDomingoLocation').style.backgroundImage = colony2Select_3 prog.getElementById('newAmsterdamLocation').style.backgroundImage = colony2Select_4 } if (year == 1625){ prog.getElementById('iconTab').style.backgroundImage = "url(/client/img/woodBG2.png)" prog.getElementById('iconTab').style.backgroundSize = "contain" } if(year == 1698) { ageUpSound.play() ageIconJS.style.backgroundImage = "url(/client/img/industrialRevolution.png)" prog.getElementById('iconTab').style.background = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" ageTabJS.style.setProperty(VIS, visTrue) age = "Industrial Revolution" ageTabJS.style.animation = "fadeIn 0.5s forwards" currentAgeJS.innerHTML = age; ageNameJS.innerHTML = age ageYearJS.innerHTML = "(1697 - 1774)" ageInfoJS.innerHTML = "The Industrial Revolution was a time when the manufacturing of goods moved from small shops and homes to large factories. This shift brought about changes in culture as people moved from rural areas to big cities in order to work." ageOfReasonMusic.pause() setTimeout(changeMusic2, 2500) prog.getElementById('quebecLocation').style.backgroundImage = colony3Select_1 prog.getElementById('jamestownLocation').style.backgroundImage = colony3Select_2 prog.getElementById('santoDomingoLocation').style.backgroundImage = colony3Select_3 prog.getElementById('newAmsterdamLocation').style.backgroundImage = colony3Select_4 } if (year == 1699){ prog.getElementById('iconTab').style.backgroundImage = "url(/client/img/woodBG2.png)" prog.getElementById('iconTab').style.backgroundSize = "contain" } if(year == 1776) { ageUpSound.play() ageIconJS.style.backgroundImage = "url(/client/img/ageOfReform.png)" prog.getElementById('iconTab').style.background = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" ageTabJS.style.setProperty(VIS, visTrue) age = "Age of Reform" ageTabJS.style.animation = "fadeIn 0.5s forwards" currentAgeJS.innerHTML = age; ageNameJS.innerHTML = age ageYearJS.innerHTML = "(1775 - 1814)" ageInfoJS.innerHTML = "The Age of Revolution is the period in which a number of significant revolutionary movements occurred in most of Europe and the Americas." industrialRevolutionMusic.pause() setTimeout(changeMusic3, 2500) prog.getElementById('quebecLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/french/frenchColony4.gif)" prog.getElementById('jamestownLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/england/englishColony4.gif)" prog.getElementById('santoDomingoLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/spain/spanishColony4.gif)" prog.getElementById('newAmsterdamLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/dutch/dutchColony4.gif)" } if (year == 1777){ prog.getElementById('iconTab').style.backgroundImage = "url(./img/woodBG2.png)" prog.getElementById('iconTab').style.backgroundSize = "contain" } if(year == 1816) { age = "Age of Modernization" currentAgeJS.innerHTML = age; ageUpSound.play() ageIconJS.style.backgroundImage = "url(/client/img/ageOfModernization.jpg)" prog.getElementById('iconTab').style.background = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" ageTabJS.style.setProperty(VIS, visTrue) ageTabJS.style.animation = "fadeIn 0.5s forwards" ageNameJS.innerHTML = age ageYearJS.innerHTML = "(1815 - 1863)" ageInfoJS.innerHTML = "The Age of Modernization is the period in which new ways of communication and transportation were introduced and used around the world." industrialRevolutionMusic.pause() setTimeout(changeMusic3, 2500) prog.getElementById('quebecLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/french/frenchColony4.gif)" prog.getElementById('jamestownLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/england/englishColony4.gif)" prog.getElementById('santoDomingoLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/spain/spanishColony4.gif)" prog.getElementById('newAmsterdamLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/dutch/dutchColony4.gif)" } if (year == 1817){ prog.getElementById('iconTab').style.backgroundImage = "url(/client/img/woodBG2.png)" prog.getElementById('iconTab').style.backgroundSize = "contain" } if(year == 1865) { age = "Progressive Era" currentAgeJS.innerHTML = age; ageUpSound.play() ageIconJS.style.backgroundImage = "url(/client/img/progressiveEra.jpg)" prog.getElementById('iconTab').style.background = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" ageTabJS.style.setProperty(VIS, visTrue) ageTabJS.style.animation = "fadeIn 0.5s forwards" ageNameJS.innerHTML = age ageYearJS.innerHTML = "(1864 - 1894)" ageInfoJS.innerHTML = "The Progressive Era is the age the world started to advance their idea of politics and diplomacy; some governments changed their ideas of rulership which included the allowance and creation of labor unions. For most nations this time period brought them massive amounts of wealth. This was done either through colonization or imperialism." industrialRevolutionMusic.pause() setTimeout(changeMusic3, 2500) prog.getElementById('quebecLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/french/frenchColony4.gif)" prog.getElementById('jamestownLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/england/englishColony4.gif)" prog.getElementById('santoDomingoLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/spain/spanishColony4.gif)" prog.getElementById('newAmsterdamLocation').style.backgroundImage = "url(/client/img/commonAnimSheet/flags/dutch/dutchColony4.gif)" } if (year == 1866){ prog.getElementById('iconTab').style.backgroundImage = "url(/client/img/woodBG2.png)" prog.getElementById('iconTab').style.backgroundSize = "contain" } if(year == 1896) { age = "Guilded Age" currentAgeJS.innerHTML = age; } } // const el = document.querySelector("#module"); // el.addEventListener("mousemove", (e) => { // el.style.backgroundPositionX = -e.offsetX + "px"; // el.style.backgroundPositionY = -e.offsetY + "px"; // }); //___________________get keyboard input___________________ // ⇦73 ⇨39 ⇧38 ⇩40 W87 A65 S83 D68 spacebar 32 const keys = []; document.onkeydown = function(e){ keys[e.keyCode] = true; console.log(e.keyCode); } document.onkeyup = function(e){ keys[e.keyCode] = false; } let mapScale = 0.1 // if(keys[88]){ // prog.getElementById('module').style.transform = "scale(" + (mapScale+1) + ")"; // } // if(keys[90]){ // prog.getElementById('module').style.transform = "scale(" + (mapScale-1) + ")"; // } function zoomIn() { // prog.getElementById('module').style.transform = "scale(" + (mapScale+=0.1) + ")"; // if(mapScale < ){ // mapScale+=0.1 // } // if(mapScale > mapMaxValue){ // mapScale-=0.1 // } // console.log(mapScale) } function zoomOut() { // prog.getElementById('module').style.transform = "scale(" + (mapScale-=0.1) + ")"; // if(mapScale < 0.25){ // mapScale+=0.1 // } // if(mapScale > mapMaxValue){ // mapScale-=0.1 // } console.log(mapScale) } function launchFullScreen(element) { if(element.requestFullScreen) { element.requestFullScreen(); } else if(element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if(element.webkitRequestFullScreen) { element.webkitRequestFullScreen(); } } function fullscreen() { launchFullScreen(document.documentElement) } function mouseOverIcon() { prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.rulerIcon } function mouseOutIcon() { prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.flagIcon } //move map for mobile let mapTopPos = 0; let mapLeftPos = 0; function moveMapUp() { prog.getElementById('module').style.top = (mapTopPos-=60) + "px" } function moveMapDown() { prog.getElementById('module').style.top = (mapTopPos+=60) + "px" } function moveMapLeft() { prog.getElementById('module').style.left = (mapLeftPos+=60) + "px" } function moveMapRight() { prog.getElementById('module').style.left = (mapLeftPos-=60) + "px" } function showRealGame() { getTravelData() armyLocStart(); checkData(); prog.getElementById('module').style.backgroundImage = "url(/client/img/maps/EraciaSVG.svg)" prog.getElementById('module').style.visibility = "visible" prog.getElementById('mainSelectionTabs').style.visibility = "hidden" prog.getElementById('nationMenuInfo').style.visibility = "hidden" prog.getElementById('rulerTab').style.visibility = "hidden" prog.getElementById('locationsForEurope').style.visibility = "hidden" prog.getElementById('tabs').style.visibility = "visible" prog.getElementById('locationsForEverything').style.visibility = "visible" prog.getElementById('module').style.left = mapLoc.x + pixelLoc prog.getElementById('module').style.top = mapLoc.y + pixelLoc prog.getElementById('quebecLocation').style.backgroundImage = colony1Select_1 prog.getElementById('jamestownLocation').style.backgroundImage = colony1Select_2 prog.getElementById('santoDomingoLocation').style.backgroundImage = colony1Select_3 prog.getElementById('newAmsterdamLocation').style.backgroundImage = colony1Select_4 prog.getElementById('ns1Location').style.backgroundImage = nativeCity1Select_1 prog.getElementById('ns2Location').style.backgroundImage = nativeCity1Select_2 prog.getElementById('ns3Location').style.backgroundImage = nativeCity1Select_3 prog.getElementById('ns4Location').style.backgroundImage = nativeCity1Select_4 prog.getElementById('ns5Location').style.backgroundImage = nativeCity1Select_5 prog.getElementById('ns6Location').style.backgroundImage = nativeCity1Select_6 } function removeMainX() { removeElementMainMenu(mainX) } //musicFunctions function getInitMusic() { ageOfExplorationMusic.play() ageOfExplorationMusic.loop = true } function enterRealGame() { setTimeout(showRealGame, 2000) prog.getElementById('topWoodLoad').style.animation = "topLoadComeDown2 4s forwards" prog.getElementById('bottomWoodLoad').style.animation = "bottomLoadComeUp2 4s forwards" }; function ENGChoose() { mapMaxValue = 1 ENGtest() nationSelectMusic.pause() setTimeout(getInitMusic, 4000) enterRealGame() }; function FRNChoose() { mapMaxValue = 1 FRNtest() nationSelectMusic.pause() setTimeout(getInitMusic, 4000) enterRealGame() }; function SPNChoose() { mapMaxValue = 1 SPNtest() nationSelectMusic.pause() setTimeout(getInitMusic, 4000) enterRealGame() }; function DUTChoose() { mapMaxValue = 1 DUTtest() nationSelectMusic.pause() setTimeout(getInitMusic, 4000) enterRealGame() }; function changeCivBriton() { buttonClickAudio2.play() civInfoJS.innerHTML = 'Best known for there infantry numbers, the English have high Morale. Their best troops are Howitzer and Imperial Redcoat Musketeers. Your citizens though are very prone to revolt and rebellion.<br><button class"chooseCivButton" onclick="ENGChoose()">✔</button><button class"backToMenu" onclick="goBackToMenu()">✖</button>'; rulerInfoJS.innerHTML = "King James I" rulerJS.style.backgroundImage = "url(/client/img/rulerEngland1.jpg)" flagJS.style.backgroundImage = "url(/client/img/britishFlag.jpg)" nationInfo.nationColor = "radial-gradient(circle, rgba(0,0,0,1) 0%, rgba(83,10,30,1) 0%, rgba(186,22,22,1) 100%)" // prog.getElementById('rulerTab').style.background = nationInfo.nationColor // prog.getElementById('nationMenuInfo').style.background = nationInfo.nationColor }; function changeCivSpain() { buttonClickAudio2.play() civInfoJS.innerHTML = 'Your trading powers are the biggest in all the land. Your best units are the Castille Pikemen and Conquistador. But there is one problem, you start out with a very small amount of soldiers in your army.<br><button class"chooseCivButton" onclick="SPNChoose()">✔</button><button class"backToMenu" onclick="goBackToMenu()">✖</button>'; rulerInfoJS.innerHTML = "King Phillip III" rulerJS.style.backgroundImage = "url(/client/img/rulerSpain1.jpg)" flagJS.style.backgroundImage = "url(/client/img/spanishFlag.jpg)" nationInfo.nationColor = "radial-gradient(circle, rgba(0,0,0,1) 0%, rgba(186,113,22,1) 0%, rgba(215,255,0,1) 100%)" // prog.getElementById('rulerTab').style.background = nationInfo.nationColor // prog.getElementById('nationMenuInfo').style.background = nationInfo.nationColor }; function changeCivFrance() { buttonClickAudio2.play() civInfoJS.innerHTML = 'Your citizens are always loyal and will fight against your natural rival, the English, with massive enthusiasum. Your best units are the Cuirassier and Napoleonic Skirmishers. Your disadvantage is that you are very vulnerable in attacks due to your placement on the map.<br><button class"chooseCivButton" onclick="FRNChoose()">✔</button><button class"backToMenu" onclick="goBackToMenu()">✖</button>'; rulerInfoJS.innerHTML = "King Henry IV" rulerJS.style.backgroundImage = "url(/client/img/rulerFrance1.jpg)" flagJS.style.backgroundImage = "url(/client/img/frenchFlag.jpg)" nationInfo.nationColor = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 100%)" // prog.getElementById('rulerTab').style.background = nationInfo.nationColor // prog.getElementById('nationMenuInfo').style.background = nationInfo.nationColor }; function changeCivHolland() { buttonClickAudio2.play() civInfoJS.innerHTML = 'The Dutch are best known for their trade. You have a massive trade empire which allows you to get wealth faster. The best units you have are Halberdiers and the Fluyt Frigates. The main disadvantage you have is only having one Home City.<br><button class"chooseCivButton" onclick="DUTChoose()">✔</button><button class"backToMenu" onclick="goBackToMenu()">✖</button>'; rulerInfoJS.innerHTML = "Maurice of Nassau" rulerJS.style.backgroundImage = "url(/client/img/rulerDutch2.jpg)" flagJS.style.backgroundImage = "url(/client/img/dutchFlag.jpg)" nationInfo.nationColor = "radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(22,186,36,1) 100%)" // prog.getElementById('rulerTab').style.background = nationInfo.nationColor // prog.getElementById('nationMenuInfo').style.background = nationInfo.nationColor }; //change civ for test function ENGtest() { checkData() franceMode = false englandMode = true dutchMode = false spainMode = false if(englandMode){ console.log("englandMode activated.") nationInfo.ruler = "James I" nationInfo.nationColor = englandColor nationInfo.flagIcon = "url(/client/img/flagEnglandIcon.png" nationInfo.rulerIcon = "url(/client/img/rulerEnglandIcon.png)" mouseOutIcon() // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.flagIcon // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.rulerIcon // prog.getElementById('mapToolsTab').style.background = nationInfo.nationColor // prog.getElementById('iconTab').style.background = nationInfo.nationColor // prog.getElementById('endTurnTab').style.background = nationInfo.nationColor // prog.getElementById('statsTab').style.background = nationInfo.nationColor // prog.getElementById('historyTab').style.background = nationInfo.nationColor // prog.getElementById('mapMoveTab').style.background = nationInfo.nationColor // prog.getElementById('rulerTab').style.background = nationInfo.nationColor rulerNameJS.innerHTML = nationInfo.ruler; englishNavySelect() englishArmySelect() jamestownSelect() } } function SPNtest() { checkData() franceMode = false englandMode = false dutchMode = false spainMode = true if(spainMode){ console.log("spainMode activated.") nationInfo.ruler = "Phillip III" nationInfo.nationColor = spainMode nationInfo.flagIcon = "url(/client/img/flagSpainIcon.png" nationInfo.rulerIcon = "url(/client/img/rulerSpainIcon.png)" mouseOutIcon() // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.flagIcon // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.rulerIcon // prog.getElementById('mapToolsTab').style.background = nationInfo.nationColor // prog.getElementById('iconTab').style.background = nationInfo.nationColor // prog.getElementById('endTurnTab').style.background = nationInfo.nationColor // prog.getElementById('statsTab').style.background = nationInfo.nationColor // prog.getElementById('historyTab').style.background = nationInfo.nationColor // prog.getElementById('mapMoveTab').style.background = nationInfo.nationColor // prog.getElementById('rulerTab').style.background = nationInfo.nationColor rulerNameJS.innerHTML = nationInfo.ruler; spanishNavySelect() spanishArmySelect() santoDomingoSelect() } } function FRNtest() { checkData() franceMode = true englandMode = false dutchMode = false spainMode = false if(franceMode){ console.log("franceMode activated.") nationInfo.ruler = "Henry IV" nationInfo.nationColor = franceColor nationInfo.flagIcon = "url(/client/img/flagFranceIcon.png" nationInfo.rulerIcon = "url(/client/img/rulerFranceIcon.png)" mouseOutIcon() // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.flagIcon // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.rulerIcon // prog.getElementById('mapToolsTab').style.background = nationInfo.nationColor // prog.getElementById('iconTab').style.background = nationInfo.nationColor // prog.getElementById('endTurnTab').style.background = nationInfo.nationColor // prog.getElementById('statsTab').style.background = nationInfo.nationColor // prog.getElementById('historyTab').style.background = nationInfo.nationColor // prog.getElementById('mapMoveTab').style.background = nationInfo.nationColor // prog.getElementById('rulerTab').background = nationInfo.nationColor rulerNameJS.innerHTML = nationInfo.ruler; frenchNavySelect() frenchArmySelect() quebecSelect() } } function DUTtest() { checkData() franceMode = false englandMode = false dutchMode = true spainMode = false if(dutchMode){ console.log("dutchMode activated.") nationInfo.ruler = "Maurice of Nassau" nationInfo.nationColor = dutchColor nationInfo.flagIcon = "url(/client/img/flagDutchIcon.png" nationInfo.rulerIcon = "url(/client/img/rulerDutchIcon.png)" mouseOutIcon() // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.flagIcon // prog.getElementById('rulerIconForTab').style.backgroundImage = nationInfo.rulerIcon // prog.getElementById('mapToolsTab').style.background = nationInfo.nationColor // prog.getElementById('iconTab').style.background = nationInfo.nationColor // prog.getElementById('endTurnTab').style.background = nationInfo.nationColor // prog.getElementById('statsTab').style.background = nationInfo.nationColor // prog.getElementById('historyTab').style.background = nationInfo.nationColor // prog.getElementById('mapMoveTab').style.background = nationInfo.nationColor // prog.getElementById('rulerTab').style.background = nationInfo.nationColor rulerNameJS.innerHTML = nationInfo.ruler; dutchNavySelect() dutchArmySelect() newAmsterdamSelect() } } function goBackToMenu() { buttonClickAudio2.play() rulerJS.style.backgroundImage = "url(/client/img/unknownRuler.png)" flagJS.style.backgroundImage = "url(/client/img/noFlag.jpg)" civInfoJS.innerHTML = "Click on civilization to see information about it"; rulerInfoJS.innerHTML = "Click on civilization to see information about your nation's ruler." prog.getElementById('rulerTab').style.background = "rgba(0,0,0,0.7)" prog.getElementById('nationMenuInfo').style.background = "rgba(0,0,0,0.7)" }; function devModeCheck() { if(devMode){ console.log("you are now in DevMode.") } if(!devMode){ console.log("DevMode is off.") } } let mapPosObject = { xPos: 0, yPos: 0, scrollSpeed: 6, xSize: 2700, ySize: 1800, } function setTranslate(xPos, yPos, el) { el.style.transform = "translate3d(" + xPos + pixelLoc + ", " + yPos + pixelLoc + ", 0)"; } function bindingsLoop() { if(keys[88]) { zoomIn() } if(keys[90]) { zoomOut() } if(keys[69]) { ENGtest() } if(keys[83]) { SPNtest() } if(keys[70]) { FRNtest() } if(keys[68]) { DUTtest() } //___________________get keyboard input___________________ // ⇦37 ⇨39 ⇧38 ⇩40 W87 A65 S83 D68 spacebar 32 if(keys[38]) { } if(keys[40]) { } if(keys[37]) { } if(keys[39]) { } //armySelect SHORTCUT if(keys[77]) { if(franceMode) { frenchArmySelect() } if(englandMode) { englishArmySelect() } if(spainMode) { spanishArmySelect() } if(dutchMode) { dutchArmySelect() } } //navySelect SHORTCUT if(keys[78]) { if(franceMode) { frenchNavySelect() } if(englandMode) { englishNavySelect() } if(spainMode) { spanishNavySelect() } if(dutchMode) { dutchNavySelect() } } //capitalSelect SHORTCUT if(keys[66]) { if(franceMode) { quebecSelect() } if(englandMode) { jamestownSelect() } if(spainMode) { santoDomingoSelect() } if(dutchMode) { newAmsterdamSelect() } } if (keys[192]) { if (devMode) { devMode = false } else { devMode = true } } if (keys[32]) { endTurn() if (!devMode) { keys[32] = false; } } mapLoc.camX += mapLoc.scrollSpeedX; mapLoc.camY += mapLoc.scrollSpeedY; if ( bindings.mouse.actual.x >= window.innerWidth - 50 || bindings.mouse.actual.x <= 50 || bindings.mouse.actual.y >= window.innerHeight - 50 || bindings.mouse.actual.y <= 50 ) { //camera movement based on mouse position at edge of screen mapLoc.scrollSpeedX = 20 * Math.cos( Math.atan2( bindings.mouse.actual.y - window.innerHeight / 2, bindings.mouse.actual.x - window.innerWidth / 2 ) ); mapLoc.scrollSpeedY = 20 * Math.sin( Math.atan2( bindings.mouse.actual.y - window.innerHeight / 2, bindings.mouse.actual.x - window.innerWidth / 2 ) ); } else { mapLoc.scrollSpeedX = 0; mapLoc.scrollSpeedY = 0; } currentX = -1 * mapLoc.camX; currentY = -1 * mapLoc.camY; if(currentX > 0) { currentX = -10 } if(currentX + mapLoc.xSize < window.innerWidth) { (currentX) = ((window.innerWidth - mapLoc.xSize) + 10) } if(currentY > 0) { currentY = -10 } if(currentY + mapLoc.ySize < window.innerHeight) { (currentY) = ((window.innerHeight - mapLoc.ySize) + 10) } setTranslate(currentX, currentY, dragItem); // $(document).mouseleave(function () { // console.log('out'); // bindings.mouse.actual.x = window.innerWidth / 2 // bindings.mouse.actual.y = window.innerHeight / 2 // }); // $(document).mouseenter(function () { // console.log('in'); // bindings.mouse.actual.x = window.innerWidth / 2 // bindings.mouse.actual.y = window.innerHeight / 2 // }); requestAnimationFrame(bindingsLoop) } requestAnimationFrame(bindingsLoop) function hideMapToolsTab() { buttonClickAudio2.play() if (document.getElementById("mapToolsTab").style.display === "none") { document.getElementById("mapToolsTab").style.display = "inline-block"; } else { document.getElementById("mapToolsTab").style.display = "none"; } } function hideMovesButtonTab() { buttonClickAudio2.play() if (document.getElementById("mapMoveTab").style.display === "none") { document.getElementById("mapMoveTab").style.display = "inline-block"; } else { document.getElementById("mapMoveTab").style.display = "none"; } } function hideRecruitTab() { buttonClickAudio2.play() if (document.getElementById("militaryUnitsTab").style.display === "none") { document.getElementById("militaryUnitsTab").style.display = "inline-block"; } else { document.getElementById("militaryUnitsTab").style.display = "none"; } } //native settlement selections //european city selections //FUNCTIONS function londonSelect() { prog.getElementById('homeCitySelectTab').style.visibility = "visible" prog.getElementById('homeCitySelectInfo').style.visibility = "visible" prog.getElementById('homeCitySelectImage').style.visibility = "visible" prog.getElementById('homeCitySelectInfo').innerHTML = "London" prog.getElementById('homeCitySelectImage').style.backgroundImage = "url(/client/img/londonSelect.jpg)" } function edinburghSelect() { prog.getElementById('homeCitySelectTab').style.visibility = "visible" prog.getElementById('homeCitySelectInfo').style.visibility = "visible" prog.getElementById('homeCitySelectImage').style.visibility = "visible" prog.getElementById('homeCitySelectInfo').innerHTML = "Edinburgh" prog.getElementById('homeCitySelectImage').style.backgroundImage = "url(/client/img/edinburghSelect.jpg)" } function parisSelect() { prog.getElementById('homeCitySelectTab').style.visibility = "visible" prog.getElementById('homeCitySelectInfo').style.visibility = "visible" prog.getElementById('homeCitySelectImage').style.visibility = "visible" prog.getElementById('homeCitySelectInfo').innerHTML = "Paris" prog.getElementById('homeCitySelectImage').style.backgroundImage = "url(/client/img/parisSelect.jpg)" } function noHomeCitySelect() { prog.getElementById('homeCitySelectTab').style.visibility = "hidden" prog.getElementById('homeCitySelectInfo').style.visibility = "hidden" prog.getElementById('homeCitySelectImage').style.visibility = "hidden" } //EVENT LISTENERS prog.getElementById('londonEuropeLocation').addEventListener("mouseover", londonSelect) prog.getElementById('londonEuropeLocation').addEventListener("mouseout", noHomeCitySelect) prog.getElementById('edinburghEuropeLocation').addEventListener("mouseover", edinburghSelect) prog.getElementById('edinburghEuropeLocation').addEventListener("mouseout", noHomeCitySelect) prog.getElementById('parisEuropeLocation').addEventListener("mouseover", parisSelect) prog.getElementById('parisEuropeLocation').addEventListener("mouseout", noHomeCitySelect)
import FWCore.ParameterSet.Config as cms # This config was generated automatically using generate2026Geometry.py # If you notice a mistake, please update the generating script, not just this config XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring( 'Geometry/CMSCommonData/data/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/extend/v2/cmsextent.xml', 'Geometry/CMSCommonData/data/cmsMother.xml', 'Geometry/CMSCommonData/data/eta3/etaMax.xml', 'Geometry/CMSCommonData/data/cmsTracker.xml', 'Geometry/CMSCommonData/data/cmsCalo.xml', 'Geometry/CMSCommonData/data/cmsMuon.xml', 'Geometry/CMSCommonData/data/mgnt.xml', 'Geometry/CMSCommonData/data/beampipe/2026/v1/beampipe.xml', 'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml', 'Geometry/CMSCommonData/data/muonMB.xml', 'Geometry/CMSCommonData/data/muonMagnet.xml', 'Geometry/CMSCommonData/data/cavern/2021/v1/cavern.xml', 'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml', 'Geometry/CMSCommonData/data/cavernFloor/2017/v1/cavernFloor.xml', 'Geometry/CMSCommonData/data/cms/2026/v3/cms.xml', 'Geometry/CMSCommonData/data/caloBase/2026/v2/caloBase.xml', 'Geometry/CMSCommonData/data/muonBase/2026/v3/muonBase.xml', 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/pixfwd.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/pixbar.xml', 'Geometry/TrackerCommonData/data/trackermaterial.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/otst.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/tracker.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker615/pixel.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerbar.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerfwd.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerStructureTopology.xml', 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613/pixelStructureTopology.xml', 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/trackersens.xml', 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/pixelsens.xml', 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/trackerRecoMaterial.xml', 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/pixelProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', 'Geometry/EcalCommonData/data/eregalgo/2026/v2/eregalgo.xml', 'Geometry/EcalCommonData/data/ectkcable/2026/v1/ectkcable.xml', 'Geometry/EcalCommonData/data/ectkcablemat/2026/v1/ectkcablemat.xml', 'Geometry/EcalCommonData/data/ebalgo.xml', 'Geometry/EcalCommonData/data/ebcon.xml', 'Geometry/EcalCommonData/data/ebrot.xml', 'Geometry/HcalCommonData/data/hcalrotations.xml', 'Geometry/HcalCommonData/data/hcal/v2/hcalalgo.xml', 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', 'Geometry/HcalCommonData/data/hcalcablealgo/v2/hcalcablealgo.xml', 'Geometry/HcalCommonData/data/hcalouteralgo.xml', 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', 'Geometry/HcalCommonData/data/hcalSimNumbering/NoHE/hcalSimNumbering.xml', 'Geometry/HcalCommonData/data/hcalRecNumbering/NoHE/hcalRecNumbering.xml', 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', 'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml', 'Geometry/HGCalCommonData/data/hgcal/v11/hgcal.xml', 'Geometry/HGCalCommonData/data/hgcalEE/v10/hgcalEE.xml', 'Geometry/HGCalCommonData/data/hgcalHEsil/v11/hgcalHEsil.xml', 'Geometry/HGCalCommonData/data/hgcalHEmix/v11/hgcalHEmix.xml', 'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcalwafer.xml', 'Geometry/HGCalCommonData/data/hgcalcell/v9/hgcalcell.xml', 'Geometry/HGCalCommonData/data/hgcalCons/v11/hgcalCons.xml', 'Geometry/MuonCommonData/data/mbCommon/2021/v1/mbCommon.xml', 'Geometry/MuonCommonData/data/mb1/2015/v2/mb1.xml', 'Geometry/MuonCommonData/data/mb2/2015/v2/mb2.xml', 'Geometry/MuonCommonData/data/mb3/2015/v2/mb3.xml', 'Geometry/MuonCommonData/data/mb4/2015/v2/mb4.xml', 'Geometry/MuonCommonData/data/mb4Shield/2021/v1/mb4Shield.xml', 'Geometry/MuonCommonData/data/muonYoke/2021/v2/muonYoke.xml', 'Geometry/MuonCommonData/data/csc/2021/v1/csc.xml', 'Geometry/MuonCommonData/data/mfshield/2017/v1/mfshield.xml', 'Geometry/MuonCommonData/data/mf/2026/v2/mf.xml', 'Geometry/MuonCommonData/data/rpcf/2026/v2/rpcf.xml', 'Geometry/MuonCommonData/data/gemf/TDR_BaseLine/gemf.xml', 'Geometry/MuonCommonData/data/gem11/TDR_BaseLine/gem11.xml', 'Geometry/MuonCommonData/data/gem21/TDR_Dev/gem21.xml', 'Geometry/MuonCommonData/data/mfshield/2026/v1/mfshield.xml', 'Geometry/MuonCommonData/data/me0/TDR_Dev/v2/me0.xml', 'Geometry/ForwardCommonData/data/forwardshield/2017/v1/forwardshield.xml', 'Geometry/ForwardCommonData/data/brmrotations.xml', 'Geometry/ForwardCommonData/data/PostLS2/brm.xml', 'Geometry/ForwardCommonData/data/zdcmaterials.xml', 'Geometry/ForwardCommonData/data/lumimaterials.xml', 'Geometry/ForwardCommonData/data/zdcrotations.xml', 'Geometry/ForwardCommonData/data/lumirotations.xml', 'Geometry/ForwardCommonData/data/zdc.xml', 'Geometry/ForwardCommonData/data/zdclumi.xml', 'Geometry/ForwardCommonData/data/cmszdc.xml', 'Geometry/MTDCommonData/data/btl.xml', 'Geometry/MTDCommonData/data/etl/v2/etl.xml', 'Geometry/MTDCommonData/data/CrystalBarPhiFlat/v3/mtd.xml', 'Geometry/MTDCommonData/data/CrystalBarPhiFlat/mtdStructureTopology.xml', 'Geometry/MTDCommonData/data/CrystalBarPhiFlat/mtdParameters.xml', )+ cms.vstring( 'Geometry/MuonCommonData/data/muonNumbering/TDR_DeV/muonNumbering.xml', 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', 'Geometry/HcalCommonData/data/hcalsens/NoHE/hcalsenspmf.xml', 'Geometry/HcalSimData/data/hf.xml', 'Geometry/HcalSimData/data/hfpmt.xml', 'Geometry/HcalSimData/data/hffibrebundle.xml', 'Geometry/HcalSimData/data/CaloUtil.xml', 'Geometry/HGCalSimData/data/hgcsensv9.xml', 'Geometry/MuonSimData/data/PhaseII/ME0EtaPart/muonSens.xml', 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', 'Geometry/RPCGeometryBuilder/data/2026/v1/RPCSpecs.xml', 'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml', 'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml', 'Geometry/ForwardCommonData/data/brmsens.xml', 'Geometry/ForwardSimData/data/zdcsens.xml', 'Geometry/MTDSimData/data/CrystalBarPhiFlat/mtdsens.xml', 'Geometry/HcalSimData/data/HcalProdCuts.xml', 'Geometry/EcalSimData/data/EcalProdCuts.xml', 'Geometry/HGCalSimData/data/hgcProdCutsv9.xml', 'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml', 'Geometry/ForwardSimData/data/zdcProdCuts.xml', 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', 'Geometry/MTDSimData/data/CrystalBarPhiFlat/mtdProdCuts.xml', 'Geometry/CMSCommonData/data/FieldParameters.xml', ), rootNodeName = cms.string('cms:OCMS') )
var cheerio = require('cheerio'), request = require('request'); exports = module.exports = function (code) { return new Promise(function(resolve, reject) { request .post('http://seguimientoweb.correos.cl/ConEnvCorreos.aspx', function(error, response, body) { if (error) { reject(error); return; } var $ = cheerio.load(body), histories = [], history = {}, keys = [], values = [], information = {}; $('.datosgenerales td').each(function(i) { if (i % 2 == 0) { keys.push($(this).text().toLowerCase().trim().replace(' ', '_')); } else { values.push($(this).text().trim()); } }); keys.map(function(key, index){ information[key] = values[index]; }); $('.tracking tr').each(function() { history = { 'state': $(this).children('td').eq(0).text().trim(), 'datetime': $(this).children('td').eq(1).text().trim(), 'place': $(this).children('td').eq(2).text().trim() }; if (history.state) { histories.push(history); } }); resolve({ 'information': information, 'history': histories }); }) .form({ obj_key: 'Cor398-cc', obj_env: code }); }); };
define(["sprd/data/IImageUploadService", "js/core/Bus", "xaml!sprd/data/SprdApiDataSource", "flow", "sprd/model/DesignUpload", "sprd/type/UploadDesign", "underscore", "sprd/entity/Image", "sprd/error/DesignUploadError"], function(Component, Bus, SprdApiDataSource, flow, DesignUpload, UploadDesign, _, Image, DesignUploadError) { return Component.inherit('sprd.data.ImageUploadServiceV2', { defaults: { uploadContext: null, maxRetries: 30, retryTimeout: 1000 }, inject: { api: SprdApiDataSource, bus: Bus }, /** * Upload image to image server and show progress * * @param {sprd.type.UploadDesign} uploadDesign * @param [restrictions] * @param {Function} [callback] * @private */ _uploadDesign: function(uploadDesign, restrictions, callback) { var self = this, trackingManager = this.$.trackingManager, message; if (uploadDesign.isVectorMimeType() || uploadDesign.isVectorExtension()) { uploadDesign.set('isVector', true); } callback = callback || this.emptyCallback(); var uploadContext = this.$.uploadContext, api = this.$.api; if (!uploadContext) { message = "No upload context set. Cancel upload"; } if (!api) { message = "No api available"; } if (message) { uploadDesign.set('state', UploadDesign.State.ERROR); this.log(message, "warn"); callback(message); return; } uploadDesign.set('state', UploadDesign.State.LOADING); flow() .seq("upload", function(cb) { // Upload image to image server var uploadImage = api.root().getContext(self.$.uploadContext).createEntity(DesignUpload); uploadImage.set('image', uploadDesign.$.image); uploadImage.save({ xhrBeforeSend: function(xhr) { uploadDesign.set('xhr', xhr); if (xhr && xhr.upload) { xhr.upload.onprogress = function(e) { uploadDesign.set('uploadProgress', 100 / e.total * e.loaded); }; } xhr.onload = function() { uploadDesign.set('uploadProgress', 100); }; } }, cb); }) .seq(function(cb) { var upload = this.vars.upload, retries = 0, timeout = self.$.retryTimeout, previewImage = null; check(); function check () { if (!uploadDesign.$.previewImage && !previewImage && upload.$.images) { previewImage = (_.filter(upload.$.images, function(img) { return img.type == 'preview' })[0] || {}).href; previewImage && uploadDesign.set('previewImage', previewImage + "?width=200"); } if (upload.$.designId) { cb(); } else { uploadDesign.set('state', UploadDesign.State.CONVERTING); if (retries > self.$.maxRetries) { cb("Retries limit reached"); } else { retries++; if (retries > 5) { timeout *= 1.2; } setTimeout(function() { upload.fetch({ noCache: true }, function(err) { if (err) { cb(err); } else { check(); } }); }, timeout); } } } }) .seq(function(cb) { uploadDesign.set('state', UploadDesign.State.LOADED); var upload = this.vars.upload; var designId = (upload.$.designId || "").replace(/^u?/, "u"), design = uploadContext.getCollection("designs").createItem(designId); uploadDesign.set({ design: design, designId: designId }); design.fetch(cb); }) .exec(function(err) { if (trackingManager) { if (!err) { trackingManager.trackUploadSuccess(); } else { self.triggerError({ code: DesignUploadError.ErrorCodes.DESIGN_UPLOAD_ERROR, originalError: err }) } } uploadDesign.set('state', err ? UploadDesign.State.ERROR : UploadDesign.State.LOADED); callback && callback(err, uploadDesign); }); }, triggerError: function(error) { this.$.bus.trigger('ImageUploadService.Error', error, this); } }); });
/** * Fastly API * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) * * The version of the OpenAPI document: 1.0.0 * Contact: oss@fastly.com * * NOTE: This class is auto generated. * Do not edit the class manually. * */ import ApiClient from '../ApiClient'; import BillingStatus from './BillingStatus'; import BillingTotal from './BillingTotal'; /** * The Billing model module. * @module model/Billing * @version 3.0.0-beta3 */ class Billing { /** * Constructs a new <code>Billing</code>. * @alias module:model/Billing */ constructor() { Billing.initialize(this); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ static initialize(obj) { } /** * Constructs a <code>Billing</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/Billing} obj Optional instance to populate. * @return {module:model/Billing} The populated <code>Billing</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new Billing(); if (data.hasOwnProperty('end_time')) { obj['end_time'] = ApiClient.convertToType(data['end_time'], 'Date'); } if (data.hasOwnProperty('start_time')) { obj['start_time'] = ApiClient.convertToType(data['start_time'], 'Date'); } if (data.hasOwnProperty('invoice_id')) { obj['invoice_id'] = ApiClient.convertToType(data['invoice_id'], 'String'); } if (data.hasOwnProperty('customer_id')) { obj['customer_id'] = ApiClient.convertToType(data['customer_id'], 'String'); } if (data.hasOwnProperty('status')) { obj['status'] = BillingStatus.constructFromObject(data['status']); } if (data.hasOwnProperty('total')) { obj['total'] = BillingTotal.constructFromObject(data['total']); } if (data.hasOwnProperty('regions')) { obj['regions'] = ApiClient.convertToType(data['regions'], {'String': {'String': Object}}); } } return obj; } } /** * Date and time in ISO 8601 format. * @member {Date} end_time */ Billing.prototype['end_time'] = undefined; /** * Date and time in ISO 8601 format. * @member {Date} start_time */ Billing.prototype['start_time'] = undefined; /** * @member {String} invoice_id */ Billing.prototype['invoice_id'] = undefined; /** * @member {String} customer_id */ Billing.prototype['customer_id'] = undefined; /** * @member {module:model/BillingStatus} status */ Billing.prototype['status'] = undefined; /** * @member {module:model/BillingTotal} total */ Billing.prototype['total'] = undefined; /** * @member {Object.<String, Object.<String, Object>>} regions */ Billing.prototype['regions'] = undefined; export default Billing;
import React, { useEffect, useState } from "react"; import http from "../../common-http"; // reactstrap components import { Card, Container, Row, Col, Carousel, CarouselItem, CarouselIndicators, CarouselCaption, } from "reactstrap"; // core components const items = []; function LocationCarousel() { const [locations, setLocations] = useState([]); useEffect(() => { loadData(); }, []); const loadData = async () => { const res = await http.get("locations"); setLocations(res.data); }; const [activeIndex, setActiveIndex] = React.useState(0); const [animating, setAnimating] = React.useState(false); const onExiting = () => { setAnimating(true); }; const onExited = () => { setAnimating(false); }; const next = () => { if (animating) return; const nextIndex = activeIndex === locations.length - 1 ? 0 : activeIndex + 1; setActiveIndex(nextIndex); }; const previous = () => { if (animating) return; const nextIndex = activeIndex === 0 ? locations.length - 1 : activeIndex - 1; setActiveIndex(nextIndex); }; const goToIndex = (newIndex) => { if (animating) return; setActiveIndex(newIndex); }; return ( <> <div className="section pt-o" id="carousel"> <Container> <h2 className="title"> <b>LOCATIONS</b> </h2> <Row> <Col className="ml-auto mr-auto" md="8"> <Card className="page-carousel"> <Carousel activeIndex={activeIndex} next={next} previous={previous} > <CarouselIndicators items={items} activeIndex={activeIndex} onClickHandler={goToIndex} /> {locations.map((location) => { return ( <CarouselItem onExiting={onExiting} onExited={onExited} key={location.location_id} > <img src={location.location_image} alt="" /> <CarouselCaption captionText={location.location_name} captionHeader="" /> </CarouselItem> ); })} <a className="left carousel-control carousel-control-prev" data-slide="prev" href="#pablo" onClick={(e) => { e.preventDefault(); previous(); }} role="button" > <span className="fa fa-angle-left" /> <span className="sr-only">Previous</span> </a> <a className="right carousel-control carousel-control-next" data-slide="next" href="#pablo" onClick={(e) => { e.preventDefault(); next(); }} role="button" > <span className="fa fa-angle-right" /> <span className="sr-only">Next</span> </a> </Carousel> </Card> </Col> </Row> </Container> </div>{" "} </> ); } export default LocationCarousel;
const test = require('tap').test; const Sensing = require('../../src/blocks/scratch3_sensing'); const Runtime = require('../../src/engine/runtime'); const Sprite = require('../../src/sprites/sprite'); const RenderedTarget = require('../../src/sprites/rendered-target'); test('getPrimitives', t => { const rt = new Runtime(); const s = new Sensing(rt); t.type(s.getPrimitives(), 'object'); t.end(); }); test('ask and answer with a hidden target', t => { const rt = new Runtime(); const s = new Sensing(rt); const util = {target: {visible: false}}; const expectedQuestion = 'a question'; const expectedAnswer = 'the answer'; // Test is written out of order because of promises, follow the (#) comments. rt.addListener('QUESTION', question => { // (2) Assert the question is correct, then emit the answer t.strictEqual(question, expectedQuestion); rt.emit('ANSWER', expectedAnswer); }); // (1) Emit the question. const promise = s.askAndWait({QUESTION: expectedQuestion}, util); // (3) Ask block resolves after the answer is emitted. promise.then(() => { t.strictEqual(s.getAnswer(), expectedAnswer); t.end(); }); }); test('ask and answer with a visible target', t => { const rt = new Runtime(); const s = new Sensing(rt); const util = {target: {visible: true}}; const expectedQuestion = 'a question'; const expectedAnswer = 'the answer'; rt.removeAllListeners('SAY'); // Prevent say blocks from executing rt.addListener('SAY', (target, type, question) => { // Should emit SAY with the question t.strictEqual(question, expectedQuestion); }); rt.addListener('QUESTION', question => { // Question should be blank for a visible target t.strictEqual(question, ''); // Remove the say listener and add a new one to assert bubble is cleared // by setting say to empty string after answer is received. rt.removeAllListeners('SAY'); rt.addListener('SAY', (target, type, text) => { t.strictEqual(text, ''); t.end(); }); rt.emit('ANSWER', expectedAnswer); }); s.askAndWait({QUESTION: expectedQuestion}, util); }); test('set drag mode', t => { const runtime = new Runtime(); runtime.requestTargetsUpdate = () => {}; // noop for testing const sensing = new Sensing(runtime); const s = new Sprite(); const rt = new RenderedTarget(s, runtime); sensing.setDragMode({DRAG_MODE: 'not draggable'}, {target: rt}); t.strictEqual(rt.draggable, false); sensing.setDragMode({DRAG_MODE: 'draggable'}, {target: rt}); t.strictEqual(rt.draggable, true); t.end(); }); test('get loudness with caching', t => { const rt = new Runtime(); const sensing = new Sensing(rt); // It should report -1 when audio engine is not available. t.strictEqual(sensing.getLoudness(), -1); // Stub the audio engine with its getLoudness function, and set up different // values to simulate it changing over time. const firstLoudness = 1; const secondLoudness = 2; let simulatedLoudness = firstLoudness; rt.audioEngine = {getLoudness: () => simulatedLoudness}; // It should report -1 when current step time is null. t.strictEqual(sensing.getLoudness(), -1); // Stub the current step time. rt.currentStepTime = 1000 / 30; // The first time it works, it should report the result from the stubbed audio engine. t.strictEqual(sensing.getLoudness(), firstLoudness); // Update the simulated loudness to a new value. simulatedLoudness = secondLoudness; // Simulate time passing by advancing the timer forward a little bit. // After less than a step, it should still report cached loudness. let simulatedTime = Date.now() + (rt.currentStepTime / 2); sensing._timer = {time: () => simulatedTime}; t.strictEqual(sensing.getLoudness(), firstLoudness); // Simulate more than a step passing. It should now request the value // from the audio engine again. simulatedTime += rt.currentStepTime; t.strictEqual(sensing.getLoudness(), secondLoudness); t.end(); }); test('loud? boolean', t => { const rt = new Runtime(); const sensing = new Sensing(rt); // The simplest way to test this is to actually override the getLoudness // method, which isLoud uses. let simulatedLoudness = 0; sensing.getLoudness = () => simulatedLoudness; t.false(sensing.isLoud()); // Check for GREATER than 10, not equal. simulatedLoudness = 10; t.false(sensing.isLoud()); simulatedLoudness = 11; t.true(sensing.isLoud()); t.end(); });
import '../styles/global.css' const App = ({ Component, pageProps }) => { return <Component {...pageProps} /> } export default App;
$(document).ready(function () { //添加提示框 $('#add-user-modal').modal({ backdrop: 'static', show: false }); //编辑提示框 $('#edit-user-modal').modal({ backdrop: 'static', show: false }); var ajax_source = "/member/user_list_page"; //列表datatable var oTable = $('#user_tb').dataTable({ "sDom": "<'row'<'col-sm-6'f>r>t<'row'<'col-sm-2'<'dt_actions'>l><'col-sm-2'i><'col-sm-8'p>>", "sPaginationType": "bootstrap_alt", "bFilter": false, //禁止过滤 "aaSorting": [[0, 'desc']], //默认排序 "sAjaxSource": ajax_source, "bServerSide": true, "aoColumnDefs": [ { "aTargets": [1, 2, 3, 4, 5, 6], "bSortable": false } ], "aoColumns": [ {"mData": "id"}, {"mData": "account"}, {"mData": "nick_name"}, {"mData": "email"}, {"mData": "phone"}, {"mData": "role_name"}, {"mData": "oper"} ], "oLanguage": { "sLengthMenu": "显示 _MENU_ ", "sInfo": "展示第 _START_ 到 _END_ 共_TOTAL_", "sProcessing": "正在查询...", "sZeroRecords": "抱歉,没找到相关记录", "oPaginate": { "sFirst": "首页", "sPrevious": "上一页", "sNext": "下一页", "sLast": "末页" }, } }); //查询 $('button.search').die().live("click", function (e) { var oSettings = oTable.fnSettings(); oSettings.sAjaxSource = ajax_source + getSearchParams(); oTable.fnDraw(); }); /** * 获取查询条件呢 * @returns {String} */ function getSearchParams() { var params; params = "?id=" + $("input[name=s_id]").val() + "&name=" + encodeURIComponent($("input[name=s_name]").val()) + "&account=" + $("input[name=s_account]").val() + "&email=" + $("input[name=s_email]").val(); return params; } function getRole(){ var checkedRole = $("input[name=roles]:checked"); var roles = []; for (var i = 0; i < checkedRole.length; i++) { roles.push(checkedRole[i].value); } return roles; } function getEditRole(){ var checkedRole = $("input[name=e_roles]:checked"); var roles = []; for (var i = 0; i < checkedRole.length; i++) { roles.push(checkedRole[i].value); } return roles; } function setRole(roleStr){ var roles = roleStr.split(','); var checkedRole = $("input[name=e_roles]"); for (var i = 0; i < checkedRole.length; i++) { if($.inArray(checkedRole[i].value,roles)!=-1){ checkedRole[i].checked = 'checked'; }else{ checkedRole[i].checked = false; } } } //新建 $("#add-user").click(function(){ $(".alert-label-error").text(''); $("#add-user-modal").modal('show'); $("#add-user-bnt").die().live('click',function(){ $(".alert-label-error").text(''); var flag = true; var name = $("input[name=a_name]").val(); var passowrd = $("input[name=a_password]").val(); var nickname = $("input[name=a_nickname]").val(); var email = $("input[name=a_email]").val(); var phone = $("input[name=a_phone]").val(); var roles = getRole(); var is_mobile = /^(?:13\d|15\d|18\d)\d{5}(\d{3}|\*{3})$/; var is_phone = /^((0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/; var is_email = /^[a-z0-9-\_]+[\.a-z0-9_\-]*@([_a-z0-9\-]+\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)$/; var name_preg = /^[a-zA-Z0-9\.@]+$/; if( name=='' || ! name_preg.test(name)){ flag = flag & false; $("#a-name-error").text('请填写正确的用户名称!'); } if( nickname=='' ){ flag = flag & false; $("#a-nickname-error").text('请填写用户姓名!'); } if( email=='' || !is_email.test(email)){ flag = flag & false; $("#a-email-error").text('请填写正确的用户邮箱!'); } if( passowrd=='' ){ flag = flag & false; $("#a-passowrd-error").text('请填写用户密码!'); } /* if( phone==''||(!is_mobile.test(phone) && !is_phone.test(phone)) ){ flag = flag & false; $("#a-phone-error").text('请填写用户电话!'); } */ if(flag){ $.post('/member/add_user?',{ name:name,password:passowrd,nickname:nickname, email:email,phone:phone,roles:roles },function(ret){ var d = $.parseJSON(ret); $("#add-user-modal").modal('hide'); if (d.errCode==0) { alertSuccess("#alert-success",''); var oSettings = oTable.fnSettings(); oSettings.sAjaxSource = ajax_source + getSearchParams(); oTable.fnDraw(); } else { alertError("#alert-error",d.msg); } }); } }); }) //编辑 $("a.edit").die().live('click',function(){ $("input[name=e_id]").val($(this).attr('rel')); $("#e_name").text($(this).parent().siblings().eq(1).text()); $("input[name=e_nickname]").val($(this).parent().siblings().eq(2).text()); $("input[name=e_email]").val($(this).parent().siblings().eq(3).text()); $("input[name=e_phone]").val($(this).parent().siblings().eq(4).text()); setRole($(this).attr('role')); $(".alert-label-error").text(''); $("#edit-user-modal").modal('show'); $("#edit-user-bnt").die().live('click',function(){ $(".alert-label-error").text(''); var flag = true; var id = $("input[name=e_id]").val(); var nickname = $("input[name=e_nickname]").val(); var email = $("input[name=e_email]").val(); var phone = $("input[name=e_phone]").val(); var roles = getEditRole(); var is_mobile = /^(?:13\d|15\d|18\d)\d{5}(\d{3}|\*{3})$/; var is_phone = /^((0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/; var is_email = /^[a-z0-9-\_]+[\.a-z0-9_\-]*@([_a-z0-9\-]+\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)$/; if( nickname=='' ){ flag = flag & false; $("#e-nickname-error").text('请填写用户姓名!'); } if( email=='' || !is_email.test(email)){ flag = flag & false; $("#e-email-error").text('请填写正确的用户邮箱!'); } if( phone==''||(!is_mobile.test(phone) && !is_phone.test(phone)) ){ flag = flag & false; $("#e-phone-error").text('请填写用户电话!'); } if(flag){ $.post('/member/edit_user?',{ id:id,nickname:nickname, email:email,phone:phone,roles:roles },function(ret){ var d = $.parseJSON(ret); if (d.errCode==0) { $("#edit-user-modal").modal('hide'); alertSuccess("#alert-success",''); var oSettings = oTable.fnSettings(); oSettings.sAjaxSource = ajax_source + getSearchParams(); oTable.fnDraw(); } else { $("#e-error-info").text(d.msg); } }); } }); }) });
import React from "react" import Why from "./form.module.scss" export default class MyForm extends React.Component { constructor(props) { super(props) this.submitForm = this.submitForm.bind(this) this.state = { status: "", } } render() { const { status } = this.state return ( <div className={Why.myform}> <form onSubmit={this.submitForm} action="https://formspree.io/maypqzre" method="POST" > {" "} <div className={Why.flexmini}> {" "} <div> <label>Email:</label> <input type="email" name="email" /> </div> <div> <label>Name:</label> <input type="text" name="name"></input> </div> </div> <label>Message:</label> <label htmlFor="msg"></label> <textarea name="message" id="msg" cols="30" rows="10"></textarea> {/* <input type="textarea" name="message" /> */} {status === "SUCCESS" ? ( <p>Thanks!</p> ) : ( <button> Submit{" "} <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 19" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" > <line x1="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </button> )} {status === "ERROR" && <p>Ooops! There was an error.</p>} </form> </div> ) } submitForm(ev) { ev.preventDefault() const form = ev.target const data = new FormData(form) const xhr = new XMLHttpRequest() xhr.open(form.method, form.action) xhr.setRequestHeader("Accept", "application/json") xhr.onreadystatechange = () => { if (xhr.readyState !== XMLHttpRequest.DONE) return if (xhr.status === 200) { form.reset() this.setState({ status: "SUCCESS" }) } else { this.setState({ status: "ERROR" }) } } xhr.send(data) } }
""" Ask the user for a number. Depending on whether the number is even or odd, print out an appropriate message to the user. Extras: 1. If the number is a multiple of 4, print out a different message. 2. Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message. """ num1 = int( input ("Enter a number: ")) if num1 % 4 == 0: print("The number is a multiple of 4.") elif num1 % 2 == 0: print("The number is a Even number.") else: print("The number is a Odd number.") num = int ( input("Again, enter a number: ")) check = int ( input("Enter another number: ")) res = num / check if type(res) == int: print(check, " divides evenly into ", num) else: print(check, " doesn't divide evenly into ", num)
import React from 'react'; import { Link } from 'react-router-dom'; import Button from '../components/Button'; import "../CSS/notfound.css" function NotFound() { return ( <div className="error_center"> <div className="error_logo"> <span className="first">4</span><span className="second">0</span><span className="third">4</span> </div> <p>Welcome TO Rajeev Khadka's World</p> <h2> <b>Oops; </b> Sorry, but the page you were trying to view does not exist or deleted. </h2> <Link to = "/"> <Button btn_value = " Go Back " /> </Link> </div> ) } export default NotFound;
function my_function938(){ //81605874657214615739444056389509xFhjynFCDzdndaELNqDlLzzScpTcfYLh } function my_function062(){ //36487385372675356599896186248085uEDCiLVaSKLHrJZBcWVfJNMgnpHDbzOA } function my_function600(){ //45266049248194593629839375960325NiBJSMqbygrBrBAMJTIFKnVysaycSpHq } function my_function749(){ //65683658497871217302642068206513YwFwgzneIjtEXFrJDWcLGJAwAxoaTWxb } function my_function261(){ //22316002632538063491223663736309jKYJkjSPlVOMJTlbbacMBVuQEvImRCtp } function my_function369(){ //89766897344764415332813172064026nkTNuAbEaVceZYRXeXHIMsKagImpWyRN } function my_function065(){ //24390412530105021627591920083231nQuVzCdRiUdMyzhDuILPLiHGffyefJbK } function my_function561(){ //17298110603577031095717103656656taOJiZYlExzcSBFXeezuBVmkTlgkKpjH } function my_function927(){ //69653346947043162487134878511572dYWawKWkgSetRbaSPmlQOPQitKfjqtkg } function my_function451(){ //34790688414657552821364816103830QPMjrzYRaMrIbrPXqfDGwCxXkEHBlqDg } function my_function015(){ //10998526574780139824254634034046xbANlTEywArEramnmKYIqlGXfDEDLvLZ } function my_function009(){ //05425483590030117562401131756441ELSsYqPHxCtUxcKjpEudZbzLRQdpyFyL } function my_function590(){ //93171240609936249765358185998682hKaaChRtWQmTSiRaLVObHPgVsTvACaXq } function my_function197(){ //83379749212659676412540246411325VsgXaCEaSaNbruDqiqfCKFSftsVASYDo } function my_function028(){ //76988257341295454434475706973601ftsaKDebSDZOAJYDLSZFmtQgXLWNxjDH } function my_function898(){ //32673853211788544556786357717690ZpagWAHwcfpRFPzueOSLzgOlIrZXkHNa } function my_function051(){ //09394857569614147349698667373110SksigGWrAZgwGGHyfnNNhqeIskXuXWQq } function my_function961(){ //49679320343798937632596138218846npdhfsOkgNNhRnHrzdBszWFAFdsiOTAf } function my_function853(){ //16030693967082422997733233091253OpAjChSfJIFkVBwbAKIOzePCfGNwmFVR } function my_function214(){ //16800046771278914168167601804959bjURzXzOFQXLDluIxxpdUMoPKdvAYkXp } function my_function218(){ //66960571705225880546223073169637wsyNwKiiaGezTFuPbuVcjiFmRsggmFpX } function my_function737(){ //80056545860233379421952742167227ZztpMYzOZsGRNSUwkvckMzgQAydCXoLi } function my_function383(){ //33652832006288935045835854341209YGegOVbjxBQybeDCtafidweDsLXzKhpA } function my_function326(){ //62725314812082511679817662617343SYizJFWIQZsYSrDlrloblErGmXrcdBkQ } function my_function541(){ //35936718136510183085815557700531gRaHkgmuZABnVTRfTDlclQsZhIyTFzLe } function my_function591(){ //62353301312092245448127208256787nEYANcWgDFFOFfIwnkrYyXaavCTMhMzz } function my_function197(){ //73519065283215899775450554247328etbLNIFGgansKwHSfXaxzitcpJNrcrOR } function my_function038(){ //49055576364359615604944838557718XhMxhYIzaJkPdXIXlYvFQhqSnSPsEeJX } function my_function474(){ //83673833274849768457457355494871vZYOFRketUrpJqltgICoWshZFjdWDolO } function my_function108(){ //78219960519774810445254146417572vApYlhuSwCrTsShsCeKnftRJfDIpvLrl } function my_function968(){ //07859260273123746222394164192797lRpdROvxzFEVZTjJipKCftQYLKbDBOZd } function my_function473(){ //38280224081181995050306647586974tIveMpFiTFUBhzBOeNqEJkHzWjsloKIW } function my_function584(){ //85878110535302216796578509404302uknrvbbwkGcHflUfNEsdEgBtLzwlePfr } function my_function586(){ //87919373083697259568096282720428xGGkPvTzWVbjzjWOqWgonUQrzNHYwiBZ } function my_function600(){ //27568419597822478569320828780623yeVtJnZseTBivJhgioxOBizLUeDeJhNY } function my_function984(){ //86877698565604636304929150941876rRDGXdnxbqLLUGmTncExlSYiZSoiZGPw } function my_function937(){ //21455909259115600716703243635005ADkYmYndNJtYqIdqscNtgYGtikQDcsPj } function my_function816(){ //65618070983380971921692794510217OkjdXIywJcUCXRxMEFRBheoxdGEmvpGw } function my_function757(){ //41624686856610920858850233082598jGWFvUepszuMSTqTLwKaVVCYjEeKPMbc } function my_function739(){ //78632531630062181448072182873636euZhYVnZutPqAhrkpImemOyCmHYBSKHA } function my_function666(){ //41069338384541803965292209179269GvoToRhyyIOvieXpOICiPaREfAbHOuBs } function my_function486(){ //27303626850962770878410933926085SofTwATUYeMXbfSaapbjVmdjYirIDwVb } function my_function986(){ //48319926657016102573102963363007gqEyBVAMnsGfdQmSXFoTBnswYQeUKTdm } function my_function949(){ //15333579244315967331184030755893gUuwvjwBsuAMqfqmuUTemuODIbDLbGWJ } function my_function931(){ //84929286518533858166180189312573aolQIkwcCPpPnLGOwpTntpAySoddhfuL } function my_function428(){ //83599058406302196632164566927640XYCdsdHcGfqnGCTbwcwmMJmWffXzFXgS }
import React from "react"; function Report({ personData, controlData }) { // personData = controlled score, controlData = original score. const red = "#ad3e2f"; const orange = "#db5400"; const lightOrange = "#f0a171"; const green = "#377d4f"; const blue = "#284e78"; const darkred = "#ab2615"; const bold = "600"; const light = "400"; const colorBox = () => { if ( personData["Hengitystaajuus - NEWSscore"] === 3 || personData["Happisaturaatio - NEWSscore"] === 3 || personData["Systolinen verenpaine - NEWSscore"] === 3 || personData["Syketaajuus - NEWSscore"] === 3 || personData["Mittaa lämpötila - NEWSscore"] === 3 || personData["Tajunnan taso"] === false ) { return darkred; } else if ( personData["Hengitystaajuus - NEWSscore"] + personData["Happisaturaatio - NEWSscore"] + personData["Systolinen verenpaine - NEWSscore"] + personData["Syketaajuus - NEWSscore"] + personData["Mittaa lämpötila - NEWSscore"] >= 4 ) { return darkred; } else if ( personData["Hengitystaajuus - NEWSscore"] === 0 && personData["Happisaturaatio - NEWSscore"] === 0 && personData["Systolinen verenpaine - NEWSscore"] === 0 && personData["Syketaajuus - NEWSscore"] === 0 && personData["Mittaa lämpötila - NEWSscore"] === 0 ) { return green; } else { return blue; } } const hengitystaajuusStyle = () => { if (personData.Hengitystaajuus <= 8 || personData.Hengitystaajuus >= 25) { return red; } else if ( personData.Hengitystaajuus >= 9 && personData.Hengitystaajuus <= 11 ) { return lightOrange; } else if ( personData.Hengitystaajuus >= 12 && personData.Hengitystaajuus <= 20 ) { return green; } else if ( personData.Hengitystaajuus >= 21 && personData.Hengitystaajuus <= 24 ) { return orange; } }; const hengitystaajuusBold = () => { if (personData.Hengitystaajuus <= 8 || personData.hengitystaajuus >= 25) { return bold; } }; const hengitystaajuusStyle2 = () => { if (controlData.Hengitystaajuus <= 8 || controlData.Hengitystaajuus >= 25) { return red; } else if ( controlData.Hengitystaajuus >= 9 && controlData.Hengitystaajuus <= 11 ) { return lightOrange; } else if ( controlData.Hengitystaajuus >= 12 && controlData.Hengitystaajuus <= 20 ) { return green; } else if ( controlData.Hengitystaajuus >= 21 && controlData.Hengitystaajuus <= 24 ) { return orange; } }; const hengitystaajuusBold2 = () => { if (controlData.Hengitystaajuus <= 8 || controlData.Hengitystaajuus >= 25) { return bold; } else if ( controlData.Hengitystaajuus >= 9 && controlData.Hengitystaajuus <= 24 ) { return light; } else if ( personData.Hengitystaajuus <= 8 || personData.Hengitystaajuus >= 25 ) { return bold; } else { return light; } }; const hengitystaajuus = () => { if (controlData.Hengitystaajuus === undefined) { return null; } else if ( controlData.Hengitystaajuus >= 12 && controlData.Hengitystaajuus <= 20 && personData.Hengitystaajuus >= 12 && personData.Hengitystaajuus <= 20 ) { return null; } else { return personData.Hengitystaajuus; } }; const hengitystaajuus2 = () => { if (controlData.Hengitystaajuus === undefined) { return personData.Hengitystaajuus; } else { return controlData.Hengitystaajuus; } }; const hengitystaajuusTimestamp = () => { if (controlData.Hengitystaajuus === undefined) { return null; } else if ( controlData.Hengitystaajuus >= 12 && controlData.Hengitystaajuus <= 20 && personData.Hengitystaajuus >= 12 && personData.Hengitystaajuus <= 20 ) { return null; } else { return personData.Hengitystaajuus_timestamp; } }; const happisaturaatioStyle = () => { if (personData.Happisaturaatio <= 91) { return red; } else if ( personData.Happisaturaatio >= 92 && personData.Happisaturaatio <= 93 ) { return orange; } else if ( personData.Happisaturaatio >= 94 && personData.Happisaturaatio <= 95 ) { return lightOrange; } else if (personData.Happisaturaatio >= 96) { return green; } }; const happisaturaatioBold = () => { if (personData.Happisaturaatio <= 91) { return bold; } }; const happisaturaatioStyle2 = () => { if (controlData.Happisaturaatio <= 91) { return red; } else if ( controlData.Happisaturaatio >= 92 && controlData.Happisaturaatio <= 93 ) { return orange; } else if ( controlData.Happisaturaatio >= 94 && controlData.Happisaturaatio <= 95 ) { return lightOrange; } else if (controlData.Happisaturaatio >= 96) { return green; } }; const happisaturaatioBold2 = () => { if (controlData.Happisaturaatio <= 91) { return bold; } else if ( controlData.Happisaturaatio >= 92 ) { return light; } else if ( personData.Happisaturaatio <= 91 ) { return bold; } else { return light; } }; const happisaturaatio = () => { if (controlData.Happisaturaatio === undefined) { return null; } else if ( controlData.Happisaturaatio >= 96 && personData.Happisaturaatio >= 96 ) { return null; } else { return personData.Happisaturaatio; } }; const happisaturaatio2 = () => { if (controlData.Happisaturaatio === undefined) { return personData.Happisaturaatio; } else { return controlData.Happisaturaatio; } }; const happisaturaatioTimestamp = () => { if (controlData.Happisaturaatio === undefined) { return null; } else if ( controlData.Happisaturaatio >= 96 && personData.Happisaturaatio >= 96 ) { return null; } else { return personData.Happisaturaatio_timestamp; } }; const systolinenVerenpaineStyle = () => { if ( personData["Systolinen verenpaine"] <= 90 || personData["Systolinen verenpaine"] >= 220 ) { return red; } else if ( personData["Systolinen verenpaine"] >= 91 && personData["Systolinen verenpaine"] <= 100 ) { return orange; } else if ( personData["Systolinen verenpaine"] >= 101 && personData["Systolinen verenpaine"] <= 110 ) { return lightOrange; } else if ( personData["Systolinen verenpaine"] >= 111 && personData["Systolinen verenpaine"] <= 219 ) { return green; } }; const systolinenVerenpaineBold = () => { if ( personData["Systolinen verenpaine"] <= 90 || personData["Systolinen verenpaine"] >= 220 ) { return bold; } }; const systolinenVerenpaineStyle2 = () => { if ( controlData["Systolinen verenpaine"] <= 90 || controlData["Systolinen verenpaine"] >= 220 ) { return red; } else if ( controlData["Systolinen verenpaine"] >= 91 && controlData["Systolinen verenpaine"] <= 100 ) { return orange; } else if ( controlData["Systolinen verenpaine"] >= 101 && controlData["Systolinen verenpaine"] <= 110 ) { return lightOrange; } else if ( controlData["Systolinen verenpaine"] >= 111 && controlData["Systolinen verenpaine"] <= 219 ) { return green; } }; const systolinenVerenpaineBold2 = () => { if ( controlData["Systolinen verenpaine"] <= 90 || controlData["Systolinen verenpaine"] >= 220 ) { return bold; } else if ( controlData["Systolinen verenpaine"] >= 91 && controlData["Systolinen verenpaine"] <= 219 ) { return light; } else if ( personData["Systolinen verenpaine"] <= 90 || personData["Systolinen verenpaine"] >= 220 ) { return bold; } else { return light; } }; const systolinenVerenpaine = () => { if (controlData["Systolinen verenpaine"] === undefined) { return null; } else if ( controlData["Systolinen verenpaine"] >= 111 && controlData["Systolinen verenpaine"] <= 219 && personData["Systolinen verenpaine"] >= 111 && personData["Systolinen verenpaine"] <= 219 ) { return null; } else { return personData["Systolinen verenpaine"]; } }; const systolinenVerenpaine2 = () => { if (controlData["Systolinen verenpaine"] === undefined) { return personData["Systolinen verenpaine"]; } else { return controlData["Systolinen verenpaine"]; } }; const systolinenVerenpaineTimestamp = () => { if (controlData["Systolinen verenpaine"] === undefined) { return null; } else if ( controlData["Systolinen verenpaine"] >= 111 && controlData["Systolinen verenpaine"] <= 219 && personData["Systolinen verenpaine"] >= 111 && personData["Systolinen verenpaine"] <= 219 ) { return null; } else { return personData["Systolinen verenpaine_timestamp"]; } }; const syketaajuusStyle = () => { if (personData.Syketaajuus <= 40 || personData.Syketaajuus >= 131) { return red; } else if (personData.Syketaajuus >= 111 && personData.Syketaajuus <= 130) { return orange; } else if ( (personData.Syketaajuus >= 41 && personData.Syketaajuus <= 50) || (personData.Syketaajuus >= 91 && personData.Syketaajuus <= 110) ) { return lightOrange; } else if (personData.Syketaajuus >= 51 && personData.Syketaajuus <= 90) { return green; } }; const syketaajuusBold = () => { if (personData.Syketaajuus <= 40 || personData.Syketaajuus >= 131) { return bold; } }; const syketaajuusStyle2 = () => { if (controlData.Syketaajuus <= 40 || controlData.Syketaajuus >= 131) { return red; } else if ( controlData.Syketaajuus >= 111 && controlData.Syketaajuus <= 130 ) { return orange; } else if ( (controlData.Syketaajuus >= 41 && controlData.Syketaajuus <= 50) || (controlData.Syketaajuus >= 91 && controlData.Syketaajuus <= 110) ) { return lightOrange; } else if (controlData.Syketaajuus >= 51 && controlData.Syketaajuus <= 90) { return green; } }; const syketaajuusBold2 = () => { if ( controlData.Syketaajuus <= 40 || controlData.Syketaajuus >= 131 ) { return bold; } else if ( controlData.Syketaajuus >= 41 && controlData.Syketaajuus <= 130 ) { return light; } else if ( personData.Syketaajuus <= 40 || personData.Syketaajuus >= 131 ) { return bold; } else { return light; } }; const syketaajuus = () => { if (controlData.Syketaajuus === undefined) { return null; } else if ( controlData.Syketaajuus >= 51 && controlData.Syketaajuus <= 90 && personData.Syketaajuus >= 51 && controlData.Syketaajuus <= 90 ) { return null; } else { return personData.Syketaajuus; } }; const syketaajuus2 = () => { if (controlData.Syketaajuus === undefined) { return personData.Syketaajuus; } else { return controlData.Syketaajuus; } }; const syketaajuusTimestamp = () => { if (controlData.Syketaajuus === undefined) { return null; } else if ( controlData.Syketaajuus >= 51 && controlData.Syketaajuus <= 90 && personData.Syketaajuus >= 51 && controlData.Syketaajuus <= 90 ) { return null; } else { return personData.Syketaajuus_timestamp; } }; const lampotilaStyle = () => { if (personData["Mittaa lämpötila"] <= 35) { return red; } else if (personData["Mittaa lämpötila"] >= 39.1) { return orange; } else if ( (personData["Mittaa lämpötila"] >= 35.1 && personData["Mittaa lämpötila"] <= 36) || (personData["Mittaa lämpötila"] >= 38.1 && personData["Mittaa lämpötila"] <= 39) ) { return lightOrange; } else if ( personData["Mittaa lämpötila"] >= 36.1 && personData["Mittaa lämpötila"] <= 38 ) { return green; } }; const lampotilaBold = () => { if (personData["Mittaa lämpötila"] <= 35) { return bold; } }; const lampotilaStyle2 = () => { if (controlData["Mittaa lämpötila"] <= 35) { return red; } else if (controlData["Mittaa lämpötila"] >= 39.1) { return orange; } else if ( (controlData["Mittaa lämpötila"] >= 35.1 && controlData["Mittaa lämpötila"] <= 36) || (controlData["Mittaa lämpötila"] >= 38.1 && controlData["Mittaa lämpötila"] <= 39) ) { return lightOrange; } else if ( controlData["Mittaa lämpötila"] >= 36.1 && controlData["Mittaa lämpötila"] <= 38 ) { return green; } }; const lampotilaBold2 = () => { if (controlData["Mittaa lämpötila"] <= 35) { return bold; } else if (controlData["Mittaa lämpötila"] >= 35.1) { return light; } else if (personData["Mittaa lämpötila"] <= 35) { return bold; } else { return light; } }; const lampotila = () => { if (controlData["Mittaa lämpötila"] === undefined) { return null; } else if ( controlData["Mittaa lämpötila"] >= 36.1 && controlData["Mittaa lämpötila"] <= 38 && personData["Mittaa lämpötila"] >= 36.1 && personData["Mittaa lämpötila"] <= 38 ) { return null; } else { return personData["Mittaa lämpötila"]; } }; const lampotila2 = () => { if (controlData["Mittaa lämpötila"] === undefined) { return personData["Mittaa lämpötila"]; } else { return controlData["Mittaa lämpötila"]; } }; const lampotilaTimestamp = () => { if (controlData["Mittaa lämpötila"] === undefined) { return null; } else if ( controlData["Mittaa lämpötila"] >= 36.1 && controlData["Mittaa lämpötila"] <= 38 && personData["Mittaa lämpötila"] >= 36.1 && personData["Mittaa lämpötila"] <= 38 ) { return null; } else { return personData["Mittaa lämpötila_timestamp"]; } }; const tajunnanTasoStyle = () => { if (personData["Tajunnan taso"] === true) { return green; } else { return red; } }; const tajunnanTasoStyle2 = () => { if (controlData["Tajunnan taso"] === undefined) { return green; } else if ( controlData["Tajunnan taso"] === true ) { return green; } else { return red; } }; const tajunnanTasoBold = () => { if (personData["Tajunnan taso"] === false) { return bold; } }; const tajunnanTasoBold2 = () => { if (controlData["Tajunnan taso"] === false) { return bold; } }; const tajunnanTaso = () => { if (controlData["Tajunnan taso"] === undefined) { return null; } else if ( controlData["Tajunnan taso"] === true && personData["Tajunnan taso"] === true ) { return null; } else if ( controlData["Tajunnan taso"] === false && personData["Tajunnan taso"] === false ) { return "Poikkeava"; } else { return "Normaali"; } }; const tajunnanTaso2 = () => { if (controlData["Tajunnan taso"] === undefined) { return "Normaali"; } else if ( controlData["Tajunnan taso"] === true ) { return "Normaali" } else { return "Poikkeava"; } }; const tajunnanTasoTimestamp = () => { if (controlData["Tajunnan taso"] === undefined) { return null; } else if ( controlData["Tajunnan taso"] === true && personData["Tajunnan taso"] === true ) { return null } else { return personData["Tajunnan taso_timestamp"]; } }; const verensokeriStyle = () => { if ( (personData["Mittaa verensokeri:"] <= 3.9 && personData["Mittaa verensokeri:"] >= 0.1) || personData["Mittaa verensokeri:"] >= 25 ) { return red; } else if ( (personData["Mittaa verensokeri:"] >= 4 && personData["Mittaa verensokeri:"] <= 6) || (personData["Mittaa verensokeri:"] >= 20.1 && personData["Mittaa verensokeri:"] <= 24.9) ) { return orange; } else if ( personData["Mittaa verensokeri:"] >= 15 && personData["Mittaa verensokeri:"] <= 20 ) { return lightOrange; } else if ( personData["Mittaa verensokeri:"] >= 6.1 && personData["Mittaa verensokeri:"] <= 14.9 ) { return green; } }; const verensokeriBold = () => { if ( personData["Mittaa verensokeri:"] <= 3.9 || personData["Mittaa verensokeri:"] >= 25 ) { return bold; } }; const verensokeriStyle2 = () => { if ( (controlData["Mittaa verensokeri:"] <= 3.9 && controlData["Mittaa verensokeri:"] >= 0.1) || controlData["Mittaa verensokeri:"] >= 25 ) { return red; } else if ( (controlData["Mittaa verensokeri:"] >= 4 && controlData["Mittaa verensokeri:"] <= 6) || (controlData["Mittaa verensokeri:"] >= 20.1 && controlData["Mittaa verensokeri:"] <= 24.9) ) { return orange; } else if ( controlData["Mittaa verensokeri:"] >= 15 && controlData["Mittaa verensokeri:"] <= 20 ) { return lightOrange; } else if ( controlData["Mittaa verensokeri:"] >= 6.1 && controlData["Mittaa verensokeri:"] <= 14.9 ) { return green; } }; const verensokeriBold2 = () => { if ( (controlData["Mittaa verensokeri:"] <= 3.9 && controlData["Mittaa verensokeri:"] >= 0.1) || controlData["Mittaa verensokeri:"] >= 25 ) { return bold; } else if ( (controlData["Mittaa verensokeri:"] >= 4 && controlData["Mittaa verensokeri:"] <= 24.9) || controlData["Mittaa verensokeri:"] === 0 ) { return light; } else if ( (personData["Mittaa verensokeri:"] <= 3.9 && personData["Mittaa verensokeri:"] >= 0.1) || personData["Mittaa verensokeri:"] >= 25 ) { return bold; } else { return light; } }; const verensokeri = () => { if ( controlData["Mittaa verensokeri:"] === undefined || personData["Mittaa verensokeri:"] === 0 ) { return null; } else if ( controlData["Mittaa verensokeri:"] >= 6.1 && controlData["Mittaa verensokeri:"] <= 14.9 && personData["Mittaa verensokeri:"] >= 6.1 && personData["Mittaa verensokeri:"] <= 14.9 ) { return null; } else if ( personData["Mittaa verensokeri:"] !== undefined ) { return personData["Mittaa verensokeri:"]; } else { return null; } }; const verensokeri2 = () => { if ( personData["Mittaa verensokeri:"] === 0 && controlData["Mittaa verensokeri:"] === 0 ) { return "Ei mitattu"; } else if ( personData["Mittaa verensokeri:"] === 0 ) { return "Ei mitattu"; } else if ( controlData["Mittaa verensokeri:"] !== undefined ) { return controlData["Mittaa verensokeri:"]; } else if ( personData["Mittaa verensokeri:"] !== undefined ) { return personData["Mittaa verensokeri:"]; } else { return "Ei mitattu"; } }; const verensokeriTimestamp = () => { if (controlData["Mittaa verensokeri:"] === undefined || (controlData["Mittaa verensokeri:"] === 0 && personData["Mittaa verensokeri:"] === 0)) { return null; } else if ( controlData["Mittaa verensokeri:"] >= 6.1 && controlData["Mittaa verensokeri:"] <= 14.9 && personData["Mittaa verensokeri:"] >= 6.1 && personData["Mittaa verensokeri:"] <= 14.9 ) { return null; } else { return personData["Mittaa verensokeri:_timestamp"]; } }; const verensokeriTimestamp2 = () => { if (controlData["Mittaa verensokeri:"] >= 0.1) { return controlData["Mittaa verensokeri:_timestamp"]; } else if ( controlData["Mittaa verensokeri:"] === undefined && personData["Mittaa verensokeri:"] >= 0.1 ) { return personData["Mittaa verensokeri:_timestamp"]; } else if ( (controlData["Mittaa verensokeri:"] === 0 && personData["Mittaa verensokeri:"] === 0) || (controlData["Mittaa verensokeri:"] === undefined && personData["Mittaa verensokeri:"] === 0) ) { return null; } else { return personData["Mittaa verensokeri:_timestamp"]; } }; const timestamp = () => { if (verensokeriTimestamp() !== null) { return personData["Mittaa verensokeri:_timestampfull"]; } else if ( tajunnanTasoTimestamp() !== null ) { return personData["Tajunnan taso_timestampfull"]; } else if ( lampotilaTimestamp() !== null ) { return personData["Mittaa lämpötila_timestampfull"]; } else if ( syketaajuusTimestamp() !== null ) { return personData.Syketaajuus_timestampfull; } else if ( systolinenVerenpaineTimestamp() !== null ) { return personData["Systolinen verenpaine_timestampfull"]; } else if ( happisaturaatioTimestamp() !== null ) { return personData.Happisaturaatio_timestampfull; } else if ( hengitystaajuusTimestamp() !== null ) { return personData.Hengitystaajuus_timestampfull; } else if ( personData["Mittaa verensokeri:"] !== undefined ) { return personData["Mittaa verensokeri:_timestampfull"]; } else { return personData["Tajunnan taso_timestampfull"]; } }; return ( <div className="report-container"> <div className="sote-box" style={{ background: colorBox() }}> <h3>ABCDE-raportti:</h3> <p>{timestamp()}</p> </div> <div className="white-box"> <div className="reportElement"> <h3>Hengitystie:</h3> <div className="flex"> <p className="subject">{"Onko hengitystie auki?"}</p> <div className="answer"> {personData["Onko hengitystie auki?"] ? ( <p style={{ color: green }}>Kyllä</p> ) : ( <p style={{ color: red }}>Ei</p> )} </div> </div> <div className="flex"> <p className="subject">{"Onko ilmatie-estettä?"}</p> <div className="answer"> {personData["Onko ilmatie-estettä?"] ? ( <p style={{ color: red }}>Kyllä</p> ) : ( <p style={{ color: green }}>Ei</p> )} </div> </div> </div> <hr /> <div className="reportElement"> <h3>Hengitys:</h3> <div className="flex"> <p className="subject">{"Korviin kuultavat äänet?"}</p> <div className="answer"> <p style={{ color: green }}> {personData["Hengitys - Normaali hengitys / ei ääniä"] ? "Normaali" : null} </p> <p style={{ color: red }}> {personData["Hengitys - Vinkuna"] ? "Vinkuna" : null} </p> <p style={{ color: red }}> {personData["Hengitys - Korina"] ? "Korina" : null} </p> <p style={{ color: red }}> {personData["Hengitys - Rohina"] ? "Rohina" : null} </p> <p style={{ color: red }}> {personData["Hengitys - Raskas hengitys"] ? "Raskas hengitys" : null} </p> </div> </div> </div> <hr /> <div className="reportElement"> <h3>Verenkierto:</h3> <div className="flex"> <p className="subject">{"Syke"}</p> <div className="answer"> {personData["Tarkista syke:"] ? ( <p style={{ color: green }}>Säännöllinen</p> ) : ( <p style={{ color: red }}>Epäsäännöllinen</p> )} </div> </div> <div className="flex"> <p className="subject">{"Tuntuuko lämpörajoja raajoissa?"}</p> <div className="answer"> {personData["Tuntuuko lämpörajoja raajoissa:"] ? ( <p style={{ color: red }}>Kyllä</p> ) : ( <p style={{ color: green }}>Ei</p> )} </div> </div> </div> <hr /> <div className="reportElement"> <h3>Tajunta:</h3> <div className="flex"> <div style={{ width: "100%", fontWeight: "200", overflowWrap: "break-word", display: "block", marginTop: "1em", marginBottom: "1em", marginLeft: "0", marginRight: "0" }} className="answer" > {personData["Tajunta - Ei poikkeavia löydöksiä."] ? ( "Ei poikkeavia löydöksiä." ) : ( <div style={{ fontWeight: "bold", color: red }}> {personData.Tajunta} </div> )} </div> </div> </div> <hr /> <div className="reportElement"> <h3>Iho, paljastaminen:</h3> <div className="flex"> <p className="subject">{"Miltä iho tuntuu?"}</p> <div className="answer"> <p style={{ color: green }}> {personData["Iho, paljastaminen - Normaali"] ? "Normaali" : null} </p> <p style={{ color: red }}> {personData["Iho, paljastaminen - Kuiva"] ? "Kuiva" : null} </p> <p style={{ color: red }}> {personData["Iho, paljastaminen - Kostea"] ? "Kostea" : null} </p> <p style={{ color: red }}> {personData["Iho, paljastaminen - Kylmä"] ? "Kylmä" : null} </p> <p style={{ color: red }}> {personData["Iho, paljastaminen - Kuuma"] ? "Kuuma" : null} </p> </div> </div> <div className="flex"> <p className="subject">Onko iho muutoksia?</p> <div className="answer"> {personData["Iho, paljastaminen - Ei poikkeavia löydöksiä"] ? ( <p style={{ color: green }}>Ei</p> ) : ( <p style={{ color: red }}>Kyllä</p> )} </div> </div> {personData.Iho ? ( <p style={{ fontWeight: "bold", fontSize: "0.9rem", lineHeight: "1.6rem", color: red, overflowWrap: "break-word" }} className="answer" > {personData.Iho} </p> ) : null} </div> </div> <div className="sote-box" style={{ background: colorBox() }}> <h3>Vitaali-arvot:</h3> </div> {/* ----------------------- TIMESTAMPS ----------------------- */} <div className="white-box"> <table> <tbody> <tr> <td>{"Hengitystaajuus:"}</td> <td style={{ color: hengitystaajuusStyle2() ? (hengitystaajuusStyle2()) : (hengitystaajuusStyle()), fontWeight: hengitystaajuusBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {controlData.Hengitystaajuus_timestamp ? (controlData.Hengitystaajuus_timestamp) : (personData.Hengitystaajuus_timestamp)} </span> <br /> {hengitystaajuus2()} </td> <td></td> <td style={{ color: hengitystaajuusStyle(), fontWeight: hengitystaajuusBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {hengitystaajuusTimestamp()} </span> <br /> {hengitystaajuus()} </td> </tr> <tr></tr> <tr> <td> {"Happisaturaatio:"} <br /> <p style={{ fontWeight: "bold" }}> Huomioi asiakkaan keuhkosairaus SpO2 arvoa tulkittaessa. </p> </td> <td style={{ color: happisaturaatioStyle2() ? (happisaturaatioStyle2()) : (happisaturaatioStyle()), fontWeight: happisaturaatioBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {controlData.Happisaturaatio_timestamp ? (controlData.Happisaturaatio_timestamp) : (personData.Happisaturaatio_timestamp)} </span> <br /> {happisaturaatio2()} </td> <td></td> <td style={{ color: happisaturaatioStyle(), fontWeight: happisaturaatioBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {happisaturaatioTimestamp()} </span> <br /> {happisaturaatio()} </td> </tr> <tr></tr> <tr> <td> {"Systolinen"} <br /> {"Verenpaine:"} </td> <td style={{ color: systolinenVerenpaineStyle2() ? (systolinenVerenpaineStyle2()) : (systolinenVerenpaineStyle()), fontWeight: systolinenVerenpaineBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {controlData["Systolinen verenpaine_timestamp"] ? (controlData["Systolinen verenpaine_timestamp"]) : (personData["Systolinen verenpaine_timestamp"])} </span> <br /> {systolinenVerenpaine2()} </td> <td></td> <td style={{ color: systolinenVerenpaineStyle(), fontWeight: systolinenVerenpaineBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {systolinenVerenpaineTimestamp()} </span> <br /> {systolinenVerenpaine()} </td> </tr> <tr></tr> <tr> <td>{"Syketaajuus:"}</td> <td style={{ color: syketaajuusStyle2() ? (syketaajuusStyle2()) : (syketaajuusStyle()), fontWeight: syketaajuusBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {controlData.Syketaajuus_timestamp ? (controlData.Syketaajuus_timestamp) : (personData.Syketaajuus_timestamp)} </span> <br /> {syketaajuus2()} </td> <td></td> <td style={{ color: syketaajuusStyle(), fontWeight: syketaajuusBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {syketaajuusTimestamp()} </span> <br /> {syketaajuus()} </td> </tr> <tr></tr> <tr> <td>{"Lämpötila:"}</td> <td style={{ color: lampotilaStyle2() ? (lampotilaStyle2()) : (lampotilaStyle()), fontWeight: lampotilaBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {controlData["Mittaa lämpötila_timestamp"] ? (controlData["Mittaa lämpötila_timestamp"]) : (personData["Mittaa lämpötila_timestamp"])} </span> <br /> {lampotila2()} </td> <td></td> <td style={{ color: lampotilaStyle(), fontWeight: lampotilaBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {lampotilaTimestamp()} </span> <br /> {lampotila()} </td> </tr> <tr></tr> <tr> <td>{"Tajunnan taso:"}</td> <td style={{ color: tajunnanTasoStyle2() ? (tajunnanTasoStyle2()) : (tajunnanTasoStyle()), fontWeight: tajunnanTasoBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {controlData["Tajunnan taso_timestamp"] ? (controlData["Tajunnan taso_timestamp"]) : (personData["Tajunnan taso_timestamp"])} </span> <br /> {tajunnanTaso2()} </td> <td></td> <td style={{ color: tajunnanTasoStyle(), fontWeight: tajunnanTasoBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {tajunnanTasoTimestamp()} </span> <br /> {tajunnanTaso()} </td> </tr> <tr></tr> <tr> <td> {"Verensokeri:"} <br /> <p style={{ fontWeight: "bold" }}> Huomioi insuliini DM paasto VS tavoite. </p> </td> <td style={{ color: verensokeriStyle2() ? (verensokeriStyle2()) : (verensokeriStyle()), fontWeight: verensokeriBold2() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {verensokeriTimestamp2()} </span> <br /> {verensokeri2()} </td> <td></td> <td style={{ color: verensokeriStyle(), fontWeight: verensokeriBold() }} > <span style={{ display: "contents", color: "rgb(33, 33, 33)", fontWeight: "400" }} > {verensokeriTimestamp()} </span> <br /> {verensokeri()} </td> </tr> </tbody> </table> </div> </div> ); } export default Report;
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={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,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ca(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Fa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ba.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Oa(a,b,c||(g?"border":"content"),d,f)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b)}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n});(function(C){'use strict';function N(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.5.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function ta(a){if(null==a||Va(a))return!1;if(L(a)||G(a)||F&&a instanceof F)return!0;var b="length"in Object(a)&&a.length;return T(b)&&(0<=b&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function q(a,b,d){var c,e;if(a)if(z(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(L(a)||ta(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==q)a.forEach(b,d,a);else if(sc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ua.call(a,c)&&b.call(d,a[c],c,a);return a}function tc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function uc(a){return function(b,d){a(d,b)}}function Yd(){return++pb}function Pb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||z(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],n=g[m];d&&D(n)?da(n)?a[m]=new Date(n.valueOf()):Wa(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):Qb(n)?a[m]=n.clone():(D(a[m])||(a[m]=L(n)?[]:{}),Pb(a[m],[n],!0)):a[m]=n}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return Pb(a,va.call(arguments,1),!1)}function Zd(a){return Pb(a,va.call(arguments,1),!0)}function Z(a){return parseInt(a,10)}function Rb(a,b){return S(Object.create(a),b)}function A(){}function Xa(a){return a}function ha(a){return function(){return a}}function vc(a){return z(a.toString)&&a.toString!==ma}function y(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function sc(a){return null!==a&&"object"===typeof a&&!wc(a)}function G(a){return"string"===typeof a}function T(a){return"number"===typeof a}function da(a){return"[object Date]"===ma.call(a)}function z(a){return"function"===typeof a}function Wa(a){return"[object RegExp]"===ma.call(a)}function Va(a){return a&&a.window===a}function Ya(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function $d(a){return a&&T(a.length)&&ae.test(ma.call(a))}function Qb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function be(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function wa(a){return Q(a.nodeName||a[0]&&a[0].nodeName)}function Za(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function pa(a,b){function d(a,b){var d=b.$$hashKey,e;if(L(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(sc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&(b[e]=c(a[e]));else for(e in a)ua.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!D(a))return a;var b=f.indexOf(a);if(-1!==b)return g[b];if(Va(a)||Ya(a))throw xa("cpws");var b=!1,c=e(a);void 0===c&&(c=L(a)?[]:Object.create(wc(a)),b=!0);f.push(a);g.push(c);return b?d(a,c):c}function e(a){switch(ma.call(a)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new a.constructor(c(a.buffer),a.byteOffset,a.length);case"[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new a.constructor(a.valueOf());case"[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),b.lastIndex=a.lastIndex,b;case"[object Blob]":return new a.constructor([a],{type:a.type})}if(z(a.cloneNode))return a.cloneNode(!0)} var f=[],g=[];if(b){if($d(b)||"[object ArrayBuffer]"===ma.call(b))throw xa("cpta");if(a===b)throw xa("cpi");L(b)?b.length=0:q(b,function(a,d){"$$hashKey"!==d&&delete b[d]});f.push(a);g.push(b);return d(a,b)}return c(a)}function na(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&&"object"==d)if(L(a)){if(!L(b))return!1;if((d=a.length)==b.length){for(c=0;c<d;c++)if(!na(a[c],b[c]))return!1;return!0}}else{if(da(a))return da(b)?na(a.getTime(),b.getTime()):!1;if(Wa(a))return Wa(b)?a.toString()==b.toString():!1;if(Ya(a)||Ya(b)||Va(a)||Va(b)||L(b)||da(b)||Wa(b))return!1;d=U();for(c in a)if("$"!==c.charAt(0)&&!z(a[c])){if(!na(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!z(b[c]))return!1;return!0}return!1}function $a(a,b,d){return a.concat(va.call(b,d))}function ab(a,b){var d=2<arguments.length?va.call(arguments,2):[];return!z(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,$a(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function ce(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:Va(b)?d="$WINDOW":b&&C.document===b?d="$DOCUMENT":Ya(b)&&(d="$SCOPE");return d}function bb(a,b){if(!y(a))return T(b)||(b=b?2:null),JSON.stringify(a,ce,b)}function xc(a){return G(a)?JSON.parse(a):a}function yc(a,b){a=a.replace(de,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Sb(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=yc(b,c);d*=b-c;a=new Date(a.getTime());a.setMinutes(a.getMinutes()+d);return a}function ya(a){a=F(a).clone();try{a.empty()}catch(b){}var d=F("<div>").append(a).html();try{return a[0].nodeType===Ma?Q(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Q(b)})}catch(c){return Q(d)}}function zc(a){try{return decodeURIComponent(a)}catch(b){}}function Ac(a){var b={};q((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=zc(e),w(e)&&(f=w(f)?zc(f):!0,ua.call(b,e)?L(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Tb(a){var b=[];q(a,function(a,c){L(a)?q(a,function(a){b.push(ea(c,!0)+(!0===a?"":"="+ea(a,!0)))}):b.push(ea(c,!0)+(!0===a?"":"="+ea(a,!0)))});return b.length?b.join("&"):""}function qb(a){return ea(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ea(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ee(a,b){var d,c,e=Na.length;for(c=0;c<e;++c)if(d=Na[c]+b,G(d=a.getAttribute(d)))return d;return null}function fe(a,b){var d,c,e={};q(Na,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});q(Na,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==ee(d,"strict-di"),b(d,c?[c]:[],e))}function Bc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=F(a);if(a.injector()){var c=a[0]===C.document?"document":ya(a);throw xa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=cb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){q(a,function(a){b.push(a)});return c()};z(ca.resumeDeferredBootstrap)&&ca.resumeDeferredBootstrap()}function ge(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function he(a){a=ca.element(a).injector();if(!a)throw xa("test");return a.get("$$testability")} function Cc(a,b){b=b||"_";return a.replace(ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function je(){var a;if(!Dc){var b=rb();(qa=y(b)?C.jQuery:b?C[b]:void 0)&&qa.fn.on?(F=qa,S(qa.fn,{scope:Oa.scope,isolateScope:Oa.isolateScope,controller:Oa.controller,injector:Oa.injector,inheritedData:Oa.inheritedData}),a=qa.cleanData,qa.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=qa._data(f,"events"))&&c.$destroy&&qa(f).triggerHandler("$destroy");a(b)}):F=O;ca.element=F;Dc=!0}}function sb(a,b,d){if(!a)throw xa("areq",b||"?",d||"required");return a}function Pa(a,b,d){d&&L(a)&&(a=a[a.length-1]);sb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Qa(a,b){if("hasOwnProperty"===a)throw xa("badname",b);}function Ec(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&z(a)?ab(e,a):a}function tb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=F(va.call(a,0,e))),c.push(b);return c||a}function U(){return Object.create(null)}function ke(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=N("$injector"),c=N("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||N;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return R}}function b(a,d){return function(b,e){e&&z(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return R}}if(!g)throw d("nomod",f);var c=[],e=[],p=[],u=a("$injector","invoke","push",e),R={_invokeQueue:c,_configBlocks:e,_runBlocks:p,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:u,run:function(a){p.push(a);return this}};h&&u(h);return R})}})}function ia(a,b){if(L(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function le(a){S(a,{bootstrap:Bc,copy:pa,extend:S,merge:Zd,equals:na,element:F,forEach:q,injector:cb,noop:A,bind:ab,toJson:bb,fromJson:xc,identity:Xa,isUndefined:y,isDefined:w,isString:G,isFunction:z,isObject:D,isNumber:T,isElement:Qb,isArray:L,version:me,isDate:da,lowercase:Q,uppercase:ub,callbacks:{$$counter:0},getTestability:he,$$minErr:N,$$csp:Ba,reloadWithDebugInfo:ge});Ub=ke(C);Ub("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ne});a.provider("$compile",Fc).directive({a:oe,input:Gc,textarea:Gc,form:pe,script:qe,select:re,style:se,option:te,ngBind:ue,ngBindHtml:ve,ngBindTemplate:we,ngClass:xe,ngClassEven:ye,ngClassOdd:ze,ngCloak:Ae,ngController:Be,ngForm:Ce,ngHide:De,ngIf:Ee,ngInclude:Fe,ngInit:Ge,ngNonBindable:He,ngPluralize:Ie,ngRepeat:Je,ngShow:Ke,ngStyle:Le,ngSwitch:Me,ngSwitchWhen:Ne,ngSwitchDefault:Oe,ngOptions:Pe,ngTransclude:Qe,ngModel:Re,ngList:Se,ngChange:Te,pattern:Hc,ngPattern:Hc,required:Ic,ngRequired:Ic,minlength:Jc,ngMinlength:Jc,maxlength:Kc,ngMaxlength:Kc,ngValue:Ue,ngModelOptions:Ve}).directive({ngInclude:We}).directive(vb).directive(Lc);a.provider({$anchorScroll:Xe,$animate:Ye,$animateCss:Ze,$$animateJs:$e,$$animateQueue:af,$$AnimateRunner:bf,$$animateAsyncRun:cf,$browser:df,$cacheFactory:ef,$controller:ff,$document:gf,$exceptionHandler:hf,$filter:Mc,$$forceReflow:jf,$interpolate:kf,$interval:lf,$http:mf,$httpParamSerializer:nf,$httpParamSerializerJQLike:of,$httpBackend:pf,$xhrFactory:qf,$jsonpCallbacks:rf,$location:sf,$log:tf,$parse:uf,$rootScope:vf,$q:wf,$$q:xf,$sce:yf,$sceDelegate:zf,$sniffer:Af,$templateCache:Bf,$templateRequest:Cf,$$testability:Df,$timeout:Ef,$window:Ff,$$rAF:Gf,$$jqLite:Hf,$$HashMap:If,$$cookieReader:Jf})}])}function db(a){return a.replace(Kf,function(a,d,c,e){return e?c.toUpperCase():c}).replace(Lf,"Moz$1")}function Nc(a){a=a.nodeType;return 1===a||!a||9===a}function Oc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Vb.test(a)){d=e.appendChild(b.createElement("div"));c=(Mf.exec(a)||["",""])[1].toLowerCase();c=ja[c]||ja._default;d.innerHTML=c[1]+a.replace(Nf,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=$a(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";q(f,function(a){e.appendChild(a)});return e}function Pc(a,b){var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)}function O(a){if(a instanceof O)return a;var b;G(a)&&(a=W(a),b=!0);if(!(this instanceof O)){if(b&&"<"!=a.charAt(0))throw Wb("nosel");return new O(a)}if(b){b=C.document;var d;a=(d=Of.exec(a))?[b.createElement(d[1])]:(d=Oc(a,b))?d.childNodes:[]}Qc(this,a)}function Xb(a){return a.cloneNode(!0)}function wb(a,b){b||eb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)eb(d[c])}function Rc(a,b,d,c){if(w(c))throw Wb("offargs");var e=(c=xb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];w(d)&&Za(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f,!1),delete e[b])};q(b.split(" "),function(a){g(a);yb[a]&&g(yb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function eb(a,b){var d=a.ng339,c=d&&fb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Rc(a)),delete fb[d],a.ng339=void 0))}function xb(a,b){var d=a.ng339,d=d&&fb[d];b&&!d&&(a.ng339=d=++Pf,d=fb[d]={events:{},data:{},handle:void 0});return d}function Yb(a,b,d){if(Nc(a)){var c=w(d),e=!c&&b&&!D(b),f=!b;a=(a=xb(a,!e))&&a.data;if(c)a[b]=d;else{if(f)return a;if(e)return a&&a[b];S(a,b)}}}function zb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Ab(a,b){b&&a.setAttribute&&q(b.split(" "),function(b){a.setAttribute("class",W((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+W(b)+" "," ")))})}function Bb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(b.split(" "),function(a){a=W(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",W(d))}}function Qc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Sc(a,b){return Cb(a,"$"+(b||"ngController")+"Controller")}function Cb(a,b,d){9==a.nodeType&&(a=a.documentElement);for(b=L(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=F.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function Tc(a){for(wb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Db(a,b){b||wb(a);var d=a.parentNode;d&&d.removeChild(a)}function Qf(a,b){b=b||C;if("complete"===b.document.readyState)b.setTimeout(a);else F(b).on("load",a)}function Uc(a,b){var d=Eb[b.toLowerCase()];return d&&Vc[wa(a)]&&d}function Rf(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(y(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||Sf;1<g&&(f=ia(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem=a;return d}function Sf(a,b,d){d.call(a,b)}function Tf(a,b,d){var c=b.relatedTarget;c&&(c===a||Uf.call(a,c))||d.call(a,b)}function Hf(){this.$get=function(){return S(O,{hasClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Ab(a,b)}})}}function Ca(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||Yd)():d+":"+a}function Ra(a,b){if(b){var d=0;this.nextUid=function(){return++d}}q(a,this.put,this)}function Wc(a){a=(Function.prototype.toString.call(a)+" ").replace(Vf,"");return a.match(Wf)||a.match(Xf)}function Yf(a){return(a=Wc(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b){function d(a){return function(b,c){if(D(b))q(b,uc(a));else return a(b,c)}}function c(a,b){Qa(a,"service");if(z(b)||L(b))b=p.instantiate(b);if(!b.$get)throw Ha("pget",a);return n[a+"Provider"]=b}function e(a,b){return function(){var c=B.invoke(b,this);if(y(c))throw Ha("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){sb(y(a)||L(a),"modulesToLoad","not an array");var b=[],c;q(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=p.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{G(a)?(c=Ub(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):z(a)?b.push(p.invoke(a)):L(a)?b.push(p.invoke(a)):Pa(a,"module")}catch(e){throw L(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ha("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===k)throw Ha("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=cb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ha("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);L(a)&&(a=a[a.length-1]);d=11>=Ea?!1:"function"===typeof a&&/^(?:class\b|constructor\()/.test(Function.prototype.toString.call(a)+" ");return d?(c.unshift(null),new(Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=L(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new(Function.prototype.bind.apply(d,a))},get:d,annotate:cb.$$annotate,has:function(b){return n.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Ra([],!0),n={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ha(b),!1)}),constant:d(function(a,b){Qa(a,"constant");n[a]=b;u[a]=b}),decorator:function(a,b){var c=p.get(a+"Provider"),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}}},p=n.$injector=h(n,function(a,b){ca.isString(b)&&l.push(b);throw Ha("unpr",l.join(" <- "));}),u={},R=h(u,function(a,b){var c=p.get(a+"Provider",b);return B.invoke(c.$get,c,void 0,a)}),B=R;n.$injectorProvider={$get:ha(R)};var r=g(a),B=R.get("$injector");B.strictDi=b;q(r,function(a){a&&B.invoke(a)});return B}function Xe(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===wa(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;z(c)?c=c():Qb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):T(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=G(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Qf(function(){c.$evalAsync(g)})});return g}]}function gb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;L(a)&&(a=a.join(" "));L(b)&&(b=b.join(" "));return a+" "+b}function Zf(a){G(a)&&(a=a.split(" "));var b=U();q(a,function(a){a.length&&(b[a]=!0)});return b}function Ia(a){return D(a)?a:{}}function $f(a,b,d,c){function e(a){try{a.apply(null,va.call(arguments,1))}finally{if(R--,0===R)for(;B.length;)try{B.pop()()}catch(b){d.error(b)}}} function f(){t=null;g();h()}function g(){r=K();r=y(r)?null:r;na(r,E)&&(r=E);E=r}function h(){if(v!==k.url()||J!==r)v=k.url(),J=r,q(M,function(a){a(k.url(),r)})}var k=this,l=a.location,m=a.history,n=a.setTimeout,p=a.clearTimeout,u={};k.isMock=!1;var R=0,B=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){R++};k.notifyWhenNoOutstandingRequests=function(a){0===R?a():B.push(a)};var r,J,v=l.href,fa=b.find("base"),t=null,K=c.history?function(){try{return m.state}catch(a){}}:A;g();J=r;k.url=function(b,d,e){y(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=J===e;if(v===b&&(!c.history||f))return k;var h=v&&Ja(v)===Ja(b);v=b;J=e;!c.history||h&&f?(h||(t=b),d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b,l.href!==b&&(t=b)):(m[d?"replaceState":"pushState"](e,"",b),g(),J=r);t&&(t=b);return k}return t||l.href.replace(/%27/g,"'")};k.state=function(){return r};var M=[],H=!1,E=null;k.onUrlChange=function(b){if(!H){if(c.history)F(a).on("popstate",f);F(a).on("hashchange",f);H=!0}M.push(b);return b};k.$$applicationDestroyed=function(){F(a).off("hashchange popstate",f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=fa.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;R++;c=n(function(){delete u[c];e(a)},b||0);u[c]=!0;return c};k.defer.cancel=function(a){return u[a]?(delete u[a],p(a),e(A),!0):!1}}function df(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new $f(a,c,b,d)}]}function ef(){this.$get=function(){function a(a,c){function e(a){a!=n&&(p?p==a&&(p=a.n):p=a,f(a.n,a.p),f(a,n),n=a,n.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw N("$cacheFactory")("iid",a);var g=0,h=S({},c,{id:a}),k=U(),l=c&&c.capacity||Number.MAX_VALUE,m=U(),n=null,p=null;return b[a]={put:function(a,b){if(!y(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(p.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b==n&&(n=b.p);b==p&&(p=b.n);f(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=U();g=0;m=U();n=p=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return S({},h,{size:g})}}}var b={};a.info=function(){var a={};q(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function Bf(){this.$get=["$cacheFactory",function(a){return a("templates")}]} function Fc(a,b){function d(a,b,c){var d=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,e=U();q(a,function(a,f){if(a in n)e[f]=n[a];else{var g=a.match(d);if(!g)throw ga("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(n[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==Q(b))throw ga("baddir",a);if(a!==a.trim())throw ga("baddir",a);}function e(a){var b=a.require||a.controller&&a.name;!L(b)&&D(b)&&q(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,h=/(([\w\-]+)(?:\:([^;]+))?;?)/,k=be("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,n=U();this.directive=function B(b,d){Qa(b,"directive");G(b)?(c(b),sb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];q(f[b],function(f,g){try{var h=a.invoke(f);z(h)?h={compile:ha(h)}:!h.compile&&h.link&&(h.compile=ha(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);h.restrict=h.restrict||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(k){c(k)}});return d}])),f[b].push(d)):q(b,uc(B));return this};this.component=function(a,b){function c(a){function e(b){return z(b)||L(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Xc(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};q(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}var d=b.controller||function(){};q(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,z(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var p=!0;this.debugInfoEnabled=function(a){return w(a)?(p=a,this):p};var u=10;this.onChangesTtl=function(a){return arguments.length?(u=a,this):u};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(a,b,c,e,n,t,K,M,H,E){function I(){try{if(!--qa)throw Y=void 0,ga("infchng",u);K.$apply(function(){for(var a=[],b=0,c=Y.length;b<c;++b)try{Y[b]()}catch(d){a.push(d)}Y=void 0;if(a.length)throw a;})}finally{qa++}}function Da(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function P(a,b,c){pa.innerHTML="<span "+b+">";b=pa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function x(a,b){try{a.addClass(b)}catch(c){}}function aa(a,b,c,d,e){a instanceof F||(a=F(a));for(var f=/\S+/,g=0,h=a.length;g<h;g++){var k=a[g];k.nodeType===Ma&&k.nodeValue.match(f)&&Pc(k,a[g]=C.document.createElement("span"))}var l=s(a,b,a,c,d,e);aa.$$addScopeClass(a);var m=null;return function(b,c,d){sb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var f=d.parentBoundTranscludeFn,g=d.transcludeControllers;d=d.futureParentElement;f&&f.$$boundTransclude&&(f=f.$$boundTransclude);m||(m=(d=d&&d[0])?"foreignobject"!==wa(d)&&ma.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==m?F(da(m,F("<div>").append(a).html())):c?Oa.clone.call(a):a;if(g)for(var h in g)d.data("$"+h+"Controller",g[h].instance);aa.$$addScopeInfo(d,b);c&&c(d,b);l&&l(b,d,d,f);return d}}function s(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,r,v;if(n)for(v=Array(c.length),m=0;m<h.length;m+=3)f=h[m],v[f]=c[f];else v=c;m=0;for(p=h.length;m<p;)k=v[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),aa.$$addScopeInfo(F(k),l)):l=a,r=c.transcludeOnThisElement?za(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?za(a,b):null,c(f,l,k,d,r)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k,l,m,p,n,r=0;r<a.length;r++){k=new Da;l=$b(a[r],[],k,0===r?d:void 0,e);(f=l.length?oa(l,a[r],k,b,c,null,[],[],f):null)&&f.scope&&aa.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[r].childNodes)||!m.length?null:s(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(r,f,k),p=!0,n=n||f;f=null}return p?g:null}function za(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=U(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?za(a,b.$$slots[f],c):null;return d}function $b(a,b,c,d,e){var f=c.$attr;switch(a.nodeType){case 1:O(b,Aa(wa(a)),"E",d,e);for(var g,k,l,m,p=a.attributes,n=0,r=p&&p.length;n<r;n++){var v=!1,u=!1;g=p[n];k=g.name;l=W(g.value);g=Aa(k);if(m=Ba.test(g))k=k.replace(Yc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(g=g.match(Ca))&&V(g[1])&&(v=k,u=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6));g=Aa(k.toLowerCase());f[g]=k;if(m||!c.hasOwnProperty(g))c[g]=l,Uc(a,g)&&(c[g]=!0);ia(a,b,l,g,m);O(b,g,"A",d,e,v,u)}f=a.className;D(f)&&(f=f.animVal);if(G(f)&&""!==f)for(;a=h.exec(f);)g=Aa(a[2]),O(b,g,"C",d,e)&&(c[g]=W(a[3])),f=f.substr(a.index+a[0].length);break;case Ma:if(11===Ea)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Ma;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ca(b,a.nodeValue);break;case 8:hb(a,b,c,d,e)}b.sort(Z);return b}function hb(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=Aa(f[1]);O(b,h,"M",d,e)&&(c[h]=W(f[2]))}}catch(k){}}function N(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ga("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return F(d)}function Zc(a,b,c){return function(d,e,f,g,h){e=N(e[0],b,c);return a(d,e,f,g,h)}}function ac(a,b,c,d,e,f){var g;return a?aa(b,c,d,e,f):function(){g||(g=aa(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function oa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=Zc(a,c,d));a.require=x.require;a.directiveName=I;if(u===x||x.$$isolateScope)a=ja(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Zc(b,c,d));b.require=x.require;b.directiveName=I;if(u===x||x.$$isolateScope)b=ja(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;Ya(a)||(d=c,c=b,b=a,a=void 0);fa&&(e=t);c||(c=fa?I.parent():I);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,s);if(y(f))throw ga("noslot",d,ya(I));}else return l(a,b,e,c,s)}var n,E,x,M,B,t,P,I;b===f?(g=d,I=d.$$element):(I=F(f),g=new Da(I,d));B=e;u?M=e.$new(!0):r&&(B=e.$parent);l&&(P=m,P.$$boundTransclude=l,P.isSlotFilled=function(a){return!!l.$$slots[a]});v&&(t=ag(I,g,P,v,M,e,u));u&&(aa.$$addScopeInfo(I,M,!0,!(H&&(H===u||H===u.$$originalDirective))),aa.$$addScopeClass(I,!0),M.$$isolateBindings=u.$$isolateBindings,E=ka(e,g,M,M.$$isolateBindings,u),E.removeWatches&&M.$on("$destroy",E.removeWatches));for(n in t){E=v[n];x=t[n];var Zb=E.$$bindings.bindToController;x.bindingInfo=x.identifier&&Zb?ka(B,g,x.instance,Zb,E):{};var K=x();K!==x.instance&&(x.instance=K,I.data("$"+E.name+"Controller",K),x.bindingInfo.removeWatches&&x.bindingInfo.removeWatches(),x.bindingInfo=ka(B,g,x.instance,Zb,E))}q(v,function(a,b){var c=a.require;a.bindToController&&!L(c)&&D(c)&&S(t[b].instance,ib(b,c,I,t))});q(t,function(a){var b=a.instance;if(z(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(z(b.$onInit))try{b.$onInit()}catch(e){c(e)}z(b.$doCheck)&&(B.$watch(function(){b.$doCheck()}),b.$doCheck());z(b.$onDestroy)&&B.$on("$destroy",function(){b.$onDestroy()})});n=0;for(E=h.length;n<E;n++)x=h[n],la(x,x.isolateScope?M:e,I,g,x.require&&ib(x.directiveName,x.require,I,t),P);var s=e;u&&(u.template||null===u.templateUrl)&&(s=M);a&&a(s,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)x=k[n],la(x,x.isolateScope?M:e,I,g,x.require&&ib(x.directiveName,x.require,I,t),P);q(t,function(a){a=a.instance;z(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,r=l.newScopeDirective,v=l.controllerDirectives,u=l.newIsolateScopeDirective,H=l.templateDirective,E=l.nonTlbTranscludeDirective,M=!1,B=!1,fa=l.hasElementTranscludeDirective,t=d.$$element=F(b),x,I,P,K=e,s,Fa=!1,za=!1,w,A=0,C=a.length;A<C;A++){x=a[A];var G=x.$$start,hb=x.$$end;G&&(t=N(b,G,hb));P=void 0;if(n>x.priority)break;if(w=x.scope)x.templateUrl||(D(w)?(X("new/isolated scope",u||r,x,t),u=x):X("new/isolated scope",u,x,t)),r=r||x;I=x.name;if(!Fa&&(x.replace&&(x.templateUrl||x.template)||x.transclude&&!x.$$tlb)){for(w=A+1;Fa=a[w++];)if(Fa.transclude&&!Fa.$$tlb||Fa.replace&&(Fa.templateUrl||Fa.template)){za=!0;break}Fa=!0}!x.templateUrl&&x.controller&&(w=x.controller,v=v||U(),X("'"+I+"' controller",v[I],x,t),v[I]=x);if(w=x.transclude)if(M=!0,x.$$tlb||(X("transclusion",E,x,t),E=x),"element"==w)fa=!0,n=x.priority,P=t,t=d.$$element=F(aa.$$createComment(I,d[I])),b=t[0],ea(f,va.call(P,0),b),P[0].$$parentNode=P[0].parentNode,K=ac(za,P,e,n,g&&g.name,{nonTlbTranscludeDirective:E});else{var oa=U();P=F(Xb(b)).contents();if(D(w)){P=[];var Q=U(),O=U();q(w,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Q[a]=b;oa[b]=null;O[b]=c});q(t.contents(),function(a){var b=Q[Aa(wa(a))];b?(O[b]=!0,oa[b]=oa[b]||[],oa[b].push(a)):P.push(a)});q(O,function(a,b){if(!a)throw ga("reqslot",b);});for(var V in oa)oa[V]&&(oa[V]=ac(za,oa[V],e))}t.empty();K=ac(za,P,e,void 0,void 0,{needsNewScope:x.$$isolateScope||x.$$newScope});K.$$slots=oa}if(x.template)if(B=!0,X("template",H,x,t),H=x,w=z(x.template)?x.template(t,d):x.template,w=xa(w),x.replace){g=x;P=Vb.test(w)?$c(da(x.templateNamespace,W(w))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ga("tplrt",I,"");ea(f,t,b);C={$attr:{}};w=$b(b,[],C);var Z=a.splice(A+1,a.length-(A+1));(u||r)&&T(w,u,r);a=a.concat(w).concat(Z);$(d,C);C=a.length}else t.html(w);if(x.templateUrl)B=!0,X("template",H,x,t),H=x,x.replace&&(g=x),p=ba(a.splice(A,a.length-A),t,d,f,M&&K,h,k,{controllerDirectives:v,newScopeDirective:r!==x&&r,newIsolateScopeDirective:u,templateDirective:H,nonTlbTranscludeDirective:E}),C=a.length;else if(x.compile)try{s=x.compile(t,d,K);var Y=x.$$originalDirective||x;z(s)?m(null,ab(Y,s),G,hb):s&&m(ab(Y,s.pre),ab(Y,s.post),G,hb)}catch(ca){c(ca,ya(t))}x.terminal&&(p.terminal=!0,n=Math.max(n,x.priority))}p.scope=r&&!0===r.scope;p.transcludeOnThisElement=M;p.templateOnThisElement=B;p.transclude=K;l.hasElementTranscludeDirective=fa;return p}function ib(a,b,c,d){var e;if(G(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e=g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw ga("ctreq",b,a);}else if(L(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=ib(a,b[g],c,d);else D(b)&&(e={},q(b,function(b,f){e[f]=ib(a,b,c,d)}));return e||null}function ag(a,b,c,d,e,f,g){var h=U(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"==p&&(p=b[l.name]);m=t(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h} function T(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Rb(a[d],{$$isolateScope:b,$$newScope:c})}function O(b,e,g,h,k,l,m){if(e===k)return null;k=null;if(f.hasOwnProperty(e)){var p;e=a.get(e+"Directive");for(var n=0,r=e.length;n<r;n++)try{if(p=e[n],(y(h)||h>p.priority)&&-1!=p.restrict.indexOf(g)){l&&(p=Rb(p,{$$start:l,$$end:m}));if(!p.$$bindings){var u=p,v=p,x=p.name,H={isolateScope:null,bindToController:null};D(v.scope)&&(!0===v.bindToController?(H.bindToController=d(v.scope,x,!0),H.isolateScope={}):H.isolateScope=d(v.scope,x,!1));D(v.bindToController)&&(H.bindToController=d(v.bindToController,x,!0));if(D(H.bindToController)){var E=v.controller,M=v.controllerAs;if(!E)throw ga("noctrl",x);if(!Xc(E,M))throw ga("noident",x);}var t=u.$$bindings=H;D(t.isolateScope)&&(p.$$isolateBindings=t.isolateScope)}b.push(p);k=p}}catch(I){c(I)}}return k}function V(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function $(a,b){var c=b.$attr,d=a.$attr;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ba(a,b,c,d,f,g,h,k){var l=[],m,p,n=b[0],r=a.shift(),u=Rb(r,{templateUrl:null,transclude:null,replace:null,$$originalDirective:r}),H=z(r.templateUrl)?r.templateUrl(b,c):r.templateUrl,E=r.templateNamespace;b.empty();e(H).then(function(e){var v,M;e=xa(e);if(r.replace){e=Vb.test(e)?$c(da(E,W(e))):[];v=e[0];if(1!=e.length||1!==v.nodeType)throw ga("tplrt",r.name,H);e={$attr:{}};ea(d,b,v);var B=$b(v,[],e);D(r.scope)&&T(B,!0);a=B.concat(a);$(c,e)}else v=n,b.html(e);a.unshift(u);m=oa(a,v,c,f,b,r,g,h,k);q(d,function(a,c){a==v&&(d[c]=b[0])});for(p=s(b[0].childNodes,f);l.length;){e=l.shift();M=l.shift();var t=l.shift(),I=l.shift(),B=b[0];if(!e.$$destroyed){if(M!==n){var P=M.className;k.hasElementTranscludeDirective&&r.replace||(B=Xb(v));ea(t,F(M),B);x(F(B),P)}M=m.transcludeOnThisElement?za(e,m.transclude,I):I;m(p,e,B,d,M)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=za(b,m.transclude,e)),m(p,b,c,d,a)))}}function Z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function X(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ga("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,ya(d));}function ca(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&aa.$$addBindingClass(a);return function(a,c){var e=c.parent();b||aa.$$addBindingClass(e);aa.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function da(a,b){a=Q(a||"html");switch(a){case"svg":case"math":var c=C.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function ha(a,b){if("srcdoc"==b)return M.HTML;var c=wa(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return M.RESOURCE_URL}function ia(a,c,d,e,f){var g=ha(a,e);f=k[e]||f;var h=b(d,!0,g,f);if(h){if("multiple"===e&&"select"===wa(a))throw ga("selmulti",ya(a));c.push({priority:100,compile:function(){return{pre:function(a,c,k){c=k.$$observers||(k.$$observers=U());if(m.test(e))throw ga("nodomevents");var l=k[e];l!==d&&(h=l&&b(l,!0,g,f),d=l);h&&(k[e]=h(a),(c[e]||(c[e]=[])).$$inter=!0,(k.$$observers&&k.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?k.$updateClass(a,b):k.$set(e,a)}))}}}})}}function ea(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=C.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);F.hasData(d)&&(F.data(c,F.data(d)),F(d).off("$destroy"));F.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function ja(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function la(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ya(d))}}function ka(a,c,d,e,f){function g(b,c,e){z(d.$onChanges)&&c!==e&&(Y||(a.$$postDigest(I),Y=[]),m||(m={},Y.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Fb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;q(e,function(e,h){var m=e.attrName,p=e.optional,v,u,x,H;switch(e.mode){case"@":p||ua.call(c,m)||(d[h]=c[m]=void 0);c.$observe(m,function(a){if(G(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;v=c[m];G(v)?d[h]=b(v)(a):Ga(v)&&(d[h]=v);l[h]=new Fb(bc,d[h]);break;case"=":if(!ua.call(c,m)){if(p)break;c[m]=void 0}if(p&&!c[m])break;u=n(c[m]);H=u.literal?na:function(a,b){return a===b||a!==a&&b!==b};x=u.assign||function(){v=d[h]=u(a);throw ga("nonassign",c[m],m,f.name);};v=d[h]=u(a);p=function(b){H(b,d[h])||(H(b,v)?x(a,b=d[h]):d[h]=b);return v=b};p.$stateful=!0;p=e.collection?a.$watchCollection(c[m],p):a.$watch(n(c[m],p),null,u.literal);k.push(p);break;case"<":if(!ua.call(c,m)){if(p)break;c[m]=void 0}if(p&&!c[m])break;u=n(c[m]);var E=d[h]=u(a);l[h]=new Fb(bc,d[h]);p=a.$watch(u,function(a,b){if(b===a){if(b===E)return;b=E}g(h,a,b);d[h]=a},u.literal);k.push(p);break;case"&":u=c.hasOwnProperty(m)?n(c[m]):A;if(u===A&&p)break;d[h]=function(b){return u(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var ta=/^\w/,pa=C.document.createElement("div"),qa=u,Y;Da.prototype={$normalize:Aa,$addClass:function(a){a&&0<a.length&&H.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&H.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ad(a,b);c&&c.length&&H.addClass(this.$$element,c);(c=ad(b,a))&&c.length&&H.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Uc(this.$$element[0],a),g=bd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Cc(a,"-"));f=wa(this.$$element);if("a"===f&&("href"===a||"xlinkHref"===a)||"img"===f&&"src"===a)this[a]=b=E(b,"src"===a);else if("img"===f&&"srcset"===a&&w(b)){for(var f="",g=W(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<k;l++)var m=2*l,f=f+E(W(g[m]),!0),f=f+(" "+W(g[m+1]));g=W(g[2*l]).split(/\s/);f+=E(W(g[0]),!0);2===g.length&&(f+=" "+W(g[1]));this[a]=b=f}!1!==d&&(null===b||y(b)?this.$$element.removeAttr(e):ta.test(e)?this.$$element.attr(e,b):P(this.$$element[0],e,b));(a=this.$$observers)&&q(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=U()),e=d[a]||(d[a]=[]);e.push(b);K.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||y(c[a])||b(c[a])});return function(){Za(e,b)}}};var ra=b.startSymbol(),sa=b.endSymbol(),xa="{{"==ra&&"}}"==sa?Xa:function(a){return a.replace(/\{\{/g,ra).replace(/}}/g,sa)},Ba=/^ngAttr[A-Z]/,Ca=/^(.+)Start$/;aa.$$addBindingInfo=p?function(a,b){var c=a.data("$binding")||[];L(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:A;aa.$$addBindingClass=p?function(a){x(a,"ng-binding")}:A;aa.$$addScopeInfo=p?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:A;aa.$$addScopeClass=p?function(a,b){x(a,b?"ng-isolate-scope":"ng-scope")}:A;aa.$$createComment=function(a,b){var c="";p&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return C.document.createComment(c)};return aa}]}function Fb(a,b){this.previousValue=a;this.currentValue=b}function Aa(a){return db(a.replace(Yc,""))}function ad(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function $c(a){a=F(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&bg.call(a,b,1);return a}function Xc(a,b){if(b&&G(b))return b;if(G(a)){var d=cd.exec(a);if(d)return d[3]}}function ff(){var a={},b=!1;this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,c){Qa(b,"controller");D(b)?S(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!D(a.$scope))throw N("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,n;h=!0===h;k&&G(k)&&(n=k);if(G(f)){k=f.match(cd);if(!k)throw cg("ctrlfmt",f);m=k[1];n=n||k[3];f=a.hasOwnProperty(m)?a[m]:Ec(g.$scope,m,!0)||(b?Ec(c,m,!0):void 0);Pa(f,m,!0)}if(h)return h=(L(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),n&&e(g,n,l,m||f.name),S(function(){var a=d.invoke(f,l,g,m);a!==l&&(D(a)||z(a))&&(l=a,n&&e(g,n,l,m||f.name));return l},{instance:l,identifier:n});l=d.instantiate(f,g,m);n&&e(g,n,l,m||f.name);return l}}]}function gf(){this.$get=["$window",function(a){return F(a.document)}]}function hf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function cc(a){return D(a)?da(a)?a.toISOString():bb(a):a}function nf(){this.$get=function(){return function(a){if(!a)return"";var b=[];tc(a,function(a,c){null===a||y(a)||(L(a)?q(a,function(a){b.push(ea(c)+"="+ea(cc(a)))}):b.push(ea(c)+"="+ea(cc(a))))});return b.join("&")}}}function of(){this.$get=function(){return function(a){function b(a,e,f){null===a||y(a)||(L(a)?q(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!da(a)?tc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ea(e)+"="+ea(cc(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function dc(a,b){if(G(a)){var d=a.replace(dg,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf(dd))||(c=(c=d.match(eg))&&fg[c[0]].test(d));c&&(a=xc(d))}}return a}function ed(a){var b=U(),d;G(a)?q(a.split("\n"),function(a){d=a.indexOf(":");var e=Q(W(a.substr(0,d)));a=W(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&q(a,function(a,d){var f=Q(d),g=W(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function fd(a){var b;return function(d){b||(b=ed(a));return d?(d=b[Q(d)],void 0===d&&(d=null),d):b}}function gd(a,b,d,c){if(z(c))return c(a,b,d);q(c,function(c){a=c(a,b,d)});return a}function mf(){var a=this.defaults={transformResponse:[dc],transformRequest:[function(a){return D(a)&&"[object File]"!==ma.call(a)&&"[object Blob]"!==ma.call(a)&&"[object FormData]"!==ma.call(a)?bb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ia(ec),put:ia(ec),patch:ia(ec)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return w(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function e(a,b){var c,d={};q(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}function f(a){var b=S({},a);b.data=gd(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:k.reject(b)}if(!D(b))throw N("$http")("badreq",b);if(!G(b.url))throw N("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);g.headers=function(b){var c=a.headers,d=S({},b.headers),f,g,h,c=S({},c.common,c[Q(b.method)]);a:for(f in c){g=Q(f);for(h in d)if(Q(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);g.method=ub(g.method);g.paramSerializer=G(g.paramSerializer)?l.get(g.paramSerializer):g.paramSerializer;var h=[],m=[],p=k.when(g);q(R,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&m.push(a.response,a.responseError)});p=c(p,h);p=p.then(function(b){var c=b.headers,d=gd(b.data,fd(c),void 0,b.transformRequest);y(d)&&q(c,function(a,b){"content-type"===Q(b)&&delete c[b]});y(b.withCredentials)&&!y(a.withCredentials)&&(b.withCredentials=a.withCredentials);return n(b,d).then(f,f)});p=c(p,m);d?(p.success=function(a){Pa(a,"fn");p.then(function(b){a(b.data,b.status,b.headers,g)});return p},p.error=function(a){Pa(a,"fn");p.then(null,function(b){a(b.data,b.status,b.headers,g)});return p}):(p.success=hd("success"),p.error=hd("error"));return p}function n(c,d){function g(a){if(a){var c={};q(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function l(a,c,d,e){function f(){n(c,a,d,e)}E&&(200<=a&&300>a?E.put(P,[a,c,ed(d),e]):E.remove(P));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function n(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?M.resolve:M.reject)({data:a,status:b,headers:fd(d),config:c,statusText:e})}function t(a){n(a.data,a.status,ia(a.headers()),a.statusText)}function R(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var M=k.defer(),H=M.promise,E,I,Da=c.headers,P=p(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);H.then(R,R);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(E=D(c.cache)?c.cache:D(a.cache)?a.cache:u);E&&(I=E.get(P),w(I)?I&&z(I.then)?I.then(t,t):L(I)?n(I[1],I[0],ia(I[2]),I[3]):n(I,200,{},"OK"):E.put(P,H));y(I)&&((I=id(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(Da[c.xsrfHeaderName||a.xsrfHeaderName]=I),e(c.method,P,d,l,Da,c.timeout,c.withCredentials,c.responseType,g(c.eventHandlers),g(c.uploadEventHandlers)));return H}function p(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var u=g("$http");a.paramSerializer=G(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var R=[];q(c,function(a){R.unshift(G(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){q(arguments,function(a){m[a]=function(b,c){return m(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){m[a]=function(b,c,d){return m(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function qf(){this.$get=function(){return function(){return new C.XMLHttpRequest}}}function pf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return gg(a,c,a.defer,b,d[0])}]}function gg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,u="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),u=a.type,g="error"===a.type?404:200);d&&d(g,u)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,k,l,m,n,p,u,R,B){function r(){fa&&fa();t&&t.abort()}function J(b,c,e,f,g){w(M)&&d.cancel(M);fa=t=null;b(c,e,f,g);a.$$completeOutstandingRequest(A)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"===Q(e))var v=c.createCallback(h),fa=f(h,v,function(a,b){var d=200===a&&c.getResponse(v);J(l,a,d,"",b);c.removeCallback(v)});else{var t=b(e,h);t.open(e,h,!0);q(m,function(a,b){w(a)&&t.setRequestHeader(b,a)});t.onload=function(){var a=t.statusText||"",b="response"in t?t.response:t.responseText,c=1223===t.status?204:t.status;0===c&&(c=b?200:"file"==Y(h).protocol?404:0);J(l,c,b,t.getAllResponseHeaders(),a)};e=function(){J(l,-1,null,null,"")};t.onerror=e;t.onabort=e;q(R,function(a,b){t.addEventListener(b,a)});q(B,function(a,b){t.upload.addEventListener(b,a)});p&&(t.withCredentials=!0);if(u)try{t.responseType=u}catch(K){if("json"!==u)throw K;}t.send(y(k)?null:k)}if(0<n)var M=d(r,n);else n&&z(n.then)&&n.then(r)}}function kf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(p,b)}function h(a,b,c,d){var e;return e=a.$watch(function(a){e();return d(a)},b,c)}function k(f,k,p,n){function J(a){try{var b=a;a=p?e.getTrusted(p,b):e.valueOf(b);var d;if(n&&!w(a))d=a;else if(null==a)d="";else{switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=bb(a)}d=a}return d}catch(g){c(Ka.interr(f,g))}}if(!f.length||-1===f.indexOf(a)){var v;k||(k=g(f),v=ha(k),v.exp=f,v.expressions=[],v.$$watchDelegate=h);return v}n=!!n;var q,t,K=0,M=[],H=[];v=f.length;for(var E=[],I=[];K<v;)if(-1!=(q=f.indexOf(a,K))&&-1!=(t=f.indexOf(b,q+l)))K!==q&&E.push(g(f.substring(K,q))),K=f.substring(q+l,t),M.push(K),H.push(d(K,J)),K=t+m,I.push(E.length),E.push("");else{K!==v&&E.push(g(f.substring(K)));break}p&&1<E.length&&Ka.throwNoconcat(f);if(!k||M.length){var Da=function(a){for(var b=0,c=M.length;b<c;b++){if(n&&y(a[b]))return;E[I[b]]=a[b]}return E.join("")};return S(function(a){var b=0,d=M.length,e=Array(d);try{for(;b<d;b++)e[b]=H[b](a);return Da(e)}catch(g){c(Ka.interr(f,g))}},{exp:f,expressions:M,$$watchDelegate:function(a,b){var c;return a.$watchGroup(H,function(d,e){var f=Da(d);z(b)&&b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),p=new RegExp(b.replace(/./g,f),"g");k.startSymbol=function(){return a};k.endSymbol=function(){return b};return k}]}function lf(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,b,d,c,e){function f(f,k,l,m){function n(){p?f.apply(null,u):f(r)}var p=4<arguments.length,u=p?va.call(arguments,4):[],R=b.setInterval,q=b.clearInterval,r=0,J=w(m)&&!m,v=(J?c:d).defer(),fa=v.promise;l=w(l)?l:0;fa.$$intervalId=R(function(){J?e.defer(n):a.$evalAsync(n);v.notify(r++);0<l&&r>=l&&(v.resolve(r),q(fa.$$intervalId),delete g[fa.$$intervalId]);J||a.$apply()},k);g[fa.$$intervalId]=v;return fa}var g={};f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1};return f}]}function fc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=qb(a[b]);return a.join("/")}function jd(a,b){var d=Y(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=Z(d.port)||hg[d.protocol]||null}function kd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=Y(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=Ac(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function ka(a,b){if(0===b.lastIndexOf(a,0))return b.substr(a.length)}function Ja(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function jb(a){return a.replace(/(#.+)|#$/,"$1")}function gc(a,b,d){this.$$html5=!0;d=d||"";jd(a,this);this.$$parse=function(a){var d=ka(b,a);if(!G(d))throw Gb("ipthprfx",a,b);kd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Tb(this.$$search),d=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=fc(this.$$path)+(a?"?"+ a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ka(a,c))?(g=f,g=w(f=ka(d,f))?b+(ka("/",f)||f):a+g):w(f=ka(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function hc(a,b,d){jd(a,this);this.$$parse=function(c){var e=ka(a,c)||ka(b,c),f;y(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",y(e)&&(a=c,this.replace())):(f=ka(d,e),y(f)&&(f=e));kd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.lastIndexOf(e,0)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Tb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=fc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Ja(a)==Ja(b)?(this.$$parse(b),!0):!1}}function ld(a,b,d){this.$$html5=!0;hc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Ja(c)?f=c:(g=ka(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Tb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=fc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Hb(a){return function(){return this[a]}}function md(a,b){return function(d){if(y(d))return this[a];this[a]=b(d);this.$$compose();return this}}function sf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){return Ga(a)?(b.enabled=a,this):D(a)?(Ga(a.enabled)&&(b.enabled=a.enabled),Ga(a.requireBase)&&(b.requireBase=a.requireBase),Ga(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var n=c.url(),p;if(b.enabled){if(!m&&b.requireBase)throw Gb("nobase");p=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(m||"/");m=e.history?gc:ld}else p=Ja(n),m=hc;var u=p.substr(0,Ja(p).lastIndexOf("/")+1);l=new m(p,u,"#"+a);l.$$parseLinkUrl(n,n);l.$$state=c.state();var R=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=F(a.target);"a"!==wa(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");D(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Y(h.animVal).href);R.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=!0))}});jb(l.absUrl())!=jb(n)&&c.url(l.absUrl(),!0);var q=!0;c.onUrlChange(function(a,b){y(ka(u,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=jb(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(q=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=jb(c.url()),b=jb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(q||m)q=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function tf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||A;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];q(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Sa(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw X("isecfld",b);return a}function ig(a){return a+""}function ra(a,b){if(a){if(a.constructor===a)throw X("isecfn",b);if(a.window===a)throw X("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw X("isecdom",b);if(a===Object)throw X("isecobj",b);}return a}function nd(a,b){if(a){if(a.constructor===a)throw X("isecfn",b);if(a===jg||a===kg||a===lg)throw X("isecff",b);}}function Ib(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw X("isecaf",b);}function mg(a,b){return"undefined"!==typeof a?a:b}function od(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function V(a,b){var d,c;switch(a.type){case s.Program:d=!0;q(a.body,function(a){V(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:V(a.argument,b);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:V(a.left,b);V(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:V(a.left,b);V(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:V(a.test,b);V(a.alternate,b);V(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=!1;a.toWatch=[a];break;case s.MemberExpression:V(a.object,b);a.computed&&V(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];q(a.arguments,function(a){V(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:V(a.left,b);V(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];q(a.elements,function(a){V(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];q(a.properties,function(a){V(a.value,b);d=d&&a.value.constant&&!a.computed;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1;a.toWatch=[];break;case s.LocalsExpression:a.constant=!1,a.toWatch=[]}}function pd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function qd(a){return a.type===s.Identifier||a.type===s.MemberExpression}function rd(a){if(1===a.body.length&&qd(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function sd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function td(a,b){this.astBuilder=a;this.$filter=b}function ud(a,b){this.astBuilder=a;this.$filter=b}function Jb(a){return"constructor"==a}function ic(a){return z(a.valueOf)?a.valueOf():ng.call(a)}function uf(){var a=U(),b=U(),d={"true":!0,"false":!1,"null":null,undefined:void 0},c,e;this.addLiteral=function(a,b){d[a]=b};this.setIdentifierFns=function(a,b){c=a;e=b;return this};this.$get=["$filter",function(f){function g(c,d,e){var g,k,H;e=e||J;switch(typeof c){case"string":H=c=c.trim();var E=e?b:a;g=E[H];if(!g){":"===c.charAt(0)&&":"===c.charAt(1)&&(k=!0,c=c.substring(2));g=e?r:B;var q=new jc(g);g=(new kc(q,f,g)).parse(c);g.constant?g.$$watchDelegate=p:k?g.$$watchDelegate=g.literal?n:m:g.inputs&&(g.$$watchDelegate=l);e&&(g=h(g));E[H]=g}return u(g,d);case"function":return u(c,d);default:return u(A,d)}}function h(a){function b(c,d,e,f){var g=J;J=!0;try{return a(c,d,e,f)}finally{J=g}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate;b.assign=h(a.assign);b.constant=a.constant;b.literal=a.literal;for(var c=0;a.inputs&&c<a.inputs.length;++c)a.inputs[c]=h(a.inputs[c]);b.inputs=a.inputs;return b}function k(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ic(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function l(a,b,c,d,e){var f=d.inputs,g;if(1===f.length){var h=k,f=f[0];return a.$watch(function(a){var b=f(a);k(b,h)||(g=d(a,void 0,void 0,[b]),h=b&&ic(b));return g},b,c,e)}for(var l=[],m=[],p=0,n=f.length;p<n;p++)l[p]=k,m[p]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var h=f[c](a);if(b||(b=!k(h,l[c])))m[c]=h,l[c]=h&&ic(h)}b&&(g=d(a,void 0,void 0,m));return g},b,c,e)}function m(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;z(b)&&b.apply(this,arguments);w(a)&&d.$$postDigest(function(){w(f)&&e()})},c)}function n(a,b,c,d){function e(a){var b=!0;q(a,function(a){w(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,c,d){g=a;z(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function p(a,b,c,d){var e;return e=a.$watch(function(a){e();return d(a)},b,c)}function u(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==n&&c!==m?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return w(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==l?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=l,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var R=Ba().noUnsafeEval,B={csp:R,expensiveChecks:!1,literals:pa(d),isIdentifierStart:z(c)&&c,isIdentifierContinue:z(e)&&e},r={csp:R,expensiveChecks:!0,literals:pa(d),isIdentifierStart:z(c)&&c,isIdentifierContinue:z(e)&&e},J=!1;g.$$runningExpensiveChecks=function(){return J};return g}]}function wf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return vd(function(b){a.$evalAsync(b)},b)}]}function xf(){this.$get=["$browser","$exceptionHandler",function(a,b){return vd(function(b){a.defer(b)},b)}]}function vd(a,b){function d(){this.$$state={status:0}}function c(a,b){return function(c){b.call(a,c)}}function e(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,d,e;e=c.pending;c.processScheduled=!1;c.pending=void 0;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{z(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function f(){this.promise=new d}var g=N("$q",TypeError),h=function(){var a=new f;a.resolve=c(a,a.resolve);a.reject=c(a,a.reject);a.notify=c(a,a.notify);return a};S(d.prototype,{then:function(a,b,c){if(y(a)&&y(b)&&y(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&e(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return l(b,!0,a)},function(b){return l(b,!1,a)},b)}});S(f.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(g("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){function d(a){k||(k=!0,h.$$resolve(a))}function f(a){k||(k=!0,h.$$reject(a))}var g,h=this,k=!1;try{if(D(a)||z(a))g=a&&a.then;z(g)?(this.promise.$$state.status=-1,g.call(a,d,f,c(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=1,e(this.promise.$$state))}catch(l){f(l),b(l)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;e(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(z(a)?a(c):c)}catch(h){b(h)}}})}});var k=function(a,b){var c=new f;b?c.resolve(a):c.reject(a);return c.promise},l=function(a,b,c){var d=null;try{z(c)&&(d=c())}catch(e){return k(e,!1)}return d&&z(d.then)?d.then(function(){return k(a,b)},function(a){return k(a,!1)}):k(a,b)},m=function(a,b,c,d){var e=new f;e.resolve(a);return e.promise.then(b,c,d)},n=function(a){if(!z(a))throw g("norslvr",a);var b=new f;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};n.prototype=d.prototype;n.defer=h;n.reject=function(a){var b=new f;b.reject(a);return b.promise};n.when=m;n.resolve=m;n.all=function(a){var b=new f,c=0,d=L(a)?[]:{};q(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};n.race=function(a){var b=h();q(a,function(a){m(a).then(b.resolve,b.reject)});return b.promise};return n}function Gf(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function vf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++pb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=N("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(f,g,h){function k(a){a.currentScope.$$destroyed=!0}function l(a){9===Ea&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++pb;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 n(a){if(J.$$phase)throw d("inprog",J.$$phase);J.$$phase=a}function p(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function B(){for(;t.length;)try{t.shift()()}catch(a){f(a)}e=null}function r(){null===e&&(e=h.defer(function(){J.$apply(B)}))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",k);return d},$watch:function(a,b,d,e){var f=g(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;z(b)||(l.fn=A);k||(k=h.$$watchers=[]);k.unshift(l);p(this,1);return function(){0<=Za(k,l)&&p(h,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});q(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!y(e)){if(D(e))if(ta(e))for(f!==n&&(f=n,u=f.length=0,l++),a=e.length,u!==a&&(l++,f.length=u=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},u=0,l++);a=0;for(b in e)ua.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(u++,f[b]=g,l++));if(u>a)for(b in l++,f)ua.call(e,b)||(u--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},r=!0,u=0;return this.$watch(m,function(){r?(r=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(ta(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ua.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,k,l,m,p,u,r,q=b,t,y=[],A,C;n("$digest");h.$$checkUrlChange();this===J&&null!==e&&(h.defer.cancel(e),B());c=null;do{r=!1;t=this;for(p=0;p<v.length;p++){try{C=v[p],C.scope.$eval(C.expression,C.locals)}catch(F){f(F)}c=null}v.length=0;a:do{if(p=t.$$watchers)for(u=p.length;u--;)try{if(a=p[u])if(m=a.get,(g=m(t))!==(k=a.last)&&!(a.eq?na(g,k):"number"===typeof g&&"number"===typeof k&&isNaN(g)&&isNaN(k)))r=!0,c=a,a.last=a.eq?pa(g,null):g,l=a.fn,l(g,k===s?g:k,t),5>q&&(A=4-q,y[A]||(y[A]=[]),y[A].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:k}));else if(a===c){r=!1;break a}}catch(G){f(G)}if(!(p=t.$$watchersCount&&t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(p=t.$$nextSibling);)t=t.$parent}while(t=p);if((r||v.length)&&!q--)throw J.$$phase=null,d("infdig",b,y);}while(r||v.length);for(J.$$phase=null;K<w.length;)try{w[K++]()}catch(D){f(D)}w.length=K=0},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===J&&h.$$applicationDestroyed();p(this,-this.$$watchersCount);for(var b in this.$$listenerCount)u(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$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=A;this.$on=this.$watch=this.$watchGroup=function(){return A};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){J.$$phase||v.length||h.defer(function(){v.length&&J.$digest()});v.push({scope:this,expression:g(a),locals:b})},$$postDigest:function(a){w.push(a)},$apply:function(a){try{n("$apply");try{return this.$eval(a)}finally{J.$$phase=null}}catch(b){f(b)}finally{try{J.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&t.push(b);a=g(a);r()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,u(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=$a([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=$a([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var J=new m,v=J.$$asyncQueue=[],w=J.$$postDigestQueue=[],t=J.$$applyAsyncQueue=[],K=0;return J}]}function ne(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=Y(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function og(a){if("self"===a)return a;if(G(a)){if(-1<a.indexOf("***"))throw sa("iwcard",a);a=wd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+ a+"$")}if(Wa(a))return new RegExp("^"+a.source+"$");throw sa("imatcher");}function xd(a){var b=[];w(a)&&q(a,function(a){b.push(og(a))});return b}function zf(){this.SCE_CONTEXTS=la;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=xd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=xd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?id(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw sa("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[la.HTML]=e(g);h[la.CSS]=e(g);h[la.URL]=e(g);h[la.JS]=e(g);h[la.RESOURCE_URL]=e(h[la.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw sa("icontext",a,b);if(null===b||y(b)||""===b)return b;if("string"!==typeof b)throw sa("itype",a);return new c(b)},getTrusted:function(d,e){if(null===e||y(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===la.RESOURCE_URL){var g=Y(e.toString()),n,p,u=!1;n=0;for(p=a.length;n<p;n++)if(c(a[n],g)){u=!0;break}if(u)for(n=0,p=b.length;n<p;n++)if(c(b[n],g)){u=!1;break}if(u)return e;throw sa("insecurl",e.toString());}if(d===la.HTML)return f(e);throw sa("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function yf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ea)throw sa("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Xa);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;q(la,function(a,b){var d=Q(b);c[db("parse_as_"+d)]=function(b){return e(a,b)};c[db("get_trusted_"+d)]=function(b){return f(a,b)};c[db("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function Af(){this.$get=["$window","$document",function(a,b){var d={},c=!(a.chrome&&a.chrome.app&&a.chrome.app.runtime)&&a.history&&a.history.pushState,e=Z((/android (\d+)/.exec(Q((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h,k=/^(Moz|webkit|ms)(?=[A-Z])/,l=g.body&&g.body.style,m=!1,n=!1;if(l){for(var p in l)if(m=k.exec(p)){h=m[0];h=h[0].toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in l&&"webkit");m=!!("transition"in l||h+"Transition"in l);n=!!("animation"in l||h+"Animation"in l);!e||m&&n||(m=G(l.webkitTransition),n=G(l.webkitAnimation))}return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&11>=Ea)return!1;if(y(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:h,transitions:m,animations:n,android:e}}]} function Cf(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$templateCache","$http","$q","$sce",function(b,d,c,e){function f(g,h){f.totalPendingRequests++;if(!G(g)||y(b.get(g)))g=e.getTrustedResourceUrl(g);var k=d.defaults&&d.defaults.transformResponse;L(k)?k=k.filter(function(a){return a!==dc}):k===dc&&(k=null);return d.get(g,S({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){b.put(g,a.data);return a.data},function(a){if(!h)throw pg("tpload",g,a.status,a.statusText);return c.reject(a)})}f.totalPendingRequests=0;return f}]}function Df(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];q(a,function(a){var c=ca.element(a).data("$binding");c&&q(c,function(c){d?(new RegExp("(^|\\s)"+wd(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function Ef(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,k,l){z(f)||(l=k,k=f,f=A);var m=va.call(arguments,3),n=w(l)&&!l,p=(n?c:d).defer(),u=p.promise,q;q=b.defer(function(){try{p.resolve(f.apply(null,m))}catch(b){p.reject(b),e(b)}finally{delete g[u.$$timeoutId]}n||a.$apply()},k);u.$$timeoutId=q;g[q]=p;return u}var g={};f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function Y(a){Ea&&($.setAttribute("href",a),a=$.href);$.setAttribute("href",a);return{href:$.href,protocol:$.protocol?$.protocol.replace(/:$/,""):"",host:$.host,search:$.search?$.search.replace(/^\?/,""):"",hash:$.hash?$.hash.replace(/^#/,""):"",hostname:$.hostname,port:$.port,pathname:"/"===$.pathname.charAt(0)?$.pathname:"/"+$.pathname}}function id(a){a=G(a)?Y(a):a;return a.protocol===yd.protocol&&a.host===yd.host}function Ff(){this.$get=ha(C)}function zd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),y(c[l])&&(c[l]=b(g.substring(k+ 1))));return c}}function Jf(){this.$get=zd}function Mc(a){function b(d,c){if(D(d)){var e={};q(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Ad);b("date",Bd);b("filter",qg);b("json",rg);b("limitTo",sg);b("lowercase",tg);b("number",Cd);b("orderBy",Dd);b("uppercase",ug)}function qg(){return function(a,b,d,c){if(!ta(a)){if(null==a)return a;throw N("filter")("notarray",a);}c=c||"$";var e;switch(lc(b)){case"function":break;case"boolean":case"null":case"number":case"string":e=!0;case"object":b=vg(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,b)}}function vg(a,b,d,c){var e=D(a)&&d in a;!0===b?b=na:z(b)||(b=function(a,b){if(y(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!vc(a))return!1;a=Q(""+a);b=Q(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?La(f,a[d],b,d,!1):La(f,a,b,d,c)}}function La(a,b,d,c,e,f){var g=lc(a),h=lc(b);if("string"===h&&"!"===b.charAt(0))return!La(a,b.substring(1),d,c,e);if(L(a))return a.some(function(a){return La(a,b,d,c,e)});switch(g){case"object":var k;if(e){for(k in a)if("$"!==k.charAt(0)&&La(a[k],b,d,c,!0))return!0;return f?!1:La(a,b,d,c,!1)}if("object"===h){for(k in b)if(f=b[k],!z(f)&&!y(f)&&(g=k===c,!La(g?a:a[k],f,d,c,g,g)))return!1;return!0}return d(a,b);case"function":return!1;default:return d(a,b)}}function lc(a){return null===a?"null":typeof a}function Ad(a){var b=a.NUMBER_FORMATS;return function(a,c,e){y(c)&&(c=b.CURRENCY_SYM);y(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Ed(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(/\u00A4/g,c)}}function Cd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Ed(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function wg(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Fd))&&(a=a.replace(Fd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)==mc;e++);if(e==(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)==mc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Gd&&(d=d.splice(0,Gd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function xg(a,b,d,c){var e=a.d,f=e.length-a.i;b=y(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Ed(a,b,d,c,e){if(!G(a)&&!T(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,h=Math.abs(a)+"",k="";if(f)k="\u221e";else{g=wg(h);xg(g,e,b.minFrac,b.maxFrac);k=g.d;h=g.i;e=g.e;f=[];for(g=k.reduce(function(a,b){return a&&!b},!0);0>h;)k.unshift(0),h++;0<h?f=k.splice(h,k.length):(f=k,k=[0]);h=[];for(k.length>=b.lgSize&&h.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)h.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&h.unshift(k.join(""));k=h.join(d);f.length&&(k+=c+f.join(""));e&&(k+="e+"+e)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+k+b.posSuf}function Kb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=mc+a;d&&(a=a.substr(a.length-b));return e+a}function ba(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12==d&&(f=12);return Kb(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Hd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Id(a){return function(b){var d=Hd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Kb(b,a)}}function nc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Bd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Z(b[9]+b[10]),g=Z(b[9]+b[11]));h.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));f=Z(b[4]||0)-f;g=Z(b[5]||0)-g;h=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;G(c)&&(c=yg.test(c)?Z(c):b(c));T(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=zg.exec(d))?(h=$a(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=yc(f,m),c=Sb(c,f,!0));q(h,function(b){k=Ag[b];g+=k?k(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function rg(){return function(a,b){y(b)&&(b=2);return bb(a,b)}}function sg(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):Z(b);if(isNaN(b))return a;T(a)&&(a=a.toString());if(!ta(a))return a;d=!d||isNaN(d)?0:Z(d);d=0>d?Math.max(0,a.length+ d):d;return 0<=b?oc(a,d,d+b):0===d?oc(a,b,a.length):oc(a,Math.max(0,d+b),d)}}function oc(a,b,d){return G(a)?a.slice(b,d):va.call(a,b,d)}function Dd(a){function b(b){return b.map(function(b){var c=1,d=Xa;if(z(b))d=b;else if(G(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}} function c(a,b){var c=0,d=a.type,k=b.type;if(d===k){var k=a.value,l=b.value;"string"===d?(k=k.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(k)&&(k=a.index),D(l)&&(l=b.index));k!==l&&(c=k<l?-1:1)}else c=d<k?-1:1;return c}return function(a,f,g,h){if(null==a)return a;if(!ta(a))throw N("orderBy")("notarray",a);L(f)||(f=[f]);0===f.length&&(f=["+"]);var k=b(f),l=g?-1:1,m=z(h)?h:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:k.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("object"===c)a:{if(z(e.valueOf)&&(e=e.valueOf(),d(e)))break a;vc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var c=0,d=k.length;c<d;c++){var e=m(a.predicateValues[c],b.predicateValues[c]);if(e)return e*k[c].descending*l}return m(a.tieBreaker,b.tieBreaker)*l});return a=a.map(function(a){return a.value})}}function Ta(a){z(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ha(a)}function Jd(a,b,d,c,e){var f=this,g=[];f.$error={};f.$$success={};f.$pending=void 0;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Lb;f.$rollbackViewValue=function(){q(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){q(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Qa(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];q(f.$pending,function(b,c){f.$setValidity(c,null,a)});q(f.$error,function(b,c){f.$setValidity(c,null,a)});q(f.$$success,function(b,c){f.$setValidity(c,null,a)});Za(g,a);a.$$parentForm=Lb};Kd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(Za(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Ua);c.addClass(a,Mb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};f.$setPristine=function(){c.setClass(a,Ua,Mb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;q(g,function(a){a.$setPristine()})};f.$setUntouched=function(){q(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function pc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function lb(a,b,d,c,e,f){var g=Q(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(){h=!0});b.on("compositionend",function(){h=!1;l()})}var k,l=function(a){k&&(f.defer.cancel(k),k=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=W(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){k||(k=f.defer(function(){k=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",m)}b.on("change",l);if(Ld[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!k){var b=this.validity,c=b.badInput,d=b.typeMismatch;k=f.defer(function(){k=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Nb(a,b){return function(d,c){var e,f;if(da(d))return d;if(G(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length- 1)&&(d=d.substring(1,d.length-1));if(Bg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},q(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function mb(a,b,d,c){return function(e,f,g,h,k,l,m){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function p(a){return w(a)&&!da(a)?d(a)||void 0:a}Md(e,f,g,h);lb(e,f,g,h,k,l);var u=h&&h.$options&&h.$options.timezone,q;h.$$parserName=a;h.$parsers.push(function(a){if(h.$isEmpty(a))return null;if(b.test(a))return a=d(a,q),u&&(a=Sb(a,u)),a});h.$formatters.push(function(a){if(a&&!da(a))throw nb("datefmt",a);if(n(a))return(q=a)&&u&&(q=Sb(q,u,!0)),m("date")(a,c,u);q=null;return""});if(w(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!n(a)||y(s)||d(a)>=s};g.$observe("min",function(a){s=p(a);h.$validate()})}if(w(g.max)||g.ngMax){var r;h.$validators.max=function(a){return!n(a)||y(r)||d(a)<=r};g.$observe("max",function(a){r=p(a);h.$validate()})}}}function Md(a,b,d,c){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};return c.badInput||c.typeMismatch?void 0:a})}function Nd(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw nb("constexpr",d,c);return a(b)}return e}function qc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){var b=[];return L(a)?(q(a,function(a){b=b.concat(e(a))}),b):G(a)?a.split(" "):D(a)?(q(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",link:function(f,g,h){function k(a){a=l(a,1);h.$addClass(a)}function l(a,b){var c=g.data("$classCounts")||U(),d=[];q(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")} function m(a,b){var e=c(b,a),f=c(a,b),e=l(e,1),f=l(f,-1);e&&e.length&&d.addClass(g,e);f&&f.length&&d.removeClass(g,f)}function n(a){if(!0===b||(f.$index&1)===b){var c=e(a||[]);if(!p)k(c);else if(!na(a,p)){var d=e(p);m(d,c)}}p=L(a)?a.map(function(a){return ia(a)}):ia(a)}var p;f.$watch(h[a],n,!0);h.$observe("class",function(b){n(f.$eval(h[a]))});"ngClass"!==a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var m=e(f.$eval(h[a]));g===b?k(m):(g=l(m,-1),h.$removeClass(g))}})}}}]}function Kd(a){function b(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+Cc(a,"-"):"";b(ob+a,!0===c);b(Od+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Od]=!(f[ob]=e.hasClass(ob));c.$setValidity=function(a,e,f){y(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&h(c.$pending,a,f),Pd(c.$pending)&&(c.$pending=void 0));Ga(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,a,f));c.$pending?(b(Qd,!0),c.$valid=c.$invalid=void 0,d("",null)):(b(Qd,!1),c.$valid=Pd(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?void 0:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Pd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var Cg=/^\/(.+)\/([a-z]*)$/,ua=Object.prototype.hasOwnProperty,Q=function(a){return G(a)?a.toLowerCase():a},ub=function(a){return G(a)?a.toUpperCase():a},Ea,F,qa,va=[].slice,bg=[].splice,Dg=[].push,ma=Object.prototype.toString,wc=Object.getPrototypeOf,xa=N("ng"),ca=C.angular||(C.angular={}),Ub,pb=0;Ea=C.document.documentMode;A.$inject=[];Xa.$inject=[];var L=Array.isArray,ae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,W=function(a){return G(a)?a.trim():a},wd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=C.document.querySelector("[ng-csp]")||C.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Na.length,c,e;for(b=0;b<d;++b)if(c=Na[b],a=C.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return rb.name_=e},de=/:/g,Na=["ng-","data-ng-","ng:","x-ng-"],ie=/[A-Z]/g,Dc=!1,Ma=3,me={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};O.expando="ng339";var fb=O.cache={},Pf=1;O._data=function(a){return this.cache[a[this.expando]]||{}};var Kf=/([\:\-\_]+(.))/g,Lf=/^moz([A-Z])/,yb={mouseleave:"mouseout",mouseenter:"mouseover"},Wb=N("jqLite"),Of=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Vb=/<|&#?\w+;/,Mf=/<([\w:-]+)/,Nf=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ja={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,"",""]};ja.optgroup=ja.option;ja.tbody=ja.tfoot=ja.colgroup=ja.caption=ja.thead;ja.th=ja.td;var Uf=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Oa=O.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===C.document.readyState?C.setTimeout(b):(this.on("DOMContentLoaded",b),O(C).on("load",b))},toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?F(this[a]):F(this[this.length+a])},length:0,push:Dg,sort:[].sort,splice:[].splice},Eb={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){Eb[Q(a)]=a});var Vc={};q("input select option textarea button form details".split(" "),function(a){Vc[a]=!0});var bd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};q({data:Yb,removeData:eb,hasData:function(a){for(var b in fb[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)eb(a[b])}},function(a,b){O[b]=a});q({data:Yb,inheritedData:Cb,scope:function(a){return F.data(a,"$scope")||Cb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return F.data(a,"$isolateScope")||F.data(a,"$isolateScopeNoTemplate")},controller:Sc,injector:function(a){return Cb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:zb,css:function(a,b,d){b=db(b);if(w(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Ma&&2!==c&&8!==c)if(c=Q(b),Eb[c])if(w(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||A).specified?c:void 0;else if(w(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?void 0:a},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(y(d)){var c=a.nodeType;return 1===c||c===Ma?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(y(b)){if(a.multiple&&"select"===wa(a)){var d=[];q(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(y(b))return a.innerHTML;wb(a,!0);a.innerHTML=b},empty:Tc},function(a,b){O.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Tc&&y(2==a.length&&a!==zb&&a!==Sc?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===Yb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=y(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});q({removeData:eb,on:function(a,b,d,c){if(w(c))throw Wb("onargs");if(Nc(a)){c=xb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Rf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],yb[b]?(h(yb[b],Tf),h(b,void 0,!0)):h(b)}},off:Rc,one:function(a,b,d){a=F(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;wb(a);q(new O(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];q(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new O(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;q(new O(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){Pc(a,F(b).eq(0).clone()[0])},remove:Db,detach:function(a){Db(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new O(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:Bb,removeClass:Ab,toggleClass:function(a,b,d){b&&q(b.split(" "),function(b){var e=d;y(e)&&(e=!zb(a,b));(e?Bb:Ab)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Xb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=xb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:A,type:f,target:a},b.type&&(c=S(c,b)),b=ia(g),e=d?[c].concat(d):[c],q(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){O.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)y(f)?(f=a(this[g],b,c,e),w(f)&&(f=F(f))):Qc(f,a(this[g],b,c,e));return w(f)?f:this};O.prototype.bind=O.prototype.on;O.prototype.unbind=O.prototype.off});Ra.prototype={put:function(a,b){this[Ca(a,this.nextUid)]=b},get:function(a){return this[Ca(a,this.nextUid)]},remove:function(a){var b=this[a=Ca(a,this.nextUid)];delete this[a];return b}};var If=[function(){this.$get=[function(){return Ra}]}],Wf=/^([^\(]+?)=>/,Xf=/^[^\(]*\(\s*([^\)]*)\)/m,Eg=/,/,Fg=/^\s*(_?)(\S+?)\1\s*$/,Vf=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ha=N("$injector");cb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw G(d)&&d||(d=a.name||Yf(a)),Ha("strictdi",d);b=Wc(a);q(b[1].split(Eg),function(a){a.replace(Fg,function(a,b,d){c.push(d)})})}a.$inject=c}}else L(a)?(b=a.length-1,Pa(a[b],"fn"),c=a.slice(0,b)):Pa(a,"fn",!0);return c};var Rd=N("$animate"),$e=function(){this.$get=A},af=function(){var a=new Ra,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=G(b)?b.split(" "):L(b)?b:[],q(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){q(b,function(b){var c=a.get(b);if(c){var d=Zf(b.attr("class")),e="",f="";q(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});q(b,function(a){e&&Bb(a,e);f&&Ab(a,f)});a.remove(b)}});b.length=0}return{enabled:A,on:A,off:A,pin:A,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Ye=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Rd("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Rd("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=f&&F(f);g=g&&F(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ia(h))},move:function(e,f,g,h){f=f&&F(f);g=g&&F(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ia(h))},leave:function(b,c){return a.push(b,"leave",Ia(c),function(){b.remove()})},addClass:function(b,c,g){g=Ia(g);g.addClass=gb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ia(g);g.removeClass=gb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ia(h);h.addClass=gb(h.addClass,c);h.removeClass=gb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ia(k);k.from=k.from?S(k.from,c):c;k.to=k.to?S(k.to,g):g;k.tempClasses=gb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],cf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},bf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){var d=c[0];d&&d.hidden?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;q(a,function(a){a.done(c)})};f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:A,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},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(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},Ze=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);h||k.complete();h=!0});return k}var g=e||{};g.$$prepared||(g=pa(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var h,k=new d;return{start:f,end:f}}}]},ga=N("$compile"),bc=new function(){};Fc.$inject=["$provide","$$sanitizeUriProvider"];Fb.prototype.isFirstChange=function(){return this.previousValue===bc};var Yc=/^((?:x|data)[\:\-_])/i,cg=N("$controller"),cd=/^(\S+)(\s+as\s+([\w$]+))?$/,jf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof F&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},dd="application/json",ec={"Content-Type":dd+";charset=utf-8"},eg=/^\[|^\{(?!\{)/,fg={"[":/]$/,"{":/}$/},dg=/^\)\]\}',?\n/,Gg=N("$http"),hd=function(a){return function(){throw Gg("legacy",a);}},Ka=ca.$interpolateMinErr=N("$interpolate");Ka.throwNoconcat=function(a){throw Ka("noconcat",a);};Ka.interr=function(a,b){return Ka("interr",a,b.toString())};var rf=function(){this.$get=["$window",function(a){function b(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var d=a.angular.callbacks,c={};return{createCallback:function(a){a="_"+(d.$$counter++).toString(36);var f="angular.callbacks."+a,g=b(a);c[f]=d[a]=g;return f},wasCalled:function(a){return c[a].called},getResponse:function(a){return c[a].data},removeCallback:function(a){delete d[c[a].id];delete c[a]}}}]},Hg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,hg={http:80,https:443,ftp:21},Gb=N("$location"),Ig={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Hb("$$absUrl"),url:function(a){if(y(a))return this.$$url;var b=Hg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Hb("$$protocol"),host:Hb("$$host"),port:Hb("$$port"),path:md("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(G(a)||T(a))a=a.toString(),this.$$search=Ac(a);else if(D(a))a=pa(a,{}),q(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Gb("isrcharg");break;default:y(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:md("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};q([ld,hc,gc],function(a){a.prototype=Object.create(Ig);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==gc||!this.$$html5)throw Gb("nostate");this.$$state=y(b)?null:b;return this}});var X=N("$parse"),jg=Function.prototype.call,kg=Function.prototype.apply,lg=Function.prototype.bind,Ob=U();q("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Ob[a]=!0});var Jg={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},jc=function(a){this.options=a};jc.prototype={constructor:jc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Ob[b],e=Ob[d];Ob[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw X("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=Q(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=Jg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal="Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.LocalsExpression="LocalsExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=pa(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:s.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},throwError:function(a,b){throw X("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw X("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw X("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:s.ThisExpression},$locals:{type:s.LocalsExpression}}};td.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};V(c,d.$filter);var e="",f;this.stage="assign";if(f=rd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=pd(c.body);d.stage="inputs";q(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+ e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Sa,ra,nd,ig,Ib,mg,od,a);this.state=this.stage=void 0;e.literal=sd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;q(b,function(b){a.push("var "+b+"="+d.generateFunction(b,"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;q(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,h,k=this,l,m,n;c=c||A;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:q(a.body,function(b,c){k.recurse(b.expression,void 0,void 0,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){h=a});m=a.operator+"("+this.ifDefined(h,0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Sa(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Jb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,void 0,function(){k.if_(k.notNull(g),function(){e&&1!==e&&k.addEnsureSafeAssignContext(g);if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Sa(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Jb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],q(a.arguments,function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);q(a.arguments,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!qd(a.left))throw X("lval");this.recurse(a.left,void 0,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];q(a.elements,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n=!1;q(a.properties,function(a){a.computed&&(n=!0)});n?(b=b||this.nextId(),this.assign(b,"{}"),q(a.properties,function(a){a.computed?(g=k.nextId(),k.recurse(a.key,g)):g=a.key.type===s.Identifier?a.key.name:""+a.key.value;h=k.nextId();k.recurse(a.value,h);k.assign(k.member(b,g,a.computed),h)})):(q(a.properties,function(b){k.recurse(b.value,a.constant?void 0:k.nextId(),void 0,function(a){l.push(k.escape(b.key.type===s.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.LocalsExpression:this.assign(b,"l");c("l");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/[$_a-zA-Z][$_a-zA-Z0-9]*/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+ a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(G(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(T(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw X("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};ud.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;V(c,d.$filter);var e,f;if(e=rd(c))f=this.recurse(e);e=pd(c.body);var g;e&&(g=[],q(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];q(c.body,function(a){h.push(d.recurse(a.expression))});e=0===c.body.length?A:1===c.body.length?h[0]:function(a,b){var c;q(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=sd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Sa(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Jb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Sa(a.property.name,f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],q(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var n=[],p=0;p<g.length;++p)n.push(g[p](a,c,d,f));a=e.apply(void 0,n,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,m){var n=e(a,c,d,m),p;if(null!=n.value){ra(n.context,f.expression);nd(n.value,f.expression);p=[];for(var q=0;q<g.length;++q)p.push(ra(g[q](a,c,d,m),f.expression));p=ra(n.value.apply(n.context,p),f.expression)}return b?{value:p}:p};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,m){var n=c(a,d,g,m);a=e(a,d,g,m);ra(n.value,f.expression);Ib(n.context);n.context[n.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],q(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],p=0;p<g.length;++p)f.push(g[p](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],q(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},p=0;p<g.length;++p)g[p].computed?f[g[p].key(a,c,d,e)]=g[p].value(a,c,d,e):f[g[p].key]=g[p].value(a,c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.LocalsExpression:return function(a,c){return b?{value:c}:c};case s.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=od(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=(w(h)?h:0)-(w(c)?c:0);return d?{value:h}:h}},"binary*":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:void 0;b&&ra(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m+="",Sa(m,e),c&&1!==c&&(Ib(l),l&&!l[m]&&(l[m]={})),n=l[m],ra(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&(Ib(g),g&&!g[b]&&(g[b]={}));h=null!=g?g[b]:void 0;(d||Jb(b))&&ra(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var kc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(a,d);this.astCompiler=d.csp?new ud(this.ast,b):new td(this.ast,b)};kc.prototype={constructor:kc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var ng=Object.prototype.valueOf,sa=N("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},pg=N("$compile"),$=C.document.createElement("a"),yd=Y(C.location.href);zd.$inject=["$document"];Mc.$inject=["$provide"];var Gd=22,Fd=".",mc="0";Ad.$inject=["$locale"];Cd.$inject=["$locale"];var Ag={yyyy:ba("FullYear",4,0,!1,!0),yy:ba("FullYear",2,0,!0,!0),y:ba("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ba("Month",2,1),M:ba("Month",1,1),LLLL:kb("Month",!1,!0),dd:ba("Date",2),d:ba("Date",1),HH:ba("Hours",2),H:ba("Hours",1),hh:ba("Hours",2,-12),h:ba("Hours",1,-12),mm:ba("Minutes",2),m:ba("Minutes",1),ss:ba("Seconds",2),s:ba("Seconds",1),sss:ba("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Kb(Math[0<a?"floor":"ceil"](a/60),2)+Kb(Math.abs(a%60),2))},ww:Id(2),w:Id(1),G:nc,GG:nc,GGG:nc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},zg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,yg=/^\-?\d+$/;Bd.$inject=["$locale"];var tg=ha(Q),ug=ha(ub);Dd.$inject=["$parse"];var oe=ha({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===ma.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};q(Eb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=Aa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});q(bd,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(Cg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});q(["src","srcset","href"],function(a){var b=Aa("ng-"+a);vb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===ma.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ea&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Lb={$addControl:A,$$renameControl:function(a,b){a.$name=b},$removeControl:A,$setValidity:A,$setDirty:A,$setPristine:A,$setSubmitted:A};Jd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Sd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||A}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Jd,compile:function(d,f){d.addClass(Ua).addClass(ob);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var p=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",p,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",p,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var q=g?c(n.$name):A;g&&(q(a,n),e.$observe(g,function(b){n.$name!==b&&(q(a,void 0),n.$$parentForm.$$renameControl(n,b),q=c(n.$name),q(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);q(a,void 0);S(n,Lb)})}}}}}]},pe=Sd(),Ce=Sd(!0),Bg=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Kg=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Lg=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Mg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Td=/^(\d{4,})-(\d{2})-(\d{2})$/,Ud=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,rc=/^(\d{4,})-W(\d\d)$/,Vd=/^(\d{4,})-(\d\d)$/,Wd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ld=U();q(["date","datetime-local","month","time","week"],function(a){Ld[a]=!0});var Xd={text:function(a,b,d,c,e,f){lb(a,b,d,c,e,f);pc(c)},date:mb("date",Td,Nb(Td,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":mb("datetimelocal",Ud,Nb(Ud,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:mb("time",Wd,Nb(Wd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:mb("week",rc,function(a,b){if(da(a))return a;if(G(a)){rc.lastIndex=0;var d=rc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Hd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:mb("month",Vd,Nb(Vd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Md(a,b,d,c);lb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){if(c.$isEmpty(a))return null;if(Mg.test(a))return parseFloat(a)});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!T(a))throw nb("numfmt",a);a=a.toString()}return a});if(w(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||y(g)||a>=g};d.$observe("min",function(a){w(a)&&!T(a)&&(a=parseFloat(a));g=T(a)&&!isNaN(a)?a:void 0;c.$validate()})}if(w(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||y(h)||a<=h};d.$observe("max",function(a){w(a)&&!T(a)&&(a=parseFloat(a));h=T(a)&&!isNaN(a)?a:void 0;c.$validate()})}},url:function(a,b,d,c,e,f){lb(a,b,d,c,e,f);pc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||Kg.test(d)}},email:function(a,b,d,c,e,f){lb(a,b,d,c,e,f);pc(c);c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||Lg.test(d)}},radio:function(a,b,d,c){y(d.name)&&b.attr("name",++pb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Nd(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Nd(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return na(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:A,button:A,submit:A,reset:A,file:A},Gc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Xd[Q(g.type)]||Xd.text)(e,f,g,h[0],b,a,d,c)}}}}],Ng=/^(true|false|\d+)$/,Ue=function(){return{restrict:"A",priority:100,compile:function(a,b){return Ng.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ue=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=y(a)?"":a})}}}}],we=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=y(a)?"":a})}}}}],ve=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],Te=ha({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),xe=qc("",!0),ze=qc("Odd",0),ye=qc("Even",1),Ae=Ta({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Be=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Lc={},Og={blur:!0,focus:!0};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=Aa("ng-"+a);Lc[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};Og[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var Ee=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var h,k,l;d.$watch(e.ngIf,function(d){d?k||g(function(d,f){k=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);h={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),k&&(k.$destroy(),k=null),h&&(l=tb(h.clone),a.leave(l).then(function(){l=null}),h=null))})}}}],Fe=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,p){var q=0,s,B,r,y=function(){B&&(B.remove(),B=null);s&&(s.$destroy(),s=null);r&&(d.leave(r).then(function(){B=null}),B=r,r=null)};c.$watch(f,function(f){var m=function(){!w(h)||h&&!c.$eval(h)||b()},t=++q;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===q){var b=c.$new();n.template=a;a=p(b,function(a){y();d.enter(a,null,e).then(m)});s=b;r=a;s.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==q||(y(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(y(),n.template=null)})}}}}],We=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){ma.call(d[0]).match(/SVG/)?(d.empty(),a(Oc(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],Ge=Ta({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Se=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?W(e):e;c.$parsers.push(function(a){if(!y(a)){var b=[];a&&q(a.split(g),function(a){a&&b.push(f?W(a):a)});return b}});c.$formatters.push(function(a){if(L(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},ob="ng-valid",Od="ng-invalid",Ua="ng-pristine",Mb="ng-dirty",Qd="ng-pending",nb=N("ngModel"),Pg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;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=void 0;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Lb;var m=e(d.ngModel),n=m.assign,p=m,u=n,s=null,B,r=this;this.$$setOptions=function(a){if((r.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");p=function(a){var c=m(a);z(c)&&(c=b(a));return c};u=function(a,b){z(m(a))?f(a,{$$$p:b}):n(a,b)}}else if(!m.assign)throw nb("nonassign",d.ngModel,ya(c));};this.$render=A;this.$isEmpty=function(a){return y(a)||""===a||null===a||a!==a};this.$$updateEmptyClasses=function(a){r.$isEmpty(a)?(f.removeClass(c,"ng-not-empty"),f.addClass(c,"ng-empty")):(f.removeClass(c,"ng-empty"),f.addClass(c,"ng-not-empty"))};var J=0;Kd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){r.$dirty=!1;r.$pristine=!0;f.removeClass(c,Mb);f.addClass(c,Ua)};this.$setDirty=function(){r.$dirty=!0;r.$pristine=!1;f.removeClass(c,Ua);f.addClass(c,Mb);r.$$parentForm.$setDirty()};this.$setUntouched=function(){r.$touched=!1;r.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){r.$touched=!0;r.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(s);r.$viewValue=r.$$lastCommittedViewValue;r.$render()};this.$validate=function(){if(!T(r.$modelValue)||!isNaN(r.$modelValue)){var a=r.$$rawModelValue,b=r.$valid,c=r.$modelValue,d=r.$options&&r.$options.allowInvalid;r.$$runValidators(a,r.$$lastCommittedViewValue,function(e){d||b===e||(r.$modelValue=e?a:void 0,r.$modelValue!==c&&r.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=!0;q(r.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(q(r.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;q(r.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw nb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},A):g(!0)}function f(a,b){h===J&&r.$setValidity(a,b)}function g(a){h===J&&c(a)}J++;var h=J;(function(){var a=r.$$parserName||"parse";if(y(B))f(a,null);else return B||(q(r.$validators,function(a,b){f(b,null)}),q(r.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=r.$viewValue;g.cancel(s);if(r.$$lastCommittedViewValue!==a||""===a&&r.$$hasNativeValidators)r.$$updateEmptyClasses(a),r.$$lastCommittedViewValue=a,r.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=r.$$lastCommittedViewValue;if(B=y(b)?void 0:!0)for(var c=0;c<r.$parsers.length;c++)if(b=r.$parsers[c](b),y(b)){B=!1;break}T(r.$modelValue)&&isNaN(r.$modelValue)&&(r.$modelValue=p(a));var d=r.$modelValue,e=r.$options&&r.$options.allowInvalid;r.$$rawModelValue=b;e&&(r.$modelValue=b,r.$modelValue!==d&&r.$$writeModelToScope());r.$$runValidators(b,r.$$lastCommittedViewValue,function(a){e||(r.$modelValue=a?b:void 0,r.$modelValue!==d&&r.$$writeModelToScope())})};this.$$writeModelToScope=function(){u(a,r.$modelValue);q(r.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){r.$viewValue=a;r.$options&&!r.$options.updateOnDefault||r.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=r.$options;d&&w(d.debounce)&&(d=d.debounce,T(d)?c=d:T(d[b])?c=d[b]:T(d["default"])&&(c=d["default"]));g.cancel(s);c?s=g(function(){r.$commitViewValue()},c):h.$$phase?r.$commitViewValue():a.$apply(function(){r.$commitViewValue()})};a.$watch(function(){var b=p(a);if(b!==r.$modelValue&&(r.$modelValue===r.$modelValue||b===b)){r.$modelValue=r.$$rawModelValue=b;B=void 0;for(var c=r.$formatters,d=c.length,e=b;d--;)e=c[d](e);r.$viewValue!==e&&(r.$$updateEmptyClasses(e),r.$viewValue=r.$$lastCommittedViewValue=e,r.$render(),r.$$runValidators(b,e,A))}return b})}],Re=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Pg,priority:1,compile:function(b){b.addClass(Ua).addClass("ng-untouched").addClass(ob);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],Qg=/(\s+|^)default(\s+|$)/,Ve=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=pa(a.$eval(b.ngModelOptions));w(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=W(this.$options.updateOn.replace(Qg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},He=Ta({terminal:!0,priority:1E3}),Rg=N("ngOptions"),Sg=/^\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]+?))?$/,Pe=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!q&&ta(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var n=a.match(Sg);if(!n)throw Rg("iexp",a,ya(b));var p=n[5]||n[7],q=n[6];a=/ as /.test(n[0])&&n[1];var s=n[9];b=d(n[2]?n[1]:p);var w=a&&d(a)||b,r=s&&d(s),y=s?function(a,b){return r(c,b)}:function(a){return Ca(a)},v=function(a,b){return y(a,E(a,b))},A=d(n[2]||n[1]),t=d(n[3]||""),K=d(n[4]||""),z=d(n[8]),H={},E=q?function(a,b){H[q]=b;H[p]=a;return H}:function(a){H[p]=a;return H};return{trackBy:s,getTrackByValue:v,getWatchables:d(z,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var h=a===d?g:d[g],l=a[h],h=E(l,h),l=y(l,h);b.push(l);if(n[2]||n[1])l=A(c,h),b.push(l);n[4]&&(h=K(c,h),b.push(h))}return b}),getOptions:function(){for(var a=[],b={},d=z(c)||[],g=f(d),h=g.length,n=0;n<h;n++){var p=d===g?n:g[n],q=E(d[p],p),r=w(c,q),p=y(r,q),u=A(c,q),H=t(c,q),q=K(c,q),r=new e(p,r,u,H,q);a.push(r);b[p]=r}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[v(a)]},getViewValueFromOption:function(a){return s?ca.copy(a.viewValue):a.viewValue}}}}}var e=C.document.createElement("option"),f=C.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=A},post:function(d,h,k,l){function m(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function n(){var a=t&&p.readValue();if(t)for(var b=t.items.length-1;0<=b;b--){var c=t.items[b];w(c.group)?Db(c.element.parentNode):Db(c.element)}t=K.getOptions();var d={};v&&h.prepend(B);t.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1)}else b=C,c=e.cloneNode(!1);b.appendChild(c);m(a,c)});h[0].appendChild(C);s.$render();s.$isEmpty(a)||(b=p.readValue(),(K.trackBy||y?na(a,b):a===b)||(s.$setViewValue(b),s.$render()))}var p=l[0],s=l[1],y=k.multiple,B;l=0;for(var r=h.children(),A=r.length;l<A;l++)if(""===r[l].value){B=r.eq(l);break}var v=!!B,z=F(e.cloneNode(!1));z.val("?");var t,K=c(k.ngOptions,h,d),C=b[0].createDocumentFragment();y?(s.$isEmpty=function(a){return!a||0===a.length},p.writeValue=function(a){t.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){if(a=t.getOptionFromViewValue(a))a.element.selected=!0})},p.readValue=function(){var a=h.val()||[],b=[];q(a,function(a){(a=t.selectValueMap[a])&&!a.disabled&&b.push(t.getViewValueFromOption(a))});return b},K.trackBy&&d.$watchCollection(function(){if(L(s.$viewValue))return s.$viewValue.map(function(a){return K.getTrackByValue(a)})},function(){s.$render()})):(p.writeValue=function(a){var b=t.getOptionFromViewValue(a);b?(h[0].value!==b.selectValue&&(z.remove(),v||B.remove(),h[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(z.remove(),v||h.prepend(B),h.val(""),B.prop("selected",!0),B.attr("selected",!0)):(v||B.remove(),h.prepend(z),h.val("?"),z.prop("selected",!0),z.attr("selected",!0))},p.readValue=function(){var a=t.selectValueMap[h.val()];return a&&!a.disabled?(v||B.remove(),z.remove(),t.getViewValueFromOption(a)):null},K.trackBy&&d.$watch(function(){return K.getTrackByValue(s.$viewValue)},function(){s.$render()}));v?(B.remove(),a(B)(d),B.removeClass("ng-scope")):B=F(e.cloneNode(!1));h.empty();n();d.$watchCollection(K.getWatchables,n)}}}}],Ie=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),n=h.offset||0,p=f.$eval(m)||{},s={},w=b.startSymbol(),B=b.endSymbol(),r=w+l+"-"+n+B,z=ca.noop,v;q(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+Q(c[2]),p[c]=g.attr(h.$attr[b]))});q(p,function(a,d){s[d]=b(a.replace(c,r))});f.$watch(l,function(b){var c=parseFloat(b),e=isNaN(c);e||c in p||(c=a.pluralCat(c-n));c===v||e&&T(v)&&isNaN(v)||(z(),e=s[c],y(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),z=A,k()):z=f.$watch(e,k),v=c)})}}}],Je=["$parse","$animate","$compile",function(a,b,d){var c=N("ngRepeat"),e=function(a,b,c,d,e,m,n){a[c]=d;e&&(a[e]=m);a.$index=b;a.$first=0===b;a.$last=b===n-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(f,g){var h=g.ngRepeat,k=d.$$createComment("end ngRepeat",h),l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!l)throw c("iexp",h);var m=l[1],n=l[2],p=l[3],s=l[4],l=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!l)throw c("iidexp",m);var w=l[3]||l[1],y=l[2];if(p&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(p)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(p)))throw c("badident",p);var r,z,v,A,t={$id:Ca};s?r=a(s):(v=function(a,b){return Ca(b)},A=function(a){return a});return function(a,d,f,g,l){r&&(z=function(b,c,d){y&&(t[y]=b);t[w]=c;t.$index=d;return r(a,t)});var m=U();a.$watchCollection(n,function(f){var g,n,r=d[0],s,u=U(),t,C,F,E,G,D,H;p&&(a[p]=f);if(ta(f))G=f,n=z||v;else for(H in n=z||A,G=[],f)ua.call(f,H)&&"$"!==H.charAt(0)&&G.push(H);t=G.length;H=Array(t);for(g=0;g<t;g++)if(C=f===G?g:G[g],F=f[C],E=n(C,F,g),m[E])D=m[E],delete m[E],u[E]=D,H[g]=D;else{if(u[E])throw q(H,function(a){a&&a.scope&&(m[a.id]=a)}),c("dupes",h,E,F);H[g]={id:E,scope:void 0,clone:void 0};u[E]=!0}for(s in m){D=m[s];E=tb(D.clone);b.leave(E);if(E[0].parentNode)for(g=0,n=E.length;g<n;g++)E[g].$$NG_REMOVED=!0;D.scope.$destroy()}for(g=0;g<t;g++)if(C=f===G?g:G[g],F=f[C],D=H[g],D.scope){s=r;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);D.clone[0]!=s&&b.move(tb(D.clone),null,r);r=D.clone[D.clone.length-1];e(D.scope,g,w,F,y,C,t)}else l(function(a,c){D.scope=c;var d=k.cloneNode(!1);a[a.length++]=d;b.enter(a,null,r);r=d;D.clone=a;u[D.id]=D;e(D.scope,g,w,F,y,C,t)});m=u})}}}}],Ke=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Le=Ta(function(a,b,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&q(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Me=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],h=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){var d,e;d=0;for(e=k.length;d<e;++d)a.cancel(k[d]);d=k.length=0;for(e=l.length;d<e;++d){var s=tb(h[d].clone);l[d].$destroy();(k[d]=a.leave(s)).then(m(k,d))}h.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&q(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");h.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],Ne=Ta({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),Oe=Ta({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),Tg=N("ngTransclude"),Qe=["$compile",function(a){return{restrict:"EAC",terminal:!0,compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,h){function k(){d(a,function(a){b.append(a)})}if(!h)throw Tg("orphan",ya(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;h(function(a,c){a.length?b.append(a):(k(),c.$destroy())},null,f);f&&!h.isSlotFilled(f)&&k()}}}}],qe=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Ug={$setViewValue:A,$render:A},Vg=["$element","$scope",function(a,b){var d=this,c=new Ra;d.ngModelCtrl=Ug;d.unknownOption=F(C.document.createElement("option"));d.renderUnknownOption=function(b){b="? "+Ca(b)+" ?";d.unknownOption.val(b);a.prepend(d.unknownOption);a.val(b)};b.$on("$destroy",function(){d.renderUnknownOption=A});d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()};d.readValue=function(){d.removeUnknownOption();return a.val()};d.writeValue=function(b){d.hasOption(b)?(d.removeUnknownOption(),a.val(b),""===b&&d.emptyOption.prop("selected",!0)):null==b&&d.emptyOption?(d.removeUnknownOption(),a.val("")):d.renderUnknownOption(b)};d.addOption=function(a,b){if(8!==b[0].nodeType){Qa(a,'"option value"');""===a&&(d.emptyOption=b);var g=c.get(a)||0;c.put(a,g+1);d.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=!0)}};d.removeOption=function(a){var b=c.get(a);b&&(1===b?(c.remove(a),""===a&&(d.emptyOption=void 0)):c.put(a,b-1))};d.hasOption=function(a){return!!c.get(a)};d.registerOption=function(a,b,c,h,k){if(h){var l;c.$observe("value",function(a){w(l)&&d.removeOption(l);l=a;d.addOption(a,b)})}else k?a.$watch(k,function(a,e){c.$set("value",a);e!==a&&d.removeOption(e);d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value);d.ngModelCtrl.$render()})}}],re=function(){return{restrict:"E",require:["select","?ngModel"],controller:Vg,priority:1,link:{pre:function(a,b,d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})});if(d.multiple){f.readValue=function(){var a=[];q(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Ra(a);q(b.find("option"),function(a){a.selected=w(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==e.$viewValue||na(g,e.$viewValue)||(g=ia(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||0===a.length}}}},post:function(a,b,d,c){var e=c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},te=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){if(w(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],se=ha({restrict:"E",terminal:!1}),Ic=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){G(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw N("ngPattern")("noregexp",f,a,ya(b));e=a||void 0;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||y(e)||e.test(b)}}}}},Kc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a=Z(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Jc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=Z(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load angular more than once."):(je(),le(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),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:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),F(C.document).ready(function(){fe(C.document,Bc)}))})(window);!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>');(function(){var supportCustomEvent=window.CustomEvent;if(!supportCustomEvent||typeof supportCustomEvent=='object'){supportCustomEvent=function CustomEvent(event,x){x=x||{};var ev=document.createEvent('CustomEvent');ev.initCustomEvent(event,!!x.bubbles,!!x.cancelable,x.detail||null);return ev;};supportCustomEvent.prototype=window.Event.prototype;} function findNearestDialog(el){while(el){if(el.nodeName.toUpperCase()=='DIALOG'){return(el);} el=el.parentElement;} return null;} function safeBlur(el){if(el&&el.blur&&el!=document.body){el.blur();}} function inNodeList(nodeList,node){for(var i=0;i<nodeList.length;++i){if(nodeList[i]==node){return true;}} return false;} function dialogPolyfillInfo(dialog){this.dialog_=dialog;this.replacedStyleTop_=false;this.openAsModal_=false;if(!dialog.hasAttribute('role')){dialog.setAttribute('role','dialog');} dialog.show=this.show.bind(this);dialog.showModal=this.showModal.bind(this);dialog.close=this.close.bind(this);if(!('returnValue'in dialog)){dialog.returnValue='';} this.maybeHideModal=this.maybeHideModal.bind(this);if('MutationObserver'in window){var mo=new MutationObserver(this.maybeHideModal);mo.observe(dialog,{attributes:true,attributeFilter:['open']});}else{dialog.addEventListener('DOMAttrModified',this.maybeHideModal);} Object.defineProperty(dialog,'open',{set:this.setOpen.bind(this),get:dialog.hasAttribute.bind(dialog,'open')});this.backdrop_=document.createElement('div');this.backdrop_.className='backdrop';this.backdropClick_=this.backdropClick_.bind(this);} dialogPolyfillInfo.prototype={get dialog(){return this.dialog_;},maybeHideModal:function(){if(!this.openAsModal_){return;} if(this.dialog_.hasAttribute('open')&&document.body.contains(this.dialog_)){return;} this.openAsModal_=false;this.dialog_.style.zIndex='';if(this.replacedStyleTop_){this.dialog_.style.top='';this.replacedStyleTop_=false;} this.backdrop_.removeEventListener('click',this.backdropClick_);if(this.backdrop_.parentElement){this.backdrop_.parentElement.removeChild(this.backdrop_);} dialogPolyfill.dm.removeDialog(this);},setOpen:function(value){if(value){this.dialog_.hasAttribute('open')||this.dialog_.setAttribute('open','');}else{this.dialog_.removeAttribute('open');this.maybeHideModal();}},backdropClick_:function(e){var redirectedEvent=document.createEvent('MouseEvents');redirectedEvent.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget);this.dialog_.dispatchEvent(redirectedEvent);e.stopPropagation();},focus_:function(){var target=this.dialog_.querySelector('[autofocus]:not([disabled])');if(!target){var opts=['button','input','keygen','select','textarea'];var query=opts.map(function(el){return el+':not([disabled])';});query.push('[tabindex]:not([disabled]):not([tabindex=""])');target=this.dialog_.querySelector(query.join(', '));} safeBlur(document.activeElement);target&&target.focus();},updateZIndex:function(backdropZ,dialogZ){this.backdrop_.style.zIndex=backdropZ;this.dialog_.style.zIndex=dialogZ;},show:function(){if(!this.dialog_.open){this.setOpen(true);this.focus_();}},showModal:function(){if(this.dialog_.hasAttribute('open')){throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');} if(!document.body.contains(this.dialog_)){throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');} if(!dialogPolyfill.dm.pushDialog(this)){throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');} this.show();this.openAsModal_=true;if(dialogPolyfill.needsCentering(this.dialog_)){console.info('repositioning what');dialogPolyfill.reposition(this.dialog_);this.replacedStyleTop_=true;}else{console.info('NOT repositioning');this.replacedStyleTop_=false;} this.backdrop_.addEventListener('click',this.backdropClick_);this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling);this.dialog_.addEventListener('DOMNodeRemoved',function(ev){console.info('dialog itself removed',ev);});},close:function(opt_returnValue){if(!this.dialog_.hasAttribute('open')){throw new Error('Failed to execute \'close\' on dialog: The element does not have an \'open\' attribute, and therefore cannot be closed.');} this.setOpen(false);if(opt_returnValue!==undefined){this.dialog_.returnValue=opt_returnValue;} var closeEvent=new supportCustomEvent('close',{bubbles:false,cancelable:false});this.dialog_.dispatchEvent(closeEvent);}};var dialogPolyfill={};dialogPolyfill.reposition=function(element){var scrollTop=document.body.scrollTop||document.documentElement.scrollTop;var topValue=scrollTop+(window.innerHeight-element.offsetHeight)/2;element.style.top=Math.max(scrollTop,topValue)+'px';};dialogPolyfill.isInlinePositionSetByStylesheet=function(element){for(var i=0;i<document.styleSheets.length;++i){var styleSheet=document.styleSheets[i];var cssRules=null;try{cssRules=styleSheet.cssRules;}catch(e){} if(!cssRules){continue;} for(var j=0;j<cssRules.length;++j){var rule=cssRules[j];var selectedNodes=null;try{selectedNodes=document.querySelectorAll(rule.selectorText);}catch(e){} if(!selectedNodes||!inNodeList(selectedNodes,element)){continue;} var cssTop=rule.style.getPropertyValue('top');var cssBottom=rule.style.getPropertyValue('bottom');if((cssTop&&cssTop!='auto')||(cssBottom&&cssBottom!='auto')){return true;}}} return false;};dialogPolyfill.needsCentering=function(dialog){var computedStyle=window.getComputedStyle(dialog);if(computedStyle.position!='absolute'){return false;} if((dialog.style.top!='auto'&&dialog.style.top!='')||(dialog.style.bottom!='auto'&&dialog.style.bottom!='')) return false;return!dialogPolyfill.isInlinePositionSetByStylesheet(dialog);};dialogPolyfill.forceRegisterDialog=function(element){if(element.showModal){console.warn('This browser already supports <dialog>, the polyfill '+'may not work correctly',element);} if(element.nodeName.toUpperCase()!='DIALOG'){throw new Error('Failed to register dialog: The element is not a dialog.');} new dialogPolyfillInfo((element));};dialogPolyfill.registerDialog=function(element){if(!element.showModal){dialogPolyfill.forceRegisterDialog(element);}};dialogPolyfill.DialogManager=function(){this.pendingDialogStack=[];this.overlay=document.createElement('div');this.overlay.className='_dialog_overlay';this.overlay.addEventListener('click',function(e){e.stopPropagation();});this.handleKey_=this.handleKey_.bind(this);this.handleFocus_=this.handleFocus_.bind(this);this.handleRemove_=this.handleRemove_.bind(this);this.zIndexLow_=100000;this.zIndexHigh_=100000+150;};dialogPolyfill.DialogManager.prototype.topDialogElement=function(){if(this.pendingDialogStack.length){var t=this.pendingDialogStack[this.pendingDialogStack.length-1];return t.dialog;} return null;};dialogPolyfill.DialogManager.prototype.blockDocument=function(){document.body.appendChild(this.overlay);document.body.addEventListener('focus',this.handleFocus_,true);document.addEventListener('keydown',this.handleKey_);document.addEventListener('DOMNodeRemoved',this.handleRemove_);};dialogPolyfill.DialogManager.prototype.unblockDocument=function(){document.body.removeChild(this.overlay);document.body.removeEventListener('focus',this.handleFocus_,true);document.removeEventListener('keydown',this.handleKey_);document.removeEventListener('DOMNodeRemoved',this.handleRemove_);};dialogPolyfill.DialogManager.prototype.updateStacking=function(){var zIndex=this.zIndexLow_;for(var i=0;i<this.pendingDialogStack.length;i++){if(i==this.pendingDialogStack.length-1){this.overlay.style.zIndex=zIndex++;} this.pendingDialogStack[i].updateZIndex(zIndex++,zIndex++);}};dialogPolyfill.DialogManager.prototype.handleFocus_=function(event){var candidate=findNearestDialog((event.target));if(candidate!=this.topDialogElement()){event.preventDefault();event.stopPropagation();safeBlur((event.target));return false;}};dialogPolyfill.DialogManager.prototype.handleKey_=function(event){if(event.keyCode==27){event.preventDefault();event.stopPropagation();var cancelEvent=new supportCustomEvent('cancel',{bubbles:false,cancelable:true});var dialog=this.topDialogElement();if(dialog.dispatchEvent(cancelEvent)){dialog.close();}}};dialogPolyfill.DialogManager.prototype.handleRemove_=function(event){if(event.target.nodeName.toUpperCase()!='DIALOG'){return;} var dialog=(event.target);if(!dialog.open){return;} console.info('dialog is removed',event);this.pendingDialogStack.some(function(dpi){if(dpi.dialog==dialog){dpi.maybeHideModal();return true;}});};dialogPolyfill.DialogManager.prototype.pushDialog=function(dpi){var allowed=(this.zIndexHigh_-this.zIndexLow_)/2-1;if(this.pendingDialogStack.length>=allowed){return false;} this.pendingDialogStack.push(dpi);if(this.pendingDialogStack.length==1){this.blockDocument();} this.updateStacking();return true;};dialogPolyfill.DialogManager.prototype.removeDialog=function(dpi){var index=this.pendingDialogStack.indexOf(dpi);if(index==-1){return;} this.pendingDialogStack.splice(index,1);this.updateStacking();if(this.pendingDialogStack.length==0){this.unblockDocument();}};dialogPolyfill.dm=new dialogPolyfill.DialogManager();document.addEventListener('submit',function(ev){var target=ev.target;if(!target||!target.hasAttribute('method')){return;} if(target.getAttribute('method').toLowerCase()!='dialog'){return;} ev.preventDefault();var dialog=findNearestDialog((ev.target));if(!dialog){return;} var returnValue;var cands=[document.activeElement,ev.explicitOriginalTarget];var els=['BUTTON','INPUT'];cands.some(function(cand){if(cand&&cand.form==ev.target&&els.indexOf(cand.nodeName.toUpperCase())!=-1){returnValue=cand.value;return true;}});dialog.close(returnValue);},true);dialogPolyfill['forceRegisterDialog']=dialogPolyfill.forceRegisterDialog;dialogPolyfill['registerDialog']=dialogPolyfill.registerDialog;if(typeof define==='function'&&'amd'in define){define(function(){return dialogPolyfill;});}else if(typeof module==='object'&&typeof module['exports']==='object'){module['exports']=dialogPolyfill;}else{window['dialogPolyfill']=dialogPolyfill;}})();(function(R,B){'use strict';function Da(a,b,c){if(!a)throw Ma("areq",b||"?",c||"required");return a}function Ea(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Y(a)&&(a=a.join(" "));Y(b)&&(b=b.join(" "));return a+" "+b}function Na(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function Z(a,b,c){var d="";a=Y(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,l){a&&0<a.length&&(d+=0<l?" ":"",d+=c?b+a:a+b)});return d}function Oa(a){if(a instanceof F)switch(a.length){case 0:return a;case 1:if(1===a[0].nodeType)return a;break;default:return F(ta(a))}if(1===a.nodeType)return F(a)}function ta(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1==c.nodeType)return c}}function Pa(a,b,c){s(b,function(b){a.addClass(b,c)})}function Qa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function V(a){return function(b,c){c.addClass&&(Pa(a,b,c.addClass),c.addClass=null);c.removeClass&&(Qa(a,b,c.removeClass),c.removeClass=null)}}function oa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||P;a.domOperation=function(){a.$$domOperationFired=!0;b();b=P};a.$$prepared=!0}return a}function ha(a,b){Fa(a,b);Ga(a,b)}function Fa(a,b){b.from&&(a.css(b.from),b.from=null)}function Ga(a,b){b.to&&(a.css(b.to),b.to=null)}function W(a,b,c){var d=b.options||{};c=c.options||{};var e=(d.addClass||"")+" "+(c.addClass||""),l=(d.removeClass||"")+" "+(c.removeClass||"");a=Ra(a.attr("class"),e,l);c.preparationClasses&&(d.preparationClasses=$(c.preparationClasses,d.preparationClasses),delete c.preparationClasses);e=d.domOperation!==P?d.domOperation:null;ua(d,c);e&&(d.domOperation=e);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ra(a,b,c){function d(a){G(a)&&(a=a.split(" "));var b={};s(a,function(a){a.length&&(b[a]=!0)});return b}var e={};a=d(a);b=d(b);s(b,function(a,b){e[b]=1});c=d(c);s(c,function(a,b){e[b]=1===e[b]?null:-1});var l={addClass:"",removeClass:""};s(e,function(b,c){var d,e;1===b?(d="addClass",e=!a[c]||a[c+"-remove"]):-1===b&&(d="removeClass",e=a[c]||a[c+"-add"]);e&&(l[d].length&&(l[d]+=" "),l[d]+=c)});return l}function y(a){return a instanceof F?a[0]:a}function Sa(a,b,c){var d="";b&&(d=Z(b,"ng-",!0));c.addClass&&(d=$(d,Z(c.addClass,"-add")));c.removeClass&&(d=$(d,Z(c.removeClass,"-remove")));d.length&&(c.preparationClasses=d,a.addClass(d))}function pa(a,b){var c=b?"-"+b+"s":"";la(a,[ma,c]);return[ma,c]}function va(a,b){var c=b?"paused":"",d=aa+"PlayState";la(a,[d,c]);return[d,c]}function la(a,b){a.style[b[0]]=b[1]}function $(a,b){return a?b?a+" "+b:a:b}function Ha(a,b,c){var d=Object.create(null),e=a.getComputedStyle(b)||{};s(c,function(a,b){var c=e[a];if(c){var g=c.charAt(0);if("-"===g||"+"===g||0<=g)c=Ta(c);0===c&&(c=null);d[b]=c}});return d}function Ta(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function wa(a){return 0===a||null!=a}function Ia(a,b){var c=S,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ja(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Ka(a,b,c){s(c,function(c){a[c]=xa(a[c])?a[c]:b.style.getPropertyValue(c)})}var S,ya,aa,za;void 0===R.ontransitionend&&void 0!==R.onwebkittransitionend?(S="WebkitTransition",ya="webkitTransitionEnd transitionend"):(S="transition",ya="transitionend");void 0===R.onanimationend&&void 0!==R.onwebkitanimationend?(aa="WebkitAnimation",za="webkitAnimationEnd animationend"):(aa="animation",za="animationend");var qa=aa+"Delay",Aa=aa+"Duration",ma=S+"Delay",La=S+"Duration",Ma=B.$$minErr("ng"),Ua={transitionDuration:La,transitionDelay:ma,transitionProperty:S+"Property",animationDuration:Aa,animationDelay:qa,animationIterationCount:aa+"IterationCount"},Va={transitionDuration:La,transitionDelay:ma,animationDuration:Aa,animationDelay:qa},Ba,ua,s,Y,xa,ea,Ca,ba,G,J,F,P;B.module("ngAnimate",[],function(){P=B.noop;Ba=B.copy;ua=B.extend;F=B.element;s=B.forEach;Y=B.isArray;G=B.isString;ba=B.isObject;J=B.isUndefined;xa=B.isDefined;Ca=B.isFunction;ea=B.isElement}).directive("ngAnimateSwap",["$animate","$rootScope",function(a,b){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(b,d,e,l,n){var I,g;b.$watchCollection(e.ngAnimateSwap||e["for"],function(e){I&&a.leave(I);g&&(g.$destroy(),g=null);if(e||0===e)g=b.$new(),n(g,function(b){I=b;a.enter(b,null,d)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function e(a){c.data("$$ngAnimateChildren","on"===a||"true"===a)}var l=d.ngAnimateChildren;G(l)&&0===l.length?c.data("$$ngAnimateChildren",!0):(e(a(l)(b)),d.$observe("ngAnimateChildren",e))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),n=0;n<b.length;n++)b[n]();e||a(function(){e||c()})}} var d,e;d=b.queue=[];b.waitUntilQuiet=function(b){e&&e();e=a(function(){e=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function c(a,c){if(a&&c){var d=b(c);return a.split(" ").some(function(a){return d[a]})}}function d(a,b,c,d){return l[a].some(function(a){return a(b,c,d)})}function e(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var l=this.rules={skip:[],cancel:[],join:[]};l.join.push(function(a,b,c){return!b.structural&&e(b)});l.skip.push(function(a,b,c){return!b.structural&&!e(b)});l.skip.push(function(a,b,c){return"leave"==c.event&&b.structural});l.skip.push(function(a,b,c){return c.structural&&2===c.state&&!b.structural});l.cancel.push(function(a,b,c){return c.structural&&b.structural});l.cancel.push(function(a,b,c){return 2===c.state&&b.structural});l.cancel.push(function(a,b,d){if(d.structural)return!1;a=b.addClass;b=b.removeClass;var e=d.addClass;d=d.removeClass;return J(a)&&J(b)||J(e)&&J(d)?!1:c(a,d)||c(b,e)});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(b,c,g,l,C,Wa,Q,t,H,T){function O(){var a=!1;return function(b){a?b():c.$$postDigest(function(){a=!0;b()})}}function x(a,b,c){var f=y(b),d=y(a),N=[];(a=h[c])&&s(a,function(a){w.call(a.node,f)?N.push(a.callback):"leave"===c&&w.call(a.node,d)&&N.push(a.callback)});return N}function r(a,b,c){var f=ta(b);return a.filter(function(a){return!(a.node===f&&(!c||a.callback===c))})}function p(a,h,v){function r(c,f,d,h){sa(function(){var c=x(T,a,f);c.length?b(function(){s(c,function(b){b(a,d,h)});"close"!==d||a[0].parentNode||ra.off(a)}):"close"!==d||a[0].parentNode||ra.off(a)});c.progress(f,d,h)}function k(b){var c=a,f=m;f.preparationClasses&&(c.removeClass(f.preparationClasses),f.preparationClasses=null);f.activeClasses&&(c.removeClass(f.activeClasses),f.activeClasses=null);E(a,m);ha(a,m);m.domOperation();A.complete(!b)}var m=Ba(v),p,T;if(a=Oa(a))p=y(a),T=a.parent();var m=oa(m),A=new Q,sa=O();Y(m.addClass)&&(m.addClass=m.addClass.join(" "));m.addClass&&!G(m.addClass)&&(m.addClass=null);Y(m.removeClass)&&(m.removeClass=m.removeClass.join(" "));m.removeClass&&!G(m.removeClass)&&(m.removeClass=null);m.from&&!ba(m.from)&&(m.from=null);m.to&&!ba(m.to)&&(m.to=null);if(!p)return k(),A;v=[p.className,m.addClass,m.removeClass].join(" ");if(!Xa(v))return k(),A;var g=0<=["enter","move","leave"].indexOf(h),w=l[0].hidden,t=!f||w||N.get(p);v=!t&&z.get(p)||{};var H=!!v.state;t||H&&1==v.state||(t=!M(a,T,h));if(t)return w&&r(A,h,"start"),k(),w&&r(A,h,"close"),A;g&&K(a);w={structural:g,element:a,event:h,addClass:m.addClass,removeClass:m.removeClass,close:k,options:m,runner:A};if(H){if(d("skip",a,w,v)){if(2===v.state)return k(),A;W(a,v,w);return v.runner}if(d("cancel",a,w,v))if(2===v.state)v.runner.end();else if(v.structural)v.close();else return W(a,v,w),v.runner;else if(d("join",a,w,v))if(2===v.state)W(a,w,{});else return Sa(a,g?h:null,m),h=w.event=v.event,m=W(a,v,w),v.runner}else W(a,w,{});(H=w.structural)||(H="animate"===w.event&&0<Object.keys(w.options.to||{}).length||e(w));if(!H)return k(),ka(a),A;var C=(v.counter||0)+1;w.counter=C;L(a,1,w);c.$$postDigest(function(){var b=z.get(p),c=!b,b=b||{},f=0<(a.parent()||[]).length&&("animate"===b.event||b.structural||e(b));if(c||b.counter!==C||!f){c&&(E(a,m),ha(a,m));if(c||g&&b.event!==h)m.domOperation(),A.end();f||ka(a)}else h=!b.structural&&e(b,!0)?"setClass":b.event,L(a,2),b=Wa(a,h,b.options),A.setHost(b),r(A,h,"start",{}),b.done(function(b){k(!b);(b=z.get(p))&&b.counter===C&&ka(y(a));r(A,h,"close",{})})});return A}function K(a){a=y(a).querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate")),c=z.get(a);if(c)switch(b){case 2:c.runner.end();case 1:z.remove(a)}})}function ka(a){a=y(a);a.removeAttribute("data-ng-animate");z.remove(a)}function k(a,b){return y(a)===y(b)}function M(a,b,c){c=F(l[0].body);var f=k(a,c)||"HTML"===a[0].nodeName,d=k(a,g),h=!1,r,e=N.get(y(a));(a=F.data(a[0],"$ngAnimatePin"))&&(b=a);for(b=y(b);b;){d||(d=k(b,g));if(1!==b.nodeType)break;a=z.get(b)||{};if(!h){var p=N.get(b);if(!0===p&&!1!==e){e=!0;break}else!1===p&&(e=!1);h=a.structural}if(J(r)||!0===r)a=F.data(b,"$$ngAnimateChildren"),xa(a)&&(r=a);if(h&&!1===r)break;f||(f=k(b,c));if(f&&d)break;if(!d&&(a=F.data(b,"$ngAnimatePin"))){b=y(a);continue}b=b.parentNode}return(!h||r)&&!0!==e&&d&&f}function L(a,b,c){c=c||{};c.state=b;a=y(a);a.setAttribute("data-ng-animate",b);c=(b=z.get(a))?ua(b,c):c;z.put(a,c)}var z=new C,N=new C,f=null,A=c.$watch(function(){return 0===t.totalPendingRequests},function(a){a&&(A(),c.$$postDigest(function(){c.$$postDigest(function(){null===f&&(f=!0)})}))}),h=Object.create(null),sa=a.classNameFilter(),Xa=sa?function(a){return sa.test(a)}:function(){return!0},E=V(H),w=R.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},ra={on:function(a,b,c){var f=ta(b);h[a]=h[a]||[];h[a].push({node:f,callback:c});F(b).on("$destroy",function(){z.get(f)||ra.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var f=h[a];f&&(h[a]=1===arguments.length?null:r(f,b,c))}else for(f in b=arguments[0],h)h[f]=r(h[f],b)},pin:function(a,b){Da(ea(a),"element","not an element");Da(ea(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,f){c=c||{};c.domOperation=f;return p(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!f;else if(ea(a)){var d=y(a);1===c?b=!N.get(d):N.put(d,!b)}else b=f=!!a;return b}};return ra}]}]).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(a,d,e,l,n,I){function g(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,p=d.parentNode;e.put(d,a);for(var K;p;){if(K=e.get(p)){K.processed||(K=b(K));break}p=p.parentNode}(K||c).children.push(a);return a}var c={children:[]},d,e=new n;for(d=0;d<a.length;d++){var g=a[d];e.put(g.domNode,a[d]={domNode:g.domNode,fn:g.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var e=0,k=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=e,e=0,b.push(k),k=[]);k.push(g.fn);g.children.forEach(function(a){e++;c.push(a)});a--}k.length&&b.push(k);return b}(c)}var u=[],C=V(a);return function(n,Q,t){function H(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function T(a){var b=[],c={};s(a,function(a,d){var h=y(a.element),e=0<=["enter","move"].indexOf(a.event),h=a.structural?H(h):[];if(h.length){var k=e?"to":"from";s(h,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][k]={animationID:d,element:F(a)}})}else b.push(a)});var d={},e={};s(c,function(c,k){var r=c.from,p=c.to;if(r&&p){var z=a[r.animationID],g=a[p.animationID],A=r.animationID.toString();if(!e[A]){var n=e[A]={structural:!0,beforeStart:function(){z.beforeStart();g.beforeStart()},close:function(){z.close();g.close()},classes:O(z.classes,g.classes),from:z,to:g,anchors:[]};n.classes.length?b.push(n):(b.push(z),b.push(g))}e[A].anchors.push({out:r.element,"in":p.element})}else r=r?r.animationID:p.animationID,p=r.toString(),d[p]||(d[p]=!0,b.push(a[r]))});return b}function O(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var e=a[d];if("ng-"!==e.substring(0,3))for(var r=0;r<b.length;r++)if(e===b[r]){c.push(e);break}}return c.join(" ")}function x(a){for(var c=b.length-1;0<=c;c--){var d=e.get(b[c])(a);if(d)return d}}function r(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function p(){var a=n.data("$$animationRunner");!a||"leave"===Q&&t.$$domOperationFired||a.end()}function K(b){n.off("$destroy",p);n.removeData("$$animationRunner");C(n,t);ha(n,t);t.domOperation();L&&a.removeClass(n,L);n.removeClass("ng-animate");k.complete(!b)}t=oa(t);var ka=0<=["enter","move","leave"].indexOf(Q),k=new l({end:function(){K()},cancel:function(){K(!0)}});if(!b.length)return K(),k;n.data("$$animationRunner",k);var M=Ea(n.attr("class"),Ea(t.addClass,t.removeClass)),L=t.tempClasses;L&&(M+=" "+L,t.tempClasses=null);var z;ka&&(z="ng-"+Q+"-prepare",a.addClass(n,z));u.push({element:n,classes:M,event:Q,structural:ka,options:t,beforeStart:function(){n.addClass("ng-animate");L&&a.addClass(n,L);z&&(a.removeClass(n,z),z=null)},close:K});n.on("$destroy",p);if(1<u.length)return k;d.$$postDigest(function(){var a=[];s(u,function(b){b.element.data("$$animationRunner")?a.push(b):b.close()});u.length=0;var b=T(a),c=[];s(b,function(a){c.push({domNode:y(a.from?a.from.element:a.element),fn:function(){a.beforeStart();var b,c=a.close;if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var d=x(a);d&&(b=d.start)}b?(b=b(),b.done(function(a){c(!a)}),r(a,b)):c()}})});I(g(c))});return k}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=Ja(),c=Ja();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,e,l,n,I,g,u,C){function B(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||(c.$$ngAnimateParentKey=++O))+"-"+a.getAttribute("class")+"-"+b}function Q(r,p,g,n){var k;0<b.count(g)&&(k=c.get(g),k||(p=Z(p,"-stagger"),e.addClass(r,p),k=Ha(a,r,n),k.animationDuration=Math.max(k.animationDuration,0),k.transitionDuration=Math.max(k.transitionDuration,0),e.removeClass(r,p),c.put(g,k)));return k||{}}function t(a){x.push(a);u.waitUntilQuiet(function(){b.flush();c.flush();for(var a=I(),d=0;d<x.length;d++)x[d](a);x.length=0})}function H(c,e,g){e=b.get(g);e||(e=Ha(a,c,Ua),"infinite"===e.animationIterationCount&&(e.animationIterationCount=1));b.put(g,e);c=e;g=c.animationDelay;e=c.transitionDelay;c.maxDelay=g&&e?Math.max(g,e):g||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var T=V(e),O=0,x=[];return function(a,c){function d(){k()}function u(){k(!0)}function k(b){if(!(w||F&&O)){w=!0;O=!1;f.$$skipPreparationClasses||e.removeClass(a,ga);e.removeClass(a,ea);va(h,!1);pa(h,!1);s(x,function(a){h.style[a[0]]=""});T(a,f);ha(a,f);Object.keys(A).length&&s(A,function(a,b){a?h.style.setProperty(b,a):h.style.removeProperty(b)});if(f.onDone)f.onDone();fa&&fa.length&&a.off(fa.join(" "),z);var c=a.data("$$animateCss");c&&(n.cancel(c[0].timer),a.removeData("$$animateCss"));G&&G.complete(!b)}}function M(a){q.blockTransition&&pa(h,a);q.blockKeyframeAnimation&&va(h,!!a)}function L(){G=new l({end:d,cancel:u});t(P);k();return{$$willAnimate:!1,start:function(){return G},end:d}}function z(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-W,0)>=R&&b>=m&&(F=!0,k())}function N(){function b(){if(!w){M(!1);s(x,function(a){h.style[a[0]]=a[1]});T(a,f);e.addClass(a,ea);if(q.recalculateTimingStyles){na=h.className+" "+ga;ia=B(h,na);D=H(h,na,ia);ca=D.maxDelay;J=Math.max(ca,0);m=D.maxDuration;if(0===m){k();return}q.hasTransitions=0<D.transitionDuration;q.hasAnimations=0<D.animationDuration}q.applyAnimationDelay&&(ca="boolean"!==typeof f.delay&&wa(f.delay)?parseFloat(f.delay):ca,J=Math.max(ca,0),D.animationDelay=ca,da=[qa,ca+"s"],x.push(da),h.style[da[0]]=da[1]);R=1E3*J;V=1E3*m;if(f.easing){var d,g=f.easing;q.hasTransitions&&(d=S+"TimingFunction",x.push([d,g]),h.style[d]=g);q.hasAnimations&&(d=aa+"TimingFunction",x.push([d,g]),h.style[d]=g)}D.transitionDuration&&fa.push(ya);D.animationDuration&&fa.push(za);W=Date.now();var p=R+1.5*V;d=W+p;var g=a.data("$$animateCss")||[],N=!0;if(g.length){var l=g[0];(N=d>l.expectedEndTime)?n.cancel(l.timer):g.push(k)}N&&(p=n(c,p,!1),g[0]={timer:p,expectedEndTime:d},g.push(k),a.data("$$animateCss",g));if(fa.length)a.on(fa.join(" "),z);f.to&&(f.cleanupStyles&&Ka(A,h,Object.keys(f.to)),Ga(a,f))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;d<b.length;d++)b[d]();a.removeData("$$animateCss")}}if(!w)if(h.parentNode){var d=function(a){if(F)O&&a&&(O=!1,k());else if(O=!a,D.animationDuration)if(a=va(h,O),O)x.push(a);else{var b=x,c=b.indexOf(a);0<=a&&b.splice(c,1)}},g=0<ba&&(D.transitionDuration&&0===X.transitionDuration||D.animationDuration&&0===X.animationDuration)&&Math.max(X.animationDelay,X.transitionDelay);g?n(b,Math.floor(g*ba*1E3),!1):b();v.resume=function(){d(!0)};v.pause=function(){d(!1)}}else k()}var f=c||{};f.$$prepared||(f=oa(Ba(f)));var A={},h=y(a);if(!h||!h.parentNode||!C.enabled())return L();var x=[],I=a.attr("class"),E=Na(f),w,O,F,G,v,J,R,m,V,W,fa=[];if(0===f.duration||!g.animations&&!g.transitions)return L();var ja=f.event&&Y(f.event)?f.event.join(" "):f.event,$="",U="";ja&&f.structural?$=Z(ja,"ng-",!0):ja&&($=ja);f.addClass&&(U+=Z(f.addClass,"-add"));f.removeClass&&(U.length&&(U+=" "),U+=Z(f.removeClass,"-remove"));f.applyClassesEarly&&U.length&&T(a,f);var ga=[$,U].join(" ").trim(),na=I+" "+ga,ea=Z(ga,"-active"),I=E.to&&0<Object.keys(E.to).length;if(!(0<(f.keyframeStyle||"").length||I||ga))return L();var ia,X;0<f.stagger?(E=parseFloat(f.stagger),X={transitionDelay:E,animationDelay:E,transitionDuration:0,animationDuration:0}):(ia=B(h,na),X=Q(h,ga,ia,Va));f.$$skipPreparationClasses||e.addClass(a,ga);f.transitionStyle&&(E=[S,f.transitionStyle],la(h,E),x.push(E));0<=f.duration&&(E=0<h.style[S].length,E=Ia(f.duration,E),la(h,E),x.push(E));f.keyframeStyle&&(E=[aa,f.keyframeStyle],la(h,E),x.push(E));var ba=X?0<=f.staggerIndex?f.staggerIndex:b.count(ia):0;(ja=0===ba)&&!f.skipBlocking&&pa(h,9999);var D=H(h,na,ia),ca=D.maxDelay;J=Math.max(ca,0);m=D.maxDuration;var q={};q.hasTransitions=0<D.transitionDuration;q.hasAnimations=0<D.animationDuration;q.hasTransitionAll=q.hasTransitions&&"all"==D.transitionProperty;q.applyTransitionDuration=I&&(q.hasTransitions&&!q.hasTransitionAll||q.hasAnimations&&!q.hasTransitions);q.applyAnimationDuration=f.duration&&q.hasAnimations;q.applyTransitionDelay=wa(f.delay)&&(q.applyTransitionDuration||q.hasTransitions);q.applyAnimationDelay=wa(f.delay)&&q.hasAnimations;q.recalculateTimingStyles=0<U.length;if(q.applyTransitionDuration||q.applyAnimationDuration)m=f.duration?parseFloat(f.duration):m,q.applyTransitionDuration&&(q.hasTransitions=!0,D.transitionDuration=m,E=0<h.style[S+"Property"].length,x.push(Ia(m,E))),q.applyAnimationDuration&&(q.hasAnimations=!0,D.animationDuration=m,x.push([Aa,m+"s"]));if(0===m&&!q.recalculateTimingStyles)return L();if(null!=f.delay){var da;"boolean"!==typeof f.delay&&(da=parseFloat(f.delay),J=Math.max(da,0));q.applyTransitionDelay&&x.push([ma,da+"s"]);q.applyAnimationDelay&&x.push([qa,da+"s"])}null==f.duration&&0<D.transitionDuration&&(q.recalculateTimingStyles=q.recalculateTimingStyles||ja);R=1E3*J;V=1E3*m;f.skipBlocking||(q.blockTransition=0<D.transitionDuration,q.blockKeyframeAnimation=0<D.animationDuration&&0<X.animationDelay&&0===X.animationDuration);f.from&&(f.cleanupStyles&&Ka(A,h,Object.keys(f.from)),Fa(a,f));q.blockTransition||q.blockKeyframeAnimation?M(m):f.skipBlocking||pa(h,!1);return{$$willAnimate:!0,end:d,start:function(){if(!w)return v={end:d,cancel:u,resume:null,pause:null},G=new l(v),t(N),G}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,e,l,n,I){function g(a){return a.replace(/\bng-\S+\b/g,"")}function u(a,b){G(a)&&(a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")} function C(c,e,n){function l(a){var b={},c=y(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case"top":d+=t.scrollTop;break;case"left":d+=t.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function p(){var c=g(n.attr("class")||""),d=u(c,k),c=u(k,c),d=a(C,{to:l(n),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?d:null}function I(){C.remove();e.removeClass("ng-animate-shim");n.removeClass("ng-animate-shim")}var C=F(y(e).cloneNode(!0)),k=g(C.attr("class")||"");e.addClass("ng-animate-shim");n.addClass("ng-animate-shim");C.addClass("ng-anchor");H.append(C);var M;c=function(){var c=a(C,{addClass:"ng-anchor-out",delay:!0,from:l(e)});return c.$$willAnimate?c:null}();if(!c&&(M=p(),!M))return I();var L=c||M;return{start:function(){function a(){c&&c.end()}var b,c=L.start();c.done(function(){c=null;if(!M&&(M=p()))return c=M.start(),c.done(function(){c=null;I();b.complete()}),c;I();b.complete()});return b=new d({end:a,cancel:a})}}}function B(a,b,c,e){var g=Q(a,P),n=Q(b,P),l=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&l.push(a)});if(g||n||0!==l.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];g&&b.push(g.start());n&&b.push(n.start());s(l,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function Q(c){var d=c.element,e=c.options||{};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=e.domOperation));e.preparationClasses&&(e.event=$(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!l.animations&&!l.transitions)return P;var t=I[0].body;c=y(e);var H=F(c.parentNode&&11===c.parentNode.nodeType||t.contains(c)?c:t);V(n);return function(a){return a.from&&a.to?B(a.from,a.to,a.classes,a.anchors):Q(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function e(c){c=Y(c)?c:c.split(" ");for(var d=[],e={},l=0;l<c.length;l++){var s=c[l],B=a.$$registeredAnimations[s];B&&!e[s]&&(d.push(b.get(B)),e[s]=!0)}return d}var l=V(d);return function(a,b,d,u){function C(){u.domOperation();l(a,u)}function B(a,b,d,e,f){switch(d){case"animate":b=[b,e.from,e.to,f];break;case"setClass":b=[b,F,G,f];break;case"addClass":b=[b,F,f];break;case"removeClass":b=[b,G,f];break;default:b=[b,f]}b.push(e);if(a=a.apply(a,b))if(Ca(a.start)&&(a=a.start()),a instanceof c)a.done(f);else if(Ca(a))return a;return P} function y(a,b,d,e,f){var g=[];s(e,function(e){var k=e[f];k&&g.push(function(){var e,f,g=!1,h=function(a){g||(g=!0,(f||P)(a),e.complete(!a))};e=new c({end:function(){h()},cancel:function(){h(!0)}});f=B(k,a,b,d,function(a){h(!1===a)});return e})});return g}function t(a,b,d,e,f){var g=y(a,b,d,e,f);if(0===g.length){var h,k;"beforeSetClass"===f?(h=y(a,"removeClass",d,e,"beforeRemoveClass"),k=y(a,"addClass",d,e,"beforeAddClass")):"setClass"===f&&(h=y(a,"removeClass",d,e,"removeClass"),k=y(a,"addClass",d,e,"addClass"));h&&(g=g.concat(h));k&&(g=g.concat(k))}if(0!==g.length)return function(a){var b=[];g.length&&s(g,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var H=!1;3===arguments.length&&ba(d)&&(u=d,d=null);u=oa(u);d||(d=a.attr("class")||"",u.addClass&&(d+=" "+u.addClass),u.removeClass&&(d+=" "+u.removeClass));var F=u.addClass,G=u.removeClass,x=e(d),r,p;if(x.length){var K,J;"leave"==b?(J="leave",K="afterLeave"):(J="before"+b.charAt(0).toUpperCase()+ b.substr(1),K=b);"enter"!==b&&"move"!==b&&(r=t(a,b,u,x,J));p=t(a,b,u,x,K)}if(r||p){var k;return{$$willAnimate:!0,end:function(){k?k.end():(H=!0,C(),ha(a,u),k=new c,k.complete(!0));return k},start:function(){function b(c){H=!0;C();ha(a,u);k.complete(c)}if(k)return k;k=new c;var d,e=[];r&&e.push(function(a){d=r(a)});e.length?e.push(function(a){C();a(!0)}):C();p&&e.push(function(a){d=p(a)});k.setHost({end:function(){H||((d||P)(void 0),b(void 0))},cancel:function(){H||((d||P)(!0),b(!0))}});c.chain(e,b);return k}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),n=d(a.to);if(b||n)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());n&&d.push(n.start());c.all(d,function(a){e.complete(a)});var e=new c({end:a(),cancel:a()});return e}}}else return d(a)}}]}])})(window,window.angular);(function(t,p){'use strict';var b="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),l=function(a,c){if(-1!==c.indexOf(a[0].nodeName))return!0};p.module("ngAria",["ng"]).provider("$aria",function(){function a(a,b,m,h){return function(d,f,e){var q=e.$normalize(b);!c[q]||l(f,m)||e[q]||d.$watch(e[a],function(a){a=h?!a:!!a;f.attr(b,a)})}}var c={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};this.config=function(a){c=p.extend(c,a)};this.$get=function(){return{config:function(a){return c[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(a){return a.$$watchExpr("ngValue","aria-checked",b,!1)}]).directive("ngChecked",["$aria",function(a){return a.$$watchExpr("ngChecked","aria-checked",b,!1)}]).directive("ngReadonly",["$aria",function(a){return a.$$watchExpr("ngReadonly","aria-readonly",b,!1)}]).directive("ngRequired",["$aria",function(a){return a.$$watchExpr("ngRequired","aria-required",b,!1)}]).directive("ngModel",["$aria",function(a){function c(c,h,d,f){return a.config(h)&&!d.attr(c)&&(f||!l(d,b))}function g(a,c){return!c.attr("role")&&c.attr("type")===a&&"INPUT"!==c[0].nodeName}function k(a,c){var d=a.type,f=a.role;return"checkbox"===(d||f)||"menuitemcheckbox"===f?"checkbox":"radio"===(d||f)||"menuitemradio"===f?"radio":"range"===d||"progressbar"===f||"slider"===f?"range":""}return{restrict:"A",require:"ngModel",priority:200,compile:function(b,h){var d=k(h,b);return{pre:function(a,e,c,b){"checkbox"===d&&(b.$isEmpty=function(a){return!1===a})},post:function(f,e,b,n){function h(){return n.$modelValue}function k(a){e.attr("aria-checked",b.value==n.$viewValue)}function l(){e.attr("aria-checked",!n.$isEmpty(n.$viewValue))}var m=c("tabindex","tabindex",e,!1);switch(d){case"radio":case"checkbox":g(d,e)&&e.attr("role",d);c("aria-checked","ariaChecked",e,!1)&&f.$watch(h,"radio"===d?k:l);m&&e.attr("tabindex",0);break;case"range":g(d,e)&&e.attr("role","slider");if(a.config("ariaValue")){var p=!e.attr("aria-valuemin")&&(b.hasOwnProperty("min")||b.hasOwnProperty("ngMin")),r=!e.attr("aria-valuemax")&&(b.hasOwnProperty("max")||b.hasOwnProperty("ngMax")),s=!e.attr("aria-valuenow");p&&b.$observe("min",function(a){e.attr("aria-valuemin",a)});r&&b.$observe("max",function(a){e.attr("aria-valuemax",a)});s&&f.$watch(h,function(a){e.attr("aria-valuenow",a)})}m&&e.attr("tabindex",0)}!b.hasOwnProperty("ngRequired")&&n.$validators.required&&c("aria-required","ariaRequired",e,!1)&&b.$observe("required",function(){e.attr("aria-required",!!b.required)});c("aria-invalid","ariaInvalid",e,!0)&&f.$watch(function(){return n.$invalid},function(a){e.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",b,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,b,g,k){b.attr("aria-live")||b.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(a,c){return{restrict:"A",compile:function(g,k){var m=c(k.ngClick,null,!0);return function(c,d,f){if(!l(d,b)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeypress")&&!f.ngKeypress))d.on("keypress",function(a){function b(){m(c,{$event:a})}var d=a.which||a.keyCode;32!==d&&13!==d||c.$apply(b)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(c,g,k){!a.config("tabindex")||g.attr("tabindex")||l(g,b)||g.attr("tabindex",0)}}])})(window,window.angular);"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return R(new(R(function(){},{prototype:a})),b)}function e(a){return Q(arguments,function(b){b!==a&&Q(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return Q(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return Q(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return Q(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=P(a),d=c?[]:{};return Q(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=P(a)?[]:{};return Q(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=R(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.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:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return L(d)?d:!0}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return b?(N(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,c.$$resolveAs=d.resolveAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K<z.length;K++,F=z[K])G=H[K]=d(G),J=v(F,c,F===b,J,G,f);var M=y.transition=J.then(function(){var d,e,g;if(y.transition!==M)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=H[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return y.transition!==M?A:(y.$current=b,y.current=b.self,y.params=c,S(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)}).then(null,function(d){return y.transition!==M?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return M},y.is=function(a,b,d){d=R({relative:y.$current},d||{});var e=m(a,d.relative);return L(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=R({relative:y.$current},d||{}),N(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return L(e)?L(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=R({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!L(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new U.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(L(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(N(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new U.ParamSet;return Q(a.params||{},function(a,c){b[c]||(b[c]=new U.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?R(a.parent.params.$$new(),b):new U.ParamSet},views:function(a){var b={};return Q(L(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),c.resolveAs=c.resolveAs||a.resolveAs||"$resolve",b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?R({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=R(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e,f){function g(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function h(a,c){var d=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(k)return{enter:function(a,c,d){b.version.minor>2?k.enter(a,null,c).then(d):k.enter(a,null,c,d)},leave:function(a,c){b.version.minor>2?k.leave(a).then(c):k.leave(a,c)}};if(j){var e=j&&j(c,a);return{enter:function(a,b,c){e.enter(a,null,b),c()},leave:function(a,b){e.leave(a),b()}}}return d()}var i=g(),j=i("$animator"),k=i("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,g,i){return function(c,g,j){function k(){if(m&&(m.remove(),m=null),o&&(o.$destroy(),o=null),n){var a=n.data("$uiViewAnim");s.leave(n,function(){a.$$animLeave.resolve(),m=null}),m=n,n=null}}function l(h){var l,m=A(c,j,g,e),t=m&&a.$current&&a.$current.locals[m];if(h||t!==p){l=c.$new(),p=a.$current.locals[m],l.$emit("$viewContentLoading",m);var u=i(l,function(a){var e=f.defer(),h=f.defer(),i={$animEnter:e.promise,$animLeave:h.promise,$$animLeave:h};a.data("$uiViewAnim",i),s.enter(a,g,function(){e.resolve(),o&&o.$emit("$viewContentAnimationEnded"),(b.isDefined(r)&&!r||c.$eval(r))&&d(a)}),k()});n=u,o=l,o.$emit("$viewContentLoaded",m),o.$eval(q)}}var m,n,o,p,q=j.onload||"",r=j.autoscroll,s=h(j,c);g.inheritedData("$uiView");c.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function z(a,c,d,e){return{restrict:"ECA",priority:-400,compile:function(f){var g=f.html();return function(f,h,i){var j=d.$current,k=A(f,i,h,e),l=j&&j.locals[k];if(l){h.data("$uiView",{name:k,state:l.$$state}),h.html(l.$template?l.$template:g);var m=b.extend({},l);f[l.$$resolveAs]=m;var n=a(h.contents());if(l.$$controller){l.$scope=f,l.$element=h;var o=c(l.$$controller,l);l.$$controllerAs&&(f[l.$$controllerAs]=o,f[l.$$controllerAs][l.$$resolveAs]=m),M(o.$onInit)&&o.$onInit(),h.data("$ngControllerController",o),h.children().data("$ngControllerController",o)}n(f)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h,i=B(f.uiSref,a.current.name),j={state:i.state,href:null,params:null},k=D(e),l=g[1]||g[0],m=null;j.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var n=function(c){c&&(j.params=b.copy(c)),j.href=a.href(i.state,j.params,j.options),m&&m(),l&&(m=l.$$addStateInfo(i.state,j.params)),null!==j.href&&f.$set(k.attr,j.href)};i.paramExpr&&(d.$watch(i.paramExpr,function(a){a!==j.params&&n(a)},!0),j.params=b.copy(d.$eval(i.paramExpr))),n(),k.clickable&&(h=E(e,a,c,k,function(){return j}),e.bind("click",h),d.$on("$destroy",function(){e.unbind("click",h)}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){m.state=b[0],m.params=b[1],m.options=b[2],m.href=a.href(m.state,m.params,m.options),n&&n(),j&&(n=j.$$addStateInfo(m.state,m.params)),m.href&&e.$set(i.attr,m.href)}var h,i=D(d),j=f[1]||f[0],k=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],l="["+k.map(function(a){return a||"null"}).join(", ")+"]",m={state:null,params:null,options:null,href:null},n=null;c.$watch(l,g,!0),g(c.$eval(l)),i.clickable&&(h=E(d,a,b,i,function(){return m}),d.bind("click",h),c.$on("$destroy",function(){d.unbind("click",h)}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c),i={state:f||{name:b},params:c,hash:g};return p.push(i),q[g]=e,function(){var a=p.indexOf(i);-1!==a&&p.splice(a,1)}}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(r){}o=o||c(e.uiSrefActive||"",!1)(b),O(o)&&Q(o,function(c,d){if(N(c)){var e=B(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){if(!(O(o)&&p.length>0)){var c=g(a,b,o);return i(),c}},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;i>e;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},r.prototype.parameters=function(a){return L(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",v).run(["$injector",function(a){a.get("$state.runtime").autoinject&&a.get("$state")}]),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x),y.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),G.$inject=["$state","$timeout"],H.$inject=["$state","$timeout"],I.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",G).directive("uiSrefActive",I).directive("uiSrefActiveEq",I).directive("uiState",H),J.$inject=["$state"],K.$inject=["$state"],b.module("ui.router.state").filter("isState",J).filter("includedByState",K)}(window,window.angular);;(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):global.moment=factory()}(this,function(){'use strict';var hookCallback;function utils_hooks__hooks(){return hookCallback.apply(null,arguments);} function setHookCallback(callback){hookCallback=callback;} function isArray(input){return input instanceof Array||Object.prototype.toString.call(input)==='[object Array]';} function isObject(input){return input!=null&&Object.prototype.toString.call(input)==='[object Object]';} function isObjectEmpty(obj){var k;for(k in obj){return false;} return true;} function isDate(input){return input instanceof Date||Object.prototype.toString.call(input)==='[object Date]';} function map(arr,fn){var res=[],i;for(i=0;i<arr.length;++i){res.push(fn(arr[i],i));} return res;} function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b);} function extend(a,b){for(var i in b){if(hasOwnProp(b,i)){a[i]=b[i];}} if(hasOwnProp(b,'toString')){a.toString=b.toString;} if(hasOwnProp(b,'valueOf')){a.valueOf=b.valueOf;} return a;} function create_utc__createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,true).utc();} function defaultParsingFlags(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],meridiem:null};} function getParsingFlags(m){if(m._pf==null){m._pf=defaultParsingFlags();} return m._pf;} var some;if(Array.prototype.some){some=Array.prototype.some;}else{some=function(fun){var t=Object(this);var len=t.length>>>0;for(var i=0;i<len;i++){if(i in t&&fun.call(this,t[i],i,t)){return true;}} return false;};} function valid__isValid(m){if(m._isValid==null){var flags=getParsingFlags(m);var parsedParts=some.call(flags.parsedDateParts,function(i){return i!=null;});var isNowValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||(flags.meridiem&&parsedParts));if(m._strict){isNowValid=isNowValid&&flags.charsLeftOver===0&&flags.unusedTokens.length===0&&flags.bigHour===undefined;} if(Object.isFrozen==null||!Object.isFrozen(m)){m._isValid=isNowValid;} else{return isNowValid;}} return m._isValid;} function valid__createInvalid(flags){var m=create_utc__createUTC(NaN);if(flags!=null){extend(getParsingFlags(m),flags);} else{getParsingFlags(m).userInvalidated=true;} return m;} function isUndefined(input){return input===void 0;} var momentProperties=utils_hooks__hooks.momentProperties=[];function copyConfig(to,from){var i,prop,val;if(!isUndefined(from._isAMomentObject)){to._isAMomentObject=from._isAMomentObject;} if(!isUndefined(from._i)){to._i=from._i;} if(!isUndefined(from._f)){to._f=from._f;} if(!isUndefined(from._l)){to._l=from._l;} if(!isUndefined(from._strict)){to._strict=from._strict;} if(!isUndefined(from._tzm)){to._tzm=from._tzm;} if(!isUndefined(from._isUTC)){to._isUTC=from._isUTC;} if(!isUndefined(from._offset)){to._offset=from._offset;} if(!isUndefined(from._pf)){to._pf=getParsingFlags(from);} if(!isUndefined(from._locale)){to._locale=from._locale;} if(momentProperties.length>0){for(i in momentProperties){prop=momentProperties[i];val=from[prop];if(!isUndefined(val)){to[prop]=val;}}} return to;} var updateInProgress=false;function Moment(config){copyConfig(this,config);this._d=new Date(config._d!=null?config._d.getTime():NaN);if(updateInProgress===false){updateInProgress=true;utils_hooks__hooks.updateOffset(this);updateInProgress=false;}} function isMoment(obj){return obj instanceof Moment||(obj!=null&&obj._isAMomentObject!=null);} function absFloor(number){if(number<0){return Math.ceil(number)||0;}else{return Math.floor(number);}} function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;if(coercedNumber!==0&&isFinite(coercedNumber)){value=absFloor(coercedNumber);} return value;} function compareArrays(array1,array2,dontConvert){var len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0,i;for(i=0;i<len;i++){if((dontConvert&&array1[i]!==array2[i])||(!dontConvert&&toInt(array1[i])!==toInt(array2[i]))){diffs++;}} return diffs+lengthDiff;} function warn(msg){if(utils_hooks__hooks.suppressDeprecationWarnings===false&&(typeof console!=='undefined')&&console.warn){console.warn('Deprecation warning: '+msg);}} function deprecate(msg,fn){var firstTime=true;return extend(function(){if(utils_hooks__hooks.deprecationHandler!=null){utils_hooks__hooks.deprecationHandler(null,msg);} if(firstTime){var args=[];var arg;for(var i=0;i<arguments.length;i++){arg='';if(typeof arguments[i]==='object'){arg+='\n['+i+'] ';for(var key in arguments[0]){arg+=key+': '+arguments[0][key]+', ';} arg=arg.slice(0,-2);}else{arg=arguments[i];} args.push(arg);} warn(msg+'\nArguments: '+Array.prototype.slice.call(args).join('')+'\n'+(new Error()).stack);firstTime=false;} return fn.apply(this,arguments);},fn);} var deprecations={};function deprecateSimple(name,msg){if(utils_hooks__hooks.deprecationHandler!=null){utils_hooks__hooks.deprecationHandler(name,msg);} if(!deprecations[name]){warn(msg);deprecations[name]=true;}} utils_hooks__hooks.suppressDeprecationWarnings=false;utils_hooks__hooks.deprecationHandler=null;function isFunction(input){return input instanceof Function||Object.prototype.toString.call(input)==='[object Function]';} function locale_set__set(config){var prop,i;for(i in config){prop=config[i];if(isFunction(prop)){this[i]=prop;}else{this['_'+i]=prop;}} this._config=config;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+'|'+(/\d{1,2}/).source);} function mergeConfigs(parentConfig,childConfig){var res=extend({},parentConfig),prop;for(prop in childConfig){if(hasOwnProp(childConfig,prop)){if(isObject(parentConfig[prop])&&isObject(childConfig[prop])){res[prop]={};extend(res[prop],parentConfig[prop]);extend(res[prop],childConfig[prop]);}else if(childConfig[prop]!=null){res[prop]=childConfig[prop];}else{delete res[prop];}}} for(prop in parentConfig){if(hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject(parentConfig[prop])){res[prop]=extend({},res[prop]);}} return res;} function Locale(config){if(config!=null){this.set(config);}} var keys;if(Object.keys){keys=Object.keys;}else{keys=function(obj){var i,res=[];for(i in obj){if(hasOwnProp(obj,i)){res.push(i);}} return res;};} var defaultCalendar={sameDay:'[Today at] LT',nextDay:'[Tomorrow at] LT',nextWeek:'dddd [at] LT',lastDay:'[Yesterday at] LT',lastWeek:'[Last] dddd [at] LT',sameElse:'L'};function locale_calendar__calendar(key,mom,now){var output=this._calendar[key]||this._calendar['sameElse'];return isFunction(output)?output.call(mom,now):output;} var defaultLongDateFormat={LTS:'h:mm:ss A',LT:'h:mm A',L:'MM/DD/YYYY',LL:'MMMM D, YYYY',LLL:'MMMM D, YYYY h:mm A',LLLL:'dddd, MMMM D, YYYY h:mm A'};function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];if(format||!formatUpper){return format;} this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1);});return this._longDateFormat[key];} var defaultInvalidDate='Invalid date';function invalidDate(){return this._invalidDate;} var defaultOrdinal='%d';var defaultOrdinalParse=/\d{1,2}/;function ordinal(number){return this._ordinal.replace('%d',number);} var defaultRelativeTime={future:'in %s',past:'%s ago',s:'a few seconds',m:'a minute',mm:'%d minutes',h:'an hour',hh:'%d hours',d:'a day',dd:'%d days',M:'a month',MM:'%d months',y:'a year',yy:'%d years'};function relative__relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return(isFunction(output))?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number);} function pastFuture(diff,output){var format=this._relativeTime[diff>0?'future':'past'];return isFunction(format)?format(output):format.replace(/%s/i,output);} var aliases={};function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+'s']=aliases[shorthand]=unit;} function normalizeUnits(units){return typeof units==='string'?aliases[units]||aliases[units.toLowerCase()]:undefined;} function normalizeObjectUnits(inputObject){var normalizedInput={},normalizedProp,prop;for(prop in inputObject){if(hasOwnProp(inputObject,prop)){normalizedProp=normalizeUnits(prop);if(normalizedProp){normalizedInput[normalizedProp]=inputObject[prop];}}} return normalizedInput;} var priorities={};function addUnitPriority(unit,priority){priorities[unit]=priority;} function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj){units.push({unit:u,priority:priorities[u]});} units.sort(function(a,b){return a.priority-b.priority;});return units;} function makeGetSet(unit,keepTime){return function(value){if(value!=null){get_set__set(this,unit,value);utils_hooks__hooks.updateOffset(this,keepTime);return this;}else{return get_set__get(this,unit);}};} function get_set__get(mom,unit){return mom.isValid()?mom._d['get'+(mom._isUTC?'UTC':'')+unit]():NaN;} function get_set__set(mom,unit,value){if(mom.isValid()){mom._d['set'+(mom._isUTC?'UTC':'')+unit](value);}} function stringGet(units){units=normalizeUnits(units);if(isFunction(this[units])){return this[units]();} return this;} function stringSet(units,value){if(typeof units==='object'){units=normalizeObjectUnits(units);var prioritized=getPrioritizedUnits(units);for(var i=0;i<prioritized.length;i++){this[prioritized[i].unit](units[prioritized[i].unit]);}}else{units=normalizeUnits(units);if(isFunction(this[units])){return this[units](value);}} return this;} function zeroFill(number,targetLength,forceSign){var absNumber=''+Math.abs(number),zerosToFill=targetLength-absNumber.length,sign=number>=0;return(sign?(forceSign?'+':''):'-')+ Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber;} var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;var localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;var formatFunctions={};var formatTokenFunctions={};function addFormatToken(token,padded,ordinal,callback){var func=callback;if(typeof callback==='string'){func=function(){return this[callback]();};} if(token){formatTokenFunctions[token]=func;} if(padded){formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2]);};} if(ordinal){formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token);};}} function removeFormattingTokens(input){if(input.match(/\[[\s\S]/)){return input.replace(/^\[|\]$/g,'');} return input.replace(/\\/g,'');} function makeFormatFunction(format){var array=format.match(formattingTokens),i,length;for(i=0,length=array.length;i<length;i++){if(formatTokenFunctions[array[i]]){array[i]=formatTokenFunctions[array[i]];}else{array[i]=removeFormattingTokens(array[i]);}} return function(mom){var output='',i;for(i=0;i<length;i++){output+=array[i]instanceof Function?array[i].call(mom,format):array[i];} return output;};} function formatMoment(m,format){if(!m.isValid()){return m.localeData().invalidDate();} format=expandFormat(format,m.localeData());formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format);return formatFunctions[format](m);} function expandFormat(format,locale){var i=5;function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input;} localFormattingTokens.lastIndex=0;while(i>=0&&localFormattingTokens.test(format)){format=format.replace(localFormattingTokens,replaceLongDateFormatTokens);localFormattingTokens.lastIndex=0;i-=1;} return format;} var match1=/\d/;var match2=/\d\d/;var match3=/\d{3}/;var match4=/\d{4}/;var match6=/[+-]?\d{6}/;var match1to2=/\d\d?/;var match3to4=/\d\d\d\d?/;var match5to6=/\d\d\d\d\d\d?/;var match1to3=/\d{1,3}/;var match1to4=/\d{1,4}/;var match1to6=/[+-]?\d{1,6}/;var matchUnsigned=/\d+/;var matchSigned=/[+-]?\d+/;var matchOffset=/Z|[+-]\d\d:?\d\d/gi;var matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi;var matchTimestamp=/[+-]?\d+(\.\d{1,3})?/;var matchWord=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;var regexes={};function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return(isStrict&&strictRegex)?strictRegex:regex;};} function getParseRegexForToken(token,config){if(!hasOwnProp(regexes,token)){return new RegExp(unescapeFormat(token));} return regexes[token](config._strict,config._locale);} function unescapeFormat(s){return regexEscape(s.replace('\\','').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4;}));} function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&');} var tokens={};function addParseToken(token,callback){var i,func=callback;if(typeof token==='string'){token=[token];} if(typeof callback==='number'){func=function(input,array){array[callback]=toInt(input);};} for(i=0;i<token.length;i++){tokens[token[i]]=func;}} function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{};callback(input,config._w,config,token);});} function addTimeToArrayFromToken(token,input,config){if(input!=null&&hasOwnProp(tokens,token)){tokens[token](input,config._a,config,token);}} var YEAR=0;var MONTH=1;var DATE=2;var HOUR=3;var MINUTE=4;var SECOND=5;var MILLISECOND=6;var WEEK=7;var WEEKDAY=8;var indexOf;if(Array.prototype.indexOf){indexOf=Array.prototype.indexOf;}else{indexOf=function(o){var i;for(i=0;i<this.length;++i){if(this[i]===o){return i;}} return-1;};} function daysInMonth(year,month){return new Date(Date.UTC(year,month+1,0)).getUTCDate();} addFormatToken('M',['MM',2],'Mo',function(){return this.month()+1;});addFormatToken('MMM',0,0,function(format){return this.localeData().monthsShort(this,format);});addFormatToken('MMMM',0,0,function(format){return this.localeData().months(this,format);});addUnitAlias('month','M');addUnitPriority('month',8);addRegexToken('M',match1to2);addRegexToken('MM',match1to2,match2);addRegexToken('MMM',function(isStrict,locale){return locale.monthsShortRegex(isStrict);});addRegexToken('MMMM',function(isStrict,locale){return locale.monthsRegex(isStrict);});addParseToken(['M','MM'],function(input,array){array[MONTH]=toInt(input)-1;});addParseToken(['MMM','MMMM'],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);if(month!=null){array[MONTH]=month;}else{getParsingFlags(config).invalidMonth=input;}});var MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;var defaultLocaleMonths='January_February_March_April_May_June_July_August_September_October_November_December'.split('_');function localeMonths(m,format){if(!m){return this._months;} return isArray(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format)?'format':'standalone'][m.month()];} var defaultLocaleMonthsShort='Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');function localeMonthsShort(m,format){if(!m){return this._monthsShort;} return isArray(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format)?'format':'standalone'][m.month()];} function units_month__handleStrictParse(monthName,format,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(i=0;i<12;++i){mom=create_utc__createUTC([2000,i]);this._shortMonthsParse[i]=this.monthsShort(mom,'').toLocaleLowerCase();this._longMonthsParse[i]=this.months(mom,'').toLocaleLowerCase();}} if(strict){if(format==='MMM'){ii=indexOf.call(this._shortMonthsParse,llc);return ii!==-1?ii:null;}else{ii=indexOf.call(this._longMonthsParse,llc);return ii!==-1?ii:null;}}else{if(format==='MMM'){ii=indexOf.call(this._shortMonthsParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._longMonthsParse,llc);return ii!==-1?ii:null;}else{ii=indexOf.call(this._longMonthsParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._shortMonthsParse,llc);return ii!==-1?ii:null;}}} function localeMonthsParse(monthName,format,strict){var i,mom,regex;if(this._monthsParseExact){return units_month__handleStrictParse.call(this,monthName,format,strict);} if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];} for(i=0;i<12;i++){mom=create_utc__createUTC([2000,i]);if(strict&&!this._longMonthsParse[i]){this._longMonthsParse[i]=new RegExp('^'+this.months(mom,'').replace('.','')+'$','i');this._shortMonthsParse[i]=new RegExp('^'+this.monthsShort(mom,'').replace('.','')+'$','i');} if(!strict&&!this._monthsParse[i]){regex='^'+this.months(mom,'')+'|^'+this.monthsShort(mom,'');this._monthsParse[i]=new RegExp(regex.replace('.',''),'i');} if(strict&&format==='MMMM'&&this._longMonthsParse[i].test(monthName)){return i;}else if(strict&&format==='MMM'&&this._shortMonthsParse[i].test(monthName)){return i;}else if(!strict&&this._monthsParse[i].test(monthName)){return i;}}} function setMonth(mom,value){var dayOfMonth;if(!mom.isValid()){return mom;} if(typeof value==='string'){if(/^\d+$/.test(value)){value=toInt(value);}else{value=mom.localeData().monthsParse(value);if(typeof value!=='number'){return mom;}}} dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value));mom._d['set'+(mom._isUTC?'UTC':'')+'Month'](value,dayOfMonth);return mom;} function getSetMonth(value){if(value!=null){setMonth(this,value);utils_hooks__hooks.updateOffset(this,true);return this;}else{return get_set__get(this,'Month');}} function getDaysInMonth(){return daysInMonth(this.year(),this.month());} var defaultMonthsShortRegex=matchWord;function monthsShortRegex(isStrict){if(this._monthsParseExact){if(!hasOwnProp(this,'_monthsRegex')){computeMonthsParse.call(this);} if(isStrict){return this._monthsShortStrictRegex;}else{return this._monthsShortRegex;}}else{if(!hasOwnProp(this,'_monthsShortRegex')){this._monthsShortRegex=defaultMonthsShortRegex;} return this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex;}} var defaultMonthsRegex=matchWord;function monthsRegex(isStrict){if(this._monthsParseExact){if(!hasOwnProp(this,'_monthsRegex')){computeMonthsParse.call(this);} if(isStrict){return this._monthsStrictRegex;}else{return this._monthsRegex;}}else{if(!hasOwnProp(this,'_monthsRegex')){this._monthsRegex=defaultMonthsRegex;} return this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex;}} function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length;} var shortPieces=[],longPieces=[],mixedPieces=[],i,mom;for(i=0;i<12;i++){mom=create_utc__createUTC([2000,i]);shortPieces.push(this.monthsShort(mom,''));longPieces.push(this.months(mom,''));mixedPieces.push(this.months(mom,''));mixedPieces.push(this.monthsShort(mom,''));} shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<12;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i]);} for(i=0;i<24;i++){mixedPieces[i]=regexEscape(mixedPieces[i]);} this._monthsRegex=new RegExp('^('+mixedPieces.join('|')+')','i');this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp('^('+longPieces.join('|')+')','i');this._monthsShortStrictRegex=new RegExp('^('+shortPieces.join('|')+')','i');} addFormatToken('Y',0,0,function(){var y=this.year();return y<=9999?''+y:'+'+y;});addFormatToken(0,['YY',2],0,function(){return this.year()%100;});addFormatToken(0,['YYYY',4],0,'year');addFormatToken(0,['YYYYY',5],0,'year');addFormatToken(0,['YYYYYY',6,true],0,'year');addUnitAlias('year','y');addUnitPriority('year',1);addRegexToken('Y',matchSigned);addRegexToken('YY',match1to2,match2);addRegexToken('YYYY',match1to4,match4);addRegexToken('YYYYY',match1to6,match6);addRegexToken('YYYYYY',match1to6,match6);addParseToken(['YYYYY','YYYYYY'],YEAR);addParseToken('YYYY',function(input,array){array[YEAR]=input.length===2?utils_hooks__hooks.parseTwoDigitYear(input):toInt(input);});addParseToken('YY',function(input,array){array[YEAR]=utils_hooks__hooks.parseTwoDigitYear(input);});addParseToken('Y',function(input,array){array[YEAR]=parseInt(input,10);});function daysInYear(year){return isLeapYear(year)?366:365;} function isLeapYear(year){return(year%4===0&&year%100!==0)||year%400===0;} utils_hooks__hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2000);};var getSetYear=makeGetSet('FullYear',true);function getIsLeapYear(){return isLeapYear(this.year());} function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);if(y<100&&y>=0&&isFinite(date.getFullYear())){date.setFullYear(y);} return date;} function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));if(y<100&&y>=0&&isFinite(date.getUTCFullYear())){date.setUTCFullYear(y);} return date;} function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy,fwdlw=(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7;return-fwdlw+fwd-1;} function dayOfYearFromWeeks(year,week,weekday,dow,doy){var localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset,resYear,resDayOfYear;if(dayOfYear<=0){resYear=year-1;resDayOfYear=daysInYear(resYear)+dayOfYear;}else if(dayOfYear>daysInYear(year)){resYear=year+1;resDayOfYear=dayOfYear-daysInYear(year);}else{resYear=year;resDayOfYear=dayOfYear;} return{year:resYear,dayOfYear:resDayOfYear};} function weekOfYear(mom,dow,doy){var weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1,resWeek,resYear;if(week<1){resYear=mom.year()-1;resWeek=week+weeksInYear(resYear,dow,doy);}else if(week>weeksInYear(mom.year(),dow,doy)){resWeek=week-weeksInYear(mom.year(),dow,doy);resYear=mom.year()+1;}else{resYear=mom.year();resWeek=week;} return{week:resWeek,year:resYear};} function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7;} addFormatToken('w',['ww',2],'wo','week');addFormatToken('W',['WW',2],'Wo','isoWeek');addUnitAlias('week','w');addUnitAlias('isoWeek','W');addUnitPriority('week',5);addUnitPriority('isoWeek',5);addRegexToken('w',match1to2);addRegexToken('ww',match1to2,match2);addRegexToken('W',match1to2);addRegexToken('WW',match1to2,match2);addWeekParseToken(['w','ww','W','WW'],function(input,week,config,token){week[token.substr(0,1)]=toInt(input);});function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week;} var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow;} function localeFirstDayOfYear(){return this._week.doy;} function getSetWeek(input){var week=this.localeData().week(this);return input==null?week:this.add((input-week)*7,'d');} function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return input==null?week:this.add((input-week)*7,'d');} addFormatToken('d',0,'do','day');addFormatToken('dd',0,0,function(format){return this.localeData().weekdaysMin(this,format);});addFormatToken('ddd',0,0,function(format){return this.localeData().weekdaysShort(this,format);});addFormatToken('dddd',0,0,function(format){return this.localeData().weekdays(this,format);});addFormatToken('e',0,0,'weekday');addFormatToken('E',0,0,'isoWeekday');addUnitAlias('day','d');addUnitAlias('weekday','e');addUnitAlias('isoWeekday','E');addUnitPriority('day',11);addUnitPriority('weekday',11);addUnitPriority('isoWeekday',11);addRegexToken('d',match1to2);addRegexToken('e',match1to2);addRegexToken('E',match1to2);addRegexToken('dd',function(isStrict,locale){return locale.weekdaysMinRegex(isStrict);});addRegexToken('ddd',function(isStrict,locale){return locale.weekdaysShortRegex(isStrict);});addRegexToken('dddd',function(isStrict,locale){return locale.weekdaysRegex(isStrict);});addWeekParseToken(['dd','ddd','dddd'],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);if(weekday!=null){week.d=weekday;}else{getParsingFlags(config).invalidWeekday=input;}});addWeekParseToken(['d','e','E'],function(input,week,config,token){week[token]=toInt(input);});function parseWeekday(input,locale){if(typeof input!=='string'){return input;} if(!isNaN(input)){return parseInt(input,10);} input=locale.weekdaysParse(input);if(typeof input==='number'){return input;} return null;} function parseIsoWeekday(input,locale){if(typeof input==='string'){return locale.weekdaysParse(input)%7||7;} return isNaN(input)?null:input;} var defaultLocaleWeekdays='Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');function localeWeekdays(m,format){if(!m){return this._weekdays;} return isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?'format':'standalone'][m.day()];} var defaultLocaleWeekdaysShort='Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');function localeWeekdaysShort(m){return(m)?this._weekdaysShort[m.day()]:this._weekdaysShort;} var defaultLocaleWeekdaysMin='Su_Mo_Tu_We_Th_Fr_Sa'.split('_');function localeWeekdaysMin(m){return(m)?this._weekdaysMin[m.day()]:this._weekdaysMin;} function day_of_week__handleStrictParse(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(i=0;i<7;++i){mom=create_utc__createUTC([2000,1]).day(i);this._minWeekdaysParse[i]=this.weekdaysMin(mom,'').toLocaleLowerCase();this._shortWeekdaysParse[i]=this.weekdaysShort(mom,'').toLocaleLowerCase();this._weekdaysParse[i]=this.weekdays(mom,'').toLocaleLowerCase();}} if(strict){if(format==='dddd'){ii=indexOf.call(this._weekdaysParse,llc);return ii!==-1?ii:null;}else if(format==='ddd'){ii=indexOf.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null;}else{ii=indexOf.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}}else{if(format==='dddd'){ii=indexOf.call(this._weekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}else if(format==='ddd'){ii=indexOf.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._weekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}else{ii=indexOf.call(this._minWeekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._weekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null;}}} function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact){return day_of_week__handleStrictParse.call(this,weekdayName,format,strict);} if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[];} for(i=0;i<7;i++){mom=create_utc__createUTC([2000,1]).day(i);if(strict&&!this._fullWeekdaysParse[i]){this._fullWeekdaysParse[i]=new RegExp('^'+this.weekdays(mom,'').replace('.','\.?')+'$','i');this._shortWeekdaysParse[i]=new RegExp('^'+this.weekdaysShort(mom,'').replace('.','\.?')+'$','i');this._minWeekdaysParse[i]=new RegExp('^'+this.weekdaysMin(mom,'').replace('.','\.?')+'$','i');} if(!this._weekdaysParse[i]){regex='^'+this.weekdays(mom,'')+'|^'+this.weekdaysShort(mom,'')+'|^'+this.weekdaysMin(mom,'');this._weekdaysParse[i]=new RegExp(regex.replace('.',''),'i');} if(strict&&format==='dddd'&&this._fullWeekdaysParse[i].test(weekdayName)){return i;}else if(strict&&format==='ddd'&&this._shortWeekdaysParse[i].test(weekdayName)){return i;}else if(strict&&format==='dd'&&this._minWeekdaysParse[i].test(weekdayName)){return i;}else if(!strict&&this._weekdaysParse[i].test(weekdayName)){return i;}}} function getSetDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;} var day=this._isUTC?this._d.getUTCDay():this._d.getDay();if(input!=null){input=parseWeekday(input,this.localeData());return this.add(input-day,'d');}else{return day;}} function getSetLocaleDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;} var weekday=(this.day()+7-this.localeData()._week.dow)%7;return input==null?weekday:this.add(input-weekday,'d');} function getSetISODayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;} if(input!=null){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7);}else{return this.day()||7;}} var defaultWeekdaysRegex=matchWord;function weekdaysRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);} if(isStrict){return this._weekdaysStrictRegex;}else{return this._weekdaysRegex;}}else{if(!hasOwnProp(this,'_weekdaysRegex')){this._weekdaysRegex=defaultWeekdaysRegex;} return this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex;}} var defaultWeekdaysShortRegex=matchWord;function weekdaysShortRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);} if(isStrict){return this._weekdaysShortStrictRegex;}else{return this._weekdaysShortRegex;}}else{if(!hasOwnProp(this,'_weekdaysShortRegex')){this._weekdaysShortRegex=defaultWeekdaysShortRegex;} return this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;}} var defaultWeekdaysMinRegex=matchWord;function weekdaysMinRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);} if(isStrict){return this._weekdaysMinStrictRegex;}else{return this._weekdaysMinRegex;}}else{if(!hasOwnProp(this,'_weekdaysMinRegex')){this._weekdaysMinRegex=defaultWeekdaysMinRegex;} return this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;}} function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length;} var minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[],i,mom,minp,shortp,longp;for(i=0;i<7;i++){mom=create_utc__createUTC([2000,1]).day(i);minp=this.weekdaysMin(mom,'');shortp=this.weekdaysShort(mom,'');longp=this.weekdays(mom,'');minPieces.push(minp);shortPieces.push(shortp);longPieces.push(longp);mixedPieces.push(minp);mixedPieces.push(shortp);mixedPieces.push(longp);} minPieces.sort(cmpLenRev);shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<7;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i]);mixedPieces[i]=regexEscape(mixedPieces[i]);} this._weekdaysRegex=new RegExp('^('+mixedPieces.join('|')+')','i');this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp('^('+longPieces.join('|')+')','i');this._weekdaysShortStrictRegex=new RegExp('^('+shortPieces.join('|')+')','i');this._weekdaysMinStrictRegex=new RegExp('^('+minPieces.join('|')+')','i');} function hFormat(){return this.hours()%12||12;} function kFormat(){return this.hours()||24;} addFormatToken('H',['HH',2],0,'hour');addFormatToken('h',['hh',2],0,hFormat);addFormatToken('k',['kk',2],0,kFormat);addFormatToken('hmm',0,0,function(){return''+hFormat.apply(this)+zeroFill(this.minutes(),2);});addFormatToken('hmmss',0,0,function(){return''+hFormat.apply(this)+zeroFill(this.minutes(),2)+ zeroFill(this.seconds(),2);});addFormatToken('Hmm',0,0,function(){return''+this.hours()+zeroFill(this.minutes(),2);});addFormatToken('Hmmss',0,0,function(){return''+this.hours()+zeroFill(this.minutes(),2)+ zeroFill(this.seconds(),2);});function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase);});} meridiem('a',true);meridiem('A',false);addUnitAlias('hour','h');addUnitPriority('hour',13);function matchMeridiem(isStrict,locale){return locale._meridiemParse;} addRegexToken('a',matchMeridiem);addRegexToken('A',matchMeridiem);addRegexToken('H',match1to2);addRegexToken('h',match1to2);addRegexToken('HH',match1to2,match2);addRegexToken('hh',match1to2,match2);addRegexToken('hmm',match3to4);addRegexToken('hmmss',match5to6);addRegexToken('Hmm',match3to4);addRegexToken('Hmmss',match5to6);addParseToken(['H','HH'],HOUR);addParseToken(['a','A'],function(input,array,config){config._isPm=config._locale.isPM(input);config._meridiem=input;});addParseToken(['h','hh'],function(input,array,config){array[HOUR]=toInt(input);getParsingFlags(config).bigHour=true;});addParseToken('hmm',function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));getParsingFlags(config).bigHour=true;});addParseToken('hmmss',function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));getParsingFlags(config).bigHour=true;});addParseToken('Hmm',function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));});addParseToken('Hmmss',function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));});function localeIsPM(input){return((input+'').toLowerCase().charAt(0)==='p');} var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i;function localeMeridiem(hours,minutes,isLower){if(hours>11){return isLower?'pm':'PM';}else{return isLower?'am':'AM';}} var getSetHour=makeGetSet('Hours',true);var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,ordinalParse:defaultOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse};var locales={};var globalLocale;function normalizeLocale(key){return key?key.toLowerCase().replace('_','-'):key;} function chooseLocale(names){var i=0,j,next,locale,split;while(i<names.length){split=normalizeLocale(names[i]).split('-');j=split.length;next=normalizeLocale(names[i+1]);next=next?next.split('-'):null;while(j>0){locale=loadLocale(split.slice(0,j).join('-'));if(locale){return locale;} if(next&&next.length>=j&&compareArrays(split,next,true)>=j-1){break;} j--;} i++;} return null;} function loadLocale(name){var oldLocale=null;if(!locales[name]&&(typeof module!=='undefined')&&module&&module.require){try{oldLocale=globalLocale._abbr;module.require('./locale/'+name);locale_locales__getSetGlobalLocale(oldLocale);}catch(e){}} return locales[name];} function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);} else{data=defineLocale(key,values);} if(data){globalLocale=data;}} return globalLocale._abbr;} function defineLocale(name,config){if(config!==null){var parentConfig=baseConfig;config.abbr=name;if(locales[name]!=null){deprecateSimple('defineLocaleOverride','use moment.updateLocale(localeName, config) to change '+'an existing locale. moment.defineLocale(localeName, '+'config) should only be used for creating a new locale '+'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');parentConfig=locales[name]._config;}else if(config.parentLocale!=null){if(locales[config.parentLocale]!=null){parentConfig=locales[config.parentLocale]._config;}else{deprecateSimple('parentLocaleUndefined','specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/');}} locales[name]=new Locale(mergeConfigs(parentConfig,config));locale_locales__getSetGlobalLocale(name);return locales[name];}else{delete locales[name];return null;}} function updateLocale(name,config){if(config!=null){var locale,parentConfig=baseConfig;if(locales[name]!=null){parentConfig=locales[name]._config;} config=mergeConfigs(parentConfig,config);locale=new Locale(config);locale.parentLocale=locales[name];locales[name]=locale;locale_locales__getSetGlobalLocale(name);}else{if(locales[name]!=null){if(locales[name].parentLocale!=null){locales[name]=locales[name].parentLocale;}else if(locales[name]!=null){delete locales[name];}}} return locales[name];} function locale_locales__getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr){key=key._locale._abbr;} if(!key){return globalLocale;} if(!isArray(key)){locale=loadLocale(key);if(locale){return locale;} key=[key];} return chooseLocale(key);} function locale_locales__listLocales(){return keys(locales);} function checkOverflow(m){var overflow;var a=m._a;if(a&&getParsingFlags(m).overflow===-2){overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||(a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0))?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1;if(getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)){overflow=DATE;} if(getParsingFlags(m)._overflowWeeks&&overflow===-1){overflow=WEEK;} if(getParsingFlags(m)._overflowWeekday&&overflow===-1){overflow=WEEKDAY;} getParsingFlags(m).overflow=overflow;} return m;} var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;var basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;var tzRegex=/Z|[+-]\d\d(?::?\d\d)?/;var isoDates=[['YYYYYY-MM-DD',/[+-]\d{6}-\d\d-\d\d/],['YYYY-MM-DD',/\d{4}-\d\d-\d\d/],['GGGG-[W]WW-E',/\d{4}-W\d\d-\d/],['GGGG-[W]WW',/\d{4}-W\d\d/,false],['YYYY-DDD',/\d{4}-\d{3}/],['YYYY-MM',/\d{4}-\d\d/,false],['YYYYYYMMDD',/[+-]\d{10}/],['YYYYMMDD',/\d{8}/],['GGGG[W]WWE',/\d{4}W\d{3}/],['GGGG[W]WW',/\d{4}W\d{2}/,false],['YYYYDDD',/\d{7}/]];var isoTimes=[['HH:mm:ss.SSSS',/\d\d:\d\d:\d\d\.\d+/],['HH:mm:ss,SSSS',/\d\d:\d\d:\d\d,\d+/],['HH:mm:ss',/\d\d:\d\d:\d\d/],['HH:mm',/\d\d:\d\d/],['HHmmss.SSSS',/\d\d\d\d\d\d\.\d+/],['HHmmss,SSSS',/\d\d\d\d\d\d,\d+/],['HHmmss',/\d\d\d\d\d\d/],['HHmm',/\d\d\d\d/],['HH',/\d\d/]];var aspNetJsonRegex=/^\/?Date\((\-?\d+)/i;function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}} if(dateFormat==null){config._isValid=false;return;} if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||' ')+isoTimes[i][0];break;}} if(timeFormat==null){config._isValid=false;return;}} if(!allowTime&&timeFormat!=null){config._isValid=false;return;} if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}} config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}} function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(matched!==null){config._d=new Date(+matched[1]);return;} configFromISO(config);if(config._isValid===false){delete config._isValid;utils_hooks__hooks.createFromInputFallback(config);}} utils_hooks__hooks.createFromInputFallback=deprecate('value provided is not in a recognized ISO format. moment construction falls back to js Date(), '+'which is not reliable across all browsers and versions. Non ISO date formats are '+'discouraged and will be removed in an upcoming major release. Please refer to '+'http://momentjs.com/guides/#/warnings/js-date/ for more info.',function(config){config._d=new Date(config._i+(config._useUTC?' UTC':''));});function defaults(a,b,c){if(a!=null){return a;} if(b!=null){return b;} return c;} function currentDateArray(config){var nowValue=new Date(utils_hooks__hooks.now());if(config._useUTC){return[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()];} return[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()];} function configFromArray(config){var i,date,input=[],currentDate,yearToUse;if(config._d){return;} currentDate=currentDateArray(config);if(config._w&&config._a[DATE]==null&&config._a[MONTH]==null){dayOfYearFromWeekInfo(config);} if(config._dayOfYear){yearToUse=defaults(config._a[YEAR],currentDate[YEAR]);if(config._dayOfYear>daysInYear(yearToUse)){getParsingFlags(config)._overflowDayOfYear=true;} date=createUTCDate(yearToUse,0,config._dayOfYear);config._a[MONTH]=date.getUTCMonth();config._a[DATE]=date.getUTCDate();} for(i=0;i<3&&config._a[i]==null;++i){config._a[i]=input[i]=currentDate[i];} for(;i<7;i++){config._a[i]=input[i]=(config._a[i]==null)?(i===2?1:0):config._a[i];} if(config._a[HOUR]===24&&config._a[MINUTE]===0&&config._a[SECOND]===0&&config._a[MILLISECOND]===0){config._nextDay=true;config._a[HOUR]=0;} config._d=(config._useUTC?createUTCDate:createDate).apply(null,input);if(config._tzm!=null){config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm);} if(config._nextDay){config._a[HOUR]=24;}} function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;w=config._w;if(w.GG!=null||w.W!=null||w.E!=null){dow=1;doy=4;weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(local__createLocal(),1,4).year);week=defaults(w.W,1);weekday=defaults(w.E,1);if(weekday<1||weekday>7){weekdayOverflow=true;}}else{dow=config._locale._week.dow;doy=config._locale._week.doy;weekYear=defaults(w.gg,config._a[YEAR],weekOfYear(local__createLocal(),dow,doy).year);week=defaults(w.w,1);if(w.d!=null){weekday=w.d;if(weekday<0||weekday>6){weekdayOverflow=true;}}else if(w.e!=null){weekday=w.e+dow;if(w.e<0||w.e>6){weekdayOverflow=true;}}else{weekday=dow;}} if(week<1||week>weeksInYear(weekYear,dow,doy)){getParsingFlags(config)._overflowWeeks=true;}else if(weekdayOverflow!=null){getParsingFlags(config)._overflowWeekday=true;}else{temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy);config._a[YEAR]=temp.year;config._dayOfYear=temp.dayOfYear;}} utils_hooks__hooks.ISO_8601=function(){};function configFromStringAndFormat(config){if(config._f===utils_hooks__hooks.ISO_8601){configFromISO(config);return;} config._a=[];getParsingFlags(config).empty=true;var string=''+config._i,i,parsedInput,tokens,token,skipped,stringLength=string.length,totalParsedInputLength=0;tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[];for(i=0;i<tokens.length;i++){token=tokens[i];parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0];if(parsedInput){skipped=string.substr(0,string.indexOf(parsedInput));if(skipped.length>0){getParsingFlags(config).unusedInput.push(skipped);} string=string.slice(string.indexOf(parsedInput)+parsedInput.length);totalParsedInputLength+=parsedInput.length;} if(formatTokenFunctions[token]){if(parsedInput){getParsingFlags(config).empty=false;} else{getParsingFlags(config).unusedTokens.push(token);} addTimeToArrayFromToken(token,parsedInput,config);} else if(config._strict&&!parsedInput){getParsingFlags(config).unusedTokens.push(token);}} getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength;if(string.length>0){getParsingFlags(config).unusedInput.push(string);} if(config._a[HOUR]<=12&&getParsingFlags(config).bigHour===true&&config._a[HOUR]>0){getParsingFlags(config).bigHour=undefined;} getParsingFlags(config).parsedDateParts=config._a.slice(0);getParsingFlags(config).meridiem=config._meridiem;config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem);configFromArray(config);checkOverflow(config);} function meridiemFixWrap(locale,hour,meridiem){var isPm;if(meridiem==null){return hour;} if(locale.meridiemHour!=null){return locale.meridiemHour(hour,meridiem);}else if(locale.isPM!=null){isPm=locale.isPM(meridiem);if(isPm&&hour<12){hour+=12;} if(!isPm&&hour===12){hour=0;} return hour;}else{return hour;}} function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(config._f.length===0){getParsingFlags(config).invalidFormat=true;config._d=new Date(NaN);return;} for(i=0;i<config._f.length;i++){currentScore=0;tempConfig=copyConfig({},config);if(config._useUTC!=null){tempConfig._useUTC=config._useUTC;} tempConfig._f=config._f[i];configFromStringAndFormat(tempConfig);if(!valid__isValid(tempConfig)){continue;} currentScore+=getParsingFlags(tempConfig).charsLeftOver;currentScore+=getParsingFlags(tempConfig).unusedTokens.length*10;getParsingFlags(tempConfig).score=currentScore;if(scoreToBeat==null||currentScore<scoreToBeat){scoreToBeat=currentScore;bestMoment=tempConfig;}} extend(config,bestMoment||tempConfig);} function configFromObject(config){if(config._d){return;} var i=normalizeObjectUnits(config._i);config._a=map([i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10);});configFromArray(config);} function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));if(res._nextDay){res.add(1,'d');res._nextDay=undefined;} return res;} function prepareConfig(config){var input=config._i,format=config._f;config._locale=config._locale||locale_locales__getLocale(config._l);if(input===null||(format===undefined&&input==='')){return valid__createInvalid({nullInput:true});} if(typeof input==='string'){config._i=input=config._locale.preparse(input);} if(isMoment(input)){return new Moment(checkOverflow(input));}else if(isArray(format)){configFromStringAndArray(config);}else if(isDate(input)){config._d=input;}else if(format){configFromStringAndFormat(config);}else{configFromInput(config);} if(!valid__isValid(config)){config._d=null;} return config;} function configFromInput(config){var input=config._i;if(input===undefined){config._d=new Date(utils_hooks__hooks.now());}else if(isDate(input)){config._d=new Date(input.valueOf());}else if(typeof input==='string'){configFromString(config);}else if(isArray(input)){config._a=map(input.slice(0),function(obj){return parseInt(obj,10);});configFromArray(config);}else if(typeof(input)==='object'){configFromObject(config);}else if(typeof(input)==='number'){config._d=new Date(input);}else{utils_hooks__hooks.createFromInputFallback(config);}} function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};if(typeof(locale)==='boolean'){strict=locale;locale=undefined;} if((isObject(input)&&isObjectEmpty(input))||(isArray(input)&&input.length===0)){input=undefined;} c._isAMomentObject=true;c._useUTC=c._isUTC=isUTC;c._l=locale;c._i=input;c._f=format;c._strict=strict;return createFromConfig(c);} function local__createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,false);} var prototypeMin=deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',function(){var other=local__createLocal.apply(null,arguments);if(this.isValid()&&other.isValid()){return other<this?this:other;}else{return valid__createInvalid();}});var prototypeMax=deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',function(){var other=local__createLocal.apply(null,arguments);if(this.isValid()&&other.isValid()){return other>this?this:other;}else{return valid__createInvalid();}});function pickBy(fn,moments){var res,i;if(moments.length===1&&isArray(moments[0])){moments=moments[0];} if(!moments.length){return local__createLocal();} res=moments[0];for(i=1;i<moments.length;++i){if(!moments[i].isValid()||moments[i][fn](res)){res=moments[i];}} return res;} function min(){var args=[].slice.call(arguments,0);return pickBy('isBefore',args);} function max(){var args=[].slice.call(arguments,0);return pickBy('isAfter',args);} var now=function(){return Date.now?Date.now():+(new Date());};function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._milliseconds=+milliseconds+ seconds*1e3+ minutes*6e4+ hours*1000*60*60;this._days=+days+ weeks*7;this._months=+months+ quarters*3+ years*12;this._data={};this._locale=locale_locales__getLocale();this._bubble();} function isDuration(obj){return obj instanceof Duration;} function absRound(number){if(number<0){return Math.round(-1*number)*-1;}else{return Math.round(number);}} function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset();var sign='+';if(offset<0){offset=-offset;sign='-';} return sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~(offset)%60,2);});} offset('Z',':');offset('ZZ','');addRegexToken('Z',matchShortOffset);addRegexToken('ZZ',matchShortOffset);addParseToken(['Z','ZZ'],function(input,array,config){config._useUTC=true;config._tzm=offsetFromString(matchShortOffset,input);});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(matcher,string){var matches=((string||'').match(matcher)||[]);var chunk=matches[matches.length-1]||[];var parts=(chunk+'').match(chunkOffset)||['-',0,0];var minutes=+(parts[1]*60)+toInt(parts[2]);return parts[0]==='+'?minutes:-minutes;} function cloneWithOffset(input,model){var res,diff;if(model._isUTC){res=model.clone();diff=(isMoment(input)||isDate(input)?input.valueOf():local__createLocal(input).valueOf())-res.valueOf();res._d.setTime(res._d.valueOf()+diff);utils_hooks__hooks.updateOffset(res,false);return res;}else{return local__createLocal(input).local();}} function getDateOffset(m){return-Math.round(m._d.getTimezoneOffset()/15)*15;} utils_hooks__hooks.updateOffset=function(){};function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;} if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;} if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);} this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');} if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}} return this;}else{return this._isUTC?offset:getDateOffset(this);}} function getSetZone(input,keepLocalTime){if(input!=null){if(typeof input!=='string'){input=-input;} this.utcOffset(input,keepLocalTime);return this;}else{return-this.utcOffset();}} function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime);} function setOffsetToLocal(keepLocalTime){if(this._isUTC){this.utcOffset(0,keepLocalTime);this._isUTC=false;if(keepLocalTime){this.subtract(getDateOffset(this),'m');}} return this;} function setOffsetToParsedOffset(){if(this._tzm){this.utcOffset(this._tzm);}else if(typeof this._i==='string'){var tZone=offsetFromString(matchOffset,this._i);if(tZone===0){this.utcOffset(0,true);}else{this.utcOffset(offsetFromString(matchOffset,this._i));}} return this;} function hasAlignedHourOffset(input){if(!this.isValid()){return false;} input=input?local__createLocal(input).utcOffset():0;return(this.utcOffset()-input)%60===0;} function isDaylightSavingTime(){return(this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset());} function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted)){return this._isDSTShifted;} var c={};copyConfig(c,this);c=prepareConfig(c);if(c._a){var other=c._isUTC?create_utc__createUTC(c._a):local__createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0;}else{this._isDSTShifted=false;} return this._isDSTShifted;} function isLocal(){return this.isValid()?!this._isUTC:false;} function isUtcOffset(){return this.isValid()?this._isUTC:false;} function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:false;} var aspNetRegex=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;var isoRegex=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function create__createDuration(input,key){var duration=input,match=null,sign,ret,diffRes;if(isDuration(input)){duration={ms:input._milliseconds,d:input._days,M:input._months};}else if(typeof input==='number'){duration={};if(key){duration[key]=input;}else{duration.milliseconds=input;}}else if(!!(match=aspNetRegex.exec(input))){sign=(match[1]==='-')?-1:1;duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(match[MILLISECOND]*1000))*sign};}else if(!!(match=isoRegex.exec(input))){sign=(match[1]==='-')?-1:1;duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)};}else if(duration==null){duration={};}else if(typeof duration==='object'&&('from'in duration||'to'in duration)){diffRes=momentsDifference(local__createLocal(duration.from),local__createLocal(duration.to));duration={};duration.ms=diffRes.milliseconds;duration.M=diffRes.months;} ret=new Duration(duration);if(isDuration(input)&&hasOwnProp(input,'_locale')){ret._locale=input._locale;} return ret;} create__createDuration.fn=Duration.prototype;function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(',','.'));return(isNaN(res)?0:res)*sign;} function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};res.months=other.month()-base.month()+ (other.year()-base.year())*12;if(base.clone().add(res.months,'M').isAfter(other)){--res.months;} res.milliseconds=+other-+(base.clone().add(res.months,'M'));return res;} function momentsDifference(base,other){var res;if(!(base.isValid()&&other.isValid())){return{milliseconds:0,months:0};} other=cloneWithOffset(other,base);if(base.isBefore(other)){res=positiveMomentsDifference(base,other);}else{res=positiveMomentsDifference(other,base);res.milliseconds=-res.milliseconds;res.months=-res.months;} return res;} function createAdder(direction,name){return function(val,period){var dur,tmp;if(period!==null&&!isNaN(+period)){deprecateSimple(name,'moment().'+name+'(period, number) is deprecated. Please use moment().'+name+'(number, period). '+'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');tmp=val;val=period;period=tmp;} val=typeof val==='string'?+val:val;dur=create__createDuration(val,period);add_subtract__addSubtract(this,dur,direction);return this;};} function add_subtract__addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);if(!mom.isValid()){return;} updateOffset=updateOffset==null?true:updateOffset;if(milliseconds){mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding);} if(days){get_set__set(mom,'Date',get_set__get(mom,'Date')+days*isAdding);} if(months){setMonth(mom,get_set__get(mom,'Month')+months*isAdding);} if(updateOffset){utils_hooks__hooks.updateOffset(mom,days||months);}} var add_subtract__add=createAdder(1,'add');var add_subtract__subtract=createAdder(-1,'subtract');function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,'days',true);return diff<-6?'sameElse':diff<-1?'lastWeek':diff<0?'lastDay':diff<1?'sameDay':diff<2?'nextDay':diff<7?'nextWeek':'sameElse';} function moment_calendar__calendar(time,formats){var now=time||local__createLocal(),sod=cloneWithOffset(now,this).startOf('day'),format=utils_hooks__hooks.calendarFormat(this,sod)||'sameElse';var output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,local__createLocal(now)));} function clone(){return new Moment(this);} function isAfter(input,units){var localInput=isMoment(input)?input:local__createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false;} units=normalizeUnits(!isUndefined(units)?units:'millisecond');if(units==='millisecond'){return this.valueOf()>localInput.valueOf();}else{return localInput.valueOf()<this.clone().startOf(units).valueOf();}} function isBefore(input,units){var localInput=isMoment(input)?input:local__createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false;} units=normalizeUnits(!isUndefined(units)?units:'millisecond');if(units==='millisecond'){return this.valueOf()<localInput.valueOf();}else{return this.clone().endOf(units).valueOf()<localInput.valueOf();}} function isBetween(from,to,units,inclusivity){inclusivity=inclusivity||'()';return(inclusivity[0]==='('?this.isAfter(from,units):!this.isBefore(from,units))&&(inclusivity[1]===')'?this.isBefore(to,units):!this.isAfter(to,units));} function isSame(input,units){var localInput=isMoment(input)?input:local__createLocal(input),inputMs;if(!(this.isValid()&&localInput.isValid())){return false;} units=normalizeUnits(units||'millisecond');if(units==='millisecond'){return this.valueOf()===localInput.valueOf();}else{inputMs=localInput.valueOf();return this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf();}} function isSameOrAfter(input,units){return this.isSame(input,units)||this.isAfter(input,units);} function isSameOrBefore(input,units){return this.isSame(input,units)||this.isBefore(input,units);} function diff(input,units,asFloat){var that,zoneDelta,delta,output;if(!this.isValid()){return NaN;} that=cloneWithOffset(input,this);if(!that.isValid()){return NaN;} zoneDelta=(that.utcOffset()-this.utcOffset())*6e4;units=normalizeUnits(units);if(units==='year'||units==='month'||units==='quarter'){output=monthDiff(this,that);if(units==='quarter'){output=output/3;}else if(units==='year'){output=output/12;}}else{delta=this-that;output=units==='second'?delta/1e3:units==='minute'?delta/6e4:units==='hour'?delta/36e5:units==='day'?(delta-zoneDelta)/864e5:units==='week'?(delta-zoneDelta)/6048e5:delta;} return asFloat?output:absFloor(output);} function monthDiff(a,b){var wholeMonthDiff=((b.year()-a.year())*12)+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,'months'),anchor2,adjust;if(b-anchor<0){anchor2=a.clone().add(wholeMonthDiff-1,'months');adjust=(b-anchor)/(anchor-anchor2);}else{anchor2=a.clone().add(wholeMonthDiff+1,'months');adjust=(b-anchor)/(anchor2-anchor);} return-(wholeMonthDiff+adjust)||0;} utils_hooks__hooks.defaultFormat='YYYY-MM-DDTHH:mm:ssZ';utils_hooks__hooks.defaultFormatUtc='YYYY-MM-DDTHH:mm:ss[Z]';function toString(){return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');} function moment_format__toISOString(){var m=this.clone().utc();if(0<m.year()&&m.year()<=9999){if(isFunction(Date.prototype.toISOString)){return this.toDate().toISOString();}else{return formatMoment(m,'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');}}else{return formatMoment(m,'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');}} function format(inputString){if(!inputString){inputString=this.isUtc()?utils_hooks__hooks.defaultFormatUtc:utils_hooks__hooks.defaultFormat;} var output=formatMoment(this,inputString);return this.localeData().postformat(output);} function from(time,withoutSuffix){if(this.isValid()&&((isMoment(time)&&time.isValid())||local__createLocal(time).isValid())){return create__createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix);}else{return this.localeData().invalidDate();}} function fromNow(withoutSuffix){return this.from(local__createLocal(),withoutSuffix);} function to(time,withoutSuffix){if(this.isValid()&&((isMoment(time)&&time.isValid())||local__createLocal(time).isValid())){return create__createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix);}else{return this.localeData().invalidDate();}} function toNow(withoutSuffix){return this.to(local__createLocal(),withoutSuffix);} function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;} return this;}} var lang=deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',function(key){if(key===undefined){return this.localeData();}else{return this.locale(key);}});function localeData(){return this._locale;} function startOf(units){units=normalizeUnits(units);switch(units){case'year':this.month(0);case'quarter':case'month':this.date(1);case'week':case'isoWeek':case'day':case'date':this.hours(0);case'hour':this.minutes(0);case'minute':this.seconds(0);case'second':this.milliseconds(0);} if(units==='week'){this.weekday(0);} if(units==='isoWeek'){this.isoWeekday(1);} if(units==='quarter'){this.month(Math.floor(this.month()/3)*3);} return this;} function endOf(units){units=normalizeUnits(units);if(units===undefined||units==='millisecond'){return this;} if(units==='date'){units='day';} return this.startOf(units).add(1,(units==='isoWeek'?'week':units)).subtract(1,'ms');} function to_type__valueOf(){return this._d.valueOf()-((this._offset||0)*60000);} function unix(){return Math.floor(this.valueOf()/1000);} function toDate(){return new Date(this.valueOf());} function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()];} function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()};} function toJSON(){return this.isValid()?this.toISOString():null;} function moment_valid__isValid(){return valid__isValid(this);} function parsingFlags(){return extend({},getParsingFlags(this));} function invalidAt(){return getParsingFlags(this).overflow;} function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict};} addFormatToken(0,['gg',2],0,function(){return this.weekYear()%100;});addFormatToken(0,['GG',2],0,function(){return this.isoWeekYear()%100;});function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter);} addWeekYearFormatToken('gggg','weekYear');addWeekYearFormatToken('ggggg','weekYear');addWeekYearFormatToken('GGGG','isoWeekYear');addWeekYearFormatToken('GGGGG','isoWeekYear');addUnitAlias('weekYear','gg');addUnitAlias('isoWeekYear','GG');addUnitPriority('weekYear',1);addUnitPriority('isoWeekYear',1);addRegexToken('G',matchSigned);addRegexToken('g',matchSigned);addRegexToken('GG',match1to2,match2);addRegexToken('gg',match1to2,match2);addRegexToken('GGGG',match1to4,match4);addRegexToken('gggg',match1to4,match4);addRegexToken('GGGGG',match1to6,match6);addRegexToken('ggggg',match1to6,match6);addWeekParseToken(['gggg','ggggg','GGGG','GGGGG'],function(input,week,config,token){week[token.substr(0,2)]=toInt(input);});addWeekParseToken(['gg','GG'],function(input,week,config,token){week[token]=utils_hooks__hooks.parseTwoDigitYear(input);});function getSetWeekYear(input){return getSetWeekYearHelper.call(this,input,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy);} function getSetISOWeekYear(input){return getSetWeekYearHelper.call(this,input,this.isoWeek(),this.isoWeekday(),1,4);} function getISOWeeksInYear(){return weeksInYear(this.year(),1,4);} function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy);} function getSetWeekYearHelper(input,week,weekday,dow,doy){var weeksTarget;if(input==null){return weekOfYear(this,dow,doy).year;}else{weeksTarget=weeksInYear(input,dow,doy);if(week>weeksTarget){week=weeksTarget;} return setWeekAll.call(this,input,week,weekday,dow,doy);}} function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);this.year(date.getUTCFullYear());this.month(date.getUTCMonth());this.date(date.getUTCDate());return this;} addFormatToken('Q',0,'Qo','quarter');addUnitAlias('quarter','Q');addUnitPriority('quarter',7);addRegexToken('Q',match1);addParseToken('Q',function(input,array){array[MONTH]=(toInt(input)-1)*3;});function getSetQuarter(input){return input==null?Math.ceil((this.month()+1)/3):this.month((input-1)*3+this.month()%3);} addFormatToken('D',['DD',2],'Do','date');addUnitAlias('date','D');addUnitPriority('date',9);addRegexToken('D',match1to2);addRegexToken('DD',match1to2,match2);addRegexToken('Do',function(isStrict,locale){return isStrict?locale._ordinalParse:locale._ordinalParseLenient;});addParseToken(['D','DD'],DATE);addParseToken('Do',function(input,array){array[DATE]=toInt(input.match(match1to2)[0],10);});var getSetDayOfMonth=makeGetSet('Date',true);addFormatToken('DDD',['DDDD',3],'DDDo','dayOfYear');addUnitAlias('dayOfYear','DDD');addUnitPriority('dayOfYear',4);addRegexToken('DDD',match1to3);addRegexToken('DDDD',match3);addParseToken(['DDD','DDDD'],function(input,array,config){config._dayOfYear=toInt(input);});function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf('day')-this.clone().startOf('year'))/864e5)+1;return input==null?dayOfYear:this.add((input-dayOfYear),'d');} addFormatToken('m',['mm',2],0,'minute');addUnitAlias('minute','m');addUnitPriority('minute',14);addRegexToken('m',match1to2);addRegexToken('mm',match1to2,match2);addParseToken(['m','mm'],MINUTE);var getSetMinute=makeGetSet('Minutes',false);addFormatToken('s',['ss',2],0,'second');addUnitAlias('second','s');addUnitPriority('second',15);addRegexToken('s',match1to2);addRegexToken('ss',match1to2,match2);addParseToken(['s','ss'],SECOND);var getSetSecond=makeGetSet('Seconds',false);addFormatToken('S',0,0,function(){return~~(this.millisecond()/100);});addFormatToken(0,['SS',2],0,function(){return~~(this.millisecond()/10);});addFormatToken(0,['SSS',3],0,'millisecond');addFormatToken(0,['SSSS',4],0,function(){return this.millisecond()*10;});addFormatToken(0,['SSSSS',5],0,function(){return this.millisecond()*100;});addFormatToken(0,['SSSSSS',6],0,function(){return this.millisecond()*1000;});addFormatToken(0,['SSSSSSS',7],0,function(){return this.millisecond()*10000;});addFormatToken(0,['SSSSSSSS',8],0,function(){return this.millisecond()*100000;});addFormatToken(0,['SSSSSSSSS',9],0,function(){return this.millisecond()*1000000;});addUnitAlias('millisecond','ms');addUnitPriority('millisecond',16);addRegexToken('S',match1to3,match1);addRegexToken('SS',match1to3,match2);addRegexToken('SSS',match1to3,match3);var token;for(token='SSSS';token.length<=9;token+='S'){addRegexToken(token,matchUnsigned);} function parseMs(input,array){array[MILLISECOND]=toInt(('0.'+input)*1000);} for(token='S';token.length<=9;token+='S'){addParseToken(token,parseMs);} var getSetMillisecond=makeGetSet('Milliseconds',false);addFormatToken('z',0,0,'zoneAbbr');addFormatToken('zz',0,0,'zoneName');function getZoneAbbr(){return this._isUTC?'UTC':'';} function getZoneName(){return this._isUTC?'Coordinated Universal Time':'';} var momentPrototype__proto=Moment.prototype;momentPrototype__proto.add=add_subtract__add;momentPrototype__proto.calendar=moment_calendar__calendar;momentPrototype__proto.clone=clone;momentPrototype__proto.diff=diff;momentPrototype__proto.endOf=endOf;momentPrototype__proto.format=format;momentPrototype__proto.from=from;momentPrototype__proto.fromNow=fromNow;momentPrototype__proto.to=to;momentPrototype__proto.toNow=toNow;momentPrototype__proto.get=stringGet;momentPrototype__proto.invalidAt=invalidAt;momentPrototype__proto.isAfter=isAfter;momentPrototype__proto.isBefore=isBefore;momentPrototype__proto.isBetween=isBetween;momentPrototype__proto.isSame=isSame;momentPrototype__proto.isSameOrAfter=isSameOrAfter;momentPrototype__proto.isSameOrBefore=isSameOrBefore;momentPrototype__proto.isValid=moment_valid__isValid;momentPrototype__proto.lang=lang;momentPrototype__proto.locale=locale;momentPrototype__proto.localeData=localeData;momentPrototype__proto.max=prototypeMax;momentPrototype__proto.min=prototypeMin;momentPrototype__proto.parsingFlags=parsingFlags;momentPrototype__proto.set=stringSet;momentPrototype__proto.startOf=startOf;momentPrototype__proto.subtract=add_subtract__subtract;momentPrototype__proto.toArray=toArray;momentPrototype__proto.toObject=toObject;momentPrototype__proto.toDate=toDate;momentPrototype__proto.toISOString=moment_format__toISOString;momentPrototype__proto.toJSON=toJSON;momentPrototype__proto.toString=toString;momentPrototype__proto.unix=unix;momentPrototype__proto.valueOf=to_type__valueOf;momentPrototype__proto.creationData=creationData;momentPrototype__proto.year=getSetYear;momentPrototype__proto.isLeapYear=getIsLeapYear;momentPrototype__proto.weekYear=getSetWeekYear;momentPrototype__proto.isoWeekYear=getSetISOWeekYear;momentPrototype__proto.quarter=momentPrototype__proto.quarters=getSetQuarter;momentPrototype__proto.month=getSetMonth;momentPrototype__proto.daysInMonth=getDaysInMonth;momentPrototype__proto.week=momentPrototype__proto.weeks=getSetWeek;momentPrototype__proto.isoWeek=momentPrototype__proto.isoWeeks=getSetISOWeek;momentPrototype__proto.weeksInYear=getWeeksInYear;momentPrototype__proto.isoWeeksInYear=getISOWeeksInYear;momentPrototype__proto.date=getSetDayOfMonth;momentPrototype__proto.day=momentPrototype__proto.days=getSetDayOfWeek;momentPrototype__proto.weekday=getSetLocaleDayOfWeek;momentPrototype__proto.isoWeekday=getSetISODayOfWeek;momentPrototype__proto.dayOfYear=getSetDayOfYear;momentPrototype__proto.hour=momentPrototype__proto.hours=getSetHour;momentPrototype__proto.minute=momentPrototype__proto.minutes=getSetMinute;momentPrototype__proto.second=momentPrototype__proto.seconds=getSetSecond;momentPrototype__proto.millisecond=momentPrototype__proto.milliseconds=getSetMillisecond;momentPrototype__proto.utcOffset=getSetOffset;momentPrototype__proto.utc=setOffsetToUTC;momentPrototype__proto.local=setOffsetToLocal;momentPrototype__proto.parseZone=setOffsetToParsedOffset;momentPrototype__proto.hasAlignedHourOffset=hasAlignedHourOffset;momentPrototype__proto.isDST=isDaylightSavingTime;momentPrototype__proto.isLocal=isLocal;momentPrototype__proto.isUtcOffset=isUtcOffset;momentPrototype__proto.isUtc=isUtc;momentPrototype__proto.isUTC=isUtc;momentPrototype__proto.zoneAbbr=getZoneAbbr;momentPrototype__proto.zoneName=getZoneName;momentPrototype__proto.dates=deprecate('dates accessor is deprecated. Use date instead.',getSetDayOfMonth);momentPrototype__proto.months=deprecate('months accessor is deprecated. Use month instead',getSetMonth);momentPrototype__proto.years=deprecate('years accessor is deprecated. Use year instead',getSetYear);momentPrototype__proto.zone=deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',getSetZone);momentPrototype__proto.isDSTShifted=deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',isDaylightSavingTimeShifted);var momentPrototype=momentPrototype__proto;function moment__createUnix(input){return local__createLocal(input*1000);} function moment__createInZone(){return local__createLocal.apply(null,arguments).parseZone();} function preParsePostFormat(string){return string;} var prototype__proto=Locale.prototype;prototype__proto.calendar=locale_calendar__calendar;prototype__proto.longDateFormat=longDateFormat;prototype__proto.invalidDate=invalidDate;prototype__proto.ordinal=ordinal;prototype__proto.preparse=preParsePostFormat;prototype__proto.postformat=preParsePostFormat;prototype__proto.relativeTime=relative__relativeTime;prototype__proto.pastFuture=pastFuture;prototype__proto.set=locale_set__set;prototype__proto.months=localeMonths;prototype__proto.monthsShort=localeMonthsShort;prototype__proto.monthsParse=localeMonthsParse;prototype__proto.monthsRegex=monthsRegex;prototype__proto.monthsShortRegex=monthsShortRegex;prototype__proto.week=localeWeek;prototype__proto.firstDayOfYear=localeFirstDayOfYear;prototype__proto.firstDayOfWeek=localeFirstDayOfWeek;prototype__proto.weekdays=localeWeekdays;prototype__proto.weekdaysMin=localeWeekdaysMin;prototype__proto.weekdaysShort=localeWeekdaysShort;prototype__proto.weekdaysParse=localeWeekdaysParse;prototype__proto.weekdaysRegex=weekdaysRegex;prototype__proto.weekdaysShortRegex=weekdaysShortRegex;prototype__proto.weekdaysMinRegex=weekdaysMinRegex;prototype__proto.isPM=localeIsPM;prototype__proto.meridiem=localeMeridiem;function lists__get(format,index,field,setter){var locale=locale_locales__getLocale();var utc=create_utc__createUTC().set(setter,index);return locale[field](utc,format);} function listMonthsImpl(format,index,field){if(typeof format==='number'){index=format;format=undefined;} format=format||'';if(index!=null){return lists__get(format,index,field,'month');} var i;var out=[];for(i=0;i<12;i++){out[i]=lists__get(format,i,field,'month');} return out;} function listWeekdaysImpl(localeSorted,format,index,field){if(typeof localeSorted==='boolean'){if(typeof format==='number'){index=format;format=undefined;} format=format||'';}else{format=localeSorted;index=format;localeSorted=false;if(typeof format==='number'){index=format;format=undefined;} format=format||'';} var locale=locale_locales__getLocale(),shift=localeSorted?locale._week.dow:0;if(index!=null){return lists__get(format,(index+shift)%7,field,'day');} var i;var out=[];for(i=0;i<7;i++){out[i]=lists__get(format,(i+shift)%7,field,'day');} return out;} function lists__listMonths(format,index){return listMonthsImpl(format,index,'months');} function lists__listMonthsShort(format,index){return listMonthsImpl(format,index,'monthsShort');} function lists__listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdays');} function lists__listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdaysShort');} function lists__listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdaysMin');} locale_locales__getSetGlobalLocale('en',{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10,output=(toInt(number%100/10)===1)?'th':(b===1)?'st':(b===2)?'nd':(b===3)?'rd':'th';return number+output;}});utils_hooks__hooks.lang=deprecate('moment.lang is deprecated. Use moment.locale instead.',locale_locales__getSetGlobalLocale);utils_hooks__hooks.langData=deprecate('moment.langData is deprecated. Use moment.localeData instead.',locale_locales__getLocale);var mathAbs=Math.abs;function duration_abs__abs(){var data=this._data;this._milliseconds=mathAbs(this._milliseconds);this._days=mathAbs(this._days);this._months=mathAbs(this._months);data.milliseconds=mathAbs(data.milliseconds);data.seconds=mathAbs(data.seconds);data.minutes=mathAbs(data.minutes);data.hours=mathAbs(data.hours);data.months=mathAbs(data.months);data.years=mathAbs(data.years);return this;} function duration_add_subtract__addSubtract(duration,input,value,direction){var other=create__createDuration(input,value);duration._milliseconds+=direction*other._milliseconds;duration._days+=direction*other._days;duration._months+=direction*other._months;return duration._bubble();} function duration_add_subtract__add(input,value){return duration_add_subtract__addSubtract(this,input,value,1);} function duration_add_subtract__subtract(input,value){return duration_add_subtract__addSubtract(this,input,value,-1);} function absCeil(number){if(number<0){return Math.floor(number);}else{return Math.ceil(number);}} function bubble(){var milliseconds=this._milliseconds;var days=this._days;var months=this._months;var data=this._data;var seconds,minutes,hours,years,monthsFromDays;if(!((milliseconds>=0&&days>=0&&months>=0)||(milliseconds<=0&&days<=0&&months<=0))){milliseconds+=absCeil(monthsToDays(months)+days)*864e5;days=0;months=0;} data.milliseconds=milliseconds%1000;seconds=absFloor(milliseconds/1000);data.seconds=seconds%60;minutes=absFloor(seconds/60);data.minutes=minutes%60;hours=absFloor(minutes/60);data.hours=hours%24;days+=absFloor(hours/24);monthsFromDays=absFloor(daysToMonths(days));months+=monthsFromDays;days-=absCeil(monthsToDays(monthsFromDays));years=absFloor(months/12);months%=12;data.days=days;data.months=months;data.years=years;return this;} function daysToMonths(days){return days*4800/146097;} function monthsToDays(months){return months*146097/4800;} function as(units){var days;var months;var milliseconds=this._milliseconds;units=normalizeUnits(units);if(units==='month'||units==='year'){days=this._days+milliseconds/864e5;months=this._months+daysToMonths(days);return units==='month'?months:months/12;}else{days=this._days+Math.round(monthsToDays(this._months));switch(units){case'week':return days/7+milliseconds/6048e5;case'day':return days+milliseconds/864e5;case'hour':return days*24+milliseconds/36e5;case'minute':return days*1440+milliseconds/6e4;case'second':return days*86400+milliseconds/1000;case'millisecond':return Math.floor(days*864e5)+milliseconds;default:throw new Error('Unknown unit '+units);}}} function duration_as__valueOf(){return(this._milliseconds+ this._days*864e5+ (this._months%12)*2592e6+ toInt(this._months/12)*31536e6);} function makeAs(alias){return function(){return this.as(alias);};} var asMilliseconds=makeAs('ms');var asSeconds=makeAs('s');var asMinutes=makeAs('m');var asHours=makeAs('h');var asDays=makeAs('d');var asWeeks=makeAs('w');var asMonths=makeAs('M');var asYears=makeAs('y');function duration_get__get(units){units=normalizeUnits(units);return this[units+'s']();} function makeGetter(name){return function(){return this._data[name];};} var milliseconds=makeGetter('milliseconds');var seconds=makeGetter('seconds');var minutes=makeGetter('minutes');var hours=makeGetter('hours');var days=makeGetter('days');var months=makeGetter('months');var years=makeGetter('years');function weeks(){return absFloor(this.days()/7);} var round=Math.round;var thresholds={s:45,m:45,h:22,d:26,M:11};function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);} function duration_humanize__relativeTime(posNegDuration,withoutSuffix,locale){var duration=create__createDuration(posNegDuration).abs();var seconds=round(duration.as('s'));var minutes=round(duration.as('m'));var hours=round(duration.as('h'));var days=round(duration.as('d'));var months=round(duration.as('M'));var years=round(duration.as('y'));var a=seconds<thresholds.s&&['s',seconds]||minutes<=1&&['m']||minutes<thresholds.m&&['mm',minutes]||hours<=1&&['h']||hours<thresholds.h&&['hh',hours]||days<=1&&['d']||days<thresholds.d&&['dd',days]||months<=1&&['M']||months<thresholds.M&&['MM',months]||years<=1&&['y']||['yy',years];a[2]=withoutSuffix;a[3]=+posNegDuration>0;a[4]=locale;return substituteTimeAgo.apply(null,a);} function duration_humanize__getSetRelativeTimeRounding(roundingFunction){if(roundingFunction===undefined){return round;} if(typeof(roundingFunction)==='function'){round=roundingFunction;return true;} return false;} function duration_humanize__getSetRelativeTimeThreshold(threshold,limit){if(thresholds[threshold]===undefined){return false;} if(limit===undefined){return thresholds[threshold];} thresholds[threshold]=limit;return true;} function humanize(withSuffix){var locale=this.localeData();var output=duration_humanize__relativeTime(this,!withSuffix,locale);if(withSuffix){output=locale.pastFuture(+this,output);} return locale.postformat(output);} var iso_string__abs=Math.abs;function iso_string__toISOString(){var seconds=iso_string__abs(this._milliseconds)/1000;var days=iso_string__abs(this._days);var months=iso_string__abs(this._months);var minutes,hours,years;minutes=absFloor(seconds/60);hours=absFloor(minutes/60);seconds%=60;minutes%=60;years=absFloor(months/12);months%=12;var Y=years;var M=months;var D=days;var h=hours;var m=minutes;var s=seconds;var total=this.asSeconds();if(!total){return'P0D';} return(total<0?'-':'')+'P'+ (Y?Y+'Y':'')+ (M?M+'M':'')+ (D?D+'D':'')+ ((h||m||s)?'T':'')+ (h?h+'H':'')+ (m?m+'M':'')+ (s?s+'S':'');} var duration_prototype__proto=Duration.prototype;duration_prototype__proto.abs=duration_abs__abs;duration_prototype__proto.add=duration_add_subtract__add;duration_prototype__proto.subtract=duration_add_subtract__subtract;duration_prototype__proto.as=as;duration_prototype__proto.asMilliseconds=asMilliseconds;duration_prototype__proto.asSeconds=asSeconds;duration_prototype__proto.asMinutes=asMinutes;duration_prototype__proto.asHours=asHours;duration_prototype__proto.asDays=asDays;duration_prototype__proto.asWeeks=asWeeks;duration_prototype__proto.asMonths=asMonths;duration_prototype__proto.asYears=asYears;duration_prototype__proto.valueOf=duration_as__valueOf;duration_prototype__proto._bubble=bubble;duration_prototype__proto.get=duration_get__get;duration_prototype__proto.milliseconds=milliseconds;duration_prototype__proto.seconds=seconds;duration_prototype__proto.minutes=minutes;duration_prototype__proto.hours=hours;duration_prototype__proto.days=days;duration_prototype__proto.weeks=weeks;duration_prototype__proto.months=months;duration_prototype__proto.years=years;duration_prototype__proto.humanize=humanize;duration_prototype__proto.toISOString=iso_string__toISOString;duration_prototype__proto.toString=iso_string__toISOString;duration_prototype__proto.toJSON=iso_string__toISOString;duration_prototype__proto.locale=locale;duration_prototype__proto.localeData=localeData;duration_prototype__proto.toIsoString=deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',iso_string__toISOString);duration_prototype__proto.lang=lang;addFormatToken('X',0,0,'unix');addFormatToken('x',0,0,'valueOf');addRegexToken('x',matchSigned);addRegexToken('X',matchTimestamp);addParseToken('X',function(input,array,config){config._d=new Date(parseFloat(input,10)*1000);});addParseToken('x',function(input,array,config){config._d=new Date(toInt(input));});utils_hooks__hooks.version='2.15.0';setHookCallback(local__createLocal);utils_hooks__hooks.fn=momentPrototype;utils_hooks__hooks.min=min;utils_hooks__hooks.max=max;utils_hooks__hooks.now=now;utils_hooks__hooks.utc=create_utc__createUTC;utils_hooks__hooks.unix=moment__createUnix;utils_hooks__hooks.months=lists__listMonths;utils_hooks__hooks.isDate=isDate;utils_hooks__hooks.locale=locale_locales__getSetGlobalLocale;utils_hooks__hooks.invalid=valid__createInvalid;utils_hooks__hooks.duration=create__createDuration;utils_hooks__hooks.isMoment=isMoment;utils_hooks__hooks.weekdays=lists__listWeekdays;utils_hooks__hooks.parseZone=moment__createInZone;utils_hooks__hooks.localeData=locale_locales__getLocale;utils_hooks__hooks.isDuration=isDuration;utils_hooks__hooks.monthsShort=lists__listMonthsShort;utils_hooks__hooks.weekdaysMin=lists__listWeekdaysMin;utils_hooks__hooks.defineLocale=defineLocale;utils_hooks__hooks.updateLocale=updateLocale;utils_hooks__hooks.locales=locale_locales__listLocales;utils_hooks__hooks.weekdaysShort=lists__listWeekdaysShort;utils_hooks__hooks.normalizeUnits=normalizeUnits;utils_hooks__hooks.relativeTimeRounding=duration_humanize__getSetRelativeTimeRounding;utils_hooks__hooks.relativeTimeThreshold=duration_humanize__getSetRelativeTimeThreshold;utils_hooks__hooks.calendarFormat=getCalendarFormat;utils_hooks__hooks.prototype=momentPrototype;var _moment=utils_hooks__hooks;return _moment;}));;(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'&&typeof require==='function'?factory(require('../moment')):typeof define==='function'&&define.amd?define(['../moment'],factory):factory(global.moment)}(this,function(moment){'use strict';function processRelativeTime(number,withoutSuffix,key,isFuture){var format={'m':['eine Minute','einer Minute'],'h':['eine Stunde','einer Stunde'],'d':['ein Tag','einem Tag'],'dd':[number+' Tage',number+' Tagen'],'M':['ein Monat','einem Monat'],'MM':[number+' Monate',number+' Monaten'],'y':['ein Jahr','einem Jahr'],'yy':[number+' Jahre',number+' Jahren']};return withoutSuffix?format[key][0]:format[key][1];} var de=moment.defineLocale('de',{months:'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),monthsShort:'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),monthsParseExact:true,weekdays:'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),weekdaysShort:'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),weekdaysMin:'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),weekdaysParseExact:true,longDateFormat:{LT:'HH:mm',LTS:'HH:mm:ss',L:'DD.MM.YYYY',LL:'D. MMMM YYYY',LLL:'D. MMMM YYYY HH:mm',LLLL:'dddd, D. MMMM YYYY HH:mm'},calendar:{sameDay:'[heute um] LT [Uhr]',sameElse:'L',nextDay:'[morgen um] LT [Uhr]',nextWeek:'dddd [um] LT [Uhr]',lastDay:'[gestern um] LT [Uhr]',lastWeek:'[letzten] dddd [um] LT [Uhr]'},relativeTime:{future:'in %s',past:'vor %s',s:'ein paar Sekunden',m:processRelativeTime,mm:'%d Minuten',h:processRelativeTime,hh:'%d Stunden',d:processRelativeTime,dd:processRelativeTime,M:processRelativeTime,MM:processRelativeTime,y:processRelativeTime,yy:processRelativeTime},ordinalParse:/\d{1,2}\./,ordinal:'%d.',week:{dow:1,doy:4}});return de;}));"format amd";!function(){"use strict";function a(a){return angular.isUndefined(a)||null===a}function b(){try{return require("moment")}catch(a){throw new Error("Please install moment via npm. Please reference to: https://github.com/urish/angular-moment")}}function c(c,d){if("undefined"==typeof d){if("function"!=typeof require)throw new Error("Moment cannot be found by angular-moment! Please reference to: https://github.com/urish/angular-moment");d=b()}return c.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:null,format:null,statefulFilters:!0}).constant("moment",d).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null,fullDateThreshold:null,fullDateFormat:null}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig",function(b,d,e,f){return function(g,h,i){function j(){var a;if(p)a=p;else if(f.serverTime){var b=(new Date).getTime(),c=b-v+f.serverTime;a=d(c)}else a=d();return a}function k(){q&&(b.clearTimeout(q),q=null)}function l(a){var c=j().diff(a,"day"),d=t&&c>=t;if(d?h.text(a.format(u)):h.text(a.from(j(),r)),s&&y&&h.attr("title",a.local().format(s)),!d){var e=Math.abs(j().diff(a,"minute")),f=3600;1>e?f=1:60>e?f=30:180>e&&(f=300),q=b.setTimeout(function(){l(a)},1e3*f)}}function m(a){x&&h.attr("datetime",a)}function n(){if(k(),o){var a=e.preprocessDate(o);l(a),m(a.toISOString())}}var o,p,q=null,r=f.withoutSuffix,s=f.titleFormat,t=f.fullDateThreshold,u=f.fullDateFormat,v=(new Date).getTime(),w=i.amTimeAgo,x="TIME"===h[0].nodeName.toUpperCase(),y=!h.attr("title");g.$watch(w,function(b){return a(b)||""===b?(k(),void(o&&(h.text(""),m(""),o=null))):(o=b,void n())}),c.isDefined(i.amFrom)&&g.$watch(i.amFrom,function(b){p=a(b)||""===b?null:d(b),n()}),c.isDefined(i.amWithoutSuffix)&&g.$watch(i.amWithoutSuffix,function(a){"boolean"==typeof a?(r=a,n()):r=f.withoutSuffix}),i.$observe("amFullDateThreshold",function(a){t=a,n()}),i.$observe("amFullDateFormat",function(a){u=a,n()}),g.$on("$destroy",function(){k()}),g.$on("amMoment:localeChanged",function(){n()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(a,b,d,e){var f=null;this.changeLocale=function(d,e){var f=a.locale(d,e);return c.isDefined(d)&&b.$broadcast("amMoment:localeChanged"),f},this.changeTimezone=function(c){a.tz&&a.tz.setDefault?(a.tz.setDefault(c),b.$broadcast("amMoment:timezoneChanged")):d.warn("angular-moment: changeTimezone() works only with moment-timezone.js v0.3.0 or greater."),e.timezone=c,f=c},this.preprocessDate=function(b){return f!==e.timezone&&this.changeTimezone(e.timezone),e.preprocess?e.preprocess(b):a(!isNaN(parseFloat(b))&&isFinite(b)?parseInt(b,10):b)}}]).filter("amParse",["moment",function(a){return function(b,c){return a(b,c)}}]).filter("amFromUnix",["moment",function(a){return function(b){return a.unix(b)}}]).filter("amUtc",["moment",function(a){return function(b){return a.utc(b)}}]).filter("amUtcOffset",["amMoment",function(a){function b(b,c){return a.preprocessDate(b).utcOffset(c)}return b}]).filter("amLocal",["moment",function(a){return function(b){return a.isMoment(b)?b.local():null}}]).filter("amTimezone",["amMoment","angularMomentConfig","$log",function(a,b,c){function d(b,d){var e=a.preprocessDate(b);return d?e.tz?e.tz(d):(c.warn("angular-moment: named timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js ?"),e):e}return d}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(b,c,d){function e(b){if(a(b))return"";var d=c.preprocessDate(b);return d.isValid()?d.calendar():""}return e.$stateful=d.statefulFilters,e}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(b,c,d){function e(d,e,f,g){if(a(d))return"";var h=c.preprocessDate(d),i=a(e)?b():c.preprocessDate(e);return h.isValid()&&i.isValid()?h.diff(i,f,g):""}return e.$stateful=d.statefulFilters,e}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(b,c,d){function e(b,d){if(a(b))return"";var e=c.preprocessDate(b);return e.isValid()?e.format(d):""}return e.$stateful=d.statefulFilters,e}]).filter("amDurationFormat",["moment","angularMomentConfig",function(b,c){function d(c,d,e){return a(c)?"":b.duration(c,d).humanize(e)}return d.$stateful=c.statefulFilters,d}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(b,c,d){function e(d,e,f){var g,h;return a(d)?"":(d=c.preprocessDate(d),g=b(d),g.isValid()?(h=b(f),!a(f)&&h.isValid()?g.from(h,e):g.fromNow(e)):"")}return e.$stateful=d.statefulFilters,e}]).filter("amSubtract",["moment","angularMomentConfig",function(b,c){function d(c,d,e){return a(c)?"":b(c).subtract(parseInt(d,10),e)}return d.$stateful=c.statefulFilters,d}]).filter("amAdd",["moment","angularMomentConfig",function(b,c){function d(c,d,e){return a(c)?"":b(c).add(parseInt(d,10),e)}return d.$stateful=c.statefulFilters,d}]).filter("amStartOf",["moment","angularMomentConfig",function(b,c){function d(c,d){return a(c)?"":b(c).startOf(d)}return d.$stateful=c.statefulFilters,d}]).filter("amEndOf",["moment","angularMomentConfig",function(b,c){function d(c,d){return a(c)?"":b(c).endOf(d)}return d.$stateful=c.statefulFilters,d}])}"function"==typeof define&&define.amd?define(["angular","moment"],c):"undefined"!=typeof module&&module&&module.exports?(c(require("angular"),require("moment")),module.exports="angularMoment"):c(angular,("undefined"!=typeof global?global:window).moment)}();!function(){"use strict";function e(e,t){if(e){if(t.element_.classList.contains(t.CssClasses_.MDL_JS_RIPPLE_EFFECT)){var s=document.createElement("span");s.classList.add(t.CssClasses_.MDL_RIPPLE_CONTAINER),s.classList.add(t.CssClasses_.MDL_JS_RIPPLE_EFFECT);var i=document.createElement("span");i.classList.add(t.CssClasses_.MDL_RIPPLE),s.appendChild(i),e.appendChild(s)}e.addEventListener("click",function(s){s.preventDefault();var i=e.href.split("#")[1],n=t.element_.querySelector("#"+i);t.resetTabState_(),t.resetPanelState_(),e.classList.add(t.CssClasses_.ACTIVE_CLASS),n.classList.add(t.CssClasses_.ACTIVE_CLASS)})}}function t(e,t,s,i){function n(){var n=e.href.split("#")[1],a=i.content_.querySelector("#"+n);i.resetTabState_(t),i.resetPanelState_(s),e.classList.add(i.CssClasses_.IS_ACTIVE),a.classList.add(i.CssClasses_.IS_ACTIVE)}if(i.tabBar_.classList.contains(i.CssClasses_.JS_RIPPLE_EFFECT)){var a=document.createElement("span");a.classList.add(i.CssClasses_.RIPPLE_CONTAINER),a.classList.add(i.CssClasses_.JS_RIPPLE_EFFECT);var l=document.createElement("span");l.classList.add(i.CssClasses_.RIPPLE),a.appendChild(l),e.appendChild(a)}e.addEventListener("click",function(t){"#"===e.getAttribute("href").charAt(0)&&(t.preventDefault(),n())}),e.show=n}var s={upgradeDom:function(e,t){},upgradeElement:function(e,t){},upgradeElements:function(e){},upgradeAllRegistered:function(){},registerUpgradedCallback:function(e,t){},register:function(e){},downgradeElements:function(e){}};s=function(){function e(e,t){for(var s=0;s<h.length;s++)if(h[s].className===e)return"undefined"!=typeof t&&(h[s]=t),h[s];return!1}function t(e){var t=e.getAttribute("data-upgraded");return null===t?[""]:t.split(",")}function s(e,s){var i=t(e);return i.indexOf(s)!==-1}function i(t,s){if("undefined"==typeof t&&"undefined"==typeof s)for(var a=0;a<h.length;a++)i(h[a].className,h[a].cssClass);else{var l=t;if("undefined"==typeof s){var o=e(l);o&&(s=o.cssClass)}for(var r=document.querySelectorAll("."+s),_=0;_<r.length;_++)n(r[_],l)}}function n(i,n){if(!("object"==typeof i&&i instanceof Element))throw new Error("Invalid argument provided to upgrade MDL element.");var a=t(i),l=[];if(n)s(i,n)||l.push(e(n));else{var o=i.classList;h.forEach(function(e){o.contains(e.cssClass)&&l.indexOf(e)===-1&&!s(i,e.className)&&l.push(e)})}for(var r,_=0,d=l.length;_<d;_++){if(r=l[_],!r)throw new Error("Unable to find a registered component for the given class.");a.push(r.className),i.setAttribute("data-upgraded",a.join(","));var C=new r.classConstructor(i);C[p]=r,c.push(C);for(var u=0,E=r.callbacks.length;u<E;u++)r.callbacks[u](i);r.widget&&(i[r.className]=C);var m;"CustomEvent"in window&&"function"==typeof window.CustomEvent?m=new CustomEvent("mdl-componentupgraded",{bubbles:!0,cancelable:!1}):(m=document.createEvent("Events"),m.initEvent("mdl-componentupgraded",!0,!0)),i.dispatchEvent(m)}}function a(e){Array.isArray(e)||(e=e instanceof Element?[e]:Array.prototype.slice.call(e));for(var t,s=0,i=e.length;s<i;s++)t=e[s],t instanceof HTMLElement&&(n(t),t.children.length>0&&a(t.children))}function l(t){var s="undefined"==typeof t.widget&&"undefined"==typeof t.widget,i=!0;s||(i=t.widget||t.widget);var n={classConstructor:t.constructor||t.constructor,className:t.classAsString||t.classAsString,cssClass:t.cssClass||t.cssClass,widget:i,callbacks:[]};if(h.forEach(function(e){if(e.cssClass===n.cssClass)throw new Error("The provided cssClass has already been registered: "+e.cssClass);if(e.className===n.className)throw new Error("The provided className has already been registered")}),t.constructor.prototype.hasOwnProperty(p))throw new Error("MDL component classes must not have "+p+" defined as a property.");var a=e(t.classAsString,n);a||h.push(n)}function o(t,s){var i=e(t);i&&i.callbacks.push(s)}function r(){for(var e=0;e<h.length;e++)i(h[e].className)}function _(e){if(e){var t=c.indexOf(e);c.splice(t,1);var s=e.element_.getAttribute("data-upgraded").split(","),i=s.indexOf(e[p].classAsString);s.splice(i,1),e.element_.setAttribute("data-upgraded",s.join(","));var n;"CustomEvent"in window&&"function"==typeof window.CustomEvent?n=new CustomEvent("mdl-componentdowngraded",{bubbles:!0,cancelable:!1}):(n=document.createEvent("Events"),n.initEvent("mdl-componentdowngraded",!0,!0)),e.element_.dispatchEvent(n)}}function d(e){var t=function(e){c.filter(function(t){return t.element_===e}).forEach(_)};if(e instanceof Array||e instanceof NodeList)for(var s=0;s<e.length;s++)t(e[s]);else{if(!(e instanceof Node))throw new Error("Invalid argument provided to downgrade MDL nodes.");t(e)}}var h=[],c=[],p="mdlComponentConfigInternal_";return{upgradeDom:i,upgradeElement:n,upgradeElements:a,upgradeAllRegistered:r,registerUpgradedCallback:o,register:l,downgradeElements:d}}(),s.ComponentConfigPublic,s.ComponentConfig,s.Component,s.upgradeDom=s.upgradeDom,s.upgradeElement=s.upgradeElement,s.upgradeElements=s.upgradeElements,s.upgradeAllRegistered=s.upgradeAllRegistered,s.registerUpgradedCallback=s.registerUpgradedCallback,s.register=s.register,s.downgradeElements=s.downgradeElements,window.componentHandler=s,window.componentHandler=s,window.addEventListener("load",function(){"classList"in document.createElement("div")&&"querySelector"in document&&"addEventListener"in window&&Array.prototype.forEach?(document.documentElement.classList.add("mdl-js"),s.upgradeAllRegistered()):(s.upgradeElement=function(){},s.register=function(){})}),Date.now||(Date.now=function(){return(new Date).getTime()},Date.now=Date.now);for(var i=["webkit","moz"],n=0;n<i.length&&!window.requestAnimationFrame;++n){var a=i[n];window.requestAnimationFrame=window[a+"RequestAnimationFrame"],window.cancelAnimationFrame=window[a+"CancelAnimationFrame"]||window[a+"CancelRequestAnimationFrame"],window.requestAnimationFrame=window.requestAnimationFrame,window.cancelAnimationFrame=window.cancelAnimationFrame}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var l=0;window.requestAnimationFrame=function(e){var t=Date.now(),s=Math.max(l+16,t);return setTimeout(function(){e(l=s)},s-t)},window.cancelAnimationFrame=clearTimeout,window.requestAnimationFrame=window.requestAnimationFrame,window.cancelAnimationFrame=window.cancelAnimationFrame}var o=function(e){this.element_=e,this.init()};window.MaterialButton=o,o.prototype.Constant_={},o.prototype.CssClasses_={RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_CONTAINER:"mdl-button__ripple-container",RIPPLE:"mdl-ripple"},o.prototype.blurHandler_=function(e){e&&this.element_.blur()},o.prototype.disable=function(){this.element_.disabled=!0},o.prototype.disable=o.prototype.disable,o.prototype.enable=function(){this.element_.disabled=!1},o.prototype.enable=o.prototype.enable,o.prototype.init=function(){if(this.element_){if(this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT)){var e=document.createElement("span");e.classList.add(this.CssClasses_.RIPPLE_CONTAINER),this.rippleElement_=document.createElement("span"),this.rippleElement_.classList.add(this.CssClasses_.RIPPLE),e.appendChild(this.rippleElement_),this.boundRippleBlurHandler=this.blurHandler_.bind(this),this.rippleElement_.addEventListener("mouseup",this.boundRippleBlurHandler),this.element_.appendChild(e)}this.boundButtonBlurHandler=this.blurHandler_.bind(this),this.element_.addEventListener("mouseup",this.boundButtonBlurHandler),this.element_.addEventListener("mouseleave",this.boundButtonBlurHandler)}},s.register({constructor:o,classAsString:"MaterialButton",cssClass:"mdl-js-button",widget:!0});var r=function(e){this.element_=e,this.init()};window.MaterialCheckbox=r,r.prototype.Constant_={TINY_TIMEOUT:.001},r.prototype.CssClasses_={INPUT:"mdl-checkbox__input",BOX_OUTLINE:"mdl-checkbox__box-outline",FOCUS_HELPER:"mdl-checkbox__focus-helper",TICK_OUTLINE:"mdl-checkbox__tick-outline",RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",RIPPLE_CONTAINER:"mdl-checkbox__ripple-container",RIPPLE_CENTER:"mdl-ripple--center",RIPPLE:"mdl-ripple",IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_CHECKED:"is-checked",IS_UPGRADED:"is-upgraded"},r.prototype.onChange_=function(e){this.updateClasses_()},r.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},r.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},r.prototype.onMouseUp_=function(e){this.blur_()},r.prototype.updateClasses_=function(){this.checkDisabled(),this.checkToggleState()},r.prototype.blur_=function(){window.setTimeout(function(){this.inputElement_.blur()}.bind(this),this.Constant_.TINY_TIMEOUT)},r.prototype.checkToggleState=function(){this.inputElement_.checked?this.element_.classList.add(this.CssClasses_.IS_CHECKED):this.element_.classList.remove(this.CssClasses_.IS_CHECKED)},r.prototype.checkToggleState=r.prototype.checkToggleState,r.prototype.checkDisabled=function(){this.inputElement_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},r.prototype.checkDisabled=r.prototype.checkDisabled,r.prototype.disable=function(){this.inputElement_.disabled=!0,this.updateClasses_()},r.prototype.disable=r.prototype.disable,r.prototype.enable=function(){this.inputElement_.disabled=!1,this.updateClasses_()},r.prototype.enable=r.prototype.enable,r.prototype.check=function(){this.inputElement_.checked=!0,this.updateClasses_()},r.prototype.check=r.prototype.check,r.prototype.uncheck=function(){this.inputElement_.checked=!1,this.updateClasses_()},r.prototype.uncheck=r.prototype.uncheck,r.prototype.init=function(){if(this.element_){this.inputElement_=this.element_.querySelector("."+this.CssClasses_.INPUT);var e=document.createElement("span");e.classList.add(this.CssClasses_.BOX_OUTLINE);var t=document.createElement("span");t.classList.add(this.CssClasses_.FOCUS_HELPER);var s=document.createElement("span");if(s.classList.add(this.CssClasses_.TICK_OUTLINE),e.appendChild(s),this.element_.appendChild(t),this.element_.appendChild(e),this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT)){this.element_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS),this.rippleContainerElement_=document.createElement("span"),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_CONTAINER),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_EFFECT),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_CENTER),this.boundRippleMouseUp=this.onMouseUp_.bind(this),this.rippleContainerElement_.addEventListener("mouseup",this.boundRippleMouseUp);var i=document.createElement("span");i.classList.add(this.CssClasses_.RIPPLE),this.rippleContainerElement_.appendChild(i),this.element_.appendChild(this.rippleContainerElement_)}this.boundInputOnChange=this.onChange_.bind(this),this.boundInputOnFocus=this.onFocus_.bind(this),this.boundInputOnBlur=this.onBlur_.bind(this),this.boundElementMouseUp=this.onMouseUp_.bind(this),this.inputElement_.addEventListener("change",this.boundInputOnChange),this.inputElement_.addEventListener("focus",this.boundInputOnFocus),this.inputElement_.addEventListener("blur",this.boundInputOnBlur),this.element_.addEventListener("mouseup",this.boundElementMouseUp),this.updateClasses_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED)}},s.register({constructor:r,classAsString:"MaterialCheckbox",cssClass:"mdl-js-checkbox",widget:!0});var _=function(e){this.element_=e,this.init()};window.MaterialIconToggle=_,_.prototype.Constant_={TINY_TIMEOUT:.001},_.prototype.CssClasses_={INPUT:"mdl-icon-toggle__input",JS_RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",RIPPLE_CONTAINER:"mdl-icon-toggle__ripple-container",RIPPLE_CENTER:"mdl-ripple--center",RIPPLE:"mdl-ripple",IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_CHECKED:"is-checked"},_.prototype.onChange_=function(e){this.updateClasses_()},_.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},_.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},_.prototype.onMouseUp_=function(e){this.blur_()},_.prototype.updateClasses_=function(){this.checkDisabled(),this.checkToggleState()},_.prototype.blur_=function(){window.setTimeout(function(){this.inputElement_.blur()}.bind(this),this.Constant_.TINY_TIMEOUT)},_.prototype.checkToggleState=function(){this.inputElement_.checked?this.element_.classList.add(this.CssClasses_.IS_CHECKED):this.element_.classList.remove(this.CssClasses_.IS_CHECKED)},_.prototype.checkToggleState=_.prototype.checkToggleState,_.prototype.checkDisabled=function(){this.inputElement_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},_.prototype.checkDisabled=_.prototype.checkDisabled,_.prototype.disable=function(){this.inputElement_.disabled=!0,this.updateClasses_()},_.prototype.disable=_.prototype.disable,_.prototype.enable=function(){this.inputElement_.disabled=!1,this.updateClasses_()},_.prototype.enable=_.prototype.enable,_.prototype.check=function(){this.inputElement_.checked=!0,this.updateClasses_()},_.prototype.check=_.prototype.check,_.prototype.uncheck=function(){this.inputElement_.checked=!1,this.updateClasses_()},_.prototype.uncheck=_.prototype.uncheck,_.prototype.init=function(){if(this.element_){if(this.inputElement_=this.element_.querySelector("."+this.CssClasses_.INPUT),this.element_.classList.contains(this.CssClasses_.JS_RIPPLE_EFFECT)){this.element_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS),this.rippleContainerElement_=document.createElement("span"),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_CONTAINER),this.rippleContainerElement_.classList.add(this.CssClasses_.JS_RIPPLE_EFFECT),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_CENTER),this.boundRippleMouseUp=this.onMouseUp_.bind(this),this.rippleContainerElement_.addEventListener("mouseup",this.boundRippleMouseUp);var e=document.createElement("span");e.classList.add(this.CssClasses_.RIPPLE),this.rippleContainerElement_.appendChild(e),this.element_.appendChild(this.rippleContainerElement_)}this.boundInputOnChange=this.onChange_.bind(this),this.boundInputOnFocus=this.onFocus_.bind(this),this.boundInputOnBlur=this.onBlur_.bind(this),this.boundElementOnMouseUp=this.onMouseUp_.bind(this),this.inputElement_.addEventListener("change",this.boundInputOnChange),this.inputElement_.addEventListener("focus",this.boundInputOnFocus),this.inputElement_.addEventListener("blur",this.boundInputOnBlur),this.element_.addEventListener("mouseup",this.boundElementOnMouseUp),this.updateClasses_(),this.element_.classList.add("is-upgraded")}},s.register({constructor:_,classAsString:"MaterialIconToggle",cssClass:"mdl-js-icon-toggle",widget:!0});var d=function(e){this.element_=e,this.init()};window.MaterialMenu=d,d.prototype.Constant_={TRANSITION_DURATION_SECONDS:.3,TRANSITION_DURATION_FRACTION:.8,CLOSE_TIMEOUT:150},d.prototype.Keycodes_={ENTER:13,ESCAPE:27,SPACE:32,UP_ARROW:38,DOWN_ARROW:40},d.prototype.CssClasses_={CONTAINER:"mdl-menu__container",OUTLINE:"mdl-menu__outline",ITEM:"mdl-menu__item",ITEM_RIPPLE_CONTAINER:"mdl-menu__item-ripple-container",RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",RIPPLE:"mdl-ripple",IS_UPGRADED:"is-upgraded",IS_VISIBLE:"is-visible",IS_ANIMATING:"is-animating",BOTTOM_LEFT:"mdl-menu--bottom-left",BOTTOM_RIGHT:"mdl-menu--bottom-right",TOP_LEFT:"mdl-menu--top-left",TOP_RIGHT:"mdl-menu--top-right",UNALIGNED:"mdl-menu--unaligned"},d.prototype.init=function(){if(this.element_){var e=document.createElement("div");e.classList.add(this.CssClasses_.CONTAINER),this.element_.parentElement.insertBefore(e,this.element_),this.element_.parentElement.removeChild(this.element_),e.appendChild(this.element_),this.container_=e;var t=document.createElement("div");t.classList.add(this.CssClasses_.OUTLINE),this.outline_=t,e.insertBefore(t,this.element_);var s=this.element_.getAttribute("for")||this.element_.getAttribute("data-mdl-for"),i=null;s&&(i=document.getElementById(s),i&&(this.forElement_=i,i.addEventListener("click",this.handleForClick_.bind(this)),i.addEventListener("keydown",this.handleForKeyboardEvent_.bind(this))));var n=this.element_.querySelectorAll("."+this.CssClasses_.ITEM);this.boundItemKeydown_=this.handleItemKeyboardEvent_.bind(this),this.boundItemClick_=this.handleItemClick_.bind(this);for(var a=0;a<n.length;a++)n[a].addEventListener("click",this.boundItemClick_),n[a].tabIndex="-1",n[a].addEventListener("keydown",this.boundItemKeydown_);if(this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT))for(this.element_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS),a=0;a<n.length;a++){var l=n[a],o=document.createElement("span");o.classList.add(this.CssClasses_.ITEM_RIPPLE_CONTAINER);var r=document.createElement("span");r.classList.add(this.CssClasses_.RIPPLE),o.appendChild(r),l.appendChild(o),l.classList.add(this.CssClasses_.RIPPLE_EFFECT)}this.element_.classList.contains(this.CssClasses_.BOTTOM_LEFT)&&this.outline_.classList.add(this.CssClasses_.BOTTOM_LEFT),this.element_.classList.contains(this.CssClasses_.BOTTOM_RIGHT)&&this.outline_.classList.add(this.CssClasses_.BOTTOM_RIGHT),this.element_.classList.contains(this.CssClasses_.TOP_LEFT)&&this.outline_.classList.add(this.CssClasses_.TOP_LEFT),this.element_.classList.contains(this.CssClasses_.TOP_RIGHT)&&this.outline_.classList.add(this.CssClasses_.TOP_RIGHT),this.element_.classList.contains(this.CssClasses_.UNALIGNED)&&this.outline_.classList.add(this.CssClasses_.UNALIGNED),e.classList.add(this.CssClasses_.IS_UPGRADED)}},d.prototype.handleForClick_=function(e){if(this.element_&&this.forElement_){var t=this.forElement_.getBoundingClientRect(),s=this.forElement_.parentElement.getBoundingClientRect();this.element_.classList.contains(this.CssClasses_.UNALIGNED)||(this.element_.classList.contains(this.CssClasses_.BOTTOM_RIGHT)?(this.container_.style.right=s.right-t.right+"px",this.container_.style.top=this.forElement_.offsetTop+this.forElement_.offsetHeight+"px"):this.element_.classList.contains(this.CssClasses_.TOP_LEFT)?(this.container_.style.left=this.forElement_.offsetLeft+"px",this.container_.style.bottom=s.bottom-t.top+"px"):this.element_.classList.contains(this.CssClasses_.TOP_RIGHT)?(this.container_.style.right=s.right-t.right+"px",this.container_.style.bottom=s.bottom-t.top+"px"):(this.container_.style.left=this.forElement_.offsetLeft+"px",this.container_.style.top=this.forElement_.offsetTop+this.forElement_.offsetHeight+"px"))}this.toggle(e)},d.prototype.handleForKeyboardEvent_=function(e){if(this.element_&&this.container_&&this.forElement_){var t=this.element_.querySelectorAll("."+this.CssClasses_.ITEM+":not([disabled])");t&&t.length>0&&this.container_.classList.contains(this.CssClasses_.IS_VISIBLE)&&(e.keyCode===this.Keycodes_.UP_ARROW?(e.preventDefault(),t[t.length-1].focus()):e.keyCode===this.Keycodes_.DOWN_ARROW&&(e.preventDefault(),t[0].focus()))}},d.prototype.handleItemKeyboardEvent_=function(e){if(this.element_&&this.container_){var t=this.element_.querySelectorAll("."+this.CssClasses_.ITEM+":not([disabled])");if(t&&t.length>0&&this.container_.classList.contains(this.CssClasses_.IS_VISIBLE)){var s=Array.prototype.slice.call(t).indexOf(e.target);if(e.keyCode===this.Keycodes_.UP_ARROW)e.preventDefault(),s>0?t[s-1].focus():t[t.length-1].focus();else if(e.keyCode===this.Keycodes_.DOWN_ARROW)e.preventDefault(),t.length>s+1?t[s+1].focus():t[0].focus();else if(e.keyCode===this.Keycodes_.SPACE||e.keyCode===this.Keycodes_.ENTER){e.preventDefault();var i=new MouseEvent("mousedown");e.target.dispatchEvent(i),i=new MouseEvent("mouseup"),e.target.dispatchEvent(i),e.target.click()}else e.keyCode===this.Keycodes_.ESCAPE&&(e.preventDefault(),this.hide())}}},d.prototype.handleItemClick_=function(e){e.target.hasAttribute("disabled")?e.stopPropagation():(this.closing_=!0,window.setTimeout(function(e){this.hide(),this.closing_=!1}.bind(this),this.Constant_.CLOSE_TIMEOUT))},d.prototype.applyClip_=function(e,t){this.element_.classList.contains(this.CssClasses_.UNALIGNED)?this.element_.style.clip="":this.element_.classList.contains(this.CssClasses_.BOTTOM_RIGHT)?this.element_.style.clip="rect(0 "+t+"px 0 "+t+"px)":this.element_.classList.contains(this.CssClasses_.TOP_LEFT)?this.element_.style.clip="rect("+e+"px 0 "+e+"px 0)":this.element_.classList.contains(this.CssClasses_.TOP_RIGHT)?this.element_.style.clip="rect("+e+"px "+t+"px "+e+"px "+t+"px)":this.element_.style.clip=""},d.prototype.removeAnimationEndListener_=function(e){e.target.classList.remove(d.prototype.CssClasses_.IS_ANIMATING)},d.prototype.addAnimationEndListener_=function(){this.element_.addEventListener("transitionend",this.removeAnimationEndListener_),this.element_.addEventListener("webkitTransitionEnd",this.removeAnimationEndListener_)},d.prototype.show=function(e){if(this.element_&&this.container_&&this.outline_){var t=this.element_.getBoundingClientRect().height,s=this.element_.getBoundingClientRect().width;this.container_.style.width=s+"px",this.container_.style.height=t+"px",this.outline_.style.width=s+"px",this.outline_.style.height=t+"px";for(var i=this.Constant_.TRANSITION_DURATION_SECONDS*this.Constant_.TRANSITION_DURATION_FRACTION,n=this.element_.querySelectorAll("."+this.CssClasses_.ITEM),a=0;a<n.length;a++){var l=null;l=this.element_.classList.contains(this.CssClasses_.TOP_LEFT)||this.element_.classList.contains(this.CssClasses_.TOP_RIGHT)?(t-n[a].offsetTop-n[a].offsetHeight)/t*i+"s":n[a].offsetTop/t*i+"s",n[a].style.transitionDelay=l}this.applyClip_(t,s),window.requestAnimationFrame(function(){this.element_.classList.add(this.CssClasses_.IS_ANIMATING),this.element_.style.clip="rect(0 "+s+"px "+t+"px 0)",this.container_.classList.add(this.CssClasses_.IS_VISIBLE)}.bind(this)),this.addAnimationEndListener_();var o=function(t){t===e||this.closing_||t.target.parentNode===this.element_||(document.removeEventListener("click",o),this.hide())}.bind(this);document.addEventListener("click",o)}},d.prototype.show=d.prototype.show,d.prototype.hide=function(){if(this.element_&&this.container_&&this.outline_){for(var e=this.element_.querySelectorAll("."+this.CssClasses_.ITEM),t=0;t<e.length;t++)e[t].style.removeProperty("transition-delay");var s=this.element_.getBoundingClientRect(),i=s.height,n=s.width;this.element_.classList.add(this.CssClasses_.IS_ANIMATING),this.applyClip_(i,n),this.container_.classList.remove(this.CssClasses_.IS_VISIBLE),this.addAnimationEndListener_()}},d.prototype.hide=d.prototype.hide,d.prototype.toggle=function(e){this.container_.classList.contains(this.CssClasses_.IS_VISIBLE)?this.hide():this.show(e)},d.prototype.toggle=d.prototype.toggle,s.register({constructor:d,classAsString:"MaterialMenu",cssClass:"mdl-js-menu",widget:!0});var h=function(e){this.element_=e,this.init()};window.MaterialProgress=h,h.prototype.Constant_={},h.prototype.CssClasses_={INDETERMINATE_CLASS:"mdl-progress__indeterminate"},h.prototype.setProgress=function(e){this.element_.classList.contains(this.CssClasses_.INDETERMINATE_CLASS)||(this.progressbar_.style.width=e+"%")},h.prototype.setProgress=h.prototype.setProgress,h.prototype.setBuffer=function(e){this.bufferbar_.style.width=e+"%",this.auxbar_.style.width=100-e+"%"},h.prototype.setBuffer=h.prototype.setBuffer,h.prototype.init=function(){if(this.element_){var e=document.createElement("div");e.className="progressbar bar bar1",this.element_.appendChild(e),this.progressbar_=e,e=document.createElement("div"),e.className="bufferbar bar bar2",this.element_.appendChild(e),this.bufferbar_=e,e=document.createElement("div"),e.className="auxbar bar bar3",this.element_.appendChild(e),this.auxbar_=e,this.progressbar_.style.width="0%",this.bufferbar_.style.width="100%",this.auxbar_.style.width="0%",this.element_.classList.add("is-upgraded")}},s.register({constructor:h,classAsString:"MaterialProgress",cssClass:"mdl-js-progress",widget:!0});var c=function(e){this.element_=e,this.init()};window.MaterialRadio=c,c.prototype.Constant_={TINY_TIMEOUT:.001},c.prototype.CssClasses_={IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_CHECKED:"is-checked",IS_UPGRADED:"is-upgraded",JS_RADIO:"mdl-js-radio",RADIO_BTN:"mdl-radio__button",RADIO_OUTER_CIRCLE:"mdl-radio__outer-circle",RADIO_INNER_CIRCLE:"mdl-radio__inner-circle",RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",RIPPLE_CONTAINER:"mdl-radio__ripple-container",RIPPLE_CENTER:"mdl-ripple--center",RIPPLE:"mdl-ripple"},c.prototype.onChange_=function(e){for(var t=document.getElementsByClassName(this.CssClasses_.JS_RADIO),s=0;s<t.length;s++){var i=t[s].querySelector("."+this.CssClasses_.RADIO_BTN);i.getAttribute("name")===this.btnElement_.getAttribute("name")&&t[s].MaterialRadio.updateClasses_()}},c.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},c.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},c.prototype.onMouseup_=function(e){this.blur_()},c.prototype.updateClasses_=function(){this.checkDisabled(),this.checkToggleState()},c.prototype.blur_=function(){window.setTimeout(function(){this.btnElement_.blur()}.bind(this),this.Constant_.TINY_TIMEOUT)},c.prototype.checkDisabled=function(){this.btnElement_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},c.prototype.checkDisabled=c.prototype.checkDisabled,c.prototype.checkToggleState=function(){this.btnElement_.checked?this.element_.classList.add(this.CssClasses_.IS_CHECKED):this.element_.classList.remove(this.CssClasses_.IS_CHECKED)},c.prototype.checkToggleState=c.prototype.checkToggleState,c.prototype.disable=function(){this.btnElement_.disabled=!0,this.updateClasses_()},c.prototype.disable=c.prototype.disable,c.prototype.enable=function(){this.btnElement_.disabled=!1,this.updateClasses_()},c.prototype.enable=c.prototype.enable,c.prototype.check=function(){this.btnElement_.checked=!0,this.onChange_(null)},c.prototype.check=c.prototype.check,c.prototype.uncheck=function(){this.btnElement_.checked=!1,this.onChange_(null)},c.prototype.uncheck=c.prototype.uncheck,c.prototype.init=function(){if(this.element_){this.btnElement_=this.element_.querySelector("."+this.CssClasses_.RADIO_BTN),this.boundChangeHandler_=this.onChange_.bind(this),this.boundFocusHandler_=this.onChange_.bind(this),this.boundBlurHandler_=this.onBlur_.bind(this),this.boundMouseUpHandler_=this.onMouseup_.bind(this);var e=document.createElement("span");e.classList.add(this.CssClasses_.RADIO_OUTER_CIRCLE);var t=document.createElement("span");t.classList.add(this.CssClasses_.RADIO_INNER_CIRCLE),this.element_.appendChild(e),this.element_.appendChild(t);var s;if(this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT)){this.element_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS),s=document.createElement("span"),s.classList.add(this.CssClasses_.RIPPLE_CONTAINER),s.classList.add(this.CssClasses_.RIPPLE_EFFECT),s.classList.add(this.CssClasses_.RIPPLE_CENTER),s.addEventListener("mouseup",this.boundMouseUpHandler_);var i=document.createElement("span");i.classList.add(this.CssClasses_.RIPPLE),s.appendChild(i),this.element_.appendChild(s)}this.btnElement_.addEventListener("change",this.boundChangeHandler_),this.btnElement_.addEventListener("focus",this.boundFocusHandler_),this.btnElement_.addEventListener("blur",this.boundBlurHandler_),this.element_.addEventListener("mouseup",this.boundMouseUpHandler_),this.updateClasses_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED)}},s.register({constructor:c,classAsString:"MaterialRadio",cssClass:"mdl-js-radio",widget:!0});var p=function(e){this.element_=e,this.isIE_=window.navigator.msPointerEnabled,this.init()};window.MaterialSlider=p,p.prototype.Constant_={},p.prototype.CssClasses_={IE_CONTAINER:"mdl-slider__ie-container",SLIDER_CONTAINER:"mdl-slider__container",BACKGROUND_FLEX:"mdl-slider__background-flex",BACKGROUND_LOWER:"mdl-slider__background-lower",BACKGROUND_UPPER:"mdl-slider__background-upper",IS_LOWEST_VALUE:"is-lowest-value",IS_UPGRADED:"is-upgraded"},p.prototype.onInput_=function(e){this.updateValueStyles_()},p.prototype.onChange_=function(e){this.updateValueStyles_()},p.prototype.onMouseUp_=function(e){e.target.blur()},p.prototype.onContainerMouseDown_=function(e){if(e.target===this.element_.parentElement){e.preventDefault();var t=new MouseEvent("mousedown",{target:e.target,buttons:e.buttons,clientX:e.clientX,clientY:this.element_.getBoundingClientRect().y});this.element_.dispatchEvent(t)}},p.prototype.updateValueStyles_=function(){var e=(this.element_.value-this.element_.min)/(this.element_.max-this.element_.min);0===e?this.element_.classList.add(this.CssClasses_.IS_LOWEST_VALUE):this.element_.classList.remove(this.CssClasses_.IS_LOWEST_VALUE),this.isIE_||(this.backgroundLower_.style.flex=e,this.backgroundLower_.style.webkitFlex=e,this.backgroundUpper_.style.flex=1-e,this.backgroundUpper_.style.webkitFlex=1-e)},p.prototype.disable=function(){this.element_.disabled=!0},p.prototype.disable=p.prototype.disable,p.prototype.enable=function(){this.element_.disabled=!1},p.prototype.enable=p.prototype.enable,p.prototype.change=function(e){"undefined"!=typeof e&&(this.element_.value=e),this.updateValueStyles_()},p.prototype.change=p.prototype.change,p.prototype.init=function(){if(this.element_){if(this.isIE_){var e=document.createElement("div");e.classList.add(this.CssClasses_.IE_CONTAINER),this.element_.parentElement.insertBefore(e,this.element_),this.element_.parentElement.removeChild(this.element_),e.appendChild(this.element_)}else{var t=document.createElement("div");t.classList.add(this.CssClasses_.SLIDER_CONTAINER),this.element_.parentElement.insertBefore(t,this.element_),this.element_.parentElement.removeChild(this.element_),t.appendChild(this.element_);var s=document.createElement("div");s.classList.add(this.CssClasses_.BACKGROUND_FLEX),t.appendChild(s),this.backgroundLower_=document.createElement("div"),this.backgroundLower_.classList.add(this.CssClasses_.BACKGROUND_LOWER),s.appendChild(this.backgroundLower_),this.backgroundUpper_=document.createElement("div"),this.backgroundUpper_.classList.add(this.CssClasses_.BACKGROUND_UPPER),s.appendChild(this.backgroundUpper_)}this.boundInputHandler=this.onInput_.bind(this),this.boundChangeHandler=this.onChange_.bind(this),this.boundMouseUpHandler=this.onMouseUp_.bind(this),this.boundContainerMouseDownHandler=this.onContainerMouseDown_.bind(this),this.element_.addEventListener("input",this.boundInputHandler),this.element_.addEventListener("change",this.boundChangeHandler),this.element_.addEventListener("mouseup",this.boundMouseUpHandler),this.element_.parentElement.addEventListener("mousedown",this.boundContainerMouseDownHandler),this.updateValueStyles_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED)}},s.register({constructor:p,classAsString:"MaterialSlider",cssClass:"mdl-js-slider",widget:!0});var C=function(e){if(this.element_=e,this.textElement_=this.element_.querySelector("."+this.cssClasses_.MESSAGE),this.actionElement_=this.element_.querySelector("."+this.cssClasses_.ACTION),!this.textElement_)throw new Error("There must be a message element for a snackbar.");if(!this.actionElement_)throw new Error("There must be an action element for a snackbar.");this.active=!1,this.actionHandler_=void 0,this.message_=void 0,this.actionText_=void 0,this.queuedNotifications_=[],this.setActionHidden_(!0)};window.MaterialSnackbar=C,C.prototype.Constant_={ANIMATION_LENGTH:250},C.prototype.cssClasses_={SNACKBAR:"mdl-snackbar",MESSAGE:"mdl-snackbar__text",ACTION:"mdl-snackbar__action",ACTIVE:"mdl-snackbar--active"},C.prototype.displaySnackbar_=function(){this.element_.setAttribute("aria-hidden","true"),this.actionHandler_&&(this.actionElement_.textContent=this.actionText_,this.actionElement_.addEventListener("click",this.actionHandler_),this.setActionHidden_(!1)),this.textElement_.textContent=this.message_,this.element_.classList.add(this.cssClasses_.ACTIVE),this.element_.setAttribute("aria-hidden","false"),setTimeout(this.cleanup_.bind(this),this.timeout_)},C.prototype.showSnackbar=function(e){if(void 0===e)throw new Error("Please provide a data object with at least a message to display.");if(void 0===e.message)throw new Error("Please provide a message to be displayed.");if(e.actionHandler&&!e.actionText)throw new Error("Please provide action text with the handler.");this.active?this.queuedNotifications_.push(e):(this.active=!0,this.message_=e.message,e.timeout?this.timeout_=e.timeout:this.timeout_=2750,e.actionHandler&&(this.actionHandler_=e.actionHandler),e.actionText&&(this.actionText_=e.actionText),this.displaySnackbar_())},C.prototype.showSnackbar=C.prototype.showSnackbar,C.prototype.checkQueue_=function(){this.queuedNotifications_.length>0&&this.showSnackbar(this.queuedNotifications_.shift())},C.prototype.cleanup_=function(){this.element_.classList.remove(this.cssClasses_.ACTIVE),setTimeout(function(){this.element_.setAttribute("aria-hidden","true"),this.textElement_.textContent="",Boolean(this.actionElement_.getAttribute("aria-hidden"))||(this.setActionHidden_(!0),this.actionElement_.textContent="",this.actionElement_.removeEventListener("click",this.actionHandler_)),this.actionHandler_=void 0,this.message_=void 0,this.actionText_=void 0,this.active=!1,this.checkQueue_()}.bind(this),this.Constant_.ANIMATION_LENGTH)},C.prototype.setActionHidden_=function(e){e?this.actionElement_.setAttribute("aria-hidden","true"):this.actionElement_.removeAttribute("aria-hidden")},s.register({constructor:C,classAsString:"MaterialSnackbar",cssClass:"mdl-js-snackbar",widget:!0});var u=function(e){this.element_=e,this.init()};window.MaterialSpinner=u,u.prototype.Constant_={MDL_SPINNER_LAYER_COUNT:4},u.prototype.CssClasses_={MDL_SPINNER_LAYER:"mdl-spinner__layer",MDL_SPINNER_CIRCLE_CLIPPER:"mdl-spinner__circle-clipper",MDL_SPINNER_CIRCLE:"mdl-spinner__circle",MDL_SPINNER_GAP_PATCH:"mdl-spinner__gap-patch",MDL_SPINNER_LEFT:"mdl-spinner__left",MDL_SPINNER_RIGHT:"mdl-spinner__right"},u.prototype.createLayer=function(e){var t=document.createElement("div");t.classList.add(this.CssClasses_.MDL_SPINNER_LAYER),t.classList.add(this.CssClasses_.MDL_SPINNER_LAYER+"-"+e);var s=document.createElement("div");s.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER),s.classList.add(this.CssClasses_.MDL_SPINNER_LEFT);var i=document.createElement("div");i.classList.add(this.CssClasses_.MDL_SPINNER_GAP_PATCH);var n=document.createElement("div");n.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER),n.classList.add(this.CssClasses_.MDL_SPINNER_RIGHT);for(var a=[s,i,n],l=0;l<a.length;l++){var o=document.createElement("div");o.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE),a[l].appendChild(o)}t.appendChild(s),t.appendChild(i),t.appendChild(n),this.element_.appendChild(t)},u.prototype.createLayer=u.prototype.createLayer,u.prototype.stop=function(){this.element_.classList.remove("is-active")},u.prototype.stop=u.prototype.stop,u.prototype.start=function(){this.element_.classList.add("is-active")},u.prototype.start=u.prototype.start,u.prototype.init=function(){if(this.element_){for(var e=1;e<=this.Constant_.MDL_SPINNER_LAYER_COUNT;e++)this.createLayer(e);this.element_.classList.add("is-upgraded")}},s.register({constructor:u,classAsString:"MaterialSpinner",cssClass:"mdl-js-spinner",widget:!0});var E=function(e){this.element_=e,this.init()};window.MaterialSwitch=E,E.prototype.Constant_={TINY_TIMEOUT:.001},E.prototype.CssClasses_={INPUT:"mdl-switch__input",TRACK:"mdl-switch__track",THUMB:"mdl-switch__thumb",FOCUS_HELPER:"mdl-switch__focus-helper",RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",RIPPLE_CONTAINER:"mdl-switch__ripple-container",RIPPLE_CENTER:"mdl-ripple--center",RIPPLE:"mdl-ripple",IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_CHECKED:"is-checked"},E.prototype.onChange_=function(e){this.updateClasses_()},E.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},E.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},E.prototype.onMouseUp_=function(e){this.blur_()},E.prototype.updateClasses_=function(){this.checkDisabled(),this.checkToggleState()},E.prototype.blur_=function(){window.setTimeout(function(){this.inputElement_.blur()}.bind(this),this.Constant_.TINY_TIMEOUT)},E.prototype.checkDisabled=function(){this.inputElement_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},E.prototype.checkDisabled=E.prototype.checkDisabled,E.prototype.checkToggleState=function(){this.inputElement_.checked?this.element_.classList.add(this.CssClasses_.IS_CHECKED):this.element_.classList.remove(this.CssClasses_.IS_CHECKED)},E.prototype.checkToggleState=E.prototype.checkToggleState,E.prototype.disable=function(){this.inputElement_.disabled=!0,this.updateClasses_()},E.prototype.disable=E.prototype.disable,E.prototype.enable=function(){this.inputElement_.disabled=!1,this.updateClasses_()},E.prototype.enable=E.prototype.enable,E.prototype.on=function(){this.inputElement_.checked=!0,this.updateClasses_()},E.prototype.on=E.prototype.on,E.prototype.off=function(){this.inputElement_.checked=!1,this.updateClasses_()},E.prototype.off=E.prototype.off,E.prototype.init=function(){if(this.element_){this.inputElement_=this.element_.querySelector("."+this.CssClasses_.INPUT);var e=document.createElement("div");e.classList.add(this.CssClasses_.TRACK);var t=document.createElement("div");t.classList.add(this.CssClasses_.THUMB);var s=document.createElement("span");if(s.classList.add(this.CssClasses_.FOCUS_HELPER),t.appendChild(s),this.element_.appendChild(e),this.element_.appendChild(t),this.boundMouseUpHandler=this.onMouseUp_.bind(this),this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT)){this.element_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS),this.rippleContainerElement_=document.createElement("span"),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_CONTAINER),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_EFFECT),this.rippleContainerElement_.classList.add(this.CssClasses_.RIPPLE_CENTER),this.rippleContainerElement_.addEventListener("mouseup",this.boundMouseUpHandler);var i=document.createElement("span");i.classList.add(this.CssClasses_.RIPPLE),this.rippleContainerElement_.appendChild(i),this.element_.appendChild(this.rippleContainerElement_)}this.boundChangeHandler=this.onChange_.bind(this),this.boundFocusHandler=this.onFocus_.bind(this),this.boundBlurHandler=this.onBlur_.bind(this),this.inputElement_.addEventListener("change",this.boundChangeHandler),this.inputElement_.addEventListener("focus",this.boundFocusHandler),this.inputElement_.addEventListener("blur",this.boundBlurHandler),this.element_.addEventListener("mouseup",this.boundMouseUpHandler),this.updateClasses_(),this.element_.classList.add("is-upgraded")}},s.register({constructor:E,classAsString:"MaterialSwitch",cssClass:"mdl-js-switch",widget:!0});var m=function(e){this.element_=e,this.init()};window.MaterialTabs=m,m.prototype.Constant_={},m.prototype.CssClasses_={TAB_CLASS:"mdl-tabs__tab",PANEL_CLASS:"mdl-tabs__panel",ACTIVE_CLASS:"is-active",UPGRADED_CLASS:"is-upgraded",MDL_JS_RIPPLE_EFFECT:"mdl-js-ripple-effect",MDL_RIPPLE_CONTAINER:"mdl-tabs__ripple-container",MDL_RIPPLE:"mdl-ripple",MDL_JS_RIPPLE_EFFECT_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events"},m.prototype.initTabs_=function(){this.element_.classList.contains(this.CssClasses_.MDL_JS_RIPPLE_EFFECT)&&this.element_.classList.add(this.CssClasses_.MDL_JS_RIPPLE_EFFECT_IGNORE_EVENTS),this.tabs_=this.element_.querySelectorAll("."+this.CssClasses_.TAB_CLASS),this.panels_=this.element_.querySelectorAll("."+this.CssClasses_.PANEL_CLASS);for(var t=0;t<this.tabs_.length;t++)new e(this.tabs_[t],this);this.element_.classList.add(this.CssClasses_.UPGRADED_CLASS)},m.prototype.resetTabState_=function(){for(var e=0;e<this.tabs_.length;e++)this.tabs_[e].classList.remove(this.CssClasses_.ACTIVE_CLASS)},m.prototype.resetPanelState_=function(){for(var e=0;e<this.panels_.length;e++)this.panels_[e].classList.remove(this.CssClasses_.ACTIVE_CLASS)},m.prototype.init=function(){this.element_&&this.initTabs_()},s.register({constructor:m,classAsString:"MaterialTabs",cssClass:"mdl-js-tabs"});var L=function(e){this.element_=e,this.maxRows=this.Constant_.NO_MAX_ROWS,this.init()};window.MaterialTextfield=L,L.prototype.Constant_={NO_MAX_ROWS:-1,MAX_ROWS_ATTRIBUTE:"maxrows"},L.prototype.CssClasses_={LABEL:"mdl-textfield__label",INPUT:"mdl-textfield__input",IS_DIRTY:"is-dirty",IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_INVALID:"is-invalid",IS_UPGRADED:"is-upgraded",HAS_PLACEHOLDER:"has-placeholder"},L.prototype.onKeyDown_=function(e){var t=e.target.value.split("\n").length;13===e.keyCode&&t>=this.maxRows&&e.preventDefault()},L.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},L.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},L.prototype.onReset_=function(e){this.updateClasses_()},L.prototype.updateClasses_=function(){this.checkDisabled(),this.checkValidity(),this.checkDirty(),this.checkFocus()},L.prototype.checkDisabled=function(){this.input_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},L.prototype.checkDisabled=L.prototype.checkDisabled,L.prototype.checkFocus=function(){Boolean(this.element_.querySelector(":focus"))?this.element_.classList.add(this.CssClasses_.IS_FOCUSED):this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},L.prototype.checkFocus=L.prototype.checkFocus,L.prototype.checkValidity=function(){this.input_.validity&&(this.input_.validity.valid?this.element_.classList.remove(this.CssClasses_.IS_INVALID):this.element_.classList.add(this.CssClasses_.IS_INVALID))},L.prototype.checkValidity=L.prototype.checkValidity,L.prototype.checkDirty=function(){this.input_.value&&this.input_.value.length>0?this.element_.classList.add(this.CssClasses_.IS_DIRTY):this.element_.classList.remove(this.CssClasses_.IS_DIRTY)},L.prototype.checkDirty=L.prototype.checkDirty,L.prototype.disable=function(){this.input_.disabled=!0,this.updateClasses_()},L.prototype.disable=L.prototype.disable,L.prototype.enable=function(){this.input_.disabled=!1,this.updateClasses_()},L.prototype.enable=L.prototype.enable,L.prototype.change=function(e){this.input_.value=e||"",this.updateClasses_()},L.prototype.change=L.prototype.change,L.prototype.init=function(){if(this.element_&&(this.label_=this.element_.querySelector("."+this.CssClasses_.LABEL),this.input_=this.element_.querySelector("."+this.CssClasses_.INPUT),this.input_)){this.input_.hasAttribute(this.Constant_.MAX_ROWS_ATTRIBUTE)&&(this.maxRows=parseInt(this.input_.getAttribute(this.Constant_.MAX_ROWS_ATTRIBUTE),10),isNaN(this.maxRows)&&(this.maxRows=this.Constant_.NO_MAX_ROWS)),this.input_.hasAttribute("placeholder")&&this.element_.classList.add(this.CssClasses_.HAS_PLACEHOLDER),this.boundUpdateClassesHandler=this.updateClasses_.bind(this),this.boundFocusHandler=this.onFocus_.bind(this),this.boundBlurHandler=this.onBlur_.bind(this),this.boundResetHandler=this.onReset_.bind(this),this.input_.addEventListener("input",this.boundUpdateClassesHandler),this.input_.addEventListener("focus",this.boundFocusHandler),this.input_.addEventListener("blur",this.boundBlurHandler),this.input_.addEventListener("reset",this.boundResetHandler),this.maxRows!==this.Constant_.NO_MAX_ROWS&&(this.boundKeyDownHandler=this.onKeyDown_.bind(this),this.input_.addEventListener("keydown",this.boundKeyDownHandler));var e=this.element_.classList.contains(this.CssClasses_.IS_INVALID);this.updateClasses_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED),e&&this.element_.classList.add(this.CssClasses_.IS_INVALID),this.input_.hasAttribute("autofocus")&&(this.element_.focus(),this.checkFocus())}},s.register({constructor:L,classAsString:"MaterialTextfield",cssClass:"mdl-js-textfield",widget:!0});var I=function(e){this.element_=e,this.init()};window.MaterialTooltip=I,I.prototype.Constant_={},I.prototype.CssClasses_={IS_ACTIVE:"is-active",BOTTOM:"mdl-tooltip--bottom",LEFT:"mdl-tooltip--left",RIGHT:"mdl-tooltip--right",TOP:"mdl-tooltip--top"},I.prototype.handleMouseEnter_=function(e){var t=e.target.getBoundingClientRect(),s=t.left+t.width/2,i=t.top+t.height/2,n=-1*(this.element_.offsetWidth/2),a=-1*(this.element_.offsetHeight/2);this.element_.classList.contains(this.CssClasses_.LEFT)||this.element_.classList.contains(this.CssClasses_.RIGHT)?(s=t.width/2,i+a<0?(this.element_.style.top="0",this.element_.style.marginTop="0"):(this.element_.style.top=i+"px",this.element_.style.marginTop=a+"px")):s+n<0?(this.element_.style.left="0",this.element_.style.marginLeft="0"):(this.element_.style.left=s+"px",this.element_.style.marginLeft=n+"px"),this.element_.classList.contains(this.CssClasses_.TOP)?this.element_.style.top=t.top-this.element_.offsetHeight-10+"px":this.element_.classList.contains(this.CssClasses_.RIGHT)?this.element_.style.left=t.left+t.width+10+"px":this.element_.classList.contains(this.CssClasses_.LEFT)?this.element_.style.left=t.left-this.element_.offsetWidth-10+"px":this.element_.style.top=t.top+t.height+10+"px",this.element_.classList.add(this.CssClasses_.IS_ACTIVE)},I.prototype.hideTooltip_=function(){this.element_.classList.remove(this.CssClasses_.IS_ACTIVE)},I.prototype.init=function(){if(this.element_){var e=this.element_.getAttribute("for")||this.element_.getAttribute("data-mdl-for");e&&(this.forElement_=document.getElementById(e)),this.forElement_&&(this.forElement_.hasAttribute("tabindex")||this.forElement_.setAttribute("tabindex","0"),this.boundMouseEnterHandler=this.handleMouseEnter_.bind(this),this.boundMouseLeaveAndScrollHandler=this.hideTooltip_.bind(this),this.forElement_.addEventListener("mouseenter",this.boundMouseEnterHandler,!1),this.forElement_.addEventListener("touchend",this.boundMouseEnterHandler,!1),this.forElement_.addEventListener("mouseleave",this.boundMouseLeaveAndScrollHandler,!1),window.addEventListener("scroll",this.boundMouseLeaveAndScrollHandler,!0),window.addEventListener("touchstart",this.boundMouseLeaveAndScrollHandler))}},s.register({constructor:I,classAsString:"MaterialTooltip",cssClass:"mdl-tooltip"});var f=function(e){this.element_=e,this.init()};window.MaterialLayout=f,f.prototype.Constant_={MAX_WIDTH:"(max-width: 1024px)",TAB_SCROLL_PIXELS:100,RESIZE_TIMEOUT:100,MENU_ICON:"&#xE5D2;",CHEVRON_LEFT:"chevron_left",CHEVRON_RIGHT:"chevron_right"},f.prototype.Keycodes_={ENTER:13,ESCAPE:27,SPACE:32},f.prototype.Mode_={STANDARD:0,SEAMED:1,WATERFALL:2,SCROLL:3},f.prototype.CssClasses_={CONTAINER:"mdl-layout__container",HEADER:"mdl-layout__header",DRAWER:"mdl-layout__drawer",CONTENT:"mdl-layout__content",DRAWER_BTN:"mdl-layout__drawer-button",ICON:"material-icons",JS_RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_CONTAINER:"mdl-layout__tab-ripple-container",RIPPLE:"mdl-ripple",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",HEADER_SEAMED:"mdl-layout__header--seamed",HEADER_WATERFALL:"mdl-layout__header--waterfall",HEADER_SCROLL:"mdl-layout__header--scroll",FIXED_HEADER:"mdl-layout--fixed-header",OBFUSCATOR:"mdl-layout__obfuscator",TAB_BAR:"mdl-layout__tab-bar",TAB_CONTAINER:"mdl-layout__tab-bar-container",TAB:"mdl-layout__tab",TAB_BAR_BUTTON:"mdl-layout__tab-bar-button",TAB_BAR_LEFT_BUTTON:"mdl-layout__tab-bar-left-button",TAB_BAR_RIGHT_BUTTON:"mdl-layout__tab-bar-right-button",PANEL:"mdl-layout__tab-panel",HAS_DRAWER:"has-drawer",HAS_TABS:"has-tabs",HAS_SCROLLING_HEADER:"has-scrolling-header",CASTING_SHADOW:"is-casting-shadow",IS_COMPACT:"is-compact",IS_SMALL_SCREEN:"is-small-screen",IS_DRAWER_OPEN:"is-visible",IS_ACTIVE:"is-active",IS_UPGRADED:"is-upgraded",IS_ANIMATING:"is-animating",ON_LARGE_SCREEN:"mdl-layout--large-screen-only",ON_SMALL_SCREEN:"mdl-layout--small-screen-only"},f.prototype.contentScrollHandler_=function(){if(!this.header_.classList.contains(this.CssClasses_.IS_ANIMATING)){var e=!this.element_.classList.contains(this.CssClasses_.IS_SMALL_SCREEN)||this.element_.classList.contains(this.CssClasses_.FIXED_HEADER);this.content_.scrollTop>0&&!this.header_.classList.contains(this.CssClasses_.IS_COMPACT)?(this.header_.classList.add(this.CssClasses_.CASTING_SHADOW),this.header_.classList.add(this.CssClasses_.IS_COMPACT),e&&this.header_.classList.add(this.CssClasses_.IS_ANIMATING)):this.content_.scrollTop<=0&&this.header_.classList.contains(this.CssClasses_.IS_COMPACT)&&(this.header_.classList.remove(this.CssClasses_.CASTING_SHADOW),this.header_.classList.remove(this.CssClasses_.IS_COMPACT),e&&this.header_.classList.add(this.CssClasses_.IS_ANIMATING))}},f.prototype.keyboardEventHandler_=function(e){e.keyCode===this.Keycodes_.ESCAPE&&this.drawer_.classList.contains(this.CssClasses_.IS_DRAWER_OPEN)&&this.toggleDrawer()},f.prototype.screenSizeHandler_=function(){this.screenSizeMediaQuery_.matches?this.element_.classList.add(this.CssClasses_.IS_SMALL_SCREEN):(this.element_.classList.remove(this.CssClasses_.IS_SMALL_SCREEN),this.drawer_&&(this.drawer_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN),this.obfuscator_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN)))},f.prototype.drawerToggleHandler_=function(e){if(e&&"keydown"===e.type){if(e.keyCode!==this.Keycodes_.SPACE&&e.keyCode!==this.Keycodes_.ENTER)return;e.preventDefault()}this.toggleDrawer()},f.prototype.headerTransitionEndHandler_=function(){this.header_.classList.remove(this.CssClasses_.IS_ANIMATING)},f.prototype.headerClickHandler_=function(){this.header_.classList.contains(this.CssClasses_.IS_COMPACT)&&(this.header_.classList.remove(this.CssClasses_.IS_COMPACT),this.header_.classList.add(this.CssClasses_.IS_ANIMATING))},f.prototype.resetTabState_=function(e){for(var t=0;t<e.length;t++)e[t].classList.remove(this.CssClasses_.IS_ACTIVE)},f.prototype.resetPanelState_=function(e){for(var t=0;t<e.length;t++)e[t].classList.remove(this.CssClasses_.IS_ACTIVE)},f.prototype.toggleDrawer=function(){var e=this.element_.querySelector("."+this.CssClasses_.DRAWER_BTN);this.drawer_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN),this.obfuscator_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN),this.drawer_.classList.contains(this.CssClasses_.IS_DRAWER_OPEN)?(this.drawer_.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true")):(this.drawer_.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false"))},f.prototype.toggleDrawer=f.prototype.toggleDrawer,f.prototype.init=function(){if(this.element_){var e=document.createElement("div");e.classList.add(this.CssClasses_.CONTAINER);var s=this.element_.querySelector(":focus");this.element_.parentElement.insertBefore(e,this.element_),this.element_.parentElement.removeChild(this.element_),e.appendChild(this.element_),s&&s.focus();for(var i=this.element_.childNodes,n=i.length,a=0;a<n;a++){var l=i[a];l.classList&&l.classList.contains(this.CssClasses_.HEADER)&&(this.header_=l),l.classList&&l.classList.contains(this.CssClasses_.DRAWER)&&(this.drawer_=l),l.classList&&l.classList.contains(this.CssClasses_.CONTENT)&&(this.content_=l)}window.addEventListener("pageshow",function(e){e.persisted&&(this.element_.style.overflowY="hidden",requestAnimationFrame(function(){this.element_.style.overflowY=""}.bind(this)))}.bind(this),!1),this.header_&&(this.tabBar_=this.header_.querySelector("."+this.CssClasses_.TAB_BAR));var o=this.Mode_.STANDARD;if(this.header_&&(this.header_.classList.contains(this.CssClasses_.HEADER_SEAMED)?o=this.Mode_.SEAMED:this.header_.classList.contains(this.CssClasses_.HEADER_WATERFALL)?(o=this.Mode_.WATERFALL,this.header_.addEventListener("transitionend",this.headerTransitionEndHandler_.bind(this)),this.header_.addEventListener("click",this.headerClickHandler_.bind(this))):this.header_.classList.contains(this.CssClasses_.HEADER_SCROLL)&&(o=this.Mode_.SCROLL,e.classList.add(this.CssClasses_.HAS_SCROLLING_HEADER)),o===this.Mode_.STANDARD?(this.header_.classList.add(this.CssClasses_.CASTING_SHADOW),this.tabBar_&&this.tabBar_.classList.add(this.CssClasses_.CASTING_SHADOW)):o===this.Mode_.SEAMED||o===this.Mode_.SCROLL?(this.header_.classList.remove(this.CssClasses_.CASTING_SHADOW),this.tabBar_&&this.tabBar_.classList.remove(this.CssClasses_.CASTING_SHADOW)):o===this.Mode_.WATERFALL&&(this.content_.addEventListener("scroll",this.contentScrollHandler_.bind(this)),this.contentScrollHandler_())),this.drawer_){var r=this.element_.querySelector("."+this.CssClasses_.DRAWER_BTN);if(!r){r=document.createElement("div"),r.setAttribute("aria-expanded","false"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.classList.add(this.CssClasses_.DRAWER_BTN);var _=document.createElement("i");_.classList.add(this.CssClasses_.ICON),_.innerHTML=this.Constant_.MENU_ICON,r.appendChild(_)}this.drawer_.classList.contains(this.CssClasses_.ON_LARGE_SCREEN)?r.classList.add(this.CssClasses_.ON_LARGE_SCREEN):this.drawer_.classList.contains(this.CssClasses_.ON_SMALL_SCREEN)&&r.classList.add(this.CssClasses_.ON_SMALL_SCREEN),r.addEventListener("click",this.drawerToggleHandler_.bind(this)),r.addEventListener("keydown",this.drawerToggleHandler_.bind(this)),this.element_.classList.add(this.CssClasses_.HAS_DRAWER),this.element_.classList.contains(this.CssClasses_.FIXED_HEADER)?this.header_.insertBefore(r,this.header_.firstChild):this.element_.insertBefore(r,this.content_);var d=document.createElement("div");d.classList.add(this.CssClasses_.OBFUSCATOR),this.element_.appendChild(d),d.addEventListener("click",this.drawerToggleHandler_.bind(this)),this.obfuscator_=d,this.drawer_.addEventListener("keydown",this.keyboardEventHandler_.bind(this)),this.drawer_.setAttribute("aria-hidden","true")}if(this.screenSizeMediaQuery_=window.matchMedia(this.Constant_.MAX_WIDTH),this.screenSizeMediaQuery_.addListener(this.screenSizeHandler_.bind(this)),this.screenSizeHandler_(),this.header_&&this.tabBar_){this.element_.classList.add(this.CssClasses_.HAS_TABS);var h=document.createElement("div");h.classList.add(this.CssClasses_.TAB_CONTAINER),this.header_.insertBefore(h,this.tabBar_),this.header_.removeChild(this.tabBar_);var c=document.createElement("div");c.classList.add(this.CssClasses_.TAB_BAR_BUTTON),c.classList.add(this.CssClasses_.TAB_BAR_LEFT_BUTTON);var p=document.createElement("i");p.classList.add(this.CssClasses_.ICON),p.textContent=this.Constant_.CHEVRON_LEFT,c.appendChild(p),c.addEventListener("click",function(){this.tabBar_.scrollLeft-=this.Constant_.TAB_SCROLL_PIXELS}.bind(this));var C=document.createElement("div");C.classList.add(this.CssClasses_.TAB_BAR_BUTTON),C.classList.add(this.CssClasses_.TAB_BAR_RIGHT_BUTTON);var u=document.createElement("i");u.classList.add(this.CssClasses_.ICON),u.textContent=this.Constant_.CHEVRON_RIGHT,C.appendChild(u),C.addEventListener("click",function(){this.tabBar_.scrollLeft+=this.Constant_.TAB_SCROLL_PIXELS}.bind(this)),h.appendChild(c),h.appendChild(this.tabBar_),h.appendChild(C);var E=function(){this.tabBar_.scrollLeft>0?c.classList.add(this.CssClasses_.IS_ACTIVE):c.classList.remove(this.CssClasses_.IS_ACTIVE),this.tabBar_.scrollLeft<this.tabBar_.scrollWidth-this.tabBar_.offsetWidth?C.classList.add(this.CssClasses_.IS_ACTIVE):C.classList.remove(this.CssClasses_.IS_ACTIVE)}.bind(this);this.tabBar_.addEventListener("scroll",E),E();var m=function(){this.resizeTimeoutId_&&clearTimeout(this.resizeTimeoutId_),this.resizeTimeoutId_=setTimeout(function(){E(),this.resizeTimeoutId_=null}.bind(this),this.Constant_.RESIZE_TIMEOUT)}.bind(this);window.addEventListener("resize",m),this.tabBar_.classList.contains(this.CssClasses_.JS_RIPPLE_EFFECT)&&this.tabBar_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS);for(var L=this.tabBar_.querySelectorAll("."+this.CssClasses_.TAB),I=this.content_.querySelectorAll("."+this.CssClasses_.PANEL),f=0;f<L.length;f++)new t(L[f],L,I,this)}this.element_.classList.add(this.CssClasses_.IS_UPGRADED)}},window.MaterialLayoutTab=t,s.register({constructor:f,classAsString:"MaterialLayout",cssClass:"mdl-js-layout"});var b=function(e){this.element_=e,this.init()};window.MaterialDataTable=b,b.prototype.Constant_={},b.prototype.CssClasses_={DATA_TABLE:"mdl-data-table",SELECTABLE:"mdl-data-table--selectable",SELECT_ELEMENT:"mdl-data-table__select",IS_SELECTED:"is-selected",IS_UPGRADED:"is-upgraded"},b.prototype.selectRow_=function(e,t,s){return t?function(){e.checked?t.classList.add(this.CssClasses_.IS_SELECTED):t.classList.remove(this.CssClasses_.IS_SELECTED)}.bind(this):s?function(){var t,i;if(e.checked)for(t=0;t<s.length;t++)i=s[t].querySelector("td").querySelector(".mdl-checkbox"),i.MaterialCheckbox.check(),s[t].classList.add(this.CssClasses_.IS_SELECTED);else for(t=0;t<s.length;t++)i=s[t].querySelector("td").querySelector(".mdl-checkbox"),i.MaterialCheckbox.uncheck(),s[t].classList.remove(this.CssClasses_.IS_SELECTED)}.bind(this):void 0},b.prototype.createCheckbox_=function(e,t){var i=document.createElement("label"),n=["mdl-checkbox","mdl-js-checkbox","mdl-js-ripple-effect",this.CssClasses_.SELECT_ELEMENT];i.className=n.join(" ");var a=document.createElement("input");return a.type="checkbox",a.classList.add("mdl-checkbox__input"),e?(a.checked=e.classList.contains(this.CssClasses_.IS_SELECTED),a.addEventListener("change",this.selectRow_(a,e))):t&&a.addEventListener("change",this.selectRow_(a,null,t)),i.appendChild(a),s.upgradeElement(i,"MaterialCheckbox"),i},b.prototype.init=function(){if(this.element_){var e=this.element_.querySelector("th"),t=Array.prototype.slice.call(this.element_.querySelectorAll("tbody tr")),s=Array.prototype.slice.call(this.element_.querySelectorAll("tfoot tr")),i=t.concat(s);if(this.element_.classList.contains(this.CssClasses_.SELECTABLE)){var n=document.createElement("th"),a=this.createCheckbox_(null,i);n.appendChild(a),e.parentElement.insertBefore(n,e);for(var l=0;l<i.length;l++){var o=i[l].querySelector("td");if(o){var r=document.createElement("td");if("TBODY"===i[l].parentNode.nodeName.toUpperCase()){var _=this.createCheckbox_(i[l]);r.appendChild(_)}i[l].insertBefore(r,o)}}this.element_.classList.add(this.CssClasses_.IS_UPGRADED)}}},s.register({constructor:b,classAsString:"MaterialDataTable",cssClass:"mdl-js-data-table"});var y=function(e){this.element_=e,this.init()};window.MaterialRipple=y,y.prototype.Constant_={INITIAL_SCALE:"scale(0.0001, 0.0001)",INITIAL_SIZE:"1px",INITIAL_OPACITY:"0.4",FINAL_OPACITY:"0",FINAL_SCALE:""},y.prototype.CssClasses_={RIPPLE_CENTER:"mdl-ripple--center",RIPPLE_EFFECT_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",RIPPLE:"mdl-ripple",IS_ANIMATING:"is-animating",IS_VISIBLE:"is-visible"},y.prototype.downHandler_=function(e){if(!this.rippleElement_.style.width&&!this.rippleElement_.style.height){var t=this.element_.getBoundingClientRect();this.boundHeight=t.height,this.boundWidth=t.width,this.rippleSize_=2*Math.sqrt(t.width*t.width+t.height*t.height)+2,this.rippleElement_.style.width=this.rippleSize_+"px",this.rippleElement_.style.height=this.rippleSize_+"px"}if(this.rippleElement_.classList.add(this.CssClasses_.IS_VISIBLE),"mousedown"===e.type&&this.ignoringMouseDown_)this.ignoringMouseDown_=!1;else{"touchstart"===e.type&&(this.ignoringMouseDown_=!0);var s=this.getFrameCount();if(s>0)return;this.setFrameCount(1);var i,n,a=e.currentTarget.getBoundingClientRect();if(0===e.clientX&&0===e.clientY)i=Math.round(a.width/2),n=Math.round(a.height/2);else{var l=e.clientX?e.clientX:e.touches[0].clientX,o=e.clientY?e.clientY:e.touches[0].clientY;i=Math.round(l-a.left),n=Math.round(o-a.top)}this.setRippleXY(i,n),this.setRippleStyles(!0),window.requestAnimationFrame(this.animFrameHandler.bind(this))}},y.prototype.upHandler_=function(e){e&&2!==e.detail&&window.setTimeout(function(){this.rippleElement_.classList.remove(this.CssClasses_.IS_VISIBLE)}.bind(this),0)},y.prototype.init=function(){if(this.element_){var e=this.element_.classList.contains(this.CssClasses_.RIPPLE_CENTER);this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT_IGNORE_EVENTS)||(this.rippleElement_=this.element_.querySelector("."+this.CssClasses_.RIPPLE),this.frameCount_=0,this.rippleSize_=0,this.x_=0,this.y_=0,this.ignoringMouseDown_=!1,this.boundDownHandler=this.downHandler_.bind(this),this.element_.addEventListener("mousedown",this.boundDownHandler),this.element_.addEventListener("touchstart",this.boundDownHandler),this.boundUpHandler=this.upHandler_.bind(this),this.element_.addEventListener("mouseup",this.boundUpHandler),this.element_.addEventListener("mouseleave",this.boundUpHandler),this.element_.addEventListener("touchend",this.boundUpHandler),this.element_.addEventListener("blur",this.boundUpHandler),this.getFrameCount=function(){return this.frameCount_},this.setFrameCount=function(e){this.frameCount_=e},this.getRippleElement=function(){return this.rippleElement_},this.setRippleXY=function(e,t){this.x_=e,this.y_=t},this.setRippleStyles=function(t){if(null!==this.rippleElement_){var s,i,n,a="translate("+this.x_+"px, "+this.y_+"px)";t?(i=this.Constant_.INITIAL_SCALE,n=this.Constant_.INITIAL_SIZE):(i=this.Constant_.FINAL_SCALE,n=this.rippleSize_+"px",e&&(a="translate("+this.boundWidth/2+"px, "+this.boundHeight/2+"px)")),s="translate(-50%, -50%) "+a+i,this.rippleElement_.style.webkitTransform=s,this.rippleElement_.style.msTransform=s,this.rippleElement_.style.transform=s,t?this.rippleElement_.classList.remove(this.CssClasses_.IS_ANIMATING):this.rippleElement_.classList.add(this.CssClasses_.IS_ANIMATING)}},this.animFrameHandler=function(){this.frameCount_-->0?window.requestAnimationFrame(this.animFrameHandler.bind(this)):this.setRippleStyles(!1)})}},s.register({constructor:y,classAsString:"MaterialRipple",cssClass:"mdl-js-ripple-effect",widget:!1})}();;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,o=n.length;++u<o;){var i=n[u];t(e,i,r(i),n)}return e}function u(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n}function o(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function i(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function f(n,t){return!!n.length&&-1<d(n,t,0)}function c(n,t,r){for(var e=-1,u=n.length;++e<u;)if(r(t,n[e]))return true;return false}function a(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function l(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function s(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function h(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function p(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function _(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(f===Z?i===i:r(i,f)))var f=i,c=o}return c}function g(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function v(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function d(n,t,r){if(t!==t)return B(n,r);--r;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function y(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function b(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function x(n,t){for(var r,e=-1,u=n.length;++e<u;){var o=t(n[e]);o!==Z&&(r=r===Z?o:r+o)}return r}function m(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function j(n,t){return a(t,function(t){return[t,n[t]]})}function w(n){return function(t){return n(t)}}function A(n,t){return a(t,function(t){return n[t]})}function O(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function k(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function E(n){return n&&n.Object===Object?n:null}function I(n,t){if(n!==t){var r=null===n,e=n===Z,u=n===n,o=null===t,i=t===Z,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function S(n){return Un[n]}function R(n){return zn[n]}function W(n){return"\\"+$n[n]}function B(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function C(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function U(n,t){return n=typeof n=="number"||yn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function z(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function L(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];(i===t||"__lodash_placeholder__"===i)&&(n[r]="__lodash_placeholder__",o[++u]=r)}return o;}function $(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function F(n){if(!n||!En.test(n))return n.length;for(var t=kn.lastIndex=0;kn.test(n);)t++;return t}function N(n){return Mn[n]}function D(E){function yn(n){if(we(n)&&!Zo(n)&&!(n instanceof An)){if(n instanceof wn)return n;if(lu.call(n,"__wrapped__"))return Pr(n)}return new wn(n)}function jn(){}function wn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Z}function An(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Un(){}function zn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Mn(n){var t=-1,r=n?n.length:0;for(this.__data__=new zn;++t<r;)this.push(n[t])}function Ln(n,t){var r=n.__data__;return $r(t)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof t=="string"?r.string:r.hash)[t]):r.has(t)}function $n(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Dn(n,t){var r=Pn(n,t);return 0>r?false:(r==n.length-1?n.pop():Iu.call(n,r,1),true)}function Zn(n,t){var r=Pn(n,t);return 0>r?Z:n[r][1]}function Pn(n,t){for(var r=n.length;r--;)if(pe(n[r][0],t))return r;return-1}function Tn(n,t,r){var e=Pn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Kn(n,t,r,e){return n===Z||pe(n,cu[r])&&!lu.call(e,r)?t:n}function Gn(n,t,r){(r!==Z&&!pe(n[t],r)||typeof t=="number"&&r===Z&&!(t in n))&&(n[t]=r)}function Yn(n,t,r){var e=n[t];lu.call(n,t)&&pe(e,r)&&(r!==Z||t in n)||(n[t]=r)}function Hn(n,t,r,e){return Hu(n,function(n,u,o){t(e,n,r(n),o)}),e}function Qn(n,t){return n&&nr(t,De(t),n)}function Xn(n,t){for(var r=-1,e=null==n,u=t.length,o=Array(u);++r<u;)o[r]=e?Z:$e(n,t[r]);return o}function nt(n){return de(n)?n:[]}function tt(n){return typeof n=="function"?n:Ye}function rt(n){return Zo(n)?n:qr(n)}function et(n,t,r){return n===n&&(r!==Z&&(n=n>r?r:n),t!==Z&&(n=t>n?t:n)),n}function ut(n,t,r,e,o,i){var f;if(r&&(f=o?r(n,e,o,i):r(n)),f!==Z)return f;if(!je(n))return n;if(e=Zo(n)){if(f=Br(n),!t)return Xt(n,f)}else{var c=Rr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if(qo(n))return Jt(n,t);if("[object Object]"==c||"[object Arguments]"==c||a&&!o){if(C(n))return o?n:{};if(f=Cr(a?{}:n),!t)return rr(n,Qn(f,n))}else{if(!Cn[c])return o?n:{};f=Ur(n,c,t)}}return i||(i=new $n),(o=i.get(n))?o:(i.set(n,f),(e?u:pt)(n,function(e,u){Yn(f,u,ut(e,t,r,u,n,i))}),e?f:rr(n,f))}function ot(n){var t=De(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];if(f===Z&&!(o in Object(e))||!i(f))return false}return true}}function it(n){return je(n)?Ou(n):{}}function ft(n,t,r){if(typeof n!="function")throw new iu("Expected a function");return Eu(function(){n.apply(Z,r)},t)}function ct(n,t,r,e){var u=-1,o=f,i=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=a(t,w(r))),e?(o=c,i=false):t.length>=200&&(o=Ln,i=false,t=new Mn(t));n:for(;++u<l;){var p=n[u],_=r?r(p):p;if(i&&_===_){for(var g=h;g--;)if(t[g]===_)continue n;s.push(p)}else o(t,_,e)||s.push(p)}return s}function at(n,t){var r=true;return Hu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function lt(n,t){var r=[];return Hu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function st(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];t>0&&de(i)&&(r||Zo(i)||ge(i))?t>1?st(i,t-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function ht(n,t){return null==n?n:Xu(n,t,Ze)}function pt(n,t){return n&&Xu(n,t,De)}function _t(n,t){return n&&no(n,t,De)}function gt(n,t){return i(t,function(t){return be(n[t])})}function vt(n,t){t=Lr(t,n)?[t+""]:rt(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:Z}function dt(n,t){return lu.call(n,t)||typeof n=="object"&&t in n&&null===ju(n)}function yt(n,t){return t in Object(n)}function bt(n,t,r){for(var e=r?c:f,u=n.length,o=u,i=Array(u),l=[];o--;){var s=n[o];o&&t&&(s=a(s,w(t))),i[o]=r||!t&&120>s.length?Z:new Mn(o&&s)}var s=n[0],h=-1,p=s.length,_=i[0];n:for(;++h<p;){var g=s[h],v=t?t(g):g;if(_?!Ln(_,v):!e(l,v,r)){for(o=u;--o;){var d=i[o];if(d?!Ln(d,v):!e(n[o],v,r))continue n}_&&_.push(v),l.push(g)}}return l}function xt(n,t,r,e){return pt(n,function(n,u,o){t(e,r(n),u,o)}),e}function mt(n,t,e){return Lr(t,n)||(t=rt(t),n=Zr(n,t),t=Vr(t)),t=null==n?n:n[t],null==t?Z:r(t,n,e)}function jt(n,t,r,e,u){if(n===t)return true;if(null==n||null==t||!je(n)&&!we(t))return n!==n&&t!==t;n:{var o=Zo(n),i=Zo(t),f="[object Array]",c="[object Array]";o||(f=Rr(n),"[object Arguments]"==f?f="[object Object]":"[object Object]"!=f&&(o=Re(n))),i||(c=Rr(t),"[object Arguments]"==c?c="[object Object]":"[object Object]"!=c&&Re(t));var a="[object Object]"==f&&!C(n),i="[object Object]"==c&&!C(t),c=f==c;if(!c||o||a){if(!(2&e)&&(f=a&&lu.call(n,"__wrapped__"),i=i&&lu.call(t,"__wrapped__"),f||i)){n=jt(f?n.value():n,i?t.value():t,r,e,u);break n}c?(u||(u=new $n),n=(o?jr:Ar)(n,t,jt,r,e,u)):n=false}else n=wr(n,t,f,jt,r,e)}return n}function wt(n,t,r,e){var u=r.length,o=u,i=!e;if(null==n)return!o;for(n=Object(n);u--;){var f=r[u];if(i&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<o;){var f=r[u],c=f[0],a=n[c],l=f[1];if(i&&f[2]){if(a===Z&&!(c in n))return false;}else if(f=new $n,c=e?e(a,l,c,n,t,f):Z,c===Z?!jt(l,a,e,3,f):!c)return false}return true}function At(n){var t=typeof n;return"function"==t?n:null==n?Ye:"object"==t?Zo(n)?It(n[0],n[1]):Et(n):nu(n)}function Ot(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function kt(n,t){var r=-1,e=ve(n)?Array(n.length):[];return Hu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function Et(n){var t=Er(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:n[r]===e&&(e!==Z||r in Object(n));}}return function(r){return r===n||wt(r,n,t)}}function It(n,t){return function(r){var e=$e(r,n);return e===Z&&e===t?Ne(r,n):jt(t,e,Z,3)}}function St(n,t,r,e,o){if(n!==t){var i=Zo(t)||Re(t)?Z:Ze(t);u(i||t,function(u,f){if(i&&(f=u,u=t[f]),je(u)){o||(o=new $n);var c=f,a=o,l=n[c],s=t[c],h=a.get(s);if(!h){var h=e?e(l,s,c+"",n,t,a):Z,p=h===Z;p&&(h=s,Zo(s)||Re(s)?Zo(l)?h=l:de(l)?h=Xt(l):(p=false,h=ut(s,true)):ke(s)||ge(s)?ge(l)?h=Me(l):!je(l)||r&&be(l)?(p=false,h=ut(s,true)):h=l:p=false),a.set(s,h),p&&St(h,s,r,e,a)} Gn(n,c,h)}else c=e?e(n[f],u,f+"",n,t,o):Z,c===Z&&(c=u),Gn(n,f,c)})}}function Rt(n,t,r){var e=-1,u=kr();return t=a(t.length?t:Array(1),function(n){return u(n)}),n=kt(n,function(n,r,u){return{a:a(t,function(t){return t(n)}),b:++e,c:n}}),b(n,function(n,t){var e;n:{e=-1;for(var u=n.a,o=t.a,i=u.length,f=r.length;++e<i;){var c=I(u[e],o[e]);if(c){if(e>=f){e=c;break n}e=c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function Wt(n,t){return n=Object(n),s(t,function(t,r){return r in n&&(t[r]=n[r]),t},{});}function Bt(n,t){var r={};return ht(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Ct(n){return function(t){return null==t?Z:t[n]}}function Ut(n){return function(t){return vt(t,n)}}function zt(n,t,r){var e=-1,u=t.length,o=n;for(r&&(o=a(n,function(n){return r(n)}));++e<u;)for(var i=0,f=t[e],f=r?r(f):f;-1<(i=d(o,f,i));)o!==n&&Iu.call(o,i,1),Iu.call(n,i,1);return n}function Mt(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(e==r||u!=o){var o=u;if(U(u))Iu.call(n,u,1);else if(Lr(u,n))delete n[u];else{var u=rt(u),i=Zr(n,u);null!=i&&delete i[Vr(u)]}}}return n}function Lt(n,t){return n+Ru(Lu()*(t-n+1))}function $t(n,t,r,e){t=Lr(t,n)?[t+""]:rt(t);for(var u=-1,o=t.length,i=o-1,f=n;null!=f&&++u<o;){var c=t[u];if(je(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):Z;a===Z&&(a=null==l?U(t[u+1])?[]:{}:l)}Yn(f,c,a)}f=f[c]}return n}function Ft(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function Nt(n,t){var r;return Hu(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Dt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return Zt(n,t,Ye,r)}function Zt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===Z;o>u;){var a=Ru((u+o)/2),l=r(n[a]),s=l!==Z,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?t>=l:t>l)?u=a+1:o=a}return zu(o,4294967294)}function qt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=0,c=[u];++r<e;)u=n[r],o=t?t(u):u,pe(o,i)||(i=o,c[++f]=u);return c}function Pt(n,t,r){var e=-1,u=f,o=n.length,i=true,a=[],l=a;if(r)i=false,u=c;else if(o<200)l=t?[]:a;else{if(u=t?null:ro(n))return $(u);i=false,u=Ln,l=new Mn}n:for(;++e<o;){var s=n[e],h=t?t(s):s;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Tt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?Ft(n,e?0:o,e?o+1:u):Ft(n,e?o+1:0,e?u:o)}function Kt(n,t){var r=n;return r instanceof An&&(r=r.value()),s(t,function(n,t){return t.func.apply(t.thisArg,l([n],t.args))},r)}function Gt(n,t,r){for(var e=-1,u=n.length;++e<u;)var o=o?l(ct(o,n[e],t,r),ct(n[e],o,t,r)):n[e];return o&&o.length?Pt(o,t,r):[]}function Vt(n,t,r){for(var e=-1,u=n.length,o=t.length,i={};++e<u;)r(i,n[e],o>e?t[e]:Z);return i}function Jt(n,t){if(t)return n.slice();var r=new n.constructor(n.length);return n.copy(r),r}function Yt(n){var t=new n.constructor(n.byteLength);return new bu(t).set(new bu(n)),t}function Ht(n,t,r,e){var u=-1,o=n.length,i=r.length,f=-1,c=t.length,a=Uu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Qt(n,t,r,e){var u=-1,o=n.length,i=-1,f=r.length,c=-1,a=t.length,l=Uu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=n[u++]);return s}function Xt(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function nr(n,t,r){return tr(n,t,r);}function tr(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],f=e?e(r[i],n[i],i,r,n):n[i];Yn(r,i,f)}return r}function rr(n,t){return nr(n,oo(n),t)}function er(n,t){return function(r,u){var o=Zo(r)?e:Hn,i=t?t():{};return o(r,n,kr(u),i)}}function ur(n){return he(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:Z,i=u>2?r[2]:Z,o=typeof o=="function"?(u--,o):Z;for(i&&Mr(r[0],r[1],i)&&(o=3>u?Z:o,u=1),t=Object(t);++e<u;)(i=r[e])&&n(t,i,e,o);return t})}function or(n,t){return function(r,e){if(null==r)return r;if(!ve(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function ir(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var f=e[n?i:++u];if(false===r(o[f],f,o))break}return t}}function fr(n,t,r){function e(){return(this&&this!==Vn&&this instanceof e?o:n).apply(u?r:this,arguments)}var u=1&t,o=lr(n);return e}function cr(n){return function(t){t=Le(t);var r=En.test(t)?t.match(kn):Z,e=r?r[0]:t.charAt(0);return t=r?r.slice(1).join(""):t.slice(1),e[n]()+t}}function ar(n){return function(t){return s(Ve(Ke(t)),n,"")}}function lr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=it(n.prototype),t=n.apply(r,t);return je(t)?t:r}}function sr(n,t,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Sr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:L(f,a),i-=c.length,e>i?br(n,t,pr,u.placeholder,Z,f,c,Z,Z,e-i):r(this&&this!==Vn&&this instanceof u?o:n,this,f)}var o=lr(n);return u}function hr(n){return he(function(t){t=st(t,1);var r=t.length,e=r,u=wn.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if(typeof o!="function")throw new iu("Expected a function");if(u&&!i&&"wrapper"==Or(o))var i=new wn([],true)}for(e=i?e:r;++e<r;)var o=t[e],u=Or(o),f="wrapper"==u?eo(o):Z,i=f&&Fr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Or(f[0])].apply(i,f[3]):1==o.length&&Fr(o)?i[u]():i.thru(o);return function(){var n=arguments,e=n[0];if(i&&1==n.length&&Zo(e)&&e.length>=200)return i.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function pr(n,t,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,m=Sr(l),y=b.length;for(x=0;y--;)b[y]===m&&x++}if(e&&(b=Ht(b,e,u,_)),o&&(b=Qt(b,o,i,_)),d-=x,_&&a>d)return m=L(b,m),br(n,t,pr,l.placeholder,r,b,m,f,c,a-d);if(m=h?r:this,y=p?m[n]:n,d=b.length,f){x=b.length;for(var j=zu(f.length,x),w=Xt(b);j--;){var A=f[j];b[j]=U(A,x)?w[A]:Z}}else g&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vn&&this instanceof l&&(y=v||lr(y)),y.apply(m,b)}var s=128&t,h=1&t,p=2&t,_=24&t,g=512&t,v=p?Z:lr(n);return l}function _r(n,t){return function(r,e){return xt(r,n,t(e),{})}}function gr(n){return he(function(t){return t=a(st(t,1),kr()),he(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function vr(n,t,r){return t=Ce(t),n=F(n),t&&t>n?(t-=n,r=r===Z?" ":r+"",n=Ge(r,Su(t/F(r))),En.test(r)?n.match(kn).slice(0,t).join(""):n.slice(0,t)):""}function dr(n,t,e,u){function o(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vn&&this instanceof o?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,i?e:this,s)}var i=1&t,f=lr(n);return o}function yr(n){return function(t,r,e){e&&typeof e!="number"&&Mr(t,r,e)&&(r=e=Z),t=ze(t),t=t===t?t:0,r===Z?(r=t,t=0):r=ze(r)||0,e=e===Z?r>t?1:-1:ze(e)||0;var u=-1;r=Uu(Su((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t,t+=e;return o}}function br(n,t,r,e,u,o,i,f,c,a){var l=8&t;f=f?Xt(f):Z;var s=l?i:Z;i=l?Z:i;var h=l?o:Z;return o=l?Z:o,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),t=[n,t,u,h,s,o,i,f,c,a],r=r.apply(Z,t),Fr(n)&&io(r,t),r.placeholder=e,r}function xr(n){var t=uu[n];return function(n,r){if(n=ze(n),r=Ce(r)){var e=(Le(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Le(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function mr(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&typeof n!="function")throw new iu("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=Z),i=i===Z?i:Uu(Ce(i),0),f=f===Z?f:Ce(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=Z}var h=c?Z:eo(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(r=o[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Ht(e,r,h[4]):Xt(r),o[4]=e?L(o[3],"__lodash_placeholder__"):Xt(h[4])),(r=h[5])&&(e=o[5],o[5]=e?Qt(e,r,h[6]):Xt(r),o[6]=e?L(o[5],"__lodash_placeholder__"):Xt(h[6])),(r=h[7])&&(o[7]=Xt(r)),128&n&&(o[8]=null==o[8]?h[8]:zu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:n.length:Uu(o[9]-a,0),!f&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?sr(n,t,f):32!=t&&33!=t||u.length?pr.apply(Z,o):dr(n,t,r,e):fr(n,t,r),(h?to:io)(c,o)}function jr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return false;if(l=o.get(n))return l==t;for(l=true,o.set(n,t);++i<a;){var s=n[i],h=t[i];if(e)var _=f?e(h,s,i,t,n,o):e(s,h,i,n,t,o);if(_!==Z){if(_)continue;l=false;break}if(c){if(!p(t,function(n){return s===n||r(s,n,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](n),l}function wr(n,t,r,e,u,o){switch(r){case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!e(new bu(n),new bu(t)))break;return true;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var i=M;case"[object Set]":return i||(i=$),(2&o||n.size==t.size)&&e(i(n),i(t),u,1|o);case"[object Symbol]":return!!yu&&Vu.call(n)==Vu.call(t)}return false}function Ar(n,t,r,e,u,o){var i=2&u,f=De(n),c=f.length,a=De(t).length;if(c!=a&&!i)return false;for(var l=c;l--;){var s=f[l];if(!(i?s in t:dt(t,s)))return false}if(a=o.get(n))return a==t;a=true,o.set(n,t);for(var h=i;++l<c;){var s=f[l],p=n[s],_=t[s];if(e)var g=i?e(_,p,s,t,n,o):e(p,_,s,n,t,o);if(g===Z?p!==_&&!r(p,_,e,u,o):!g){a=false;break}h||(h="constructor"==s)}return a&&!h&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),o["delete"](n),a}function Or(n){for(var t=n.name+"",r=Yu[t],e=lu.call(Yu,t)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function kr(){var n=yn.iteratee||He,n=n===He?At:n;return arguments.length?n(arguments[0],arguments[1]):n}function Er(n){n=qe(n);for(var t=n.length;t--;){var r,e=n[t];r=n[t][1],r=r===r&&!je(r),e[2]=r}return n}function Ir(n,t){var r=null==n?Z:n[t];return Ae(r)?r:Z}function Sr(n){return(lu.call(yn,"placeholder")?yn:n).placeholder}function Rr(n){return pu.call(n)}function Wr(n,t,r){if(null==n)return false;var e=r(n,t);return e||Lr(t)||(t=rt(t),n=Zr(n,t),null!=n&&(t=Vr(t),e=r(n,t))),r=n?n.length:Z,e||!!r&&me(r)&&U(t,r)&&(Zo(n)||Ie(n)||ge(n))}function Br(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&lu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Cr(n){return be(n.constructor)&&!Nr(n)?it(ju(n)):{}}function Ur(r,e,u){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Yt(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=r.buffer,u=u?Yt(e):e,new r.constructor(u,r.byteOffset,r.length);case"[object Map]":return u=r.constructor,s(M(r),n,new u);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return u=new r.constructor(r.source,hn.exec(r)),u.lastIndex=r.lastIndex,u;case"[object Set]":return u=r.constructor,s($(r),t,new u);case"[object Symbol]":return yu?Object(Vu.call(r)):{}}}function zr(n){var t=n?n.length:Z;return me(t)&&(Zo(n)||Ie(n)||ge(n))?m(t,String):null}function Mr(n,t,r){if(!je(r))return false;var e=typeof t;return("number"==e?ve(r)&&U(t,r.length):"string"==e&&t in r)?pe(r[t],n):false}function Lr(n,t){return typeof n=="number"?true:!Zo(n)&&(rn.test(n)||!tn.test(n)||null!=t&&n in Object(t))}function $r(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=n||null==n}function Fr(n){var t=Or(n),r=yn[t];return typeof r=="function"&&t in An.prototype?n===r?true:(t=eo(r),!!t&&n===t[0]):false}function Nr(n){var t=n&&n.constructor,t=be(t)&&t.prototype||cu;return n===t}function Dr(n,t,r,e,u,o){return je(n)&&je(t)&&(o.set(t,n),St(n,t,Z,Dr,o)),n}function Zr(n,t){return 1==t.length?n:$e(n,Ft(t,0,-1))}function qr(n){var t=[];return Le(n).replace(en,function(n,r,e,u){t.push(e?u.replace(ln,"$1"):r||n)}),t}function Pr(n){if(n instanceof An)return n.clone();var t=new wn(n.__wrapped__,n.__chain__);return t.__actions__=Xt(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Tr(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),Ft(n,0>t?0:t,e)):[]}function Kr(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),t=e-t,Ft(n,0,0>t?0:t)):[]}function Gr(n){return n?n[0]:Z}function Vr(n){var t=n?n.length:0;return t?n[t-1]:Z}function Jr(n,t){return n&&n.length&&t&&t.length?zt(n,t):n}function Yr(n){return n?$u.call(n):n}function Hr(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){return de(n)?(t=Uu(n.length,t),true):void 0}),m(t,function(t){return a(n,Ct(t))})}function Qr(n,t){if(!n||!n.length)return[];var e=Hr(n);return null==t?e:a(e,function(n){return r(t,Z,n)})}function Xr(n){return n=yn(n),n.__chain__=true,n}function ne(n,t){return t(n)}function te(){return this}function re(n,t){return typeof t=="function"&&Zo(n)?u(n,t):Hu(n,tt(t))}function ee(n,t){var r;if(typeof t=="function"&&Zo(n)){for(r=n.length;r--&&false!==t(n[r],r,n););r=n}else r=Qu(n,tt(t));return r}function ue(n,t){return(Zo(n)?a:kt)(n,kr(t,3))}function oe(n,t){var r=-1,e=Be(n),u=e.length,o=u-1;for(t=et(Ce(t),0,u);++r<t;){var u=Lt(r,o),i=e[u];e[u]=e[r],e[r]=i}return e.length=t,e}function ie(n,t,r){return t=r?Z:t,t=n&&null==t?n.length:t,mr(n,128,Z,Z,Z,Z,t);}function fe(n,t){var r;if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function ce(n,t,r){return t=r?Z:t,n=mr(n,8,Z,Z,Z,Z,Z,t),n.placeholder=ce.placeholder,n}function ae(n,t,r){return t=r?Z:t,n=mr(n,16,Z,Z,Z,Z,Z,t),n.placeholder=ae.placeholder,n}function le(n,t,r){function e(){p&&xu(p),a&&xu(a),g=0,c=a=h=p=_=Z}function u(t,r){r&&xu(r),a=p=_=Z,t&&(g=Co(),l=n.apply(h,c),p||a||(c=h=Z))}function o(){var n=t-(Co()-s);0>=n||n>t?u(_,a):p=Eu(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=Co(),h=this,_=y&&(p||!v),false===d)var r=v&&!p;else{g||a||v||(g=s);var e=d-(s-g),u=(0>=e||e>d)&&(v||a);u?(a&&(a=xu(a)),g=s,l=n.apply(h,c)):a||(a=Eu(i,e))}return u&&p?p=xu(p):p||t===d||(p=Eu(o,t)),r&&(u=true,l=n.apply(h,c)),!u||p||a||(c=h=Z),l}var c,a,l,s,h,p,_,g=0,v=false,d=false,y=true;if(typeof n!="function")throw new iu("Expected a function");return t=ze(t)||0,je(r)&&(v=!!r.leading,d="maxWait"in r&&Uu(ze(r.maxWait)||0,t),y="trailing"in r?!!r.trailing:y),f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new iu("Expected a function");var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function he(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=Uu(t===Z?n.length-1:Ce(t),0),function(){for(var e=arguments,u=-1,o=Uu(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];switch(t){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}for(o=Array(t+1),u=-1;++u<t;)o[u]=e[u];return o[t]=i,r(n,this,o)}}function pe(n,t){return n===t||n!==n&&t!==t}function _e(n,t){return n>t}function ge(n){return de(n)&&lu.call(n,"callee")&&(!ku.call(n,"callee")||"[object Arguments]"==pu.call(n))}function ve(n){return null!=n&&!(typeof n=="function"&&be(n))&&me(uo(n))}function de(n){return we(n)&&ve(n)}function ye(n){return we(n)?"[object Error]"==pu.call(n)||typeof n.message=="string"&&typeof n.name=="string":false;}function be(n){return n=je(n)?pu.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function xe(n){return typeof n=="number"&&n==Ce(n)}function me(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function je(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function we(n){return!!n&&typeof n=="object"}function Ae(n){return null==n?false:be(n)?gu.test(au.call(n)):we(n)&&(C(n)?gu:vn).test(n)}function Oe(n){return typeof n=="number"||we(n)&&"[object Number]"==pu.call(n);}function ke(n){return!we(n)||"[object Object]"!=pu.call(n)||C(n)?false:(n=ju(n),null===n?true:(n=n.constructor,typeof n=="function"&&n instanceof n&&au.call(n)==hu))}function Ee(n){return je(n)&&"[object RegExp]"==pu.call(n)}function Ie(n){return typeof n=="string"||!Zo(n)&&we(n)&&"[object String]"==pu.call(n)}function Se(n){return typeof n=="symbol"||we(n)&&"[object Symbol]"==pu.call(n)}function Re(n){return we(n)&&me(n.length)&&!!Bn[pu.call(n)]}function We(n,t){return t>n}function Be(n){if(!n)return[];if(ve(n))return Ie(n)?n.match(kn):Xt(n);if(Au&&n[Au])return z(n[Au]());var t=Rr(n);return("[object Map]"==t?M:"[object Set]"==t?$:Pe)(n)}function Ce(n){if(!n)return 0===n?n:0;if(n=ze(n),n===q||n===-q)return 1.7976931348623157e308*(0>n?-1:1);var t=n%1;return n===n?t?n-t:n:0}function Ue(n){return n?et(Ce(n),0,4294967295):0}function ze(n){if(je(n)&&(n=be(n.valueOf)?n.valueOf():n,n=je(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(fn,"");var t=gn.test(n);return t||dn.test(n)?Nn(n.slice(2),t?2:8):_n.test(n)?P:+n;}function Me(n){return nr(n,Ze(n))}function Le(n){if(typeof n=="string")return n;if(null==n)return"";if(Se(n))return yu?Ju.call(n):"";var t=n+"";return"0"==t&&1/n==-q?"-0":t}function $e(n,t,r){return n=null==n?Z:vt(n,t),n===Z?r:n}function Fe(n,t){return Wr(n,t,dt)}function Ne(n,t){return Wr(n,t,yt)}function De(n){var t=Nr(n);if(!t&&!ve(n))return Cu(Object(n));var r,e=zr(n),u=!!e,e=e||[],o=e.length;for(r in n)!dt(n,r)||u&&("length"==r||U(r,o))||t&&"constructor"==r||e.push(r);return e}function Ze(n){for(var t=-1,r=Nr(n),e=Ot(n),u=e.length,o=zr(n),i=!!o,o=o||[],f=o.length;++t<u;){var c=e[t];i&&("length"==c||U(c,f))||"constructor"==c&&(r||!lu.call(n,c))||o.push(c)}return o}function qe(n){return j(n,De(n))}function Pe(n){return n?A(n,De(n)):[]}function Te(n){return ci(Le(n).toLowerCase())}function Ke(n){return(n=Le(n))&&n.replace(bn,S).replace(On,"")}function Ge(n,t){n=Le(n),t=Ce(t);var r="";if(!n||1>t||t>9007199254740991)return r;do t%2&&(r+=n),t=Ru(t/2),n+=n;while(t);return r}function Ve(n,t,r){return n=Le(n),t=r?Z:t,t===Z&&(t=Rn.test(n)?Sn:In),n.match(t)||[]}function Je(n){return function(){return n}}function Ye(n){return n}function He(n){return At(typeof n=="function"?n:ut(n,true))}function Qe(n,t,r){var e=De(t),o=gt(t,e);null!=r||je(t)&&(o.length||!e.length)||(r=t,t=n,n=this,o=gt(t,De(t)));var i=je(r)&&"chain"in r?r.chain:true,f=be(n);return u(o,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Xt(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,l([this.value()],arguments))})}),n}function Xe(){}function nu(n){return Lr(n)?Ct(n):Ut(n)}function tu(n){return n&&n.length?x(n,Ye):0}E=E?Jn.defaults({},E,Jn.pick(Vn,Wn)):Vn;var ru=E.Date,eu=E.Error,uu=E.Math,ou=E.RegExp,iu=E.TypeError,fu=E.Array.prototype,cu=E.Object.prototype,au=E.Function.prototype.toString,lu=cu.hasOwnProperty,su=0,hu=au.call(Object),pu=cu.toString,_u=Vn._,gu=ou("^"+au.call(lu).replace(un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vu=qn?E.Buffer:Z,du=E.Reflect,yu=E.Symbol,bu=E.Uint8Array,xu=E.clearTimeout,mu=du?du.enumerate:Z,ju=Object.getPrototypeOf,wu=Object.getOwnPropertySymbols,Au=typeof(Au=yu&&yu.iterator)=="symbol"?Au:Z,Ou=Object.create,ku=cu.propertyIsEnumerable,Eu=E.setTimeout,Iu=fu.splice,Su=uu.ceil,Ru=uu.floor,Wu=E.isFinite,Bu=fu.join,Cu=Object.keys,Uu=uu.max,zu=uu.min,Mu=E.parseInt,Lu=uu.random,$u=fu.reverse,Fu=Ir(E,"Map"),Nu=Ir(E,"Set"),Du=Ir(E,"WeakMap"),Zu=Ir(Object,"create"),qu=Du&&new Du,Pu=Fu?au.call(Fu):"",Tu=Nu?au.call(Nu):"",Ku=Du?au.call(Du):"",Gu=yu?yu.prototype:Z,Vu=yu?Gu.valueOf:Z,Ju=yu?Gu.toString:Z,Yu={};yn.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:yn}};var Hu=or(pt),Qu=or(_t,true),Xu=ir(),no=ir(true);mu&&!ku.call({valueOf:1},"valueOf")&&(Ot=function(n){return z(mu(n))});var to=qu?function(n,t){return qu.set(n,t),n}:Ye,ro=Nu&&2===new Nu([1,2]).size?function(n){return new Nu(n)}:Xe,eo=qu?function(n){return qu.get(n)}:Xe,uo=Ct("length"),oo=wu||function(){return[]};(Fu&&"[object Map]"!=Rr(new Fu)||Nu&&"[object Set]"!=Rr(new Nu)||Du&&"[object WeakMap]"!=Rr(new Du))&&(Rr=function(n){var t=pu.call(n);if(n="[object Object]"==t?n.constructor:null,n=typeof n=="function"?au.call(n):"")switch(n){case Pu:return"[object Map]";case Tu:return"[object Set]";case Ku:return"[object WeakMap]"}return t});var io=function(){var n=0,t=0;return function(r,e){var u=Co(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;return to(r,e)}}(),fo=he(function(n,t){Zo(n)||(n=null==n?[]:[Object(n)]),t=st(t,1);for(var r=n,e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u<o;)c[u]=r[u];for(;++i<f;)c[u++]=e[i];return c}),co=he(function(n,t){return de(n)?ct(n,st(t,1,true)):[]}),ao=he(function(n,t){var r=Vr(t);return de(r)&&(r=Z),de(n)?ct(n,st(t,1,true),kr(r)):[]}),lo=he(function(n,t){var r=Vr(t);return de(r)&&(r=Z),de(n)?ct(n,st(t,1,true),Z,r):[]}),so=he(function(n){var t=a(n,nt);return t.length&&t[0]===n[0]?bt(t):[]}),ho=he(function(n){var t=Vr(n),r=a(n,nt);return t===Vr(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?bt(r,kr(t)):[]}),po=he(function(n){var t=Vr(n),r=a(n,nt);return t===Vr(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?bt(r,Z,t):[];}),_o=he(Jr),go=he(function(n,t){t=a(st(t,1),String);var r=Xn(n,t);return Mt(n,t.sort(I)),r}),vo=he(function(n){return Pt(st(n,1,true))}),yo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Pt(st(n,1,true),kr(t))}),bo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Pt(st(n,1,true),Z,t)}),xo=he(function(n,t){return de(n)?ct(n,t):[]}),mo=he(function(n){return Gt(i(n,de))}),jo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Gt(i(n,de),kr(t))}),wo=he(function(n){var t=Vr(n);return de(t)&&(t=Z),Gt(i(n,de),Z,t)}),Ao=he(Hr),Oo=he(function(n){var t=n.length,t=t>1?n[t-1]:Z,t=typeof t=="function"?(n.pop(),t):Z;return Qr(n,t)}),ko=he(function(n){n=st(n,1);var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Xn(t,n)};return 1>=t&&!this.__actions__.length&&e instanceof An&&U(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:ne,args:[u],thisArg:Z}),new wn(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Z),n})):this.thru(u)}),Eo=er(function(n,t,r){lu.call(n,r)?++n[r]:n[r]=1}),Io=er(function(n,t,r){lu.call(n,r)?n[r].push(t):n[r]=[t];}),So=he(function(n,t,e){var u=-1,o=typeof t=="function",i=Lr(t),f=ve(n)?Array(n.length):[];return Hu(n,function(n){var c=o?t:i&&null!=n?n[t]:Z;f[++u]=c?r(c,n,e):mt(n,t,e)}),f}),Ro=er(function(n,t,r){n[r]=t}),Wo=er(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Bo=he(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Mr(n,t[0],t[1])?t=[]:r>2&&Mr(t[0],t[1],t[2])&&(t.length=1),Rt(n,st(t,1),[])}),Co=ru.now,Uo=he(function(n,t,r){var e=1;if(r.length)var u=L(r,Sr(Uo)),e=32|e;return mr(n,e,t,r,u);}),zo=he(function(n,t,r){var e=3;if(r.length)var u=L(r,Sr(zo)),e=32|e;return mr(t,e,n,r,u)}),Mo=he(function(n,t){return ft(n,1,t)}),Lo=he(function(n,t,r){return ft(n,ze(t)||0,r)}),$o=he(function(n,t){t=a(st(t,1),kr());var e=t.length;return he(function(u){for(var o=-1,i=zu(u.length,e);++o<i;)u[o]=t[o].call(this,u[o]);return r(n,this,u)})}),Fo=he(function(n,t){var r=L(t,Sr(Fo));return mr(n,32,Z,t,r)}),No=he(function(n,t){var r=L(t,Sr(No));return mr(n,64,Z,t,r)}),Do=he(function(n,t){return mr(n,256,Z,Z,Z,st(t,1));}),Zo=Array.isArray,qo=vu?function(n){return n instanceof vu}:Je(false),Po=ur(function(n,t){nr(t,De(t),n)}),To=ur(function(n,t){nr(t,Ze(t),n)}),Ko=ur(function(n,t,r,e){tr(t,Ze(t),n,e)}),Go=ur(function(n,t,r,e){tr(t,De(t),n,e)}),Vo=he(function(n,t){return Xn(n,st(t,1))}),Jo=he(function(n){return n.push(Z,Kn),r(Ko,Z,n)}),Yo=he(function(n){return n.push(Z,Dr),r(ti,Z,n)}),Ho=_r(function(n,t,r){n[t]=r},Je(Ye)),Qo=_r(function(n,t,r){lu.call(n,t)?n[t].push(r):n[t]=[r]},kr),Xo=he(mt),ni=ur(function(n,t,r){St(n,t,r);}),ti=ur(function(n,t,r,e){St(n,t,r,e)}),ri=he(function(n,t){return null==n?{}:(t=a(st(t,1),String),Wt(n,ct(Ze(n),t)))}),ei=he(function(n,t){return null==n?{}:Wt(n,st(t,1))}),ui=ar(function(n,t,r){return t=t.toLowerCase(),n+(r?Te(t):t)}),oi=ar(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),ii=ar(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),fi=cr("toLowerCase"),ci=cr("toUpperCase"),ai=ar(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),li=ar(function(n,t,r){return n+(r?" ":"")+Te(t);}),si=ar(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),hi=he(function(n,t){try{return r(n,Z,t)}catch(e){return ye(e)?e:new eu(e)}}),pi=he(function(n,t){return u(st(t,1),function(t){n[t]=Uo(n[t],n)}),n}),_i=hr(),gi=hr(true),vi=he(function(n,t){return function(r){return mt(r,n,t)}}),di=he(function(n,t){return function(r){return mt(n,r,t)}}),yi=gr(a),bi=gr(o),xi=gr(p),mi=yr(),ji=yr(true),wi=xr("ceil"),Ai=xr("floor"),Oi=xr("round");return yn.prototype=jn.prototype,wn.prototype=it(jn.prototype),wn.prototype.constructor=wn,An.prototype=it(jn.prototype),An.prototype.constructor=An,Un.prototype=Zu?Zu(null):cu,zn.prototype.clear=function(){this.__data__={hash:new Un,map:Fu?new Fu:[],string:new Un}},zn.prototype["delete"]=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,(Zu?t[n]!==Z:lu.call(t,n))&&delete t[n]):Fu?t.map["delete"](n):Dn(t.map,n)},zn.prototype.get=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,Zu?(n=t[n],n="__lodash_hash_undefined__"===n?Z:n):n=lu.call(t,n)?t[n]:Z,n):Fu?t.map.get(n):Zn(t.map,n)},zn.prototype.has=function(n){var t=this.__data__;return $r(n)?(t=typeof n=="string"?t.string:t.hash,n=Zu?t[n]!==Z:lu.call(t,n)):n=Fu?t.map.has(n):-1<Pn(t.map,n),n},zn.prototype.set=function(n,t){var r=this.__data__;return $r(n)?(typeof n=="string"?r.string:r.hash)[n]=Zu&&t===Z?"__lodash_hash_undefined__":t:Fu?r.map.set(n,t):Tn(r.map,n,t),this},Mn.prototype.push=function(n){var t=this.__data__;$r(n)?(t=t.__data__,(typeof n=="string"?t.string:t.hash)[n]="__lodash_hash_undefined__"):t.set(n,"__lodash_hash_undefined__");},$n.prototype.clear=function(){this.__data__={array:[],map:null}},$n.prototype["delete"]=function(n){var t=this.__data__,r=t.array;return r?Dn(r,n):t.map["delete"](n)},$n.prototype.get=function(n){var t=this.__data__,r=t.array;return r?Zn(r,n):t.map.get(n)},$n.prototype.has=function(n){var t=this.__data__,r=t.array;return r?-1<Pn(r,n):t.map.has(n)},$n.prototype.set=function(n,t){var r=this.__data__,e=r.array;return e&&(199>e.length?Tn(e,n,t):(r.array=null,r.map=new zn(e))),(r=r.map)&&r.set(n,t),this},se.Cache=zn,yn.after=function(n,t){if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 1>--n?t.apply(this,arguments):void 0}},yn.ary=ie,yn.assign=Po,yn.assignIn=To,yn.assignInWith=Ko,yn.assignWith=Go,yn.at=Vo,yn.before=fe,yn.bind=Uo,yn.bindAll=pi,yn.bindKey=zo,yn.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Zo(n)?n:[n]},yn.chain=Xr,yn.chunk=function(n,t){t=Uu(Ce(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=-1,o=Array(Su(r/t));r>e;)o[++u]=Ft(n,e,e+=t);return o},yn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},yn.concat=fo,yn.cond=function(n){var t=n?n.length:0,e=kr();return n=t?a(n,function(n){if("function"!=typeof n[1])throw new iu("Expected a function");return[e(n[0]),n[1]]}):[],he(function(e){for(var u=-1;++u<t;){var o=n[u];if(r(o[0],this,e))return r(o[1],this,e)}})},yn.conforms=function(n){return ot(ut(n,true))},yn.constant=Je,yn.countBy=Eo,yn.create=function(n,t){var r=it(n);return t?Qn(r,t):r;},yn.curry=ce,yn.curryRight=ae,yn.debounce=le,yn.defaults=Jo,yn.defaultsDeep=Yo,yn.defer=Mo,yn.delay=Lo,yn.difference=co,yn.differenceBy=ao,yn.differenceWith=lo,yn.drop=Tr,yn.dropRight=Kr,yn.dropRightWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),true,true):[]},yn.dropWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),true):[]},yn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Mr(n,t,r)&&(r=0,e=u),u=n.length,r=Ce(r),0>r&&(r=-r>u?0:u+r),e=e===Z||e>u?u:Ce(e),0>e&&(e+=u),e=r>e?0:Ue(e);e>r;)n[r++]=t;return n},yn.filter=function(n,t){return(Zo(n)?i:lt)(n,kr(t,3))},yn.flatMap=function(n,t){return st(ue(n,t),1)},yn.flatten=function(n){return n&&n.length?st(n,1):[]},yn.flattenDeep=function(n){return n&&n.length?st(n,q):[]},yn.flattenDepth=function(n,t){return n&&n.length?(t=t===Z?1:Ce(t),st(n,t)):[]},yn.flip=function(n){return mr(n,512)},yn.flow=_i,yn.flowRight=gi,yn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},yn.functions=function(n){return null==n?[]:gt(n,De(n))},yn.functionsIn=function(n){return null==n?[]:gt(n,Ze(n))},yn.groupBy=Io,yn.initial=function(n){return Kr(n,1)},yn.intersection=so,yn.intersectionBy=ho,yn.intersectionWith=po,yn.invert=Ho,yn.invertBy=Qo,yn.invokeMap=So,yn.iteratee=He,yn.keyBy=Ro,yn.keys=De,yn.keysIn=Ze,yn.map=ue,yn.mapKeys=function(n,t){var r={};return t=kr(t,3),pt(n,function(n,e,u){r[t(n,e,u)]=n}),r},yn.mapValues=function(n,t){var r={};return t=kr(t,3),pt(n,function(n,e,u){r[e]=t(n,e,u)}),r},yn.matches=function(n){return Et(ut(n,true))},yn.matchesProperty=function(n,t){return It(n,ut(t,true))},yn.memoize=se,yn.merge=ni,yn.mergeWith=ti,yn.method=vi,yn.methodOf=di,yn.mixin=Qe,yn.negate=function(n){if(typeof n!="function")throw new iu("Expected a function");return function(){return!n.apply(this,arguments)}},yn.nthArg=function(n){return n=Ce(n),function(){return arguments[n]}},yn.omit=ri,yn.omitBy=function(n,t){return t=kr(t),Bt(n,function(n,r){return!t(n,r)})},yn.once=function(n){return fe(2,n)},yn.orderBy=function(n,t,r,e){return null==n?[]:(Zo(t)||(t=null==t?[]:[t]),r=e?Z:r,Zo(r)||(r=null==r?[]:[r]),Rt(n,t,r))},yn.over=yi,yn.overArgs=$o,yn.overEvery=bi,yn.overSome=xi,yn.partial=Fo,yn.partialRight=No,yn.partition=Wo,yn.pick=ei,yn.pickBy=function(n,t){return null==n?{}:Bt(n,kr(t))},yn.property=nu,yn.propertyOf=function(n){return function(t){return null==n?Z:vt(n,t)}},yn.pull=_o,yn.pullAll=Jr,yn.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?zt(n,t,kr(r)):n},yn.pullAt=go,yn.range=mi,yn.rangeRight=ji,yn.rearg=Do,yn.reject=function(n,t){var r=Zo(n)?i:lt;return t=kr(t,3),r(n,function(n,r,e){return!t(n,r,e)})},yn.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],o=n.length;for(t=kr(t,3);++e<o;){var i=n[e];t(i,e,n)&&(r.push(i),u.push(e))}return Mt(n,u),r},yn.rest=he,yn.reverse=Yr,yn.sampleSize=oe,yn.set=function(n,t,r){return null==n?n:$t(n,t,r)},yn.setWith=function(n,t,r,e){return e=typeof e=="function"?e:Z,null==n?n:$t(n,t,r,e)},yn.shuffle=function(n){return oe(n,4294967295)},yn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&Mr(n,t,r)?(t=0,r=e):(t=null==t?0:Ce(t),r=r===Z?e:Ce(r)),Ft(n,t,r)):[]},yn.sortBy=Bo,yn.sortedUniq=function(n){return n&&n.length?qt(n):[]},yn.sortedUniqBy=function(n,t){return n&&n.length?qt(n,kr(t)):[]},yn.split=function(n,t,r){return Le(n).split(t,r)},yn.spread=function(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=t===Z?0:Uu(Ce(t),0),he(function(e){var u=e[t];return e=e.slice(0,t),u&&l(e,u),r(n,this,e)})},yn.tail=function(n){return Tr(n,1)},yn.take=function(n,t,r){return n&&n.length?(t=r||t===Z?1:Ce(t),Ft(n,0,0>t?0:t)):[]},yn.takeRight=function(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),t=e-t,Ft(n,0>t?0:t,e)):[]},yn.takeRightWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),false,true):[]},yn.takeWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3)):[]},yn.tap=function(n,t){return t(n),n},yn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new iu("Expected a function");return je(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:t,trailing:u})},yn.thru=ne,yn.toArray=Be,yn.toPairs=qe,yn.toPairsIn=function(n){return j(n,Ze(n))},yn.toPath=function(n){return Zo(n)?a(n,String):qr(n)},yn.toPlainObject=Me,yn.transform=function(n,t,r){var e=Zo(n)||Re(n);if(t=kr(t,4),null==r)if(e||je(n)){var o=n.constructor;r=e?Zo(n)?new o:[]:be(o)?it(ju(n)):{}}else r={};return(e?u:pt)(n,function(n,e,u){return t(r,n,e,u)}),r},yn.unary=function(n){return ie(n,1)},yn.union=vo,yn.unionBy=yo,yn.unionWith=bo,yn.uniq=function(n){return n&&n.length?Pt(n):[]},yn.uniqBy=function(n,t){return n&&n.length?Pt(n,kr(t)):[]},yn.uniqWith=function(n,t){return n&&n.length?Pt(n,Z,t):[]},yn.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Lr(e,r)?[e+""]:rt(e);r=Zr(r,e),e=Vr(e),r=null!=r&&Fe(r,e)?delete r[e]:true}return r},yn.unzip=Hr,yn.unzipWith=Qr,yn.values=Pe,yn.valuesIn=function(n){return null==n?[]:A(n,Ze(n))},yn.without=xo,yn.words=Ve,yn.wrap=function(n,t){return t=null==t?Ye:t,Fo(t,n);},yn.xor=mo,yn.xorBy=jo,yn.xorWith=wo,yn.zip=Ao,yn.zipObject=function(n,t){return Vt(n||[],t||[],Yn)},yn.zipObjectDeep=function(n,t){return Vt(n||[],t||[],$t)},yn.zipWith=Oo,yn.extend=To,yn.extendWith=Ko,Qe(yn,yn),yn.add=function(n,t){var r;return n===Z&&t===Z?0:(n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r+t),r)},yn.attempt=hi,yn.camelCase=ui,yn.capitalize=Te,yn.ceil=wi,yn.clamp=function(n,t,r){return r===Z&&(r=t,t=Z),r!==Z&&(r=ze(r),r=r===r?r:0),t!==Z&&(t=ze(t),t=t===t?t:0),et(ze(n),t,r)},yn.clone=function(n){return ut(n)},yn.cloneDeep=function(n){return ut(n,true)},yn.cloneDeepWith=function(n,t){return ut(n,true,t)},yn.cloneWith=function(n,t){return ut(n,false,t)},yn.deburr=Ke,yn.endsWith=function(n,t,r){n=Le(n),t=typeof t=="string"?t:t+"";var e=n.length;return r=r===Z?e:et(Ce(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r},yn.eq=pe,yn.escape=function(n){return(n=Le(n))&&H.test(n)?n.replace(J,R):n},yn.escapeRegExp=function(n){return(n=Le(n))&&on.test(n)?n.replace(un,"\\$&"):n},yn.every=function(n,t,r){var e=Zo(n)?o:at;return r&&Mr(n,t,r)&&(t=Z),e(n,kr(t,3))},yn.find=function(n,t){if(t=kr(t,3),Zo(n)){var r=v(n,t);return r>-1?n[r]:Z}return g(n,t,Hu)},yn.findIndex=function(n,t){return n&&n.length?v(n,kr(t,3)):-1},yn.findKey=function(n,t){return g(n,kr(t,3),pt,true)},yn.findLast=function(n,t){if(t=kr(t,3),Zo(n)){var r=v(n,t,true);return r>-1?n[r]:Z}return g(n,t,Qu)},yn.findLastIndex=function(n,t){return n&&n.length?v(n,kr(t,3),true):-1},yn.findLastKey=function(n,t){return g(n,kr(t,3),_t,true)},yn.floor=Ai,yn.forEach=re,yn.forEachRight=ee,yn.forIn=function(n,t){return null==n?n:Xu(n,tt(t),Ze)},yn.forInRight=function(n,t){return null==n?n:no(n,tt(t),Ze)},yn.forOwn=function(n,t){return n&&pt(n,tt(t))},yn.forOwnRight=function(n,t){return n&&_t(n,tt(t))},yn.get=$e,yn.gt=_e,yn.gte=function(n,t){return n>=t},yn.has=Fe,yn.hasIn=Ne,yn.head=Gr,yn.identity=Ye,yn.includes=function(n,t,r,e){return n=ve(n)?n:Pe(n),r=r&&!e?Ce(r):0,e=n.length,0>r&&(r=Uu(e+r,0)),Ie(n)?e>=r&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},yn.indexOf=function(n,t,r){var e=n?n.length:0;return e?(r=Ce(r),0>r&&(r=Uu(e+r,0)),d(n,t,r)):-1},yn.inRange=function(n,t,r){return t=ze(t)||0,r===Z?(r=t,t=0):r=ze(r)||0,n=ze(n),n>=zu(t,r)&&n<Uu(t,r)},yn.invoke=Xo,yn.isArguments=ge,yn.isArray=Zo,yn.isArrayBuffer=function(n){return we(n)&&"[object ArrayBuffer]"==pu.call(n)},yn.isArrayLike=ve,yn.isArrayLikeObject=de,yn.isBoolean=function(n){return true===n||false===n||we(n)&&"[object Boolean]"==pu.call(n)},yn.isBuffer=qo,yn.isDate=function(n){return we(n)&&"[object Date]"==pu.call(n)},yn.isElement=function(n){return!!n&&1===n.nodeType&&we(n)&&!ke(n)},yn.isEmpty=function(n){if(ve(n)&&(Zo(n)||Ie(n)||be(n.splice)||ge(n)))return!n.length;for(var t in n)if(lu.call(n,t))return false;return true},yn.isEqual=function(n,t){return jt(n,t)},yn.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:Z)?r(n,t):Z;return e===Z?jt(n,t,r):!!e},yn.isError=ye,yn.isFinite=function(n){return typeof n=="number"&&Wu(n)},yn.isFunction=be,yn.isInteger=xe,yn.isLength=me,yn.isMap=function(n){return we(n)&&"[object Map]"==Rr(n)},yn.isMatch=function(n,t){return n===t||wt(n,t,Er(t))},yn.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:Z,wt(n,t,Er(t),r)},yn.isNaN=function(n){return Oe(n)&&n!=+n},yn.isNative=Ae,yn.isNil=function(n){return null==n},yn.isNull=function(n){return null===n},yn.isNumber=Oe,yn.isObject=je,yn.isObjectLike=we,yn.isPlainObject=ke,yn.isRegExp=Ee,yn.isSafeInteger=function(n){return xe(n)&&n>=-9007199254740991&&9007199254740991>=n},yn.isSet=function(n){return we(n)&&"[object Set]"==Rr(n)},yn.isString=Ie,yn.isSymbol=Se,yn.isTypedArray=Re,yn.isUndefined=function(n){return n===Z},yn.isWeakMap=function(n){return we(n)&&"[object WeakMap]"==Rr(n)},yn.isWeakSet=function(n){return we(n)&&"[object WeakSet]"==pu.call(n)},yn.join=function(n,t){return n?Bu.call(n,t):""},yn.kebabCase=oi,yn.last=Vr,yn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==Z&&(u=Ce(r),u=(0>u?Uu(e+u,0):zu(u,e-1))+1),t!==t)return B(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},yn.lowerCase=ii,yn.lowerFirst=fi,yn.lt=We,yn.lte=function(n,t){return t>=n},yn.max=function(n){return n&&n.length?_(n,Ye,_e):Z},yn.maxBy=function(n,t){return n&&n.length?_(n,kr(t),_e):Z},yn.mean=function(n){return tu(n)/(n?n.length:0)},yn.min=function(n){return n&&n.length?_(n,Ye,We):Z},yn.minBy=function(n,t){return n&&n.length?_(n,kr(t),We):Z},yn.noConflict=function(){return Vn._===this&&(Vn._=_u),this},yn.noop=Xe,yn.now=Co,yn.pad=function(n,t,r){n=Le(n),t=Ce(t);var e=F(n);return t&&t>e?(e=(t-e)/2,t=Ru(e),e=Su(e),vr("",t,r)+n+vr("",e,r)):n;},yn.padEnd=function(n,t,r){return n=Le(n),n+vr(n,t,r)},yn.padStart=function(n,t,r){return n=Le(n),vr(n,t,r)+n},yn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Le(n).replace(fn,""),Mu(n,t||(pn.test(n)?16:10))},yn.random=function(n,t,r){if(r&&typeof r!="boolean"&&Mr(n,t,r)&&(t=r=Z),r===Z&&(typeof t=="boolean"?(r=t,t=Z):typeof n=="boolean"&&(r=n,n=Z)),n===Z&&t===Z?(n=0,t=1):(n=ze(n)||0,t===Z?(t=n,n=0):t=ze(t)||0),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Lu(),zu(n+r*(t-n+Fn("1e-"+((r+"").length-1))),t)):Lt(n,t);},yn.reduce=function(n,t,r){var e=Zo(n)?s:y,u=3>arguments.length;return e(n,kr(t,4),r,u,Hu)},yn.reduceRight=function(n,t,r){var e=Zo(n)?h:y,u=3>arguments.length;return e(n,kr(t,4),r,u,Qu)},yn.repeat=Ge,yn.replace=function(){var n=arguments,t=Le(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},yn.result=function(n,t,r){if(Lr(t,n))e=null==n?Z:n[t];else{t=rt(t);var e=$e(n,t);n=Zr(n,t)}return e===Z&&(e=r),be(e)?e.call(n):e},yn.round=Oi,yn.runInContext=D,yn.sample=function(n){n=ve(n)?n:Pe(n);var t=n.length;return t>0?n[Lt(0,t-1)]:Z},yn.size=function(n){if(null==n)return 0;if(ve(n)){var t=n.length;return t&&Ie(n)?F(n):t}return De(n).length},yn.snakeCase=ai,yn.some=function(n,t,r){var e=Zo(n)?p:Nt;return r&&Mr(n,t,r)&&(t=Z),e(n,kr(t,3))},yn.sortedIndex=function(n,t){return Dt(n,t)},yn.sortedIndexBy=function(n,t,r){return Zt(n,t,kr(r))},yn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Dt(n,t);if(r>e&&pe(n[e],t))return e}return-1},yn.sortedLastIndex=function(n,t){return Dt(n,t,true)},yn.sortedLastIndexBy=function(n,t,r){return Zt(n,t,kr(r),true)},yn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Dt(n,t,true)-1;if(pe(n[r],t))return r}return-1},yn.startCase=li,yn.startsWith=function(n,t,r){return n=Le(n),r=et(Ce(r),0,n.length),n.lastIndexOf(t,r)==r},yn.subtract=function(n,t){var r;return n===Z&&t===Z?0:(n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r-t),r)},yn.sum=tu,yn.sumBy=function(n,t){return n&&n.length?x(n,kr(t)):0},yn.template=function(n,t,r){var e=yn.templateSettings;r&&Mr(n,t,r)&&(t=Z),n=Le(n),t=Ko({},t,e,Kn),r=Ko({},t.imports,e.imports,Kn);var u,o,i=De(r),f=A(r,i),c=0;r=t.interpolate||xn;var a="__p+='";r=ou((t.escape||xn).source+"|"+r.source+"|"+(r===nn?sn:xn).source+"|"+(t.evaluate||xn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(mn,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(T,""):a).replace(K,"$1").replace(G,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=hi(function(){return Function(i,l+"return "+a).apply(Z,f)}),t.source=a,ye(t))throw t;return t},yn.times=function(n,t){if(n=Ce(n),1>n||n>9007199254740991)return[];var r=4294967295,e=zu(n,4294967295);for(t=tt(t),n-=4294967295,e=m(e,t);++r<n;)t(r);return e},yn.toInteger=Ce,yn.toLength=Ue,yn.toLower=function(n){return Le(n).toLowerCase()},yn.toNumber=ze,yn.toSafeInteger=function(n){return et(Ce(n),-9007199254740991,9007199254740991)},yn.toString=Le,yn.toUpper=function(n){return Le(n).toUpperCase()},yn.trim=function(n,t,r){return(n=Le(n))?r||t===Z?n.replace(fn,""):(t+="")?(n=n.match(kn),t=t.match(kn),n.slice(O(n,t),k(n,t)+1).join("")):n:n},yn.trimEnd=function(n,t,r){return(n=Le(n))?r||t===Z?n.replace(an,""):(t+="")?(n=n.match(kn),n.slice(0,k(n,t.match(kn))+1).join("")):n:n},yn.trimStart=function(n,t,r){return(n=Le(n))?r||t===Z?n.replace(cn,""):(t+="")?(n=n.match(kn),n.slice(O(n,t.match(kn))).join("")):n:n},yn.truncate=function(n,t){var r=30,e="...";if(je(t))var u="separator"in t?t.separator:u,r="length"in t?Ce(t.length):r,e="omission"in t?Le(t.omission):e;n=Le(n);var o=n.length;if(En.test(n))var i=n.match(kn),o=i.length;if(r>=o)return n;if(o=r-F(e),1>o)return e;if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===Z)return r+e;if(i&&(o+=r.length-o),Ee(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=ou(u.source,Le(hn.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===Z?o:c)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},yn.unescape=function(n){return(n=Le(n))&&Y.test(n)?n.replace(V,N):n},yn.uniqueId=function(n){var t=++su;return Le(n)+t},yn.upperCase=si,yn.upperFirst=ci,yn.each=re,yn.eachRight=ee,yn.first=Gr,Qe(yn,function(){var n={};return pt(yn,function(t,r){lu.call(yn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),yn.VERSION="4.5.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){yn[n].placeholder=yn;}),u(["drop","take"],function(n,t){An.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new An(this);r=r===Z?1:Uu(Ce(r),0);var u=this.clone();return e?u.__takeCount__=zu(r,u.__takeCount__):u.__views__.push({size:zu(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),u},An.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;An.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:kr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");An.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");An.prototype[n]=function(){return this.__filtered__?new An(this):this[r](1)}}),An.prototype.compact=function(){return this.filter(Ye)},An.prototype.find=function(n){return this.filter(n).head()},An.prototype.findLast=function(n){return this.reverse().find(n);},An.prototype.invokeMap=he(function(n,t){return typeof n=="function"?new An(this):this.map(function(r){return mt(r,n,t)})}),An.prototype.reject=function(n){return n=kr(n,3),this.filter(function(t){return!n(t)})},An.prototype.slice=function(n,t){n=Ce(n);var r=this;return r.__filtered__&&(n>0||0>t)?new An(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Z&&(t=Ce(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},An.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},An.prototype.toArray=function(){return this.take(4294967295)},pt(An.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=yn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(yn.prototype[t]=function(){var t=this.__wrapped__,i=e?[1]:arguments,f=t instanceof An,c=i[0],a=f||Zo(t),s=function(n){return n=u.apply(yn,l([n],i)),e&&h?n[0]:n};a&&r&&typeof c=="function"&&1!=c.length&&(f=a=false);var h=this.__chain__,p=!!this.__actions__.length,c=o&&!h,f=f&&!p;return!o&&a?(t=f?t:new An(this),t=n.apply(t,i),t.__actions__.push({func:ne,args:[s],thisArg:Z}),new wn(t,h)):c&&f?n.apply(this,i):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=fu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);yn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),pt(An.prototype,function(n,t){var r=yn[t];if(r){var e=r.name+"";(Yu[e]||(Yu[e]=[])).push({name:t,func:r})}}),Yu[pr(Z,2).name]=[{name:"wrapper",func:Z}],An.prototype.clone=function(){var n=new An(this.__wrapped__);return n.__actions__=Xt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Xt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Xt(this.__views__),n},An.prototype.reverse=function(){if(this.__filtered__){var n=new An(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},An.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Zo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,c=-1,a=f.length;++c<a;){var l=f[c],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":i-=s;break;case"take":i=zu(i,n+s);break;case"takeRight":n=Uu(n,i-s)}}if(n={start:n,end:i},i=n.start,f=n.end,n=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=zu(n,this.__takeCount__),!e||200>o||o==n&&a==n)return Kt(t,this.__actions__);e=[];n:for(;n--&&a>c;){for(u+=r,o=-1,l=t[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},yn.prototype.at=ko,yn.prototype.chain=function(){return Xr(this)},yn.prototype.commit=function(){return new wn(this.value(),this.__chain__)},yn.prototype.flatMap=function(n){return this.map(n).flatten()},yn.prototype.next=function(){this.__values__===Z&&(this.__values__=Be(this.value()));var n=this.__index__>=this.__values__.length,t=n?Z:this.__values__[this.__index__++];return{done:n,value:t}},yn.prototype.plant=function(n){for(var t,r=this;r instanceof jn;){var e=Pr(r);e.__index__=0,e.__values__=Z,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},yn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof An?(this.__actions__.length&&(n=new An(this)),n=n.reverse(),n.__actions__.push({func:ne,args:[Yr],thisArg:Z}),new wn(n,this.__chain__)):this.thru(Yr)},yn.prototype.toJSON=yn.prototype.valueOf=yn.prototype.value=function(){return Kt(this.__wrapped__,this.__actions__)},Au&&(yn.prototype[Au]=te),yn}var Z,q=1/0,P=NaN,T=/\b__p\+='';/g,K=/\b(__p\+=)''\+/g,G=/(__e\(.*?\)|\b__t\))\+'';/g,V=/&(?:amp|lt|gt|quot|#39|#96);/g,J=/[&<>"'`]/g,Y=RegExp(V.source),H=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,un=/[\\^$.*+?()[\]{}|]/g,on=RegExp(un.source),fn=/^\s+|\s+$/g,cn=/^\s+/,an=/\s+$/,ln=/\\(\\)?/g,sn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hn=/\w*$/,pn=/^0x/i,_n=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,vn=/^\[object .+?Constructor\]$/,dn=/^0o[0-7]+$/i,yn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xn=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,jn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",wn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+jn,An="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",On=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),kn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+An+jn,"g"),En=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),In=/[a-zA-Z0-9]+/g,Sn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",wn].join("|"),"g"),Rn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={};Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false;var Cn={};Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object Date]"]=Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object Symbol]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object WeakMap]"]=false;var Un={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},zn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Mn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ln={"function":true,object:true},$n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fn=parseFloat,Nn=parseInt,Dn=Ln[typeof exports]&&exports&&!exports.nodeType?exports:Z,Zn=Ln[typeof module]&&module&&!module.nodeType?module:Z,qn=Zn&&Zn.exports===Dn?Dn:Z,Pn=E(Dn&&Zn&&typeof global=="object"&&global),Tn=E(Ln[typeof self]&&self),Kn=E(Ln[typeof window]&&window),Gn=E(Ln[typeof this]&&this),Vn=Pn||Kn!==(Gn&&Gn.window)&&Kn||Tn||Gn||Function("return this")(),Jn=D();(Kn||Tn||{})._=Jn,typeof define=="function"&&typeof define.amd=="object"&&define.amd?define(function(){return Jn}):Dn&&Zn?(qn&&((Zn.exports=Jn)._=Jn),Dn._=Jn):Vn._=Jn}).call(this);;(function(){function n(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===an?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return O(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return vn[n];}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||hn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(En.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r],u=(n===u||n!==n&&u!==u)&&!En.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];r>0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c);}return u}function g(n,t){return n&&qn(n,t,en)}function b(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:m(n,t,j,r,e,u)}function m(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),"[object Arguments]"==a&&(a="[object Object]")),f||(l=kn.call(t),"[object Arguments]"==l&&(l="[object Object]"));var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t);return!(l=a==l)||i||p?2&u||(a=p&&En.call(n,"__wrapped__"),f=f&&En.call(t,"__wrapped__"),!a&&!f)?l?(o||(o=[]),(a=J(o,function(t){return t[0]===n}))&&a[1]?a[1]==t:(o.push([n,t]),t=(i?I:q)(n,t,r,e,u,o),o.pop(),t)):false:r(a?n.value():n,f?t.value():t,e,u,o):$(n,t,a)}function d(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:A)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function E(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function A(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return $n(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function T(t,r){return P(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];En.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==an||i in f)||(f[i]=c)}return r}function R(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);return X(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==an){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o);})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=en(n),f=c.length,a=en(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:En.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==an||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function z(n){var t=n?n.length:an;if(W(t)&&(Pn(n)||nn(n)||K(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function C(n){var t=n&&n.constructor,t=Q(t)&&t.prototype||xn;return n===t}function G(n){return n?n[0]:an}function J(n,t){return r(n,d(t),$n)}function M(n,t){return $n(n,typeof t=="function"?t:cn)}function P(n,t,r){return e(n,d(t),r,3>arguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(n,t){return n>t}function K(n){return Y(n)&&L(n)&&En.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&!(typeof n=="function"&&Q(n))&&W(zn(n))}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t);}function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!En.call(n,a))||o.push(a)}return o}function on(n){return n?u(n,en(n)):[]}function cn(n){return n}function fn(t,r,e){var u=en(r),o=b(r,u);null!=e||X(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,en(r)));var i=X(e)&&"chain"in e?e.chain:true,c=Q(t);return $n(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var an,ln=1/0,pn=/[&<>"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,gn=yn[typeof module]&&module&&!module.nodeType?module:an,bn=gn&&gn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),mn=o(yn[typeof window]&&window),dn=o(yn[typeof this]&&this),wn=o(_n&&gn&&typeof global=="object"&&global)||mn!==(dn&&dn.window)&&mn||jn||dn||Function("return this")(),On=Array.prototype,xn=Object.prototype,En=xn.hasOwnProperty,An=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(g),qn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Tn&&!Rn.call({valueOf:1},"valueOf")&&(w=function(n){n=Tn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var zn=A("length"),Cn=V(function(t,r){return Pn(t)||(t=null==t?[]:[Object(t)]),_(r,1),n(N(t),on)}),Gn=V(function(n,t,r){return D(n,t,r)}),Jn=V(function(n,t){return h(n,1,t)}),Mn=V(function(n,t,r){return h(n,Vn(t)||0,r)}),Pn=Array.isArray,Un=Number,Vn=Number,Hn=R(function(n,t){F(t,en(t),n)}),Kn=R(function(n,t){F(t,un(t),n)}),Ln=R(function(n,t,r,e){F(t,un(t),n,e)}),Qn=V(function(n){return n.push(an,p),Ln.apply(an,n)}),Wn=V(function(n,t){return null==n?{}:E(n,_(t,1))}),Xn=d;l.prototype=s(a.prototype),l.prototype.constructor=l,a.assignIn=Kn,a.before=U,a.bind=Gn,a.chain=function(n){return n=a(n),n.__chain__=true,n},a.compact=function(n){return y(n,Boolean)},a.concat=Cn,a.create=function(n,t){var r=s(n);return t?Hn(r,t):r},a.defaults=Qn,a.defer=Jn,a.delay=Mn,a.filter=function(n,t){return y(n,d(t))},a.flatten=function(n){return n&&n.length?_(n,1):[]},a.flattenDeep=function(n){return n&&n.length?_(n,ln):[]},a.iteratee=Xn,a.keys=en,a.map=function(n,t){return O(n,d(t))},a.matches=function(n){return x(Hn({},n))},a.mixin=fn,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Wn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===an?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=d(t),O(O(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===an,i=r===r,c=null===e,f=e===an,a=e===e;if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b;}),A("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,d(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=K,a.isArray=Pn,a.isBoolean=function(n){return true===n||false===n||Y(n)&&"[object Boolean]"==kn.call(n)},a.isDate=function(n){return Y(n)&&"[object Date]"==kn.call(n)},a.isEmpty=function(n){if(L(n)&&(Pn(n)||nn(n)||Q(n.splice)||K(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return true},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Bn(n)},a.isFunction=Q,a.isNaN=function(n){return Z(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Z,a.isObject=X,a.isRegExp=function(n){return X(n)&&"[object RegExp]"==kn.call(n)},a.isString=nn,a.isUndefined=function(n){return n===an},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:an},a.max=function(n){return n&&n.length?t(n,cn,H):an},a.min=function(n){return n&&n.length?t(n,cn,tn):an},a.noConflict=function(){return wn._===this&&(wn._=Nn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?an:n[t],t===an&&(t=r),Q(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=L(n)?n:en(n),n.length)},a.some=function(n,t,r){return t=r?an:t,S(n,d(t))},a.uniqueId=function(n){var t=++An;return rn(n)+t},a.each=M,a.first=G,fn(a,function(){var n={};return g(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.5.1",$n("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:On)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(mn||jn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd?define(function(){return a}):_n&&gn?(bn&&((gn.exports=a)._=a),_n._=a):wn._=a}).call(this);
import React, { Component } from "react"; import PropTypes from "prop-types"; import classes from "./Motion.scss"; import classNames from "classnames"; import { BoxItemWrapper, BoxItem } from "../../internals/Box"; export default class Motion extends Component { static propTypes = { render: PropTypes.oneOf(["transition", "animation"]) }; renderTransition() { return ( <BoxItemWrapper> <BoxItem label="Transition S"> <div className={classNames( classes.transitionSample, classes.transitionS )} /> </BoxItem> <BoxItem label="Transition M"> <div className={classNames( classes.transitionSample, classes.transitionM )} /> </BoxItem> <BoxItem label="Transition L"> <div className={classNames( classes.transitionSample, classes.transitionL )} /> </BoxItem> </BoxItemWrapper> ); } renderAnimation() { return ( <BoxItemWrapper> <BoxItem label="Animation Shake"> <div className={classNames( classes.animationSample, classes.animationShake )} /> </BoxItem> </BoxItemWrapper> ); } render() { if (this.props.render === "animation") { return this.renderAnimation(); } else { return this.renderTransition(); } } }
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'sourcedialog', 'af', { toolbar: 'Bron', title: 'Bron' } );
# Copyright (c) 2013, Neil Lasrado and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.form.linked_with import get_linked_docs def execute(filters=None): columns, data = [], [] if not filters: return columns, data columns = get_columns() data = get_data(filters.get("link_doctype"), filters.get("link_name")) return columns, data def get_data(link_doctype, link_name, data=None, completed=None): if not completed: completed = [] if not data: data = [] link_doc = frappe.get_doc(link_doctype, link_name) if link_doctype == "Serial No": source_doc = frappe.get_doc(link_doc.purchase_document_type, link_doc.purchase_document_no) elif link_doctype == "Batch": source_doc = frappe.get_doc(link_doc.reference_doctype, link_doc.reference_name) supplier = source_doc.supplier if source_doc.doctype == "Purchase Receipt" else "" for item in source_doc.get("items", []): if source_doc.doctype == "Purchase Receipt": warehouse = item.warehouse elif source_doc.doctype == "Stock Entry": warehouse = item.t_warehouse if item.get("t_warehouse") or item.get("warehouse"): completed.append(link_name) data.append({ "item_code": item.item_code, "serial_no": link_name if item.serial_no else "", "batch_no": link_name if item.batch_no else "", "qty": item.qty, "stock_uom": item.stock_uom, "warehouse": warehouse, "date": source_doc.posting_date, "supplier": supplier, "activity_doctype": source_doc.doctype, "activity_document": source_doc.name }) elif item.get("s_warehouse"): if item.serial_no and item.serial_no not in completed: data = get_data("Serial No", item.serial_no, data, completed) elif item.batch_no and item.batch_no not in completed: data = get_data("Batch", item.batch_no, data, completed) return data def get_columns(): return [ { "fieldname": "item_code", "label": _("Item Code"), "fieldtype": "Link", "options": "Item", "width": 90 }, { "fieldname": "batch_no", "label": _("Batch No"), "fieldtype": "Link", "options": "Batch", "width": 100 }, { "fieldname": "serial_no", "label": _("Serial No"), "fieldtype": "Serial", "options": "Data", "width": 110 }, { "fieldname": "qty", "label": _("Quantity"), "fieldtype": "Float", "width": 90 }, { "fieldname": "stock_uom", "label": _("Unit"), "fieldtype": "Link", "options": "UOM", "width": 90 }, { "fieldname": "warehouse", "label": _("Warehouse"), "fieldtype": "Link", "options": "Warehouse", "width": 150 }, { "fieldname": "date", "label": _("Posting Date"), "fieldtype": "Date", "width": 90 }, { "fieldname": "activity_doctype", "label": _("Activity Type"), "fieldtype": "Link", "options": "DocType", "width": 90 }, { "fieldname": "activity_document", "label": _("Activity Document"), "fieldtype": "Dynamic Link", "options": "activity_doctype", "width": 150 }, { "fieldname": "supplier", "label": _("Supplier"), "fieldtype": "Link", "options": "Supplier", "width": 100 } ]
const {Usuarios} = require('../../models/index') const ListarUsuarios = (req,res) => { Usuarios.findAll() .then(usuarios => res.json(usuarios)) .catch( err => res.json({msn: err})) } module.exports = ListarUsuarios;
const monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ]; export default function getTimeFromLong(long) { const date = new Date(long); return ( monthNames[date.getMonth()] + " " + date.getDay() + ", " + (date.getFullYear() + " ").slice(-3) ); }
#pragma strict private var menu : GameObject; function Start() { // Get a reference to the game menu menu = GameObject.Find('Menu'); } function OnCollisionEnter() { // Set the current score to 0 if the ball hits the pitch menu.GetComponent(Menu).CurrentScore = 0; }
const express = require('express'); const { check, validationResult } = require('express-validator'); const auth = require('../middleware/auth'); const Contact = require('../models/Contact'); const User = require('../models/User'); const router = express.Router(); /** * @route GET api/contacts * @desc Get all users contacts * @access Private */ router.get('/', auth, async (req, res) => { try { const contacts = await Contact.find({ user: req.user.id }).sort({ date: -1 }); res.json(contacts); } catch (err) { console.error(err.message); res.status(500).send('Server Error'); } }); /** * @route GET api/contacts/:id * @desc Get single user contact * @access Private */ router.get('/:id', auth, async (req, res) => { try { let contact = await Contact.findById(req.params.id); if (!contact) { return res.status(404).json({ message: 'Contact not found' }); } // Make sure user owns contact if (contact.user.toString() !== req.user.id) { return res.status(401).json({ message: 'Not authorised' }); } await Contact.findByIdAndRemove(req.params.id); res.json(contact); } catch (err) { console.error(err.message); res.status(500).send('Server Error'); } }); /** * @route POST api/contacts * @desc Add new contacts * @access Private */ router.post( '/', [ auth, [ check('name', 'Name is required') .not() .isEmpty() ] ], async (req, res) => { const errors = validationResult(req); if (!errors.isEmpty()) { return res.status(400).json({ errors: errors.array() }); } const { name, email, phone, type } = req.body; try { const newContact = new Contact({ name, email, phone, type, user: req.user.id }); const contact = await newContact.save(); res.json(contact); } catch (err) { console.error(err.message); res.status(500).send('Server Error'); } } ); /** * @route PUT api/contacts/:id * @desc Update contact * @access Private */ router.put('/:id', auth, async (req, res) => { const { name, email, phone, type } = req.body; // Build contact object const contactFields = {}; if (name) contactFields.name = name; if (email) contactFields.email = email; if (phone) contactFields.phone = phone; if (type) contactFields.type = type; try { let contact = await Contact.findById(req.params.id); if (!contact) { return res.status(404).json({ message: 'Contact not found' }); } // Make sure user owns contact if (contact.user.toString() !== req.user.id) { return res.status(401).json({ message: 'Not authorised' }); } contact = await Contact.findByIdAndUpdate( req.params.id, { $set: contactFields }, { new: true } ); res.json(contact); } catch (err) { console.error(err.message); res.status(500).send('Server Error'); } }); /** * @route DELETE api/contacts/:id * @desc Delete contact * @access Private */ router.delete('/:id', auth, async (req, res) => { try { let contact = await Contact.findById(req.params.id); if (!contact) { return res.status(404).json({ message: 'Contact not found' }); } // Make sure user owns contact if (contact.user.toString() !== req.user.id) { return res.status(401).json({ message: 'Not authorised' }); } await Contact.findByIdAndRemove(req.params.id); res.json({ message: 'Contact Removed' }); } catch (err) { console.error(err.message); res.status(500).send('Server Error'); } }); module.exports = router;
# Copyright (c) 2018 Serguei Kalentchouk et al. All rights reserved. # Use of this source code is governed by an MIT license that can be found in the LICENSE file. from node_test_case import NodeTestCase class TestVectorOps(NodeTestCase): def test_dot_product(self): self.create_node('DotProduct', {'input1': [1.0, 0.0, 0.0], 'input2': [0.0, 1.0, 0.0]}, 0.0) def test_cross_product(self): self.create_node('CrossProduct', {'input1': [1.0, 0.0, 0.0], 'input2': [0.0, 1.0, 0.0]}, [0.0, 0.0, 1.0]) def test_angle_between(self): self.create_node('AngleBetweenVectors', {'input1': [1.0, 0.0, 0.0], 'input2': [0.0, 1.0, 0.0]}, 90.0) def test_vector_length(self): self.create_node('VectorLength', {'input': [1.0, 1.0, 1.0]}, 1.7321) def test_vector_length_squared(self): self.create_node('VectorLengthSquared', {'input': [1.0, 1.0, 1.0]}, 3.0) def test_normalize_vector(self): self.create_node('NormalizeVector', {'input': [1.0, 1.0, 1.0]}, [0.5774, 0.5774, 0.5774])
function arrayMax(array) { return Math.max.apply(Math, array.filter(function (n) { return !isNaN(n); })); } exports.arrayMax = arrayMax; function arrayMin(array) { return Math.min.apply(Math, array.filter(function (n) { return !isNaN(n); })); } exports.arrayMin = arrayMin; function upscale(number, places) { return Math.round(number * Math.pow(10, places)); } exports.upscale = upscale; function downscale(number, places) { return number / Math.pow(10, places); } exports.downscale = downscale; function diff(x, y) { return ((x - y) / ((x + y) / 2)) * 100; } exports.diff = diff; function average(a) { var r = { mean: 0, variance: 0, deviation: 0 }, t = a.length, m, l, s; for (m, s = 0, l = t; l--; s += a[l]) { } for (m = r.mean = s / t, l = t, s = 0; l--; s += Math.pow(a[l] - m, 2)) { } return r.deviation = Math.sqrt(r.variance = s / t), r; } exports.average = average; function BBANDS(array, period, deviation) { var bbands = { middleband: [], lowband: [], highband: [] }, sma = SMA(array, period), avg, i, arr; if (isNaN(deviation)) deviation = 2; for (i = period - 1; i >= 0; i--) { arr = array.slice(i, i + period); avg = average(arr); bbands.highband[i] = sma[i] + (deviation * avg.deviation); bbands.lowband[i] = sma[i] - (deviation * avg.deviation); bbands.middleband[i] = sma[i]; } return bbands; } exports.BBANDS = BBANDS; function AROON(higharray, lowarray, period) { var harr = higharray.slice(0, period), larr = lowarray.slice(0, period), hh = arrayMin(harr), hday = harr.indexOf(hh), ll = arrayMin(larr), lday = larr.indexOf(ll); return { up: ((period - hday) / period) * 100, down: ((period - lday) / period) * 100 }; } exports.AROON = AROON; function MFI(higharray, lowarray, closearray, volumearray, period) { var harr = higharray.slice(0, period).reverse(), larr = lowarray.slice(0, period).reverse(), clarr = closearray.slice(0, period).reverse(), vlarr = volumearray.slice(0, period).reverse(), lasttp = 0, first = true, posmf = 0, negmf = 0, i, tp; for (i = 0; i < closearray.length; i++) { if (first) { lasttp = (harr[i] + larr[i] + clarr[i]) / 3; first = false; } else { tp = (harr[i] + larr[i] + clarr[i]) / 3; if (tp > lasttp) { posmf += (tp * vlarr[0]); } else if (tp < lasttp) { negmf += (tp * vlarr[0]); } lasttp = tp; } } return (100 - (100 / (1 + (posmf / negmf)))); } exports.MFI = MFI; function RSI(array, rsiperiod) { var rsi = [], i, j, loss, gain, diff, avggain, avgloss, first = true; for (i = rsiperiod - 1; i >= 0; i--) { loss = gain = 0; if (first) { for (j = i + rsiperiod - 1; j >= i; j--) { diff = array[j + 1] - array[j]; if (diff > 0) { loss += Math.abs(diff); } else { gain += Math.abs(diff); } } first = false; avggain = gain / rsiperiod; avgloss = loss / rsiperiod; } else { diff = array[i + 1] - array[i]; if (diff > 0) { loss += Math.abs(diff); } else { gain += Math.abs(diff); } avggain = ((avggain * (rsiperiod - 1)) + gain) / rsiperiod; avgloss = ((avgloss * (rsiperiod - 1)) + loss) / rsiperiod; } //console.log("g", avggain, "l", avgloss); if (avgloss == 0) { rsi[i] = 100; } else { rsi[i] = 100 - (100 / (1 + (avggain / avgloss))); } } return rsi; } exports.RSI = RSI; function STOCHRSI(instruments, rsiperiod) { var stochrsi = [], rsiarray, rsimin, rsimax, i, arr; for (i = rsiperiod - 1; i >= 0; i--) { arr = instruments.slice(i); rsiarray = RSI(arr, rsiperiod); rsimin = arrayMin(rsiarray); rsimax = arrayMax(rsiarray); if (rsimax - rsimin == 0) { stochrsi[i] = 100; } else { stochrsi[i] = 100 * (rsiarray[0] - rsimin) / (rsimax - rsimin); } } return stochrsi; } exports.STOCHRSI = STOCHRSI; function SMA(originalArray, smaLength) { var array, sma = [], i; for (i = smaLength - 1; i >= 0; i--) { array = originalArray.slice(i, i + smaLength); sma[i] = array.reduce(function (a, b) { return a + b; }) / array.length; } return sma; } exports.SMA = SMA; function EMA(originalArray, emaLength) { var array = originalArray.slice().reverse(), iPos = 0, i, k, ema; // trim initial NaN values for (iPos = 0; iPos < array.length && isNaN(array[iPos]); iPos++) { } array = array.slice(iPos); // trim initial NaN values from array ema = []; k = 2 / (emaLength + 1); for (i = 0; i < emaLength - 1; i++) { ema[i] = NaN; } ema[emaLength - 1] = array.slice(0, emaLength).reduce(function (a, b) { return a + b; }) / emaLength; for (i = emaLength; i < array.length; i++) { ema[i] = array[i] * k + ema[i - 1] * (1 - k); } ema.reverse(); // reverse back for main consumption for (i = 0; i < iPos; i++) { ema.push(NaN); } return ema; } exports.EMA = EMA; function MACD(array, i12, i26, i9) { var ema12 = EMA(array, i12), ema26 = EMA(array, i26), macd = [], i, signal, histogram; for (i = 0; i < ema12.length; i++) { macd.push(ema12[i] - ema26[i]); } signal = EMA(macd, i9); histogram = []; for (i = 0; i < macd.length; i++) { histogram.push(macd[i] - signal[i]); } return { macd: macd, signal: signal, histogram: histogram }; } exports.MACD = MACD; function PERCPRICEOSC(array, i12, i26, i9) { var ema12 = EMA(array, 12), ema26 = EMA(array, 26), ppo = [], i, signal, histogram; for (i = 0; i < ema12.length; i++) { ppo.push((ema12[i] - ema26[i]) / ema26[i] * 100); } signal = EMA(ppo, 9); histogram = []; for (i = 0; i < ppo.length; i++) { histogram.push(ppo[i] - signal[i]); } return { ppo: ppo, signal: signal, histogram: histogram }; } exports.PERCPRICEOSC = PERCPRICEOSC; function WILLR(highs, lows, closes, lookback) { var willr = [], highest_high, lowest_low, curr_close, i; // computing only if highs and lows arrays are of equal length if (highs.length == lows.length && highs.length >= lookback) { /* * Willams %R exists only for the values which have atleast "lookback" values * so we iterate till ((length )-lookback)to calculate Willams %R */ var limit = highs.length - lookback; for (i = limit; i >= 0; i--) { highest_high = arrayMax(highs.slice(i, i + lookback)); lowest_low = arrayMin(lows.slice(i, i + lookback)); curr_close = closes[i]; willr[i] = (highest_high - curr_close) / (highest_high - lowest_low) * -100; } } return willr; } exports.WILLR = WILLR; function TRUERANGE(highs, lows, closes) { var tr = [], curr_diff, curr_high_diff, curr_low_diff, i; if (highs.length != lows.length || highs.length != closes.length) { //True ranges are found only when all arrays are of equal length return tr; } tr[0] = highs[0] - lows[0]; for (i = highs.length - 1; i > 0; i--) { var tmp = []; tmp.push(highs[i] - lows[i]); tmp.push(Math.abs(lows[i] - closes[i + 1])); tmp.push(Math.abs(highs[i] - closes[i + 1])); tr[i] = arrayMax(tmp); } return tr; } exports.TRUERANGE = TRUERANGE;
/* Copyright (c) 2003-01, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang("devtools","lt",{title:"Elemento informacija",dialogName:"Dialogo lango pavadinimas",tabName:"Auselės pavadinimas",elementId:"Elemento ID",elementType:"Elemento tipas"});
const expect = require('chai').expect; require('./test-mock.js').setup(); var VelibCardWindow = require('./velib-card-window.js'); describe('the velib card window', function () { this.timeout(10000); it('can be constructed', function (done) { var card = new VelibCardWindow(); expect(card).not.to.be.empty; expect(card.window).not.to.be.empty; expect(card.stationName).not.to.be.empty; expect(card.bikeRemaining).not.to.be.empty; expect(card.eBikeRemaining).not.to.be.empty; expect(card.stationName.text()).to.equal('stationName'); expect(card.bikeRemaining.text()).to.equal('-'); expect(card.eBikeRemaining.text()).to.equal('-'); done(); }); it('can be refreshed with an up to date state', function (done) { var card = new VelibCardWindow(); const velibStationInfo = { getStation: function () { return {code: '123', label: 'stationLabel'}; }, getState: function () { return { nbBike: 1, nbEbike: 2, nbFreeDock: 3, nbFreeEDock: 4, } } }; card.refresh(velibStationInfo); expect(card.stationName.text()).to.equal('stationLabel'); expect(card.bikeRemaining.text()).to.equal(1); expect(card.eBikeRemaining.text()).to.equal(2); expect(card.parkingRemaining.text()).to.equal(7); done(); }); });
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import os import torch import numpy as np import math import sys from fairseq import utils import torch.nn.functional as F from . import FairseqCriterion, register_criterion,LegacyFairseqCriterion from .lib_sbleu import smoothed_bleu from fairseq.models import FairseqMultiModel from fairseq.sequence_generator import SequenceGenerator SHARD_SIZE = 20 def label_smoothed_nll_loss(lprobs, target, epsilon, ignore_index=None, reduce=True): if target.dim() == lprobs.dim() - 1: target = target.unsqueeze(-1) nll_loss = -lprobs.gather(dim=-1, index=target) smooth_loss = -lprobs.sum(dim=-1, keepdim=True) if ignore_index is not None: non_pad_mask = target.ne(ignore_index) nll_loss = nll_loss[non_pad_mask] smooth_loss = smooth_loss[non_pad_mask] else: nll_loss = nll_loss.squeeze(-1) smooth_loss = smooth_loss.squeeze(-1) if reduce: nll_loss = nll_loss.sum() smooth_loss = smooth_loss.sum() eps_i = epsilon / lprobs.size(-1) loss = (1. - epsilon) * nll_loss + eps_i * smooth_loss return loss, nll_loss @register_criterion('reward_cross_entropy') class RewardCrossEntropyCriterion(LegacyFairseqCriterion): def __init__(self, args, task): super().__init__(args, task) self.eps = args.label_smoothing self.task = task self.first = True if args.reward == "bleurt": from fairseq.distributed_utils import get_rank sys.argv = sys.argv[:1] my_rank = 0 if torch.cuda.device_count() <= 1 else get_rank() os.environ["CUDA_VISIBLE_DEVICES"] = str(my_rank % 4) from bleurt import score from transformers import cached_path import tensorflow as tf gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: this_gpu = gpus[my_rank % 4] tf.config.set_visible_devices([this_gpu], 'GPU') try: tf.config.experimental.set_memory_growth(this_gpu, True) tf.config.experimental.set_virtual_device_configuration( this_gpu, [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=2048)]) logical_devices = tf.config.list_logical_devices('GPU') self.logical_device = tf.device(logical_devices[0].name) print("num of logical gpus", len(logical_devices)) except RuntimeError as e: print(e) with self.logical_device: self.bleurt_scorer = score.BleurtScorer(os.path.join( cached_path( "https://storage.googleapis.com/bleurt-oss/bleurt-base-128.zip", extract_compressed_file=True ), "bleurt-base-128" )) @staticmethod def add_args(parser): """Add criterion-specific arguments to the parser.""" # fmt: off parser.add_argument('--label-smoothing', default=0., type=float, metavar='D', help='epsilon for label smoothing, 0 means no label smoothing') parser.add_argument('--proxyloss2', action="store_true") parser.add_argument('--bleurt-scale', action="store_true") parser.add_argument('--contrastive', action="store_true") parser.add_argument('--m', default=10, type=float) parser.add_argument('--reward', default="sbleu", type=str) parser.add_argument('--beam-size', type=int, default=4) # fmt: on def forward(self, model, sample, reduce=True): """Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as the denominator for the gradient 3) logging outputs to display while training """ # >>>> Sample for reward >>> is_training = model.training if not is_training: net_output = model(**sample["net_input"]) loss, _ = self.compute_loss_eval(model, net_output, sample, reduce=reduce) sample_size = ( sample["target"].size(0) if self.args.sentence_avg else sample["ntokens"] ) B = sample["target"].shape[0] logging_output = { 'loss': utils.item(loss.data) if reduce else loss.data, 'ntokens': sample['ntokens'], 'nsentences': B, 'sample_size': sample_size, } return loss, sample_size, logging_output model.eval() if self.first: self.gen = SequenceGenerator([model],self.task.target_dictionary, beam_size=self.args.beam_size) self.first = False print("init") B = sample["target"].shape[0] gen_results = [] for shard_i in range(math.ceil(float(B) / SHARD_SIZE)): start = shard_i * SHARD_SIZE end = (shard_i + 1) * SHARD_SIZE sub_sample = { "net_input": { "src_tokens": sample["net_input"]["src_tokens"][start:end], "src_lengths": sample["net_input"]["src_lengths"][start:end], "prev_output_tokens": sample["net_input"]["prev_output_tokens"][start:end] } } sub_results = [[p["tokens"][:60] for p in results] for results in self.gen.generate([model], sub_sample)] gen_results.extend(sub_results) targets = sample["target"] * torch.gt(sample["target"], 1) if self.args.reward == "sbleu": rewards = [] for batch_i in range(len(gen_results)): batch_rewards = [] for seq in gen_results[batch_i]: batch_rewards.append(self.compute_reward(seq, targets[batch_i])) rewards.append(batch_rewards) rewards = torch.tensor(rewards) elif self.args.reward == "bleurt": hyps = [] tgts = [] for batch_i in range(len(gen_results)): for seq in gen_results[batch_i]: hyps.append(self.task.tgt_dict.string(seq, bpe_symbol="@@ ")) tgts.append(self.task.tgt_dict.string(targets[batch_i][:torch.gt(targets[batch_i], 0).sum()], bpe_symbol="@@ ")) with self.logical_device: scores = torch.tensor(self.bleurt_scorer.score(tgts, hyps)) if self.args.bleurt_scale: rewards = scores * 100. else: rewards = torch.exp(scores) * 100. rewards = rewards.view(B, -1) best_idx = rewards.argmax(1) # idxp = np.random.randint(rewards.shape[1], size=(rewards.shape[0], 2)) # idxp_tensor = torch.tensor(idxp) # selected_rewards = torch.cat([ # rewards[torch.arange(rewards.size(0)), idxp_tensor[:, 0]][:, None], # rewards[torch.arange(rewards.size(0)), idxp_tensor[:, 1]][:, None] # ], 1) # valid_mask = selected_rewards[:, 0] > selected_rewards[:, 1] # reversed_selected_rewards = torch.cat([selected_rewards[:, 1][:, None], selected_rewards[:, 0][:, None]], 1) # selected_rewards = selected_rewards * valid_mask[:, None] + reversed_selected_rewards * valid_mask.logical_not()[:, None] # reversed_idxp_tensor = torch.cat([idxp_tensor[:, 1][:, None], idxp_tensor[:, 0][:, None]], 1) # idxp_tensor = idxp_tensor * valid_mask[:, None] + reversed_idxp_tensor * valid_mask.logical_not()[:, None] # best_results = [res[idx] for res, idx in zip(gen_results, idxp_tensor[:, 0])] best_results = [res[idx] for res, idx in zip(gen_results, best_idx)] if not self.args.proxyloss2: maxlen = max([len(r) for r in best_results]) new_target = targets.new_ones(targets.shape[0], maxlen) for i, seq in enumerate(best_results): new_target[i, :seq.shape[0]] = seq first_col = new_target.new_ones(new_target.shape[0]) * 2 new_decoder_input = torch.cat([ first_col[:, None], new_target[:, :-1] ], 1) else: # argmax_results = [res[0] for res in gen_results] # worst_results = [res[idx] for res, idx in zip(gen_results, idxp_tensor[:, 1])] worst_results = [res[idx] for res, idx in zip(gen_results, rewards.argmin(1))] merged_results = best_results + worst_results maxlen = max([len(r) for r in merged_results]) new_target = targets.new_ones(len(merged_results), maxlen) for i, seq in enumerate(merged_results): new_target[i, :seq.shape[0]] = seq first_col = new_target.new_ones(new_target.shape[0]) * 2 new_decoder_input = torch.cat([ first_col[:, None], new_target[:, :-1] ], 1) sample["net_input"]["prev_output_tokens"] = new_decoder_input sample["target"] = new_target best_reward = rewards[torch.arange(rewards.shape[0]), best_idx].cuda() worst_reward = rewards[torch.arange(rewards.shape[0]), rewards.argmin(1)].cuda() # best_reward = selected_rewards[:, 0].cuda() # worst_reward = selected_rewards[:, 1].cuda() argmax_reward = rewards[:, 0].cuda() mean_reward = rewards.mean(1).cuda() if is_training: model.train() # >>>> if not self.args.proxyloss2: decoder_out = model.forward(sample['net_input']["src_tokens"], sample['net_input']["src_lengths"], new_decoder_input) loss, nll_loss = self.compute_loss(model, decoder_out, sample, reduce=reduce) else: # repeated_encoder_out = {"encoder_out": torch.cat([encoder_out["encoder_out"], encoder_out["encoder_out"]]), # "encoder_padding_mask": # torch.cat([encoder_out["encoder_padding_mask"], encoder_out["encoder_padding_mask"]]) # if encoder_out["encoder_padding_mask"] is not None else None # } repeated_src_tokens = torch.cat([sample['net_input']["src_tokens"], sample['net_input']["src_tokens"]]) repeated_src_lengths = torch.cat([sample['net_input']["src_lengths"], sample['net_input']["src_lengths"]]) decoder_out = model.forward(repeated_src_tokens, repeated_src_lengths, new_decoder_input) loss, nll = self.compute_loss(model, decoder_out, {"target": new_target}, reduce=False, return_full_mat=True) token_mask = torch.ne(new_target, self.padding_idx) loss = (loss.view(new_target.shape) * token_mask).sum(1) / token_mask.sum(1) nll = (nll.view(new_target.shape) * token_mask).sum(1) / token_mask.sum(1) if self.args.contrastive: loss = (loss[:B] - loss[-B:]) * 10. else: loss = (loss[:B] - loss[-B:]) * 10. + self.args.m * ((best_reward - worst_reward) / 100.) loss = torch.gt(loss, 0) * loss # loss = ((best_reward - worst_reward) / 100.) * (loss[:B] - loss[-B:]) * 10. nll_loss = (nll[:B] - nll[-B:]) * 10. if reduce: loss = loss.sum() nll_loss = nll_loss.sum() sample_size = B if self.args.sentence_avg or self.args.proxyloss2 else sample['ntokens'] logging_output = { 'loss': utils.item(loss.data) if reduce else loss.data, 'nll_loss': utils.item(nll_loss.data) if reduce else nll_loss.data, 'best_r': utils.item(best_reward.sum().data) if reduce else best_reward.data, 'argmax_r': utils.item(argmax_reward.sum().data) if reduce else argmax_reward.data, 'avg_r': utils.item(mean_reward.sum().data) if reduce else mean_reward.data, 'ntokens': sample['ntokens'], 'nsentences': B, 'sample_size': sample_size, } return loss, sample_size, logging_output def compute_loss(self, model, net_output, sample, reduce=True, return_full_mat=False): lprobs = model.get_normalized_probs(net_output, log_probs=True) lprobs = lprobs.view(-1, lprobs.size(-1)) target = model.get_targets(sample, net_output).view(-1, 1) if return_full_mat: ignore_index = None loss = - lprobs.gather(dim=1, index=target).flatten() nll_loss = loss else: ignore_index = self.padding_idx loss, nll_loss = label_smoothed_nll_loss( lprobs, target, self.eps, ignore_index=ignore_index, reduce=reduce, ) return loss, nll_loss def compute_loss_eval(self, model, net_output, sample, reduce=True): lprobs = model.get_normalized_probs(net_output, log_probs=True) lprobs = lprobs.view(-1, lprobs.size(-1)) target = model.get_targets(sample, net_output).view(-1) loss = F.nll_loss( lprobs, target, ignore_index=self.padding_idx, reduction="sum" if reduce else "none", ) return loss, loss @staticmethod def aggregate_logging_outputs(logging_outputs): """Aggregate logging outputs from data parallel training.""" ntokens = sum(log.get('ntokens', 0) for log in logging_outputs) nsentences = sum(log.get('nsentences', 0) for log in logging_outputs) sample_size = sum(log.get('sample_size', 0) for log in logging_outputs) return { 'loss': sum(log.get('loss', 0) for log in logging_outputs) / sample_size / math.log(2) if sample_size > 0 else 0., 'nll_loss': sum(log.get('nll_loss', 0) for log in logging_outputs) / ntokens / math.log(2) if ntokens > 0 else 0., 'best_r': sum(log.get('best_r', 0) for log in logging_outputs) / nsentences / math.log(2) if nsentences > 0 else 0., 'argmax_r': sum(log.get('argmax_r', 0) for log in logging_outputs) / nsentences / math.log(2) if nsentences > 0 else 0., 'avg_r': sum(log.get('avg_r', 0) for log in logging_outputs) / nsentences / math.log(2) if nsentences > 0 else 0., 'ntokens': ntokens, 'nsentences': nsentences, 'sample_size': sample_size, } def compute_reward(self, yhat, target): return self._sbleu(yhat, target) def _sbleu(self, yhat, target): tgt_seq = target.int().cpu().numpy() sampled_tokens = yhat.int().cpu().numpy() tgt_mask = np.greater(tgt_seq, 0) yhat_mask = np.greater(sampled_tokens, 0) target_len = int(tgt_mask.sum()) yhat_len = int(yhat_mask.sum()) ref_tokens = tgt_seq[:target_len] out_tokens = list(sampled_tokens[:yhat_len]) ref_tokens = self.task.tgt_dict.string(ref_tokens).replace("@@ ", "").split() out_tokens = self.task.tgt_dict.string(out_tokens).replace("@@ ", "").split() return smoothed_bleu(out_tokens, ref_tokens)
"use strict"; const parse5 = require("parse5"); const treeAdapter = require("./parse5-adapter-serialization"); const NODE_TYPE = require("../living/node-type"); exports.domToHtml = iterable => { let ret = ""; for (const node of iterable) { if (node.nodeType === NODE_TYPE.DOCUMENT_NODE) { ret += parse5.serialize(node, { treeAdapter }); } else { // TODO: maybe parse5 can give us a hook where it serializes the node itself too: // https://github.com/inikulin/parse5/issues/230 ret += parse5.serialize({ childNodesForSerializing: [node] }, { treeAdapter }); } } return ret; };
import GBP from './GBP'; import BaseModel from './BaseModel'; class Transaction extends BaseModel { get defaults() { return { date: null, description: null, amount: new GBP(), balance: new GBP() }; } fromJSON(props) { this.props = { date: props.date, description: props.description, amount: new GBP().fromJSON(props.amount), balance: new GBP().fromJSON(props.balance) }; } } export default Transaction;
/** @flow */ import React from 'react'; import {Button} from '../../../src/index.js'; /** * @description A light button demo. * @returns {Object<string,*>} React component. */ function LightButton() { return <Button title={'Light Button'} />; } const meta = { title: 'Button' }; export {LightButton}; export default meta;
import urllib.request, urllib.parse, urllib.error import json # Note that Google is increasingly requiring keys # for this API serviceurl = 'http://maps.googleapis.com/maps/api/geocode/json?' while True: address = input('Enter location: ') if len(address) < 1: break url = serviceurl + urllib.parse.urlencode( {'address': address}) print('Retrieving', url) uh = urllib.request.urlopen(url) data = uh.read().decode() print('Retrieved', len(data), 'characters') try: js = json.loads(data) except: js = None if not js or 'status' not in js or js['status'] != 'OK': print('==== Failure To Retrieve ====') print(data) continue print(json.dumps(js, indent=4)) lat = js["results"][0]["geometry"]["location"]["lat"] lng = js["results"][0]["geometry"]["location"]["lng"] print('lat', lat, 'lng', lng) location = js['results'][0]['formatted_address'] print(location)
const { fighter } = require('../models/fighter'); const createFighterValid = (req, res, next) => { // TODO: Implement validatior for fighter entity during creation next(); } const updateFighterValid = (req, res, next) => { // TODO: Implement validatior for fighter entity during update next(); } exports.createFighterValid = createFighterValid; exports.updateFighterValid = updateFighterValid;
import React from "react"; // reactstrap components import { Badge, Button, Card, CardBody, CardTitle, Container, Row, Col, } from "reactstrap"; // Core Components function FreeDemo() { return ( <> <section className="section-free-demo bg-secondary skew-separator"> <Container> <Row> <Col lg="7" md="12"> <div className="section-description" id="free-demo-github-button"> <h3 className="display-3">Free Demo</h3> <p className="lead mb-4"> Do you want to test and see the benefits of this Design System before purchasing it? You can give the demo version a try. It features enough basic components for you to get a feel of the design and also test the quality of the code. Get it free on GitHub! </p> <div className="github-buttons"> <Button className="btn-round" color="primary" href="https://github.com/creativetimofficial/argon-design-system-react" target="_blank" > View Demo on Github </Button> <div className="github-button"> </div> </div> </div> </Col> <Col lg="5" md="12"> <div className="github-background-container"> <i className="fab fa-github"></i> </div> </Col> </Row> <Row> <Col className="pt-5" lg="4" md="6"> <Card className="card-pricing card-background"> <CardBody> <CardTitle className="text-primary text-left ml-2" tag="h2"> Free Demo </CardTitle> <ul> <li className="text-left"> <strong>70</strong> Components </li> <li className="text-left"> <strong>3</strong> Example Pages </li> <li className="text-left"> <Badge className="badge-circle" color="danger"> <i className="fas fa-times text-white"></i> </Badge>{" "} Uncoventional cards </li> <li className="text-left"> <Badge className="badge-circle" color="danger"> <i className="fas fa-times text-white"></i> </Badge>{" "} Sections </li> <li className="text-left"> <Badge className="badge-circle" color="danger"> <i className="fas fa-times text-white"></i> </Badge>{" "} Photoshop for Prototype </li> <li className="text-left"> <Badge className="badge-circle" color="danger"> <i className="fas fa-times text-white"></i> </Badge>{" "} Premium Support </li> </ul> </CardBody> </Card> </Col> <Col className="pt-5" lg="4" md="6"> <Card className="card-pricing card-background"> <CardBody> <CardTitle className="text-primary text-left ml-2" tag="h2"> PRO Version </CardTitle> <ul> <li className="text-left"> <strong>1100+</strong> Components </li> <li className="text-left"> <strong>17</strong> Example Pages </li> <li className="text-left"> <Badge className="badge-circle" color="success"> <i className="ni ni-check-bold text-white"></i> </Badge>{" "} Uncoventional cards </li> <li className="text-left"> <Badge className="badge-circle" color="success"> <i className="ni ni-check-bold text-white"></i> </Badge>{" "} Sections </li> <li className="text-left"> <Badge className="badge-circle" color="success"> <i className="ni ni-check-bold text-white"></i> </Badge>{" "} Photoshop for Prototype </li> <li className="text-left"> <Badge className="badge-circle" color="success"> <i className="ni ni-check-bold text-white"></i> </Badge>{" "} Premium Support </li> </ul> </CardBody> </Card> </Col> </Row> </Container> </section> </> ); } export default FreeDemo;
var colors = { "1": "#7570b3", "2": "#1b9e77", "3": "#d95f02", "4": "#e7298a", "5": "#66a61e", "6": "#e6ab02", "7": "#a6761d", "8": "#666666", "9": "#1b9e77", "10": "#d95f02", "11": "#7570b3", "12": "#e7298a", "13": "#66a61e", "14": "#e6ab02", "15": "#a6761d", "16": "#666666", "17": "#1b9e77", "18": "#d95f02", "19": "#7570b3", "20": "#e7298a", "21": "#66a61e", "22": "#e6ab02", "X": "#a6761d", "Y": "#666666", "MT": "#555555" } // function colormap(val) { // return colors[val] // } function chartRNA() { $('#loader').show() $.ajax({ type: "POST", data: { cell_id: CELL, type: 'hist' }, dataType: "json", url: ROOTPATH + "/php/cellline_rna.php", success: function (response) { // change content: console.log(response); var trace = { x: response, type: 'histogram' }; var data = [trace]; var layout = { title: 'Histogram of normalized data', xaxis: { title: "Normalized gene expression" }, } Plotly.newPlot('project-rna-hist', data, layout); $('#loader').hide() }, error: function (response) { console.log(response.responseText) $('#loader').hide() } }) } function barchartRNA() { $('#loader').show() $.ajax({ type: "POST", data: { cell_id: CELL, type: 'bar' }, dataType: "json", url: ROOTPATH + "/php/cellline_rna.php", success: function (data) { // change content: console.log(data) // response.type = 'bar' // response.marker = { // color: response.x[0].map(x => colors[x]) // } // var data = [response]; var layout = { title: 'Normalized expression of all genes', legend: { title: { text: 'Chromosome' } }, xaxis: { // tickmode: 'array', title: "Genes", // dtick: 1, // nticks: 25 // type: 'multicategory', // automargin: true }, } Plotly.newPlot('project-rna-bar', data, layout) $('#loader').hide() }, error: function (response) { console.log(response.responseText) $('#loader').hide() } }) }
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests NODE_NETWORK_LIMITED. Tests that a node configured with -prune=550 signals NODE_NETWORK_LIMITED correctly and that it responds to getdata requests for blocks correctly: - send a block within 288 + 2 of the tip - disconnect peers who request blocks older than that.""" from test_framework.messages import CInv, MSG_BLOCK, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS from test_framework.p2p import P2PInterface from test_framework.test_framework import AgroCoinTestFramework from test_framework.util import ( assert_equal, ) class P2PIgnoreInv(P2PInterface): firstAddrnServices = 0 def on_inv(self, message): # The node will send us invs for other blocks. Ignore them. pass def on_addr(self, message): self.firstAddrnServices = message.addrs[0].nServices def wait_for_addr(self, timeout=5): test_function = lambda: self.last_message.get("addr") self.wait_until(test_function, timeout=timeout) def send_getdata_for_block(self, blockhash): getdata_request = msg_getdata() getdata_request.inv.append(CInv(MSG_BLOCK, int(blockhash, 16))) self.send_message(getdata_request) class NodeNetworkLimitedTest(AgroCoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 3 self.extra_args = [['-prune=550', '-addrmantest'], [], []] def disconnect_all(self): self.disconnect_nodes(0, 1) self.disconnect_nodes(0, 2) self.disconnect_nodes(1, 2) def setup_network(self): self.add_nodes(self.num_nodes, self.extra_args) self.start_nodes() def run_test(self): node = self.nodes[0].add_p2p_connection(P2PIgnoreInv()) expected_services = NODE_WITNESS | NODE_NETWORK_LIMITED self.log.info("Check that node has signalled expected services.") assert_equal(node.nServices, expected_services) self.log.info("Check that the localservices is as expected.") assert_equal(int(self.nodes[0].getnetworkinfo()['localservices'], 16), expected_services) self.log.info("Mine enough blocks to reach the NODE_NETWORK_LIMITED range.") self.connect_nodes(0, 1) blocks = self.nodes[1].generatetoaddress(292, self.nodes[1].get_deterministic_priv_key().address) self.sync_blocks([self.nodes[0], self.nodes[1]]) self.log.info("Make sure we can max retrieve block at tip-288.") node.send_getdata_for_block(blocks[1]) # last block in valid range node.wait_for_block(int(blocks[1], 16), timeout=3) self.log.info("Requesting block at height 2 (tip-289) must fail (ignored).") node.send_getdata_for_block(blocks[0]) # first block outside of the 288+2 limit node.wait_for_disconnect(5) self.log.info("Check local address relay, do a fresh connection.") self.nodes[0].disconnect_p2ps() node1 = self.nodes[0].add_p2p_connection(P2PIgnoreInv()) node1.send_message(msg_verack()) node1.wait_for_addr() #must relay address with NODE_NETWORK_LIMITED assert_equal(node1.firstAddrnServices, expected_services) self.nodes[0].disconnect_p2ps() # connect unsynced node 2 with pruned NODE_NETWORK_LIMITED peer # because node 2 is in IBD and node 0 is a NODE_NETWORK_LIMITED peer, sync must not be possible self.connect_nodes(0, 2) try: self.sync_blocks([self.nodes[0], self.nodes[2]], timeout=5) except: pass # node2 must remain at height 0 assert_equal(self.nodes[2].getblockheader(self.nodes[2].getbestblockhash())['height'], 0) # now connect also to node 1 (non pruned) self.connect_nodes(1, 2) # sync must be possible self.sync_blocks() # disconnect all peers self.disconnect_all() # mine 10 blocks on node 0 (pruned node) self.nodes[0].generatetoaddress(10, self.nodes[0].get_deterministic_priv_key().address) # connect node1 (non pruned) with node0 (pruned) and check if the can sync self.connect_nodes(0, 1) # sync must be possible, node 1 is no longer in IBD and should therefore connect to node 0 (NODE_NETWORK_LIMITED) self.sync_blocks([self.nodes[0], self.nodes[1]]) if __name__ == '__main__': NodeNetworkLimitedTest().main()
const path = require('path'); const fs = require('fs'); const del = require('del'); const sync = require('child_process').execSync; const paths = { app: (...p) => path.join(process.cwd(), ...p), bin: (...p) => path.join(process.cwd(), 'node_modules', '.bin', ...p), cli: (...p) => path.join(__dirname, ...p), }; const run = (command, options) => sync(command, { stdio: 'inherit', ...options }); const clean = dir => del.sync([paths.app(dir)]); const exists = (file, fallback) => (fs.existsSync(file) ? file : fallback); module.exports = { paths, run, clean, exists, };
""" Copyright 2018 Banco Bilbao Vizcaya Argentaria, S.A. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import datetime import time import numpy as np import logging from ..heuristic import Heuristic from .rl_heuristic_agent import Agent from scheduler.system.dbConnection import DBConnector from bson.objectid import ObjectId from scheduler.settings import * from celery import task class DQLearning(Heuristic): def __init__(self, project_id, model_id, total_n_episodes, **kwargs): self.logger = logging.getLogger("SCHEDULER") self.db = kwargs["db"] self.project_id = project_id self.model_id = model_id self.project = dict() self.model = dict() self.running_experiments = list() self.experiments_counter = 0 super(DQLearning, self).get_project_definition() super(DQLearning, self).get_model_template() self.total_time_consumed = 0 self.total_reward = 0 self.executed_experiments_counter = 0 self.episodes_counter = 0 self.total_n_episodes = total_n_episodes self.experiments_failed_counter = 0 self.state = np.array([self.total_time_consumed, self.total_reward, self.executed_experiments_counter]).reshape( 1, 3) self.last_action = None self.last_reward = 0 # TODO: Change to be flexible self.last_parameter_executed = 0.1 def run(self): """ Launch the full heuristic search process. :return: void """ self.logger.info('Starting Reinforcement Search Heuristic...') agent = Agent() self.check_heuristic_syntax() self.init_queue(agent) while self.episodes_counter < self.total_n_episodes: self.logger.info('Evaluating...') time.sleep(3) self.evaluate(agent) def init_queue(self, agent): """ Initialize the queue following the heuristic rules. :return: list """ self.logger.info('Generating Initial Experiment...') action = self.run_reinforcement(agent) self.generate_experiments(action) self.last_action = action def evaluate(self, agent): """ Manage the heuristic process until the search is finished. :return: void """ for experiment_id in self.running_experiments: status_completed = self.check_completed(experiment_id) self.logger.info('Evaluating experiment: %s, %s', experiment_id, status_completed) if status_completed: done = False if self.experiments_failed_counter >= 5: self.logger.info('Game over, restarting state...') # Game over, start again self.episodes_counter += 1 self.total_reward = 0 self.total_time_consumed = 0 self.executed_experiments_counter = 0 self.experiments_failed_counter = 0 self.last_reward = 0 reward = 0 # TODO: Check to be flexible self.last_parameter_executed = 0.1 done = True next_state = np.array( [self.total_reward, self.total_time_consumed, self.executed_experiments_counter]).reshape(1, 3) agent.replay() else: self.logger.info('Continue playing...') reward = self.check_reward(experiment_id) self.logger.info('Reward: %f', reward) time_consumed = self.check_time_consumed(experiment_id) next_state = self.calculate_state(time_consumed, reward) self.logger.info('Next state: %s', next_state) # Binary Reward means: # Binary_reward = 1 if value increase # Binary_reward = 0 if value decrease # Goal: Maximum value binary_reward = self.calc_reward(self.last_reward, reward) self.logger.info('Binary reward: %d', binary_reward) self.last_reward = reward # Save step agent.record(self.state, self.last_action, binary_reward, next_state, done) # Update state self.state = next_state # Choose next action action = self.run_reinforcement(agent) self.logger.info('Next action: %d', action) # Generate experiment and send to queue self.generate_experiments(action) def generate_experiments(self, action): """ Generate new experiments to be sent to the queue and executed. :return: list """ self.logger.info('Generating new experiment...') # TODO: Change to be flexible with different parameters current_value = self.last_parameter_executed experiments_to_queue = list() # Generate Experiments name = ''.join([self.project['name'], 'model{num}'.format(num=self.experiments_counter)]) experiment = dict() experiment['name'] = name experiment['project_name'] = self.project['name'] experiment['project_id'] = ObjectId(self.project_id) experiment['parameters'] = [] experiment['create_time'] = datetime.datetime.utcnow() experiment['template_name'] = self.project['template'] for param in self.project['parameters']: parameter = dict() if param['type'] == 'lineal': parameter['name'] = param['name'] if action == 1: # Increase 10% value_to_execute = current_value * 1.1 else: # Decrease 10% value_to_execute = current_value * 0.90 parameter['value'] = value_to_execute self.last_parameter_executed = value_to_execute elif param['type'] == 'absolute': # TODO: Take more than just the first element parameter['name'] = param['name'] parameter['value'] = param['value'][0] else: raise Exception("Parameter type not accepted") experiment['parameters'].append(parameter) self.logger.info('Experiment generated: %s', experiment) experiments_to_queue.append(experiment) # Send to the queue experiment_ids = super(DQLearning, self).send_experiments_to_queue(experiments_to_queue) # Append to running experiments self.running_experiments = self.running_experiments + experiment_ids # Increase the counter self.experiments_counter += 1 def check_heuristic_syntax(self): """ Check the heuristic section of the project definition. :return: boolean """ self.logger.info('Checking project syntax definition...') for param in self.project['parameters']: if param['type'] == 'lineal': pass elif param['type'] == 'absolute': pass elif param['type'] == 'layers': raise Exception("Layers parameter still not implemented") else: raise Exception("Parameter type not accepted") def check_completed(self, experiment_id): """ Check the status of the running experiments :return: boolean """ # Check status state = str(self.db.get_document({'_id': ObjectId(experiment_id)}, "experiments")['state']) experiment_completed = \ state == 'completed' \ or state == 'accuracy_limit_reached' \ or state == 'timeout' # If it is completed, delete from experiment list if experiment_completed: self.running_experiments.remove(experiment_id) # return true if it is completed return experiment_completed ###### RUN REINFORCEMENT ######### def run_reinforcement(self, agent): action = agent.select_action(self.state) return action def calculate_state(self, time_consumed, reward): self.total_time_consumed = self.total_time_consumed + time_consumed self.total_reward = self.total_reward + reward self.executed_experiments_counter += 1 state = np.array([self.total_time_consumed, self.total_reward, self.executed_experiments_counter]).reshape(1, 3) return state def calc_reward(self, previous_accuracy, current_accuracy): if previous_accuracy < current_accuracy: self.experiments_failed_counter = 0 return 1 else: self.experiments_failed_counter += 1 return 0 def check_time_consumed(self, experiment_id): """Return the experiment's execution time.""" metrics = self.db.get_document( {'name': str(experiment_id) + '-metrics'}, 'experimentsMetrics') try: experiment_time = metrics['metrics'].pop()['experiment_time'] except Exception: self.logger.debug('No metrics yet') experiment_time = 0 return experiment_time def check_reward(self, experiment_id): """Return the experiment's execution time.""" metrics = self.db.get_document( {'name': str(experiment_id) + '-metrics'}, 'experimentsMetrics') try: accuracy = metrics['metrics'].pop()['accuracy'] except Exception: self.logger.debug('No metrics yet') accuracy = 0 return accuracy @task(name="deep_qlearning") def start(project_id, model_id, total_n_episodes): db = DBConnector(MONGODB_URL, MONGODB_PORT, MONGODB_DATABASE, MONGODB_USER, MONGODB_PASSWORD) heuristic = DQLearning(project_id, model_id, total_n_episodes, db=db) heuristic.run()
import test from 'ava' import cookie from 'parse/cookie' import format from 'format' import moment from 'moment' function makeSpec () { return new Map() } test('expires', t => { const time = moment.utc() const spec = makeSpec() cookie({ name: 'theme', expires: format.date.iso8601(time) }, spec) t.deepEqual(spec, new Map().set('theme', { expires: format.date.http(time) })) })